mt76x0: add quirk to disable 2.4GHz band for Archer T1U

TP-LINK Archer T1U do not support 2.4GHz band despite EEPROM
reports that. Add quirk to mask out 2.4GHz support.

Reported-by: Sid Hayn <sidhayn@gmail.com>
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
This commit is contained in:
Stanislaw Gruszka
2018-09-25 08:49:48 +02:00
committed by Felix Fietkau
parent 606f8e3433
commit d6500cf370
3 changed files with 13 additions and 1 deletions

View File

@@ -62,6 +62,11 @@ static void mt76x0_set_chip_cap(struct mt76x0_dev *dev)
dev_dbg(dev->mt76.dev, "2GHz %d 5GHz %d\n",
dev->mt76.cap.has_2ghz, dev->mt76.cap.has_5ghz);
if (dev->no_2ghz) {
dev->mt76.cap.has_2ghz = false;
dev_dbg(dev->mt76.dev, "mask out 2GHz support\n");
}
if (!mt76x02_field_valid(nic_conf1 & 0xff))
nic_conf1 &= 0xff00;

View File

@@ -108,6 +108,8 @@ struct mt76x0_dev {
u8 agc_save;
u16 chainmask;
bool no_2ghz;
struct mac_stats stats;
};

View File

@@ -45,7 +45,8 @@ static struct usb_device_id mt76x0_device_table[] = {
{ USB_DEVICE(0x20f4, 0x806b) }, /* TRENDnet TEW-806UBH */
{ USB_DEVICE(0x7392, 0xc711) }, /* Devolo Wifi ac Stick */
{ USB_DEVICE(0x0df6, 0x0079) }, /* Sitecom Europe B.V. ac Stick */
{ USB_DEVICE(0x2357, 0x0105) }, /* TP-LINK Archer T1U */
{ USB_DEVICE(0x2357, 0x0105),
.driver_info = 1, }, /* TP-LINK Archer T1U */
{ USB_DEVICE_AND_INTERFACE_INFO(0x0E8D, 0x7630, 0xff, 0x2, 0xff)}, /* MT7630U */
{ USB_DEVICE_AND_INTERFACE_INFO(0x0E8D, 0x7650, 0xff, 0x2, 0xff)}, /* MT7650U */
{ 0, }
@@ -222,6 +223,10 @@ static int mt76x0u_probe(struct usb_interface *usb_intf,
if (!dev)
return -ENOMEM;
/* Quirk for Archer T1U */
if (id->driver_info)
dev->no_2ghz = true;
usb_dev = usb_get_dev(usb_dev);
usb_reset_device(usb_dev);