|
@@ -209,15 +209,8 @@ bool ath9k_hw_set_txq_props(struct ath_hw *ah, int q,
|
|
|
{
|
|
|
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_hw *ah, int q,
|
|
|
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 *ah, enum ath9k_tx_queue type,
|
|
|
{
|
|
|
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,
|