diff options
author | David Kilroy <kilroyd@googlemail.com> | 2008-12-23 09:03:38 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-01-29 15:58:46 -0500 |
commit | 9ee677c2276bfcbcf68042ec2718a504af0c5fd7 (patch) | |
tree | 0b5528241690e143c60832d319ddbb2ad1c5d7f1 /drivers/net/wireless/zd1201.c | |
parent | eaee7cc2c180c291084a1c1f49cd2bf13002b3e1 (diff) |
wireless: Add channel/frequency conversions to ieee80211.h
Added mappings for FHSS, DSSS and OFDM channels - with macros to point
HR DSSS and ERP to the DSSS mappings. Currently just static inline
functions.
Use the new functions in the older fullmac drivers. This eliminates a
number of const static buffers and removes a couple of range checks that
are now redundant.
Signed-off-by: David Kilroy <kilroyd@googlemail.com>
Acked-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Acked-by: Richard Farina <sidhayn@gmail.com>
Acked-by: Jeroen Vreeken <pe1rxq@amsat.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
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); |