From 4bcf8378c0cdbe687782e8e795dc328a4c30a0d6 Mon Sep 17 00:00:00 2001 From: Jianmin Zhu Date: Thu, 27 Dec 2018 19:38:55 +0800 Subject: [PATCH] qcacld-3.0: Check and update hw mode after key compelete If Connect candidate has two or more APs in different band, switch to DBS firstly. After associated 5G AP, will check and try to switch to single MAC mode. But during DUT STA-AP key negotiation, set hw mode cmd is refused to avoid EAPOL fail. Fix: Check and change hw mode in hdd roam set key complete handler, after EAPOL handshake finished Change-Id: I63a2fb9eb49a4e209c68d5305bcf82fa26d3ea65 CRs-Fixed: 2377066 --- core/hdd/src/wlan_hdd_assoc.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/core/hdd/src/wlan_hdd_assoc.c b/core/hdd/src/wlan_hdd_assoc.c index 5e8b46347793..963c04af1227 100644 --- a/core/hdd/src/wlan_hdd_assoc.c +++ b/core/hdd/src/wlan_hdd_assoc.c @@ -2639,6 +2639,12 @@ hdd_roam_set_key_complete_handler(struct hdd_adapter *adapter, roamResult); } + if (!adapter->hdd_ctx || !adapter->hdd_ctx->psoc) { + hdd_err("hdd_ctx or psoc is NULL"); + return QDF_STATUS_E_FAILURE; + } + policy_mgr_restart_opportunistic_timer(adapter->hdd_ctx->psoc, false); + hdd_exit(); return QDF_STATUS_SUCCESS; } @@ -3289,8 +3295,9 @@ hdd_association_completion_handler(struct hdd_adapter *adapter, policy_mgr_check_concurrent_intf_and_restart_sap( hdd_ctx->psoc); if (roam_info->pBssDesc) - policy_mgr_check_n_start_opportunistic_timer( - hdd_ctx->psoc); + policy_mgr_checkn_update_hw_mode_single_mac_mode + (hdd_ctx->psoc, + roam_info->pBssDesc->channelId); } else { bool connect_timeout = false; /* do we need to change the HW mode */