All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] ath9k|ath9k_htc cleanups
@ 2014-02-26  9:03 Oleksij Rempel
  2014-02-26  9:03 ` [PATCH 1/3] ath9k: remove unused listen_interval and sleepduration Oleksij Rempel
  2014-02-26  9:03 ` [PATCH 2/3] ath9k_htc: remove unused variable sleepduration Oleksij Rempel
  0 siblings, 2 replies; 3+ messages in thread
From: Oleksij Rempel @ 2014-02-26  9:03 UTC (permalink / raw)
  To: linville, sujith, linux-wireless; +Cc: Oleksij Rempel

so trivial fixups.
listen_interval was remove in ath9k_htc for long time,
so it is ok to remove it in ath9k too.
sleepduration directly depends on listen_interval - remove it too.

Oleksij Rempel (3):
  ath9k: remove unused listen_interval and sleepduration.
  ath9k_htc: remove unused variable sleepduration
  ath9k_htc: add function ath9k_regwrite_multi

 drivers/net/wireless/ath/ath9k/ath9k.h          |  1 -
 drivers/net/wireless/ath/ath9k/beacon.c         | 21 ++++------
 drivers/net/wireless/ath/ath9k/htc_drv_beacon.c | 22 ++++------
 drivers/net/wireless/ath/ath9k/htc_drv_init.c   | 53 +++++++++++--------------
 4 files changed, 37 insertions(+), 60 deletions(-)

-- 
1.9.0


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH 1/3] ath9k: remove unused listen_interval and sleepduration.
  2014-02-26  9:03 [PATCH 0/3] ath9k|ath9k_htc cleanups Oleksij Rempel
@ 2014-02-26  9:03 ` Oleksij Rempel
  2014-02-26  9:03 ` [PATCH 2/3] ath9k_htc: remove unused variable sleepduration Oleksij Rempel
  1 sibling, 0 replies; 3+ messages in thread
From: Oleksij Rempel @ 2014-02-26  9:03 UTC (permalink / raw)
  To: linville, sujith, linux-wireless; +Cc: Oleksij Rempel

this variable never changed.

Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>
---
 drivers/net/wireless/ath/ath9k/ath9k.h  |  1 -
 drivers/net/wireless/ath/ath9k/beacon.c | 21 +++++++--------------
 2 files changed, 7 insertions(+), 15 deletions(-)

diff --git a/drivers/net/wireless/ath/ath9k/ath9k.h b/drivers/net/wireless/ath/ath9k/ath9k.h
index e703ddad..f995c37 100644
--- a/drivers/net/wireless/ath/ath9k/ath9k.h
+++ b/drivers/net/wireless/ath/ath9k/ath9k.h
@@ -410,7 +410,6 @@ void ath9k_calculate_iter_data(struct ieee80211_hw *hw,
 
 struct ath_beacon_config {
 	int beacon_interval;
-	u16 listen_interval;
 	u16 dtim_period;
 	u16 bmiss_timeout;
 	u8 dtim_count;
diff --git a/drivers/net/wireless/ath/ath9k/beacon.c b/drivers/net/wireless/ath/ath9k/beacon.c
index 6569528..02eb4f1 100644
--- a/drivers/net/wireless/ath/ath9k/beacon.c
+++ b/drivers/net/wireless/ath/ath9k/beacon.c
@@ -519,7 +519,7 @@ static void ath9k_beacon_config_sta(struct ath_softc *sc,
 	struct ath_hw *ah = sc->sc_ah;
 	struct ath_common *common = ath9k_hw_common(ah);
 	struct ath9k_beacon_state bs;
-	int dtim_intval, sleepduration;
+	int dtim_intval;
 	u32 nexttbtt = 0, intval;
 	u64 tsf;
 
@@ -538,7 +538,6 @@ static void ath9k_beacon_config_sta(struct ath_softc *sc,
 	 * last beacon we received (which may be none).
 	 */
 	dtim_intval = intval * conf->dtim_period;
-	sleepduration = conf->listen_interval * intval;
 
 	/*
 	 * Pull nexttbtt forward to reflect the current
@@ -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
 	 * result to at most 15 beacons.
 	 */
-	if (sleepduration > intval) {
-		bs.bs_bmissthreshold = conf->listen_interval *
-			ATH_DEFAULT_BMISS_LIMIT / 2;
-	} else {
-		bs.bs_bmissthreshold = DIV_ROUND_UP(conf->bmiss_timeout, intval);
-		if (bs.bs_bmissthreshold > 15)
-			bs.bs_bmissthreshold = 15;
-		else if (bs.bs_bmissthreshold <= 0)
-			bs.bs_bmissthreshold = 1;
-	}
+	bs.bs_bmissthreshold = DIV_ROUND_UP(conf->bmiss_timeout, intval);
+	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.
@@ -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),
-						 sleepduration));
+						 intval));
 	if (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,
 
 	cur_conf->beacon_interval = bss_conf->beacon_int;
 	cur_conf->dtim_period = bss_conf->dtim_period;
-	cur_conf->listen_interval = 1;
 	cur_conf->dtim_count = 1;
 	cur_conf->ibss_creator = bss_conf->ibss_creator;
 	cur_conf->bmiss_timeout =
-- 
1.9.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH 2/3] ath9k_htc: remove unused variable sleepduration
  2014-02-26  9:03 [PATCH 0/3] ath9k|ath9k_htc cleanups Oleksij Rempel
  2014-02-26  9:03 ` [PATCH 1/3] ath9k: remove unused listen_interval and sleepduration Oleksij Rempel
@ 2014-02-26  9:03 ` Oleksij Rempel
  1 sibling, 0 replies; 3+ messages in thread
From: Oleksij Rempel @ 2014-02-26  9:03 UTC (permalink / raw)
  To: linville, sujith, linux-wireless; +Cc: Oleksij Rempel

sleepduration is always = intval.

Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>
---
 drivers/net/wireless/ath/ath9k/htc_drv_beacon.c | 22 +++++++---------------
 1 file 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 8b57577..a00ddb9 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,
 	struct ath_common *common = ath9k_hw_common(priv->ah);
 	struct ath9k_beacon_state bs;
 	enum ath9k_int imask = 0;
-	int dtimperiod, dtimcount, sleepduration;
+	int dtimperiod, dtimcount;
 	int bmiss_timeout;
 	u32 nexttbtt = 0, intval, tsftu;
 	__be32 htc_imask = 0;
@@ -94,10 +94,6 @@ static void ath9k_htc_beacon_config_sta(struct ath9k_htc_priv *priv,
 	if (dtimcount >= dtimperiod)	/* NB: sanity check */
 		dtimcount = 0;
 
-	sleepduration = intval;
-	if (sleepduration <= 0)
-		sleepduration = intval;
-
 	/*
 	 * Pull nexttbtt forward to reflect the current
 	 * TSF and calculate dtim state for the result.
@@ -128,15 +124,11 @@ static void ath9k_htc_beacon_config_sta(struct ath9k_htc_priv *priv,
 	 * need calculate based	on the beacon interval.  Note that we clamp the
 	 * result to at most 15 beacons.
 	 */
-	if (sleepduration > intval) {
-		bs.bs_bmissthreshold = ATH_DEFAULT_BMISS_LIMIT / 2;
-	} else {
-		bs.bs_bmissthreshold = DIV_ROUND_UP(bmiss_timeout, intval);
-		if (bs.bs_bmissthreshold > 15)
-			bs.bs_bmissthreshold = 15;
-		else if (bs.bs_bmissthreshold <= 0)
-			bs.bs_bmissthreshold = 1;
-	}
+	bs.bs_bmissthreshold = DIV_ROUND_UP(bmiss_timeout, intval);
+	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.
@@ -148,7 +140,7 @@ static void ath9k_htc_beacon_config_sta(struct ath9k_htc_priv *priv,
 	 */
 
 	bs.bs_sleepduration = TU_TO_USEC(roundup(IEEE80211_MS_TO_TU(100),
-						 sleepduration));
+						 intval));
 	if (bs.bs_sleepduration > bs.bs_dtimperiod)
 		bs.bs_sleepduration = bs.bs_dtimperiod;
 
-- 
1.9.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-02-26  9:04 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-02-26  9:03 [PATCH 0/3] ath9k|ath9k_htc cleanups Oleksij Rempel
2014-02-26  9:03 ` [PATCH 1/3] ath9k: remove unused listen_interval and sleepduration Oleksij Rempel
2014-02-26  9:03 ` [PATCH 2/3] ath9k_htc: remove unused variable sleepduration Oleksij Rempel

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.