diff options
author | Oleksij Rempel <linux@rempel-privat.de> | 2014-02-26 04:03:44 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2014-02-28 14:33:25 -0500 |
commit | 527492eefcee253e33bbe79bcfef6bedf9935492 (patch) | |
tree | 501146d36994a706a9220d409b6b9bcc714ce87e | |
parent | 7fbdaa2a27583664ff700843269bc3ca14e4e1b5 (diff) |
ath9k_htc: remove unused variable sleepduration
sleepduration is always = intval.
Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r-- | drivers/net/wireless/ath/ath9k/htc_drv_beacon.c | 22 |
1 files changed, 7 insertions, 15 deletions
diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_beacon.c b/drivers/net/wireless/ath/ath9k/htc_drv_beacon.c index 8b5757734596..a00ddb9e737e 100644 --- a/drivers/net/wireless/ath/ath9k/htc_drv_beacon.c +++ b/drivers/net/wireless/ath/ath9k/htc_drv_beacon.c | |||
@@ -69,7 +69,7 @@ static void ath9k_htc_beacon_config_sta(struct ath9k_htc_priv *priv, | |||
69 | struct ath_common *common = ath9k_hw_common(priv->ah); | 69 | struct ath_common *common = ath9k_hw_common(priv->ah); |
70 | struct ath9k_beacon_state bs; | 70 | struct ath9k_beacon_state bs; |
71 | enum ath9k_int imask = 0; | 71 | enum ath9k_int imask = 0; |
72 | int dtimperiod, dtimcount, sleepduration; | 72 | int dtimperiod, dtimcount; |
73 | int bmiss_timeout; | 73 | int bmiss_timeout; |
74 | u32 nexttbtt = 0, intval, tsftu; | 74 | u32 nexttbtt = 0, intval, tsftu; |
75 | __be32 htc_imask = 0; | 75 | __be32 htc_imask = 0; |
@@ -94,10 +94,6 @@ static void ath9k_htc_beacon_config_sta(struct ath9k_htc_priv *priv, | |||
94 | if (dtimcount >= dtimperiod) /* NB: sanity check */ | 94 | if (dtimcount >= dtimperiod) /* NB: sanity check */ |
95 | dtimcount = 0; | 95 | dtimcount = 0; |
96 | 96 | ||
97 | sleepduration = intval; | ||
98 | if (sleepduration <= 0) | ||
99 | sleepduration = intval; | ||
100 | |||
101 | /* | 97 | /* |
102 | * Pull nexttbtt forward to reflect the current | 98 | * Pull nexttbtt forward to reflect the current |
103 | * TSF and calculate dtim state for the result. | 99 | * TSF and calculate dtim state for the result. |
@@ -128,15 +124,11 @@ static void ath9k_htc_beacon_config_sta(struct ath9k_htc_priv *priv, | |||
128 | * need calculate based on the beacon interval. Note that we clamp the | 124 | * need calculate based on the beacon interval. Note that we clamp the |
129 | * result to at most 15 beacons. | 125 | * result to at most 15 beacons. |
130 | */ | 126 | */ |
131 | if (sleepduration > intval) { | 127 | bs.bs_bmissthreshold = DIV_ROUND_UP(bmiss_timeout, intval); |
132 | bs.bs_bmissthreshold = ATH_DEFAULT_BMISS_LIMIT / 2; | 128 | if (bs.bs_bmissthreshold > 15) |
133 | } else { | 129 | bs.bs_bmissthreshold = 15; |
134 | bs.bs_bmissthreshold = DIV_ROUND_UP(bmiss_timeout, intval); | 130 | else if (bs.bs_bmissthreshold <= 0) |
135 | if (bs.bs_bmissthreshold > 15) | 131 | bs.bs_bmissthreshold = 1; |
136 | bs.bs_bmissthreshold = 15; | ||
137 | else if (bs.bs_bmissthreshold <= 0) | ||
138 | bs.bs_bmissthreshold = 1; | ||
139 | } | ||
140 | 132 | ||
141 | /* | 133 | /* |
142 | * Calculate sleep duration. The configuration is given in ms. | 134 | * Calculate sleep duration. The configuration is given in ms. |
@@ -148,7 +140,7 @@ static void ath9k_htc_beacon_config_sta(struct ath9k_htc_priv *priv, | |||
148 | */ | 140 | */ |
149 | 141 | ||
150 | bs.bs_sleepduration = TU_TO_USEC(roundup(IEEE80211_MS_TO_TU(100), | 142 | bs.bs_sleepduration = TU_TO_USEC(roundup(IEEE80211_MS_TO_TU(100), |
151 | sleepduration)); | 143 | intval)); |
152 | if (bs.bs_sleepduration > bs.bs_dtimperiod) | 144 | if (bs.bs_sleepduration > bs.bs_dtimperiod) |
153 | bs.bs_sleepduration = bs.bs_dtimperiod; | 145 | bs.bs_sleepduration = bs.bs_dtimperiod; |
154 | 146 | ||