mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-18 18:52:18 -04:00
qcacld-3.0: Issue disconnect only in case of mon concurrency
While adding monitor interface, issue disconnect for existing STA interface only if mon concurrency is supported, for packet capture mode disconnection is not required. Change-Id: I6e970eb52681fcb500ab56372ff93e9c73d79618 CRs-Fixed: 2855842
This commit is contained in:
parent
7028b1194c
commit
459da8ac41
1 changed files with 15 additions and 13 deletions
|
|
@ -18664,19 +18664,21 @@ 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 (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 */
|
||||
errno = wlan_hdd_try_disconnect(sta_adapter,
|
||||
REASON_UNSPEC_FAILURE);
|
||||
if (errno > 0) {
|
||||
hdd_err("Failed to disconnect the existing connection");
|
||||
return -EALREADY;
|
||||
if (num_open_session == 1) {
|
||||
hdd_ctx->disconnect_for_sta_mon_conc = true;
|
||||
/* Try disconnecting if already in connected state */
|
||||
errno = wlan_hdd_try_disconnect(sta_adapter,
|
||||
REASON_UNSPEC_FAILURE);
|
||||
if (errno > 0) {
|
||||
hdd_err("Failed to disconnect the existing connection");
|
||||
return -EALREADY;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue