qcacld-3.0: Consider puncture when check chan parameters during SAP start

11BE SAP is allowned to start even some channels in the channel bandwidth
are disabled.

Change-Id: I0f6df9a8b06af952f4433ca5f89bba83fcf2ecb2
CRs-Fixed: 3159169
This commit is contained in:
Bing Sun
2022-03-25 12:02:12 +08:00
committed by Madan Koyyalamudi
parent db7e902fe8
commit d9e9a15baf

View File

@@ -5687,6 +5687,7 @@ int wlan_hdd_cfg80211_start_bss(struct hdd_adapter *adapter,
struct s_ext_cap *p_ext_cap;
enum reg_phymode reg_phy_mode, updated_phy_mode;
struct sap_context *sap_ctx;
struct wlan_objmgr_vdev *vdev;
hdd_enter();
@@ -5697,6 +5698,10 @@ int wlan_hdd_cfg80211_start_bss(struct hdd_adapter *adapter,
if (policy_mgr_is_sta_mon_concurrency(hdd_ctx->psoc))
return -EINVAL;
vdev = hdd_objmgr_get_vdev_by_user(adapter, WLAN_HDD_ID_OBJ_MGR);
if (!vdev)
return -EINVAL;
ucfg_mlme_get_sap_force_11n_for_11ac(hdd_ctx->psoc,
&sap_force_11n_for_11ac);
ucfg_mlme_get_go_force_11n_for_11ac(hdd_ctx->psoc,
@@ -5707,12 +5712,12 @@ int wlan_hdd_cfg80211_start_bss(struct hdd_adapter *adapter,
if (deliver_start_evt) {
status = ucfg_if_mgr_deliver_event(
adapter->vdev,
WLAN_IF_MGR_EV_AP_START_BSS,
vdev, WLAN_IF_MGR_EV_AP_START_BSS,
NULL);
if (!QDF_IS_STATUS_SUCCESS(status)) {
hdd_err("start bss failed!!");
return -EINVAL;
ret = -EINVAL;
goto deliver_start_err;
}
}
/*
@@ -5833,7 +5838,7 @@ int wlan_hdd_cfg80211_start_bss(struct hdd_adapter *adapter,
&target_bigtk_support);
if (target_bigtk_support &&
p_ext_cap->beacon_protection_enable)
mlme_set_bigtk_support(adapter->vdev, true);
mlme_set_bigtk_support(vdev, true);
}
/* Overwrite second AP's channel with first only when:
@@ -6197,6 +6202,8 @@ int wlan_hdd_cfg80211_start_bss(struct hdd_adapter *adapter,
}
config->ch_params.ch_width = config->ch_width_orig;
if (wlan_vdev_mlme_is_mlo_ap(vdev))
wlan_reg_set_create_punc_bitmap(&config->ch_params, true);
if ((config->ch_params.ch_width == CH_WIDTH_80P80MHZ) &&
ucfg_mlme_get_restricted_80p80_bw_supp(hdd_ctx->psoc)) {
if (!((config->ch_params.center_freq_seg0 == 138 &&
@@ -6260,8 +6267,7 @@ int wlan_hdd_cfg80211_start_bss(struct hdd_adapter *adapter,
policy_mgr_convert_device_mode_to_qdf_type(
adapter->device_mode),
config->chan_freq, HW_MODE_20_MHZ,
policy_mgr_get_conc_ext_flags(adapter->vdev,
false))) {
policy_mgr_get_conc_ext_flags(vdev, false))) {
mutex_unlock(&hdd_ctx->sap_lock);
hdd_err("This concurrency combination is not allowed");
@@ -6345,12 +6351,12 @@ int wlan_hdd_cfg80211_start_bss(struct hdd_adapter *adapter,
}
wlan_hdd_dhcp_offload_enable(hdd_ctx, adapter);
ucfg_p2p_status_start_bss(adapter->vdev);
ucfg_p2p_status_start_bss(vdev);
/* Check and restart SAP if it is on unsafe channel */
hdd_unsafe_channel_restart_sap(hdd_ctx);
ucfg_ftm_time_sync_update_bss_state(adapter->vdev,
ucfg_ftm_time_sync_update_bss_state(vdev,
FTM_TIME_SYNC_BSS_STARTED);
hdd_set_connection_in_progress(false);
@@ -6373,7 +6379,7 @@ free:
wlan_twt_concurrency_update(hdd_ctx);
if (deliver_start_evt) {
status = ucfg_if_mgr_deliver_event(
adapter->vdev,
vdev,
WLAN_IF_MGR_EV_AP_START_BSS_COMPLETE,
NULL);
if (!QDF_IS_STATUS_SUCCESS(status)) {
@@ -6382,6 +6388,9 @@ free:
}
}
qdf_mem_free(sme_config);
deliver_start_err:
hdd_objmgr_put_vdev_by_user(vdev, WLAN_HDD_ID_OBJ_MGR);
return ret;
}