From: Arik Nemtsov Date: Tue, 22 Mar 2011 08:07:47 +0000 (+0200) Subject: wl12xx: configure channel/band while FW is off X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=17e672d6e4b5a8a3f330a70dfd58d25a2cb497b5;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git wl12xx: configure channel/band while FW is off 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 Signed-off-by: Arik Nemtsov Signed-off-by: Luciano Coelho --- diff --git a/drivers/net/wireless/wl12xx/main.c b/drivers/net/wireless/wl12xx/main.c index 9663326c0dfa..5545c3b94d2e 100644 --- a/drivers/net/wireless/wl12xx/main.c +++ b/drivers/net/wireless/wl12xx/main.c @@ -1706,7 +1706,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; }