ath9k: add a fix to reduce the number of spurious tx hang detections
authornbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Fri, 15 Mar 2013 15:22:06 +0000 (15:22 +0000)
committernbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Fri, 15 Mar 2013 15:22:06 +0000 (15:22 +0000)
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@36040 3c298f89-4303-0410-b956-a3cf2f4a3e73

package/mac80211/patches/300-pending_work.patch

index e711ccf..3d4e85d 100644 (file)
        /* Test value. if 0 then attenuation is unused. Don't load anything. */
        for (i = 0; i < 3; i++) {
                if (ah->txchainmask & BIT(i)) {
+--- a/drivers/net/wireless/ath/ath9k/link.c
++++ b/drivers/net/wireless/ath/ath9k/link.c
+@@ -28,21 +28,21 @@ void ath_tx_complete_poll_work(struct wo
+       int i;
+       bool needreset = false;
+-      for (i = 0; i < ATH9K_NUM_TX_QUEUES; i++)
+-              if (ATH_TXQ_SETUP(sc, i)) {
+-                      txq = &sc->tx.txq[i];
+-                      ath_txq_lock(sc, txq);
+-                      if (txq->axq_depth) {
+-                              if (txq->axq_tx_inprogress) {
+-                                      needreset = true;
+-                                      ath_txq_unlock(sc, txq);
+-                                      break;
+-                              } else {
+-                                      txq->axq_tx_inprogress = true;
+-                              }
++      for (i = 0; i < IEEE80211_NUM_ACS; i++) {
++              txq = sc->tx.txq_map[i];
++
++              ath_txq_lock(sc, txq);
++              if (txq->axq_depth) {
++                      if (txq->axq_tx_inprogress) {
++                              needreset = true;
++                              ath_txq_unlock(sc, txq);
++                              break;
++                      } else {
++                              txq->axq_tx_inprogress = true;
+                       }
+-                      ath_txq_unlock_complete(sc, txq);
+               }
++              ath_txq_unlock_complete(sc, txq);
++      }
+       if (needreset) {
+               ath_dbg(ath9k_hw_common(sc->sc_ah), RESET,