diff options
author | Rafał Miłecki <zajec5@gmail.com> | 2014-05-31 20:49:38 +0200 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2014-06-19 15:49:13 -0400 |
commit | ea42e71c79068daa8bfd04f5e3c4a19b5e62f7da (patch) | |
tree | 730578ca00725ad10dfc1e7c7c15a66378fb9a10 /drivers/net/wireless/b43/phy_common.c | |
parent | f9471e9973fd887b8af888b98860182b6c534ea2 (diff) | |
download | blackbird-op-linux-ea42e71c79068daa8bfd04f5e3c4a19b5e62f7da.tar.gz blackbird-op-linux-ea42e71c79068daa8bfd04f5e3c4a19b5e62f7da.zip |
b43: store current channel using struct cfg80211_chan_def
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/b43/phy_common.c')
-rw-r--r-- | drivers/net/wireless/b43/phy_common.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/net/wireless/b43/phy_common.c b/drivers/net/wireless/b43/phy_common.c index b465011c14ea..9aa6c9c57393 100644 --- a/drivers/net/wireless/b43/phy_common.c +++ b/drivers/net/wireless/b43/phy_common.c @@ -94,8 +94,13 @@ int b43_phy_init(struct b43_wldev *dev) const struct b43_phy_operations *ops = phy->ops; int err; - if (!phy->channel) - phy->channel = ops->get_default_chan(dev); + /* During PHY init we need to use some channel. On the first init this + * function is called *before* b43_op_config, so our pointer is NULL. + */ + if (!phy->chandef) { + phy->chandef = &dev->wl->hw->conf.chandef; + phy->channel = phy->chandef->chan->hw_value; + } phy->ops->switch_analog(dev, true); b43_software_rfkill(dev, false); |