ath9k: rework handling of sending BlockAckReq frames, should hopefully lead to fewer...
[openwrt/staging/florian.git] / package / mac80211 / patches / 570-mac80211_send_bar.patch
1 --- a/net/mac80211/agg-tx.c
2 +++ b/net/mac80211/agg-tx.c
3 @@ -109,8 +109,9 @@ static void ieee80211_send_addba_request
4 ieee80211_tx_skb(sdata, skb);
5 }
6
7 -void ieee80211_send_bar(struct ieee80211_sub_if_data *sdata, u8 *ra, u16 tid, u16 ssn)
8 +void ieee80211_send_bar(struct ieee80211_vif *vif, u8 *ra, u16 tid, u16 ssn)
9 {
10 + struct ieee80211_sub_if_data *sdata = vif_to_sdata(vif);
11 struct ieee80211_local *local = sdata->local;
12 struct sk_buff *skb;
13 struct ieee80211_bar *bar;
14 @@ -138,6 +139,7 @@ void ieee80211_send_bar(struct ieee80211
15 IEEE80211_SKB_CB(skb)->flags |= IEEE80211_TX_INTFL_DONT_ENCRYPT;
16 ieee80211_tx_skb(sdata, skb);
17 }
18 +EXPORT_SYMBOL(ieee80211_send_bar);
19
20 void ieee80211_assign_tid_tx(struct sta_info *sta, int tid,
21 struct tid_ampdu_tx *tid_tx)
22 --- a/include/net/mac80211.h
23 +++ b/include/net/mac80211.h
24 @@ -3007,6 +3007,19 @@ void ieee80211_remain_on_channel_expired
25 void ieee80211_stop_rx_ba_session(struct ieee80211_vif *vif, u16 ba_rx_bitmap,
26 const u8 *addr);
27
28 +/**
29 + * ieee80211_send_bar - send a BlockAckReq frame
30 + *
31 + * can be used to flush pending frames from the peer's aggregation reorder
32 + * buffer.
33 + *
34 + * @vif: &struct ieee80211_vif pointer from the add_interface callback.
35 + * @ra: the peer's destination address
36 + * @tid: the TID of the aggregation session
37 + * @ssn: the new starting sequence number for the receiver
38 + */
39 +void ieee80211_send_bar(struct ieee80211_vif *vif, u8 *ra, u16 tid, u16 ssn);
40 +
41 /* Rate control API */
42
43 /**
44 --- a/net/mac80211/ieee80211_i.h
45 +++ b/net/mac80211/ieee80211_i.h
46 @@ -1225,7 +1225,6 @@ struct ieee80211_tx_status_rtap_hdr {
47 void ieee80211_ht_cap_ie_to_sta_ht_cap(struct ieee80211_supported_band *sband,
48 struct ieee80211_ht_cap *ht_cap_ie,
49 struct ieee80211_sta_ht_cap *ht_cap);
50 -void ieee80211_send_bar(struct ieee80211_sub_if_data *sdata, u8 *ra, u16 tid, u16 ssn);
51 void ieee80211_send_delba(struct ieee80211_sub_if_data *sdata,
52 const u8 *da, u16 tid,
53 u16 initiator, u16 reason_code);
54 --- a/net/mac80211/status.c
55 +++ b/net/mac80211/status.c
56 @@ -239,7 +239,7 @@ void ieee80211_tx_status(struct ieee8021
57 tid = qc[0] & 0xf;
58 ssn = ((le16_to_cpu(hdr->seq_ctrl) + 0x10)
59 & IEEE80211_SCTL_SEQ);
60 - ieee80211_send_bar(sta->sdata, hdr->addr1,
61 + ieee80211_send_bar(&sta->sdata->vif, hdr->addr1,
62 tid, ssn);
63 }
64