WARNING: Not all channels are available in all locales. Please see the 802.11 specs for more information.
A Channels
There are 201 available channels in the 802.11a spec, 0-200. Generally, their frequency in MHz can be found through this equation:
Frequency = 5000 + 5 * (Channel Number)
(from 802.11a 17.3.8.3.2)
In the orginal driver, here are the available channels:
Channel number |
Frequency |
RX IQ Comparison Value |
TX IQ Comparison Value |
RadioRegister 0x2D Value |
RadioRegister 0x2E Value |
34 |
5170 |
0xEFC3 |
0x4 |
0xC1 |
0x1B |
38 |
5190 |
0xEFC3 |
0x4 |
0xC1 |
0x1F |
42 |
5210 |
0xEFC3 |
0x4 |
0xC1 |
0x23 |
46 |
5230 |
0xEFC3 |
0x4 |
0xC1 |
0x27 |
36 |
5180 |
0xEFC3 |
0x4 |
0x0F |
0x02 |
40 |
5200 |
0xEFC3 |
0x4 |
0x0F |
0x03 |
44 |
5220 |
0xEFC3 |
0x4 |
0x0F |
0x04 |
48 |
5240 |
0xEFC3 |
0x4 |
0x0F |
0x05 |
52 |
5260 |
0xEFC3 |
0x4 |
0x0F |
0x06 |
56 |
5280 |
0xEFC3 |
0x4 |
0x0F |
0x07 |
60 |
5300 |
0xEFC3 |
0x4 |
0x0F |
0x08 |
64 |
5320 |
0xEFC3 |
0x4 |
0x0F |
0x09 |
100 |
5500 |
0xEFC2 |
0x3 |
0x10 |
0x03 |
104 |
5520 |
0xEFC2 |
0x3 |
0x10 |
0x04 |
108 |
5540 |
0xEFC2 |
0x3 |
0x10 |
0x05 |
112 |
5560 |
0xEFC2 |
0x3 |
0x10 |
0x06 |
116 |
5580 |
0xEFC2 |
0x3 |
0x10 |
0x07 |
120 |
5600 |
0xEFC2 |
0x3 |
0x10 |
0x08 |
124 |
5620 |
0xEFC2 |
0x3 |
0x10 |
0x09 |
128 |
5640 |
0xEFC2 |
0x3 |
0x10 |
0x0A |
132 |
5660 |
0xEFC2 |
0x4 |
0x10 |
0x0B |
136 |
5680 |
0xEFC2 |
0x4 |
0x10 |
0x0C |
140 |
5700 |
0xEFC2 |
0x4 |
0x10 |
0x0D |
149 |
5745 |
0xEFC2 |
0x4 |
0xC9 |
0x16 |
153 |
5765 |
0xF0C1 |
0x4 |
0xC9 |
0x1A |
157 |
5785 |
0xF0C1 |
0x4 |
0xC9 |
0x1E |
161 |
5805 |
0xF0C1 |
0x4 |
0xC9 |
0x22 |
165 |
5825 |
0xF0C1 |
0x4 |
0xC9 |
0x26 |
184 |
5920 |
0xF1C2 |
0x3 |
0x0E |
0x04 |
188 |
5940 |
0xF1C2 |
0x3 |
0x0E |
0x05 |
192 |
5960 |
0xF1C2 |
0x3 |
0x0E |
0x06 |
196 |
5980 |
0xF1C2 |
0x3 |
0x0E |
0x07 |
200 |
6000 |
0xF1C2 |
0x3 |
0x0E |
0x08 |
204 |
6020 |
0xF1C2 |
0x3 |
0x0E |
0x09 |
208 |
6040 |
0xF0C2 |
0x3 |
0x0E |
0x0A |
212 |
6060 |
0xF0C2 |
0x3 |
0x0E |
0x0B |
216 |
6080 |
0xF0C2 |
0x3 |
0x0E |
0x0C |
B/G Channels
Channel number |
Frequency |
1 |
2412 MHz |
2 |
2417 MHz |
3 |
2422 MHz |
4 |
2427 MHz |
5 |
2432 MHz |
6 |
2437 MHz |
7 |
2442 MHz |
8 |
2447 MHz |
9 |
2452 MHz |
10 |
2457 MHz |
11 |
2462 MHz |
12 |
2467 MHz |
13 |
2472 MHz |
14 |
2484 MHz |
(from 802.11 15.4.6.2)
Setting a channel
0x2060 Radios
This radio is an 802.11a radio and only uses the 802.11a channels.
- If the Radar Detection feature is on and the PHY Revision is 3 or greater
Backup the value of RadioRegister 0xC4
Unset bit 0x8000 in RadioRegister 0xC4
- If the PHY Revision is less than 3
Backup RadioRegister 0x8
Write the desired A channel frequency to MMIO offset 0x3F0
- If the PHY Revision is less than 3
Restore RadioRegister 0x8
Write 0x88 to RadioRegister 0x2F
Write the RadioRegister 0x2D value specified by the channel to RadioRegister 0x2D
MaskSet RadioRegister 0x2E with mask 0x0080 and set with the RadioRegister 0x2E value specified by the channel
Using the Frequency Based RadioRegister Value Table Below:
Write 17 * the value to RadioRegister 0x7
Write 17 * the value to RadioRegister 0x20
Write 17 * the value to RadioRegister 0x21
MaskSet RadioRegister 0x22 with mask 0xF and set with 16 * the value
Write 17 * the value to RadioRegister 0x2A
Write 17 * the value to RadioRegister 0x2B
MaskSet RadioRegister 0x8 with mask 0xF0 and set with the value
MaskSet RadioRegister 0x29 with mask 0xFF0F and set 0xB0
Write 0xAA to RadioRegister 0x35
Write 0x85 to RadioRegister 0x36
MaskSet RadioRegister 0x3A with mask 0xFF20 and set with the value from the Frequency Based RadioRegister 0x3A table below
Mask RadioRegister 0x3D with mask 0xFFC7
MaskSet RadioRegister 0x81 with mask 0xFF7F and set 0x80
Mask RadioRegister 0x35 with mask 0xFFEF
MaskSet RadioRegister 0x35 with mask 0xFFEF and set 0x10
Write the RX IQ Comparison Value for this channel to PHYRegister 0x63
Read the value of PHYRegister 0x69
Add the TX IQ Comparison Value for this channel to the value of the read PHYRegister shifted right by 8 and clamp the result between [-128, 127]
Add the TX IQ Comparison Value for this channel to the value of the read PHYRegister and clamp the result between [-128, 127]
Write the the first result left shifted by 8 OR'd with the second result to PHYRegister 0x69
If we haven't set the TX power yet, SetTXPower
- Otherwise, based on the channel frequency
Set RadioRegister 0x17 with the value from the table below
MaskSet RadioRegister 0x19 with mask 0xFF1F and set with the value from the table below
If this board has HardwarePowerControl
Set TSSI Power Internal Lookup Table with the current channel
- If the Radar Detection feature is on and this is an A PHY with PHY Revision 3 or greater
Restore the value of RadioRegister 0xC4
- Delay for 2000uSec
Frequency Based, RadioRegister Value Table
Frequency Range |
Value |
x < 0x4920 |
0xF |
5500 > x >= 0x4920 |
(Freq / 40) & 0xF |
x >= 0x5500 |
0 |
Frequency Based, RadioRegister 0x3A Value Table
Frequency Range |
Value |
x < 5090 |
0x40 |
5090 < x <= 5320 |
0 |
5320 < x <= 5805 |
0x80 |
5805 < x |
0x40 |
Frequency Based, RadioRegisters 0x17 and 0x19 Value Table
Frequency Range |
Register 0x17 Value |
Register 0x19 Value |
x <= 5500 |
0x26 |
0x20 |
5500 < x <= 5600 |
0x26 |
0 |
5600 < x <= 5700 |
0x25 |
0 |
5700 < x |
0x24 |
0 |
All other Radios
Since all other radios are not 802.11a compatible, we only use the B/G Channels.
- If the Radio Revision is 8
Back up RadioRegister 0x5C
MaskSet RadioRegister 0x5C with mask 0xF0 and set with 0x5
Write the channel frequency in MHz - 2400 to MMIO offset 0x3F0
- If this is a G PHY
- If the channel is set to 14
Set bit 0x0800 in MMIO offset 0x3F4
Set bit 0x0004 in RadioRegister 0x51
- Otherwise
Mask MMIO offset 0x3F4 with mask 0xF7BF
If this is a B PHY, Mask RadioRegister 0x51 with 0xFFFB
- Delay 2000uSec
- If the Radio Revision is 8
Restore RadioRegister 0x5C
We currently don't know what happens if you write other values, so be careful. But probably it'll simply tune to that frequency. I suppose one could try by using something between 2.4 GHz and 2.4835 GHz (see the spec for the actual values depending on the country). We don't know the limits of the chip though, so be careful!