qca-wifi: fix TSF wrap around case in tx capture

Handle wrap around correctly during TSF delta calculation.

Change-Id: I1303053dbf33175e9f3c7beec0988a4aef03eb7f
CRs-Fixed: 2651294
Цей коміт міститься в:
Srinivas Pitla
2020-03-25 11:58:26 -07:00
зафіксовано Gerrit - the friendly Code Review server
джерело e13d2f6375
коміт c1fbfdd72c

Переглянути файл

@@ -813,7 +813,7 @@ dp_update_msdu_to_list(struct dp_soc *soc,
if (ts->tsf > ptr_msdu_info->tsf)
tsf_delta = ts->tsf - ptr_msdu_info->tsf;
else
tsf_delta = ptr_msdu_info->tsf - ts->tsf;
tsf_delta = LOWER_32_MASK - ptr_msdu_info->tsf + ts->tsf;
if (tsf_delta < MAX_MSDU_THRESHOLD_TSF)
break;
@@ -2756,7 +2756,7 @@ get_mgmt_pkt_from_queue:
if (start_tsf > ptr_comp_info->tx_tsf)
tsf_delta = start_tsf - ptr_comp_info->tx_tsf;
else
tsf_delta = ptr_comp_info->tx_tsf - start_tsf;
tsf_delta = LOWER_32_MASK - ptr_comp_info->tx_tsf + start_tsf;
if (tsf_delta > MAX_MGMT_ENQ_DELAY) {
/*