ath9k: fix a soft lockup on smp systems
authornbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Mon, 14 Jan 2013 15:59:28 +0000 (15:59 +0000)
committernbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Mon, 14 Jan 2013 15:59:28 +0000 (15:59 +0000)
Backport of r35152

git-svn-id: svn://svn.openwrt.org/openwrt/branches/attitude_adjustment@35153 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/525-ath9k_use_configured_antenna_gain.patch
package/mac80211/patches/562-ath9k_add_idle_hack.patch
package/mac80211/patches/564-ath9k_debugfs_diag.patch
package/mac80211/patches/566-ath9k_use_ieee80211_free_txskb.patch

index c0240ad..69c32b8 100644 (file)
  {
        struct ath_hw *ah = sc->sc_ah;
        bool ret = true;
-@@ -195,19 +195,15 @@ static bool ath_prepare_reset(struct ath
-       ath9k_debug_samp_bb_mac(sc);
-       ath9k_hw_disable_interrupts(ah);
-+      tasklet_disable(&sc->intr_tq);
-+
-       if (!ath_stoprecv(sc))
-               ret = false;
+@@ -201,14 +201,6 @@ static bool ath_prepare_reset(struct ath
        if (!ath_drain_all_txq(sc, retry_tx))
                ret = false;
  
 -      } else {
 -              ath_flushrecv(sc);
 -      }
-+      tasklet_enable(&sc->intr_tq);
+-
        return ret;
  }
-@@ -261,7 +257,6 @@ static int ath_reset_internal(struct ath
+@@ -261,11 +253,11 @@ static int ath_reset_internal(struct ath
        struct ath_common *common = ath9k_hw_common(ah);
        struct ath9k_hw_cal_data *caldata = NULL;
        bool fastcc = true;
        int r;
  
        __ath_cancel_work(sc);
-@@ -275,11 +270,10 @@ static int ath_reset_internal(struct ath
++      tasklet_disable(&sc->intr_tq);
+       spin_lock_bh(&sc->sc_pcu_lock);
+       if (!(sc->hw->conf.flags & IEEE80211_CONF_OFFCHANNEL)) {
+@@ -275,11 +267,10 @@ static int ath_reset_internal(struct ath
  
        if (!hchan) {
                fastcc = false;
                fastcc = false;
  
        ath_dbg(common, CONFIG, "Reset to %u MHz, HT40: %d fastcc: %d\n",
-@@ -821,7 +815,7 @@ static void ath9k_stop(struct ieee80211_
+@@ -297,6 +288,8 @@ static int ath_reset_internal(struct ath
+ out:
+       spin_unlock_bh(&sc->sc_pcu_lock);
++      tasklet_enable(&sc->intr_tq);
++
+       return r;
+ }
+@@ -821,7 +814,7 @@ static void ath9k_stop(struct ieee80211_
                ath9k_hw_cfg_gpio_input(ah, ah->led_pin);
        }
  
index db6d36b..15111e9 100644 (file)
@@ -80,7 +80,7 @@
  }
 --- a/drivers/net/wireless/ath/ath9k/main.c
 +++ b/drivers/net/wireless/ath/ath9k/main.c
-@@ -1121,7 +1121,7 @@ static void ath9k_disable_ps(struct ath_
+@@ -1120,7 +1120,7 @@ static void ath9k_disable_ps(struct ath_
        ath_dbg(common, PS, "PowerSave disabled\n");
  }
  
@@ -89,7 +89,7 @@
  {
        struct ath_softc *sc = hw->priv;
        struct ath_hw *ah = sc->sc_ah;
-@@ -1175,9 +1175,11 @@ static int ath9k_config(struct ieee80211
+@@ -1174,9 +1174,11 @@ static int ath9k_config(struct ieee80211
  
        if ((changed & IEEE80211_CONF_CHANGE_CHANNEL) || reset_channel) {
                struct ieee80211_channel *curchan = hw->conf.channel;
  
                if (ah->curchan)
                        old_pos = ah->curchan - &ah->channels[0];
-@@ -1220,7 +1222,23 @@ static int ath9k_config(struct ieee80211
+@@ -1219,7 +1221,23 @@ static int ath9k_config(struct ieee80211
                        memset(&sc->survey[pos], 0, sizeof(struct survey_info));
                }
  
index d740332..14b59e5 100644 (file)
@@ -1,6 +1,6 @@
 --- a/drivers/net/wireless/ath/ath9k/main.c
 +++ b/drivers/net/wireless/ath/ath9k/main.c
-@@ -1245,6 +1245,8 @@ int ath9k_config(struct ieee80211_hw *hw
+@@ -1244,6 +1244,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
-@@ -1259,6 +1261,7 @@ int ath9k_config(struct ieee80211_hw *hw
+@@ -1258,6 +1260,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 4c34c89..367438e 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
-@@ -1257,7 +1257,10 @@ int ath9k_config(struct ieee80211_hw *hw
+@@ -1256,7 +1256,10 @@ int ath9k_config(struct ieee80211_hw *hw
        }
  
        if (changed & IEEE80211_CONF_CHANGE_POWER) {
index ec8bbce..7c3c042 100644 (file)
@@ -1,6 +1,6 @@
 --- a/drivers/net/wireless/ath/ath9k/main.c
 +++ b/drivers/net/wireless/ath/ath9k/main.c
-@@ -1081,6 +1081,7 @@ static void ath9k_remove_interface(struc
+@@ -1080,6 +1080,7 @@ static void ath9k_remove_interface(struc
        ath9k_calculate_summary_state(hw, NULL);
  
        mutex_unlock(&sc->mutex);
@@ -8,7 +8,7 @@
        ath9k_ps_restore(sc);
  }
  
-@@ -1133,7 +1134,8 @@ int ath9k_config(struct ieee80211_hw *hw
+@@ -1132,7 +1133,8 @@ int ath9k_config(struct ieee80211_hw *hw
        mutex_lock(&sc->mutex);
  
        if (changed & IEEE80211_CONF_CHANGE_IDLE) {
index 638d3b5..b7d9f5e 100644 (file)
  }
 --- a/drivers/net/wireless/ath/ath9k/main.c
 +++ b/drivers/net/wireless/ath/ath9k/main.c
-@@ -470,6 +470,11 @@ irqreturn_t ath_isr(int irq, void *dev)
+@@ -469,6 +469,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 20fd408..3b75ab5 100644 (file)
  
 --- a/drivers/net/wireless/ath/ath9k/main.c
 +++ b/drivers/net/wireless/ath/ath9k/main.c
-@@ -769,7 +769,7 @@ static void ath9k_tx(struct ieee80211_hw
+@@ -768,7 +768,7 @@ static void ath9k_tx(struct ieee80211_hw
  
        return;
  exit: