Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 342cd581 authored by Ashish Kumar Dhanotiya's avatar Ashish Kumar Dhanotiya Committed by snandini
Browse files

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
parent 3aec11e9
Loading
Loading
Loading
Loading
+6 −4
Original line number Diff line number Diff line
@@ -1974,11 +1974,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++;