qcacld-3.0: Restart ll_lt_sap with 20 MHz bandwidth always
Currently if ll_lt_sap needs restart, host driver selects best bw for the restart channel, since ll_lt_sap always needs to operate on 20 MHz bandwidth, host driver needs to keep the bw as 20 MHz always when it selects the restart channel. In current scenario, ll_lt_sap is up and country change happens, current operating channel of ll_lt_sap is invalid according to new country regulatory which leads to restart of the ll_lt_sap and during restart, ll_lt_sap is changing the bw to 40 MHz. To address above issue, add logic to keep the same bandwidth for ll_lt_sap restart. Along with the above change, below mentioned changes are also taken care as part of this fix: 1. Filter 2.4 GHz channels when policy manager modifies channel list for ll_lt_sap as there is a possibility that this API gets invoked from different path other than get_pcl, in current scenario this gets invoked when host driver tries to get the restart channel and in that case policy_mgr_pcl_modofication_for_ll_lt_sap gets invoked with the policy_mgr psoc list which contains 2.4 GHz channels as well. 2. Return current SAP frequency from wlansap_get_chan_band_restrict API if SAP need not restart and add a check in the caller API to not restart the SAP if the restart freq is same as the current frequency. currently wlansap_get_chan_band_restrict API returns 0 if SAP need not restart or if it does not find any valid frequency. If this API does not find any valid frequency for SAP restart and if current SAP frequency is invalid (for ex: if country changes) then this API returns 0 and the caller does not restart the SAP, which results for the SAP to operate on invalid frequency. With this change wlansap_get_chan_band_restrict API returns different values if SAP need not restart and if SAP needs to restart and there is no valid frequency. Change-Id: I90378623265a9f5879e82cecb7c1cfcb9adc7a27 CRs-Fixed: 3617465
This commit is contained in:

committed by
Rahul Choudhary

parent
cb96ac2592
commit
784c11d06d
@@ -1582,7 +1582,8 @@ static QDF_STATUS policy_mgr_pcl_modification_for_ll_lt_sap(
|
||||
|
||||
for (i = 0; i < *len; i++) {
|
||||
/* Remove passive/dfs/6G invalid channel for LL_LT_SAP */
|
||||
if (wlan_reg_is_passive_for_freq(
|
||||
if (wlan_reg_is_24ghz_ch_freq(pcl_channels[i]) ||
|
||||
wlan_reg_is_passive_for_freq(
|
||||
pm_ctx->pdev,
|
||||
pcl_channels[i]) ||
|
||||
wlan_reg_is_dfs_for_freq(
|
||||
|
@@ -3931,9 +3931,15 @@ QDF_STATUS wlan_hdd_get_channel_for_sap_restart(struct wlan_objmgr_psoc *psoc,
|
||||
ch_params.ch_width = CH_WIDTH_MAX;
|
||||
|
||||
intf_ch_freq = wlansap_get_chan_band_restrict(sap_context, &csa_reason);
|
||||
if (intf_ch_freq)
|
||||
if (intf_ch_freq && intf_ch_freq != sap_context->chan_freq) {
|
||||
goto sap_restart;
|
||||
|
||||
} else if (!intf_ch_freq &&
|
||||
policy_mgr_is_vdev_ll_lt_sap(psoc, vdev_id)) {
|
||||
schedule_work(&ap_adapter->sap_stop_bss_work);
|
||||
wlansap_context_put(sap_context);
|
||||
hdd_debug("stop ll_lt_sap, no channel found for csa");
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
/*
|
||||
* If STA+SAP sessions are on DFS channel and STA+SAP SCC is
|
||||
* enabled on DFS channel then move the SAP out of DFS channel
|
||||
|
@@ -1105,7 +1105,8 @@ __lim_handle_sme_start_bss_request(struct mac_context *mac_ctx, uint32_t *msg_bu
|
||||
goto free;
|
||||
}
|
||||
#ifdef QCA_HT_2040_COEX
|
||||
if (mac_ctx->roam.configParam.obssEnabled)
|
||||
if (mac_ctx->roam.configParam.obssEnabled &&
|
||||
!policy_mgr_is_vdev_ll_lt_sap(mac_ctx->psoc, vdev_id))
|
||||
session->htSupportedChannelWidthSet =
|
||||
session->htCapability;
|
||||
else
|
||||
|
@@ -1400,8 +1400,10 @@ wlansap_get_csa_chanwidth_from_phymode(struct sap_context *sap_context,
|
||||
} else {
|
||||
wlan_mlme_get_channel_bonding_5ghz(mac->psoc,
|
||||
&channel_bonding_mode);
|
||||
if (WLAN_REG_IS_5GHZ_CH_FREQ(chan_freq) &&
|
||||
(!channel_bonding_mode))
|
||||
if (policy_mgr_is_vdev_ll_lt_sap(mac->psoc,
|
||||
sap_context->vdev_id) ||
|
||||
(WLAN_REG_IS_5GHZ_CH_FREQ(chan_freq) &&
|
||||
!channel_bonding_mode))
|
||||
ch_width = CH_WIDTH_20MHZ;
|
||||
else
|
||||
ch_width = wlansap_get_max_bw_by_phymode(sap_context);
|
||||
@@ -4044,11 +4046,11 @@ qdf_freq_t wlansap_get_chan_band_restrict(struct sap_context *sap_ctx,
|
||||
sap_ctx, NULL);
|
||||
} else {
|
||||
sap_debug("No need switch SAP/Go channel");
|
||||
return 0;
|
||||
return sap_ctx->chan_freq;
|
||||
}
|
||||
} else {
|
||||
sap_debug("No need switch SAP/Go channel");
|
||||
return 0;
|
||||
return sap_ctx->chan_freq;
|
||||
}
|
||||
cc_mode = sap_ctx->cc_switch_mode;
|
||||
phy_mode = sap_ctx->phyMode;
|
||||
|
Reference in New Issue
Block a user