On 2011-08-29 12:28 PM, Rajkumar Manoharan wrote:
On Mon, Aug 29, 2011 at 11:58:15AM +0200, Felix Fietkau wrote:
reduces unnecessary code duplication
Signed-off-by: Felix Fietkau<nbd@xxxxxxxxxxx>
---
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?
Must have overlooked it, will send a v5.
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html