From a90de0b7b08f882a81e1c5d5730eed99c7d02419 Mon Sep 17 00:00:00 2001 From: Ashish Kumar Dhanotiya Date: Tue, 30 Jun 2020 14:25:56 +0530 Subject: [PATCH] qcacld-3.0: Use channel freq apis instead of channel num apis Currently for get channel list command host driver is using channel number based APIs to get the channels state which may result in incorrect state for some of the channels of 4.9GHz channels as 4.9GHz channels are overlapping with the 2.4 GHz channels. To address above issue use the frequency based apis to get the channel state. Change-Id: I3d36c5aa73e42f6a6e4d82e1b7f35412b0c600c2 CRs-Fixed: 2721078 --- core/hdd/src/wlan_hdd_hostapd_wext.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/core/hdd/src/wlan_hdd_hostapd_wext.c b/core/hdd/src/wlan_hdd_hostapd_wext.c index 8c2f6c316447..e9a980955fe7 100644 --- a/core/hdd/src/wlan_hdd_hostapd_wext.c +++ b/core/hdd/src/wlan_hdd_hostapd_wext.c @@ -1970,11 +1970,13 @@ static int iw_get_channel_list(struct net_device *dev, for (i = band_start_channel; i <= band_end_channel; i++) { if ((CHANNEL_STATE_ENABLE == - wlan_reg_get_channel_state(hdd_ctx->pdev, - WLAN_REG_CH_NUM(i))) || + wlan_reg_get_channel_state_for_freq( + hdd_ctx->pdev, + WLAN_REG_CH_TO_FREQ(i))) || (is_dfs_mode_enabled && CHANNEL_STATE_DFS == - wlan_reg_get_channel_state(hdd_ctx->pdev, - WLAN_REG_CH_NUM(i)))) { + wlan_reg_get_channel_state_for_freq( + hdd_ctx->pdev, + WLAN_REG_CH_TO_FREQ(i)))) { channel_list->channels[num_channels] = WLAN_REG_CH_NUM(i); num_channels++;