diff options
author | Rafał Miłecki <zajec5@gmail.com> | 2010-03-28 18:53:14 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-03-31 14:39:18 -0400 |
commit | ffd2d9bdac1a0a5d3184e085ea1bd3060b4166fe (patch) | |
tree | 71a5a7a04080ae6c9f93e823abb4a6df69e6be1a /drivers/net/wireless/b43/phy_n.c | |
parent | b15b3039919c7357c2851ec66843ff92f8ff86aa (diff) |
b43: N-PHY: find table entry earlier for setting chanspec
We do not want to partially change chanspec just to find out there is not
entry in table for given channel.
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/b43/phy_n.c')
-rw-r--r-- | drivers/net/wireless/b43/phy_n.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/net/wireless/b43/phy_n.c b/drivers/net/wireless/b43/phy_n.c index 052119b84da4..d9e47ba5e157 100644 --- a/drivers/net/wireless/b43/phy_n.c +++ b/drivers/net/wireless/b43/phy_n.c | |||
@@ -3343,6 +3343,10 @@ static int b43_nphy_set_chanspec(struct b43_wldev *dev, | |||
3343 | 3343 | ||
3344 | if (dev->phy.rev >= 3) { | 3344 | if (dev->phy.rev >= 3) { |
3345 | /* TODO */ | 3345 | /* TODO */ |
3346 | } else { | ||
3347 | tabent = b43_nphy_get_chantabent(dev, channel); | ||
3348 | if (!tabent) | ||
3349 | return -ESRCH; | ||
3346 | } | 3350 | } |
3347 | 3351 | ||
3348 | nphy->radio_chanspec = chanspec; | 3352 | nphy->radio_chanspec = chanspec; |
@@ -3366,10 +3370,6 @@ static int b43_nphy_set_chanspec(struct b43_wldev *dev, | |||
3366 | /* TODO: PHY Radio2056 Setup (chan_info_ptr[i]) */ | 3370 | /* TODO: PHY Radio2056 Setup (chan_info_ptr[i]) */ |
3367 | /* TODO: N PHY Chanspec Setup (chan_info_ptr[i]) */ | 3371 | /* TODO: N PHY Chanspec Setup (chan_info_ptr[i]) */ |
3368 | } else { | 3372 | } else { |
3369 | tabent = b43_nphy_get_chantabent(dev, channel); | ||
3370 | if (!tabent) | ||
3371 | return -ESRCH; | ||
3372 | |||
3373 | tmp = (chanspec.b_freq == 1) ? 0x0020 : 0x0050; | 3373 | tmp = (chanspec.b_freq == 1) ? 0x0020 : 0x0050; |
3374 | b43_radio_maskset(dev, B2055_MASTER1, 0xFF8F, tmp); | 3374 | b43_radio_maskset(dev, B2055_MASTER1, 0xFF8F, tmp); |
3375 | b43_radio_2055_setup(dev, tabent); | 3375 | b43_radio_2055_setup(dev, tabent); |