Re: [PATCH ath-current v3] wifi: ath12k: parse the nested DBS/SBS capability TLV

From: Baochen Qiang

Date: Thu Nov 19 2026 - 21:14:05 EST




On 11/20/2026 3:17 AM, Jonathan Wolf wrote:
> The DBS/SBS capability in WMI_SERVICE_READY_EXT2_EVENTID is inside a
> WMI_TAG_ARRAY_STRUCT. The array payload starts with the inner TLV
> header. Casting that pointer to struct ath12k_wmi_dbs_or_sbs_cap_params
> makes ath12k read hw_mode_id as sbs_lower_band_end_freq.
>
> On WCN7850 with hardware mode 5 and a 5900 MHz cutoff, this gives an
> SBS frequency range of 4900-5 MHz. The driver can then map the 5 GHz
> and 6 GHz links to the same MAC and request deactivation of one link.
>
> Use ath12k_wmi_tlv_iter() to reach the capability payload. Check the
> tag and minimum payload length before converting the cutoff to CPU byte
> order. Clear the cached cutoff before parsing so an empty array leaves
> it at zero.
>
> Fixes: 241d130f1419 ("wifi: ath12k: parse and save sbs_lower_band_end_freq from WMI_SERVICE_READY_EXT2_EVENTID event")
> Signed-off-by: Jonathan Wolf <wolf@xxxxxxx>
Reviewed-by: Baochen Qiang <baochen.qiang@xxxxxxxxxxxxxxxx>