Merge "qcacld-3.0: Allow single SAP started on DFS chan" into wlan-cld3.driver.lnx.2.0

This commit is contained in:
CNSS_WLAN Service 2019-07-04 10:05:00 -07:00 • committed by Gerrit - the friendly Code Review server
commit c0cf6b2573
4 changed files with 21 additions and 24 deletions

View file

@ -4944,7 +4944,7 @@ int wlan_hdd_cfg80211_start_bss(struct hdd_adapter *adapter,
uint16_t prev_rsn_length = 0;
enum dfs_mode mode;
bool ignore_cac = 0;
uint8_t is_overlap_enable = 0, scc_on_dfs_chan = 0;
uint8_t is_overlap_enable = 0;
uint8_t beacon_fixed_len, indoor_chnl_marking = 0;
bool sap_force_11n_for_11ac = 0;
bool go_force_11n_for_11ac = 0;
@ -5155,18 +5155,7 @@ int wlan_hdd_cfg80211_start_bss(struct hdd_adapter *adapter,
status = ucfg_mlme_get_dfs_ignore_cac(hdd_ctx->psoc,
&ignore_cac);
if (!QDF_IS_STATUS_SUCCESS(status))
hdd_err("can't get sta-sap scc on dfs chnl, use def");
status =
ucfg_policy_mgr_get_sta_sap_scc_on_dfs_chnl(hdd_ctx->psoc,
&scc_on_dfs_chan);
if (!QDF_IS_STATUS_SUCCESS(status))
hdd_err("can't get sta-sap scc on dfs chnl, use def");
if (ignore_cac ||
((mcc_to_scc_switch != QDF_MCC_TO_SCC_SWITCH_DISABLE) &&
scc_on_dfs_chan))
ignore_cac = 1;
hdd_err("can't get ignore cac flag");
wlansap_set_dfs_ignore_cac(mac_handle, ignore_cac);
@ -6213,8 +6202,10 @@ static int __wlan_hdd_cfg80211_start_ap(struct wiphy *wiphy,
* assumed disabled in the driver.
*/
if ((wlan_reg_get_channel_state(hdd_ctx->pdev, channel) ==
CHANNEL_STATE_DFS) && sta_sap_scc_on_dfs_chan && !sta_cnt) {
hdd_err("SAP not allowed on DFS channel!!");
CHANNEL_STATE_DFS) && !sta_cnt && sta_sap_scc_on_dfs_chan &&
!ucfg_policy_mgr_get_dfs_master_dynamic_enabled(
hdd_ctx->psoc, adapter->vdev_id)) {
hdd_err("SAP not allowed on DFS channel if no dfs master capability!!");
return -EINVAL;
}
if (!wlan_reg_is_etsi13_srd_chan_allowed_master_mode(hdd_ctx->pdev) &&

View file

@ -15038,7 +15038,9 @@ void hdd_check_and_restart_sap_with_non_dfs_acs(void)
test_bit(SOFTAP_BSS_STARTED, &ap_adapter->event_flags) &&
wlan_reg_is_dfs_ch(hdd_ctx->pdev,
ap_adapter->session.ap.operating_channel)) {
if (policy_mgr_get_dfs_master_dynamic_enabled(
hdd_ctx->psoc, ap_adapter->vdev_id))
return;
hdd_warn("STA-AP Mode DFS not supported, Switch SAP channel to Non DFS");
restart_chan =

View file

@ -368,7 +368,10 @@ wlansap_roam_process_ch_change_success(struct mac_context *mac_ctx,
} else if (is_ch_dfs) {
if ((false == mac_ctx->sap.SapDfsInfo.ignore_cac)
&& (eSAP_DFS_DO_NOT_SKIP_CAC ==
mac_ctx->sap.SapDfsInfo.cac_state)) {
mac_ctx->sap.SapDfsInfo.cac_state) &&
policy_mgr_get_dfs_master_dynamic_enabled(
mac_ctx->psoc,
sap_ctx->sessionId)) {
sap_ctx->fsm_state = SAP_INIT;
QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_INFO_MED,
"%s: %d: sapdfs: => SAP_INIT with ignore cac false on sapctx[%pK]",
@ -790,7 +793,6 @@ QDF_STATUS wlansap_roam_callback(void *ctx,
mac_handle_t mac_handle;
struct mac_context *mac_ctx;
uint8_t intf;
bool sta_sap_scc_on_dfs_chan;
if (QDF_IS_STATUS_ERROR(wlansap_context_get(sap_ctx)))
return QDF_STATUS_E_FAILURE;
@ -805,9 +807,6 @@ QDF_STATUS wlansap_roam_callback(void *ctx,
FL("roam_status = %d, roam_result = %d"),
roam_status, roam_result);
sta_sap_scc_on_dfs_chan =
policy_mgr_is_sta_sap_scc_allowed_on_dfs_chan(mac_ctx->psoc);
mac_handle = MAC_HANDLE(mac_ctx);
switch (roam_status) {
@ -892,7 +891,8 @@ QDF_STATUS wlansap_roam_callback(void *ctx,
"Received Radar Indication on sap ch %d, session %d",
sap_ctx->channel, sap_ctx->sessionId);
if (sta_sap_scc_on_dfs_chan) {
if (!policy_mgr_get_dfs_master_dynamic_enabled(
mac_ctx->psoc, sap_ctx->sessionId)) {
QDF_TRACE(QDF_MODULE_ID_SAP,
QDF_TRACE_LEVEL_DEBUG,
FL("Ignore the Radar indication"));
@ -1195,7 +1195,8 @@ QDF_STATUS wlansap_roam_callback(void *ctx,
break;
case eCSR_ROAM_RESULT_DFS_RADAR_FOUND_IND:
if (sta_sap_scc_on_dfs_chan)
if (!policy_mgr_get_dfs_master_dynamic_enabled(
mac_ctx->psoc, sap_ctx->sessionId))
break;
wlansap_roam_process_dfs_radar_found(mac_ctx, sap_ctx,
&qdf_ret_status);

View file

@ -2622,7 +2622,10 @@ static QDF_STATUS sap_fsm_state_starting(struct sap_context *sap_ctx,
if ((false == sap_dfs_info->ignore_cac) &&
(eSAP_DFS_DO_NOT_SKIP_CAC ==
sap_dfs_info->cac_state) &&
!sap_ctx->pre_cac_complete) {
!sap_ctx->pre_cac_complete &&
policy_mgr_get_dfs_master_dynamic_enabled(
mac_ctx->psoc,
sap_ctx->sessionId)) {
QDF_TRACE(QDF_MODULE_ID_SAP,
QDF_TRACE_LEVEL_INFO_HIGH,
FL("start cac timer"));