Commit 7fbdaa2a authored by Oleksij Rempel's avatar Oleksij Rempel Committed by John W. Linville

ath9k: remove unused listen_interval and sleepduration.

this variable never changed.
Signed-off-by: default avatarOleksij Rempel <linux@rempel-privat.de>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 8acbea61
...@@ -410,7 +410,6 @@ void ath9k_calculate_iter_data(struct ieee80211_hw *hw, ...@@ -410,7 +410,6 @@ void ath9k_calculate_iter_data(struct ieee80211_hw *hw,
struct ath_beacon_config { struct ath_beacon_config {
int beacon_interval; int beacon_interval;
u16 listen_interval;
u16 dtim_period; u16 dtim_period;
u16 bmiss_timeout; u16 bmiss_timeout;
u8 dtim_count; u8 dtim_count;
......
...@@ -519,7 +519,7 @@ static void ath9k_beacon_config_sta(struct ath_softc *sc, ...@@ -519,7 +519,7 @@ static void ath9k_beacon_config_sta(struct ath_softc *sc,
struct ath_hw *ah = sc->sc_ah; struct ath_hw *ah = sc->sc_ah;
struct ath_common *common = ath9k_hw_common(ah); struct ath_common *common = ath9k_hw_common(ah);
struct ath9k_beacon_state bs; struct ath9k_beacon_state bs;
int dtim_intval, sleepduration; int dtim_intval;
u32 nexttbtt = 0, intval; u32 nexttbtt = 0, intval;
u64 tsf; u64 tsf;
...@@ -538,7 +538,6 @@ static void ath9k_beacon_config_sta(struct ath_softc *sc, ...@@ -538,7 +538,6 @@ static void ath9k_beacon_config_sta(struct ath_softc *sc,
* last beacon we received (which may be none). * last beacon we received (which may be none).
*/ */
dtim_intval = intval * conf->dtim_period; dtim_intval = intval * conf->dtim_period;
sleepduration = conf->listen_interval * intval;
/* /*
* Pull nexttbtt forward to reflect the current * Pull nexttbtt forward to reflect the current
...@@ -560,16 +559,11 @@ static void ath9k_beacon_config_sta(struct ath_softc *sc, ...@@ -560,16 +559,11 @@ static void ath9k_beacon_config_sta(struct ath_softc *sc,
* need calculate based on the beacon interval. Note that we clamp the * need calculate based on the beacon interval. Note that we clamp the
* result to at most 15 beacons. * result to at most 15 beacons.
*/ */
if (sleepduration > intval) { bs.bs_bmissthreshold = DIV_ROUND_UP(conf->bmiss_timeout, intval);
bs.bs_bmissthreshold = conf->listen_interval * if (bs.bs_bmissthreshold > 15)
ATH_DEFAULT_BMISS_LIMIT / 2; bs.bs_bmissthreshold = 15;
} else { else if (bs.bs_bmissthreshold <= 0)
bs.bs_bmissthreshold = DIV_ROUND_UP(conf->bmiss_timeout, intval); bs.bs_bmissthreshold = 1;
if (bs.bs_bmissthreshold > 15)
bs.bs_bmissthreshold = 15;
else if (bs.bs_bmissthreshold <= 0)
bs.bs_bmissthreshold = 1;
}
/* /*
* Calculate sleep duration. The configuration is given in ms. * Calculate sleep duration. The configuration is given in ms.
...@@ -581,7 +575,7 @@ static void ath9k_beacon_config_sta(struct ath_softc *sc, ...@@ -581,7 +575,7 @@ static void ath9k_beacon_config_sta(struct ath_softc *sc,
*/ */
bs.bs_sleepduration = TU_TO_USEC(roundup(IEEE80211_MS_TO_TU(100), bs.bs_sleepduration = TU_TO_USEC(roundup(IEEE80211_MS_TO_TU(100),
sleepduration)); intval));
if (bs.bs_sleepduration > bs.bs_dtimperiod) if (bs.bs_sleepduration > bs.bs_dtimperiod)
bs.bs_sleepduration = bs.bs_dtimperiod; bs.bs_sleepduration = bs.bs_dtimperiod;
...@@ -677,7 +671,6 @@ static void ath9k_cache_beacon_config(struct ath_softc *sc, ...@@ -677,7 +671,6 @@ static void ath9k_cache_beacon_config(struct ath_softc *sc,
cur_conf->beacon_interval = bss_conf->beacon_int; cur_conf->beacon_interval = bss_conf->beacon_int;
cur_conf->dtim_period = bss_conf->dtim_period; cur_conf->dtim_period = bss_conf->dtim_period;
cur_conf->listen_interval = 1;
cur_conf->dtim_count = 1; cur_conf->dtim_count = 1;
cur_conf->ibss_creator = bss_conf->ibss_creator; cur_conf->ibss_creator = bss_conf->ibss_creator;
cur_conf->bmiss_timeout = cur_conf->bmiss_timeout =
......
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