ath9k: fix tx queueing issues after background scans
authornbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Sat, 5 Oct 2013 12:12:57 +0000 (12:12 +0000)
committernbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Sat, 5 Oct 2013 12:12:57 +0000 (12:12 +0000)
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Backport of r38304

git-svn-id: svn://svn.openwrt.org/openwrt/branches/attitude_adjustment@38305 3c298f89-4303-0410-b956-a3cf2f4a3e73

package/mac80211/patches/300-pending_work.patch
package/mac80211/patches/512-ath9k_channelbw_debugfs.patch
package/mac80211/patches/521-ath9k_cur_txpower.patch
package/mac80211/patches/524-ath9k_use_configured_antenna_gain.patch
package/mac80211/patches/553-ath9k_debugfs_diag.patch
package/mac80211/patches/560-ath9k_tx_queueing_rework.patch

index be7b52a..127e777 100644 (file)
  static void ath_tx_complete_buf(struct ath_softc *sc, struct ath_buf *bf,
 --- a/drivers/net/wireless/ath/ath9k/main.c
 +++ b/drivers/net/wireless/ath/ath9k/main.c
-@@ -2094,7 +2094,7 @@ static void ath9k_wow_add_pattern(struct
+@@ -209,6 +209,7 @@ static bool ath_complete_reset(struct at
+       struct ath_hw *ah = sc->sc_ah;
+       struct ath_common *common = ath9k_hw_common(ah);
+       unsigned long flags;
++      int i;
+       if (ath_startrecv(sc) != 0) {
+               ath_err(common, "Unable to restart recv logic\n");
+@@ -236,6 +237,15 @@ static bool ath_complete_reset(struct at
+               }
+       work:
+               ath_restart_work(sc);
++
++              for (i = 0; i < ATH9K_NUM_TX_QUEUES; i++) {
++                      if (!ATH_TXQ_SETUP(sc, i))
++                              continue;
++
++                      spin_lock_bh(&sc->tx.txq[i].axq_lock);
++                      ath_txq_schedule(sc, &sc->tx.txq[i]);
++                      spin_unlock_bh(&sc->tx.txq[i].axq_lock);
++              }
+       }
+       if ((ah->caps.hw_caps & ATH9K_HW_CAP_ANT_DIV_COMB) && sc->ant_rx != 3)
+@@ -543,21 +553,10 @@ chip_reset:
+ static int ath_reset(struct ath_softc *sc)
+ {
+-      int i, r;
++      int r;
+       ath9k_ps_wakeup(sc);
+-
+       r = ath_reset_internal(sc, NULL);
+-
+-      for (i = 0; i < ATH9K_NUM_TX_QUEUES; i++) {
+-              if (!ATH_TXQ_SETUP(sc, i))
+-                      continue;
+-
+-              spin_lock_bh(&sc->tx.txq[i].axq_lock);
+-              ath_txq_schedule(sc, &sc->tx.txq[i]);
+-              spin_unlock_bh(&sc->tx.txq[i].axq_lock);
+-      }
+-
+       ath9k_ps_restore(sc);
+       return r;
+@@ -2094,7 +2093,7 @@ static void ath9k_wow_add_pattern(struct
  {
        struct ath_hw *ah = sc->sc_ah;
        struct ath9k_wow_pattern *wow_pattern = NULL;
index d6d1ae2..a42daf5 100644 (file)
@@ -80,7 +80,7 @@
        debugfs_create_file("interrupt", S_IRUSR, sc->debug.debugfs_phy, sc,
 --- a/drivers/net/wireless/ath/ath9k/main.c
 +++ b/drivers/net/wireless/ath/ath9k/main.c
-@@ -1139,7 +1139,7 @@ int ath9k_spectral_scan_config(struct ie
+@@ -1138,7 +1138,7 @@ int ath9k_spectral_scan_config(struct ie
        return 0;
  }
  
@@ -89,7 +89,7 @@
  {
        struct ath_softc *sc = hw->priv;
        struct ath_hw *ah = sc->sc_ah;
-@@ -1195,9 +1195,11 @@ static int ath9k_config(struct ieee80211
+@@ -1194,9 +1194,11 @@ static int ath9k_config(struct ieee80211
                struct ieee80211_channel *curchan = hw->conf.chandef.chan;
                enum nl80211_channel_type channel_type =
                        cfg80211_get_chandef_type(&conf->chandef);
  
                if (ah->curchan)
                        old_pos = ah->curchan - &ah->channels[0];
-@@ -1233,7 +1235,23 @@ static int ath9k_config(struct ieee80211
+@@ -1232,7 +1234,23 @@ static int ath9k_config(struct ieee80211
                        memset(&sc->survey[pos], 0, sizeof(struct survey_info));
                }
  
index 87a316c..a14d031 100644 (file)
@@ -1,6 +1,6 @@
 --- a/drivers/net/wireless/ath/ath9k/main.c
 +++ b/drivers/net/wireless/ath/ath9k/main.c
-@@ -1258,6 +1258,8 @@ int ath9k_config(struct ieee80211_hw *hw
+@@ -1257,6 +1257,8 @@ int ath9k_config(struct ieee80211_hw *hw
                        return -EINVAL;
                }
  
@@ -9,7 +9,7 @@
                /*
                 * The most recent snapshot of channel->noisefloor for the old
                 * channel is only available after the hardware reset. Copy it to
-@@ -1294,6 +1296,7 @@ int ath9k_config(struct ieee80211_hw *hw
+@@ -1293,6 +1295,7 @@ int ath9k_config(struct ieee80211_hw *hw
                sc->config.txpowlimit = 2 * conf->power_level;
                ath9k_cmn_update_txpow(ah, sc->curtxpow,
                                       sc->config.txpowlimit, &sc->curtxpow);
index 8f48eea..9d627ac 100644 (file)
@@ -21,7 +21,7 @@
        if (ant_gain > max_gain)
 --- a/drivers/net/wireless/ath/ath9k/main.c
 +++ b/drivers/net/wireless/ath/ath9k/main.c
-@@ -1292,7 +1292,10 @@ int ath9k_config(struct ieee80211_hw *hw
+@@ -1291,7 +1291,10 @@ int ath9k_config(struct ieee80211_hw *hw
        }
  
        if (changed & IEEE80211_CONF_CHANGE_POWER) {
index 7cf1c2a..7230d32 100644 (file)
                REG_SET_BIT(ah, AR_BTCOEX_WL_LNADIV, AR_BTCOEX_WL_LNADIV_FORCE_ON);
 --- a/drivers/net/wireless/ath/ath9k/main.c
 +++ b/drivers/net/wireless/ath/ath9k/main.c
-@@ -462,6 +462,11 @@ irqreturn_t ath_isr(int irq, void *dev)
+@@ -472,6 +472,11 @@ irqreturn_t ath_isr(int irq, void *dev)
        ath9k_hw_getisr(ah, &status);   /* NB: clears ISR too */
        status &= ah->imask;    /* discard unasked-for bits */
  
index 6fb0940..47ecd74 100644 (file)
@@ -90,7 +90,7 @@
  
 --- a/drivers/net/wireless/ath/ath9k/main.c
 +++ b/drivers/net/wireless/ath/ath9k/main.c
-@@ -1403,9 +1403,6 @@ static void ath9k_sta_notify(struct ieee
+@@ -1402,9 +1402,6 @@ static void ath9k_sta_notify(struct ieee
        struct ath_softc *sc = hw->priv;
        struct ath_node *an = (struct ath_node *) sta->drv_priv;