Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 215318
b: refs/heads/master
c: f2a6d6a
h: refs/heads/master
v: v3
  • Loading branch information
Rafał Miłecki authored and John W. Linville committed Oct 11, 2010
1 parent bbb8963 commit 99ed185
Show file tree
Hide file tree
Showing 4 changed files with 27 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: 087de74ae512fe31894c1556d5f8d5a126322de7
refs/heads/master: f2a6d6a08cf13f621661dd57f32bf0a5100ba26b
3 changes: 2 additions & 1 deletion trunk/drivers/net/wireless/b43/phy_n.c
Original file line number Diff line number Diff line change
Expand Up @@ -3399,7 +3399,8 @@ static int b43_nphy_set_channel(struct b43_wldev *dev,
u8 tmp;

if (dev->phy.rev >= 3) {
/* TODO */
tabent_r3 = b43_nphy_get_chantabent_rev3(dev,
channel->center_freq);
tabent_r3 = NULL;
if (!tabent_r3)
return -ESRCH;
Expand Down
24 changes: 21 additions & 3 deletions trunk/drivers/net/wireless/b43/tables_nphy.c
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ void b2055_upload_inittab(struct b43_wldev *dev,
.phy_regs.phy_bw5 = r4, \
.phy_regs.phy_bw6 = r5

static const struct b43_nphy_channeltab_entry_rev2 b43_nphy_channeltab[] = {
static const struct b43_nphy_channeltab_entry_rev2 b43_nphy_channeltab_rev2[] = {
{ .channel = 184,
.freq = 4920, /* MHz */
.unk2 = 3280,
Expand Down Expand Up @@ -1326,15 +1326,33 @@ b43_nphy_get_chantabent_rev2(struct b43_wldev *dev, u8 channel)
const struct b43_nphy_channeltab_entry_rev2 *e;
unsigned int i;

for (i = 0; i < ARRAY_SIZE(b43_nphy_channeltab); i++) {
e = &(b43_nphy_channeltab[i]);
for (i = 0; i < ARRAY_SIZE(b43_nphy_channeltab_rev2); i++) {
e = &(b43_nphy_channeltab_rev2[i]);
if (e->channel == channel)
return e;
}

return NULL;
}

static const struct b43_nphy_channeltab_entry_rev3 b43_nphy_channeltab_rev3[] = {
};

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;

for (i = 0; i < ARRAY_SIZE(b43_nphy_channeltab_rev3); i++) {
e = &(b43_nphy_channeltab_rev3[i]);
if (e->freq == freq)
return e;
}

return NULL;
}


static const u8 b43_ntab_adjustpower0[] = {
0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01,
Expand Down
4 changes: 3 additions & 1 deletion trunk/drivers/net/wireless/b43/tables_nphy.h
Original file line number Diff line number Diff line change
Expand Up @@ -90,10 +90,12 @@ void b2055_upload_inittab(struct b43_wldev *dev,
bool ghz5, bool ignore_uploadflag);


/* Get the NPHY Channel Switch Table entry for a channel number.
/* Get the NPHY Channel Switch Table entry for a channel.
* Returns NULL on failure to find an entry. */
const struct b43_nphy_channeltab_entry_rev2 *
b43_nphy_get_chantabent_rev2(struct b43_wldev *dev, u8 channel);
const struct b43_nphy_channeltab_entry_rev3 *
b43_nphy_get_chantabent_rev3(struct b43_wldev *dev, u16 freq);


/* The N-PHY tables. */
Expand Down

0 comments on commit 99ed185

Please sign in to comment.