aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--net/mac80211/agg-rx.c2
-rw-r--r--net/mac80211/agg-tx.c4
-rw-r--r--net/mac80211/driver-ops.h14
-rw-r--r--net/mac80211/sta_info.c4
4 files changed, 17 insertions, 7 deletions
diff --git a/net/mac80211/agg-rx.c b/net/mac80211/agg-rx.c
index 98208b6d9d7..e844e5a3840 100644
--- a/net/mac80211/agg-rx.c
+++ b/net/mac80211/agg-rx.c
@@ -112,7 +112,7 @@ void ieee80211_stop_rx_ba_session(struct ieee80211_vif *vif, u16 ba_rx_bitmap,
112 int i; 112 int i;
113 113
114 rcu_read_lock(); 114 rcu_read_lock();
115 sta = sta_info_get(sdata, addr); 115 sta = sta_info_get_bss(sdata, addr);
116 if (!sta) { 116 if (!sta) {
117 rcu_read_unlock(); 117 rcu_read_unlock();
118 return; 118 return;
diff --git a/net/mac80211/agg-tx.c b/net/mac80211/agg-tx.c
index a2d9654aabc..266cc871c72 100644
--- a/net/mac80211/agg-tx.c
+++ b/net/mac80211/agg-tx.c
@@ -555,7 +555,7 @@ void ieee80211_start_tx_ba_cb(struct ieee80211_vif *vif, u8 *ra, u16 tid)
555 } 555 }
556 556
557 mutex_lock(&local->sta_mtx); 557 mutex_lock(&local->sta_mtx);
558 sta = sta_info_get(sdata, ra); 558 sta = sta_info_get_bss(sdata, ra);
559 if (!sta) { 559 if (!sta) {
560 mutex_unlock(&local->sta_mtx); 560 mutex_unlock(&local->sta_mtx);
561#ifdef CONFIG_MAC80211_HT_DEBUG 561#ifdef CONFIG_MAC80211_HT_DEBUG
@@ -684,7 +684,7 @@ void ieee80211_stop_tx_ba_cb(struct ieee80211_vif *vif, u8 *ra, u8 tid)
684 684
685 mutex_lock(&local->sta_mtx); 685 mutex_lock(&local->sta_mtx);
686 686
687 sta = sta_info_get(sdata, ra); 687 sta = sta_info_get_bss(sdata, ra);
688 if (!sta) { 688 if (!sta) {
689#ifdef CONFIG_MAC80211_HT_DEBUG 689#ifdef CONFIG_MAC80211_HT_DEBUG
690 printk(KERN_DEBUG "Could not find station: %pM\n", ra); 690 printk(KERN_DEBUG "Could not find station: %pM\n", ra);
diff --git a/net/mac80211/driver-ops.h b/net/mac80211/driver-ops.h
index 49cc5e0e8a6..e8960ae3986 100644
--- a/net/mac80211/driver-ops.h
+++ b/net/mac80211/driver-ops.h
@@ -10,6 +10,16 @@ static inline void check_sdata_in_driver(struct ieee80211_sub_if_data *sdata)
10 WARN_ON(!(sdata->flags & IEEE80211_SDATA_IN_DRIVER)); 10 WARN_ON(!(sdata->flags & IEEE80211_SDATA_IN_DRIVER));
11} 11}
12 12
13static inline struct ieee80211_sub_if_data *
14get_bss_sdata(struct ieee80211_sub_if_data *sdata)
15{
16 if (sdata->vif.type == NL80211_IFTYPE_AP_VLAN)
17 sdata = container_of(sdata->bss, struct ieee80211_sub_if_data,
18 u.ap);
19
20 return sdata;
21}
22
13static inline void drv_tx(struct ieee80211_local *local, struct sk_buff *skb) 23static inline void drv_tx(struct ieee80211_local *local, struct sk_buff *skb)
14{ 24{
15 local->ops->tx(&local->hw, skb); 25 local->ops->tx(&local->hw, skb);
@@ -421,6 +431,7 @@ static inline void drv_sta_notify(struct ieee80211_local *local,
421 enum sta_notify_cmd cmd, 431 enum sta_notify_cmd cmd,
422 struct ieee80211_sta *sta) 432 struct ieee80211_sta *sta)
423{ 433{
434 sdata = get_bss_sdata(sdata);
424 check_sdata_in_driver(sdata); 435 check_sdata_in_driver(sdata);
425 436
426 trace_drv_sta_notify(local, sdata, cmd, sta); 437 trace_drv_sta_notify(local, sdata, cmd, sta);
@@ -437,6 +448,7 @@ static inline int drv_sta_add(struct ieee80211_local *local,
437 448
438 might_sleep(); 449 might_sleep();
439 450
451 sdata = get_bss_sdata(sdata);
440 check_sdata_in_driver(sdata); 452 check_sdata_in_driver(sdata);
441 453
442 trace_drv_sta_add(local, sdata, sta); 454 trace_drv_sta_add(local, sdata, sta);
@@ -454,6 +466,7 @@ static inline void drv_sta_remove(struct ieee80211_local *local,
454{ 466{
455 might_sleep(); 467 might_sleep();
456 468
469 sdata = get_bss_sdata(sdata);
457 check_sdata_in_driver(sdata); 470 check_sdata_in_driver(sdata);
458 471
459 trace_drv_sta_remove(local, sdata, sta); 472 trace_drv_sta_remove(local, sdata, sta);
@@ -547,6 +560,7 @@ static inline int drv_ampdu_action(struct ieee80211_local *local,
547 560
548 might_sleep(); 561 might_sleep();
549 562
563 sdata = get_bss_sdata(sdata);
550 check_sdata_in_driver(sdata); 564 check_sdata_in_driver(sdata);
551 565
552 trace_drv_ampdu_action(local, sdata, action, sta, tid, ssn, buf_size); 566 trace_drv_ampdu_action(local, sdata, action, sta, tid, ssn, buf_size);
diff --git a/net/mac80211/sta_info.c b/net/mac80211/sta_info.c
index 8eaa746ec7a..f9823526200 100644
--- a/net/mac80211/sta_info.c
+++ b/net/mac80211/sta_info.c
@@ -351,10 +351,6 @@ static int sta_info_finish_insert(struct sta_info *sta,
351 351
352 if (!sta->dummy || dummy_reinsert) { 352 if (!sta->dummy || dummy_reinsert) {
353 /* notify driver */ 353 /* notify driver */
354 if (sdata->vif.type == NL80211_IFTYPE_AP_VLAN)
355 sdata = container_of(sdata->bss,
356 struct ieee80211_sub_if_data,
357 u.ap);
358 err = drv_sta_add(local, sdata, &sta->sta); 354 err = drv_sta_add(local, sdata, &sta->sta);
359 if (err) { 355 if (err) {
360 if (!async) 356 if (!async)