]> git.openfabrics.org - ~emulex/infiniband.git/commitdiff
mac80211: make ieee80211_send_bar available for drivers
authorFelix Fietkau <nbd@openwrt.org>
Sat, 20 Aug 2011 13:53:55 +0000 (15:53 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Wed, 14 Sep 2011 17:56:16 +0000 (13:56 -0400)
To properly maintain the peer's block ack window, the driver needs to be
able to control the new starting sequence number that is sent along with
the BlockAckReq frame.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
include/net/mac80211.h
net/mac80211/agg-tx.c
net/mac80211/ieee80211_i.h
net/mac80211/status.c

index 5e5029b22ac729aed08a8bcf9a180137315b22fc..fc4806c6097f0baacb09c9158da9c0fb0786dc72 100644 (file)
@@ -3225,6 +3225,19 @@ void ieee80211_remain_on_channel_expired(struct ieee80211_hw *hw);
 void ieee80211_stop_rx_ba_session(struct ieee80211_vif *vif, u16 ba_rx_bitmap,
                                  const u8 *addr);
 
+/**
+ * ieee80211_send_bar - send a BlockAckReq frame
+ *
+ * can be used to flush pending frames from the peer's aggregation reorder
+ * buffer.
+ *
+ * @vif: &struct ieee80211_vif pointer from the add_interface callback.
+ * @ra: the peer's destination address
+ * @tid: the TID of the aggregation session
+ * @ssn: the new starting sequence number for the receiver
+ */
+void ieee80211_send_bar(struct ieee80211_vif *vif, u8 *ra, u16 tid, u16 ssn);
+
 /* Rate control API */
 
 /**
index 250b9a53f6d99c3a7cd001292edd12cd6e309f8c..3cef5a7281cb2d5c2db9c3c82a9b5037dbf550b8 100644 (file)
@@ -104,8 +104,9 @@ static void ieee80211_send_addba_request(struct ieee80211_sub_if_data *sdata,
        ieee80211_tx_skb(sdata, skb);
 }
 
-void ieee80211_send_bar(struct ieee80211_sub_if_data *sdata, u8 *ra, u16 tid, u16 ssn)
+void ieee80211_send_bar(struct ieee80211_vif *vif, u8 *ra, u16 tid, u16 ssn)
 {
+       struct ieee80211_sub_if_data *sdata = vif_to_sdata(vif);
        struct ieee80211_local *local = sdata->local;
        struct sk_buff *skb;
        struct ieee80211_bar *bar;
@@ -131,6 +132,7 @@ void ieee80211_send_bar(struct ieee80211_sub_if_data *sdata, u8 *ra, u16 tid, u1
        IEEE80211_SKB_CB(skb)->flags |= IEEE80211_TX_INTFL_DONT_ENCRYPT;
        ieee80211_tx_skb(sdata, skb);
 }
+EXPORT_SYMBOL(ieee80211_send_bar);
 
 void ieee80211_assign_tid_tx(struct sta_info *sta, int tid,
                             struct tid_ampdu_tx *tid_tx)
index c204cee1189c4a858ca64c633ff0e8a26fcec453..a37da74de0232241a44fe9fb90d42b8b3f4a91cf 100644 (file)
@@ -1186,7 +1186,6 @@ struct ieee80211_tx_status_rtap_hdr {
 void ieee80211_ht_cap_ie_to_sta_ht_cap(struct ieee80211_supported_band *sband,
                                       struct ieee80211_ht_cap *ht_cap_ie,
                                       struct ieee80211_sta_ht_cap *ht_cap);
-void ieee80211_send_bar(struct ieee80211_sub_if_data *sdata, u8 *ra, u16 tid, u16 ssn);
 void ieee80211_send_delba(struct ieee80211_sub_if_data *sdata,
                          const u8 *da, u16 tid,
                          u16 initiator, u16 reason_code);
index ba405bc4f81214ba118c07fe3c5267b360e2a153..14268465f1d893d1a2f565fb6c39a0630c71b413 100644 (file)
@@ -136,7 +136,7 @@ static void ieee80211_check_pending_bar(struct sta_info *sta, u8 *addr, u8 tid)
                return;
 
        tid_tx->bar_pending = false;
-       ieee80211_send_bar(sta->sdata, addr, tid, tid_tx->failed_bar_ssn);
+       ieee80211_send_bar(&sta->sdata->vif, addr, tid, tid_tx->failed_bar_ssn);
 }
 
 static void ieee80211_frame_acked(struct sta_info *sta, struct sk_buff *skb)
@@ -273,7 +273,7 @@ void ieee80211_tx_status(struct ieee80211_hw *hw, struct sk_buff *skb)
                        tid = qc[0] & 0xf;
                        ssn = ((le16_to_cpu(hdr->seq_ctrl) + 0x10)
                                                & IEEE80211_SCTL_SEQ);
-                       ieee80211_send_bar(sta->sdata, hdr->addr1,
+                       ieee80211_send_bar(&sta->sdata->vif, hdr->addr1,
                                           tid, ssn);
                }