summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless
diff options
context:
space:
mode:
authorSujith Manoharan2012-07-17 13:45:43 +0200
committerJohn W. Linville2012-07-17 21:11:38 +0200
commitdf35d29e171ef043976b339812276ff96d1f4c21 (patch)
tree48460c42dba09dbdd49b33317ab6cfc761b8cd76 /drivers/net/wireless
parentath9k_hw: Cleanup ath9k_hw_set_tsfadjust (diff)
downloadkernel-qcow2-linux-df35d29e171ef043976b339812276ff96d1f4c21.tar.gz
kernel-qcow2-linux-df35d29e171ef043976b339812276ff96d1f4c21.tar.xz
kernel-qcow2-linux-df35d29e171ef043976b339812276ff96d1f4c21.zip
ath9k: Cleanup interface handling
* Do not set/clear TSF when adding/deleting an interface. This should be done when the BSS is set up and should also take into account the existence of other interfaces. * Set opmode explicitly. * ANI setup needs to be decided based on multiple interfaces. This can be done via the bss_info_changed() callback. Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r--drivers/net/wireless/ath/ath9k/main.c17
1 files changed, 2 insertions, 15 deletions
diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c
index 3ccab290abe4..c504f9e814e6 100644
--- a/drivers/net/wireless/ath/ath9k/main.c
+++ b/drivers/net/wireless/ath/ath9k/main.c
@@ -924,11 +924,9 @@ static void ath9k_calculate_summary_state(struct ieee80211_hw *hw,
if (iter_data.naps > 0) {
ath9k_hw_set_tsfadjust(ah, true);
- set_bit(SC_OP_TSF_RESET, &sc->sc_flags);
ah->opmode = NL80211_IFTYPE_AP;
} else {
ath9k_hw_set_tsfadjust(ah, false);
- clear_bit(SC_OP_TSF_RESET, &sc->sc_flags);
if (iter_data.nmeshes)
ah->opmode = NL80211_IFTYPE_MESH_POINT;
@@ -940,25 +938,14 @@ static void ath9k_calculate_summary_state(struct ieee80211_hw *hw,
ah->opmode = NL80211_IFTYPE_STATION;
}
+ ath9k_hw_setopmode(ah);
+
if ((iter_data.nstations + iter_data.nadhocs + iter_data.nmeshes) > 0)
ah->imask |= ATH9K_INT_TSFOOR;
else
ah->imask &= ~ATH9K_INT_TSFOOR;
ath9k_hw_set_interrupts(ah);
-
- if (iter_data.naps > 0) {
- sc->sc_ah->stats.avgbrssi = ATH_RSSI_DUMMY_MARKER;
-
- if (!common->disable_ani) {
- set_bit(SC_OP_ANI_RUN, &sc->sc_flags);
- ath_start_ani(common);
- }
-
- } else {
- clear_bit(SC_OP_ANI_RUN, &sc->sc_flags);
- del_timer_sync(&common->ani.timer);
- }
}
static int ath9k_add_interface(struct ieee80211_hw *hw,