diff options
Diffstat (limited to 'drivers/net/wireless/zd1201.c')
-rw-r--r-- | drivers/net/wireless/zd1201.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/net/wireless/zd1201.c b/drivers/net/wireless/zd1201.c index b45c27d42fd8..6226ac2357f8 100644 --- a/drivers/net/wireless/zd1201.c +++ b/drivers/net/wireless/zd1201.c | |||
@@ -919,10 +919,9 @@ static int zd1201_set_freq(struct net_device *dev, | |||
919 | if (freq->e == 0) | 919 | if (freq->e == 0) |
920 | channel = freq->m; | 920 | channel = freq->m; |
921 | else { | 921 | else { |
922 | if (freq->m >= 2482) | 922 | channel = ieee80211_freq_to_dsss_chan(freq->m); |
923 | channel = 14; | 923 | if (channel < 0) |
924 | if (freq->m >= 2407) | 924 | channel = 0; |
925 | channel = (freq->m-2407)/5; | ||
926 | } | 925 | } |
927 | 926 | ||
928 | err = zd1201_setconfig16(zd, ZD1201_RID_CNFOWNCHANNEL, channel); | 927 | err = zd1201_setconfig16(zd, ZD1201_RID_CNFOWNCHANNEL, channel); |