qcacld-3.0: Change uint8_t to qdf_freq_t to hold NAN frequency

Currently, SAP has to be moved to NAN channel once NAN enable is
successful. The frequency is copied to a uint8_t variable but
it can't hold the frequency as the value would be more than 2412.
It was initially declared to hold channel number. Change the
variable to qdf_freq_t to hold the frequency.
Also, move the SAP to NAN 2.4GHz channel in non-DBS platforms.

Change-Id: I27186c3a5915db549336537702287ee67cdce011
CRs-Fixed: 2729991
This commit is contained in:
Srinivas Dasari 2020-07-06 17:17:13 +05:30 • committed by nshrivas
commit b63d131e44
2 changed files with 17 additions and 8 deletions

View file

@ -1680,7 +1680,8 @@ void policy_mgr_nan_sap_post_enable_conc_check(struct wlan_objmgr_psoc *psoc)
{
struct policy_mgr_psoc_priv_obj *pm_ctx;
struct policy_mgr_conc_connection_info *sap_info = NULL;
uint8_t nan_freq_2g, nan_freq_5g, i;
uint8_t i;
qdf_freq_t nan_freq_2g, nan_freq_5g;
QDF_STATUS status;
pm_ctx = policy_mgr_get_context(psoc);
@ -1720,23 +1721,26 @@ void policy_mgr_nan_sap_post_enable_conc_check(struct wlan_objmgr_psoc *psoc)
policy_mgr_err("wait for event failed, still continue with channel switch");
}
policy_mgr_debug("Force SCC for NAN+SAP Ch freq: %d",
WLAN_REG_IS_5GHZ_CH_FREQ(sap_info->freq) ?
nan_freq_5g : nan_freq_2g);
if (pm_ctx->hdd_cbacks.wlan_hdd_set_sap_csa_reason)
pm_ctx->hdd_cbacks.wlan_hdd_set_sap_csa_reason(psoc,
sap_info->vdev_id,
CSA_REASON_CONCURRENT_NAN_EVENT);
if (WLAN_REG_IS_5GHZ_CH_FREQ(sap_info->freq)) {
/* SAP should be moved to 2g NAN channel on non-DBS platforms */
if (!ucfg_is_nan_dbs_supported(pm_ctx->psoc) ||
WLAN_REG_IS_24GHZ_CH_FREQ(sap_info->freq)) {
policy_mgr_debug("Force SCC for NAN+SAP Ch freq: %d",
nan_freq_2g);
policy_mgr_change_sap_channel_with_csa(psoc, sap_info->vdev_id,
nan_freq_5g,
nan_freq_2g,
policy_mgr_get_ch_width(
sap_info->bw),
true);
} else {
} else if (nan_freq_5g && WLAN_REG_IS_5GHZ_CH_FREQ(sap_info->freq)) {
policy_mgr_debug("Force SCC for NAN+SAP Ch freq: %d",
nan_freq_5g);
policy_mgr_change_sap_channel_with_csa(psoc, sap_info->vdev_id,
nan_freq_2g,
nan_freq_5g,
policy_mgr_get_ch_width(
sap_info->bw),
true);

View file

@ -1089,6 +1089,11 @@ static uint32_t policy_mgr_dump_current_concurrency_two_connection(
count += strlcat(cc_mode, "+NDI",
length);
break;
case PM_NAN_DISC_MODE:
count = policy_mgr_dump_current_concurrency_one_connection(
cc_mode, length);
count += strlcat(cc_mode, "+NAN Disc", length);
break;
default:
policy_mgr_err("unexpected mode %d", mode);
break;