mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-13 16:16:15 -04:00
qcacld-3.0: Log enhancement in ACS
Enhance logs in ACS module to remove duplicate prints and keep only useful logs to debug. Change-Id: I2cf98fb8b4d7a8391617c9ce1baaa5ff6ad42114 CRs-Fixed: 2614609
This commit is contained in:
parent
488e880708
commit
ac1feea895
5 changed files with 29 additions and 104 deletions
|
|
@ -1962,7 +1962,6 @@ int wlan_hdd_cfg80211_start_acs(struct hdd_adapter *adapter)
|
|||
|
||||
qdf_mem_copy(sap_config->self_macaddr.bytes,
|
||||
adapter->mac_addr.bytes, sizeof(struct qdf_mac_addr));
|
||||
hdd_debug("ACS Started for %s", adapter->dev->name);
|
||||
|
||||
qdf_status = wlansap_acs_chselect(WLAN_HDD_GET_SAP_CTX_PTR(adapter),
|
||||
acs_event_callback,
|
||||
|
|
@ -2706,8 +2705,6 @@ static void hdd_avoid_acs_channels(struct hdd_context *hdd_ctx,
|
|||
uint16_t avoid_acs_freq_list[CFG_VALID_CHANNEL_LIST_LEN];
|
||||
uint8_t avoid_acs_freq_list_num;
|
||||
|
||||
hdd_enter();
|
||||
|
||||
ucfg_mlme_get_acs_avoid_freq_list(hdd_ctx->psoc,
|
||||
avoid_acs_freq_list,
|
||||
&avoid_acs_freq_list_num);
|
||||
|
|
@ -2873,8 +2870,6 @@ static int __wlan_hdd_cfg80211_do_acs(struct wiphy *wiphy,
|
|||
* config shall be set only from start_acs.
|
||||
*/
|
||||
|
||||
hdd_enter_dev(ndev);
|
||||
|
||||
if (QDF_GLOBAL_FTM_MODE == hdd_get_conparam()) {
|
||||
hdd_err("Command not allowed in FTM mode");
|
||||
return -EPERM;
|
||||
|
|
@ -2889,8 +2884,6 @@ static int __wlan_hdd_cfg80211_do_acs(struct wiphy *wiphy,
|
|||
ucfg_mlme_get_go_force_11n_for_11ac(hdd_ctx->psoc,
|
||||
&go_force_11n_for_11ac);
|
||||
|
||||
hdd_debug("current country is %s", hdd_ctx->reg.alpha2);
|
||||
|
||||
if (!((adapter->device_mode == QDF_SAP_MODE) ||
|
||||
(adapter->device_mode == QDF_P2P_GO_MODE))) {
|
||||
hdd_err("Invalid device mode %d", adapter->device_mode);
|
||||
|
|
@ -2939,7 +2932,6 @@ static int __wlan_hdd_cfg80211_do_acs(struct wiphy *wiphy,
|
|||
else
|
||||
ht40_enabled = 0;
|
||||
|
||||
hdd_debug("ht40_enabled %d", ht40_enabled);
|
||||
if (tb[QCA_WLAN_VENDOR_ATTR_ACS_VHT_ENABLED])
|
||||
vht_enabled =
|
||||
nla_get_flag(tb[QCA_WLAN_VENDOR_ATTR_ACS_VHT_ENABLED]);
|
||||
|
|
@ -2980,7 +2972,6 @@ static int __wlan_hdd_cfg80211_do_acs(struct wiphy *wiphy,
|
|||
|
||||
qdf_mem_zero(&sap_config->acs_cfg, sizeof(struct sap_acs_cfg));
|
||||
|
||||
hdd_debug("channel width =%d hw_mode %d", ch_width, hw_mode);
|
||||
if (ch_width == 160)
|
||||
sap_config->acs_cfg.ch_width = CH_WIDTH_160MHZ;
|
||||
else if (ch_width == 80)
|
||||
|
|
@ -3060,8 +3051,6 @@ static int __wlan_hdd_cfg80211_do_acs(struct wiphy *wiphy,
|
|||
|
||||
hdd_avoid_acs_channels(hdd_ctx, sap_config);
|
||||
|
||||
hdd_debug("get pcl for DO_ACS vendor command");
|
||||
|
||||
pm_mode =
|
||||
policy_mgr_convert_device_mode_to_qdf_type(adapter->device_mode);
|
||||
/* consult policy manager to get PCL */
|
||||
|
|
@ -3072,15 +3061,6 @@ static int __wlan_hdd_cfg80211_do_acs(struct wiphy *wiphy,
|
|||
pcl_channels_weight_list,
|
||||
QDF_MAX_NUM_CHAN);
|
||||
|
||||
if (sap_config->acs_cfg.pcl_ch_count) {
|
||||
hdd_debug("ACS config PCL: len: %d",
|
||||
sap_config->acs_cfg.pcl_ch_count);
|
||||
for (i = 0; i < sap_config->acs_cfg.pcl_ch_count; i++)
|
||||
hdd_debug("freq:%d, weight:%d ",
|
||||
sap_config->acs_cfg.pcl_chan_freq[i],
|
||||
sap_config->acs_cfg.
|
||||
pcl_channels_weight_list[i]);
|
||||
}
|
||||
sap_config->acs_cfg.band = hw_mode;
|
||||
|
||||
qdf_status = ucfg_mlme_get_external_acs_policy(hdd_ctx->psoc,
|
||||
|
|
@ -3174,12 +3154,12 @@ static int __wlan_hdd_cfg80211_do_acs(struct wiphy *wiphy,
|
|||
hdd_debug("resetting to 40Mhz in 2.4Ghz");
|
||||
}
|
||||
|
||||
hdd_debug("ACS Config for %s: HW_MODE: %d ACS_BW: %d HT: %d VHT: %d START_CH: %d END_CH: %d band %d",
|
||||
adapter->dev->name, sap_config->acs_cfg.hw_mode,
|
||||
sap_config->acs_cfg.ch_width, ht_enabled, vht_enabled,
|
||||
sap_config->acs_cfg.start_ch_freq,
|
||||
sap_config->acs_cfg.end_ch_freq,
|
||||
sap_config->acs_cfg.band);
|
||||
hdd_nofl_debug("ACS Config country %s ch_width %d hw_mode %d ACS_BW: %d HT: %d VHT: %d START_CH: %d END_CH: %d band %d",
|
||||
hdd_ctx->reg.alpha2, ch_width,
|
||||
sap_config->acs_cfg.hw_mode, sap_config->acs_cfg.ch_width,
|
||||
ht_enabled, vht_enabled, sap_config->acs_cfg.start_ch_freq,
|
||||
sap_config->acs_cfg.end_ch_freq,
|
||||
sap_config->acs_cfg.band);
|
||||
host_log_acs_req_event(adapter->dev->name,
|
||||
csr_phy_mode_str(sap_config->acs_cfg.hw_mode),
|
||||
ch_width, ht_enabled, vht_enabled,
|
||||
|
|
@ -3190,10 +3170,10 @@ static int __wlan_hdd_cfg80211_do_acs(struct wiphy *wiphy,
|
|||
sap_config->acs_cfg.is_vht_enabled = vht_enabled;
|
||||
|
||||
if (sap_config->acs_cfg.ch_list_count) {
|
||||
hdd_debug("ACS freq list: len: %d",
|
||||
sap_config->acs_cfg.ch_list_count);
|
||||
hdd_nofl_debug("ACS freq list: len: %d",
|
||||
sap_config->acs_cfg.ch_list_count);
|
||||
for (i = 0; i < sap_config->acs_cfg.ch_list_count; i++)
|
||||
hdd_debug("%d ", sap_config->acs_cfg.freq_list[i]);
|
||||
hdd_nofl_debug("%d ", sap_config->acs_cfg.freq_list[i]);
|
||||
}
|
||||
|
||||
qdf_status = ucfg_mlme_get_vendor_acs_support(hdd_ctx->psoc,
|
||||
|
|
|
|||
|
|
@ -270,9 +270,6 @@ wlansap_filter_unsafe_ch(struct wlan_objmgr_psoc *psoc,
|
|||
|
||||
sap_debug("Updated ACS ch list len %d", num_safe_ch);
|
||||
sap_ctx->acs_cfg->ch_list_count = num_safe_ch;
|
||||
|
||||
for (i = 0; i < num_safe_ch; i++)
|
||||
sap_debug("Safe freq %d", sap_ctx->acs_cfg->freq_list[i]);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
@ -362,8 +359,6 @@ QDF_STATUS wlansap_pre_start_bss_acs_scan_callback(mac_handle_t mac_handle,
|
|||
sap_config_acs_result(mac_handle, sap_ctx,
|
||||
sap_ctx->acs_cfg->ht_sec_ch_freq);
|
||||
|
||||
QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_INFO_HIGH,
|
||||
FL("Channel freq selected = %d"), sap_ctx->chan_freq);
|
||||
sap_ctx->sap_state = eSAP_ACS_CHANNEL_SELECTED;
|
||||
sap_ctx->sap_status = eSAP_STATUS_SUCCESS;
|
||||
close_session:
|
||||
|
|
|
|||
|
|
@ -416,9 +416,6 @@ static bool sap_chan_sel_init(mac_handle_t mac_handle,
|
|||
bool sta_sap_scc_on_dfs_chan =
|
||||
policy_mgr_is_sta_sap_scc_allowed_on_dfs_chan(mac->psoc);
|
||||
|
||||
QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_INFO_HIGH, "In %s",
|
||||
__func__);
|
||||
|
||||
pSpectInfoParams->numSpectChans =
|
||||
mac->scan.base_channels.numChannels;
|
||||
|
||||
|
|
@ -561,8 +558,8 @@ uint32_t sapweight_rssi_count(struct sap_context *sap_ctx, int8_t rssi,
|
|||
rssicountWeight = rssiWeight + countWeight;
|
||||
|
||||
QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_INFO_HIGH,
|
||||
"In %s, rssiWeight=%d, countWeight=%d, rssicountWeight=%d",
|
||||
__func__, rssiWeight, countWeight, rssicountWeight);
|
||||
"rssiWeight=%d, countWeight=%d, rssicountWeight=%d",
|
||||
rssiWeight, countWeight, rssicountWeight);
|
||||
|
||||
return rssicountWeight;
|
||||
}
|
||||
|
|
@ -614,12 +611,8 @@ static uint32_t sap_weight_channel_noise_floor(struct sap_context *sap_ctx,
|
|||
ACS_WEIGHT_CFG_TO_LOCAL(sap_ctx->auto_channel_select_weight,
|
||||
softap_nf_weight_cfg);
|
||||
|
||||
if (!channel_stat || channel_stat->channelfreq == 0) {
|
||||
QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_DEBUG,
|
||||
"In %s, sanity check failed return max weight",
|
||||
__func__);
|
||||
if (!channel_stat || channel_stat->channelfreq == 0)
|
||||
return softap_nf_weight_local;
|
||||
}
|
||||
|
||||
noise_floor_weight = (channel_stat->noise_floor == 0) ? 0 :
|
||||
(ACS_WEIGHT_COMPUTE(
|
||||
|
|
@ -633,8 +626,8 @@ static uint32_t sap_weight_channel_noise_floor(struct sap_context *sap_ctx,
|
|||
noise_floor_weight = softap_nf_weight_local;
|
||||
|
||||
QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_INFO_HIGH,
|
||||
"In %s, nf=%d, nfwc=%d, nfwl=%d, nfw=%d",
|
||||
__func__, channel_stat->noise_floor,
|
||||
"nf=%d, nfwc=%d, nfwl=%d, nfw=%d",
|
||||
channel_stat->noise_floor,
|
||||
softap_nf_weight_cfg, softap_nf_weight_local,
|
||||
noise_floor_weight);
|
||||
|
||||
|
|
@ -666,12 +659,8 @@ static uint32_t sap_weight_channel_free(struct sap_context *sap_ctx,
|
|||
ACS_WEIGHT_CFG_TO_LOCAL(sap_ctx->auto_channel_select_weight,
|
||||
softap_channel_free_weight_cfg);
|
||||
|
||||
if (!channel_stat || channel_stat->channelfreq == 0) {
|
||||
QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_DEBUG,
|
||||
"In %s, sanity check failed return max weight",
|
||||
__func__);
|
||||
if (!channel_stat || channel_stat->channelfreq == 0)
|
||||
return softap_channel_free_weight_local;
|
||||
}
|
||||
|
||||
rx_clear_count = channel_stat->rx_clear_count -
|
||||
channel_stat->tx_frame_count -
|
||||
|
|
@ -693,10 +682,10 @@ static uint32_t sap_weight_channel_free(struct sap_context *sap_ctx,
|
|||
channel_free_weight = softap_channel_free_weight_local;
|
||||
|
||||
QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_INFO_HIGH,
|
||||
"In %s, rcc=%d, cc=%d, tc=%d, rc=%d, cfwc=%d, cfwl=%d, cfw=%d",
|
||||
__func__, rx_clear_count, cycle_count,
|
||||
channel_stat->tx_frame_count,
|
||||
channel_stat->rx_frame_count,
|
||||
"rcc=%d, cc=%d, tc=%d, rc=%d, cfwc=%d, cfwl=%d, cfw=%d",
|
||||
rx_clear_count, cycle_count,
|
||||
channel_stat->tx_frame_count,
|
||||
channel_stat->rx_frame_count,
|
||||
softap_channel_free_weight_cfg,
|
||||
softap_channel_free_weight_local,
|
||||
channel_free_weight);
|
||||
|
|
@ -727,12 +716,9 @@ static uint32_t sap_weight_channel_txpwr_range(struct sap_context *sap_ctx,
|
|||
ACS_WEIGHT_CFG_TO_LOCAL(sap_ctx->auto_channel_select_weight,
|
||||
softap_txpwr_range_weight_cfg);
|
||||
|
||||
if (!channel_stat || channel_stat->channelfreq == 0) {
|
||||
QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_DEBUG,
|
||||
"In %s, sanity check failed return max weight",
|
||||
__func__);
|
||||
if (!channel_stat || channel_stat->channelfreq == 0)
|
||||
return softap_txpwr_range_weight_local;
|
||||
}
|
||||
|
||||
|
||||
txpwr_weight_low_speed = (channel_stat->chan_tx_pwr_range == 0) ? 0 :
|
||||
(ACS_WEIGHT_COMPUTE(
|
||||
|
|
@ -746,8 +732,8 @@ static uint32_t sap_weight_channel_txpwr_range(struct sap_context *sap_ctx,
|
|||
txpwr_weight_low_speed = softap_txpwr_range_weight_local;
|
||||
|
||||
QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_INFO_HIGH,
|
||||
"In %s, tpr=%d, tprwc=%d, tprwl=%d, tprw=%d",
|
||||
__func__, channel_stat->chan_tx_pwr_range,
|
||||
"tpr=%d, tprwc=%d, tprwl=%d, tprw=%d",
|
||||
channel_stat->chan_tx_pwr_range,
|
||||
softap_txpwr_range_weight_cfg,
|
||||
softap_txpwr_range_weight_local,
|
||||
txpwr_weight_low_speed);
|
||||
|
|
@ -779,12 +765,8 @@ static uint32_t sap_weight_channel_txpwr_tput(struct sap_context *sap_ctx,
|
|||
ACS_WEIGHT_CFG_TO_LOCAL(sap_ctx->auto_channel_select_weight,
|
||||
softap_txpwr_tput_weight_cfg);
|
||||
|
||||
if (!channel_stat || channel_stat->channelfreq == 0) {
|
||||
QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_DEBUG,
|
||||
"In %s, sanity check failed return max weight",
|
||||
__func__);
|
||||
if (!channel_stat || channel_stat->channelfreq == 0)
|
||||
return softap_txpwr_tput_weight_local;
|
||||
}
|
||||
|
||||
txpwr_weight_high_speed = (channel_stat->chan_tx_pwr_throughput == 0)
|
||||
? 0 : (ACS_WEIGHT_COMPUTE(
|
||||
|
|
@ -798,8 +780,8 @@ static uint32_t sap_weight_channel_txpwr_tput(struct sap_context *sap_ctx,
|
|||
txpwr_weight_high_speed = softap_txpwr_tput_weight_local;
|
||||
|
||||
QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_INFO_HIGH,
|
||||
"In %s, tpt=%d, tptwc=%d, tptwl=%d, tptw=%d",
|
||||
__func__, channel_stat->chan_tx_pwr_throughput,
|
||||
"tpt=%d, tptwc=%d, tptwl=%d, tptw=%d",
|
||||
channel_stat->chan_tx_pwr_throughput,
|
||||
softap_txpwr_tput_weight_cfg,
|
||||
softap_txpwr_tput_weight_local,
|
||||
txpwr_weight_high_speed);
|
||||
|
|
@ -2254,8 +2236,6 @@ uint32_t sap_select_channel(mac_handle_t mac_handle,
|
|||
uint32_t best_chan_freq = 0;
|
||||
|
||||
mac_ctx = MAC_CONTEXT(mac_handle);
|
||||
QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_INFO_HIGH,
|
||||
"In %s, Running SAP Ch Select", __func__);
|
||||
|
||||
/* Initialize the structure pointed by spect_info */
|
||||
if (sap_chan_sel_init(mac_handle, spect_info, sap_ctx) != true) {
|
||||
|
|
|
|||
|
|
@ -303,9 +303,6 @@ static uint8_t sap_get_bonding_channels(struct sap_context *sap_ctx,
|
|||
if (size < MAX_BONDED_CHANNELS)
|
||||
return 0;
|
||||
|
||||
QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_DEBUG,
|
||||
FL("cbmode: %d, channel: %d"), chanBondState, channel);
|
||||
|
||||
switch (chanBondState) {
|
||||
case PHY_SINGLE_CHANNEL_CENTERED:
|
||||
numChannel = 1;
|
||||
|
|
@ -950,8 +947,6 @@ QDF_STATUS sap_channel_sel(struct sap_context *sap_context)
|
|||
sap_context->freq_list = freq_list;
|
||||
sap_context->num_of_channel = num_of_channels;
|
||||
/* Set requestType to Full scan */
|
||||
QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_INFO_HIGH,
|
||||
FL("calling ucfg_scan_start"));
|
||||
|
||||
sap_context->acs_req_timestamp = qdf_get_time_of_the_day_ms();
|
||||
qdf_ret_status = ucfg_scan_start(req);
|
||||
|
|
@ -980,10 +975,6 @@ QDF_STATUS sap_channel_sel(struct sap_context *sap_context)
|
|||
qdf_ret_status = QDF_STATUS_E_FAILURE;
|
||||
goto release_vdev_ref;
|
||||
} else {
|
||||
QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_INFO_HIGH,
|
||||
FL("return ScanReq, scanID=%d, Ch_freq=%d"),
|
||||
scan_id,
|
||||
sap_context->chan_freq);
|
||||
host_log_acs_scan_start(scan_id, vdev_id);
|
||||
}
|
||||
#ifdef FEATURE_WLAN_AP_AP_ACS_OPTIMIZE
|
||||
|
|
@ -1000,17 +991,6 @@ QDF_STATUS sap_channel_sel(struct sap_context *sap_context)
|
|||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* If scan failed, get default channel and advance state
|
||||
* machine as success with default channel
|
||||
*
|
||||
* Have to wait for the call back to be called to get the
|
||||
* channel cannot advance state machine here as said above
|
||||
*/
|
||||
QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_INFO_HIGH,
|
||||
FL("Channel freq: %d"),
|
||||
sap_context->chan_freq);
|
||||
|
||||
qdf_ret_status = QDF_STATUS_SUCCESS;
|
||||
|
||||
release_vdev_ref:
|
||||
|
|
|
|||
|
|
@ -2478,10 +2478,8 @@ QDF_STATUS wlansap_acs_chselect(struct sap_context *sap_context,
|
|||
return sap_signal_hdd_event(sap_context, NULL,
|
||||
eSAP_ACS_CHANNEL_SELECTED,
|
||||
(void *) eSAP_STATUS_SUCCESS);
|
||||
} else if (QDF_STATUS_SUCCESS == qdf_status) {
|
||||
QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_INFO_HIGH,
|
||||
"Successfully Issued a Pre Start Bss Scan Request");
|
||||
}
|
||||
|
||||
return qdf_status;
|
||||
}
|
||||
|
||||
|
|
@ -2740,17 +2738,9 @@ bool wlansap_is_channel_present_in_acs_list(uint32_t freq,
|
|||
{
|
||||
uint8_t i;
|
||||
|
||||
for(i = 0; i < ch_count; i++) {
|
||||
if (ch_freq_list[i] == freq) {
|
||||
/*
|
||||
* channel was given by hostpad for ACS, and is present
|
||||
* in PCL.
|
||||
*/
|
||||
sap_debug("channel present in ACS channel list %d",
|
||||
freq);
|
||||
for(i = 0; i < ch_count; i++)
|
||||
if (ch_freq_list[i] == freq)
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue