diff options
author | Sujith Manoharan <c_manoha@qca.qualcomm.com> | 2012-07-17 07:45:43 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2012-07-17 15:11:38 -0400 |
commit | df35d29e171ef043976b339812276ff96d1f4c21 (patch) | |
tree | 48460c42dba09dbdd49b33317ab6cfc761b8cd76 /drivers/net/wireless/ath | |
parent | 60ca9f8744d29b8fdfd33d3dec8fc2cfc9ec381a (diff) |
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/ath')
-rw-r--r-- | drivers/net/wireless/ath/ath9k/main.c | 17 |
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, | |||
924 | 924 | ||
925 | if (iter_data.naps > 0) { | 925 | if (iter_data.naps > 0) { |
926 | ath9k_hw_set_tsfadjust(ah, true); | 926 | ath9k_hw_set_tsfadjust(ah, true); |
927 | set_bit(SC_OP_TSF_RESET, &sc->sc_flags); | ||
928 | ah->opmode = NL80211_IFTYPE_AP; | 927 | ah->opmode = NL80211_IFTYPE_AP; |
929 | } else { | 928 | } else { |
930 | ath9k_hw_set_tsfadjust(ah, false); | 929 | ath9k_hw_set_tsfadjust(ah, false); |
931 | clear_bit(SC_OP_TSF_RESET, &sc->sc_flags); | ||
932 | 930 | ||
933 | if (iter_data.nmeshes) | 931 | if (iter_data.nmeshes) |
934 | ah->opmode = NL80211_IFTYPE_MESH_POINT; | 932 | ah->opmode = NL80211_IFTYPE_MESH_POINT; |
@@ -940,25 +938,14 @@ static void ath9k_calculate_summary_state(struct ieee80211_hw *hw, | |||
940 | ah->opmode = NL80211_IFTYPE_STATION; | 938 | ah->opmode = NL80211_IFTYPE_STATION; |
941 | } | 939 | } |
942 | 940 | ||
941 | ath9k_hw_setopmode(ah); | ||
942 | |||
943 | if ((iter_data.nstations + iter_data.nadhocs + iter_data.nmeshes) > 0) | 943 | if ((iter_data.nstations + iter_data.nadhocs + iter_data.nmeshes) > 0) |
944 | ah->imask |= ATH9K_INT_TSFOOR; | 944 | ah->imask |= ATH9K_INT_TSFOOR; |
945 | else | 945 | else |
946 | ah->imask &= ~ATH9K_INT_TSFOOR; | 946 | ah->imask &= ~ATH9K_INT_TSFOOR; |
947 | 947 | ||
948 | ath9k_hw_set_interrupts(ah); | 948 | ath9k_hw_set_interrupts(ah); |
949 | |||
950 | if (iter_data.naps > 0) { | ||
951 | sc->sc_ah->stats.avgbrssi = ATH_RSSI_DUMMY_MARKER; | ||
952 | |||
953 | if (!common->disable_ani) { | ||
954 | set_bit(SC_OP_ANI_RUN, &sc->sc_flags); | ||
955 | ath_start_ani(common); | ||
956 | } | ||
957 | |||
958 | } else { | ||
959 | clear_bit(SC_OP_ANI_RUN, &sc->sc_flags); | ||
960 | del_timer_sync(&common->ani.timer); | ||
961 | } | ||
962 | } | 949 | } |
963 | 950 | ||
964 | static int ath9k_add_interface(struct ieee80211_hw *hw, | 951 | static int ath9k_add_interface(struct ieee80211_hw *hw, |