The solution described here worked for me in Ubuntu 16.04 and 18.04:
https://github.com/kuba-moo/mt7601u/issues/64#issuecomment-352250127

I will reference it here:

Originally written by ingate.
Thanks to aleksander and Nidroide.
Tested on Ubuntu 14.04 (kernel 4.4), Ubuntu 17.10 (kernel 4.13) and Ubuntu 
18.04 (4.15.0-36-generic)

1. Download corresponding kernel source from kernel.org. For example: if you 
have 4.4.0-104-generic download version 4.4.
2. From archive unpack just folder drivers/net/wireless/mediatek/mt7601u
3. Edit phy.c. Find function mt7601u_init_cal and comment out call 
mt7601u_mcu_calibrate(dev, MCU_CAL_RXIQ, 0); like so:

//  ret = mt7601u_mcu_calibrate(dev, MCU_CAL_RXIQ, 0);
//  if (ret)
//      return ret;
//  ret = mt7601u_mcu_calibrate(dev, MCU_CAL_DPD, dev->dpd_temp);
//  if (ret)
//      return ret;

Find function mt7601u_phy_recalibrate_after_assoc and comment out call
mt7601u_mcu_calibrate(dev, MCU_CAL_DPD, dev->curr_temp); like so:

void mt7601u_phy_recalibrate_after_assoc(struct mt7601u_dev *dev)
{
//  mt7601u_mcu_calibrate(dev, MCU_CAL_DPD, dev->curr_temp);

    mt7601u_rxdc_cal(dev);
}

4. Build module: make -C /lib/modules/$(uname -r)/build M=$(pwd) modules
5. Remove device
6. sudo rmmod mt7601u
7. sudo insmod ./mt7601u.ko
8. Insert device
9. Check there are no errors in dmesg and interface appeared in ip link, check 
connection stability.
10. To make change persistent till next kernel upgrade: backup original module 
and replace with compiled. To find out where is original module run modinfo 
mt7601u (view string filename: 
/lib/modules/_KERNEL_VERSION_/kernel/drivers/net/wireless/mediatek/mt7601u/mt7601u.ko).

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1716301

Title:
  wifi driver: mt7601u not work on 16.04

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1716301/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to