Mt7615 wifi driver testing

(Frank W.) #1


Ryder Lee wrote a mt7615-driver and i have it integrated into my 4.19-branches for testing.

R64: (binary-package on github-releases)

  • tested till wlan0-device is visible and readable via “iw”

R2: (binary-package on my gdrive

  • currently untested

you’ll find firmware on github in utils/firmware which needs to be copied to BPI-ROOT/lib/firmware (+reboot)

for 5g-testing here are the steps to do additionally to 2.4ghz: BPI-R64 Kernel-Development

i currently can test only on r64 (pcie-card) because my card is too large for r2 (bend over coils next to pcie-slot) and i have mt7612 mounted on it for testing 4.19 driver (openwrts mt76 is currently broken for this chip)

debian stretch-images (without this specific kernel) for r2/r64 are also on my gdrive

1 part i see is missing mac-address on wifi-device (00:00:00:00:00:00)

added this to my /etc/network/interfaces followed by “service networking restart”

auto wlan0
allow-hotplug wlan0
iface wlan0 inet static
  pre-up ip link set $IFACE address 02:01:02:03:04:08 up

currently i hang on bring wlan0 up:

root@bpi-r64:~# ip link set wlan0 up                                                                                                              
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 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 96:25:92:fe:cc:e8 brd ff:ff:ff:ff:ff:ff                                                                                            
    inet brd 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 b6:41:9e:e2:7a:c7 brd ff:ff:ff:ff:ff:ff                                                                                            
4: wlan0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default qlen 1000                                           
    link/ether 02:01:02:03:04:08 brd ff:ff:ff:ff:ff:ff                                                                                            
    inet brd scope global wlan0                                                                                    
       valid_lft forever preferred_lft forever       

if interface is down, i cannot start hostapd

config for dnsmasq (not yet used):






root@bpi-r64:~# hostapd -dd /etc/hostapd/hostapd_mt7615_pcie.conf


I guess efuse/eeprom is empty in your onboard 7615.

(Frank W.) #3

shouldn’t this be filled by firmware? or how can i fill it?

i test pcie-mt7615…not the onboard one, you’ve said onboard will not be working yet (and not recognized?)

currently replace jacks image with mine, because i did not get dnsmasq running (uninstalled isc, created pid-folder but still no pid-file)


shouldn’t this be filled by firmware?

=> No. You should ask bpi team for this problem, but I am not sure whether it causes the hang issue.

can you try to remove ieee80211n=1 and test again?

(Frank W.) #5

it is no card from bpi-team (seems like an dev-card i got from another user, it’s near quadratic)…or is the internal one recognized by driver?

i hang before hostapd…i should set wlan0 to up with my ip-config, but it is not going up

i just summarize my settings in first post, so everybody can do the same, doesnt mean that it works till that point


mac address will be read from eeprom/efuse in probe phase. have you ever used this card before?

(Frank W.) #7

no, because of missing driver and because it does not fit in my r2…but it’s the only card i have for testing (and the r64 onboard) and the moment


Add some debug message in mt7615_add_interface() and mt7615_mcu_set_dev_info()

and print eep[off] in mt7615_mcu_set_eeprom()

(Frank W.) #9

have my image now up and running :slight_smile:

mt7615_add_interface and mt7615_mcu_set_dev_info seems not to be called

these are the printk’s i’ve added: mt7615_interface_dev.patch (4,1 KB)

since off is only a in-loop-var i printed the full array

mt7615_eep.txt (133,7 KB)


have my image now up and running

the reason is ?

mt7615_add_interface and mt7615_mcu_set_dev_info seems not to be called

this should be called, the funciton is used to add interface (ifconfig wlan0)

So can you see AP-STA-CONNECTED now?

(Frank W.) #11

ok, they get called when try to bring the interface up…not at boottime

[  862.311122] DEBUG: Passed mt7615_add_interface 69                                                                                              
[  862.319666] DEBUG: Passed mt7615_add_interface 76                                                                                              
[  862.325457] DEBUG: Passed mt7615_add_interface 83                                                                                              
[  862.330584] DEBUG: Passed mt7615_mcu_set_dev_info 685                                                                                          
[  862.336083] DEBUG: Passed mt7615_mcu_set_dev_info 691                                                                                          
[  862.341534] DEBUG: Passed __mt7615_mcu_set_dev_info 649                                                                                        
[  862.349177] DEBUG: Passed __mt7615_mcu_set_dev_info 652                                                                                        
[  862.354790] DEBUG: Passed __mt7615_mcu_set_dev_info 654                                                                                        
[  862.360382] DEBUG: Passed __mt7615_mcu_set_dev_info 662                                                                                        
[  862.366078] DEBUG: Passed mt7615_add_interface 89 ret:0                                                                                        
[  862.371490] DEBUG: Passed mt7615_add_interface 93                                                                                              
[  862.376446] DEBUG: Passed mt7615_add_interface 99                                                                                              
[  862.381400] DEBUG: Passed mt7615_add_interface 103                                                                                             
[  862.386444] DEBUG: Passed mt7615_add_interface 105


So what is the current progress?

Can you ping to sta now or test it through iperf now? but i still think your efuse is not completed, we need those RF parameter.

(Frank W.) #13

i cannot bring wlan0 up and hostapd needs interface up

i rewrite my card with my image because i had strange things with jacks image (syslog cannot be deleted and shows old entries)

in my image i also needed a udev-rule to get rid of the “new” interface-naming:


SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", DRIVERS=="mt7615e", NAME="wlan0"

eep-array looks right?


I have no idea. I will find a card with empty efuse to test again.

eep-array looks right?


eeprom.txt (5.2 KB)

or @frank-w you can try to copy the content to data[off], where off starting from 52

(Frank W.) #15

you mean assign your values to data[off - MT_EE_NIC_CONF_0].val?

any way to write directly to eeprom and set these values?


yes. since your eeprom is almost empty you can assign my values if you want.

I don’t know the way to write directly to eeprom maybe bpiteam know it.

But i’m not sure if this could work or not as every card has its own value

(Frank W.) #17

seems not working :frowning: imho the card needs some of this data for bootup @jackzeng, can i write eeprom of mt7615-card? mt7615_eep.txt (130,2 KB)

this is how i did it:


 547     const char eepdata[] = { //from 52
 548         68,0,0,96,1,1,0,0,
 549         0,0,0,0,0,0,68,0,
 550         4,0,0,0,0,0,0,0,
 551         0,0,224,1,32,32,0,179,
 552         64,182,64,196,35,128,129,128,
 553         192,195,35,130,129,129,192,196,
 554         35,129,128,128,64,196,35,128,
 555         129,128,64,197,32,196,128,192,
 556         196,32,128,128,192,195,32,128,
 557         128,64,195,32,128,128,64,194,
 558         32,128,128,64,194,32,128,128,
 559         64,194,32,128,128,192,194,32,
 560         128,128,64,195,32,128,128,64,
 561         195,32,128,128,64,195,32,128,
 562         128,192,194,32,128,128,64,194,
 563         32,128,128,192,193,32,128,128,
 564         64,193,32,128,128,192,192,32,
 565         128,128,198,198,196,196,196,0,
 566         0,194,0,194,193,129,129,129,
 567         133,194,194,0,130,130,130,129,
 568         0,197,197,197,0,0,195,0,
 569         195,195,130,130,130,131,132,195,
 570         195,195,130,130,130,0,0,130,
 571         130,0,0,0,133,0,0,0,
 572         180,0,194,135
 573      };
 575     skb = mt7615_mcu_msg_alloc(NULL, size + sizeof(req_hdr));
 576     memcpy(skb_put(skb, sizeof(req_hdr)), &req_hdr, sizeof(req_hdr));
 577     data = (struct req_data *)skb_put(skb, size);
 578     memset(data, 0, size);
 580     for (off = MT_EE_NIC_CONF_0; off < __MT_EE_MAX; off++)
 581     {
 582         if (off>=52 && off<=247) eep[off]=eepdata[off-52];
 583         printk(KERN_ALERT "DEBUG: Passed %s %d eep[%d]:%d\n",__FUNCTION__,__LINE__,off,eep[off]);
 585         data[off - MT_EE_NIC_CONF_0].val = eep[off];
 586     }
 587     return mt7615_mcu_msg_send(dev, skb, MCU_EXT_CMD_EFUSE_BUFFER_MODE, here a eeprom-file is dumped in openwrt from a /proc/mtd device (i have none, but maybe a kernel-option is missing), i found MT7615E1_EEPROM.bin (1 KB)


openwrt 5ghz




R2 VHT40 1*nss



minstrel rate control :

(Frank W.) #21

tried my mt7615-card on bpi-r2, but it is not visible in lspci…used same cable as it is recognized on r64…very strange,

also my mt7612 is not recognized through cable (works without)

is possible, that r2 gives too less power on pci-bus for using with extender-cable?