core
core copied to clipboard
Wireless improvement - add 802.11n channel width (HT) options
Important notices
Before you add a new report, we ask you kindly to acknowledge the following:
- [ x] I have read the contributing guide lines at https://github.com/opnsense/core/blob/master/CONTRIBUTING.md
- [ x] I am convinced that my issue is new after having checked both open and closed issues at https://github.com/opnsense/core/issues?q=is%3Aissue
Is your feature request related to a problem? Please describe.
We cannot select on the Wireless options page on the web interface the channel width (HT) - for the wireless cards that allow this. It is quite important from a performance point of view since the drivers are not very optimized on FreeBSD compared to Linux, I use my OPNsense with wireless and works fine.
These are the channel width I can see (
ifconfig -v ath0_wlan2 list chan
Channel 1 : 2412 MHz 11b Channel 9 : 2452 MHz 11g
Channel 1 : 2412 MHz 11g Channel 9 : 2452 MHz 11g ht/20
Channel 1 : 2412 MHz 11g ht/20 Channel 9 : 2452 MHz 11g ht/40-
Channel 1 : 2412 MHz 11g ht/40+ Channel 10 : 2457 MHz 11b
Channel 2 : 2417 MHz 11b Channel 10 : 2457 MHz 11g
Channel 2 : 2417 MHz 11g Channel 10 : 2457 MHz 11g ht/20
Channel 2 : 2417 MHz 11g ht/20 Channel 10 : 2457 MHz 11g ht/40-
Channel 2 : 2417 MHz 11g ht/40+ Channel 11 : 2462 MHz 11b
Channel 3 : 2422 MHz 11b Channel 11 : 2462 MHz 11g
Channel 3 : 2422 MHz 11g Channel 11 : 2462 MHz 11g ht/20
Channel 3 : 2422 MHz 11g ht/20 Channel 11 : 2462 MHz 11g ht/40-
Channel 3 : 2422 MHz 11g ht/40+ Channel 36 : 5180 MHz 11a
Channel 4 : 2427 MHz 11b Channel 36 : 5180 MHz 11a ht/20
Channel 4 : 2427 MHz 11g Channel 36 : 5180 MHz 11a ht/40+
Channel 4 : 2427 MHz 11g ht/20 Channel 40 : 5200 MHz 11a
Channel 4 : 2427 MHz 11g ht/40+ Channel 40 : 5200 MHz 11a ht/20
Channel 5 : 2432 MHz 11b Channel 40 : 5200 MHz 11a ht/40-
Channel 5 : 2432 MHz 11g Channel 44 : 5220 MHz 11a
Channel 5 : 2432 MHz 11g ht/20 Channel 44 : 5220 MHz 11a ht/20
Channel 5 : 2432 MHz 11g ht/40+ Channel 44 : 5220 MHz 11a ht/40+
Channel 5 : 2432 MHz 11g ht/40- Channel 48 : 5240 MHz 11a
Channel 6 : 2437 MHz 11b Channel 48 : 5240 MHz 11a ht/20
Channel 6 : 2437 MHz 11g Channel 48 : 5240 MHz 11a ht/40-
Channel 6 : 2437 MHz 11g ht/20 Channel 149 : 5745 MHz 11a
Channel 6 : 2437 MHz 11g ht/40+ Channel 149 : 5745 MHz 11a ht/20
Channel 6 : 2437 MHz 11g ht/40- Channel 149 : 5745 MHz 11a ht/40+
Channel 7 : 2442 MHz 11b Channel 153 : 5765 MHz 11a
Channel 7 : 2442 MHz 11g Channel 153 : 5765 MHz 11a ht/20
Channel 7 : 2442 MHz 11g ht/20 Channel 153 : 5765 MHz 11a ht/40-
Channel 7 : 2442 MHz 11g ht/40+ Channel 157 : 5785 MHz 11a
Channel 7 : 2442 MHz 11g ht/40- Channel 157 : 5785 MHz 11a ht/20
Channel 8 : 2447 MHz 11b Channel 157 : 5785 MHz 11a ht/40+
Channel 8 : 2447 MHz 11g Channel 161 : 5805 MHz 11a
Channel 8 : 2447 MHz 11g ht/20 Channel 161 : 5805 MHz 11a ht/20
Channel 8 : 2447 MHz 11g ht/40- Channel 161 : 5805 MHz 11a ht/40-
Channel 9 : 2452 MHz 11b Channel 165 : 5825* MHz 11a
they can be setup in the cmd line:
ifconfig ath0_wlan1 channel 36:ht/40
Describe the solution you like
We need some changes in the current wireless page to allow this selection.
Describe alternatives you considered
The current alternative I am using is just configurint this after boot with a bash script.
Additional context
This ticket is related with the wireless fix that allowed 5Ghz channels to be selected: https://github.com/opnsense/core/pull/6963.
My current wireless card crashes with certain configurations (probably a driver bug on ht/20?) but I am happy to test the improvement fixes if needed.
@adamast0r increasing the heat with 6946f27 without leaving the known territory just yet. Let me know if this works for you still as I don't have an actual card to test against at the moment
BTW, do you know which one is the default? 20, 40+, 40-?
Cheers, Franco
I can confirm that still works here:
on my WLE200NX, Atheros chipset AR9280 when I don't specify the default in the command line:
ifconfig ath0_wlan1 channel 36:ht;
It seems to be going to 40+, but I assume this is vendor/model dependent....
ath0_wlan1: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0 mtu 1500
description: WirelessTestl (opt1)
ether 00:00:00:00:00:00
inet 192.168.1.1 netmask 0xffffff00 broadcast 192.168.1.255
groups: wlan
ssid WirelessTest channel 36 (5180 MHz 11a ht/40+) bssid 00:00:00:00:00:00
regdomain FCC country US ecm authmode WPA2/802.11i privacy MIXED
deftxkey 3 AES-CCM 2:128-bit AES-CCM 3:128-bit txpower 17 mcastrate 6
mgmtrate 6 scanvalid 60 ampdulimit 64k ampdudensity 8 shortgi -ldpc
-uapsd wme burst dtimperiod 1 -dfs
parent interface: ath0
media: IEEE 802.11 Wireless Ethernet autoselect mode 11na <hostap>
status: running
nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
Not entirely sure but probably the safest would by default not specify any channel width in the command line and allow the cards to go to the values they were designed to go? If the interface is selected to somehting else change to the value selected.
I read a little about the channel width and 20 MHZ appears to be the standard size (also for compatibility's sake) and avoids tainting neighbouring channels. So that's ok to use the values as presented (eventually not omitting the channel width in the ifconfig ht command to set it).
Pretty interesting: https://forums.freebsd.org/threads/wifi-operation-in-accespoint-mode-along-with-maximum-transmitter-power-in-the-bridge-with-ethenet-cards.86482/
The channel bandwidth in HT20 mode is 20 MHz, and the channel bandwidth in HT40 mode is 40 MHz. Two neighboring 20 MHz channels are bundled to form a 40 MHz channel. One channel functions as the main channel, and the other as the auxiliary channel. The main channel sends Beacon packets and data packets, and the auxiliary channel sends other packets. When the HT40 mode is used in the 2.4 GHz frequency band, there is only one non-overlapping channel. Therefore, you are not advised to use the HT40 mode in the 2.4 GHz frequency band.
Two neighboring 20 MHz channels are bundled to form a 40 MHz channel. If the center frequency of the main 20 MHz channel is higher than that of the auxiliary channel, 40MHz-plus is displayed; otherwise, 40MHz-minus is displayed. For example, if the center frequency 149 and the center frequency 153 reside on two 20 MHz channels, 149plus indicates that the two 20 MHz channels are bundled to form a 40 MHz channel