d26ec2640e70626153ba68170fa81bd19ff5d02f
[openwrt.git] / package / mac80211 / patches / 300-pending_work.patch
1 --- a/drivers/net/wireless/rt2x00/rt2800lib.c
2 +++ b/drivers/net/wireless/rt2x00/rt2800lib.c
3 @@ -5090,7 +5090,8 @@ static int rt2800_probe_hw_mode(struct r
4             IEEE80211_HW_SUPPORTS_PS |
5             IEEE80211_HW_PS_NULLFUNC_STACK |
6             IEEE80211_HW_AMPDU_AGGREGATION |
7 -           IEEE80211_HW_REPORTS_TX_ACK_STATUS;
8 +           IEEE80211_HW_REPORTS_TX_ACK_STATUS |
9 +           IEEE80211_HW_TEARDOWN_AGGR_ON_BAR_FAIL;
10  
11         /*
12          * Don't set IEEE80211_HW_HOST_BROADCAST_PS_BUFFERING for USB devices
13 --- a/drivers/net/wireless/rt2x00/rt2x00dev.c
14 +++ b/drivers/net/wireless/rt2x00/rt2x00dev.c
15 @@ -392,10 +392,9 @@ void rt2x00lib_txdone(struct queue_entry
16                 tx_info->flags |= IEEE80211_TX_STAT_AMPDU;
17                 tx_info->status.ampdu_len = 1;
18                 tx_info->status.ampdu_ack_len = success ? 1 : 0;
19 -               /*
20 -                * TODO: Need to tear down BA session here
21 -                * if not successful.
22 -                */
23 +
24 +               if (!success)
25 +                       tx_info->flags |= IEEE80211_TX_STAT_AMPDU_NO_BACK;
26         }
27  
28         if (rate_flags & IEEE80211_TX_RC_USE_RTS_CTS) {
29 --- a/include/net/mac80211.h
30 +++ b/include/net/mac80211.h
31 @@ -1369,6 +1369,10 @@ struct ieee80211_tx_control {
32   * @IEEE80211_HW_P2P_DEV_ADDR_FOR_INTF: Use the P2P Device address for any
33   *     P2P Interface. This will be honoured even if more than one interface
34   *     is supported.
35 + *
36 + * @IEEE80211_HW_TEARDOWN_AGGR_ON_BAR_FAIL: On this hardware TX BA session
37 + *     should be tear down once BAR frame will not be acked.
38 + *
39   */
40  enum ieee80211_hw_flags {
41         IEEE80211_HW_HAS_RATE_CONTROL                   = 1<<0,
42 @@ -1397,6 +1401,7 @@ enum ieee80211_hw_flags {
43         IEEE80211_HW_TX_AMPDU_SETUP_IN_HW               = 1<<23,
44         IEEE80211_HW_SCAN_WHILE_IDLE                    = 1<<24,
45         IEEE80211_HW_P2P_DEV_ADDR_FOR_INTF              = 1<<25,
46 +       IEEE80211_HW_TEARDOWN_AGGR_ON_BAR_FAIL          = 1<<26,
47  };
48  
49  /**
50 --- a/net/mac80211/agg-rx.c
51 +++ b/net/mac80211/agg-rx.c
52 @@ -203,6 +203,8 @@ static void ieee80211_send_addba_resp(st
53                 memcpy(mgmt->bssid, sdata->u.mgd.bssid, ETH_ALEN);
54         else if (sdata->vif.type == NL80211_IFTYPE_ADHOC)
55                 memcpy(mgmt->bssid, sdata->u.ibss.bssid, ETH_ALEN);
56 +       else if (sdata->vif.type == NL80211_IFTYPE_WDS)
57 +               memcpy(mgmt->bssid, da, ETH_ALEN);
58  
59         mgmt->frame_control = cpu_to_le16(IEEE80211_FTYPE_MGMT |
60                                           IEEE80211_STYPE_ACTION);
61 --- a/net/mac80211/agg-tx.c
62 +++ b/net/mac80211/agg-tx.c
63 @@ -81,7 +81,8 @@ static void ieee80211_send_addba_request
64         memcpy(mgmt->sa, sdata->vif.addr, ETH_ALEN);
65         if (sdata->vif.type == NL80211_IFTYPE_AP ||
66             sdata->vif.type == NL80211_IFTYPE_AP_VLAN ||
67 -           sdata->vif.type == NL80211_IFTYPE_MESH_POINT)
68 +           sdata->vif.type == NL80211_IFTYPE_MESH_POINT ||
69 +           sdata->vif.type == NL80211_IFTYPE_WDS)
70                 memcpy(mgmt->bssid, sdata->vif.addr, ETH_ALEN);
71         else if (sdata->vif.type == NL80211_IFTYPE_STATION)
72                 memcpy(mgmt->bssid, sdata->u.mgd.bssid, ETH_ALEN);
73 @@ -460,6 +461,7 @@ int ieee80211_start_tx_ba_session(struct
74             sdata->vif.type != NL80211_IFTYPE_MESH_POINT &&
75             sdata->vif.type != NL80211_IFTYPE_AP_VLAN &&
76             sdata->vif.type != NL80211_IFTYPE_AP &&
77 +           sdata->vif.type != NL80211_IFTYPE_WDS &&
78             sdata->vif.type != NL80211_IFTYPE_ADHOC)
79                 return -EINVAL;
80  
81 --- a/net/mac80211/debugfs_sta.c
82 +++ b/net/mac80211/debugfs_sta.c
83 @@ -65,11 +65,11 @@ static ssize_t sta_flags_read(struct fil
84         test_sta_flag(sta, WLAN_STA_##flg) ? #flg "\n" : ""
85  
86         int res = scnprintf(buf, sizeof(buf),
87 -                           "%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s",
88 +                           "%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s",
89                             TEST(AUTH), TEST(ASSOC), TEST(PS_STA),
90                             TEST(PS_DRIVER), TEST(AUTHORIZED),
91                             TEST(SHORT_PREAMBLE),
92 -                           TEST(WME), TEST(WDS), TEST(CLEAR_PS_FILT),
93 +                           TEST(WME), TEST(CLEAR_PS_FILT),
94                             TEST(MFP), TEST(BLOCK_BA), TEST(PSPOLL),
95                             TEST(UAPSD), TEST(SP), TEST(TDLS_PEER),
96                             TEST(TDLS_PEER_AUTH), TEST(4ADDR_EVENT),
97 --- a/net/mac80211/ibss.c
98 +++ b/net/mac80211/ibss.c
99 @@ -201,6 +201,20 @@ static void __ieee80211_sta_join_ibss(st
100         bss_change |= BSS_CHANGED_BASIC_RATES;
101         bss_change |= BSS_CHANGED_HT;
102         bss_change |= BSS_CHANGED_IBSS;
103 +
104 +       /*
105 +        * In 5 GHz/802.11a, we can always use short slot time.
106 +        * (IEEE 802.11-2012 18.3.8.7)
107 +        *
108 +        * In 2.4GHz, we must always use long slots in IBSS for compatibility
109 +        * reasons.
110 +        * (IEEE 802.11-2012 19.4.5)
111 +        *
112 +        * HT follows these specifications (IEEE 802.11-2012 20.3.18)
113 +        */
114 +       sdata->vif.bss_conf.use_short_slot = chan->band == IEEE80211_BAND_5GHZ;
115 +       bss_change |= BSS_CHANGED_ERP_SLOT;
116 +
117         sdata->vif.bss_conf.ibss_joined = true;
118         sdata->vif.bss_conf.ibss_creator = creator;
119         ieee80211_bss_info_change_notify(sdata, bss_change);
120 --- a/net/mac80211/iface.c
121 +++ b/net/mac80211/iface.c
122 @@ -510,7 +510,6 @@ int ieee80211_do_open(struct wireless_de
123         struct ieee80211_sub_if_data *sdata = IEEE80211_WDEV_TO_SUB_IF(wdev);
124         struct net_device *dev = wdev->netdev;
125         struct ieee80211_local *local = sdata->local;
126 -       struct sta_info *sta;
127         u32 changed = 0;
128         int res;
129         u32 hw_reconf_flags = 0;
130 @@ -665,30 +664,8 @@ int ieee80211_do_open(struct wireless_de
131  
132         set_bit(SDATA_STATE_RUNNING, &sdata->state);
133  
134 -       if (sdata->vif.type == NL80211_IFTYPE_WDS) {
135 -               /* Create STA entry for the WDS peer */
136 -               sta = sta_info_alloc(sdata, sdata->u.wds.remote_addr,
137 -                                    GFP_KERNEL);
138 -               if (!sta) {
139 -                       res = -ENOMEM;
140 -                       goto err_del_interface;
141 -               }
142 -
143 -               sta_info_pre_move_state(sta, IEEE80211_STA_AUTH);
144 -               sta_info_pre_move_state(sta, IEEE80211_STA_ASSOC);
145 -               sta_info_pre_move_state(sta, IEEE80211_STA_AUTHORIZED);
146 -
147 -               res = sta_info_insert(sta);
148 -               if (res) {
149 -                       /* STA has been freed */
150 -                       goto err_del_interface;
151 -               }
152 -
153 -               rate_control_rate_init(sta);
154 -               netif_carrier_on(dev);
155 -       } else if (sdata->vif.type == NL80211_IFTYPE_P2P_DEVICE) {
156 +       if (sdata->vif.type == NL80211_IFTYPE_P2P_DEVICE)
157                 rcu_assign_pointer(local->p2p_sdata, sdata);
158 -       }
159  
160         /*
161          * set_multicast_list will be invoked by the networking core
162 @@ -1072,6 +1049,72 @@ static void ieee80211_if_setup(struct ne
163         dev->destructor = free_netdev;
164  }
165  
166 +static void ieee80211_wds_rx_queued_mgmt(struct ieee80211_sub_if_data *sdata,
167 +                                        struct sk_buff *skb)
168 +{
169 +       struct ieee80211_local *local = sdata->local;
170 +       struct ieee80211_rx_status *rx_status;
171 +       struct ieee802_11_elems elems;
172 +       struct ieee80211_mgmt *mgmt;
173 +       struct sta_info *sta;
174 +       size_t baselen;
175 +       u32 rates = 0;
176 +       u16 stype;
177 +       bool new = false;
178 +       enum ieee80211_band band = local->hw.conf.channel->band;
179 +       struct ieee80211_supported_band *sband = local->hw.wiphy->bands[band];
180 +
181 +       rx_status = IEEE80211_SKB_RXCB(skb);
182 +       mgmt = (struct ieee80211_mgmt *) skb->data;
183 +       stype = le16_to_cpu(mgmt->frame_control) & IEEE80211_FCTL_STYPE;
184 +
185 +       if (stype != IEEE80211_STYPE_BEACON)
186 +               return;
187 +
188 +       baselen = (u8 *) mgmt->u.probe_resp.variable - (u8 *) mgmt;
189 +       if (baselen > skb->len)
190 +               return;
191 +
192 +       ieee802_11_parse_elems(mgmt->u.probe_resp.variable,
193 +                              skb->len - baselen, &elems);
194 +
195 +       rates = ieee80211_sta_get_rates(local, &elems, band, NULL);
196 +
197 +       rcu_read_lock();
198 +
199 +       sta = sta_info_get(sdata, sdata->u.wds.remote_addr);
200 +
201 +       if (!sta) {
202 +               rcu_read_unlock();
203 +               sta = sta_info_alloc(sdata, sdata->u.wds.remote_addr,
204 +                                    GFP_KERNEL);
205 +               if (!sta)
206 +                       return;
207 +
208 +               new = true;
209 +       }
210 +
211 +       sta->last_rx = jiffies;
212 +       sta->sta.supp_rates[local->hw.conf.channel->band] = rates;
213 +
214 +       if (elems.ht_cap_elem)
215 +               ieee80211_ht_cap_ie_to_sta_ht_cap(sdata, sband,
216 +                               elems.ht_cap_elem, &sta->sta.ht_cap);
217 +
218 +       if (elems.wmm_param)
219 +               set_sta_flag(sta, WLAN_STA_WME);
220 +
221 +       if (new) {
222 +               sta_info_pre_move_state(sta, IEEE80211_STA_AUTH);
223 +               sta_info_pre_move_state(sta, IEEE80211_STA_ASSOC);
224 +               sta_info_pre_move_state(sta, IEEE80211_STA_AUTHORIZED);
225 +               rate_control_rate_init(sta);
226 +               sta_info_insert_rcu(sta);
227 +       }
228 +
229 +       rcu_read_unlock();
230 +}
231 +
232  static void ieee80211_iface_work(struct work_struct *work)
233  {
234         struct ieee80211_sub_if_data *sdata =
235 @@ -1176,6 +1219,9 @@ static void ieee80211_iface_work(struct 
236                                 break;
237                         ieee80211_mesh_rx_queued_mgmt(sdata, skb);
238                         break;
239 +               case NL80211_IFTYPE_WDS:
240 +                       ieee80211_wds_rx_queued_mgmt(sdata, skb);
241 +                       break;
242                 default:
243                         WARN(1, "frame for unexpected interface type");
244                         break;
245 --- a/net/mac80211/rx.c
246 +++ b/net/mac80211/rx.c
247 @@ -378,9 +378,6 @@ ieee80211_rx_monitor(struct ieee80211_lo
248          * the SKB because it has a bad FCS/PLCP checksum.
249          */
250  
251 -       /* room for the radiotap header based on driver features */
252 -       needed_headroom = ieee80211_rx_radiotap_space(local, status);
253 -
254         if (local->hw.flags & IEEE80211_HW_RX_INCLUDES_FCS)
255                 present_fcs_len = FCS_LEN;
256  
257 @@ -399,6 +396,9 @@ ieee80211_rx_monitor(struct ieee80211_lo
258                 return remove_monitor_info(local, origskb);
259         }
260  
261 +       /* room for the radiotap header based on driver features */
262 +       needed_headroom = ieee80211_rx_radiotap_space(local, status);
263 +
264         if (should_drop_frame(origskb, present_fcs_len)) {
265                 /* only need to expand headroom if necessary */
266                 skb = origskb;
267 @@ -2333,7 +2333,8 @@ ieee80211_rx_h_action(struct ieee80211_r
268         if (len < IEEE80211_MIN_ACTION_SIZE)
269                 return RX_DROP_UNUSABLE;
270  
271 -       if (!rx->sta && mgmt->u.action.category != WLAN_CATEGORY_PUBLIC)
272 +       if (!rx->sta && mgmt->u.action.category != WLAN_CATEGORY_PUBLIC &&
273 +           mgmt->u.action.category != WLAN_CATEGORY_SELF_PROTECTED)
274                 return RX_DROP_UNUSABLE;
275  
276         if (!(status->rx_flags & IEEE80211_RX_RA_MATCH))
277 @@ -2349,6 +2350,7 @@ ieee80211_rx_h_action(struct ieee80211_r
278                     sdata->vif.type != NL80211_IFTYPE_MESH_POINT &&
279                     sdata->vif.type != NL80211_IFTYPE_AP_VLAN &&
280                     sdata->vif.type != NL80211_IFTYPE_AP &&
281 +                   sdata->vif.type != NL80211_IFTYPE_WDS &&
282                     sdata->vif.type != NL80211_IFTYPE_ADHOC)
283                         break;
284  
285 @@ -2625,14 +2627,15 @@ ieee80211_rx_h_mgmt(struct ieee80211_rx_
286  
287         if (!ieee80211_vif_is_mesh(&sdata->vif) &&
288             sdata->vif.type != NL80211_IFTYPE_ADHOC &&
289 -           sdata->vif.type != NL80211_IFTYPE_STATION)
290 +           sdata->vif.type != NL80211_IFTYPE_STATION &&
291 +           sdata->vif.type != NL80211_IFTYPE_WDS)
292                 return RX_DROP_MONITOR;
293  
294         switch (stype) {
295         case cpu_to_le16(IEEE80211_STYPE_AUTH):
296         case cpu_to_le16(IEEE80211_STYPE_BEACON):
297         case cpu_to_le16(IEEE80211_STYPE_PROBE_RESP):
298 -               /* process for all: mesh, mlme, ibss */
299 +               /* process for all: mesh, mlme, ibss, wds */
300                 break;
301         case cpu_to_le16(IEEE80211_STYPE_ASSOC_RESP):
302         case cpu_to_le16(IEEE80211_STYPE_REASSOC_RESP):
303 @@ -2957,10 +2960,16 @@ static int prepare_for_handlers(struct i
304                 }
305                 break;
306         case NL80211_IFTYPE_WDS:
307 -               if (bssid || !ieee80211_is_data(hdr->frame_control))
308 -                       return 0;
309                 if (!ether_addr_equal(sdata->u.wds.remote_addr, hdr->addr2))
310                         return 0;
311 +
312 +               if (ieee80211_is_data(hdr->frame_control) ||
313 +                   ieee80211_is_action(hdr->frame_control)) {
314 +                       if (compare_ether_addr(sdata->vif.addr, hdr->addr1))
315 +                               return 0;
316 +               } else if (!ieee80211_is_beacon(hdr->frame_control))
317 +                       return 0;
318 +
319                 break;
320         case NL80211_IFTYPE_P2P_DEVICE:
321                 if (!ieee80211_is_public_action(hdr, skb->len) &&
322 --- a/net/mac80211/sta_info.h
323 +++ b/net/mac80211/sta_info.h
324 @@ -32,7 +32,6 @@
325   * @WLAN_STA_SHORT_PREAMBLE: Station is capable of receiving short-preamble
326   *     frames.
327   * @WLAN_STA_WME: Station is a QoS-STA.
328 - * @WLAN_STA_WDS: Station is one of our WDS peers.
329   * @WLAN_STA_CLEAR_PS_FILT: Clear PS filter in hardware (using the
330   *     IEEE80211_TX_CTL_CLEAR_PS_FILT control flag) when the next
331   *     frame to this station is transmitted.
332 @@ -64,7 +63,6 @@ enum ieee80211_sta_info_flags {
333         WLAN_STA_AUTHORIZED,
334         WLAN_STA_SHORT_PREAMBLE,
335         WLAN_STA_WME,
336 -       WLAN_STA_WDS,
337         WLAN_STA_CLEAR_PS_FILT,
338         WLAN_STA_MFP,
339         WLAN_STA_BLOCK_BA,
340 --- a/net/mac80211/status.c
341 +++ b/net/mac80211/status.c
342 @@ -502,7 +502,11 @@ void ieee80211_tx_status(struct ieee8021
343                                        IEEE80211_BAR_CTRL_TID_INFO_MASK) >>
344                                       IEEE80211_BAR_CTRL_TID_INFO_SHIFT;
345  
346 -                               ieee80211_set_bar_pending(sta, tid, ssn);
347 +                               if (local->hw.flags &
348 +                                   IEEE80211_HW_TEARDOWN_AGGR_ON_BAR_FAIL)
349 +                                       ieee80211_stop_tx_ba_session(&sta->sta, tid);
350 +                               else
351 +                                       ieee80211_set_bar_pending(sta, tid, ssn);
352                         }
353                 }
354  
355 --- a/drivers/net/wireless/ath/ath9k/ar9003_2p2_initvals.h
356 +++ b/drivers/net/wireless/ath/ath9k/ar9003_2p2_initvals.h
357 @@ -534,98 +534,98 @@ static const u32 ar9300_2p2_baseband_cor
358  
359  static const u32 ar9300Modes_high_power_tx_gain_table_2p2[][5] = {
360         /* Addr      5G_HT20     5G_HT40     2G_HT40     2G_HT20   */
361 -       {0x0000a2dc, 0x00033800, 0x00033800, 0x03aaa352, 0x03aaa352},
362 -       {0x0000a2e0, 0x0003c000, 0x0003c000, 0x03ccc584, 0x03ccc584},
363 -       {0x0000a2e4, 0x03fc0000, 0x03fc0000, 0x03f0f800, 0x03f0f800},
364 +       {0x0000a2dc, 0x0380c7fc, 0x0380c7fc, 0x03aaa352, 0x03aaa352},
365 +       {0x0000a2e0, 0x0000f800, 0x0000f800, 0x03ccc584, 0x03ccc584},
366 +       {0x0000a2e4, 0x03ff0000, 0x03ff0000, 0x03f0f800, 0x03f0f800},
367         {0x0000a2e8, 0x00000000, 0x00000000, 0x03ff0000, 0x03ff0000},
368 -       {0x0000a410, 0x000050d9, 0x000050d9, 0x000050d9, 0x000050d9},
369 -       {0x0000a500, 0x00000000, 0x00000000, 0x00000000, 0x00000000},
370 -       {0x0000a504, 0x06000003, 0x06000003, 0x04000002, 0x04000002},
371 -       {0x0000a508, 0x0a000020, 0x0a000020, 0x08000004, 0x08000004},
372 -       {0x0000a50c, 0x10000023, 0x10000023, 0x0b000200, 0x0b000200},
373 -       {0x0000a510, 0x16000220, 0x16000220, 0x0f000202, 0x0f000202},
374 -       {0x0000a514, 0x1c000223, 0x1c000223, 0x12000400, 0x12000400},
375 -       {0x0000a518, 0x21002220, 0x21002220, 0x16000402, 0x16000402},
376 -       {0x0000a51c, 0x27002223, 0x27002223, 0x19000404, 0x19000404},
377 -       {0x0000a520, 0x2b022220, 0x2b022220, 0x1c000603, 0x1c000603},
378 -       {0x0000a524, 0x2f022222, 0x2f022222, 0x21000a02, 0x21000a02},
379 -       {0x0000a528, 0x34022225, 0x34022225, 0x25000a04, 0x25000a04},
380 -       {0x0000a52c, 0x3a02222a, 0x3a02222a, 0x28000a20, 0x28000a20},
381 -       {0x0000a530, 0x3e02222c, 0x3e02222c, 0x2c000e20, 0x2c000e20},
382 -       {0x0000a534, 0x4202242a, 0x4202242a, 0x30000e22, 0x30000e22},
383 -       {0x0000a538, 0x4702244a, 0x4702244a, 0x34000e24, 0x34000e24},
384 -       {0x0000a53c, 0x4b02244c, 0x4b02244c, 0x38001640, 0x38001640},
385 -       {0x0000a540, 0x4e02246c, 0x4e02246c, 0x3c001660, 0x3c001660},
386 -       {0x0000a544, 0x52022470, 0x52022470, 0x3f001861, 0x3f001861},
387 -       {0x0000a548, 0x55022490, 0x55022490, 0x43001a81, 0x43001a81},
388 -       {0x0000a54c, 0x59022492, 0x59022492, 0x47001a83, 0x47001a83},
389 -       {0x0000a550, 0x5d022692, 0x5d022692, 0x4a001c84, 0x4a001c84},
390 -       {0x0000a554, 0x61022892, 0x61022892, 0x4e001ce3, 0x4e001ce3},
391 -       {0x0000a558, 0x65024890, 0x65024890, 0x52001ce5, 0x52001ce5},
392 -       {0x0000a55c, 0x69024892, 0x69024892, 0x56001ce9, 0x56001ce9},
393 -       {0x0000a560, 0x6e024c92, 0x6e024c92, 0x5a001ceb, 0x5a001ceb},
394 -       {0x0000a564, 0x74026e92, 0x74026e92, 0x5d001eec, 0x5d001eec},
395 -       {0x0000a568, 0x74026e92, 0x74026e92, 0x5d001eec, 0x5d001eec},
396 -       {0x0000a56c, 0x74026e92, 0x74026e92, 0x5d001eec, 0x5d001eec},
397 -       {0x0000a570, 0x74026e92, 0x74026e92, 0x5d001eec, 0x5d001eec},
398 -       {0x0000a574, 0x74026e92, 0x74026e92, 0x5d001eec, 0x5d001eec},
399 -       {0x0000a578, 0x74026e92, 0x74026e92, 0x5d001eec, 0x5d001eec},
400 -       {0x0000a57c, 0x74026e92, 0x74026e92, 0x5d001eec, 0x5d001eec},
401 -       {0x0000a580, 0x00800000, 0x00800000, 0x00800000, 0x00800000},
402 -       {0x0000a584, 0x06800003, 0x06800003, 0x04800002, 0x04800002},
403 -       {0x0000a588, 0x0a800020, 0x0a800020, 0x08800004, 0x08800004},
404 -       {0x0000a58c, 0x10800023, 0x10800023, 0x0b800200, 0x0b800200},
405 -       {0x0000a590, 0x16800220, 0x16800220, 0x0f800202, 0x0f800202},
406 -       {0x0000a594, 0x1c800223, 0x1c800223, 0x12800400, 0x12800400},
407 -       {0x0000a598, 0x21802220, 0x21802220, 0x16800402, 0x16800402},
408 -       {0x0000a59c, 0x27802223, 0x27802223, 0x19800404, 0x19800404},
409 -       {0x0000a5a0, 0x2b822220, 0x2b822220, 0x1c800603, 0x1c800603},
410 -       {0x0000a5a4, 0x2f822222, 0x2f822222, 0x21800a02, 0x21800a02},
411 -       {0x0000a5a8, 0x34822225, 0x34822225, 0x25800a04, 0x25800a04},
412 -       {0x0000a5ac, 0x3a82222a, 0x3a82222a, 0x28800a20, 0x28800a20},
413 -       {0x0000a5b0, 0x3e82222c, 0x3e82222c, 0x2c800e20, 0x2c800e20},
414 -       {0x0000a5b4, 0x4282242a, 0x4282242a, 0x30800e22, 0x30800e22},
415 -       {0x0000a5b8, 0x4782244a, 0x4782244a, 0x34800e24, 0x34800e24},
416 -       {0x0000a5bc, 0x4b82244c, 0x4b82244c, 0x38801640, 0x38801640},
417 -       {0x0000a5c0, 0x4e82246c, 0x4e82246c, 0x3c801660, 0x3c801660},
418 -       {0x0000a5c4, 0x52822470, 0x52822470, 0x3f801861, 0x3f801861},
419 -       {0x0000a5c8, 0x55822490, 0x55822490, 0x43801a81, 0x43801a81},
420 -       {0x0000a5cc, 0x59822492, 0x59822492, 0x47801a83, 0x47801a83},
421 -       {0x0000a5d0, 0x5d822692, 0x5d822692, 0x4a801c84, 0x4a801c84},
422 -       {0x0000a5d4, 0x61822892, 0x61822892, 0x4e801ce3, 0x4e801ce3},
423 -       {0x0000a5d8, 0x65824890, 0x65824890, 0x52801ce5, 0x52801ce5},
424 -       {0x0000a5dc, 0x69824892, 0x69824892, 0x56801ce9, 0x56801ce9},
425 -       {0x0000a5e0, 0x6e824c92, 0x6e824c92, 0x5a801ceb, 0x5a801ceb},
426 -       {0x0000a5e4, 0x74826e92, 0x74826e92, 0x5d801eec, 0x5d801eec},
427 -       {0x0000a5e8, 0x74826e92, 0x74826e92, 0x5d801eec, 0x5d801eec},
428 -       {0x0000a5ec, 0x74826e92, 0x74826e92, 0x5d801eec, 0x5d801eec},
429 -       {0x0000a5f0, 0x74826e92, 0x74826e92, 0x5d801eec, 0x5d801eec},
430 -       {0x0000a5f4, 0x74826e92, 0x74826e92, 0x5d801eec, 0x5d801eec},
431 -       {0x0000a5f8, 0x74826e92, 0x74826e92, 0x5d801eec, 0x5d801eec},
432 -       {0x0000a5fc, 0x74826e92, 0x74826e92, 0x5d801eec, 0x5d801eec},
433 +       {0x0000a410, 0x000050d8, 0x000050d8, 0x000050d9, 0x000050d9},
434 +       {0x0000a500, 0x00002220, 0x00002220, 0x00000000, 0x00000000},
435 +       {0x0000a504, 0x04002222, 0x04002222, 0x04000002, 0x04000002},
436 +       {0x0000a508, 0x09002421, 0x09002421, 0x08000004, 0x08000004},
437 +       {0x0000a50c, 0x0d002621, 0x0d002621, 0x0b000200, 0x0b000200},
438 +       {0x0000a510, 0x13004620, 0x13004620, 0x0f000202, 0x0f000202},
439 +       {0x0000a514, 0x19004a20, 0x19004a20, 0x11000400, 0x11000400},
440 +       {0x0000a518, 0x1d004e20, 0x1d004e20, 0x15000402, 0x15000402},
441 +       {0x0000a51c, 0x21005420, 0x21005420, 0x19000404, 0x19000404},
442 +       {0x0000a520, 0x26005e20, 0x26005e20, 0x1b000603, 0x1b000603},
443 +       {0x0000a524, 0x2b005e40, 0x2b005e40, 0x1f000a02, 0x1f000a02},
444 +       {0x0000a528, 0x2f005e42, 0x2f005e42, 0x23000a04, 0x23000a04},
445 +       {0x0000a52c, 0x33005e44, 0x33005e44, 0x26000a20, 0x26000a20},
446 +       {0x0000a530, 0x38005e65, 0x38005e65, 0x2a000e20, 0x2a000e20},
447 +       {0x0000a534, 0x3c005e69, 0x3c005e69, 0x2e000e22, 0x2e000e22},
448 +       {0x0000a538, 0x40005e6b, 0x40005e6b, 0x31000e24, 0x31000e24},
449 +       {0x0000a53c, 0x44005e6d, 0x44005e6d, 0x34001640, 0x34001640},
450 +       {0x0000a540, 0x49005e72, 0x49005e72, 0x38001660, 0x38001660},
451 +       {0x0000a544, 0x4e005eb2, 0x4e005eb2, 0x3b001861, 0x3b001861},
452 +       {0x0000a548, 0x53005f12, 0x53005f12, 0x3e001a81, 0x3e001a81},
453 +       {0x0000a54c, 0x59025eb2, 0x59025eb2, 0x42001a83, 0x42001a83},
454 +       {0x0000a550, 0x5e025f12, 0x5e025f12, 0x44001c84, 0x44001c84},
455 +       {0x0000a554, 0x61027f12, 0x61027f12, 0x48001ce3, 0x48001ce3},
456 +       {0x0000a558, 0x6702bf12, 0x6702bf12, 0x4c001ce5, 0x4c001ce5},
457 +       {0x0000a55c, 0x6b02bf14, 0x6b02bf14, 0x50001ce9, 0x50001ce9},
458 +       {0x0000a560, 0x6f02bf16, 0x6f02bf16, 0x54001ceb, 0x54001ceb},
459 +       {0x0000a564, 0x6f02bf16, 0x6f02bf16, 0x56001eec, 0x56001eec},
460 +       {0x0000a568, 0x6f02bf16, 0x6f02bf16, 0x56001eec, 0x56001eec},
461 +       {0x0000a56c, 0x6f02bf16, 0x6f02bf16, 0x56001eec, 0x56001eec},
462 +       {0x0000a570, 0x6f02bf16, 0x6f02bf16, 0x56001eec, 0x56001eec},
463 +       {0x0000a574, 0x6f02bf16, 0x6f02bf16, 0x56001eec, 0x56001eec},
464 +       {0x0000a578, 0x6f02bf16, 0x6f02bf16, 0x56001eec, 0x56001eec},
465 +       {0x0000a57c, 0x6f02bf16, 0x6f02bf16, 0x56001eec, 0x56001eec},
466 +       {0x0000a580, 0x00802220, 0x00802220, 0x00800000, 0x00800000},
467 +       {0x0000a584, 0x04802222, 0x04802222, 0x04800002, 0x04800002},
468 +       {0x0000a588, 0x09802421, 0x09802421, 0x08800004, 0x08800004},
469 +       {0x0000a58c, 0x0d802621, 0x0d802621, 0x0b800200, 0x0b800200},
470 +       {0x0000a590, 0x13804620, 0x13804620, 0x0f800202, 0x0f800202},
471 +       {0x0000a594, 0x19804a20, 0x19804a20, 0x11800400, 0x11800400},
472 +       {0x0000a598, 0x1d804e20, 0x1d804e20, 0x15800402, 0x15800402},
473 +       {0x0000a59c, 0x21805420, 0x21805420, 0x19800404, 0x19800404},
474 +       {0x0000a5a0, 0x26805e20, 0x26805e20, 0x1b800603, 0x1b800603},
475 +       {0x0000a5a4, 0x2b805e40, 0x2b805e40, 0x1f800a02, 0x1f800a02},
476 +       {0x0000a5a8, 0x2f805e42, 0x2f805e42, 0x23800a04, 0x23800a04},
477 +       {0x0000a5ac, 0x33805e44, 0x33805e44, 0x26800a20, 0x26800a20},
478 +       {0x0000a5b0, 0x38805e65, 0x38805e65, 0x2a800e20, 0x2a800e20},
479 +       {0x0000a5b4, 0x3c805e69, 0x3c805e69, 0x2e800e22, 0x2e800e22},
480 +       {0x0000a5b8, 0x40805e6b, 0x40805e6b, 0x31800e24, 0x31800e24},
481 +       {0x0000a5bc, 0x44805e6d, 0x44805e6d, 0x34801640, 0x34801640},
482 +       {0x0000a5c0, 0x49805e72, 0x49805e72, 0x38801660, 0x38801660},
483 +       {0x0000a5c4, 0x4e805eb2, 0x4e805eb2, 0x3b801861, 0x3b801861},
484 +       {0x0000a5c8, 0x53805f12, 0x53805f12, 0x3e801a81, 0x3e801a81},
485 +       {0x0000a5cc, 0x59825eb2, 0x59825eb2, 0x42801a83, 0x42801a83},
486 +       {0x0000a5d0, 0x5e825f12, 0x5e825f12, 0x44801c84, 0x44801c84},
487 +       {0x0000a5d4, 0x61827f12, 0x61827f12, 0x48801ce3, 0x48801ce3},
488 +       {0x0000a5d8, 0x6782bf12, 0x6782bf12, 0x4c801ce5, 0x4c801ce5},
489 +       {0x0000a5dc, 0x6b82bf14, 0x6b82bf14, 0x50801ce9, 0x50801ce9},
490 +       {0x0000a5e0, 0x6f82bf16, 0x6f82bf16, 0x54801ceb, 0x54801ceb},
491 +       {0x0000a5e4, 0x6f82bf16, 0x6f82bf16, 0x56801eec, 0x56801eec},
492 +       {0x0000a5e8, 0x6f82bf16, 0x6f82bf16, 0x56801eec, 0x56801eec},
493 +       {0x0000a5ec, 0x6f82bf16, 0x6f82bf16, 0x56801eec, 0x56801eec},
494 +       {0x0000a5f0, 0x6f82bf16, 0x6f82bf16, 0x56801eec, 0x56801eec},
495 +       {0x0000a5f4, 0x6f82bf16, 0x6f82bf16, 0x56801eec, 0x56801eec},
496 +       {0x0000a5f8, 0x6f82bf16, 0x6f82bf16, 0x56801eec, 0x56801eec},
497 +       {0x0000a5fc, 0x6f82bf16, 0x6f82bf16, 0x56801eec, 0x56801eec},
498         {0x0000a600, 0x00000000, 0x00000000, 0x00000000, 0x00000000},
499         {0x0000a604, 0x00000000, 0x00000000, 0x00000000, 0x00000000},
500         {0x0000a608, 0x00000000, 0x00000000, 0x00000000, 0x00000000},
501         {0x0000a60c, 0x00000000, 0x00000000, 0x00000000, 0x00000000},
502 -       {0x0000a610, 0x00000000, 0x00000000, 0x00000000, 0x00000000},
503 -       {0x0000a614, 0x02004000, 0x02004000, 0x01404000, 0x01404000},
504 -       {0x0000a618, 0x02004801, 0x02004801, 0x01404501, 0x01404501},
505 -       {0x0000a61c, 0x02808a02, 0x02808a02, 0x02008501, 0x02008501},
506 -       {0x0000a620, 0x0380ce03, 0x0380ce03, 0x0280ca03, 0x0280ca03},
507 -       {0x0000a624, 0x04411104, 0x04411104, 0x03010c04, 0x03010c04},
508 -       {0x0000a628, 0x04411104, 0x04411104, 0x04014c04, 0x04014c04},
509 -       {0x0000a62c, 0x04411104, 0x04411104, 0x04015005, 0x04015005},
510 -       {0x0000a630, 0x04411104, 0x04411104, 0x04015005, 0x04015005},
511 -       {0x0000a634, 0x04411104, 0x04411104, 0x04015005, 0x04015005},
512 -       {0x0000a638, 0x04411104, 0x04411104, 0x04015005, 0x04015005},
513 -       {0x0000a63c, 0x04411104, 0x04411104, 0x04015005, 0x04015005},
514 -       {0x0000b2dc, 0x00033800, 0x00033800, 0x03aaa352, 0x03aaa352},
515 -       {0x0000b2e0, 0x0003c000, 0x0003c000, 0x03ccc584, 0x03ccc584},
516 -       {0x0000b2e4, 0x03fc0000, 0x03fc0000, 0x03f0f800, 0x03f0f800},
517 +       {0x0000a610, 0x00804000, 0x00804000, 0x00000000, 0x00000000},
518 +       {0x0000a614, 0x00804201, 0x00804201, 0x01404000, 0x01404000},
519 +       {0x0000a618, 0x0280c802, 0x0280c802, 0x01404501, 0x01404501},
520 +       {0x0000a61c, 0x0280ca03, 0x0280ca03, 0x02008501, 0x02008501},
521 +       {0x0000a620, 0x04c15104, 0x04c15104, 0x0280ca03, 0x0280ca03},
522 +       {0x0000a624, 0x04c15305, 0x04c15305, 0x03010c04, 0x03010c04},
523 +       {0x0000a628, 0x04c15305, 0x04c15305, 0x04014c04, 0x04014c04},
524 +       {0x0000a62c, 0x04c15305, 0x04c15305, 0x04015005, 0x04015005},
525 +       {0x0000a630, 0x04c15305, 0x04c15305, 0x04015005, 0x04015005},
526 +       {0x0000a634, 0x04c15305, 0x04c15305, 0x04015005, 0x04015005},
527 +       {0x0000a638, 0x04c15305, 0x04c15305, 0x04015005, 0x04015005},
528 +       {0x0000a63c, 0x04c15305, 0x04c15305, 0x04015005, 0x04015005},
529 +       {0x0000b2dc, 0x0380c7fc, 0x0380c7fc, 0x03aaa352, 0x03aaa352},
530 +       {0x0000b2e0, 0x0000f800, 0x0000f800, 0x03ccc584, 0x03ccc584},
531 +       {0x0000b2e4, 0x03ff0000, 0x03ff0000, 0x03f0f800, 0x03f0f800},
532         {0x0000b2e8, 0x00000000, 0x00000000, 0x03ff0000, 0x03ff0000},
533 -       {0x0000c2dc, 0x00033800, 0x00033800, 0x03aaa352, 0x03aaa352},
534 -       {0x0000c2e0, 0x0003c000, 0x0003c000, 0x03ccc584, 0x03ccc584},
535 -       {0x0000c2e4, 0x03fc0000, 0x03fc0000, 0x03f0f800, 0x03f0f800},
536 +       {0x0000c2dc, 0x0380c7fc, 0x0380c7fc, 0x03aaa352, 0x03aaa352},
537 +       {0x0000c2e0, 0x0000f800, 0x0000f800, 0x03ccc584, 0x03ccc584},
538 +       {0x0000c2e4, 0x03ff0000, 0x03ff0000, 0x03f0f800, 0x03f0f800},
539         {0x0000c2e8, 0x00000000, 0x00000000, 0x03ff0000, 0x03ff0000},
540         {0x00016044, 0x012492d4, 0x012492d4, 0x012492d4, 0x012492d4},
541         {0x00016048, 0x66480001, 0x66480001, 0x66480001, 0x66480001},
542 --- a/drivers/net/wireless/ath/ath9k/debug.h
543 +++ b/drivers/net/wireless/ath/ath9k/debug.h
544 @@ -242,7 +242,7 @@ struct ath_rx_stats {
545  
546  struct ath_stats {
547         struct ath_interrupt_stats istats;
548 -       struct ath_tx_stats txstats[IEEE80211_NUM_ACS];
549 +       struct ath_tx_stats txstats[ATH9K_NUM_TX_QUEUES];
550         struct ath_rx_stats rxstats;
551         struct ath_dfs_stats dfs_stats;
552         u32 reset[__RESET_TYPE_MAX];