summaryrefslogtreecommitdiffstats
path: root/package/mac80211/patches/564-ath9k_remove_total_queues_cap.patch
diff options
context:
space:
mode:
Diffstat (limited to 'package/mac80211/patches/564-ath9k_remove_total_queues_cap.patch')
-rw-r--r--package/mac80211/patches/564-ath9k_remove_total_queues_cap.patch137
1 files changed, 137 insertions, 0 deletions
diff --git a/package/mac80211/patches/564-ath9k_remove_total_queues_cap.patch b/package/mac80211/patches/564-ath9k_remove_total_queues_cap.patch
new file mode 100644
index 0000000000..0907f68a02
--- /dev/null
+++ b/package/mac80211/patches/564-ath9k_remove_total_queues_cap.patch
@@ -0,0 +1,137 @@
+--- a/drivers/net/wireless/ath/ath9k/hw.c
++++ b/drivers/net/wireless/ath/ath9k/hw.c
+@@ -1446,7 +1446,7 @@ int ath9k_hw_reset(struct ath_hw *ah, st
+ REGWRITE_BUFFER_FLUSH(ah);
+
+ ah->intr_txqs = 0;
+- for (i = 0; i < ah->caps.total_queues; i++)
++ for (i = 0; i < ATH9K_NUM_TX_QUEUES; i++)
+ ath9k_hw_resettxqueue(ah, i);
+
+ ath9k_hw_init_interrupt_masks(ah, ah->opmode);
+@@ -1894,12 +1894,6 @@ int ath9k_hw_fill_cap_info(struct ath_hw
+ else
+ pCap->hw_caps &= ~ATH9K_HW_CAP_HT;
+
+- if (capField & AR_EEPROM_EEPCAP_MAXQCU)
+- pCap->total_queues =
+- MS(capField, AR_EEPROM_EEPCAP_MAXQCU);
+- else
+- pCap->total_queues = ATH9K_NUM_TX_QUEUES;
+-
+ if (capField & AR_EEPROM_EEPCAP_KC_ENTRIES)
+ pCap->keycache_size =
+ 1 << MS(capField, AR_EEPROM_EEPCAP_KC_ENTRIES);
+--- a/drivers/net/wireless/ath/ath9k/hw.h
++++ b/drivers/net/wireless/ath/ath9k/hw.h
+@@ -191,7 +191,6 @@ enum ath9k_hw_caps {
+
+ struct ath9k_hw_capabilities {
+ u32 hw_caps; /* ATH9K_HW_CAP_* from ath9k_hw_caps */
+- u16 total_queues;
+ u16 keycache_size;
+ u16 low_5ghz_chan, high_5ghz_chan;
+ u16 low_2ghz_chan, high_2ghz_chan;
+--- a/drivers/net/wireless/ath/ath9k/mac.c
++++ b/drivers/net/wireless/ath/ath9k/mac.c
+@@ -209,15 +209,8 @@ bool ath9k_hw_set_txq_props(struct ath_h
+ {
+ u32 cw;
+ struct ath_common *common = ath9k_hw_common(ah);
+- struct ath9k_hw_capabilities *pCap = &ah->caps;
+ struct ath9k_tx_queue_info *qi;
+
+- if (q >= pCap->total_queues) {
+- ath_dbg(common, ATH_DBG_QUEUE,
+- "Set TXQ properties, invalid queue: %u\n", q);
+- return false;
+- }
+-
+ qi = &ah->txq[q];
+ if (qi->tqi_type == ATH9K_TX_QUEUE_INACTIVE) {
+ ath_dbg(common, ATH_DBG_QUEUE,
+@@ -280,15 +273,8 @@ bool ath9k_hw_get_txq_props(struct ath_h
+ struct ath9k_tx_queue_info *qinfo)
+ {
+ struct ath_common *common = ath9k_hw_common(ah);
+- struct ath9k_hw_capabilities *pCap = &ah->caps;
+ struct ath9k_tx_queue_info *qi;
+
+- if (q >= pCap->total_queues) {
+- ath_dbg(common, ATH_DBG_QUEUE,
+- "Get TXQ properties, invalid queue: %u\n", q);
+- return false;
+- }
+-
+ qi = &ah->txq[q];
+ if (qi->tqi_type == ATH9K_TX_QUEUE_INACTIVE) {
+ ath_dbg(common, ATH_DBG_QUEUE,
+@@ -320,28 +306,27 @@ int ath9k_hw_setuptxqueue(struct ath_hw
+ {
+ struct ath_common *common = ath9k_hw_common(ah);
+ struct ath9k_tx_queue_info *qi;
+- struct ath9k_hw_capabilities *pCap = &ah->caps;
+ int q;
+
+ switch (type) {
+ case ATH9K_TX_QUEUE_BEACON:
+- q = pCap->total_queues - 1;
++ q = ATH9K_NUM_TX_QUEUES - 1;
+ break;
+ case ATH9K_TX_QUEUE_CAB:
+- q = pCap->total_queues - 2;
++ q = ATH9K_NUM_TX_QUEUES - 2;
+ break;
+ case ATH9K_TX_QUEUE_PSPOLL:
+ q = 1;
+ break;
+ case ATH9K_TX_QUEUE_UAPSD:
+- q = pCap->total_queues - 3;
++ q = ATH9K_NUM_TX_QUEUES - 3;
+ break;
+ case ATH9K_TX_QUEUE_DATA:
+- for (q = 0; q < pCap->total_queues; q++)
++ for (q = 0; q < ATH9K_NUM_TX_QUEUES; q++)
+ if (ah->txq[q].tqi_type ==
+ ATH9K_TX_QUEUE_INACTIVE)
+ break;
+- if (q == pCap->total_queues) {
++ if (q == ATH9K_NUM_TX_QUEUES) {
+ ath_err(common, "No available TX queue\n");
+ return -1;
+ }
+@@ -382,15 +367,9 @@ EXPORT_SYMBOL(ath9k_hw_setuptxqueue);
+
+ bool ath9k_hw_releasetxqueue(struct ath_hw *ah, u32 q)
+ {
+- struct ath9k_hw_capabilities *pCap = &ah->caps;
+ struct ath_common *common = ath9k_hw_common(ah);
+ struct ath9k_tx_queue_info *qi;
+
+- if (q >= pCap->total_queues) {
+- ath_dbg(common, ATH_DBG_QUEUE,
+- "Release TXQ, invalid queue: %u\n", q);
+- return false;
+- }
+ qi = &ah->txq[q];
+ if (qi->tqi_type == ATH9K_TX_QUEUE_INACTIVE) {
+ ath_dbg(common, ATH_DBG_QUEUE,
+@@ -414,18 +393,11 @@ EXPORT_SYMBOL(ath9k_hw_releasetxqueue);
+
+ bool ath9k_hw_resettxqueue(struct ath_hw *ah, u32 q)
+ {
+- struct ath9k_hw_capabilities *pCap = &ah->caps;
+ struct ath_common *common = ath9k_hw_common(ah);
+ struct ath9k_channel *chan = ah->curchan;
+ struct ath9k_tx_queue_info *qi;
+ u32 cwMin, chanCwMin, value;
+
+- if (q >= pCap->total_queues) {
+- ath_dbg(common, ATH_DBG_QUEUE,
+- "Reset TXQ, invalid queue: %u\n", q);
+- return false;
+- }
+-
+ qi = &ah->txq[q];
+ if (qi->tqi_type == ATH9K_TX_QUEUE_INACTIVE) {
+ ath_dbg(common, ATH_DBG_QUEUE,