All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mwl8k: always apply configuration even when device is idle
@ 2013-03-25 15:39 Jonas Gorski
  2013-03-25 15:49 ` Johannes Berg
  0 siblings, 1 reply; 3+ messages in thread
From: Jonas Gorski @ 2013-03-25 15:39 UTC (permalink / raw)
  To: linux-wireless; +Cc: John W. Linville, Nishant Sarmukadam, Yogesh Ashok Powar

Fix settings not being applied when the device is idle and the firmware
gets reloaded (because of changing from STA to AP mode). This caused
the device using the wrong channel (and likely band), e.g. a 5 GHz only
card still defaulted to channel 6 in the 2.4 GHz band when left
unconfigured.

This issue was always present, but only made visible with "mwl8k: Do not
call mwl8k_cmd_set_rf_channel unconditionally" (0f4316b9), since before
that the channel was (re-)configured at the next _config call even when
it did not change from the mac80211 perspective.

Signed-off-by: Jonas Gorski <jogo@openwrt.org>
---
 drivers/net/wireless/mwl8k.c |   10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/drivers/net/wireless/mwl8k.c b/drivers/net/wireless/mwl8k.c
index 0640e7d..956c108 100644
--- a/drivers/net/wireless/mwl8k.c
+++ b/drivers/net/wireless/mwl8k.c
@@ -4807,16 +4807,14 @@ static int mwl8k_config(struct ieee80211_hw *hw, u32 changed)
 	struct mwl8k_priv *priv = hw->priv;
 	int rc;
 
-	if (conf->flags & IEEE80211_CONF_IDLE) {
-		mwl8k_cmd_radio_disable(hw);
-		return 0;
-	}
-
 	rc = mwl8k_fw_lock(hw);
 	if (rc)
 		return rc;
 
-	rc = mwl8k_cmd_radio_enable(hw);
+	if (conf->flags & IEEE80211_CONF_IDLE)
+		rc = mwl8k_cmd_radio_disable(hw);
+	else
+		rc = mwl8k_cmd_radio_enable(hw);
 	if (rc)
 		goto out;
 
-- 
1.7.10.4


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-03-25 16:15 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-25 15:39 [PATCH] mwl8k: always apply configuration even when device is idle Jonas Gorski
2013-03-25 15:49 ` Johannes Berg
2013-03-25 16:15   ` Jonas Gorski

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.