tracing: fix msdu_id processing pktlog_tx_msdu_id

Whenever trace record is started in middle of data flow, the
msdu_len_tbl is not fully populated. For the initial MSDU_ID log
types, msdu_id can not be found in msdu_len_tbl. If the entries
are not found set the msdu_len to 0. This will also fix below
errors.

  File "ath10k_pktlog.py", line 297, in <lambda>
    ath10k_htt_pktlog_handler(pevent, *args))
  File "ath10k_pktlog.py", line 238, in ath10k_htt_pktlog_handler
    pktlog_tx_msdu_id(buf)
  File "ath10k_pktlog.py", line 218, in pktlog_tx_msdu_id
    msdu_len = msdu_len_tbl[msdu_id]
This commit is contained in:
Rajkumar Manoharan 2015-01-29 16:59:06 +05:30 committed by Kalle Valo
parent 04d7947835
commit 7903ede3c6

View file

@ -213,7 +213,11 @@ def pktlog_tx_msdu_id(buf):
if len(id) >= 2:
msdu_id, = struct.unpack_from('<H', id);
id = id[2:]
msdu_len = msdu_len_tbl[msdu_id]
if msdu_id not in msdu_len_tbl:
dbg('msdu_id %d not found from msdu_len_tbl' % (msdu_id))
msdu_len = 0
else:
msdu_len = msdu_len_tbl[msdu_id]
else:
msdu_len = 0
output_write(struct.pack('H', msdu_len))