[][MAC80211][WiFi7][app][Add Griffin support for atenl/iwpriv]

[Description]
Add Griffin support for atenl & iwpriv wrapper.
Also, add device id macro to prevent any confusion regarding the
inconsistency between device id & chip id used by the driver.
For example, for Eagle, MT76 driver use chip id 7996 (align top side
mark), but its pcie device id is 7990.

[Release-log]
N/A

Change-Id: Ia57342dabd252d42c2b9161a309644d069e70b83
Reviewed-on: https://gerrit.mediatek.inc/c/openwrt/feeds/mtk_openwrt_feeds/+/9663654
diff --git a/feed/app/atenl/src/eeprom.c b/feed/app/atenl/src/eeprom.c
index a3c73cf..6dd4113 100644
--- a/feed/app/atenl/src/eeprom.c
+++ b/feed/app/atenl/src/eeprom.c
@@ -151,6 +151,8 @@
 		/* TODO: parse info if required */
 	} else if (is_mt7992(an)) {
 		/* TODO: parse info if required */
+	} else if (is_mt7990(an)) {
+		/* TODO: parse info if required */
 	}
 }
 
@@ -158,19 +160,20 @@
 atenl_eeprom_init_max_size(struct atenl *an)
 {
 	switch (an->chip_id) {
-	case 0x7915:
+	case MT7915_DEVICE_ID:
 		an->eeprom_size = 3584;
 		an->eeprom_prek_offs = 0x62;
 		break;
-	case 0x7906:
-	case 0x7916:
-	case 0x7981:
-	case 0x7986:
+	case MT7916_EEPROM_CHIP_ID:
+	case MT7916_DEVICE_ID:
+	case MT7981_DEVICE_ID:
+	case MT7986_DEVICE_ID:
 		an->eeprom_size = 4096;
 		an->eeprom_prek_offs = 0x19a;
 		break;
-	case 0x7990:
-	case 0x7992:
+	case MT7996_DEVICE_ID:
+	case MT7992_DEVICE_ID:
+	case MT7990_DEVICE_ID:
 		an->eeprom_size = 7680;
 		an->eeprom_prek_offs = 0x1a5;
 	default:
@@ -255,20 +258,21 @@
 			case MT_EE_EAGLE_BAND_SEL_2GHZ:
 				anb->cap = BAND_TYPE_2G;
 				break;
+			case MT_EE_EAGLE_BAND_SEL_5GHZ_LOW:
+			case MT_EE_EAGLE_BAND_SEL_5GHZ_HIGH:
 			case MT_EE_EAGLE_BAND_SEL_5GHZ:
 				anb->cap = BAND_TYPE_5G;
 				break;
+			case MT_EE_EAGLE_BAND_SEL_6GHZ_LOW:
+			case MT_EE_EAGLE_BAND_SEL_6GHZ_HIGH:
 			case MT_EE_EAGLE_BAND_SEL_6GHZ:
 				anb->cap = BAND_TYPE_6G;
 				break;
-			case MT_EE_EAGLE_BAND_SEL_5GHZ_6GHZ:
-				anb->cap = BAND_TYPE_5G_6G;
-				break;
 			default:
 				break;
 			}
 		}
-	} else if (is_mt7992(an)) {
+	} else if (is_mt7992(an) || is_mt7990(an)) {
 		struct atenl_band *anb;
 		u8 val, band_sel;
 		u8 band_sel_mask[2] = {EAGLE_BAND_SEL(0), EAGLE_BAND_SEL(1)};
@@ -284,15 +288,16 @@
 			case MT_EE_EAGLE_BAND_SEL_2GHZ:
 				anb->cap = BAND_TYPE_2G;
 				break;
+			case MT_EE_EAGLE_BAND_SEL_5GHZ_LOW:
+			case MT_EE_EAGLE_BAND_SEL_5GHZ_HIGH:
 			case MT_EE_EAGLE_BAND_SEL_5GHZ:
 				anb->cap = BAND_TYPE_5G;
 				break;
+			case MT_EE_EAGLE_BAND_SEL_6GHZ_LOW:
+			case MT_EE_EAGLE_BAND_SEL_6GHZ_HIGH:
 			case MT_EE_EAGLE_BAND_SEL_6GHZ:
 				anb->cap = BAND_TYPE_6G;
 				break;
-			case MT_EE_EAGLE_BAND_SEL_5GHZ_6GHZ:
-				anb->cap = BAND_TYPE_5G_6G;
-				break;
 			default:
 				break;
 			}
@@ -304,7 +309,7 @@
 atenl_eeprom_init_antenna_cap(struct atenl *an)
 {
 	switch (an->chip_id) {
-	case 0x7915:
+	case MT7915_DEVICE_ID:
 		if (an->anb[0].cap == BAND_TYPE_2G_5G)
 			an->anb[0].chainmask = 0xf;
 		else {
@@ -312,28 +317,34 @@
 			an->anb[1].chainmask = 0xc;
 		}
 		break;
-	case 0x7906:
-	case 0x7916:
+	case MT7916_EEPROM_CHIP_ID:
+	case MT7916_DEVICE_ID:
 		an->anb[0].chainmask = 0x3;
 		an->anb[1].chainmask = 0x3;
 		break;
-	case 0x7981:
+	case MT7981_DEVICE_ID:
 		an->anb[0].chainmask = 0x3;
 		an->anb[1].chainmask = 0x7;
 		break;
-	case 0x7986:
+	case MT7986_DEVICE_ID:
 		an->anb[0].chainmask = 0xf;
 		an->anb[1].chainmask = 0xf;
 		break;
-	case 0x7990:
+	case MT7996_DEVICE_ID:
+		/* TODO: handle 4T5R */
 		an->anb[0].chainmask = 0xf;
 		an->anb[1].chainmask = 0xf;
 		an->anb[2].chainmask = 0xf;
 		break;
-	case 0x7992:
+	case MT7992_DEVICE_ID:
+		/* TODO: handle BE7200 2i5i 5T5R */
 		an->anb[0].chainmask = 0xf;
 		an->anb[1].chainmask = 0xf;
 		break;
+	case MT7990_DEVICE_ID:
+		an->anb[0].chainmask = 0x3;
+		an->anb[1].chainmask = 0x7;
+		break;
 	default:
 		break;
 	}