wlan_utils: Update mode_2g_phyb ini for HK10-C1

Set mode_2g_phyb in /ini/internal/global_i.ini file to 1 for HK10-C1.
This is to make sure that IPQ807x radio comes up in 2G only mode before
the insmod by kmodloader

Signed-off-by: Vignesh Viswanathan <viswanat@codeaurora.org>
Change-Id: I1183b5ac8dc9eca59f1aa49acf75b8df9110cf72
diff --git a/wifi-scripts/files/wifi_init_kernel54_config.sh b/wifi-scripts/files/wifi_init_kernel54_config.sh
index d656e41..11cf0aa 100644
--- a/wifi-scripts/files/wifi_init_kernel54_config.sh
+++ b/wifi-scripts/files/wifi_init_kernel54_config.sh
@@ -14,16 +14,38 @@
 # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
 # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 
-
+#Usage: update_ini_file <file_name> <ini_param> <value>
 function update_ini_file()
 {
-        update_ini_cmd="grep -q $1 /ini/global.ini && sed -i '/$1=/c $1=$2' /ini/global.ini || echo $1=$2 >> /ini/global.ini"
-        eval $update_ini_cmd
-        sync
+	local filename=$1
+	local param=$2
+	local value=$3
+	update_ini_cmd="grep -q $param /ini/$filename && sed -i '/$param=/c $param=$value' /ini/$filename || echo $param=$value >> /ini/$filename"
+	eval $update_ini_cmd
+	sync
+}
+
+#Usage: update_ini_internal_file <file_name> <ini_param> <value>
+function update_ini_internal_file()
+{
+	local filename=$1
+	local param=$2
+	local value=$3
+	update_ini_internal_cmd="grep -q $param /ini/internal/$filename && sed -i '/$param=/c $param=$value' /ini/internal/$filename || echo $param=$value >> /ini/internal/$filename"
+	eval $update_ini_internal_cmd
+	sync
 }
 
 function do_init_kernel54_config()
 {
-        echo -n "/ini" > /sys/module/firmware_class/parameters/path
-        update_ini_file cfg80211_config "1"
+	echo -n "/ini" > /sys/module/firmware_class/parameters/path
+	update_ini_file global.ini cfg80211_config "1"
+
+	[ -f /tmp/sysinfo/board_name ] && {
+		board_name=ap$(cat /tmp/sysinfo/board_name | awk -F 'ap' '{print$2}')
+	}
+
+	if [ "$board_name" = "ap-hk10-c1"  ]; then
+		update_ini_internal_file global_i.ini mode_2g_phyb "1"
+	fi
 }