Skip to content

Commit f772acf

Browse files
committed
wifi: ath12k: Use HTT_TCL_METADATA_VER_V1 in FTM mode
JIRA: https://issues.redhat.com/browse/RHEL-114891 commit 66b3ebc Author: Aaradhana Sahu <aaradhana.sahu@oss.qualcomm.com> Date: Fri Jul 11 09:24:20 2025 +0530 wifi: ath12k: Use HTT_TCL_METADATA_VER_V1 in FTM mode Currently host sends HTT_TCL_METADATA_VER_V2 to the firmware regardless of the operating mode (Mission or FTM). Firmware expects additional software information (like peer ID, vdev ID, and link ID) in Tx packets when HTT_TCL_METADATA_VER_V2 is set. However, in FTM (Factory Test Mode) mode, no vdev is created on the host side (this is expected). As a result, the firmware fails to find the expected vdev during packet processing and ends up dropping packets. To fix this, send HTT_TCL_METADATA_VER_V1 in FTM mode because FTM mode doesn't support HTT_TCL_METADATA_VER_V2. Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.5-01651-QCAHKSWPL_SILICONZ-1 Fixes: 5d96496 ("wifi: ath12k: Update HTT_TCL_METADATA version and bit mask definitions") Signed-off-by: Aaradhana Sahu <aaradhana.sahu@oss.qualcomm.com> Reviewed-by: Vasanthakumar Thiagarajan <vasanthakumar.thiagarajan@oss.qualcomm.com> Link: https://patch.msgid.link/20250711035420.1509029-1-aaradhana.sahu@oss.qualcomm.com Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com> Signed-off-by: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
1 parent da42de6 commit f772acf

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

drivers/net/wireless/ath/ath12k/dp.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -474,6 +474,7 @@ enum htt_h2t_msg_type {
474474
};
475475

476476
#define HTT_VER_REQ_INFO_MSG_ID GENMASK(7, 0)
477+
#define HTT_OPTION_TCL_METADATA_VER_V1 1
477478
#define HTT_OPTION_TCL_METADATA_VER_V2 2
478479
#define HTT_OPTION_TAG GENMASK(7, 0)
479480
#define HTT_OPTION_LEN GENMASK(15, 8)

drivers/net/wireless/ath/ath12k/dp_tx.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1200,6 +1200,7 @@ int ath12k_dp_tx_htt_h2t_ver_req_msg(struct ath12k_base *ab)
12001200
struct sk_buff *skb;
12011201
struct htt_ver_req_cmd *cmd;
12021202
int len = sizeof(*cmd);
1203+
u32 metadata_version;
12031204
int ret;
12041205

12051206
init_completion(&dp->htt_tgt_version_received);
@@ -1212,12 +1213,14 @@ int ath12k_dp_tx_htt_h2t_ver_req_msg(struct ath12k_base *ab)
12121213
cmd = (struct htt_ver_req_cmd *)skb->data;
12131214
cmd->ver_reg_info = le32_encode_bits(HTT_H2T_MSG_TYPE_VERSION_REQ,
12141215
HTT_OPTION_TAG);
1216+
metadata_version = ath12k_ftm_mode ? HTT_OPTION_TCL_METADATA_VER_V1 :
1217+
HTT_OPTION_TCL_METADATA_VER_V2;
12151218

12161219
cmd->tcl_metadata_version = le32_encode_bits(HTT_TAG_TCL_METADATA_VERSION,
12171220
HTT_OPTION_TAG) |
12181221
le32_encode_bits(HTT_TCL_METADATA_VER_SZ,
12191222
HTT_OPTION_LEN) |
1220-
le32_encode_bits(HTT_OPTION_TCL_METADATA_VER_V2,
1223+
le32_encode_bits(metadata_version,
12211224
HTT_OPTION_VALUE);
12221225

12231226
ret = ath12k_htc_send(&ab->htc, dp->eid, skb);

0 commit comments

Comments
 (0)