From 55fba4768d475f3f77588b9fe4a737ec7b053259 Mon Sep 17 00:00:00 2001 From: Pragaspathi Thilagaraj Date: Fri, 3 Feb 2023 13:55:49 +0530 Subject: [PATCH 01/13] 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/13] 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/13] 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/13] 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/13] 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/13] 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/13] 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/13] 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/13] 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/13] 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/13] 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/13] 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/13] 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 */