Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Rafał Miłecki and committed by
John W. Linville
ea42e71c f9471e99

+9 -2
+1
drivers/net/wireless/b43/main.c
··· 3808 3808 b43_mac_suspend(dev); 3809 3809 3810 3810 if (changed & IEEE80211_CONF_CHANGE_CHANNEL) { 3811 + phy->chandef = &conf->chandef; 3811 3812 phy->channel = conf->chandef.chan->hw_value; 3812 3813 if (conf_is_ht(conf)) 3813 3814 phy->is_40mhz = conf_is_ht40_minus(conf) ||
+7 -2
drivers/net/wireless/b43/phy_common.c
··· 94 94 const struct b43_phy_operations *ops = phy->ops; 95 95 int err; 96 96 97 - if (!phy->channel) 98 - phy->channel = ops->get_default_chan(dev); 97 + /* During PHY init we need to use some channel. On the first init this 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 105 phy->ops->switch_analog(dev, true); 101 106 b43_software_rfkill(dev, false);
+1
drivers/net/wireless/b43/phy_common.h
··· 267 267 unsigned long next_txpwr_check_time; 268 268 269 269 /* Current channel */ 270 + struct cfg80211_chan_def *chandef; 270 271 unsigned int channel; 271 272 u16 channel_freq; 272 273 enum nl80211_channel_type channel_type;