o wl3501: create channel to frequency table and use it in get_freq

This table was obtained from the Planet WAP 1000 Access Point web
interface, accessing it over this driver after I ran nmap against
the AP box that is now only with the wireless interface, i.e. all
accesses to it are over this driver :-)
parent 5935e236
...@@ -86,6 +86,24 @@ static u8 wl3501_fpage[] = { ...@@ -86,6 +86,24 @@ static u8 wl3501_fpage[] = {
[3] = WL3501_BSS_FPAGE3, [3] = WL3501_BSS_FPAGE3,
}; };
/*
* Conversion from Channel (this->chan) to frequency, this information
* was obtained from the Planet WAP 1000 Access Point web interface. -acme
*/
static int wl3501_chan2freq[] = {
[0] = 2412,
[1] = 2417,
[2] = 2422,
[3] = 2427,
[4] = 2432,
[5] = 2437,
[6] = 2442,
[7] = 2447,
[8] = 2452,
[9] = 2457,
[10] = 2462,
};
#define wl3501_outb(a, b) { outb(a, b); WL3501_SLOW_DOWN_IO; } #define wl3501_outb(a, b) { outb(a, b); WL3501_SLOW_DOWN_IO; }
#define wl3501_outb_p(a, b) { outb_p(a, b); WL3501_SLOW_DOWN_IO; } #define wl3501_outb_p(a, b) { outb_p(a, b); WL3501_SLOW_DOWN_IO; }
#define wl3501_outsb(a, b, c) { outsb(a, b, c); WL3501_SLOW_DOWN_IO; } #define wl3501_outsb(a, b, c) { outsb(a, b, c); WL3501_SLOW_DOWN_IO; }
...@@ -1829,8 +1847,8 @@ static int wl3501_get_freq(struct net_device *dev, struct iw_request_info *info, ...@@ -1829,8 +1847,8 @@ static int wl3501_get_freq(struct net_device *dev, struct iw_request_info *info,
{ {
struct wl3501_card *this = (struct wl3501_card *)dev->priv; struct wl3501_card *this = (struct wl3501_card *)dev->priv;
wrqu->freq.m = this->chan; wrqu->freq.m = wl3501_chan2freq[this->chan] * 100000;
wrqu->freq.e = 0; wrqu->freq.e = 1;
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment