|
@@ -6487,8 +6487,7 @@ static int __wlan_hdd_cfg80211_start_ap(struct wiphy *wiphy,
|
|
|
int status;
|
|
|
struct sme_sta_inactivity_timeout *sta_inactivity_timer;
|
|
|
uint8_t channel, mandt_chnl_list = 0;
|
|
|
- bool sta_sap_scc_on_dfs_chan;
|
|
|
- uint16_t sta_cnt, gc_cnt, sap_cnt;
|
|
|
+ uint16_t sta_cnt, sap_cnt;
|
|
|
bool val;
|
|
|
struct wireless_dev *wdev = dev->ieee80211_ptr;
|
|
|
struct cfg80211_chan_def new_chandef;
|
|
@@ -6583,30 +6582,10 @@ static int __wlan_hdd_cfg80211_start_ap(struct wiphy *wiphy,
|
|
|
adapter->session.ap.sap_config.ch_params.mhz_freq_seg1 =
|
|
|
chandef->center_freq2;
|
|
|
|
|
|
- sta_sap_scc_on_dfs_chan =
|
|
|
- policy_mgr_is_sta_sap_scc_allowed_on_dfs_chan(
|
|
|
- hdd_ctx->psoc);
|
|
|
- sta_cnt = policy_mgr_mode_specific_connection_count(hdd_ctx->psoc,
|
|
|
- PM_STA_MODE, NULL);
|
|
|
- gc_cnt = policy_mgr_mode_specific_connection_count(hdd_ctx->psoc,
|
|
|
- PM_P2P_CLIENT_MODE, NULL);
|
|
|
- sap_cnt = policy_mgr_mode_specific_connection_count(hdd_ctx->psoc,
|
|
|
- PM_SAP_MODE, NULL);
|
|
|
-
|
|
|
- hdd_debug("sta_sap_scc_on_dfs_chan %u, sta_cnt %u gc_cnt %u",
|
|
|
- sta_sap_scc_on_dfs_chan, sta_cnt, gc_cnt);
|
|
|
-
|
|
|
- /* if sta_sap_scc_on_dfs_chan ini is set, DFS master capability is
|
|
|
- * assumed disabled in the driver.
|
|
|
- */
|
|
|
- if ((wlan_reg_get_channel_state(hdd_ctx->pdev, channel) ==
|
|
|
- CHANNEL_STATE_DFS) && !sta_cnt && !gc_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!!");
|
|
|
+ status = policy_mgr_is_sap_allowed_on_dfs_chan(hdd_ctx->pdev,
|
|
|
+ adapter->vdev_id, channel);
|
|
|
+ if (!status)
|
|
|
return -EINVAL;
|
|
|
- }
|
|
|
|
|
|
vdev_opmode = wlan_vdev_mlme_get_opmode(adapter->vdev);
|
|
|
ucfg_mlme_get_srd_master_mode_for_vdev(hdd_ctx->psoc, vdev_opmode,
|
|
@@ -6652,6 +6631,10 @@ static int __wlan_hdd_cfg80211_start_ap(struct wiphy *wiphy,
|
|
|
sap_cfg->SapHw_mode = eCSR_DOT11_MODE_abg;
|
|
|
}
|
|
|
|
|
|
+ sta_cnt = policy_mgr_mode_specific_connection_count(hdd_ctx->psoc,
|
|
|
+ PM_STA_MODE, NULL);
|
|
|
+ sap_cnt = policy_mgr_mode_specific_connection_count(hdd_ctx->psoc,
|
|
|
+ PM_SAP_MODE, NULL);
|
|
|
/* Disable NAN Disc before starting P2P GO or STA+SAP or SAP+SAP */
|
|
|
if (adapter->device_mode == QDF_P2P_GO_MODE || sta_cnt ||
|
|
|
(sap_cnt > (MAX_SAP_NUM_CONCURRENCY_WITH_NAN - 1))) {
|