Files
android_kernel_samsung_sm86…/dp/wifi3.0/dp_full_mon.h
Amir b1ab3a6941 qca-wifi: Add WAR to skip status ring entry
STATUS_BUFFRE_DONE tlv written in first word for a status
buffer indicates that DMA is done for that status ring entry.

In existing implementation, for a status ring entry if
STATUS_BUFFRE_DONE tlv is not written by HW, we poll on to status ring
entry until DMA is done by HW.

During lmac reset it may happne that HW will not write STATUS_BUFFRE_DONE
tlv in status buffer, in that case we end up polling infinitely leading
to backpressure on monitor status ring.

As per MAC team's suggestion, when HP + 1 entry is peeked and if DMA
is not done and if HP + 2 entry's DMA done is set,
replenish HP + 1 entry and start processing in next interrupt.

If HP + 2 entry's DMA done is not set,
poll onto HP + 1 entry DMA done to be set.

Change-Id: I2da5a16ec901764fcb88c417f599d7a1344bcea0
CRs-Fixed: 2744602
2020-08-11 13:08:42 +05:30

61 line
1.8 KiB
C

/**
* Copyright (c) 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 above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef _DP_FULL_MON_H_
#define _DP_FULL_MON_H_
#define DP_RX_MON_PPDU_ID_WRAP 32535
/**
* struct dp_mon_mpdu () - DP Monitor mpdu object
*
* @head: Head msdu
* @tail: Tail msdu
* @mpdu_list_elem: mpdu list element
* @rs_flags: Rx status flags
* @ant_signal_db: RSSI in dBm
* @is_stbc: is stbc is enabled
* @sgi: SGI
* @beamformed: if beamformed
*/
struct dp_mon_mpdu {
qdf_nbuf_t head;
qdf_nbuf_t tail;
TAILQ_ENTRY(dp_mon_mpdu) mpdu_list_elem;
uint8_t rs_flags;
uint8_t ant_signal_db;
uint8_t is_stbc;
uint8_t sgi;
uint8_t beamformed;
};
static inline QDF_STATUS
dp_rx_mon_is_rxdma_error(struct hal_rx_mon_desc_info *desc_info)
{
enum hal_rxdma_error_code rxdma_err = desc_info->rxdma_error_code;
if (qdf_unlikely(desc_info->rxdma_push_reason ==
HAL_RX_WBM_RXDMA_PSH_RSN_ERROR)) {
if (qdf_unlikely((rxdma_err == HAL_RXDMA_ERR_FLUSH_REQUEST) ||
(rxdma_err == HAL_RXDMA_ERR_MPDU_LENGTH) ||
(rxdma_err == HAL_RXDMA_ERR_OVERFLOW))) {
return QDF_STATUS_SUCCESS;
}
}
return QDF_STATUS_E_FAILURE;
}
#endif /* _DP_FULL_MON_H_ */