Wifi on Linux is still puzzlingly terrible. I bought a new card (TP-Link AC600 Dual Band USB Adapter w/ External Antenna) because it was supposed to have Linux support, but the manufacturer-provided drivers were only for Linux Kernels up to ~3.1 and I’m on 4.4.

> cat /proc/version

Linux version 4.4.0-38-generic (buildd@lgw01-58) (gcc version 5.4.0 20160609
(Ubuntu 5.4.0-6ubuntu1~16.04.2) ) #57-Ubuntu SMP Tue Sep 6 15:42:33 UTC 2016

OK, time to google. I found many references to this advice circa September 2015, which advocates use of a modified driver from github. After reboot I got a kernel panic, so I looked through the pull requests and found one critical fix that hadn’t been accepted upstream yet. Installed this driver instead, then did the following:

# Got the USB card recognized by loading the driver module.
sudo modprobe mt7610u_sta

# Bring up the interface.
sudo ifconfig ra0 up

# Modify the network manager config to set managed=true, forcing network manager
# to manage my silly network card.
sudo vim /etc/NetworkManager/NetworkManager.conf

# Reload the network manager.
sudo service network-manager restart

Card works now.

Since I didn’t use DKMS, if the kernel gets upgraded I’ll have to reinstall this driver.

Looks like the most active version of this driver is not the one I used, but this one: https://github.com/chenhaiq/mt7610u_wifi_sta_v3002_dpo_20130916. If I had to start over I guess I might use that branch instead, seems like a bunch of fixes are applied on it.