Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2022-11-23 firmware file changes break DBDC on mt7916 #720

Open
Hurricos opened this issue Dec 18, 2022 · 62 comments
Open

2022-11-23 firmware file changes break DBDC on mt7916 #720

Hurricos opened this issue Dec 18, 2022 · 62 comments

Comments

@Hurricos
Copy link

Hi there,

Recent (Nov 2022) changes to MT7916 firmware files, e.g. in linux-firmware commit cdf9499cf6706b73935a139bb5e76777a87674fe (link), break DBDC for me.

This manifests as being unable to transmit or receive from the 5/6GHz PHY on my AW7916-NPD (mt7916) through any manner. For example, stock hostapd is pointed at the card with this configuration:

config wifi-device 'radio1'     
        option type 'mac80211'
        option path 'ffe0a000.pcie/pcia000:02/a000:02:00.0/a000:03:00.0+1'
        option channel '36'                                               
        option band '5g'                                                  
        option htmode 'HE80'
        option disabled '0' 
                            
config wifi-iface 'default_radio1'
        option device 'radio1'    
        option network 'lan'      
        option mode 'ap'          
        option ssid 'AAAAAAAAAAAAAAAAA'
        option encryption 'psk2'       
        option key 'OpenWrtTest'   

... but despite not seeing any warnings when running wifi, no beacons are sent.

Tested on Extreme Networks AP3825i (mpc85xx) running OpenWrt current snapshot (r21523-4609228432).
Also tested using this board on OpenWrt 22.03.2, kmod-mt76 package version 5.10.146+2022-09-06-d7054646-4.

Reverting to firmware files from before linux-firmware's cdf9499cf6706b73935a139bb5e76777a87674fe fixes the issue.

@ryderlee1110
Copy link
Contributor

ryderlee1110 commented Dec 19, 2022

This is not an issue. We just limited it to 2+5GHz or 2+6GHz for new version. If you want to do 5+6GHz then you should stick to the previous version. Are you using AisaRF device?

@nbd168
Copy link
Member

nbd168 commented Dec 19, 2022

Is there any way to bring it back in newer firmware? Why was this limited? In my opinion this is a regression.

@LorenzoBianconi
Copy link
Contributor

LorenzoBianconi commented Dec 19, 2022 via email

@Hurricos
Copy link
Author

Hurricos commented Dec 19, 2022

This is not an issue. We just limited it to 2+5GHz or 2+6GHz for new version. If you want to do 5+6GHz then you should stick to the previous version. Are you using AisaRF device?

Yes, an AW7916-NPD.

To note, I was attempting to transmit on 2+5 or 2+6; I wasn't aware that the hardware was actually capable of 5+6, nor did I attempt it.

I did attempt only running a 5GHz and then only a 6GHz PHY, and neither were able to transmit or receive on the new firmware in those bands, although the driver did not notice any issues whatsoever.

@ryderlee1110
Copy link
Contributor

ryderlee1110 commented Dec 19, 2022

Try this. I know the 0x191 of AsiaRF is wrong.

static void mt7915_eeprom_parse_band_config(struct mt7915_phy *phy)
{
          struct mt7915_dev *dev = phy->dev;
          u8 *eeprom = dev->mt76.eeprom.data;
          u8 band = phy->mt76->band_idx;
          u32 val;

          val = eeprom[MT_EE_WIFI_CONF + band];
          val = FIELD_GET(MT_EE_WIFI_CONF0_BAND_SEL, val);

          if (!is_mt7915(&dev->mt76)) {
                   switch (val) {
                   case MT_EE_V2_BAND_SEL_5GHZ:
                             phy->mt76->cap.has_5ghz = true;
                             return;
                   case MT_EE_V2_BAND_SEL_6GHZ:
                             phy->mt76->cap.has_6ghz = true;
                             return;
                   case MT_EE_V2_BAND_SEL_5GHZ_6GHZ:
                             phy->mt76->cap.has_5ghz = true;
                             phy->mt76->cap.has_6ghz = true;  **(drop this line)**
                             return;
                   default:
                             phy->mt76->cap.has_2ghz = true;
                             return;
                   }
          } else if (val == MT_EE_BAND_SEL_DEFAULT && dev->dbdc_support) {

@NotANormalNerd
Copy link

NotANormalNerd commented Dec 27, 2022

Oh my god. I have been going crazy for a few days trying to setup hostapd with 2+5Ghz Wifi on a AW7916-NPD, because 5Ghz would just not work.

Linux version:

Linux ##### 6.0.0-0.deb11.2-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.0.3-1~bpo11+1 (2022-10-29) x86_64 GNU/Linux

hostapd version:

hostapd v2.10
User space daemon for IEEE 802.11 AP management,
IEEE 802.1X/WPA/WPA2/EAP/RADIUS Authenticator
Copyright (c) 2002-2022, Jouni Malinen <j@w1.fi> and contributors

firmware versions:

Dec 26 12:33:57 kernel: platform regulatory.0: firmware: direct-loading firmware regulatory.db.p7s
Dec 26 12:33:57 kernel: mt7915e 0000:07:00.0: firmware: direct-loading firmware mediatek/mt7916_rom_patch.bin
Dec 26 12:33:57 kernel: mt7915e 0000:07:00.0: HW/SW Version: 0x8a108a10, Build Time: 20221031154652a
Dec 26 12:33:57 kernel: mt7915e 0000:07:00.0: firmware: direct-loading firmware mediatek/mt7916_wm.bin
Dec 26 12:33:57 kernel: mt7915e 0000:07:00.0: WM Firmware Version: ____000000, Build Time: 20221031154713
Dec 26 12:33:57 kernel: mt7915e 0000:07:00.0: firmware: direct-loading firmware mediatek/mt7916_wa.bin
Dec 26 12:33:57 kernel: mt7915e 0000:07:00.0: WA Firmware Version: DEV_000000, Build Time: 20221031154757

2.4 Ghz hostapd config

# the interface used by the AP
interface=wlan0
# "g" simply means 2.4GHz band
hw_mode=g
# the channel to use
channel=0
# limit the frequencies used to those allowed in the country
ieee80211d=1
# the country code
country_code=ES
# 802.11n support
ieee80211n=1
ht_capab=[LDPC][GF][HT40+][HT40-][SHORT-GI-20][SHORT-GI-40][TX-STBC][RX-STBC1][MAX-AMSDU-7935]
# QoS support, also required for full speed on 802.11n/ac/ax
wmm_enabled=1

5 Ghz hostapd config

interface=wlan1
# "a" simply means 5GHz
hw_mode=a
# the channel to use, 0 means the AP will search for the channel with the least interferences (ACS)
channel=0
ieee80211d=1
country_code=ES

ieee80211h=1

ieee80211n=1
ht_capab=[LDPC][GF][HT40+][HT40-][SHORT-GI-20][SHORT-GI-40][TX-STBC][RX-STBC1][MAX-AMSDU-7935]
wmm_enabled=1

ieee80211ac=1
vht_capab=[MAX-MPDU-11454][VHT160][RXLDPC][SHORT-GI-80][SHORT-GI-160][TX-STBC-2BY1][RX-STBC-1][SU-BEAMFORMER][SU-BEAMFORMEE][MU-BEAMFORMER][RX-ANTENNA-PATTERN][TX-ANTENNA-PATTERN]
vht_oper_chwidth=2

Which starts up fine on 2.4Ghz. I can see the SSID on my Mac and it has the right channel width, but 5Ghz just does not send any beacon frames. I was going crazy trying to find a solution.

#~ iw dev
phy#1
	Interface wlan1
		ifindex 5
		wdev 0x100000001
		addr 00:0a:52:08:32:5d
		type AP
		channel 100 (5500 MHz), width: 160 MHz, center1: 5570 MHz
		txpower 26.00 dBm
		multicast TXQ:
			qsz-byt	qsz-pkt	flows	drops	marks	overlmt	hashcol	tx-bytes	tx-packets
			0	0	0	0	0	0	0	0		0
phy#0
	Interface wlan0
		ifindex 4
		wdev 0x1
		addr 00:0a:52:08:32:5c
		ssid somename
		type AP
		channel 1 (2412 MHz), width: 20 MHz, center1: 2412 MHz
		txpower 17.00 dBm
		multicast TXQ:
			qsz-byt	qsz-pkt	flows	drops	marks	overlmt	hashcol	tx-bytes	tx-packets
			0	0	48	0	0	0	0	23129		57

If anybody needs any debugging, please let me know what to do to try this.

@trippleflux
Copy link

trippleflux commented Dec 31, 2022

@NotANormalNerd

Did you find solutions for not working 5 Ghz in AW7916-NPD?, I am also experiences it!
Hmm, my OpenWrt is loading different firmware :

[   21.399246] mt7915e 0000:05:00.0: enabling device (0000 -> 0002)
[   21.417413] mt7915e 0000:05:00.0: disabling ASPM L0s L1
[   21.528122] mt7915e 0000:05:00.0: HW/SW Version: 0x8a108a10, Build Time: 20221031154652a
[   21.564585] mt7915e 0000:05:00.0: WM Firmware Version: ____000000, Build Time: 20221031154713
[   21.617025] mt7915e 0000:05:00.0: WA Firmware Version: DEV_000000, Build Time: 20221031154757

[EDIT]
Reverted back into 4a27f23fc4f22510db81513680666be7e72ccb61 fixed it for me.

@NotANormalNerd
Copy link

@trippleflux No, I am waiting on an answer from the maintainers of the mediatek driver. Since this seems to be either a driver problem or a hardware problem with the AsiaRF AW7916-NPD. If it is a hardware problem, then I am going to send the board back. If it is a driver problem I hope we will see a fix soon.
But since we have holidays we will have to wait a bit more.

Since I am not using OpenWRT but a vanilla Debian install, it is a bit harder for me to go back or forward in the repo here, but it is essentially the same code here and in the kernel and firmware repos.

@trippleflux
Copy link

@NotANormalNerd
For me it didn't need compiled code changes but only replacing firmware files with commit above.

On OpenWrt the firmware is located @ /lib/firmware/mediatek , I have just replaced the firmware files with mt7915_* , mt7916_* & mt7986_* and reboot, now I can uses and settings the 5 Ghz part of AW7916-NPD.

But I agree that newer or newest firmware files need to support AW7916-NPD

@ryderlee1110
Copy link
Contributor

ryderlee1110 commented Dec 31, 2022

Did you guys try my change above? The eeprom of AsiaRF is wrong.

               case MT_EE_V2_BAND_SEL_5GHZ_6GHZ:
                         phy->mt76->cap.has_5ghz = true;
                         phy->mt76->cap.has_6ghz = true;  **(drop this line)**

@trippleflux
Copy link

trippleflux commented Jan 1, 2023

@ryderlee1110

Just finished compiling & deploying latest OpenWrt snapshot for x86_64, based on your pointer, here is my patch :

--- a/mt7915/eeprom.c
+++ b/mt7915/eeprom.c
@@ -152,7 +152,6 @@
 			return;
 		case MT_EE_V2_BAND_SEL_5GHZ_6GHZ:
 			phy->mt76->cap.has_5ghz = true;
-			phy->mt76->cap.has_6ghz = true;
 			return;
 		default:
 			phy->mt76->cap.has_2ghz = true;

But the ssid shown as "Hidden Network" on Windows 11, the replacing with old firmware workaround is doesn't work anymore.

Client is Intel AX210

[EDIT]
Replacing with old firmware workaround is still working, replaced the wrong ones.

@ryderlee1110
Copy link
Contributor

@trippleflux So, is it working now?

@trippleflux
Copy link

trippleflux commented Jan 1, 2023

@ryderlee1110

Yes with old firmware but no with newest firmware, it was old firmware with your code, I was wrongly assumed that it was newest firmware, with newest firmware I am still getting the non-working 5 Ghz.

@ryderlee1110
Copy link
Contributor

I think this is most likely device issue. I'll check around.

@ryderlee1110
Copy link
Contributor

ryderlee1110 commented Jan 3, 2023

Please report this issue to AsiaRF because I don't thin any issues on my devices. Or, can you modify code to make flow go with ret = mt7915_eeprom_load_default(dev); then fallback to use default.bin to replace eeprom.

@klojsch
Copy link

klojsch commented Jan 3, 2023

Same problem here. I run a Unielec MT7623, MT7915 runs fine but the MT7916 wont do 5Ghz. Sys log looks normal, last thing i see in the log is that the DFS scan was successfull. According to luci IF is up and running. Snap build from yesterday.

Edit: MT7915 AsiaRF AW7915-NPD, MT7916 AsiaRF AW7915-NPD

Edit2: reverting the drivers back worked for me. 5ghz with 160mhz works perfect.

@nbd168
Copy link
Member

nbd168 commented Jan 3, 2023

@ryderlee1110 if this is an EEPROM issue and it's now affecting devices from multiple vendors, we will need a generic workaround in the driver. Especially since this shows up as a regression with newer firmware.

@trippleflux
Copy link

trippleflux commented Jan 3, 2023

@nbd168 @ryderlee1110

Reported to AsiaRF, thanks for looking into these, any patches is welcome to test out.

@ryderlee1110
Copy link
Contributor

ryderlee1110 commented Jan 3, 2023

Try to use default bin to rule out eeprom issue.

int mt7915_eeprom_init(struct mt7915_dev *dev)
{
	int ret;

	ret = mt7915_eeprom_load_default(dev);
	if (ret < 0)
		return ret;

@csyuanc
Copy link
Contributor

csyuanc commented Jan 6, 2023

Please help to test if this patch works, thanks.

https://gist.github.com/csyuanc/42f97e65c22e7dd21b99097fe1b96b14

@trippleflux
Copy link

trippleflux commented Jan 7, 2023

@ryderlee1110
I haven't tried your patch but thankfully @csyuanc patches is working fine for me 🥇

Thanks @csyuanc !, great work, now newest firmware files working fine.

@florisch
Copy link

florisch commented Jan 13, 2023

Thanks, having the same issue. Applied the patch 5GHz now work fine but it remove the 6GHz support.

How to get the 6GHz support back?

Edit:
I also tried the changed suggested by @ryderlee1110 but this result in the NULL pointer error below

Unable to handle kernel NULL pointer dereference at virtual address 00000000
[00000000] *pgd=00000000
Internal error: Oops - BUG: 805 [#1] PREEMPT SMP ARM
Modules linked in: mt7915e mt76_connac_lib mt76
CPU: 0 PID: 575 Comm: sh Not tainted 6.1.5-xilinx #1
Hardware name: Xilinx Zynq Platform
PC is at mmiocpy+0x54/0x334
LR is at 0x0
pc : [<c0770334>]    lr : [<00000000>]    psr: 20000013
sp : f4c85d30  ip : 00000000  fp : f4c85d40
r10: bf0377b8  r9 : 00000000  r8 : 00000000
r7 : c0c03ec8  r6 : 00000000  r5 : 00000000  r4 : 00000000
r3 : 00007916  r2 : 00000f60  r1 : f086d020  r0 : 00000000
Flags: nzCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment none
Control: 18c5387d  Table: 07dec04a  DAC: 00000051
Register r0 information: NULL pointer
Register r1 information: 1-page vmalloc region starting at 0xf086d000 allocated at kernel_read_file+0x18c/0x2ac
Register r2 information: non-paged memory
Register r3 information: non-paged memory
Register r4 information: NULL pointer
Register r5 information: NULL pointer
Register r6 information: NULL pointer
Register r7 information: non-slab/vmalloc memory
Register r8 information: NULL pointer
Register r9 information: NULL pointer
Register r10 information: 22-page vmalloc region starting at 0xbf02b000 allocated at load_module+0x970/0x169c
Register r11 information: 2-page vmalloc region starting at 0xf4c84000 allocated at kernel_clone+0xb4/0x224
Register r12 information: NULL pointer
Process sh (pid: 575, stack limit = 0x76c1f681)
Stack: (0xf4c85d30 to 0xf4c86000)
5d20:                                     00000000 c7dbb880 00000000 c7dbbf70
5d40: 00000000 c7db9880 c7db8580 bf038d04 c7ddda00 c7a6f0b5 c7db9880 c7ef1aa8
5d60: c7dbd880 00000000 c7dbb880 bf02c7fc 00000000 000e0188 000000ff c7db9880
5d80: c189c800 00000000 00000000 00000036 00000000 00000002 00000000 bf02b2d4
5da0: 00000080 bf03be40 c7db9880 00000002 00000001 c189c880 bf03d008 bf03a0d4
5dc0: c189c800 c189c8c4 005a41f0 c038be78 c189c880 00000000 bf03d044 00000000
5de0: c189c8c4 c040cf20 c189c880 bf03d044 c189c880 00000009 c189c8c4 c040d144
5e00: c0c56d48 c189c880 c189c880 c040d194 00000001 c189c880 bf03d044 f4c85e6c
5e20: c189c8c4 c040d4cc c0c03ec8 f4c85e6c c040d474 00000000 c189c8c4 c040b510
5e40: 005a41f0 c105ac6c c7fa9938 c7a6f0b5 c189c880 c189c880 00000000 c13e6c00
5e60: c0c03ec8 c040d378 c189c880 c189c880 00000000 c7a6f0b5 c189c800 c189c880
5e80: c13e6c00 c1ba0640 f4c85f20 c0380bb8 c189c800 c13e6c14 c13e6c00 c0380c54
5ea0: c13e4800 c13be014 c13be000 c0380c34 c13be000 00000001 c13be000 c0384090
5ec0: c0c03ec8 00000002 c13be000 c038c54c 00000001 c7a6f0b5 00000002 c7fa9b90
5ee0: c7fa9b80 c02529c4 00000000 00000000 00000000 c7fe0540 00000002 f4c85f70
5f00: c0c03ec8 c01f4bac 01010006 00000002 00000000 005a41f0 00000000 00000000
5f20: c7fe0540 00000000 00000000 00000000 00000000 00000000 00000000 00004004
5f40: 00000000 00000000 f4c85fb0 c7a6f0b5 10b0afa2 c7fe0540 005a41f0 f4c85f70
5f60: c0c03ec8 f4c85f7c 005a41f0 c01f4d24 00000000 00000000 b6f6a7e4 c7fe0540
5f80: 00000000 c7a6f0b5 0000006c 005a41f0 b6f6ada0 00000004 c01002c4 c7f62080
5fa0: 00000004 c0100060 0000006c 005a41f0 00000001 005a41f0 00000002 00000000
5fc0: 0000006c 005a41f0 b6f6ada0 00000004 00000002 b6f68b14 00000000 00000000
5fe0: 00000004 bee048f0 b6f05a6b b6e926c6 600e0030 00000001 00000000 00000000
 mmiocpy from mt7915_eeprom_init+0x174/0x200 [mt7915e]
 mt7915_eeprom_init [mt7915e] from mt7915_register_device+0x238/0x480 [mt7915e]
 mt7915_register_device [mt7915e] from mt7915_pci_probe+0x1b0/0x2b8 [mt7915e]
 mt7915_pci_probe [mt7915e] from pci_device_probe+0x94/0x104
 pci_device_probe from really_probe+0x144/0x2a4
 really_probe from __driver_probe_device+0xc4/0xd8
 __driver_probe_device from driver_probe_device+0x3c/0xb8
 driver_probe_device from __device_attach_driver+0x58/0xbc
 __device_attach_driver from bus_for_each_drv+0xa0/0xb4
 bus_for_each_drv from __device_attach+0xdc/0x150
 __device_attach from pci_bus_add_device+0x44/0x7c
 pci_bus_add_device from pci_bus_add_devices+0x64/0x6c
 pci_bus_add_devices from pci_bus_add_devices+0x44/0x6c
 pci_bus_add_devices from pci_rescan_bus+0x20/0x28
 pci_rescan_bus from rescan_store+0x74/0x84
 rescan_store from kernfs_fop_write_iter+0x118/0x154
 kernfs_fop_write_iter from vfs_write+0x140/0x198
 vfs_write from ksys_write+0x68/0xb4
 ksys_write from ret_fast_syscall+0x0/0x54
Exception stack(0xf4c85fa8 to 0xf4c85ff0)
5fa0:                   0000006c 005a41f0 00000001 005a41f0 00000002 00000000
5fc0: 0000006c 005a41f0 b6f6ada0 00000004 00000002 b6f68b14 00000000 00000000
5fe0: 00000004 bee048f0 b6f05a6b b6e926c6
Code: f5d1f05c f5d1f07c e8b15378 e2522020 (e8a05378)
---[ end trace 0000000000000000 ]---

@trippleflux
Copy link

trippleflux commented Jan 14, 2023

I didn't test 6 Ghz before, only 5 Ghz, ping @csyuanc @ryderlee1110 @nbd168

@trippleflux
Copy link

Testing the latest mediatek firmware files from here, looks like it haven't been fixed yet. Probably we are 'doomed' to use those old firmware files.

@ivankexko
Copy link

@NotANormalNerd
Hello.
Did you manage to get MT7916 to work on Debian?
I also have Debian, and the MT7916 does not work even in 5GHz mode.

@NotANormalNerd
Copy link

NotANormalNerd commented Jan 26, 2023

No sadly I haven't gotten it to work yet. I did have not yet have go at it, since there was no real change here.
Until Mediatek decides to support a broken customers eeprom, I think nothing much will happen.

P.S: I also got a Banana Pi R3, which also has some Mediatek chips, but works wonderful for my purposes.

@trippleflux
Copy link

trippleflux commented Jan 29, 2023

New patches by Carson has been posted in here, but I've seems cannot quite figuring it out to use it properly, the patches are originally targeting kernel 5.19.

My AsiaRF 7916 being detected as the following by hwinfo :

36: PCI 500.0: 0280 Network controller
  [Created at pci.386]
  Unique ID: y9sn.2l6miJlj0V1
  Parent ID: Phdb.PRpwMa6hOY8
  SysFS ID: /devices/pci0000:00/0000:00:1c.0/0000:02:00.0/0000:03:07.0/0000:05:00.0
  SysFS BusID: 0000:05:00.0
  Hardware Class: network
  Model: "MEDIATEK Network controller"
  Vendor: pci 0x14c3 "MEDIATEK Corp."
  Device: pci 0x7906 
  SubVendor: pci 0x14c3 "MEDIATEK Corp."
  SubDevice: pci 0x7906 
  Driver: "mt7915e"
  Driver Modules: "mt7915e"
  Device File: wlan0
  Memory Range: 0x6000000000-0x60000fffff (ro,non-prefetchable)
  Memory Range: 0x50700000-0x50707fff (rw,non-prefetchable)
  Memory Range: 0x6000100000-0x6000100fff (ro,non-prefetchable)
  IRQ: 174 (5520 events)
  HW Address: 00:0a:52:08:32:ac
  Permanent HW Address: 00:0a:52:08:32:ac
  Link detected: no
  Module Alias: "pci:v000014C3d00007906sv000014C3sd00007906bc02sc80i00"
  Config Status: cfg=new, avail=yes, need=no, active=unknown
  Attached to: #42 (PCI bridge)

From the patches notes and codes, since in OpenWrt the firmware files located in /lib/firmware/mediatek I need to create the following file in my /lib/firmware/mediatek/fwcfg-mmio-0000:05:00.0.txt or

fwcfg-<bus>-<id>.txt

with content :

high_band=5

Here is the patches for mt76 incase anyone wanted to test it (Updated 2nd time ).

0001-wifi-mt76-mt7916-Support-per-radio-configuration-firmware-file.patch

@trippleflux
Copy link

With above patches, it seems that 5G is working fine with newest firmware files but still 6G is still broken :
This is being set high_band=6 :

Wiphy phy1
        wiphy index: 1
        max # scan SSIDs: 4
        max scan IEs length: 2232 bytes
        max # sched scan SSIDs: 0
        max # match sets: 0
        Retry short limit: 7
        Retry long limit: 4
        Coverage class: 0 (up to 0m)
        Device supports AP-side u-APSD.
        Device supports T-DLS.
        Available Antennas: TX 0x3 RX 0x3
        Configured Antennas: TX 0x3 RX 0x3
        Supported interface modes:
                 * IBSS
                 * managed
                 * AP
                 * AP/VLAN
                 * monitor
                 * mesh point
                 * P2P-client
                 * P2P-GO
        Band 4:
                HE Iftypes: managed
                        HE MAC Capabilities (0x08011a000040):
                                +HTC HE Supported
                                Trigger Frame MAC Padding Duration: 2
                                OM Control
                                Maximum A-MPDU Length Exponent: 3
                                A-MSDU in A-MPDU
                        HE PHY Capabilities: (0x4c70ce126d00f3164e3f00):
                                HE40/HE80/5GHz
                                HE160/5GHz
                                242 tone RUs/5GHz
                                Device Class: 1
                                LDPC Coding in Payload
                                HE SU PPDU with 1x HE-LTF and 0.8us GI
                                NDP with 4x HE-LTF and 3.2us GI
                                STBC Tx <= 80MHz
                                STBC Rx <= 80MHz
                                Full Bandwidth UL MU-MIMO
                                Partial Bandwidth UL MU-MIMO
                                DCM Max Constellation: 2
                                DCM Max Constellation Rx: 2
                                SU Beamformee
                                Beamformee STS <= 80Mhz: 3
                                Beamformee STS > 80Mhz: 3
                                Codebook Size SU Feedback
                                Codebook Size MU Feedback
                                Triggered CQI Feedback
                                Partial Bandwidth Extended Range
                                Partial Bandwidth DL MU-MIMO
                                PPE Threshold Present
                                Power Boost Factor ar
                                HE SU PPDU & HE PPDU 4x HE-LTF 0.8us GI
                                Max NC: 2
                                20MHz in 40MHz HE PPDU 2.4GHz
                                20MHz in 160/80+80MHz HE PPDU
                                80MHz in 160/80+80MHz HE PPDU
                                DCM Max BW: 1
                                Longer Than 16HE SIG-B OFDM Symbols
                                Non-Triggered CQI Feedback
                                TX 1024-QAM
                                RX 1024-QAM
                                RX Full BW SU Using HE MU PPDU with Compression SIGB
                                RX Full BW SU Using HE MU PPDU with Non-Compression SIGB
                        HE RX MCS and NSS set <= 80 MHz
                                1 streams: MCS 0-11
                                2 streams: MCS 0-11
                                3 streams: not supported
                                4 streams: not supported
                                5 streams: not supported
                                6 streams: not supported
                                7 streams: not supported
                                8 streams: not supported
                        HE TX MCS and NSS set <= 80 MHz
                                1 streams: MCS 0-11
                                2 streams: MCS 0-11
                                3 streams: not supported
                                4 streams: not supported
                                5 streams: not supported
                                6 streams: not supported
                                7 streams: not supported
                                8 streams: not supported
                        HE RX MCS and NSS set 160 MHz
                                1 streams: MCS 0-11
                                2 streams: MCS 0-11
                                3 streams: not supported
                                4 streams: not supported
                                5 streams: not supported
                                6 streams: not supported
                                7 streams: not supported
                                8 streams: not supported
                        HE TX MCS and NSS set 160 MHz
                                1 streams: MCS 0-11
                                2 streams: MCS 0-11
                                3 streams: not supported
                                4 streams: not supported
                                5 streams: not supported
                                6 streams: not supported
                                7 streams: not supported
                                8 streams: not supported
                        PPE Threshold 0x39 0x1c 0xc7 0x71 0x1c 0x07
                EHT Iftypes: managed
                        EHT MAC Capabilities (0x0000):
                        EHT PHY Capabilities: (0x0000000000000000):
                        EHT MCS/NSS: (0x):
                        EHT bw <= 80 MHz, max NSS for MCS 8-9: Rx=0, Tx=0
                        EHT bw <= 80 MHz, max NSS for MCS 10-11: Rx=0, Tx=0
                        EHT bw <= 80 MHz, max NSS for MCS 12-13: Rx=0, Tx=0
                        EHT bw=160 MHz, max NSS for MCS 8-9: Rx=0, Tx=0
                        EHT bw=160 MHz, max NSS for MCS 10-11: Rx=0, Tx=0
                        EHT bw=160 MHz, max NSS for MCS 12-13: Rx=0, Tx=0
                HE Iftypes: AP
                        HE MAC Capabilities (0x00051a081044):
                                +HTC HE Supported
                                TWT Responder
                                BSR
                                OM Control
                                Maximum A-MPDU Length Exponent: 3
                                BQR
                                A-MSDU in A-MPDU
                                OM Control UL MU Data Disable RX
                        HE PHY Capabilities: (0x0c20ce926f12afd0000c00):
                                HE40/HE80/5GHz
                                HE160/5GHz
                                LDPC Coding in Payload
                                NDP with 4x HE-LTF and 3.2us GI
                                STBC Tx <= 80MHz
                                STBC Rx <= 80MHz
                                Full Bandwidth UL MU-MIMO
                                Partial Bandwidth UL MU-MIMO
                                DCM Max Constellation: 2
                                DCM Max Constellation Rx: 2
                                SU Beamformer
                                SU Beamformee
                                MU Beamformer
                                Beamformee STS <= 80Mhz: 3
                                Beamformee STS > 80Mhz: 3
                                Sounding Dimensions <= 80Mhz: 2
                                Sounding Dimensions > 80Mhz: 2
                                Codebook Size SU Feedback
                                Codebook Size MU Feedback
                                Triggered SU Beamforming Feedback
                                Triggered MU Beamforming Feedback
                                Partial Bandwidth Extended Range
                                PPE Threshold Present
                                Max NC: 2
                                STBC Tx > 80MHz
                                STBC Rx > 80MHz
                                TX 1024-QAM
                                RX 1024-QAM
                        HE RX MCS and NSS set <= 80 MHz
                                1 streams: MCS 0-11
                                2 streams: MCS 0-11
                                3 streams: not supported
                                4 streams: not supported
                                5 streams: not supported
                                6 streams: not supported
                                7 streams: not supported
                                8 streams: not supported
                        HE TX MCS and NSS set <= 80 MHz
                                1 streams: MCS 0-11
                                2 streams: MCS 0-11
                                3 streams: not supported
                                4 streams: not supported
                                5 streams: not supported
                                6 streams: not supported
                                7 streams: not supported
                                8 streams: not supported
                        HE RX MCS and NSS set 160 MHz
                                1 streams: MCS 0-11
                                2 streams: MCS 0-11
                                3 streams: not supported
                                4 streams: not supported
                                5 streams: not supported
                                6 streams: not supported
                                7 streams: not supported
                                8 streams: not supported
                        HE TX MCS and NSS set 160 MHz
                                1 streams: MCS 0-11
                                2 streams: MCS 0-11
                                3 streams: not supported
                                4 streams: not supported
                                5 streams: not supported
                                6 streams: not supported
                                7 streams: not supported
                                8 streams: not supported
                        PPE Threshold 0x39 0x1c 0xc7 0x71 0x1c 0x07
                EHT Iftypes: AP
                        EHT MAC Capabilities (0x0000):
                        EHT PHY Capabilities: (0x0000000000000000):
                        EHT MCS/NSS: (0x):
                        EHT bw <= 80 MHz, max NSS for MCS 8-9: Rx=0, Tx=0
                        EHT bw <= 80 MHz, max NSS for MCS 10-11: Rx=0, Tx=0
                        EHT bw <= 80 MHz, max NSS for MCS 12-13: Rx=0, Tx=0
                        EHT bw=160 MHz, max NSS for MCS 8-9: Rx=0, Tx=0
                        EHT bw=160 MHz, max NSS for MCS 10-11: Rx=0, Tx=0
                        EHT bw=160 MHz, max NSS for MCS 12-13: Rx=0, Tx=0
                HE Iftypes: mesh point
                        HE MAC Capabilities (0x00011a000040):
                                +HTC HE Supported
                                OM Control
                                Maximum A-MPDU Length Exponent: 3
                                A-MSDU in A-MPDU
                        HE PHY Capabilities: (0x0c200c0000000000008000):
                                HE40/HE80/5GHz
                                HE160/5GHz
                                LDPC Coding in Payload
                                STBC Tx <= 80MHz
                                STBC Rx <= 80MHz
                        HE RX MCS and NSS set <= 80 MHz
                                1 streams: MCS 0-11
                                2 streams: MCS 0-11
                                3 streams: not supported
                                4 streams: not supported
                                5 streams: not supported
                                6 streams: not supported
                                7 streams: not supported
                                8 streams: not supported
                        HE TX MCS and NSS set <= 80 MHz
                                1 streams: MCS 0-11
                                2 streams: MCS 0-11
                                3 streams: not supported
                                4 streams: not supported
                                5 streams: not supported
                                6 streams: not supported
                                7 streams: not supported
                                8 streams: not supported
                        HE RX MCS and NSS set 160 MHz
                                1 streams: MCS 0-11
                                2 streams: MCS 0-11
                                3 streams: not supported
                                4 streams: not supported
                                5 streams: not supported
                                6 streams: not supported
                                7 streams: not supported
                                8 streams: not supported
                        HE TX MCS and NSS set 160 MHz
                                1 streams: MCS 0-11
                                2 streams: MCS 0-11
                                3 streams: not supported
                                4 streams: not supported
                                5 streams: not supported
                                6 streams: not supported
                                7 streams: not supported
                                8 streams: not supported
                EHT Iftypes: mesh point
                        EHT MAC Capabilities (0x0000):
                        EHT PHY Capabilities: (0x0000000000000000):
                        EHT MCS/NSS: (0x):
                        EHT bw <= 80 MHz, max NSS for MCS 8-9: Rx=0, Tx=0
                        EHT bw <= 80 MHz, max NSS for MCS 10-11: Rx=0, Tx=0
                        EHT bw <= 80 MHz, max NSS for MCS 12-13: Rx=0, Tx=0
                        EHT bw=160 MHz, max NSS for MCS 8-9: Rx=0, Tx=0
                        EHT bw=160 MHz, max NSS for MCS 10-11: Rx=0, Tx=0
                        EHT bw=160 MHz, max NSS for MCS 12-13: Rx=0, Tx=0
                Frequencies:
                        * 5955 MHz [1] (12.0 dBm) (no IR)
                        * 5975 MHz [5] (12.0 dBm) (no IR)
                        * 5995 MHz [9] (12.0 dBm) (no IR)
                        * 6015 MHz [13] (12.0 dBm) (no IR)
                        * 6035 MHz [17] (12.0 dBm) (no IR)
                        * 6055 MHz [21] (12.0 dBm) (no IR)
                        * 6075 MHz [25] (12.0 dBm) (no IR)
                        * 6095 MHz [29] (12.0 dBm) (no IR)
                        * 6115 MHz [33] (12.0 dBm) (no IR)
                        * 6135 MHz [37] (12.0 dBm) (no IR)
                        * 6155 MHz [41] (12.0 dBm) (no IR)
                        * 6175 MHz [45] (12.0 dBm) (no IR)
                        * 6195 MHz [49] (12.0 dBm) (no IR)
                        * 6215 MHz [53] (12.0 dBm) (no IR)
                        * 6235 MHz [57] (12.0 dBm) (no IR)
                        * 6255 MHz [61] (12.0 dBm) (no IR)
                        * 6275 MHz [65] (12.0 dBm) (no IR)
                        * 6295 MHz [69] (12.0 dBm) (no IR)
                        * 6315 MHz [73] (12.0 dBm) (no IR)
                        * 6335 MHz [77] (12.0 dBm) (no IR)
                        * 6355 MHz [81] (12.0 dBm) (no IR)
                        * 6375 MHz [85] (12.0 dBm) (no IR)
                        * 6395 MHz [89] (12.0 dBm) (no IR)
                        * 6415 MHz [93] (12.0 dBm) (no IR)
                        * 6435 MHz [97] (12.0 dBm) (no IR)
                        * 6455 MHz [101] (12.0 dBm) (no IR)
                        * 6475 MHz [105] (12.0 dBm) (no IR)
                        * 6495 MHz [109] (12.0 dBm) (no IR)
                        * 6515 MHz [113] (12.0 dBm) (no IR)
                        * 6535 MHz [117] (12.0 dBm) (no IR)
                        * 6555 MHz [121] (12.0 dBm) (no IR)
                        * 6575 MHz [125] (12.0 dBm) (no IR)
                        * 6595 MHz [129] (12.0 dBm) (no IR)
                        * 6615 MHz [133] (12.0 dBm) (no IR)
                        * 6635 MHz [137] (12.0 dBm) (no IR)
                        * 6655 MHz [141] (12.0 dBm) (no IR)
                        * 6675 MHz [145] (12.0 dBm) (no IR)
                        * 6695 MHz [149] (12.0 dBm) (no IR)
                        * 6715 MHz [153] (12.0 dBm) (no IR)
                        * 6735 MHz [157] (12.0 dBm) (no IR)
                        * 6755 MHz [161] (12.0 dBm) (no IR)
                        * 6775 MHz [165] (12.0 dBm) (no IR)
                        * 6795 MHz [169] (12.0 dBm) (no IR)
                        * 6815 MHz [173] (12.0 dBm) (no IR)
                        * 6835 MHz [177] (12.0 dBm) (no IR)
                        * 6855 MHz [181] (12.0 dBm) (no IR)
                        * 6875 MHz [185] (12.0 dBm) (no IR)
                        * 6895 MHz [189] (12.0 dBm) (no IR)
                        * 6915 MHz [193] (12.0 dBm) (no IR)
                        * 6935 MHz [197] (12.0 dBm) (no IR)
                        * 6955 MHz [201] (12.0 dBm) (no IR)
                        * 6975 MHz [205] (12.0 dBm) (no IR)
                        * 6995 MHz [209] (12.0 dBm) (no IR)
                        * 7015 MHz [213] (12.0 dBm) (no IR)
                        * 7035 MHz [217] (12.0 dBm) (no IR)
                        * 7055 MHz [221] (12.0 dBm) (no IR)
                        * 7075 MHz [225] (12.0 dBm) (no IR)
                        * 7095 MHz [229] (12.0 dBm) (no IR)
                        * 7115 MHz [233] (12.0 dBm) (no IR)
        valid interface combinations:
                 * #{ IBSS } <= 1, #{ AP, mesh point } <= 16, #{ managed } <= 19,
                   total <= 19, #channels <= 1, STA/AP BI must match, radar detect widths: { 20 MHz (no HT), 20 MHz, 40 MHz, 80 MHz, 160 MHz }

        HT Capability overrides:
                 * MCS: ff ff ff ff ff ff ff ff ff ff
                 * maximum A-MSDU length
                 * supported channel width
                 * short GI for 40 MHz
                 * max A-MPDU length exponent
                 * min MPDU start spacing
        max # scan plans: 1
        max scan plan interval: -1
        max scan plan iterations: 0
        Supported extended features:
                * [ VHT_IBSS ]: VHT-IBSS
                * [ RRM ]: RRM
                * [ BEACON_RATE_LEGACY ]: legacy beacon rate setting
                * [ BEACON_RATE_HT ]: HT beacon rate setting
                * [ BEACON_RATE_VHT ]: VHT beacon rate setting
                * [ FILS_STA ]: STA FILS (Fast Initial Link Setup)
                * [ CQM_RSSI_LIST ]: multiple CQM_RSSI_THOLD records
                * [ CONTROL_PORT_OVER_NL80211 ]: control port over nl80211
                * [ ACK_SIGNAL_SUPPORT ]: ack signal level support
                * [ TXQS ]: FQ-CoDel-enabled intermediate TXQs
                * [ SCAN_RANDOM_SN ]: use random sequence numbers in scans
                * [ SCAN_MIN_PREQ_CONTENT ]: use probe request with only rate IEs in scans
                * [ AIRTIME_FAIRNESS ]: airtime fairness scheduling
                * [ STA_TX_PWR ]: TX power control per station
                * [ AQL ]: Airtime Queue Limits (AQL)
                * [ CONTROL_PORT_NO_PREAUTH ]: disable pre-auth over nl80211 control port support
                * [ DEL_IBSS_STA ]: deletion of IBSS station support
                * [ SCAN_FREQ_KHZ ]: scan on kHz frequency support
                * [ CONTROL_PORT_OVER_NL80211_TX_STATUS ]: tx status for nl80211 control port support
                * [ FILS_DISCOVERY ]: FILS discovery frame transmission support
                * [ UNSOL_BCAST_PROBE_RESP ]: unsolicated broadcast probe response transmission support
                * [ BEACON_RATE_HE ]: HE beacon rate support (AP/mesh)
                * [ BSS_COLOR ]: BSS coloring support
                * [ RADAR_BACKGROUND ]: Radar background support

@florisch
Copy link

@trippleflux that's surprising, I could manually apply the code changes from the patch found on patchworks on my kernel (a 6.2-rc4 from wireless-next) and successfully use the latest firmware from the linux-firmware repository in the 6GHz band.

@trippleflux
Copy link

trippleflux commented Jan 31, 2023

@florisch w00t Thanks for the confirmation, I am also doing manual merge and created that patch file for mt76, so I must be doing something wrong during that merge, would you mind if you share your applied code changes from mt7915/eeprom.c, I've meant the whole changed mt7915/eeprom.c file.

Also OpenWrt is currently using kernel 5.15, I am not really sure to which that I need to apply on the patch file, either this repo or the kernel.

Especially these lines :

static void mt7915_eeprom_parse_band_config(struct mt7915_phy *phy)
{
	struct mt7915_dev *dev = phy->dev;
	u8 *eeprom = dev->mt76.eeprom.data;
	u8 band = phy->mt76->band_idx;
	u32 val;

	val = eeprom[MT_EE_WIFI_CONF + band];
	val = FIELD_GET(MT_EE_WIFI_CONF0_BAND_SEL, val);

	if (!is_mt7915(&dev->mt76)) {
		/* fwcfg intervention to set upper band to 5GHz or 6GHz */
		if ((dev->fwcfg.flags & MT7915_FWCFG_HIGH_BAND) &&
		    val == MT_EE_V2_BAND_SEL_5GHZ_6GHZ) {
			dev_info(dev->mt76.dev, "FWCFG: Overriding 7916 high_band with %luGHz\n",
				 (unsigned long)dev->fwcfg.high_band);

			if (dev->fwcfg.high_band == 5) {
				u8p_replace_bits(&eeprom[MT_EE_WIFI_CONF + phy->mt76->band_idx],
						 MT_EE_V2_BAND_SEL_5GHZ,
						 MT_EE_WIFI_CONF0_BAND_SEL);
			}
			else if (dev->fwcfg.high_band == 6) {
				u8p_replace_bits(&eeprom[MT_EE_WIFI_CONF + phy->mt76->band_idx],
						 MT_EE_V2_BAND_SEL_6GHZ,
						 MT_EE_WIFI_CONF0_BAND_SEL);
			}

			/* force to buffer mode */
			dev->flash_mode = true;
			val = eeprom[MT_EE_WIFI_CONF + phy->mt76->band_idx];
			val = FIELD_GET(MT_EE_WIFI_CONF0_BAND_SEL, val);
		}
		switch (val) {
		case MT_EE_V2_BAND_SEL_5GHZ:
			phy->mt76->cap.has_5ghz = true;
			return;
		case MT_EE_V2_BAND_SEL_6GHZ:
			phy->mt76->cap.has_6ghz = true;
			return;
		case MT_EE_V2_BAND_SEL_5GHZ_6GHZ:
			phy->mt76->cap.has_5ghz = true;
			phy->mt76->cap.has_6ghz = true;
			return;
		default:
			phy->mt76->cap.has_2ghz = true;
			return;
		}
	} else if (val == MT_EE_BAND_SEL_DEFAULT && dev->dbdc_support) {
		val = band ? MT_EE_BAND_SEL_5GHZ : MT_EE_BAND_SEL_2GHZ;
	}

	switch (val) {
	case MT_EE_BAND_SEL_5GHZ:
		phy->mt76->cap.has_5ghz = true;
		break;
	case MT_EE_BAND_SEL_2GHZ:
		phy->mt76->cap.has_2ghz = true;
		break;
	default:
		phy->mt76->cap.has_2ghz = true;
		phy->mt76->cap.has_5ghz = true;
		break;
	}
}

@trippleflux
Copy link

@ivankexko
After changing country to Canada, I've get :

                Frequencies:
                        * 5955 MHz [1] (12.0 dBm)
                        * 5975 MHz [5] (12.0 dBm)
                        * 5995 MHz [9] (12.0 dBm)
                        * 6015 MHz [13] (12.0 dBm)
                        * 6035 MHz [17] (12.0 dBm)
                        * 6055 MHz [21] (12.0 dBm)
                        * 6075 MHz [25] (12.0 dBm)
                        * 6095 MHz [29] (12.0 dBm)
                        * 6115 MHz [33] (12.0 dBm)
                        * 6135 MHz [37] (12.0 dBm)
                        * 6155 MHz [41] (12.0 dBm)
                        * 6175 MHz [45] (12.0 dBm)
                        * 6195 MHz [49] (12.0 dBm)
                        * 6215 MHz [53] (12.0 dBm)
                        * 6235 MHz [57] (12.0 dBm)
                        * 6255 MHz [61] (12.0 dBm)
                        * 6275 MHz [65] (12.0 dBm)
                        * 6295 MHz [69] (12.0 dBm)
                        * 6315 MHz [73] (12.0 dBm)
                        * 6335 MHz [77] (12.0 dBm)
                        * 6355 MHz [81] (12.0 dBm)
                        * 6375 MHz [85] (12.0 dBm)
                        * 6395 MHz [89] (12.0 dBm)
                        * 6415 MHz [93] (12.0 dBm)
                        * 6435 MHz [97] (12.0 dBm)
                        * 6455 MHz [101] (12.0 dBm)
                        * 6475 MHz [105] (12.0 dBm)
                        * 6495 MHz [109] (12.0 dBm)
                        * 6515 MHz [113] (12.0 dBm)
                        * 6535 MHz [117] (12.0 dBm)
                        * 6555 MHz [121] (12.0 dBm)
                        * 6575 MHz [125] (12.0 dBm)
                        * 6595 MHz [129] (12.0 dBm)
                        * 6615 MHz [133] (12.0 dBm)
                        * 6635 MHz [137] (12.0 dBm)
                        * 6655 MHz [141] (12.0 dBm)
                        * 6675 MHz [145] (12.0 dBm)
                        * 6695 MHz [149] (12.0 dBm)
                        * 6715 MHz [153] (12.0 dBm)
                        * 6735 MHz [157] (12.0 dBm)
                        * 6755 MHz [161] (12.0 dBm)
                        * 6775 MHz [165] (12.0 dBm)
                        * 6795 MHz [169] (12.0 dBm)
                        * 6815 MHz [173] (12.0 dBm)
                        * 6835 MHz [177] (12.0 dBm)
                        * 6855 MHz [181] (12.0 dBm)
                        * 6875 MHz [185] (12.0 dBm)
                        * 6895 MHz [189] (12.0 dBm)
                        * 6915 MHz [193] (12.0 dBm)
                        * 6935 MHz [197] (12.0 dBm)
                        * 6955 MHz [201] (12.0 dBm)
                        * 6975 MHz [205] (12.0 dBm)
                        * 6995 MHz [209] (12.0 dBm)
                        * 7015 MHz [213] (12.0 dBm)
                        * 7035 MHz [217] (12.0 dBm)
                        * 7055 MHz [221] (12.0 dBm)
                        * 7075 MHz [225] (12.0 dBm)
                        * 7095 MHz [229] (12.0 dBm)
                        * 7115 MHz [233] (12.0 dBm)

@florisch
Copy link

florisch commented Feb 2, 2023

@trippleflux as requested in #720 (comment) here is the full eeprom.c after applying the patch that allow me to use 6GHz. The lines you mentioned seems identical.

@trippleflux
Copy link

@florisch thank you, indeed that's identical, probably it's only problematic with OpenWrt, still trying to narrow it down.

@csyuanc
Copy link
Contributor

csyuanc commented Feb 2, 2023

Hi all,

Finally we've made some modifications on the calibration parts to let 5+6 work on band1.
Please try the firmware attached and let me know if it works as the previous firmware, thanks.
mt7916_test_fw.zip

Please note that if you want to do peak performance tests, we still recommend modifying the eeprom band1 config to 5g or 6g only.

@VA1DER
Copy link

VA1DER commented Feb 4, 2023

Is it supposed to work without patches with the above-noted firmwares? Because with today's snapshot (though with none of the above patches), I cannot get either an AW7915-NPD or an AW7916-NPD to work correctly on it's "second" radio no matter what firmware I use. Both radios show up, and appear to be more or less correctly identified. I say more or less because while the 7915 displays as expected, the 7916 appears as "Generic 802.11". But with both cards the first 2.4ghz radio is identified as as 802.11axbgn, and the second 5ghz radio as 802.11acaxn. However any time I try and scan with the card's "second" radio, it (like the first radio) displays only 2.4GHz stations. In 22.03.3 scan works as expected on both radios.

With the latest snapshot I have used the firmware that came with it, along with this firmware:

[EDIT] Reverted back into 4a27f23fc4f22510db81513680666be7e72ccb61 fixed it for me.

and this firmware:

Please try the firmware attached and let me know if it works as the previous firmware, thanks.
mt7916_test_fw.zip

This is on an MT7622 device, which has its own built-in radio. My /etc/config/wireless is:

config wifi-device 'radio0'
        option type 'mac80211'
        option path 'platform/18000000.wmac'
        option channel '1'
        option band '2g'
        option htmode 'HT20'
        option disabled '1'

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

config wifi-device 'radio1'
        option type 'mac80211'
        option path '1a143000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0'
        option channel '1'
        option band '2g'
        option htmode 'HT20'
        option disabled '1'

config wifi-iface 'default_radio1'
        option device 'radio1'
        option network 'lan'
        option mode 'ap'
        option ssid 'OpenWrt'
        option encryption 'none'

config wifi-device 'radio2'
        option type 'mac80211'
        option path '1a143000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0+1'
        option channel '36'
        option band '5g'
        option htmode 'HE80'
        option disabled '1'

config wifi-iface 'default_radio2'
        option device 'radio2'
        option network 'lan'
        option mode 'ap'
        option ssid 'OpenWrt'
        option encryption 'none'

@trippleflux
Copy link

@VA1DER
Have you reboot the router after changing the firmware files?

@VA1DER
Copy link

VA1DER commented Feb 4, 2023

reboot

Yes. And verified in dmesg by the firmware date that they have been loaded. For example, this firmware mt7916_test_fw.zip produces:

[    7.972978] mt7915e 0000:01:00.0: WM Firmware Version: ____000000, Build Time: 20230202145005
[    8.055203] mt7915e 0000:01:00.0: WA Firmware Version: DEV_000000, Build Time: 20230202143332

@trippleflux
Copy link

trippleflux commented Feb 4, 2023

@VA1DER
Newest/later firmware required such patches above , try https://github.com/openwrt/mt76/tree/4a27f23fc4f22510db81513680666be7e72ccb61/firmware , did you using 160 MHz?, if yes, it's SSID requires few minutes before going up.

@csyuanc
I am still having problems with 6GHz with patches above and vanilla mt76 firmware files or your attached one, there is no SSID being shows up because of maximum transmit power listed as 255 dBm in OpenWrt Luci.

@florisch
Sorry if bothering you again, wouldn't mind to share your "iw phy" command output for your working 6GHz?, and you are using AW7916-NPD ?, do you use any extra power supply for supplying power to the AW7916-NPD module?. If you don't mind please share with me your hostapd config for the currently working 6 GHz setup. What is the OS? Debian SID?.

@VA1DER
Copy link

VA1DER commented Feb 4, 2023

https://github.com/openwrt/mt76/tree/4a27f23fc4f22510db81513680666be7e72ccb61/firmware

Yes, I originally tried this firmware. I can get it to work in AP mode, but not in client and scanning does not work on the second radio.

With the old firmware, does scanning on the second radio work for you? How about with new firmware the patches?

@csyuanc
Copy link
Contributor

csyuanc commented Feb 8, 2023

@csyuanc I am still having problems with 6GHz with patches above and vanilla mt76 firmware files or your attached one, there is no SSID being shows up because of maximum transmit power listed as 255 dBm in OpenWrt Luci.

With my attached firmware, no additional patches are needed.
I've tested following cases:

  • band1 scan shows 5g and 6g ssids
  • band1 can connect to a 5g AP and ping
  • band1 can connect to a 6g AP and ping

@trippleflux
Copy link

trippleflux commented Feb 9, 2023

@csyuanc
Did you use OpenWrt latest Snapshot ? or Other OS?

Because for me, after selecting CA/Canada as the country and save apply, and selected 6G channel, Max Transmit Power listed as 255 dBm :
6G-Latest

And 6G AP SSID doesn't shows up

@csyuanc
Copy link
Contributor

csyuanc commented Feb 9, 2023

@trippleflux

I use OpenWrt-21.02, but sync backports and mt76 version with OpenWrt trunk.
Could you replace the fw with the original release to see if this still happens in the latest OpenWrt Snapshot?

@trippleflux
Copy link

@csyuanc
Yes, It's still happening, after selecting 6G channel and apply, Max Transmit Power becoming 255 dBm

[   21.488240] mt7915e 0000:05:00.0: enabling device (0000 -> 0002)
[   21.506379] mt7915e 0000:05:00.0: disabling ASPM L0s L1
[   21.615915] mt7915e 0000:05:00.0: HW/SW Version: 0x8a108a10, Build Time: 20211230135620a
[   21.652400] mt7915e 0000:05:00.0: WM Firmware Version: ____000000, Build Time: 20211230135720
[   21.705997] mt7915e 0000:05:00.0: WA Firmware Version: DEV_000000, Build Time: 20211230135808

@Batchyx
Copy link

Batchyx commented Feb 14, 2023

I have tested the proposed firmware (HW/SW Version: 0x8a108a10, Build Time: 20230202144915a) and I can't see any performance or functional difference between this new firmware and the v21111230 firmware from linux-firmware (i.e. the one before 2022-11-23).

I tested:

  • AP and client mode on 5 GHz HE80 and 6 GHz HE160.
  • encrypted mesh point in 6 GHz HE160.

I did not test 2.4 GHz or DFS channels. And i can't find any 255 dBm weirdness in iw phy/iw dev.

My setup is:

  • Two 32bit ARM machines with AW7916-NPD modules, no heatsink yet. Temperature stays at 70°C.
  • Upstream (not openwrt) Linux 6.0 with some of my mt76 patches in this repo that shouldn't affect mt7916. I do not have ee0863aec through...
  • hostapd/wpasupplicant from git (3915e8834) with some patches to make 6 GHz mesh actually work.

@VA1DER
Copy link

VA1DER commented Mar 19, 2023

EDIT: Apologies, disregard this. The firmware seems to work fine. My problem was that I still had a kernel module installed that had the patch when I thought I had reverted.

.
I still cannot get 6GHz to work. At least not through LuCI. Are LuCI patches required for proper detection of 6GHz?

Device: Banana Pi BPI-R64 v1.2
Card: AsiaRF AW7916-NPD
Firmware: WM: 20230202145005, WA: 20230202143332

Have tried with and without this patch: https://gist.github.com/csyuanc/42f97e65c22e7dd21b99097fe1b96b14

What is needed to get 6GHz to appear in LuCI?

@FallingSnow
Copy link

FallingSnow commented Apr 1, 2023

I can confirm that a fresh snapshot from 03-31-2023 (OpenWrt SNAPSHOT r22456-75e78bcaab / LuCI Master git-23.074.82619-6ad6a24) with the mt76 drivers/firmware installed, then replacing the files in /lib/modules/mediatek with @csyuanc's mt7916_test_fw.zip fixes 5Ghz AP.

I've tested 160Mhz on channel 100 with DFS and it works as expected with great performance. Below is the results of me sitting 5 feet line of sight from the AP.

$ iperf -c 192.168.1.71
------------------------------------------------------------
Client connecting to 192.168.1.71, TCP port 5001
TCP window size: 16.0 KByte (default)
------------------------------------------------------------
[  1] local 192.168.1.53 port 44362 connected with 192.168.1.71 port 5001 (icwnd/mss/irtt=14/1448/1502)
[ ID] Interval       Transfer     Bandwidth
[  1] 0.0000-10.0337 sec  1.61 GBytes  1.38 Gbits/sec

@trippleflux
Copy link

trippleflux commented Jul 11, 2023

My new mt7915e issue moved into here.

@ibrtuyima
Copy link

@Batchyx
Could u please help and advise how did u manage to get MT7916 working in mesh mode using HE160 width.
Trying everything, never got HE160. only HE80

@Batchyx
Copy link

Batchyx commented Sep 4, 2023

@ibrtuyima I just used wpa_supplicant from git and set max_oper_chwidth=2 inside the network block in the configuration file.

@thyTwilightGoth
Copy link

Hi is there any solutions for the current 23.05 stable release?

@jayjar291
Copy link

has there been any updates to this I am trying to get wifi 6 bands to work

@NotANormalNerd
Copy link

@thyTwilightGoth @jayjar291 This has been fixed a long time ago. For me 6Ghz is working on a AW7916-NPD on OpenWRT 23.05.

You need to use WPA3 SAE (CCMP) & Management Frame protection. But then everything is working fine. Check your logs.

@Shulyaka
Copy link

Shulyaka commented Mar 13, 2024

@NotANormalNerd What did you do to make it working? Is it detected as Generic MAC80211 or MediaTek device? Does DBDC work as well?

@NotANormalNerd
Copy link

It doesn't matter if it is recognized as generic or not, that is just a txt file that maps the PCIe ID to the names. The chip you are using is not in that file yet, that is why it is generic.

DBDC works wothout problems for me on 23.05.

What does your log say?

Here is my setup: https://dennis.schmalacker.cloud/posts/openwrt-mikrotik-rbm11g-setup/

@jayjar291
Copy link

@NotANormalNerd this is what I have for my wireless config
image

config wifi-device 'radio0'
        option type 'mac80211'
        option path 'pci0000:00/0000:00:10.0'
        option channel '1'
        option band '2g'
        option htmode 'HE20'
        option disabled '1'

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

config wifi-device 'radio1'
        option type 'mac80211'
        option path 'pci0000:00/0000:00:10.0+1'
        option channel 'auto'
        option band '6g'
        option cell_density '0'
        option country 'US'
        option htmode 'HE80'

config wifi-iface 'default_radio1'
        option device 'radio1'
        option network 'lan'
        option mode 'ap'
        option ssid 'Test6g'
        option encryption 'sae'
        option key 'TESTPa$$W0RD'

and it still does not show up on any wifi 6 or 6e devices
image

and I have not found any obvious errors in the system or kernel logs
current.log

@jayjar291
Copy link

also, this is a tri-band card is there any way to enable the third band? I am hoping that I can run 1 2.4g, 5g, and a 6g band

@NotANormalNerd
Copy link

NotANormalNerd commented Mar 22, 2024

@jayjar291 Just grepping for hostapd:
grafik

Also the MT7916 is a dual band chip, but supports either 5 Ghz or 6 Ghz.

You are also missing the channel selection
grafik

Did you install the correct firmware?

opkg install kmod-mt7915e kmod-mt7916-firmware

@jayjar291
Copy link

@NotANormalNerd yes I've installed the correct firmware. I have also set the country code to US. And whenever I select the 6GHz band the channel selector disappears.

What package are you using for wpa3? I've installed the wpad-basic-openssl package

@FallingSnow
Copy link

Try setting the country to CA. Also like NotANormalNerd said, you can't use all 3 bands at once. The second band is either 5ghz or 6ghz, not both at the same time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests