|
@@ -18620,26 +18620,29 @@ wlan_hdd_add_monitor_check(struct hdd_context *hdd_ctx,
|
|
|
return -EINVAL;
|
|
|
}
|
|
|
|
|
|
- num_open_session = policy_mgr_mode_specific_connection_count(
|
|
|
- hdd_ctx->psoc,
|
|
|
- PM_STA_MODE,
|
|
|
- NULL);
|
|
|
-
|
|
|
- if (num_open_session == 1) {
|
|
|
- hdd_ctx->disconnect_for_sta_mon_conc = true;
|
|
|
- /* Try disconnecting if already in connected state */
|
|
|
- /* This is temp ifdef will be removed in near future */
|
|
|
+ if (ucfg_mlme_is_sta_mon_conc_supported(hdd_ctx->psoc)) {
|
|
|
+ num_open_session = policy_mgr_mode_specific_connection_count(
|
|
|
+ hdd_ctx->psoc,
|
|
|
+ PM_STA_MODE,
|
|
|
+ NULL);
|
|
|
+
|
|
|
+ if (num_open_session == 1) {
|
|
|
+ hdd_ctx->disconnect_for_sta_mon_conc = true;
|
|
|
+ /* Try disconnecting if already in connected state */
|
|
|
+ /* This is temp ifdef will be removed in near future */
|
|
|
#ifdef FEATURE_CM_ENABLE
|
|
|
- wlan_hdd_cm_issue_disconnect(sta_adapter, REASON_UNSPEC_FAILURE,
|
|
|
- true);
|
|
|
+ wlan_hdd_cm_issue_disconnect(sta_adapter,
|
|
|
+ REASON_UNSPEC_FAILURE,
|
|
|
+ true);
|
|
|
#else
|
|
|
- errno = wlan_hdd_try_disconnect(sta_adapter,
|
|
|
- REASON_UNSPEC_FAILURE);
|
|
|
- if (errno > 0) {
|
|
|
- hdd_err("Failed to disconnect the existing connection");
|
|
|
- return -EALREADY;
|
|
|
- }
|
|
|
+ errno = wlan_hdd_try_disconnect(sta_adapter,
|
|
|
+ REASON_UNSPEC_FAILURE);
|
|
|
+ if (errno > 0) {
|
|
|
+ hdd_err("Failed to disconnect the existing connection");
|
|
|
+ return -EALREADY;
|
|
|
+ }
|
|
|
#endif
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
if (ucfg_pkt_capture_get_mode(hdd_ctx->psoc) !=
|