From 46df590464f2bc4fdf37dd069a9b62b4ac837da0 Mon Sep 17 00:00:00 2001 From: Ashish Kumar Dhanotiya Date: Thu, 14 Oct 2021 14:23:31 +0530 Subject: [PATCH 1/8] qcacmn: Consider all power types to prepare client channel list Currently driver prepares client channel list based on indoor ap power type and this list is given to kernel. There are couple of issues with this approach as mentioned below: 1. Based on this list kernel sends the scan requests because of which there is a possibility that driver does not scan channels which are not part of LPI channel list but are part of SP channel list or VLP channel list. 2. Kernel sends start AP as well based on this channel list, since all LPI channel are marked as NO_IR from driver and because of which kernel dont send start AP on these chanels which leads to SAP start failure even if there are VLP channels available. Change-Id: I90174920df158c8b370e541034307a9a58448c29 CRs-Fixed: 3054543 --- .../regulatory/core/src/reg_build_chan_list.c | 131 ++++++++++++++++-- 1 file changed, 122 insertions(+), 9 deletions(-) diff --git a/umac/regulatory/core/src/reg_build_chan_list.c b/umac/regulatory/core/src/reg_build_chan_list.c index d20271009038..f6e70bd26ead 100644 --- a/umac/regulatory/core/src/reg_build_chan_list.c +++ b/umac/regulatory/core/src/reg_build_chan_list.c @@ -1,5 +1,6 @@ /* * Copyright (c) 2014-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 @@ -1019,12 +1020,118 @@ reg_modify_disable_chan_list_for_unii1_and_unii2a( #ifdef CONFIG_BAND_6GHZ #ifdef CONFIG_REG_CLIENT + +#ifdef CONFIG_AFC_SUPPORT +/** + * reg_append_mas_chan_list_for_6g_sp() - Append SP channels to the master + * channel list + * @pdev_priv_obj: Pointer to pdev private object + * + * This function appends SP channels to the master channel list + * + * Return: void. + */ +static void +reg_append_mas_chan_list_for_6g_sp(struct wlan_regulatory_pdev_priv_obj + *pdev_priv_obj) +{ + struct regulatory_channel *master_chan_list_6g_client_sp; + + master_chan_list_6g_client_sp = pdev_priv_obj->afc_chan_list; + + qdf_mem_copy(&pdev_priv_obj->mas_chan_list[MIN_6GHZ_CHANNEL], + master_chan_list_6g_client_sp, + NUM_6GHZ_CHANNELS * + sizeof(struct regulatory_channel)); +} +#else +static inline void +reg_append_mas_chan_list_for_6g_sp(struct wlan_regulatory_pdev_priv_obj + *pdev_priv_obj) +{ +} +#endif + +/** + * reg_append_mas_chan_list_for_6g_lpi() - Append LPI channels to the master + * channel list + * @pdev_priv_obj: Pointer to pdev private object + * + * This function appends LPI channels to the master channel list + * + * Return: void. + */ +static void +reg_append_mas_chan_list_for_6g_lpi(struct wlan_regulatory_pdev_priv_obj + *pdev_priv_obj) +{ + struct regulatory_channel *master_chan_list_6g_client_lpi; + uint8_t i, j; + + if (!pdev_priv_obj->reg_rules.num_of_6g_ap_reg_rules[REG_INDOOR_AP]) { + reg_debug("No LPI reg rules"); + return; + } + + master_chan_list_6g_client_lpi = + pdev_priv_obj->mas_chan_list_6g_client[REG_INDOOR_AP] + [pdev_priv_obj->reg_cur_6g_client_mobility_type]; + + for (i = MIN_6GHZ_CHANNEL, j = 0; + i <= MAX_6GHZ_CHANNEL && j < NUM_6GHZ_CHANNELS; i++, j++) { + if ((pdev_priv_obj->mas_chan_list[i].state == + CHANNEL_STATE_DISABLE) || + (pdev_priv_obj->mas_chan_list[i].chan_flags & + REGULATORY_CHAN_DISABLED)) { + qdf_mem_copy(&pdev_priv_obj->mas_chan_list[i], + &master_chan_list_6g_client_lpi[j], + sizeof(struct regulatory_channel)); + } + } +} + +/** + * reg_append_mas_chan_list_for_6g_VLP() - Append VLP channels to the master + * channel list + * @pdev_priv_obj: Pointer to pdev private object + * + * This function appends VLP channels to the master channel list + * + * Return: void. + */ +static void +reg_append_mas_chan_list_for_6g_vlp(struct wlan_regulatory_pdev_priv_obj + *pdev_priv_obj) +{ + struct regulatory_channel *master_chan_list_6g_client_vlp; + uint8_t i, j; + + if (!pdev_priv_obj->reg_rules.num_of_6g_ap_reg_rules[REG_VERY_LOW_POWER_AP]) { + reg_debug("No VLP reg rules"); + return; + } + + master_chan_list_6g_client_vlp = + pdev_priv_obj->mas_chan_list_6g_client[REG_VERY_LOW_POWER_AP] + [pdev_priv_obj->reg_cur_6g_client_mobility_type]; + + for (i = MIN_6GHZ_CHANNEL, j = 0; + i <= MAX_6GHZ_CHANNEL && j < NUM_6GHZ_CHANNELS; i++, j++) { + if ((pdev_priv_obj->mas_chan_list[i].state == + CHANNEL_STATE_DISABLE) || + (pdev_priv_obj->mas_chan_list[i].chan_flags & + REGULATORY_CHAN_DISABLED)) { + qdf_mem_copy(&pdev_priv_obj->mas_chan_list[i], + &master_chan_list_6g_client_vlp[j], + sizeof(struct regulatory_channel)); + } + } +} + static void reg_append_mas_chan_list_for_6g(struct wlan_regulatory_pdev_priv_obj *pdev_priv_obj) { - struct regulatory_channel *master_chan_list_6g_client; - if (pdev_priv_obj->reg_cur_6g_ap_pwr_type >= REG_CURRENT_MAX_AP_TYPE || pdev_priv_obj->reg_cur_6g_client_mobility_type >= REG_MAX_CLIENT_TYPE) { @@ -1032,14 +1139,20 @@ reg_append_mas_chan_list_for_6g(struct wlan_regulatory_pdev_priv_obj return; } - master_chan_list_6g_client = - pdev_priv_obj->mas_chan_list_6g_client[REG_INDOOR_AP] - [pdev_priv_obj->reg_cur_6g_client_mobility_type]; + /* Client should be able to scan all types of APs, so prepare the + * client list which has all the enabled channels, first priority is + * given to AFC power type and then second priority is decided based on + * gindoor_channel_support ini value + */ + reg_append_mas_chan_list_for_6g_sp(pdev_priv_obj); - qdf_mem_copy(&pdev_priv_obj->mas_chan_list[MIN_6GHZ_CHANNEL], - master_chan_list_6g_client, - NUM_6GHZ_CHANNELS * - sizeof(struct regulatory_channel)); + if (pdev_priv_obj->indoor_chan_enabled) { + reg_append_mas_chan_list_for_6g_lpi(pdev_priv_obj); + reg_append_mas_chan_list_for_6g_vlp(pdev_priv_obj); + } else { + reg_append_mas_chan_list_for_6g_vlp(pdev_priv_obj); + reg_append_mas_chan_list_for_6g_lpi(pdev_priv_obj); + } } static void From 76a4a79953fe7a6d0bd6d2f886a04cf291e8fc58 Mon Sep 17 00:00:00 2001 From: Surabhi Vishnoi Date: Wed, 14 Sep 2022 18:04:46 +0530 Subject: [PATCH 2/8] qcacmn: Reduce log level from error to debug in wlan_vdev_get_bss_peer_mac Bss peer can be NULL in case of vdev in disconnected state, so change the log level from error to debug in wlan_vdev_get_bss_peer_mac() to reduce logging in dmesg. Change-Id: Idac08200253d83f267be3381691e10d6bd4b52bf CRs-Fixed: 3293402 --- umac/cmn_services/obj_mgr/src/wlan_objmgr_vdev_obj.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/umac/cmn_services/obj_mgr/src/wlan_objmgr_vdev_obj.c b/umac/cmn_services/obj_mgr/src/wlan_objmgr_vdev_obj.c index 0b36790db167..d35c7a9452c5 100644 --- a/umac/cmn_services/obj_mgr/src/wlan_objmgr_vdev_obj.c +++ b/umac/cmn_services/obj_mgr/src/wlan_objmgr_vdev_obj.c @@ -1,5 +1,6 @@ /* * Copyright (c) 2016-2020 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 above @@ -1415,7 +1416,7 @@ QDF_STATUS wlan_vdev_get_bss_peer_mac(struct wlan_objmgr_vdev *vdev, peer = wlan_objmgr_vdev_try_get_bsspeer(vdev, WLAN_MLME_OBJMGR_ID); if (!peer) { - obj_mgr_err("not able to find bss peer for vdev %d", + obj_mgr_debug("not able to find bss peer for vdev %d", wlan_vdev_get_id(vdev)); return QDF_STATUS_E_INVAL; } From 7f15a2ae6c9b41133fbfe80d6cad6950a1be1052 Mon Sep 17 00:00:00 2001 From: Surya Prakash Sivaraj Date: Thu, 29 Apr 2021 21:43:18 -0700 Subject: [PATCH 3/8] qcacmn: QCA vendor attribute to configure ER SU PPDU type Add QCA vendor attribute to configure the driver to transmit the Data frames with ER SU PPDU type format. This attribute is used for testing purpose. Change-Id: If11523ea3e6316c47181342c3acc8425da85ee1b CRs-Fixed: 2960794 --- os_if/linux/qca_vendor.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/os_if/linux/qca_vendor.h b/os_if/linux/qca_vendor.h index be1da4fa3206..5474aa81b2fa 100644 --- a/os_if/linux/qca_vendor.h +++ b/os_if/linux/qca_vendor.h @@ -8467,6 +8467,14 @@ enum qca_wlan_vendor_attr_wifi_test_config { */ QCA_WLAN_VENDOR_ATTR_WIFI_TEST_CONFIG_6GHZ_SECURITY_TEST_MODE = 51, + /* 8-bit unsigned value to configure the driver to transmit data with + * ER SU PPDU type. + * + * 0 - Default behavior, 1 - Enable ER SU PPDU type TX. + * This attribute is used for testing purposes. + */ + QCA_WLAN_VENDOR_ATTR_WIFI_TEST_CONFIG_ER_SU_PPDU_TYPE = 52, + /* keep last */ QCA_WLAN_VENDOR_ATTR_WIFI_TEST_CONFIG_AFTER_LAST, QCA_WLAN_VENDOR_ATTR_WIFI_TEST_CONFIG_MAX = From c62a279eab299f7bf86c0bf3c9b2e465e143437c Mon Sep 17 00:00:00 2001 From: Surya Prakash Sivaraj Date: Tue, 20 Oct 2020 14:30:30 +0530 Subject: [PATCH 4/8] qcacmn: Add support to send FILS DISC TX enable/disable to FW Add support to send WFA test config FILS DISC frames TX enable/disable to FW. Change-Id: I5b0abed1b6fe517b12c29269da6456c48b21725c CRs-Fixed: 2801138 --- wmi/inc/wmi_unified_param.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/wmi/inc/wmi_unified_param.h b/wmi/inc/wmi_unified_param.h index 0fa5f924d1c1..fef218d11b82 100644 --- a/wmi/inc/wmi_unified_param.h +++ b/wmi/inc/wmi_unified_param.h @@ -2655,12 +2655,14 @@ struct set_fwtest_params { * @WFA_CONFIG_CSA: configure the driver to ignore CSA * @WFA_CONFIG_OCV: configure OCI * @WFA_CONFIG_SA_QUERY: configure driver/firmware to ignore SAquery timeout + * @WFA_FILS_DISCV_FRAMES: FD frames TX enable disable config */ enum wfa_test_cmds { WFA_CONFIG_RXNE, WFA_CONFIG_CSA, WFA_CONFIG_OCV, WFA_CONFIG_SA_QUERY, + WFA_FILS_DISCV_FRAMES, }; /** From 183edd48c11b839770aa4eb5a8d7ea4a88013c6c Mon Sep 17 00:00:00 2001 From: Amit Mehta Date: Mon, 26 Sep 2022 05:31:19 -0700 Subject: [PATCH 5/8] qcacmn: Add a tid check for RX to avoid of OOB access Tid in RX frame header may be larger than MAX TID allowed value, this will lead a out of boundary array access and lead to kernel crash at last. Change is aimed to do a TID check and discard such frame when necessary. Change-Id: I11f312668a5a42d690c058550f22b0f36f952104 CRs-Fixed: 3264581 --- dp/wifi3.0/dp_rx.c | 9 ++++++++- dp/wifi3.0/dp_stats.c | 2 ++ dp/wifi3.0/dp_types.h | 2 ++ 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/dp/wifi3.0/dp_rx.c b/dp/wifi3.0/dp_rx.c index eebc90a648c0..352832d0b6c4 100644 --- a/dp/wifi3.0/dp_rx.c +++ b/dp/wifi3.0/dp_rx.c @@ -2808,8 +2808,15 @@ done: } /* Get TID from struct cb->tid_val, save to tid */ - if (qdf_nbuf_is_rx_chfrag_start(nbuf)) + if (qdf_nbuf_is_rx_chfrag_start(nbuf)) { tid = qdf_nbuf_get_tid_val(nbuf); + if (tid >= CDP_MAX_DATA_TIDS) { + DP_STATS_INC(soc, rx.err.rx_invalid_tid_err, 1); + qdf_nbuf_free(nbuf); + nbuf = next; + continue; + } + } if (qdf_unlikely(!peer)) { peer = dp_peer_get_ref_by_id(soc, peer_id, diff --git a/dp/wifi3.0/dp_stats.c b/dp/wifi3.0/dp_stats.c index b5356e6b5bee..84d3409cd460 100644 --- a/dp/wifi3.0/dp_stats.c +++ b/dp/wifi3.0/dp_stats.c @@ -6661,6 +6661,8 @@ dp_print_soc_rx_stats(struct dp_soc *soc) soc->stats.rx.rxdma2rel_route_drop); DP_PRINT_STATS("Reo2rel route drop:%d", soc->stats.rx.reo2rel_route_drop); + DP_PRINT_STATS("Rx invalid TID count:%d", + soc->stats.rx.err.rx_invalid_tid_err); } #ifdef FEATURE_TSO_STATS diff --git a/dp/wifi3.0/dp_types.h b/dp/wifi3.0/dp_types.h index 8dd06f7b1efb..637801776a70 100644 --- a/dp/wifi3.0/dp_types.h +++ b/dp/wifi3.0/dp_types.h @@ -1072,6 +1072,8 @@ struct dp_soc_stats { uint32_t peer_unauth_rx_pkt_drop; /* MSDU len err count */ uint32_t msdu_len_err; + /* Rx invalid tid count */ + uint32_t rx_invalid_tid_err; } err; /* packet count per core - per ring */ From f7a4bf6616a8de02b3a9d351991a3ca44df99898 Mon Sep 17 00:00:00 2001 From: Rahul Gusain Date: Sun, 7 Aug 2022 18:55:50 +0530 Subject: [PATCH 6/8] qcacmn: Add support for NAN enable rsp in non-dbs platform Currently, in non-dbs platforms, firmware controls NAN enable/disable. To enable NAN in non-dbs platform, host driver sends NAN generic request to firmware and firmware enables NAN and provides generic response to that. But for some legacy platforms, requires enable NAN in host. For this, firmware adds new TLV for NAN enable response and sends with NAN generic response. Host extracts the NAN enable response parameters from NAN generic response packet. Change-Id: I1f4460137913780d4c262b5e40342dbb0b9a87c7 CRs-Fixed: 3263746 --- wmi/src/wmi_unified_nan_tlv.c | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/wmi/src/wmi_unified_nan_tlv.c b/wmi/src/wmi_unified_nan_tlv.c index de5706c8f514..04e1867401e8 100644 --- a/wmi/src/wmi_unified_nan_tlv.c +++ b/wmi/src/wmi_unified_nan_tlv.c @@ -75,18 +75,21 @@ extract_nan_event_rsp_tlv(wmi_unified_t wmi_handle, void *evt_buf, } nan_msg_hdr = (nan_msg_header_t *)event->data; - if (!wmi_service_enabled(wmi_handle, wmi_service_nan_dbs_support) && - !wmi_service_enabled(wmi_handle, wmi_service_nan_disable_support)) { - evt_params->evt_type = nan_event_id_generic_rsp; - return QDF_STATUS_SUCCESS; - } - switch (nan_msg_hdr->msg_id) { case NAN_MSG_ID_ENABLE_RSP: nan_evt_info = event->event_info; if (!nan_evt_info) { - wmi_err("Fail: NAN enable rsp event info Null"); - return QDF_STATUS_E_INVAL; + if (!wmi_service_enabled(wmi_handle, + wmi_service_nan_dbs_support) && + !wmi_service_enabled(wmi_handle, + wmi_service_nan_disable_support + )) { + evt_params->evt_type = nan_event_id_generic_rsp; + break; + } else { + wmi_err("Fail: NAN enable rsp event info Null"); + return QDF_STATUS_E_INVAL; + } } evt_params->evt_type = nan_event_id_enable_rsp; evt_params->mac_id = nan_evt_info->mac_id; From cf9100c51dec3b332eaba8be54e61fb3bd1c93a3 Mon Sep 17 00:00:00 2001 From: Krupali Dhanvijay Date: Sun, 16 Oct 2022 22:10:30 +0530 Subject: [PATCH 7/8] qcacmn: Update pmk for roamed AP to pmk cache table MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Assume AP1 and AP2 are SPMK APs. For SPMK AP(s), Host should add an entry of an AP in PMK cache table like below in two cases only: Case 1. When DUT successfully associated with SPMK supported AP In this case host update “is_spmk_ap” flag in PMK table by parsing beacon of associated AP after successful connection. Case 2. When DUT successfully roamed to SPMK supported AP In this case host update “is_spmk_ap” flag in PMK table by parsing roam sync indication event. In case of connection with SPMK AP, Host selectively deletes PMK entry for other SPMK supported AP(s) on basis of “is_spmk_ap” flag and maintains only one entry for all SPMK AP(s). And host sends the same single PMK in RSO for further roaming to SPMK AP. Initially, DUT is connected with AP2. Then Disconnection happens with AP2 due to NUD failure. After disconnection, the upper layer sends flush PMK requests for AP1 and AP2. Host deletes old PMK entries for both APs. Now upper layer sends a set PMK request for AP2. Host adds AP2 entry in PMK cache table but host does not set "is_spmk_ap" flag in PMK table for this entry as DUT is not connected to AP2. Now host receives a connect request for AP1 from the upper layer. DUT successfully associated with AP1 by performing full SAE authentication. Host adds an entry for AP1 in the PMK cache table and sets "is_spmk_ap" flag for AP1 but fails to delete the entry for other SPMK AP(s), here AP2, from PMK cache table. This is because of "is_spmk_ap" flag is not set for AP2. At this point of time below is the PMK cache table entry for SPMK AP(s): The Host PMK cache table has two entries for two SPMK APs. BSSID PMK is_spmk_ap flag AP2 PMK2 0 AP1 PMK1 1 Now FW roams to AP2 using PMK1. Host process roam sync indication for AP2 and updates "is_spmk_ap" flag for AP2 in the PMK cache table. As Host has a stale entry for AP2 in the PMK cache table, Host sends AP2’s PMK (here PMK2) in RSO command which firmware will use for further roaming but roaming fails due to invalid PMK, as target SPMK AP expects PMK1 in reassociation request. To handle these scenarios, FW should send PMK info of roamed AP and host override stale entry for roamed AP (if any) with roamed AP's PMK in PMK cache table. Change-Id: I3c6a49be065e4744e438c2762c103eb3095a2253 CRs-Fixed: 3313882 --- .../crypto/inc/wlan_crypto_global_api.h | 19 +++++++++- .../crypto/src/wlan_crypto_global_api.c | 37 +++++++++++++++++++ 2 files changed, 55 insertions(+), 1 deletion(-) diff --git a/umac/cmn_services/crypto/inc/wlan_crypto_global_api.h b/umac/cmn_services/crypto/inc/wlan_crypto_global_api.h index 49251a52c4b2..4f1eaf957603 100644 --- a/umac/cmn_services/crypto/inc/wlan_crypto_global_api.h +++ b/umac/cmn_services/crypto/inc/wlan_crypto_global_api.h @@ -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 @@ -1068,7 +1069,7 @@ wlan_crypto_selective_clear_sae_single_pmk_entries( struct wlan_objmgr_vdev *vdev, struct qdf_mac_addr *conn_bssid); /** - * wlan_crypto_set_sae_single_pmk_bss_cap - Set the peer SAE sinlge pmk + * wlan_crypto_set_sae_single_pmk_bss_cap - Set the peer SAE single pmk * feature supported status * @vdev: Vdev * @bssid: BSSID for which the flag is to be set @@ -1078,6 +1079,16 @@ wlan_crypto_selective_clear_sae_single_pmk_entries( void wlan_crypto_set_sae_single_pmk_bss_cap(struct wlan_objmgr_vdev *vdev, struct qdf_mac_addr *bssid, bool single_pmk_capable_bss); + +/** + * wlan_crypto_set_sae_single_pmk_info - Set the peer SAE single pmk info + * @vdev: Vdev + * @roam_sync_pmksa: pmk info for roamed AP + */ +void +wlan_crypto_set_sae_single_pmk_info(struct wlan_objmgr_vdev *vdev, + struct wlan_crypto_pmksa *roam_sync_pmksa); + #else static inline void wlan_crypto_selective_clear_sae_single_pmk_entries( @@ -1091,6 +1102,12 @@ void wlan_crypto_set_sae_single_pmk_bss_cap(struct wlan_objmgr_vdev *vdev, bool single_pmk_capable_bss) { } + +static inline void +wlan_crypto_set_sae_single_pmk_info(struct wlan_objmgr_vdev *vdev, + struct wlan_crypto_pmksa *roam_sync_pmksa) +{ +} #endif #ifdef WLAN_FEATURE_FILS_SK diff --git a/umac/cmn_services/crypto/src/wlan_crypto_global_api.c b/umac/cmn_services/crypto/src/wlan_crypto_global_api.c index 72649ff046a2..6b496baa3dbf 100644 --- a/umac/cmn_services/crypto/src/wlan_crypto_global_api.c +++ b/umac/cmn_services/crypto/src/wlan_crypto_global_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 @@ -4675,6 +4676,42 @@ void wlan_crypto_set_sae_single_pmk_bss_cap(struct wlan_objmgr_vdev *vdev, single_pmk_capable_bss; } } + +void +wlan_crypto_set_sae_single_pmk_info(struct wlan_objmgr_vdev *vdev, + struct wlan_crypto_pmksa *roam_sync_pmksa) +{ + struct wlan_crypto_params *crypto_params; + struct wlan_crypto_comp_priv *crypto_priv; + int i; + + crypto_priv = (struct wlan_crypto_comp_priv *) + wlan_get_vdev_crypto_obj(vdev); + + if (!crypto_priv) { + crypto_err("crypto_priv NULL"); + return; + } + + crypto_params = &crypto_priv->crypto_params; + + for (i = 0; i < WLAN_CRYPTO_MAX_PMKID; i++) { + if (!crypto_params->pmksa[i]) + continue; + if (qdf_is_macaddr_equal(&roam_sync_pmksa->bssid, + &crypto_params->pmksa[i]->bssid) && + roam_sync_pmksa->single_pmk_supported && + roam_sync_pmksa->pmk_len) { + crypto_params->pmksa[i]->single_pmk_supported = + roam_sync_pmksa->single_pmk_supported; + crypto_params->pmksa[i]->pmk_len = + roam_sync_pmksa->pmk_len; + qdf_mem_copy(crypto_params->pmksa[i]->pmk, + roam_sync_pmksa->pmk, + roam_sync_pmksa->pmk_len); + } + } +} #endif void wlan_crypto_reset_vdev_params(struct wlan_objmgr_vdev *vdev) From 37175948bad2564c4e80bb19d84946a9d4f53057 Mon Sep 17 00:00:00 2001 From: Alan Chen Date: Tue, 20 Apr 2021 12:57:57 -0700 Subject: [PATCH 8/8] qcacmn: Change log level to debug for hif_runtime_lock_init/deinit To avoid excessive logging, we whould not logs RTPM lock init and deinit to the console. Thus, change the log level to debug. Change-Id: Ib11045fe50f729b0580284fa913da48d3a59b323 CRs-Fixed: 2927959 --- hif/src/hif_runtime_pm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hif/src/hif_runtime_pm.c b/hif/src/hif_runtime_pm.c index b6f76644901b..4704cbab3088 100644 --- a/hif/src/hif_runtime_pm.c +++ b/hif/src/hif_runtime_pm.c @@ -1596,7 +1596,7 @@ int hif_runtime_lock_init(qdf_runtime_lock_t *lock, const char *name) { struct hif_pm_runtime_lock *context; - hif_info("Initializing Runtime PM wakelock %s", name); + hif_debug("Initializing Runtime PM wakelock %s", name); context = qdf_mem_malloc(sizeof(*context)); if (!context) @@ -1626,7 +1626,7 @@ void hif_runtime_lock_deinit(struct hif_opaque_softc *hif_ctx, return; } - hif_info("Deinitializing Runtime PM wakelock %s", context->name); + hif_debug("Deinitializing Runtime PM wakelock %s", context->name); /* * Ensure to delete the context list entry and reduce the usage count