From 6bcffd57bb1e7653541fcfc38a4140a67e26a8a6 Mon Sep 17 00:00:00 2001 From: Asutosh Mohapatra Date: Wed, 17 Aug 2022 16:04:02 +0530 Subject: [PATCH 1/2] qcacmn: Handle gracefully if scheduler cb is not registered Currently when firmware crashes during driver load, message queue handlers for scheduler context are not registered. While handling the FW down event, driver posts the message to scheduler queue. Since the queue handler is not registered, it results in crash. To address this issue, handle the msg gracefully and return error in case callback is not registered. CRs-Fixed: 3251983 Change-Id: I5dd55e701cf332153dca1f6678271506b9690f6e --- scheduler/src/scheduler_api.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scheduler/src/scheduler_api.c b/scheduler/src/scheduler_api.c index a01f8ffacd9b..07d2b7605a6e 100644 --- a/scheduler/src/scheduler_api.c +++ b/scheduler/src/scheduler_api.c @@ -1,6 +1,6 @@ /* * Copyright (c) 2014-2020 The Linux Foundation. All rights reserved. - * + * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved. * Permission to use, copy, modify, and/or distribute this software for * any purpose with or without fee is hereby granted, provided that the * above copyright notice and this permission notice appear in all @@ -288,7 +288,7 @@ QDF_STATUS scheduler_post_msg_by_priority(uint32_t qid, } if (!sched_ctx->queue_ctx.scheduler_msg_process_fn[qidx]) { - QDF_DEBUG_PANIC("callback not registered for qid[%d]", que_id); + sched_err("callback not registered for qid[%d]", que_id); return QDF_STATUS_E_FAILURE; } From 661af9cfb5144ad9654fff512d05fe484c6b9959 Mon Sep 17 00:00:00 2001 From: Vulupala Shashank Reddy Date: Thu, 28 Jul 2022 09:25:01 +0530 Subject: [PATCH 2/2] qcacmn: Fix FTM rx frames capture in packet capture mode Currently the FTM rx frames are dropped in tgt_mgmt_txrx_rx_frame_handler considering them as unspecified packets as action category for FTM is not defined. Define FTM action category so that the FTM frames will not be considered as unspecified frames and dropped while processing. Change-Id: Ieb3980978e38b3f826f42380e29798767c8f1fe2 CRs-Fixed: 3254409 --- .../mgmt_txrx/dispatcher/inc/wlan_mgmt_txrx_utils_api.h | 9 +++++++++ .../mgmt_txrx/dispatcher/src/wlan_mgmt_txrx_tgt_api.c | 6 ++++++ 2 files changed, 15 insertions(+) diff --git a/umac/cmn_services/mgmt_txrx/dispatcher/inc/wlan_mgmt_txrx_utils_api.h b/umac/cmn_services/mgmt_txrx/dispatcher/inc/wlan_mgmt_txrx_utils_api.h index 907f628d3999..84b5b5285cbc 100644 --- a/umac/cmn_services/mgmt_txrx/dispatcher/inc/wlan_mgmt_txrx_utils_api.h +++ b/umac/cmn_services/mgmt_txrx/dispatcher/inc/wlan_mgmt_txrx_utils_api.h @@ -206,6 +206,7 @@ enum block_ack_actioncode { /** * enum pub_actioncode - public action frames + * Reference IEEE Std 802.11-2020 Table 9-364—Public Action field values * @PUB_ACTION_2040_BSS_COEXISTENCE: public 20-40 bss coex action frame * @PUB_ACTION_EXT_CHANNEL_SWITCH_ID: public ext channel switch id action frame * @PUB_ACTION_VENDOR_SPECIFIC: vendor specific public action frame @@ -214,6 +215,8 @@ enum block_ack_actioncode { * @PUB_ACTION_GAS_COMEBACK_REQUEST: GAS comeback request action frame * @PUB_ACTION_GAS_COMEBACK_RESPONSE: GAS comeback respose action frame * @PUB_ACTION_TDLS_DISCRESP: tdls discovery response public action frame + * @PUB_ACTION_FTM_REQUEST: FTM request action frame + * @PUB_ACTION_FTM_RESPONSE: FTM respose action frame */ enum pub_actioncode { PUB_ACTION_2040_BSS_COEXISTENCE = 0, @@ -224,6 +227,8 @@ enum pub_actioncode { PUB_ACTION_GAS_COMEBACK_REQUEST = 12, PUB_ACTION_GAS_COMEBACK_RESPONSE = 13, PUB_ACTION_TDLS_DISCRESP = 14, + PUB_ACTION_FTM_REQUEST = 32, + PUB_ACTION_FTM_RESPONSE = 33, }; /** @@ -617,6 +622,8 @@ struct action_frm_hdr { * @MGMT_ACTION_TWT_SETUP: TWT setup frame * @MGMT_ACTION_TWT_TEARDOWN: TWT teardown frame * @MGMT_ACTION_TWT_INFORMATION: TWT information frame + * @MGMT_ACTION_FTM_REQUEST: FTM request frame + * @MGMT_ACTION_FTM_RESPONSE: FTM response frame * @MGMT_MAX_FRAME_TYPE: max. mgmt frame types */ enum mgmt_frame_type { @@ -745,6 +752,8 @@ enum mgmt_frame_type { MGMT_ACTION_TWT_SETUP, MGMT_ACTION_TWT_TEARDOWN, MGMT_ACTION_TWT_INFORMATION, + MGMT_ACTION_FTM_REQUEST, + MGMT_ACTION_FTM_RESPONSE, MGMT_MAX_FRAME_TYPE, }; diff --git a/umac/cmn_services/mgmt_txrx/dispatcher/src/wlan_mgmt_txrx_tgt_api.c b/umac/cmn_services/mgmt_txrx/dispatcher/src/wlan_mgmt_txrx_tgt_api.c index 1f5dc3e8b2a7..19e2cc3b5a26 100644 --- a/umac/cmn_services/mgmt_txrx/dispatcher/src/wlan_mgmt_txrx_tgt_api.c +++ b/umac/cmn_services/mgmt_txrx/dispatcher/src/wlan_mgmt_txrx_tgt_api.c @@ -210,6 +210,12 @@ mgmt_get_public_action_subtype(uint8_t action_code) case PUB_ACTION_GAS_COMEBACK_RESPONSE: frm_type = MGMT_ACTION_GAS_COMEBACK_RESPONSE; break; + case PUB_ACTION_FTM_REQUEST: + frm_type = MGMT_ACTION_FTM_REQUEST; + break; + case PUB_ACTION_FTM_RESPONSE: + frm_type = MGMT_ACTION_FTM_RESPONSE; + break; default: frm_type = MGMT_FRM_UNSPECIFIED; break;