qcacmn: Filter rx fcs error frames for m_copy mode
Filter fcs_err frames and pass only first fcs ok msdu payload from ppdu to upper layer Change-Id: Ibf739193275f4f5a5c3e786abbbaa45165b5aa13 CRs-Fixed: 2439392
This commit is contained in:
@@ -148,6 +148,13 @@
|
||||
#define HAL_RX_GET_MSDU_AGGREGATION(rx_desc, rs)
|
||||
#endif
|
||||
|
||||
#define HAL_RX_MPDU_FCS_BITMAP_0_31_OFFSET 0x00000000FFFFFFFF
|
||||
#define HAL_RX_MPDU_FCS_BITMAP_LSB 32
|
||||
#define HAL_RX_MPDU_FCS_BITMAP_32_63_OFFSET 0xFFFFFFFF00000000
|
||||
|
||||
/* Max MPDUs per status buffer */
|
||||
#define HAL_RX_MAX_MPDU 64
|
||||
|
||||
enum {
|
||||
DP_PPDU_STATUS_START,
|
||||
DP_PPDU_STATUS_DONE,
|
||||
@@ -395,11 +402,21 @@ struct hal_rx_ppdu_common_info {
|
||||
uint32_t ppdu_timestamp;
|
||||
uint32_t mpdu_cnt_fcs_ok;
|
||||
uint32_t mpdu_cnt_fcs_err;
|
||||
uint64_t mpdu_fcs_ok_bitmap;
|
||||
uint32_t last_ppdu_id;
|
||||
uint32_t mpdu_cnt;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct hal_rx_msdu_payload_info - msdu payload info
|
||||
* @first_msdu_payload: pointer to first msdu payload
|
||||
* @payload_len: payload len
|
||||
* @nbuf: status network buffer to which msdu belongs to
|
||||
*/
|
||||
struct hal_rx_msdu_payload_info {
|
||||
uint8_t *first_msdu_payload;
|
||||
uint32_t payload_len;
|
||||
qdf_nbuf_t nbuf;
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -431,6 +448,7 @@ struct hal_rx_ppdu_info {
|
||||
struct mon_rx_status rx_status;
|
||||
struct mon_rx_user_status rx_user_status[HAL_MAX_UL_MU_USERS];
|
||||
struct hal_rx_msdu_payload_info msdu_info;
|
||||
struct hal_rx_msdu_payload_info fcs_ok_msdu_info;
|
||||
struct hal_rx_nac_info nac_info;
|
||||
/* status ring PPDU start and end state */
|
||||
uint32_t rx_state;
|
||||
@@ -443,6 +461,8 @@ struct hal_rx_ppdu_info {
|
||||
/* MPDU FCS error */
|
||||
bool fcs_err;
|
||||
struct hal_rx_ppdu_msdu_info rx_msdu_info[HAL_MAX_UL_MU_USERS];
|
||||
/* first msdu payload for all mpdus in ppdu */
|
||||
struct hal_rx_msdu_payload_info ppdu_msdu_info[HAL_RX_MAX_MPDU];
|
||||
};
|
||||
|
||||
static inline uint32_t
|
||||
@@ -491,15 +511,19 @@ static inline void hal_rx_proc_phyrx_other_receive_info_tlv(struct hal_soc *hal_
|
||||
* hal_rx_status_get_tlv_info() - process receive info TLV
|
||||
* @rx_tlv_hdr: pointer to TLV header
|
||||
* @ppdu_info: pointer to ppdu_info
|
||||
* @hal_soc: HAL soc handle
|
||||
* @nbuf: PPDU status netowrk buffer
|
||||
*
|
||||
* Return: HAL_TLV_STATUS_PPDU_NOT_DONE or HAL_TLV_STATUS_PPDU_DONE from tlv
|
||||
*/
|
||||
static inline uint32_t
|
||||
hal_rx_status_get_tlv_info(void *rx_tlv_hdr, void *ppdu_info,
|
||||
struct hal_soc *hal_soc)
|
||||
struct hal_soc *hal_soc,
|
||||
qdf_nbuf_t nbuf)
|
||||
{
|
||||
return hal_soc->ops->hal_rx_status_get_tlv_info(rx_tlv_hdr,
|
||||
ppdu_info, hal_soc);
|
||||
ppdu_info, hal_soc,
|
||||
nbuf);
|
||||
}
|
||||
|
||||
static inline
|
||||
|
@@ -321,7 +321,7 @@ hal_rx_update_rssi_chain(struct hal_rx_ppdu_info *ppdu_info,
|
||||
*/
|
||||
static inline uint32_t
|
||||
hal_rx_status_get_tlv_info_generic(void *rx_tlv_hdr, void *ppduinfo,
|
||||
void *halsoc)
|
||||
void *halsoc, qdf_nbuf_t nbuf)
|
||||
{
|
||||
struct hal_soc *hal = (struct hal_soc *)halsoc;
|
||||
uint32_t tlv_tag, user_id, tlv_len, value;
|
||||
@@ -348,6 +348,9 @@ hal_rx_status_get_tlv_info_generic(void *rx_tlv_hdr, void *ppduinfo,
|
||||
switch (tlv_tag) {
|
||||
|
||||
case WIFIRX_PPDU_START_E:
|
||||
{
|
||||
struct hal_rx_ppdu_common_info *com_info = &ppdu_info->com_info;
|
||||
|
||||
ppdu_info->com_info.ppdu_id =
|
||||
HAL_RX_GET(rx_tlv, RX_PPDU_START_0,
|
||||
PHY_PPDU_ID);
|
||||
@@ -361,7 +364,18 @@ hal_rx_status_get_tlv_info_generic(void *rx_tlv_hdr, void *ppduinfo,
|
||||
ppdu_info->rx_status.ppdu_timestamp =
|
||||
ppdu_info->com_info.ppdu_timestamp;
|
||||
ppdu_info->rx_state = HAL_RX_MON_PPDU_START;
|
||||
|
||||
/* If last ppdu_id doesn't match new ppdu_id,
|
||||
* 1. reset mpdu_cnt
|
||||
* 2. update last_ppdu_id with new
|
||||
*/
|
||||
if (com_info->ppdu_id != com_info->last_ppdu_id) {
|
||||
com_info->mpdu_cnt = 0;
|
||||
com_info->last_ppdu_id =
|
||||
com_info->ppdu_id;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
case WIFIRX_PPDU_START_USER_INFO_E:
|
||||
break;
|
||||
@@ -475,6 +489,20 @@ hal_rx_status_get_tlv_info_generic(void *rx_tlv_hdr, void *ppduinfo,
|
||||
else
|
||||
ppdu_info->rx_status.rs_flags &=
|
||||
(~IEEE80211_AMPDU_FLAG);
|
||||
|
||||
ppdu_info->com_info.mpdu_fcs_ok_bitmap =
|
||||
(((ppdu_info->com_info.mpdu_fcs_ok_bitmap |
|
||||
HAL_RX_GET(rx_tlv, RX_PPDU_END_USER_STATS_8,
|
||||
FCS_OK_BITMAP_63_32)) <<
|
||||
HAL_RX_MPDU_FCS_BITMAP_LSB) &
|
||||
HAL_RX_MPDU_FCS_BITMAP_32_63_OFFSET);
|
||||
|
||||
ppdu_info->com_info.mpdu_fcs_ok_bitmap =
|
||||
((ppdu_info->com_info.mpdu_fcs_ok_bitmap |
|
||||
HAL_RX_GET(rx_tlv, RX_PPDU_END_USER_STATS_7,
|
||||
FCS_OK_BITMAP_31_0)) &
|
||||
HAL_RX_MPDU_FCS_BITMAP_0_31_OFFSET);
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -1207,13 +1235,28 @@ hal_rx_status_get_tlv_info_generic(void *rx_tlv_hdr, void *ppduinfo,
|
||||
ppdu_info);
|
||||
break;
|
||||
case WIFIRX_HEADER_E:
|
||||
{
|
||||
struct hal_rx_ppdu_common_info *com_info = &ppdu_info->com_info;
|
||||
uint16_t mpdu_cnt = com_info->mpdu_cnt;
|
||||
|
||||
/* Update first_msdu_payload for every mpdu and increment
|
||||
* com_info->mpdu_cnt for every WIFIRX_HEADER_E TLV
|
||||
*/
|
||||
ppdu_info->ppdu_msdu_info[mpdu_cnt].first_msdu_payload =
|
||||
rx_tlv;
|
||||
ppdu_info->ppdu_msdu_info[mpdu_cnt].payload_len = tlv_len;
|
||||
ppdu_info->ppdu_msdu_info[mpdu_cnt].nbuf = nbuf;
|
||||
ppdu_info->msdu_info.first_msdu_payload = rx_tlv;
|
||||
ppdu_info->msdu_info.payload_len = tlv_len;
|
||||
ppdu_info->user_id = user_id;
|
||||
ppdu_info->hdr_len = tlv_len;
|
||||
ppdu_info->data = rx_tlv;
|
||||
ppdu_info->data += 4;
|
||||
|
||||
/* for every RX_HEADER TLV increment mpdu_cnt */
|
||||
com_info->mpdu_cnt++;
|
||||
return HAL_TLV_STATUS_HEADER;
|
||||
}
|
||||
case WIFIRX_MPDU_START_E:
|
||||
{
|
||||
uint8_t *rx_mpdu_start =
|
||||
|
@@ -338,7 +338,7 @@ struct hal_hw_txrx_ops {
|
||||
void (*hal_reo_status_get_header)(uint32_t *d, int b, void *h);
|
||||
uint32_t (*hal_rx_status_get_tlv_info)(void *rx_tlv_hdr,
|
||||
void *ppdu_info,
|
||||
void *hal);
|
||||
void *hal, qdf_nbuf_t nbuf);
|
||||
void (*hal_rx_wbm_err_info_get)(void *wbm_desc,
|
||||
void *wbm_er_info);
|
||||
void (*hal_rx_dump_mpdu_start_tlv)(void *mpdustart,
|
||||
|
Reference in New Issue
Block a user