ath9k: merge a channel change fix from linux-wireless
[openwrt.git] / package / mac80211 / patches / 300-pending_work.patch
index 1b7f41b..eb09e03 100644 (file)
        }
  
        /*
-@@ -1752,18 +1708,12 @@ static int ath9k_config(struct ieee80211
+@@ -1678,7 +1634,6 @@ static int ath9k_config(struct ieee80211
+       if (changed & IEEE80211_CONF_CHANGE_CHANNEL) {
+               struct ieee80211_channel *curchan = hw->conf.channel;
+-              struct ath9k_channel old_chan;
+               int pos = curchan->hw_value;
+               int old_pos = -1;
+               unsigned long flags;
+@@ -1704,11 +1659,8 @@ static int ath9k_config(struct ieee80211
+                * Preserve the current channel values, before updating
+                * the same channel
+                */
+-              if (old_pos == pos) {
+-                      memcpy(&old_chan, &sc->sc_ah->channels[pos],
+-                              sizeof(struct ath9k_channel));
+-                      ah->curchan = &old_chan;
+-              }
++              if (ah->curchan && (old_pos == pos))
++                      ath9k_hw_getnf(ah, ah->curchan);
+               ath9k_cmn_update_ichannel(&sc->sc_ah->channels[pos],
+                                         curchan, conf->channel_type);
+@@ -1752,18 +1704,12 @@ static int ath9k_config(struct ieee80211
                ath_dbg(common, ATH_DBG_CONFIG,
                        "Set power: %d\n", conf->power_level);
                sc->config.txpowlimit = 2 * conf->power_level;
  
        return 0;
  }
-@@ -2331,9 +2281,6 @@ static void ath9k_flush(struct ieee80211
+@@ -2331,9 +2277,6 @@ static void ath9k_flush(struct ieee80211
                return;
        }
  
        for (j = 0; j < timeout; j++) {
                bool npend = false;
  
-@@ -2351,21 +2298,22 @@ static void ath9k_flush(struct ieee80211
+@@ -2351,21 +2294,22 @@ static void ath9k_flush(struct ieee80211
                }
  
                if (!npend)
        __sta_info_free(local, sta);
  
        return 0;
+--- a/drivers/net/wireless/ath/ath9k/calib.c
++++ b/drivers/net/wireless/ath/ath9k/calib.c
+@@ -402,6 +402,7 @@ bool ath9k_hw_getnf(struct ath_hw *ah, s
+       ah->noise = ath9k_hw_getchan_noise(ah, chan);
+       return true;
+ }
++EXPORT_SYMBOL(ath9k_hw_getnf);
+ void ath9k_init_nfcal_hist_buffer(struct ath_hw *ah,
+                                 struct ath9k_channel *chan)
This page took 0.027029 seconds and 4 git commands to generate.