Browse Source

qcacld-3.0: Clean up wlan_reg_get_channel_reg_power

Clean up channel id api wlan_reg_get_channel_reg_power.

Change-Id: I2757383c182f84ed8e5089a9584f003d06ade28e
CRs-Fixed: 2905089
Jianmin Zhu 4 năm trước cách đây
mục cha
commit
a8863243de

+ 1 - 1
components/tdls/core/src/wlan_tdls_peer.c

@@ -538,7 +538,7 @@ void tdls_extract_peer_state_param(struct tdls_peer_update_state *peer_param,
 		    !wlan_reg_is_dsrc_freq(ch_freq)) {
 			peer_param->peer_cap.peer_chan[num].chan_id = chan_id;
 			peer_param->peer_cap.peer_chan[num].pwr =
-				wlan_reg_get_channel_reg_power(pdev, chan_id);
+				wlan_reg_get_channel_reg_power_for_freq(pdev, ch_freq);
 			peer_param->peer_cap.peer_chan[num].dfs_set = false;
 			peer_param->peer_cap.peer_chanlen++;
 			num++;

+ 2 - 2
core/hdd/src/wlan_hdd_cfg80211.c

@@ -2177,8 +2177,8 @@ hdd_update_reg_chan_info(struct hdd_adapter *adapter,
 
 		icv->freq = freq_list[i];
 		icv->ieee_chan_number = chan;
-		icv->max_reg_power = wlan_reg_get_channel_reg_power(
-				hdd_ctx->pdev, chan);
+		icv->max_reg_power = wlan_reg_get_channel_reg_power_for_freq(
+				hdd_ctx->pdev, freq_list[i]);
 
 		/* filling demo values */
 		icv->max_radio_power = HDD_MAX_TX_POWER;