aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/b43/radio_2056.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/b43/radio_2056.c')
-rw-r--r--drivers/net/wireless/b43/radio_2056.c37
1 files changed, 33 insertions, 4 deletions
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 */
9057const struct b43_nphy_channeltab_entry_rev3 * 9056const struct b43_nphy_channeltab_entry_rev3 *
9058b43_nphy_get_chantabent_rev3(struct b43_wldev *dev, u16 freq) 9057b43_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 }