diff options
author | Sujith Manoharan <c_manoha@qca.qualcomm.com> | 2012-07-17 07:45:37 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2012-07-17 15:11:38 -0400 |
commit | 60ca9f8744d29b8fdfd33d3dec8fc2cfc9ec381a (patch) | |
tree | 0e9d827e1fd748b99bd9d88b246fdaa1b44edc66 /drivers/net/wireless/ath | |
parent | 130ef6e9dc76f821caf98fa9ed6e2dafe15f3b1f (diff) |
ath9k_hw: Cleanup ath9k_hw_set_tsfadjust
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/htc_drv_main.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/hw.c | 4 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/hw.h | 2 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/main.c | 10 |
4 files changed, 6 insertions, 12 deletions
diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_main.c b/drivers/net/wireless/ath/ath9k/htc_drv_main.c index fe2bfff6cde7..c785129692ff 100644 --- a/drivers/net/wireless/ath/ath9k/htc_drv_main.c +++ b/drivers/net/wireless/ath/ath9k/htc_drv_main.c | |||
@@ -1111,7 +1111,7 @@ static int ath9k_htc_add_interface(struct ieee80211_hw *hw, | |||
1111 | 1111 | ||
1112 | if ((priv->ah->opmode == NL80211_IFTYPE_AP) && | 1112 | if ((priv->ah->opmode == NL80211_IFTYPE_AP) && |
1113 | !test_bit(OP_ANI_RUNNING, &priv->op_flags)) { | 1113 | !test_bit(OP_ANI_RUNNING, &priv->op_flags)) { |
1114 | ath9k_hw_set_tsfadjust(priv->ah, 1); | 1114 | ath9k_hw_set_tsfadjust(priv->ah, true); |
1115 | ath9k_htc_start_ani(priv); | 1115 | ath9k_htc_start_ani(priv); |
1116 | } | 1116 | } |
1117 | 1117 | ||
diff --git a/drivers/net/wireless/ath/ath9k/hw.c b/drivers/net/wireless/ath/ath9k/hw.c index ddb24bfc2737..cfa91ab7acf8 100644 --- a/drivers/net/wireless/ath/ath9k/hw.c +++ b/drivers/net/wireless/ath/ath9k/hw.c | |||
@@ -2912,9 +2912,9 @@ void ath9k_hw_reset_tsf(struct ath_hw *ah) | |||
2912 | } | 2912 | } |
2913 | EXPORT_SYMBOL(ath9k_hw_reset_tsf); | 2913 | EXPORT_SYMBOL(ath9k_hw_reset_tsf); |
2914 | 2914 | ||
2915 | void ath9k_hw_set_tsfadjust(struct ath_hw *ah, u32 setting) | 2915 | void ath9k_hw_set_tsfadjust(struct ath_hw *ah, bool set) |
2916 | { | 2916 | { |
2917 | if (setting) | 2917 | if (set) |
2918 | ah->misc_mode |= AR_PCU_TX_ADD_TSF; | 2918 | ah->misc_mode |= AR_PCU_TX_ADD_TSF; |
2919 | else | 2919 | else |
2920 | ah->misc_mode &= ~AR_PCU_TX_ADD_TSF; | 2920 | ah->misc_mode &= ~AR_PCU_TX_ADD_TSF; |
diff --git a/drivers/net/wireless/ath/ath9k/hw.h b/drivers/net/wireless/ath/ath9k/hw.h index 7b15ff6f4b0b..dd0c146d81dc 100644 --- a/drivers/net/wireless/ath/ath9k/hw.h +++ b/drivers/net/wireless/ath/ath9k/hw.h | |||
@@ -994,7 +994,7 @@ u32 ath9k_hw_gettsf32(struct ath_hw *ah); | |||
994 | u64 ath9k_hw_gettsf64(struct ath_hw *ah); | 994 | u64 ath9k_hw_gettsf64(struct ath_hw *ah); |
995 | void ath9k_hw_settsf64(struct ath_hw *ah, u64 tsf64); | 995 | void ath9k_hw_settsf64(struct ath_hw *ah, u64 tsf64); |
996 | void ath9k_hw_reset_tsf(struct ath_hw *ah); | 996 | void ath9k_hw_reset_tsf(struct ath_hw *ah); |
997 | void ath9k_hw_set_tsfadjust(struct ath_hw *ah, u32 setting); | 997 | void ath9k_hw_set_tsfadjust(struct ath_hw *ah, bool set); |
998 | void ath9k_hw_init_global_settings(struct ath_hw *ah); | 998 | void ath9k_hw_init_global_settings(struct ath_hw *ah); |
999 | u32 ar9003_get_pll_sqsum_dvc(struct ath_hw *ah); | 999 | u32 ar9003_get_pll_sqsum_dvc(struct ath_hw *ah); |
1000 | void ath9k_hw_set11nmac2040(struct ath_hw *ah); | 1000 | void ath9k_hw_set11nmac2040(struct ath_hw *ah); |
diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c index f7d92e0ba4dd..3ccab290abe4 100644 --- a/drivers/net/wireless/ath/ath9k/main.c +++ b/drivers/net/wireless/ath/ath9k/main.c | |||
@@ -919,17 +919,15 @@ static void ath9k_calculate_summary_state(struct ieee80211_hw *hw, | |||
919 | 919 | ||
920 | ath9k_calculate_iter_data(hw, vif, &iter_data); | 920 | ath9k_calculate_iter_data(hw, vif, &iter_data); |
921 | 921 | ||
922 | /* Set BSSID mask. */ | ||
923 | memcpy(common->bssidmask, iter_data.mask, ETH_ALEN); | 922 | memcpy(common->bssidmask, iter_data.mask, ETH_ALEN); |
924 | ath_hw_setbssidmask(common); | 923 | ath_hw_setbssidmask(common); |
925 | 924 | ||
926 | /* Set op-mode & TSF */ | ||
927 | if (iter_data.naps > 0) { | 925 | if (iter_data.naps > 0) { |
928 | ath9k_hw_set_tsfadjust(ah, 1); | 926 | ath9k_hw_set_tsfadjust(ah, true); |
929 | set_bit(SC_OP_TSF_RESET, &sc->sc_flags); | 927 | set_bit(SC_OP_TSF_RESET, &sc->sc_flags); |
930 | ah->opmode = NL80211_IFTYPE_AP; | 928 | ah->opmode = NL80211_IFTYPE_AP; |
931 | } else { | 929 | } else { |
932 | ath9k_hw_set_tsfadjust(ah, 0); | 930 | ath9k_hw_set_tsfadjust(ah, false); |
933 | clear_bit(SC_OP_TSF_RESET, &sc->sc_flags); | 931 | clear_bit(SC_OP_TSF_RESET, &sc->sc_flags); |
934 | 932 | ||
935 | if (iter_data.nmeshes) | 933 | if (iter_data.nmeshes) |
@@ -942,9 +940,6 @@ static void ath9k_calculate_summary_state(struct ieee80211_hw *hw, | |||
942 | ah->opmode = NL80211_IFTYPE_STATION; | 940 | ah->opmode = NL80211_IFTYPE_STATION; |
943 | } | 941 | } |
944 | 942 | ||
945 | /* | ||
946 | * Enable MIB interrupts when there are hardware phy counters. | ||
947 | */ | ||
948 | if ((iter_data.nstations + iter_data.nadhocs + iter_data.nmeshes) > 0) | 943 | if ((iter_data.nstations + iter_data.nadhocs + iter_data.nmeshes) > 0) |
949 | ah->imask |= ATH9K_INT_TSFOOR; | 944 | ah->imask |= ATH9K_INT_TSFOOR; |
950 | else | 945 | else |
@@ -952,7 +947,6 @@ static void ath9k_calculate_summary_state(struct ieee80211_hw *hw, | |||
952 | 947 | ||
953 | ath9k_hw_set_interrupts(ah); | 948 | ath9k_hw_set_interrupts(ah); |
954 | 949 | ||
955 | /* Set up ANI */ | ||
956 | if (iter_data.naps > 0) { | 950 | if (iter_data.naps > 0) { |
957 | sc->sc_ah->stats.avgbrssi = ATH_RSSI_DUMMY_MARKER; | 951 | sc->sc_ah->stats.avgbrssi = ATH_RSSI_DUMMY_MARKER; |
958 | 952 | ||