ath10k: add hw_rev to trace events to support pktlog
authorAshok Raj Nagarajan <arnagara@qti.qualcomm.com>
Fri, 5 Feb 2016 15:42:49 +0000 (21:12 +0530)
committerKalle Valo <kvalo@qca.qualcomm.com>
Thu, 3 Mar 2016 17:20:00 +0000 (19:20 +0200)
pktlog data is different between firmware variants (eg. 10.2 vs 10.4). To
have a unified user space script to decode pktlog trace events generated,
it is desirable to know which firmware variant has provided the events and
thereby decode the pktlogs appropriately. Hardware revision (hw_rev) helps
to determine the firmware variant sending these trace events. So add hw_rev
to trace events.

Signed-off-by: Ashok Raj Nagarajan <arnagara@qti.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
drivers/net/wireless/ath/ath10k/trace.h

index 71bdb368813de3af8ba8c062d49a27000392cf98..e0d00cef0bd8d27dc0ee9d964d4343f542efce41 100644 (file)
@@ -250,6 +250,7 @@ TRACE_EVENT(ath10k_wmi_dbglog,
        TP_STRUCT__entry(
                __string(device, dev_name(ar->dev))
                __string(driver, dev_driver_string(ar->dev))
+               __field(u8, hw_type);
                __field(size_t, buf_len)
                __dynamic_array(u8, buf, buf_len)
        ),
@@ -257,14 +258,16 @@ TRACE_EVENT(ath10k_wmi_dbglog,
        TP_fast_assign(
                __assign_str(device, dev_name(ar->dev));
                __assign_str(driver, dev_driver_string(ar->dev));
+               __entry->hw_type = ar->hw_rev;
                __entry->buf_len = buf_len;
                memcpy(__get_dynamic_array(buf), buf, buf_len);
        ),
 
        TP_printk(
-               "%s %s len %zu",
+               "%s %s %d len %zu",
                __get_str(driver),
                __get_str(device),
+               __entry->hw_type,
                __entry->buf_len
        )
 );
@@ -277,6 +280,7 @@ TRACE_EVENT(ath10k_htt_pktlog,
        TP_STRUCT__entry(
                __string(device, dev_name(ar->dev))
                __string(driver, dev_driver_string(ar->dev))
+               __field(u8, hw_type);
                __field(u16, buf_len)
                __dynamic_array(u8, pktlog, buf_len)
        ),
@@ -284,14 +288,16 @@ TRACE_EVENT(ath10k_htt_pktlog,
        TP_fast_assign(
                __assign_str(device, dev_name(ar->dev));
                __assign_str(driver, dev_driver_string(ar->dev));
+               __entry->hw_type = ar->hw_rev;
                __entry->buf_len = buf_len;
                memcpy(__get_dynamic_array(pktlog), buf, buf_len);
        ),
 
        TP_printk(
-               "%s %s size %hu",
+               "%s %s %d size %hu",
                __get_str(driver),
                __get_str(device),
+               __entry->hw_type,
                __entry->buf_len
         )
 );
@@ -440,6 +446,7 @@ TRACE_EVENT(ath10k_htt_rx_desc,
        TP_STRUCT__entry(
                __string(device, dev_name(ar->dev))
                __string(driver, dev_driver_string(ar->dev))
+               __field(u8, hw_type);
                __field(u16, len)
                __dynamic_array(u8, rxdesc, len)
        ),
@@ -447,14 +454,16 @@ TRACE_EVENT(ath10k_htt_rx_desc,
        TP_fast_assign(
                __assign_str(device, dev_name(ar->dev));
                __assign_str(driver, dev_driver_string(ar->dev));
+               __entry->hw_type = ar->hw_rev;
                __entry->len = len;
                memcpy(__get_dynamic_array(rxdesc), data, len);
        ),
 
        TP_printk(
-               "%s %s rxdesc len %d",
+               "%s %s %d rxdesc len %d",
                __get_str(driver),
                __get_str(device),
+               __entry->hw_type,
                __entry->len
         )
 );