mirror of
https://github.com/outbackdingo/mt76.git
synced 2026-10-24 13:26:48 +00:00
wifi: mt76: mt7996: add macros for pci decive id
The chipset name (i.e., brand name) used by the driver may cause confusion with the PCI device ID when adding support for new chipsets. | Chipset name | PCI device id | |--------------|----------------| | 7996 | 0x7990, 0x7991 | | 7992 | 0x7992, 0x799a | | 7990 | 0x7993, 0x799b | To prevent confusion, replace the code that directly uses the device ID with macros. This is a preliminary patch to support mt7990 chipset. Co-developed-by: Peter Chiu <[email protected]> Signed-off-by: Peter Chiu <[email protected]> Signed-off-by: Shayne Chen <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Felix Fietkau <[email protected]>
This commit is contained in:
committed by
Felix Fietkau
parent
de635e1e3a
commit
63a4edf1cb
+2
-2
@@ -930,13 +930,13 @@ static int mt7996_variant_type_init(struct mt7996_dev *dev)
|
||||
u8 var_type;
|
||||
|
||||
switch (mt76_chip(&dev->mt76)) {
|
||||
case 0x7990:
|
||||
case MT7996_DEVICE_ID:
|
||||
if (val & MT_PAD_GPIO_2ADIE_TBTC)
|
||||
var_type = MT7996_VAR_TYPE_233;
|
||||
else
|
||||
var_type = MT7996_VAR_TYPE_444;
|
||||
break;
|
||||
case 0x7992:
|
||||
case MT7992_DEVICE_ID:
|
||||
if (val & MT_PAD_GPIO_ADIE_SINGLE)
|
||||
var_type = MT7992_VAR_TYPE_23;
|
||||
else if (u32_get_bits(val, MT_PAD_GPIO_ADIE_COMB_7992))
|
||||
|
||||
Reference in New Issue
Block a user