diff options
author | Rafał Miłecki <zajec5@gmail.com> | 2014-05-31 14:49:38 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2014-06-19 15:49:13 -0400 |
commit | ea42e71c79068daa8bfd04f5e3c4a19b5e62f7da (patch) | |
tree | 730578ca00725ad10dfc1e7c7c15a66378fb9a10 /drivers | |
parent | f9471e9973fd887b8af888b98860182b6c534ea2 (diff) |
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')
-rw-r--r-- | drivers/net/wireless/b43/main.c | 1 | ||||
-rw-r--r-- | drivers/net/wireless/b43/phy_common.c | 9 | ||||
-rw-r--r-- | drivers/net/wireless/b43/phy_common.h | 1 |
3 files changed, 9 insertions, 2 deletions
diff --git a/drivers/net/wireless/b43/main.c b/drivers/net/wireless/b43/main.c index 5e4eed37e3ce..2b99ed31ab08 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) | |||
3808 | b43_mac_suspend(dev); | 3808 | b43_mac_suspend(dev); |
3809 | 3809 | ||
3810 | if (changed & IEEE80211_CONF_CHANGE_CHANNEL) { | 3810 | if (changed & IEEE80211_CONF_CHANGE_CHANNEL) { |
3811 | phy->chandef = &conf->chandef; | ||
3811 | phy->channel = conf->chandef.chan->hw_value; | 3812 | phy->channel = conf->chandef.chan->hw_value; |
3812 | if (conf_is_ht(conf)) | 3813 | if (conf_is_ht(conf)) |
3813 | phy->is_40mhz = conf_is_ht40_minus(conf) || | 3814 | phy->is_40mhz = conf_is_ht40_minus(conf) || |
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) | |||
94 | const struct b43_phy_operations *ops = phy->ops; | 94 | const struct b43_phy_operations *ops = phy->ops; |
95 | int err; | 95 | int err; |
96 | 96 | ||
97 | if (!phy->channel) | 97 | /* During PHY init we need to use some channel. On the first init this |
98 | phy->channel = ops->get_default_chan(dev); | 98 | * function is called *before* b43_op_config, so our pointer is NULL. |
99 | */ | ||
100 | if (!phy->chandef) { | ||
101 | phy->chandef = &dev->wl->hw->conf.chandef; | ||
102 | phy->channel = phy->chandef->chan->hw_value; | ||
103 | } | ||
99 | 104 | ||
100 | phy->ops->switch_analog(dev, true); | 105 | phy->ops->switch_analog(dev, true); |
101 | b43_software_rfkill(dev, false); | 106 | b43_software_rfkill(dev, false); |
diff --git a/drivers/net/wireless/b43/phy_common.h b/drivers/net/wireless/b43/phy_common.h index 9a92df46ae84..56dfe7aa50a7 100644 --- a/drivers/net/wireless/b43/phy_common.h +++ b/drivers/net/wireless/b43/phy_common.h | |||
@@ -267,6 +267,7 @@ struct b43_phy { | |||
267 | unsigned long next_txpwr_check_time; | 267 | unsigned long next_txpwr_check_time; |
268 | 268 | ||
269 | /* Current channel */ | 269 | /* Current channel */ |
270 | struct cfg80211_chan_def *chandef; | ||
270 | unsigned int channel; | 271 | unsigned int channel; |
271 | u16 channel_freq; | 272 | u16 channel_freq; |
272 | enum nl80211_channel_type channel_type; | 273 | enum nl80211_channel_type channel_type; |