[rdk-b][mt7986][wifi-hal][Refactor index_to_radio]
[Description]
Refactor index to radio function. I upload a old patch with a bug, that the snprintf without parameter of radio name.
[Release-log]
N/A
diff --git a/recipes-ccsp/hal/hal-wifi-patches/0038-HAL-add-tri-band-support-and-index-to-band.patch b/recipes-ccsp/hal/hal-wifi-patches/0038-HAL-add-tri-band-support-and-index-to-band.patch
index e36fbec..a58ee34 100644
--- a/recipes-ccsp/hal/hal-wifi-patches/0038-HAL-add-tri-band-support-and-index-to-band.patch
+++ b/recipes-ccsp/hal/hal-wifi-patches/0038-HAL-add-tri-band-support-and-index-to-band.patch
@@ -1,6 +1,6 @@
-From 3d455f415b25ba719445281c208575d086b907b3 Mon Sep 17 00:00:00 2001
+From 575fbc6a67f1c7f30bbe0db9ff60ed1817260d85 Mon Sep 17 00:00:00 2001
From: "Allen.Ye" <allen.ye@mediatek.com>
-Date: Wed, 17 Aug 2022 17:24:41 +0800
+Date: Fri, 19 Aug 2022 10:50:01 +0800
Subject: [PATCH] HAL: add tri-band support and index to band
---
@@ -8,7 +8,7 @@
1 file changed, 23 insertions(+)
diff --git a/source/wifi/wifi_hal.c b/source/wifi/wifi_hal.c
-index 1d7833d..f4430ba 100644
+index b4628c9..bde3349 100644
--- a/source/wifi/wifi_hal.c
+++ b/source/wifi/wifi_hal.c
@@ -164,6 +164,7 @@ typedef enum
@@ -31,7 +31,7 @@
+ wifi_band band = band_invalid;
+
+ WIFI_ENTRY_EXIT_DEBUG("Inside %s:%d\n",__func__, __LINE__);
-+ snprintf(cmd, sizeof(cmd), "iw dev %s%d info | grep MHz | awk '{print $9}");
++ snprintf(cmd, sizeof(cmd), "iw dev %s%d info | grep MHz | awk '{print $9}'", AP_PREFIX, radioIndex);
+ _syscmd(cmd, buf, sizeof(buf));
+ freq = atoi(buf);
+ if (freq > 2401 && freq < 2495)