diff mbox

[ath9k-devel] Script to crash ath9k with DMA errors.

Message ID 4CF8A6DE.4020804@candelatech.com (mailing list archive)
State Not Applicable, archived
Headers show

Commit Message

Ben Greear Dec. 3, 2010, 8:14 a.m. UTC
None
diff mbox

Patch

diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c
index f026a03..46b1791 100644
--- a/drivers/net/wireless/ath/ath9k/main.c
+++ b/drivers/net/wireless/ath/ath9k/main.c
@@ -1605,6 +1605,16 @@  static int ath9k_config(struct ieee80211_hw *hw, u32 changed)
                 else
                         sc->sc_flags &= ~SC_OP_OFFCHANNEL;

+               /* If channels & HT are the same, then don't actually do anything.
+                */
+               if ((sc->sc_ah->curchan == &sc->sc_ah->channels[pos]) &&
+                   (aphy->chan_is_ht == conf_is_ht(conf))) {
+                       ath_print(common, ATH_DBG_CONFIG,
+                                 "Skip Set channel: %d MHz, already there.\n",
+                                 curchan->center_freq);
+                       goto skip_chan_change;
+               }
+
                 if (aphy->state == ATH_WIPHY_SCAN ||
                     aphy->state == ATH_WIPHY_ACTIVE)
                         ath9k_wiphy_pause_all_forced(sc, aphy);