ath11k: Fixing TLV length issue in peer pktlog WMI command
authorVikas Patel <vikpatel@codeaurora.org>
Wed, 27 Nov 2019 16:30:07 +0000 (18:30 +0200)
committerKalle Valo <kvalo@codeaurora.org>
Fri, 29 Nov 2019 07:36:09 +0000 (09:36 +0200)
TLV length was 0 for TLV tag 'WMI_TAG_ARRAY_STRUCT' causing
Q6 to crash when trying to configure pktlog filter via debugfs.

Signed-off-by: Vikas Patel <vikpatel@codeaurora.org>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/ath/ath11k/wmi.c

index ccebf7ce420a2c6a230a1f7cee4e9ecec05c67e8..aae6e76330dac9b10f491909fe559c2cca0ee1c1 100644 (file)
@@ -2329,7 +2329,7 @@ int ath11k_wmi_pdev_peer_pktlog_filter(struct ath11k *ar, u8 *addr, u8 enable)
 
        tlv = ptr;
        tlv->header = FIELD_PREP(WMI_TLV_TAG, WMI_TAG_ARRAY_STRUCT) |
-                     FIELD_PREP(WMI_TLV_LEN, 0);
+                     FIELD_PREP(WMI_TLV_LEN, sizeof(*info));
 
        ptr += TLV_HDR_SIZE;
        info = ptr;