[PATCH] wifi: ath12k: fix peer metadata parsing
Kalle Valo
kvalo at kernel.org
Tue Jun 25 08:53:58 PDT 2024
Karthikeyan Periyasamy <quic_periyasa at quicinc.com> writes:
> Currently, the Rx data path only supports parsing peer metadata of version
> zero. However, the QCN9274 platform configures the peer metadata version
> as V1B. When V1B peer metadata is parsed using the version zero logic,
> invalid data is populated, causing valid packets to be dropped. To address
> this issue, refactor the peer metadata version and add the version based
> parsing to populate the data from peer metadata correctly.
>
> Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.0.1-00029-QCAHKSWPL_SILICONZ-1
>
> Fixes: 287033810990 ("wifi: ath12k: add support for peer meta data version")
> Signed-off-by: Karthikeyan Periyasamy <quic_periyasa at quicinc.com>
[...]
> +static u16 ath12k_dp_rx_get_peer_id(enum ath12k_peer_metadata_version ver,
> + __le32 peer_metadata)
> +{
> + switch (ver) {
> + default:
> + WARN_ON(1);
> + fallthrough;
I'm a bit wary of using WARN_ON() in data path, so in the pending branch
I changed this to ath12k_warn():
default:
ath12k_warn(ab, "Unknown peer metadata version: %d", ver);
fallthrough;
The benefit is also that now we print the unknown value. Would this
work?
Please check:
https://git.kernel.org/pub/scm/linux/kernel/git/ath/ath.git/commit/?h=pending&id=0228ca402186a123e5c90187f952121de50bf64f
--
https://patchwork.kernel.org/project/linux-wireless/list/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
More information about the ath12k
mailing list