qcacld-3.0: Replace channel with channel frequency

Replace pre_cac_chan with pre_cac_freq and mon_chan
with mon_chan_freq in struct hdd_adapter.

Change-Id: I413ff83c244e1ebb7deaa2dec52df76b4b957f53
CRs-Fixed: 2496812
This commit is contained in:
Paul Zhang
2019-07-25 15:55:11 +08:00
committed by nshrivas
parent 5af7254cec
commit 9d117c8b85
4 changed files with 13 additions and 8 deletions

View File

@@ -1367,10 +1367,10 @@ struct hdd_adapter {
/* debugfs entry */ /* debugfs entry */
struct dentry *debugfs_phy; struct dentry *debugfs_phy;
/* /*
* The pre cac channel is saved here and will be used when the SAP's * The pre cac channel frequency is saved here and will be used when
* channel needs to be moved from the existing 2.4GHz channel. * the SAP's channel needs to be moved from the existing 2.4GHz channel.
*/ */
uint8_t pre_cac_chan; uint32_t pre_cac_freq;
/* /*
* Indicate if HO fails during disconnect so that * Indicate if HO fails during disconnect so that
@@ -1389,7 +1389,7 @@ struct hdd_adapter {
uint32_t track_src_port; uint32_t track_src_port;
uint32_t track_dest_port; uint32_t track_dest_port;
uint32_t track_dest_ipv4; uint32_t track_dest_ipv4;
uint32_t mon_chan; uint32_t mon_chan_freq;
uint32_t mon_bandwidth; uint32_t mon_bandwidth;
/* rcpi information */ /* rcpi information */

View File

@@ -1144,7 +1144,8 @@ static void __wlan_hdd_sap_pre_cac_success(struct hdd_adapter *adapter)
wlan_hdd_set_sap_csa_reason(hdd_ctx->psoc, ap_adapter->vdev_id, wlan_hdd_set_sap_csa_reason(hdd_ctx->psoc, ap_adapter->vdev_id,
CSA_REASON_PRE_CAC_SUCCESS); CSA_REASON_PRE_CAC_SUCCESS);
i = hdd_softap_set_channel_change(ap_adapter->dev, i = hdd_softap_set_channel_change(ap_adapter->dev,
ap_adapter->pre_cac_chan, wlan_reg_freq_to_chan(hdd_ctx->pdev,
ap_adapter->pre_cac_freq),
CH_WIDTH_MAX, false); CH_WIDTH_MAX, false);
if (0 != i) { if (0 != i) {
hdd_err("failed to change channel"); hdd_err("failed to change channel");

View File

@@ -6859,7 +6859,7 @@ int wlan_hdd_set_mon_chan(struct hdd_adapter *adapter, uint32_t chan,
status); status);
} }
adapter->mon_chan = chan; adapter->mon_chan_freq = wlan_reg_chan_to_freq(hdd_ctx->pdev, chan);
adapter->mon_bandwidth = bandwidth; adapter->mon_bandwidth = bandwidth;
return qdf_status_to_os_return(status); return qdf_status_to_os_return(status);
} }
@@ -6913,6 +6913,7 @@ QDF_STATUS hdd_start_all_adapters(struct hdd_context *hdd_ctx)
struct hdd_adapter *adapter; struct hdd_adapter *adapter;
eConnectionState conn_state; eConnectionState conn_state;
bool value; bool value;
uint8_t chan;
hdd_enter(); hdd_enter();
@@ -7000,9 +7001,11 @@ QDF_STATUS hdd_start_all_adapters(struct hdd_context *hdd_ctx)
hdd_delete_sta(adapter); hdd_delete_sta(adapter);
break; break;
case QDF_MONITOR_MODE: case QDF_MONITOR_MODE:
chan = wlan_reg_freq_to_chan(hdd_ctx->pdev,
adapter->mon_chan_freq);
hdd_start_station_adapter(adapter); hdd_start_station_adapter(adapter);
hdd_set_mon_rx_cb(adapter->dev); hdd_set_mon_rx_cb(adapter->dev);
wlan_hdd_set_mon_chan(adapter, adapter->mon_chan, wlan_hdd_set_mon_chan(adapter, chan,
adapter->mon_bandwidth); adapter->mon_bandwidth);
break; break;
default: default:

View File

@@ -371,7 +371,8 @@ static int __wlan_hdd_request_pre_cac(struct hdd_context *hdd_ctx,
goto stop_close_pre_cac_adapter; goto stop_close_pre_cac_adapter;
} }
ap_adapter->pre_cac_chan = pre_cac_chan; ap_adapter->pre_cac_freq = wlan_reg_chan_to_freq(hdd_ctx->pdev,
pre_cac_chan);
*out_adapter = pre_cac_adapter; *out_adapter = pre_cac_adapter;