|
@@ -6298,7 +6298,7 @@ static int __wlan_hdd_cfg80211_start_ap(struct wiphy *wiphy,
|
|
|
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, sap_cnt;
|
|
|
+ uint16_t sta_cnt, gc_cnt, sap_cnt;
|
|
|
bool val;
|
|
|
struct wireless_dev *wdev = dev->ieee80211_ptr;
|
|
|
struct cfg80211_chan_def new_chandef;
|
|
@@ -6392,17 +6392,20 @@ static int __wlan_hdd_cfg80211_start_ap(struct wiphy *wiphy,
|
|
|
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",
|
|
|
- sta_sap_scc_on_dfs_chan, sta_cnt);
|
|
|
+ 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 && sta_sap_scc_on_dfs_chan &&
|
|
|
+ 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!!");
|