I feel like there is a naming issue happening, maybe.
Like when “wlan0” and “wlan1” are present and while removing the first one and the renaming happens whatever does the removing(I guess the driver?) now also tries to remove the now “new” “wlan0” (which is the mt7615 and that doesn’t work obvioulsy)
yes thats the behaviour i tried to fix…by default wlan0 was hardcoded in the driver, now i use the get_netdev function… get_netdev returns last wlanX, which may be wrong if mt7615 is initialized after ap0
we need a way to store the netdev on creation (which happens in wlanNetRegister 2273 in drivers/misc/mediatek/connectivity/wlan/gen2/os/linux/gl_init.c) and read this in wifi_write, but this part i have no idea because i have no idea how
Applied the patch and startup was fine, took a little longer for some reason, but devices were properly named.
Then tried to disable the device, worked fine.
Apr 6 16:23:08 kernel: [ 226.789837] [MTK-WIFI] WIFI_open: WIFI_open: major 155 minor 0 (pid 1518)
Apr 6 16:23:08 kernel: [ 226.789929] [MTK-WIFI] WIFI_write: WIFI_write A
Apr 6 16:23:08 kernel: [ 226.825780] kalFirmwareImageMapping firmware size 225840
Apr 6 16:23:09 kernel: [ 227.874660] DEBUG: Passed wlanNetRegister 2264 devname:mt6625_%d
Apr 6 16:23:09 kernel: [ 227.875702] DEBUG: Passed wlanNetRegister 2273 devname:mt6625_0 (need to be used everywhere "wlan0" is used)
Apr 6 16:23:09 kernel: [ 227.875745] [MTK-WIFI] register_set_p2p_mode_handler: (pid 680) register set p2p mode handler dcd64e0d
Apr 6 16:23:09 kernel: [ 227.875851] [MTK-WIFI] WIFI_write: WMT turn on WIFI success!
Apr 6 16:23:09 kernel: [ 227.875879] DEBUG: Passed WIFI_write 496 (null)
Apr 6 16:23:09 kernel: [ 227.875889] [MTK-WIFI] WIFI_write: Fail to get wlan0 net device, sleep 300ms
Apr 6 16:23:09 kernel: [ 228.192893] [MTK-WIFI] WIFI_write: Fail to get wlan0 net device, sleep 300ms
Apr 6 16:23:10 kernel: [ 228.512913] [MTK-WIFI] WIFI_write: Fail to get wlan0 net device, sleep 300ms
Apr 6 16:23:10 kernel: [ 228.832917] [MTK-WIFI] WIFI_write: Fail to get wlan0 net device, sleep 300ms
Apr 6 16:23:10 kernel: [ 229.152896] [MTK-WIFI] WIFI_write: Fail to get wlan0 net device, sleep 300ms
Apr 6 16:23:11 kernel: [ 229.472922] [MTK-WIFI] WIFI_write: Fail to get wlan0 net device, sleep 300ms
Apr 6 16:23:11 kernel: [ 229.792887] [MTK-WIFI] WIFI_write: Fail to get wlan0 net device, sleep 300ms
Apr 6 16:23:11 kernel: [ 230.112939] [MTK-WIFI] WIFI_write: Fail to get wlan0 net device, sleep 300ms
Apr 6 16:23:12 kernel: [ 230.432900] [MTK-WIFI] WIFI_write: Fail to get wlan0 net device, sleep 300ms
Apr 6 16:23:12 kernel: [ 230.752887] [MTK-WIFI] WIFI_write: Fail to get wlan0 net device, sleep 300ms
Apr 6 16:23:12 kernel: [ 231.072893] [MTK-WIFI] WIFI_write: Get wlan0 net device timeout
Apr 6 16:23:12 kernel: [ 231.073137] [MTK-WIFI] WIFI_close: WIFI_close: major 155 minor 0 (pid 1518)
Weird I’m just seing that in the bootlog the same error happened but the device was there after boot.
I guess since wlan0 is now mt7615 it still errors out.
Oh wait nvm, the device is also there after re-enabling it, I just didn’t to the right “ifconfig” command
It seems there is one missing though, ap0 is never created and hostapd won’t work with the “mt6625_0” interface as that has not the AP mode according to “iw list”