aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath9k/main.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2012-01-12 15:10:00 -0500
committerDavid S. Miller <davem@davemloft.net>2012-01-12 15:10:00 -0500
commit9ee6045f09a7875ebe55b9942b232a19076b157b (patch)
tree4c3924d35d99d413a95205ac21da8d369063234b /drivers/net/wireless/ath/ath9k/main.c
parent3b09c84cb622ffbcdb5d541986b1eaf7d5812602 (diff)
parent1140afa862842ac3e56678693050760edc4ecde9 (diff)
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/main.c')
-rw-r--r--drivers/net/wireless/ath/ath9k/main.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c
index e267c92dbfb..4a00806e285 100644
--- a/drivers/net/wireless/ath/ath9k/main.c
+++ b/drivers/net/wireless/ath/ath9k/main.c
@@ -1629,7 +1629,6 @@ static int ath9k_config(struct ieee80211_hw *hw, u32 changed)
1629 1629
1630 if (changed & IEEE80211_CONF_CHANGE_CHANNEL) { 1630 if (changed & IEEE80211_CONF_CHANGE_CHANNEL) {
1631 struct ieee80211_channel *curchan = hw->conf.channel; 1631 struct ieee80211_channel *curchan = hw->conf.channel;
1632 struct ath9k_channel old_chan;
1633 int pos = curchan->hw_value; 1632 int pos = curchan->hw_value;
1634 int old_pos = -1; 1633 int old_pos = -1;
1635 unsigned long flags; 1634 unsigned long flags;
@@ -1654,11 +1653,8 @@ static int ath9k_config(struct ieee80211_hw *hw, u32 changed)
1654 * Preserve the current channel values, before updating 1653 * Preserve the current channel values, before updating
1655 * the same channel 1654 * the same channel
1656 */ 1655 */
1657 if (old_pos == pos) { 1656 if (ah->curchan && (old_pos == pos))
1658 memcpy(&old_chan, &sc->sc_ah->channels[pos], 1657 ath9k_hw_getnf(ah, ah->curchan);
1659 sizeof(struct ath9k_channel));
1660 ah->curchan = &old_chan;
1661 }
1662 1658
1663 ath9k_cmn_update_ichannel(&sc->sc_ah->channels[pos], 1659 ath9k_cmn_update_ichannel(&sc->sc_ah->channels[pos],
1664 curchan, conf->channel_type); 1660 curchan, conf->channel_type);