Skip to content

Commit 241d130

Browse files
Baochen Qiangjeff-t-johnson
authored andcommitted
wifi: ath12k: parse and save sbs_lower_band_end_freq from WMI_SERVICE_READY_EXT2_EVENTID event
Firmware sends the boundary between lower and higher bands in ath12k_wmi_dbs_or_sbs_cap_params structure embedded in WMI_SERVICE_READY_EXT2_EVENTID event. The boundary is needed when updating frequency range in the following patch. So parse and save it for later use. Note ath12k_wmi_dbs_or_sbs_cap_params is placed after some other structures, so placeholders for them are added as well. Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.1.c5-00284-QCAHMTSWPL_V1.0_V2.0_SILICONZ-1 Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.4.1-00199-QCAHKSWPL_SILICONZ-1 Signed-off-by: Baochen Qiang <[email protected]> Reviewed-by: Vasanthakumar Thiagarajan <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jeff Johnson <[email protected]>
1 parent 062ade2 commit 241d130

File tree

2 files changed

+29
-0
lines changed

2 files changed

+29
-0
lines changed

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

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,11 @@ struct ath12k_wmi_svc_rdy_ext2_parse {
9191
bool dma_ring_cap_done;
9292
bool spectral_bin_scaling_done;
9393
bool mac_phy_caps_ext_done;
94+
bool hal_reg_caps_ext2_done;
95+
bool scan_radio_caps_ext2_done;
96+
bool twt_caps_done;
97+
bool htt_msdu_idx_to_qtype_map_done;
98+
bool dbs_or_sbs_cap_ext_done;
9499
};
95100

96101
struct ath12k_wmi_rdy_parse {
@@ -4991,6 +4996,7 @@ static int ath12k_wmi_svc_rdy_ext2_parse(struct ath12k_base *ab,
49914996
u16 tag, u16 len,
49924997
const void *ptr, void *data)
49934998
{
4999+
const struct ath12k_wmi_dbs_or_sbs_cap_params *dbs_or_sbs_caps;
49945000
struct ath12k_wmi_pdev *wmi_handle = &ab->wmi_ab.wmi[0];
49955001
struct ath12k_wmi_svc_rdy_ext2_parse *parse = data;
49965002
int ret;
@@ -5032,6 +5038,23 @@ static int ath12k_wmi_svc_rdy_ext2_parse(struct ath12k_base *ab,
50325038
}
50335039

50345040
parse->mac_phy_caps_ext_done = true;
5041+
} else if (!parse->hal_reg_caps_ext2_done) {
5042+
parse->hal_reg_caps_ext2_done = true;
5043+
} else if (!parse->scan_radio_caps_ext2_done) {
5044+
parse->scan_radio_caps_ext2_done = true;
5045+
} else if (!parse->twt_caps_done) {
5046+
parse->twt_caps_done = true;
5047+
} else if (!parse->htt_msdu_idx_to_qtype_map_done) {
5048+
parse->htt_msdu_idx_to_qtype_map_done = true;
5049+
} else if (!parse->dbs_or_sbs_cap_ext_done) {
5050+
dbs_or_sbs_caps = ptr;
5051+
ab->wmi_ab.sbs_lower_band_end_freq =
5052+
__le32_to_cpu(dbs_or_sbs_caps->sbs_lower_band_end_freq);
5053+
5054+
ath12k_dbg(ab, ATH12K_DBG_WMI, "sbs_lower_band_end_freq %u\n",
5055+
ab->wmi_ab.sbs_lower_band_end_freq);
5056+
5057+
parse->dbs_or_sbs_cap_ext_done = true;
50355058
}
50365059
break;
50375060
default:

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2747,6 +2747,11 @@ struct wmi_service_ready_ext2_event {
27472747
__le32 default_num_msduq_supported_per_tid;
27482748
} __packed;
27492749

2750+
struct ath12k_wmi_dbs_or_sbs_cap_params {
2751+
__le32 hw_mode_id;
2752+
__le32 sbs_lower_band_end_freq;
2753+
} __packed;
2754+
27502755
struct ath12k_wmi_caps_ext_params {
27512756
__le32 hw_mode_id;
27522757
__le32 pdev_and_hw_link_ids;
@@ -5097,6 +5102,7 @@ struct ath12k_wmi_base {
50975102
struct ath12k_wmi_target_cap_arg *targ_cap;
50985103

50995104
struct ath12k_svc_ext_info svc_ext_info;
5105+
u32 sbs_lower_band_end_freq;
51005106
};
51015107

51025108
struct wmi_pdev_set_bios_interface_cmd {

0 commit comments

Comments
 (0)