Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

mac80211: allow the driver to advertise A-MSDU within A-MPDU Rx support

Drivers may be interested in receiving A-MSDU within A-MDPU.
Not all the devices may be able to do so, make it configurable.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>

authored by

Emmanuel Grumbach and committed by
Johannes Berg
99e7ca44 46cad4b7

+8 -1
+4
include/net/mac80211.h
··· 1897 1897 * @IEEE80211_HW_TDLS_WIDER_BW: The device/driver supports wider bandwidth 1898 1898 * than then BSS bandwidth for a TDLS link on the base channel. 1899 1899 * 1900 + * @IEEE80211_HW_SUPPORTS_AMSDU_IN_AMPDU: The driver supports receiving A-MSDUs 1901 + * within A-MPDU. 1902 + * 1900 1903 * @NUM_IEEE80211_HW_FLAGS: number of hardware flags, used for sizing arrays 1901 1904 */ 1902 1905 enum ieee80211_hw_flags { ··· 1933 1930 IEEE80211_HW_SUPPORTS_CLONED_SKBS, 1934 1931 IEEE80211_HW_SINGLE_SCAN_ON_ALL_BANDS, 1935 1932 IEEE80211_HW_TDLS_WIDER_BW, 1933 + IEEE80211_HW_SUPPORTS_AMSDU_IN_AMPDU, 1936 1934 1937 1935 /* keep last, obviously */ 1938 1936 NUM_IEEE80211_HW_FLAGS
+3 -1
net/mac80211/agg-rx.c
··· 189 189 struct ieee80211_local *local = sdata->local; 190 190 struct sk_buff *skb; 191 191 struct ieee80211_mgmt *mgmt; 192 + bool amsdu = ieee80211_hw_check(&local->hw, SUPPORTS_AMSDU_IN_AMPDU); 192 193 u16 capab; 193 194 194 195 skb = dev_alloc_skb(sizeof(*mgmt) + local->hw.extra_tx_headroom); ··· 218 217 mgmt->u.action.u.addba_resp.action_code = WLAN_ACTION_ADDBA_RESP; 219 218 mgmt->u.action.u.addba_resp.dialog_token = dialog_token; 220 219 221 - capab = (u16)(policy << 1); /* bit 1 aggregation policy */ 220 + capab = (u16)(amsdu << 0); /* bit 0 A-MSDU support */ 221 + capab |= (u16)(policy << 1); /* bit 1 aggregation policy */ 222 222 capab |= (u16)(tid << 2); /* bit 5:2 TID number */ 223 223 capab |= (u16)(buf_size << 6); /* bit 15:6 max size of aggregation */ 224 224
+1
net/mac80211/debugfs.c
··· 123 123 FLAG(SUPPORTS_CLONED_SKBS), 124 124 FLAG(SINGLE_SCAN_ON_ALL_BANDS), 125 125 FLAG(TDLS_WIDER_BW), 126 + FLAG(SUPPORTS_AMSDU_IN_AMPDU), 126 127 127 128 /* keep last for the build bug below */ 128 129 (void *)0x1