Initialize the channel and band from mac80211 conf even when the FW is
not yet loaded. This mitigates a bug in AP-mode where the channel was
never changed from its initial setting after FW boot and was therefore
never configured to FW.
Reported-by: Alexander Boukaty <[email protected]>
Signed-off-by: Arik Nemtsov <[email protected]>
---
drivers/net/wireless/wl12xx/main.c | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/drivers/net/wireless/wl12xx/main.c b/drivers/net/wireless/wl12xx/main.c
index 85cb4da..c262e60 100644
--- a/drivers/net/wireless/wl12xx/main.c
+++ b/drivers/net/wireless/wl12xx/main.c
@@ -1707,7 +1707,12 @@ static int wl1271_op_config(struct ieee80211_hw *hw, u32 changed)
mutex_lock(&wl->mutex);
if (unlikely(wl->state == WL1271_STATE_OFF)) {
- ret = -EAGAIN;
+ /* we support configuring the channel and band while off */
+ if ((changed & IEEE80211_CONF_CHANGE_CHANNEL)) {
+ wl->band = conf->channel->band;
+ wl->channel = channel;
+ }
+
goto out;
}
--
1.7.1
On Tue, Mar 22, 2011 at 10:07, Arik Nemtsov <[email protected]> wrote:
> Initialize the channel and band from mac80211 conf even when the FW is
> not yet loaded. This mitigates a bug in AP-mode where the channel was
> never changed from its initial setting after FW boot and was therefore
> never configured to FW.
Special thanks to Ruthy Zaphir <[email protected]> for debugging this one.
Arik
On Tue, 2011-03-22 at 10:07 +0200, Arik Nemtsov wrote:
> Initialize the channel and band from mac80211 conf even when the FW is
> not yet loaded. This mitigates a bug in AP-mode where the channel was
> never changed from its initial setting after FW boot and was therefore
> never configured to FW.
>
> Reported-by: Alexander Boukaty <[email protected]>
> Signed-off-by: Arik Nemtsov <[email protected]>
> ---
Applied, thank you.
--
Cheers,
Luca.