[BPI-R64] mt7622 mac80211 WiFi driver

Hi, I recommend you give it a taste :smile:, and you can also compare the performance after porting.

The bootlog of Openwrt shows the addresses of each partition on eMMc:

Creating 6 MTD partitions on "eMMC":
0x000000000000-0x0000000c0000 : "mbr"
0x0000000c0000-0x000000140000 : "uboot"
0x000000140000-0x0000001c0000 : "Config"
0x0000001c0000-0x000000200000 : "Factory"
0x000000200000-0x000002200000 : "Kernel"
......
0x000002200000-0x000082200000 : "usrdata"

Since this driver hasn’t upstream yet, the firmware can’t be found in that repo. The existed mt7622pr2h.bin is for bluetooth.

I’ve put the firmware for wifi in my repo, link here.

Openwrt uses the backport version of cfg80211/mac80211, which can be retrieved here.

Also, some patches can be found at:

https://github.com/openwrt/openwrt/tree/master/package/kernel/mac80211/patches
https://github.com/openwrt/openwrt/tree/master/target/linux/mediatek
1 Like

hi,

are the mtd memory-only partitions or written to emmc? on second case i need to check if anything else is affected (preloader,head0,head1,atf,uboot,…,existing partitions BPI-BOOT/BPI-ROOT)

thank you for the firmware-files…i will try this instead :slight_smile: since it is the linux way :wink:

for the mac/cfg80211 patches, second link i found no related to this before…first one i’m searching the patches needed…have not seen the ones i got from patchwork

IEEE80211_KEY_FLAG_GENERATE_MMIE => https://patchwork.kernel.org/patch/11045085/

needs IEEE80211_KEY_FLAG_NO_AUTO_TX for applying => https://patchwork.kernel.org/patch/10860335/

“NLA_POLICY_MAX(NLA_U32, NUM_NL80211_KEYTYPES - 1)” needs this: https://patchwork.kernel.org/patch/10623157/

nl80211_ftm_responder_policy this needs this https://patchwork.kernel.org/patch/10608889/

NL80211_EXT_FEATURE_CAN_REPLACE_PTK0 => https://patchwork.kernel.org/patch/11179155/

last cannot be applied due to missing rtw88 driver…

if i apply first patch manually (ignoring the missing BIT9 value) i get undeclared IEEE80211_HW_TX_STATUS_NO_AMPDU_LEN (https://patchwork.kernel.org/patch/10767013/) which depends on string “MMPDUs on station interfaces” i don’t find any Patch on Patchwork…

i guess it’s easier to integrate in 5.4…seems 5.4 does not need any additional Patches :slight_smile: only some small fixes…

driver compiles without any issues…i guess i need only dts-changes now and then can test

btw. i suggest renaming the CONFIG-Symbol as MT7622 is not only a wifi-symbol and may collide with some other symbol…maybe something like MT7622_WIFI or similar

[   11.592573] mt7622_wmac 18000000.wmac: ASIC revision: 76220010                                                                          
[   11.599222] mt7622_wmac 18000000.wmac: Invalid MAC address, using random address 22:03:c9:0f:1b:84                                      
[   11.608243] mt7622_wmac 18000000.wmac: MAC addr = 22:03:c9:0f:1b:84                                                                     
[   11.633005] mt7622_wmac 18000000.wmac: N9 Firmware Version: _reserved_, Build Time: 20190801210351                                      
[   11.664384] Bluetooth: hci0: Device setup in 331942 usecs                                                                               
[   11.708029] mt7622_wmac 18000000.wmac: Firmware init done                                                                               
[   11.733544] mt7622_wmac 18000000.wmac: Driver own success 

4: wlan0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000                                                     
    link/ether 22:03:c9:0f:1b:84 brd ff:ff:ff:ff:ff:ff

root@bpi-r64:~# uname -a                                                                                                                   
Linux bpi-r64 5.4.0-rc1-r64 #15 SMP PREEMPT Fri Nov 22 16:04:17 CET 2019 aarch64 GNU/Linux

but hostapd gives me this:

nl80211: Set mode ifindex 4 iftype 3 (AP)                                                                                                  
nl80211: Setup AP(wlan0) - device_ap_sme=0 use_monitor=0                                                                                   
nl80211: Subscribe to mgmt frames with AP handle 0x5560da2380                                                                              
nl80211: Register frame type=0xb0 (WLAN_FC_STYPE_AUTH) nl_handle=0x5560da2380 match=                                                       
nl80211: Register frame command failed (type=176): ret=-114 (Operation already in progress)                                                
nl80211: Register frame match - hexdump(len=0): [NULL]                                                                                     
nl80211: Could not configure driver mode                                                                                                   
nl80211: deinit ifname=wlan0 disabled_11b_rates=0                                                                                          
nl80211: Remove monitor interface: refcount=0                                                                                              
nl80211: Remove beacon (ifindex=4)                                                                                                         
netlink: Operstate: ifindex=4 linkmode=0 (kernel-control), operstate=6 (IF_OPER_UP)                                                        
nl80211 driver initialization failed.

hostapd.conf:

ctrl_interface=/var/run/hostapd
#ctrl_interface_group=0 # These 2 are just parameters so that the hostap daemon$

interface=wlan0
driver=nl80211

ssid=r64_AP_1

#2.4G
hw_mode=g
channel=1
#wmm_enabled=1

starting like this:

ip addr add 192.168.19.1/24 dev wlan0
hostapd -dd /etc/hostapd/hostapd.conf

Yes, current Openwrt trunk uses backport-5.4

Thanks, I will rename it in the future update.

Was your network-manager enabled or disabled when you ran hostapd?

I guess you mean nm from gnome systems…as i have headless minimal buster image,i have no such installed…only systemd-networkd

Does ap-mode work in your system? Same config?

AFAIK, the error "nl80211: Could not configure driver mode" is usually caused by the confict between hostapd and nm…

Yes, I use uci command or Luci GUI to directly enable the ap mode. Both of them seem to dynamically generate hostapd config, but I’m not familiar with it yet.

1 Like

it looks anything started hostapd before (directly after install)…i booted again and looked via “ps ax” and saw a hostapd process…killed it, started my again, and i got AP enabled :slight_smile:

looks like it is now started by systemd…

root@bpi-r64:~# systemctl status hostapd -l                                     
hostapd.service - Advanced IEEE 802.11 AP and IEEE 802.1X/WPA/WPA2/EAP Authe
nt                                                                              
   Loaded: loaded (/lib/systemd/system/hostapd.service; enabled; vendor preset: 
   Active: inactive (dead) since Fri 2019-11-22 17:40:52 UTC; 7min ago          
  Process: 239 ExecStart=/usr/sbin/hostapd -B -P /run/hostapd.pid -B $DAEMON_OPT
 Main PID: 250 (code=exited, status=0/SUCCESS)
....

root@bpi-r64:~# grep CONF /lib/systemd/system/hostapd.service                                                                            
Environment=DAEMON_CONF=/etc/hostapd/hostapd.conf                                                                                        
ExecStart=/usr/sbin/hostapd -B -P /run/hostapd.pid -B $DAEMON_OPTS ${DAEMON_CONF}                                                        

but it uses same config, i’ve created :wink:

since i have not yet an antenna connected i don’t see the AP on my phone…but i see some frame events running through the log

1 Like

Good day! in my opinion there is not enough line in the makefile CONFIG_PACKAGE_kmod-mt7622 ? images for the test … https://drive.google.com/drive/folders/1ihHQ3Ab6pq3X24qtA3rm020VpCFW8WQc?usp=sharing Wi-Fi for some reason is trying to start at 5 GHz …

I have problem to build that mt7622 wifi driver.

/home/ubuntu/omr/bpi-r64/source/build_dir/target-aarch64_cortex-a53_musl/linux-mediatek_mt7622/mt76-2019-11-20-8103cf96/mt7615/pci.c: In function 'mt7615_pci_probe':
/home/ubuntu/omr/bpi-r64/source/build_dir/target-aarch64_cortex-a53_musl/linux-mediatek_mt7622/mt76-2019-11-20-8103cf96/mt7615/pci.c:78:5: error: 'SURVEY_INFO_TIME_BSS_RX' undeclared (first use in this function); did you mean 'SURVEY_INFO_TIME_RX'?
     SURVEY_INFO_TIME_BSS_RX,
     ^~~~~~~~~~~~~~~~~~~~~~~
     SURVEY_INFO_TIME_RX
/home/ubuntu/omr/bpi-r64/source/build_dir/target-aarch64_cortex-a53_musl/linux-mediatek_mt7622/mt76-2019-11-20-8103cf96/mt7615/pci.c:78:5: note: each undeclared identifier is reported only once for each function it appears in
scripts/Makefile.build:303: recipe for target '/home/ubuntu/omr/bpi-r64/source/build_dir/target-aarch64_cortex-a53_musl/linux-mediatek_mt7622/mt76-2019-11-20-8103cf96/mt7615/pci.o' failed
make[6]: *** [/home/ubuntu/omr/bpi-r64/source/build_dir/target-aarch64_cortex-a53_musl/linux-mediatek_mt7622/mt76-2019-11-20-8103cf96/mt7615/pci.o] Error 1
scripts/Makefile.build:544: recipe for target '/home/ubuntu/omr/bpi-r64/source/build_dir/target-aarch64_cortex-a53_musl/linux-mediatek_mt7622/mt76-2019-11-20-8103cf96/mt7615' failed
make[5]: *** [/home/ubuntu/omr/bpi-r64/source/build_dir/target-aarch64_cortex-a53_musl/linux-mediatek_mt7622/mt76-2019-11-20-8103cf96/mt7615] Error 2
Makefile:1517: recipe for target '_module_/home/ubuntu/omr/bpi-r64/source/build_dir/target-aarch64_cortex-a53_musl/linux-mediatek_mt7622/mt76-2019-11-20-8103cf96' failed
make[4]: *** [_module_/home/ubuntu/omr/bpi-r64/source/build_dir/target-aarch64_cortex-a53_musl/linux-mediatek_mt7622/mt76-2019-11-20-8103cf96] Error 2
make[4]: Leaving directory '/home/ubuntu/omr/bpi-r64/source/build_dir/target-aarch64_cortex-a53_musl/linux-mediatek_mt7622/linux-4.19.72'
Makefile:278: recipe for target '/home/ubuntu/omr/bpi-r64/source/build_dir/target-aarch64_cortex-a53_musl/linux-mediatek_mt7622/mt76-2019-11-20-8103cf96/.built' failed
make[3]: *** [/home/ubuntu/omr/bpi-r64/source/build_dir/target-aarch64_cortex-a53_musl/linux-mediatek_mt7622/mt76-2019-11-20-8103cf96/.built] Error 2
make[3]: Leaving directory '/home/ubuntu/omr/bpi-r64/source/package/kernel/mt76'
time: package/kernel/mt76/compile#7.72#1.56#12.11
package/Makefile:111: recipe for target 'package/kernel/mt76/compile' failed
make[2]: *** [package/kernel/mt76/compile] Error 2
make[2]: Leaving directory '/home/ubuntu/omr/bpi-r64/source'
package/Makefile:107: recipe for target '/home/ubuntu/omr/bpi-r64/source/staging_dir/target-aarch64_cortex-a53_musl/stamp/.package_compile' failed
make[1]: *** [/home/ubuntu/omr/bpi-r64/source/staging_dir/target-aarch64_cortex-a53_musl/stamp/.package_compile] Error 2
make[1]: Leaving directory '/home/ubuntu/omr/bpi-r64/source'
/home/ubuntu/omr/bpi-r64/source/include/toplevel.mk:216: recipe for target 'world' failed
make: *** [world] Error 2

which codebase do you use? you have to use very recent version of openwrt because you need 5.4 backport patches…thats why i did not get it compiled on 4.19…5.4 seems to work…got some antennas/cables last days but have not found yet time to connect and test if ap accept connections…only see that wifi-device is created and i can start hostapd on it

I use openmptcprouter, and the openwrt git checkout from: https://github.com/openwrt/openwrt “713561a10b6e9a7100a860651b700207223c09ef”

ok, i do not know openwrt very well…i guess the version you use have not latest backports (this commit has date 3 Months ago…5.4-rc1 is ~ 10 weeks old)

you can try adding this Patch: https://patchwork.ozlabs.org/patch/1175702/ this adds the SURVEY_INFO_TIME_BSS_RX you miss

btw. i had successfully connect to r64 using this driver in debian (after connecting a antenna to one of the 4 wifi-ports)…only a quick test (5.4-r64-main/pcie)

Yes, I have success build mt7622 module with latest openwrt source code. The latest openwrt use 4.19.86 kernel. I will try to build openwrt latest source into omr. Thank you!

@nagi, mt7622 wifi speed up to 288mbps? I have build openwrt (4.19.86 kernel) with your mt7622 module, and the wifi speed only upload 44mbps, download 68mbps. And mt7622 wifi only support 2.4G, not support 5.8G.

@bourne_hlm, thanks for the test.

which kind of client did you use?

288 Mbps is the theoretical phy rate, on 4 streams with MCS31 In my field trial test using cable, the best result I got is around 21X Mbps.

If I use my mobile, which has 2 streams with MCS15 (phy rate = 144), I usually get 70-90 Mbps on DL.

Yes, mt7622 doesn’t have 5G band.

I use my iPhone7Plus, using iperf3 to do speed test. Do you know how many streams iphone7plus have?

Hi,

Does the WiFi driver implements client mode?

I tested it to get internet via Wifi (client mode!) for BPI-R64, but failed.

Is it possible to fix that?

I dont have /dev/rfkill, by the way, maybe that is the root cause. The same command at my computer x86 works (I get connection via Wifi).

root@bpi-r64:~# wpa_supplicant -i wlan0 -c <(wpa_passphrase catbo passphrase)
Successfully initialized wpa_supplicant
rfkill: Cannot open RFKILL control device
wlan0: SME: Trying to authenticate with cc:2d:21:14:60:81 (SSID='catbo' freq=2437 MHz)
nl80211: Failed to open /proc/sys/net/ipv6/conf/wlan0/drop_unicast_in_l2_multicast: No such file or directory
nl80211: Failed to set IPv6 unicast in multicast filter
wlan0: SME: Trying to authenticate with cc:2d:21:14:60:81 (SSID='catbo' freq=2437 MHz)
nl80211: Failed to open /proc/sys/net/ipv6/conf/wlan0/drop_unicast_in_l2_multicast: No such file or directory
nl80211: Failed to set IPv6 unicast in multicast filter
wlan0: SME: Trying to authenticate with cc:2d:21:14:60:81 (SSID='catbo' freq=2437 MHz)
nl80211: Failed to open /proc/sys/net/ipv6/conf/wlan0/drop_unicast_in_l2_multicast: No such file or directory
nl80211: Failed to set IPv6 unicast in multicast filter
wlan0: SME: Trying to authenticate with cc:2d:21:14:60:81 (SSID='catbo' freq=2437 MHz)
wlan0: CTRL-EVENT-SSID-TEMP-DISABLED id=0 ssid="catbo" auth_failures=1 duration=10 reason=CONN_FAILED
nl80211: Failed to open /proc/sys/net/ipv6/conf/wlan0/drop_unicast_in_l2_multicast: No such file or directory
nl80211: Failed to set IPv6 unicast in multicast filter
^Cnl80211: Failed to open /proc/sys/net/ipv6/conf/wlan0/drop_unicast_in_l2_multicast: No such file or directory
nl80211: Failed to set IPv6 unicast in multicast filter
nl80211: Failed to open /proc/sys/net/ipv6/conf/wlan0/drop_unicast_in_l2_multicast: No such file or directory
nl80211: Failed to set IPv6 unicast in multicast filter
nl80211: deinit ifname=wlan0 disabled_11b_rates=0
wlan0: CTRL-EVENT-TERMINATING 
root@bpi-r64:~#

dmesg at the same time:

[104448.297511] wlan0: authenticate with cc:2d:21:14:60:81                                                                                                                                         
[104448.349616] wlan0: send auth to cc:2d:21:14:60:81 (try 1/3)                                                                                                                                                    
[104448.361821] wlan0: send auth to cc:2d:21:14:60:81 (try 2/3)                                                                                                                                                    
[104448.373934] wlan0: send auth to cc:2d:21:14:60:81 (try 3/3)                                                                                                                                                    
[104448.386182] wlan0: authentication with cc:2d:21:14:60:81 timed out                                                                                                                                             
[104452.541424] wlan0: authenticate with cc:2d:21:14:60:81                                                                                                                                                         
[104452.593539] wlan0: send auth to cc:2d:21:14:60:81 (try 1/3)                                                                                                                                                    
[104452.605874] wlan0: send auth to cc:2d:21:14:60:81 (try 2/3)                                                                                                                                                    
[104452.617989] wlan0: send auth to cc:2d:21:14:60:81 (try 3/3)                                                                                                                                                    
[104452.630210] wlan0: authentication with cc:2d:21:14:60:81 timed out                                                                                                                                             
[104457.185530] wlan0: authenticate with cc:2d:21:14:60:81                                                                                                                                                         
[104457.237700] wlan0: send auth to cc:2d:21:14:60:81 (try 1/3)                                                                                                                                                    
[104457.249998] wlan0: send auth to cc:2d:21:14:60:81 (try 2/3)                                                                                                                                                    
[104457.262245] wlan0: send auth to cc:2d:21:14:60:81 (try 3/3)                                                                                                                                                    
[104457.274466] wlan0: authentication with cc:2d:21:14:60:81 timed out                                                                                                                                             
[104462.333487] wlan0: authenticate with cc:2d:21:14:60:81                                                                                                                                                         
[104462.385575] wlan0: send auth to cc:2d:21:14:60:81 (try 1/3)                                                                                                                                                    
[104462.397729] wlan0: send auth to cc:2d:21:14:60:81 (try 2/3)                                                                                                                                                    
[104462.410166] wlan0: send auth to cc:2d:21:14:60:81 (try 3/3)                                                                                                                                                    
[104462.422325] wlan0: authentication with cc:2d:21:14:60:81 timed out                                                                                                                                             

i tried using this driver in linux 5.5 to test client-mode (added rfkill in my local repo). but i can’t get wifi working

[    6.430384] mt7622_wmac 18000000.wmac: ASIC revision: 76220010               
[    6.477544] mt7622_wmac 18000000.wmac: Invalid MAC address, using random addr
ess 92:ba:4c:49:e4:af                                                           
[    6.546282] mt7622_wmac 18000000.wmac: MAC addr = 92:ba:4c:49:e4:af          
[    6.560631] mt7622_wmac 18000000.wmac: Failed to get patch semaphore         
[    6.572500] mt7622_wmac: probe of 18000000.wmac failed with error -11        
root@bpi-r64:~#

with 5.4-new (i renamed to 5.4-main) (same filesystem) i get here:

[    5.031844] mt7622_wmac 18000000.wmac: ASIC revision: 76220010               
[    5.054045] mt7622_wmac 18000000.wmac: Invalid MAC address, using random addr
ess 0a:15:88:bd:cb:e9                                                           
[    5.096887] mt7622_wmac 18000000.wmac: MAC addr = 0a:15:88:bd:cb:e9          
[    5.123086] mt7622_wmac 18000000.wmac: N9 Firmware Version: _reserved_, Build
 Time: 20190801210351                                                           
[    5.178647] mt7622_wmac 18000000.wmac: Firmware init done                    
[    5.202432] mt7622_wmac 18000000.wmac: Driver own success

tried recompiling 5.4-main and ran into same problem…looks like module is loaded to fast (but time is 1 sec later than old 5.4-new tree, so something seems blocking)…i unloaded module and loaded it again. after that i got

mt7622_wmac 18000000.wmac: Driver own success

@nagi any idea how to fix this?

@Ilya_Murav_jov with rfkill (and stopping hostapd-service) i get this using your command

root@bpi-r64:~# wpa_supplicant -i wlan0 -c <(wpa_passphrase bssid passphrase)                                                                              
Successfully initialized wpa_supplicant                                         
wlan0: CTRL-EVENT-REGDOM-CHANGE init=BEACON_HINT type=UNKNOWN                   
wlan0: SME: Tryi[  989.854265] wlan0: authenticate with 02:08:22:f6:ef:fb       
ng to authenticate with 02:08:22:f6:ef:fb (SSID='r2_AP0' freq=2472 MHz)         
[  989.892684] wlan0: send auth to 02:08:22:f6:ef:fb (try 1/3)                  
[  989.901065] wlan0: authenticated                                             
wlan0: Trying to associate with 02:08:22:f6:ef:f[  989.910216] wlan0: associate 
with 02:08:22:f6:ef:fb (try 1/3)                                                
b (SSID='r2_AP0' freq=2472 MHz)                                                 
[  989.921388] wlan0: RX AssocResp from 02:08:22:f6:ef:fb (capab=0x431 status=0 
aid=3)                                                                          
[  989.957801] wlan0: associated                                                
wlan0: Associated with 02:08:22:f6:ef:fb                                        
wlan0: CTRL-EVENT-SUBNET-STATUS-UPDATE status=0                                 
wlan0: WPA: Key [  990.587491] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link become
s ready                                                                         
negotiation completed with 02:08:22:f6:ef:fb [PTK=CCMP GTK=CCMP]                
wlan0: CTRL-EVENT-CONNECTED - Connection to 02:08:22:f6:ef:fb completed [id=0 id
_str=] 

but it seems i need to run manually dhclient to obtain an ip-address…

so only rfkill is missing (and module_unload)…i add to my 5.4-tree

Felix just merged mt7622 related patches into mt76 github and openwrt trunk. you can try this up-to-date driver, thanks.

https://github.com/openwrt/mt76/commits/master https://github.com/openwrt/openwrt/commit/8216766ad97db2f20e30b6622343d8d473ad9d68

i see no mt7622 driver in master/mt7622-branch

It looks like it’s part of 7615…

Is it compatible with my current dts-node? still wondering why root and some others (mt76x0,76x2,7603) do not have a Kconfig file…and still the problem with trace.o (trace.h not found)

after fixing this, i get this on 5.4 with this driver:

drivers/net/wireless/mediatek/mt76_new/mac80211.c: In function 'mt76_phy_init':
drivers/net/wireless/mediatek/mt76_new/mac80211.c:286:31: error: 'NL80211_EXT_FEATURE_AQL' undeclared (first use in this function); did you mean 'NL80211_EXT_FEATURE_TXQS'?
  wiphy_ext_feature_set(wiphy, NL80211_EXT_FEATURE_AQL);
                               ^~~~~~~~~~~~~~~~~~~~~~~
                               NL80211_EXT_FEATURE_TXQS
drivers/net/wireless/mediatek/mt76_new/mac80211.c:286:31: note: each undeclared identifier is reported only once for each function it appears in
drivers/net/wireless/mediatek/mt76_new/mac80211.c: In function 'mt76_airtime_report':
drivers/net/wireless/mediatek/mt76_new/mac80211.c:760:12: error: implicit declaration of function 'ieee80211_calc_rx_airtime'; did you mean 'ieee80211_check_tim'? [-Werror=implicit-function-declaration]
  airtime = ieee80211_calc_rx_airtime(dev->hw, &info, len);
            ^~~~~~~~~~~~~~~~~~~~~~~~~
            ieee80211_check_tim

for first i need this commit: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/include/uapi/linux/nl80211.h?id=911bde0fe5ccd7e55760be9d6dcc67a8850fcc12 => i cannot apply without conflicts in 5/6 files (include/uapi/linux/nl80211.h,net/mac80211/debugfs_sta.c,net/mac80211/main.c,net/mac80211/sta_info.c,net/mac80211/tx.c). except the debugfs-file i have solved them…but this one is tricky (and many changes overlapping)

for second https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/include/net/mac80211.h?id=db3e1c40cf2f973fbdd52ae0b59a9472b1c04f4a

after fixing them…there are many new errors…so new driver not usable for me (at least in 5.4)

net/mac80211/main.c: In function 'ieee80211_alloc_hw_nm':
net/mac80211/main.c:673:7: error: 'struct ieee80211_local' has no member named 'aql_threshold'
  local->aql_threshold = IEEE80211_AQL_THRESHOLD;
       ^~
net/mac80211/main.c:673:25: error: 'IEEE80211_AQL_THRESHOLD' undeclared (first use in this function); did you mean 'IEEE80211_MAX_RTS_THRESHOLD'?
  local->aql_threshold = IEEE80211_AQL_THRESHOLD;
                         ^~~~~~~~~~~~~~~~~~~~~~~
                         IEEE80211_MAX_RTS_THRESHOLD
net/mac80211/main.c:673:25: note: each undeclared identifier is reported only once for each function it appears in
net/mac80211/main.c:674:19: error: 'struct ieee80211_local' has no member named 'aql_total_pending_airtime'
  atomic_set(&local->aql_total_pending_airtime, 0);
                   ^~
scripts/Makefile.build:265: recipe for target 'net/mac80211/main.o' failed
make[2]: *** [net/mac80211/main.o] Error 1
make[2]: *** Waiting for unfinished jobs....
  CC [M]  net/wireless/sysfs.o
net/mac80211/sta_info.c: In function 'ieee80211_sta_update_pending_airtime':
net/mac80211/sta_info.c:1908:25: error: 'struct airtime_info' has no member named 'aql_tx_pending'
        &sta->airtime[ac].aql_tx_pending);
                         ^
net/mac80211/sta_info.c:1910:32: error: 'struct ieee80211_local' has no member named 'aql_total_pending_airtime'
   atomic_add(tx_airtime, &local->aql_total_pending_airtime);
                                ^~
net/mac80211/sta_info.c:1916:30: error: 'struct airtime_info' has no member named 'aql_tx_pending'
             &sta->airtime[ac].aql_tx_pending);
                              ^
net/mac80211/sta_info.c:1920:36: error: 'struct airtime_info' has no member named 'aql_tx_pending'
    atomic_cmpxchg(&sta->airtime[ac].aql_tx_pending,
                                    ^
net/mac80211/sta_info.c:1925:18: error: 'struct ieee80211_local' has no member named 'aql_total_pending_airtime'
            &local->aql_total_pending_airtime);
                  ^~
net/mac80211/sta_info.c:1930:24: error: 'struct ieee80211_local' has no member named 'aql_total_pending_airtime'
   atomic_cmpxchg(&local->aql_total_pending_airtime,
                        ^~
scripts/Makefile.build:265: recipe for target 'net/mac80211/sta_info.o' failed

any chance to fix only the mt7622 semaphore issue? as far as i see it checks status and this failes…maybe a sleep/delay may help?

For kernel 5.5

I’m not sure what’s going on in kernel 5.5, but I’ve got the same error at getting patch semaphore before, which is due to power-domain not enabled.

This may need to be verified, have you noticed any change on this part?

For kernel 5.4 and latest mt76

  1. For the AQL flag, you can try some of these patches, which backport the AQL support to 5.4

  2. For the latest mt7622_wmac dts node, please refer this patch. Also, mt7622/mt7615e share the same module mt7615e.ko

  3. For the problem you need to “unload and load” the module once, does it happen only on using wpa_supplicant or also on hostapd?