diff options
Diffstat (limited to 'drivers/net/wireless/airo.c')
-rw-r--r-- | drivers/net/wireless/airo.c | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/drivers/net/wireless/airo.c b/drivers/net/wireless/airo.c index ee866fd6957d..a4c7ae94614d 100644 --- a/drivers/net/wireless/airo.c +++ b/drivers/net/wireless/airo.c | |||
@@ -5668,13 +5668,13 @@ static int airo_set_freq(struct net_device *dev, | |||
5668 | int channel = fwrq->m; | 5668 | int channel = fwrq->m; |
5669 | /* We should do a better check than that, | 5669 | /* We should do a better check than that, |
5670 | * based on the card capability !!! */ | 5670 | * based on the card capability !!! */ |
5671 | if((channel < 1) || (channel > 16)) { | 5671 | if((channel < 1) || (channel > 14)) { |
5672 | printk(KERN_DEBUG "%s: New channel value of %d is invalid!\n", dev->name, fwrq->m); | 5672 | printk(KERN_DEBUG "%s: New channel value of %d is invalid!\n", dev->name, fwrq->m); |
5673 | rc = -EINVAL; | 5673 | rc = -EINVAL; |
5674 | } else { | 5674 | } else { |
5675 | readConfigRid(local, 1); | 5675 | readConfigRid(local, 1); |
5676 | /* Yes ! We can set it !!! */ | 5676 | /* Yes ! We can set it !!! */ |
5677 | local->config.channelSet = (u16)(channel - 1); | 5677 | local->config.channelSet = (u16) channel; |
5678 | set_bit (FLAG_COMMIT, &local->flags); | 5678 | set_bit (FLAG_COMMIT, &local->flags); |
5679 | } | 5679 | } |
5680 | } | 5680 | } |
@@ -5692,6 +5692,7 @@ static int airo_get_freq(struct net_device *dev, | |||
5692 | { | 5692 | { |
5693 | struct airo_info *local = dev->priv; | 5693 | struct airo_info *local = dev->priv; |
5694 | StatusRid status_rid; /* Card status info */ | 5694 | StatusRid status_rid; /* Card status info */ |
5695 | int ch; | ||
5695 | 5696 | ||
5696 | readConfigRid(local, 1); | 5697 | readConfigRid(local, 1); |
5697 | if ((local->config.opmode & 0xFF) == MODE_STA_ESS) | 5698 | if ((local->config.opmode & 0xFF) == MODE_STA_ESS) |
@@ -5699,16 +5700,14 @@ static int airo_get_freq(struct net_device *dev, | |||
5699 | else | 5700 | else |
5700 | readStatusRid(local, &status_rid, 1); | 5701 | readStatusRid(local, &status_rid, 1); |
5701 | 5702 | ||
5702 | #ifdef WEXT_USECHANNELS | 5703 | ch = (int)status_rid.channel; |
5703 | fwrq->m = ((int)status_rid.channel) + 1; | 5704 | if((ch > 0) && (ch < 15)) { |
5704 | fwrq->e = 0; | 5705 | fwrq->m = frequency_list[ch - 1] * 100000; |
5705 | #else | ||
5706 | { | ||
5707 | int f = (int)status_rid.channel; | ||
5708 | fwrq->m = frequency_list[f] * 100000; | ||
5709 | fwrq->e = 1; | 5706 | fwrq->e = 1; |
5707 | } else { | ||
5708 | fwrq->m = ch; | ||
5709 | fwrq->e = 0; | ||
5710 | } | 5710 | } |
5711 | #endif | ||
5712 | 5711 | ||
5713 | return 0; | 5712 | return 0; |
5714 | } | 5713 | } |
@@ -5783,7 +5782,7 @@ static int airo_get_essid(struct net_device *dev, | |||
5783 | /* If none, we may want to get the one that was set */ | 5782 | /* If none, we may want to get the one that was set */ |
5784 | 5783 | ||
5785 | /* Push it out ! */ | 5784 | /* Push it out ! */ |
5786 | dwrq->length = status_rid.SSIDlen + 1; | 5785 | dwrq->length = status_rid.SSIDlen; |
5787 | dwrq->flags = 1; /* active */ | 5786 | dwrq->flags = 1; /* active */ |
5788 | 5787 | ||
5789 | return 0; | 5788 | return 0; |