Skip to contentSkip to conversation

ath9k: Move generic hw timer intr handler to bottom-half

PATCH New Vasanthakumar Thiagarajan 1 participant 2 messages Sep 1, 2009 Qualcomm Atheros ATH9K wireless driver

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 ath9k: Move generic hw timer intr handler to bottom-half

There is no point handling this in hard irq, move it to tasklet.

---
 drivers/net/wireless/ath/ath9k/main.c |   11 ++++++-----
 1 files changed, 6 insertions(+), 5 deletions(-)
drivers/net/wireless/ath/ath9k/main.c +6 -5
index 4fae699..efee193 100644
@@ -506,6 +506,10 @@ static void ath9k_tasklet(unsigned long data)
 		sc->sc_flags |= SC_OP_WAIT_FOR_BEACON | SC_OP_BEACON_SYNC;
 	}
 
+	if (sc->btcoex_info.btcoex_scheme == ATH_BTCOEX_CFG_3WIRE)
+		if (status & ATH9K_INT_GENTIMER)
+			ath_gen_timer_isr(sc->sc_ah);
+
 	/* re-enable hardware interrupt */
 	ath9k_hw_set_interrupts(sc->sc_ah, sc->imask);
 	ath9k_ps_restore(sc);
@@ -521,7 +525,8 @@ irqreturn_t ath_isr(int irq, void *dev)
 		ATH9K_INT_TX |			\
 		ATH9K_INT_BMISS |		\
 		ATH9K_INT_CST |			\
-		ATH9K_INT_TSFOOR)
+		ATH9K_INT_TSFOOR |		\
+		ATH9K_INT_GENTIMER)
 
 	struct ath_softc *sc = dev;
 	struct ath_hw *ah = sc->sc_ah;
@@ -602,10 +607,6 @@ irqreturn_t ath_isr(int irq, void *dev)
 			sc->sc_flags |= SC_OP_WAIT_FOR_BEACON;
 		}
 
-	if (sc->btcoex_info.btcoex_scheme == ATH_BTCOEX_CFG_3WIRE)
-		if (status & ATH9K_INT_GENTIMER)
-			ath_gen_timer_isr(ah);
-
 chip_reset:
 
 	ath_debug_stat_interrupt(sc, status);
Signature · 1 line
1.5.5.1
#1 lore raw

PATCH 2/2 ath9k: Call spin_lock_bh() on btcoex_lock

As generic hw timer interrupt handler is moved to tasklet, we no more need to call spin_lock_irqsave().

---
 drivers/net/wireless/ath/ath9k/btcoex.c |   10 ++++------
 1 files changed, 4 insertions(+), 6 deletions(-)
drivers/net/wireless/ath/ath9k/btcoex.c +4 -6
index 8fb3567..e8bfb01 100644
@@ -84,15 +84,14 @@ static void ath_btcoex_period_timer(unsigned long data)
 {
 	struct ath_softc *sc = (struct ath_softc *) data;
 	struct ath_btcoex_info *btinfo = &sc->btcoex_info;
-	unsigned long flags;
 
 	ath_detect_bt_priority(sc);
 
-	spin_lock_irqsave(&btinfo->btcoex_lock, flags);
+	spin_lock_bh(&btinfo->btcoex_lock);
 
 	ath_btcoex_bt_stomp(sc, btinfo, btinfo->bt_stomp_type);
 
-	spin_unlock_irqrestore(&btinfo->btcoex_lock, flags);
+	spin_unlock_bh(&btinfo->btcoex_lock);
 
 	if (btinfo->btcoex_period != btinfo->btcoex_no_stomp) {
 		if (btinfo->hw_timer_enabled)
@@ -119,18 +118,17 @@ static void ath_btcoex_no_stomp_timer(void *arg)
 {
 	struct ath_softc *sc = (struct ath_softc *)arg;
 	struct ath_btcoex_info *btinfo = &sc->btcoex_info;
-	unsigned long flags;
 
 	DPRINTF(sc, ATH_DBG_BTCOEX, "no stomp timer running \n");
 
-	spin_lock_irqsave(&btinfo->btcoex_lock, flags);
+	spin_lock_bh(&btinfo->btcoex_lock);
 
 	if (btinfo->bt_stomp_type == ATH_BTCOEX_STOMP_LOW)
 		ath_btcoex_bt_stomp(sc, btinfo, ATH_BTCOEX_STOMP_NONE);
 	 else if (btinfo->bt_stomp_type == ATH_BTCOEX_STOMP_ALL)
 		ath_btcoex_bt_stomp(sc, btinfo, ATH_BTCOEX_STOMP_LOW);
 
-	spin_unlock_irqrestore(&btinfo->btcoex_lock, flags);
+	spin_unlock_bh(&btinfo->btcoex_lock);
 }
 
 static int ath_init_btcoex_info(struct ath_hw *hw,
Signature · 1 line
1.5.5.1