Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 225493
b: refs/heads/master
c: d414464
h: refs/heads/master
i:
  225491: 60143db
v: v3
  • Loading branch information
Rafał Miłecki authored and John W. Linville committed Dec 22, 2010
1 parent 4ea66ea commit c321c0f
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: aca434d36f38754392f53e7b16f90eab66ae95e0
refs/heads/master: d41446467320b7cbe550a85c44fd9d3cb12c119d
1 change: 0 additions & 1 deletion trunk/drivers/net/wireless/b43/phy_n.c
Original file line number Diff line number Diff line change
Expand Up @@ -3607,7 +3607,6 @@ static int b43_nphy_set_channel(struct b43_wldev *dev,
if (dev->phy.rev >= 3) {
tabent_r3 = b43_nphy_get_chantabent_rev3(dev,
channel->center_freq);
tabent_r3 = NULL;
if (!tabent_r3)
return -ESRCH;
} else {
Expand Down
37 changes: 33 additions & 4 deletions trunk/drivers/net/wireless/b43/radio_2056.c
Original file line number Diff line number Diff line change
Expand Up @@ -9053,15 +9053,44 @@ void b2056_upload_inittabs(struct b43_wldev *dev,
B2056_RX1, pts->rx, pts->rx_length);
}

/* TODO: add support for rev4+ devices by searching in rev4+ tables */
const struct b43_nphy_channeltab_entry_rev3 *
b43_nphy_get_chantabent_rev3(struct b43_wldev *dev, u16 freq)
{
const struct b43_nphy_channeltab_entry_rev3 *e;
unsigned int i;
unsigned int length, i;

for (i = 0; i < ARRAY_SIZE(b43_nphy_channeltab_rev3); i++) {
e = &(b43_nphy_channeltab_rev3[i]);
switch (dev->phy.rev) {
case 3:
e = b43_nphy_channeltab_rev3;
length = ARRAY_SIZE(b43_nphy_channeltab_rev3);
break;
case 4:
e = b43_nphy_channeltab_rev4;
length = ARRAY_SIZE(b43_nphy_channeltab_rev4);
break;
case 5:
e = b43_nphy_channeltab_rev5;
length = ARRAY_SIZE(b43_nphy_channeltab_rev5);
break;
case 6:
e = b43_nphy_channeltab_rev6;
length = ARRAY_SIZE(b43_nphy_channeltab_rev6);
break;
case 7:
case 9:
e = b43_nphy_channeltab_rev7_9;
length = ARRAY_SIZE(b43_nphy_channeltab_rev7_9);
break;
case 8:
e = b43_nphy_channeltab_rev8;
length = ARRAY_SIZE(b43_nphy_channeltab_rev8);
break;
default:
B43_WARN_ON(1);
return NULL;
}

for (i = 0; i < length; i++, e++) {
if (e->freq == freq)
return e;
}
Expand Down

0 comments on commit c321c0f

Please sign in to comment.