developer | 15a4331 | 2022-04-12 11:23:23 +0800 | [diff] [blame^] | 1 | From 22612dd89f434aac2383f0601e3a5d921896eb11 Mon Sep 17 00:00:00 2001 |
| 2 | From: "howard.hsu" <howard-yh.hsu@mediatek.com> |
| 3 | Date: Wed, 23 Feb 2022 11:40:41 +0800 |
| 4 | Subject: [PATCH 02/18] [patch] HAL: refactor wifi_getRadioChannel() |
| 5 | |
| 6 | Change-Id: Idf011ea57255837f1cdd1ee62ef3dc9d391090d0 |
| 7 | --- |
| 8 | source/wifi/wifi_hal.c | 9 ++++++++- |
| 9 | 1 file changed, 8 insertions(+), 1 deletion(-) |
| 10 | |
| 11 | diff --git a/source/wifi/wifi_hal.c b/source/wifi/wifi_hal.c |
| 12 | index 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 | -- |
| 46 | 2.29.2 |
| 47 | |