From e26a6cc8bb9eafb0677523a5a1cb3fdacfda3f51 Mon Sep 17 00:00:00 2001 From: Fugang Duan Date: Thu, 17 Sep 2020 13:57:43 +0800 Subject: [PATCH] mxm_wifiex: mapp: fix build error by GCC10.2 Use GCC10.2, there has build error as below log: mlan2040misc.o:(.bss+0x0): multiple definition of `leg_ap_chan_list'; mlan2040coex.o:(.bss+0x0): first defined here mlan2040misc.o:(.bss+0x64): multiple definition of `num_leg_ap_chan'; mlan2040coex.o:(.bss+0x64): first defined here Fix the build error. Signed-off-by: Fugang Duan --- mxm_wifiex/wlan_src/mapp/mlan2040coex/mlan2040coex.c | 5 +++++ mxm_wifiex/wlan_src/mapp/mlan2040coex/mlan2040coex.h | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/mxm_wifiex/wlan_src/mapp/mlan2040coex/mlan2040coex.c b/mxm_wifiex/wlan_src/mapp/mlan2040coex/mlan2040coex.c index 42135b9..3d0f9ba 100644 --- a/mxm_wifiex/wlan_src/mapp/mlan2040coex/mlan2040coex.c +++ b/mxm_wifiex/wlan_src/mapp/mlan2040coex/mlan2040coex.c @@ -50,6 +50,11 @@ Change log: /** Maximum number of total private ioctl calls supported */ #define IW_MAX_PRIV_NUM 1024 +/** Legacy APs channel list */ +chan_intol_t leg_ap_chan_list[WLAN_IOCTL_USER_SCAN_CHAN_MAX]; +/** Total number of channel present in Legacy APs channel list */ +t_u8 num_leg_ap_chan; + /******************************************************** Local Variables ********************************************************/ diff --git a/mxm_wifiex/wlan_src/mapp/mlan2040coex/mlan2040coex.h b/mxm_wifiex/wlan_src/mapp/mlan2040coex/mlan2040coex.h index 2553c6a..6a344fc 100644 --- a/mxm_wifiex/wlan_src/mapp/mlan2040coex/mlan2040coex.h +++ b/mxm_wifiex/wlan_src/mapp/mlan2040coex/mlan2040coex.h @@ -223,9 +223,9 @@ struct eth_priv_cmd { #endif /** Legacy APs channel list */ -chan_intol_t leg_ap_chan_list[WLAN_IOCTL_USER_SCAN_CHAN_MAX]; +extern chan_intol_t leg_ap_chan_list[WLAN_IOCTL_USER_SCAN_CHAN_MAX]; /** Total number of channel present in Legacy APs channel list */ -t_u8 num_leg_ap_chan; +extern t_u8 num_leg_ap_chan; int get_region_code(int *reg_code); int process_host_cmd(int cmd, t_u8 *chan_list, t_u8 chan_num, t_u8 reg_class, t_u8 is_intol_ap_present);