Hi All,
I am a newbie and am trying to change the operating frequency of WiFi card. I am using RB433AH and the WiFi card uses ath5k drivers. I want to change the channel 1 center frequency to 2382 MHz instead of 2412 MHz. I searched a little and found that it is possible (http://www.qsl.net/kb9mwr/projects/wireless/modify.html).
I am using attitude_adjustment 12.09. I tried seacrhing for the drivers that are resposible for the frequency and saw the frequency dependency only in hostapd, compat-wireless and iw3.6. The channel frequency is set in each of these drivers using
freq = 2407 + chan * 5;
I changed the value 2407 to 2377 (in iw3.6/util.c, compat-wireless-2014-01-23.1/include/linux/ieee80211.h and compat-wireless-2014-01-23.1/net/wireless/util.c) so that my channel 1 center frequency becomes 2382 MHz. I also set the value caps->cap_range.range_2ghz_min = 2312 (which was 2412 by default) in compat-wireless-2014-01-23.1/drivers/net/wireless/ath/ath5k/caps.c
Now coming to the problem: The channel frequencies do get changed.
I added a printk(KERN_DEBUG "ieee80211_frequency_to_channel: freq = %d", freq) in the iw3.6/util.c
I set the channel to 1 in the /etc/config/wireless file.
When I enable wireless and restart the network, I get the following
ieee80211_frequency_to_channel: freq = 2382
ieee80211_frequency_to_channel: freq = 2387
ieee80211_frequency_to_channel: freq = 2392
ieee80211_frequency_to_channel: freq = 2397
ieee80211_frequency_to_channel: freq = 2402
ieee80211_frequency_to_channel: freq = 2407
ieee80211_frequency_to_channel: freq = 2412
ieee80211_frequency_to_channel: freq = 2417
ieee80211_frequency_to_channel: freq = 2422
ieee80211_frequency_to_channel: freq = 2427
ieee80211_frequency_to_channel: freq = 2432
ieee80211_frequency_to_channel: freq = 2437
ieee80211_frequency_to_channel: freq = 2442
However, now, if I check the list of frquencies, I get
iwlist frequency
wlan0 7 channels in total; available frequencies :
Channel 07 : 2.412 GHz
Channel 08 : 2.417 GHz
Channel 09 : 2.422 GHz
Channel 10 : 2.427 GHz
Channel 11 : 2.432 GHz
Channel 12 : 2.437 GHz
Channel 13 : 2.442 GHz
Also, channel 1 by default sets to channel 7 (2412 MHz).
I tried this for a few other frequencies, and what's happening is when I set the channel to 1, the channel is set to the one which has frequency more than 2412 MHz. Channel 2 translates to channel 8, channel 3 to channel 9 and so on.
What am I missing? I tried searching for conditions in the driver to check if it prevents from changing the frequency but did not get any. Wherever the driver checked a condition such as freq >=2412, I replaced it with freq >=2312. Are there more files where I need to make changes?
Again, I am rather new to studying and modifying the drivers; so pardon me if I have made any obvious errors. Any help is sincerely appreciated.
Thanks,
Gaurang