|
@@ -6514,8 +6514,9 @@ static int __wlan_hdd_cfg80211_start_ap(struct wiphy *wiphy,
|
|
|
struct cfg80211_chan_def new_chandef;
|
|
|
struct cfg80211_chan_def *chandef;
|
|
|
uint16_t sap_ch;
|
|
|
- bool srd_channel_allowed;
|
|
|
+ bool srd_channel_allowed, disable_nan = true;
|
|
|
enum QDF_OPMODE vdev_opmode;
|
|
|
+ uint8_t vdev_id_list[MAX_NUMBER_OF_CONC_CONNECTIONS], i;
|
|
|
|
|
|
hdd_enter();
|
|
|
|
|
@@ -6652,17 +6653,23 @@ 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);
|
|
|
+ sta_cnt = policy_mgr_get_mode_specific_conn_info(hdd_ctx->psoc, NULL,
|
|
|
+ vdev_id_list,
|
|
|
+ PM_STA_MODE);
|
|
|
+ sap_cnt = policy_mgr_get_mode_specific_conn_info(hdd_ctx->psoc, NULL,
|
|
|
+ &vdev_id_list[sta_cnt],
|
|
|
+ PM_SAP_MODE);
|
|
|
/* 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))) {
|
|
|
hdd_debug("Invalid NAN concurrency. SAP: %d STA: %d P2P_GO: %d",
|
|
|
sap_cnt, sta_cnt,
|
|
|
(adapter->device_mode == QDF_P2P_GO_MODE));
|
|
|
- ucfg_nan_disable_concurrency(hdd_ctx->psoc);
|
|
|
+ for (i = 0; i < sta_cnt + sap_cnt; i++)
|
|
|
+ if (vdev_id_list[i] == adapter->vdev_id)
|
|
|
+ disable_nan = false;
|
|
|
+ if (disable_nan)
|
|
|
+ ucfg_nan_disable_concurrency(hdd_ctx->psoc);
|
|
|
}
|
|
|
|
|
|
/* NDI + SAP conditional supported */
|