diff options
author | John W. Linville <linville@tuxdriver.com> | 2010-10-08 15:39:28 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-10-08 15:39:28 -0400 |
commit | e9a68707d736f4f73d7e209885d7b4c5c452b1dc (patch) | |
tree | d9f76964c77c1059483b08436ed060b702b8e25d /drivers/net/wireless/b43 | |
parent | dd53df265b1ee7a1fbbc76bb62c3bec2383bbd44 (diff) | |
parent | 15a6321d1c0f8db561932cd99e1b9897981da71f (diff) |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6 into for-davem
Conflicts:
Documentation/feature-removal-schedule.txt
drivers/net/wireless/ipw2x00/ipw2200.c
Diffstat (limited to 'drivers/net/wireless/b43')
-rw-r--r-- | drivers/net/wireless/b43/b43.h | 3 | ||||
-rw-r--r-- | drivers/net/wireless/b43/phy_common.c | 6 | ||||
-rw-r--r-- | drivers/net/wireless/b43/phy_n.c | 31 |
3 files changed, 15 insertions, 25 deletions
diff --git a/drivers/net/wireless/b43/b43.h b/drivers/net/wireless/b43/b43.h index 8674a99356af..72821c456b02 100644 --- a/drivers/net/wireless/b43/b43.h +++ b/drivers/net/wireless/b43/b43.h | |||
@@ -186,7 +186,8 @@ enum { | |||
186 | #define B43_SHM_SH_PHYTXNOI 0x006E /* PHY noise directly after TX (lower 8bit only) */ | 186 | #define B43_SHM_SH_PHYTXNOI 0x006E /* PHY noise directly after TX (lower 8bit only) */ |
187 | #define B43_SHM_SH_RFRXSP1 0x0072 /* RF RX SP Register 1 */ | 187 | #define B43_SHM_SH_RFRXSP1 0x0072 /* RF RX SP Register 1 */ |
188 | #define B43_SHM_SH_CHAN 0x00A0 /* Current channel (low 8bit only) */ | 188 | #define B43_SHM_SH_CHAN 0x00A0 /* Current channel (low 8bit only) */ |
189 | #define B43_SHM_SH_CHAN_5GHZ 0x0100 /* Bit set, if 5Ghz channel */ | 189 | #define B43_SHM_SH_CHAN_5GHZ 0x0100 /* Bit set, if 5 Ghz channel */ |
190 | #define B43_SHM_SH_CHAN_40MHZ 0x0200 /* Bit set, if 40 Mhz channel width */ | ||
190 | #define B43_SHM_SH_BCMCFIFOID 0x0108 /* Last posted cookie to the bcast/mcast FIFO */ | 191 | #define B43_SHM_SH_BCMCFIFOID 0x0108 /* Last posted cookie to the bcast/mcast FIFO */ |
191 | /* TSSI information */ | 192 | /* TSSI information */ |
192 | #define B43_SHM_SH_TSSI_CCK 0x0058 /* TSSI for last 4 CCK frames (32bit) */ | 193 | #define B43_SHM_SH_TSSI_CCK 0x0058 /* TSSI for last 4 CCK frames (32bit) */ |
diff --git a/drivers/net/wireless/b43/phy_common.c b/drivers/net/wireless/b43/phy_common.c index 8f7d7eff2d80..7b2ea6781457 100644 --- a/drivers/net/wireless/b43/phy_common.c +++ b/drivers/net/wireless/b43/phy_common.c | |||
@@ -294,8 +294,10 @@ int b43_switch_channel(struct b43_wldev *dev, unsigned int new_channel) | |||
294 | */ | 294 | */ |
295 | channelcookie = new_channel; | 295 | channelcookie = new_channel; |
296 | if (b43_current_band(dev->wl) == IEEE80211_BAND_5GHZ) | 296 | if (b43_current_band(dev->wl) == IEEE80211_BAND_5GHZ) |
297 | channelcookie |= 0x100; | 297 | channelcookie |= B43_SHM_SH_CHAN_5GHZ; |
298 | //FIXME set 40Mhz flag if required | 298 | /* FIXME: set 40Mhz flag if required */ |
299 | if (0) | ||
300 | channelcookie |= B43_SHM_SH_CHAN_40MHZ; | ||
299 | savedcookie = b43_shm_read16(dev, B43_SHM_SHARED, B43_SHM_SH_CHAN); | 301 | savedcookie = b43_shm_read16(dev, B43_SHM_SHARED, B43_SHM_SH_CHAN); |
300 | b43_shm_write16(dev, B43_SHM_SHARED, B43_SHM_SH_CHAN, channelcookie); | 302 | b43_shm_write16(dev, B43_SHM_SHARED, B43_SHM_SH_CHAN, channelcookie); |
301 | 303 | ||
diff --git a/drivers/net/wireless/b43/phy_n.c b/drivers/net/wireless/b43/phy_n.c index 2466c0a52e5d..f575e757caeb 100644 --- a/drivers/net/wireless/b43/phy_n.c +++ b/drivers/net/wireless/b43/phy_n.c | |||
@@ -73,7 +73,6 @@ static void b43_nphy_rf_control_override(struct b43_wldev *dev, u16 field, | |||
73 | u16 value, u8 core, bool off); | 73 | u16 value, u8 core, bool off); |
74 | static void b43_nphy_rf_control_intc_override(struct b43_wldev *dev, u8 field, | 74 | static void b43_nphy_rf_control_intc_override(struct b43_wldev *dev, u8 field, |
75 | u16 value, u8 core); | 75 | u16 value, u8 core); |
76 | static int nphy_channel_switch(struct b43_wldev *dev, unsigned int channel); | ||
77 | 76 | ||
78 | static inline bool b43_empty_chanspec(struct b43_chanspec *chanspec) | 77 | static inline bool b43_empty_chanspec(struct b43_chanspec *chanspec) |
79 | { | 78 | { |
@@ -223,7 +222,7 @@ static void b43_radio_init2055_post(struct b43_wldev *dev) | |||
223 | if (i) | 222 | if (i) |
224 | b43err(dev->wl, "radio post init timeout\n"); | 223 | b43err(dev->wl, "radio post init timeout\n"); |
225 | b43_radio_mask(dev, B2055_CAL_LPOCTL, 0xFF7F); | 224 | b43_radio_mask(dev, B2055_CAL_LPOCTL, 0xFF7F); |
226 | nphy_channel_switch(dev, dev->phy.channel); | 225 | b43_switch_channel(dev, dev->phy.channel); |
227 | b43_radio_write(dev, B2055_C1_RX_BB_LPF, 0x9); | 226 | b43_radio_write(dev, B2055_C1_RX_BB_LPF, 0x9); |
228 | b43_radio_write(dev, B2055_C2_RX_BB_LPF, 0x9); | 227 | b43_radio_write(dev, B2055_C2_RX_BB_LPF, 0x9); |
229 | b43_radio_write(dev, B2055_C1_RX_BB_MIDACHP, 0x83); | 228 | b43_radio_write(dev, B2055_C1_RX_BB_MIDACHP, 0x83); |
@@ -3351,12 +3350,6 @@ static void b43_nphy_chanspec_setup(struct b43_wldev *dev, | |||
3351 | 3350 | ||
3352 | b43_chantab_phy_upload(dev, e); | 3351 | b43_chantab_phy_upload(dev, e); |
3353 | 3352 | ||
3354 | tmp = chanspec.channel; | ||
3355 | if (chanspec.b_freq == 1) | ||
3356 | tmp |= 0x0100; | ||
3357 | if (chanspec.b_width == 3) | ||
3358 | tmp |= 0x0200; | ||
3359 | b43_shm_write16(dev, B43_SHM_SHARED, 0xA0, tmp); | ||
3360 | 3353 | ||
3361 | if (nphy->radio_chanspec.channel == 14) { | 3354 | if (nphy->radio_chanspec.channel == 14) { |
3362 | b43_nphy_classifier(dev, 2, 0); | 3355 | b43_nphy_classifier(dev, 2, 0); |
@@ -3438,18 +3431,6 @@ static int b43_nphy_set_chanspec(struct b43_wldev *dev, | |||
3438 | return 0; | 3431 | return 0; |
3439 | } | 3432 | } |
3440 | 3433 | ||
3441 | /* Tune the hardware to a new channel */ | ||
3442 | static int nphy_channel_switch(struct b43_wldev *dev, unsigned int channel) | ||
3443 | { | ||
3444 | struct b43_phy_n *nphy = dev->phy.n; | ||
3445 | |||
3446 | struct b43_chanspec chanspec; | ||
3447 | chanspec = nphy->radio_chanspec; | ||
3448 | chanspec.channel = channel; | ||
3449 | |||
3450 | return b43_nphy_set_chanspec(dev, chanspec); | ||
3451 | } | ||
3452 | |||
3453 | static int b43_nphy_op_allocate(struct b43_wldev *dev) | 3434 | static int b43_nphy_op_allocate(struct b43_wldev *dev) |
3454 | { | 3435 | { |
3455 | struct b43_phy_n *nphy; | 3436 | struct b43_phy_n *nphy; |
@@ -3570,7 +3551,7 @@ static void b43_nphy_op_software_rfkill(struct b43_wldev *dev, | |||
3570 | } else { | 3551 | } else { |
3571 | if (dev->phy.rev >= 3) { | 3552 | if (dev->phy.rev >= 3) { |
3572 | b43_radio_init2056(dev); | 3553 | b43_radio_init2056(dev); |
3573 | b43_nphy_set_chanspec(dev, nphy->radio_chanspec); | 3554 | b43_switch_channel(dev, dev->phy.channel); |
3574 | } else { | 3555 | } else { |
3575 | b43_radio_init2055(dev); | 3556 | b43_radio_init2055(dev); |
3576 | } | 3557 | } |
@@ -3586,6 +3567,9 @@ static void b43_nphy_op_switch_analog(struct b43_wldev *dev, bool on) | |||
3586 | static int b43_nphy_op_switch_channel(struct b43_wldev *dev, | 3567 | static int b43_nphy_op_switch_channel(struct b43_wldev *dev, |
3587 | unsigned int new_channel) | 3568 | unsigned int new_channel) |
3588 | { | 3569 | { |
3570 | struct b43_phy_n *nphy = dev->phy.n; | ||
3571 | struct b43_chanspec chanspec; | ||
3572 | |||
3589 | if (b43_current_band(dev->wl) == IEEE80211_BAND_2GHZ) { | 3573 | if (b43_current_band(dev->wl) == IEEE80211_BAND_2GHZ) { |
3590 | if ((new_channel < 1) || (new_channel > 14)) | 3574 | if ((new_channel < 1) || (new_channel > 14)) |
3591 | return -EINVAL; | 3575 | return -EINVAL; |
@@ -3594,7 +3578,10 @@ static int b43_nphy_op_switch_channel(struct b43_wldev *dev, | |||
3594 | return -EINVAL; | 3578 | return -EINVAL; |
3595 | } | 3579 | } |
3596 | 3580 | ||
3597 | return nphy_channel_switch(dev, new_channel); | 3581 | chanspec = nphy->radio_chanspec; |
3582 | chanspec.channel = new_channel; | ||
3583 | |||
3584 | return b43_nphy_set_chanspec(dev, chanspec); | ||
3598 | } | 3585 | } |
3599 | 3586 | ||
3600 | static unsigned int b43_nphy_op_get_default_chan(struct b43_wldev *dev) | 3587 | static unsigned int b43_nphy_op_get_default_chan(struct b43_wldev *dev) |