From 4c069f07e7ebfb2105a0eea87c9c851d4a5b749b Mon Sep 17 00:00:00 2001 From: Ashish Date: Thu, 14 Apr 2022 18:27:17 +0530 Subject: [PATCH 01/11] qcacld-3.0: Init start completion in fw down instead of reovery shutdown Currently driver initializes start completion on recovery shutdown which leads to an issue where userspace thread does not wait when it writes state ctrl params with below event sequence because of which wifi on fails. On fw down driver sets recovery in progress, on shutdown it resets wlan_start_complete and on reinit, it sets wlan_start_complete. Now if driver again receives fw down it sets recovery in progress and when userspace tries to write state ctrl param this thread does not wait here as wlan_start_comp was set in previous SSR sequence. If driver does not block this thread, userspace tries to iface up which fails because SSR is still in progress. To address above issue, init start completion in fw down instead of recovery shutdown so that driver can block the state ctrl param thread until SSR completes, when it tries to set the params. Change-Id: I3fe3768b1ec431620b37055d783de0201371e774 CRs-Fixed: 3244479 --- core/hdd/src/wlan_hdd_driver_ops.c | 2 +- core/hdd/src/wlan_hdd_main.c | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/core/hdd/src/wlan_hdd_driver_ops.c b/core/hdd/src/wlan_hdd_driver_ops.c index 7f782feffdb9..3fac407753c1 100644 --- a/core/hdd/src/wlan_hdd_driver_ops.c +++ b/core/hdd/src/wlan_hdd_driver_ops.c @@ -982,7 +982,6 @@ static void __hdd_soc_recovery_shutdown(void) /* recovery starts via firmware down indication; ensure we got one */ QDF_BUG(cds_is_driver_recovering()); - hdd_init_start_completion(); hdd_ctx = cds_get_context(QDF_MODULE_ID_HDD); if (!hdd_ctx) { @@ -2097,6 +2096,7 @@ wlan_hdd_pld_uevent(struct device *dev, struct pld_uevent_data *event_data) cds_set_target_ready(false); cds_set_recovery_in_progress(true); + hdd_init_start_completion(); /* Notify external threads currently waiting on firmware * by forcefully completing waiting events with a "reset" diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c index 6d89f88084d1..2a1b2efd5349 100644 --- a/core/hdd/src/wlan_hdd_main.c +++ b/core/hdd/src/wlan_hdd_main.c @@ -16870,6 +16870,9 @@ static ssize_t wlan_hdd_state_ctrl_param_write(struct file *filp, goto exit; } + hdd_info("is_driver_loaded %d is_driver_recovering %d", + cds_is_driver_loaded(), cds_is_driver_recovering()); + if (!cds_is_driver_loaded() || cds_is_driver_recovering()) { rc = wait_for_completion_timeout(&wlan_start_comp, msecs_to_jiffies(HDD_WLAN_START_WAIT_TIME)); From ea311cdd436a78ecedf6f9d4dbafbad3bcb2f34f Mon Sep 17 00:00:00 2001 From: Madan Koyyalamudi Date: Tue, 16 Aug 2022 07:47:10 -0700 Subject: [PATCH 02/11] Release 2.0.8.31A Release 2.0.8.31A Change-Id: I5ef4d1e3637e43ee8cce2e66936a0036627c64a0 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 c10903319e19..bb7e9f8c1a2c 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 31 -#define QWLAN_VERSIONSTR "2.0.8.31" +#define QWLAN_VERSIONSTR "2.0.8.31A" #endif /* QWLAN_VERSION_H */ From 84d20a81730145105bea3505d2234ccacdce878b Mon Sep 17 00:00:00 2001 From: Vulupala Shashank Reddy Date: Tue, 19 Jul 2022 22:24:43 +0530 Subject: [PATCH 03/11] qcacld-3.0: Fix the channel for M2 and M4 packets Currently in packet capture, channel is updated from connection manager. Connection manager channel is updated only after roam is done, because of which for EAPOL tx packets old connection freq is filled during roam from one AP to other. So we are seeing previous AP freq in EAPOL tx packets captured during roam. So to avoid this fill freq in data tx packets from pdev which will get update when auth frame is received. Change-Id: I251c4dd084b459b7c85e80c5f7ad717d561c09ae CRs-Fixed: 3248305 --- .../core/src/wlan_pkt_capture_data_txrx.c | 29 ++++++++++--------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/components/pkt_capture/core/src/wlan_pkt_capture_data_txrx.c b/components/pkt_capture/core/src/wlan_pkt_capture_data_txrx.c index b67f30909bcc..6cebfe5481b9 100644 --- a/components/pkt_capture/core/src/wlan_pkt_capture_data_txrx.c +++ b/components/pkt_capture/core/src/wlan_pkt_capture_data_txrx.c @@ -33,6 +33,7 @@ #include "dp_internal.h" #include "cds_utils.h" #include "htt_ppdu_stats.h" +#include #endif #define RESERVE_BYTES (100) @@ -262,16 +263,15 @@ pkt_capture_update_tx_status( struct mon_rx_status *tx_status, struct pkt_capture_tx_hdr_elem_t *pktcapture_hdr) { - struct connection_info info[MAX_NUMBER_OF_CONC_CONNECTIONS]; struct pkt_capture_vdev_priv *vdev_priv; struct wlan_objmgr_vdev *vdev = context; htt_ppdu_stats_for_smu_tlv *smu; struct wlan_objmgr_psoc *psoc; struct pkt_capture_ppdu_stats_q_node *q_node; qdf_list_node_t *node; - uint32_t conn_count; - uint8_t vdev_id; - int i; + cdp_config_param_type val; + void *soc = cds_get_context(QDF_MODULE_ID_SOC); + struct wlan_objmgr_pdev *pdev = wlan_vdev_get_pdev(vdev); psoc = wlan_vdev_get_psoc(vdev); if (!psoc) { @@ -279,18 +279,19 @@ pkt_capture_update_tx_status( return; } - vdev_id = wlan_vdev_get_id(vdev); - - /* Update the connected channel info from policy manager */ - conn_count = policy_mgr_get_connection_info(psoc, info); - for (i = 0; i < conn_count; i++) { - if (info[i].vdev_id == vdev_id) { - tx_status->chan_freq = info[0].ch_freq; - tx_status->chan_num = info[0].channel; - break; - } + if (!pdev) { + pkt_capture_err("pdev is NULL"); + return; } + if (!cdp_txrx_get_pdev_param(soc, wlan_objmgr_pdev_get_pdev_id(pdev), + CDP_MONITOR_CHANNEL, &val)) + tx_status->chan_num = val.cdp_pdev_param_monitor_chan; + + if (!cdp_txrx_get_pdev_param(soc, wlan_objmgr_pdev_get_pdev_id(pdev), + CDP_MONITOR_FREQUENCY, &val)) + tx_status->chan_freq = val.cdp_pdev_param_mon_freq; + vdev_priv = pkt_capture_vdev_get_priv(vdev); if (qdf_unlikely(!vdev_priv)) goto skip_ppdu_stats; From 7433c02921f8ea696dc3516a7a39072aa94861ea Mon Sep 17 00:00:00 2001 From: Madan Koyyalamudi Date: Thu, 18 Aug 2022 08:37:40 -0700 Subject: [PATCH 04/11] Release 2.0.8.31B Release 2.0.8.31B Change-Id: I3e22397adddb2f9282ac22fb983486143c817a32 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 bb7e9f8c1a2c..1032e1629e2c 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 31 -#define QWLAN_VERSIONSTR "2.0.8.31A" +#define QWLAN_VERSIONSTR "2.0.8.31B" #endif /* QWLAN_VERSION_H */ From 7cf700a71d3a5c723e8deeb10b04f691721e34bd Mon Sep 17 00:00:00 2001 From: Dundi Raviteja Date: Mon, 8 Aug 2022 11:11:29 +0530 Subject: [PATCH 05/11] qcacld-3.0: Reinitialize mon_register_event before wait_for_completion Reinitialize mon_register_event before wait_for_completion to make sure that it waits for fresh completion. "done" variable in struct completion increments in complete() API and decrements in wait_for_completion() API. In wait_for_completion() API, if "done" value is 0 then it will wait for the completion else it will continue without waiting. If reinitialization is not done, there is a possibility that wait_for_completion() may continue without waiting. Change-Id: I780103f551938438f27a11b006cc7c3e6edc6820 CRs-Fixed: 3251876 --- components/pkt_capture/core/src/wlan_pkt_capture_main.c | 1 + 1 file changed, 1 insertion(+) diff --git a/components/pkt_capture/core/src/wlan_pkt_capture_main.c b/components/pkt_capture/core/src/wlan_pkt_capture_main.c index 5d1e3ee2b7d8..72b08322e3fc 100644 --- a/components/pkt_capture/core/src/wlan_pkt_capture_main.c +++ b/components/pkt_capture/core/src/wlan_pkt_capture_main.c @@ -823,6 +823,7 @@ QDF_STATUS pkt_capture_deregister_callbacks(struct wlan_objmgr_vdev *vdev) &vdev_priv->mon_ctx->mon_event_flag); set_bit(PKT_CAPTURE_RX_POST_EVENT, &vdev_priv->mon_ctx->mon_event_flag); + reinit_completion(&vdev_priv->mon_ctx->mon_register_event); wake_up_interruptible(&vdev_priv->mon_ctx->mon_wait_queue); /* From b94ffed16bd44b7acfff3592135bb47357e9c5d3 Mon Sep 17 00:00:00 2001 From: Madan Koyyalamudi Date: Thu, 1 Sep 2022 05:25:59 -0700 Subject: [PATCH 06/11] Release 2.0.8.31C Release 2.0.8.31C Change-Id: Ibdb932f432b98e40ebdd73b01a6d20d257baac9e 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 1032e1629e2c..06a0c99c4c73 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 "B" +#define QWLAN_VERSION_EXTRA "C" #define QWLAN_VERSION_BUILD 31 -#define QWLAN_VERSIONSTR "2.0.8.31B" +#define QWLAN_VERSIONSTR "2.0.8.31C" #endif /* QWLAN_VERSION_H */ From 2dc4b77a6fcaa0dd822579fd9e97153e8522e5f0 Mon Sep 17 00:00:00 2001 From: Jianmin Zhu Date: Mon, 5 Sep 2022 15:48:49 +0800 Subject: [PATCH 07/11] qcacld-3.0: Skip reset roam trigger during disconnect For STA+STA case, if disconnect is started on one vdev, roaming is getting disabled on other vdev to fix this skip updating RSO state. Change-Id: If527555c3ea3d50516be3a743bb03914b3a2359f CRs-Fixed: 2981648 --- core/sme/src/csr/csr_neighbor_roam.c | 7 ------- 1 file changed, 7 deletions(-) diff --git a/core/sme/src/csr/csr_neighbor_roam.c b/core/sme/src/csr/csr_neighbor_roam.c index adc6fd867f98..1a3e40532eb0 100644 --- a/core/sme/src/csr/csr_neighbor_roam.c +++ b/core/sme/src/csr/csr_neighbor_roam.c @@ -617,14 +617,7 @@ void csr_roam_reset_roam_params(struct mac_context *mac_ctx) static void csr_roam_restore_default_config(struct mac_context *mac_ctx, uint8_t vdev_id) { - struct wlan_roam_triggers triggers; - sme_set_roam_config_enable(MAC_HANDLE(mac_ctx), vdev_id, 0); - - triggers.vdev_id = vdev_id; - triggers.trigger_bitmap = wlan_mlme_get_roaming_triggers(mac_ctx->psoc); - sme_debug("Reset roam trigger bitmap to 0x%x", triggers.trigger_bitmap); - wlan_cm_rso_set_roam_trigger(mac_ctx->pdev, vdev_id, &triggers); sme_roam_control_restore_default_config(MAC_HANDLE(mac_ctx), vdev_id); } From 12e7a20232345f1eb737a03c9b61f148ff503940 Mon Sep 17 00:00:00 2001 From: Jianmin Zhu Date: Sun, 14 Aug 2022 16:23:31 +0800 Subject: [PATCH 08/11] qcacld-3.0: Fix peer unmap failure due to invalid roam scan mode value When supplicant disables firmware roam, RSO stop command with roam scan mode value 4 is sent to firmware and this value 4 indicates the firmare to enable only Forced roam trigger(roam invoke command from host). But before ROAM_DEINIT(WMI_VDEV_PARAM_ROAM_FW_OFFLOAD with value zero) is posted to firmware, the roam scan mode should be 0 or else there could be potential peer unmap failures if firmware has already started roam and disconnect is triggered from north bound or from peer. To avoid this, in the roam offload state machine handle the state switch from RSO stopped to deinit if supplicant disabled roaming flag is set and send RSO stop with roam scan mode value 0 to firmware. Change-Id: I6ff39f43bd75c95ed03c357a5602e25a5a0ffd92 CRs-Fixed: 3229082 --- .../mlme/connection_mgr/core/src/wlan_cm_roam_offload.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/components/umac/mlme/connection_mgr/core/src/wlan_cm_roam_offload.c b/components/umac/mlme/connection_mgr/core/src/wlan_cm_roam_offload.c index 0629bee47550..d1618afbcce8 100644 --- a/components/umac/mlme/connection_mgr/core/src/wlan_cm_roam_offload.c +++ b/components/umac/mlme/connection_mgr/core/src/wlan_cm_roam_offload.c @@ -1,5 +1,6 @@ /* * Copyright (c) 2012-2021 The Linux Foundation. All rights reserved. + * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved. * * Permission to use, copy, modify, and/or distribute this software for * any purpose with or without fee is hereby granted, provided that the @@ -960,7 +961,10 @@ cm_roam_switch_to_deinit(struct wlan_objmgr_pdev *pdev, if (sup_disabled_roam) { mlme_err("vdev[%d]: supplicant disabled roam. clear roam scan mode", vdev_id); - cm_roam_switch_to_rso_stop(pdev, vdev_id, reason); + status = cm_roam_stop_req(psoc, vdev_id, + REASON_DISCONNECTED); + if (QDF_IS_STATUS_ERROR(status)) + mlme_err("ROAM: Unable to clear roam scan mode"); } case WLAN_ROAM_INIT: From eba7e0532b289c20111c730ffda83d18675f07b1 Mon Sep 17 00:00:00 2001 From: Madan Koyyalamudi Date: Mon, 5 Sep 2022 09:22:50 -0700 Subject: [PATCH 09/11] Release 2.0.8.31D Release 2.0.8.31D Change-Id: I1c4fe36ade34db0bc10506f2d02f12a60dbd105d 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 06a0c99c4c73..5284fdcee87c 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 "C" +#define QWLAN_VERSION_EXTRA "D" #define QWLAN_VERSION_BUILD 31 -#define QWLAN_VERSIONSTR "2.0.8.31C" +#define QWLAN_VERSIONSTR "2.0.8.31D" #endif /* QWLAN_VERSION_H */ From 46cd6281deee2791a3a94786e0c9db6f14390318 Mon Sep 17 00:00:00 2001 From: Vulupala Shashank Reddy Date: Wed, 3 Aug 2022 15:34:25 +0530 Subject: [PATCH 10/11] qcacld-3.0: Fix the channel for M2 packet in pkt capture mode Currently in packet capture, channel for data packets is updated from pdev. We are updating channel in pdev when we receive auth frame in mon thread. But, sometimes we are updating channel in radiotap of M2 in pkt_capture_update_tx_status, before mon thread process auth packet and update channel in pdev, because of which we are updating wrong channel in M2. So, to avoid this move update of channel from mon thread to pkt_capture_mgmtpkt_process. Change-Id: Icf14c4331849ad7cfdfbd7a3043e4e4dc3d33721 CRs-Fixed: 3266890 --- .../core/src/wlan_pkt_capture_mgmt_txrx.c | 95 +++++++++++++++++++ .../core/src/wlan_pkt_capture_mon_thread.c | 92 ------------------ 2 files changed, 95 insertions(+), 92 deletions(-) diff --git a/components/pkt_capture/core/src/wlan_pkt_capture_mgmt_txrx.c b/components/pkt_capture/core/src/wlan_pkt_capture_mgmt_txrx.c index 1e3aea3a5a38..d185bb943250 100644 --- a/components/pkt_capture/core/src/wlan_pkt_capture_mgmt_txrx.c +++ b/components/pkt_capture/core/src/wlan_pkt_capture_mgmt_txrx.c @@ -31,6 +31,7 @@ #include "wlan_mgmt_txrx_utils_api.h" #include "wlan_utility.h" #include "cds_ieee80211_common.h" +#include "cdp_txrx_ctrl.h" enum pkt_capture_tx_status pkt_capture_mgmt_status_map(uint8_t status) @@ -133,15 +134,109 @@ pkt_capture_mgmtpkt_process(struct wlan_objmgr_psoc *psoc, struct wlan_objmgr_vdev *vdev; struct pkt_capture_mon_pkt *pkt; uint32_t headroom; + uint8_t type, sub_type; + struct ieee80211_frame *wh; + void *soc = cds_get_context(QDF_MODULE_ID_SOC); + struct wlan_objmgr_pdev *pdev; + cdp_config_param_type val; + tSirMacAuthFrameBody *auth; + struct pkt_capture_vdev_priv *vdev_priv; vdev = wlan_objmgr_get_vdev_by_opmode_from_psoc(psoc, QDF_STA_MODE, WLAN_PKT_CAPTURE_ID); + if (!vdev) { pkt_capture_err("vdev is NULL"); return QDF_STATUS_E_FAILURE; } + vdev_priv = pkt_capture_vdev_get_priv(vdev); + if (!vdev_priv) { + pkt_capture_err("packet capture vdev priv is NULL"); + return QDF_STATUS_E_FAILURE; + } + + pdev = wlan_vdev_get_pdev(vdev); + if (!pdev) { + pkt_capture_err("pdev is NULL"); + return QDF_STATUS_E_FAILURE; + } + + wh = (struct ieee80211_frame *)(qdf_nbuf_data(nbuf)); + type = (wh)->i_fc[0] & IEEE80211_FC0_TYPE_MASK; + sub_type = (wh)->i_fc[0] & IEEE80211_FC0_SUBTYPE_MASK; + + /* + * Update channel only if successful AUTH Resp is received. + * This is done so that EAPOL M1 data frame have correct + * channel + */ + if ((type == IEEE80211_FC0_TYPE_MGT) && + (sub_type == MGMT_SUBTYPE_AUTH)) { + uint8_t chan = wlan_freq_to_chan(txrx_status->chan_freq); + + auth = (tSirMacAuthFrameBody *)(qdf_nbuf_data(nbuf) + + sizeof(tSirMacMgmtHdr)); + + if (auth->authTransactionSeqNumber == SIR_MAC_AUTH_FRAME_2 || + auth->authTransactionSeqNumber == SIR_MAC_AUTH_FRAME_4) { + if (auth->authStatusCode == STATUS_SUCCESS) { + val.cdp_pdev_param_monitor_chan = chan; + cdp_txrx_set_pdev_param( + soc, wlan_objmgr_pdev_get_pdev_id(pdev), + CDP_MONITOR_CHANNEL, val); + + val.cdp_pdev_param_mon_freq = + txrx_status->chan_freq; + cdp_txrx_set_pdev_param( + soc, wlan_objmgr_pdev_get_pdev_id(pdev), + CDP_MONITOR_FREQUENCY, val); + } + } + } + + /* + * Update channel to last connected channel in case of assoc/reassoc + * response failure and save current chan in case of success + */ + if ((type == IEEE80211_FC0_TYPE_MGT) && + ((sub_type == MGMT_SUBTYPE_ASSOC_RESP) || + (sub_type == MGMT_SUBTYPE_REASSOC_RESP))) { + if (qdf_nbuf_len(nbuf) < (sizeof(tSirMacMgmtHdr) + + SIR_MAC_ASSOC_RSP_STATUS_CODE_OFFSET)) { + pkt_capture_err("Packet length is less than expected"); + qdf_nbuf_free(nbuf); + return QDF_STATUS_E_FAILURE; + } + + status = (uint16_t)(*(qdf_nbuf_data(nbuf) + + sizeof(tSirMacMgmtHdr) + + SIR_MAC_ASSOC_RSP_STATUS_CODE_OFFSET)); + + if (status == STATUS_SUCCESS) { + vdev_priv->last_freq = vdev_priv->curr_freq; + vdev_priv->curr_freq = txrx_status->chan_freq; + } else { + uint8_t chan_num; + + chan_num = wlan_reg_freq_to_chan(pdev, + vdev_priv->last_freq); + + val.cdp_pdev_param_monitor_chan = chan_num; + cdp_txrx_set_pdev_param( + soc, wlan_objmgr_pdev_get_pdev_id(pdev), + CDP_MONITOR_CHANNEL, val); + + val.cdp_pdev_param_mon_freq = vdev_priv->last_freq; + cdp_txrx_set_pdev_param( + soc, wlan_objmgr_pdev_get_pdev_id(pdev), + CDP_MONITOR_FREQUENCY, val); + + vdev_priv->curr_freq = vdev_priv->last_freq; + } + } + /* * Calculate the headroom and adjust head to prepare radiotap header */ diff --git a/components/pkt_capture/core/src/wlan_pkt_capture_mon_thread.c b/components/pkt_capture/core/src/wlan_pkt_capture_mon_thread.c index be99be8ee939..9529c510cef7 100644 --- a/components/pkt_capture/core/src/wlan_pkt_capture_mon_thread.c +++ b/components/pkt_capture/core/src/wlan_pkt_capture_mon_thread.c @@ -24,104 +24,12 @@ #include "wlan_pkt_capture_mon_thread.h" #include "cds_ieee80211_common.h" #include "wlan_mgmt_txrx_utils_api.h" -#include "cdp_txrx_ctrl.h" #include "cfg_ucfg_api.h" #include "wlan_mgmt_txrx_utils_api.h" void pkt_capture_mon(struct pkt_capture_cb_context *cb_ctx, qdf_nbuf_t msdu, struct wlan_objmgr_vdev *vdev, uint16_t ch_freq) { - struct radiotap_header *rthdr; - uint8_t rtlen, type, sub_type; - struct ieee80211_frame *wh; - void *soc = cds_get_context(QDF_MODULE_ID_SOC); - struct wlan_objmgr_pdev *pdev = wlan_vdev_get_pdev(vdev); - cdp_config_param_type val; - uint16_t status; - tSirMacAuthFrameBody *auth; - struct pkt_capture_vdev_priv *vdev_priv; - - rthdr = (struct radiotap_header *)qdf_nbuf_data(msdu); - rtlen = rthdr->it_len; - wh = (struct ieee80211_frame *)(qdf_nbuf_data(msdu) + rtlen); - type = (wh)->i_fc[0] & IEEE80211_FC0_TYPE_MASK; - sub_type = (wh)->i_fc[0] & IEEE80211_FC0_SUBTYPE_MASK; - - vdev_priv = pkt_capture_vdev_get_priv(vdev); - if (!vdev_priv) { - pkt_capture_err("packet capture vdev priv is NULL"); - return; - } - - /* - * Update channel only if successful AUTH Resp is received. - * This is done so that EAPOL M1 data frame have correct - * channel - */ - if ((type == IEEE80211_FC0_TYPE_MGT) && - (sub_type == MGMT_SUBTYPE_AUTH)) { - uint8_t chan = wlan_freq_to_chan(ch_freq); - - auth = (tSirMacAuthFrameBody *)(qdf_nbuf_data(msdu) + rtlen + - sizeof(tSirMacMgmtHdr)); - - if (auth->authTransactionSeqNumber == SIR_MAC_AUTH_FRAME_2 || - auth->authTransactionSeqNumber == SIR_MAC_AUTH_FRAME_4) { - if (auth->authStatusCode == STATUS_SUCCESS) { - val.cdp_pdev_param_monitor_chan = chan; - cdp_txrx_set_pdev_param( - soc, wlan_objmgr_pdev_get_pdev_id(pdev), - CDP_MONITOR_CHANNEL, val); - - val.cdp_pdev_param_mon_freq = ch_freq; - cdp_txrx_set_pdev_param( - soc, wlan_objmgr_pdev_get_pdev_id(pdev), - CDP_MONITOR_FREQUENCY, val); - } - } - } - - /* - * Update channel to last connected channel in case of assoc/reassoc - * response failure and save current chan in case of success - */ - if ((type == IEEE80211_FC0_TYPE_MGT) && - ((sub_type == MGMT_SUBTYPE_ASSOC_RESP) || - (sub_type == MGMT_SUBTYPE_REASSOC_RESP))) { - if (qdf_nbuf_len(msdu) < (rtlen + sizeof(tSirMacMgmtHdr) + - SIR_MAC_ASSOC_RSP_STATUS_CODE_OFFSET)) { - pkt_capture_err("Packet length is less than expected"); - qdf_nbuf_free(msdu); - return; - } - - status = (uint16_t)(*(qdf_nbuf_data(msdu) + rtlen + - sizeof(tSirMacMgmtHdr) + - SIR_MAC_ASSOC_RSP_STATUS_CODE_OFFSET)); - - if (status == STATUS_SUCCESS) { - vdev_priv->last_freq = vdev_priv->curr_freq; - vdev_priv->curr_freq = ch_freq; - } else { - uint8_t chan_num; - - chan_num = wlan_reg_freq_to_chan(pdev, - vdev_priv->last_freq); - - val.cdp_pdev_param_monitor_chan = chan_num; - cdp_txrx_set_pdev_param( - soc, wlan_objmgr_pdev_get_pdev_id(pdev), - CDP_MONITOR_CHANNEL, val); - - val.cdp_pdev_param_mon_freq = vdev_priv->last_freq; - cdp_txrx_set_pdev_param( - soc, wlan_objmgr_pdev_get_pdev_id(pdev), - CDP_MONITOR_FREQUENCY, val); - - vdev_priv->curr_freq = vdev_priv->last_freq; - } - } - if (cb_ctx->mon_cb(cb_ctx->mon_ctx, msdu) != QDF_STATUS_SUCCESS) { pkt_capture_err("Frame Rx to HDD failed"); qdf_nbuf_free(msdu); From bd35b6332d9d49b0f01bdd3b75e9cf9ae2db8168 Mon Sep 17 00:00:00 2001 From: Madan Koyyalamudi Date: Fri, 9 Sep 2022 03:13:03 -0700 Subject: [PATCH 11/11] Release 2.0.8.31E Release 2.0.8.31E Change-Id: I1f5a159f3642fa939060f95af6b405a30491a1a8 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 5284fdcee87c..2ceb79ce812d 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 "D" +#define QWLAN_VERSION_EXTRA "E" #define QWLAN_VERSION_BUILD 31 -#define QWLAN_VERSIONSTR "2.0.8.31D" +#define QWLAN_VERSIONSTR "2.0.8.31E" #endif /* QWLAN_VERSION_H */