ath11k: add pktlog checksum in trace events to support pktlog
Pktlog data are different among the chipset & chipset versions. As part of enhancing the user space script to decode the pktlog trace events generated, it is desirable to know which chipset or which chipset version has provided the events and thereby decode the pktlogs appropriately. Pktlog checksum helps to determine the chipset variant which is given by the firmware in the struct wmi_ready_event. Pktlog checksums are computed during the firmware build. So, adding that pktlog checksum in the pklog trace events. Signed-off-by: Maharaja Kennadyrajan <mkenna@codeaurora.org> Signed-off-by: Kalle Valo <kvalo@codeaurora.org> Link: https://lore.kernel.org/r/1585234155-30574-1-git-send-email-mkenna@codeaurora.org
This commit is contained in:

committed by
Kalle Valo

parent
3d1c60460f
commit
21c1b063f4
@@ -87,8 +87,8 @@ static const struct wmi_tlv_policy wmi_tlv_policies[] = {
|
||||
= { .min_len = sizeof(struct wmi_pdev_bss_chan_info_event) },
|
||||
[WMI_TAG_VDEV_INSTALL_KEY_COMPLETE_EVENT]
|
||||
= { .min_len = sizeof(struct wmi_vdev_install_key_compl_event) },
|
||||
[WMI_TAG_READY_EVENT]
|
||||
= {.min_len = sizeof(struct wmi_ready_event) },
|
||||
[WMI_TAG_READY_EVENT] = {
|
||||
.min_len = sizeof(struct wmi_ready_event_min) },
|
||||
[WMI_TAG_SERVICE_AVAILABLE_EVENT]
|
||||
= {.min_len = sizeof(struct wmi_service_available_event) },
|
||||
[WMI_TAG_PEER_ASSOC_CONF_EVENT]
|
||||
@@ -4991,7 +4991,7 @@ static int ath11k_wmi_tlv_rdy_parse(struct ath11k_base *ab, u16 tag, u16 len,
|
||||
const void *ptr, void *data)
|
||||
{
|
||||
struct wmi_tlv_rdy_parse *rdy_parse = data;
|
||||
struct wmi_ready_event *fixed_param;
|
||||
struct wmi_ready_event fixed_param;
|
||||
struct wmi_mac_addr *addr_list;
|
||||
struct ath11k_pdev *pdev;
|
||||
u32 num_mac_addr;
|
||||
@@ -4999,11 +4999,16 @@ static int ath11k_wmi_tlv_rdy_parse(struct ath11k_base *ab, u16 tag, u16 len,
|
||||
|
||||
switch (tag) {
|
||||
case WMI_TAG_READY_EVENT:
|
||||
fixed_param = (struct wmi_ready_event *)ptr;
|
||||
ab->wlan_init_status = fixed_param->status;
|
||||
rdy_parse->num_extra_mac_addr = fixed_param->num_extra_mac_addr;
|
||||
memset(&fixed_param, 0, sizeof(fixed_param));
|
||||
memcpy(&fixed_param, (struct wmi_ready_event *)ptr,
|
||||
min_t(u16, sizeof(fixed_param), len));
|
||||
ab->wlan_init_status = fixed_param.ready_event_min.status;
|
||||
rdy_parse->num_extra_mac_addr =
|
||||
fixed_param.ready_event_min.num_extra_mac_addr;
|
||||
|
||||
ether_addr_copy(ab->mac_addr, fixed_param->mac_addr.addr);
|
||||
ether_addr_copy(ab->mac_addr,
|
||||
fixed_param.ready_event_min.mac_addr.addr);
|
||||
ab->pktlog_defs_checksum = fixed_param.pktlog_defs_checksum;
|
||||
ab->wmi_ready = true;
|
||||
break;
|
||||
case WMI_TAG_ARRAY_FIXED_STRUCT:
|
||||
|
Reference in New Issue
Block a user