[BPI-R64] Kernel-Development

I need more logs mt7615_init_hardware() mt7615_mcu_init()

[   34.578333] DEBUG: Passed mt7615_pci_probe 123 ret:0                                                                                           
[   34.583631] DEBUG: Passed mt7615_init_hardware 97                                                                                              
[   34.588680] DEBUG: Passed mt7615_init_hardware 100                                                                                             
[   34.593861] DEBUG: Passed mt7615_init_hardware 102 ret:0                                                                                       
[   34.600952] DEBUG: Passed mt7615_init_hardware 107 ret:0                                                                                       
[   34.607325] DEBUG: Passed mt7615_init_hardware 112 ret:0                                                                                       
[   34.612995] DEBUG: Passed mt7615_init_hardware 117                                                                                             
[   34.618025] DEBUG: Passed mt7615_mcu_init 519                                                                                                  
[   34.622705] DEBUG: Passed mt7615_mcu_init 521 ret:0                                                                                            
[   34.627821] DEBUG: Passed mt7615_mcu_init 525                                                                                                  
[   34.632497] DEBUG: Passed mt7615_load_firmware 483                                                                                             
[   34.637615] DEBUG: Passed mt7615_load_firmware 486                                                                                             
[   44.771905] mt7615e 0000:01:00.0: Message -16 (seq 1) timeout                                                                                  
[   44.778326] mt7615e 0000:01:00.0: Failed to get patch semaphore                                                                                
[   44.785751] DEBUG: Passed mt7615_load_firmware 493 ret:-11                                                                                     
[   44.791547] DEBUG: Passed mt7615_init_hardware 121 ret:-11                                                                                     
[   44.797220] DEBUG: Passed mt7615_pci_probe 128 ret:-11                                                                                         
[   44.802642] DEBUG: Passed really_probe 504 ret:-11                                                                                             
[   44.807707] mt7615e: probe of 0000:01:00.0 failed with error -11

load_firmware

 483 printk(KERN_ALERT "DEBUG: Passed %s %d \n",__FUNCTION__,__LINE__);
 484     val = mt76_get_field(dev, MT_TOP_MISC2, MT_TOP_MISC2_FW_STATE);
 485
 486 printk(KERN_ALERT "DEBUG: Passed %s %d \n",__FUNCTION__,__LINE__);
 487     if (val != FW_STATE_FW_DOWNLOAD) {
 488         dev_err(dev->mt76.dev, "Firmware is not ready for download\n");
 489         return -EIO;
 490     }
 491
 492     ret = mt7615_load_patch(dev);
 493 printk(KERN_ALERT "DEBUG: Passed %s %d ret:%d\n",__FUNCTION__,__LINE__,ret);
 494     if (ret)
 495         return ret;

i had put firmware-files to same dir as BT-Firmware:

root@bpi-r64:~# ls /lib/firmware/mediatek/                                                                                                        
mt7615_cr4.bin  mt7615_n9.bin  mt7615_rom_patch.bin  mt7622pr2h.bin

can i ignore these messages on pci:

[    3.205711] pci 0000:00:00.0: BAR 0: no space for [mem size 0x100000000 64bit pref]                                                            
[    3.213616] pci 0000:00:00.0: BAR 0: failed to assign [mem size 0x100000000 64bit pref]                                                        

?

The problem is firmware, try to move to /lib/firmware/*, you can ignore these messages on pci.

it seems after moving firmware-files a reboot was needed…had added some more debugs

root@bpi-r64:~# modprobe -r mt7615e                                                                                                               
root@bpi-r64:~# echo "9 9 9 9" > /proc/sys/kernel/printk                                                                                          
root@bpi-r64:~# modprobe mt7615e                                                                                                                  
[   43.097134] cfg80211: Loading compiled-in X.509 certificates for regulatory database                                                           
[   43.106033] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7'                                                                         
[   43.112919] platform regulatory.0: Direct firmware load for regulatory.db failed with error -2                                                 
[   43.121910] cfg80211: failed to load regulatory.db                                                                                             
[   43.137615] DEBUG: Passed really_probe 477                                                                                                     
[   43.141984] DEBUG: Passed really_probe 480 ret:0                                                                                               
[   43.147012] DEBUG: Passed really_probe 483                                                                                                     
[   43.151466] DEBUG: Passed really_probe 487                                                                                                     
[   43.155882] DEBUG: Passed really_probe 493                                                                                                     
[   43.160344] mt7615e 0000:01:00.0: assign IRQ: got 124                                                                                          
[   43.166054] DEBUG: Passed mt7615_pci_probe 88 ret:0                                                                                            
[   43.171396] DEBUG: Passed mt7615_pci_probe 93 ret:0                                                                                            
[   43.176655] mt7615e 0000:01:00.0: enabling bus mastering                                                                                       
[   43.182476] DEBUG: Passed mt7615_pci_probe 100 ret:0                                                                                           
[   43.187820] DEBUG: Passed mt7615_pci_probe 106                                                                                                 
[   43.192581] DEBUG: Passed mt7615_pci_probe 110                                                                                                 
[   43.197347] DEBUG: Passed mt7615_pci_probe 112                                                                                                 
[   43.202102] DEBUG: Passed mt7615_pci_probe 115                                                                                                 
[   43.206873] DEBUG: Passed mt7615_pci_probe 120                                                                                                 
[   43.211650] DEBUG: Passed mt7615_pci_probe 123 ret:0                                                                                           
[   43.216951] DEBUG: Passed mt7615_init_hardware 97                                                                                              
[   43.221986] DEBUG: Passed mt7615_init_hardware 100                                                                                             
[   43.227170] DEBUG: Passed mt7615_init_hardware 102 ret:0                                                                                       
[   43.234226] DEBUG: Passed mt7615_init_hardware 107 ret:0                                                                                       
[   43.240687] DEBUG: Passed mt7615_init_hardware 112 ret:0                                                                                       
[   43.246275] DEBUG: Passed mt7615_init_hardware 117                                                                                             
[   43.251312] DEBUG: Passed mt7615_mcu_init 525                                                                                                  
[   43.276022] DEBUG: Passed mt7615_mcu_init 527 ret:0                                                                                            
[   43.281075] DEBUG: Passed mt7615_mcu_init 531                                                                                                  
[   43.286142] DEBUG: Passed mt7615_load_firmware 489                                                                                             
[   43.291257] DEBUG: Passed mt7615_load_firmware 492                                                                                             
[   43.296396] DEBUG: Passed mt7615_mcu_patch_sem_ctrl 254                                                                                        
[   43.301868] DEBUG: Passed mt7615_mcu_msg_send 128 expires:4294905620                                                                           
[   43.308517] DEBUG: Passed mt7615_mcu_msg_send 132 ret:0                                                                                        
[   43.313989] DEBUG: Passed mt7615_mcu_patch_sem_ctrl 257 ret:0                                                                                  
[   43.320007] DEBUG: Passed mt7615_mcu_patch_sem_ctrl 263 ret:1                                                                                  
[   43.326019] DEBUG: Passed mt7615_load_patch 304 sem:1                                                                                          
[   43.331319] DEBUG: Passed mt7615_load_firmware 499 ret:0                                                                                       
[   43.337534] mt7615e 0000:01:00.0: N9 Firmware Version: _reserved_, Build Time: 20190103180756                                                  
[   43.346996] DEBUG: Passed mt7615_mcu_msg_send 128 expires:4294905631                                                                           
[   43.353676] DEBUG: Passed mt7615_mcu_msg_send 132 ret:0                                                                                        
[   43.359970] DEBUG: Passed mt7615_mcu_msg_send 128 expires:4294905635                                                                           
[   43.366561] DEBUG: Passed mt7615_mcu_msg_send 132 ret:0                                                                                        
[   43.372287] DEBUG: Passed mt7615_mcu_msg_send 128 expires:4294905638                                                                           
[   43.378952] DEBUG: Passed mt7615_mcu_msg_send 132 ret:0                                                                                        
[   43.384722] mt7615e 0000:01:00.0: CR4 Firmware Version: _reserved_, Build Time: 20181207140436                                                 
[   43.394134] DEBUG: Passed mt7615_mcu_msg_send 128 expires:4294905643                                                                           
[   43.400802] DEBUG: Passed mt7615_mcu_msg_send 132 ret:0                                                                                        
[   43.406503] DEBUG: Passed mt7615_mcu_msg_send 128 expires:4294905646                                                                           
[   43.413192] DEBUG: Passed mt7615_mcu_msg_send 132 ret:0                                                                                        
[   43.464980] DEBUG: Passed mt7615_load_firmware 504 ret:0                                                                                       
[   43.470472] DEBUG: Passed mt7615_load_firmware 507 ret:0                                                                                       
[   43.536901] DEBUG: Passed mt7615_load_firmware 516 ret:0                                                                                       
[   43.542600] DEBUG: Passed mt7615_init_hardware 121 ret:0                                                                                       
[   43.549096] DEBUG: Passed mt7615_init_hardware 126                                                                                             
[   43.554105] DEBUG: Passed mt7615_mcu_msg_send 128 expires:4294905683                                                                           
[   43.560687] DEBUG: Passed mt7615_mcu_msg_send 132 ret:0                                                                                        
[   51.053894] DEBUG: Passed mt7615_init_hardware 128                                                                                             
[   51.059132] DEBUG: Passed mt7615_mcu_msg_send 128 expires:4294907559                                                                           
[   51.066081] DEBUG: Passed mt7615_mcu_msg_send 132 ret:0                                                                                        
[   51.071685] DEBUG: Passed mt7615_mcu_msg_send 128 expires:4294907563                                                                           
[   51.078260] DEBUG: Passed mt7615_mcu_msg_send 132 ret:0                                                                                        
[   51.083717] DEBUG: Passed mt7615_init_hardware 130                                                                                             
[   51.088676] DEBUG: Passed mt7615_init_hardware 132                                                                                             
[   51.093642] DEBUG: Passed mt7615_mcu_msg_send 128 expires:4294907568                                                                           
[   51.100213] DEBUG: Passed mt7615_mcu_msg_send 132 ret:0                                                                                        
[   51.105653] DEBUG: Passed mt7615_init_hardware 134                                                                                             
[   51.110609] DEBUG: Passed mt7615_mcu_msg_send 128 expires:4294907572                                                                           
[   51.117186] DEBUG: Passed mt7615_mcu_msg_send 132 ret:0                                                                                        
[   51.122606] DEBUG: Passed mt7615_init_hardware 136                                                                                             
[   51.128469] ieee80211 phy0: Selected rate control algorithm 'minstrel_ht'                                                                      
[   51.136702] DEBUG: Passed mt7615_pci_probe 128 ret:0                                                                                           
[   51.141945] DEBUG: Passed really_probe 504 ret:0                                                                                               
[   51.146781] DEBUG: Passed really_probe 534                                                                                                     
root@bpi-r64:~# 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                                                                                                    
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000                                             
    link/ether 36:26:71:08:c1:3b brd ff:ff:ff:ff:ff:ff                                                                                            
    inet 192.168.0.18/24 brd 192.168.0.255 scope global eth0                                                                                      
       valid_lft forever preferred_lft forever                                                                                                    
3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000                                             
    link/ether ca:8c:ba:f3:99:f4 brd ff:ff:ff:ff:ff:ff                                                                                            
5: wlan0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000                                                            
    link/ether 00:00:00:00:00:00 brd ff:ff:ff:ff:ff:ff 

:slight_smile:

OK! You can test the AP mode now.

BTW, if you want to test it at 5G channel for VHT/HT you need download regulatory.db (crda).

I need you guys help me do some more tests and give me feedback for this driver.

1 Like

5ghz also works? can this card open 2 AP (which imho needs 2 wifi-devices)?

if anybody want to try 5ghz:

apt-get install crda

/etc/modprobe.d/cfg80211.conf:

options cfg80211 ieee80211_regdom=DE

reboot, after that

cat /var/log/syslog | grep cfg

/etc/hostapd/hostapd.conf

....
country_code=DE
ieee80211n=1
ieee80211d=1
hw_mode=a

for other interested:

root@bpi-r64:~# iw list                                                                                                                           
Wiphy phy0                                                                                                                                        
        max # scan SSIDs: 4                                                                                                                       
        max scan IEs length: 2243 bytes                                                                                                           
        Retry short limit: 7                                                                                                                      
        Retry long limit: 4                                                                                                                       
        Coverage class: 0 (up to 0m)                                                                                                              
        Device supports RSN-IBSS.                                                                                                                 
        Supported Ciphers:                                                                                                                        
                * WEP40 (00-0f-ac:1)                                                                                                              
                * WEP104 (00-0f-ac:5)                                                                                                             
                * TKIP (00-0f-ac:2)                                                                                                               
                * CCMP (00-0f-ac:4)                                                                                                               
                * 00-0f-ac:10                                                                                                                     
                * GCMP (00-0f-ac:8)                                                                                                               
                * 00-0f-ac:9                                                                                                                      
                * CMAC (00-0f-ac:6)                                                                                                               
                * 00-0f-ac:13                                                                                                                     
                * 00-0f-ac:11                                                                                                                     
                * 00-0f-ac:12                                                                                                                     
        Available Antennas: TX 0xf RX 0xf                                                                                                         
        Supported interface modes:                                                                                                                
                 * managed                                                                                                                        
                 * AP                                                                                                                             
                 * AP/VLAN                                                                                                                        
                 * monitor                                                                                                                        
        Band 1:                                                                                                                                   
                Capabilities: 0x1ff                                                                                                               
                        RX LDPC                                                                                                                   
                        HT20/HT40                                                                                                                 
                        SM Power Save disabled                                                                                                    
                        RX Greenfield                                                                                                             
                        RX HT20 SGI                                                                                                               
                        RX HT40 SGI                                                                                                               
                        TX STBC                                                                                                                   
                        RX STBC 1-stream                                                                                                          
                        Max AMSDU length: 3839 bytes                                                                                              
                        No DSSS/CCK HT40                                                                                                          
                Maximum RX AMPDU length 65535 bytes (exponent: 0x003)                                                                             
                Minimum RX AMPDU time spacing: 4 usec (0x05)                                                                                      
                HT TX/RX MCS rate indexes supported: 0-31                                                                                         
                Bitrates (non-HT):                                                                                                                
                        * 1.0 Mbps (short preamble supported)                                                                                     
                        * 2.0 Mbps (short preamble supported)                                                                                     
                        * 5.5 Mbps (short preamble supported)                                                                                     
                        * 11.0 Mbps (short preamble supported)                                                                                    
                        * 6.0 Mbps                                                                                                                
                        * 9.0 Mbps                                                                                                                
                        * 12.0 Mbps                                                                                                               
                        * 18.0 Mbps                                                                                                               
                        * 24.0 Mbps                                                                                                               
                        * 36.0 Mbps                                                                                                               
                        * 48.0 Mbps                                                                                                               
                        * 54.0 Mbps                                                                                                               
                Frequencies:                                                                                                                      
                        * 2412 MHz [1] (20.0 dBm)                                                                                                 
                        * 2417 MHz [2] (20.0 dBm)                                                                                                 
                        * 2422 MHz [3] (20.0 dBm)                                                                                                 
                        * 2427 MHz [4] (20.0 dBm)                                                                                                 
                        * 2432 MHz [5] (20.0 dBm)                                                                                                 
                        * 2437 MHz [6] (20.0 dBm)                                                                                                 
                        * 2442 MHz [7] (20.0 dBm)                                                                                                 
                        * 2447 MHz [8] (20.0 dBm)                                                                                                 
                        * 2452 MHz [9] (20.0 dBm)                                                                                                 
                        * 2457 MHz [10] (20.0 dBm)                                                                                                
                        * 2462 MHz [11] (20.0 dBm)                                                                                                
                        * 2467 MHz [12] (20.0 dBm)                                                                                                
                        * 2472 MHz [13] (20.0 dBm)                                                                                                
                        * 2484 MHz [14] (disabled)                                                                                                
        Band 2:                                                                                                                                   
                Capabilities: 0x1ff                                                                                                               
                        RX LDPC                                                                                                                   
                        HT20/HT40                                                                                                                 
                        SM Power Save disabled                                                                                                    
                        RX Greenfield                                                                                                             
                        RX HT20 SGI                                                                                                               
                        RX HT40 SGI                                                                                                               
                        TX STBC                                                                                                                   
                        RX STBC 1-stream                                                                                                          
                        Max AMSDU length: 3839 bytes                                                                                              
                        No DSSS/CCK HT40                                                                                                          
                Maximum RX AMPDU length 65535 bytes (exponent: 0x003)                                                                             
                Minimum RX AMPDU time spacing: 4 usec (0x05)                                                                                      
                HT TX/RX MCS rate indexes supported: 0-31                                                                                         
                VHT Capabilities (0x018001f0):                                                                                                    
                        Max MPDU length: 3895                                                                                                     
                        Supported Channel Width: neither 160 nor 80+80                                                                            
                        RX LDPC                                                                                                                   
                        short GI (80 MHz)                                                                                                         
                        short GI (160/80+80 MHz)                                                                                                  
                        TX STBC                                                                                                                   
                VHT RX MCS set:                                                                                                                   
                        1 streams: MCS 0-9                                                                                                        
                        2 streams: MCS 0-9                                                                                                        
                        3 streams: MCS 0-9                                                                                                        
                        4 streams: MCS 0-9                                                                                                        
                        5 streams: not supported                                                                                                  
                        6 streams: not supported                                                                                                  
                        7 streams: not supported                                                                                                  
                        8 streams: not supported                                                                                                  
                VHT RX highest supported: 0 Mbps                                                                                                  
                VHT TX MCS set:                                                                                                                   
                        1 streams: MCS 0-9                                                                                                        
                        2 streams: MCS 0-9                                                                                                        
                        3 streams: MCS 0-9                                                                                                        
                        4 streams: MCS 0-9                                                                                                        
                        5 streams: not supported                                                                                                  
                        6 streams: not supported                                                                                                  
                        7 streams: not supported                                                                                                  
                        8 streams: not supported                                                                                                  
                VHT TX highest supported: 0 Mbps                                                                                                  
                Bitrates (non-HT):                                                                                                                
                        * 6.0 Mbps                                                                                                                
                        * 9.0 Mbps                                                                                                                
                        * 12.0 Mbps                                                                                                               
                        * 18.0 Mbps                                                                                                               
                        * 24.0 Mbps                                                                                                               
                        * 36.0 Mbps                                                                                                               
                        * 48.0 Mbps                                                                                                               
                        * 54.0 Mbps                                                                                                               
                Frequencies:                                                                                                                      
                        * 5180 MHz [36] (20.0 dBm)                                                                                                
                        * 5200 MHz [40] (20.0 dBm)                                                                                                
                        * 5220 MHz [44] (20.0 dBm)                                                                                                
                        * 5240 MHz [48] (20.0 dBm)                                                                                                
                        * 5260 MHz [52] (20.0 dBm) (radar detection)                                                                              
                          DFS state: usable (for 361 sec)                                                                                         
                          DFS CAC time: 60000 ms                                                                                                  
                        * 5280 MHz [56] (20.0 dBm) (radar detection)                                                                              
                          DFS state: usable (for 361 sec)                                                                                         
                          DFS CAC time: 60000 ms                                                                                                  
                        * 5300 MHz [60] (20.0 dBm) (radar detection)                                                                              
                          DFS state: usable (for 361 sec)                                                                                         
                          DFS CAC time: 60000 ms                                                                                                  
                        * 5320 MHz [64] (20.0 dBm) (radar detection)                                                                              
                          DFS state: usable (for 361 sec)                                                                                         
                          DFS CAC time: 60000 ms                                                                                                  
                        * 5500 MHz [100] (26.0 dBm) (radar detection)                                                                             
                          DFS state: usable (for 361 sec)                                                                                         
                          DFS CAC time: 60000 ms                                                                                                  
                        * 5520 MHz [104] (26.0 dBm) (radar detection)                                                                             
                          DFS state: usable (for 361 sec)                                                                                         
                          DFS CAC time: 60000 ms                                                                                                  
                        * 5540 MHz [108] (26.0 dBm) (radar detection)                                                                             
                          DFS state: usable (for 361 sec)                                                                                         
                          DFS CAC time: 60000 ms                                                                                                  
                        * 5560 MHz [112] (26.0 dBm) (radar detection)                                                                             
                          DFS state: usable (for 361 sec)                                                                                         
                          DFS CAC time: 60000 ms                                                                                                  
                        * 5580 MHz [116] (26.0 dBm) (radar detection)                                                                             
                          DFS state: usable (for 361 sec)                                                                                         
                          DFS CAC time: 60000 ms                                                                                                  
                        * 5600 MHz [120] (26.0 dBm) (radar detection)                                                                             
                          DFS state: usable (for 361 sec)                                                                                         
                          DFS CAC time: 60000 ms                                                                                                  
                        * 5620 MHz [124] (26.0 dBm) (radar detection)                                                                             
                          DFS state: usable (for 361 sec)                                                                                         
                          DFS CAC time: 60000 ms                                                                                                  
                        * 5640 MHz [128] (26.0 dBm) (radar detection)                                                                             
                          DFS state: usable (for 361 sec)                                                                                         
                          DFS CAC time: 60000 ms                                                                                                  
                        * 5660 MHz [132] (26.0 dBm) (radar detection)                                                                             
                          DFS state: usable (for 361 sec)                                                                                         
                          DFS CAC time: 60000 ms                                                                                                  
                        * 5680 MHz [136] (26.0 dBm) (radar detection)                                                                             
                          DFS state: usable (for 361 sec)                                                                                         
                          DFS CAC time: 60000 ms                                                                                                  
                        * 5700 MHz [140] (26.0 dBm) (radar detection)                                                                             
                          DFS state: usable (for 361 sec)                                                                                         
                          DFS CAC time: 60000 ms                                                                                                  
                        * 5745 MHz [149] (13.0 dBm)                                                                                               
                        * 5765 MHz [153] (13.0 dBm)                                                                                               
                        * 5785 MHz [157] (13.0 dBm)                                                                                               
                        * 5805 MHz [161] (13.0 dBm)                                                                                               
                        * 5825 MHz [165] (13.0 dBm)                                                                                               
        Supported commands:                                                                                                                       
                 * new_interface                                                                                                                  
                 * set_interface                                                                                                                  
                 * new_key                                                                                                                        
                 * start_ap                                                                                                                       
                 * new_station                                                                                                                    
                 * set_bss                                                                                                                        
                 * authenticate                                                                                                                   
                 * associate                                                                                                                      
                 * deauthenticate                                                                                                                 
                 * disassociate                                                                                                                   
                 * join_ibss                                                                                                                      
                 * set_tx_bitrate_mask                                                                                                            
                 * frame                                                                                                                          
                 * frame_wait_cancel                                                                                                              
                 * set_wiphy_netns                                                                                                                
                 * set_channel                                                                                                                    
                 * set_wds_peer                                                                                                                   
                 * probe_client                                                                                                                   
                 * set_noack_map                                                                                                                  
                 * register_beacons                                                                                                               
                 * start_p2p_device                                                                                                               
                 * set_mcast_rate                                                                                                                 
                 * connect                                                                                                                        
                 * disconnect                                                                                                                     
                 * Unknown command (104)                                                                                                          
                 * Unknown command (121)                                                                                                          
        Supported TX frame types:                                                                                                                 
                 * IBSS: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0                                          
                 * managed: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0                                       
                 * AP: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0                                            
                 * AP/VLAN: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0                                       
                 * mesh point: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0                                    
                 * P2P-client: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0                                    
                 * P2P-GO: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0                                        
                 * P2P-device: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0                                    
        Supported RX frame types:                                                                                                                 
                 * IBSS: 0x40 0xb0 0xc0 0xd0                                                                                                      
                 * managed: 0x40 0xd0                                                                                                             
                 * AP: 0x00 0x20 0x40 0xa0 0xb0 0xc0 0xd0                                                                                         
                 * AP/VLAN: 0x00 0x20 0x40 0xa0 0xb0 0xc0 0xd0                                                                                    
                 * mesh point: 0xb0 0xc0 0xd0                                                                                                     
                 * P2P-client: 0x40 0xd0                                                                                                          
                 * P2P-GO: 0x00 0x20 0x40 0xa0 0xb0 0xc0 0xd0                                                                                     
                 * P2P-device: 0x40 0xd0                                                                                                          
        software interface modes (can always be added):                                                                                           
                 * AP/VLAN                                                                                                                        
                 * monitor                                                                                                                        
        valid interface combinations:                                                                                                             
                 * #{ AP } <= 4,                                                                                                                  
                   total <= 4, #channels <= 1, STA/AP BI must match                                                                               
        HT Capability overrides:                                                                                                                  
                 * MCS: ff ff ff ff ff ff ff ff ff ff                                                                                             
                 * maximum A-MSDU length                                                                                                          
                 * supported channel width                                                                                                        
                 * short GI for 40 MHz                                                                                                            
                 * max A-MPDU length exponent                                                                                                     
                 * min MPDU start spacing                                                                                                         
        Device supports TX status socket option.                                                                                                  
        Device supports HT-IBSS.                                                                                                                  
        Device supports SAE with AUTHENTICATE command                                                                                             
        Device supports low priority scan.                                                                                                        
        Device supports scan flush.                                                                                                               
        Device supports AP scan.                                                                                                                  
        Device supports per-vif TX power setting                                                                                                  
        Driver supports full state transitions for AP/GO clients                                                                                  
        Driver supports a userspace MPM                                                                                                           
        Device supports active monitor (which will ACK incoming frames)

cool~ Could you share your r2/r64 image and iperf test result? thanks.

I think 5ghz should work. Regarding enable 2 interface, we need to add MBSS support (not yet ready).

There are still lots of work in my todo list (RF stuff / txpower / ps / scan / rxfilter / …), so i need volunteer’s help to do some more endurance tests and report the result to me.

BTW, can you try this driver on your R2?

I cannot use my card in r2 because it is too large and bend over coils r2 and rhe 4pin power-connector

I tried a riser cable but card was not recognized. Maybe bpi-team will send me a normal fullsize pcie-card

@moore currently i use jacks jessie-image with my 4.19.20-r64-main. but my stretch-images (r2+r64) are on my gdrive. My image is on a samsung evo+ sdcard,wich is not recognized by kernel in 80% of boots. No problem with sandisk card. Maybe this can be tuned? Need also another wifi-antenna+cable for testing

Which version of these distros do you recommend or could you share the link to me? I hate building such daemons from source one by one … So I guess I also need to get debian/ubuntu run on my board to test 7615 feature.

https://drive.google.com/drive/mobile/folders/1WLWAR1FC-rF4n2SgFecBlU1ym_XKqAR_/15Y5Y3NAOwg_IMmN3k6hdb7pAQj9oTVTl/1oP7jy1KrrIOifvImo2nQ59wx3_9hHkgk?sort=13&direction=a

Are my debian-stretch-images (r64 in subfolder) but without mt7615 driver. You can install kernels from releases on github,but for r64 do not use debs (not ready yet).r2-kernel does not contain the driver for mt7615 yet because mt76 from openwrt breaks my mt7612 (reported an issue).but i can try to add mt7615-code to separate branch an upload kernel

It’s okay. I can build kernel by myself. I think we can create a new thread focus on mt7615 progress and test result.

i have phylink now also running on r64 with kernel 5.1

ethernet on r64 seems to be broken on 5.2 again

this fix from 5.1 is already included:

commit 880c2d4b2fdfd580ebcd6bb7240a8027a1d34751
Author: Sean Wang <[email protected]>
Date:   Sat Jun 1 08:16:27 2019 +0800

    net: ethernet: mediatek: Use NET_IP_ALIGN to judge if HW RX_2BYTE_OFFSET is enabled
    
    Should only enable HW RX_2BYTE_OFFSET function in the case NET_IP_ALIGN
    equals to 2.
    
    Signed-off-by: Mark Lee <[email protected]>
    Signed-off-by: Sean Wang <[email protected]>
    Signed-off-by: David S. Miller <[email protected]>

diff --git a/drivers/net/ethernet/mediatek/mtk_eth_soc.c b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
index 0b88febbaf2a..765cd56ebcd2 100644
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
@@ -1778,6 +1778,7 @@ static void mtk_poll_controller(struct net_device *dev)
 
 static int mtk_start_dma(struct mtk_eth *eth)
 {
+       u32 rx_2b_offset = (NET_IP_ALIGN == 2) ? MTK_RX_2B_OFFSET : 0;
        int err;
 
        err = mtk_dma_init(eth);
@@ -1794,7 +1795,7 @@ static int mtk_start_dma(struct mtk_eth *eth)
                MTK_QDMA_GLO_CFG);
 
        mtk_w32(eth,
-               MTK_RX_DMA_EN | MTK_RX_2B_OFFSET |
+               MTK_RX_DMA_EN | rx_2b_offset |
                MTK_RX_BT_32DWORDS | MTK_MULTI_EN,
                MTK_PDMA_GLO_CFG);

@moore @Ryder.Lee @Jackzeng have you an idea?

with sgmii-patch it is worse…no ethx are detected: 5.2-mainline-r64.txt (76,9 KB)

I think you miss some patch, so please refer to below eth driver and dts, thanks.

https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/tree/drivers/net/ethernet/mediatek?h=next-20190710

https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/tree/arch/arm64/boot/dts/mediatek/mt7622.dtsi?h=next-20190710

    sgmiisys: sgmiisys@1b128000 {
		compatible = "mediatek,mt7622-sgmiisys",
			     "syscon";
		reg = <0 0x1b128000 0 0x3000>;
		#clock-cells = <1>;
		mediatek,physpeed = "2500";
	};

I talk about 5.2, you from net-next/linux-next

We trying to get phylink woking on net-next (currently in linux-next for 5.3). Here gmac2 is working,but not yet gmac1 because of sgmii-settings…i want to compare phylink with 5.2 without net-next/phylink.

5.1 works with patch mentioned above…this one is already merged to 5.2 but in the moment i add sgmii-patch switch does not init (rj45 leds are off) and soc-gmacs are both not recognized

dts & ethernet driver are not all correct in 5.2 tree. maybe you can start your test after v5.3 to save your time, thanks.

your dts-part is same as mine (found no difference)…

we are trying to get phylink working for mt7622…so we cannot wait till merge-window is closed…else the changes will firstly get into 5.4 which will be no LTS

i expect that you mean this Patches from net-next:

edit: With 5.2 + net-next (which go into 5.3) and phylink-patches we got network working (retransmits on tx fixed by activating flowcontrol,rx clean)

phylink for bpi-r64 based on 5.3-rc1 (working so far):

have now also 5.4 for r64 in my repo

rtl8367 works so far, have now added mt7531-driver, but can’t test

compiled kernels here on my gdrive: https://drive.google.com/open?id=1SRUhYQqs5Jg_lKqgMfUlwSX4dG5T6qPZ