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
Tento commit je obsažen v:
@@ -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
|
||||
|
@@ -192,6 +192,7 @@ typedef union {
|
||||
* + (TXRX)|(HTT)|(HTC)|(HIF)|(CE)|(FREE)]
|
||||
* @tx.trace.is_packet_priv:
|
||||
* @tx.trace.packet_track: {NBUF_TX_PKT_[(DATA)|(MGMT)]_TRACK}
|
||||
* @tx.trace.to_fw: Flag to indicate send this packet to FW
|
||||
* @tx.trace.proto_type: bitmap of NBUF_PKT_TRAC_TYPE[(EAPOL)|(DHCP)|
|
||||
* + (MGMT_ACTION)] - 4 bits
|
||||
* @tx.trace.dp_trace: flag (Datapath trace)
|
||||
@@ -274,8 +275,8 @@ struct qdf_nbuf_cb {
|
||||
union {
|
||||
uint8_t packet_state;
|
||||
uint8_t dp_trace:1,
|
||||
packet_track:4,
|
||||
rsrvd:3;
|
||||
packet_track:3,
|
||||
rsrvd:4;
|
||||
} trace;
|
||||
uint16_t vdev_id:8,
|
||||
tid_val:4,
|
||||
@@ -329,7 +330,8 @@ struct qdf_nbuf_cb {
|
||||
struct {
|
||||
uint8_t packet_state:7,
|
||||
is_packet_priv:1;
|
||||
uint8_t packet_track:4,
|
||||
uint8_t packet_track:3,
|
||||
to_fw:1,
|
||||
proto_type:4;
|
||||
uint8_t dp_trace:1,
|
||||
is_bcast:1,
|
||||
@@ -496,6 +498,10 @@ QDF_COMPILE_TIME_ASSERT(qdf_nbuf_cb_size,
|
||||
(((struct qdf_nbuf_cb *) \
|
||||
((skb)->cb))->u.tx.trace.packet_track)
|
||||
|
||||
#define QDF_NBUF_CB_TX_PACKET_TO_FW(skb)\
|
||||
(((struct qdf_nbuf_cb *) \
|
||||
((skb)->cb))->u.tx.trace.to_fw)
|
||||
|
||||
#define QDF_NBUF_CB_RX_PACKET_TRACK(skb)\
|
||||
(((struct qdf_nbuf_cb *) \
|
||||
((skb)->cb))->u.rx.trace.packet_track)
|
||||
|
Odkázat v novém úkolu
Zablokovat Uživatele