openwrt / mt76

mac80211 driver for MediaTek MT76x0e, MT76x2e, MT7603, MT7615, MT7628 and MT7688
752 stars 343 forks source link

MT7915E Incorrectly Trying to use 6 GHz Band 23.05.4 r24012-d8dd03c46f #919

Open bai-yi-bai opened 2 months ago

bai-yi-bai commented 2 months ago

Hi,

I have three Xiaomi Redmi Router AX6S units with Mediatek/mt7622+MT7915E radios. These are 802.11b/g/n 2.4 GHz and 802.11ac/ax/n 5 GHz capable devices. Two were set up for fast roaming and to provide better coverage. I had disabled DHCP on both. One is a spare/travel router.

I had installed OpenWrt 22.03.5 r20134-5f15225c1e / LuCI openwrt-22.03 branch git-23.093.57104-ce20b4a a very long time ago. About a week ago, I decided it was time to upgrade two of the units in the hopes of improved performance. I upgrade to OpenWrt 23.05.4 r24012-d8dd03c46f / LuCI openwrt-23.05 branch git-24.086.45142-09d5a38. Within hours, I began receiving complaints that Wi-Fi was working or working intermittently.

Today, I decided to investigate and discovered that one of the APs had no clients connecting to it on either band. My clients were still only connecting to the other working AP. In addition, the wireless network was set as "disabled". Restarting it had no effect.

Looking more closely, I see that the frequencies it is attempting to operate on are incorrect. image

This should be in the 5 GHz band. According to wikipedia, channel 48 should be: 5240 MHz with a frequency range of 5230–5250 MHz with a 20 MHz bandwith.

I upgraded the spare device to the same firmware and was able to reproduce the result. I tried channel 120 which should be 5600 MHz which a frequency range of 5590-5610 MHz with a 20 MHz bandwidth, but it is 6.550 GHz

These are "Wi-Fi 6" devices, not "Wi-Fi6E" device... they don't have the ability to use the 6 GHz band.

bai-yi-bai commented 2 months ago

Small update: I tried going all the way back to openwrt-23.05.0-mediatek-mt7622-xiaomi_redmi-router-ax6s-squashfs-sysupgrade.bin and I encountered the same issue. I will revert back to 22.03.5

wlshdjj commented 2 months ago

Please upload the syslog about mt76.

danpawlik commented 2 months ago

Solved here: https://github.com/openwrt/openwrt/issues/16468

almazkairat commented 1 month ago

We have a problem with the MT7915 radio. Sometimes it switches to the 6 GHz band instead of the selected channel. I find this issue in the HE20/HE40/HE80 MHz modes, across different regions and channels that I have tested. I tested it using the command ubus hostapd switch_chan, as well as through the config file. I discovered that the AM region is mostly garbaged. I mainly use the KZ and CN regions, and everything is almost fine there.

I also conducted some experiments with the mt76 driver and tried to disable the transition to 6 GHz wherever it seemed possible to me. And I feel that it sometimes works, but not always. But with the given config, I always get 6 GHz:

config wifi-device 'radio1'
        ...
        option channel '36'
        option band '5g'
        option htmode 'HE40'
        option txpower '20'
        option country 'AM'
        ...

I also noticed a strange way to achieve operation at the required frequency, bandwidth, and region. If you make many attempts to switch (ubus hostapd switch_chan) to random channels, at some point it is possible to set the desired configuration. I stumbled upon this while running my script, which switches to a random channel with bandwidth every 2 seconds.

Forexample:

ubus call hostapd.wlan1 switch_chan "{'freq':5180,'bcn_count':10,'bandwidth':40,'sec_channel_offset':0,'ht':true,'he':true}"

I even tried to ban 6GHz via device tree. But it doesn't work for me.

&pcie0 {
    wifi@0,0 {
        compatible = "mediatek,mt76";
        reg = <0x0000 0 0 0 0>;
        mediatek,mtd-eeprom = <&factory 0x0>;
        nvmem-cells = <&macaddr_factory_e00c>;
        nvmem-cell-names = "mac-address";
        ieee80211-freq-limit = <5000000 6000000>;
    };
};

The issue with switching to 6 GHz occurs in all versions of OpenWRT v21.02.0-rc1 and later.

Is there anyone in the community who cares, understands this, and can help? Maybe you have a firmware fix, ideas or some workaround?