Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 709aaa97 authored by guangde's avatar guangde Committed by nshrivas
Browse files

qcacld-3.0: Add timestamp RX support in SAP mode

Host need to fill netbuf with qtime instead of tsf.
This function already realized in Change-Id
"Ib19ac1411c4e17624c012f188297c9f2122642d2".
But it only support STATION RX mode. add the similar
action for SAP RX mode.

Change-Id: Idb3f9da5488b19db48e96258ecb4539b5af3c9a6
CRs-Fixed: 2483566
parent fe1a71d4
Loading
Loading
Loading
Loading
+28 −0
Original line number Diff line number Diff line
@@ -811,6 +811,32 @@ QDF_STATUS hdd_softap_deinit_tx_rx_sta(struct hdd_adapter *adapter,
	return status;
}

/**
 * hdd_softap_tsf_timestamp_rx() - time stamp Rx netbuf
 * @context: pointer to HDD context
 * @netbuf: pointer to a Rx netbuf
 *
 * Return: None
 */
#ifdef WLAN_FEATURE_TSF_PLUS
static inline void hdd_softap_tsf_timestamp_rx(struct hdd_context *hdd_ctx,
					       qdf_nbuf_t netbuf)
{
	uint64_t target_time;

	if (!hdd_tsf_is_rx_set(hdd_ctx))
		return;

	target_time = ktime_to_us(netbuf->tstamp);
	hdd_rx_timestamp(netbuf, target_time);
}
#else
static inline void hdd_softap_tsf_timestamp_rx(struct hdd_context *hdd_ctx,
					       qdf_nbuf_t netbuf)
{
}
#endif

/**
 * hdd_softap_notify_tx_compl_cbk() - callback to notify tx completion
 * @skb: pointer to skb data
@@ -941,6 +967,8 @@ QDF_STATUS hdd_softap_rx_packet_cbk(void *context, qdf_nbuf_t rx_buf)
		 */
		qdf_net_buf_debug_release_skb(skb);

		hdd_softap_tsf_timestamp_rx(hdd_ctx, skb);

		if (qdf_likely(hdd_ctx->enable_rxthread)) {
			local_bh_disable();
			rxstat = netif_receive_skb(skb);