1: a7220311c80d ! 1: 2400a183a201 wifi: ath12k: parse nested DBS/SBS capability TLVs @@ Commit message after the complete array has been validated. This leaves the existing hardware-mode and link-selection policy unchanged.  - Tested this parser on a Steam Frame with WCN7850 hw2.0, applying the - patch to Valve's matching 7.2 kernel source. MLO advertisement and - radio-mapping diagnostics were enabled separately. The cutoff changed - from 5 to 5900 MHz, the 5200/6135 MHz links mapped to separate MACs, - and AP-side data counters increased on both links during traffic. - No driver recovery or association loss was observed during the test. + Tested on a Steam Frame with WCN7850 hw2.0 using Valve's matching 7.2 + kernel source. MLO advertisement and radio-mapping diagnostics were + enabled separately. The revised parser reported a 5900 MHz cutoff and + the driver mapped the associated 5260/6295 MHz links to separate MACs. An unmodified upstream kernel was not boot-tested.  - Fixes: 241d130f1419 ("wifi: ath12k: parse and save sbs_lower_band_end_freq from WMI_SERVICE_READY_EXT2_EVENTID event") - Link: https://github.com/pi0code/frame-mlo/blob/main/results/final-parser-live-test.txt Tested-on: WCN7850 hw2.0 PCI WLAN.IOE_HMT.1.1-00018-QCAHMTSWPL_V1.0_V2.0_SILICONZ-1 + + Fixes: 241d130f1419 ("wifi: ath12k: parse and save sbs_lower_band_end_freq from WMI_SERVICE_READY_EXT2_EVENTID event") Signed-off-by: Jonathan Wolf   ## drivers/net/wireless/ath/ath12k/wmi.c ## @@ drivers/net/wireless/ath/ath12k/wmi.c: static int ath12k_wmi_update_hw_mode_list  +  + return 0;  +} ++ ++static int ath12k_wmi_dbs_sbs_caps(struct ath12k_base *ab, u16 len, ++ const void *ptr) ++{ ++ const struct ath12k_wmi_dbs_or_sbs_cap_params *caps = NULL; ++ int ret; ++ ++ ret = ath12k_wmi_tlv_iter(ab, ptr, len, ++ ath12k_wmi_tlv_dbs_sbs_caps, &caps); ++ if (ret) { ++ ath12k_warn(ab, "failed to parse DBS/SBS capabilities WMI TLV: %d\n", ++ ret); ++ return ret; ++ } ++ ++ ab->wmi_ab.sbs_lower_band_end_freq = ++ caps ? le32_to_cpu(caps->sbs_lower_band_end_freq) : 0; ++ ++ ath12k_dbg(ab, ATH12K_DBG_WMI, "sbs_lower_band_end_freq %u\n", ++ ab->wmi_ab.sbs_lower_band_end_freq); ++ ++ return 0; ++}  + static int ath12k_wmi_svc_rdy_ext2_parse(struct ath12k_base *ab, u16 tag, u16 len, const void *ptr, void *data) {  - const struct ath12k_wmi_dbs_or_sbs_cap_params *dbs_or_sbs_caps; -+ const struct ath12k_wmi_dbs_or_sbs_cap_params *caps = NULL; struct ath12k_wmi_pdev *wmi_handle = &ab->wmi_ab.wmi[0]; struct ath12k_wmi_svc_rdy_ext2_parse *parse = data; int ret; @@ drivers/net/wireless/ath/ath12k/wmi.c: static int ath12k_wmi_svc_rdy_ext2_parse( parse->htt_msdu_idx_to_qtype_map_done = true; } else if (!parse->dbs_or_sbs_cap_ext_done) {  - dbs_or_sbs_caps = ptr; -+ ret = ath12k_wmi_tlv_iter(ab, ptr, len, -+ ath12k_wmi_tlv_dbs_sbs_caps, &caps); +- ab->wmi_ab.sbs_lower_band_end_freq = +- __le32_to_cpu(dbs_or_sbs_caps->sbs_lower_band_end_freq); +- +- ath12k_dbg(ab, ATH12K_DBG_WMI, "sbs_lower_band_end_freq %u\n", +- ab->wmi_ab.sbs_lower_band_end_freq); ++ ret = ath12k_wmi_dbs_sbs_caps(ab, len, ptr);  + if (ret)  + return ret; -+ - ab->wmi_ab.sbs_lower_band_end_freq = -- __le32_to_cpu(dbs_or_sbs_caps->sbs_lower_band_end_freq); -+ caps ? le32_to_cpu(caps->sbs_lower_band_end_freq) : 0;  - ath12k_dbg(ab, ATH12K_DBG_WMI, "sbs_lower_band_end_freq %u\n", - ab->wmi_ab.sbs_lower_band_end_freq); + ret = ath12k_wmi_update_hw_mode_list(ab); + if (ret) {  ## drivers/net/wireless/ath/ath12k/wmi.h ##  @@ drivers/net/wireless/ath/ath12k/wmi.h: enum wmi_tlv_tag {