mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-17 03:58:36 +00:00
ath5k: fix missing output in monitor mode after ifconfig up
Let ath5k_chan_set() always call ath5k_reset(). 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> Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
parent
c458bc50e3
commit
e30eb4ab45
1 changed files with 15 additions and 20 deletions
|
@ -1071,10 +1071,9 @@ ath5k_setup_bands(struct ieee80211_hw *hw)
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Set/change channels. If the channel is really being changed,
|
* Set/change channels. We always reset the chip.
|
||||||
* it's done by reseting the chip. To accomplish this we must
|
* To accomplish this we must first cleanup any pending DMA,
|
||||||
* first cleanup any pending DMA, then restart stuff after a la
|
* then restart stuff after a la ath5k_init.
|
||||||
* ath5k_init.
|
|
||||||
*
|
*
|
||||||
* Called with sc->lock.
|
* Called with sc->lock.
|
||||||
*/
|
*/
|
||||||
|
@ -1084,19 +1083,13 @@ ath5k_chan_set(struct ath5k_softc *sc, struct ieee80211_channel *chan)
|
||||||
ATH5K_DBG(sc, ATH5K_DEBUG_RESET, "(%u MHz) -> (%u MHz)\n",
|
ATH5K_DBG(sc, ATH5K_DEBUG_RESET, "(%u MHz) -> (%u MHz)\n",
|
||||||
sc->curchan->center_freq, chan->center_freq);
|
sc->curchan->center_freq, chan->center_freq);
|
||||||
|
|
||||||
if (chan->center_freq != sc->curchan->center_freq ||
|
/*
|
||||||
chan->hw_value != sc->curchan->hw_value) {
|
* To switch channels clear any pending DMA operations;
|
||||||
|
* wait long enough for the RX fifo to drain, reset the
|
||||||
/*
|
* hardware at the new frequency, and then re-enable
|
||||||
* To switch channels clear any pending DMA operations;
|
* the relevant bits of the h/w.
|
||||||
* wait long enough for the RX fifo to drain, reset the
|
*/
|
||||||
* hardware at the new frequency, and then re-enable
|
return ath5k_reset(sc, chan);
|
||||||
* the relevant bits of the h/w.
|
|
||||||
*/
|
|
||||||
return ath5k_reset(sc, chan);
|
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -2811,9 +2804,11 @@ ath5k_config(struct ieee80211_hw *hw, u32 changed)
|
||||||
|
|
||||||
mutex_lock(&sc->lock);
|
mutex_lock(&sc->lock);
|
||||||
|
|
||||||
ret = ath5k_chan_set(sc, conf->channel);
|
if (changed & IEEE80211_CONF_CHANGE_CHANNEL) {
|
||||||
if (ret < 0)
|
ret = ath5k_chan_set(sc, conf->channel);
|
||||||
goto unlock;
|
if (ret < 0)
|
||||||
|
goto unlock;
|
||||||
|
}
|
||||||
|
|
||||||
if ((changed & IEEE80211_CONF_CHANGE_POWER) &&
|
if ((changed & IEEE80211_CONF_CHANGE_POWER) &&
|
||||||
(sc->power_level != conf->power_level)) {
|
(sc->power_level != conf->power_level)) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue