From: Joerg Albert <jal2@gmx.de>
To: "John W. Linville" <linville@tuxdriver.com>
Cc: ath5k-devel@lists.ath5k.org,
"Luis R. Rodriguez" <lrodriguez@atheros.com>,
"linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>,
Bob Copeland <me@bobcopeland.com>
Subject: [PATCH] ath5k: fix missing output in monitor mode after ifconfig up
Date: Sun, 02 Aug 2009 00:33:26 +0200 [thread overview]
Message-ID: <4A74C2B6.3070407@gmx.de> (raw)
Let ath5k_chan_set() call ath5k_reset() if ath5k_config() was told
that the channel changed. This fixes the bug that we don't
get any packets in monitor mode after:
ifconfig wlan0 down
iwconfig wlan0 mode monitor channel 1
ifconfig wlan0 up
but they arrive after
iwconfig wlan0 channel 2
Signed-off-by: Joerg Albert <jal2@gmx.de>
---
drivers/net/wireless/ath/ath5k/base.c | 17 +++++++++--------
1 files changed, 9 insertions(+), 8 deletions(-)
diff --git a/drivers/net/wireless/ath/ath5k/base.c b/drivers/net/wireless/ath/ath5k/base.c
index 3a1c156..09ca89c 100644
--- a/drivers/net/wireless/ath/ath5k/base.c
+++ b/drivers/net/wireless/ath/ath5k/base.c
@@ -289,7 +289,8 @@ static unsigned int ath5k_copy_channels(struct ath5k_hw *ah,
unsigned int max);
static int ath5k_setup_bands(struct ieee80211_hw *hw);
static int ath5k_chan_set(struct ath5k_softc *sc,
- struct ieee80211_channel *chan);
+ struct ieee80211_channel *chan,
+ int chan_changed);
static void ath5k_setcurmode(struct ath5k_softc *sc,
unsigned int mode);
static void ath5k_mode_setup(struct ath5k_softc *sc);
@@ -1079,14 +1080,13 @@ ath5k_setup_bands(struct ieee80211_hw *hw)
* Called with sc->lock.
*/
static int
-ath5k_chan_set(struct ath5k_softc *sc, struct ieee80211_channel *chan)
+ath5k_chan_set(struct ath5k_softc *sc, struct ieee80211_channel *chan,
+ int chan_changed)
{
- ATH5K_DBG(sc, ATH5K_DEBUG_RESET, "(%u MHz) -> (%u MHz)\n",
- sc->curchan->center_freq, chan->center_freq);
-
- if (chan->center_freq != sc->curchan->center_freq ||
- chan->hw_value != sc->curchan->hw_value) {
+ ATH5K_DBG(sc, ATH5K_DEBUG_RESET, "(%u MHz) -> (%u MHz) chan_changed %x\n",
+ sc->curchan->center_freq, chan->center_freq, chan_changed);
+ if (chan_changed) {
/*
* To switch channels clear any pending DMA operations;
* wait long enough for the RX fifo to drain, reset the
@@ -2811,7 +2811,8 @@ ath5k_config(struct ieee80211_hw *hw, u32 changed)
mutex_lock(&sc->lock);
- ret = ath5k_chan_set(sc, conf->channel);
+ ret = ath5k_chan_set(sc, conf->channel,
+ changed & IEEE80211_CONF_CHANGE_CHANNEL);
if (ret < 0)
goto unlock;
--
1.6.0.4
next reply other threads:[~2009-08-01 22:33 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-01 22:33 Joerg Albert [this message]
2009-08-02 3:20 ` [PATCH] ath5k: fix missing output in monitor mode after ifconfig up Bob Copeland
2009-08-02 7:36 ` Joerg Albert
2009-08-02 7:50 ` [PATCH v2] " Joerg Albert
2009-08-04 15:13 ` Bob Copeland
2009-08-04 15:41 ` John W. Linville
2009-08-04 23:46 ` Joerg Albert
2009-08-04 23:52 ` [PATCH v3] " Joerg Albert
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4A74C2B6.3070407@gmx.de \
--to=jal2@gmx.de \
--cc=ath5k-devel@lists.ath5k.org \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
--cc=lrodriguez@atheros.com \
--cc=me@bobcopeland.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.