summaryrefslogtreecommitdiff
path: root/package/mac80211/patches/300-pending_work.patch
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2012-01-07 20:54:33 +0000
committerFelix Fietkau <nbd@openwrt.org>2012-01-07 20:54:33 +0000
commit2d17b67c28e8b1279b53c09881259cd819336fab (patch)
tree7619d7b9917d74c1eafa610fcb6a97910c122b90 /package/mac80211/patches/300-pending_work.patch
parent9727256330d73b85f0d0bc6fa46b482ae33194cd (diff)
downloadmtk-20170518-2d17b67c28e8b1279b53c09881259cd819336fab.zip
mtk-20170518-2d17b67c28e8b1279b53c09881259cd819336fab.tar.gz
mtk-20170518-2d17b67c28e8b1279b53c09881259cd819336fab.tar.bz2
ath9k: merge a channel change fix from linux-wireless
SVN-Revision: 29684
Diffstat (limited to 'package/mac80211/patches/300-pending_work.patch')
-rw-r--r--package/mac80211/patches/300-pending_work.patch38
1 files changed, 35 insertions, 3 deletions
diff --git a/package/mac80211/patches/300-pending_work.patch b/package/mac80211/patches/300-pending_work.patch
index 1b7f41b..eb09e03 100644
--- a/package/mac80211/patches/300-pending_work.patch
+++ b/package/mac80211/patches/300-pending_work.patch
@@ -348,7 +348,29 @@
}
/*
-@@ -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;
@@ -368,7 +390,7 @@
return 0;
}
-@@ -2331,9 +2281,6 @@ static void ath9k_flush(struct ieee80211
+@@ -2331,9 +2277,6 @@ static void ath9k_flush(struct ieee80211
return;
}
@@ -378,7 +400,7 @@
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)
@@ -1347,3 +1369,13 @@
__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)