mirror of
https://github.com/torvalds/linux.git
synced 2026-05-28 09:04:39 +02:00
wifi: ath12k: limit number of channels per WMI command
Currently the number of channels can be sent in a single WMI command is calculated based on the maximum message length of the target, this results in WMI exchange hang for QCC2072 as its firmware can not support those many channels in a single command. Add a limit to avoid this issue. Tested-on: QCC2072 hw1.0 PCI WLAN.COL.1.0-01560-QCACOLSWPL_V1_TO_SILICONZ-1 Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.1.c5-00302-QCAHMTSWPL_V1.0_V2.0_SILICONZ-1.115823.3 Signed-off-by: Baochen Qiang <baochen.qiang@oss.qualcomm.com> Reviewed-by: Vasanthakumar Thiagarajan <vasanthakumar.thiagarajan@oss.qualcomm.com> Link: https://patch.msgid.link/20260112-ath12k-support-qcc2072-v2-15-fc8ce1e43969@oss.qualcomm.com Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com>
This commit is contained in:
parent
37b34a1c54
commit
d518b2d601
|
|
@ -2806,7 +2806,8 @@ int ath12k_wmi_send_scan_chan_list_cmd(struct ath12k *ar,
|
|||
max_chan_limit = (wmi->wmi_ab->max_msg_len[ar->pdev_idx] - len) /
|
||||
sizeof(*chan_info);
|
||||
|
||||
num_send_chans = min(arg->nallchans, max_chan_limit);
|
||||
num_send_chans = min3(arg->nallchans, max_chan_limit,
|
||||
ATH12K_WMI_MAX_NUM_CHAN_PER_CMD);
|
||||
|
||||
arg->nallchans -= num_send_chans;
|
||||
len += sizeof(*chan_info) * num_send_chans;
|
||||
|
|
|
|||
|
|
@ -6322,6 +6322,9 @@ struct ath12k_wmi_rssi_dbm_conv_info_arg {
|
|||
s8 min_nf_dbm;
|
||||
};
|
||||
|
||||
/* each WMI cmd can hold 58 channel entries at most */
|
||||
#define ATH12K_WMI_MAX_NUM_CHAN_PER_CMD 58
|
||||
|
||||
int ath12k_wmi_cmd_send(struct ath12k_wmi_pdev *wmi, struct sk_buff *skb,
|
||||
u32 cmd_id);
|
||||
struct sk_buff *ath12k_wmi_alloc_skb(struct ath12k_wmi_base *wmi_sc, u32 len);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user