Browse Source

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
Ashish Kumar Dhanotiya 5 năm trước cách đây
mục cha
commit
a90de0b7b0
1 tập tin đã thay đổi với 6 bổ sung4 xóa
  1. 6 4
      core/hdd/src/wlan_hdd_hostapd_wext.c

+ 6 - 4
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++;