blob: 89e9eef0214c99f0c3554bfda3a4c4d2da473831 [file] [log] [blame]
developer15a43312022-04-12 11:23:23 +08001From 22612dd89f434aac2383f0601e3a5d921896eb11 Mon Sep 17 00:00:00 2001
2From: "howard.hsu" <howard-yh.hsu@mediatek.com>
3Date: Wed, 23 Feb 2022 11:40:41 +0800
4Subject: [PATCH 02/18] [patch] HAL: refactor wifi_getRadioChannel()
5
6Change-Id: Idf011ea57255837f1cdd1ee62ef3dc9d391090d0
7---
8 source/wifi/wifi_hal.c | 9 ++++++++-
9 1 file changed, 8 insertions(+), 1 deletion(-)
10
11diff --git a/source/wifi/wifi_hal.c b/source/wifi/wifi_hal.c
12index 14452dd4..19f7508c 100644
13--- a/source/wifi/wifi_hal.c
14+++ b/source/wifi/wifi_hal.c
15@@ -29,7 +29,7 @@ Copyright (c) 2007 Mike Kershaw
16 Copyright (c) 2008-2009 Luis R. Rodriguez
17 Licensed under the ISC license
18 */
19-
20+#define MTK_IMPL
21 #define HAL_NETLINK_IMPL
22
23 #include <stdio.h>
24@@ -1593,6 +1593,12 @@ INT wifi_getRadioChannelsInUse(INT radioIndex, CHAR *output_string) //RDKB
25 //Get the running channel number
26 INT wifi_getRadioChannel(INT radioIndex,ULONG *output_ulong) //RDKB
27 {
28+#ifdef MTK_IMPL
29+ if(!wifi_getApChannel(radioIndex, output_ulong))
30+ return RETURN_OK;
31+ else
32+ return RETURN_ERR;
33+#else
34 char cmd[1024] = {0}, buf[5] = {0};
35 char interface_name[50] = {0};
36
37@@ -1613,6 +1619,7 @@ INT wifi_getRadioChannel(INT radioIndex,ULONG *output_ulong) //RDKB
38
39 WIFI_ENTRY_EXIT_DEBUG("Exiting %s:%d\n",__func__, __LINE__);
40 return RETURN_OK;
41+#endif
42 }
43
44
45--
462.29.2
47