Skip to contentSkip to conversation

ath9k_hw: remove enable_32kHz_clock

PATCH In review Felix Fietkau 2 participants 5 messages Apr 12, 2012 – Apr 13, 2012 Qualcomm Atheros ATH9K wireless driver

lore
Share & tools
lore
#0 lore raw

PATCH 1/4 ath9k_hw: remove enable_32kHz_clock

It is unused and useless

---
 drivers/net/wireless/ath/ath9k/hw.c |    1 -
 drivers/net/wireless/ath/ath9k/hw.h |    5 -----
 2 files changed, 0 insertions(+), 6 deletions(-)
drivers/net/wireless/ath/ath9k/hw.c +0 -1
index d1345a8..6fa8128 100644
@@ -445,7 +445,6 @@ static void ath9k_hw_init_defaults(struct ath_hw *ah)
 		AR_STA_ID1_MCAST_KSRCH;
 	if (AR_SREV_9100(ah))
 		ah->sta_id1_defaults |= AR_STA_ID1_AR9100_BA_FIX;
-	ah->enable_32kHz_clock = DONT_USE_32KHZ;
 	ah->slottime = ATH9K_SLOT_TIME_9;
 	ah->globaltxtimeout = (u32) -1;
 	ah->power_mode = ATH9K_PM_UNDEFINED;
drivers/net/wireless/ath/ath9k/hw.h +0 -5
index aa1680a..d85a8de 100644
@@ -762,11 +762,6 @@ struct ath_hw {
 
 	u32 sta_id1_defaults;
 	u32 misc_mode;
-	enum {
-		AUTO_32KHZ,
-		USE_32KHZ,
-		DONT_USE_32KHZ,
-	} enable_32kHz_clock;
 
 	/* Private to hardware code */
 	struct ath_hw_private_ops private_ops;
Signature · 1 line
1.7.3.2
#1 lore raw

PATCH 2/4 ath9k_hw: add support for 8 AP mode interfaces

Also tweak beacon response times for better stability with the shorter timer intervals.

---
 drivers/net/wireless/ath/ath9k/ath9k.h |    2 +-
 drivers/net/wireless/ath/ath9k/hw.c    |    4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)
drivers/net/wireless/ath/ath9k/ath9k.h +1 -1
index 0792d87..52142fa 100644
@@ -369,7 +369,7 @@ struct ath_vif {
  * number of beacon intervals, the game's up.
  */
 #define BSTUCK_THRESH           	9
-#define	ATH_BCBUF               	4
+#define	ATH_BCBUF               	8
 #define ATH_DEFAULT_BINTVAL     	100 /* TU */
 #define ATH_DEFAULT_BMISS_LIMIT 	10
 #define IEEE80211_MS_TO_TU(x)           (((x) * 1000) / 1024)
drivers/net/wireless/ath/ath9k/hw.c +2 -2
index 6fa8128..373cef6 100644
@@ -388,8 +388,8 @@ static void ath9k_hw_init_config(struct ath_hw *ah)
 {
 	int i;
 
-	ah->config.dma_beacon_response_time = 2;
-	ah->config.sw_beacon_response_time = 10;
+	ah->config.dma_beacon_response_time = 1;
+	ah->config.sw_beacon_response_time = 6;
 	ah->config.additional_swba_backoff = 0;
 	ah->config.ack_6mb = 0x0;
 	ah->config.cwm_ignore_extcca = 0;
Signature · 1 line
1.7.3.2
#2 lore raw

PATCH 3/4 ath9k: do not register LEDs on AR913x

LED support is typically handled via system GPIO on these platforms.

---
 drivers/net/wireless/ath/ath9k/gpio.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
drivers/net/wireless/ath/ath9k/gpio.c +3 -0
index fbe23de..dd10f4a 100644
@@ -41,6 +41,9 @@ void ath_init_leds(struct ath_softc *sc)
 {
 	int ret;
 
+	if (AR_SREV_9100(sc->sc_ah))
+		return;
+
 	if (sc->sc_ah->led_pin < 0) {
 		if (AR_SREV_9287(sc->sc_ah))
 			sc->sc_ah->led_pin = ATH_LED_PIN_9287;
Signature · 1 line
1.7.3.2
#3 lore raw

PATCH 4/4 ath9k: optimize the hardware hang check

Since it's only called when beacons are stuck, move it to the SWBA handler tasklet, to avoid doing redundant checks on every single interrupt.

---
 drivers/net/wireless/ath/ath9k/beacon.c |    3 +++
 drivers/net/wireless/ath/ath9k/main.c   |   11 -----------
 2 files changed, 3 insertions(+), 11 deletions(-)
drivers/net/wireless/ath/ath9k/beacon.c +3 -0
index 6264182..df5b6ac 100644
@@ -369,6 +369,9 @@ void ath_beacon_tasklet(unsigned long data)
 	if (ath9k_hw_numtxpending(ah, sc->beacon.beaconq) != 0) {
 		sc->beacon.bmisscnt++;
 
+		if (!ath9k_hw_check_alive(ah))
+			ieee80211_queue_work(sc->hw, &sc->hw_check_work);
+
 		if (sc->beacon.bmisscnt < BSTUCK_THRESH * sc->nbcnvifs) {
 			ath_dbg(common, BSTUCK,
 				"missed %u consecutive beacons\n",
drivers/net/wireless/ath/ath9k/main.c +0 -11
index fcb13e3..95dc62e 100644
@@ -692,17 +692,6 @@ void ath9k_tasklet(unsigned long data)
 		goto out;
 	}
 
-	/*
-	 * Only run the baseband hang check if beacons stop working in AP or
-	 * IBSS mode, because it has a high false positive rate. For station
-	 * mode it should not be necessary, since the upper layers will detect
-	 * this through a beacon miss automatically and the following channel
-	 * change will trigger a hardware reset anyway
-	 */
-	if (ath9k_hw_numtxpending(ah, sc->beacon.beaconq) != 0 &&
-	    !ath9k_hw_check_alive(ah))
-		ieee80211_queue_work(sc->hw, &sc->hw_check_work);
-
 	if ((status & ATH9K_INT_TSFOOR) && sc->ps_enabled) {
 		/*
 		 * TSF sync does not look correct; remain awake to sync with
Signature · 1 line
1.7.3.2
#4 lore raw
In reply to Felix Fietkau
Quoted 26 lines · Felix Fietkau

It is unused and useless

---
 drivers/net/wireless/ath/ath9k/hw.c |    1 -
 drivers/net/wireless/ath/ath9k/hw.h |    5 -----
 2 files changed, 0 insertions(+), 6 deletions(-)
drivers/net/wireless/ath/ath9k/hw.c +0 -1
index d1345a8..6fa8128 100644
@@ -445,7 +445,6 @@ static void ath9k_hw_init_defaults(struct ath_hw *ah)
 		AR_STA_ID1_MCAST_KSRCH;
 	if (AR_SREV_9100(ah))
 		ah->sta_id1_defaults |= AR_STA_ID1_AR9100_BA_FIX;
-	ah->enable_32kHz_clock = DONT_USE_32KHZ;
 	ah->slottime = ATH9K_SLOT_TIME_9;
 	ah->globaltxtimeout = (u32) -1;
 	ah->power_mode = ATH9K_PM_UNDEFINED;
drivers/net/wireless/ath/ath9k/hw.h +0 -0
index aa1680a..d85a8de 100644
@@ -762,11 +762,6 @@ struct ath_hw {
 

drivers/net/wireless/ath/ath9k/hw.h struct ath_hw { · line 767

Quoted 10 lines
drivers/net/wireless/ath/ath9k/hw.h +0 -5
 	u32 sta_id1_defaults;
 	u32 misc_mode;
-	enum {
-		AUTO_32KHZ,
-		USE_32KHZ,
-		DONT_USE_32KHZ,
-	} enable_32kHz_clock;
 
 	/* Private to hardware code */
 	struct ath_hw_private_ops private_ops;

Hi Felix,

that went already in as part of '[PATCH] ath9k: remove dead code' some days ago [1].

Cheers, Zefir

[1] http://article.gmane.org/gmane.linux.kernel.wireless.general/88559