A wireless chip containing dual-band(2.4G and 5G) only generate 5G configuration in OpenWrt, but cannot generate 2.4G configuration

There is only one WIFI chip on my router, but it contains dual-band(2.4G and 5G), but only 5G wireless configuration can be generated in OpenWRT. The wireless configuration of 2.4G cannot be generated. Because it is considered in /lib/wifi/mac80211.sh script: A PHY device can only correspond to a 2.4G or 5G band, and only get the information of the last frequency band in a PHY device through the "get_band_defaults" function, but there is only one PHY0 device in the /sys/class/ieee80211 of my router. The information of 2.4G and 5G can be obtained through the "iw phy phy0 info" command, as follows:

# iw phy phy0 info
Wiphy phy0
        Supported interface modes:
                 * AP
        Band 1:
                Capabilities: 
                Frequencies:
                        * 2412 MHz [1] (30.0 dBm)
                        * 2417 MHz [2] (30.0 dBm)
                        * 2422 MHz [3] (30.0 dBm)
                        * 2427 MHz [4] (30.0 dBm)
                        * 2432 MHz [5] (30.0 dBm)
                        * 2437 MHz [6] (30.0 dBm)
                        * 2442 MHz [7] (30.0 dBm)
                        * 2447 MHz [8] (30.0 dBm)
                        * 2452 MHz [9] (30.0 dBm)
                        * 2457 MHz [10] (30.0 dBm)
                        * 2462 MHz [11] (30.0 dBm)
                        * 2467 MHz [12] (30.0 dBm)
                        * 2472 MHz [13] (30.0 dBm)
                        * 2484 MHz [14] (30.0 dBm)
        Band 2:
                Capabilities: 
                VHT Capabilities:
                VHT RX MCS set:
                VHT RX highest supported: 0 Mbps
                VHT TX MCS set:
                VHT TX highest supported: 0 Mbps
                Frequencies:
                        * 5180 MHz [36] (30.0 dBm)
                        * 5200 MHz [40] (30.0 dBm)
                        * 5220 MHz [44] (30.0 dBm)
                        * 5240 MHz [48] (30.0 dBm)
                        * 5260 MHz [52] (30.0 dBm)
                        * 5280 MHz [56] (30.0 dBm)
                        * 5300 MHz [60] (30.0 dBm)
                        * 5320 MHz [64] (30.0 dBm)
                        * 5500 MHz [100] (30.0 dBm)
                        * 5520 MHz [104] (30.0 dBm)
                        * 5540 MHz [108] (30.0 dBm)
                        * 5560 MHz [112] (30.0 dBm)
                        * 5580 MHz [116] (30.0 dBm)
                        * 5600 MHz [120] (30.0 dBm)
                        * 5620 MHz [124] (30.0 dBm)
                        * 5640 MHz [128] (30.0 dBm)
                        * 5660 MHz [132] (30.0 dBm)
                        * 5680 MHz [136] (30.0 dBm)
                        * 5700 MHz [140] (30.0 dBm)
                        * 5720 MHz [144] (30.0 dBm)
                        * 5745 MHz [149] (30.0 dBm)
                        * 5765 MHz [153] (30.0 dBm)
                        * 5785 MHz [157] (30.0 dBm)
                        * 5805 MHz [161] (30.0 dBm)
                        * 5825 MHz [165] (30.0 dBm)
                        * 4920 MHz [184] (33.0 dBm)
                        * 4940 MHz [188] (33.0 dBm)
                        * 4960 MHz [192] (33.0 dBm)
                        * 4980 MHz [196] (33.0 dBm)

WiFi configuration:

cat /etc/config/wireless

config wifi-device 'radio0'
        option type 'mac80211'
        option macaddr '01:04:06:4e0:06:00'
        option channel '36'
        option band '5g'
        option htmode 'VHT80'
        option disabled '0'

config wifi-iface 'default_radio0'
        option device 'radio0'
        option network 'lan'
        option mode 'ap'
        option ssid 'OpenWrt'
        option encryption 'none'

How can I generate 2.4G and 5G configuration in OpenWrt at the same time when there is only one wireless chip but containing dual-band(2.4G and 5G)?
Thanks.

Details matter, a lot.

  • what device
  • what wireless chipset

The chip logo is covered. I don’t know which chip it is. I want to ask if there are other chips in OpenWrt like me? How did it solve this problem?

It really depends on the device/ chipset.

The classic mantra would be, one radio, one (concurrent-) channel - so you could either do 2.4 GHz XOR 5 GHz.

Quite recently, some DBDC (dual band, dual concurrent) chipsets have entered the stage, but these need very recent driver support and may not be totally problem free yet (to the OS, these are mostly exposed as two (almost) independent cards), but really - no point guessing, without knowing driver/ chipset and the (unabbreviated) iw info, as I would expect the interface combinations to be a but more telling).

Do you mean that I should divide two PHY in the WiFi driver? Does the other WiFi6 chip also divide two PHYs? One corresponding to 2.4G and the other corresponding 5G.

I don't mean anything, it depends on the hardware.

That doesn't look right because there's no option path in the config, and option macaddr belongs in a wifi-iface.

Suggest removing /etc/config/wireless then reboot to make it regenerate defaults. Then make sure to set your country for the radio option country ZZ in the wifi-device.

This is selectable dual band, so there's always just one wifi-device section. Change band to 2g and select a channel and htmode compatible with 2.4 to operate in 2.4 GHz.

I want 2.4G and 5G to work at the same time. How to generate 2.4G and 5G configuration at the same time when only one phy in the/sys/class/IEEE80211?

Read the boot log or run lspci (in the pciutils pcakage).

The iw list says its dual band selectable, which is typical of laptop cards and USB dongles. Such hardware is not capable of operating on both bands simultaneously.

The WiFi chip is RSDB, which can work at the same time at 2.4G and 5G.

I use manual ways to start hostapd, so that 2.4G and 5G have started at the same time.

In my opinion, the reasonable solution is that WiFi driver should registers two PHYs, one for 2.4G, one for 5G. Just like the mt76's code for supporting DBDC, am I right?