aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless
diff options
context:
space:
mode:
authorRafał Miłecki <zajec5@gmail.com>2010-10-10 21:11:02 -0400
committerJohn W. Linville <linville@tuxdriver.com>2010-10-11 15:04:24 -0400
commite5c407f970ea2977600eb54cf4cc8a67a44fefeb (patch)
tree47c2b4de88a3633e29ee87a2a0eb50874b35ee1c /drivers/net/wireless
parenta656b6a9665dce09a8f273091f1b4aa3d5cec721 (diff)
b43: N-PHY: store info about current channel's type
Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r--drivers/net/wireless/b43/phy_common.h4
-rw-r--r--drivers/net/wireless/b43/phy_n.c14
-rw-r--r--drivers/net/wireless/b43/phy_n.h1
3 files changed, 13 insertions, 6 deletions
diff --git a/drivers/net/wireless/b43/phy_common.h b/drivers/net/wireless/b43/phy_common.h
index bd480b481bfc..6dcd0334ed02 100644
--- a/drivers/net/wireless/b43/phy_common.h
+++ b/drivers/net/wireless/b43/phy_common.h
@@ -2,6 +2,7 @@
2#define LINUX_B43_PHY_COMMON_H_ 2#define LINUX_B43_PHY_COMMON_H_
3 3
4#include <linux/types.h> 4#include <linux/types.h>
5#include <linux/nl80211.h>
5 6
6struct b43_wldev; 7struct b43_wldev;
7 8
@@ -250,8 +251,9 @@ struct b43_phy {
250 * check is needed. */ 251 * check is needed. */
251 unsigned long next_txpwr_check_time; 252 unsigned long next_txpwr_check_time;
252 253
253 /* current channel */ 254 /* Current channel */
254 unsigned int channel; 255 unsigned int channel;
256 enum nl80211_channel_type channel_type;
255 257
256 /* PHY TX errors counter. */ 258 /* PHY TX errors counter. */
257 atomic_t txerr_cnt; 259 atomic_t txerr_cnt;
diff --git a/drivers/net/wireless/b43/phy_n.c b/drivers/net/wireless/b43/phy_n.c
index 6ca41a09fec4..789d21c54139 100644
--- a/drivers/net/wireless/b43/phy_n.c
+++ b/drivers/net/wireless/b43/phy_n.c
@@ -74,6 +74,13 @@ static void b43_nphy_rf_control_override(struct b43_wldev *dev, u16 field,
74static void b43_nphy_rf_control_intc_override(struct b43_wldev *dev, u8 field, 74static void b43_nphy_rf_control_intc_override(struct b43_wldev *dev, u8 field,
75 u16 value, u8 core); 75 u16 value, u8 core);
76 76
77static inline bool b43_channel_type_is_40mhz(
78 enum nl80211_channel_type channel_type)
79{
80 return (channel_type == NL80211_CHAN_HT40MINUS ||
81 channel_type == NL80211_CHAN_HT40PLUS);
82}
83
77static inline bool b43_empty_chanspec(struct b43_chanspec *chanspec) 84static inline bool b43_empty_chanspec(struct b43_chanspec *chanspec)
78{ 85{
79 return !chanspec->channel && !chanspec->sideband && 86 return !chanspec->channel && !chanspec->sideband &&
@@ -3404,10 +3411,9 @@ static int b43_nphy_set_channel(struct b43_wldev *dev,
3404 3411
3405 nphy->radio_chanspec.channel = channel->hw_value; 3412 nphy->radio_chanspec.channel = channel->hw_value;
3406 3413
3407 /* 3414 if (b43_channel_type_is_40mhz(phy->channel_type) !=
3408 if (chanspec.b_width != nphy->b_width) 3415 b43_channel_type_is_40mhz(channel_type))
3409 ; TODO: BMAC BW Set (chanspec.b_width) 3416 ; /* TODO: BMAC BW Set (channel_type) */
3410 */
3411 3417
3412 if (channel_type == NL80211_CHAN_HT40PLUS) 3418 if (channel_type == NL80211_CHAN_HT40PLUS)
3413 b43_phy_set(dev, B43_NPHY_RXCTL, 3419 b43_phy_set(dev, B43_NPHY_RXCTL,
diff --git a/drivers/net/wireless/b43/phy_n.h b/drivers/net/wireless/b43/phy_n.h
index 8b6d570dd0aa..e7acae278be0 100644
--- a/drivers/net/wireless/b43/phy_n.h
+++ b/drivers/net/wireless/b43/phy_n.h
@@ -984,7 +984,6 @@ struct b43_phy_n {
984 u16 papd_epsilon_offset[2]; 984 u16 papd_epsilon_offset[2];
985 s32 preamble_override; 985 s32 preamble_override;
986 u32 bb_mult_save; 986 u32 bb_mult_save;
987 u8 b_width;
988 struct b43_chanspec radio_chanspec; 987 struct b43_chanspec radio_chanspec;
989 988
990 bool gain_boost; 989 bool gain_boost;