[BPI-R64] mt7622 mac80211 WiFi driver

The mac80211 driver of MT7622 built-in WiFi is now available for newer kernel on bpi-r64.

Note that it is only tested on Openwrt trunk with kernel 4.19 currently, you can follow this guide to change the default kernel version.

The following parts will focus on how to build an Openwrt image with mt7622 wifi enabled.

Source code

mt76 driver with mt7622 built-in WiFi supported

Necessary Files

All the following files are attached, please download them first.

  • dts patches: for enabling wmac interface
  • mt76 Makefile: add mt7622 kernel module to menuconfig
  • eeprom binary: write default wifi configs into factory partition

Apply patch

Please apply the patch for mt7622 wifi by copying 1000-mt7622-dts-support-emmc-wifi.patch into the following path:

target/linux/mediatek/patches-4.19

The patch is used for enabling wmac interface and specifying eMMC partitions.

Config WiFi and eMMC

  1. For basic configs and steps of building bpi-r64, please also refer to this guide.

  2. Replace package/kernel/mt76/Makefile with the attached Makefile.

  3. Type make menuconfig, and the option kmod-mt7622 can be seen at:

    Kernel modules -> Wireless Drivers -> kmod-mt7622
    
  4. (Optional) Enable the following configs with make kernel_menuconfig, it makes mtd partitions of eMMC work normally.

    CONFIG_MMC=y
    CONFIG_MMC_BLOCK=y
    CONFIG_MMC_MTK=y
    CONFIG_MTD_BLOCK2MTD=y
    CONFIG_MTD_CMDLINE_PARTS=y
    

Note that you can just boot the system via initramfs-kernel.bin, on which the mt7622 wifi also works, but if you want to boot with squashfs-sysupgrade.bin, these configs must be set.

  1. Save and exit

Build image

  1. make -j

  2. copy .bin file to your default folder of tftp server, and boot

    bin/targets/mediatek/mt7622/openwrt-mediatek-mt7622-BPI-R64-initramfs-kernel.bin
    (choose *1. System Load Linux to SDRAM via TFTP.* in uBoot menu)
    
    or
    
    bin/targets/mediatek/mt7622/openwrt-mediatek-mt7622-BPI-R64-squashfs-sysupgrade.bin
    (choose *2. System Load Linux Kernel then write to Flash via TFTP.* in uBoot menu)
    
  3. If you boot and load the mt7622 module correctly, you may find the bootlog shows something wrong during eeprom loading. Please refer to the next section.

Update eeprom

The factory partition of bpi-r64 may be empty in some devices, so we need to manually provide a binary to the partition. Just need to do it once.

  1. Check the mtd partitions (on Openwrt). In this example, the "Factory" partition is on mtd3

    root@OpenWrt:/# cat /proc/mtd
    dev:        size      erasesize  name
    mtd0: 000c0000 00010000 "mbr"
    mtd1: 00080000 00010000 "uboot"
    mtd2: 00080000 00010000 "Config"
    mtd3: 00040000 00010000 "Factory"
    mtd4: 02000000 00010000 "Kernel"
    mtd5: 00270000 00010000 "kernel"
    mtd6: 01d80000 00010000 "rootfs"
    mtd7: 013d0000 00010000 "rootfs_data"
    mtd8: 80000000 00010000 "usrdata"
    
  2. Write MT7622_EEPROM.bin into the partition /dev/mtd3

    dd if=MT7622_EEPROM.bin of=/dev/mtd3
    
  3. Reboot, the error related to eeprom should be fixed

Some demos

Related bootlog

mt7622_wmac 18000000.wmac: ASIC revision: 76220010
mt7622_wmac 18000000.wmac: MAC addr = 00:0c:43:26:60:50
mt7622_wmac 18000000.wmac: HW/SW Version: 0x8a108a10, Build Time: 20190801210006a

mt7622_wmac 18000000.wmac: N9 Firmware Version: _reserved_, Build Time: 20190801210351
mt7622_wmac 18000000.wmac: Firmware init done
mt7622_wmac 18000000.wmac: Driver own success
ieee80211 phy0: Selected rate control algorithm 'minstrel_ht'

Test results

Peak: (phy rate = 288.9 Mbps)


1000-mt7622-dts-support-emmc-wifi.patch (3.2 KB)

(Updated)1000-mt7622-dts-support-emmc-wifi.patch (3.3 KB)

Makefile_mt76.txt (7.7 KB)

MT7622_EEPROM.bin (1 KB)

4 Likes

hi,

first thank you for your work on the driver.

as i’m not using openwrt, i will try to get it working on debian/ubuntu…

where are the mtd-partitions located? are these depending on partitiontable (sd/emmc)? can the firmware simply be loaded from /lib/firmware/mediatek like other firmware?

as it calls request_firmware, it should also load from /lib/firmware

./mt7622/mt7622.h:29:#define MT7622_FIRMWARE_N9		"mediatek/mt7622_n9.bin"
./mt7622/mt7622.h:30:#define MT7622_ROM_PATCH		"mediatek/mt7622_rom_patch.bin"

./mt7622/mcu.c:366:	ret = request_firmware(&fw, MT7622_ROM_PATCH, dev->mt76.dev);
./mt7622/mcu.c:466:	ret = request_firmware(&fw, MT7622_FIRMWARE_N9, dev->mt76.dev);

only filename differs from your version…i did not found right files in firmware-repo

https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/tree/mediatek

maybe there is another source? from bootlog i guess its the basicly the mt7622_n9.bin maybe with modifications

seems like 4.19 mainline-kernel needs many Patches for cfg80211/mac80211/netlink :frowning: is there any Patchlist applied to openwrt, which i can use?

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