qcacld-3.0: Add update_seq_num flag to htt_rx_mpdu_desc_seq_num
In case of partial reorder, seq number is sent by FW when first_msdu bit is set in msdu. For all other msdus host maintain copy of cur_seq_num_hl in pdev. cur_seq_num_hl gets updated when htt_rx_mpdu_desc_seq_num API is called. Currently htt_rx_mpdu_desc_seq_num API is called from multiple functions. Add update_seq_num flag to make sure that cur_seq_num_hl updates only during store function. Change-Id: Ie3178ee6d1642dbeaf0cea032dc80e0ecccc1dc2 CRs-Fixed: 2683869
This commit is contained in:
parent
2721fcec48
commit
cf164af18d
@ -186,7 +186,8 @@ void * (*htt_rx_mpdu_desc_list_next)(htt_pdev_handle pdev,
|
||||
|
||||
bool (*htt_rx_mpdu_desc_retry)(htt_pdev_handle pdev, void *mpdu_desc);
|
||||
|
||||
uint16_t (*htt_rx_mpdu_desc_seq_num)(htt_pdev_handle pdev, void *mpdu_desc);
|
||||
uint16_t (*htt_rx_mpdu_desc_seq_num)(htt_pdev_handle pdev, void *mpdu_desc,
|
||||
bool update_seq_num);
|
||||
|
||||
void (*htt_rx_mpdu_desc_pn)(htt_pdev_handle pdev,
|
||||
void *mpdu_desc,
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2011-2019 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2011-2020 The Linux Foundation. All rights reserved.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for
|
||||
* any purpose with or without fee is hereby granted, provided that the
|
||||
@ -385,12 +385,17 @@ htt_rx_offload_msdu_pop_hl(htt_pdev_handle pdev,
|
||||
}
|
||||
|
||||
static uint16_t
|
||||
htt_rx_mpdu_desc_seq_num_hl(htt_pdev_handle pdev, void *mpdu_desc)
|
||||
htt_rx_mpdu_desc_seq_num_hl(htt_pdev_handle pdev, void *mpdu_desc,
|
||||
bool update_seq_num)
|
||||
{
|
||||
if (pdev->rx_desc_size_hl) {
|
||||
return pdev->cur_seq_num_hl =
|
||||
(u_int16_t)(HTT_WORD_GET(*(u_int32_t *)mpdu_desc,
|
||||
HTT_HL_RX_DESC_MPDU_SEQ_NUM));
|
||||
if (update_seq_num)
|
||||
return pdev->cur_seq_num_hl =
|
||||
(u_int16_t)(HTT_WORD_GET(*(u_int32_t *)mpdu_desc,
|
||||
HTT_HL_RX_DESC_MPDU_SEQ_NUM));
|
||||
else
|
||||
return (u_int16_t)(HTT_WORD_GET(*(u_int32_t *)mpdu_desc,
|
||||
HTT_HL_RX_DESC_MPDU_SEQ_NUM));
|
||||
} else {
|
||||
return (u_int16_t)(pdev->cur_seq_num_hl);
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2011-2019 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2011-2020 The Linux Foundation. All rights reserved.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for
|
||||
* any purpose with or without fee is hereby granted, provided that the
|
||||
@ -767,7 +767,8 @@ htt_rx_mpdu_desc_retry_ll(htt_pdev_handle pdev, void *mpdu_desc)
|
||||
}
|
||||
|
||||
static uint16_t htt_rx_mpdu_desc_seq_num_ll(htt_pdev_handle pdev,
|
||||
void *mpdu_desc)
|
||||
void *mpdu_desc,
|
||||
bool update_seq_num)
|
||||
{
|
||||
struct htt_host_rx_desc_base *rx_desc =
|
||||
(struct htt_host_rx_desc_base *)mpdu_desc;
|
||||
|
@ -380,7 +380,8 @@ bool (*htt_rx_mpdu_desc_retry)(
|
||||
* @return the LSBs of the sequence number for the MPDU
|
||||
*/
|
||||
extern uint16_t
|
||||
(*htt_rx_mpdu_desc_seq_num)(htt_pdev_handle pdev, void *mpdu_desc);
|
||||
(*htt_rx_mpdu_desc_seq_num)(htt_pdev_handle pdev, void *mpdu_desc,
|
||||
bool update_seq_num);
|
||||
|
||||
/**
|
||||
* @brief Return a rx MPDU's rx reorder array index, based on sequence number.
|
||||
|
@ -416,11 +416,12 @@ static void process_reorder(ol_txrx_pdev_handle pdev,
|
||||
enum htt_rx_status mpdu_status;
|
||||
int reorder_idx;
|
||||
|
||||
reorder_idx = htt_rx_mpdu_desc_reorder_idx(htt_pdev, rx_mpdu_desc);
|
||||
reorder_idx = htt_rx_mpdu_desc_reorder_idx(htt_pdev, rx_mpdu_desc,
|
||||
true);
|
||||
OL_RX_REORDER_TRACE_ADD(pdev, tid,
|
||||
reorder_idx,
|
||||
htt_rx_mpdu_desc_seq_num(htt_pdev,
|
||||
rx_mpdu_desc),
|
||||
rx_mpdu_desc, false),
|
||||
1);
|
||||
ol_rx_mpdu_rssi_update(peer, rx_mpdu_desc);
|
||||
/*
|
||||
@ -476,7 +477,7 @@ static void process_reorder(ol_txrx_pdev_handle pdev,
|
||||
if (peer->tids_rx_reorder[tid].win_sz_mask == 0) {
|
||||
peer->tids_last_seq[tid] = htt_rx_mpdu_desc_seq_num(
|
||||
htt_pdev,
|
||||
rx_mpdu_desc);
|
||||
rx_mpdu_desc, false);
|
||||
}
|
||||
}
|
||||
} /* process_reorder */
|
||||
|
@ -357,7 +357,8 @@ ol_rx_frag_indication_handler(ol_txrx_pdev_handle pdev,
|
||||
htt_rx_mpdu_desc_list_next(htt_pdev,
|
||||
rx_frag_ind_msg);
|
||||
}
|
||||
seq_num = htt_rx_mpdu_desc_seq_num(htt_pdev, rx_mpdu_desc);
|
||||
seq_num = htt_rx_mpdu_desc_seq_num(htt_pdev,
|
||||
rx_mpdu_desc, true);
|
||||
OL_RX_ERR_STATISTICS_1(pdev, peer->vdev, peer, rx_mpdu_desc,
|
||||
OL_RX_ERR_NONE_FRAG);
|
||||
ol_rx_send_pktlog_event(pdev, peer, head_msdu, pktlog_bit);
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2011, 2013-2017, 2019 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2011, 2013-2017, 2019-2020 The Linux Foundation. All rights reserved.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for
|
||||
* any purpose with or without fee is hereby granted, provided that the
|
||||
@ -171,7 +171,7 @@ ol_rx_pn_check_base(struct ol_txrx_vdev_t *vdev,
|
||||
new_pn.pn128[1], new_pn.pn128[0],
|
||||
new_pn.pn128[0] & 0xffffffffffffULL,
|
||||
htt_rx_mpdu_desc_seq_num(pdev->htt_pdev,
|
||||
rx_desc));
|
||||
rx_desc, false));
|
||||
} else {
|
||||
ol_txrx_dbg(
|
||||
"PN check failed - TID %d, peer %pK "
|
||||
@ -190,7 +190,7 @@ ol_rx_pn_check_base(struct ol_txrx_vdev_t *vdev,
|
||||
new_pn.pn128[1], new_pn.pn128[0],
|
||||
new_pn.pn128[0] & 0xffffffffffffULL,
|
||||
htt_rx_mpdu_desc_seq_num(pdev->htt_pdev,
|
||||
rx_desc));
|
||||
rx_desc, false));
|
||||
}
|
||||
#if defined(ENABLE_RX_PN_TRACE)
|
||||
ol_rx_pn_trace_display(pdev, 1);
|
||||
@ -300,7 +300,7 @@ ol_rx_pn_trace_add(struct ol_txrx_pdev_t *pdev,
|
||||
|
||||
htt_rx_mpdu_desc_pn(pdev->htt_pdev, rx_desc, &pn, 48);
|
||||
pn32 = pn.pn48 & 0xffffffff;
|
||||
seq_num = htt_rx_mpdu_desc_seq_num(pdev->htt_pdev, rx_desc);
|
||||
seq_num = htt_rx_mpdu_desc_seq_num(pdev->htt_pdev, rx_desc, false);
|
||||
unicast = !htt_rx_msdu_is_wlan_mcast(pdev->htt_pdev, rx_desc);
|
||||
|
||||
pdev->rx_pn_trace.data[idx].peer = peer;
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2011-2019 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2011-2020 The Linux Foundation. All rights reserved.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for
|
||||
* any purpose with or without fee is hereby granted, provided that the
|
||||
@ -162,7 +162,7 @@ ol_rx_seq_num_check(struct ol_txrx_pdev_t *pdev,
|
||||
uint16_t seq_num = IEEE80211_SEQ_MAX;
|
||||
bool retry = 0;
|
||||
|
||||
seq_num = htt_rx_mpdu_desc_seq_num(pdev->htt_pdev, rx_mpdu_desc);
|
||||
seq_num = htt_rx_mpdu_desc_seq_num(pdev->htt_pdev, rx_mpdu_desc, false);
|
||||
|
||||
/* For mcast packets, we only the dup-detection, not re-order check */
|
||||
|
||||
@ -294,7 +294,7 @@ ol_rx_reorder_release(struct ol_txrx_vdev_t *vdev,
|
||||
seq_num = htt_rx_mpdu_desc_seq_num(
|
||||
htt_pdev,
|
||||
htt_rx_msdu_desc_retrieve(htt_pdev,
|
||||
head_msdu));
|
||||
head_msdu), false);
|
||||
peer->tids_last_seq[tid] = seq_num;
|
||||
/* rx_opt_proc takes a NULL-terminated list of msdu netbufs */
|
||||
qdf_nbuf_set_next(tail_msdu, NULL);
|
||||
@ -379,7 +379,7 @@ ol_rx_reorder_flush(struct ol_txrx_vdev_t *vdev,
|
||||
|
||||
seq_num = htt_rx_mpdu_desc_seq_num(
|
||||
htt_pdev,
|
||||
htt_rx_msdu_desc_retrieve(htt_pdev, head_msdu));
|
||||
htt_rx_msdu_desc_retrieve(htt_pdev, head_msdu), false);
|
||||
peer->tids_last_seq[tid] = seq_num;
|
||||
/* rx_opt_proc takes a NULL-terminated list of msdu netbufs */
|
||||
qdf_nbuf_set_next(tail_msdu, NULL);
|
||||
@ -770,7 +770,8 @@ ol_rx_pn_ind_handler(ol_txrx_pdev_handle pdev,
|
||||
pn.pn128[0],
|
||||
pn.pn128[0] & 0xffffffffffffULL,
|
||||
htt_rx_mpdu_desc_seq_num(htt_pdev,
|
||||
rx_desc));
|
||||
rx_desc,
|
||||
false));
|
||||
} else {
|
||||
ol_txrx_dbg(
|
||||
"Tgt PN check failed - TID %d, peer %pK "
|
||||
@ -783,7 +784,8 @@ ol_rx_pn_ind_handler(ol_txrx_pdev_handle pdev,
|
||||
pn.pn128[0],
|
||||
pn.pn128[0] & 0xffffffffffffULL,
|
||||
htt_rx_mpdu_desc_seq_num(htt_pdev,
|
||||
rx_desc));
|
||||
rx_desc,
|
||||
false));
|
||||
}
|
||||
ol_rx_err(pdev->ctrl_pdev, vdev->vdev_id,
|
||||
peer->mac_addr.raw, tid,
|
||||
|
Loading…
Reference in New Issue
Block a user