aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/agg-rx.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/mac80211/agg-rx.c')
-rw-r--r--net/mac80211/agg-rx.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/net/mac80211/agg-rx.c b/net/mac80211/agg-rx.c
index ce8e0e772bab..f9516a27e233 100644
--- a/net/mac80211/agg-rx.c
+++ b/net/mac80211/agg-rx.c
@@ -14,6 +14,7 @@
14 */ 14 */
15 15
16#include <linux/ieee80211.h> 16#include <linux/ieee80211.h>
17#include <linux/slab.h>
17#include <net/mac80211.h> 18#include <net/mac80211.h>
18#include "ieee80211_i.h" 19#include "ieee80211_i.h"
19#include "driver-ops.h" 20#include "driver-ops.h"
@@ -41,7 +42,7 @@ void __ieee80211_stop_rx_ba_session(struct sta_info *sta, u16 tid,
41 sta->sta.addr, tid); 42 sta->sta.addr, tid);
42#endif /* CONFIG_MAC80211_HT_DEBUG */ 43#endif /* CONFIG_MAC80211_HT_DEBUG */
43 44
44 if (drv_ampdu_action(local, IEEE80211_AMPDU_RX_STOP, 45 if (drv_ampdu_action(local, sta->sdata, IEEE80211_AMPDU_RX_STOP,
45 &sta->sta, tid, NULL)) 46 &sta->sta, tid, NULL))
46 printk(KERN_DEBUG "HW problem - can not stop rx " 47 printk(KERN_DEBUG "HW problem - can not stop rx "
47 "aggregation for tid %d\n", tid); 48 "aggregation for tid %d\n", tid);
@@ -82,12 +83,11 @@ void __ieee80211_stop_rx_ba_session(struct sta_info *sta, u16 tid,
82void ieee80211_sta_stop_rx_ba_session(struct ieee80211_sub_if_data *sdata, u8 *ra, u16 tid, 83void ieee80211_sta_stop_rx_ba_session(struct ieee80211_sub_if_data *sdata, u8 *ra, u16 tid,
83 u16 initiator, u16 reason) 84 u16 initiator, u16 reason)
84{ 85{
85 struct ieee80211_local *local = sdata->local;
86 struct sta_info *sta; 86 struct sta_info *sta;
87 87
88 rcu_read_lock(); 88 rcu_read_lock();
89 89
90 sta = sta_info_get(local, ra); 90 sta = sta_info_get(sdata, ra);
91 if (!sta) { 91 if (!sta) {
92 rcu_read_unlock(); 92 rcu_read_unlock();
93 return; 93 return;
@@ -135,7 +135,7 @@ static void ieee80211_send_addba_resp(struct ieee80211_sub_if_data *sdata, u8 *d
135 135
136 if (!skb) { 136 if (!skb) {
137 printk(KERN_DEBUG "%s: failed to allocate buffer " 137 printk(KERN_DEBUG "%s: failed to allocate buffer "
138 "for addba resp frame\n", sdata->dev->name); 138 "for addba resp frame\n", sdata->name);
139 return; 139 return;
140 } 140 }
141 141
@@ -143,10 +143,10 @@ static void ieee80211_send_addba_resp(struct ieee80211_sub_if_data *sdata, u8 *d
143 mgmt = (struct ieee80211_mgmt *) skb_put(skb, 24); 143 mgmt = (struct ieee80211_mgmt *) skb_put(skb, 24);
144 memset(mgmt, 0, 24); 144 memset(mgmt, 0, 24);
145 memcpy(mgmt->da, da, ETH_ALEN); 145 memcpy(mgmt->da, da, ETH_ALEN);
146 memcpy(mgmt->sa, sdata->dev->dev_addr, ETH_ALEN); 146 memcpy(mgmt->sa, sdata->vif.addr, ETH_ALEN);
147 if (sdata->vif.type == NL80211_IFTYPE_AP || 147 if (sdata->vif.type == NL80211_IFTYPE_AP ||
148 sdata->vif.type == NL80211_IFTYPE_AP_VLAN) 148 sdata->vif.type == NL80211_IFTYPE_AP_VLAN)
149 memcpy(mgmt->bssid, sdata->dev->dev_addr, ETH_ALEN); 149 memcpy(mgmt->bssid, sdata->vif.addr, ETH_ALEN);
150 else if (sdata->vif.type == NL80211_IFTYPE_STATION) 150 else if (sdata->vif.type == NL80211_IFTYPE_STATION)
151 memcpy(mgmt->bssid, sdata->u.mgd.bssid, ETH_ALEN); 151 memcpy(mgmt->bssid, sdata->u.mgd.bssid, ETH_ALEN);
152 152
@@ -166,7 +166,7 @@ static void ieee80211_send_addba_resp(struct ieee80211_sub_if_data *sdata, u8 *d
166 mgmt->u.action.u.addba_resp.timeout = cpu_to_le16(timeout); 166 mgmt->u.action.u.addba_resp.timeout = cpu_to_le16(timeout);
167 mgmt->u.action.u.addba_resp.status = cpu_to_le16(status); 167 mgmt->u.action.u.addba_resp.status = cpu_to_le16(status);
168 168
169 ieee80211_tx_skb(sdata, skb, 1); 169 ieee80211_tx_skb(sdata, skb);
170} 170}
171 171
172void ieee80211_process_addba_request(struct ieee80211_local *local, 172void ieee80211_process_addba_request(struct ieee80211_local *local,
@@ -206,9 +206,9 @@ void ieee80211_process_addba_request(struct ieee80211_local *local,
206 * check if configuration can support the BA policy 206 * check if configuration can support the BA policy
207 * and if buffer size does not exceeds max value */ 207 * and if buffer size does not exceeds max value */
208 /* XXX: check own ht delayed BA capability?? */ 208 /* XXX: check own ht delayed BA capability?? */
209 if (((ba_policy != 1) 209 if (((ba_policy != 1) &&
210 && (!(sta->sta.ht_cap.cap & IEEE80211_HT_CAP_DELAY_BA))) 210 (!(sta->sta.ht_cap.cap & IEEE80211_HT_CAP_DELAY_BA))) ||
211 || (buf_size > IEEE80211_MAX_AMPDU_BUF)) { 211 (buf_size > IEEE80211_MAX_AMPDU_BUF)) {
212 status = WLAN_STATUS_INVALID_QOS_PARAM; 212 status = WLAN_STATUS_INVALID_QOS_PARAM;
213#ifdef CONFIG_MAC80211_HT_DEBUG 213#ifdef CONFIG_MAC80211_HT_DEBUG
214 if (net_ratelimit()) 214 if (net_ratelimit())
@@ -280,7 +280,7 @@ void ieee80211_process_addba_request(struct ieee80211_local *local,
280 goto end; 280 goto end;
281 } 281 }
282 282
283 ret = drv_ampdu_action(local, IEEE80211_AMPDU_RX_START, 283 ret = drv_ampdu_action(local, sta->sdata, IEEE80211_AMPDU_RX_START,
284 &sta->sta, tid, &start_seq_num); 284 &sta->sta, tid, &start_seq_num);
285#ifdef CONFIG_MAC80211_HT_DEBUG 285#ifdef CONFIG_MAC80211_HT_DEBUG
286 printk(KERN_DEBUG "Rx A-MPDU request on tid %d result %d\n", tid, ret); 286 printk(KERN_DEBUG "Rx A-MPDU request on tid %d result %d\n", tid, ret);