mac80211: add ADDBA_EXT responder support
Subsystems (2)
v2 cover mac80211: add ADDBA_EXT responder support
HE allows peers to negotiate the aggregation fragmentation level to be used during transmission. The level can be 1-3. The Ext element is added behind the ADDBA request inside the action frame. The responder will then reply with the same level or a lower one if the requested one is not supported. This patch only handles the responder part.
Changes in V2
* utilise the IE parser provided by mac80211
John Crispin (2):
mac80211: add support for parsing ADDBA_EXT IEs
mac80211: add ADDBA_EXT responder support
include/linux/ieee80211.h | 11 ++++++ net/mac80211/agg-rx.c | 71 +++++++++++++++++++++++++++++++++----- net/mac80211/ht.c | 2 +- net/mac80211/ieee80211_i.h | 4 ++- net/mac80211/util.c | 7 ++++ 5 files changed, 84 insertions(+), 11 deletions(-)
Signature · 1 line
2.20.1
PATCH v2 1/2 mac80211: add support for parsing ADDBA_EXT IEs
ADDBA_EXT IEs can be used to negotiate the BA fragmentation level.
--- include/linux/ieee80211.h | 8 ++++++++ net/mac80211/ieee80211_i.h | 1 + net/mac80211/util.c | 7 +++++++ 3 files changed, 16 insertions(+)
include/linux/ieee80211.h +8 -0
@@ -884,6 +884,14 @@ struct ieee80211_tpc_report_ie {u8 link_margin; } __packed; +#define IEEE80211_ADDBA_EXT_FRAG_LEVEL_MASK GENMASK(2, 1) +#define IEEE80211_ADDBA_EXT_FRAG_LEVEL_SHIFT 1 +#define IEEE80211_ADDBA_EXT_NO_FRAG BIT(0) + +struct ieee80211_addba_ext_ie { +u8 data; +} __packed; +struct ieee80211_mgmt {__le16 frame_control;__le16 duration;
net/mac80211/ieee80211_i.h +1 -0
@@ -1512,6 +1512,7 @@ struct ieee802_11_elems {u8 max_bssid_indicator;u8 dtim_count;u8 dtim_period; +const struct ieee80211_addba_ext_ie *addba_ext_ie;/* length of them, respectively */ u8 ext_capab_len;
net/mac80211/util.c +7 -0
@@ -1203,6 +1203,13 @@ _ieee802_11_parse_elems_crc(const u8 *start, size_t len, bool action, elems->cisco_dtpc_elem = pos;break ; +case WLAN_EID_ADDBA_EXT : +if (elen !=sizeof (struct ieee80211_addba_ext_ie )) { + elem_parse_failed = true; +break ; + } + elems->addba_ext_ie = (void *)pos; +break ;case WLAN_EID_TIMEOUT_INTERVAL :if (elen >=sizeof (struct ieee80211_timeout_interval_ie )) elems->timeout_int = (void *)pos;
Signature · 1 line
2.20.1
PATCH v2 2/2 mac80211: add ADDBA_EXT responder support
In reply to John CrispinHE allows peers to negotiate the aggregation fragmentation level to be used during transmission. The level can be 1-3. The Ext element is added behind the ADDBA request inside the action frame. The responder will then reply with the same level or a lower one if the requested one is not supported. This patch only handles the responder part.
--- include/linux/ieee80211.h | 3 ++ net/mac80211/agg-rx.c | 71 +++++++++++++++++++++++++++++++++----- net/mac80211/ht.c | 2 +- net/mac80211/ieee80211_i.h | 3 +- 4 files changed, 68 insertions(+), 11 deletions(-)
include/linux/ieee80211.h +3 -0
@@ -984,6 +984,8 @@ struct ieee80211_mgmt {__le16 capab;__le16 timeout;__le16 start_seq_num; +/* followed by BA Extension */ +u8 variable[0 ]; }__packed addba_req;struct {u8 action_code;
@@ -1742,6 +1744,7 @@ int ieee80211_get_vht_max_nss(struct ieee80211_vht_cap *cap,#define IEEE80211_HE_MAC_CAP0_DYNAMIC_FRAG_LEVEL_2 0x10#define IEEE80211_HE_MAC_CAP0_DYNAMIC_FRAG_LEVEL_3 0x18#define IEEE80211_HE_MAC_CAP0_DYNAMIC_FRAG_MASK 0x18 +#define IEEE80211_HE_MAC_CAP0_DYNAMIC_FRAG_SHIFT 3#define IEEE80211_HE_MAC_CAP0_MAX_NUM_FRAG_MSDU_1 0x00#define IEEE80211_HE_MAC_CAP0_MAX_NUM_FRAG_MSDU_2 0x20#define IEEE80211_HE_MAC_CAP0_MAX_NUM_FRAG_MSDU_4 0x40
net/mac80211/agg-rx.c +62 -9
129 lines not on this page · raw message
net/mac80211/ht.c +1 -1
@@ -362,7 +362,7 @@ void ieee80211_ba_session_work(struct work_struct *work) sta->ampdu_mlme.tid_rx_manage_offl))___ieee80211_start_rx_ba_session (sta,0 ,0 ,0 ,1 , tid,IEEE80211_MAX_AMPDU_BUF_HT , - false, true); + false, true,NULL );if (test_and_clear_bit (tid +IEEE80211_NUM_TIDS , sta->ampdu_mlme.tid_rx_manage_offl))
net/mac80211/ieee80211_i.h +2 -1
@@ -1814,7 +1814,8 @@ void __ieee80211_stop_rx_ba_session(struct sta_info *sta, u16 tid,void ___ieee80211_start_rx_ba_session (struct sta_info *sta,u8 dialog_token,u16 timeout,u16 start_seq_num,u16 ba_policy,u16 tid, -u16 buf_size,bool tx,bool auto_seq); +u16 buf_size,bool tx,bool auto_seq, +const struct ieee80211_addba_ext_ie *addbaext);void ieee80211_sta_tear_down_BA_sessions (struct sta_info *sta,enum ieee80211_agg_stop_reason reason); void ieee80211_process_delba(struct ieee80211_sub_if_data *sdata,
Signature · 1 line
2.20.1