diff options
author | Reinette Chatre <reinette.chatre@intel.com> | 2010-06-25 17:47:02 -0400 |
---|---|---|
committer | Reinette Chatre <reinette.chatre@intel.com> | 2010-06-25 17:47:02 -0400 |
commit | e691e19e05c2cef72cd7f81bcae4195c81d4bf51 (patch) | |
tree | e5a231ecfb36f4fa335b64f1300ce9f831678eee /drivers/net/wireless/ath/ath9k/main.c | |
parent | 47399f1a7d2059c89df7a1116024d0cd9bc240fa (diff) | |
parent | 062bee448bd539580ef9f64efe50fdfe04eeb103 (diff) |
Merge branch 'wireless-2.6' into wireless-next-2.6
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/main.c')
-rw-r--r-- | drivers/net/wireless/ath/ath9k/main.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c index 87356fc6f4c..efbf53534ad 100644 --- a/drivers/net/wireless/ath/ath9k/main.c +++ b/drivers/net/wireless/ath/ath9k/main.c | |||
@@ -452,6 +452,10 @@ static void ath_start_ani(struct ath_common *common) | |||
452 | { | 452 | { |
453 | struct ath_hw *ah = common->ah; | 453 | struct ath_hw *ah = common->ah; |
454 | unsigned long timestamp = jiffies_to_msecs(jiffies); | 454 | unsigned long timestamp = jiffies_to_msecs(jiffies); |
455 | struct ath_softc *sc = (struct ath_softc *) common->priv; | ||
456 | |||
457 | if (!(sc->sc_flags & SC_OP_ANI_RUN)) | ||
458 | return; | ||
455 | 459 | ||
456 | common->ani.longcal_timer = timestamp; | 460 | common->ani.longcal_timer = timestamp; |
457 | common->ani.shortcal_timer = timestamp; | 461 | common->ani.shortcal_timer = timestamp; |
@@ -767,11 +771,13 @@ static void ath9k_bss_assoc_info(struct ath_softc *sc, | |||
767 | /* Reset rssi stats */ | 771 | /* Reset rssi stats */ |
768 | sc->sc_ah->stats.avgbrssi = ATH_RSSI_DUMMY_MARKER; | 772 | sc->sc_ah->stats.avgbrssi = ATH_RSSI_DUMMY_MARKER; |
769 | 773 | ||
774 | sc->sc_flags |= SC_OP_ANI_RUN; | ||
770 | ath_start_ani(common); | 775 | ath_start_ani(common); |
771 | } else { | 776 | } else { |
772 | ath_print(common, ATH_DBG_CONFIG, "Bss Info DISASSOC\n"); | 777 | ath_print(common, ATH_DBG_CONFIG, "Bss Info DISASSOC\n"); |
773 | common->curaid = 0; | 778 | common->curaid = 0; |
774 | /* Stop ANI */ | 779 | /* Stop ANI */ |
780 | sc->sc_flags &= ~SC_OP_ANI_RUN; | ||
775 | del_timer_sync(&common->ani.timer); | 781 | del_timer_sync(&common->ani.timer); |
776 | } | 782 | } |
777 | } | 783 | } |
@@ -1377,8 +1383,10 @@ static int ath9k_add_interface(struct ieee80211_hw *hw, | |||
1377 | 1383 | ||
1378 | if (vif->type == NL80211_IFTYPE_AP || | 1384 | if (vif->type == NL80211_IFTYPE_AP || |
1379 | vif->type == NL80211_IFTYPE_ADHOC || | 1385 | vif->type == NL80211_IFTYPE_ADHOC || |
1380 | vif->type == NL80211_IFTYPE_MONITOR) | 1386 | vif->type == NL80211_IFTYPE_MONITOR) { |
1387 | sc->sc_flags |= SC_OP_ANI_RUN; | ||
1381 | ath_start_ani(common); | 1388 | ath_start_ani(common); |
1389 | } | ||
1382 | 1390 | ||
1383 | out: | 1391 | out: |
1384 | mutex_unlock(&sc->mutex); | 1392 | mutex_unlock(&sc->mutex); |
@@ -1399,6 +1407,7 @@ static void ath9k_remove_interface(struct ieee80211_hw *hw, | |||
1399 | mutex_lock(&sc->mutex); | 1407 | mutex_lock(&sc->mutex); |
1400 | 1408 | ||
1401 | /* Stop ANI */ | 1409 | /* Stop ANI */ |
1410 | sc->sc_flags &= ~SC_OP_ANI_RUN; | ||
1402 | del_timer_sync(&common->ani.timer); | 1411 | del_timer_sync(&common->ani.timer); |
1403 | 1412 | ||
1404 | /* Reclaim beacon resources */ | 1413 | /* Reclaim beacon resources */ |