From df787f7e3ace09c8cf73a53ea0af084a8e9a5d01 Mon Sep 17 00:00:00 2001 From: bings Date: Tue, 28 Jul 2020 10:36:39 +0800 Subject: [PATCH 1/5] qcacmn: Set lock_cookie_freelist as NULL in qdf_lock_stats_deinit lock_cookie_freelist is global static, which means it is set as NULL when loading driver module. It works well when there is only one driver module. For the CE platform with CONFIG_WLAN_RESIDENT_DRIVER defined, driver is split into two modules, one module keeps variables and functions in kernel, the other module is used to trigger rmmod/insmod function. In this case, lock_cookie_freelist is not NULL when insmod is triggered the second time through the second module. Set lock_cookie_freelist as NULL in qdf_lock_stats_deinit. Change-Id: Ia20fcc230c3a43eed9b646689348ad37b77811f2 CRs-Fixed: 2742118 --- qdf/linux/src/qdf_lock.c | 1 + 1 file changed, 1 insertion(+) diff --git a/qdf/linux/src/qdf_lock.c b/qdf/linux/src/qdf_lock.c index bb7f459ae748..48deb01e93ea 100644 --- a/qdf/linux/src/qdf_lock.c +++ b/qdf/linux/src/qdf_lock.c @@ -823,6 +823,7 @@ void qdf_lock_stats_deinit(void) __func__, lock_cookies[i].u.cookie.func, lock_cookies[i].u.cookie.line); } + lock_cookie_freelist = NULL; } /* allocated separate memory in case the lock memory is freed without From 0e140dfdc4d9192561dc7c7876d7b1b6d6e9c2e3 Mon Sep 17 00:00:00 2001 From: Divyajyothi Goparaju Date: Wed, 18 Nov 2020 15:24:55 +0530 Subject: [PATCH 2/5] qcacmn: Vendor specific feature capability for dbs Add feature capability indication for dbs for the drivers to advertize support for this. Change-Id: Ic6941e58a30d6aa6a867a12ddd7a8db5abbb1673 CRs-Fixed: 2821654 --- os_if/linux/qca_vendor.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/os_if/linux/qca_vendor.h b/os_if/linux/qca_vendor.h index 1f829d41226d..eed687a55264 100644 --- a/os_if/linux/qca_vendor.h +++ b/os_if/linux/qca_vendor.h @@ -3746,6 +3746,10 @@ enum qca_wlan_vendor_attr_nd_offload { * %QCA_WLAN_VENDOR_ATTR_THERMAL_LEVEL and * %QCA_WLAN_VENDOR_ATTR_THERMAL_COMPLETION_WINDOW attributes from * userspace. + * @QCA_WLAN_VENDOR_FEATURE_CONCURRENT_BAND_SESSIONS: Device supports + * concurrent network sessions on different Wi-Fi Bands. This feature + * capability is attributed to the hardware's capability to support + * the same (e.g., DBS). * @NUM_QCA_WLAN_VENDOR_FEATURES: Number of assigned feature bits */ enum qca_wlan_vendor_features { @@ -3761,6 +3765,7 @@ enum qca_wlan_vendor_features { QCA_WLAN_VENDOR_FEATURE_11AX = 9, QCA_WLAN_VENDOR_FEATURE_6GHZ_SUPPORT = 10, QCA_WLAN_VENDOR_FEATURE_THERMAL_CONFIG = 11, + QCA_WLAN_VENDOR_FEATURE_CONCURRENT_BAND_SESSIONS = 13, NUM_QCA_WLAN_VENDOR_FEATURES /* keep last */ }; From 9634daa677782286b806c21d56d31bb9b9f3c65e Mon Sep 17 00:00:00 2001 From: "Yu Zhang(Yuriy)" Date: Tue, 22 Mar 2022 09:55:14 +0800 Subject: [PATCH 3/5] qcacmn: discard IPA TX ring flush using conditional compilation "discard IPA TX ring flush before RTPM suspend" should be compiled when enable IPA. Change-Id: I120f79385d53ba3075d1848186d8813236fb5e94 --- dp/wifi3.0/dp_main.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dp/wifi3.0/dp_main.c b/dp/wifi3.0/dp_main.c index 67459ecbd0ee..83fe7b152980 100644 --- a/dp/wifi3.0/dp_main.c +++ b/dp/wifi3.0/dp_main.c @@ -10574,8 +10574,10 @@ static QDF_STATUS dp_runtime_suspend(struct cdp_soc_t *soc_hdl, uint8_t pdev_id) /* perform a force flush if tx is pending */ for (i = 0; i < soc->num_tcl_data_rings; i++) { +#ifdef IPA_OFFLOAD if (i == IPA_TCL_DATA_RING_IDX) continue; +#endif hal_srng_set_event(soc->tcl_data_ring[i].hal_srng, HAL_SRNG_FLUSH_EVENT); dp_flush_ring_hptp(soc, soc->tcl_data_ring[i].hal_srng); From e517d171ec00705790057ad10405794797dbc886 Mon Sep 17 00:00:00 2001 From: "Yu Zhang(Yuriy)" Date: Fri, 25 Mar 2022 15:20:33 +0800 Subject: [PATCH 4/5] qcacmn: Zero out parameters of IPA function Zero out parameters for IPA uC offload interface registration. Change-Id: I72e951206d90f1f9a11ae5531dda8ffb0c878b4c --- dp/wifi3.0/dp_ipa.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dp/wifi3.0/dp_ipa.c b/dp/wifi3.0/dp_ipa.c index 24b25f0cc9f4..2f6ecb351076 100644 --- a/dp/wifi3.0/dp_ipa.c +++ b/dp/wifi3.0/dp_ipa.c @@ -1289,6 +1289,7 @@ QDF_STATUS dp_ipa_setup_iface(char *ifname, uint8_t *mac_addr, dp_debug("Add Partial hdr: %s, "QDF_MAC_ADDR_FMT, ifname, QDF_MAC_ADDR_REF(mac_addr)); + qdf_mem_zero(&in, sizeof(qdf_ipa_wdi_reg_intf_in_params_t)); qdf_mem_zero(&hdr_info, sizeof(qdf_ipa_wdi_hdr_info_t)); qdf_ether_addr_copy(uc_tx_hdr.eth.h_source, mac_addr); @@ -1546,6 +1547,7 @@ QDF_STATUS dp_ipa_setup_iface(char *ifname, uint8_t *mac_addr, "%s: Add Partial hdr: %s, "QDF_MAC_ADDR_FMT, __func__, ifname, QDF_MAC_ADDR_REF(mac_addr)); + qdf_mem_zero(&in, sizeof(qdf_ipa_wdi_reg_intf_in_params_t)); qdf_mem_zero(&hdr_info, sizeof(qdf_ipa_wdi_hdr_info_t)); qdf_ether_addr_copy(uc_tx_hdr.eth.h_source, mac_addr); From b94746a9fc01f1c8c16ac3e1872359f7ab0283d9 Mon Sep 17 00:00:00 2001 From: Yu Wang Date: Fri, 1 Apr 2022 16:59:34 +0800 Subject: [PATCH 5/5] qcacmn: skip MBSSID processing if it's not supported The Multiple BSSID field (Bit 22) in Extended Capabilities indicates whether MBSSID is supported or not. Skip MBSSID processing if the field is NOT set in beacon. Change-Id: Id18318587cb9d26fa6315202b5bbe98ef8870fdd CRs-Fixed: 3160715 --- .../scan/dispatcher/src/wlan_scan_utils_api.c | 27 ++++++++++++++----- 1 file changed, 20 insertions(+), 7 deletions(-) diff --git a/umac/scan/dispatcher/src/wlan_scan_utils_api.c b/umac/scan/dispatcher/src/wlan_scan_utils_api.c index 242f64eb8063..6c11c2205115 100644 --- a/umac/scan/dispatcher/src/wlan_scan_utils_api.c +++ b/umac/scan/dispatcher/src/wlan_scan_utils_api.c @@ -1,5 +1,6 @@ /* * Copyright (c) 2017-2021 The Linux Foundation. All rights reserved. + * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved. * * Permission to use, copy, modify, and/or distribute this software for * any purpose with or without fee is hereby granted, provided that the @@ -1986,9 +1987,9 @@ util_scan_parse_beacon_frame(struct wlan_objmgr_pdev *pdev, { struct wlan_bcn_frame *bcn; struct wlan_frame_hdr *hdr; - uint8_t *mbssid_ie = NULL; + uint8_t *mbssid_ie = NULL, *extcap_ie; uint32_t ie_len = 0; - QDF_STATUS status; + QDF_STATUS status = QDF_STATUS_E_FAILURE; struct scan_mbssid_info mbssid_info = { 0 }; hdr = (struct wlan_frame_hdr *)frame; @@ -1998,12 +1999,24 @@ util_scan_parse_beacon_frame(struct wlan_objmgr_pdev *pdev, sizeof(struct wlan_frame_hdr) - offsetof(struct wlan_bcn_frame, ie)); - mbssid_ie = util_scan_find_ie(WLAN_ELEMID_MULTIPLE_BSSID, + extcap_ie = util_scan_find_ie(WLAN_ELEMID_XCAPS, (uint8_t *)&bcn->ie, ie_len); - if (mbssid_ie) { - qdf_mem_copy(&mbssid_info.trans_bssid, - hdr->i_addr3, QDF_MAC_ADDR_SIZE); - mbssid_info.profile_count = 1 << mbssid_ie[2]; + /* Process MBSSID when Multiple BSSID (Bit 22) is set in Ext Caps */ + if (extcap_ie && + extcap_ie[1] >= 3 && extcap_ie[1] <= WLAN_EXTCAP_IE_MAX_LEN && + (extcap_ie[4] & 0x40)) { + mbssid_ie = util_scan_find_ie(WLAN_ELEMID_MULTIPLE_BSSID, + (uint8_t *)&bcn->ie, ie_len); + if (mbssid_ie) { + if (mbssid_ie[1] <= 0) { + scm_debug("MBSSID IE length is wrong %d", + mbssid_ie[1]); + return status; + } + qdf_mem_copy(&mbssid_info.trans_bssid, + hdr->i_addr3, QDF_MAC_ADDR_SIZE); + mbssid_info.profile_count = 1 << mbssid_ie[2]; + } } status = util_scan_gen_scan_entry(pdev, frame, frame_len,