ar71xx: rewrite WNDR3700/3800 handling
[openwrt/svn-archive/archive.git] / package / mac80211 / patches / 560-mac80211_fix_ap_vlan_aggr.patch
1 --- a/net/mac80211/driver-ops.h
2 +++ b/net/mac80211/driver-ops.h
3 @@ -10,6 +10,16 @@ static inline void check_sdata_in_driver
4 WARN_ON(!(sdata->flags & IEEE80211_SDATA_IN_DRIVER));
5 }
6
7 +static inline struct ieee80211_sub_if_data *
8 +get_bss_sdata(struct ieee80211_sub_if_data *sdata)
9 +{
10 + if (sdata->vif.type == NL80211_IFTYPE_AP_VLAN)
11 + sdata = container_of(sdata->bss, struct ieee80211_sub_if_data,
12 + u.ap);
13 +
14 + return sdata;
15 +}
16 +
17 static inline void drv_tx(struct ieee80211_local *local, struct sk_buff *skb)
18 {
19 local->ops->tx(&local->hw, skb);
20 @@ -427,6 +437,7 @@ static inline void drv_sta_notify(struct
21 enum sta_notify_cmd cmd,
22 struct ieee80211_sta *sta)
23 {
24 + sdata = get_bss_sdata(sdata);
25 check_sdata_in_driver(sdata);
26
27 trace_drv_sta_notify(local, sdata, cmd, sta);
28 @@ -443,6 +454,7 @@ static inline int drv_sta_add(struct iee
29
30 might_sleep();
31
32 + sdata = get_bss_sdata(sdata);
33 check_sdata_in_driver(sdata);
34
35 trace_drv_sta_add(local, sdata, sta);
36 @@ -460,6 +472,7 @@ static inline void drv_sta_remove(struct
37 {
38 might_sleep();
39
40 + sdata = get_bss_sdata(sdata);
41 check_sdata_in_driver(sdata);
42
43 trace_drv_sta_remove(local, sdata, sta);
44 @@ -553,6 +566,7 @@ static inline int drv_ampdu_action(struc
45
46 might_sleep();
47
48 + sdata = get_bss_sdata(sdata);
49 check_sdata_in_driver(sdata);
50
51 trace_drv_ampdu_action(local, sdata, action, sta, tid, ssn, buf_size);
52 --- a/net/mac80211/sta_info.c
53 +++ b/net/mac80211/sta_info.c
54 @@ -353,10 +353,6 @@ static int sta_info_finish_insert(struct
55
56 if (!sta->dummy || dummy_reinsert) {
57 /* notify driver */
58 - if (sdata->vif.type == NL80211_IFTYPE_AP_VLAN)
59 - sdata = container_of(sdata->bss,
60 - struct ieee80211_sub_if_data,
61 - u.ap);
62 err = drv_sta_add(local, sdata, &sta->sta);
63 if (err) {
64 if (!async)
65 --- a/net/mac80211/agg-tx.c
66 +++ b/net/mac80211/agg-tx.c
67 @@ -550,7 +550,7 @@ void ieee80211_start_tx_ba_cb(struct iee
68 }
69
70 mutex_lock(&local->sta_mtx);
71 - sta = sta_info_get(sdata, ra);
72 + sta = sta_info_get_bss(sdata, ra);
73 if (!sta) {
74 mutex_unlock(&local->sta_mtx);
75 #ifdef CONFIG_MAC80211_HT_DEBUG
76 @@ -679,7 +679,7 @@ void ieee80211_stop_tx_ba_cb(struct ieee
77
78 mutex_lock(&local->sta_mtx);
79
80 - sta = sta_info_get(sdata, ra);
81 + sta = sta_info_get_bss(sdata, ra);
82 if (!sta) {
83 #ifdef CONFIG_MAC80211_HT_DEBUG
84 printk(KERN_DEBUG "Could not find station: %pM\n", ra);
85 --- a/net/mac80211/agg-rx.c
86 +++ b/net/mac80211/agg-rx.c
87 @@ -109,7 +109,7 @@ void ieee80211_stop_rx_ba_session(struct
88 int i;
89
90 rcu_read_lock();
91 - sta = sta_info_get(sdata, addr);
92 + sta = sta_info_get_bss(sdata, addr);
93 if (!sta) {
94 rcu_read_unlock();
95 return;