diff options
author | Rafał Miłecki <zajec5@gmail.com> | 2010-12-21 13:40:18 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-12-22 15:43:29 -0500 |
commit | d41446467320b7cbe550a85c44fd9d3cb12c119d (patch) | |
tree | 657939b46a3f84e7fa3322925af628856198b457 /drivers/net/wireless/b43 | |
parent | aca434d36f38754392f53e7b16f90eab66ae95e0 (diff) |
b43: N-PHY: use correct channel tables for rev4+
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')
-rw-r--r-- | drivers/net/wireless/b43/phy_n.c | 1 | ||||
-rw-r--r-- | drivers/net/wireless/b43/radio_2056.c | 37 |
2 files changed, 33 insertions, 5 deletions
diff --git a/drivers/net/wireless/b43/phy_n.c b/drivers/net/wireless/b43/phy_n.c index f6e90a10c0dc..dded2318ddf4 100644 --- a/drivers/net/wireless/b43/phy_n.c +++ b/drivers/net/wireless/b43/phy_n.c | |||
@@ -3607,7 +3607,6 @@ static int b43_nphy_set_channel(struct b43_wldev *dev, | |||
3607 | if (dev->phy.rev >= 3) { | 3607 | if (dev->phy.rev >= 3) { |
3608 | tabent_r3 = b43_nphy_get_chantabent_rev3(dev, | 3608 | tabent_r3 = b43_nphy_get_chantabent_rev3(dev, |
3609 | channel->center_freq); | 3609 | channel->center_freq); |
3610 | tabent_r3 = NULL; | ||
3611 | if (!tabent_r3) | 3610 | if (!tabent_r3) |
3612 | return -ESRCH; | 3611 | return -ESRCH; |
3613 | } else { | 3612 | } else { |
diff --git a/drivers/net/wireless/b43/radio_2056.c b/drivers/net/wireless/b43/radio_2056.c index 3cb98da8ae96..8890df067029 100644 --- a/drivers/net/wireless/b43/radio_2056.c +++ b/drivers/net/wireless/b43/radio_2056.c | |||
@@ -9053,15 +9053,44 @@ void b2056_upload_inittabs(struct b43_wldev *dev, | |||
9053 | B2056_RX1, pts->rx, pts->rx_length); | 9053 | B2056_RX1, pts->rx, pts->rx_length); |
9054 | } | 9054 | } |
9055 | 9055 | ||
9056 | /* TODO: add support for rev4+ devices by searching in rev4+ tables */ | ||
9057 | const struct b43_nphy_channeltab_entry_rev3 * | 9056 | const struct b43_nphy_channeltab_entry_rev3 * |
9058 | b43_nphy_get_chantabent_rev3(struct b43_wldev *dev, u16 freq) | 9057 | b43_nphy_get_chantabent_rev3(struct b43_wldev *dev, u16 freq) |
9059 | { | 9058 | { |
9060 | const struct b43_nphy_channeltab_entry_rev3 *e; | 9059 | const struct b43_nphy_channeltab_entry_rev3 *e; |
9061 | unsigned int i; | 9060 | unsigned int length, i; |
9062 | 9061 | ||
9063 | for (i = 0; i < ARRAY_SIZE(b43_nphy_channeltab_rev3); i++) { | 9062 | switch (dev->phy.rev) { |
9064 | e = &(b43_nphy_channeltab_rev3[i]); | 9063 | case 3: |
9064 | e = b43_nphy_channeltab_rev3; | ||
9065 | length = ARRAY_SIZE(b43_nphy_channeltab_rev3); | ||
9066 | break; | ||
9067 | case 4: | ||
9068 | e = b43_nphy_channeltab_rev4; | ||
9069 | length = ARRAY_SIZE(b43_nphy_channeltab_rev4); | ||
9070 | break; | ||
9071 | case 5: | ||
9072 | e = b43_nphy_channeltab_rev5; | ||
9073 | length = ARRAY_SIZE(b43_nphy_channeltab_rev5); | ||
9074 | break; | ||
9075 | case 6: | ||
9076 | e = b43_nphy_channeltab_rev6; | ||
9077 | length = ARRAY_SIZE(b43_nphy_channeltab_rev6); | ||
9078 | break; | ||
9079 | case 7: | ||
9080 | case 9: | ||
9081 | e = b43_nphy_channeltab_rev7_9; | ||
9082 | length = ARRAY_SIZE(b43_nphy_channeltab_rev7_9); | ||
9083 | break; | ||
9084 | case 8: | ||
9085 | e = b43_nphy_channeltab_rev8; | ||
9086 | length = ARRAY_SIZE(b43_nphy_channeltab_rev8); | ||
9087 | break; | ||
9088 | default: | ||
9089 | B43_WARN_ON(1); | ||
9090 | return NULL; | ||
9091 | } | ||
9092 | |||
9093 | for (i = 0; i < length; i++, e++) { | ||
9065 | if (e->freq == freq) | 9094 | if (e->freq == freq) |
9066 | return e; | 9095 | return e; |
9067 | } | 9096 | } |