mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-02 14:06:45 +07:00
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>
This commit is contained in:
parent
aca434d36f
commit
d414464673
@ -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 {
|
||||
|
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user