Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 18823
b: refs/heads/master
c: 2610c73
h: refs/heads/master
i:
  18821: 2e13c5f
  18819: a0827a0
  18815: 72f6547
v: v3
  • Loading branch information
Javier Achirica authored and Jeff Garzik committed Jan 17, 2006
1 parent f117b0b commit cf01eef
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 11 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: 38bd3b2629702894ca3528358ffc447bbacc9442
refs/heads/master: 2610c733023850be2db9fef9c81f851a64bb9f67
19 changes: 9 additions & 10 deletions trunk/drivers/net/wireless/airo.c
Original file line number Diff line number Diff line change
Expand Up @@ -5668,13 +5668,13 @@ static int airo_set_freq(struct net_device *dev,
int channel = fwrq->m;
/* We should do a better check than that,
* based on the card capability !!! */
if((channel < 1) || (channel > 16)) {
if((channel < 1) || (channel > 14)) {
printk(KERN_DEBUG "%s: New channel value of %d is invalid!\n", dev->name, fwrq->m);
rc = -EINVAL;
} else {
readConfigRid(local, 1);
/* Yes ! We can set it !!! */
local->config.channelSet = (u16)(channel - 1);
local->config.channelSet = (u16) channel;
set_bit (FLAG_COMMIT, &local->flags);
}
}
Expand All @@ -5692,23 +5692,22 @@ static int airo_get_freq(struct net_device *dev,
{
struct airo_info *local = dev->priv;
StatusRid status_rid; /* Card status info */
int ch;

readConfigRid(local, 1);
if ((local->config.opmode & 0xFF) == MODE_STA_ESS)
status_rid.channel = local->config.channelSet;
else
readStatusRid(local, &status_rid, 1);

#ifdef WEXT_USECHANNELS
fwrq->m = ((int)status_rid.channel) + 1;
fwrq->e = 0;
#else
{
int f = (int)status_rid.channel;
fwrq->m = frequency_list[f] * 100000;
ch = (int)status_rid.channel;
if((ch > 0) && (ch < 15)) {
fwrq->m = frequency_list[ch - 1] * 100000;
fwrq->e = 1;
} else {
fwrq->m = ch;
fwrq->e = 0;
}
#endif

return 0;
}
Expand Down

0 comments on commit cf01eef

Please sign in to comment.