BPI-R2 2.4Ghz and 5.6Ghz Wifi Working fine

you know that you have to use bridge=br0 in hostapd config?? imho you can’t access wlan-interface in hostapd when it is bridged

in debian/raspbian/ubuntu it is done this way:

https://sirlagz.net/2012/08/10/how-to-use-the-raspberry-pi-as-a-wireless-access-pointrouter-part-2/

I am aware of that and have successfully setup bridges between wlan and ethernet ports (as well as using hostapd) on other devices (including the older R1 model).

I suspect that a bridge can’t be used with the MT6625L chipset

as i did not create bridges between lan-wlan before (my systems are routing packets between all interfaces to get more control of them) i cannot fully answer your question, sorry. i only used bridges as pseudo-net-devices e.g. for lxc

only hint i can give: try the same with different kernel/system, i cannot believe that the chipset itself forbids L2-bridging in OS-Layer

There are some WiFi chipsets that are known to not support bridges (unfortunately, at the present moment, I can’t think of which ones that don’t support this function).

It is not a big problem, I just have to not use a bridge and route the interfaces using a different method.

I am not willing to use another distribution (or downgrade the kernel) due to the amount of time and work I have already spent on this version.

i have nothing found of bridging in the datasheet of mt6625l…maybe mediatek-team can answer this

@garywang @Ryder.Lee

is bridging possible with wifi-interfaces of mt6625l?

I do use a bridge br0 is set as as follow

auto br0
iface br0 inet static
        bridge_ports lan0 lan1 lan2 lan3
        address 10.0.0.100
        netmask 255.255.255.0
        network 10.0.0.0

/etc/hostapd/hostapd.conf

interface=ap0
bridge=br0

however i do have some issue where the wifi AP goes down.

Any error-message? Have you the same issue without bridge? Same on kernel 4.4?

Loading the driver/firmware with wmt_loader yield error even so device is created. Not clear failed to init module

Full Log

# bash -x wifi.sh 
+ set +e
+ PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
+ DAEMON=/dev/null
+ NAME=wifi
+ DESC='Load MediaTek MT6625L firmware wifi & BT'
+ [[ -x /usr/bin/wmt_loader ]]
+ /usr/bin/wmt_loader
init combo device
Opened combo device
get device id : 30243
set device id : 30243
do module init: 30243
failed to init module 
+ sleep 3
+ [[ -c /dev/stpwmt ]]
+ sleep 5
+ /usr/bin/stp_uart_launcher -p /etc/firmware
open device node succeed.(Node:/dev/stpwmt, fd:3) 
chip id is 0x7623
chiId:0x7623, setting to property((null))
chiId:0x7623
run SOC chip flow
create pwr on thread ok
enter power on connsys flowpatch name pre-fix:ROMv2_lm_patch
fwVersion:0x8a00
/etc/firmware/ROMv2_lm_patch_1_0_hdr.bin
fw Ver in patch: 0x8a00
read patch info:0x22,0x00,0x06,0x00
gpatchnum = [2]
gdwonseq = [2]
/etc/firmware/ROMv2_lm_patch_1_1_hdr.bin
fw Ver in patch: 0x8a00
read patch info:0x21,0x00,0x0e,0xf0
gdwonseq = [1]
cmd(srh_patch) resp(ok)
+ [[ -c /dev/wmtWifi ]]
+ echo A
+ sleep 2
+ ifconfig ap0
ap0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet6 fe80::8:22ff:fe10:a511  prefixlen 64  scopeid 0x20<link>
        ether 02:08:22:10:a5:11  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 5  bytes 526 (526.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

+ [[ 0 != \0 ]]
+ echo 'Done, all good, ready to lauch hostapd'
Done, all good, ready to lauch hostapd

you can enable debugging with loglevel-boot-param

bootopts=vmalloc=496M initcall_debug=0 loglevel=7

in the /boot/bananapi/bpi-r2/linux/uEnv.txt

and now start wifi.sh and running dmesg…you will see that there are 4 modules and the failed are the gps-module and the fm-module

root@bpi-r2-e:~# echo 8 > /proc/sys/kernel/printk                               
root@bpi-r2-e:~# cat /proc/sys/kernel/printk                                    
8       4       1       7                                                       
root@bpi-r2-e:~# ./wifi.sh                                                      
wifidev does not exist...create it...                                           
[  409.731509] [WMT-DETECT][I]wmt_detect_open:open major 154 minor 0 (pid 4191) 
[  409.738612] [WMT-DETECT][I]wmt_detect_unlocked_ioctl:cmd (-2147191037),arg(0)
[  409.745746] [WMT-DETECT][I]wmt_detect_unlocked_ioctl:cmd (1074034433),arg(302
43)                                                                             
[  409.753136] [WMT-DETECT][I]wmt_detect_unlocked_ioctl:cmd (-2147191036),arg(30
243)                                                                            
[  409.760594] [WMT-MOD-INIT][I]do_common_drv_init:start to do common driver ini
t, chipid:0x00007623                                                            
[  409.772803] [WMT-CONF][E]wmt_conf_parse_pair(323):unknown field 'mt6620.defAn
t'.                                                                             
[  409.780231] [WMT-CONF][E]wmt_conf_parse_pair(323):unknown field 'mt6628.defAn
t'.                                                                             
[  409.787579] [WMT-CONF][E]wmt_conf_parse_pair(323):unknown field 'mt6630.defAn
t'.                                                                             
[  409.798168] [WMT-CONSYS-HW][E]mtk_wmt_probe(122):Wmt Cannot find pinctrl defa
ult!                                                                            
[  409.806733] [WMT-MOD-INIT][I]do_common_drv_init:finish common driver init    
[  409.813556] [BT-MOD-INIT][I]do_bluetooth_drv_init:start to do bluetooth drive
r init                                                                          
[  409.822379] [BT-MOD-INIT][I]do_bluetooth_drv_init:finish bluetooth driver ini
t, i_ret:0                                                                      
[  409.822634] DEBUG: Passed mtk_wcn_consys_hw_reg_ctrl 234                     
[  409.822648] vcn18: mode operation not allowed                                
[  409.822651] DEBUG: Passed mtk_wcn_consys_hw_reg_ctrl 238                     
[  409.822654] DEBUG: Passed mtk_wcn_consys_hw_reg_ctrl 241                     
[  409.822660] DEBUG: Passed mtk_wcn_consys_hw_reg_ctrl 243                     
[  409.823187] DEBUG: Passed mtk_wcn_consys_hw_reg_ctrl 250                     
[  409.823535] DEBUG: Passed mtk_wcn_consys_hw_reg_ctrl 277                     
[  409.824137] DEBUG: Passed mtk_wcn_consys_hw_reg_ctrl 279                     
[  409.824140] DEBUG: Passed mtk_wcn_consys_power_on 193                        
[  409.824170] DEBUG: Passed mtk_wcn_consys_power_on 195                        
[  409.824223] DEBUG: Passed mtk_wcn_consys_power_on 202                        
[  409.824226] DEBUG: Passed mtk_wcn_consys_hw_reg_ctrl 281                     
[  409.824247] DEBUG: Passed mtk_wcn_consys_hw_reg_ctrl 286                     
[  409.824254] [WMT-CONSYS-HW][E]mtk_wcn_consys_hw_reg_ctrl(301):Read CONSYS chi
pId(0xfffff093)                                                                 
[  409.898699] [GPS-MOD-INIT][I]do_gps_drv_init:CONFIG_MTK_COMBO_GPS is not defi
ned              <<<<<<<<<<<<<<<<
[  409.914446] [WCN-MOD-INIT][E]do_connectivity_driver_init(62):do common driver
 init failed, ret:-1                <<<<<<<<<<<<<<<<<<<<<<<
[  409.923291] [FM-MOD-INIT][I]do_fm_drv_init:start to do fm module init    <<<<<<<<<<<<<
[  409.928854] [WMT-CONF][E]wmt_conf_parse_pair(323):unknown field 'mt6620.defAn
t'.                                                                             
[  409.928861] [WMT-CONF][E]wmt_conf_parse_pair(323):unknown field 'mt6628.defAn
t'.                                                                             
[  409.928867] [WMT-CONF][E]wmt_conf_parse_pair(323):unknown field 'mt6630.defAn
t'.                                                                             
[  409.929061] [WMT-CORE][E]wmt_core_stp_init(648):WMT-CORE: no hif info!       
[  409.929066] drivers/misc/mediatek/connectivity/common/conn_soc/core/wmt_core.
c, 649, (0)                                                                     
[  409.929071] [WMT-CORE][E]opfunc_pwr_on(918):WMT-CORE: wmt_core_stp_init fail 
(-1)     <<<<<<<<<<<<<<<<<
[  409.929075] drivers/misc/mediatek/connectivity/common/conn_soc/core/wmt_core.
c, 919, (0)                                                                     
[  409.929083] [WMT-CORE][E]wmt_core_ctrl(500):WMT-CORE: wmt_core_ctrl failed: i
d(5), type(1), value(0) iRet:(-1)                                               
[  409.929087] drivers/misc/mediatek/connectivity/common/conn_soc/core/wmt_core.
c, 501, (0)                                                                     
[  409.929093] [WMT-CORE][E]wmt_core_ctrl(500):WMT-CORE: wmt_core_ctrl failed: i
d(5), type(0), value(0) iRet:(-1)                                               
[  409.929097] drivers/misc/mediatek/connectivity/common/conn_soc/core/wmt_core.
c, 501, (0)                                                                     
[  409.929105] [WMT-CORE][E]wmt_core_ctrl(500):WMT-CORE: wmt_core_ctrl failed: i
d(3), type(0), value(0) iRet:(-2)                                               
[  409.929109] drivers/misc/mediatek/connectivity/common/conn_soc/core/wmt_core.
c, 501, (0)                                                                     
[  409.929281] vcn18: mode operation not allowed                                
[  409.929310] DEBUG: Passed mtk_wcn_consys_hw_reg_ctrl 234                     
[  409.929316] vcn18: mode operation not allowed                                
[  409.929319] DEBUG: Passed mtk_wcn_consys_hw_reg_ctrl 238                     
[  409.929322] DEBUG: Passed mtk_wcn_consys_hw_reg_ctrl 241                     
[  409.929326] DEBUG: Passed mtk_wcn_consys_hw_reg_ctrl 243                     
[  409.929828] DEBUG: Passed mtk_wcn_consys_hw_reg_ctrl 250                     
[  409.930152] DEBUG: Passed mtk_wcn_consys_hw_reg_ctrl 277                     
[  409.930768] DEBUG: Passed mtk_wcn_consys_hw_reg_ctrl 279                     
[  409.930771] DEBUG: Passed mtk_wcn_consys_power_on 193                        
[  409.930796] DEBUG: Passed mtk_wcn_consys_power_on 195                        
[  409.930844] DEBUG: Passed mtk_wcn_consys_power_on 202                        
[  409.930847] DEBUG: Passed mtk_wcn_consys_hw_reg_ctrl 281                     
[  409.930866] DEBUG: Passed mtk_wcn_consys_hw_reg_ctrl 286                     
[  409.930872] [WMT-CONSYS-HW][E]mtk_wcn_consys_hw_reg_ctrl(301):Read CONSYS chi
pId(0xfffff093)                                                                 
[  410.038731] [WMT-CONF][E]wmt_conf_parse_pair(323):unknown field 'mt6620.defAn
t'.                                                                             
[  410.038738] [WMT-CONF][E]wmt_conf_parse_pair(323):unknown field 'mt6628.defAn
t'.                                                                             
[  410.038744] [WMT-CONF][E]wmt_conf_parse_pair(323):unknown field 'mt6630.defAn
t'.                                                                             
[  410.038940] [WMT-CORE][E]wmt_core_stp_init(648):WMT-CORE: no hif info!       
[  410.038945] drivers/misc/mediatek/connectivity/common/conn_soc/core/wmt_core.
c, 649, (0)                                                                     
[  410.038950] [WMT-CORE][E]opfunc_pwr_on(918):WMT-CORE: wmt_core_stp_init fail 
(-1)                                                                            
[  410.038953] drivers/misc/mediatek/connectivity/common/conn_soc/core/wmt_core.
c, 919, (0)                                                                     
[  410.038962] [WMT-CORE][E]wmt_core_ctrl(500):WMT-CORE: wmt_core_ctrl failed: i
d(5), type(1), value(0) iRet:(-1)                                               
[  410.038965] drivers/misc/mediatek/connectivity/common/conn_soc/core/wmt_core.
c, 501, (0)                                                                     
[  410.038971] [WMT-CORE][E]wmt_core_ctrl(500):WMT-CORE: wmt_core_ctrl failed: i
d(5), type(0), value(0) iRet:(-1)                                               
[  410.038975] drivers/misc/mediatek/connectivity/common/conn_soc/core/wmt_core.
c, 501, (0)                                                                     
[  410.038983] [WMT-CORE][E]wmt_core_ctrl(500):WMT-CORE: wmt_core_ctrl failed: i
d(3), type(0), value(0) iRet:(-2)                                               
[  410.038986] drivers/misc/mediatek/connectivity/common/conn_soc/core/wmt_core.
c, 501, (0)                                                                     
[  410.039129] vcn18: mode operation not allowed                                
[  410.039153] DEBUG: Passed mtk_wcn_consys_hw_reg_ctrl 234                     
[  410.039159] vcn18: mode operation not allowed                                
[  410.039161] DEBUG: Passed mtk_wcn_consys_hw_reg_ctrl 238                     
[  410.039164] DEBUG: Passed mtk_wcn_consys_hw_reg_ctrl 241                     
[  410.039168] DEBUG: Passed mtk_wcn_consys_hw_reg_ctrl 243                     
[  410.039668] DEBUG: Passed mtk_wcn_consys_hw_reg_ctrl 250                     
[  410.039980] DEBUG: Passed mtk_wcn_consys_hw_reg_ctrl 277                     
[  410.040571] DEBUG: Passed mtk_wcn_consys_hw_reg_ctrl 279                     
[  410.040574] DEBUG: Passed mtk_wcn_consys_power_on 193                        
[  410.040592] DEBUG: Passed mtk_wcn_consys_power_on 195                        
[  410.040632] DEBUG: Passed mtk_wcn_consys_power_on 202                        
[  410.040635] DEBUG: Passed mtk_wcn_consys_hw_reg_ctrl 281                     
[  410.040651] DEBUG: Passed mtk_wcn_consys_hw_reg_ctrl 286                     
[  410.040656] [WMT-CONSYS-HW][E]mtk_wcn_consys_hw_reg_ctrl(301):Read CONSYS chi
pId(0xfffff093)                                                                 
[  410.138672] [WMT-CONF][E]wmt_conf_parse_pair(323):unknown field 'mt6620.defAn
t'.                                                                             
[  410.138678] [WMT-CONF][E]wmt_conf_parse_pair(323):unknown field 'mt6628.defAn
t'.                                                                             
[  410.138684] [WMT-CONF][E]wmt_conf_parse_pair(323):unknown field 'mt6630.defAn
t'.                                                                             
[  410.138861] [WMT-CORE][E]wmt_core_stp_init(648):WMT-CORE: no hif info!       
[  410.138866] drivers/misc/mediatek/connectivity/common/conn_soc/core/wmt_core.
c, 649, (0)                                                                     
[  410.138870] [WMT-CORE][E]opfunc_pwr_on(918):WMT-CORE: wmt_core_stp_init fail 
(-1)                                                                            
[  410.138874] drivers/misc/mediatek/connectivity/common/conn_soc/core/wmt_core.
c, 919, (0)                                                                     
[  410.138880] [WMT-CORE][E]wmt_core_ctrl(500):WMT-CORE: wmt_core_ctrl failed: i
d(5), type(1), value(0) iRet:(-1)                                               
[  410.138884] drivers/misc/mediatek/connectivity/common/conn_soc/core/wmt_core.
c, 501, (0)                                                                     
[  410.138890] [WMT-CORE][E]wmt_core_ctrl(500):WMT-CORE: wmt_core_ctrl failed: i
d(5), type(0), value(0) iRet:(-1)                                               
[  410.138893] drivers/misc/mediatek/connectivity/common/conn_soc/core/wmt_core.
c, 501, (0)                                                                     
[  410.138900] [WMT-CORE][E]wmt_core_ctrl(500):WMT-CORE: wmt_core_ctrl failed: i
d(3), type(0), value(0) iRet:(-2)                                               
[  410.138904] drivers/misc/mediatek/connectivity/common/conn_soc/core/wmt_core.
c, 501, (0)                                                                     
[  410.139016] vcn18: mode operation not allowed                                
[  410.139036] [WMT-CORE][E]opfunc_func_on(1025):func(0) pwr_on fail(-2)        
[  410.139040] drivers/misc/mediatek/connectivity/common/conn_soc/core/wmt_core.
c, 1026, (0)                                                                    
[  410.139082] mtk_bt_hci_open func on failed with 0                            
[  410.433276] [FM-MOD-INIT][I]do_fm_drv_init:finish fm module init             
[  410.439267] [WLAN-MOD-INIT][I]do_wlan_drv_init:start to do wlan module init 0
x7623                                                                           
[  410.447085] [WLAN-MOD-INIT][I]do_wlan_drv_init:WMT-WIFI char dev init, ret:0 
[  410.455172] [WLAN-MOD-INIT][I]do_wlan_drv_init:WLAN-GEN2 driver init, ret:0  
[  410.462179] [WLAN-MOD-INIT][I]do_wlan_drv_init:finish wlan module init       
[  410.469633] [WMT-DETECT][I]wmt_detect_close:close major 154 minor 0 (pid 4191
)                                                                               
[  413.490436] [WMT-CORE][E]opfunc_hif_conf(874):WMT-CORE: WMT HIF info added   
[  413.497534] DEBUG: Passed mtk_wcn_consys_hw_reg_ctrl 234                     
[  413.502960] vcn18: mode operation not allowed                                
[  413.507301] DEBUG: Passed mtk_wcn_consys_hw_reg_ctrl 238                     
[  413.512690] DEBUG: Passed mtk_wcn_consys_hw_reg_ctrl 241                     
[  413.518054] DEBUG: Passed mtk_wcn_consys_hw_reg_ctrl 243                     
[  413.523934] DEBUG: Passed mtk_wcn_consys_hw_reg_ctrl 250                     
[  413.529653] DEBUG: Passed mtk_wcn_consys_hw_reg_ctrl 277                     
[  413.535625] DEBUG: Passed mtk_wcn_consys_hw_reg_ctrl 279                     
[  413.541019] DEBUG: Passed mtk_wcn_consys_power_on 193                        
[  413.546145] DEBUG: Passed mtk_wcn_consys_power_on 195                        
[  413.551325] DEBUG: Passed mtk_wcn_consys_power_on 202                        
[  413.556429] DEBUG: Passed mtk_wcn_consys_hw_reg_ctrl 281                     
[  413.561825] DEBUG: Passed mtk_wcn_consys_hw_reg_ctrl 286                     
[  413.618869] [WMT-CONF][E]wmt_conf_parse_pair(323):unknown field 'mt6620.defAn
t'.                                                                             
[  413.626228] [WMT-CONF][E]wmt_conf_parse_pair(323):unknown field 'mt6628.defAn
t'.                                                                             
[  413.633619] [WMT-CONF][E]wmt_conf_parse_pair(323):unknown field 'mt6630.defAn
t'.                                                                             
[  418.551886] kalFirmwareImageMapping firmware size 225840                     
11: ap0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen
 1000                                                                           
    link/ether 02:08:22:1c:d3:01 brd ff:ff:ff:ff:ff:ff                          
Done, all good, ready to lauch hostapd                                          
set IP                                                                          
restart dnsmasq...

but this may be related to BT-Issue:

[  410.138866] drivers/misc/mediatek/connectivity/common/conn_soc/core/wmt_core.
c, 649, (0)                                                                     
[  410.138870] [WMT-CORE][E]opfunc_pwr_on(918):WMT-CORE: wmt_core_stp_init fail 
(-1)                                                                            
[  410.138874] drivers/misc/mediatek/connectivity/common/conn_soc/core/wmt_core.
c, 919, (0)                                                                     
[  410.138880] [WMT-CORE][E]wmt_core_ctrl(500):WMT-CORE: wmt_core_ctrl failed: i
d(5), type(1), value(0) iRet:(-1)                                               
[  410.138884] drivers/misc/mediatek/connectivity/common/conn_soc/core/wmt_core.
c, 501, (0)                                                                     
[  410.138890] [WMT-CORE][E]wmt_core_ctrl(500):WMT-CORE: wmt_core_ctrl failed: i
d(5), type(0), value(0) iRet:(-1)                                               
[  410.138893] drivers/misc/mediatek/connectivity/common/conn_soc/core/wmt_core.
c, 501, (0)                                                                     
[  410.138900] [WMT-CORE][E]wmt_core_ctrl(500):WMT-CORE: wmt_core_ctrl failed: i
d(3), type(0), value(0) iRet:(-2)                                               
[  410.138904] drivers/misc/mediatek/connectivity/common/conn_soc/core/wmt_core.
c, 501, (0)                                                                     
[  410.139016] vcn18: mode operation not allowed                                
[  410.139036] [WMT-CORE][E]opfunc_func_on(1025):func(0) pwr_on fail(-2)        
[  410.139040] drivers/misc/mediatek/connectivity/common/conn_soc/core/wmt_core.
c, 1026, (0)                                                                    
[  410.139082] mtk_bt_hci_open func on failed with 0
Mar 14 18:41:47 bpi-r2 kernel: [WMT-DETECT][I]wmt_detect_unlocked_ioctl:cmd (-2147191037),arg(0)
Mar 14 18:41:47 bpi-r2 kernel: [WMT-DETECT][I]wmt_detect_unlocked_ioctl:cmd (1074034433),arg(30243)
Mar 14 18:41:47 bpi-r2 kernel: set current consys chipid (0x7623)
Mar 14 18:41:47 bpi-r2 kernel: [WMT-DETECT][I]wmt_detect_unlocked_ioctl:cmd (-2147191036),arg(30243)
Mar 14 18:41:47 bpi-r2 kernel: [WMT-MOD-INIT][I]do_common_drv_init:start to do common driver init, chipid:0x00007623
Mar 14 18:41:47 bpi-r2 kernel: [WMT-CONF][E]wmt_conf_parse_pair(323):unknown field 'mt6620.defAnt'.
Mar 14 18:41:47 bpi-r2 kernel: [WMT-CONF][E]wmt_conf_parse_pair(323):unknown field 'mt6628.defAnt'.
Mar 14 18:41:47 bpi-r2 kernel: [WMT-CONF][E]wmt_conf_parse_pair(323):unknown field 'mt6630.defAnt'.
Mar 14 18:41:47 bpi-r2 kernel: [WMT-CONSYS-HW][E]mtk_wmt_probe(122):Wmt Cannot find pinctrl default!
Mar 14 18:41:47 bpi-r2 kernel: [WMT-MOD-INIT][I]do_common_drv_init:finish common driver init
Mar 14 18:41:47 bpi-r2 kernel: [BT-MOD-INIT][I]do_bluetooth_drv_init:start to do bluetooth driver init
Mar 14 18:41:47 bpi-r2 kernel: [MTK-BT] BT_init: mtk_stp_BT_chrdev driver(major 192) installed
Mar 14 18:41:47 bpi-r2 kernel: [BT-MOD-INIT][I]do_bluetooth_drv_init:finish bluetooth driver init, i_ret:0
Mar 14 18:41:47 bpi-r2 kernel: DEBUG: Passed mtk_wcn_consys_hw_reg_ctrl 234 
Mar 14 18:41:47 bpi-r2 kernel: vcn18: mode operation not allowed
Mar 14 18:41:47 bpi-r2 kernel: DEBUG: Passed mtk_wcn_consys_hw_reg_ctrl 238 
Mar 14 18:41:47 bpi-r2 kernel: DEBUG: Passed mtk_wcn_consys_hw_reg_ctrl 241 
Mar 14 18:41:47 bpi-r2 kernel: DEBUG: Passed mtk_wcn_consys_hw_reg_ctrl 243 
Mar 14 18:41:47 bpi-r2 kernel: DEBUG: Passed mtk_wcn_consys_hw_reg_ctrl 250 
Mar 14 18:41:47 bpi-r2 kernel: DEBUG: Passed mtk_wcn_consys_hw_reg_ctrl 277 
Mar 14 18:41:47 bpi-r2 kernel: DEBUG: Passed mtk_wcn_consys_hw_reg_ctrl 279 
Mar 14 18:41:47 bpi-r2 kernel: DEBUG: Passed mtk_wcn_consys_power_on 193 
Mar 14 18:41:47 bpi-r2 kernel: DEBUG: Passed mtk_wcn_consys_power_on 195 
Mar 14 18:41:47 bpi-r2 kernel: DEBUG: Passed mtk_wcn_consys_power_on 202 
Mar 14 18:41:47 bpi-r2 kernel: DEBUG: Passed mtk_wcn_consys_hw_reg_ctrl 281 
Mar 14 18:41:47 bpi-r2 kernel: DEBUG: Passed mtk_wcn_consys_hw_reg_ctrl 286 
Mar 14 18:41:47 bpi-r2 kernel: [WMT-CONSYS-HW][E]mtk_wcn_consys_hw_reg_ctrl(301):Read CONSYS chipId(0xfffff093)
Mar 14 18:41:47 bpi-r2 kernel: [GPS-MOD-INIT][I]do_gps_drv_init:CONFIG_MTK_COMBO_GPS is not defined
Mar 14 18:41:47 bpi-r2 kernel: [WCN-MOD-INIT][E]do_connectivity_driver_init(62):do common driver init failed, ret:-1
Mar 14 18:41:47 bpi-r2 kernel: [FM-MOD-INIT][I]do_fm_drv_init:start to do fm module init
Mar 14 18:41:47 bpi-r2 kernel: [FM-MOD-INIT][I]do_fm_drv_init:finish fm module init
Mar 14 18:41:47 bpi-r2 kernel: [WMT-CONF][E]wmt_conf_parse_pair(323):unknown field 'mt6620.defAnt'.
Mar 14 18:41:47 bpi-r2 kernel: [WMT-CONF][E]wmt_conf_parse_pair(323):unknown field 'mt6628.defAnt'.
Mar 14 18:41:47 bpi-r2 kernel: [WMT-CONF][E]wmt_conf_parse_pair(323):unknown field 'mt6630.defAnt'.
Mar 14 18:41:47 bpi-r2 kernel: [WMT-CORE][E]wmt_core_stp_init(648):WMT-CORE: no hif info!
Mar 14 18:41:47 bpi-r2 kernel: drivers/misc/mediatek/connectivity/common/conn_soc/core/wmt_core.c, 649, (0)
Mar 14 18:41:47 bpi-r2 kernel: [WMT-CORE][E]opfunc_pwr_on(918):WMT-CORE: wmt_core_stp_init fail (-1)
Mar 14 18:41:47 bpi-r2 kernel: drivers/misc/mediatek/connectivity/common/conn_soc/core/wmt_core.c, 919, (0)
Mar 14 18:41:47 bpi-r2 kernel: [WMT-CORE][E]wmt_core_ctrl(500):WMT-CORE: wmt_core_ctrl failed: id(5), type(1), value(0) iRet:(-1)
Mar 14 18:41:47 bpi-r2 kernel: drivers/misc/mediatek/connectivity/common/conn_soc/core/wmt_core.c, 501, (0)
Mar 14 18:41:47 bpi-r2 kernel: [WMT-CORE][E]wmt_core_ctrl(500):WMT-CORE: wmt_core_ctrl failed: id(5), type(0), value(0) iRet:(-1)
Mar 14 18:41:47 bpi-r2 kernel: drivers/misc/mediatek/connectivity/common/conn_soc/core/wmt_core.c, 501, (0)
Mar 14 18:41:47 bpi-r2 kernel: [WMT-CORE][E]wmt_core_ctrl(500):WMT-CORE: wmt_core_ctrl failed: id(3), type(0), value(0) iRet:(-2)
Mar 14 18:41:47 bpi-r2 kernel: drivers/misc/mediatek/connectivity/common/conn_soc/core/wmt_core.c, 501, (0)
Mar 14 18:41:47 bpi-r2 kernel: vcn18: mode operation not allowed
Mar 14 18:41:47 bpi-r2 kernel: DEBUG: Passed mtk_wcn_consys_hw_reg_ctrl 234 
Mar 14 18:41:47 bpi-r2 kernel: vcn18: mode operation not allowed
Mar 14 18:41:47 bpi-r2 kernel: DEBUG: Passed mtk_wcn_consys_hw_reg_ctrl 238 
Mar 14 18:41:47 bpi-r2 kernel: DEBUG: Passed mtk_wcn_consys_hw_reg_ctrl 241 
Mar 14 18:41:47 bpi-r2 kernel: DEBUG: Passed mtk_wcn_consys_hw_reg_ctrl 243 
Mar 14 18:41:47 bpi-r2 kernel: DEBUG: Passed mtk_wcn_consys_hw_reg_ctrl 250 
Mar 14 18:41:47 bpi-r2 kernel: DEBUG: Passed mtk_wcn_consys_hw_reg_ctrl 277 
Mar 14 18:41:47 bpi-r2 kernel: DEBUG: Passed mtk_wcn_consys_hw_reg_ctrl 279 
Mar 14 18:41:47 bpi-r2 kernel: DEBUG: Passed mtk_wcn_consys_power_on 193 
Mar 14 18:41:47 bpi-r2 kernel: DEBUG: Passed mtk_wcn_consys_power_on 195 
Mar 14 18:41:47 bpi-r2 kernel: DEBUG: Passed mtk_wcn_consys_power_on 202 
Mar 14 18:41:47 bpi-r2 kernel: DEBUG: Passed mtk_wcn_consys_hw_reg_ctrl 281 
Mar 14 18:41:47 bpi-r2 kernel: DEBUG: Passed mtk_wcn_consys_hw_reg_ctrl 286 
Mar 14 18:41:47 bpi-r2 kernel: [WMT-CONSYS-HW][E]mtk_wcn_consys_hw_reg_ctrl(301):Read CONSYS chipId(0xfffff093)
Mar 14 18:41:47 bpi-r2 kernel: [WMT-CONF][E]wmt_conf_parse_pair(323):unknown field 'mt6620.defAnt'.
Mar 14 18:41:47 bpi-r2 kernel: [WMT-CONF][E]wmt_conf_parse_pair(323):unknown field 'mt6628.defAnt'.
Mar 14 18:41:47 bpi-r2 kernel: [WMT-CONF][E]wmt_conf_parse_pair(323):unknown field 'mt6630.defAnt'.
Mar 14 18:41:47 bpi-r2 kernel: [WMT-CORE][E]wmt_core_stp_init(648):WMT-CORE: no hif info!
Mar 14 18:41:47 bpi-r2 kernel: drivers/misc/mediatek/connectivity/common/conn_soc/core/wmt_core.c, 649, (0)
Mar 14 18:41:47 bpi-r2 kernel: [WMT-CORE][E]opfunc_pwr_on(918):WMT-CORE: wmt_core_stp_init fail (-1)
Mar 14 18:41:47 bpi-r2 kernel: drivers/misc/mediatek/connectivity/common/conn_soc/core/wmt_core.c, 919, (0)
Mar 14 18:41:47 bpi-r2 kernel: [WMT-CORE][E]wmt_core_ctrl(500):WMT-CORE: wmt_core_ctrl failed: id(5), type(1), value(0) iRet:(-1)
Mar 14 18:41:47 bpi-r2 kernel: drivers/misc/mediatek/connectivity/common/conn_soc/core/wmt_core.c, 501, (0)
Mar 14 18:41:47 bpi-r2 kernel: [WMT-CORE][E]wmt_core_ctrl(500):WMT-CORE: wmt_core_ctrl failed: id(5), type(0), value(0) iRet:(-1)
Mar 14 18:41:47 bpi-r2 kernel: drivers/misc/mediatek/connectivity/common/conn_soc/core/wmt_core.c, 501, (0)
Mar 14 18:41:47 bpi-r2 kernel: [WMT-CORE][E]wmt_core_ctrl(500):WMT-CORE: wmt_core_ctrl failed: id(3), type(0), value(0) iRet:(-2)
Mar 14 18:41:47 bpi-r2 kernel: drivers/misc/mediatek/connectivity/common/conn_soc/core/wmt_core.c, 501, (0)
Mar 14 18:41:47 bpi-r2 kernel: drivers/misc/mediatek/connectivity/common/conn_soc/core/wmt_core.c, 501, (0)
Mar 14 18:41:47 bpi-r2 kernel: vcn18: mode operation not allowed
Mar 14 18:41:47 bpi-r2 kernel: [WMT-CORE][E]opfunc_func_on(1025):func(0) pwr_on fail(-2)
Mar 14 18:41:47 bpi-r2 kernel: drivers/misc/mediatek/connectivity/common/conn_soc/core/wmt_core.c, 1026, (0)
Mar 14 18:41:47 bpi-r2 kernel: [STP] mtk_wcn_stp_psm_enable:[W] STP Not Ready, Dont do Sleep/Wakeup
Mar 14 18:41:47 bpi-r2 kernel: mtk_bt_hci_open func on failed with 0
Mar 14 18:41:47 bpi-r2 kernel: [WLAN-MOD-INIT][I]do_wlan_drv_init:start to do wlan module init 0x7623
Mar 14 18:41:47 bpi-r2 kernel: [MTK-WIFI] WIFI_init: mtk_wmt_WIFI_chrdev driver(major 155) installed.
Mar 14 18:41:47 bpi-r2 kernel: [WLAN-MOD-INIT][I]do_wlan_drv_init:WMT-WIFI char dev init, ret:0
Mar 14 18:41:47 bpi-r2 kernel: [WLAN-MOD-INIT][I]do_wlan_drv_init:WLAN-GEN2 driver init, ret:0
Mar 14 18:41:47 bpi-r2 kernel: [WLAN-MOD-INIT][I]do_wlan_drv_init:finish wlan module init
Mar 14 18:41:47 bpi-r2 kernel: [WMT-DETECT][I]wmt_detect_close:close major 154 minor 0 (pid 4624)
Mar 14 18:41:50 bpi-r2 kernel: [WMT-CORE][E]opfunc_hif_conf(874):WMT-CORE: WMT HIF info added
Mar 14 18:41:50 bpi-r2 kernel: DEBUG: Passed mtk_wcn_consys_hw_reg_ctrl 234 
Mar 14 18:41:50 bpi-r2 kernel: vcn18: mode operation not allowed
Mar 14 18:41:50 bpi-r2 kernel: DEBUG: Passed mtk_wcn_consys_hw_reg_ctrl 238 
Mar 14 18:41:50 bpi-r2 kernel: DEBUG: Passed mtk_wcn_consys_hw_reg_ctrl 241 
Mar 14 18:41:50 bpi-r2 kernel: DEBUG: Passed mtk_wcn_consys_hw_reg_ctrl 243 
Mar 14 18:41:50 bpi-r2 kernel: DEBUG: Passed mtk_wcn_consys_hw_reg_ctrl 250 
Mar 14 18:41:50 bpi-r2 kernel: DEBUG: Passed mtk_wcn_consys_hw_reg_ctrl 277 
Mar 14 18:41:50 bpi-r2 kernel: DEBUG: Passed mtk_wcn_consys_hw_reg_ctrl 279 
Mar 14 18:41:50 bpi-r2 kernel: DEBUG: Passed mtk_wcn_consys_power_on 193 
Mar 14 18:41:50 bpi-r2 kernel: DEBUG: Passed mtk_wcn_consys_power_on 195 
Mar 14 18:41:50 bpi-r2 kernel: DEBUG: Passed mtk_wcn_consys_power_on 202 
Mar 14 18:41:50 bpi-r2 kernel: DEBUG: Passed mtk_wcn_consys_hw_reg_ctrl 281 
Mar 14 18:41:50 bpi-r2 kernel: DEBUG: Passed mtk_wcn_consys_hw_reg_ctrl 286 
Mar 14 18:41:51 bpi-r2 kernel: [WMT-CONF][E]wmt_conf_parse_pair(323):unknown field 'mt6620.defAnt'.
Mar 14 18:41:51 bpi-r2 kernel: [WMT-CONF][E]wmt_conf_parse_pair(323):unknown field 'mt6628.defAnt'.
Mar 14 18:41:51 bpi-r2 kernel: [WMT-CONF][E]wmt_conf_parse_pair(323):unknown field 'mt6630.defAnt'.
Mar 14 18:41:51 bpi-r2 kernel: [STP] mtk_wcn_stp_psm_enable:[W] STP Not Ready, Dont do Sleep/Wakeup
Mar 14 18:41:55 bpi-r2 kernel: [MTK-WIFI] WIFI_open: WIFI_open: major 155 minor 0 (pid 4623)
Mar 14 18:41:55 bpi-r2 kernel: [MTK-WIFI] WIFI_write: WIFI_write A
Mar 14 18:41:55 bpi-r2 kernel: kalFirmwareImageMapping firmware size 225840
Mar 14 18:41:57 bpi-r2 kernel: [MTK-WIFI] register_set_p2p_mode_handler: (pid 4629) register set p2p mode handler c05834f8
Mar 14 18:41:57 bpi-r2 kernel: [MTK-WIFI] WIFI_write: WMT turn on WIFI success!
Mar 14 18:41:57 bpi-r2 kernel: [MTK-WIFI] WIFI_write: Set wlan mode 0 --> 1
Mar 14 18:41:57 bpi-r2 kernel: [MTK-WIFI] WIFI_close: WIFI_close: major 155 minor 0 (pid 4623)
Mar 14 18:41:57 bpi-r2 kernel: IPv6: ADDRCONF(NETDEV_UP): ap0: link is not ready
Mar 14 18:41:57 bpi-r2 kernel: IPv6: ADDRCONF(NETDEV_CHANGE): ap0: link becomes ready

This error seems strange because the only pinctrl defined is for consys (consys_pins_default) is defined in dts

Mar 14 18:41:47 bpi-r2 kernel: [WMT-CONSYS-HW][E]mtk_wmt_probe(122):Wmt Cannot find pinctrl default!

can you answer my other questions?

Hello frank, I add uart0/1 to my dts according to your dts, after update my system, my R2 was stuck in kernel loading,do I miss something?

image

Why adding it to 4.4.70? I have forked it,updated and added the uart in my 4.4 :slight_smile:

But if you want to do it your own you have to put uart0/1 below uart2 in mt7623.dtsi not above because debug-uart is ttyS0 (first recognized serial)

thanks frank :grinning: I put uart0/1 under uart2, R2 can startup now.

I can’t use kernel 4.4 as there is no multiple network interface detected. Also it does work, but at some point just stop. Not sure if it is link to the bridge or the same MAC.

# brctl show
bridge name	bridge id		STP enabled	interfaces
br0		8000.020822eeba47	no		ap0
							                lan0
							                lan1
							                lan2
							                lan3
# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether 0e:55:63:f2:ce:06 brd ff:ff:ff:ff:ff:ff
    inet6 fe80::c55:63ff:fef2:ce06/64 scope link 
       valid_lft forever preferred_lft forever
3: wan@eth0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state LOWERLAYERDOWN group default qlen 1000
    link/ether 0e:55:63:f2:ce:06 brd ff:ff:ff:ff:ff:ff
4: lan0@eth0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue master br0 state LOWERLAYERDOWN group default qlen 1000
    link/ether 0e:55:63:f2:ce:06 brd ff:ff:ff:ff:ff:ff
5: lan1@eth0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue master br0 state LOWERLAYERDOWN group default qlen 1000
    link/ether 0e:55:63:f2:ce:06 brd ff:ff:ff:ff:ff:ff
6: lan2@eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master br0 state UP group default qlen 1000
    link/ether 0e:55:63:f2:ce:06 brd ff:ff:ff:ff:ff:ff
7: lan3@eth0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue master br0 state LOWERLAYERDOWN group default qlen 1000
    link/ether 0e:55:63:f2:ce:06 brd ff:ff:ff:ff:ff:ff
8: wan.6@wan: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state LOWERLAYERDOWN group default qlen 1000
    link/ether 0e:55:63:f2:ce:06 brd ff:ff:ff:ff:ff:ff
9: br0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
    link/ether 02:08:22:ee:ba:47 brd ff:ff:ff:ff:ff:ff
    inet 10.0.0.100/24 brd 10.0.0.255 scope global br0
       valid_lft forever preferred_lft forever
    inet6 fe80::c55:63ff:fef2:ce06/64 scope link 
       valid_lft forever preferred_lft forever
10: wlan0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether 00:08:22:ee:ba:47 brd ff:ff:ff:ff:ff:ff
11: ap0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq master br0 state UP group default qlen 1000
    link/ether 02:08:22:ee:ba:47 brd ff:ff:ff:ff:ff:ff
    inet6 fe80::8:22ff:feee:ba47/64 scope link 
       valid_lft forever preferred_lft forever

Is wifi working on LEDE/OpenWRT?

in my github-repo i have a branch 4.9-patched, which uses the same patches as used for lede, no code from me…this should also have port-separation and wifi (used this wifi-patch for porting).

if you copy defconfig and build.sh in this branch and compile it you can test it with it…if it works there i had made a mistake while porting

why do you use separated ports if you bridge them together? Kernel 4.4 have eth0 for wan-ports and eth1 for wan…leave your br0 and you have same result

ok thanks will try with branch 4.9-patched. Might be a miss understanding, but i need to all 4 NICs to be plug, i was thinking it require separated ports. With only eth0, will it act as a bridge?

In any case the wifi with bridge does works. i have all my lan and ap interfaces assign to the bridge.