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

mac80211: Use appropriate TID for sending BAR, ADDBA and DELBA frames

Currently BAR, ADDBA and DELBA frames are always sent using AC_VO. If
the TID for which a BA session is established is assigned to a different
queue BAR, ADDBA and DELBA frames can "overtake" frames of the according
BA session.

Hence, always put BA session related frames into the same queue as the
BA sessions data frames.

Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>

authored by

Helmut Schaa and committed by
John W. Linville
cf6bb79a 4d33960b

+17 -8
+2 -2
net/mac80211/agg-tx.c
··· 107 107 mgmt->u.action.u.addba_req.start_seq_num = 108 108 cpu_to_le16(start_seq_num << 4); 109 109 110 - ieee80211_tx_skb(sdata, skb); 110 + ieee80211_tx_skb_tid(sdata, skb, tid); 111 111 } 112 112 113 113 void ieee80211_send_bar(struct ieee80211_vif *vif, u8 *ra, u16 tid, u16 ssn) ··· 136 136 bar->start_seq_num = cpu_to_le16(ssn); 137 137 138 138 IEEE80211_SKB_CB(skb)->flags |= IEEE80211_TX_INTFL_DONT_ENCRYPT; 139 - ieee80211_tx_skb(sdata, skb); 139 + ieee80211_tx_skb_tid(sdata, skb, tid); 140 140 } 141 141 EXPORT_SYMBOL(ieee80211_send_bar); 142 142
+1 -1
net/mac80211/ht.c
··· 300 300 mgmt->u.action.u.delba.params = cpu_to_le16(params); 301 301 mgmt->u.action.u.delba.reason_code = cpu_to_le16(reason_code); 302 302 303 - ieee80211_tx_skb(sdata, skb); 303 + ieee80211_tx_skb_tid(sdata, skb, tid); 304 304 } 305 305 306 306 void ieee80211_process_delba(struct ieee80211_sub_if_data *sdata,
+10 -1
net/mac80211/ieee80211_i.h
··· 1349 1349 gfp_t gfp); 1350 1350 void ieee80211_set_wmm_default(struct ieee80211_sub_if_data *sdata); 1351 1351 void ieee80211_xmit(struct ieee80211_sub_if_data *sdata, struct sk_buff *skb); 1352 - void ieee80211_tx_skb(struct ieee80211_sub_if_data *sdata, struct sk_buff *skb); 1352 + 1353 + void ieee80211_tx_skb_tid(struct ieee80211_sub_if_data *sdata, 1354 + struct sk_buff *skb, int tid); 1355 + static void inline ieee80211_tx_skb(struct ieee80211_sub_if_data *sdata, 1356 + struct sk_buff *skb) 1357 + { 1358 + /* Send all internal mgmt frames on VO. Accordingly set TID to 7. */ 1359 + ieee80211_tx_skb_tid(sdata, skb, 7); 1360 + } 1361 + 1353 1362 void ieee802_11_parse_elems(u8 *start, size_t len, 1354 1363 struct ieee802_11_elems *elems); 1355 1364 u32 ieee802_11_parse_elems_crc(u8 *start, size_t len,
+4 -4
net/mac80211/tx.c
··· 2696 2696 } 2697 2697 EXPORT_SYMBOL(ieee80211_get_buffered_bc); 2698 2698 2699 - void ieee80211_tx_skb(struct ieee80211_sub_if_data *sdata, struct sk_buff *skb) 2699 + void ieee80211_tx_skb_tid(struct ieee80211_sub_if_data *sdata, 2700 + struct sk_buff *skb, int tid) 2700 2701 { 2701 2702 skb_set_mac_header(skb, 0); 2702 2703 skb_set_network_header(skb, 0); 2703 2704 skb_set_transport_header(skb, 0); 2704 2705 2705 - /* Send all internal mgmt frames on VO. Accordingly set TID to 7. */ 2706 - skb_set_queue_mapping(skb, IEEE80211_AC_VO); 2707 - skb->priority = 7; 2706 + skb_set_queue_mapping(skb, ieee802_1d_to_ac[tid]); 2707 + skb->priority = tid; 2708 2708 2709 2709 /* 2710 2710 * The other path calling ieee80211_xmit is from the tasklet,