[PATCH 12/50] wifi: ath12k: add dp.h

Kalle Valo kvalo at kernel.org
Fri Oct 21 04:45:30 PDT 2022


Kalle Valo <kvalo at kernel.org> writes:

>>> +struct htt_srng_setup_cmd {
>>> +	u32 info0;
>>> +	u32 ring_base_addr_lo;
>>> +	u32 ring_base_addr_hi;
>>> +	u32 info1;
>>> +	u32 ring_head_off32_remote_addr_lo;
>>> +	u32 ring_head_off32_remote_addr_hi;
>>> +	u32 ring_tail_off32_remote_addr_lo;
>>> +	u32 ring_tail_off32_remote_addr_hi;
>>> +	u32 ring_msi_addr_lo;
>>> +	u32 ring_msi_addr_hi;
>>> +	u32 msi_data;
>>> +	u32 intr_info;
>>> +	u32 info2;
>>> +} __packed;
>>> +
>>
>> Should they be '__le32' instead of 'u32'?
>>
>> This struct is used to fill data of ath12k_htc_send(), and the fields of
>> htc header are __le32: 
>>
>> struct ath12k_htc_hdr {
>> 	__le32 htc_info;
>> 	__le32 ctrl_info;
>> } __packed __aligned(4);
>>
>> If above is correct, some struct(s) related to ath12k_htc_send() have
>> similar problems:
>> struct htt_ver_req_cmd
>> struct htt_ppdu_stats_cfg_cmd
>> struct htt_rx_ring_selection_cfg_cmd
>> struct htt_ext_stats_cfg_cmd
>> struct htt_tx_ring_selection_cfg_cmd  (miss __packed)
>
> Good catch, we'll fix those and the missing __packed. Thanks for the review!

I fixed these in:

efc72b2aa34c wifi: ath12k: dp: convert htt cmd structs to __le32

-- 
https://patchwork.kernel.org/project/linux-wireless/list/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches



More information about the ath12k mailing list