b43: N-PHY: store current channel info in PHY common
RFC PATCH 1/1 b43: N-PHY: store current channel info in PHY common
---
As for now I simply implemented code strictly from specs without much analyzing it. This introduced mess as we keep current channel info in few places.
This patch starts moving it to commong place. Is this OK to put nl80211_channel_type in this common code? Are you find with this?
Finally I'm going to remove radio_chanspec totally.
Some kind of struct b43_chanspec may be still useful to allow easy storing info about channel we have cached data for.
drivers/net/wireless/b43/phy_common.h | 4 ++- drivers/net/wireless/b43/phy_n.c | 65 +++++++++++++++++---------------- drivers/net/wireless/b43/phy_n.h | 1 - 3 files changed, 36 insertions(+), 34 deletions(-)
drivers/net/wireless/b43/phy_common.h +3 -1
@@ -2,6 +2,7 @@#define LINUX_B43_PHY_COMMON_H_ #include <linux/types.h> +#include <linux/nl80211.h> struct b43_wldev ;
@@ -250,8 +251,9 @@ struct b43_phy {* check is needed. */ unsigned long next_txpwr_check_time; -/* current channel */ +/* Current channel */ unsigned int channel; +enum nl80211_channel_type channel_type;/* PHY TX errors counter. */ atomic_t txerr_cnt;
drivers/net/wireless/b43/phy_n.c +33 -32
143 lines not on this page · raw message
drivers/net/wireless/b43/phy_n.h +0 -1
@@ -984,7 +984,6 @@ struct b43_phy_n {u16 papd_epsilon_offset[2 ];s32 preamble_override;u32 bb_mult_save; -u8 b_width;struct b43_chanspec radio_chanspec;bool gain_boost;
Signature · 1 line
1.7.1
RFC PATCH 1/1 b43: N-PHY: store current channel info in PHY common
W dniu 6 pa?dziernika 2010 20:13 u?ytkownik Rafa? Mi?ecki <[email protected]> napisa?:
Review static void b43_nphy_op_switch_analog(struct b43_wldev *dev, bool on) · line 3576
Quoted 8 lines
(quoted diff) +2
-2@@ -3568,8 +3572,8 @@ static void b43_nphy_op_switch_analog(struct b43_wldev *dev, bool on) ?static int b43_nphy_op_switch_channel(struct b43_wldev *dev, ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?unsigned int new_channel) ?{ - ? ? ? struct b43_phy_n *nphy = dev->phy.n; - ? ? ? struct b43_chanspec chanspec; + ? ? ? struct ieee80211_channel *channel = dev->wl->hw->conf.channel; + ? ? ? enum nl80211_channel_type channel_type = dev->wl->hw->conf.channel_type;
Ah, and as you can see I decided to get more raw data about new channel there. This is because in case on N-PHY we have to know about band freq (2/5 GHz) and band with (20/40 MHz) to do full channel setup.
Signature · 1 line
Rafa?