using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Controls;
using QRCT_modem_RF_Debug_tool;

namespace QFDT_Components;

public class WCN36xxStatic
{
	public static Dictionary<string, string> chipMap;

	public static Dictionary<string, uint> ChannelDict;

	public static Dictionary<string, int> wlanIDDict;

	public static Dictionary<string, byte> PwrCtrlModeDict;

	public static ArrayList rateTable;

	public static void updateWCN36xxInfo(ref WCN36xxInfo wcn36xx, bool bValid, string way, string bbtype, List<WCN36xx_TxScenario> scenariolist)
	{
		wcn36xx = new WCN36xxInfo();
		wcn36xx.bValid = bValid;
		wcn36xx.WayToLaunchProcess = way;
		wcn36xx.BasebandType = bbtype;
		if (scenariolist.Count > 0)
		{
			wcn36xx.ScenarioList = new WCN36xx_TxScenarioList();
			wcn36xx.ScenarioList.Scenario = new WCN36xx_TxScenario[scenariolist.Count];
			for (int i = 0; i < scenariolist.Count; i++)
			{
				wcn36xx.ScenarioList.Scenario[i] = scenariolist[i].DeepCopy();
			}
		}
	}

	public static string getChanText(uint chan)
	{
		string result = null;
		foreach (string key in ChannelDict.Keys)
		{
			if (ChannelDict[key] == chan)
			{
				result = key;
				break;
			}
		}
		return result;
	}

	public static RateEnumEntry getRateInstance(string chip, BaseBandSupportedType bbType, string mode, string comboString)
	{
		RateEnumEntry result = null;
		foreach (RateEnumEntry item in rateTable)
		{
			int num = -1;
			switch (chip)
			{
			case "WCN1312":
			case "WCN1314":
				num = item.wcn131xEnum;
				break;
			case "WCN3610/15/20":
			case "WCN3660/A/B":
				num = item.wcn3660Enum;
				break;
			case "WCN3680/B":
				num = item.wcn3680Enum;
				break;
			}
			if (num >= 0 && item.mode == mode && (bbType == item.type || item.type == BaseBandSupportedType.Both) && item.comboString == comboString)
			{
				result = item;
				break;
			}
		}
		return result;
	}

	static WCN36xxStatic()
	{
		wlanIDDict = new Dictionary<string, int>();
		wlanIDDict.Add("WCN1312", 1312);
		wlanIDDict.Add("WCN1314", 1314);
		wlanIDDict.Add("WCN3610/15/20", 3620);
		wlanIDDict.Add("WCN3660/A/B", 3660);
		wlanIDDict.Add("WCN3680/B", 3680);
		chipMap = new Dictionary<string, string>();
		chipMap.Add("WCN1312", "WCN36xx");
		chipMap.Add("WCN1314", "WCN36xx");
		chipMap.Add("WCN3610/15/20", "WCN36xx");
		chipMap.Add("WCN3660/A/B", "WCN36xx");
		chipMap.Add("WCN3680/B", "WCN36xx");
		PwrCtrlModeDict = new Dictionary<string, byte>();
		PwrCtrlModeDict.Add("OPEN LOOP", 0);
		PwrCtrlModeDict.Add("SCPC", 1);
		PwrCtrlModeDict.Add("CLPC", 2);
		PwrCtrlModeDict.Add("AUTO", 9);
		PwrCtrlModeDict.Add("AUTO-SAR", 10);
		ChannelDict = new Dictionary<string, uint>();
		ChannelDict.Add("NOT SET", 999u);
		ChannelDict.Add("RF_CHAN_1(2412)", 1u);
		ChannelDict.Add("RF_CHAN_2(2417)", 2u);
		ChannelDict.Add("RF_CHAN_3(2422)", 3u);
		ChannelDict.Add("RF_CHAN_4(2427)", 4u);
		ChannelDict.Add("RF_CHAN_5(2432)", 5u);
		ChannelDict.Add("RF_CHAN_6(2437)", 6u);
		ChannelDict.Add("RF_CHAN_7(2442)", 7u);
		ChannelDict.Add("RF_CHAN_8(2447)", 8u);
		ChannelDict.Add("RF_CHAN_9(2452)", 9u);
		ChannelDict.Add("RF_CHAN_10(2457)", 10u);
		ChannelDict.Add("RF_CHAN_11(2462)", 11u);
		ChannelDict.Add("RF_CHAN_12(2467)", 12u);
		ChannelDict.Add("RF_CHAN_13(2472)", 13u);
		ChannelDict.Add("RF_CHAN_14(2484)", 14u);
		ChannelDict.Add("RF_CHAN_36(5180)", 36u);
		ChannelDict.Add("RF_CHAN_38(5190)", 38u);
		ChannelDict.Add("RF_CHAN_40(5200)", 40u);
		ChannelDict.Add("RF_CHAN_42(5210)", 42u);
		ChannelDict.Add("RF_CHAN_44(5220)", 44u);
		ChannelDict.Add("RF_CHAN_46(5230)", 46u);
		ChannelDict.Add("RF_CHAN_48(5240)", 48u);
		ChannelDict.Add("RF_CHAN_50(5250)", 50u);
		ChannelDict.Add("RF_CHAN_52(5260)", 52u);
		ChannelDict.Add("RF_CHAN_54(5270)", 54u);
		ChannelDict.Add("RF_CHAN_56(5280)", 56u);
		ChannelDict.Add("RF_CHAN_58(5290)", 58u);
		ChannelDict.Add("RF_CHAN_60(5300)", 60u);
		ChannelDict.Add("RF_CHAN_62(5310)", 62u);
		ChannelDict.Add("RF_CHAN_64(5320)", 64u);
		ChannelDict.Add("RF_CHAN_100(5500)", 100u);
		ChannelDict.Add("RF_CHAN_102(5510)", 102u);
		ChannelDict.Add("RF_CHAN_104(5520)", 104u);
		ChannelDict.Add("RF_CHAN_106(5530)", 106u);
		ChannelDict.Add("RF_CHAN_108(5540)", 108u);
		ChannelDict.Add("RF_CHAN_110(5550)", 110u);
		ChannelDict.Add("RF_CHAN_112(5560)", 112u);
		ChannelDict.Add("RF_CHAN_114(5570)", 114u);
		ChannelDict.Add("RF_CHAN_116(5580)", 116u);
		ChannelDict.Add("RF_CHAN_118(5590)", 118u);
		ChannelDict.Add("RF_CHAN_120(5600)", 120u);
		ChannelDict.Add("RF_CHAN_122(5610)", 122u);
		ChannelDict.Add("RF_CHAN_124(5620)", 124u);
		ChannelDict.Add("RF_CHAN_126(5630)", 126u);
		ChannelDict.Add("RF_CHAN_128(5640)", 128u);
		ChannelDict.Add("RF_CHAN_130(5650)", 130u);
		ChannelDict.Add("RF_CHAN_132(5660)", 132u);
		ChannelDict.Add("RF_CHAN_134(5670)", 134u);
		ChannelDict.Add("RF_CHAN_136(5680)", 136u);
		ChannelDict.Add("RF_CHAN_138(5690)", 138u);
		ChannelDict.Add("RF_CHAN_140(5700)", 140u);
		ChannelDict.Add("RF_CHAN_142(5710)", 142u);
		ChannelDict.Add("RF_CHAN_144(5720)", 144u);
		ChannelDict.Add("RF_CHAN_149(5745)", 149u);
		ChannelDict.Add("RF_CHAN_151(5755)", 151u);
		ChannelDict.Add("RF_CHAN_153(5765)", 153u);
		ChannelDict.Add("RF_CHAN_155(5775)", 155u);
		ChannelDict.Add("RF_CHAN_157(5785)", 157u);
		ChannelDict.Add("RF_CHAN_159(5795)", 159u);
		ChannelDict.Add("RF_CHAN_161(5805)", 161u);
		ChannelDict.Add("RF_CHAN_163(5815)", 163u);
		ChannelDict.Add("RF_CHAN_165(5825)", 165u);
		rateTable = new ArrayList();
		rateTable.Add(new RateEnumEntry("11b", 0, 0, 0, 20, BaseBandSupportedType.Both, "11b LONG 1 Mbps"));
		rateTable.Add(new RateEnumEntry("11b", 1, 1, 1, 20, BaseBandSupportedType.Both, "11b LONG 2 Mbps"));
		rateTable.Add(new RateEnumEntry("11b", 2, 2, 2, 20, BaseBandSupportedType.Both, "11b LONG 5.5 Mbps"));
		rateTable.Add(new RateEnumEntry("11b", 3, 3, 3, 20, BaseBandSupportedType.Both, "11b LONG 11 Mbps"));
		rateTable.Add(new RateEnumEntry("11b", 4, 4, 4, 20, BaseBandSupportedType.Both, "11b SHORT 2 Mbps"));
		rateTable.Add(new RateEnumEntry("11b", 5, 5, 5, 20, BaseBandSupportedType.Both, "11b SHORT 5.5 Mbps"));
		rateTable.Add(new RateEnumEntry("11b", 6, 6, 6, 20, BaseBandSupportedType.Both, "11b SHORT 11 Mbps"));
		rateTable.Add(new RateEnumEntry("11a/g", 9, 7, 7, 20, BaseBandSupportedType.Both, "11g 6 Mbps"));
		rateTable.Add(new RateEnumEntry("11a/g", 10, 8, 8, 20, BaseBandSupportedType.Both, "11g 9 Mbps"));
		rateTable.Add(new RateEnumEntry("11a/g", 11, 9, 9, 20, BaseBandSupportedType.Both, "11g 12 Mbps"));
		rateTable.Add(new RateEnumEntry("11a/g", 12, 10, 10, 20, BaseBandSupportedType.Both, "11g 18 Mbps"));
		rateTable.Add(new RateEnumEntry("11a/g", 13, 11, 11, 20, BaseBandSupportedType.Both, "11g 24 Mbps"));
		rateTable.Add(new RateEnumEntry("11a/g", 14, 12, 12, 20, BaseBandSupportedType.Both, "11g 36 Mbps"));
		rateTable.Add(new RateEnumEntry("11a/g", 15, 13, 13, 20, BaseBandSupportedType.Both, "11g 48 Mbps"));
		rateTable.Add(new RateEnumEntry("11a/g", 16, 14, 14, 20, BaseBandSupportedType.Both, "11g 54 Mbps"));
		rateTable.Add(new RateEnumEntry("11n", 17, 23, 23, 20, BaseBandSupportedType.Both, "MCS0 6.5 Mbps"));
		rateTable.Add(new RateEnumEntry("11n", 18, 24, 24, 20, BaseBandSupportedType.Both, "MCS1 13 Mbps"));
		rateTable.Add(new RateEnumEntry("11n", 19, 25, 25, 20, BaseBandSupportedType.Both, "MCS2 19.5 Mbps"));
		rateTable.Add(new RateEnumEntry("11n", 20, 26, 26, 20, BaseBandSupportedType.Both, "MCS3 26 Mbps"));
		rateTable.Add(new RateEnumEntry("11n", 21, 27, 27, 20, BaseBandSupportedType.Both, "MCS4 39 Mbps"));
		rateTable.Add(new RateEnumEntry("11n", 22, 28, 28, 20, BaseBandSupportedType.Both, "MCS5 52 Mbps"));
		rateTable.Add(new RateEnumEntry("11n", 23, 29, 29, 20, BaseBandSupportedType.Both, "MCS6 58.5 Mbps"));
		rateTable.Add(new RateEnumEntry("11n", 24, 30, 30, 20, BaseBandSupportedType.Both, "MCS7 65 Mbps"));
		rateTable.Add(new RateEnumEntry("11n", 25, 31, 31, 20, BaseBandSupportedType.Both, "MCS0 MM SG 7.2 Mbps"));
		rateTable.Add(new RateEnumEntry("11n", 26, 32, 32, 20, BaseBandSupportedType.Both, "MCS1 MM SG 14.4 Mbps"));
		rateTable.Add(new RateEnumEntry("11n", 27, 33, 33, 20, BaseBandSupportedType.Both, "MCS2 MM SG 21.7 Mbps"));
		rateTable.Add(new RateEnumEntry("11n", 28, 34, 34, 20, BaseBandSupportedType.Both, "MCS3 MM SG 28.9 Mbps"));
		rateTable.Add(new RateEnumEntry("11n", 29, 35, 35, 20, BaseBandSupportedType.Both, "MCS4 MM SG 43.3 Mbps"));
		rateTable.Add(new RateEnumEntry("11n", 30, 36, 36, 20, BaseBandSupportedType.Both, "MCS5 MM SG 57.8 Mbps"));
		rateTable.Add(new RateEnumEntry("11n", 31, 37, 37, 20, BaseBandSupportedType.Both, "MCS6 MM SG 65 Mbps"));
		rateTable.Add(new RateEnumEntry("11n", 32, 38, 38, 20, BaseBandSupportedType.Both, "MCS7 MM SG 72.2 Mbps"));
		rateTable.Add(new RateEnumEntry("11n", -1, 39, 39, 40, BaseBandSupportedType.Both, "MCS0 13.5 Mbps (40MHz)"));
		rateTable.Add(new RateEnumEntry("11n", -1, 40, 40, 40, BaseBandSupportedType.Both, "MCS1 27 Mbps (40MHz)"));
		rateTable.Add(new RateEnumEntry("11n", -1, 41, 41, 40, BaseBandSupportedType.Both, "MCS2 40.5 Mbps (40MHz)"));
		rateTable.Add(new RateEnumEntry("11n", -1, 42, 42, 40, BaseBandSupportedType.Both, "MCS3 54 Mbps (40MHz)"));
		rateTable.Add(new RateEnumEntry("11n", -1, 43, 43, 40, BaseBandSupportedType.Both, "MCS4 81 Mbps (40MHz)"));
		rateTable.Add(new RateEnumEntry("11n", -1, 44, 44, 40, BaseBandSupportedType.Both, "MCS5 108 Mbps (40MHz)"));
		rateTable.Add(new RateEnumEntry("11n", -1, 45, 45, 40, BaseBandSupportedType.Both, "MCS6 121.5 Mbps (40MHz)"));
		rateTable.Add(new RateEnumEntry("11n", -1, 46, 46, 40, BaseBandSupportedType.Both, "MCS7 135 Mbps (40MHz)"));
		rateTable.Add(new RateEnumEntry("11n", -1, 47, 47, 40, BaseBandSupportedType.Both, "MCS0 MM SG 15 Mbps (40MHz)"));
		rateTable.Add(new RateEnumEntry("11n", -1, 48, 48, 40, BaseBandSupportedType.Both, "MCS1 MM SG 30 Mbps (40MHz)"));
		rateTable.Add(new RateEnumEntry("11n", -1, 49, 49, 40, BaseBandSupportedType.Both, "MCS2 MM SG 45 Mbps (40MHz)"));
		rateTable.Add(new RateEnumEntry("11n", -1, 50, 50, 40, BaseBandSupportedType.Both, "MCS3 MM SG 60 Mbps (40MHz)"));
		rateTable.Add(new RateEnumEntry("11n", -1, 51, 51, 40, BaseBandSupportedType.Both, "MCS4 MM SG 90 Mbps (40MHz)"));
		rateTable.Add(new RateEnumEntry("11n", -1, 52, 52, 40, BaseBandSupportedType.Both, "MCS5 MM SG 120 Mbps (40MHz)"));
		rateTable.Add(new RateEnumEntry("11n", -1, 53, 53, 40, BaseBandSupportedType.Both, "MCS6 MM SG 135 Mbps (40MHz)"));
		rateTable.Add(new RateEnumEntry("11n", -1, 54, 54, 40, BaseBandSupportedType.Both, "MCS7 MM SG 150 Mbps (40MHz)"));
		rateTable.Add(new RateEnumEntry("11ac", -1, -1, 63, 20, BaseBandSupportedType.Riva, "11ac MCS0 NGI 6.5 Mbps (20MHz)"));
		rateTable.Add(new RateEnumEntry("11ac", -1, -1, 64, 20, BaseBandSupportedType.Riva, "11ac MCS1 NGI 13 Mbps (20MHz)"));
		rateTable.Add(new RateEnumEntry("11ac", -1, -1, 65, 20, BaseBandSupportedType.Riva, "11ac MCS2 NGI 19.5 Mbps (20MHz)"));
		rateTable.Add(new RateEnumEntry("11ac", -1, -1, 66, 20, BaseBandSupportedType.Riva, "11ac MCS3 NGI 26 Mbps (20MHz)"));
		rateTable.Add(new RateEnumEntry("11ac", -1, -1, 67, 20, BaseBandSupportedType.Riva, "11ac MCS4 NGI 39 Mbps (20MHz)"));
		rateTable.Add(new RateEnumEntry("11ac", -1, -1, 68, 20, BaseBandSupportedType.Riva, "11ac MCS5 NGI 52 Mbps (20MHz)"));
		rateTable.Add(new RateEnumEntry("11ac", -1, -1, 69, 20, BaseBandSupportedType.Riva, "11ac MCS6 NGI 58.5 Mbps (20MHz)"));
		rateTable.Add(new RateEnumEntry("11ac", -1, -1, 70, 20, BaseBandSupportedType.Riva, "11ac MCS7 NGI 65 Mbps (20MHz)"));
		rateTable.Add(new RateEnumEntry("11ac", -1, -1, 71, 20, BaseBandSupportedType.Riva, "11ac MCS8 NGI 78 Mbps (20MHz)"));
		rateTable.Add(new RateEnumEntry("11ac", -1, -1, 72, 20, BaseBandSupportedType.Riva, "11ac MCS 0SGI 7.2 Mbps (20MHz)"));
		rateTable.Add(new RateEnumEntry("11ac", -1, -1, 73, 20, BaseBandSupportedType.Riva, "11ac MCS1 SGI 14.4 Mbps (20MHz)"));
		rateTable.Add(new RateEnumEntry("11ac", -1, -1, 74, 20, BaseBandSupportedType.Riva, "11ac MCS2 SGI 21.6 Mbps (20MHz)"));
		rateTable.Add(new RateEnumEntry("11ac", -1, -1, 75, 20, BaseBandSupportedType.Riva, "11ac MCS3 SGI 28.8 Mbps (20MHz)"));
		rateTable.Add(new RateEnumEntry("11ac", -1, -1, 76, 20, BaseBandSupportedType.Riva, "11ac MCS4 SGI 43.3 Mbps (20MHz)"));
		rateTable.Add(new RateEnumEntry("11ac", -1, -1, 77, 20, BaseBandSupportedType.Riva, "11ac MCS5 SGI 57.7 Mbps (20MHz)"));
		rateTable.Add(new RateEnumEntry("11ac", -1, -1, 78, 20, BaseBandSupportedType.Riva, "11ac MCS6 SGI 65 Mbps (20MHz)"));
		rateTable.Add(new RateEnumEntry("11ac", -1, -1, 79, 20, BaseBandSupportedType.Riva, "11ac MCS7 SGI 72.2 Mbps (20MHz)"));
		rateTable.Add(new RateEnumEntry("11ac", -1, -1, 80, 20, BaseBandSupportedType.Riva, "11ac MCS8 SGI 86.6 Mbps (20MHz)"));
		rateTable.Add(new RateEnumEntry("11ac", -1, -1, 81, 40, BaseBandSupportedType.Riva, "11ac MCS0 NGI 13.5 Mbps (40MHz)"));
		rateTable.Add(new RateEnumEntry("11ac", -1, -1, 82, 40, BaseBandSupportedType.Riva, "11ac MCS1 NGI 27 Mbps (40MHz)"));
		rateTable.Add(new RateEnumEntry("11ac", -1, -1, 83, 40, BaseBandSupportedType.Riva, "11ac MCS2 NGI 40 Mbps (40MHz)"));
		rateTable.Add(new RateEnumEntry("11ac", -1, -1, 84, 40, BaseBandSupportedType.Riva, "11ac MCS3 NGI 54 Mbps (40MHz)"));
		rateTable.Add(new RateEnumEntry("11ac", -1, -1, 85, 40, BaseBandSupportedType.Riva, "11ac MCS4 NGI 81 Mbps (40MHz)"));
		rateTable.Add(new RateEnumEntry("11ac", -1, -1, 86, 40, BaseBandSupportedType.Riva, "11ac MCS5 NGI 108 Mbps (40MHz)"));
		rateTable.Add(new RateEnumEntry("11ac", -1, -1, 87, 40, BaseBandSupportedType.Riva, "11ac MCS6 NGI 121.5 Mbps (40MHz)"));
		rateTable.Add(new RateEnumEntry("11ac", -1, -1, 88, 40, BaseBandSupportedType.Riva, "11ac MCS7 NGI 135 Mbps (40MHz)"));
		rateTable.Add(new RateEnumEntry("11ac", -1, -1, 89, 40, BaseBandSupportedType.Riva, "11ac MCS8 NGI 162 Mbps (40MHz)"));
		rateTable.Add(new RateEnumEntry("11ac", -1, -1, 90, 40, BaseBandSupportedType.Riva, "11ac MCS9 NGI 180 Mbps (40MHz)"));
		rateTable.Add(new RateEnumEntry("11ac", -1, -1, 91, 40, BaseBandSupportedType.Riva, "11ac MCS0 SGI 15 Mbps (40MHz)"));
		rateTable.Add(new RateEnumEntry("11ac", -1, -1, 92, 40, BaseBandSupportedType.Riva, "11ac MCS1 SGI 30 Mbps (40MHz)"));
		rateTable.Add(new RateEnumEntry("11ac", -1, -1, 93, 40, BaseBandSupportedType.Riva, "11ac MCS2 SGI 45 Mbps (40MHz)"));
		rateTable.Add(new RateEnumEntry("11ac", -1, -1, 94, 40, BaseBandSupportedType.Riva, "11ac MCS3 SGI 60 Mbps (40MHz)"));
		rateTable.Add(new RateEnumEntry("11ac", -1, -1, 95, 40, BaseBandSupportedType.Riva, "11ac MCS4 SGI 90 Mbps (40MHz)"));
		rateTable.Add(new RateEnumEntry("11ac", -1, -1, 96, 40, BaseBandSupportedType.Riva, "11ac MCS5 SGI 120 Mbps (40MHz)"));
		rateTable.Add(new RateEnumEntry("11ac", -1, -1, 97, 40, BaseBandSupportedType.Riva, "11ac MCS6 SGI 135 Mbps (40MHz)"));
		rateTable.Add(new RateEnumEntry("11ac", -1, -1, 98, 40, BaseBandSupportedType.Riva, "11ac MCS7 SGI 150 Mbps (40MHz)"));
		rateTable.Add(new RateEnumEntry("11ac", -1, -1, 99, 40, BaseBandSupportedType.Riva, "11ac MCS8 SGI 180 Mbps (40MHz)"));
		rateTable.Add(new RateEnumEntry("11ac", -1, -1, 100, 40, BaseBandSupportedType.Riva, "11ac MCS9 SGI 200 Mbps (40MHz)"));
		rateTable.Add(new RateEnumEntry("11ac", -1, -1, 101, 80, BaseBandSupportedType.Riva, "11ac MCS0 NGI 29.3 Mbps (80MHz)"));
		rateTable.Add(new RateEnumEntry("11ac", -1, -1, 102, 80, BaseBandSupportedType.Riva, "11ac MCS1 NGI 58.5 Mbps (80MHz)"));
		rateTable.Add(new RateEnumEntry("11ac", -1, -1, 103, 80, BaseBandSupportedType.Riva, "11ac MCS2 NGI 87.8 Mbps (80MHz)"));
		rateTable.Add(new RateEnumEntry("11ac", -1, -1, 104, 80, BaseBandSupportedType.Riva, "11ac MCS3 NGI 117 Mbps (80MHz)"));
		rateTable.Add(new RateEnumEntry("11ac", -1, -1, 105, 80, BaseBandSupportedType.Riva, "11ac MCS4 NGI 175.5 Mbps (80MHz)"));
		rateTable.Add(new RateEnumEntry("11ac", -1, -1, 106, 80, BaseBandSupportedType.Riva, "11ac MCS5 NGI 234 Mbps (80MHz)"));
		rateTable.Add(new RateEnumEntry("11ac", -1, -1, 107, 80, BaseBandSupportedType.Riva, "11ac MCS6 NGI 263.3 Mbps (80MHz)"));
		rateTable.Add(new RateEnumEntry("11ac", -1, -1, 108, 80, BaseBandSupportedType.Riva, "11ac MCS7 NGI 292.5 Mbps (80MHz)"));
		rateTable.Add(new RateEnumEntry("11ac", -1, -1, 109, 80, BaseBandSupportedType.Riva, "11ac MCS8 NGI 351 Mbps (80MHz)"));
		rateTable.Add(new RateEnumEntry("11ac", -1, -1, 110, 80, BaseBandSupportedType.Riva, "11ac MCS9 NGI 390 Mbps (80MHz)"));
		rateTable.Add(new RateEnumEntry("11ac", -1, -1, 111, 80, BaseBandSupportedType.Riva, "11ac MCS0 SGI 32.5 Mbps (80MHz)"));
		rateTable.Add(new RateEnumEntry("11ac", -1, -1, 112, 80, BaseBandSupportedType.Riva, "11ac MCS1 SGI 65 Mbps (80MHz)"));
		rateTable.Add(new RateEnumEntry("11ac", -1, -1, 113, 80, BaseBandSupportedType.Riva, "11ac MCS2 SGI 97.5 Mbps (80MHz)"));
		rateTable.Add(new RateEnumEntry("11ac", -1, -1, 114, 80, BaseBandSupportedType.Riva, "11ac MCS3 SGI 130 Mbps (80MHz)"));
		rateTable.Add(new RateEnumEntry("11ac", -1, -1, 115, 80, BaseBandSupportedType.Riva, "11ac MCS4 SGI 195 Mbps (80MHz)"));
		rateTable.Add(new RateEnumEntry("11ac", -1, -1, 116, 80, BaseBandSupportedType.Riva, "11ac MCS5 SGI 260 Mbps (80MHz)"));
		rateTable.Add(new RateEnumEntry("11ac", -1, -1, 117, 80, BaseBandSupportedType.Riva, "11ac MCS6 SGI 292.5 Mbps (80MHz)"));
		rateTable.Add(new RateEnumEntry("11ac", -1, -1, 118, 80, BaseBandSupportedType.Riva, "11ac MCS7 SGI 325 Mbps (80MHz)"));
		rateTable.Add(new RateEnumEntry("11ac", -1, -1, 119, 80, BaseBandSupportedType.Riva, "11ac MCS8 SGI 390 Mbps (80MHz)"));
		rateTable.Add(new RateEnumEntry("11ac", -1, -1, 120, 80, BaseBandSupportedType.Riva, "11ac MCS9 SGI 433.3 Mbps (80MHz)"));
		rateTable.Add(new RateEnumEntry("11ac", -1, -1, 63, 20, BaseBandSupportedType.Pronto, "11ac MCS0 NGI 6.5 Mbps (20MHz)"));
		rateTable.Add(new RateEnumEntry("11ac", -1, -1, 64, 20, BaseBandSupportedType.Pronto, "11ac MCS1 NGI 13 Mbps (20MHz)"));
		rateTable.Add(new RateEnumEntry("11ac", -1, -1, 65, 20, BaseBandSupportedType.Pronto, "11ac MCS2 NGI 19.5 Mbps (20MHz)"));
		rateTable.Add(new RateEnumEntry("11ac", -1, -1, 66, 20, BaseBandSupportedType.Pronto, "11ac MCS3 NGI 26 Mbps (20MHz)"));
		rateTable.Add(new RateEnumEntry("11ac", -1, -1, 67, 20, BaseBandSupportedType.Pronto, "11ac MCS4 NGI 39 Mbps (20MHz)"));
		rateTable.Add(new RateEnumEntry("11ac", -1, -1, 68, 20, BaseBandSupportedType.Pronto, "11ac MCS5 NGI 52 Mbps (20MHz)"));
		rateTable.Add(new RateEnumEntry("11ac", -1, -1, 69, 20, BaseBandSupportedType.Pronto, "11ac MCS6 NGI 58.5 Mbps (20MHz)"));
		rateTable.Add(new RateEnumEntry("11ac", -1, -1, 70, 20, BaseBandSupportedType.Pronto, "11ac MCS7 NGI 65 Mbps (20MHz)"));
		rateTable.Add(new RateEnumEntry("11ac", -1, -1, 71, 20, BaseBandSupportedType.Pronto, "11ac MCS8 NGI 78 Mbps (20MHz)"));
		rateTable.Add(new RateEnumEntry("11ac", -1, -1, 72, 20, BaseBandSupportedType.Pronto, "11ac MCS9 NGI 86.5 Mbps (20MHz)"));
		rateTable.Add(new RateEnumEntry("11ac", -1, -1, 73, 20, BaseBandSupportedType.Pronto, "11ac MCS 0SGI 7.2 Mbps (20MHz)"));
		rateTable.Add(new RateEnumEntry("11ac", -1, -1, 74, 20, BaseBandSupportedType.Pronto, "11ac MCS1 SGI 14.4 Mbps (20MHz)"));
		rateTable.Add(new RateEnumEntry("11ac", -1, -1, 75, 20, BaseBandSupportedType.Pronto, "11ac MCS2 SGI 21.6 Mbps (20MHz)"));
		rateTable.Add(new RateEnumEntry("11ac", -1, -1, 76, 20, BaseBandSupportedType.Pronto, "11ac MCS3 SGI 28.8 Mbps (20MHz)"));
		rateTable.Add(new RateEnumEntry("11ac", -1, -1, 77, 20, BaseBandSupportedType.Pronto, "11ac MCS4 SGI 43.3 Mbps (20MHz)"));
		rateTable.Add(new RateEnumEntry("11ac", -1, -1, 78, 20, BaseBandSupportedType.Pronto, "11ac MCS5 SGI 57.7 Mbps (20MHz)"));
		rateTable.Add(new RateEnumEntry("11ac", -1, -1, 79, 20, BaseBandSupportedType.Pronto, "11ac MCS6 SGI 65 Mbps (20MHz)"));
		rateTable.Add(new RateEnumEntry("11ac", -1, -1, 80, 20, BaseBandSupportedType.Pronto, "11ac MCS7 SGI 72.2 Mbps (20MHz)"));
		rateTable.Add(new RateEnumEntry("11ac", -1, -1, 81, 20, BaseBandSupportedType.Pronto, "11ac MCS8 SGI 86.6 Mbps (20MHz)"));
		rateTable.Add(new RateEnumEntry("11ac", -1, -1, 82, 20, BaseBandSupportedType.Pronto, "11ac MCS9 SGI 96.1 Mbps (20MHz)"));
		rateTable.Add(new RateEnumEntry("11ac", -1, -1, 83, 40, BaseBandSupportedType.Pronto, "11ac MCS0 NGI 13.5 Mbps (40MHz)"));
		rateTable.Add(new RateEnumEntry("11ac", -1, -1, 84, 40, BaseBandSupportedType.Pronto, "11ac MCS1 NGI 27 Mbps (40MHz)"));
		rateTable.Add(new RateEnumEntry("11ac", -1, -1, 85, 40, BaseBandSupportedType.Pronto, "11ac MCS2 NGI 40 Mbps (40MHz)"));
		rateTable.Add(new RateEnumEntry("11ac", -1, -1, 86, 40, BaseBandSupportedType.Pronto, "11ac MCS3 NGI 54 Mbps (40MHz)"));
		rateTable.Add(new RateEnumEntry("11ac", -1, -1, 87, 40, BaseBandSupportedType.Pronto, "11ac MCS4 NGI 81 Mbps (40MHz)"));
		rateTable.Add(new RateEnumEntry("11ac", -1, -1, 88, 40, BaseBandSupportedType.Pronto, "11ac MCS5 NGI 108 Mbps (40MHz)"));
		rateTable.Add(new RateEnumEntry("11ac", -1, -1, 89, 40, BaseBandSupportedType.Pronto, "11ac MCS6 NGI 121.5 Mbps (40MHz)"));
		rateTable.Add(new RateEnumEntry("11ac", -1, -1, 90, 40, BaseBandSupportedType.Pronto, "11ac MCS7 NGI 135 Mbps (40MHz)"));
		rateTable.Add(new RateEnumEntry("11ac", -1, -1, 91, 40, BaseBandSupportedType.Pronto, "11ac MCS8 NGI 162 Mbps (40MHz)"));
		rateTable.Add(new RateEnumEntry("11ac", -1, -1, 92, 40, BaseBandSupportedType.Pronto, "11ac MCS9 NGI 180 Mbps (40MHz)"));
		rateTable.Add(new RateEnumEntry("11ac", -1, -1, 93, 40, BaseBandSupportedType.Pronto, "11ac MCS0 SGI 15 Mbps (40MHz)"));
		rateTable.Add(new RateEnumEntry("11ac", -1, -1, 94, 40, BaseBandSupportedType.Pronto, "11ac MCS1 SGI 30 Mbps (40MHz)"));
		rateTable.Add(new RateEnumEntry("11ac", -1, -1, 95, 40, BaseBandSupportedType.Pronto, "11ac MCS2 SGI 45 Mbps (40MHz)"));
		rateTable.Add(new RateEnumEntry("11ac", -1, -1, 96, 40, BaseBandSupportedType.Pronto, "11ac MCS3 SGI 60 Mbps (40MHz)"));
		rateTable.Add(new RateEnumEntry("11ac", -1, -1, 97, 40, BaseBandSupportedType.Pronto, "11ac MCS4 SGI 90 Mbps (40MHz)"));
		rateTable.Add(new RateEnumEntry("11ac", -1, -1, 98, 40, BaseBandSupportedType.Pronto, "11ac MCS5 SGI 120 Mbps (40MHz)"));
		rateTable.Add(new RateEnumEntry("11ac", -1, -1, 99, 40, BaseBandSupportedType.Pronto, "11ac MCS6 SGI 135 Mbps (40MHz)"));
		rateTable.Add(new RateEnumEntry("11ac", -1, -1, 100, 40, BaseBandSupportedType.Pronto, "11ac MCS7 SGI 150 Mbps (40MHz)"));
		rateTable.Add(new RateEnumEntry("11ac", -1, -1, 101, 40, BaseBandSupportedType.Pronto, "11ac MCS8 SGI 180 Mbps (40MHz)"));
		rateTable.Add(new RateEnumEntry("11ac", -1, -1, 102, 40, BaseBandSupportedType.Pronto, "11ac MCS9 SGI 200 Mbps (40MHz)"));
		rateTable.Add(new RateEnumEntry("11ac", -1, -1, 103, 80, BaseBandSupportedType.Pronto, "11ac MCS0 NGI 29.3 Mbps (80MHz)"));
		rateTable.Add(new RateEnumEntry("11ac", -1, -1, 104, 80, BaseBandSupportedType.Pronto, "11ac MCS1 NGI 58.5 Mbps (80MHz)"));
		rateTable.Add(new RateEnumEntry("11ac", -1, -1, 105, 80, BaseBandSupportedType.Pronto, "11ac MCS2 NGI 87.8 Mbps (80MHz)"));
		rateTable.Add(new RateEnumEntry("11ac", -1, -1, 106, 80, BaseBandSupportedType.Pronto, "11ac MCS3 NGI 117 Mbps (80MHz)"));
		rateTable.Add(new RateEnumEntry("11ac", -1, -1, 107, 80, BaseBandSupportedType.Pronto, "11ac MCS4 NGI 175.5 Mbps (80MHz)"));
		rateTable.Add(new RateEnumEntry("11ac", -1, -1, 108, 80, BaseBandSupportedType.Pronto, "11ac MCS5 NGI 234 Mbps (80MHz)"));
		rateTable.Add(new RateEnumEntry("11ac", -1, -1, 109, 80, BaseBandSupportedType.Pronto, "11ac MCS6 NGI 263.3 Mbps (80MHz)"));
		rateTable.Add(new RateEnumEntry("11ac", -1, -1, 110, 80, BaseBandSupportedType.Pronto, "11ac MCS7 NGI 292.5 Mbps (80MHz)"));
		rateTable.Add(new RateEnumEntry("11ac", -1, -1, 111, 80, BaseBandSupportedType.Pronto, "11ac MCS8 NGI 351 Mbps (80MHz)"));
		rateTable.Add(new RateEnumEntry("11ac", -1, -1, 112, 80, BaseBandSupportedType.Pronto, "11ac MCS9 NGI 390 Mbps (80MHz)"));
		rateTable.Add(new RateEnumEntry("11ac", -1, -1, 113, 80, BaseBandSupportedType.Pronto, "11ac MCS0 SGI 32.5 Mbps (80MHz)"));
		rateTable.Add(new RateEnumEntry("11ac", -1, -1, 114, 80, BaseBandSupportedType.Pronto, "11ac MCS1 SGI 65 Mbps (80MHz)"));
		rateTable.Add(new RateEnumEntry("11ac", -1, -1, 115, 80, BaseBandSupportedType.Pronto, "11ac MCS2 SGI 97.5 Mbps (80MHz)"));
		rateTable.Add(new RateEnumEntry("11ac", -1, -1, 116, 80, BaseBandSupportedType.Pronto, "11ac MCS3 SGI 130 Mbps (80MHz)"));
		rateTable.Add(new RateEnumEntry("11ac", -1, -1, 117, 80, BaseBandSupportedType.Pronto, "11ac MCS4 SGI 195 Mbps (80MHz)"));
		rateTable.Add(new RateEnumEntry("11ac", -1, -1, 118, 80, BaseBandSupportedType.Pronto, "11ac MCS5 SGI 260 Mbps (80MHz)"));
		rateTable.Add(new RateEnumEntry("11ac", -1, -1, 119, 80, BaseBandSupportedType.Pronto, "11ac MCS6 SGI 292.5 Mbps (80MHz)"));
		rateTable.Add(new RateEnumEntry("11ac", -1, -1, 120, 80, BaseBandSupportedType.Pronto, "11ac MCS7 SGI 325 Mbps (80MHz)"));
		rateTable.Add(new RateEnumEntry("11ac", -1, -1, 121, 80, BaseBandSupportedType.Pronto, "11ac MCS8 SGI 390 Mbps (80MHz)"));
		rateTable.Add(new RateEnumEntry("11ac", -1, -1, 122, 80, BaseBandSupportedType.Pronto, "11ac MCS9 SGI 433.3 Mbps (80MHz)"));
	}

	public static bool Is5GChannelSelected(ComboBox chanBox)
	{
		if (chanBox.SelectedItem != null && chanBox.SelectedItem.ToString() != "NOT SET" && ChannelDict.Keys.Contains(chanBox.SelectedItem.ToString()) && ChannelDict[chanBox.SelectedItem.ToString()] >= 36)
		{
			return true;
		}
		return false;
	}

	public static void genWCN36xxScenarioName(ref WCN36xx_TxScenario curScenario)
	{
		curScenario.scenarioDesc = "Chan(";
		curScenario.scenarioDesc += curScenario.chan;
		curScenario.scenarioDesc += ")_";
		curScenario.scenarioDesc += curScenario.mode;
		curScenario.scenarioDesc += "_";
		curScenario.scenarioDesc += curScenario.rate;
		curScenario.scenarioDesc += "_";
		curScenario.scenarioDesc += curScenario.power_ctrl_mode;
		curScenario.scenarioDesc += "_";
		if (curScenario.power_ctrl_mode == "OpenLoop" || curScenario.power_ctrl_mode == "OPEN LOOP")
		{
			curScenario.scenarioDesc += "RFGain(";
			curScenario.scenarioDesc += curScenario.rfGain;
			curScenario.scenarioDesc += ")_DigGain(";
			curScenario.scenarioDesc += curScenario.DigGain;
		}
		else
		{
			curScenario.scenarioDesc += "TargetPwr(";
			curScenario.scenarioDesc += curScenario.TargetPower;
		}
		curScenario.scenarioDesc += ")";
	}
}
