diff options
author | Rafał Miłecki <zajec5@gmail.com> | 2010-10-10 21:19:22 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-10-11 15:04:25 -0400 |
commit | f2a6d6a08cf13f621661dd57f32bf0a5100ba26b (patch) | |
tree | 0753b09aba4df7ed29f8bd3e7f9d3ac43eb9219b /drivers | |
parent | 087de74ae512fe31894c1556d5f8d5a126322de7 (diff) |
b43: N-PHY: prepare for rev3+ channel tables
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/wireless/b43/phy_n.c | 3 | ||||
-rw-r--r-- | drivers/net/wireless/b43/tables_nphy.c | 24 | ||||
-rw-r--r-- | drivers/net/wireless/b43/tables_nphy.h | 4 |
3 files changed, 26 insertions, 5 deletions
diff --git a/drivers/net/wireless/b43/phy_n.c b/drivers/net/wireless/b43/phy_n.c index 19582ba20598..e532901246b6 100644 --- a/drivers/net/wireless/b43/phy_n.c +++ b/drivers/net/wireless/b43/phy_n.c | |||
@@ -3399,7 +3399,8 @@ static int b43_nphy_set_channel(struct b43_wldev *dev, | |||
3399 | u8 tmp; | 3399 | u8 tmp; |
3400 | 3400 | ||
3401 | if (dev->phy.rev >= 3) { | 3401 | if (dev->phy.rev >= 3) { |
3402 | /* TODO */ | 3402 | tabent_r3 = b43_nphy_get_chantabent_rev3(dev, |
3403 | channel->center_freq); | ||
3403 | tabent_r3 = NULL; | 3404 | tabent_r3 = NULL; |
3404 | if (!tabent_r3) | 3405 | if (!tabent_r3) |
3405 | return -ESRCH; | 3406 | return -ESRCH; |
diff --git a/drivers/net/wireless/b43/tables_nphy.c b/drivers/net/wireless/b43/tables_nphy.c index d96e870ab8fe..e74b8eb5795c 100644 --- a/drivers/net/wireless/b43/tables_nphy.c +++ b/drivers/net/wireless/b43/tables_nphy.c | |||
@@ -325,7 +325,7 @@ void b2055_upload_inittab(struct b43_wldev *dev, | |||
325 | .phy_regs.phy_bw5 = r4, \ | 325 | .phy_regs.phy_bw5 = r4, \ |
326 | .phy_regs.phy_bw6 = r5 | 326 | .phy_regs.phy_bw6 = r5 |
327 | 327 | ||
328 | static const struct b43_nphy_channeltab_entry_rev2 b43_nphy_channeltab[] = { | 328 | static const struct b43_nphy_channeltab_entry_rev2 b43_nphy_channeltab_rev2[] = { |
329 | { .channel = 184, | 329 | { .channel = 184, |
330 | .freq = 4920, /* MHz */ | 330 | .freq = 4920, /* MHz */ |
331 | .unk2 = 3280, | 331 | .unk2 = 3280, |
@@ -1326,8 +1326,8 @@ b43_nphy_get_chantabent_rev2(struct b43_wldev *dev, u8 channel) | |||
1326 | const struct b43_nphy_channeltab_entry_rev2 *e; | 1326 | const struct b43_nphy_channeltab_entry_rev2 *e; |
1327 | unsigned int i; | 1327 | unsigned int i; |
1328 | 1328 | ||
1329 | for (i = 0; i < ARRAY_SIZE(b43_nphy_channeltab); i++) { | 1329 | for (i = 0; i < ARRAY_SIZE(b43_nphy_channeltab_rev2); i++) { |
1330 | e = &(b43_nphy_channeltab[i]); | 1330 | e = &(b43_nphy_channeltab_rev2[i]); |
1331 | if (e->channel == channel) | 1331 | if (e->channel == channel) |
1332 | return e; | 1332 | return e; |
1333 | } | 1333 | } |
@@ -1335,6 +1335,24 @@ b43_nphy_get_chantabent_rev2(struct b43_wldev *dev, u8 channel) | |||
1335 | return NULL; | 1335 | return NULL; |
1336 | } | 1336 | } |
1337 | 1337 | ||
1338 | static const struct b43_nphy_channeltab_entry_rev3 b43_nphy_channeltab_rev3[] = { | ||
1339 | }; | ||
1340 | |||
1341 | const struct b43_nphy_channeltab_entry_rev3 * | ||
1342 | b43_nphy_get_chantabent_rev3(struct b43_wldev *dev, u16 freq) | ||
1343 | { | ||
1344 | const struct b43_nphy_channeltab_entry_rev3 *e; | ||
1345 | unsigned int i; | ||
1346 | |||
1347 | for (i = 0; i < ARRAY_SIZE(b43_nphy_channeltab_rev3); i++) { | ||
1348 | e = &(b43_nphy_channeltab_rev3[i]); | ||
1349 | if (e->freq == freq) | ||
1350 | return e; | ||
1351 | } | ||
1352 | |||
1353 | return NULL; | ||
1354 | } | ||
1355 | |||
1338 | 1356 | ||
1339 | static const u8 b43_ntab_adjustpower0[] = { | 1357 | static const u8 b43_ntab_adjustpower0[] = { |
1340 | 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, | 1358 | 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, |
diff --git a/drivers/net/wireless/b43/tables_nphy.h b/drivers/net/wireless/b43/tables_nphy.h index 8fc1da9f8fe5..3eedb869f492 100644 --- a/drivers/net/wireless/b43/tables_nphy.h +++ b/drivers/net/wireless/b43/tables_nphy.h | |||
@@ -90,10 +90,12 @@ void b2055_upload_inittab(struct b43_wldev *dev, | |||
90 | bool ghz5, bool ignore_uploadflag); | 90 | bool ghz5, bool ignore_uploadflag); |
91 | 91 | ||
92 | 92 | ||
93 | /* Get the NPHY Channel Switch Table entry for a channel number. | 93 | /* Get the NPHY Channel Switch Table entry for a channel. |
94 | * Returns NULL on failure to find an entry. */ | 94 | * Returns NULL on failure to find an entry. */ |
95 | const struct b43_nphy_channeltab_entry_rev2 * | 95 | const struct b43_nphy_channeltab_entry_rev2 * |
96 | b43_nphy_get_chantabent_rev2(struct b43_wldev *dev, u8 channel); | 96 | b43_nphy_get_chantabent_rev2(struct b43_wldev *dev, u8 channel); |
97 | const struct b43_nphy_channeltab_entry_rev3 * | ||
98 | b43_nphy_get_chantabent_rev3(struct b43_wldev *dev, u16 freq); | ||
97 | 99 | ||
98 | 100 | ||
99 | /* The N-PHY tables. */ | 101 | /* The N-PHY tables. */ |