aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath
diff options
context:
space:
mode:
authorSujith Manoharan <c_manoha@qca.qualcomm.com>2012-11-21 07:43:10 -0500
committerJohn W. Linville <linville@tuxdriver.com>2012-11-21 14:16:02 -0500
commitbea843c73854becf998047a83af22a90de3fd19b (patch)
tree5da51cb431a08bee648b1ec155c57ea5e2ccf452 /drivers/net/wireless/ath
parent067293876ef9be3f29492d4b80c267bbd6369b92 (diff)
ath9k/ath9k_htc: Remove WME macros
Use the macros provided by mac80211 and remove redundant declarations inside the drivers. Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath')
-rw-r--r--drivers/net/wireless/ath/ath9k/ath9k.h16
-rw-r--r--drivers/net/wireless/ath/ath9k/beacon.c2
-rw-r--r--drivers/net/wireless/ath/ath9k/common.h7
-rw-r--r--drivers/net/wireless/ath/ath9k/debug.c44
-rw-r--r--drivers/net/wireless/ath/ath9k/gpio.c2
-rw-r--r--drivers/net/wireless/ath/ath9k/htc.h4
-rw-r--r--drivers/net/wireless/ath/ath9k/htc_drv_beacon.c2
-rw-r--r--drivers/net/wireless/ath/ath9k/htc_drv_debug.c8
-rw-r--r--drivers/net/wireless/ath/ath9k/htc_drv_gpio.c2
-rw-r--r--drivers/net/wireless/ath/ath9k/htc_drv_init.c8
-rw-r--r--drivers/net/wireless/ath/ath9k/htc_drv_main.c4
-rw-r--r--drivers/net/wireless/ath/ath9k/htc_drv_txrx.c26
-rw-r--r--drivers/net/wireless/ath/ath9k/init.c2
-rw-r--r--drivers/net/wireless/ath/ath9k/link.c2
-rw-r--r--drivers/net/wireless/ath/ath9k/main.c26
-rw-r--r--drivers/net/wireless/ath/ath9k/xmit.c10
16 files changed, 79 insertions, 86 deletions
diff --git a/drivers/net/wireless/ath/ath9k/ath9k.h b/drivers/net/wireless/ath/ath9k/ath9k.h
index 04fa5f350e8..3c1cebe55f6 100644
--- a/drivers/net/wireless/ath/ath9k/ath9k.h
+++ b/drivers/net/wireless/ath/ath9k/ath9k.h
@@ -129,10 +129,10 @@ void ath_descdma_cleanup(struct ath_softc *sc, struct ath_descdma *dd,
129#define ATH_TXMAXTRY 13 129#define ATH_TXMAXTRY 13
130 130
131#define TID_TO_WME_AC(_tid) \ 131#define TID_TO_WME_AC(_tid) \
132 ((((_tid) == 0) || ((_tid) == 3)) ? WME_AC_BE : \ 132 ((((_tid) == 0) || ((_tid) == 3)) ? IEEE80211_AC_BE : \
133 (((_tid) == 1) || ((_tid) == 2)) ? WME_AC_BK : \ 133 (((_tid) == 1) || ((_tid) == 2)) ? IEEE80211_AC_BK : \
134 (((_tid) == 4) || ((_tid) == 5)) ? WME_AC_VI : \ 134 (((_tid) == 4) || ((_tid) == 5)) ? IEEE80211_AC_VI : \
135 WME_AC_VO) 135 IEEE80211_AC_VO)
136 136
137#define ATH_AGGR_DELIM_SZ 4 137#define ATH_AGGR_DELIM_SZ 4
138#define ATH_AGGR_MINPLEN 256 /* in bytes, minimum packet length */ 138#define ATH_AGGR_MINPLEN 256 /* in bytes, minimum packet length */
@@ -265,7 +265,7 @@ struct ath_node {
265 struct ieee80211_sta *sta; /* station struct we're part of */ 265 struct ieee80211_sta *sta; /* station struct we're part of */
266 struct ieee80211_vif *vif; /* interface with which we're associated */ 266 struct ieee80211_vif *vif; /* interface with which we're associated */
267 struct ath_atx_tid tid[WME_NUM_TID]; 267 struct ath_atx_tid tid[WME_NUM_TID];
268 struct ath_atx_ac ac[WME_NUM_AC]; 268 struct ath_atx_ac ac[IEEE80211_NUM_ACS];
269 int ps_key; 269 int ps_key;
270 270
271 u16 maxampdu; 271 u16 maxampdu;
@@ -299,9 +299,9 @@ struct ath_tx {
299 struct list_head txbuf; 299 struct list_head txbuf;
300 struct ath_txq txq[ATH9K_NUM_TX_QUEUES]; 300 struct ath_txq txq[ATH9K_NUM_TX_QUEUES];
301 struct ath_descdma txdma; 301 struct ath_descdma txdma;
302 struct ath_txq *txq_map[WME_NUM_AC]; 302 struct ath_txq *txq_map[IEEE80211_NUM_ACS];
303 u32 txq_max_pending[WME_NUM_AC]; 303 u32 txq_max_pending[IEEE80211_NUM_ACS];
304 u16 max_aggr_framelen[WME_NUM_AC][4][32]; 304 u16 max_aggr_framelen[IEEE80211_NUM_ACS][4][32];
305}; 305};
306 306
307struct ath_rx_edma { 307struct ath_rx_edma {
diff --git a/drivers/net/wireless/ath/ath9k/beacon.c b/drivers/net/wireless/ath/ath9k/beacon.c
index 1b48414dca9..531fffd801a 100644
--- a/drivers/net/wireless/ath/ath9k/beacon.c
+++ b/drivers/net/wireless/ath/ath9k/beacon.c
@@ -46,7 +46,7 @@ static void ath9k_beaconq_config(struct ath_softc *sc)
46 qi.tqi_cwmax = 0; 46 qi.tqi_cwmax = 0;
47 } else { 47 } else {
48 /* Adhoc mode; important thing is to use 2x cwmin. */ 48 /* Adhoc mode; important thing is to use 2x cwmin. */
49 txq = sc->tx.txq_map[WME_AC_BE]; 49 txq = sc->tx.txq_map[IEEE80211_AC_BE];
50 ath9k_hw_get_txq_props(ah, txq->axq_qnum, &qi_be); 50 ath9k_hw_get_txq_props(ah, txq->axq_qnum, &qi_be);
51 qi.tqi_aifs = qi_be.tqi_aifs; 51 qi.tqi_aifs = qi_be.tqi_aifs;
52 if (ah->slottime == ATH9K_SLOT_TIME_20) 52 if (ah->slottime == ATH9K_SLOT_TIME_20)
diff --git a/drivers/net/wireless/ath/ath9k/common.h b/drivers/net/wireless/ath/ath9k/common.h
index ad14fecc76c..76b54390031 100644
--- a/drivers/net/wireless/ath/ath9k/common.h
+++ b/drivers/net/wireless/ath/ath9k/common.h
@@ -28,13 +28,6 @@
28#define WME_MAX_BA WME_BA_BMP_SIZE 28#define WME_MAX_BA WME_BA_BMP_SIZE
29#define ATH_TID_MAX_BUFS (2 * WME_MAX_BA) 29#define ATH_TID_MAX_BUFS (2 * WME_MAX_BA)
30 30
31/* These must match mac80211 skb queue mapping numbers */
32#define WME_AC_VO 0
33#define WME_AC_VI 1
34#define WME_AC_BE 2
35#define WME_AC_BK 3
36#define WME_NUM_AC 4
37
38#define ATH_RSSI_DUMMY_MARKER 0x127 31#define ATH_RSSI_DUMMY_MARKER 0x127
39#define ATH_RSSI_LPF_LEN 10 32#define ATH_RSSI_LPF_LEN 10
40#define RSSI_LPF_THRESHOLD -20 33#define RSSI_LPF_THRESHOLD -20
diff --git a/drivers/net/wireless/ath/ath9k/debug.c b/drivers/net/wireless/ath/ath9k/debug.c
index eed0b9ab8fe..957e38646fd 100644
--- a/drivers/net/wireless/ath/ath9k/debug.c
+++ b/drivers/net/wireless/ath/ath9k/debug.c
@@ -517,10 +517,10 @@ static const struct file_operations fops_interrupt = {
517 do { \ 517 do { \
518 len += snprintf(buf + len, size - len, \ 518 len += snprintf(buf + len, size - len, \
519 "%s%13u%11u%10u%10u\n", str, \ 519 "%s%13u%11u%10u%10u\n", str, \
520 sc->debug.stats.txstats[PR_QNUM(WME_AC_BE)].elem, \ 520 sc->debug.stats.txstats[PR_QNUM(IEEE80211_AC_BE)].elem, \
521 sc->debug.stats.txstats[PR_QNUM(WME_AC_BK)].elem, \ 521 sc->debug.stats.txstats[PR_QNUM(IEEE80211_AC_BK)].elem, \
522 sc->debug.stats.txstats[PR_QNUM(WME_AC_VI)].elem, \ 522 sc->debug.stats.txstats[PR_QNUM(IEEE80211_AC_VI)].elem, \
523 sc->debug.stats.txstats[PR_QNUM(WME_AC_VO)].elem); \ 523 sc->debug.stats.txstats[PR_QNUM(IEEE80211_AC_VO)].elem); \
524 if (len >= size) \ 524 if (len >= size) \
525 goto done; \ 525 goto done; \
526} while(0) 526} while(0)
@@ -529,10 +529,10 @@ static const struct file_operations fops_interrupt = {
529do { \ 529do { \
530 len += snprintf(buf + len, size - len, \ 530 len += snprintf(buf + len, size - len, \
531 "%s%13u%11u%10u%10u\n", str, \ 531 "%s%13u%11u%10u%10u\n", str, \
532 (unsigned int)(sc->tx.txq_map[WME_AC_BE]->elem), \ 532 (unsigned int)(sc->tx.txq_map[IEEE80211_AC_BE]->elem), \
533 (unsigned int)(sc->tx.txq_map[WME_AC_BK]->elem), \ 533 (unsigned int)(sc->tx.txq_map[IEEE80211_AC_BK]->elem), \
534 (unsigned int)(sc->tx.txq_map[WME_AC_VI]->elem), \ 534 (unsigned int)(sc->tx.txq_map[IEEE80211_AC_VI]->elem), \
535 (unsigned int)(sc->tx.txq_map[WME_AC_VO]->elem)); \ 535 (unsigned int)(sc->tx.txq_map[IEEE80211_AC_VO]->elem)); \
536 if (len >= size) \ 536 if (len >= size) \
537 goto done; \ 537 goto done; \
538} while(0) 538} while(0)
@@ -541,10 +541,10 @@ do { \
541do { \ 541do { \
542 len += snprintf(buf + len, size - len, \ 542 len += snprintf(buf + len, size - len, \
543 "%s%13i%11i%10i%10i\n", str, \ 543 "%s%13i%11i%10i%10i\n", str, \
544 list_empty(&sc->tx.txq_map[WME_AC_BE]->elem), \ 544 list_empty(&sc->tx.txq_map[IEEE80211_AC_BE]->elem), \
545 list_empty(&sc->tx.txq_map[WME_AC_BK]->elem), \ 545 list_empty(&sc->tx.txq_map[IEEE80211_AC_BK]->elem), \
546 list_empty(&sc->tx.txq_map[WME_AC_VI]->elem), \ 546 list_empty(&sc->tx.txq_map[IEEE80211_AC_VI]->elem), \
547 list_empty(&sc->tx.txq_map[WME_AC_VO]->elem)); \ 547 list_empty(&sc->tx.txq_map[IEEE80211_AC_VO]->elem)); \
548 if (len >= size) \ 548 if (len >= size) \
549 goto done; \ 549 goto done; \
550} while (0) 550} while (0)
@@ -593,10 +593,10 @@ static ssize_t read_file_xmit(struct file *file, char __user *user_buf,
593 PR("TX-Failed: ", txfailed); 593 PR("TX-Failed: ", txfailed);
594 len += snprintf(buf + len, size - len, 594 len += snprintf(buf + len, size - len,
595 "%s%11p%11p%10p%10p\n", "txq-memory-address:", 595 "%s%11p%11p%10p%10p\n", "txq-memory-address:",
596 sc->tx.txq_map[WME_AC_BE], 596 sc->tx.txq_map[IEEE80211_AC_BE],
597 sc->tx.txq_map[WME_AC_BK], 597 sc->tx.txq_map[IEEE80211_AC_BK],
598 sc->tx.txq_map[WME_AC_VI], 598 sc->tx.txq_map[IEEE80211_AC_VI],
599 sc->tx.txq_map[WME_AC_VO]); 599 sc->tx.txq_map[IEEE80211_AC_VO]);
600 if (len >= size) 600 if (len >= size)
601 goto done; 601 goto done;
602 602
@@ -617,7 +617,7 @@ static ssize_t read_file_xmit(struct file *file, char __user *user_buf,
617 } 617 }
618 618
619 /* Print out more detailed queue-info */ 619 /* Print out more detailed queue-info */
620 for (i = 0; i <= WME_AC_BK; i++) { 620 for (i = 0; i <= IEEE80211_AC_BK; i++) {
621 struct ath_txq *txq = &(sc->tx.txq[i]); 621 struct ath_txq *txq = &(sc->tx.txq[i]);
622 struct ath_atx_ac *ac; 622 struct ath_atx_ac *ac;
623 struct ath_atx_tid *tid; 623 struct ath_atx_tid *tid;
@@ -695,7 +695,7 @@ static ssize_t read_file_stations(struct file *file, char __user *user_buf,
695 goto done; 695 goto done;
696 } 696 }
697 697
698 for (q = 0; q < WME_NUM_AC; q++) { 698 for (q = 0; q < IEEE80211_NUM_ACS; q++) {
699 struct ath_atx_ac *ac = &(an->ac[q]); 699 struct ath_atx_ac *ac = &(an->ac[q]);
700 len += snprintf(buf + len, size - len, 700 len += snprintf(buf + len, size - len,
701 " ac: %p %s %i %p\n", 701 " ac: %p %s %i %p\n",
@@ -1648,13 +1648,13 @@ int ath9k_init_debug(struct ath_hw *ah)
1648 debugfs_create_file("xmit", S_IRUSR, sc->debug.debugfs_phy, sc, 1648 debugfs_create_file("xmit", S_IRUSR, sc->debug.debugfs_phy, sc,
1649 &fops_xmit); 1649 &fops_xmit);
1650 debugfs_create_u32("qlen_bk", S_IRUSR | S_IWUSR, sc->debug.debugfs_phy, 1650 debugfs_create_u32("qlen_bk", S_IRUSR | S_IWUSR, sc->debug.debugfs_phy,
1651 &sc->tx.txq_max_pending[WME_AC_BK]); 1651 &sc->tx.txq_max_pending[IEEE80211_AC_BK]);
1652 debugfs_create_u32("qlen_be", S_IRUSR | S_IWUSR, sc->debug.debugfs_phy, 1652 debugfs_create_u32("qlen_be", S_IRUSR | S_IWUSR, sc->debug.debugfs_phy,
1653 &sc->tx.txq_max_pending[WME_AC_BE]); 1653 &sc->tx.txq_max_pending[IEEE80211_AC_BE]);
1654 debugfs_create_u32("qlen_vi", S_IRUSR | S_IWUSR, sc->debug.debugfs_phy, 1654 debugfs_create_u32("qlen_vi", S_IRUSR | S_IWUSR, sc->debug.debugfs_phy,
1655 &sc->tx.txq_max_pending[WME_AC_VI]); 1655 &sc->tx.txq_max_pending[IEEE80211_AC_VI]);
1656 debugfs_create_u32("qlen_vo", S_IRUSR | S_IWUSR, sc->debug.debugfs_phy, 1656 debugfs_create_u32("qlen_vo", S_IRUSR | S_IWUSR, sc->debug.debugfs_phy,
1657 &sc->tx.txq_max_pending[WME_AC_VO]); 1657 &sc->tx.txq_max_pending[IEEE80211_AC_VO]);
1658 debugfs_create_file("stations", S_IRUSR, sc->debug.debugfs_phy, sc, 1658 debugfs_create_file("stations", S_IRUSR, sc->debug.debugfs_phy, sc,
1659 &fops_stations); 1659 &fops_stations);
1660 debugfs_create_file("misc", S_IRUSR, sc->debug.debugfs_phy, sc, 1660 debugfs_create_file("misc", S_IRUSR, sc->debug.debugfs_phy, sc,
diff --git a/drivers/net/wireless/ath/ath9k/gpio.c b/drivers/net/wireless/ath/ath9k/gpio.c
index 7b39cc14662..4b412aaf4f3 100644
--- a/drivers/net/wireless/ath/ath9k/gpio.c
+++ b/drivers/net/wireless/ath/ath9k/gpio.c
@@ -474,7 +474,7 @@ int ath9k_init_btcoex(struct ath_softc *sc)
474 r = ath_init_btcoex_timer(sc); 474 r = ath_init_btcoex_timer(sc);
475 if (r) 475 if (r)
476 return -1; 476 return -1;
477 txq = sc->tx.txq_map[WME_AC_BE]; 477 txq = sc->tx.txq_map[IEEE80211_AC_BE];
478 ath9k_hw_init_btcoex_hw(sc->sc_ah, txq->axq_qnum); 478 ath9k_hw_init_btcoex_hw(sc->sc_ah, txq->axq_qnum);
479 sc->btcoex.bt_stomp_type = ATH_BTCOEX_STOMP_LOW; 479 sc->btcoex.bt_stomp_type = ATH_BTCOEX_STOMP_LOW;
480 if (ath9k_hw_mci_is_enabled(ah)) { 480 if (ath9k_hw_mci_is_enabled(ah)) {
diff --git a/drivers/net/wireless/ath/ath9k/htc.h b/drivers/net/wireless/ath/ath9k/htc.h
index b30596fcf73..96bfb18078f 100644
--- a/drivers/net/wireless/ath/ath9k/htc.h
+++ b/drivers/net/wireless/ath/ath9k/htc.h
@@ -331,7 +331,7 @@ struct ath_tx_stats {
331 u32 skb_success; 331 u32 skb_success;
332 u32 skb_failed; 332 u32 skb_failed;
333 u32 cab_queued; 333 u32 cab_queued;
334 u32 queue_stats[WME_NUM_AC]; 334 u32 queue_stats[IEEE80211_NUM_ACS];
335}; 335};
336 336
337struct ath_rx_stats { 337struct ath_rx_stats {
@@ -493,7 +493,7 @@ struct ath9k_htc_priv {
493 493
494 int beaconq; 494 int beaconq;
495 int cabq; 495 int cabq;
496 int hwq_map[WME_NUM_AC]; 496 int hwq_map[IEEE80211_NUM_ACS];
497 497
498#ifdef CONFIG_ATH9K_BTCOEX_SUPPORT 498#ifdef CONFIG_ATH9K_BTCOEX_SUPPORT
499 struct ath_btcoex btcoex; 499 struct ath_btcoex btcoex;
diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_beacon.c b/drivers/net/wireless/ath/ath9k/htc_drv_beacon.c
index 1318d79f5c4..d0ce1f5bba1 100644
--- a/drivers/net/wireless/ath/ath9k/htc_drv_beacon.c
+++ b/drivers/net/wireless/ath/ath9k/htc_drv_beacon.c
@@ -33,7 +33,7 @@ void ath9k_htc_beaconq_config(struct ath9k_htc_priv *priv)
33 qi.tqi_cwmin = 0; 33 qi.tqi_cwmin = 0;
34 qi.tqi_cwmax = 0; 34 qi.tqi_cwmax = 0;
35 } else if (priv->ah->opmode == NL80211_IFTYPE_ADHOC) { 35 } else if (priv->ah->opmode == NL80211_IFTYPE_ADHOC) {
36 int qnum = priv->hwq_map[WME_AC_BE]; 36 int qnum = priv->hwq_map[IEEE80211_AC_BE];
37 37
38 ath9k_hw_get_txq_props(ah, qnum, &qi_be); 38 ath9k_hw_get_txq_props(ah, qnum, &qi_be);
39 39
diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_debug.c b/drivers/net/wireless/ath/ath9k/htc_drv_debug.c
index 3035deb7a0c..87110de577e 100644
--- a/drivers/net/wireless/ath/ath9k/htc_drv_debug.c
+++ b/drivers/net/wireless/ath/ath9k/htc_drv_debug.c
@@ -218,16 +218,16 @@ static ssize_t read_file_xmit(struct file *file, char __user *user_buf,
218 218
219 len += snprintf(buf + len, sizeof(buf) - len, 219 len += snprintf(buf + len, sizeof(buf) - len,
220 "%20s : %10u\n", "BE queued", 220 "%20s : %10u\n", "BE queued",
221 priv->debug.tx_stats.queue_stats[WME_AC_BE]); 221 priv->debug.tx_stats.queue_stats[IEEE80211_AC_BE]);
222 len += snprintf(buf + len, sizeof(buf) - len, 222 len += snprintf(buf + len, sizeof(buf) - len,
223 "%20s : %10u\n", "BK queued", 223 "%20s : %10u\n", "BK queued",
224 priv->debug.tx_stats.queue_stats[WME_AC_BK]); 224 priv->debug.tx_stats.queue_stats[IEEE80211_AC_BK]);
225 len += snprintf(buf + len, sizeof(buf) - len, 225 len += snprintf(buf + len, sizeof(buf) - len,
226 "%20s : %10u\n", "VI queued", 226 "%20s : %10u\n", "VI queued",
227 priv->debug.tx_stats.queue_stats[WME_AC_VI]); 227 priv->debug.tx_stats.queue_stats[IEEE80211_AC_VI]);
228 len += snprintf(buf + len, sizeof(buf) - len, 228 len += snprintf(buf + len, sizeof(buf) - len,
229 "%20s : %10u\n", "VO queued", 229 "%20s : %10u\n", "VO queued",
230 priv->debug.tx_stats.queue_stats[WME_AC_VO]); 230 priv->debug.tx_stats.queue_stats[IEEE80211_AC_VO]);
231 231
232 if (len > sizeof(buf)) 232 if (len > sizeof(buf))
233 len = sizeof(buf); 233 len = sizeof(buf);
diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_gpio.c b/drivers/net/wireless/ath/ath9k/htc_drv_gpio.c
index 0eacfc13c91..105582d6b71 100644
--- a/drivers/net/wireless/ath/ath9k/htc_drv_gpio.c
+++ b/drivers/net/wireless/ath/ath9k/htc_drv_gpio.c
@@ -207,7 +207,7 @@ void ath9k_htc_init_btcoex(struct ath9k_htc_priv *priv, char *product)
207 priv->btcoex.bt_stomp_type = ATH_BTCOEX_STOMP_LOW; 207 priv->btcoex.bt_stomp_type = ATH_BTCOEX_STOMP_LOW;
208 ath9k_hw_btcoex_init_3wire(priv->ah); 208 ath9k_hw_btcoex_init_3wire(priv->ah);
209 ath_htc_init_btcoex_work(priv); 209 ath_htc_init_btcoex_work(priv);
210 qnum = priv->hwq_map[WME_AC_BE]; 210 qnum = priv->hwq_map[IEEE80211_AC_BE];
211 ath9k_hw_init_btcoex_hw(priv->ah, qnum); 211 ath9k_hw_init_btcoex_hw(priv->ah, qnum);
212 break; 212 break;
213 default: 213 default:
diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_init.c b/drivers/net/wireless/ath/ath9k/htc_drv_init.c
index 5ecf1287ddd..05d5ba66cac 100644
--- a/drivers/net/wireless/ath/ath9k/htc_drv_init.c
+++ b/drivers/net/wireless/ath/ath9k/htc_drv_init.c
@@ -549,20 +549,20 @@ static int ath9k_init_queues(struct ath9k_htc_priv *priv)
549 goto err; 549 goto err;
550 } 550 }
551 551
552 if (!ath9k_htc_txq_setup(priv, WME_AC_BE)) { 552 if (!ath9k_htc_txq_setup(priv, IEEE80211_AC_BE)) {
553 ath_err(common, "Unable to setup xmit queue for BE traffic\n"); 553 ath_err(common, "Unable to setup xmit queue for BE traffic\n");
554 goto err; 554 goto err;
555 } 555 }
556 556
557 if (!ath9k_htc_txq_setup(priv, WME_AC_BK)) { 557 if (!ath9k_htc_txq_setup(priv, IEEE80211_AC_BK)) {
558 ath_err(common, "Unable to setup xmit queue for BK traffic\n"); 558 ath_err(common, "Unable to setup xmit queue for BK traffic\n");
559 goto err; 559 goto err;
560 } 560 }
561 if (!ath9k_htc_txq_setup(priv, WME_AC_VI)) { 561 if (!ath9k_htc_txq_setup(priv, IEEE80211_AC_VI)) {
562 ath_err(common, "Unable to setup xmit queue for VI traffic\n"); 562 ath_err(common, "Unable to setup xmit queue for VI traffic\n");
563 goto err; 563 goto err;
564 } 564 }
565 if (!ath9k_htc_txq_setup(priv, WME_AC_VO)) { 565 if (!ath9k_htc_txq_setup(priv, IEEE80211_AC_VO)) {
566 ath_err(common, "Unable to setup xmit queue for VO traffic\n"); 566 ath_err(common, "Unable to setup xmit queue for VO traffic\n");
567 goto err; 567 goto err;
568 } 568 }
diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_main.c b/drivers/net/wireless/ath/ath9k/htc_drv_main.c
index 02cce95331d..9c07a8fa513 100644
--- a/drivers/net/wireless/ath/ath9k/htc_drv_main.c
+++ b/drivers/net/wireless/ath/ath9k/htc_drv_main.c
@@ -1349,7 +1349,7 @@ static int ath9k_htc_conf_tx(struct ieee80211_hw *hw,
1349 struct ath9k_tx_queue_info qi; 1349 struct ath9k_tx_queue_info qi;
1350 int ret = 0, qnum; 1350 int ret = 0, qnum;
1351 1351
1352 if (queue >= WME_NUM_AC) 1352 if (queue >= IEEE80211_NUM_ACS)
1353 return 0; 1353 return 0;
1354 1354
1355 mutex_lock(&priv->mutex); 1355 mutex_lock(&priv->mutex);
@@ -1376,7 +1376,7 @@ static int ath9k_htc_conf_tx(struct ieee80211_hw *hw,
1376 } 1376 }
1377 1377
1378 if ((priv->ah->opmode == NL80211_IFTYPE_ADHOC) && 1378 if ((priv->ah->opmode == NL80211_IFTYPE_ADHOC) &&
1379 (qnum == priv->hwq_map[WME_AC_BE])) 1379 (qnum == priv->hwq_map[IEEE80211_AC_BE]))
1380 ath9k_htc_beaconq_config(priv); 1380 ath9k_htc_beaconq_config(priv);
1381out: 1381out:
1382 ath9k_htc_ps_restore(priv); 1382 ath9k_htc_ps_restore(priv);
diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_txrx.c b/drivers/net/wireless/ath/ath9k/htc_drv_txrx.c
index 06cdcb772d7..3a22d17a261 100644
--- a/drivers/net/wireless/ath/ath9k/htc_drv_txrx.c
+++ b/drivers/net/wireless/ath/ath9k/htc_drv_txrx.c
@@ -21,10 +21,10 @@
21/******/ 21/******/
22 22
23static const int subtype_txq_to_hwq[] = { 23static const int subtype_txq_to_hwq[] = {
24 [WME_AC_BE] = ATH_TXQ_AC_BE, 24 [IEEE80211_AC_BE] = ATH_TXQ_AC_BE,
25 [WME_AC_BK] = ATH_TXQ_AC_BK, 25 [IEEE80211_AC_BK] = ATH_TXQ_AC_BK,
26 [WME_AC_VI] = ATH_TXQ_AC_VI, 26 [IEEE80211_AC_VI] = ATH_TXQ_AC_VI,
27 [WME_AC_VO] = ATH_TXQ_AC_VO, 27 [IEEE80211_AC_VO] = ATH_TXQ_AC_VO,
28}; 28};
29 29
30#define ATH9K_HTC_INIT_TXQ(subtype) do { \ 30#define ATH9K_HTC_INIT_TXQ(subtype) do { \
@@ -41,15 +41,15 @@ int get_hw_qnum(u16 queue, int *hwq_map)
41{ 41{
42 switch (queue) { 42 switch (queue) {
43 case 0: 43 case 0:
44 return hwq_map[WME_AC_VO]; 44 return hwq_map[IEEE80211_AC_VO];
45 case 1: 45 case 1:
46 return hwq_map[WME_AC_VI]; 46 return hwq_map[IEEE80211_AC_VI];
47 case 2: 47 case 2:
48 return hwq_map[WME_AC_BE]; 48 return hwq_map[IEEE80211_AC_BE];
49 case 3: 49 case 3:
50 return hwq_map[WME_AC_BK]; 50 return hwq_map[IEEE80211_AC_BK];
51 default: 51 default:
52 return hwq_map[WME_AC_BE]; 52 return hwq_map[IEEE80211_AC_BE];
53 } 53 }
54} 54}
55 55
@@ -106,20 +106,20 @@ static inline enum htc_endpoint_id get_htc_epid(struct ath9k_htc_priv *priv,
106 106
107 switch (qnum) { 107 switch (qnum) {
108 case 0: 108 case 0:
109 TX_QSTAT_INC(WME_AC_VO); 109 TX_QSTAT_INC(IEEE80211_AC_VO);
110 epid = priv->data_vo_ep; 110 epid = priv->data_vo_ep;
111 break; 111 break;
112 case 1: 112 case 1:
113 TX_QSTAT_INC(WME_AC_VI); 113 TX_QSTAT_INC(IEEE80211_AC_VI);
114 epid = priv->data_vi_ep; 114 epid = priv->data_vi_ep;
115 break; 115 break;
116 case 2: 116 case 2:
117 TX_QSTAT_INC(WME_AC_BE); 117 TX_QSTAT_INC(IEEE80211_AC_BE);
118 epid = priv->data_be_ep; 118 epid = priv->data_be_ep;
119 break; 119 break;
120 case 3: 120 case 3:
121 default: 121 default:
122 TX_QSTAT_INC(WME_AC_BK); 122 TX_QSTAT_INC(IEEE80211_AC_BK);
123 epid = priv->data_bk_ep; 123 epid = priv->data_bk_ep;
124 break; 124 break;
125 } 125 }
diff --git a/drivers/net/wireless/ath/ath9k/init.c b/drivers/net/wireless/ath/ath9k/init.c
index 546bae93647..345a01af542 100644
--- a/drivers/net/wireless/ath/ath9k/init.c
+++ b/drivers/net/wireless/ath/ath9k/init.c
@@ -435,7 +435,7 @@ static int ath9k_init_queues(struct ath_softc *sc)
435 sc->config.cabqReadytime = ATH_CABQ_READY_TIME; 435 sc->config.cabqReadytime = ATH_CABQ_READY_TIME;
436 ath_cabq_update(sc); 436 ath_cabq_update(sc);
437 437
438 for (i = 0; i < WME_NUM_AC; i++) { 438 for (i = 0; i < IEEE80211_NUM_ACS; i++) {
439 sc->tx.txq_map[i] = ath_txq_setup(sc, ATH9K_TX_QUEUE_DATA, i); 439 sc->tx.txq_map[i] = ath_txq_setup(sc, ATH9K_TX_QUEUE_DATA, i);
440 sc->tx.txq_map[i]->mac80211_qnum = i; 440 sc->tx.txq_map[i]->mac80211_qnum = i;
441 sc->tx.txq_max_pending[i] = ATH_MAX_QDEPTH; 441 sc->tx.txq_max_pending[i] = ATH_MAX_QDEPTH;
diff --git a/drivers/net/wireless/ath/ath9k/link.c b/drivers/net/wireless/ath/ath9k/link.c
index 223b9693527..227fdb81481 100644
--- a/drivers/net/wireless/ath/ath9k/link.c
+++ b/drivers/net/wireless/ath/ath9k/link.c
@@ -211,7 +211,7 @@ static bool ath_paprd_send_frame(struct ath_softc *sc, struct sk_buff *skb, int
211 int time_left; 211 int time_left;
212 212
213 memset(&txctl, 0, sizeof(txctl)); 213 memset(&txctl, 0, sizeof(txctl));
214 txctl.txq = sc->tx.txq_map[WME_AC_BE]; 214 txctl.txq = sc->tx.txq_map[IEEE80211_AC_BE];
215 215
216 memset(tx_info, 0, sizeof(*tx_info)); 216 memset(tx_info, 0, sizeof(*tx_info));
217 tx_info->band = hw->conf.channel->band; 217 tx_info->band = hw->conf.channel->band;
diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c
index e59d8e3fcbc..f8b3cacaeac 100644
--- a/drivers/net/wireless/ath/ath9k/main.c
+++ b/drivers/net/wireless/ath/ath9k/main.c
@@ -1325,7 +1325,7 @@ static int ath9k_conf_tx(struct ieee80211_hw *hw,
1325 struct ath9k_tx_queue_info qi; 1325 struct ath9k_tx_queue_info qi;
1326 int ret = 0; 1326 int ret = 0;
1327 1327
1328 if (queue >= WME_NUM_AC) 1328 if (queue >= IEEE80211_NUM_ACS)
1329 return 0; 1329 return 0;
1330 1330
1331 txq = sc->tx.txq_map[queue]; 1331 txq = sc->tx.txq_map[queue];
@@ -1956,10 +1956,10 @@ static int ath9k_get_et_sset_count(struct ieee80211_hw *hw,
1956#define PR_QNUM(_n) (sc->tx.txq_map[_n]->axq_qnum) 1956#define PR_QNUM(_n) (sc->tx.txq_map[_n]->axq_qnum)
1957#define AWDATA(elem) \ 1957#define AWDATA(elem) \
1958 do { \ 1958 do { \
1959 data[i++] = sc->debug.stats.txstats[PR_QNUM(WME_AC_BE)].elem; \ 1959 data[i++] = sc->debug.stats.txstats[PR_QNUM(IEEE80211_AC_BE)].elem; \
1960 data[i++] = sc->debug.stats.txstats[PR_QNUM(WME_AC_BK)].elem; \ 1960 data[i++] = sc->debug.stats.txstats[PR_QNUM(IEEE80211_AC_BK)].elem; \
1961 data[i++] = sc->debug.stats.txstats[PR_QNUM(WME_AC_VI)].elem; \ 1961 data[i++] = sc->debug.stats.txstats[PR_QNUM(IEEE80211_AC_VI)].elem; \
1962 data[i++] = sc->debug.stats.txstats[PR_QNUM(WME_AC_VO)].elem; \ 1962 data[i++] = sc->debug.stats.txstats[PR_QNUM(IEEE80211_AC_VO)].elem; \
1963 } while (0) 1963 } while (0)
1964 1964
1965#define AWDATA_RX(elem) \ 1965#define AWDATA_RX(elem) \
@@ -1974,14 +1974,14 @@ static void ath9k_get_et_stats(struct ieee80211_hw *hw,
1974 struct ath_softc *sc = hw->priv; 1974 struct ath_softc *sc = hw->priv;
1975 int i = 0; 1975 int i = 0;
1976 1976
1977 data[i++] = (sc->debug.stats.txstats[PR_QNUM(WME_AC_BE)].tx_pkts_all + 1977 data[i++] = (sc->debug.stats.txstats[PR_QNUM(IEEE80211_AC_BE)].tx_pkts_all +
1978 sc->debug.stats.txstats[PR_QNUM(WME_AC_BK)].tx_pkts_all + 1978 sc->debug.stats.txstats[PR_QNUM(IEEE80211_AC_BK)].tx_pkts_all +
1979 sc->debug.stats.txstats[PR_QNUM(WME_AC_VI)].tx_pkts_all + 1979 sc->debug.stats.txstats[PR_QNUM(IEEE80211_AC_VI)].tx_pkts_all +
1980 sc->debug.stats.txstats[PR_QNUM(WME_AC_VO)].tx_pkts_all); 1980 sc->debug.stats.txstats[PR_QNUM(IEEE80211_AC_VO)].tx_pkts_all);
1981 data[i++] = (sc->debug.stats.txstats[PR_QNUM(WME_AC_BE)].tx_bytes_all + 1981 data[i++] = (sc->debug.stats.txstats[PR_QNUM(IEEE80211_AC_BE)].tx_bytes_all +
1982 sc->debug.stats.txstats[PR_QNUM(WME_AC_BK)].tx_bytes_all + 1982 sc->debug.stats.txstats[PR_QNUM(IEEE80211_AC_BK)].tx_bytes_all +
1983 sc->debug.stats.txstats[PR_QNUM(WME_AC_VI)].tx_bytes_all + 1983 sc->debug.stats.txstats[PR_QNUM(IEEE80211_AC_VI)].tx_bytes_all +
1984 sc->debug.stats.txstats[PR_QNUM(WME_AC_VO)].tx_bytes_all); 1984 sc->debug.stats.txstats[PR_QNUM(IEEE80211_AC_VO)].tx_bytes_all);
1985 AWDATA_RX(rx_pkts_all); 1985 AWDATA_RX(rx_pkts_all);
1986 AWDATA_RX(rx_bytes_all); 1986 AWDATA_RX(rx_bytes_all);
1987 1987
diff --git a/drivers/net/wireless/ath/ath9k/xmit.c b/drivers/net/wireless/ath/ath9k/xmit.c
index 741918a2027..ae7f2897c1a 100644
--- a/drivers/net/wireless/ath/ath9k/xmit.c
+++ b/drivers/net/wireless/ath/ath9k/xmit.c
@@ -1354,10 +1354,10 @@ struct ath_txq *ath_txq_setup(struct ath_softc *sc, int qtype, int subtype)
1354 struct ath_hw *ah = sc->sc_ah; 1354 struct ath_hw *ah = sc->sc_ah;
1355 struct ath9k_tx_queue_info qi; 1355 struct ath9k_tx_queue_info qi;
1356 static const int subtype_txq_to_hwq[] = { 1356 static const int subtype_txq_to_hwq[] = {
1357 [WME_AC_BE] = ATH_TXQ_AC_BE, 1357 [IEEE80211_AC_BE] = ATH_TXQ_AC_BE,
1358 [WME_AC_BK] = ATH_TXQ_AC_BK, 1358 [IEEE80211_AC_BK] = ATH_TXQ_AC_BK,
1359 [WME_AC_VI] = ATH_TXQ_AC_VI, 1359 [IEEE80211_AC_VI] = ATH_TXQ_AC_VI,
1360 [WME_AC_VO] = ATH_TXQ_AC_VO, 1360 [IEEE80211_AC_VO] = ATH_TXQ_AC_VO,
1361 }; 1361 };
1362 int axq_qnum, i; 1362 int axq_qnum, i;
1363 1363
@@ -2464,7 +2464,7 @@ void ath_tx_node_init(struct ath_softc *sc, struct ath_node *an)
2464 } 2464 }
2465 2465
2466 for (acno = 0, ac = &an->ac[acno]; 2466 for (acno = 0, ac = &an->ac[acno];
2467 acno < WME_NUM_AC; acno++, ac++) { 2467 acno < IEEE80211_NUM_ACS; acno++, ac++) {
2468 ac->sched = false; 2468 ac->sched = false;
2469 ac->txq = sc->tx.txq_map[acno]; 2469 ac->txq = sc->tx.txq_map[acno];
2470 INIT_LIST_HEAD(&ac->tid_q); 2470 INIT_LIST_HEAD(&ac->tid_q);