|
@@ -435,12 +435,14 @@ static int ath10k_sdio_mbox_rx_process_packets(struct ath10k *ar,
|
|
|
enum ath10k_htc_ep_id id;
|
|
|
int ret, i, *n_lookahead_local;
|
|
|
u32 *lookaheads_local;
|
|
|
+ int lookahead_idx = 0;
|
|
|
|
|
|
for (i = 0; i < ar_sdio->n_rx_pkts; i++) {
|
|
|
lookaheads_local = lookaheads;
|
|
|
n_lookahead_local = n_lookahead;
|
|
|
|
|
|
- id = ((struct ath10k_htc_hdr *)&lookaheads[i])->eid;
|
|
|
+ id = ((struct ath10k_htc_hdr *)
|
|
|
+ &lookaheads[lookahead_idx++])->eid;
|
|
|
|
|
|
if (id >= ATH10K_HTC_EP_COUNT) {
|
|
|
ath10k_warn(ar, "invalid endpoint in look-ahead: %d\n",
|
|
@@ -463,6 +465,7 @@ static int ath10k_sdio_mbox_rx_process_packets(struct ath10k *ar,
|
|
|
/* Only read lookahead's from RX trailers
|
|
|
* for the last packet in a bundle.
|
|
|
*/
|
|
|
+ lookahead_idx--;
|
|
|
lookaheads_local = NULL;
|
|
|
n_lookahead_local = NULL;
|
|
|
}
|