Skip to content

Commit e47f224

Browse files
LGA1150nbd168
authored andcommitted
mt76: mt7615: add support for MT7611N
MT7611N is basically the same as MT7615N, except it only supports 5GHz It is used by some TP-Link and Mercury wireless routers Signed-off-by: DENG Qingfang <[email protected]> Signed-off-by: Felix Fietkau <[email protected]>
1 parent 5e616ad commit e47f224

File tree

3 files changed

+14
-1
lines changed

3 files changed

+14
-1
lines changed

drivers/net/wireless/mediatek/mt76/mt7615/eeprom.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,12 @@ mt7615_eeprom_parse_hw_band_cap(struct mt7615_dev *dev)
111111
return;
112112
}
113113

114+
if (is_mt7611(&dev->mt76)) {
115+
/* 5GHz only */
116+
dev->mt76.cap.has_5ghz = true;
117+
return;
118+
}
119+
114120
val = FIELD_GET(MT_EE_NIC_WIFI_CONF_BAND_SEL,
115121
eeprom[MT_EE_WIFI_CONF]);
116122
switch (val) {
@@ -310,6 +316,7 @@ static void mt7615_cal_free_data(struct mt7615_dev *dev)
310316
mt7622_apply_cal_free_data(dev);
311317
break;
312318
case 0x7615:
319+
case 0x7611:
313320
mt7615_apply_cal_free_data(dev);
314321
break;
315322
}

drivers/net/wireless/mediatek/mt76/mt7615/mt7615.h

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -414,14 +414,19 @@ static inline bool is_mt7622(struct mt76_dev *dev)
414414

415415
static inline bool is_mt7615(struct mt76_dev *dev)
416416
{
417-
return mt76_chip(dev) == 0x7615;
417+
return mt76_chip(dev) == 0x7615 || mt76_chip(dev) == 0x7611;
418418
}
419419

420420
static inline bool is_mt7663(struct mt76_dev *dev)
421421
{
422422
return mt76_chip(dev) == 0x7663;
423423
}
424424

425+
static inline bool is_mt7611(struct mt76_dev *dev)
426+
{
427+
return mt76_chip(dev) == 0x7611;
428+
}
429+
425430
static inline void mt7615_irq_enable(struct mt7615_dev *dev, u32 mask)
426431
{
427432
mt76_set_irq_mask(&dev->mt76, 0, 0, mask);

drivers/net/wireless/mediatek/mt76/mt7615/pci.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
static const struct pci_device_id mt7615_pci_device_table[] = {
1515
{ PCI_DEVICE(0x14c3, 0x7615) },
1616
{ PCI_DEVICE(0x14c3, 0x7663) },
17+
{ PCI_DEVICE(0x14c3, 0x7611) },
1718
{ },
1819
};
1920

0 commit comments

Comments
 (0)