Commit 60ca9f87 authored by Sujith Manoharan's avatar Sujith Manoharan Committed by John W. Linville

ath9k_hw: Cleanup ath9k_hw_set_tsfadjust

Signed-off-by: default avatarSujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 130ef6e9
...@@ -1111,7 +1111,7 @@ static int ath9k_htc_add_interface(struct ieee80211_hw *hw, ...@@ -1111,7 +1111,7 @@ static int ath9k_htc_add_interface(struct ieee80211_hw *hw,
if ((priv->ah->opmode == NL80211_IFTYPE_AP) && if ((priv->ah->opmode == NL80211_IFTYPE_AP) &&
!test_bit(OP_ANI_RUNNING, &priv->op_flags)) { !test_bit(OP_ANI_RUNNING, &priv->op_flags)) {
ath9k_hw_set_tsfadjust(priv->ah, 1); ath9k_hw_set_tsfadjust(priv->ah, true);
ath9k_htc_start_ani(priv); ath9k_htc_start_ani(priv);
} }
......
...@@ -2912,9 +2912,9 @@ void ath9k_hw_reset_tsf(struct ath_hw *ah) ...@@ -2912,9 +2912,9 @@ void ath9k_hw_reset_tsf(struct ath_hw *ah)
} }
EXPORT_SYMBOL(ath9k_hw_reset_tsf); EXPORT_SYMBOL(ath9k_hw_reset_tsf);
void ath9k_hw_set_tsfadjust(struct ath_hw *ah, u32 setting) void ath9k_hw_set_tsfadjust(struct ath_hw *ah, bool set)
{ {
if (setting) if (set)
ah->misc_mode |= AR_PCU_TX_ADD_TSF; ah->misc_mode |= AR_PCU_TX_ADD_TSF;
else else
ah->misc_mode &= ~AR_PCU_TX_ADD_TSF; ah->misc_mode &= ~AR_PCU_TX_ADD_TSF;
......
...@@ -994,7 +994,7 @@ u32 ath9k_hw_gettsf32(struct ath_hw *ah); ...@@ -994,7 +994,7 @@ u32 ath9k_hw_gettsf32(struct ath_hw *ah);
u64 ath9k_hw_gettsf64(struct ath_hw *ah); u64 ath9k_hw_gettsf64(struct ath_hw *ah);
void ath9k_hw_settsf64(struct ath_hw *ah, u64 tsf64); void ath9k_hw_settsf64(struct ath_hw *ah, u64 tsf64);
void ath9k_hw_reset_tsf(struct ath_hw *ah); void ath9k_hw_reset_tsf(struct ath_hw *ah);
void ath9k_hw_set_tsfadjust(struct ath_hw *ah, u32 setting); void ath9k_hw_set_tsfadjust(struct ath_hw *ah, bool set);
void ath9k_hw_init_global_settings(struct ath_hw *ah); void ath9k_hw_init_global_settings(struct ath_hw *ah);
u32 ar9003_get_pll_sqsum_dvc(struct ath_hw *ah); u32 ar9003_get_pll_sqsum_dvc(struct ath_hw *ah);
void ath9k_hw_set11nmac2040(struct ath_hw *ah); void ath9k_hw_set11nmac2040(struct ath_hw *ah);
......
...@@ -919,17 +919,15 @@ static void ath9k_calculate_summary_state(struct ieee80211_hw *hw, ...@@ -919,17 +919,15 @@ static void ath9k_calculate_summary_state(struct ieee80211_hw *hw,
ath9k_calculate_iter_data(hw, vif, &iter_data); ath9k_calculate_iter_data(hw, vif, &iter_data);
/* Set BSSID mask. */
memcpy(common->bssidmask, iter_data.mask, ETH_ALEN); memcpy(common->bssidmask, iter_data.mask, ETH_ALEN);
ath_hw_setbssidmask(common); ath_hw_setbssidmask(common);
/* Set op-mode & TSF */
if (iter_data.naps > 0) { if (iter_data.naps > 0) {
ath9k_hw_set_tsfadjust(ah, 1); ath9k_hw_set_tsfadjust(ah, true);
set_bit(SC_OP_TSF_RESET, &sc->sc_flags); set_bit(SC_OP_TSF_RESET, &sc->sc_flags);
ah->opmode = NL80211_IFTYPE_AP; ah->opmode = NL80211_IFTYPE_AP;
} else { } else {
ath9k_hw_set_tsfadjust(ah, 0); ath9k_hw_set_tsfadjust(ah, false);
clear_bit(SC_OP_TSF_RESET, &sc->sc_flags); clear_bit(SC_OP_TSF_RESET, &sc->sc_flags);
if (iter_data.nmeshes) if (iter_data.nmeshes)
...@@ -942,9 +940,6 @@ static void ath9k_calculate_summary_state(struct ieee80211_hw *hw, ...@@ -942,9 +940,6 @@ static void ath9k_calculate_summary_state(struct ieee80211_hw *hw,
ah->opmode = NL80211_IFTYPE_STATION; ah->opmode = NL80211_IFTYPE_STATION;
} }
/*
* Enable MIB interrupts when there are hardware phy counters.
*/
if ((iter_data.nstations + iter_data.nadhocs + iter_data.nmeshes) > 0) if ((iter_data.nstations + iter_data.nadhocs + iter_data.nmeshes) > 0)
ah->imask |= ATH9K_INT_TSFOOR; ah->imask |= ATH9K_INT_TSFOOR;
else else
...@@ -952,7 +947,6 @@ static void ath9k_calculate_summary_state(struct ieee80211_hw *hw, ...@@ -952,7 +947,6 @@ static void ath9k_calculate_summary_state(struct ieee80211_hw *hw,
ath9k_hw_set_interrupts(ah); ath9k_hw_set_interrupts(ah);
/* Set up ANI */
if (iter_data.naps > 0) { if (iter_data.naps > 0) {
sc->sc_ah->stats.avgbrssi = ATH_RSSI_DUMMY_MARKER; sc->sc_ah->stats.avgbrssi = ATH_RSSI_DUMMY_MARKER;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment