b43-dev.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: "Rafał Miłecki" <zajec5@gmail.com>
To: linux-wireless@vger.kernel.org,
	"John W. Linville" <linville@tuxdriver.com>
Cc: b43-dev@lists.infradead.org, "Rafał Miłecki" <zajec5@gmail.com>
Subject: [PATCH 5/9] b43: b43_op_config: set channel info before switching band
Date: Sat, 31 May 2014 20:49:37 +0200	[thread overview]
Message-ID: <1401562181-14608-6-git-send-email-zajec5@gmail.com> (raw)
In-Reply-To: <1401562181-14608-1-git-send-email-zajec5@gmail.com>

Band switching code needs to know what channel we switch to.

Signed-off-by: Rafa? Mi?ecki <zajec5@gmail.com>
---
 drivers/net/wireless/b43/main.c       | 3 ++-
 drivers/net/wireless/b43/phy_common.c | 1 -
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/wireless/b43/main.c b/drivers/net/wireless/b43/main.c
index 59aa4fd..5e4eed3 100644
--- a/drivers/net/wireless/b43/main.c
+++ b/drivers/net/wireless/b43/main.c
@@ -3808,6 +3808,7 @@ static int b43_op_config(struct ieee80211_hw *hw, u32 changed)
 	b43_mac_suspend(dev);
 
 	if (changed & IEEE80211_CONF_CHANGE_CHANNEL) {
+		phy->channel = conf->chandef.chan->hw_value;
 		if (conf_is_ht(conf))
 			phy->is_40mhz = conf_is_ht40_minus(conf) ||
 					conf_is_ht40_plus(conf);
@@ -3822,7 +3823,7 @@ static int b43_op_config(struct ieee80211_hw *hw, u32 changed)
 		/* Switch to the requested channel.
 		 * The firmware takes care of races with the TX handler.
 		 */
-		b43_switch_channel(dev, conf->chandef.chan->hw_value);
+		b43_switch_channel(dev, phy->channel);
 	}
 
 	if (changed & IEEE80211_CONF_CHANGE_RETRY_LIMITS)
diff --git a/drivers/net/wireless/b43/phy_common.c b/drivers/net/wireless/b43/phy_common.c
index 3bfb795..b465011 100644
--- a/drivers/net/wireless/b43/phy_common.c
+++ b/drivers/net/wireless/b43/phy_common.c
@@ -424,7 +424,6 @@ int b43_switch_channel(struct b43_wldev *dev, unsigned int new_channel)
 	if (err)
 		goto err_restore_cookie;
 
-	dev->phy.channel = new_channel;
 	/* Wait for the radio to tune to the channel and stabilize. */
 	msleep(8);
 
-- 
1.8.4.5

  parent reply	other threads:[~2014-05-31 18:49 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-31 18:49 [PATCH 0/9] b43: clean channel handling Rafał Miłecki
2014-05-31 18:49 ` [PATCH 1/9] b43: drop B43_DEFAULT_CHANNEL Rafał Miłecki
2014-05-31 18:49 ` [PATCH 2/9] b43: b43_op_config: drop check for core change Rafał Miłecki
2014-05-31 18:49 ` [PATCH 3/9] b43: b43_op_config: use IEEE80211_CONF_CHANGE_CHANNEL Rafał Miłecki
2014-05-31 18:49 ` [PATCH 4/9] b43: PHY: don't force default channel during init Rafał Miłecki
2014-05-31 18:49 ` Rafał Miłecki [this message]
2014-05-31 18:49 ` [PATCH 6/9] b43: store current channel using struct cfg80211_chan_def Rafał Miłecki
2014-05-31 18:49 ` [PATCH 7/9] b43: PHY: drop own channel_freq (get it from chandef when needed) Rafał Miłecki
2014-05-31 18:49 ` [PATCH 8/9] b43: PHY: drop is_40mhz (get width info from chandef) Rafał Miłecki
2014-05-31 18:49 ` [PATCH 9/9] b43: PHY: drop channel_type (we can get this " Rafał Miłecki

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=1401562181-14608-6-git-send-email-zajec5@gmail.com \
    --to=zajec5@gmail.com \
    --cc=b43-dev@lists.infradead.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).