From 55fba4768d475f3f77588b9fe4a737ec7b053259 Mon Sep 17 00:00:00 2001 From: Pragaspathi Thilagaraj Date: Fri, 3 Feb 2023 13:55:49 +0530 Subject: [PATCH 01/23] qcacld-3.0: Defer messages to LIM during peer create Before sending peer create command to firmware, defer the messages to LIM so that peer create confirm event is protected from disconnect. If the messages are not defered, disconnect gets processed and the lim timers are not aborted as part of disconnect sequence and back to back connect followed by disconnect causes ANR Defer the LIM messages during peer create and allow the messages after peer create confirm is received. Change-Id: Ifffbb4897a4fa85dd83c94eb84be72295905b785 CRs-Fixed: 3421721 --- .../src/pe/lim/lim_process_mlm_req_messages.c | 18 ++++++++++++++++-- core/wma/src/wma_dev_if.c | 4 +++- 2 files changed, 19 insertions(+), 3 deletions(-) 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 68196860b5d6..6234e3a2e836 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 @@ -1,6 +1,6 @@ /* * Copyright (c) 2011-2020 The Linux Foundation. All rights reserved. - * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved. + * Copyright (c) 2022-2023 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 @@ -356,6 +356,11 @@ lim_post_join_set_link_state_callback(struct mac_context *mac, uint32_t vdev_id, tLimMlmJoinCnf mlm_join_cnf; struct pe_session *session_entry; + /* + * Allow defered messages after peer create response + */ + SET_LIM_PROCESS_DEFD_MESGS(mac, true); + session_entry = pe_find_session_by_vdev_id(mac, vdev_id); if (!session_entry) { pe_err("vdev_id:%d PE session is NULL", vdev_id); @@ -406,13 +411,22 @@ static void lim_process_mlm_post_join_suspend_link(struct mac_context *mac_ctx, struct pe_session *session) { + QDF_STATUS status; + lim_deactivate_and_change_timer(mac_ctx, eLIM_JOIN_FAIL_TIMER); /* assign appropriate sessionId to the timer object */ mac_ctx->lim.lim_timers.gLimJoinFailureTimer.sessionId = session->peSessionId; - wma_add_bss_peer_sta(session->vdev_id, session->bssId, true); + /* + * Defer msgs to LIM till peer create confirm event is received + */ + SET_LIM_PROCESS_DEFD_MESGS(mac_ctx, false); + status = wma_add_bss_peer_sta(session->vdev_id, session->bssId, true); + if (status == QDF_STATUS_E_RESOURCES) + SET_LIM_PROCESS_DEFD_MESGS(mac_ctx, true); + } /** diff --git a/core/wma/src/wma_dev_if.c b/core/wma/src/wma_dev_if.c index f0f92e08802a..73d883382974 100644 --- a/core/wma/src/wma_dev_if.c +++ b/core/wma/src/wma_dev_if.c @@ -1,6 +1,6 @@ /* * Copyright (c) 2013-2021 The Linux Foundation. All rights reserved. - * Copyright (c) 2021-2022 Qualcomm Innovation Center, Inc. All rights reserved. + * Copyright (c) 2021-2023 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 @@ -1924,6 +1924,7 @@ wma_create_sta_mode_bss_peer(tp_wma_handle wma, if (!mac) { wma_err("vdev%d: Mac context is null", vdev_id); + status = QDF_STATUS_E_RESOURCES; return status; } @@ -5339,6 +5340,7 @@ QDF_STATUS wma_add_bss_peer_sta(uint8_t vdev_id, uint8_t *bssid, wma = cds_get_context(QDF_MODULE_ID_WMA); if (!wma) { wma_err("Invalid wma"); + status = QDF_STATUS_E_RESOURCES; goto err; } From 682543e640d686b34222e63a188388471e0522f0 Mon Sep 17 00:00:00 2001 From: Madan Koyyalamudi Date: Thu, 2 Mar 2023 11:03:47 -0800 Subject: [PATCH 02/23] Release 2.0.8.32S Release 2.0.8.32S Change-Id: Id9222622ca2cd5e4821695e997d933124c345102 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 aea31a5f4d54..0cd928499b0b 100644 --- a/core/mac/inc/qwlan_version.h +++ b/core/mac/inc/qwlan_version.h @@ -32,9 +32,9 @@ #define QWLAN_VERSION_MAJOR 2 #define QWLAN_VERSION_MINOR 0 #define QWLAN_VERSION_PATCH 8 -#define QWLAN_VERSION_EXTRA "R" +#define QWLAN_VERSION_EXTRA "S" #define QWLAN_VERSION_BUILD 32 -#define QWLAN_VERSIONSTR "2.0.8.32R" +#define QWLAN_VERSIONSTR "2.0.8.32S" #endif /* QWLAN_VERSION_H */ From be0dd236406c80b84bd1585931e4848d1595f540 Mon Sep 17 00:00:00 2001 From: Vinod Kumar Myadam Date: Thu, 22 Sep 2022 15:19:00 +0530 Subject: [PATCH 03/23] qcacld-3.0: Fix to pre CAC interface clean up If is_pre_cac_on is set, in __wlan_hdd_del_virtual_intf firstly frees the sap context by calling hdd_clean_up_interface and then frees the pre cac by calling hdd_clean_up_pre_cac_interface this will fails to access the sap context which is already freed. So, replace order of calling, firstly hdd_clean_up_pre_cac_interface and then hdd_clean_up_interface. cds flush work will cancel the work which will not delete the pre cac vdev. Replace with qdf_flush_work will wait for a work to finish, executing the last queueing instance. Assign NULL to fn and arg of pre cac work to ensure proper cleanup of work. Change-Id: I093bf627ce7a73e7c4f7c4cf30e2ec56814a80ed CRs-Fixed: 3286477 --- core/hdd/src/wlan_hdd_main.c | 17 +++++++++++++---- core/hdd/src/wlan_hdd_p2p.c | 2 +- core/hdd/src/wlan_hdd_sap_cond_chan_switch.c | 3 ++- 3 files changed, 16 insertions(+), 6 deletions(-) diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c index 1c010f73e6df..69500ce5819f 100644 --- a/core/hdd/src/wlan_hdd_main.c +++ b/core/hdd/src/wlan_hdd_main.c @@ -1,6 +1,6 @@ /* * Copyright (c) 2012-2021 The Linux Foundation. All rights reserved. - * Copyright (c) 2021-2022 Qualcomm Innovation Center, Inc. All rights reserved. + * Copyright (c) 2021-2023 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 @@ -7242,12 +7242,13 @@ static void hdd_close_pre_cac_adapter(struct hdd_context *hdd_ctx) SAP_PRE_CAC_IFNAME); if (!pre_cac_adapter) return; + hdd_ctx->sap_pre_cac_work.fn = NULL; + hdd_ctx->sap_pre_cac_work.arg = NULL; errno = osif_vdev_sync_trans_start_wait(pre_cac_adapter->dev, &vdev_sync); if (errno) return; - osif_vdev_sync_unregister(pre_cac_adapter->dev); osif_vdev_sync_wait_for_ops(vdev_sync); @@ -7475,7 +7476,7 @@ QDF_STATUS hdd_stop_adapter(struct hdd_context *hdd_ctx, sap_ctx = WLAN_HDD_GET_SAP_CTX_PTR(adapter); if (!wlan_sap_is_pre_cac_context(sap_ctx) && (hdd_ctx->sap_pre_cac_work.fn)) - cds_flush_work(&hdd_ctx->sap_pre_cac_work); + qdf_flush_work(&hdd_ctx->sap_pre_cac_work); hdd_close_pre_cac_adapter(hdd_ctx); @@ -7652,7 +7653,7 @@ QDF_STATUS hdd_stop_all_adapters(struct hdd_context *hdd_ctx) hdd_enter(); if (hdd_ctx->sap_pre_cac_work.fn) - cds_flush_work(&hdd_ctx->sap_pre_cac_work); + qdf_flush_work(&hdd_ctx->sap_pre_cac_work); hdd_for_each_adapter_dev_held_safe(hdd_ctx, adapter, next_adapter, NET_DEV_HOLD_STOP_ALL_ADAPTERS) { @@ -18156,6 +18157,7 @@ void hdd_clean_up_pre_cac_interface(struct hdd_context *hdd_ctx) uint8_t vdev_id; QDF_STATUS status; struct hdd_adapter *precac_adapter; + struct sap_context *sap_ctx; status = wlan_sap_get_pre_cac_vdev_id(hdd_ctx->mac_handle, &vdev_id); if (QDF_IS_STATUS_ERROR(status)) { @@ -18169,6 +18171,13 @@ void hdd_clean_up_pre_cac_interface(struct hdd_context *hdd_ctx) return; } + sap_ctx = WLAN_HDD_GET_SAP_CTX_PTR(precac_adapter); + if (wlan_sap_is_pre_cac_context(sap_ctx) && + hdd_ctx->sap_pre_cac_work.fn) { + hdd_debug("pre_cac_work already scheduled"); + return; + } + qdf_create_work(0, &hdd_ctx->sap_pre_cac_work, wlan_hdd_sap_pre_cac_failure, (void *)precac_adapter); diff --git a/core/hdd/src/wlan_hdd_p2p.c b/core/hdd/src/wlan_hdd_p2p.c index d947d31a71d0..4743ce81ba2a 100644 --- a/core/hdd/src/wlan_hdd_p2p.c +++ b/core/hdd/src/wlan_hdd_p2p.c @@ -960,8 +960,8 @@ int __wlan_hdd_del_virtual_intf(struct wiphy *wiphy, struct wireless_dev *wdev) if (adapter->device_mode == QDF_SAP_MODE && wlan_sap_is_pre_cac_active(hdd_ctx->mac_handle)) { - hdd_clean_up_interface(hdd_ctx, adapter); hdd_clean_up_pre_cac_interface(hdd_ctx); + hdd_clean_up_interface(hdd_ctx, adapter); } else if (wlan_hdd_is_session_type_monitor( adapter->device_mode) && ucfg_pkt_capture_get_mode(hdd_ctx->psoc) != diff --git a/core/hdd/src/wlan_hdd_sap_cond_chan_switch.c b/core/hdd/src/wlan_hdd_sap_cond_chan_switch.c index 7eb6d637e1e1..4230c92baaaa 100644 --- a/core/hdd/src/wlan_hdd_sap_cond_chan_switch.c +++ b/core/hdd/src/wlan_hdd_sap_cond_chan_switch.c @@ -1,5 +1,6 @@ /* * Copyright (c) 2012-2021 The Linux Foundation. All rights reserved. + * Copyright (c) 2023 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 @@ -255,7 +256,7 @@ static int __wlan_hdd_request_pre_cac(struct hdd_context *hdd_ctx, if (pre_cac_adapter) { /* Flush existing pre_cac work */ if (hdd_ctx->sap_pre_cac_work.fn) - cds_flush_work(&hdd_ctx->sap_pre_cac_work); + qdf_flush_work(&hdd_ctx->sap_pre_cac_work); } else { if (policy_mgr_get_connection_count(hdd_ctx->psoc) > 1) { hdd_err("pre cac not allowed in concurrency"); From f766bd47ee8e66706710255fb640d6204b446591 Mon Sep 17 00:00:00 2001 From: Madan Koyyalamudi Date: Mon, 6 Mar 2023 23:12:40 -0800 Subject: [PATCH 04/23] Release 2.0.8.32T Release 2.0.8.32T Change-Id: Ic1c61a7e9bd5f9f4bb29dbcfb3f11f94cd70c2e1 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 0cd928499b0b..316a90e9ff78 100644 --- a/core/mac/inc/qwlan_version.h +++ b/core/mac/inc/qwlan_version.h @@ -32,9 +32,9 @@ #define QWLAN_VERSION_MAJOR 2 #define QWLAN_VERSION_MINOR 0 #define QWLAN_VERSION_PATCH 8 -#define QWLAN_VERSION_EXTRA "S" +#define QWLAN_VERSION_EXTRA "T" #define QWLAN_VERSION_BUILD 32 -#define QWLAN_VERSIONSTR "2.0.8.32S" +#define QWLAN_VERSIONSTR "2.0.8.32T" #endif /* QWLAN_VERSION_H */ From bea7d1641b3a7d81f5388b0544833e2ff77610aa Mon Sep 17 00:00:00 2001 From: Surya Prakash Sivaraj Date: Thu, 16 Mar 2023 19:24:00 +0530 Subject: [PATCH 05/23] qcacld-3.0: Modify check to select channel switch announcement method In api sch_set_fixed_beacon_fields(), the channel switch announcement method selection was based on config "CONFIG_CHANNEL_HOPPING_ALL_BANDS" due to which peer STA may not be able to switch channel when MTP is working as SAP and doing channel switching. Modify the check in order to select the channel switch method based on nature of peer STA and operating/target frequency. Change-Id: I3deb09245496d65e6bb3ec27ed7eefd3dcaa27bc CRs-Fixed: 3293983 --- core/mac/src/pe/sch/sch_beacon_gen.c | 92 ++++++++++------------------ 1 file changed, 34 insertions(+), 58 deletions(-) diff --git a/core/mac/src/pe/sch/sch_beacon_gen.c b/core/mac/src/pe/sch/sch_beacon_gen.c index a1f9c02da179..0e9c6ae048fb 100644 --- a/core/mac/src/pe/sch/sch_beacon_gen.c +++ b/core/mac/src/pe/sch/sch_beacon_gen.c @@ -1,6 +1,6 @@ /* * Copyright (c) 2012-2021 The Linux Foundation. All rights reserved. - * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved. + * Copyright (c) 2022-2023 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 @@ -216,6 +216,30 @@ static void sch_get_csa_ecsa_count_offset(uint8_t *ie, uint32_t ie_len, } } +static void +populate_channel_switch_ann(struct mac_context *mac_ctx, + tDot11fBeacon2 *bcn, + struct pe_session *pe_session) +{ + populate_dot11f_chan_switch_ann(mac_ctx, &bcn->ChanSwitchAnn, + pe_session); + pe_debug("csa: mode:%d chan:%d count:%d", + bcn->ChanSwitchAnn.switchMode, + bcn->ChanSwitchAnn.newChannel, + bcn->ChanSwitchAnn.switchCount); + + if (!pe_session->dfsIncludeChanWrapperIe) + return; + + populate_dot11f_chan_switch_wrapper(mac_ctx, + &bcn->ChannelSwitchWrapper, + pe_session); + pe_debug("wrapper: width:%d f0:%d f1:%d", + bcn->ChannelSwitchWrapper.WiderBWChanSwitchAnn.newChanWidth, + bcn->ChannelSwitchWrapper.WiderBWChanSwitchAnn.newCenterChanFreq0, + bcn->ChannelSwitchWrapper.WiderBWChanSwitchAnn.newCenterChanFreq1); +} + /** * sch_set_fixed_beacon_fields() - sets the fixed params in beacon frame * @mac_ctx: mac global context @@ -367,15 +391,12 @@ sch_set_fixed_beacon_fields(struct mac_context *mac_ctx, struct pe_session *sess ext_csa->new_reg_class, ext_csa->new_channel, ext_csa->switch_count); - } else { - populate_dot11f_chan_switch_ann(mac_ctx, - &bcn_2->ChanSwitchAnn, - session); - pe_debug("csa: mode:%d chan:%d count:%d", - bcn_2->ChanSwitchAnn.switchMode, - bcn_2->ChanSwitchAnn.newChannel, - bcn_2->ChanSwitchAnn.switchCount); } + + if (session->lim_non_ecsa_cap_num && + WLAN_REG_IS_24GHZ_CH_FREQ(session->curr_op_freq) && + !is_6ghz_chsw) + populate_channel_switch_ann(mac_ctx, bcn_2, session); } populate_dot11_supp_operating_classes(mac_ctx, @@ -390,55 +411,10 @@ sch_set_fixed_beacon_fields(struct mac_context *mac_ctx, struct pe_session *sess &bcn_2->PowerConstraints); populate_dot11f_tpc_report(mac_ctx, &bcn_2->TPCReport, session); /* Need to insert channel switch announcement here */ - if ((LIM_IS_AP_ROLE(session) - || LIM_IS_P2P_DEVICE_GO(session)) - && session->dfsIncludeChanSwIe == true) { - /* - * Channel switch announcement only if radar is detected - * and SAP has instructed to announce channel switch IEs - * in beacon and probe responses - */ - if (!is_6ghz_chsw) { - populate_dot11f_chan_switch_ann - (mac_ctx, &bcn_2->ChanSwitchAnn, - session); - pe_debug("csa: mode:%d chan:%d count:%d", - bcn_2->ChanSwitchAnn.switchMode, - bcn_2->ChanSwitchAnn.newChannel, - bcn_2->ChanSwitchAnn.switchCount); - } - /* - * TODO: depending the CB mode, extended channel switch - * announcement need to be called - */ - /* - populate_dot11f_ext_chan_switch_ann(mac_ctx, - &bcn_2->ExtChanSwitchAnn, session); - */ - /* - * TODO: If in 11AC mode, wider bw channel switch - * announcement needs to be called - */ - /* - populate_dot11f_wider_bw_chan_switch_ann(mac_ctx, - &bcn_2->WiderBWChanSwitchAnn, session); - */ - /* - * Populate the Channel Switch Wrapper Element if - * SAP operates in 40/80 Mhz Channel Width. - */ - if (true == session->dfsIncludeChanWrapperIe) { - populate_dot11f_chan_switch_wrapper(mac_ctx, - &bcn_2->ChannelSwitchWrapper, session); - pe_debug("wrapper: width:%d f0:%d f1:%d", - bcn_2->ChannelSwitchWrapper. - WiderBWChanSwitchAnn.newChanWidth, - bcn_2->ChannelSwitchWrapper. - WiderBWChanSwitchAnn.newCenterChanFreq0, - bcn_2->ChannelSwitchWrapper. - WiderBWChanSwitchAnn.newCenterChanFreq1 - ); - } + if ((LIM_IS_AP_ROLE(session) || + LIM_IS_P2P_DEVICE_GO(session)) && + session->dfsIncludeChanSwIe && !is_6ghz_chsw) { + populate_channel_switch_ann(mac_ctx, bcn_2, session); } } if (mac_ctx->rrm.rrmConfig.sap_rrm_enabled) From ac4df9eb9dc312ae04155d43223fb3387b1ca828 Mon Sep 17 00:00:00 2001 From: Madan Koyyalamudi Date: Thu, 16 Mar 2023 23:32:48 -0700 Subject: [PATCH 06/23] Release 2.0.8.32U Release 2.0.8.32U Change-Id: I7d790b3fe36df9f685661ae2a9697868d51c6bc8 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 316a90e9ff78..80ef94507c93 100644 --- a/core/mac/inc/qwlan_version.h +++ b/core/mac/inc/qwlan_version.h @@ -32,9 +32,9 @@ #define QWLAN_VERSION_MAJOR 2 #define QWLAN_VERSION_MINOR 0 #define QWLAN_VERSION_PATCH 8 -#define QWLAN_VERSION_EXTRA "T" +#define QWLAN_VERSION_EXTRA "U" #define QWLAN_VERSION_BUILD 32 -#define QWLAN_VERSIONSTR "2.0.8.32T" +#define QWLAN_VERSIONSTR "2.0.8.32U" #endif /* QWLAN_VERSION_H */ From db7294ed01fb5da9b2be713697ba33ebf9e7e8f2 Mon Sep 17 00:00:00 2001 From: Krupali Dhanvijay Date: Tue, 27 Dec 2022 22:49:59 +0530 Subject: [PATCH 07/23] qcacld-3.0: Send driver disconnect internal reason code to user space Send the driver disconnect internal reason code as an event to user space using QCA_NL80211_VENDOR_SUBCMD_DRIVER_DISCONNECT_REASON vendor command. Change-Id: I19959e097c5709d63fbd941583b934e291c3af1c CRs-Fixed: 3371396 --- core/hdd/src/wlan_hdd_cfg80211.c | 30 +++++++++++++++++++++++++++- core/hdd/src/wlan_hdd_sta_info.h | 4 ++++ core/hdd/src/wlan_hdd_station_info.c | 4 +--- 3 files changed, 34 insertions(+), 4 deletions(-) diff --git a/core/hdd/src/wlan_hdd_cfg80211.c b/core/hdd/src/wlan_hdd_cfg80211.c index 1bc03e75936e..e7ec3a87528c 100644 --- a/core/hdd/src/wlan_hdd_cfg80211.c +++ b/core/hdd/src/wlan_hdd_cfg80211.c @@ -169,7 +169,8 @@ #define g_mode_rates_size (12) #define a_mode_rates_size (8) - +#define DRIVER_DISCONNECT_REASON_INDEX \ + QCA_NL80211_VENDOR_SUBCMD_DRIVER_DISCONNECT_REASON_INDEX /** * rtt_is_initiator - Macro to check if the bitmap has any RTT roles set * @bitmap: The bitmap to be checked @@ -1700,6 +1701,10 @@ static const struct nl80211_vendor_cmd_info wlan_hdd_cfg80211_vendor_events[] = .vendor_id = QCA_NL80211_VENDOR_ID, .subcmd = QCA_NL80211_VENDOR_SUBCMD_UPDATE_STA_INFO, }, + [QCA_NL80211_VENDOR_SUBCMD_DRIVER_DISCONNECT_REASON_INDEX] = { + .vendor_id = QCA_NL80211_VENDOR_ID, + .subcmd = QCA_NL80211_VENDOR_SUBCMD_DRIVER_DISCONNECT_REASON, + }, #ifdef WLAN_SUPPORT_TWT FEATURE_TWT_VENDOR_EVENTS #endif @@ -22146,6 +22151,9 @@ wlan_hdd_cfg80211_indicate_disconnect(struct hdd_adapter *adapter, uint16_t disconnect_ies_len) { enum ieee80211_reasoncode ieee80211_reason; + struct sk_buff *vendor_event; + int flags; + struct hdd_context *hdd_ctx = WLAN_HDD_GET_CTX(adapter); ieee80211_reason = wlan_hdd_get_cfg80211_disconnect_reason(adapter, reason); @@ -22155,6 +22163,26 @@ wlan_hdd_cfg80211_indicate_disconnect(struct hdd_adapter *adapter, adapter->last_disconnect_reason, hdd_qca_reason_to_str(adapter->last_disconnect_reason), locally_generated); + + flags = cds_get_gfp_flags(); + vendor_event = + cfg80211_vendor_event_alloc( + hdd_ctx->wiphy, &(adapter->wdev), NLMSG_HDRLEN + + sizeof(adapter->last_disconnect_reason) + + NLMSG_HDRLEN, DRIVER_DISCONNECT_REASON_INDEX, flags); + if (!vendor_event) { + hdd_err("cfg80211_vendor_event_alloc failed"); + return; + } + + if (nla_put_u32(vendor_event, DISCONNECT_REASON, + adapter->last_disconnect_reason)) { + hdd_err("DISCONNECT_REASON put fail"); + kfree_skb(vendor_event); + goto send_disconnect; + } + cfg80211_vendor_event(vendor_event, flags); +send_disconnect: cfg80211_disconnected(adapter->dev, ieee80211_reason, disconnect_ies, disconnect_ies_len, locally_generated, GFP_KERNEL); diff --git a/core/hdd/src/wlan_hdd_sta_info.h b/core/hdd/src/wlan_hdd_sta_info.h index 20d0152e89b0..1412688a5b73 100644 --- a/core/hdd/src/wlan_hdd_sta_info.h +++ b/core/hdd/src/wlan_hdd_sta_info.h @@ -1,5 +1,6 @@ /* * Copyright (c) 2019-2020 The Linux Foundation. All rights reserved. + * Copyright (c) 2022-2023 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 @@ -38,6 +39,9 @@ /* Opaque handle for abstraction */ #define hdd_sta_info_entry qdf_list_node_t +#define DISCONNECT_REASON \ + QCA_WLAN_VENDOR_ATTR_GET_STATION_INFO_DRIVER_DISCONNECT_REASON + /** * struct dhcp_phase - Per Peer DHCP Phases * @DHCP_PHASE_ACK: upon receiving DHCP_ACK/NAK message in REQUEST phase or diff --git a/core/hdd/src/wlan_hdd_station_info.c b/core/hdd/src/wlan_hdd_station_info.c index b948e7ad2b45..ca95b647404b 100644 --- a/core/hdd/src/wlan_hdd_station_info.c +++ b/core/hdd/src/wlan_hdd_station_info.c @@ -1,6 +1,6 @@ /* * Copyright (c) 2012-2020 The Linux Foundation. All rights reserved. - * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved. + * Copyright (c) 2022-2023 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 @@ -135,8 +135,6 @@ QCA_WLAN_VENDOR_ATTR_GET_STATION_INFO_REMOTE_RX_RETRY_COUNT #define REMOTE_RX_BC_MC_COUNT \ QCA_WLAN_VENDOR_ATTR_GET_STATION_INFO_REMOTE_RX_BC_MC_COUNT -#define DISCONNECT_REASON \ - QCA_WLAN_VENDOR_ATTR_GET_STATION_INFO_DRIVER_DISCONNECT_REASON #define BEACON_IES \ QCA_WLAN_VENDOR_ATTR_GET_STATION_INFO_BEACON_IES #define ASSOC_REQ_IES \ From 40cea3db7e6602cf61e4118e28ae0826b48570cd Mon Sep 17 00:00:00 2001 From: Asutosh Mohapatra Date: Tue, 3 Jan 2023 22:26:32 -0800 Subject: [PATCH 08/23] qcacld-3.0: Add new INI to separate scan policy for rest of world users Currently host drops an AP from scan list if host country is set to US and AP country is non-US. This implementation violates our standard regulatory scan policy. To address this issue, introduce a new INI to differentiate between our standard regulatory policy with others. Change-Id: Ie6bd2d1925048aef427136b34d00d361955f40b2 CRs-Fixed: 3377242 --- components/mlme/core/src/wlan_mlme_main.c | 25 ++++++++++++++++- .../mlme/dispatcher/inc/cfg_mlme_generic.h | 28 +++++++++++++++++-- .../mlme/dispatcher/inc/wlan_mlme_api.h | 23 +++++++++++++++ .../dispatcher/inc/wlan_mlme_public_struct.h | 6 +++- .../mlme/dispatcher/inc/wlan_mlme_ucfg_api.h | 19 ++++++++++++- .../mlme/dispatcher/src/wlan_mlme_api.c | 17 +++++++++++ core/hdd/src/wlan_hdd_main.c | 12 ++++++++ 7 files changed, 125 insertions(+), 5 deletions(-) diff --git a/components/mlme/core/src/wlan_mlme_main.c b/components/mlme/core/src/wlan_mlme_main.c index a283dfd3c622..66f4ef140432 100644 --- a/components/mlme/core/src/wlan_mlme_main.c +++ b/components/mlme/core/src/wlan_mlme_main.c @@ -1,6 +1,6 @@ /* * Copyright (c) 2018-2020 The Linux Foundation. All rights reserved. - * Copyright (c) 2021-2022 Qualcomm Innovation Center, Inc. All rights reserved. + * Copyright (c) 2021-2023 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 @@ -382,6 +382,28 @@ mlme_init_lpass_support_cfg(struct wlan_objmgr_psoc *psoc, } #endif +#ifdef CONFIG_BAND_6GHZ +/** + * mlme_init_standard_6ghz_conn_policy() - initialize standard 6GHz + * policy connection flag + * @psoc: Pointer to PSOC + * @gen: pointer to generic CFG items + * + * Return: None + */ +static void mlme_init_standard_6ghz_conn_policy(struct wlan_objmgr_psoc *psoc, + struct wlan_mlme_generic *gen) +{ + gen->std_6ghz_conn_policy = + cfg_get(psoc, CFG_6GHZ_STANDARD_CONNECTION_POLICY); +} +#else +static void mlme_init_standard_6ghz_conn_policy(struct wlan_objmgr_psoc *psoc, + struct wlan_mlme_generic *gen) +{ +} +#endif + /** * mlme_init_mgmt_hw_tx_retry_count_cfg() - initialize mgmt hw tx retry count * @psoc: Pointer to PSOC @@ -490,6 +512,7 @@ static void mlme_init_generic_cfg(struct wlan_objmgr_psoc *psoc, cfg_get(psoc, CFG_MONITOR_MODE_CONCURRENCY); gen->tx_retry_multiplier = cfg_get(psoc, CFG_TX_RETRY_MULTIPLIER); mlme_init_mgmt_hw_tx_retry_count_cfg(psoc, gen); + mlme_init_standard_6ghz_conn_policy(psoc, gen); } static void mlme_init_edca_ani_cfg(struct wlan_objmgr_psoc *psoc, diff --git a/components/mlme/dispatcher/inc/cfg_mlme_generic.h b/components/mlme/dispatcher/inc/cfg_mlme_generic.h index 4e2d58d26744..c255039a09be 100644 --- a/components/mlme/dispatcher/inc/cfg_mlme_generic.h +++ b/components/mlme/dispatcher/inc/cfg_mlme_generic.h @@ -1,6 +1,6 @@ /* * Copyright (c) 2012-2021 The Linux Foundation. All rights reserved. - * Copyright (c) 2021 Qualcomm Innovation Center, Inc. All rights reserved. + * Copyright (c) 2021-2023 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 @@ -167,6 +167,29 @@ enum monitor_mode_concurrency { 1, \ "rf test mode Enable Flag") +#ifdef CONFIG_BAND_6GHZ +/* + * standard_6ghz_connection_policy - Enable 6 GHz standard connection policy + * @Min: 0 + * @Max: 1 + * @Default: 1 + * + * This ini is used to set standard 6 GHz policies where STA will be + * allowed to scan and connect to any 6 GHz AP. + * + * Related: None + * + * Supported Feature: STA + */ +#define CFG_6GHZ_STANDARD_CONNECTION_POLICY CFG_INI_BOOL( \ + "standard_6ghz_connection_policy", \ + 1, \ + "6ghz standard 6 GHZ connection policy") +#define CFG_6GHZ_STD_CONN_POLICY CFG(CFG_6GHZ_STANDARD_CONNECTION_POLICY) +#else +#define CFG_6GHZ_STD_CONN_POLICY +#endif + /* * * BandCapability - Preferred band (0: 2.4G, 5G, and 6G, @@ -949,5 +972,6 @@ enum monitor_mode_concurrency { CFG(CFG_WLS_6GHZ_CAPABLE) \ CFG(CFG_MONITOR_MODE_CONCURRENCY)\ CFG(CFG_TX_RETRY_MULTIPLIER) \ - CFG(CFG_MGMT_FRAME_HW_TX_RETRY_COUNT) + CFG(CFG_MGMT_FRAME_HW_TX_RETRY_COUNT) \ + CFG_6GHZ_STD_CONN_POLICY #endif /* __CFG_MLME_GENERIC_H */ diff --git a/components/mlme/dispatcher/inc/wlan_mlme_api.h b/components/mlme/dispatcher/inc/wlan_mlme_api.h index 1bf5978842d5..a5587a1a3845 100644 --- a/components/mlme/dispatcher/inc/wlan_mlme_api.h +++ b/components/mlme/dispatcher/inc/wlan_mlme_api.h @@ -2194,6 +2194,29 @@ wlan_mlme_get_sta_miracast_mcc_rest_time(struct wlan_objmgr_psoc *psoc, QDF_STATUS wlan_mlme_get_sap_mcc_chnl_avoid(struct wlan_objmgr_psoc *psoc, uint8_t *value); + +#ifdef CONFIG_BAND_6GHZ +/** + * wlan_mlme_is_standard_6ghz_conn_policy_enabled() - Get the 6 GHz standard + * connection policy flag + * @psoc: psoc context + * @value: Enable/Disable value ptr. + * + * Return: QDF_STATUS + */ +QDF_STATUS +wlan_mlme_is_standard_6ghz_conn_policy_enabled(struct wlan_objmgr_psoc *psoc, + bool *value); +#else +static inline QDF_STATUS +wlan_mlme_is_standard_6ghz_conn_policy_enabled(struct wlan_objmgr_psoc *psoc, + bool *value) +{ + *value = false; + return QDF_STATUS_SUCCESS; +} +#endif + /** * wlan_mlme_get_mcc_bcast_prob_resp() - Get broadcast probe rsp in MCC * diff --git a/components/mlme/dispatcher/inc/wlan_mlme_public_struct.h b/components/mlme/dispatcher/inc/wlan_mlme_public_struct.h index 19ce7447dad7..12d2f7de3c15 100644 --- a/components/mlme/dispatcher/inc/wlan_mlme_public_struct.h +++ b/components/mlme/dispatcher/inc/wlan_mlme_public_struct.h @@ -1,6 +1,6 @@ /* * Copyright (c) 2018-2020 The Linux Foundation. All rights reserved. - * Copyright (c) 2021-2022 Qualcomm Innovation Center, Inc. All rights reserved. + * Copyright (c) 2021-2023 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 @@ -1252,6 +1252,7 @@ enum mlme_cfg_frame_type { * @ocv_support: FW supports OCV or not * @tx_retry_multiplier: TX xretry extension parameter * @mgmt_hw_tx_retry_count: MGMT HW tx retry count for frames + * @std_6ghz_conn_policy: 6GHz standard connection policy */ struct wlan_mlme_generic { uint32_t band_capability; @@ -1298,6 +1299,9 @@ struct wlan_mlme_generic { bool ocv_support; uint32_t tx_retry_multiplier; uint8_t mgmt_hw_tx_retry_count[CFG_FRAME_TYPE_MAX]; +#ifdef CONFIG_BAND_6GHZ + bool std_6ghz_conn_policy; +#endif }; /* diff --git a/components/mlme/dispatcher/inc/wlan_mlme_ucfg_api.h b/components/mlme/dispatcher/inc/wlan_mlme_ucfg_api.h index 8a6e74c896cb..bbf3c454e0c1 100644 --- a/components/mlme/dispatcher/inc/wlan_mlme_ucfg_api.h +++ b/components/mlme/dispatcher/inc/wlan_mlme_ucfg_api.h @@ -1,6 +1,6 @@ /* * Copyright (c) 2018-2021 The Linux Foundation. All rights reserved. - * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved. + * Copyright (c) 2022-2023 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 @@ -2694,6 +2694,23 @@ ucfg_mlme_set_rf_test_mode_enabled(struct wlan_objmgr_psoc *psoc, bool value) return wlan_mlme_set_rf_test_mode_enabled(psoc, value); } +/** + * ucfg_mlme_is_standard_6ghz_conn_policy_enabled() - Get 6ghz standard + * connection policy flag + * @psoc: pointer to psoc object + * @value: pointer to hold the value of flag + * + * Inline UCFG API to be used by HDD/OSIF callers + * + * Return: QDF Status + */ +static inline QDF_STATUS +ucfg_mlme_is_standard_6ghz_conn_policy_enabled(struct wlan_objmgr_psoc *psoc, + bool *value) +{ + return wlan_mlme_is_standard_6ghz_conn_policy_enabled(psoc, value); +} + /** * ucfg_mlme_get_opr_rate() - Get operational rate set * @psoc: pointer to vdev object diff --git a/components/mlme/dispatcher/src/wlan_mlme_api.c b/components/mlme/dispatcher/src/wlan_mlme_api.c index 2dc3b418de18..ca69d7cfd051 100644 --- a/components/mlme/dispatcher/src/wlan_mlme_api.c +++ b/components/mlme/dispatcher/src/wlan_mlme_api.c @@ -2775,6 +2775,23 @@ wlan_mlme_set_rf_test_mode_enabled(struct wlan_objmgr_psoc *psoc, bool value) return QDF_STATUS_SUCCESS; } +#ifdef CONFIG_BAND_6GHZ +QDF_STATUS +wlan_mlme_is_standard_6ghz_conn_policy_enabled(struct wlan_objmgr_psoc *psoc, + bool *value) +{ + struct wlan_mlme_psoc_ext_obj *mlme_obj; + + mlme_obj = mlme_get_psoc_ext_obj(psoc); + if (!mlme_obj) + return QDF_STATUS_E_FAILURE; + + *value = mlme_obj->cfg.gen.std_6ghz_conn_policy; + + return QDF_STATUS_SUCCESS; +} +#endif + QDF_STATUS wlan_mlme_cfg_set_vht_chan_width(struct wlan_objmgr_psoc *psoc, uint8_t value) { diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c index 69500ce5819f..68cdfec4e54a 100644 --- a/core/hdd/src/wlan_hdd_main.c +++ b/core/hdd/src/wlan_hdd_main.c @@ -14304,6 +14304,7 @@ static int hdd_features_init(struct hdd_context *hdd_ctx) mac_handle_t mac_handle; bool b_cts2self, is_imps_enabled; bool rf_test_mode; + bool std_6ghz_conn_policy; hdd_enter(); @@ -14402,6 +14403,17 @@ static int hdd_features_init(struct hdd_context *hdd_ctx) wlan_cm_set_6ghz_key_mgmt_mask(hdd_ctx->psoc, ALLOWED_KEYMGMT_6G_MASK); } + + status = ucfg_mlme_is_standard_6ghz_conn_policy_enabled(hdd_ctx->psoc, + &std_6ghz_conn_policy); + + if (!QDF_IS_STATUS_SUCCESS(status)) { + hdd_err("Get 6ghz standard connection policy failed"); + return QDF_STATUS_E_FAILURE; + } + if (std_6ghz_conn_policy) + wlan_cm_set_standard_6ghz_conn_policy(hdd_ctx->psoc, true); + hdd_thermal_stats_cmd_init(hdd_ctx); sme_set_cal_failure_event_cb(hdd_ctx->mac_handle, hdd_cal_fail_send_event); From 86ed461595399e297410d3ef76588dba7340d3a4 Mon Sep 17 00:00:00 2001 From: Madan Koyyalamudi Date: Wed, 5 Apr 2023 01:15:37 -0700 Subject: [PATCH 09/23] Release 2.0.8.32V Release 2.0.8.32V Change-Id: I7b034714a6b5295472491f66dd36a4c4679090e9 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 80ef94507c93..676c01ed532a 100644 --- a/core/mac/inc/qwlan_version.h +++ b/core/mac/inc/qwlan_version.h @@ -32,9 +32,9 @@ #define QWLAN_VERSION_MAJOR 2 #define QWLAN_VERSION_MINOR 0 #define QWLAN_VERSION_PATCH 8 -#define QWLAN_VERSION_EXTRA "U" +#define QWLAN_VERSION_EXTRA "V" #define QWLAN_VERSION_BUILD 32 -#define QWLAN_VERSIONSTR "2.0.8.32U" +#define QWLAN_VERSIONSTR "2.0.8.32V" #endif /* QWLAN_VERSION_H */ From 0ef14e0f0b08202b6890a41b76b31b9a7b948d1f Mon Sep 17 00:00:00 2001 From: Surya Prakash Sivaraj Date: Thu, 30 Mar 2023 17:06:32 +0530 Subject: [PATCH 10/23] qcacld-3.0: Do not drop retry assoc req if RMF enabled Upon reception of assoc request from an already associated PMF-enabled STA, the SAP is expected to start SA-Query mechanism. On the other hand, host driver drops all the retried assoc request frames if the STA is already in connected state. This is valid as long as the original assoc request is currently under processing(to prevent duplicate processing). However, for reassoc attempt cases, this assoc request with retry bit set could be the first assoc request under processing. Therefore, change the logic to drop only retry-bit set assoc requests in non-PMF STA cases. For PMF-enabled STA, drop the assoc requests only if key installation is pending. Otherwise, send SA query. Change-Id: I1f3a564864e70f4e11994698389be427ac202fa3 CRs-Fixed: 3446033 --- .../src/pe/lim/lim_process_assoc_req_frame.c | 32 +++++++++++-------- 1 file changed, 19 insertions(+), 13 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 d39211873c14..dca2042b2874 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 @@ -1,6 +1,6 @@ /* * Copyright (c) 2012-2020 The Linux Foundation. All rights reserved. - * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved. + * Copyright (c) 2022-2023 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 @@ -2298,14 +2298,20 @@ void lim_process_assoc_req_frame(struct mac_context *mac_ctx, uint8_t *rx_pkt_in */ sta_ds = dph_lookup_hash_entry(mac_ctx, hdr->sa, &assoc_id, &session->dph.dphHashTable); - if (sta_ds) { + if (sta_ds && !sta_ds->rmfEnabled) { + /** + * Drop only retries for non-PMF assoc requests. + * For PMF case: + * a) Before key installation - Drop assoc request + * b) After key installation - Send SA query + */ if (hdr->fc.retry > 0) { pe_err("STA is initiating Assoc Req after ACK lost. Do not process sessionid: %d sys sub_type=%d for role=%d from: " QDF_MAC_ADDR_FMT, session->peSessionId, sub_type, GET_LIM_SYSTEM_ROLE(session), QDF_MAC_ADDR_REF(hdr->sa)); return; - } else if (!sta_ds->rmfEnabled && (sub_type == LIM_REASSOC)) { + } else if (sub_type == LIM_REASSOC) { /* * SAP should send reassoc response with reject code * to avoid IOT issues. as per the specification SAP @@ -2319,7 +2325,7 @@ void lim_process_assoc_req_frame(struct mac_context *mac_ctx, uint8_t *rx_pkt_in sub_type, sta_ds, session, false); pe_err("Rejecting reassoc req from STA"); return; - } else if (!sta_ds->rmfEnabled) { + } else { /* * Do this only for non PMF case. * STA might have missed the assoc response, so it is @@ -2336,16 +2342,16 @@ void lim_process_assoc_req_frame(struct mac_context *mac_ctx, uint8_t *rx_pkt_in session->limSystemRole, QDF_MAC_ADDR_REF(hdr->sa)); return; - } else if (sta_ds->rmfEnabled && !sta_ds->is_key_installed) { - /* When PMF enabled, SA Query will be triggered - * unexpectly if duplicated assoc_req received - - * 1) after pre_auth node deleted and - * 2) before key installed. - * Here drop such duplicated assoc_req frame. - */ - pe_err("Drop duplicate assoc_req before 4-way HS"); - return; } + } else if (sta_ds && sta_ds->rmfEnabled && !sta_ds->is_key_installed) { + /* When PMF enabled, SA Query will be triggered + * unexpectly if duplicated assoc_req received - + * 1) after pre_auth node deleted and + * 2) before key installed. + * Here drop such duplicated assoc_req frame. + */ + pe_err("Drop duplicate assoc_req before 4-way HS"); + return; } status = lim_check_sta_in_pe_entries(mac_ctx, hdr, session->peSessionId, From 386d0eb5fcebc7ff076638221ce76541089d917f Mon Sep 17 00:00:00 2001 From: Madan Koyyalamudi Date: Wed, 12 Apr 2023 07:20:15 -0700 Subject: [PATCH 11/23] Release 2.0.8.32W Release 2.0.8.32W Change-Id: Ib9f2ce4009627be4005d19ff6f8c9072622399fd 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 676c01ed532a..b9dda3c54bf7 100644 --- a/core/mac/inc/qwlan_version.h +++ b/core/mac/inc/qwlan_version.h @@ -32,9 +32,9 @@ #define QWLAN_VERSION_MAJOR 2 #define QWLAN_VERSION_MINOR 0 #define QWLAN_VERSION_PATCH 8 -#define QWLAN_VERSION_EXTRA "V" +#define QWLAN_VERSION_EXTRA "W" #define QWLAN_VERSION_BUILD 32 -#define QWLAN_VERSIONSTR "2.0.8.32V" +#define QWLAN_VERSIONSTR "2.0.8.32W" #endif /* QWLAN_VERSION_H */ From 4e4c2377e870d2a4ae0b7c1a48095ead0c116d01 Mon Sep 17 00:00:00 2001 From: Srikanth Marepalli Date: Fri, 3 Mar 2023 18:03:58 +0530 Subject: [PATCH 12/23] qcacld-3.0: Allow roaming to configured roaming band only Here upper layer configures roam band via the SETROAMBAND NCHO command. This means DUT should be restricted to roam to the configured band only but as per current PCL filtration logic, DUT is allowed to roam beyond the configured band AP also. Roam Band definition is: 0: auto (all supported bands) 1: 2.4 only 2: 5 only 3: 2.4 + 5 4: 6 only 5: 2.4 + 6 6: 5 + 6 7: 2.4 + 5 + 6 Fix is to update the PCL filtration logic in wma_send_set_pcl_cmd and make sure DUT doesn't roam beyond the configured band AP. Change-Id: Ia2353e8ff982609a4ab5a35715886648f140cd22 CRs-Fixed: 3158456 --- core/wma/src/wma_main.c | 84 ++++++++++++++++++++++++++++++++++++----- 1 file changed, 75 insertions(+), 9 deletions(-) diff --git a/core/wma/src/wma_main.c b/core/wma/src/wma_main.c index dbe8e0275ca2..b48b2729e9ae 100644 --- a/core/wma/src/wma_main.c +++ b/core/wma/src/wma_main.c @@ -1,6 +1,6 @@ /* * Copyright (c) 2013-2021 The Linux Foundation. All rights reserved. - * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved. + * Copyright (c) 2022-2023 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 @@ -9323,27 +9323,97 @@ QDF_STATUS wma_send_set_pcl_cmd(tp_wma_handle wma_handle, } msg->chan_weights.saved_num_chan = wma_handle->saved_chan.num_channels; + status = policy_mgr_get_valid_chan_weights(wma_handle->psoc, (struct policy_mgr_pcl_chan_weights *)&msg->chan_weights, PM_STA_MODE); + if (QDF_IS_STATUS_ERROR(status)) { + wma_err("Error in creating weighed pcl"); + return status; + } for (i = 0; i < msg->chan_weights.saved_num_chan; i++) { msg->chan_weights.weighed_valid_list[i] = wma_map_pcl_weights( msg->chan_weights.weighed_valid_list[i]); - /* Dont allow roaming on 2G when 5G_ONLY configured */ + + if (msg->band_mask == + (BIT(REG_BAND_2G) | BIT(REG_BAND_5G) | BIT(REG_BAND_6G))) + continue; + + /* + * Dont allow roaming on 5G/6G band if only 2G band configured + * as supported roam band mask + */ + if (((wma_handle->bandcapability == BAND_2G) || + (msg->band_mask == BIT(REG_BAND_2G))) && + !WLAN_REG_IS_24GHZ_CH_FREQ( + msg->chan_weights.saved_chan_list[i])) { + msg->chan_weights.weighed_valid_list[i] = + WEIGHT_OF_DISALLOWED_CHANNELS; + continue; + } + + /* + * Dont allow roaming on 2G/6G band if only 5G band configured + * as supported roam band mask + */ if (((wma_handle->bandcapability == BAND_5G) || (msg->band_mask == BIT(REG_BAND_5G))) && + !WLAN_REG_IS_5GHZ_CH_FREQ( + msg->chan_weights.saved_chan_list[i])) { + msg->chan_weights.weighed_valid_list[i] = + WEIGHT_OF_DISALLOWED_CHANNELS; + continue; + } + + /* + * Dont allow roaming on 2G/5G band if only 6G band configured + * as supported roam band mask + */ + if (msg->band_mask == BIT(REG_BAND_6G) && + !WLAN_REG_IS_6GHZ_CHAN_FREQ( + msg->chan_weights.saved_chan_list[i])) { + msg->chan_weights.weighed_valid_list[i] = + WEIGHT_OF_DISALLOWED_CHANNELS; + continue; + } + + /* + * Dont allow roaming on 6G band if only 2G + 5G band configured + * as supported roam band mask. + */ + if (msg->band_mask == (BIT(REG_BAND_2G) | BIT(REG_BAND_5G)) && + (WLAN_REG_IS_6GHZ_CHAN_FREQ( + msg->chan_weights.saved_chan_list[i]))) { + msg->chan_weights.weighed_valid_list[i] = + WEIGHT_OF_DISALLOWED_CHANNELS; + continue; + } + + /* + * Dont allow roaming on 2G band if only 5G + 6G band configured + * as supported roam band mask. + */ + if (msg->band_mask == (BIT(REG_BAND_5G) | BIT(REG_BAND_6G)) && (WLAN_REG_IS_24GHZ_CH_FREQ( msg->chan_weights.saved_chan_list[i]))) { msg->chan_weights.weighed_valid_list[i] = WEIGHT_OF_DISALLOWED_CHANNELS; + continue; } - if (msg->band_mask == BIT(REG_BAND_2G) && - !WLAN_REG_IS_24GHZ_CH_FREQ( - msg->chan_weights.saved_chan_list[i])) + + /* + * Dont allow roaming on 5G band if only 2G + 6G band configured + * as supported roam band mask. + */ + if (msg->band_mask == (BIT(REG_BAND_2G) | BIT(REG_BAND_6G)) && + (WLAN_REG_IS_5GHZ_CH_FREQ( + msg->chan_weights.saved_chan_list[i]))) { msg->chan_weights.weighed_valid_list[i] = WEIGHT_OF_DISALLOWED_CHANNELS; + continue; + } is_channel_allowed = policy_mgr_is_sta_chan_valid_for_connect_and_roam( @@ -9354,10 +9424,6 @@ QDF_STATUS wma_send_set_pcl_cmd(tp_wma_handle wma_handle, WEIGHT_OF_DISALLOWED_CHANNELS; } - if (!QDF_IS_STATUS_SUCCESS(status)) { - wma_err("Error in creating weighed pcl"); - return status; - } wma_debug("Dump channel list send to wmi"); policy_mgr_dump_channel_list(msg->chan_weights.saved_num_chan, msg->chan_weights.saved_chan_list, From 08405a88075b7d6b5129a5539581166afce4e769 Mon Sep 17 00:00:00 2001 From: Madan Koyyalamudi Date: Mon, 17 Apr 2023 05:42:37 -0700 Subject: [PATCH 13/23] Release 2.0.8.32X Release 2.0.8.32X Change-Id: I8100322f3d86ac08b426674be01deb801bdd9b51 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 b9dda3c54bf7..63f733f4ccf7 100644 --- a/core/mac/inc/qwlan_version.h +++ b/core/mac/inc/qwlan_version.h @@ -32,9 +32,9 @@ #define QWLAN_VERSION_MAJOR 2 #define QWLAN_VERSION_MINOR 0 #define QWLAN_VERSION_PATCH 8 -#define QWLAN_VERSION_EXTRA "W" +#define QWLAN_VERSION_EXTRA "X" #define QWLAN_VERSION_BUILD 32 -#define QWLAN_VERSIONSTR "2.0.8.32W" +#define QWLAN_VERSIONSTR "2.0.8.32X" #endif /* QWLAN_VERSION_H */ From 3a53872fb4d533a7c2f4cbad21ab6aface641de3 Mon Sep 17 00:00:00 2001 From: Ashish Kumar Dhanotiya Date: Mon, 5 Dec 2022 18:03:07 +0530 Subject: [PATCH 14/23] qcacld-3.0: Update dot11 mode correctly for Getbssinfo Currently host driver does not update dot11 mode info correctly for getbssinfo command if the dot11 mode is 11AX or 11BE. With this fix add a logic to update the dot11 mode info correctly in response to the getbssinfo command. Change-Id: I9ebec3ab43fe4cff1cab5f646bcc93a8c6654fd0 CRs-Fixed: 3353630 --- core/hdd/src/wlan_hdd_station_info.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/core/hdd/src/wlan_hdd_station_info.c b/core/hdd/src/wlan_hdd_station_info.c index ca95b647404b..06debdd2027c 100644 --- a/core/hdd/src/wlan_hdd_station_info.c +++ b/core/hdd/src/wlan_hdd_station_info.c @@ -363,6 +363,9 @@ static int hdd_convert_dot11mode(uint32_t dot11mode) case eCSR_CFG_DOT11_MODE_11AC: ret_val = QCA_WLAN_802_11_MODE_11AC; break; + case eCSR_CFG_DOT11_MODE_11AX: + ret_val = QCA_WLAN_802_11_MODE_11AX; + break; case eCSR_CFG_DOT11_MODE_AUTO: case eCSR_CFG_DOT11_MODE_ABG: default: From 5363d93c4bcaf16219f9f184f36fff87eba6d6de Mon Sep 17 00:00:00 2001 From: Madan Koyyalamudi Date: Tue, 18 Apr 2023 05:27:13 -0700 Subject: [PATCH 15/23] Release 2.0.8.32Y Release 2.0.8.32Y Change-Id: I8e3aa000b9c148a244993e27812913cb01b48cf1 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 63f733f4ccf7..4b5c0eea84fc 100644 --- a/core/mac/inc/qwlan_version.h +++ b/core/mac/inc/qwlan_version.h @@ -32,9 +32,9 @@ #define QWLAN_VERSION_MAJOR 2 #define QWLAN_VERSION_MINOR 0 #define QWLAN_VERSION_PATCH 8 -#define QWLAN_VERSION_EXTRA "X" +#define QWLAN_VERSION_EXTRA "Y" #define QWLAN_VERSION_BUILD 32 -#define QWLAN_VERSIONSTR "2.0.8.32X" +#define QWLAN_VERSIONSTR "2.0.8.32Y" #endif /* QWLAN_VERSION_H */ From bc1baf6cb36d563fad19d99a9d3c5e5ae0a09b8b Mon Sep 17 00:00:00 2001 From: Utkarsh Bhatnagar Date: Mon, 9 Jan 2023 14:16:11 +0530 Subject: [PATCH 16/23] qcacld-3.0: Don't fill CCK rates for SAE Pre Auth frame If while roaming from 2.4 GHz to 5 GHz band with SAE encryption, rates shouldn't be filled from the current session/AP as this may lead to incorrectly filling rates for instance this may lead to incorrectly filling CCk rates for SAE Pre-Auth while roaming from 2.4 GHz to 5 GHz. As even though with roaming offloaded, sae pre_auth due to crypto limitations of fw has to be triggered by the driver. Change-Id: I2293563db047e10ec8a2ade9f3b2a602cf3e3edf CRs-Fixed: 3336853 --- .../src/pe/lim/lim_send_management_frames.c | 28 ++++++++++++++++--- core/mac/src/pe/lim/lim_utils.c | 18 ++++++++++-- core/mac/src/pe/lim/lim_utils.h | 6 ++-- core/sme/inc/csr_api.h | 9 ++++++ core/sme/src/csr/csr_api_roam.c | 2 +- 5 files changed, 53 insertions(+), 10 deletions(-) diff --git a/core/mac/src/pe/lim/lim_send_management_frames.c b/core/mac/src/pe/lim/lim_send_management_frames.c index d505e6704d02..ea07afe0a7cb 100644 --- a/core/mac/src/pe/lim/lim_send_management_frames.c +++ b/core/mac/src/pe/lim/lim_send_management_frames.c @@ -1,6 +1,6 @@ /* * Copyright (c) 2011-2020 The Linux Foundation. All rights reserved. - * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved. + * Copyright (c) 2022-2023 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 @@ -2646,7 +2646,7 @@ lim_send_assoc_req_mgmt_frame(struct mac_context *mac_ctx, QDF_TRACE_HEX_DUMP(QDF_MODULE_ID_PE, QDF_TRACE_LEVEL_DEBUG, frame, (uint16_t)(sizeof(tSirMacMgmtHdr) + payload)); - min_rid = lim_get_min_session_txrate(pe_session); + min_rid = lim_get_min_session_txrate(pe_session, NULL); lim_diag_event_report(mac_ctx, WLAN_PE_DIAG_ASSOC_START_EVENT, pe_session, QDF_STATUS_SUCCESS, QDF_STATUS_SUCCESS); lim_diag_mgmt_tx_event_report(mac_ctx, mac_hdr, @@ -3133,7 +3133,7 @@ alloc_packet: session->peSessionId, mac_hdr->fc.subType)); mac_ctx->auth_ack_status = LIM_ACK_NOT_RCD; - min_rid = lim_get_min_session_txrate(session); + min_rid = lim_get_min_session_txrate(session, NULL); peer_rssi = mac_ctx->lim.bss_rssi; lim_diag_mgmt_tx_event_report(mac_ctx, mac_hdr, session, QDF_STATUS_SUCCESS, QDF_STATUS_SUCCESS); @@ -5700,6 +5700,9 @@ static void lim_tx_mgmt_frame(struct mac_context *mac_ctx, uint8_t vdev_id, struct pe_session *session; uint16_t auth_ack_status; enum rateid min_rid = RATEID_DEFAULT; + qdf_freq_t *pre_auth_freq = NULL; + qdf_freq_t channel_freq = 0; + enum QDF_OPMODE opmode; session = pe_find_session_by_vdev_id(mac_ctx, vdev_id); if (!session) { @@ -5712,7 +5715,24 @@ static void lim_tx_mgmt_frame(struct mac_context *mac_ctx, uint8_t vdev_id, qdf_mtrace(QDF_MODULE_ID_PE, QDF_MODULE_ID_WMA, TRACE_CODE_TX_MGMT, session->peSessionId, 0); - min_rid = lim_get_min_session_txrate(session); + opmode = wlan_get_opmode_from_vdev_id(mac_ctx->pdev, vdev_id); + if (opmode != QDF_NAN_DISC_MODE && fc->subType == SIR_MAC_MGMT_AUTH) { + tpSirFTPreAuthReq pre_auth_req; + uint16_t auth_algo = *(uint16_t *)(frame + + sizeof(tSirMacMgmtHdr)); + + if (auth_algo == eSIR_AUTH_TYPE_SAE) { + if (session->ftPEContext.pFTPreAuthReq) { + pre_auth_req = + session->ftPEContext.pFTPreAuthReq; + channel_freq = + pre_auth_req->pre_auth_channel_freq; + } + pre_auth_freq = &channel_freq; + } + pe_debug("TX SAE pre-auth frame on freq %d", channel_freq); + } + min_rid = lim_get_min_session_txrate(session, pre_auth_freq); qdf_status = wma_tx_frameWithTxComplete(mac_ctx, packet, (uint16_t)msg_len, diff --git a/core/mac/src/pe/lim/lim_utils.c b/core/mac/src/pe/lim/lim_utils.c index 6e85825a8c3f..1922b487c16a 100644 --- a/core/mac/src/pe/lim/lim_utils.c +++ b/core/mac/src/pe/lim/lim_utils.c @@ -1,6 +1,6 @@ /* * Copyright (c) 2011-2020 The Linux Foundation. All rights reserved. - * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved. + * Copyright (c) 2022-2023 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 @@ -8248,15 +8248,27 @@ QDF_STATUS lim_util_get_type_subtype(void *pkt, uint8_t *type, return QDF_STATUS_SUCCESS; } -enum rateid lim_get_min_session_txrate(struct pe_session *session) +enum rateid lim_get_min_session_txrate(struct pe_session *session, + qdf_freq_t *pre_auth_freq) { enum rateid rid = RATEID_DEFAULT; uint8_t min_rate = SIR_MAC_RATE_54, curr_rate, i; - tSirMacRateSet *rateset = &session->rateSet; + tSirMacRateSet *rateset; if (!session) return rid; + rateset = &session->rateSet; + + if (pre_auth_freq) { + pe_debug("updated rateset to pre auth freq %d", + *pre_auth_freq); + if ((*pre_auth_freq)) + csr_get_basic_rates(rateset, *pre_auth_freq); + else + return rid; + } + for (i = 0; i < rateset->numRates; i++) { /* Ignore MSB - set to indicate basic rate */ curr_rate = rateset->rate[i] & 0x7F; diff --git a/core/mac/src/pe/lim/lim_utils.h b/core/mac/src/pe/lim/lim_utils.h index 6b2e0103741b..eaa7d7585adc 100644 --- a/core/mac/src/pe/lim/lim_utils.h +++ b/core/mac/src/pe/lim/lim_utils.h @@ -1,6 +1,6 @@ /* * Copyright (c) 2012-2020 The Linux Foundation. All rights reserved. - * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved. + * Copyright (c) 2022-2023 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 @@ -1687,13 +1687,15 @@ QDF_STATUS lim_util_get_type_subtype(void *pkt, uint8_t *type, /** * lim_get_min_session_txrate() - Get the minimum rate supported in the session * @session: Pointer to PE session + * @pre_auth_freq: Pointer to pre_auth_freq * * This API will find the minimum rate supported by the given PE session and * return the enum rateid corresponding to the rate. * * Return: enum rateid */ -enum rateid lim_get_min_session_txrate(struct pe_session *session); +enum rateid lim_get_min_session_txrate(struct pe_session *session, + qdf_freq_t *pre_auth_freq); /** * lim_send_dfs_chan_sw_ie_update() - updates the channel switch IE in beacon diff --git a/core/sme/inc/csr_api.h b/core/sme/inc/csr_api.h index d2b522974b6b..72da90d303ef 100644 --- a/core/sme/inc/csr_api.h +++ b/core/sme/inc/csr_api.h @@ -1485,6 +1485,15 @@ QDF_STATUS csr_mlme_vdev_disconnect_all_p2p_client_event(uint8_t vdev_id); */ QDF_STATUS csr_mlme_vdev_stop_bss(uint8_t vdev_id); +/* + * csr_get_basic_rates() - Get basic rate for a band + * @b_rates: Basic rate + * @chan_freq: frequency for which basic rate is required + * + * Return: void + */ +void csr_get_basic_rates(tSirMacRateSet *b_rates, uint32_t chan_freq); + /* * csr_mlme_get_concurrent_operation_freq() - Callback for MLME module to * get the concurrent operation frequency diff --git a/core/sme/src/csr/csr_api_roam.c b/core/sme/src/csr/csr_api_roam.c index 0b75b2e3a1e8..aea7767b52b8 100644 --- a/core/sme/src/csr/csr_api_roam.c +++ b/core/sme/src/csr/csr_api_roam.c @@ -14951,7 +14951,7 @@ csr_update_sae_single_pmk_ap_cap(struct mac_context *mac, } #endif -static void csr_get_basic_rates(tSirMacRateSet *b_rates, uint32_t chan_freq) +void csr_get_basic_rates(tSirMacRateSet *b_rates, uint32_t chan_freq) { /* * Some IOT APs don't send supported rates in From 2a716221fb8396421b41b07c424f36224eeb8439 Mon Sep 17 00:00:00 2001 From: Madan Koyyalamudi Date: Wed, 26 Apr 2023 09:22:25 -0700 Subject: [PATCH 17/23] Release 2.0.8.32Z Release 2.0.8.32Z Change-Id: Ia2dce684b4511bdd943a5827f4619ae390ac7dea 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 4b5c0eea84fc..7f2770d52ba7 100644 --- a/core/mac/inc/qwlan_version.h +++ b/core/mac/inc/qwlan_version.h @@ -32,9 +32,9 @@ #define QWLAN_VERSION_MAJOR 2 #define QWLAN_VERSION_MINOR 0 #define QWLAN_VERSION_PATCH 8 -#define QWLAN_VERSION_EXTRA "Y" +#define QWLAN_VERSION_EXTRA "Z" #define QWLAN_VERSION_BUILD 32 -#define QWLAN_VERSIONSTR "2.0.8.32Y" +#define QWLAN_VERSIONSTR "2.0.8.32Z" #endif /* QWLAN_VERSION_H */ From dc9af4e7fb3194af9f300fddf26a86966ea62817 Mon Sep 17 00:00:00 2001 From: Srikanth Marepalli Date: Sat, 15 Apr 2023 00:04:22 +0530 Subject: [PATCH 18/23] qcacld-3.0: Send the 6 GHz channel in WMI_ROAM_CHAN_LIST When the Intra band INI is enabled and the STA connected in 6 GHz band the channel count and frequency are not sent in the WMI_ROAM_CHAN_LIST command as the band is not defined or unknown. As a result of this DUT is unable to trigger partial roam scan in the current connected 6 GHz channel and does a full roam scan. Add the 6 GHz band check in the Intra band enabled case. Change-Id: I765c233d1e6bf71cab186041ebd7df2293be6f05 CRs-Fixed: 3469197 --- core/sme/src/csr/csr_api_roam.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/core/sme/src/csr/csr_api_roam.c b/core/sme/src/csr/csr_api_roam.c index aea7767b52b8..d09e2611c8ea 100644 --- a/core/sme/src/csr/csr_api_roam.c +++ b/core/sme/src/csr/csr_api_roam.c @@ -1839,6 +1839,13 @@ csr_check_band_freq_match(enum band_info band, uint32_t freq) if (band == BAND_5G && WLAN_REG_IS_5GHZ_CH_FREQ(freq)) return true; + /* + * Not adding the band check for now as band_info will be soon + * replaced with reg_wifi_band enum + */ + if (WLAN_REG_IS_6GHZ_CHAN_FREQ(freq)) + return true; + return false; } From 2dfa36c59c063743150b0229b849742ba5cf025c Mon Sep 17 00:00:00 2001 From: Madan Koyyalamudi Date: Mon, 15 May 2023 05:21:02 -0700 Subject: [PATCH 19/23] Release 2.0.8.33 Release 2.0.8.33 Change-Id: I8dde8ce3f99640b2a277914b36cb41eaad42cc9a CRs-Fixed: 774533 --- core/mac/inc/qwlan_version.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/core/mac/inc/qwlan_version.h b/core/mac/inc/qwlan_version.h index 7f2770d52ba7..c0ef4eba2ede 100644 --- a/core/mac/inc/qwlan_version.h +++ b/core/mac/inc/qwlan_version.h @@ -32,9 +32,9 @@ #define QWLAN_VERSION_MAJOR 2 #define QWLAN_VERSION_MINOR 0 #define QWLAN_VERSION_PATCH 8 -#define QWLAN_VERSION_EXTRA "Z" -#define QWLAN_VERSION_BUILD 32 +#define QWLAN_VERSION_EXTRA "" +#define QWLAN_VERSION_BUILD 33 -#define QWLAN_VERSIONSTR "2.0.8.32Z" +#define QWLAN_VERSIONSTR "2.0.8.33" #endif /* QWLAN_VERSION_H */ From 48c010910f53e87304db2ddbaab340148324d934 Mon Sep 17 00:00:00 2001 From: Sai Pavan Akhil Remella Date: Wed, 10 May 2023 11:43:32 +0530 Subject: [PATCH 20/23] qcacld-3.0: Don't start vdev trans if vdev ops is pending Currently for REASSOC command host starts vdev ops and tries to use vdev. In parallel if host receives interface down and starts vdev trans then proceeds to stop adapter and destroys the vdev, this leads to null pointer dereference if vdev is destroyed first. This happens because driver doesn't wait for vdev ops to complete after starting vdev trans. To address this issue, start vdev trans and wait for vdev ops to complete before proceeding to execute further. Change-Id: I363d05f742f7569dffed70cfa9b6bb9a0a766d9e CRs-Fixed: 3445858 --- os_if/sync/src/osif_vdev_sync.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/os_if/sync/src/osif_vdev_sync.c b/os_if/sync/src/osif_vdev_sync.c index 6442f239bcc5..1c1740f7c3c6 100644 --- a/os_if/sync/src/osif_vdev_sync.c +++ b/os_if/sync/src/osif_vdev_sync.c @@ -1,5 +1,6 @@ /* * Copyright (c) 2018-2019 The Linux Foundation. All rights reserved. + * Copyright (c) 2023 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 @@ -255,6 +256,9 @@ int __osif_vdev_sync_trans_start(struct net_device *net_dev, dsc_vdev_trans_start); osif_vdev_sync_unlock(); + if (!errno) + osif_vdev_sync_wait_for_ops(*out_vdev_sync); + return errno; } @@ -269,6 +273,9 @@ int __osif_vdev_sync_trans_start_wait(struct net_device *net_dev, out_vdev_sync, desc, dsc_vdev_trans_start_wait); + if (!errno) + osif_vdev_sync_wait_for_ops(*out_vdev_sync); + return errno; } From 88566769623f78089b5309c405af570807472593 Mon Sep 17 00:00:00 2001 From: Madan Koyyalamudi Date: Thu, 18 May 2023 09:09:33 -0700 Subject: [PATCH 21/23] Release 2.0.8.33A Release 2.0.8.33A Change-Id: Ib7f21d00e7839abd2867a0b826e7e89841f914ba 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 c0ef4eba2ede..b0fcaf164834 100644 --- a/core/mac/inc/qwlan_version.h +++ b/core/mac/inc/qwlan_version.h @@ -32,9 +32,9 @@ #define QWLAN_VERSION_MAJOR 2 #define QWLAN_VERSION_MINOR 0 #define QWLAN_VERSION_PATCH 8 -#define QWLAN_VERSION_EXTRA "" +#define QWLAN_VERSION_EXTRA "A" #define QWLAN_VERSION_BUILD 33 -#define QWLAN_VERSIONSTR "2.0.8.33" +#define QWLAN_VERSIONSTR "2.0.8.33A" #endif /* QWLAN_VERSION_H */ From fc563469de52fa14188855d677b56d1113b7d4e2 Mon Sep 17 00:00:00 2001 From: Amit Mehta Date: Sun, 13 Feb 2022 15:55:23 +0530 Subject: [PATCH 22/23] qcacld-3.0: Print wow_nack reason code Currently, Fw did not set NACK reason code to Host when Fw is not ready for WoW. As part of the new change, Fw will send NACK reason code along with WoW NACK to host. Make changes in host to store and print NACK reason code. Change-Id: Ic978af9572c8de37df3fb926083aac5e6ddefda7 CRs-Fixed: 3481177 --- .../pmo/core/inc/wlan_pmo_suspend_resume.h | 5 +++- components/pmo/core/inc/wlan_pmo_wow.h | 25 ++++++++++++++++++- .../pmo/core/src/wlan_pmo_suspend_resume.c | 13 ++++++---- .../pmo/dispatcher/inc/wlan_pmo_ucfg_api.h | 11 +++++--- .../inc/wlan_pmo_wow_public_struct.h | 6 +++-- .../pmo/dispatcher/src/wlan_pmo_ucfg_api.c | 7 ++++-- 6 files changed, 53 insertions(+), 14 deletions(-) diff --git a/components/pmo/core/inc/wlan_pmo_suspend_resume.h b/components/pmo/core/inc/wlan_pmo_suspend_resume.h index 156ba9cbe118..0cc7a6b72b6d 100644 --- a/components/pmo/core/inc/wlan_pmo_suspend_resume.h +++ b/components/pmo/core/inc/wlan_pmo_suspend_resume.h @@ -1,5 +1,6 @@ /* * Copyright (c) 2017-2018, 2020-2021 The Linux Foundation. All rights reserved. + * Copyright (c) 2023 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 @@ -290,10 +291,12 @@ int pmo_core_psoc_clear_target_wake_up(struct wlan_objmgr_psoc *psoc); * pmo_core_psoc_target_suspend_acknowledge() - update target susspend status * @context: HTC_INIT_INFO->context * @wow_nack: true when wow is rejected + * @reason_code : WoW status reason code * * Return: none */ -void pmo_core_psoc_target_suspend_acknowledge(void *context, bool wow_nack); +void pmo_core_psoc_target_suspend_acknowledge(void *context, bool wow_nack, + uint16_t reason_code); /** * pmo_core_psoc_wakeup_host_event_received() - received host wake up event diff --git a/components/pmo/core/inc/wlan_pmo_wow.h b/components/pmo/core/inc/wlan_pmo_wow.h index df559cc39bb1..593ed833f0f1 100644 --- a/components/pmo/core/inc/wlan_pmo_wow.h +++ b/components/pmo/core/inc/wlan_pmo_wow.h @@ -1,5 +1,6 @@ /* * Copyright (c) 2017-2021 The Linux Foundation. All rights reserved. + * Copyright (c) 2023 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 @@ -421,14 +422,17 @@ bool pmo_core_is_wow_enabled(struct pmo_psoc_priv_obj *psoc_ctx) * pmo_core_set_wow_nack() - Set wow nack flag * @psoc_ctx: Pointer to objmgr psoc handle * @value: true if received wow nack from else false + * @reason_code: WoW status reason code * * Return: None */ static inline -void pmo_core_set_wow_nack(struct pmo_psoc_priv_obj *psoc_ctx, bool value) +void pmo_core_set_wow_nack(struct pmo_psoc_priv_obj *psoc_ctx, bool value, + uint16_t reason_code) { qdf_spin_lock_bh(&psoc_ctx->lock); psoc_ctx->wow.wow_nack = value; + psoc_ctx->wow.reason_code = reason_code; qdf_spin_unlock_bh(&psoc_ctx->lock); } @@ -449,6 +453,25 @@ bool pmo_core_get_wow_nack(struct pmo_psoc_priv_obj *psoc_ctx) return value; } + +/** + * pmo_core_get_wow_reason_code() - Get wow status reason code + * @psoc_ctx: Pointer to objmgr psoc handle + * + * Return: wow status reason code + */ +static inline +uint16_t pmo_core_get_wow_reason_code(struct pmo_psoc_priv_obj *psoc_ctx) +{ + uint16_t value; + + qdf_spin_lock_bh(&psoc_ctx->lock); + value = psoc_ctx->wow.reason_code; + qdf_spin_unlock_bh(&psoc_ctx->lock); + + return value; +} + /** * pmo_core_update_wow_enable_cmd_sent() - update wow enable cmd sent flag * @psoc_ctx: Pointer to objmgr psoc handle diff --git a/components/pmo/core/src/wlan_pmo_suspend_resume.c b/components/pmo/core/src/wlan_pmo_suspend_resume.c index 3a3c144a70ab..dba62a0b43c8 100644 --- a/components/pmo/core/src/wlan_pmo_suspend_resume.c +++ b/components/pmo/core/src/wlan_pmo_suspend_resume.c @@ -1,6 +1,6 @@ /* * Copyright (c) 2017-2021 The Linux Foundation. All rights reserved. - * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved. + * Copyright (c) 2022-2023 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 @@ -735,12 +735,13 @@ pmo_core_enable_wow_in_fw(struct wlan_objmgr_psoc *psoc, struct pmo_psoc_cfg *psoc_cfg = &psoc_ctx->psoc_cfg; QDF_STATUS status; void *hif_ctx; + uint16_t reason_code; pmo_enter(); hif_ctx = pmo_core_psoc_get_hif_handle(psoc); qdf_event_reset(&psoc_ctx->wow.target_suspend); - pmo_core_set_wow_nack(psoc_ctx, false); + pmo_core_set_wow_nack(psoc_ctx, false, 0); host_credits = pmo_tgt_psoc_get_host_credits(psoc); wmi_pending_cmds = pmo_tgt_psoc_get_pending_cmnds(psoc); pmo_debug("Credits:%d; Pending_Cmds: %d", @@ -847,7 +848,8 @@ pmo_core_enable_wow_in_fw(struct wlan_objmgr_psoc *psoc, } if (pmo_core_get_wow_nack(psoc_ctx)) { - pmo_err("FW not ready to WOW"); + reason_code = pmo_core_get_wow_reason_code(psoc_ctx); + pmo_err("FW not ready to WOW reason code: %d", reason_code); pmo_tgt_update_target_suspend_flag(psoc, false); status = QDF_STATUS_E_AGAIN; goto out; @@ -1514,7 +1516,8 @@ out: return status; } -void pmo_core_psoc_target_suspend_acknowledge(void *context, bool wow_nack) +void pmo_core_psoc_target_suspend_acknowledge(void *context, bool wow_nack, + uint16_t reason_code) { struct pmo_psoc_priv_obj *psoc_ctx; struct wlan_objmgr_psoc *psoc = (struct wlan_objmgr_psoc *)context; @@ -1535,7 +1538,7 @@ void pmo_core_psoc_target_suspend_acknowledge(void *context, bool wow_nack) psoc_ctx = pmo_psoc_get_priv(psoc); - pmo_core_set_wow_nack(psoc_ctx, wow_nack); + pmo_core_set_wow_nack(psoc_ctx, wow_nack, reason_code); qdf_event_set(&psoc_ctx->wow.target_suspend); if (!pmo_tgt_psoc_get_runtime_pm_in_progress(psoc)) { if (wow_nack) diff --git a/components/pmo/dispatcher/inc/wlan_pmo_ucfg_api.h b/components/pmo/dispatcher/inc/wlan_pmo_ucfg_api.h index e506331d8a7f..96a4bc13b4a3 100644 --- a/components/pmo/dispatcher/inc/wlan_pmo_ucfg_api.h +++ b/components/pmo/dispatcher/inc/wlan_pmo_ucfg_api.h @@ -1,5 +1,6 @@ /* * Copyright (c) 2017-2021 The Linux Foundation. All rights reserved. + * Copyright (c) 2023 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 @@ -993,11 +994,14 @@ int ucfg_pmo_psoc_clear_target_wake_up(struct wlan_objmgr_psoc *psoc); /** * ucfg_pmo_psoc_target_suspend_acknowledge() - Clear initial wake up status - * @psoc: objmgr psoc handle + * @context: caller-provided context + * @wow_nack: Was WoW NACK'ed + * @reason_code: WoW status reason code * * Return: None */ -void ucfg_pmo_psoc_target_suspend_acknowledge(void *context, bool wow_nack); +void ucfg_pmo_psoc_target_suspend_acknowledge(void *context, bool wow_nack, + uint16_t reason_code); /** * ucfg_pmo_psoc_wakeup_host_event_received() - got host wake up evennt from fwr @@ -1665,7 +1669,8 @@ ucfg_pmo_psoc_clear_target_wake_up(struct wlan_objmgr_psoc *psoc) } static inline void -ucfg_pmo_psoc_target_suspend_acknowledge(void *context, bool wow_nack) +ucfg_pmo_psoc_target_suspend_acknowledge(void *context, bool wow_nack, + uint16_t reason_code) { } diff --git a/components/pmo/dispatcher/inc/wlan_pmo_wow_public_struct.h b/components/pmo/dispatcher/inc/wlan_pmo_wow_public_struct.h index a38e36c8e84b..e1cc1e8625b7 100644 --- a/components/pmo/dispatcher/inc/wlan_pmo_wow_public_struct.h +++ b/components/pmo/dispatcher/inc/wlan_pmo_wow_public_struct.h @@ -1,6 +1,6 @@ /* * Copyright (c) 2017-2021 The Linux Foundation. All rights reserved. - * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved. + * Copyright (c) 2022-2023 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 @@ -224,6 +224,7 @@ enum pmo_wow_state { * @target_suspend: target suspend event * @target_resume: target resume event * @wow_nack: wow negative ack flag + * @reason_code : wow status reason code * @wow_initial_wake_up: target initial wake up is received * @wow_wake_lock: wow wake lock * @lphb_cache: lphb cache @@ -245,7 +246,8 @@ struct pmo_wow { enum pmo_wow_state wow_state; qdf_event_t target_suspend; qdf_event_t target_resume; - int wow_nack; + bool wow_nack; + uint16_t reason_code; atomic_t wow_initial_wake_up; qdf_wake_lock_t wow_wake_lock; /* diff --git a/components/pmo/dispatcher/src/wlan_pmo_ucfg_api.c b/components/pmo/dispatcher/src/wlan_pmo_ucfg_api.c index c1676d611d47..5663480501c8 100644 --- a/components/pmo/dispatcher/src/wlan_pmo_ucfg_api.c +++ b/components/pmo/dispatcher/src/wlan_pmo_ucfg_api.c @@ -1,5 +1,6 @@ /* * Copyright (c) 2017-2021 The Linux Foundation. All rights reserved. + * Copyright (c) 2023 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 @@ -486,9 +487,11 @@ int ucfg_pmo_psoc_clear_target_wake_up(struct wlan_objmgr_psoc *psoc) return pmo_core_psoc_clear_target_wake_up(psoc); } -void ucfg_pmo_psoc_target_suspend_acknowledge(void *context, bool wow_nack) +void ucfg_pmo_psoc_target_suspend_acknowledge(void *context, bool wow_nack, + uint16_t reason_code) { - pmo_core_psoc_target_suspend_acknowledge(context, wow_nack); + pmo_core_psoc_target_suspend_acknowledge(context, wow_nack, + reason_code); } void ucfg_pmo_psoc_wakeup_host_event_received(struct wlan_objmgr_psoc *psoc) From b84e72e50aaa899705b066d88b1c4dbf256b7f22 Mon Sep 17 00:00:00 2001 From: Rahul Choudhary Date: Mon, 22 May 2023 05:21:07 -0700 Subject: [PATCH 23/23] Release 2.0.8.33B Release 2.0.8.33B Change-Id: Ibcb966a02e5ef43108902ab53da18f6487ef7911 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 b0fcaf164834..a22196838e55 100644 --- a/core/mac/inc/qwlan_version.h +++ b/core/mac/inc/qwlan_version.h @@ -32,9 +32,9 @@ #define QWLAN_VERSION_MAJOR 2 #define QWLAN_VERSION_MINOR 0 #define QWLAN_VERSION_PATCH 8 -#define QWLAN_VERSION_EXTRA "A" +#define QWLAN_VERSION_EXTRA "B" #define QWLAN_VERSION_BUILD 33 -#define QWLAN_VERSIONSTR "2.0.8.33A" +#define QWLAN_VERSIONSTR "2.0.8.33B" #endif /* QWLAN_VERSION_H */