Wi-Fi hwmode values seems to be out-dated

I followed this guide [OpenWrt Wiki] Wi-Fi /etc/config/wireless to configure my router.
In this document, it says:

Name Type Required Default Description
hwmode string no (driver default) Selects the wireless protocol to use, possible values are 11b, 11g, and 11a. Note that 11ng and 11na are not available options, see ticket 17541.

I think this description is outdated because it mentioned nothing of 802.11ac and 802.11ax.( I know 802.11ax support is still in SNAPSHOT stage.)
Below table is my understanding for the document. Correct me if I'm wrong.

Value Wi-Fi Mode Comment
11b 802.11b only
11g 802.11b/g According to ticket 17541, this value can also represent 802.11b/g/n(2.4GHz)
11a 802.11a only According to ticket 17541, this value can also represent 802.11a/n(5GHz)
11ng 802.11b/g/n(2.4GHz) According to ticket 17541, you should fall back to value 11g
11na 802.11a/n(5GHz) According to ticket 17541, you should fall back to value 11a
??? 802.11a/n/ac(5GHz) What value shall we use???
??? 802.11b/g/n/ax(2.4GHz) What value shall we use???
??? 802.11a/n/ac/ax(5GHz) What value shall we use???

BTW, are there any value for "802.11g only", "802.11n only", "802.11ac only", "802.11ax only"?

Weird coincidence that you ask this in the same day that someone already pointed out that the wiki is outdated:

Your list is not correct, and the comments should really disappear in favour of just correcting the table.
To simplify the list a little, the valid hwmodes are:

  • bg (2.4ghz with legacy mode)
  • a (5ghz)
  • ad (60ghz)
  • b (2.4ghz legacy only)
  • g (2.4ghz)

To put it another way, hwmode is for selecting the band.
htmode is for selecting your extensions like 802.11n, ac or ax.
htmodes are:

  • NOHT (just plain old g/a mode)
  • HT20/HT40/HT40+/HT40- (802.11n on g/a mode)
  • VHT20/40/80/160 (802.11ac on a mode only, it doesn't exist on g) [1]
  • HE20/40/80/160 (802.11ax on g/a mode) [2]

[1] Some manufacturers have used VHT on g mode to indicate special settings like "turboQAM" or similar vendor only IEs
[2] Only up to HE40 is supported on g mode

And technically there is VHT80P80 and HE80P80 which OpenWrt hasn't added support for either.

g only = NOHT
n only = HTx and set require_mode to n
ac only = VHTx and set require_mode to ac
ax only = Not yet implemented, but assume the pattern continues.

As a special note, while 11na and 11ng are invalid modes, it looks like there is code in the wifi setup routine that attempts to fix this mistake for users. This would still be considered invalid and this helper function could disappear without warning.


Thanks for your information. Now I know how to configure my wireless configuration.

Actually, I did a search for similar content in this forum YESTERDAY, and I found nothing. What a coincidence!
Maybe I took too long writing this thread. :slight_smile:

1 Like

Well, both threads are different. This one here is about the option hwmode in the list. My one is about mentioning hwmode at other places in the Wiki. The hwmode is just about the band – it is a pass-through to the tool hostapd, with fail-overs for invalid values as lantis1008 mentioned. Although I am unsure what this different between ‘b’, ‘bg’ and ‘g’. Perhaps another fail-over? Does anyone know the source code for that?

I am scratching my head for that as well. The suggested option require_mode n is just about requiring N in the client. It does not avoid G clients to try to connect. Nor does it enable a Greenfield mode some chipset have. The configuration file /etc/config/wireless allows option greenfield 1 and list ht_capab GF. Even after enabling both, it does not end-up in the option ht_capab of the configuration file /var/run/hostapd-phy0.conf. I have no idea what I am doing wrong. It should at least show up there. The next step would be checking the SSID beacons on air. I guess, I have to debug the script netifd/wireless/mac80211.sh which does that pass-through in the next few days.

Asked differently: Has anyone used Greenfield successfully, with which chipset? Sorry, wsy, for hijacking your thread. But it matches my other issue, I was still working at.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.