Revert "[BugFix][API-810][wifi]fix wifi can't change country code"
This reverts commit 11e16d86ab49f12fce6caaef079a64150b0b9d28.
Reason for revert: <INSERT REASONING HERE>
Change-Id: I84ffaa5738f27ed4be7d028b605acce482c87122
diff --git a/meta/meta-mediatek-mt2735/recipes-kernel/modules/files/wg870_drv_insmod.sh b/meta/meta-mediatek-mt2735/recipes-kernel/modules/files/wg870_drv_insmod.sh
index 60f2c25..65eeb02 100755
--- a/meta/meta-mediatek-mt2735/recipes-kernel/modules/files/wg870_drv_insmod.sh
+++ b/meta/meta-mediatek-mt2735/recipes-kernel/modules/files/wg870_drv_insmod.sh
@@ -8,21 +8,8 @@
exit 0
fi
-UciCountryCode=`uci get lynq_uci.lynq_wifi_country_code.code`
-echo $UciCountryCode
-
echo insmod wg870 driver
-if [ $UciCountryCode == "CN" ]; then
- insmod /lib/modules/4.19.98/kernel/drivers/net/wireless/bcmdhd/bcmdhd.ko firmware_path=/etc/wg870/config_pcie.trxse nvram_path=/etc/wg870/cyw989570fcref_rev1.58.txt clm_path=/etc/wg870/89570_mobiltek_ivi_v4.clm_blob || exit 1
-
-
-
-elif [ $UciCountryCode == "EU" ]; then
- insmod /lib/modules/4.19.98/kernel/drivers/net/wireless/bcmdhd/bcmdhd.ko firmware_path=/etc/wg870/config_pcie.trxse nvram_path=/etc/wg870/cyw989570fcref_EU_rev1.58.txt clm_path=/etc/wg870/89570_mobiltek_ivi_v4.clm_blob || exit 1
-
-else
- exit 0
-fi
+insmod /lib/modules/4.19.98/kernel/drivers/net/wireless/bcmdhd/bcmdhd.ko firmware_path=/etc/wg870/config_pcie.trxse nvram_path=/etc/wg870/cyw989570fcref_rev1.58.txt clm_path=/etc/wg870/89570_mobiltek_ivi_v4.clm_blob || exit 1
wpa_supplicant -g/var/run/wpa_wlan0_cmd -dd -t -u &
exit 0
diff --git a/meta/meta-mediatek-mt2735/recipes-kernel/modules/files/wifi/wg870/cyw989570fcref_EU_rev1.58.txt b/meta/meta-mediatek-mt2735/recipes-kernel/modules/files/wifi/wg870/cyw989570fcref_EU_rev1.58.txt
deleted file mode 100755
index 1e62d0f..0000000
--- a/meta/meta-mediatek-mt2735/recipes-kernel/modules/files/wifi/wg870/cyw989570fcref_EU_rev1.58.txt
+++ /dev/null
@@ -1,567 +0,0 @@
-#
-NVRAMRev=$Rev$
-sromrev=11
-boardrev=0x1158
-boardtype=0x0860
-boardflags=0x00400001
-boardflags2=0x00800000
-boardflags3=0x40002100
-#boardnum=57410
-macaddr=00:90:4c:2f:70:01
-
-#Regulatory specific
-ccode=EU
-regrev=0
-
-# Board specific
-vendid=0x12be
-devid=0xbd31
-manfid=0x2d0
-antswitch=0
-pdgain5g=0
-pdgain2g=0
-aa2g=3
-aa5g=3
-agbg0=2
-agbg1=2
-aga0=2
-aga1=2
-extpagain5g=2
-extpagain2g=2
-rxgains2gelnagaina0=0
-rxgains2gtrisoa0=13
-rxgains2gtrelnabypa0=0
-rxgains5gelnagaina0=0
-rxgains5gtrisoa0=7
-rxgains5gtrelnabypa0=0
-rxgains5gmelnagaina0=0
-rxgains5gmtrisoa0=7
-rxgains5gmtrelnabypa0=0
-rxgains5ghelnagaina0=0
-rxgains5ghtrisoa0=7
-rxgains5ghtrelnabypa0=0
-rxgains2gelnagaina1=0
-rxgains2gtrisoa1=15
-rxgains2gtrelnabypa1=0
-rxgains5gelnagaina1=0
-rxgains5gtrisoa1=7
-rxgains5gtrelnabypa1=0
-rxgains5gmelnagaina1=0
-rxgains5gmtrisoa1=7
-rxgains5gmtrelnabypa1=0
-rxgains5ghelnagaina1=0
-rxgains5ghtrisoa1=7
-rxgains5ghtrelnabypa1=0
-
-#RFLDO3P3 war
-rfldo3p3_cap_war=1
-
-#TCXO war
-tcxo_war=0x1
-
-#RSSI related
-rssicorrnorm_c0=0,0
-rssicorrnorm_c1=1,0
-rssicorrnorm5g_c0=14,17,20,10,12,13,8,16,14,6,9,11
-rssicorrnorm5g_c1=13,17,19,10,15,13,10,16,14,7,10,12
-low_pwr_rssi_thresh_qdBm_5g=-334
-low_pwr_rssi_bias_5g_c0=0,-3,-6,0,-3,-6,0,-3,-7,0,-4,-7
-low_pwr_rssi_bias_5g_c1=0,-3,-7,0,-2,-7,0,-2,-6,0,-3,-7
-rssicorrnorm6g_c0=12,11,12,12,12,14,3,2,1,8,7,8
-rssicorrnorm6g_c1=12,10,14,10,10,14,0,0,-2,6,0,6
-rssi_cal_freq_grp_2g= 0x08,0x01,0x91,0x2a,0x23,0xb3,0xc4
-rssi_delta_5gl=-6 4 -8 -8 -6 4 -8 -8 -6 4 -8 -8 -3 6 -3 -4 -3 6 -3 -4 -3 6 -3 -4
-rssi_delta_5gml=-1 3 -1 -3 -1 3 -1 -3 -1 3 -1 -3 -1 2 0 -2 -1 2 0 -2 -1 2 0 -2
-rssi_delta_5gmu=0 3 -1 -2 0 3 -1 -2 0 3 -1 -2 0 2 0 -2 0 2 0 -2 0 2 0 -2
-rssi_delta_5gh=2 4 2 -1 2 4 2 -1 2 4 2 -1 0 0 2 -2 0 0 2 -2 0 0 2 -2
-rssi_delta_6gunii5=0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
-rssi_delta_6gunii6=0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
-rssi_delta_6gunii7=0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
-rssi_delta_6gunii8=0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
-rssi_cal_rev=1
-rxgaincal_rssical=1
-gain_cal_temp=25
-rxgain_tempcoeff2g_sub=40,40,40,40,40,40,40,40,40,40
-rxgain_tempcoeff5gl=18,18
-rxgain_tempcoeff5gml=22,22
-rxgain_tempcoeff5gmu=22,22
-rxgain_tempcoeff5gh=20,20
-rxgain_tempcoeff2g_sub_elnaoff=40,40,40,40,40,40,40,40,40,40
-rxgain_tempcoeff5gl_elnaoff=18,18
-rxgain_tempcoeff5gml_elnaoff=22,22
-rxgain_tempcoeff5gmu_elnaoff=22,22
-rxgain_tempcoeff5gh_elnaoff=20,20
-rxgain_tempcoeff6g_unii5=20,20
-rxgain_tempcoeff6g_unii6=20,20
-rxgain_tempcoeff6g_unii7=20,20
-rxgain_tempcoeff6g_unii8=20,20
-rssi_cal_freq_grp_2g= 0x08,0x01,0x91,0x2a,0x23,0xb3,0xc4
-rssi_delta_2gb0=0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
-rssi_delta_2gb1=0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
-rssi_delta_2gb2=0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
-rssi_delta_2gb3=0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
-rssi_delta_2gb4=0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
-
-#Two range TSSI
-tworangetssi2g=0
-tworangetssi5g=0
-# NOTE :================================================================================
-# To run TPC with Two Range TSSI ,set tworangetssi2g = 1 and lowpowerrange2g = 0
-# To run TPC with Single Range TSSI, set tworangetssi2g = 0
-# To run TPC please READ instructions near pa2ga0 and pa2ga1 as well
-# To generate PA params for Low Range set tworangetssi2g = 0 and lowpowerrange2g to 1
-# To generate PA params for High Range set tworangetssi2g = 1 and lowpowerrange2g to 1
-# ======================================================================================
-#lowpowerrange2g=0
-#lowpowerrange5g=0
-
-#Related to FW Download. Host may use this
-nocrc=1
-#FIXME:4369 otpimagesize? Check with Rama
-otpimagesize=502
-
-xtalfreq=37400
-
-txchain=3
-rxchain=3
-
-cckdigfilttype=2
-
-#bit mask for slice capability bit 0:2G bit 1:5G
-bandcap=2
-
-
-#FDSS Related
-fdss_level_5g=9,9
-fdss_interp_en=0
-fdss_level_2g=4,4
-#FIXME: fdss level for 6G made same as 5G for now
-fdss_level_6g=9,9
-
-#LPB related
-leg_preamble_boost=12,12,0
-lpb_comp=10
-
-#PAPRR Related
-paprdis=0
-paprrmcsgain2g=128,128,128,128,128,0,0,0,0,0,0,0
-paprrmcsgamma2g=600,450,600,650,700,-1,-1,-1,-1,-1,-1,-1
-paprrmcsgain5g20=128,128,128,128,128,0,0,0,0,0,0,0
-paprrmcsgamma5g20=700,450,600,650,700,-1,-1,-1,-1,-1,-1,-1
-paprrmcsgain5g40=128,128,128,128,128,0,0,0,0,0,0,0
-paprrmcsgamma5g40=1200,450,550,600,700,-1,-1,-1,-1,-1,-1,-1
-paprrmcsgain5g80=128,128,128,128,128,0,0,0,0,0,0,0
-paprrmcsgamma5g80=1200,500,550,650,650,-1,-1,-1,-1,-1,-1,-1
-#PAPR params for 6G
-#FIXME: papr params 6G made same as 5G for now
-paprrmcsgain6g20=128,128,128,128,128,0,0,0,0,0,0,0
-paprrmcsgamma6g20=400,400,550,650,700,-1,-1,-1,-1,-1,-1,-1
-paprrmcsgain6g40=128,128,128,128,128,0,0,0,0,0,0,0
-paprrmcsgamma6g40=450,450,550,600,700,-1,-1,-1,-1,-1,-1,-1
-paprrmcsgain6g80=128,128,128,128,128,0,0,0,0,0,0,0
-paprrmcsgamma6g80=500,500,550,650,650,-1,-1,-1,-1,-1,-1,-1
-
-#Tempsense Related
-tempthresh=255
-tempoffset=255
-rawtempsense=0x1ff
-phycal_tempdelta=15
-temps_period=15
-temps_hysteresis=15
-
-#------------- TSSI Related -------------
-tssipos2g=1
-tssipos5g=1
-#FIXME: AvVmid for UNII-7/8 made same as UNII-6 for now
-AvVmid_c0=6,85,4,105,5,95,5,95,5,95,5,95,5,95,5,95,5,95
-AvVmid_c1=6,75,5,90,5,90,5,95,4,105,4,105,4,105,4,105,4,105
-
-#limit Tx gain index
-txidxcap2g=10
-txidxcap5g=10
-txidxcap6g=0
-
-# SINGLE RANGE TPC/TSSI
-#2G OFDM
-#pa2ga0=-89,6036,-654
-pa2ga0=-129,5802,-662
-#pa2ga1=-120,6301,-702
-pa2ga1=-123,6120,-688
-#2G CCK
-pa2ga2=-91,6576,-737
-pa2ga3=-106,6697,-748
-#5G High pwr
-pa5ga0=-195,5950,-731,-177,6168,-750,-183,6006,-736,-185,5910,-731
-pa5ga1=-179,6049,-724,-162,6493,-771,-196,6016,-752,-197,6161,-764
-#5G Low pwr
-pa5ga2=-239,4574,-587,-233,5017,-643,-225,5518,-705,-231,5352,-684
-pa5ga3=-229,5269,-675,-239,4366,-560,-234,4693,-603,-225,5414,-693
-#PA Params 6G UNII-5,6,7,8
-pa6ga0=-150,6336,-746,-119,6732,-773,-166,6212,-767,-154,5988,-742
-pa6ga1=-170,6398,-786,-140,6587,-774,-193,5815,-742,-122,6358,-755
-
-
-# Max power and offsets
-maxp2ga0=78
-maxp2ga1=78
-maxp5ga0=72,72,72,72
-maxp5ga1=72,72,72,72
-#Max Power on 6G UNII-5/6 and UNII-7/8
-maxp6ga0=66,62
-maxp6ga1=66,62
-subband5gver=0x4
-paparambwver=3
-cckpwroffset0=1
-cckpwroffset1=2
-
-pdoffset20ma0=0xf010
-pdoffset20ma1=0x1200
-pdoffset40ma0=0x0120
-pdoffset80ma0=0xf010
-pdoffset40ma1=0x2210
-pdoffset80ma1=0x2200
-pdoffset6g20ma0=0x10ff
-pdoffset6g20ma0_group1=0xed40
-pdoffset6g20ma1=0x3201
-pdoffset6g20ma1_group1=0xfe30
-pdoffset6g40ma0=0x35e2
-pdoffset6g40ma0_group1=0x1272
-pdoffset6g40ma1=0x4335
-pdoffset6g40ma1_group1=0x2363
-pdoffset6g80ma0=0x4112
-pdoffset6g80ma0_group1=0x1023
-pdoffset6g80ma1=0x5333
-pdoffset6g80ma1_group1=0x1112
-
-cckbw202gpo=0
-cckbw20ul2gpo=0
-mcsbw202gpo=0x86622222
-mcsbw402gpo=0x86422222
-dot11agofdmhrbw202gpo=0x4444
-ofdmlrbw202gpo=0x2222
-mcsbw205glpo=0x64222222
-mcsbw405glpo=0x65322222
-mcsbw805glpo=0x76322222
-mcsbw1605glpo=0
-mcsbw205gmpo=0x64222222
-mcsbw405gmpo=0x65322222
-mcsbw805gmpo=0x76322222
-mcsbw1605gmpo=0
-mcsbw205ghpo=0x64222222
-mcsbw405ghpo=0x65322222
-mcsbw805ghpo=0x76322222
-# ppr offsets for UNII-5/6 of 6GHz band
-mcsbw206glpo=0x87522222
-mcsbw406glpo=0x87522222
-mcsbw806glpo=0x87522222
-# ppr offsets for UNII-7/8 of 6GHz band
-mcsbw206gmpo=0x87522222
-mcsbw406gmpo=0x98622222
-mcsbw806gmpo=0x98622222
-
-powoffs2gtna0=-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3
-powoffs2gtna1=-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2
-mcs1024qam2gpo=0xCCCC
-mcs1024qam5glpo=0xBABAA9
-mcs1024qam5gmpo=0xBABAA9
-mcs1024qam5ghpo=0xBABAA9
-mcs1024qam5gx1po=0xBABAA9
-mcs1024qam5gx2po=0xBABAA9
-mcs8poexp=0
-mcs9poexp=0
-mcs10poexp=0
-# 1024QAM rates' offset for 6GHz UNII-5/6
-mcs1024qam6glpo=0xAABBBB
-# 1024QAM rates' offset for 6GHz UNII-7/8
-mcs1024qam6gmpo=0xDDCCDD
-
-#UL-OFDMA PPR's accros RU's
-#currently programmed same PPR accross RU's
-#across QAM's the PPR are same b/w SU and RU
-#each RU PPR is grouped with 5 bits
-ruppr2g20bpska0=0x0
-ruppr2g20bpska1=0x0
-ruppr2g20qpska0=0x10842
-ruppr2g20qpska1=0x10842
-ruppr2g20qam16a0=0x21084
-ruppr2g20qam16a1=0x21084
-ruppr2g20qam64a0=0x318c6
-ruppr2g20qam64a1=0x318c6
-ruppr2g20qam256a0=0x6318c
-ruppr2g20qam256a1=0x6318c
-ruppr2g20qam1024a0=0x739ce
-ruppr2g20qam1024a1=0x739ce
-ruppr5g20bpska0=0x0
-ruppr5g20bpska1=0x0
-ruppr5g20qpska0=0x0
-ruppr5g20qpska1=0x0
-ruppr5g20qam16a0=0x10842
-ruppr5g20qam16a1=0x10842
-ruppr5g20qam64a0=0x21084
-ruppr5g20qam64a1=0x21084
-ruppr5g20qam256a0=0x42108
-ruppr5g20qam256a1=0x42108
-ruppr5g20qam1024a0=0x5294a
-ruppr5g20qam1024a1=0x5294a
-ruppr5g40bpska0=0x0
-ruppr5g40bpska1=0x0
-ruppr5g40qpska0=0x0
-ruppr5g40qpska1=0x0
-ruppr5g40qam16a0=0x210842
-ruppr5g40qam16a1=0x210842
-ruppr5g40qam64a0=0x421084
-ruppr5g40qam64a1=0x421084
-ruppr5g40qam256a0=0x842108
-ruppr5g40qam256a1=0x842108
-ruppr5g40qam1024a0=0xa5294a
-ruppr5g40qam1024a1=0xa5294a
-ruppr5g80bpska0=0x0
-ruppr5g80bpska1=0x0
-ruppr5g80qpska0=0x0
-ruppr5g80qpska1=0x0
-ruppr5g80qam16a0=0x4210842
-ruppr5g80qam16a1=0x4210842
-ruppr5g80qam64a0=0x08421084
-ruppr5g80qam64a1=0x08421084
-ruppr5g80qam256a0=0x10842108
-ruppr5g80qam256a1=0x10842108
-ruppr5g80qam1024a0=0x18c6318c
-ruppr5g80qam1024a1=0x18c6318c
-
-# 5G power offset per channel for band edge channel
-powoffs5g20mtna0=0,0,0,0,0,0,0
-powoffs5g20mtna1=0,0,0,0,0,0,0
-powoffs5g40mtna0=0,0,0,0,0
-powoffs5g40mtna1=0,0,0,0,0
-powoffs5g80mtna0=0,0,0,0,0
-powoffs5g80mtna1=0,0,0,0,0
-mcs11poexp=0
-
-# OLPC Related
-disable_olpc=0
-olpc_thresh5g=36
-olpc_anchor5g=40
-disable_olpc_2g=0
-olpc_thresh2g=56
-olpc_anchor2g=60
-olpc_thresh6g=44
-olpc_anchor6g=56
-
-#LTE Coex Related
-ltecxmux=0
-ltecxpadnum=0x0504
-ltecxfnsel=0x44
-ltecxgcigpio=0x04
-#OOB params
-#device_wake_opt=1
-#host_wake_opt=0
-
-# SWCTRL Related
-swctrlmap_5g=0x00000000,0x00000000,0x00000000,0x00000000,0x000
-swctrlmapext_5g=0x00000000,0x00000202,0x00000000,0x000000,0x000
-fem_table_init_val=0x01100110,0x00000000
-fem_table_init_val_ext=0x00000000,0x00000000
-
-swctrlmap_2g=0x00000110,0x00000020,0x01100110,0x000000,0x17F
-swctrlmapext_2g=0x00000202,0x00000000,0x00000000,0x000000,0x0DF
-
-clb2gslice0core0=0x230
-clb5gslice0core0=0x200
-clb2gslice0core1=0x201
-clb5gslice0core1=0x200
-#For TDM coex use the following
-btc_prisel_ant_mask=0x0
-clb_swctrl_smask_ant0=0x37f
-clb_swctrl_smask_ant1=0x3f7
-# 2 Ant hyb/par following comment above
-#btc_prisel_ant_mask=0x3
-#clb_swctrl_smask_ant0=0x34f
-#clb_swctrl_smask_ant1=0x3f7
-muxenab=1
-
-#BT Coex 1:TDM
-btc_mode=1
-
-# --- PAPD Cal related params ----
-# 0:NBPAPD 1:WBPAPD
-txwbpapden=1
-# NB PAPD Cal params
-# 0x5Gc02Gc0,5Gc12Gc1
-nb_eps_offset=0x01db01da,0x01db01da
-nb_bbmult=0x5050,0x5050
-nb_papdcalidx=0x0a0a,0x0a0a
-nb_txattn=0x0000,0x0000
-nb_rxattn=0x0000,0x0000
-papdgainctrl2g=1
-papdgainctrl5g=1
-pacalshift2g=5,5
-pacalshift5g=4,3
-eps_stopidx=63
-# two-core specific variables for each of UNII-5/6/7/8 bands
-# u5c0,u5c1,u6c0,u6c1,u7c0,u7c1,u8c0,u8c1
-nb_txattn_6g=0,0,0,0,0,0,0,0
-nb_rxattn_6g=0,0,0,0,0,0,0,0
-nb_papdcalidx_6g=10,10,10,10,10,10,10,10
-nb_bbmult_6g=80,80,80,80,80,80,80,80
-nb_eps_offset_6g=475,475,475,475,475,475,475,475
-papdgainctrl6g=1
-pacalshift6g20=3,4,4,4,4,4,4,4
-pacalshift6g40=3,4,4,3,4,4,4,4
-pacalshift6g80=4,3,4,3,4,4,4,4
-
-# WB papd cal params
-# c02g,c05g20,c05g40,c05g80,c12g,c15g20,c15g40,c15g80
-wb_txattn=0,1,1,1,0,1,1,1
-wb_rxattn=0,0,0,0,0,0,0,0
-wb_tia_gain_mode=2,2,2,2,2,2,2,2
-wb_eps_offset=470,467,467,467,470,467,467,467
-wb_papdcalidx=10,10,10,10,10,10,10,10
-wb_bbmult=64,80,80,80,64,80,80,80
-wb_calref_db=26,24,24,24,26,24,24,24
-wb_txbuf_offset=43,42,39,39,43,42,39,39
-wb_frac_del=255,255,255,255,255,255,255,255
-wb_g_frac_bits=10,10,10,10,10,10,10,10
-
-# WB 6G cal params
-# u5c0,u5c1,u6c0,u6c1,u7c0,u7c1,u8c0,u8c1
-wb_txattn_6g20=1,1,1,1,1,1,1,1
-wb_txattn_6g40=1,1,1,1,1,1,1,1
-wb_txattn_6g80=1,1,1,1,1,1,1,1
-wb_rxattn_6g20=0,0,0,0,0,0,0,0
-wb_rxattn_6g40=0,0,0,0,0,0,0,0
-wb_rxattn_6g80=0,0,0,0,0,0,0,0
-wb_tia_gain_mode_6g20=2,2,2,2,6,6,6,6
-wb_tia_gain_mode_6g40=3,3,3,3,6,6,6,6
-wb_tia_gain_mode_6g80=4,4,4,4,6,6,6,6
-wb_papdcalidx_6g20=10,10,10,10,30,32,30,32
-wb_papdcalidx_6g40=25,25,25,25,30,32,30,32
-wb_papdcalidx_6g80=27,28,27,28,30,32,30,32
-wb_bbmult_6g20=66,64,70,64,76,76,76,86
-wb_bbmult_6g40=76,76,68,76,80,80,76,86
-wb_bbmult_6g80=76,80,66,80,84,84,84,80
-wb_eps_offset_6g20=467,469,467,467,472,473,471,470
-wb_eps_offset_6g40=463,463,462,463,471,472,471,470
-wb_eps_offset_6g80=464,465,464,466,471,472,468,472
-wb_calref_db_6g20=26,26,26,26,27,27,29,28
-wb_calref_db_6g40=30,30,32,30,27,27,29,28
-wb_calref_db_6g80=32,30,34,30,27,27,29,28
-
-#2nd LUT parameters
-wb_multipapd_en=1
-wb_PapdLutSel_idx_6g20=42,42,42,42,42,42,39,42
-wb_PapdLutSel_idx_6g40=42,42,42,42,42,42,42,45
-wb_PapdLutSel_idx_6g80=42,42,42,42,39,39,41,44
-wb_eps_index_offset_6g20=0,0,0,4,2,7,3,5
-wb_eps_index_offset_6g40=10,7,9,5,2,8,0,8
-wb_eps_index_offset_6g80=12,7,5,5,2,4,3,8
-wb_papdcalidx_6g20_lut1=10,10,10,10,30,32,30,32
-wb_papdcalidx_6g40_lut1=25,25,25,25,30,32,32,32
-wb_papdcalidx_6g80_lut1=27,28,27,28,30,10,10,32
-wb_bbmult_6g20_lut1=54,50,55,35,52,45,56,66
-wb_bbmult_6g40_lut1=28,42,32,45,70,42,50,45
-wb_bbmult_6g80_lut1=35,50,50,50,50,30,40,50
-wb_calref_db_6g20_lut1=30,26,30,30,30,30,32,28
-wb_calref_db_6g40_lut1=30,30,32,30,27,30,35,28
-wb_calref_db_6g80_lut1=28,30,30,30,30,30,32,28
-
-# 2g/5G 2nd PAPD LUT parameters applicable for -40degc
-wb_eps_offset_lut1=22,10,10,7,22,10,10,7
-wb_calref_db_lut1=23,19,19,19,23,19,19,19
-wb_papdcalidx_lut1=10,10,10,10,10,10,10,10
-wb_bbmult_lut1=25,40,40,40,25,40,40,40
-wb_PapdLutSel_idx_2g5g=53,52,53,52,53,52,53,52
-
-# energy detect threshold
-ed_thresh2g=-65
-ed_thresh5g=-68
-# energy detect threshold for EU
-eu_edthresh2g=-65
-eu_edthresh5g=-68
-
-btldopu=0
-
-#rpcal coef for imptxbf
-rpcal2g=0
-rpcal5gb0=238
-rpcal5gb1=228
-rpcal5gb2=222
-rpcal5gb3=229
-
-#Enable LHL PS mode
-lhl_ps_mode=3
-
-#Disable FastLPO
-fastlpo_dis=1
-fastlpo_pcie_dis=1
-
-#Enable lesi and bphymrc
-lesimode=1,1,1
-bphymrc=1
-
-#PALDO settings 0=3.3 1=3.35 2=3.41 3=3.46 4=2.86, 5=2.97 6=3.08, 7=3.19
-#paldo3p3_voltage=0
-
-
-#temperature throttling
-tvpm=1
-tvpm_txc_txdc=110,15
-tvpm_txc_txdc_lowlimit=1
-tvpm_txc_txdc_insert=0,0
-tvpm_monitor_period=3
-#temperature throttling, aggressive setting
-tvpm_txc_txdc_burst=130,35,5
-tvpm_txc_txdc_init_step=50
-
-##Dynamic Desense Params for 2 ant hybrid coex
-##btcdyn_flags = bit 3- PWRCTRL: bit 2- MSWITCH: bit 1- DESENSE: bit 0- DYNCTL
-#btcdyn_flags=0xB
-#btcdyn_dflt_dsns_level=0
-#btcdyn_low_dsns_level=1
-#btcdyn_mid_dsns_level=2
-#btcdyn_high_dsns_level=4
-#btcdyn_default_btc_mode=5
-#btcdyn_dsns_rows=2
-#btcdyn_dsns_row1=5,-4,0,-50,-70
-#btcdyn_dsns_row0=5,12,0,-50,-65
-#btcdyn_wlpwr_val=2,4,6,8,10,12,14,16
-#btcdyn_wlpwr_thresh=-10,-20,-30,-40,-50,-60,-70
-
-ppr_hitemp_offset=70,10
-# idx 0: PPR temp thresh, default 150
-# idx 1: PPR temp thresh hysteresis, default 15
-cckbw202gpo_ht=0x6666
-# CCK high temp offset, 0.5dBm/step, rate(11,5.5,2,1Mbps)
-ofdmbw202gpo_ht=0x66666666
-# 2G OFDM temp offset, 0.5dBm/step, rate(54,48,36,24,18,12,9,6Mbps)
-mcsbw202gpo_ht=0x66666666
-# 2G BW20 VHT/HT temp offset, 0.5dBm/step, rate(C9,C8,M7,M6,M5,M4,M3,M2-0)
-mcsbw202gpo_1024qam_ht=0x66
-# 2G BW20 HE/VHT temp offset, 0.5dBm/step, rate(C11,C10)
-ofdmbw205gpo_ht=0x66666666
-# 5G OFDM temp offset, 0.5dBm/step, rate(54,48,36,24,18,12,9,6Mbps)
-mcsbw205gpo_ht=0x66666666
-# 5G BW20 HE/VHT/HT temp offset, 0.5dBm/step, rate(C9,C8,M7,M6,M5,M4,M3,M2-0)
-mcsbw205gpo_1024qam_ht=0x66
-# 5G BW20 HE/VHT temp offset, 0.5dBm/step, rate(C11,C10)
-mcsbw405gpo_ht=0x66666666
-# 5G BW40 HE/VHT/HT temp offset, 0.5dBm/step, rate(C9,C8,M7,M6,M5,M4,M3,M2-0)
-mcsbw405gpo_1024qam_ht=0x66
-# 5G BW40 HE/VHT temp offset, 0.5dBm/step, rate(C11,C10)
-mcsbw805gpo_ht=0x66666666
-# 5G BW80 HE/VHT/HT temp offset, 0.5dBm/step, rate(C9,C8,M7,M6,M5,M4,M3,M2-0)
-mcsbw805gpo_1024qam_ht=0x66
-# 5G BW80 HE/VHT temp offset, 0.5dBm/step, rate(C11,C10)
-ofdmbw206gpo_ht=0x66666666
-# 6G OFDM temp offset, 0.5dBm/step, rate(54,48,36,24,18,12,9,6Mbps)
-mcsbw206gpo_ht=0x66666666
-# 6G BW20 HE/VHT/HT temp offset, 0.5dBm/step, rate(C9,C8,M7,M6,M5,M4,M3,M2-0)
-mcsbw206gpo_1024qam_ht=0x66
-# 6G BW20 HE/VHT temp offset, 0.5dBm/step, rate(C11,C10)
-mcsbw406gpo_ht=0x66666666
-# 6G BW40 HE/VHT/HT temp offset, 0.5dBm/step, rate(C9,C8,M7,M6,M5,M4,M3,M2-0)
-mcsbw406gpo_1024qam_ht=0x66
-# 6G BW40 HE/VHT temp offset, 0.5dBm/step, rate(C11,C10)
-mcsbw806gpo_ht=0x66666666
-# 6G BW80 HE/VHT/HT temp offset, 0.5dBm/step, rate(C9,C8,M7,M6,M5,M4,M3,M2-0)
-mcsbw806gpo_1024qam_ht=0x66
-# 6G BW80 HE/VHT temp offset, 0.5dBm/step, rate(C11,C10)
diff --git a/meta/meta-mediatek-mt2735/recipes-kernel/modules/wg870-drv-insmod.bb b/meta/meta-mediatek-mt2735/recipes-kernel/modules/wg870-drv-insmod.bb
index 178d3b1..cf847ec 100755
--- a/meta/meta-mediatek-mt2735/recipes-kernel/modules/wg870-drv-insmod.bb
+++ b/meta/meta-mediatek-mt2735/recipes-kernel/modules/wg870-drv-insmod.bb
@@ -8,7 +8,6 @@
file://wifi/wg870/config_pcie.trxse \
file://wifi/wg870/89570_mobiltek_ivi_v4.clm_blob \
file://wifi/wg870/cyw989570fcref_rev1.58.txt \
- file://wifi/wg870/cyw989570fcref_EU_rev1.58.txt \
file://wifi/wg870/w870_rtecdc_mfg.trxs "
@@ -27,7 +26,6 @@
install -m 755 ${WORKDIR}/wifi/wg870/89570_mobiltek_ivi_v4.clm_blob ${D}/etc/wg870/
install -m 755 ${WORKDIR}/wifi/wg870/w870_rtecdc_mfg.trxs ${D}/etc/wg870/
install -m 755 ${WORKDIR}/wifi/wg870/cyw989570fcref_rev1.58.txt ${D}/etc/wg870/
- install -m 755 ${WORKDIR}/wifi/wg870/cyw989570fcref_EU_rev1.58.txt ${D}/etc/wg870/
install -m 755 ${WORKDIR}/wifi/wg870/cyw955572fcipa_rev2.52.txt ${D}/etc/wg870/
install -d ${D}/${systemd_unitdir}/system
diff --git a/src/lynq/lib/liblynq-wifi6/libwifi6.c b/src/lynq/lib/liblynq-wifi6/libwifi6.c
index e529fd5..4a3c6c9 100755
--- a/src/lynq/lib/liblynq-wifi6/libwifi6.c
+++ b/src/lynq/lib/liblynq-wifi6/libwifi6.c
@@ -3472,78 +3472,28 @@
return 0;
}
-static int check_and_init_uci_config(char * country_code)
-{
- FILE * fp;
- int is_different = 0;
- const char * creat_uci_cmd ="uci set lynq_uci.lynq_wifi_country_code='lynq_wifi_country_code'";
- const char * commit_cmd ="uci commit";
- char set_country_cmd[MAX_CMD];
- char lynq_cmd_ret[MAX_CMD]={0};
-
- if((fp=popen("uci get lynq_uci.lynq_wifi_country_code.code","r"))==NULL)
- {
- RLOGE("popen error!,create now");
-
- system(creat_uci_cmd);
- sprintf(set_country_cmd, "uci set lynq_uci.lynq_wifi_country_code.code='%s'",country_code);
- system(set_country_cmd);
- system(commit_cmd);
- is_different = 1;
-
- if((fp=popen("uci get lynq_uci.lynq_wifi_country_code.code","r"))==NULL)
- {
- return -1;
- }
- }
-
- if((fread(lynq_cmd_ret,sizeof(lynq_cmd_ret),1,fp))<0 )
- {
- RLOGE("fread fail!");
- fclose(fp);
- return -1;
- }
-
- if ( strncmp(lynq_cmd_ret,country_code,2) != 0 )
- {
- RLOGE("get country code for uci %s,input cpuntry code is:%s\n",lynq_cmd_ret,country_code);
- is_different = 1;
- }
-
- fclose(fp);
- return is_different;
-
-}
-
int lynq_set_country_code(lynq_wifi_index_e idx, char * country_code) {
- char check_current_code[10];
- int ret,is_different;
+// const char * cmd_str = "GET country";
+// CHECK_IDX(idx, CTRL_AP);
+// CHECK_WPA_CTRL(CTRL_STA);
+
+// DO_REQUEST(cmd_str);
+// printf("result %s\n", cmd_reply);
if (country_code == NULL || *country_code == '\0')
{
- RLOGE("bad country code\n");
+ RLOGD("bad country code\n");
return -1;
}
- is_different = check_and_init_uci_config(country_code);
- if( is_different < 0 )
+ char lynq_country_cmd[MAX_CMD];
+ sprintf(lynq_country_cmd, "wl country %s", country_code);
+ if (system(lynq_country_cmd) == 0)
{
- RLOGE("init set uci fail\n");
- return -1;
+ return 0;
}
- ret = lynq_get_country_code(idx,check_current_code);
- if( ret == 0 && (is_different == 1 || strcmp(check_current_code, country_code) != 0))
- {
- ret = lynq_wifi_disable();
- if(ret != 0 )
- {
- RLOGE("berfore set country,find bcmdhd insmod,remod fail\n");
- return -1;
- }
- }
-
- return 0;
+ return -1;
}
int lynq_get_connect_ap_mac(lynq_wifi_index_e idx,char *mac)