]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - wl12xx/build-utilites.git/blob - scripts/wlconf/testing_set_wlcore.sh
add entire build utility directory to ti git
[wl12xx/build-utilites.git] / scripts / wlconf / testing_set_wlcore.sh
1 # $1 = mimo/siso20/siso40
2 # $2 = hw type - rdl1_rdl3/rdl2_rdl4
4 echo $@
6 root_path=/home/root
7 hw_type_fname=${root_path}/testing_wl_hw_type.txt
9 wlconf_path=/usr/sbin/wlconf
10 ini_files_path=${wlconf_path}/official_inis
12 wl18xx_conf_bin=/lib/firmware/ti-connectivity/wl18xx-conf.bin
14 if [ "$2" != "" ]; then
15 echo $2 > $hw_type_fname
16 fi
18 hw_type=`cat $hw_type_fname 2> /dev/null`
20 ht_mimo=0
21 ht_siso20=2
22 ht_siso40=1
24 #
25 # verify ht_mode, options are: siso20, siso40, mimo
26 #
27 if [ "$1" == "siso20" ] ; then
28 ht_mode=${ht_siso20}
29 elif [ "$1" == "siso40" ] ; then
30 ht_mode=${ht_siso40}
31 elif [ "$1" == "mimo" ] ; then
32 ht_mode=${ht_mimo}
33 else
34 echo "wlcore: not supported"
35     exit 1
36 fi
38 #
39 # select chip type, options are: rdl2_rdl4 (mimo board), rdl1_rdl2 (hp siso board)
40 #
41 if [ "$hw_type" == "rdl2_rdl4" ] ; then # mimo board
42     if [ "$ht_mode" == "$ht_mimo" ] ; then # mimo
43 ini_file=WL8_System_parameters_PG2_RDL_2_4_SP_MIMO.ini
44     elif [ "$ht_mode" == "$ht_siso40" ] || [ "$ht_mode" == "$ht_siso20" ] ; then # siso
45 ini_file=WL8_System_parameters_PG2_RDL_2_4_SP_SISO.ini
46     else
47 echo "wlcore: not supported"
48 exit 1
49     fi
50 elif [ "$hw_type" == "rdl1_rdl3" ] ; then # hp siso board
51     if [ "$ht_mode" == "$ht_siso40" ] || [ "$ht_mode" == "$ht_siso20" ] ; then # siso
52         ini_file=WL8_System_parameters_PG2_RDL_1_3_HP_SISO.ini
53     else
54 echo "wlcore: not supported"
55 exit 1
56     fi
57 else
58 echo "wlcore: not supported"
59     exit 1
60 fi
62 cd ${wlconf_path}
63 ./wlconf -o ${wl18xx_conf_bin} -I ${ini_files_path}/${ini_file}
64 ./wlconf -i ${wl18xx_conf_bin} -o ${wl18xx_conf_bin} --set wl18xx.ht.mode=${ht_mode}
65 ./wlconf -i ${wl18xx_conf_bin} -g | grep -i "board\|ant\|ht.mode\|sta_sleep_auth"
67 echo "wlcore: configuration ok"
68 exit 0