Thread (5 messages) flat view 5 messages, 2 authors, 2011-08-29

Re: [PATCH v4 2/3] ath9k: merge reset related functions

From: Rajkumar Manoharan <hidden>
Date: 2011-08-29 10:27:43

On Mon, Aug 29, 2011 at 11:58:15AM +0200, Felix Fietkau wrote:
quoted hunk ↗ jump to hunk
reduces unnecessary code duplication

Signed-off-by: Felix Fietkau <redacted>
---
 drivers/net/wireless/ath/ath9k/main.c |  258 +++++++++++++--------------------
 1 files changed, 100 insertions(+), 158 deletions(-)
diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c
index 085ec20..4c3671a 100644
--- a/drivers/net/wireless/ath/ath9k/main.c
+++ b/drivers/net/wireless/ath/ath9k/main.c
@@ -212,83 +212,45 @@ static int ath_update_survey_stats(struct ath_softc *sc)
 	return ret;
 }
 
-/*
- * Set/change channels.  If the channel is really being changed, it's done
- * by reseting the chip.  To accomplish this we must first cleanup any pending
- * DMA, then restart stuff.
-*/
-static int ath_set_channel(struct ath_softc *sc, struct ieee80211_hw *hw,
-		    struct ath9k_channel *hchan)
+static bool ath_prepare_reset(struct ath_softc *sc, bool retry_tx, bool flush)
 {
 	struct ath_hw *ah = sc->sc_ah;
-	struct ath_common *common = ath9k_hw_common(ah);
-	struct ieee80211_conf *conf = &common->hw->conf;
-	bool fastcc = true, stopped;
-	struct ieee80211_channel *channel = hw->conf.channel;
-	struct ath9k_hw_cal_data *caldata = NULL;
-	int r;
+	bool ret;
 
-	if (sc->sc_flags & SC_OP_INVALID)
-		return -EIO;
+	ieee80211_stop_queues(sc->hw);
 
 	sc->hw_busy_count = 0;
-
-	del_timer_sync(&common->ani.timer);
ani timer never be stopped. why did you remove from ath_prepare_reset?

--
Rajkumar
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help