From e36d2d8f8f403dec4bb4f9c8a98825eba6f347db Mon Sep 17 00:00:00 2001 From: Bala Venkatesh Date: Thu, 23 Aug 2018 11:34:35 +0530 Subject: qcacld-3.0: Do not Teardown tdls links if new interface is p2p device As part of any change interface TDLS links are toredown and tdls state set to disabled in FW. The assumption here is before adding new interface disable TDLS mode as TDLS is not supported in concurrency. Due to recent changes in framework, Driver may receive the change interface to P2P Device mode after STA connection then teardown is not expected as STA + P2P Device modes does not comes under concurrent operation. Check for current and new interface types before disabling TDLS. Change-Id: I26cfab077b3f83c64687479fba5c7a7c01491a52 CRs-Fixed: 2301650 --- core/hdd/src/wlan_hdd_cfg80211.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/core/hdd/src/wlan_hdd_cfg80211.c b/core/hdd/src/wlan_hdd_cfg80211.c index 0e1c618f9884..66a3dfabb83c 100644 --- a/core/hdd/src/wlan_hdd_cfg80211.c +++ b/core/hdd/src/wlan_hdd_cfg80211.c @@ -14724,7 +14724,11 @@ static int __wlan_hdd_cfg80211_change_iface(struct wiphy *wiphy, /* Reset the current device mode bit mask */ cds_clear_concurrency_mode(pAdapter->device_mode); - hdd_update_tdls_ct_and_teardown_links(pHddCtx); + if (!(pAdapter->device_mode == QDF_P2P_DEVICE_MODE && + type == NL80211_IFTYPE_STATION)) { + hdd_debug("Teardown tdls links and disable tdls in FW as new interface is coming up"); + hdd_update_tdls_ct_and_teardown_links(pHddCtx); + } if ((pAdapter->device_mode == QDF_STA_MODE) || (pAdapter->device_mode == QDF_P2P_CLIENT_MODE) || (pAdapter->device_mode == QDF_P2P_DEVICE_MODE) || -- cgit v1.2.3 From bcc3f7c0a25acc3b74d26403f8e69207e45c7705 Mon Sep 17 00:00:00 2001 From: nshrivas Date: Fri, 24 Aug 2018 06:20:14 -0700 Subject: Release 5.1.1.65B Release 5.1.1.65B Change-Id: I15633bc699983d8f0b1242c7d2507819ce1419bc CRs-Fixed: 774533 --- core/mac/inc/qwlan_version.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/mac/inc/qwlan_version.h b/core/mac/inc/qwlan_version.h index 43bc98147283..773a7ea999a3 100644 --- a/core/mac/inc/qwlan_version.h +++ b/core/mac/inc/qwlan_version.h @@ -32,9 +32,9 @@ #define QWLAN_VERSION_MAJOR 5 #define QWLAN_VERSION_MINOR 1 #define QWLAN_VERSION_PATCH 1 -#define QWLAN_VERSION_EXTRA "A" +#define QWLAN_VERSION_EXTRA "B" #define QWLAN_VERSION_BUILD 65 -#define QWLAN_VERSIONSTR "5.1.1.65A" +#define QWLAN_VERSIONSTR "5.1.1.65B" #endif /* QWLAN_VERSION_H */ -- cgit v1.2.3 From 3ebf0e50e8667fbace59c56456d4e81e3cfd5f40 Mon Sep 17 00:00:00 2001 From: Arunk Khandavalli Date: Fri, 24 Aug 2018 11:42:32 +0530 Subject: qcacld-3.0: Set recovery_in_progress flag for all the fw down events Presently, recovery inprogress flag is set only when PLD_RECOVERY is recieved but in cases of rejuvenate only PLD_FW_DOWN is recieved. Set for the recovery in progress for all the firmware down events so the unneccessary bug_on's will be avoided. Change-Id: I654e9e5b02925ac21857369f87af6ca40d8dc815 CRs-Fixed: 2285278 --- core/hdd/src/wlan_hdd_driver_ops.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/core/hdd/src/wlan_hdd_driver_ops.c b/core/hdd/src/wlan_hdd_driver_ops.c index c6824643b1d3..ad59ccdba558 100644 --- a/core/hdd/src/wlan_hdd_driver_ops.c +++ b/core/hdd/src/wlan_hdd_driver_ops.c @@ -1382,8 +1382,6 @@ static void wlan_hdd_set_the_pld_uevent(struct pld_uevent_data *uevent) { switch (uevent->uevent) { case PLD_FW_DOWN: - cds_set_target_ready(false); - break; case PLD_RECOVERY: cds_set_target_ready(false); cds_set_recovery_in_progress(true); -- cgit v1.2.3 From 6cf4f7fe941fcc474c7051f18fdceec58a8e7479 Mon Sep 17 00:00:00 2001 From: Abhinav Kumar Date: Fri, 24 Aug 2018 18:06:52 +0530 Subject: Revert "qcacld-3.0: Host sends VDEV_DELETE cmd to fw before stop_bss" While handling IPA event in case if, __wlan_ipa_wlan_evt() queue WLAN_AP_DISCONNECT cmd for later processing in work-queue context and in the meanwhile sme close session deletes vdev then, as part of work queue context driver process WLAN_AP_DISCONNECT and sends WMA_IPA_OFFLOAD_ENABLE_DISABLE cmd to firmware for the VDEV which is already deleted by sme_close_session. This result asserts in firmware. This reverts commit Ief9318bb476b480fd52f4155a0788a34c1e2ed53. Change-Id: I6128fb489fc40cc7ed01cbdf9c419a6a6b20c6d4 CRs-Fixed: 2295672 --- core/cds/src/cds_concurrency.c | 1 - core/hdd/src/wlan_hdd_hostapd.c | 17 ----------------- core/hdd/src/wlan_hdd_hostapd.h | 9 --------- core/hdd/src/wlan_hdd_main.c | 2 -- core/hdd/src/wlan_hdd_softap_tx_rx.c | 8 ++++++++ 5 files changed, 8 insertions(+), 29 deletions(-) diff --git a/core/cds/src/cds_concurrency.c b/core/cds/src/cds_concurrency.c index f0ab58c58c46..a0783d263963 100644 --- a/core/cds/src/cds_concurrency.c +++ b/core/cds/src/cds_concurrency.c @@ -8763,7 +8763,6 @@ void cds_restart_sap(hdd_adapter_t *ap_adapter) hdd_cleanup_actionframe(hdd_ctx, ap_adapter); hostapd_state = WLAN_HDD_GET_HOSTAP_STATE_PTR(ap_adapter); qdf_event_reset(&hostapd_state->qdf_stop_bss_event); - hdd_ipa_ap_disconnect(ap_adapter); if (QDF_STATUS_SUCCESS == wlansap_stop_bss(sap_ctx)) { qdf_status = qdf_wait_for_event_completion(&hostapd_state-> diff --git a/core/hdd/src/wlan_hdd_hostapd.c b/core/hdd/src/wlan_hdd_hostapd.c index 368d93bb518a..63e7545aebc8 100644 --- a/core/hdd/src/wlan_hdd_hostapd.c +++ b/core/hdd/src/wlan_hdd_hostapd.c @@ -735,7 +735,6 @@ static int hdd_stop_bss_link(hdd_adapter_t *pHostapdAdapter, return status; if (test_bit(SOFTAP_BSS_STARTED, &pHostapdAdapter->event_flags)) { - hdd_ipa_ap_disconnect(pHostapdAdapter); status = wlansap_stop_bss( WLAN_HDD_GET_SAP_CTX_PTR(pHostapdAdapter)); if (QDF_IS_STATUS_SUCCESS(status)) @@ -5349,7 +5348,6 @@ __iw_softap_stopbss(struct net_device *dev, WLAN_HDD_GET_HOSTAP_STATE_PTR(pHostapdAdapter); qdf_event_reset(&pHostapdState->qdf_stop_bss_event); - hdd_ipa_ap_disconnect(pHostapdAdapter); status = wlansap_stop_bss( WLAN_HDD_GET_SAP_CTX_PTR(pHostapdAdapter)); if (QDF_IS_STATUS_SUCCESS(status)) { @@ -8808,7 +8806,6 @@ static int __wlan_hdd_cfg80211_stop_ap(struct wiphy *wiphy, WLAN_HDD_GET_SAP_CTX_PTR(pAdapter), true); qdf_event_reset(&pHostapdState->qdf_stop_bss_event); - hdd_ipa_ap_disconnect(pAdapter); status = wlansap_stop_bss(WLAN_HDD_GET_SAP_CTX_PTR(pAdapter)); if (QDF_IS_STATUS_SUCCESS(status)) { qdf_status = @@ -9511,17 +9508,3 @@ void hdd_sap_destroy_events(hdd_adapter_t *adapter) } EXIT(); } -void hdd_ipa_ap_disconnect(hdd_adapter_t *pAdapter) -{ - hdd_context_t *hdd_ctx; - hdd_ctx = WLAN_HDD_GET_CTX(pAdapter); - - if (hdd_ipa_is_enabled(hdd_ctx)) { - if (hdd_ipa_wlan_evt(pAdapter, - WLAN_HDD_GET_AP_CTX_PTR(pAdapter)->uBCStaId, - HDD_IPA_AP_DISCONNECT, - pAdapter->dev->dev_addr)) { - hdd_err("WLAN_AP_DISCONNECT event failed"); - } - } -} diff --git a/core/hdd/src/wlan_hdd_hostapd.h b/core/hdd/src/wlan_hdd_hostapd.h index b23544b44387..cb2a31b327f0 100644 --- a/core/hdd/src/wlan_hdd_hostapd.h +++ b/core/hdd/src/wlan_hdd_hostapd.h @@ -142,15 +142,6 @@ void hdd_sap_destroy_events(hdd_adapter_t *adapter); QDF_STATUS hdd_softap_set_peer_authorized(hdd_adapter_t *adapter, struct qdf_mac_addr *peer_mac); -/** - * hdd_ipa_ap_disconnect() - call hdd_ipa_wlan_evt if - * ipa is enabled - * @pAdapter: pointer to adapter context - * - * Return: QDF_STATUS_SUCCESS on success, QDF_STATUS_E_** on error - */ -void hdd_ipa_ap_disconnect(hdd_adapter_t *pAdapter); - /** * wlan_hdd_disable_channels() - Cache the channels * and current state of the channels from the channel list diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c index 072ce80a5a9e..dd57cfcc22f9 100644 --- a/core/hdd/src/wlan_hdd_main.c +++ b/core/hdd/src/wlan_hdd_main.c @@ -4970,7 +4970,6 @@ QDF_STATUS hdd_stop_adapter(hdd_context_t *hdd_ctx, hdd_adapter_t *adapter, QDF_STATUS status; QDF_STATUS qdf_status; - hdd_ipa_ap_disconnect(adapter); /* Stop Bss. */ status = wlansap_stop_bss( WLAN_HDD_GET_SAP_CTX_PTR(adapter)); @@ -12045,7 +12044,6 @@ void wlan_hdd_stop_sap(hdd_adapter_t *ap_adapter) hostapd_state = WLAN_HDD_GET_HOSTAP_STATE_PTR(ap_adapter); hdd_debug("Now doing SAP STOPBSS"); qdf_event_reset(&hostapd_state->qdf_stop_bss_event); - hdd_ipa_ap_disconnect(ap_adapter); if (QDF_STATUS_SUCCESS == wlansap_stop_bss(hdd_ap_ctx-> sapContext)) { qdf_status = qdf_wait_for_event_completion( diff --git a/core/hdd/src/wlan_hdd_softap_tx_rx.c b/core/hdd/src/wlan_hdd_softap_tx_rx.c index 0dfbfe3f3bfb..fb60e3759682 100644 --- a/core/hdd/src/wlan_hdd_softap_tx_rx.c +++ b/core/hdd/src/wlan_hdd_softap_tx_rx.c @@ -1207,6 +1207,14 @@ QDF_STATUS hdd_softap_stop_bss(hdd_adapter_t *pAdapter) sme_update_channel_list(pHddCtx->hHal); } + if (hdd_ipa_is_enabled(pHddCtx)) { + if (hdd_ipa_wlan_evt(pAdapter, + WLAN_HDD_GET_AP_CTX_PTR(pAdapter)->uBCStaId, + HDD_IPA_AP_DISCONNECT, + pAdapter->dev->dev_addr)) + hdd_err("WLAN_AP_DISCONNECT event failed"); + } + return qdf_status; } -- cgit v1.2.3 From a83dfb157c373cfd8c21923ee4dc0184d9964f38 Mon Sep 17 00:00:00 2001 From: Abhinav Kumar Date: Fri, 24 Aug 2018 18:15:32 +0530 Subject: qcacld-3.0: Don't close SME session while changing the state of SAP While handling IPA event in case if, __wlan_ipa_wlan_evt() queue WLAN_AP_DISCONNECT cmd for later processing in work-queue context and in the meanwhile sme close session deletes vdev then, as part of work queue context driver process WLAN_AP_DISCONNECT and sends WMA_IPA_OFFLOAD_ENABLE_DISABLE cmd to firmware for the VDEV which is already deleted by sme_close_session. This result asserts in firmware. Don't close SME session while changing the state of SAP by sap fsm. Change-Id: I7fa564d2a1a5e47afe1749e4e0729c6dc827278e CRs-Fixed: 2302725 --- core/sap/src/sap_fsm.c | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/core/sap/src/sap_fsm.c b/core/sap/src/sap_fsm.c index db481a1fa65b..aca25fd7a45d 100644 --- a/core/sap/src/sap_fsm.c +++ b/core/sap/src/sap_fsm.c @@ -4305,17 +4305,9 @@ static QDF_STATUS sap_fsm_state_disconnecting(ptSapContext sap_ctx, "eSAP_DISCONNECTING", "eSAP_DISCONNECTED"); sap_ctx->sapsMachine = eSAP_DISCONNECTED; - /* Close the SME session */ - if (true == sap_ctx->isSapSessionOpen) { - sap_ctx->isSapSessionOpen = false; - qdf_status = sap_close_session(hal, sap_ctx, - sap_roam_session_close_callback, true); - if (!QDF_IS_STATUS_SUCCESS(qdf_status)) { - qdf_status = sap_signal_hdd_event(sap_ctx, NULL, - eSAP_STOP_BSS_EVENT, - (void *)eSAP_STATUS_SUCCESS); - } - } + qdf_status = sap_signal_hdd_event(sap_ctx, NULL, + eSAP_STOP_BSS_EVENT, + (void *)eSAP_STATUS_SUCCESS); } else if (msg == eWNI_SME_CHANNEL_CHANGE_REQ) { QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_INFO_MED, FL("sapdfs: Send channel change request on sapctx[%pK]"), -- cgit v1.2.3 From 6cc24a5789fa12140f2d879a3dce50ae0ff80044 Mon Sep 17 00:00:00 2001 From: nshrivas Date: Tue, 28 Aug 2018 05:45:55 -0700 Subject: Release 5.1.1.65C Release 5.1.1.65C Change-Id: Iff1dfa2e902517a5d643742843ebe4b27b358eb2 CRs-Fixed: 774533 --- core/mac/inc/qwlan_version.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/mac/inc/qwlan_version.h b/core/mac/inc/qwlan_version.h index 773a7ea999a3..50523ae6c447 100644 --- a/core/mac/inc/qwlan_version.h +++ b/core/mac/inc/qwlan_version.h @@ -32,9 +32,9 @@ #define QWLAN_VERSION_MAJOR 5 #define QWLAN_VERSION_MINOR 1 #define QWLAN_VERSION_PATCH 1 -#define QWLAN_VERSION_EXTRA "B" +#define QWLAN_VERSION_EXTRA "C" #define QWLAN_VERSION_BUILD 65 -#define QWLAN_VERSIONSTR "5.1.1.65B" +#define QWLAN_VERSIONSTR "5.1.1.65C" #endif /* QWLAN_VERSION_H */ -- cgit v1.2.3 From f94ee7f9ad82f948ce76ce1e18656e52da1b7932 Mon Sep 17 00:00:00 2001 From: Liangwei Dong Date: Tue, 21 Aug 2018 00:47:05 -0400 Subject: qcacld-3.0: Reject Invalid RSN IE Assoc Request If SAP configured with RSN security IE, peer should include compatible RSN parameters. Reject the Assoc request if peer include invalid RSN IE. Change-Id: I10083d7feb669fe5d1c2650ae3c3092e5b28169e CRs-Fixed: 2294876 --- core/mac/src/pe/lim/lim_process_assoc_req_frame.c | 329 ++++++++++++---------- 1 file changed, 178 insertions(+), 151 deletions(-) diff --git a/core/mac/src/pe/lim/lim_process_assoc_req_frame.c b/core/mac/src/pe/lim/lim_process_assoc_req_frame.c index a0705ba905a6..12e1237302a9 100644 --- a/core/mac/src/pe/lim/lim_process_assoc_req_frame.c +++ b/core/mac/src/pe/lim/lim_process_assoc_req_frame.c @@ -717,6 +717,171 @@ static void lim_print_ht_cap(tpAniSirGlobal mac_ctx, tpPESession session, } } +/** + * lim_check_wpa_rsn_ie() - wpa and rsn ie related checks + * @session: pointer to pe session entry + * @mac_ctx: pointer to Global MAC structure + * @sub_type: Assoc(=0) or Reassoc(=1) Requestframe + * @hdr: pointer to the MAC head + * @assoc_req: pointer to ASSOC/REASSOC Request frame + * @pmf_connection: flag indicating pmf connection + * + * This function checks if wpa/rsn IE is present and validates + * ie version, length and mismatch. + * + * Return: true if no error, false otherwise + */ +static bool lim_check_wpa_rsn_ie(tpPESession session, tpAniSirGlobal mac_ctx, + uint8_t sub_type, tpSirMacMgmtHdr hdr, + tpSirAssocReq assoc_req, bool *pmf_connection) +{ + uint32_t ret; + tDot11fIEWPA dot11f_ie_wpa = {0}; + tDot11fIERSN dot11f_ie_rsn = {0}; + tSirRetStatus status = eSIR_SUCCESS; + + /* + * Clear the buffers so that frame parser knows that there isn't a + * previously decoded IE in these buffers + */ + qdf_mem_set((uint8_t *)&dot11f_ie_rsn, sizeof(dot11f_ie_rsn), 0); + qdf_mem_set((uint8_t *)&dot11f_ie_wpa, sizeof(dot11f_ie_wpa), 0); + + pe_err("RSN enabled auth, Re/Assoc req from STA: " + MAC_ADDRESS_STR, MAC_ADDR_ARRAY(hdr->sa)); + if (assoc_req->rsnPresent) { + if (!assoc_req->rsn.length) { + pe_warn("Re/Assoc rejected from: " + MAC_ADDRESS_STR, + MAC_ADDR_ARRAY(hdr->sa)); + /* + * rcvd Assoc req frame with RSN IE but + * length is 0 + */ + lim_send_assoc_rsp_mgmt_frame( + mac_ctx, + eSIR_MAC_INVALID_INFORMATION_ELEMENT_STATUS, + 1, hdr->sa, sub_type, 0, session); + return false; + } + + /* Unpack the RSN IE */ + ret = dot11f_unpack_ie_rsn( + mac_ctx, + &assoc_req->rsn.info[0], + assoc_req->rsn.length, + &dot11f_ie_rsn, false); + if (!DOT11F_SUCCEEDED(ret)) { + pe_err("Invalid RSN ie"); + lim_send_assoc_rsp_mgmt_frame( + mac_ctx, + eSIR_MAC_INVALID_INFORMATION_ELEMENT_STATUS, + 1, hdr->sa, sub_type, 0, session); + return false; + } + + /* Check RSN version is supported */ + if (SIR_MAC_OUI_VERSION_1 == + dot11f_ie_rsn.version) { + /* + * check the groupwise and + * pairwise cipher suites + */ + status = lim_check_rx_rsn_ie_match( + mac_ctx, dot11f_ie_rsn, + session, + assoc_req->HTCaps.present, + pmf_connection); + if (eSIR_SUCCESS != status) { + pe_warn("Re/Assoc rejected from: " + MAC_ADDRESS_STR, + MAC_ADDR_ARRAY(hdr->sa)); + /* + * some IE is not + * properly sent + * received Association + * req frame with RSN IE + * but length is 0 + */ + lim_send_assoc_rsp_mgmt_frame( + mac_ctx, + status, 1, + hdr->sa, + sub_type, 0, + session); + return false; + } + } else { + pe_warn("Re/Assoc rejected from: " + MAC_ADDRESS_STR, + MAC_ADDR_ARRAY(hdr->sa)); + /* + * rcvd Assoc req frame with RSN + * IE version wrong + */ + lim_send_assoc_rsp_mgmt_frame( + mac_ctx, + eSIR_MAC_UNSUPPORTED_RSN_IE_VERSION_STATUS, + 1, hdr->sa, sub_type, 0, + session); + return false; + } + } else if (assoc_req->wpaPresent) { + if (!assoc_req->wpa.length) { + pe_warn("Re/Assoc rejected from: " + MAC_ADDRESS_STR, + MAC_ADDR_ARRAY(hdr->sa)); + /* + * rcvd Assoc req frame with invalid WPA + * IE + */ + lim_send_assoc_rsp_mgmt_frame( + mac_ctx, + eSIR_MAC_INVALID_INFORMATION_ELEMENT_STATUS, + 1, hdr->sa, sub_type, 0, session); + return false; + } + /* Unpack the WPA IE */ + ret = dot11f_unpack_ie_wpa( + mac_ctx, + &assoc_req->wpa.info[4], + (assoc_req->wpa.length - 4), + &dot11f_ie_wpa, false); + if (!DOT11F_SUCCEEDED(ret)) { + pe_err("Invalid WPA IE"); + lim_send_assoc_rsp_mgmt_frame( + mac_ctx, + eSIR_MAC_INVALID_INFORMATION_ELEMENT_STATUS, + 1, hdr->sa, sub_type, 0, + session); + return false; + } + /* + * check the groupwise and pairwise + * cipher suites + */ + status = lim_check_rx_wpa_ie_match( + mac_ctx, dot11f_ie_wpa, + session, + assoc_req->HTCaps.present); + if (eSIR_SUCCESS != status) { + pe_warn("Re/Assoc rejected from: " + MAC_ADDRESS_STR, + MAC_ADDR_ARRAY(hdr->sa)); + /* + * rcvd Assoc req frame with WPA + * IE but mismatch + */ + lim_send_assoc_rsp_mgmt_frame( + mac_ctx, status, 1, + hdr->sa, sub_type, 0, + session); + return false; + } + } + return true; +} + /** * lim_chk_n_process_wpa_rsn_ie() - wpa ie related checks * @mac_ctx: pointer to Global MAC structure @@ -737,16 +902,6 @@ static bool lim_chk_n_process_wpa_rsn_ie(tpAniSirGlobal mac_ctx, uint8_t sub_type, bool *pmf_connection) { uint8_t *wps_ie = NULL; - uint32_t ret; - tDot11fIEWPA dot11f_ie_wpa = {0}; - tDot11fIERSN dot11f_ie_rsn = {0}; - tSirRetStatus status = eSIR_SUCCESS; - /* - * Clear the buffers so that frame parser knows that there isn't a - * previously decoded IE in these buffers - */ - qdf_mem_set((uint8_t *) &dot11f_ie_rsn, sizeof(dot11f_ie_rsn), 0); - qdf_mem_set((uint8_t *) &dot11f_ie_wpa, sizeof(dot11f_ie_wpa), 0); /* if additional IE is present, check if it has WscIE */ if (assoc_req->addIEPresent && assoc_req->addIE.length) @@ -756,149 +911,21 @@ static bool lim_chk_n_process_wpa_rsn_ie(tpAniSirGlobal mac_ctx, pe_debug("Assoc req addIEPresent: %d addIE length: %d", assoc_req->addIEPresent, assoc_req->addIE.length); - /* when wps_ie is present, RSN/WPA IE is ignored */ - if (wps_ie == NULL) { - /* check whether as RSN IE is present */ - if (LIM_IS_AP_ROLE(session) && - session->pLimStartBssReq->privacy && - session->pLimStartBssReq->rsnIE.length) { - pe_err("RSN enabled auth, Re/Assoc req from STA: " - MAC_ADDRESS_STR, - MAC_ADDR_ARRAY(hdr->sa)); - if (assoc_req->rsnPresent) { - if (assoc_req->rsn.length) { - /* Unpack the RSN IE */ - ret = dot11f_unpack_ie_rsn(mac_ctx, - &assoc_req->rsn.info[0], - assoc_req->rsn.length, - &dot11f_ie_rsn, false); - if (!DOT11F_SUCCEEDED(ret)) { - pe_err("Invalid RSN ie"); - return false; - } - - /* Check RSN version is supported */ - if (SIR_MAC_OUI_VERSION_1 == - dot11f_ie_rsn.version) { - /* - * check the groupwise and - * pairwise cipher suites - */ - status = - lim_check_rx_rsn_ie_match( - mac_ctx, dot11f_ie_rsn, - session, - assoc_req->HTCaps.present, - pmf_connection); - if (eSIR_SUCCESS != status) { - pe_warn("Re/Assoc rejected from: " MAC_ADDRESS_STR, - MAC_ADDR_ARRAY( - hdr->sa)); - - /* - * some IE is not - * properly sent - * received Association - * req frame with RSN IE - * but length is 0 - */ - lim_send_assoc_rsp_mgmt_frame( - mac_ctx, - status, 1, - hdr->sa, - sub_type, 0, - session); - return false; - } - } else { - pe_warn("Re/Assoc rejected from: " MAC_ADDRESS_STR, - MAC_ADDR_ARRAY( - hdr->sa)); - /* - * rcvd Assoc req frame with RSN - * IE version wrong - */ - lim_send_assoc_rsp_mgmt_frame( - mac_ctx, - eSIR_MAC_UNSUPPORTED_RSN_IE_VERSION_STATUS, - 1, hdr->sa, sub_type, 0, - session); - return false; - } - } else { - pe_warn("Re/Assoc rejected from: " - MAC_ADDRESS_STR, - MAC_ADDR_ARRAY(hdr->sa)); - /* - * rcvd Assoc req frame with RSN IE but - * length is 0 - */ - lim_send_assoc_rsp_mgmt_frame(mac_ctx, - eSIR_MAC_INVALID_INFORMATION_ELEMENT_STATUS, - 1, hdr->sa, sub_type, 0, - session); - return false; - } - } /* end - if(assoc_req->rsnPresent) */ - if ((!assoc_req->rsnPresent) && assoc_req->wpaPresent) { - /* Unpack the WPA IE */ - if (assoc_req->wpa.length) { - /* OUI is not taken care */ - ret = dot11f_unpack_ie_wpa(mac_ctx, - &assoc_req->wpa.info[4], - (assoc_req->wpa.length - 4), - &dot11f_ie_wpa, false); - if (!DOT11F_SUCCEEDED(ret)) { - pe_err("Invalid WPA IE"); - return false; - } - /* - * check the groupwise and pairwise - * cipher suites - */ - status = lim_check_rx_wpa_ie_match( - mac_ctx, dot11f_ie_wpa, - session, - assoc_req->HTCaps.present); - if (eSIR_SUCCESS != status) { - pe_warn("Re/Assoc rejected from: " - MAC_ADDRESS_STR, - MAC_ADDR_ARRAY( - hdr->sa)); - /* - * rcvd Assoc req frame with WPA - * IE but mismatch - */ - lim_send_assoc_rsp_mgmt_frame( - mac_ctx, status, 1, - hdr->sa, sub_type, 0, - session); - return false; - } - } else { - pe_warn("Re/Assoc rejected from: " - MAC_ADDRESS_STR, - MAC_ADDR_ARRAY(hdr->sa)); - /* - * rcvd Assoc req frame with invalid WPA - * IE - */ - lim_send_assoc_rsp_mgmt_frame(mac_ctx, - eSIR_MAC_INVALID_INFORMATION_ELEMENT_STATUS, - 1, hdr->sa, sub_type, 0, - session); - return false; - } /* end - if(assoc_req->wpa.length) */ - } /* end - if(assoc_req->wpaPresent) */ - } - /* - * end of if(session->pLimStartBssReq->privacy - * && session->pLimStartBssReq->rsnIE->length) - */ - } /* end of if( ! assoc_req->wscInfo.present ) */ - else { + if (wps_ie) { pe_debug("Assoc req WSE IE is present"); + return true; } + + /* when wps_ie is present, RSN/WPA IE is ignored */ + if (LIM_IS_AP_ROLE(session) && + session->pLimStartBssReq->privacy && + session->pLimStartBssReq->rsnIE.length) { + /* check whether RSN IE is present */ + return lim_check_wpa_rsn_ie( + session, mac_ctx, sub_type, + hdr, assoc_req, pmf_connection); + } + return true; } -- cgit v1.2.3 From 2214a121f08d0c9b1b227d83c09fa70d22257a2d Mon Sep 17 00:00:00 2001 From: Liangwei Dong Date: Wed, 22 Aug 2018 00:55:41 -0400 Subject: qcacld-3.0: Change RSNOpaque Min len to 2 WPA2 Security Improvements test plan case 4.2.2 Scenario F: RSN version Field is truncated to 1 octet. That means the test bed will send assoc request with RSN ie total size 3. Current driver unpack_core will return DOT11F_INCOMPLETE_IE and doesn't extract the incomplete RSN ie data. lim_check_wpa_rsn_ie will have no chance to run dot11f_unpack_ie_rsn to reject the assoc request frame because the assoc_req->rsnPresent is 0. Change RSN Opaque Min Len to 2 (data min len 0), so that the unpack_core can extract the RSN ie even though it is "INCOMPLETE", and then the later lim_check_wpa_rsn_ie can reject such assoc request. Change-Id: Icba37840ea6eb1cc1c2c225efd9ec58757606eea CRs-Fixed: 2297852 --- core/mac/src/cfg/cfgUtil/dot11f.frms | 2 +- core/mac/src/include/dot11f.h | 4 ++-- core/mac/src/sys/legacy/src/utils/src/dot11f.c | 14 +++++++------- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/core/mac/src/cfg/cfgUtil/dot11f.frms b/core/mac/src/cfg/cfgUtil/dot11f.frms index e9a7334de603..bf6ea6b25dcb 100644 --- a/core/mac/src/cfg/cfgUtil/dot11f.frms +++ b/core/mac/src/cfg/cfgUtil/dot11f.frms @@ -1399,7 +1399,7 @@ IE RSN (EID_RSN) // 7.3.2.25 IE RSNOpaque (EID_RSN) // 7.3.2.25 { - data[ 6..253 ]; + data[ 0..253 ]; } IE WAPI (EID_WAPI) // 7.3.2.25 diff --git a/core/mac/src/include/dot11f.h b/core/mac/src/include/dot11f.h index aac7e935635b..5cac08dc560b 100644 --- a/core/mac/src/include/dot11f.h +++ b/core/mac/src/include/dot11f.h @@ -26,7 +26,7 @@ * * * This file was automatically generated by 'framesc' - * Tue Jun 5 17:04:23 2018 from the following file(s): + * Wed Aug 22 00:52:30 2018 from the following file(s): * * dot11f.frms * @@ -6772,7 +6772,7 @@ typedef struct sDot11fIERSNOpaque { #define DOT11F_EID_RSNOPAQUE (48) /* N.B. These #defines do *not* include the EID & length */ -#define DOT11F_IE_RSNOPAQUE_MIN_LEN (6) +#define DOT11F_IE_RSNOPAQUE_MIN_LEN (0) #define DOT11F_IE_RSNOPAQUE_MAX_LEN (253) diff --git a/core/mac/src/sys/legacy/src/utils/src/dot11f.c b/core/mac/src/sys/legacy/src/utils/src/dot11f.c index ee772e76742d..d967df646377 100644 --- a/core/mac/src/sys/legacy/src/utils/src/dot11f.c +++ b/core/mac/src/sys/legacy/src/utils/src/dot11f.c @@ -24,7 +24,7 @@ * * * This file was automatically generated by 'framesc' - * Tue Jun 5 17:04:23 2018 from the following file(s): + * Wed Aug 22 00:52:30 2018 from the following file(s): * * dot11f.frms * @@ -8917,7 +8917,7 @@ static const tIEDefn IES_AssocRequest[] = { 0, 3, 3, SigIeQOSCapsStation, {0, 0, 0, 0, 0}, 0, DOT11F_EID_QOSCAPSSTATION, 0, 0, }, { offsetof(tDot11fAssocRequest, RSNOpaque), offsetof(tDot11fIERSNOpaque, - present), 0, "RSNOpaque", 0, 8, 255, SigIeRSNOpaque, {0, 0, 0, 0, 0}, + present), 0, "RSNOpaque", 0, 2, 255, SigIeRSNOpaque, {0, 0, 0, 0, 0}, 0, DOT11F_EID_RSNOPAQUE, 0, 0, }, { offsetof(tDot11fAssocRequest, ExtSuppRates), offsetof(tDot11fIEExtSuppRates, present), 0, "ExtSuppRates", @@ -9209,7 +9209,7 @@ static const tIEDefn IES_Authentication[] = { 0, DOT11F_EID_CHALLENGETEXT, 0, 0, }, { offsetof(tDot11fAuthentication, RSNOpaque), offsetof(tDot11fIERSNOpaque, present), 0, "RSNOpaque", - 0, 8, 255, SigIeRSNOpaque, {0, 0, 0, 0, 0}, + 0, 2, 255, SigIeRSNOpaque, {0, 0, 0, 0, 0}, 0, DOT11F_EID_RSNOPAQUE, 0, 0, }, { offsetof(tDot11fAuthentication, MobilityDomain), offsetof(tDot11fIEMobilityDomain, present), 0, "MobilityDomain", @@ -9548,7 +9548,7 @@ static const tIEDefn IES_Beacon2[] = { present), 0, "ExtSuppRates", 0, 3, 14, SigIeExtSuppRates, {0, 0, 0, 0, 0}, 0, DOT11F_EID_EXTSUPPRATES, 0, 0, }, { offsetof(tDot11fBeacon2, RSNOpaque), offsetof(tDot11fIERSNOpaque, - present), 0, "RSNOpaque", 0, 8, 255, SigIeRSNOpaque, {0, 0, 0, 0, 0}, + present), 0, "RSNOpaque", 0, 2, 255, SigIeRSNOpaque, {0, 0, 0, 0, 0}, 0, DOT11F_EID_RSNOPAQUE, 0, 0, }, { offsetof(tDot11fBeacon2, EDCAParamSet), offsetof(tDot11fIEEDCAParamSet, present), 0, "EDCAParamSet", 0, 20, 20, SigIeEDCAParamSet, {0, 0, 0, 0, 0}, @@ -10384,7 +10384,7 @@ static const tIEDefn IES_ProbeResponse[] = { 0, 3, 14, SigIeExtSuppRates, {0, 0, 0, 0, 0}, 0, DOT11F_EID_EXTSUPPRATES, 0, 0, }, { offsetof(tDot11fProbeResponse, RSNOpaque), offsetof(tDot11fIERSNOpaque, - present), 0, "RSNOpaque", 0, 8, 255, SigIeRSNOpaque, {0, 0, 0, 0, 0}, + present), 0, "RSNOpaque", 0, 2, 255, SigIeRSNOpaque, {0, 0, 0, 0, 0}, 0, DOT11F_EID_RSNOPAQUE, 0, 0, }, { offsetof(tDot11fProbeResponse, QBSSLoad), offsetof(tDot11fIEQBSSLoad, present), 0, "QBSSLoad", 0, 7, 7, SigIeQBSSLoad, {0, 0, 0, 0, 0}, @@ -10655,7 +10655,7 @@ static const tIEDefn IES_ReAssocRequest[] = { 0, DOT11F_EID_SUPPCHANNELS, 0, 0, }, { offsetof(tDot11fReAssocRequest, RSNOpaque), offsetof(tDot11fIERSNOpaque, present), 0, "RSNOpaque", - 0, 8, 255, SigIeRSNOpaque, {0, 0, 0, 0, 0}, + 0, 2, 255, SigIeRSNOpaque, {0, 0, 0, 0, 0}, 0, DOT11F_EID_RSNOPAQUE, 0, 0, }, { offsetof(tDot11fReAssocRequest, QOSCapsStation), offsetof(tDot11fIEQOSCapsStation, present), 0, "QOSCapsStation", @@ -10804,7 +10804,7 @@ static const tIEDefn IES_ReAssocResponse[] = { 0, DOT11F_EID_RRMENABLEDCAP, 0, 0, }, { offsetof(tDot11fReAssocResponse, RSNOpaque), offsetof(tDot11fIERSNOpaque, present), 0, "RSNOpaque", - 0, 8, 255, SigIeRSNOpaque, {0, 0, 0, 0, 0}, + 0, 2, 255, SigIeRSNOpaque, {0, 0, 0, 0, 0}, 0, DOT11F_EID_RSNOPAQUE, 0, 0, }, { offsetof(tDot11fReAssocResponse, MobilityDomain), offsetof(tDot11fIEMobilityDomain, present), 0, "MobilityDomain", -- cgit v1.2.3 From 84a5324b5333fc50905ec5361431c6aaa676e419 Mon Sep 17 00:00:00 2001 From: nshrivas Date: Tue, 28 Aug 2018 07:18:54 -0700 Subject: Release 5.1.1.65D Release 5.1.1.65D Change-Id: Ic59acab673c053e4b036842c95fbfd65bdc4eca4 CRs-Fixed: 774533 --- core/mac/inc/qwlan_version.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/mac/inc/qwlan_version.h b/core/mac/inc/qwlan_version.h index 50523ae6c447..aecd29ce1269 100644 --- a/core/mac/inc/qwlan_version.h +++ b/core/mac/inc/qwlan_version.h @@ -32,9 +32,9 @@ #define QWLAN_VERSION_MAJOR 5 #define QWLAN_VERSION_MINOR 1 #define QWLAN_VERSION_PATCH 1 -#define QWLAN_VERSION_EXTRA "C" +#define QWLAN_VERSION_EXTRA "D" #define QWLAN_VERSION_BUILD 65 -#define QWLAN_VERSIONSTR "5.1.1.65C" +#define QWLAN_VERSIONSTR "5.1.1.65D" #endif /* QWLAN_VERSION_H */ -- cgit v1.2.3 From ef787d8332125859ada4be35c355846679311d66 Mon Sep 17 00:00:00 2001 From: Abhinav Kumar Date: Tue, 28 Aug 2018 11:48:25 +0530 Subject: qcacld-3.0: Send the correct error to HDD if self peer creation fails During the vdev attach if the self peer creation fails from the protocol stack the correct vdev delete is sent to the firmware but the success error is propogated back to the HDD and the wmi vdev set commands are sent to the firmware with invalid vdev id. Change-Id: Ida3964e5a629f53e41ffc50b53216762727fd33d CRs-Fixed: 2299941 --- core/wma/src/wma_dev_if.c | 1 + 1 file changed, 1 insertion(+) diff --git a/core/wma/src/wma_dev_if.c b/core/wma/src/wma_dev_if.c index 6727fedcc2dd..e4482d8cf0a1 100644 --- a/core/wma/src/wma_dev_if.c +++ b/core/wma/src/wma_dev_if.c @@ -2235,6 +2235,7 @@ ol_txrx_vdev_handle wma_vdev_attach(tp_wma_handle wma_handle, status = QDF_STATUS_E_FAILURE; wmi_unified_vdev_delete_send(wma_handle->wmi_handle, self_sta_req->session_id); + goto end; } } -- cgit v1.2.3 From b17df5070b20c0bbc741493bd5a46749c2780b4e Mon Sep 17 00:00:00 2001 From: Dundi Raviteja Date: Tue, 15 May 2018 19:33:34 +0530 Subject: qcacld-3.0: Use QDF event framework for change country code event We are transitioning the usage of change country code event to the new QDF event framework. Change-Id: I861b0fbe060a471a2f213698c88e9f65badbf723 CRs-Fixed: 2274940 --- core/hdd/inc/wlan_hdd_main.h | 4 ++-- core/hdd/src/wlan_hdd_cfg80211.c | 11 ----------- core/hdd/src/wlan_hdd_cfg80211.h | 1 - core/hdd/src/wlan_hdd_ioctl.c | 15 ++++++++------- core/hdd/src/wlan_hdd_main.c | 26 +++++++++++++++----------- core/hdd/src/wlan_hdd_wext.c | 2 +- 6 files changed, 26 insertions(+), 33 deletions(-) diff --git a/core/hdd/inc/wlan_hdd_main.h b/core/hdd/inc/wlan_hdd_main.h index 8bb825b9e4ef..8a31dc087341 100644 --- a/core/hdd/inc/wlan_hdd_main.h +++ b/core/hdd/inc/wlan_hdd_main.h @@ -1444,8 +1444,8 @@ struct hdd_adapter_s { struct completion roaming_comp_var; - /** Completion of change country code */ - struct completion change_country_code; + /** Event of change country code */ + qdf_event_t change_country_code; /* completion variable for Linkup Event */ struct completion linkup_event_var; diff --git a/core/hdd/src/wlan_hdd_cfg80211.c b/core/hdd/src/wlan_hdd_cfg80211.c index 66a3dfabb83c..a4909e65775a 100644 --- a/core/hdd/src/wlan_hdd_cfg80211.c +++ b/core/hdd/src/wlan_hdd_cfg80211.c @@ -14645,17 +14645,6 @@ static int wlan_hdd_cfg80211_change_bss(struct wiphy *wiphy, return ret; } -/* FUNCTION: wlan_hdd_change_country_code_cd - * to wait for contry code completion - */ -void *wlan_hdd_change_country_code_cb(void *pAdapter) -{ - hdd_adapter_t *call_back_pAdapter = pAdapter; - - complete(&call_back_pAdapter->change_country_code); - return NULL; -} - /** * __wlan_hdd_cfg80211_change_iface() - change interface cfg80211 op * @wiphy: Pointer to the wiphy structure diff --git a/core/hdd/src/wlan_hdd_cfg80211.h b/core/hdd/src/wlan_hdd_cfg80211.h index b2d39fa6eacc..772ed6b1db31 100644 --- a/core/hdd/src/wlan_hdd_cfg80211.h +++ b/core/hdd/src/wlan_hdd_cfg80211.h @@ -385,7 +385,6 @@ extern void wlan_hdd_cfg80211_update_replay_counter_cb( tpSirGtkOffloadGetInfoRspParams pGtkOffloadGetInfoRsp); #endif -void *wlan_hdd_change_country_code_cb(void *pAdapter); void hdd_select_cbmode(hdd_adapter_t *pAdapter, uint8_t operationChannel, struct ch_params_s *ch_params); diff --git a/core/hdd/src/wlan_hdd_ioctl.c b/core/hdd/src/wlan_hdd_ioctl.c index f64f9dccbfe0..add22dc65888 100644 --- a/core/hdd/src/wlan_hdd_ioctl.c +++ b/core/hdd/src/wlan_hdd_ioctl.c @@ -3129,7 +3129,6 @@ static int drv_cmd_country(hdd_adapter_t *adapter, { int ret = 0; QDF_STATUS status; - unsigned long rc; char *country_code; int32_t cc_from_db; @@ -3163,7 +3162,7 @@ static int drv_cmd_country(hdd_adapter_t *adapter, } } - INIT_COMPLETION(adapter->change_country_code); + qdf_event_reset(&adapter->change_country_code); status = sme_change_country_code(hdd_ctx->hHal, wlan_hdd_change_country_code_callback, @@ -3172,12 +3171,14 @@ static int drv_cmd_country(hdd_adapter_t *adapter, hdd_ctx->pcds_context, true, true); - if (status == QDF_STATUS_SUCCESS) { - rc = wait_for_completion_timeout( - &adapter->change_country_code, - msecs_to_jiffies(WLAN_WAIT_TIME_COUNTRY)); - if (!rc) + if (QDF_IS_STATUS_SUCCESS(status)) { + status = qdf_wait_for_event_completion( + &adapter->change_country_code, + WLAN_WAIT_TIME_COUNTRY); + if (QDF_IS_STATUS_ERROR(status)) { hdd_err("SME while setting country code timed out"); + ret = -ETIMEDOUT; + } } else { hdd_err("SME Change Country code fail, status %d", status); diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c index dd57cfcc22f9..9791b741fa58 100644 --- a/core/hdd/src/wlan_hdd_main.c +++ b/core/hdd/src/wlan_hdd_main.c @@ -3236,16 +3236,14 @@ static hdd_adapter_t *hdd_alloc_station_adapter(hdd_context_t *hdd_ctx, &adapter->qdf_session_open_event); if (!QDF_IS_STATUS_SUCCESS(qdf_status)) { hdd_err("Session open QDF event init failed!"); - free_netdev(adapter->dev); - return NULL; + goto err_qdf_init; } qdf_status = qdf_event_create( &adapter->qdf_session_close_event); if (!QDF_IS_STATUS_SUCCESS(qdf_status)) { hdd_err("Session close QDF event init failed!"); - free_netdev(adapter->dev); - return NULL; + goto err_qdf_init; } init_completion(&adapter->disconnect_comp_var); @@ -3263,7 +3261,11 @@ static hdd_adapter_t *hdd_alloc_station_adapter(hdd_context_t *hdd_ctx, init_completion(&adapter->tdls_link_establish_req_comp); #endif init_completion(&adapter->ibss_peer_info_comp); - init_completion(&adapter->change_country_code); + qdf_status = qdf_event_create(&adapter->change_country_code); + if (QDF_IS_STATUS_ERROR(qdf_status)) { + hdd_err("Change country code event init failed!"); + goto err_qdf_init; + } init_completion(&adapter->scan_info.abortscan_event_var); @@ -3302,8 +3304,11 @@ static hdd_adapter_t *hdd_alloc_station_adapter(hdd_context_t *hdd_ctx, spin_lock_init(&adapter->pause_map_lock); adapter->start_time = adapter->last_time = qdf_system_ticks(); } - return adapter; + +err_qdf_init: + free_netdev(adapter->dev); + return NULL; } static QDF_STATUS hdd_register_interface(hdd_adapter_t *adapter, bool rtnl_held) @@ -9171,12 +9176,11 @@ static int hdd_update_country_code(hdd_context_t *hdd_ctx, { QDF_STATUS status; int ret = 0; - unsigned long rc; if (country_code == NULL) return 0; - INIT_COMPLETION(adapter->change_country_code); + qdf_event_reset(&adapter->change_country_code); status = sme_change_country_code(hdd_ctx->hHal, wlan_hdd_change_country_code_callback, @@ -9191,9 +9195,9 @@ static int hdd_update_country_code(hdd_context_t *hdd_ctx, return -EINVAL; } - rc = wait_for_completion_timeout(&adapter->change_country_code, - msecs_to_jiffies(WLAN_WAIT_TIME_COUNTRY)); - if (!rc) { + status = qdf_wait_for_event_completion(&adapter->change_country_code, + WLAN_WAIT_TIME_COUNTRY); + if (QDF_IS_STATUS_ERROR(status)) { hdd_err("SME while setting country code timed out"); ret = -ETIMEDOUT; } diff --git a/core/hdd/src/wlan_hdd_wext.c b/core/hdd/src/wlan_hdd_wext.c index 463a351d4fba..36fc15610624 100644 --- a/core/hdd/src/wlan_hdd_wext.c +++ b/core/hdd/src/wlan_hdd_wext.c @@ -5930,7 +5930,7 @@ void wlan_hdd_change_country_code_callback(void *context) hdd_adapter_t *adapter = context; if (adapter && (WLAN_HDD_ADAPTER_MAGIC == adapter->magic)) - complete(&adapter->change_country_code); + qdf_event_set(&adapter->change_country_code); } /** -- cgit v1.2.3 From 15a0b27036b7f02f144766dbb0767d234ea48063 Mon Sep 17 00:00:00 2001 From: Yeshwanth Sriram Guntuka Date: Fri, 24 Aug 2018 16:46:25 +0530 Subject: Revert "qcacld-3.0: Check for target ready before sending wmi command" This reverts commit I91fa6aaffe4f35b446a3c8748f168e83620bf4b0 and wmi_stopinprogress is set as part of wma shutdown notifier callback to check for target ready before sending wmi commands. Change-Id: I59a20a2a8903370943de00a3731f3e44c736e68f CRs-Fixed: 2302678 --- core/wma/src/wma_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/wma/src/wma_main.c b/core/wma/src/wma_main.c index dd6e19c7cbe1..e1dfe94532ca 100644 --- a/core/wma/src/wma_main.c +++ b/core/wma/src/wma_main.c @@ -1924,6 +1924,7 @@ static void wma_shutdown_notifier_cb(void *priv) QDF_STATUS status; qdf_event_set(&wma_handle->wma_resume_event); + wmi_stop(wma_handle->wmi_handle); sys_build_message_header(SYS_MSG_ID_CLEAN_VDEV_RSP_QUEUE, &msg); msg.bodyptr = priv; @@ -2475,7 +2476,6 @@ QDF_STATUS wma_open(void *cds_context, } WMA_LOGD("WMA --> wmi_unified_attach - success"); - wmi_register_tgt_ready_cb(wmi_handle, cds_is_target_ready); wmi_unified_register_event_handler(wmi_handle, WMI_SERVICE_AVAILABLE_EVENTID, wma_rx_service_available_event, -- cgit v1.2.3 From 5e5334c3d45fefbb4c33191361a0934cd8109cc4 Mon Sep 17 00:00:00 2001 From: nshrivas Date: Tue, 28 Aug 2018 11:21:27 -0700 Subject: Release 5.1.1.65E Release 5.1.1.65E Change-Id: I78c83850c96e66202cc82c3ac78c0d88f766b748 CRs-Fixed: 774533 --- core/mac/inc/qwlan_version.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/mac/inc/qwlan_version.h b/core/mac/inc/qwlan_version.h index aecd29ce1269..37eb4fba11a8 100644 --- a/core/mac/inc/qwlan_version.h +++ b/core/mac/inc/qwlan_version.h @@ -32,9 +32,9 @@ #define QWLAN_VERSION_MAJOR 5 #define QWLAN_VERSION_MINOR 1 #define QWLAN_VERSION_PATCH 1 -#define QWLAN_VERSION_EXTRA "D" +#define QWLAN_VERSION_EXTRA "E" #define QWLAN_VERSION_BUILD 65 -#define QWLAN_VERSIONSTR "5.1.1.65D" +#define QWLAN_VERSIONSTR "5.1.1.65E" #endif /* QWLAN_VERSION_H */ -- cgit v1.2.3 From 8bfac07d4a29c5a602951015802d8a40223bea65 Mon Sep 17 00:00:00 2001 From: gaurank kathpalia Date: Sat, 18 Aug 2018 19:53:36 +0530 Subject: qcacld-3.0: Add SRD channel check in restart SAP Currently the driver doesn't have a check to bring up a SAP on STA SCC channel if its a SRD channel and does force SCC on it, even if SRD master mode is not supported. Fix is to check the SRD ini before SAP bringup on the STA channel Change-Id: I17f7df9ed973ecc6669f0d36a8c390c71624019b --- core/cds/src/cds_concurrency.c | 9 ++++++--- core/hdd/src/wlan_hdd_hostapd.c | 5 +++++ 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/core/cds/src/cds_concurrency.c b/core/cds/src/cds_concurrency.c index a0783d263963..d419454db34e 100644 --- a/core/cds/src/cds_concurrency.c +++ b/core/cds/src/cds_concurrency.c @@ -10234,9 +10234,12 @@ QDF_STATUS cds_valid_sap_conc_channel_check(uint8_t *con_ch, uint8_t sap_ch) if (cds_valid_sta_channel_check(channel)) { if (CDS_IS_DFS_CH(channel) || - CDS_IS_PASSIVE_OR_DISABLE_CH(channel) || - !(hdd_ctx->config->sta_sap_scc_on_lte_coex_chan || - cds_is_safe_channel(channel))) { + CDS_IS_PASSIVE_OR_DISABLE_CH(channel) || + !(hdd_ctx->config->sta_sap_scc_on_lte_coex_chan || + cds_is_safe_channel(channel)) || + (!(hdd_ctx->config->etsi_srd_chan_in_master_mode) && + (cds_is_etsi13_regdmn_srd_chan( + cds_chan_to_freq(channel))))) { if (wma_is_hw_dbs_capable()) { temp_channel = cds_get_alternate_channel_for_sap(); diff --git a/core/hdd/src/wlan_hdd_hostapd.c b/core/hdd/src/wlan_hdd_hostapd.c index 63e7545aebc8..849bd5be2d97 100644 --- a/core/hdd/src/wlan_hdd_hostapd.c +++ b/core/hdd/src/wlan_hdd_hostapd.c @@ -9088,6 +9088,11 @@ static int __wlan_hdd_cfg80211_start_ap(struct wiphy *wiphy, hdd_err("SAP not allowed on DFS channel!!"); return -EINVAL; } + if (cds_is_etsi13_regdmn_srd_chan(cds_chan_to_freq(channel) && + !(pHddCtx->config->etsi_srd_chan_in_master_mode))) { + hdd_err("SAP SRD master mode not supported. Cannot start SAP"); + return -EINVAL; + } if (cds_is_sap_mandatory_chan_list_enabled()) { if (CDS_IS_CHANNEL_5GHZ(channel)) { -- cgit v1.2.3 From fb114f193b651d73a53aaa39c49074e63508fc73 Mon Sep 17 00:00:00 2001 From: nshrivas Date: Tue, 28 Aug 2018 14:57:23 -0700 Subject: Release 5.1.1.65F Release 5.1.1.65F Change-Id: Id13952dcf1f44d0fd105dcfcf2c7b6700887ad6f CRs-Fixed: 774533 --- core/mac/inc/qwlan_version.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/mac/inc/qwlan_version.h b/core/mac/inc/qwlan_version.h index 37eb4fba11a8..52335b50854e 100644 --- a/core/mac/inc/qwlan_version.h +++ b/core/mac/inc/qwlan_version.h @@ -32,9 +32,9 @@ #define QWLAN_VERSION_MAJOR 5 #define QWLAN_VERSION_MINOR 1 #define QWLAN_VERSION_PATCH 1 -#define QWLAN_VERSION_EXTRA "E" +#define QWLAN_VERSION_EXTRA "F" #define QWLAN_VERSION_BUILD 65 -#define QWLAN_VERSIONSTR "5.1.1.65E" +#define QWLAN_VERSIONSTR "5.1.1.65F" #endif /* QWLAN_VERSION_H */ -- cgit v1.2.3 From 33523fa405d5a76e8aab54ab6f338d0ed8011125 Mon Sep 17 00:00:00 2001 From: bings Date: Wed, 22 Aug 2018 10:55:47 +0800 Subject: qcacld-3.0: Always update mgmt encryption type when there is RSN IE If mgmt encryption type is not updated, 11w feature will not be enabled correctly for this association. Mgmt encryption type is always updated through limJoinReqSerDes in the cld2.0, which is removed in cld3.0. In cld3.0 if fast roaming is enabled, mgmt encryption type will be updated through csr_construct_rsn_ie. If fast roaming is not enabled, csr_construct_rsn_ie will not be called and mgmt encryption type will not be updated. Always called csr_construct_rsn_ie in csr_retrieve_rsn_ie to make sure mgmt encryption type is updated. Change-Id: I2d6541dd88a9d1770f4976b9caa32baa70a60ed3 CRs-Fixed: 2300847 --- core/sme/src/csr/csr_util.c | 24 ++---------------------- 1 file changed, 2 insertions(+), 22 deletions(-) diff --git a/core/sme/src/csr/csr_util.c b/core/sme/src/csr/csr_util.c index 49a5316d19c1..9e24f7668e36 100644 --- a/core/sme/src/csr/csr_util.c +++ b/core/sme/src/csr/csr_util.c @@ -4417,28 +4417,8 @@ uint8_t csr_retrieve_rsn_ie(tHalHandle hHal, uint32_t sessionId, break; } - if (csr_roam_is_fast_roam_enabled(pMac, sessionId)) { - /* If "Legacy Fast Roaming" is enabled ALWAYS rebuild - * the RSN IE from scratch. So it contains the current - * PMK-IDs - */ - cbRsnIe = - csr_construct_rsn_ie(pMac, sessionId, pProfile, - pSirBssDesc, pIes, pRsnIe); - } else if (pProfile->nRSNReqIELength && pProfile->pRSNReqIE) { - /* If you have one started away, re-use it. */ - if (pProfile->nRSNReqIELength <= - DOT11F_IE_RSN_MAX_LEN) { - cbRsnIe = (uint8_t) pProfile->nRSNReqIELength; - qdf_mem_copy(pRsnIe, pProfile->pRSNReqIE, - cbRsnIe); - } else - sme_warn("csr_retrieve_rsn_ie detect invalid RSN IE length (%d)", - pProfile->nRSNReqIELength); - } else - cbRsnIe = csr_construct_rsn_ie(pMac, sessionId, - pProfile, - pSirBssDesc, pIes, pRsnIe); + cbRsnIe = csr_construct_rsn_ie(pMac, sessionId, pProfile, + pSirBssDesc, pIes, pRsnIe); } while (0); return cbRsnIe; -- cgit v1.2.3 From 01a182f925ea22af9164b9b73c5c6ccbcd396f78 Mon Sep 17 00:00:00 2001 From: nshrivas Date: Wed, 29 Aug 2018 02:40:27 -0700 Subject: Release 5.1.1.65G Release 5.1.1.65G Change-Id: Ia137ae101d18f4259c67d5cfa828df59f3ebee69 CRs-Fixed: 774533 --- core/mac/inc/qwlan_version.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/mac/inc/qwlan_version.h b/core/mac/inc/qwlan_version.h index 52335b50854e..fe6e6c48557e 100644 --- a/core/mac/inc/qwlan_version.h +++ b/core/mac/inc/qwlan_version.h @@ -32,9 +32,9 @@ #define QWLAN_VERSION_MAJOR 5 #define QWLAN_VERSION_MINOR 1 #define QWLAN_VERSION_PATCH 1 -#define QWLAN_VERSION_EXTRA "F" +#define QWLAN_VERSION_EXTRA "G" #define QWLAN_VERSION_BUILD 65 -#define QWLAN_VERSIONSTR "5.1.1.65F" +#define QWLAN_VERSIONSTR "5.1.1.65G" #endif /* QWLAN_VERSION_H */ -- cgit v1.2.3 From 51025ac0aaad252c1ad909e2b7c3140426d1cc66 Mon Sep 17 00:00:00 2001 From: jitiphil Date: Wed, 4 Jul 2018 17:39:07 +0530 Subject: qcacld-3.0: Handle FW rejuvenate scenario Upon driver reinitialize after a FW rejuvenate, data packets are not going through IPA path. Check for FW rejuvenate scenario during driver recovery and send appropriate message to IPA driver. Change-Id: I8c1d7ba78227684cd5653a5927aa4d4c2ce5d354 Crs-Fixed: 2287293 --- core/hdd/inc/wlan_hdd_ipa.h | 12 ++++++++++++ core/hdd/src/wlan_hdd_driver_ops.c | 11 +++++++++++ core/hdd/src/wlan_hdd_ipa.c | 29 +++++++++++++++++++++++++++++ core/pld/inc/pld_common.h | 12 ++++++++++++ core/pld/src/pld_common.c | 5 +++++ core/pld/src/pld_snoc.h | 10 ++++++++++ 6 files changed, 79 insertions(+) diff --git a/core/hdd/inc/wlan_hdd_ipa.h b/core/hdd/inc/wlan_hdd_ipa.h index 1db77054de54..e1a0d41e10fa 100644 --- a/core/hdd/inc/wlan_hdd_ipa.h +++ b/core/hdd/inc/wlan_hdd_ipa.h @@ -162,6 +162,14 @@ void hdd_ipa_uc_info(hdd_context_t *hdd_ctx); */ void hdd_ipa_clean_adapter_iface(hdd_adapter_t *adapter); +/** + * hdd_ipa_fw_rejuvenate() - send fw rejuvenate message to IPA driver + * @hdd_ctx: hdd context + * + * Return: void + */ +void hdd_ipa_fw_rejuvenate_send_msg(hdd_context_t *hdd_ctx); + /** * hdd_ipa_uc_disconnect_ap() - send ap disconnect event * @hdd_ctx: pointer to hdd adapter @@ -349,6 +357,10 @@ static inline void hdd_ipa_uc_info(hdd_context_t *hdd_ctx) { } +static inline void hdd_ipa_fw_rejuvenate_send_msg(hdd_context_t *hdd_ctx) +{ +} + static inline void hdd_ipa_clean_adapter_iface(hdd_adapter_t *adapter) { } diff --git a/core/hdd/src/wlan_hdd_driver_ops.c b/core/hdd/src/wlan_hdd_driver_ops.c index ad59ccdba558..7fed1ccfb0f4 100644 --- a/core/hdd/src/wlan_hdd_driver_ops.c +++ b/core/hdd/src/wlan_hdd_driver_ops.c @@ -1402,6 +1402,7 @@ static void wlan_hdd_pld_uevent(struct device *dev, struct pld_uevent_data *uevent) { enum cds_driver_state driver_state; + hdd_context_t *hdd_ctx; ENTER(); @@ -1416,6 +1417,13 @@ static void wlan_hdd_pld_uevent(struct device *dev, goto uevent_not_allowed; } + hdd_ctx = cds_get_context(QDF_MODULE_ID_HDD); + + if (!hdd_ctx) { + hdd_err("hdd_ctx is NULL return"); + return; + } + wlan_hdd_set_the_pld_uevent(uevent); mutex_lock(&hdd_init_deinit_lock); @@ -1427,6 +1435,9 @@ static void wlan_hdd_pld_uevent(struct device *dev, break; case PLD_FW_DOWN: hdd_cleanup_on_fw_down(); + if (pld_is_fw_rejuvenate() && + hdd_ipa_is_enabled(hdd_ctx)) + hdd_ipa_fw_rejuvenate_send_msg(hdd_ctx); break; } mutex_unlock(&hdd_init_deinit_lock); diff --git a/core/hdd/src/wlan_hdd_ipa.c b/core/hdd/src/wlan_hdd_ipa.c index 92fbbf6575e3..fa60b41cbea6 100644 --- a/core/hdd/src/wlan_hdd_ipa.c +++ b/core/hdd/src/wlan_hdd_ipa.c @@ -7642,4 +7642,33 @@ void hdd_ipa_clean_adapter_iface(hdd_adapter_t *adapter) if (iface_ctx) hdd_ipa_cleanup_iface(iface_ctx); } + +void hdd_ipa_fw_rejuvenate_send_msg(hdd_context_t *hdd_ctx) +{ + struct hdd_ipa_priv *hdd_ipa; + struct ipa_msg_meta meta; + struct ipa_wlan_msg *msg; + int ret; + + hdd_ipa = hdd_ctx->hdd_ipa; + meta.msg_len = sizeof(*msg); + msg = qdf_mem_malloc(meta.msg_len); + if (!msg) { + HDD_IPA_LOG(QDF_TRACE_LEVEL_DEBUG, "msg allocation failed"); + return; + } + meta.msg_type = WLAN_FWR_SSR_BEFORE_SHUTDOWN; + HDD_IPA_LOG(QDF_TRACE_LEVEL_DEBUG, "ipa_send_msg(Evt:%d)", + meta.msg_type); + ret = ipa_send_msg(&meta, msg, hdd_ipa_msg_free_fn); + + if (ret) { + HDD_IPA_LOG(QDF_TRACE_LEVEL_ERROR, + "ipa_send_msg(Evt:%d)-fail=%d", + meta.msg_type, ret); + qdf_mem_free(msg); + } + hdd_ipa->stats.num_send_msg++; +} + #endif /* IPA_OFFLOAD */ diff --git a/core/pld/inc/pld_common.h b/core/pld/inc/pld_common.h index 8ac433861c47..dfad21ec716c 100644 --- a/core/pld/inc/pld_common.h +++ b/core/pld/inc/pld_common.h @@ -562,6 +562,18 @@ int pld_is_qmi_disable(struct device *dev); int pld_is_fw_down(void); int pld_force_assert_target(struct device *dev); bool pld_is_fw_dump_skipped(struct device *dev); + +/** + * pld_is_fw_rejuvenate() - Check WLAN fw is rejuvenating + * + * Help the driver decide whether FW down is due to + * SSR or FW rejuvenate. + * + * Return: 1 FW is rejuvenating + * 0 FW is not rejuvenating + */ +int pld_is_fw_rejuvenate(void); + void pld_set_cc_source(struct device *dev, enum pld_cc_src cc_source); enum pld_cc_src pld_get_cc_source(struct device *dev); diff --git a/core/pld/src/pld_common.c b/core/pld/src/pld_common.c index cecd9ca28a96..e0d8c58ec671 100644 --- a/core/pld/src/pld_common.c +++ b/core/pld/src/pld_common.c @@ -1476,6 +1476,11 @@ bool pld_is_fw_dump_skipped(struct device *dev) return ret; } +int pld_is_fw_rejuvenate(void) +{ + return pld_snoc_is_fw_rejuvenate(); +} + #ifdef CONFIG_CNSS_UTILS /** * pld_set_cc_source() - Set the country code source diff --git a/core/pld/src/pld_snoc.h b/core/pld/src/pld_snoc.h index 7efc785d01e3..614415ae02a9 100644 --- a/core/pld/src/pld_snoc.h +++ b/core/pld/src/pld_snoc.h @@ -125,6 +125,11 @@ static inline int pld_snoc_set_fw_log_mode(struct device *dev, u8 fw_log_mode) { return 0; } + +static inline int pld_snoc_is_fw_rejuvenate(void) +{ + return 0; +} #else int pld_snoc_register_driver(void); void pld_snoc_unregister_driver(void); @@ -243,5 +248,10 @@ static inline int pld_snoc_force_assert_target(struct device *dev) { return icnss_trigger_recovery(dev); } + +static inline int pld_snoc_is_fw_rejuvenate(void) +{ + return icnss_is_rejuvenate(); +} #endif #endif -- cgit v1.2.3 From a70a99674e85554b2b8c0528348923d2e48526b8 Mon Sep 17 00:00:00 2001 From: nshrivas Date: Wed, 29 Aug 2018 05:54:20 -0700 Subject: Release 5.1.1.65H Release 5.1.1.65H Change-Id: I197a3c1cc968178251643af1d8b38ed062430a66 CRs-Fixed: 774533 --- core/mac/inc/qwlan_version.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/mac/inc/qwlan_version.h b/core/mac/inc/qwlan_version.h index fe6e6c48557e..5ab870b47b6e 100644 --- a/core/mac/inc/qwlan_version.h +++ b/core/mac/inc/qwlan_version.h @@ -32,9 +32,9 @@ #define QWLAN_VERSION_MAJOR 5 #define QWLAN_VERSION_MINOR 1 #define QWLAN_VERSION_PATCH 1 -#define QWLAN_VERSION_EXTRA "G" +#define QWLAN_VERSION_EXTRA "H" #define QWLAN_VERSION_BUILD 65 -#define QWLAN_VERSIONSTR "5.1.1.65G" +#define QWLAN_VERSIONSTR "5.1.1.65H" #endif /* QWLAN_VERSION_H */ -- cgit v1.2.3 From 6818b6f43532cddb36853e1dbd842ca05f1ce2cd Mon Sep 17 00:00:00 2001 From: Abhishek Singh Date: Tue, 28 Aug 2018 13:54:29 +0530 Subject: qcacld-3.0: Validate cbmode and bw provided by AP in HTinfo IE Driver checks if 40 Mhz is supported for the channel but doesn't validate if the cbmode provided by AP is valid. Invalid cb mode provided by AP can lead to failure. Add check to validate cbmode and bandwidth from AP in htinfo IE. Change-Id: I3d2da7a8e3045594baf201732dd80a82bd88e16c CRs-Fixed: 2303267 --- core/sme/inc/csr_api.h | 2 ++ core/sme/src/csr/csr_api_roam.c | 30 ++++++++++++++++-------------- 2 files changed, 18 insertions(+), 14 deletions(-) diff --git a/core/sme/inc/csr_api.h b/core/sme/inc/csr_api.h index f1439dc7f3ad..af07c4bc6871 100644 --- a/core/sme/inc/csr_api.h +++ b/core/sme/inc/csr_api.h @@ -779,6 +779,8 @@ typedef enum { */ #define CSR_CB_CHANNEL_GAP 4 #define CSR_CB_CENTER_CHANNEL_OFFSET 2 +#define CSR_SEC_CHANNEL_OFFSET 4 + /* WEP keysize (in bits) */ typedef enum { diff --git a/core/sme/src/csr/csr_api_roam.c b/core/sme/src/csr/csr_api_roam.c index 3888513458a0..c80a4bf1f88f 100644 --- a/core/sme/src/csr/csr_api_roam.c +++ b/core/sme/src/csr/csr_api_roam.c @@ -13641,15 +13641,15 @@ bool csr_roam_is_channel_valid(tpAniSirGlobal pMac, uint8_t channel) /* This function check and validate whether the NIC can do CB (40MHz) */ static ePhyChanBondState csr_get_cb_mode_from_ies(tpAniSirGlobal pMac, - uint8_t primaryChn, + uint8_t chan, tDot11fBeaconIEs *pIes) { ePhyChanBondState eRet = PHY_SINGLE_CHANNEL_CENTERED; - uint8_t centerChn; + uint8_t sec_ch = 0; uint32_t ChannelBondingMode; struct ch_params_s ch_params = {0}; - if (CDS_IS_CHANNEL_24GHZ(primaryChn)) { + if (CDS_IS_CHANNEL_24GHZ(chan)) { ChannelBondingMode = pMac->roam.configParam.channelBondingMode24GHz; } else { @@ -13689,7 +13689,7 @@ static ePhyChanBondState csr_get_cb_mode_from_ies(tpAniSirGlobal pMac, * value of supported channel width and recommended tx width as per * standard */ - sme_debug("scws %u rtws %u sco %u", + sme_debug("chan %d scws %u rtws %u sco %u", chan, pIes->HTCaps.supportedChannelWidthSet, pIes->HTInfo.recommendedTxWidthSet, pIes->HTInfo.secondaryChannelOffset); @@ -13701,26 +13701,28 @@ static ePhyChanBondState csr_get_cb_mode_from_ies(tpAniSirGlobal pMac, switch (eRet) { case PHY_DOUBLE_CHANNEL_LOW_PRIMARY: - centerChn = primaryChn + CSR_CB_CENTER_CHANNEL_OFFSET; + sec_ch = chan + CSR_SEC_CHANNEL_OFFSET; break; case PHY_DOUBLE_CHANNEL_HIGH_PRIMARY: - centerChn = primaryChn - CSR_CB_CENTER_CHANNEL_OFFSET; + sec_ch = chan - CSR_SEC_CHANNEL_OFFSET; break; - case PHY_SINGLE_CHANNEL_CENTERED: default: - centerChn = primaryChn; break; } - if (PHY_SINGLE_CHANNEL_CENTERED != eRet) { - ch_params.ch_width = CH_WIDTH_MAX; - cds_set_channel_params(primaryChn, 0, &ch_params); - if (ch_params.ch_width == CH_WIDTH_20MHZ) { - sme_err("40Mhz not supported for channel %d, continue with 20Mhz", - primaryChn); + if (eRet != PHY_SINGLE_CHANNEL_CENTERED) { + ch_params.ch_width = CH_WIDTH_40MHZ; + cds_set_channel_params(chan, sec_ch, &ch_params); + if (ch_params.ch_width == CH_WIDTH_20MHZ || + ch_params.sec_ch_offset != eRet) { + sme_err("chan %d :: Supported HT BW %d and cbmode %d, APs HT BW %d and cbmode %d, so switch to 20Mhz", + chan, ch_params.ch_width, + ch_params.sec_ch_offset, + pIes->HTInfo.recommendedTxWidthSet, eRet); eRet = PHY_SINGLE_CHANNEL_CENTERED; } } + return eRet; } -- cgit v1.2.3 From a661dccf0e7d03022ed89f11e8bd334da40ea26e Mon Sep 17 00:00:00 2001 From: nshrivas Date: Thu, 30 Aug 2018 00:08:13 -0700 Subject: Release 5.1.1.65I Release 5.1.1.65I Change-Id: I4688646f269427026e84f981883e7f55609848ad CRs-Fixed: 774533 --- core/mac/inc/qwlan_version.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/mac/inc/qwlan_version.h b/core/mac/inc/qwlan_version.h index 5ab870b47b6e..c754be973ac7 100644 --- a/core/mac/inc/qwlan_version.h +++ b/core/mac/inc/qwlan_version.h @@ -32,9 +32,9 @@ #define QWLAN_VERSION_MAJOR 5 #define QWLAN_VERSION_MINOR 1 #define QWLAN_VERSION_PATCH 1 -#define QWLAN_VERSION_EXTRA "H" +#define QWLAN_VERSION_EXTRA "I" #define QWLAN_VERSION_BUILD 65 -#define QWLAN_VERSIONSTR "5.1.1.65H" +#define QWLAN_VERSIONSTR "5.1.1.65I" #endif /* QWLAN_VERSION_H */ -- cgit v1.2.3 From 22df739883d9004717b957744ba5cb0ebd3770ae Mon Sep 17 00:00:00 2001 From: Varun Reddy Yeturu Date: Tue, 7 Aug 2018 14:45:31 -0700 Subject: qcacld-3.0: Do not attempt to delete peer when it is not created In preassoc state, if the set link state has failed to create the peer, then send back a failure status to the upper layers and ensure that the set link state for failure is not called again because this will eventually call vdev stop and lead to a vdev stop response and then lead to a peer delete attempt which is really not needed since the peer has not been created at all. Change-Id: I265726000204bab51c429a2d00cdd599d8064170 CRs-Fixed: 2286684 --- core/mac/inc/sir_api.h | 1 + core/mac/src/pe/lim/lim_process_mlm_req_messages.c | 2 +- core/mac/src/pe/lim/lim_process_mlm_rsp_messages.c | 10 ++++++++-- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/core/mac/inc/sir_api.h b/core/mac/inc/sir_api.h index 89540f72606f..d95c8b44c27c 100644 --- a/core/mac/inc/sir_api.h +++ b/core/mac/inc/sir_api.h @@ -349,6 +349,7 @@ typedef enum eSirResultCodes { eSIR_SME_DEAUTH_STATUS, eSIR_PNO_SCAN_SUCCESS, eSIR_SME_INVALID_SESSION, + eSIR_SME_PEER_CREATE_FAILED, eSIR_DONOT_USE_RESULT_CODE = SIR_MAX_ENUM_SIZE } tSirResultCodes; diff --git a/core/mac/src/pe/lim/lim_process_mlm_req_messages.c b/core/mac/src/pe/lim/lim_process_mlm_req_messages.c index 9af8233c980f..e524420c93d0 100644 --- a/core/mac/src/pe/lim/lim_process_mlm_req_messages.c +++ b/core/mac/src/pe/lim/lim_process_mlm_req_messages.c @@ -814,7 +814,7 @@ failure: MTRACE(mac_trace(mac, TRACE_CODE_MLM_STATE, session_entry->peSessionId, session_entry->limMlmState)); session_entry->limMlmState = eLIM_MLM_IDLE_STATE; - mlm_join_cnf.resultCode = eSIR_SME_RESOURCES_UNAVAILABLE; + mlm_join_cnf.resultCode = eSIR_SME_PEER_CREATE_FAILED; mlm_join_cnf.sessionId = session_entry->peSessionId; mlm_join_cnf.protStatusCode = eSIR_MAC_UNSPEC_FAILURE_STATUS; lim_post_sme_message(mac, LIM_MLM_JOIN_CNF, (uint32_t *) &mlm_join_cnf); diff --git a/core/mac/src/pe/lim/lim_process_mlm_rsp_messages.c b/core/mac/src/pe/lim/lim_process_mlm_rsp_messages.c index f5f1597e0a6f..dc457fa318a8 100644 --- a/core/mac/src/pe/lim/lim_process_mlm_rsp_messages.c +++ b/core/mac/src/pe/lim/lim_process_mlm_rsp_messages.c @@ -1365,8 +1365,14 @@ void lim_handle_sme_join_result(tpAniSirGlobal mac_ctx, session_entry->pLimJoinReq = NULL; } error: - /* Delete the session if JOIN failure occurred. */ - if (result_code != eSIR_SME_SUCCESS) { + /* Delete the session if JOIN failure occurred. + * if the peer is not created, then there is no + * need to send down the set link state which will + * try to delete the peer. Instead a join response + * failure should be sent to the upper layers. + */ + if (result_code != eSIR_SME_SUCCESS && + result_code != eSIR_SME_PEER_CREATE_FAILED) { param = qdf_mem_malloc(sizeof(join_params)); if (param != NULL) { param->result_code = result_code; -- cgit v1.2.3 From 8ff65cdb3dd460efaf6a79582b85ebd4116bde59 Mon Sep 17 00:00:00 2001 From: nshrivas Date: Fri, 31 Aug 2018 06:49:12 -0700 Subject: Release 5.1.1.65J Release 5.1.1.65J Change-Id: Ib37d9e2be15ca55d1ef402a1e36e586a90b0efd6 CRs-Fixed: 774533 --- core/mac/inc/qwlan_version.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/mac/inc/qwlan_version.h b/core/mac/inc/qwlan_version.h index c754be973ac7..a2ba8e35815a 100644 --- a/core/mac/inc/qwlan_version.h +++ b/core/mac/inc/qwlan_version.h @@ -32,9 +32,9 @@ #define QWLAN_VERSION_MAJOR 5 #define QWLAN_VERSION_MINOR 1 #define QWLAN_VERSION_PATCH 1 -#define QWLAN_VERSION_EXTRA "I" +#define QWLAN_VERSION_EXTRA "J" #define QWLAN_VERSION_BUILD 65 -#define QWLAN_VERSIONSTR "5.1.1.65I" +#define QWLAN_VERSIONSTR "5.1.1.65J" #endif /* QWLAN_VERSION_H */ -- cgit v1.2.3 From c3222956c94ba3aa20f54bbdd4559f82a647a756 Mon Sep 17 00:00:00 2001 From: Bala Venkatesh Date: Wed, 29 Aug 2018 15:43:43 +0530 Subject: qcacld-3.0: Fix return status in wlan_hdd_set_powersave Return correct status in wlan_hdd_set_powersave. Change-Id: I20226e903cd4f3f3e4197b7a3bc30775e3c30890 CRs-Fixed: 2305859 --- core/hdd/src/wlan_hdd_power.c | 34 ++++++++++++++++++++++++---------- core/sme/src/common/sme_power_save.c | 10 +++++++++- 2 files changed, 33 insertions(+), 11 deletions(-) diff --git a/core/hdd/src/wlan_hdd_power.c b/core/hdd/src/wlan_hdd_power.c index 902c8d2f1b98..f53b4f58805a 100644 --- a/core/hdd/src/wlan_hdd_power.c +++ b/core/hdd/src/wlan_hdd_power.c @@ -1703,6 +1703,7 @@ int wlan_hdd_set_powersave(hdd_adapter_t *adapter, { tHalHandle hal; hdd_context_t *hdd_ctx; + QDF_STATUS status = QDF_STATUS_SUCCESS; if (NULL == adapter) { hdd_err("Adapter NULL"); @@ -1734,9 +1735,11 @@ int wlan_hdd_set_powersave(hdd_adapter_t *adapter, if (QDF_STA_MODE == adapter->device_mode || QDF_P2P_CLIENT_MODE == adapter->device_mode) { hdd_debug("Disabling Auto Power save timer"); - sme_ps_disable_auto_ps_timer( + status = sme_ps_disable_auto_ps_timer( WLAN_HDD_GET_HAL_CTX(adapter), adapter->sessionId); + if (status != QDF_STATUS_SUCCESS) + goto end; } if (hdd_ctx->config && hdd_ctx->config->is_ps_enabled) { @@ -1746,13 +1749,19 @@ int wlan_hdd_set_powersave(hdd_adapter_t *adapter, * Enter Power Save command received from GUI * this means DHCP is completed */ - if (timeout) - sme_ps_enable_auto_ps_timer(hal, + if (timeout) { + status = sme_ps_enable_auto_ps_timer(hal, adapter->sessionId, timeout); - else - sme_ps_enable_disable(hal, adapter->sessionId, - SME_PS_ENABLE); + if (status != QDF_STATUS_SUCCESS) + goto end; + } else { + status = sme_ps_enable_disable(hal, + adapter->sessionId, + SME_PS_ENABLE); + if (status != QDF_STATUS_SUCCESS) + goto end; + } } else { hdd_debug("Power Save is not enabled in the cfg"); } @@ -1763,12 +1772,17 @@ int wlan_hdd_set_powersave(hdd_adapter_t *adapter, * Enter Full power command received from GUI * this means we are disconnected */ - sme_ps_disable_auto_ps_timer(WLAN_HDD_GET_HAL_CTX(adapter), - adapter->sessionId); - sme_ps_enable_disable(hal, adapter->sessionId, SME_PS_DISABLE); + status = sme_ps_disable_auto_ps_timer( + WLAN_HDD_GET_HAL_CTX(adapter), + adapter->sessionId); + if (status != QDF_STATUS_SUCCESS) + goto end; + status = sme_ps_enable_disable(hal, adapter->sessionId, + SME_PS_DISABLE); } - return 0; +end: + return qdf_status_to_os_return(status); } static void wlan_hdd_print_suspend_fail_stats(hdd_context_t *hdd_ctx) diff --git a/core/sme/src/common/sme_power_save.c b/core/sme/src/common/sme_power_save.c index 42bf8316aea0..cbe51e5be8cf 100644 --- a/core/sme/src/common/sme_power_save.c +++ b/core/sme/src/common/sme_power_save.c @@ -518,8 +518,16 @@ QDF_STATUS sme_ps_enable_disable(tHalHandle hal_ctx, uint32_t session_id, tpAniSirGlobal mac_ctx = PMAC_STRUCT(hal_ctx); status = sme_enable_sta_ps_check(mac_ctx, session_id); - if (status != QDF_STATUS_SUCCESS) + if (status != QDF_STATUS_SUCCESS) { + /* + * In non associated state ps state will be disabled in FW. + * Hence, return success if ps disable is requested + * in disconnected state. + */ + if (command == SME_PS_DISABLE) + status = QDF_STATUS_SUCCESS; return status; + } status = sme_ps_process_command(mac_ctx, session_id, command); return status; } -- cgit v1.2.3 From e8741975159d355b841da99ee687827a00c884dc Mon Sep 17 00:00:00 2001 From: nshrivas Date: Fri, 31 Aug 2018 16:05:35 -0700 Subject: Release 5.1.1.65K Release 5.1.1.65K Change-Id: I6e65be33398da2587710729010a6a3bb471b36cf CRs-Fixed: 774533 --- core/mac/inc/qwlan_version.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/mac/inc/qwlan_version.h b/core/mac/inc/qwlan_version.h index a2ba8e35815a..a9d746edac78 100644 --- a/core/mac/inc/qwlan_version.h +++ b/core/mac/inc/qwlan_version.h @@ -32,9 +32,9 @@ #define QWLAN_VERSION_MAJOR 5 #define QWLAN_VERSION_MINOR 1 #define QWLAN_VERSION_PATCH 1 -#define QWLAN_VERSION_EXTRA "J" +#define QWLAN_VERSION_EXTRA "K" #define QWLAN_VERSION_BUILD 65 -#define QWLAN_VERSIONSTR "5.1.1.65J" +#define QWLAN_VERSIONSTR "5.1.1.65K" #endif /* QWLAN_VERSION_H */ -- cgit v1.2.3 From 6507aafc44bbeef5a35f646a98b8ac7116b57720 Mon Sep 17 00:00:00 2001 From: Dundi Raviteja Date: Fri, 31 Aug 2018 14:12:48 +0530 Subject: qcacld-3.0: Scanning failed due to reassociation is in progress If driver gets connect command with bssid hint, fast reassoc command is sent to FW and roaming_in_progress is set to 1. In another thread while disconnecting, vdev down is sent to FW. As vdev is down fast reassoc command fails in FW and host will not get response, so roaming_in_progress will never set to 0. To address this issue, set roaming_in_progress to 0 after disconnection. Change-Id: If9c64568353ed01a161cc47c6261f4190c0fb93c CRs-Fixed: 2305830 --- core/hdd/src/wlan_hdd_assoc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/core/hdd/src/wlan_hdd_assoc.c b/core/hdd/src/wlan_hdd_assoc.c index 930cf98bddf2..2347bb49db0f 100644 --- a/core/hdd/src/wlan_hdd_assoc.c +++ b/core/hdd/src/wlan_hdd_assoc.c @@ -1820,6 +1820,7 @@ static QDF_STATUS hdd_dis_connect_handler(hdd_adapter_t *pAdapter, pHddStaCtx->conn_info.connState)) { hdd_conn_set_connection_state(pAdapter, eConnectionState_NotConnected); + hdd_set_roaming_in_progress(false); } #ifdef WLAN_FEATURE_GTK_OFFLOAD if ((QDF_STA_MODE == pAdapter->device_mode) || -- cgit v1.2.3 From 452694384539ca21e20d75610a3c1b55a4eee9fb Mon Sep 17 00:00:00 2001 From: Vignesh Viswanathan Date: Mon, 27 Aug 2018 19:35:31 +0530 Subject: qcacld-3.0: Set the minsize of SuppChannels IE to 2 qcacld-2.0 to qcacld-3.0 propagation. Some stations send association request with zero length of SuppChannels IE then currently dot11f decodes it to an invalid value. To fix this, set the minsize of SuppChannels IE to 2. Change-Id: If44807d2f2b8a62e5a137ca3d17af2e2654f72f2 CRs-Fixed: 2303702 --- core/mac/src/cfg/cfgUtil/dot11f.frms | 2 +- core/mac/src/include/dot11f.h | 4 ++-- core/mac/src/sys/legacy/src/utils/src/dot11f.c | 12 ++++++------ 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/core/mac/src/cfg/cfgUtil/dot11f.frms b/core/mac/src/cfg/cfgUtil/dot11f.frms index bf6ea6b25dcb..d6c59ef1f9c0 100644 --- a/core/mac/src/cfg/cfgUtil/dot11f.frms +++ b/core/mac/src/cfg/cfgUtil/dot11f.frms @@ -1336,7 +1336,7 @@ IE TPCReport (EID_TPC_REPORT) // 7.3.2.18 IE SuppChannels (EID_SUPPORTED_CHANNELS) // 7.2.3.19 { - bands[2][1..48]; + bands[2][0..48]; } IE SuppOperatingClasses (EID_SUPPORTED_OPER_CLASSES) diff --git a/core/mac/src/include/dot11f.h b/core/mac/src/include/dot11f.h index 5cac08dc560b..ec18de2565ac 100644 --- a/core/mac/src/include/dot11f.h +++ b/core/mac/src/include/dot11f.h @@ -26,7 +26,7 @@ * * * This file was automatically generated by 'framesc' - * Wed Aug 22 00:52:30 2018 from the following file(s): + * Mon Aug 27 19:26:46 2018 from the following file(s): * * dot11f.frms * @@ -6812,7 +6812,7 @@ typedef struct sDot11fIESuppChannels { #define DOT11F_EID_SUPPCHANNELS (36) /* N.B. These #defines do *not* include the EID & length */ -#define DOT11F_IE_SUPPCHANNELS_MIN_LEN (2) +#define DOT11F_IE_SUPPCHANNELS_MIN_LEN (0) #define DOT11F_IE_SUPPCHANNELS_MAX_LEN (96) diff --git a/core/mac/src/sys/legacy/src/utils/src/dot11f.c b/core/mac/src/sys/legacy/src/utils/src/dot11f.c index d967df646377..1131a6d99fda 100644 --- a/core/mac/src/sys/legacy/src/utils/src/dot11f.c +++ b/core/mac/src/sys/legacy/src/utils/src/dot11f.c @@ -24,7 +24,7 @@ * * * This file was automatically generated by 'framesc' - * Wed Aug 22 00:52:30 2018 from the following file(s): + * Mon Aug 27 19:26:46 2018 from the following file(s): * * dot11f.frms * @@ -8907,7 +8907,7 @@ static const tIEDefn IES_AssocRequest[] = { 0, DOT11F_EID_POWERCAPS, 0, 0, }, { offsetof(tDot11fAssocRequest, SuppChannels), offsetof(tDot11fIESuppChannels, present), 0, "SuppChannels", - 0, 4, 98, SigIeSuppChannels, {0, 0, 0, 0, 0}, + 0, 2, 98, SigIeSuppChannels, {0, 0, 0, 0, 0}, 0, DOT11F_EID_SUPPCHANNELS, 0, 0, }, { offsetof(tDot11fAssocRequest, HTCaps), offsetof(tDot11fIEHTCaps, present), 0, "HTCaps", 0, 28, 60, SigIeHTCaps, {0, 0, 0, 0, 0}, @@ -10651,7 +10651,7 @@ static const tIEDefn IES_ReAssocRequest[] = { 0, DOT11F_EID_POWERCAPS, 0, 0, }, { offsetof(tDot11fReAssocRequest, SuppChannels), offsetof(tDot11fIESuppChannels, present), 0, "SuppChannels", - 0, 4, 98, SigIeSuppChannels, {0, 0, 0, 0, 0}, + 0, 2, 98, SigIeSuppChannels, {0, 0, 0, 0, 0}, 0, DOT11F_EID_SUPPCHANNELS, 0, 0, }, { offsetof(tDot11fReAssocRequest, RSNOpaque), offsetof(tDot11fIERSNOpaque, present), 0, "RSNOpaque", @@ -11043,7 +11043,7 @@ static const tIEDefn IES_TDLSDisRsp[] = { 0, DOT11F_EID_EXTSUPPRATES, 0, 0, }, { offsetof(tDot11fTDLSDisRsp, SuppChannels), offsetof(tDot11fIESuppChannels, present), 0, "SuppChannels", - 0, 4, 98, SigIeSuppChannels, {0, 0, 0, 0, 0}, + 0, 2, 98, SigIeSuppChannels, {0, 0, 0, 0, 0}, 0, DOT11F_EID_SUPPCHANNELS, 0, 0, }, { offsetof(tDot11fTDLSDisRsp, SuppOperatingClasses), offsetof(tDot11fIESuppOperatingClasses, present), 0, @@ -11253,7 +11253,7 @@ static const tIEDefn IES_TDLSSetupReq[] = { 0, DOT11F_EID_EXTSUPPRATES, 0, 0, }, { offsetof(tDot11fTDLSSetupReq, SuppChannels), offsetof(tDot11fIESuppChannels, present), 0, "SuppChannels", - 0, 4, 98, SigIeSuppChannels, {0, 0, 0, 0, 0}, + 0, 2, 98, SigIeSuppChannels, {0, 0, 0, 0, 0}, 0, DOT11F_EID_SUPPCHANNELS, 0, 0, }, { offsetof(tDot11fTDLSSetupReq, RSN), offsetof(tDot11fIERSN, present), 0, "RSN", 0, 4, 132, SigIeRSN, {0, 0, 0, 0, 0}, 0, DOT11F_EID_RSN, 0, 0, }, @@ -11342,7 +11342,7 @@ static const tIEDefn IES_TDLSSetupRsp[] = { 0, DOT11F_EID_EXTSUPPRATES, 0, 0, }, { offsetof(tDot11fTDLSSetupRsp, SuppChannels), offsetof(tDot11fIESuppChannels, present), 0, "SuppChannels", - 0, 4, 98, SigIeSuppChannels, {0, 0, 0, 0, 0}, + 0, 2, 98, SigIeSuppChannels, {0, 0, 0, 0, 0}, 0, DOT11F_EID_SUPPCHANNELS, 0, 0, }, { offsetof(tDot11fTDLSSetupRsp, RSN), offsetof(tDot11fIERSN, present), 0, "RSN", 0, 4, 132, SigIeRSN, {0, 0, 0, 0, 0}, 0, DOT11F_EID_RSN, 0, 0, }, -- cgit v1.2.3 From c97e34058a55ad6afa86011a22336c5d57be84a1 Mon Sep 17 00:00:00 2001 From: Krunal Soni Date: Mon, 6 Aug 2018 12:23:58 -0700 Subject: qcacld-3.0: Don't process excessive duplicate auth mgmt frames When PEER sends auth mgmt frame to DUT and if DUT doesn't ACK back, PEER sends auth frame again and again till it gets ACK or timeout occurs. It has been observed that in busy environment, PEER ends up sending same AUTH frame almost 100+ times within 20ms apart due to ACK lost. in such scenario DUT gets busy processing AUTH frames from PE queue and other low priority queues suffer from starvation. to fix the situation, drop duplicate auth frames by checking retry field and sequence number. CRs-Fixed: 2290133 Change-Id: I1b545dab4d416facc24c3762b86cd1e73981de5c --- core/mac/src/pe/include/lim_api.h | 1 + core/mac/src/pe/lim/lim_api.c | 20 ++++++++++++++++++++ 2 files changed, 21 insertions(+) diff --git a/core/mac/src/pe/include/lim_api.h b/core/mac/src/pe/include/lim_api.h index f56056e8b0e9..ec7ca33f8b04 100644 --- a/core/mac/src/pe/include/lim_api.h +++ b/core/mac/src/pe/include/lim_api.h @@ -101,6 +101,7 @@ typedef enum eMgmtFrmDropReason { eMGMT_DROP_NON_SCAN_MODE_FRAME, eMGMT_DROP_INVALID_SIZE, eMGMT_DROP_SPURIOUS_FRAME, + eMGMT_DROP_DUPLICATE_AUTH_FRAME, } tMgmtFrmDropReason; /** diff --git a/core/mac/src/pe/lim/lim_api.c b/core/mac/src/pe/lim/lim_api.c index 1ac14a200920..c6bf61be991c 100644 --- a/core/mac/src/pe/lim/lim_api.c +++ b/core/mac/src/pe/lim/lim_api.c @@ -46,6 +46,7 @@ #include "lim_ibss_peer_mgmt.h" #include "lim_admit_control.h" #include "lim_send_sme_rsp_messages.h" +#include "lim_security_utils.h" #include "wmm_apsd.h" #include "lim_trace.h" #include "lim_ft_defs.h" @@ -2375,6 +2376,25 @@ tMgmtFrmDropReason lim_is_pkt_candidate_for_drop(tpAniSirGlobal pMac, /* Drop the Probe Request in IBSS mode, if STA did not send out the last beacon */ /* In IBSS, the node which sends out the beacon, is supposed to respond to ProbeReq */ return eMGMT_DROP_NOT_LAST_IBSS_BCN; + } else if (subType == SIR_MAC_MGMT_AUTH) { + uint16_t curr_seq_num = 0; + struct tLimPreAuthNode *auth_node; + + pHdr = WMA_GET_RX_MAC_HEADER(pRxPacketInfo); + psessionEntry = pe_find_session_by_bssid(pMac, pHdr->bssId, + &sessionId); + if (!psessionEntry) + return eMGMT_DROP_NO_DROP; + + curr_seq_num = ((pHdr->seqControl.seqNumHi << 4) | + (pHdr->seqControl.seqNumLo)); + auth_node = lim_search_pre_auth_list(pMac, pHdr->sa); + if (auth_node && pHdr->fc.retry && + (auth_node->seq_num == curr_seq_num)) { + pe_err("auth frame, seq num: %d is already processed, drop it", + curr_seq_num); + return eMGMT_DROP_DUPLICATE_AUTH_FRAME; + } } return eMGMT_DROP_NO_DROP; -- cgit v1.2.3 From d7e9e2bbf3ce55f3e9825c2eae5d401b0fe87080 Mon Sep 17 00:00:00 2001 From: nshrivas Date: Wed, 5 Sep 2018 08:56:46 -0700 Subject: Release 5.1.1.65L Release 5.1.1.65L Change-Id: I69521c9bac9f8cf244d3143a18326255fbd6b695 CRs-Fixed: 774533 --- core/mac/inc/qwlan_version.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/mac/inc/qwlan_version.h b/core/mac/inc/qwlan_version.h index a9d746edac78..b12c40b8f4ca 100644 --- a/core/mac/inc/qwlan_version.h +++ b/core/mac/inc/qwlan_version.h @@ -32,9 +32,9 @@ #define QWLAN_VERSION_MAJOR 5 #define QWLAN_VERSION_MINOR 1 #define QWLAN_VERSION_PATCH 1 -#define QWLAN_VERSION_EXTRA "K" +#define QWLAN_VERSION_EXTRA "L" #define QWLAN_VERSION_BUILD 65 -#define QWLAN_VERSIONSTR "5.1.1.65K" +#define QWLAN_VERSIONSTR "5.1.1.65L" #endif /* QWLAN_VERSION_H */ -- cgit v1.2.3 From 37e677d442d47692e0f6017988167dbfdd7e82f1 Mon Sep 17 00:00:00 2001 From: gaurank kathpalia Date: Mon, 3 Sep 2018 18:46:15 +0530 Subject: qcacld-3.0: Select diff band channel in STA+SAP Currently the driver selects the first channel available in the PCL channel-list which could be STA channel itself, and it may happen that this STA channel is not valid for SAP bringup( SRD, DFS), so select only other band channels to form DBS connection. Fix is to check the different channel band from PCl channel-list and then bringup SAP on DBS if supported Change-Id: I2bf603a358432cca796603c4e9072e6295c0f57c CRs-Fixed: 2307933 --- core/cds/inc/cds_concurrency.h | 12 ++++++++---- core/cds/src/cds_concurrency.c | 16 ++++++++++------ 2 files changed, 18 insertions(+), 10 deletions(-) diff --git a/core/cds/inc/cds_concurrency.h b/core/cds/inc/cds_concurrency.h index 874a37faf93c..68c1c393de42 100644 --- a/core/cds/inc/cds_concurrency.h +++ b/core/cds/inc/cds_concurrency.h @@ -1018,15 +1018,19 @@ bool cds_is_safe_channel(uint8_t channel); */ bool cds_disallow_mcc(uint8_t channel); /** - * cds_get_alternate_channel_for_sap() - checks if any alternate channel can + * cds_get_diff_band_ch_for_sap() - checks if any alternate channel can * be obtained from PCL if current channel can't be allowed * - * This function checks if any alternate channel can be obtained - * from PCL or other means if current channel for SAP can't be allowed + * @channel: Present STA channel + * + * This API will get the PCl chanel list based upon the current connections + * and will return the different band channel to operate in DBS mode if enabled + * It may happen that STA+SAP SCC is not allowed, so we have to select a random + * preferred channel in different band than the STA channel. * * Return: New channel */ -uint8_t cds_get_alternate_channel_for_sap(void); +uint8_t cds_get_diff_band_ch_for_sap(uint8_t channel); /** * cds_set_cur_conc_system_pref() - set the value of cur_conc_system_pref diff --git a/core/cds/src/cds_concurrency.c b/core/cds/src/cds_concurrency.c index d419454db34e..275c14fd4eb0 100644 --- a/core/cds/src/cds_concurrency.c +++ b/core/cds/src/cds_concurrency.c @@ -10182,20 +10182,24 @@ QDF_STATUS cds_get_sap_mandatory_channel(uint32_t *chan) return QDF_STATUS_SUCCESS; } -uint8_t cds_get_alternate_channel_for_sap(void) +uint8_t cds_get_diff_band_ch_for_sap(uint8_t channel) { uint8_t pcl_channels[QDF_MAX_NUM_CHAN]; uint8_t pcl_weight[QDF_MAX_NUM_CHAN]; - uint8_t channel = 0; uint32_t pcl_len = 0; + uint8_t i = 0; if (QDF_STATUS_SUCCESS == cds_get_pcl(CDS_SAP_MODE, &pcl_channels[0], &pcl_len, pcl_weight, QDF_ARRAY_SIZE(pcl_weight))) { - channel = pcl_channels[0]; + for (i = 0; i < pcl_len; i++) { + if (CDS_IS_SAME_BAND_CHANNELS(channel, + pcl_channels[i])) + continue; + return pcl_channels[i]; + } } - - return channel; + return 0; } QDF_STATUS cds_valid_sap_conc_channel_check(uint8_t *con_ch, uint8_t sap_ch) @@ -10242,7 +10246,7 @@ QDF_STATUS cds_valid_sap_conc_channel_check(uint8_t *con_ch, uint8_t sap_ch) cds_chan_to_freq(channel))))) { if (wma_is_hw_dbs_capable()) { temp_channel = - cds_get_alternate_channel_for_sap(); + cds_get_diff_band_ch_for_sap(channel); cds_debug("temp_channel is %d", temp_channel); if (temp_channel) { channel = temp_channel; -- cgit v1.2.3 From 53101065a50608fa68fe473b9cb87f8c373f9619 Mon Sep 17 00:00:00 2001 From: Will Huang Date: Wed, 29 Aug 2018 15:43:24 +0800 Subject: qcacld-3.0: Fix possible roam_synch_frame_event handler OOB The length attributes for all message frames are retrieved from param_buf->fixed_param rather than using the correct TLV length values. This can result in multiple buffer overreads due to the fact that the param_buf->fixed_param lengths are never properly checked against the original TLV buffer. Add check param_buf->fixed_param lengths against the TLV buffer to prevent OOB happen. Change-Id: Ib6e2c847b9a2cc7bfe1233eb1f8214be75f21850 CRs-Fixed: 2304631 --- core/wma/src/wma_scan_roam.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/core/wma/src/wma_scan_roam.c b/core/wma/src/wma_scan_roam.c index 2d13ecee93e7..4900762cb858 100644 --- a/core/wma/src/wma_scan_roam.c +++ b/core/wma/src/wma_scan_roam.c @@ -3217,6 +3217,22 @@ int wma_roam_synch_frame_event_handler(void *handle, uint8_t *event, return status; } + if (synch_frame_event->bcn_probe_rsp_len > + param_buf->num_bcn_probe_rsp_frame || + synch_frame_event->reassoc_req_len > + param_buf->num_reassoc_req_frame || + synch_frame_event->reassoc_rsp_len > + param_buf->num_reassoc_rsp_frame) { + WMA_LOGE("fixed/actual len err: bcn:%d/%d req:%d/%d rsp:%d/%d", + synch_frame_event->bcn_probe_rsp_len, + param_buf->num_bcn_probe_rsp_frame, + synch_frame_event->reassoc_req_len, + param_buf->num_reassoc_req_frame, + synch_frame_event->reassoc_rsp_len, + param_buf->num_reassoc_rsp_frame); + return status; + } + vdev_id = synch_frame_event->vdev_id; iface = &wma->interfaces[vdev_id]; -- cgit v1.2.3 From 6d17e96ba942db2eb3b52eade031ff9ce2c889bd Mon Sep 17 00:00:00 2001 From: nshrivas Date: Wed, 5 Sep 2018 10:35:26 -0700 Subject: Release 5.1.1.65M Release 5.1.1.65M Change-Id: I10c5df526066a28e0528e01e2ca097cb000f3288 CRs-Fixed: 774533 --- core/mac/inc/qwlan_version.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/mac/inc/qwlan_version.h b/core/mac/inc/qwlan_version.h index b12c40b8f4ca..2419f2122841 100644 --- a/core/mac/inc/qwlan_version.h +++ b/core/mac/inc/qwlan_version.h @@ -32,9 +32,9 @@ #define QWLAN_VERSION_MAJOR 5 #define QWLAN_VERSION_MINOR 1 #define QWLAN_VERSION_PATCH 1 -#define QWLAN_VERSION_EXTRA "L" +#define QWLAN_VERSION_EXTRA "M" #define QWLAN_VERSION_BUILD 65 -#define QWLAN_VERSIONSTR "5.1.1.65L" +#define QWLAN_VERSIONSTR "5.1.1.65M" #endif /* QWLAN_VERSION_H */ -- cgit v1.2.3 From 83177b99f63712f47fb1d2c00143626bd6d3f2da Mon Sep 17 00:00:00 2001 From: Sourav Mohapatra Date: Mon, 16 Jul 2018 09:21:15 +0530 Subject: qcacld-3.0: Send roam preauth retry_count and no_ack_timeout ini to FW Create and send user configurable ini for max number of roam preauth retries and roam preauth no-ack timeout to the firmware. Change-Id: I66808b33f421f56cd7c007cdde1db19c8e7ca5f9 CRs-Fixed: 2279049 --- core/hdd/inc/wlan_hdd_cfg.h | 51 +++++++++++++++++++++++++++++++++++++++++ core/hdd/src/wlan_hdd_cfg.c | 26 ++++++++++++++++++++- core/mac/inc/sir_api.h | 2 ++ core/sme/inc/csr_api.h | 2 ++ core/sme/inc/csr_internal.h | 2 ++ core/sme/src/csr/csr_api_roam.c | 11 +++++++++ core/wma/src/wma_scan_roam.c | 8 +++++++ 7 files changed, 101 insertions(+), 1 deletion(-) diff --git a/core/hdd/inc/wlan_hdd_cfg.h b/core/hdd/inc/wlan_hdd_cfg.h index f111678f6831..27c7ac9a3b41 100644 --- a/core/hdd/inc/wlan_hdd_cfg.h +++ b/core/hdd/inc/wlan_hdd_cfg.h @@ -14952,6 +14952,55 @@ enum hw_filter_mode { #define CFG_MWS_COEX_5G_NR_PWR_LIMIT_MAX (0xFFFFFFFF) #define CFG_MWS_COEX_5G_NR_PWR_LIMIT_DEFAULT (0x00000000) #endif +/* + * + * roam_preauth_retry_count + * + * @Min: 1 + * @Max: 10 + * @Default: 5 + * + * The maximum number of software retries for preauth or + * reassoc made before picking up the next candidate for + * connection during roaming. + * + * Related: N/A + * + * Supported Features: Roaming + * + * Usage: Internal/External + * + * + */ +#define CFG_ROAM_PREAUTH_RETRY_COUNT_NAME "roam_preauth_retry_count" +#define CFG_ROAM_PREAUTH_RETRY_COUNT_MIN (1) +#define CFG_ROAM_PREAUTH_RETRY_COUNT_MAX (10) +#define CFG_ROAM_PREAUTH_RETRY_COUNT_DEFAULT (5) + +/* + * + * roam_preauth_no_ack_timeout + * + * @Min: 5 + * @Max: 50 + * @Default: 5 + * + * Time to wait (in ms) after sending an preauth or reassoc + * request which didn’t have an ack, before considering + * it as a failure and making another software retry. + * + * Related: N/A + * + * Supported Features: Roaming + * + * Usage: Internal/External + * + * + */ +#define CFG_ROAM_PREAUTH_NO_ACK_TIMEOUT_NAME "roam_preauth_no_ack_timeout" +#define CFG_ROAM_PREAUTH_NO_ACK_TIMEOUT_MIN (5) +#define CFG_ROAM_PREAUTH_NO_ACK_TIMEOUT_MAX (50) +#define CFG_ROAM_PREAUTH_NO_ACK_TIMEOUT_DEFAULT (5) /*--------------------------------------------------------------------------- Type declarations @@ -15889,6 +15938,8 @@ struct hdd_config { bool disable_channel; uint32_t enable_secondary_rate; bool roam_force_rssi_trigger; + uint32_t roam_preauth_retry_count; + uint32_t roam_preauth_no_ack_timeout; }; #define VAR_OFFSET(_Struct, _Var) (offsetof(_Struct, _Var)) diff --git a/core/hdd/src/wlan_hdd_cfg.c b/core/hdd/src/wlan_hdd_cfg.c index fecc873469b8..88cf959bf542 100644 --- a/core/hdd/src/wlan_hdd_cfg.c +++ b/core/hdd/src/wlan_hdd_cfg.c @@ -5646,6 +5646,21 @@ struct reg_table_entry g_registry_table[] = { CFG_MWS_COEX_5G_NR_PWR_LIMIT_MIN, CFG_MWS_COEX_5G_NR_PWR_LIMIT_MAX), #endif + REG_VARIABLE(CFG_ROAM_PREAUTH_RETRY_COUNT_NAME, + WLAN_PARAM_Integer, + struct hdd_config, roam_preauth_retry_count, + VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT, + CFG_ROAM_PREAUTH_RETRY_COUNT_DEFAULT, + CFG_ROAM_PREAUTH_RETRY_COUNT_MIN, + CFG_ROAM_PREAUTH_RETRY_COUNT_MAX), + + REG_VARIABLE(CFG_ROAM_PREAUTH_NO_ACK_TIMEOUT_NAME, + WLAN_PARAM_Integer, + struct hdd_config, roam_preauth_no_ack_timeout, + VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT, + CFG_ROAM_PREAUTH_NO_ACK_TIMEOUT_DEFAULT, + CFG_ROAM_PREAUTH_NO_ACK_TIMEOUT_MIN, + CFG_ROAM_PREAUTH_NO_ACK_TIMEOUT_MAX), }; /** @@ -7617,7 +7632,12 @@ void hdd_cfg_print(hdd_context_t *pHddCtx) CFG_ROAM_FORCE_RSSI_TRIGGER_NAME, pHddCtx->config->roam_force_rssi_trigger); hdd_cfg_print_mws_coex(pHddCtx); - + hdd_debug("Name = [%s] Value = [%u]", + CFG_ROAM_PREAUTH_RETRY_COUNT_NAME, + pHddCtx->config->roam_preauth_retry_count); + hdd_debug("Name = [%s] Value = [%u]", + CFG_ROAM_PREAUTH_NO_ACK_TIMEOUT_NAME, + pHddCtx->config->roam_preauth_no_ack_timeout); hdd_cfg_print_action_oui(pHddCtx); } @@ -10160,6 +10180,10 @@ QDF_STATUS hdd_set_sme_config(hdd_context_t *pHddCtx) pHddCtx->config->enable_ftopen; smeConfig->csrConfig.ho_delay_for_rx = pHddCtx->config->ho_delay_for_rx; + smeConfig->csrConfig.roam_preauth_no_ack_timeout = + pHddCtx->config->roam_preauth_no_ack_timeout; + smeConfig->csrConfig.roam_preauth_retry_count = + pHddCtx->config->roam_preauth_retry_count; smeConfig->csrConfig.min_delay_btw_roam_scans = pHddCtx->config->min_delay_btw_roam_scans; smeConfig->csrConfig.roam_trigger_reason_bitmask = diff --git a/core/mac/inc/sir_api.h b/core/mac/inc/sir_api.h index d95c8b44c27c..486425b10308 100644 --- a/core/mac/inc/sir_api.h +++ b/core/mac/inc/sir_api.h @@ -3726,6 +3726,8 @@ typedef struct sSirRoamOffloadScanReq { struct rsn_caps rsn_caps; struct wmi_11k_offload_params offload_11k_params; uint32_t ho_delay_for_rx; + uint32_t roam_preauth_retry_count; + uint32_t roam_preauth_no_ack_timeout; uint32_t min_delay_btw_roam_scans; uint32_t roam_trigger_reason_bitmask; bool roam_force_rssi_trigger; diff --git a/core/sme/inc/csr_api.h b/core/sme/inc/csr_api.h index af07c4bc6871..ebf87f4b1961 100644 --- a/core/sme/inc/csr_api.h +++ b/core/sme/inc/csr_api.h @@ -1307,6 +1307,8 @@ typedef struct tagCsrConfigParam { uint8_t max_amsdu_num; uint8_t nSelect5GHzMargin; uint32_t ho_delay_for_rx; + uint32_t roam_preauth_retry_count; + uint32_t roam_preauth_no_ack_timeout; uint32_t min_delay_btw_roam_scans; uint32_t roam_trigger_reason_bitmask; uint8_t isCoalesingInIBSSAllowed; diff --git a/core/sme/inc/csr_internal.h b/core/sme/inc/csr_internal.h index c73d7b0530f8..5cc359c01728 100644 --- a/core/sme/inc/csr_internal.h +++ b/core/sme/inc/csr_internal.h @@ -606,6 +606,8 @@ typedef struct tagCsrConfig { uint8_t max_amsdu_num; uint8_t nSelect5GHzMargin; uint32_t ho_delay_for_rx; + uint32_t roam_preauth_retry_count; + uint32_t roam_preauth_no_ack_timeout; uint32_t min_delay_btw_roam_scans; uint32_t roam_trigger_reason_bitmask; uint8_t isCoalesingInIBSSAllowed; diff --git a/core/sme/src/csr/csr_api_roam.c b/core/sme/src/csr/csr_api_roam.c index c80a4bf1f88f..799b7552f597 100644 --- a/core/sme/src/csr/csr_api_roam.c +++ b/core/sme/src/csr/csr_api_roam.c @@ -2867,6 +2867,10 @@ QDF_STATUS csr_change_default_config_param(tpAniSirGlobal pMac, pParam->nSelect5GHzMargin; pMac->roam.configParam.ho_delay_for_rx = pParam->ho_delay_for_rx; + pMac->roam.configParam.roam_preauth_retry_count = + pParam->roam_preauth_retry_count; + pMac->roam.configParam.roam_preauth_no_ack_timeout = + pParam->roam_preauth_no_ack_timeout; pMac->roam.configParam.min_delay_btw_roam_scans = pParam->min_delay_btw_roam_scans; pMac->roam.configParam.roam_trigger_reason_bitmask = @@ -3236,6 +3240,9 @@ QDF_STATUS csr_get_config_param(tpAniSirGlobal pMac, tCsrConfigParam *pParam) pParam->max_amsdu_num = cfg_params->max_amsdu_num; pParam->nSelect5GHzMargin = cfg_params->nSelect5GHzMargin; pParam->ho_delay_for_rx = cfg_params->ho_delay_for_rx; + pParam->roam_preauth_no_ack_timeout = + cfg_params->roam_preauth_no_ack_timeout; + pParam->roam_preauth_retry_count = cfg_params->roam_preauth_retry_count; pParam->min_delay_btw_roam_scans = cfg_params->min_delay_btw_roam_scans; pParam->roam_trigger_reason_bitmask = cfg_params->roam_trigger_reason_bitmask; @@ -19113,6 +19120,10 @@ csr_update_roam_scan_offload_request(tpAniSirGlobal mac_ctx, req_buf->RoamRssiCatGap = mac_ctx->roam.configParam.bCatRssiOffset; req_buf->Select5GHzMargin = mac_ctx->roam.configParam.nSelect5GHzMargin; req_buf->ho_delay_for_rx = mac_ctx->roam.configParam.ho_delay_for_rx; + req_buf->roam_preauth_retry_count = + mac_ctx->roam.configParam.roam_preauth_retry_count; + req_buf->roam_preauth_no_ack_timeout = + mac_ctx->roam.configParam.roam_preauth_no_ack_timeout; req_buf->min_delay_btw_roam_scans = mac_ctx->roam.configParam.min_delay_btw_roam_scans; req_buf->roam_trigger_reason_bitmask = diff --git a/core/wma/src/wma_scan_roam.c b/core/wma/src/wma_scan_roam.c index 4900762cb858..18f548a37028 100644 --- a/core/wma/src/wma_scan_roam.c +++ b/core/wma/src/wma_scan_roam.c @@ -968,6 +968,10 @@ QDF_STATUS wma_roam_scan_offload_mode(tp_wma_handle wma_handle, params->roam_offload_enabled = roam_req->RoamOffloadEnabled; params->roam_offload_params.ho_delay_for_rx = roam_req->ho_delay_for_rx; + params->roam_offload_params.roam_preauth_retry_count = + roam_req->roam_preauth_retry_count; + params->roam_offload_params.roam_preauth_no_ack_timeout = + roam_req->roam_preauth_no_ack_timeout; params->prefer_5ghz = roam_req->Prefer5GHz; params->roam_rssi_cat_gap = roam_req->RoamRssiCatGap; params->select_5ghz_margin = roam_req->Select5GHzMargin; @@ -1012,6 +1016,10 @@ QDF_STATUS wma_roam_scan_offload_mode(tp_wma_handle wma_handle, params->min_delay_btw_roam_scans, params->roam_trigger_reason_bitmask); + WMA_LOGD(FL("roam_preauth_retry_count: %d, roam_preauth_no_ack_timeout: %d"), + params->roam_offload_params.roam_preauth_retry_count, + params->roam_offload_params.roam_preauth_no_ack_timeout); + status = wmi_unified_roam_scan_offload_mode_cmd(wma_handle->wmi_handle, scan_cmd_fp, params); if (QDF_IS_STATUS_ERROR(status)) -- cgit v1.2.3 From 8fa957cc17b56b51d56525ef3bb33568f7125cee Mon Sep 17 00:00:00 2001 From: nshrivas Date: Wed, 5 Sep 2018 16:21:29 -0700 Subject: Release 5.1.1.65N Release 5.1.1.65N Change-Id: Ib442a1bd9397b5afcaa60a1049b3c93f8d9b07d3 CRs-Fixed: 774533 --- core/mac/inc/qwlan_version.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/mac/inc/qwlan_version.h b/core/mac/inc/qwlan_version.h index 2419f2122841..5f5af5019d8d 100644 --- a/core/mac/inc/qwlan_version.h +++ b/core/mac/inc/qwlan_version.h @@ -32,9 +32,9 @@ #define QWLAN_VERSION_MAJOR 5 #define QWLAN_VERSION_MINOR 1 #define QWLAN_VERSION_PATCH 1 -#define QWLAN_VERSION_EXTRA "M" +#define QWLAN_VERSION_EXTRA "N" #define QWLAN_VERSION_BUILD 65 -#define QWLAN_VERSIONSTR "5.1.1.65M" +#define QWLAN_VERSIONSTR "5.1.1.65N" #endif /* QWLAN_VERSION_H */ -- cgit v1.2.3 From dfe1a47671fac99a12c9a2a401d7222a416adbf9 Mon Sep 17 00:00:00 2001 From: Abhinav Kumar Date: Tue, 4 Sep 2018 11:45:53 +0530 Subject: qcacld-3.0: Possible mem leak in wma_roam_scan_offload_mode wma_roam_scan_offload_mode, allocates mem for params buffer to store roaming offload scan parameters locally from incoming roam req. In last it calls wmi_unified_roam_scan_offload_mode_cmd using param as an argument to set roam scan parameters to wmi structure and free the local param buffer in the successful case. But in case if driver unable to write wmi struct, wma_roam_scan_offload_mode returns error status to its caller without freeing locally allocated params mem buffer. This results in mem leak while unsuccessful roaming offload. Fix is to free locally allocated mem buff before the return in case of roaming offload failure. Change-Id: Ic73f0b3ec004c3dcc53076594c0b872a29fee633 CRs-Fixed: 2308506 --- core/wma/src/wma_scan_roam.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/wma/src/wma_scan_roam.c b/core/wma/src/wma_scan_roam.c index 18f548a37028..c695d71dcdd3 100644 --- a/core/wma/src/wma_scan_roam.c +++ b/core/wma/src/wma_scan_roam.c @@ -1022,11 +1022,11 @@ QDF_STATUS wma_roam_scan_offload_mode(tp_wma_handle wma_handle, status = wmi_unified_roam_scan_offload_mode_cmd(wma_handle->wmi_handle, scan_cmd_fp, params); + qdf_mem_free(params); if (QDF_IS_STATUS_ERROR(status)) return status; WMA_LOGD("%s: WMA --> WMI_ROAM_SCAN_MODE", __func__); - qdf_mem_free(params); return status; } -- cgit v1.2.3 From ecd54bdb6334f6f0f26dbce998661ec21014989d Mon Sep 17 00:00:00 2001 From: nshrivas Date: Thu, 6 Sep 2018 10:31:25 -0700 Subject: Release 5.1.1.65O Release 5.1.1.65O Change-Id: I78363a2fd1bc492f7e5521054dd4cac652e1f0c1 CRs-Fixed: 774533 --- core/mac/inc/qwlan_version.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/mac/inc/qwlan_version.h b/core/mac/inc/qwlan_version.h index 5f5af5019d8d..4beefbf99171 100644 --- a/core/mac/inc/qwlan_version.h +++ b/core/mac/inc/qwlan_version.h @@ -32,9 +32,9 @@ #define QWLAN_VERSION_MAJOR 5 #define QWLAN_VERSION_MINOR 1 #define QWLAN_VERSION_PATCH 1 -#define QWLAN_VERSION_EXTRA "N" +#define QWLAN_VERSION_EXTRA "O" #define QWLAN_VERSION_BUILD 65 -#define QWLAN_VERSIONSTR "5.1.1.65N" +#define QWLAN_VERSIONSTR "5.1.1.65O" #endif /* QWLAN_VERSION_H */ -- cgit v1.2.3 From f9262912843696f3bd6644e497f16aafdaa52ae5 Mon Sep 17 00:00:00 2001 From: Abhinav Kumar Date: Fri, 24 Aug 2018 18:59:24 +0530 Subject: qcacld-3.0: Update secondary channel params for SAP after SSR In case of recovery of SAP after SSR, driver is not updating params for secondary channel as per primary channel (Operation channel) for SAP. Update parameters for secondary channel as per primary channel before SAP start. Change-Id: I2da2eff62881fe4e65208be778618d0b9c05bf88 CRs-Fixed: 2292645 --- core/hdd/src/wlan_hdd_hostapd.c | 9 +++++++-- core/hdd/src/wlan_hdd_main.c | 3 +++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/core/hdd/src/wlan_hdd_hostapd.c b/core/hdd/src/wlan_hdd_hostapd.c index 849bd5be2d97..b8d2ff72750a 100644 --- a/core/hdd/src/wlan_hdd_hostapd.c +++ b/core/hdd/src/wlan_hdd_hostapd.c @@ -1657,6 +1657,7 @@ QDF_STATUS hdd_hostapd_sap_event_cb(tpSap_Event pSapEvent, hdd_station_info_t *stainfo; cds_context_type *cds_ctx; hdd_adapter_t *sta_adapter; + tsap_Config_t *sap_config; dev = (struct net_device *)usrDataForCallback; if (!dev) { @@ -1705,6 +1706,7 @@ QDF_STATUS hdd_hostapd_sap_event_cb(tpSap_Event pSapEvent, dfs_info.channel = pHddApCtx->operatingChannel; sme_get_country_code(pHddCtx->hHal, dfs_info.country_code, &cc_len); + sap_config = &pHostapdAdapter->sessionCtx.ap.sapConfig; switch (sapEvent) { case eSAP_START_BSS_EVENT: @@ -1718,13 +1720,16 @@ QDF_STATUS hdd_hostapd_sap_event_cb(tpSap_Event pSapEvent, pHostapdAdapter->sessionId = pSapEvent->sapevt.sapStartBssCompleteEvent.sessionId; - pHostapdAdapter->sessionCtx.ap.sapConfig.channel = + sap_config->channel = pSapEvent->sapevt.sapStartBssCompleteEvent. operatingChannel; - pHostapdAdapter->sessionCtx.ap.sapConfig.ch_params.ch_width = + sap_config->ch_params.ch_width = pSapEvent->sapevt.sapStartBssCompleteEvent.ch_width; + cds_set_channel_params(sap_config->channel, 0, + &sap_config->ch_params); + pHostapdState->qdf_status = pSapEvent->sapevt.sapStartBssCompleteEvent.status; diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c index 9791b741fa58..46269a9f4f73 100644 --- a/core/hdd/src/wlan_hdd_main.c +++ b/core/hdd/src/wlan_hdd_main.c @@ -12109,6 +12109,9 @@ void wlan_hdd_start_sap(hdd_adapter_t *ap_adapter, bool reinit) goto end; } + cds_set_channel_params(hdd_ap_ctx->sapConfig.channel, 0, + &hdd_ap_ctx->sapConfig.ch_params); + qdf_event_reset(&hostapd_state->qdf_event); if (wlansap_start_bss(hdd_ap_ctx->sapContext, hdd_hostapd_sap_event_cb, &hdd_ap_ctx->sapConfig, -- cgit v1.2.3 From 364ecc04d218a5508570951e2031d2a00c0f2749 Mon Sep 17 00:00:00 2001 From: Pragaspathi Thilagaraj Date: Thu, 30 Aug 2018 11:03:08 +0530 Subject: qcacld-3.0: Fix possible OOB in wma_pdev_div_info_evt_handler In the function wma_pdev_div_info_evt_handler, while handling WMI_PDEV_DIV_RSSI_ANTID_EVENTID event, the corresponding event handler wma_pdev_div_info_evt_handler is invoked. In the function wma_pdev_div_info_evt_handler, event_buf argument comes directly from firmware and event parameter is pulled from event buf. The event->num_chains_valid is used as the maximum bound on the array index of chain_rssi[] array which has a maximum limit of CHAIN_MAX_NUM(8). When event->num_chains_valid has a value greater than this maximum limit, OOB write could occur. Add check to validate the event->num_chains_valid against CHAIN_MAX_NUM(8) and return failure if it exceeds. Change-Id: I40f1aa8a7b4bcffef3cab588c78c700e88e24673 CRs-Fixed: 2304662 --- core/wma/src/wma_features.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/core/wma/src/wma_features.c b/core/wma/src/wma_features.c index bd6d0357581c..03ef1b1cec96 100644 --- a/core/wma/src/wma_features.c +++ b/core/wma/src/wma_features.c @@ -11388,21 +11388,25 @@ int wma_pdev_div_info_evt_handler(void *handle, u_int8_t *event_buf, return -EINVAL; } + if (event->num_chains_valid > CHAIN_MAX_NUM) { + WMA_LOGE(FL("Invalid num of chains")); + return -EINVAL; + } + WMI_MAC_ADDR_TO_CHAR_ARRAY(&event->macaddr, macaddr); WMA_LOGD(FL("macaddr: " MAC_ADDRESS_STR), MAC_ADDR_ARRAY(macaddr)); WMA_LOGD(FL("num_chains_valid: %d"), event->num_chains_valid); chain_rssi_result.num_chains_valid = event->num_chains_valid; - for (i = 0; i < CHAIN_MAX_NUM; i++) - WMA_LOGD(FL("chain_rssi: %d"), event->chain_rssi[i]); qdf_mem_copy(chain_rssi_result.chain_rssi, event->chain_rssi, sizeof(event->chain_rssi)); - for (i = 0; i < event->num_chains_valid; i++) + for (i = 0; i < event->num_chains_valid; i++) { + WMA_LOGD(FL("chain_rssi: %d, ant_id: %d"), + event->chain_rssi[i], event->ant_id[i]); chain_rssi_result.chain_rssi[i] += WMA_TGT_NOISE_FLOOR_DBM; + } - for (i = 0; i < CHAIN_MAX_NUM; i++) - WMA_LOGD(FL("ant_id: %d"), event->ant_id[i]); qdf_mem_copy(chain_rssi_result.ant_id, event->ant_id, sizeof(event->ant_id)); -- cgit v1.2.3 From f692b187ba440dc701a74f7feae5d848efc1da18 Mon Sep 17 00:00:00 2001 From: Dustin Brown Date: Mon, 30 Jul 2018 17:20:32 -0700 Subject: qcacld-3.0: Reduce logging for hdd netdev notifier Reduce error logs in __hdd_netdev_notifier_call which do not alway indicate an error. Change-Id: I7386cb26993877ed86802b60240cd04b85dd4e8b CRs-Fixed: 2287681 --- core/hdd/src/wlan_hdd_main.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c index 46269a9f4f73..cd4894c2127d 100644 --- a/core/hdd/src/wlan_hdd_main.c +++ b/core/hdd/src/wlan_hdd_main.c @@ -464,7 +464,7 @@ static int __hdd_netdev_notifier_call(struct notifier_block *nb, } if (!dev->ieee80211_ptr) { - hdd_err("ieee80211_ptr is NULL!!!"); + hdd_debug("ieee80211_ptr is NULL!!!"); return NOTIFY_DONE; } @@ -476,12 +476,19 @@ static int __hdd_netdev_notifier_call(struct notifier_block *nb, } if (hdd_ctx->driver_status == DRIVER_MODULES_CLOSED) { - hdd_err("%s: Driver module is closed", __func__); + hdd_debug("%s: Driver module is closed", __func__); return NOTIFY_DONE; } - if (cds_is_driver_recovering() || cds_is_driver_in_bad_state()) + if (cds_is_driver_recovering()) { + hdd_debug("Driver is recovering"); + return NOTIFY_DONE; + } + + if (cds_is_driver_in_bad_state()) { + hdd_debug("Driver is in failed recovery state"); return NOTIFY_DONE; + } hdd_debug("%s New Net Device State = %lu", dev->name, state); -- cgit v1.2.3 From f7777c0e1327c03fa41defb0cd7ef771b03267ac Mon Sep 17 00:00:00 2001 From: nshrivas Date: Thu, 6 Sep 2018 13:30:50 -0700 Subject: Release 5.1.1.65P Release 5.1.1.65P Change-Id: I4b04ba5586768d987c6b2b6e892c81bcdc58892a CRs-Fixed: 774533 --- core/mac/inc/qwlan_version.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/mac/inc/qwlan_version.h b/core/mac/inc/qwlan_version.h index 4beefbf99171..7646ffc48a22 100644 --- a/core/mac/inc/qwlan_version.h +++ b/core/mac/inc/qwlan_version.h @@ -32,9 +32,9 @@ #define QWLAN_VERSION_MAJOR 5 #define QWLAN_VERSION_MINOR 1 #define QWLAN_VERSION_PATCH 1 -#define QWLAN_VERSION_EXTRA "O" +#define QWLAN_VERSION_EXTRA "P" #define QWLAN_VERSION_BUILD 65 -#define QWLAN_VERSIONSTR "5.1.1.65O" +#define QWLAN_VERSIONSTR "5.1.1.65P" #endif /* QWLAN_VERSION_H */ -- cgit v1.2.3 From 1a5e4cb43279fa458437b764e0608a8160114f3d Mon Sep 17 00:00:00 2001 From: Dustin Brown Date: Tue, 14 Aug 2018 15:27:26 -0700 Subject: qcacld-3.0: Reduce excessive logging Reduce or removed several excessive log in order to avoid spamming dmesg. Change-Id: I818c8f88f66ad11a3c3bc5d5a12799e83c02e5ff CRs-Fixed: 2296680 --- core/cds/src/cds_api.c | 53 ++++++++++++------------------------ core/hdd/src/wlan_hdd_main.c | 3 +- core/hdd/src/wlan_hdd_napi.c | 2 +- core/sme/src/common/sme_power_save.c | 2 +- 4 files changed, 20 insertions(+), 40 deletions(-) diff --git a/core/cds/src/cds_api.c b/core/cds/src/cds_api.c index bc9595bf7795..83abc1a53a90 100644 --- a/core/cds/src/cds_api.c +++ b/core/cds/src/cds_api.c @@ -755,10 +755,11 @@ pktlog_disable: */ QDF_STATUS cds_enable(v_CONTEXT_t cds_context) { - QDF_STATUS qdf_status = QDF_STATUS_SUCCESS; + QDF_STATUS qdf_status; tSirRetStatus sirStatus = eSIR_SUCCESS; p_cds_contextType p_cds_context = (p_cds_contextType) cds_context; tHalMacStartParameters halStartParams; + int errno; /* We support only one instance for now ... */ if (gp_cds_context != p_cds_context) { @@ -767,67 +768,47 @@ QDF_STATUS cds_enable(v_CONTEXT_t cds_context) return QDF_STATUS_E_FAILURE; } - if ((p_cds_context->pWMAContext == NULL) || - (p_cds_context->pMACContext == NULL)) { - if (p_cds_context->pWMAContext == NULL) - QDF_TRACE(QDF_MODULE_ID_QDF, QDF_TRACE_LEVEL_ERROR, - "%s: WMA NULL context", __func__); - else - QDF_TRACE(QDF_MODULE_ID_QDF, QDF_TRACE_LEVEL_ERROR, - "%s: MAC NULL context", __func__); + if (!p_cds_context->pWMAContext) { + cds_err("WMA NULL context"); + return QDF_STATUS_E_FAILURE; + } + if (!p_cds_context->pMACContext) { + cds_err("MAC NULL context"); return QDF_STATUS_E_FAILURE; } /* Start the wma */ qdf_status = wma_start(p_cds_context); if (qdf_status != QDF_STATUS_SUCCESS) { - QDF_TRACE(QDF_MODULE_ID_QDF, QDF_TRACE_LEVEL_ERROR, - "%s: Failed to start wma", __func__); + cds_err("Failed to start wma; status:%d", qdf_status); return QDF_STATUS_E_FAILURE; } - QDF_TRACE(QDF_MODULE_ID_QDF, QDF_TRACE_LEVEL_INFO, - "%s: wma correctly started", __func__); /* Start the MAC */ - qdf_mem_zero(&halStartParams, - sizeof(tHalMacStartParameters)); + qdf_mem_zero(&halStartParams, sizeof(tHalMacStartParameters)); /* Start the MAC */ - sirStatus = - mac_start(p_cds_context->pMACContext, &halStartParams); + sirStatus = mac_start(p_cds_context->pMACContext, &halStartParams); if (eSIR_SUCCESS != sirStatus) { - QDF_TRACE(QDF_MODULE_ID_QDF, QDF_TRACE_LEVEL_FATAL, - "%s: Failed to start MAC", __func__); + cds_err("Failed to start MAC; status:%d", sirStatus); goto err_wma_stop; } - QDF_TRACE(QDF_MODULE_ID_QDF, QDF_TRACE_LEVEL_INFO, - "%s: MAC correctly started", __func__); - /* START SME */ qdf_status = sme_start(p_cds_context->pMACContext); - if (!QDF_IS_STATUS_SUCCESS(qdf_status)) { - QDF_TRACE(QDF_MODULE_ID_QDF, QDF_TRACE_LEVEL_FATAL, - "%s: Failed to start SME", __func__); + cds_err("Failed to start SME; status:%d", qdf_status); goto err_mac_stop; } - QDF_TRACE(QDF_MODULE_ID_QDF, QDF_TRACE_LEVEL_INFO, - "%s: SME correctly started", __func__); - - if (ol_txrx_pdev_attach_target - (p_cds_context->pdev_txrx_ctx)) { - QDF_TRACE(QDF_MODULE_ID_QDF, QDF_TRACE_LEVEL_FATAL, - "%s: Failed attach target", __func__); - goto err_sme_stop; + errno = ol_txrx_pdev_attach_target(p_cds_context->pdev_txrx_ctx); + if (errno) { + cds_err("Failed to attach pdev target; errno:%d", errno); + goto err_sme_stop; } - QDF_TRACE(QDF_MODULE_ID_QDF, QDF_TRACE_LEVEL_INFO, - "%s: CDS Start is successful!!", __func__); - return QDF_STATUS_SUCCESS; err_sme_stop: diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c index cd4894c2127d..82f1dec34a3a 100644 --- a/core/hdd/src/wlan_hdd_main.c +++ b/core/hdd/src/wlan_hdd_main.c @@ -10220,9 +10220,8 @@ int hdd_dbs_scan_selection_init(hdd_context_t *hdd_ctx) (CFG_DBS_SCAN_PARAM_PER_CLIENT * CFG_DBS_SCAN_CLIENTS_MAX)); - hdd_info("numentries %hu", numentries); if (!numentries) { - hdd_info("Donot send scan_selection_config"); + hdd_debug("Do not send scan_selection_config"); return 0; } diff --git a/core/hdd/src/wlan_hdd_napi.c b/core/hdd/src/wlan_hdd_napi.c index 0793cc785ff1..d358bd5a9b95 100644 --- a/core/hdd/src/wlan_hdd_napi.c +++ b/core/hdd/src/wlan_hdd_napi.c @@ -119,7 +119,7 @@ int hdd_napi_create(void) hdd_err("ERR(%d) creating NAPI instances", rc); } else { - hdd_info("napi instances were created. Map=0x%x", rc); + hdd_debug("napi instances were created. Map=0x%x", rc); hdd_ctx = cds_get_context(QDF_MODULE_ID_HDD); if (unlikely(NULL == hdd_ctx)) { QDF_ASSERT(0); diff --git a/core/sme/src/common/sme_power_save.c b/core/sme/src/common/sme_power_save.c index cbe51e5be8cf..a39a2de27e61 100644 --- a/core/sme/src/common/sme_power_save.c +++ b/core/sme/src/common/sme_power_save.c @@ -1057,7 +1057,7 @@ QDF_STATUS sme_ps_enable_auto_ps_timer(tHalHandle hal_ctx, return QDF_STATUS_SUCCESS; } - sme_info("Start auto_ps_timer for %d ms", timeout); + sme_debug("Start auto_ps_timer for %d ms", timeout); qdf_status = qdf_mc_timer_start(&ps_param->auto_ps_enable_timer, timeout); -- cgit v1.2.3 From f61fae2999ff85802c186038357e482a9b906077 Mon Sep 17 00:00:00 2001 From: nshrivas Date: Thu, 6 Sep 2018 15:58:53 -0700 Subject: Release 5.1.1.65Q Release 5.1.1.65Q Change-Id: I63792091907413352896c2126104aaeec51ec631 CRs-Fixed: 774533 --- core/mac/inc/qwlan_version.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/mac/inc/qwlan_version.h b/core/mac/inc/qwlan_version.h index 7646ffc48a22..d89cc9e40d5e 100644 --- a/core/mac/inc/qwlan_version.h +++ b/core/mac/inc/qwlan_version.h @@ -32,9 +32,9 @@ #define QWLAN_VERSION_MAJOR 5 #define QWLAN_VERSION_MINOR 1 #define QWLAN_VERSION_PATCH 1 -#define QWLAN_VERSION_EXTRA "P" +#define QWLAN_VERSION_EXTRA "Q" #define QWLAN_VERSION_BUILD 65 -#define QWLAN_VERSIONSTR "5.1.1.65P" +#define QWLAN_VERSIONSTR "5.1.1.65Q" #endif /* QWLAN_VERSION_H */ -- cgit v1.2.3 From aa779f8115987c66a8737b7e5f177694231580f0 Mon Sep 17 00:00:00 2001 From: Krunal Soni Date: Tue, 21 Aug 2018 14:54:11 -0700 Subject: qcacld-3.0: Remove and Replace WMA_BCN_BUF_MAX_SIZE with LIM macro Max beacon size in WMA layer is pointed by "WMA_BCN_BUF_MAX_SIZE" which is currently set to 2500 bytes and Max beacon size in PE layer is pointed by "SIR_MAX_BEACON_SIZE" which is currently set to 512 bytes. when wma_store_bcn_tmpl() gets called, this API tries to copy beacon template from LIM to WMA which can't exceed 512 bytes. To fix the issue, use SIR_MAX_BEACON_SIZE instead of WMA_BCN_BUF_MAX_SIZE CRs-Fixed: 2299791 Change-Id: I97b4c19611ec74c0702901c380bd32e866d26c8b --- core/wma/inc/wma.h | 2 +- core/wma/src/wma_dev_if.c | 2 +- core/wma/src/wma_mgmt.c | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/core/wma/inc/wma.h b/core/wma/inc/wma.h index 196768f433cb..12bf424ba43a 100644 --- a/core/wma/inc/wma.h +++ b/core/wma/inc/wma.h @@ -266,7 +266,7 @@ enum ds_mode { #define WMA_CHAN_START_RESP 0 #define WMA_CHAN_END_RESP 1 -#define WMA_BCN_BUF_MAX_SIZE 2500 +#define WMA_BCN_BUF_MAX_SIZE 512 #define WMA_NOA_IE_SIZE(num_desc) (2 + (13 * (num_desc))) #define WMA_MAX_NOA_DESCRIPTORS 4 diff --git a/core/wma/src/wma_dev_if.c b/core/wma/src/wma_dev_if.c index e4482d8cf0a1..ea5775030382 100644 --- a/core/wma/src/wma_dev_if.c +++ b/core/wma/src/wma_dev_if.c @@ -770,7 +770,7 @@ static void wma_vdev_start_rsp(tp_wma_handle wma, add_bss->status = QDF_STATUS_E_NOMEM; goto send_fail_resp; } - bcn->buf = qdf_nbuf_alloc(NULL, WMA_BCN_BUF_MAX_SIZE, 0, + bcn->buf = qdf_nbuf_alloc(NULL, SIR_MAX_BEACON_SIZE, 0, sizeof(uint32_t), 0); if (!bcn->buf) { WMA_LOGE("%s: No memory allocated for beacon buffer", diff --git a/core/wma/src/wma_mgmt.c b/core/wma/src/wma_mgmt.c index 64fec8cb3412..156ef068750a 100644 --- a/core/wma/src/wma_mgmt.c +++ b/core/wma/src/wma_mgmt.c @@ -2423,9 +2423,9 @@ static QDF_STATUS wma_store_bcn_tmpl(tp_wma_handle wma, uint8_t vdev_id, } len = *(u32 *) &bcn_info->beacon[0]; - if (len > WMA_BCN_BUF_MAX_SIZE) { + if (len > SIR_MAX_BEACON_SIZE) { WMA_LOGE("%s: Received beacon len %d exceeding max limit %d", - __func__, len, WMA_BCN_BUF_MAX_SIZE); + __func__, len, SIR_MAX_BEACON_SIZE); return QDF_STATUS_E_INVAL; } WMA_LOGD("%s: Storing received beacon template buf to local buffer", -- cgit v1.2.3 From df527b439a509dc2054d892c2b2291b4af178390 Mon Sep 17 00:00:00 2001 From: nshrivas Date: Thu, 6 Sep 2018 17:34:48 -0700 Subject: Release 5.1.1.65R Release 5.1.1.65R Change-Id: I448d5bef56ad4e13f2b4ea09881163d627975838 CRs-Fixed: 774533 --- core/mac/inc/qwlan_version.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/mac/inc/qwlan_version.h b/core/mac/inc/qwlan_version.h index d89cc9e40d5e..71a8546cf31e 100644 --- a/core/mac/inc/qwlan_version.h +++ b/core/mac/inc/qwlan_version.h @@ -32,9 +32,9 @@ #define QWLAN_VERSION_MAJOR 5 #define QWLAN_VERSION_MINOR 1 #define QWLAN_VERSION_PATCH 1 -#define QWLAN_VERSION_EXTRA "Q" +#define QWLAN_VERSION_EXTRA "R" #define QWLAN_VERSION_BUILD 65 -#define QWLAN_VERSIONSTR "5.1.1.65Q" +#define QWLAN_VERSIONSTR "5.1.1.65R" #endif /* QWLAN_VERSION_H */ -- cgit v1.2.3 From abf597581b6a147021b71adfdb9336bc6f830918 Mon Sep 17 00:00:00 2001 From: hqu Date: Tue, 14 Aug 2018 17:22:41 +0800 Subject: qcacld-3.0: Add process for userspace does not set avoid channel list In platforms that support dual wifi instances, userspace doesn't set avoid frequency channel list with command QCA_NL80211_VENDOR_SUBCMD_AVOID_FREQUENCY to trigger restart sap process, but current handling is always to check avoid channel list which is set by userspace so it will be failed for lte coex case. Fix is to add process for userspace doesn't set avoid channel list. Change-Id: Icc3356191411791f4cec9fd89e4490359cf6f1fc CRs-Fixed: 2294109 --- core/hdd/src/wlan_hdd_cfg80211.c | 26 +++++++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-) diff --git a/core/hdd/src/wlan_hdd_cfg80211.c b/core/hdd/src/wlan_hdd_cfg80211.c index a4909e65775a..d0ad19e1f54d 100644 --- a/core/hdd/src/wlan_hdd_cfg80211.c +++ b/core/hdd/src/wlan_hdd_cfg80211.c @@ -9309,10 +9309,12 @@ __wlan_hdd_cfg80211_avoid_freq(struct wiphy *wiphy, int ret; qdf_device_t qdf_ctx = cds_get_context(QDF_MODULE_ID_QDF_DEVICE); uint16_t *local_unsafe_list; + uint16_t unsafe_channel_count; uint16_t unsafe_channel_index, local_unsafe_list_count; tHddAvoidFreqList *channel_list; enum tQDF_GLOBAL_CON_MODE curr_mode; uint8_t num_args = 0; + bool user_set_avoid_channel = true; ENTER_DEV(wdev->netdev); @@ -9330,6 +9332,11 @@ __wlan_hdd_cfg80211_avoid_freq(struct wiphy *wiphy, ret = wlan_hdd_validate_context(hdd_ctx); if (0 != ret) return ret; + if (!data && data_len == 0) { + hdd_debug("Userspace doesn't set avoid frequency channel list"); + user_set_avoid_channel = false; + goto process_unsafe_channel; + } if (!data || data_len < (sizeof(channel_list->avoidFreqRangeCount) + sizeof(tHddAvoidFreqRange))) { hdd_err("Avoid frequency channel list empty"); @@ -9354,6 +9361,7 @@ __wlan_hdd_cfg80211_avoid_freq(struct wiphy *wiphy, return -EINVAL; } +process_unsafe_channel: ret = hdd_clone_local_unsafe_chan(hdd_ctx, &local_unsafe_list, &local_unsafe_list_count); @@ -9363,16 +9371,24 @@ __wlan_hdd_cfg80211_avoid_freq(struct wiphy *wiphy, pld_get_wlan_unsafe_channel(qdf_ctx->dev, hdd_ctx->unsafe_channel_list, &(hdd_ctx->unsafe_channel_count), sizeof(hdd_ctx->unsafe_channel_list)); - - hdd_ctx->unsafe_channel_count = hdd_validate_avoid_freq_chanlist( + if (user_set_avoid_channel) { + hdd_ctx->unsafe_channel_count = + hdd_validate_avoid_freq_chanlist( hdd_ctx, channel_list); + unsafe_channel_count = hdd_ctx->unsafe_channel_count; - pld_set_wlan_unsafe_channel(qdf_ctx->dev, hdd_ctx->unsafe_channel_list, - hdd_ctx->unsafe_channel_count); + pld_set_wlan_unsafe_channel(qdf_ctx->dev, + hdd_ctx->unsafe_channel_list, + hdd_ctx->unsafe_channel_count); + } else { + unsafe_channel_count = QDF_MIN( + (uint16_t)hdd_ctx->unsafe_channel_count, + (uint16_t)NUM_CHANNELS); + } for (unsafe_channel_index = 0; - unsafe_channel_index < hdd_ctx->unsafe_channel_count; + unsafe_channel_index < unsafe_channel_count; unsafe_channel_index++) { hdd_debug("Channel %d is not safe", hdd_ctx->unsafe_channel_list[unsafe_channel_index]); -- cgit v1.2.3 From 568724ff1b5e84e31ba91dfa698f3a0267c81b6a Mon Sep 17 00:00:00 2001 From: nshrivas Date: Thu, 6 Sep 2018 23:26:17 -0700 Subject: Release 5.1.1.65S Release 5.1.1.65S Change-Id: I37097e4e61708ab5bbe47426a12e582bc4b805a9 CRs-Fixed: 774533 --- core/mac/inc/qwlan_version.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/mac/inc/qwlan_version.h b/core/mac/inc/qwlan_version.h index 71a8546cf31e..d0c7490da651 100644 --- a/core/mac/inc/qwlan_version.h +++ b/core/mac/inc/qwlan_version.h @@ -32,9 +32,9 @@ #define QWLAN_VERSION_MAJOR 5 #define QWLAN_VERSION_MINOR 1 #define QWLAN_VERSION_PATCH 1 -#define QWLAN_VERSION_EXTRA "R" +#define QWLAN_VERSION_EXTRA "S" #define QWLAN_VERSION_BUILD 65 -#define QWLAN_VERSIONSTR "5.1.1.65R" +#define QWLAN_VERSIONSTR "5.1.1.65S" #endif /* QWLAN_VERSION_H */ -- cgit v1.2.3 From ea424b0db3ba5f73e4a08c5de3559031df2f309f Mon Sep 17 00:00:00 2001 From: Srinivas Girigowda Date: Thu, 6 Sep 2018 17:53:52 -0700 Subject: qcacld-3.0: Remove obsolete struct sSirSmeNeighborBssInd Remove obsolete struct sSirSmeNeighborBssInd and lim_send_sme_neighbor_bss_ind. Change-Id: Id106f4ec106ba8debd5b7d6dcbda01407c2b7cf4 CRs-Fixed: 2310703 --- core/mac/inc/sir_api.h | 10 ---- core/mac/src/pe/lim/lim_send_sme_rsp_messages.c | 79 ------------------------- core/mac/src/pe/lim/lim_send_sme_rsp_messages.h | 1 - 3 files changed, 90 deletions(-) diff --git a/core/mac/inc/sir_api.h b/core/mac/inc/sir_api.h index 486425b10308..6d29ed76f973 100644 --- a/core/mac/inc/sir_api.h +++ b/core/mac/inc/sir_api.h @@ -1867,16 +1867,6 @@ typedef struct sSirSmeSwitchChannelInd { struct qdf_mac_addr bssid; /* BSSID */ } tSirSmeSwitchChannelInd, *tpSirSmeSwitchChannelInd; -/* / Definition for Neighbor BSS indication */ -/* / MAC ---> */ -/* / MAC reports this each time a new I/BSS is detected */ -typedef struct sSirSmeNeighborBssInd { - uint16_t messageType; /* eWNI_SME_NEIGHBOR_BSS_IND */ - uint16_t length; - uint8_t sessionId; - tSirBssDescription bssDescription[1]; -} tSirSmeNeighborBssInd, *tpSirSmeNeighborBssInd; - /* / Definition for MIC failure indication */ /* / MAC ---> */ /* / MAC reports this each time a MIC failure occures on Rx TKIP packet */ diff --git a/core/mac/src/pe/lim/lim_send_sme_rsp_messages.c b/core/mac/src/pe/lim/lim_send_sme_rsp_messages.c index 933972ad11c5..d884e66494c3 100644 --- a/core/mac/src/pe/lim/lim_send_sme_rsp_messages.c +++ b/core/mac/src/pe/lim/lim_send_sme_rsp_messages.c @@ -1668,85 +1668,6 @@ lim_send_sme_set_context_rsp(tpAniSirGlobal pMac, pMac->lim.sme_msg_callback(pMac, &msg); } /*** end lim_send_sme_set_context_rsp() ***/ -/** - * lim_send_sme_neighbor_bss_ind() - * - ***FUNCTION: - * This function is called by lim_lookup_nadd_hash_entry() to send - * eWNI_SME_NEIGHBOR_BSS_IND message to host - * - ***PARAMS: - * - ***LOGIC: - * - ***ASSUMPTIONS: - * NA - * - ***NOTE: - * This function is used for sending eWNI_SME_NEIGHBOR_BSS_IND to - * host upon detecting new BSS during background scanning if CFG - * option is enabled for sending such indication - * - * @param pMac - Pointer to Global MAC structure - * @return None - */ - -void -lim_send_sme_neighbor_bss_ind(tpAniSirGlobal pMac, tLimScanResultNode *pBssDescr) -{ - tSirMsgQ msgQ; - uint32_t val; - tSirSmeNeighborBssInd *pNewBssInd; - - if ((pMac->lim.gLimSmeState != eLIM_SME_LINK_EST_WT_SCAN_STATE) || - ((pMac->lim.gLimSmeState == eLIM_SME_LINK_EST_WT_SCAN_STATE) && - pMac->lim.gLimRspReqd)) { - /* LIM is not in background scan state OR */ - /* current scan is initiated by HDD. */ - /* No need to send new BSS indication to HDD */ - return; - } - - if (wlan_cfg_get_int(pMac, WNI_CFG_NEW_BSS_FOUND_IND, &val) != - eSIR_SUCCESS) { - pe_err("could not get NEIGHBOR_BSS_IND from CFG"); - return; - } - - if (val == 0) - return; - - /** - * Need to indicate new BSSs found during - * background scanning to host. - * Allocate buffer for sending indication. - * Length of buffer is length of BSS description - * and length of header itself - */ - val = pBssDescr->bssDescription.length + sizeof(uint16_t) + - sizeof(uint32_t) + sizeof(uint8_t); - pNewBssInd = qdf_mem_malloc(val); - if (NULL == pNewBssInd) { - /* Log error */ - pe_err("call to AllocateMemory failed for eWNI_SME_NEIGHBOR_BSS_IND"); - return; - } - - pNewBssInd->messageType = eWNI_SME_NEIGHBOR_BSS_IND; - pNewBssInd->length = (uint16_t) val; - pNewBssInd->sessionId = 0; - - qdf_mem_copy((uint8_t *) pNewBssInd->bssDescription, - (uint8_t *) &pBssDescr->bssDescription, - pBssDescr->bssDescription.length + sizeof(uint16_t)); - - msgQ.type = eWNI_SME_NEIGHBOR_BSS_IND; - msgQ.bodyptr = pNewBssInd; - msgQ.bodyval = 0; - MTRACE(mac_trace(pMac, TRACE_CODE_TX_SME_MSG, NO_SESSION, msgQ.type)); - lim_sys_process_mmh_msg_api(pMac, &msgQ, ePROT); -} /*** end lim_send_sme_neighbor_bss_ind() ***/ - /** ----------------------------------------------------------------- \brief lim_send_sme_addts_rsp() - sends SME ADDTS RSP \ This function sends a eWNI_SME_ADDTS_RSP to SME. diff --git a/core/mac/src/pe/lim/lim_send_sme_rsp_messages.h b/core/mac/src/pe/lim/lim_send_sme_rsp_messages.h index 4082040cc54f..1c00c2a14d39 100644 --- a/core/mac/src/pe/lim/lim_send_sme_rsp_messages.h +++ b/core/mac/src/pe/lim/lim_send_sme_rsp_messages.h @@ -77,7 +77,6 @@ void lim_send_sme_wm_status_change_ntf(tpAniSirGlobal, tSirSmeStatusChangeCode, uint32_t *, uint16_t, uint8_t); void lim_send_sme_set_context_rsp(tpAniSirGlobal, struct qdf_mac_addr, uint16_t, tSirResultCodes, tpPESession, uint8_t, uint16_t); -void lim_send_sme_neighbor_bss_ind(tpAniSirGlobal, tLimScanResultNode *); void lim_handle_delete_bss_rsp(tpAniSirGlobal pMac, tpSirMsgQ MsgQ); void lim_handle_csa_offload_msg(tpAniSirGlobal mac_ctx, tpSirMsgQ msg); -- cgit v1.2.3 From 96f077ffcca8cf108ab3be007d5601f47d91420b Mon Sep 17 00:00:00 2001 From: nshrivas Date: Fri, 7 Sep 2018 02:00:55 -0700 Subject: Release 5.1.1.65T Release 5.1.1.65T Change-Id: I970793b923e1d5f705bc3521cd957885793dcb21 CRs-Fixed: 774533 --- core/mac/inc/qwlan_version.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/mac/inc/qwlan_version.h b/core/mac/inc/qwlan_version.h index d0c7490da651..d51e0753d679 100644 --- a/core/mac/inc/qwlan_version.h +++ b/core/mac/inc/qwlan_version.h @@ -32,9 +32,9 @@ #define QWLAN_VERSION_MAJOR 5 #define QWLAN_VERSION_MINOR 1 #define QWLAN_VERSION_PATCH 1 -#define QWLAN_VERSION_EXTRA "S" +#define QWLAN_VERSION_EXTRA "T" #define QWLAN_VERSION_BUILD 65 -#define QWLAN_VERSIONSTR "5.1.1.65S" +#define QWLAN_VERSIONSTR "5.1.1.65T" #endif /* QWLAN_VERSION_H */ -- cgit v1.2.3 From 4b6d18d4d4117caa121f0e85888045676aeb6b4e Mon Sep 17 00:00:00 2001 From: Srinivas Girigowda Date: Fri, 7 Sep 2018 11:23:39 -0700 Subject: qcacld-3.0: Remove obsolete eWNI_SME_NEIGHBOR_BSS_IND Remove obsolete eWNI_SME_NEIGHBOR_BSS_IND. Change-Id: I681e7094cc2f6f672fe97ccaa2f41cd85b98ab46 CRs-Fixed: 2310703 --- core/mac/inc/wni_api.h | 1 - core/mac/src/pe/lim/lim_utils.c | 2 -- core/mac/src/sys/legacy/src/utils/src/mac_trace.c | 1 - 3 files changed, 4 deletions(-) diff --git a/core/mac/inc/wni_api.h b/core/mac/inc/wni_api.h index 7177c5b1ea2d..42769a276fe6 100644 --- a/core/mac/inc/wni_api.h +++ b/core/mac/inc/wni_api.h @@ -72,7 +72,6 @@ enum eWniMsgTypes { eWNI_SME_SWITCH_CHL_IND, eWNI_SME_STOP_BSS_REQ, eWNI_SME_STOP_BSS_RSP, - eWNI_SME_NEIGHBOR_BSS_IND, eWNI_SME_DEAUTH_CNF, eWNI_SME_MIC_FAILURE_IND, eWNI_SME_ADDTS_REQ, diff --git a/core/mac/src/pe/lim/lim_utils.c b/core/mac/src/pe/lim/lim_utils.c index a5e9b3f8b947..391d91837c2a 100644 --- a/core/mac/src/pe/lim/lim_utils.c +++ b/core/mac/src/pe/lim/lim_utils.c @@ -312,8 +312,6 @@ char *lim_msg_str(uint32_t msgType) return "eWNI_SME_STOP_BSS_REQ"; case eWNI_SME_STOP_BSS_RSP: return "eWNI_SME_STOP_BSS_RSP"; - case eWNI_SME_NEIGHBOR_BSS_IND: - return "eWNI_SME_NEIGHBOR_BSS_IND"; case eWNI_SME_DEAUTH_CNF: return "eWNI_SME_DEAUTH_CNF"; case eWNI_SME_ADDTS_REQ: diff --git a/core/mac/src/sys/legacy/src/utils/src/mac_trace.c b/core/mac/src/sys/legacy/src/utils/src/mac_trace.c index 487e1db0f58a..c2ec4b77982a 100644 --- a/core/mac/src/sys/legacy/src/utils/src/mac_trace.c +++ b/core/mac/src/sys/legacy/src/utils/src/mac_trace.c @@ -248,7 +248,6 @@ uint8_t *mac_trace_get_sme_msg_string(uint16_t sme_msg) CASE_RETURN_STRING(eWNI_SME_SWITCH_CHL_IND); CASE_RETURN_STRING(eWNI_SME_STOP_BSS_REQ); CASE_RETURN_STRING(eWNI_SME_STOP_BSS_RSP); - CASE_RETURN_STRING(eWNI_SME_NEIGHBOR_BSS_IND); CASE_RETURN_STRING(eWNI_SME_DEAUTH_CNF); CASE_RETURN_STRING(eWNI_SME_MIC_FAILURE_IND); CASE_RETURN_STRING(eWNI_SME_ADDTS_REQ); -- cgit v1.2.3 From 747f72743f063729c196a6d93acf2359be4fb6e3 Mon Sep 17 00:00:00 2001 From: nshrivas Date: Fri, 7 Sep 2018 17:52:47 -0700 Subject: Release 5.1.1.65U Release 5.1.1.65U Change-Id: I8b3ceac0f646ba08260c23f7e44b159115cffd4a CRs-Fixed: 774533 --- core/mac/inc/qwlan_version.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/mac/inc/qwlan_version.h b/core/mac/inc/qwlan_version.h index d51e0753d679..015209df489e 100644 --- a/core/mac/inc/qwlan_version.h +++ b/core/mac/inc/qwlan_version.h @@ -32,9 +32,9 @@ #define QWLAN_VERSION_MAJOR 5 #define QWLAN_VERSION_MINOR 1 #define QWLAN_VERSION_PATCH 1 -#define QWLAN_VERSION_EXTRA "T" +#define QWLAN_VERSION_EXTRA "U" #define QWLAN_VERSION_BUILD 65 -#define QWLAN_VERSIONSTR "5.1.1.65T" +#define QWLAN_VERSIONSTR "5.1.1.65U" #endif /* QWLAN_VERSION_H */ -- cgit v1.2.3 From e15a0578fd17c34f5bfb308f200b5a232a336d35 Mon Sep 17 00:00:00 2001 From: Liangwei Dong Date: Fri, 31 Aug 2018 03:32:25 -0400 Subject: qcacld-3.0: allow STA SAP SCC on DFS If sta_sap_scc_on_dfs_chan = 1, we allow the SAP on STA's DFS chan. Allow this for DBS chip as well. Change-Id: I115984c0e659ca00f244d7b477daf4ccb3f2ccd2 CRs-Fixed: 2306801 --- core/cds/src/cds_concurrency.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/core/cds/src/cds_concurrency.c b/core/cds/src/cds_concurrency.c index 275c14fd4eb0..5b997b87c918 100644 --- a/core/cds/src/cds_concurrency.c +++ b/core/cds/src/cds_concurrency.c @@ -10244,6 +10244,12 @@ QDF_STATUS cds_valid_sap_conc_channel_check(uint8_t *con_ch, uint8_t sap_ch) (!(hdd_ctx->config->etsi_srd_chan_in_master_mode) && (cds_is_etsi13_regdmn_srd_chan( cds_chan_to_freq(channel))))) { + if (CDS_IS_DFS_CH(channel) && + sta_sap_scc_on_dfs_chan) { + cds_debug("STA, SAP SCC is allowed on DFS chan %u", + channel); + goto update_chan; + } if (wma_is_hw_dbs_capable()) { temp_channel = cds_get_diff_band_ch_for_sap(channel); @@ -10262,13 +10268,6 @@ QDF_STATUS cds_valid_sap_conc_channel_check(uint8_t *con_ch, uint8_t sap_ch) return QDF_STATUS_E_FAILURE; } } else { - if (CDS_IS_DFS_CH(channel) && - sta_sap_scc_on_dfs_chan) { - cds_debug("STA, SAP SCC is allowed on DFS chan %u", - channel); - goto update_chan; - } - cds_warn("Can't have concurrency on %d", channel); return QDF_STATUS_E_FAILURE; -- cgit v1.2.3 From d1f4b99c7c7d58672eeb8bb18a9073942f1b2cfa Mon Sep 17 00:00:00 2001 From: nshrivas Date: Mon, 10 Sep 2018 06:05:53 -0700 Subject: Release 5.1.1.65V Release 5.1.1.65V Change-Id: I227652e3397e478a6440c65f49e185be7525d050 CRs-Fixed: 774533 --- core/mac/inc/qwlan_version.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/mac/inc/qwlan_version.h b/core/mac/inc/qwlan_version.h index 015209df489e..2ba8ec1c7670 100644 --- a/core/mac/inc/qwlan_version.h +++ b/core/mac/inc/qwlan_version.h @@ -32,9 +32,9 @@ #define QWLAN_VERSION_MAJOR 5 #define QWLAN_VERSION_MINOR 1 #define QWLAN_VERSION_PATCH 1 -#define QWLAN_VERSION_EXTRA "U" +#define QWLAN_VERSION_EXTRA "V" #define QWLAN_VERSION_BUILD 65 -#define QWLAN_VERSIONSTR "5.1.1.65U" +#define QWLAN_VERSIONSTR "5.1.1.65V" #endif /* QWLAN_VERSION_H */ -- cgit v1.2.3 From 82c3001117cd5f219c5dd496c51c433fd8fc109a Mon Sep 17 00:00:00 2001 From: Dundi Raviteja Date: Tue, 14 Aug 2018 17:46:30 +0530 Subject: qcacld-3.0: Add ini params for three antenna BTC mode Add below ini parameters for three antenna BTC mode and send them to firmware using WMI command WMI_COEX_CONFIG_CMDID. 1. gSetBTCMode 2. gSetAntennaIsolation 3. gSetMaxTxPowerForBTC 4. gSetWlanLowRssiThreshold 5. gSetBtLowRssiThreshold 6. gSetBtInterferenceLowLL 7. gSetBtInterferenceLowUL 8. gSetBtInterferenceMediumLL 9. gSetBtInterferenceMediumUL 10. gSetBtInterferenceHighLL 11. gSetBtInterferenceHighUL Change-Id: I69030b6e80ee99912e2f3baced883894d18db0b6 CRs-Fixed: 2298652 --- core/hdd/inc/wlan_hdd_cfg.h | 191 ++++++++++++++++++++++++++++++++++++++++++ core/hdd/src/wlan_hdd_cfg.c | 129 ++++++++++++++++++++++++++++ core/hdd/src/wlan_hdd_main.c | 102 ++++++++++++++++++++-- core/sme/inc/sme_api.h | 8 ++ core/sme/src/common/sme_api.c | 12 +++ core/wma/inc/wma_api.h | 12 +++ core/wma/src/wma_features.c | 20 +++++ 7 files changed, 469 insertions(+), 5 deletions(-) diff --git a/core/hdd/inc/wlan_hdd_cfg.h b/core/hdd/inc/wlan_hdd_cfg.h index 27c7ac9a3b41..2c9eb8082c06 100644 --- a/core/hdd/inc/wlan_hdd_cfg.h +++ b/core/hdd/inc/wlan_hdd_cfg.h @@ -14782,6 +14782,186 @@ enum hw_filter_mode { #define CFG_ENABLE_DISABLE_CHANNEL_MAX (1) #define CFG_ENABLE_DISABLE_CHANNEL_DEFAULT (0) +/* + * + * gSetBTCMode - Config BTC mode + * @Min: 0 + * @Max: 2 + * @Default: 0 + * + * 0 - TDD + * 1 - FDD + * 2 - Hybrid + * + * Usage: External + * + * + */ +#define CFG_SET_BTC_MODE_NAME "gSetBTCMode" +#define CFG_SET_BTC_MODE_MIN (0) +#define CFG_SET_BTC_MODE_MAX (2) +#define CFG_SET_BTC_MODE_DEFAULT (0) + +/* + * + * gSetAntennaIsolation - Set Antenna Isolation + * @Min: 0 + * @Max: 255 + * @Default: 25 + * + * Usage: External + * + * + */ +#define CFG_SET_ANTENNA_ISOLATION_NAME "gSetAntennaIsolation" +#define CFG_SET_ANTENNA_ISOLATION_MIN (0) +#define CFG_SET_ANTENNA_ISOLATION_MAX (255) +#define CFG_SET_ANTENNA_ISOLATION_DEFAULT (25) + +/* + * + * gSetMaxTxPowerForBTC - Set Max WLAN Tx power in COEX scenario + * @Min: 0 + * @Max: 100 + * @Default: 100 + * + * Usage: External + * + * + */ +#define CFG_SET_MAX_TX_POWER_FOR_BTC_NAME "gSetMaxTxPowerForBTC" +#define CFG_SET_MAX_TX_POWER_FOR_BTC_MIN (0) +#define CFG_SET_MAX_TX_POWER_FOR_BTC_MAX (100) +#define CFG_SET_MAX_TX_POWER_FOR_BTC_DEFAULT (100) + +/* + * + * gSetWlanLowRssiThreshold - Set WLAN low RSSI threshold for BTC mode switching + * @Min: -100 + * @Max: 0 + * @Default: -80 + * + * Usage: External + * + * + */ +#define CFG_SET_WLAN_LOW_RSSI_THRESHOLD_NAME "gSetWlanLowRssiThreshold" +#define CFG_SET_WLAN_LOW_RSSI_THRESHOLD_MIN (-100) +#define CFG_SET_WLAN_LOW_RSSI_THRESHOLD_MAX (0) +#define CFG_SET_WLAN_LOW_RSSI_THRESHOLD_DEFAULT (-80) + +/* + * + * gSetBtLowRssiThreshold - Set BT low RSSI threshold for BTC mode switching + * @Min: -100 + * @Max: 0 + * @Default: -80 + * + * Usage: External + * + * + */ +#define CFG_SET_BT_LOW_RSSI_THRESHOLD_NAME "gSetBtLowRssiThreshold" +#define CFG_SET_BT_LOW_RSSI_THRESHOLD_MIN (-100) +#define CFG_SET_BT_LOW_RSSI_THRESHOLD_MAX (0) +#define CFG_SET_BT_LOW_RSSI_THRESHOLD_DEFAULT (-80) + +/* + * + * gSetBtInterferenceLowLL - Set lower limit of low level BT interference + * @Min: -100 + * @Max: 100 + * @Default: -25 + * + * Usage: External + * + * + */ +#define CFG_SET_BT_INTERFERENCE_LOW_LL_NAME "gSetBtInterferenceLowLL" +#define CFG_SET_BT_INTERFERENCE_LOW_LL_MIN (-100) +#define CFG_SET_BT_INTERFERENCE_LOW_LL_MAX (100) +#define CFG_SET_BT_INTERFERENCE_LOW_LL_DEFAULT (-25) + +/* + * + * gSetBtInterferenceLowUL - Set upper limit of low level BT interference + * @Min: -100 + * @Max: 100 + * @Default: -21 + * + * Usage: External + * + * + */ +#define CFG_SET_BT_INTERFERENCE_LOW_UL_NAME "gSetBtInterferenceLowUL" +#define CFG_SET_BT_INTERFERENCE_LOW_UL_MIN (-100) +#define CFG_SET_BT_INTERFERENCE_LOW_UL_MAX (100) +#define CFG_SET_BT_INTERFERENCE_LOW_UL_DEFAULT (-21) + +/* + * + * gSetBtInterferenceMediumLL - Set lower limit of medium level BT interference + * @Min: -100 + * @Max: 100 + * @Default: -20 + * + * Usage: External + * + * + */ +#define CFG_SET_BT_INTERFERENCE_MEDIUM_LL_NAME "gSetBtInterferenceMediumLL" +#define CFG_SET_BT_INTERFERENCE_MEDIUM_LL_MIN (-100) +#define CFG_SET_BT_INTERFERENCE_MEDIUM_LL_MAX (100) +#define CFG_SET_BT_INTERFERENCE_MEDIUM_LL_DEFAULT (-20) + +/* + * + * gSetBtInterferenceMediumUL - Set upper limit of medium level BT interference + * @Min: -100 + * @Max: 100 + * @Default: -16 + * + * Usage: External + * + * + */ +#define CFG_SET_BT_INTERFERENCE_MEDIUM_UL_NAME "gSetBtInterferenceMediumUL" +#define CFG_SET_BT_INTERFERENCE_MEDIUM_UL_MIN (-100) +#define CFG_SET_BT_INTERFERENCE_MEDIUM_UL_MAX (100) +#define CFG_SET_BT_INTERFERENCE_MEDIUM_UL_DEFAULT (-16) + +/* + * + * gSetBtInterferenceHighLL - Set lower limit of high level BT interference + * @Min: -100 + * @Max: 100 + * @Default: -15 + * + * Usage: External + * + * + */ +#define CFG_SET_BT_INTERFERENCE_HIGH_LL_NAME "gSetBtInterferenceHighLL" +#define CFG_SET_BT_INTERFERENCE_HIGH_LL_MIN (-100) +#define CFG_SET_BT_INTERFERENCE_HIGH_LL_MAX (100) +#define CFG_SET_BT_INTERFERENCE_HIGH_LL_DEFAULT (-15) + +/* + * + * gSetBtInterferenceHighUL - Set upper limit of high level BT interference + * @Min: -100 + * @Max: 100 + * @Default: -11 + * + * Usage: External + * + * + */ +#define CFG_SET_BT_INTERFERENCE_HIGH_UL_NAME "gSetBtInterferenceHighUL" +#define CFG_SET_BT_INTERFERENCE_HIGH_UL_MIN (-100) +#define CFG_SET_BT_INTERFERENCE_HIGH_UL_MAX (100) +#define CFG_SET_BT_INTERFERENCE_HIGH_UL_DEFAULT (-11) + /* * * channel_select_logic_conc - Set channel selection logic @@ -15935,6 +16115,17 @@ struct hdd_config { bool enable_rtt_mac_randomization; bool enable_ftopen; bool is_unit_test_framework_enabled; + uint8_t set_btc_mode; + uint8_t set_antenna_isolation; + uint8_t set_max_tx_power_for_btc; + int16_t set_wlan_low_rssi_threshold; + int16_t set_bt_low_rssi_threshold; + int16_t set_bt_interference_low_ll; + int16_t set_bt_interference_low_ul; + int16_t set_bt_interference_medium_ll; + int16_t set_bt_interference_medium_ul; + int16_t set_bt_interference_high_ll; + int16_t set_bt_interference_high_ul; bool disable_channel; uint32_t enable_secondary_rate; bool roam_force_rssi_trigger; diff --git a/core/hdd/src/wlan_hdd_cfg.c b/core/hdd/src/wlan_hdd_cfg.c index 88cf959bf542..44b17dba80fd 100644 --- a/core/hdd/src/wlan_hdd_cfg.c +++ b/core/hdd/src/wlan_hdd_cfg.c @@ -5616,6 +5616,91 @@ struct reg_table_entry g_registry_table[] = { CFG_ENABLE_DISABLE_CHANNEL_MIN, CFG_ENABLE_DISABLE_CHANNEL_MAX), + REG_VARIABLE(CFG_SET_BTC_MODE_NAME, WLAN_PARAM_Integer, + struct hdd_config, set_btc_mode, + VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT, + CFG_SET_BTC_MODE_DEFAULT, + CFG_SET_BTC_MODE_MIN, + CFG_SET_BTC_MODE_MAX), + + REG_VARIABLE(CFG_SET_ANTENNA_ISOLATION_NAME, WLAN_PARAM_Integer, + struct hdd_config, set_antenna_isolation, + VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT, + CFG_SET_ANTENNA_ISOLATION_DEFAULT, + CFG_SET_ANTENNA_ISOLATION_MIN, + CFG_SET_ANTENNA_ISOLATION_MAX), + + REG_VARIABLE(CFG_SET_MAX_TX_POWER_FOR_BTC_NAME, WLAN_PARAM_Integer, + struct hdd_config, set_max_tx_power_for_btc, + VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT, + CFG_SET_MAX_TX_POWER_FOR_BTC_DEFAULT, + CFG_SET_MAX_TX_POWER_FOR_BTC_MIN, + CFG_SET_MAX_TX_POWER_FOR_BTC_MAX), + + REG_VARIABLE(CFG_SET_WLAN_LOW_RSSI_THRESHOLD_NAME, + WLAN_PARAM_SignedInteger, + struct hdd_config, set_wlan_low_rssi_threshold, + VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT, + CFG_SET_WLAN_LOW_RSSI_THRESHOLD_DEFAULT, + CFG_SET_WLAN_LOW_RSSI_THRESHOLD_MIN, + CFG_SET_WLAN_LOW_RSSI_THRESHOLD_MAX), + + REG_VARIABLE(CFG_SET_BT_LOW_RSSI_THRESHOLD_NAME, + WLAN_PARAM_SignedInteger, + struct hdd_config, set_bt_low_rssi_threshold, + VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT, + CFG_SET_BT_LOW_RSSI_THRESHOLD_DEFAULT, + CFG_SET_BT_LOW_RSSI_THRESHOLD_MIN, + CFG_SET_BT_LOW_RSSI_THRESHOLD_MAX), + + REG_VARIABLE(CFG_SET_BT_INTERFERENCE_LOW_LL_NAME, + WLAN_PARAM_SignedInteger, + struct hdd_config, set_bt_interference_low_ll, + VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT, + CFG_SET_BT_INTERFERENCE_LOW_LL_DEFAULT, + CFG_SET_BT_INTERFERENCE_LOW_LL_MIN, + CFG_SET_BT_INTERFERENCE_LOW_LL_MAX), + + REG_VARIABLE(CFG_SET_BT_INTERFERENCE_LOW_UL_NAME, + WLAN_PARAM_SignedInteger, + struct hdd_config, set_bt_interference_low_ul, + VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT, + CFG_SET_BT_INTERFERENCE_LOW_UL_DEFAULT, + CFG_SET_BT_INTERFERENCE_LOW_UL_MIN, + CFG_SET_BT_INTERFERENCE_LOW_UL_MAX), + + REG_VARIABLE(CFG_SET_BT_INTERFERENCE_MEDIUM_LL_NAME, + WLAN_PARAM_SignedInteger, + struct hdd_config, set_bt_interference_medium_ll, + VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT, + CFG_SET_BT_INTERFERENCE_MEDIUM_LL_DEFAULT, + CFG_SET_BT_INTERFERENCE_MEDIUM_LL_MIN, + CFG_SET_BT_INTERFERENCE_MEDIUM_LL_MAX), + + REG_VARIABLE(CFG_SET_BT_INTERFERENCE_MEDIUM_UL_NAME, + WLAN_PARAM_SignedInteger, + struct hdd_config, set_bt_interference_medium_ul, + VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT, + CFG_SET_BT_INTERFERENCE_MEDIUM_UL_DEFAULT, + CFG_SET_BT_INTERFERENCE_MEDIUM_UL_MIN, + CFG_SET_BT_INTERFERENCE_MEDIUM_UL_MAX), + + REG_VARIABLE(CFG_SET_BT_INTERFERENCE_HIGH_LL_NAME, + WLAN_PARAM_SignedInteger, + struct hdd_config, set_bt_interference_high_ll, + VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT, + CFG_SET_BT_INTERFERENCE_HIGH_LL_DEFAULT, + CFG_SET_BT_INTERFERENCE_HIGH_LL_MIN, + CFG_SET_BT_INTERFERENCE_HIGH_LL_MAX), + + REG_VARIABLE(CFG_SET_BT_INTERFERENCE_HIGH_UL_NAME, + WLAN_PARAM_SignedInteger, + struct hdd_config, set_bt_interference_high_ul, + VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT, + CFG_SET_BT_INTERFERENCE_HIGH_UL_DEFAULT, + CFG_SET_BT_INTERFERENCE_HIGH_UL_MIN, + CFG_SET_BT_INTERFERENCE_HIGH_UL_MAX), + REG_VARIABLE(CFG_ENABLE_SECONDARY_RATE_NAME, WLAN_PARAM_HexInteger, struct hdd_config, enable_secondary_rate, @@ -6666,6 +6751,49 @@ static void hdd_cfg_print_action_oui(hdd_context_t *hdd_ctx) } +/** + * hdd_cfg_print_btc_params() - print btc param values + * @hdd_ctx: pointer to hdd context + * + * Return: None + */ +static void hdd_cfg_print_btc_params(hdd_context_t *hdd_ctx) +{ + hdd_debug("Name = [%s] value = [%d]", + CFG_SET_BTC_MODE_NAME, + hdd_ctx->config->set_btc_mode); + hdd_debug("Name = [%s] value = [%d]", + CFG_SET_ANTENNA_ISOLATION_NAME, + hdd_ctx->config->set_antenna_isolation); + hdd_debug("Name = [%s] value = [%d]", + CFG_SET_MAX_TX_POWER_FOR_BTC_NAME, + hdd_ctx->config->set_max_tx_power_for_btc); + hdd_debug("Name = [%s] value = [%d]", + CFG_SET_WLAN_LOW_RSSI_THRESHOLD_NAME, + hdd_ctx->config->set_wlan_low_rssi_threshold); + hdd_debug("Name = [%s] value = [%d]", + CFG_SET_BT_LOW_RSSI_THRESHOLD_NAME, + hdd_ctx->config->set_bt_low_rssi_threshold); + hdd_debug("Name = [%s] value = [%d]", + CFG_SET_BT_INTERFERENCE_LOW_LL_NAME, + hdd_ctx->config->set_bt_interference_low_ll); + hdd_debug("Name = [%s] value = [%d]", + CFG_SET_BT_INTERFERENCE_LOW_UL_NAME, + hdd_ctx->config->set_bt_interference_low_ul); + hdd_debug("Name = [%s] value = [%d]", + CFG_SET_BT_INTERFERENCE_MEDIUM_LL_NAME, + hdd_ctx->config->set_bt_interference_medium_ll); + hdd_debug("Name = [%s] value = [%d]", + CFG_SET_BT_INTERFERENCE_MEDIUM_UL_NAME, + hdd_ctx->config->set_bt_interference_medium_ul); + hdd_debug("Name = [%s] value = [%d]", + CFG_SET_BT_INTERFERENCE_HIGH_LL_NAME, + hdd_ctx->config->set_bt_interference_high_ll); + hdd_debug("Name = [%s] value = [%d]", + CFG_SET_BT_INTERFERENCE_HIGH_UL_NAME, + hdd_ctx->config->set_bt_interference_high_ul); +} + /** * hdd_cfg_print() - print the hdd configuration * @iniTable: pointer to hdd context @@ -7639,6 +7767,7 @@ void hdd_cfg_print(hdd_context_t *pHddCtx) CFG_ROAM_PREAUTH_NO_ACK_TIMEOUT_NAME, pHddCtx->config->roam_preauth_no_ack_timeout); hdd_cfg_print_action_oui(pHddCtx); + hdd_cfg_print_btc_params(pHddCtx); } /** diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c index 82f1dec34a3a..9d6ffcb6a6cb 100644 --- a/core/hdd/src/wlan_hdd_main.c +++ b/core/hdd/src/wlan_hdd_main.c @@ -10003,6 +10003,100 @@ static void hdd_send_all_sme_action_ouis(hdd_context_t *hdd_ctx) } } +/** + * hdd_send_coex_config_params() - Send coex config params to FW + * @hdd_ctx: HDD context + * @adapter: Primary adapter context + * + * This function is used to send all coex config related params to FW + * + * Return: QDF_STATUS + */ +static QDF_STATUS hdd_send_coex_config_params(hdd_context_t *hdd_ctx, + hdd_adapter_t *adapter) +{ + QDF_STATUS status; + struct coex_config_params coex_cfg_params = {0}; + struct hdd_config *config; + + if (!hdd_ctx) { + hdd_err("hdd_ctx is invalid"); + return QDF_STATUS_E_INVAL; + } + + if (!adapter) { + hdd_err("adapter is invalid"); + return QDF_STATUS_E_INVAL; + } + + config = hdd_ctx->config; + if (!config) { + hdd_err("hdd config got NULL"); + return QDF_STATUS_E_NULL_VALUE; + } + + coex_cfg_params.vdev_id = adapter->sessionId; + coex_cfg_params.config_type = COEX_CONFIG_TX_POWER; + coex_cfg_params.config_value[0] = config->set_max_tx_power_for_btc; + + status = sme_send_coex_config_cmd(&coex_cfg_params); + if (QDF_IS_STATUS_ERROR(status)) { + hdd_err("Failed to send coex Tx power"); + return QDF_STATUS_E_FAILURE; + } + + coex_cfg_params.config_type = COEX_CONFIG_HANDOVER_RSSI; + coex_cfg_params.config_value[0] = config->set_wlan_low_rssi_threshold; + + status = sme_send_coex_config_cmd(&coex_cfg_params); + if (QDF_IS_STATUS_ERROR(status)) { + hdd_err("Failed to send coex handover RSSI"); + return QDF_STATUS_E_FAILURE; + } + + coex_cfg_params.config_type = COEX_CONFIG_BTC_MODE; + coex_cfg_params.config_value[0] = config->set_btc_mode; + + status = sme_send_coex_config_cmd(&coex_cfg_params); + if (QDF_IS_STATUS_ERROR(status)) { + hdd_err("Failed to send coex BTC mode"); + return QDF_STATUS_E_FAILURE; + } + + coex_cfg_params.config_type = COEX_CONFIG_ANTENNA_ISOLATION; + coex_cfg_params.config_value[0] = config->set_antenna_isolation; + + status = sme_send_coex_config_cmd(&coex_cfg_params); + if (QDF_IS_STATUS_ERROR(status)) { + hdd_err("Failed to send coex antenna isolation"); + return QDF_STATUS_E_FAILURE; + } + + coex_cfg_params.config_type = COEX_CONFIG_BT_LOW_RSSI_THRESHOLD; + coex_cfg_params.config_value[0] = config->set_bt_low_rssi_threshold; + + status = sme_send_coex_config_cmd(&coex_cfg_params); + if (QDF_IS_STATUS_ERROR(status)) { + hdd_err("Failed to send coex BT low RSSI threshold"); + return QDF_STATUS_E_FAILURE; + } + + coex_cfg_params.config_type = COEX_CONFIG_BT_INTERFERENCE_LEVEL; + coex_cfg_params.config_value[0] = config->set_bt_interference_low_ll; + coex_cfg_params.config_value[1] = config->set_bt_interference_low_ul; + coex_cfg_params.config_value[2] = config->set_bt_interference_medium_ll; + coex_cfg_params.config_value[3] = config->set_bt_interference_medium_ul; + coex_cfg_params.config_value[4] = config->set_bt_interference_high_ll; + coex_cfg_params.config_value[5] = config->set_bt_interference_high_ul; + + status = sme_send_coex_config_cmd(&coex_cfg_params); + if (QDF_IS_STATUS_ERROR(status)) { + hdd_err("Failed to send coex BT interference level"); + return QDF_STATUS_E_FAILURE; + } + return QDF_STATUS_SUCCESS; +} + /** * hdd_pre_enable_configure() - Configurations prior to cds_enable * @hdd_ctx: HDD context @@ -10405,11 +10499,9 @@ static int hdd_features_init(hdd_context_t *hdd_ctx, hdd_adapter_t *adapter) goto out; } - ret = hdd_init_mws_coex(adapter); - if (ret) { - hdd_err("Error initializing mws-coex"); - goto out; - } + hdd_init_mws_coex(adapter); + + hdd_send_coex_config_params(hdd_ctx, adapter); /* FW capabilities received, Set the Dot11 mode */ sme_setdef_dot11mode(hdd_ctx->hHal); diff --git a/core/sme/inc/sme_api.h b/core/sme/inc/sme_api.h index 3a71ec424921..d2a2a416c19d 100644 --- a/core/sme/inc/sme_api.h +++ b/core/sme/inc/sme_api.h @@ -1735,6 +1735,14 @@ QDF_STATUS sme_get_sar_power_limits(tHalHandle hal, QDF_STATUS sme_set_sar_power_limits(tHalHandle hal, struct sar_limit_cmd_params *sar_limit_cmd); +/** + * sme_send_coex_config_cmd() - Send COEX config params + * @coex_cfg_params: struct to coex config params + * + * Return: QDF_STATUS + */ +QDF_STATUS sme_send_coex_config_cmd(struct coex_config_params *coex_cfg_params); + void sme_set_cc_src(tHalHandle hal_handle, enum country_src); diff --git a/core/sme/src/common/sme_api.c b/core/sme/src/common/sme_api.c index 302e1b5f78b8..0f5b31260983 100644 --- a/core/sme/src/common/sme_api.c +++ b/core/sme/src/common/sme_api.c @@ -17636,6 +17636,18 @@ QDF_STATUS sme_set_sar_power_limits(tHalHandle hal, return wma_set_sar_limit(wma_handle, sar_limit_cmd); } +QDF_STATUS sme_send_coex_config_cmd(struct coex_config_params *coex_cfg_params) +{ + void *wma_handle; + + wma_handle = cds_get_context(QDF_MODULE_ID_WMA); + if (!wma_handle) { + sme_err("wma handle is NULL"); + return QDF_STATUS_E_FAILURE; + } + return wma_send_coex_config_cmd(wma_handle, coex_cfg_params); +} + #ifdef WLAN_FEATURE_DISA /** * sme_encrypt_decrypt_msg() - handles encrypt/decrypt mesaage diff --git a/core/wma/inc/wma_api.h b/core/wma/inc/wma_api.h index 2de08c97638f..172c332de9b2 100644 --- a/core/wma/inc/wma_api.h +++ b/core/wma/inc/wma_api.h @@ -428,6 +428,18 @@ QDF_STATUS wma_get_sar_limit(WMA_HANDLE handle, QDF_STATUS wma_set_sar_limit(WMA_HANDLE handle, struct sar_limit_cmd_params *sar_limit_params); +/** + * wma_send_coex_config_cmd() - Send coex config params + * @wma_handle: wma handle + * @coex_cfg_params: struct to coex cofig params + * + * This function sends WMI command to send coex cofig params + * + * Return: QDF_STATUS + */ +QDF_STATUS wma_send_coex_config_cmd(WMA_HANDLE wma_handle, + struct coex_config_params *coex_cfg_params); + /** * wma_set_qpower_config() - update qpower config in wma * @vdev_id: the Id of the vdev to configure diff --git a/core/wma/src/wma_features.c b/core/wma/src/wma_features.c index 03ef1b1cec96..44c4c6a154e8 100644 --- a/core/wma/src/wma_features.c +++ b/core/wma/src/wma_features.c @@ -10839,6 +10839,26 @@ QDF_STATUS wma_set_sar_limit(WMA_HANDLE handle, return ret; } +QDF_STATUS wma_send_coex_config_cmd(WMA_HANDLE wma_handle, + struct coex_config_params *coex_cfg_params) +{ + tp_wma_handle wma = (tp_wma_handle)wma_handle; + + if (!wma || !wma->wmi_handle) { + WMA_LOGE("%s: WMA is closed, can not issue coex config command", + __func__); + return QDF_STATUS_E_INVAL; + } + + if (!coex_cfg_params) { + WMA_LOGE("%s: coex cfg params ptr NULL", __func__); + return QDF_STATUS_E_INVAL; + } + + return wmi_unified_send_coex_config_cmd(wma->wmi_handle, + coex_cfg_params); +} + #ifdef WLAN_FEATURE_DISA /** * wma_encrypt_decrypt_msg() - -- cgit v1.2.3 From 127e8cb0b3a5fb4936e71ef8b3bcdcffa74b36c6 Mon Sep 17 00:00:00 2001 From: nshrivas Date: Mon, 10 Sep 2018 07:53:25 -0700 Subject: Release 5.1.1.65W Release 5.1.1.65W Change-Id: I69db6caf9f621da91cfedce9ae2f7d4d782e739d CRs-Fixed: 774533 --- core/mac/inc/qwlan_version.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/mac/inc/qwlan_version.h b/core/mac/inc/qwlan_version.h index 2ba8ec1c7670..0d7a0678303c 100644 --- a/core/mac/inc/qwlan_version.h +++ b/core/mac/inc/qwlan_version.h @@ -32,9 +32,9 @@ #define QWLAN_VERSION_MAJOR 5 #define QWLAN_VERSION_MINOR 1 #define QWLAN_VERSION_PATCH 1 -#define QWLAN_VERSION_EXTRA "V" +#define QWLAN_VERSION_EXTRA "W" #define QWLAN_VERSION_BUILD 65 -#define QWLAN_VERSIONSTR "5.1.1.65V" +#define QWLAN_VERSIONSTR "5.1.1.65W" #endif /* QWLAN_VERSION_H */ -- cgit v1.2.3