On 6/25/2024 8:53 AM, Kalle Valo wrote: > Karthikeyan Periyasamy <quic_periyasa@xxxxxxxxxxx> 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@xxxxxxxxxxx> > > [...] > >> +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 > LGTM, thanks!