qcacmn: Add support to send packet marked by upper layer to FW

Upper layer (OS_IF) can mark certain packets to be sent
to FW. Mark such packets as exception, so that it is sent
to the FW.

Change-Id: I44af2b06793712be7236f831b6b2604123d72bb1
CRs-Fixed: 2813172
This commit is contained in:
Rakesh Pillai
2020-11-18 03:54:18 -08:00
کامیت شده توسط snandini
والد 4e87b183a7
کامیت e9899b2a2f
2فایلهای تغییر یافته به همراه35 افزوده شده و 3 حذف شده

مشاهده پرونده

@@ -902,6 +902,29 @@ dp_tx_wds_ext(struct dp_soc *soc, struct dp_vdev *vdev, uint16_t peer_id,
}
#endif
#ifdef WLAN_DP_FEATURE_MARK_ICMP_REQ_TO_FW
/**
* dp_tx_is_nbuf_marked_exception() - Check if the packet has been marked as
* exception by the upper layer (OS_IF)
* @soc: DP soc handle
* @nbuf: packet to be transmitted
*
* Returns: 1 if the packet is marked as exception,
* 0, if the packet is not marked as exception.
*/
static inline int dp_tx_is_nbuf_marked_exception(struct dp_soc *soc,
qdf_nbuf_t nbuf)
{
return QDF_NBUF_CB_TX_PACKET_TO_FW(nbuf);
}
#else
static inline int dp_tx_is_nbuf_marked_exception(struct dp_soc *soc,
qdf_nbuf_t nbuf)
{
return 0;
}
#endif
/**
* dp_tx_desc_prepare_single - Allocate and prepare Tx descriptor
* @vdev: DP vdev handle
@@ -961,6 +984,9 @@ struct dp_tx_desc_s *dp_tx_prepare_desc_single(struct dp_vdev *vdev,
if (qdf_unlikely(dp_is_tx_extended(vdev, tx_exc_metadata)))
return tx_desc;
/* Packets marked by upper layer (OS-IF) to be sent to FW */
if (dp_tx_is_nbuf_marked_exception(soc, nbuf))
is_exception = 1;
/*
* For special modes (vdev_type == ocb or mesh), data frames should be
* transmitted using varying transmit parameters (tx spec) which include