xref: /wlan-driver/qcacld-3.0/core/dp/ol/inc/ol_vowext_dbg_defs.h (revision 5113495b16420b49004c444715d2daae2066e7dc)
1 /*
2  * Copyright (c) 2012, 2014-2016, 2018 The Linux Foundation. All rights reserved.
3  *
4  * Permission to use, copy, modify, and/or distribute this software for
5  * any purpose with or without fee is hereby granted, provided that the
6  * above copyright notice and this permission notice appear in all
7  * copies.
8  *
9  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
10  * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
11  * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
12  * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
13  * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
14  * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
15  * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
16  * PERFORMANCE OF THIS SOFTWARE.
17  */
18 
19 #ifndef _VOW_DEFINES__H_
20 #define _VOW_DEFINES__H_
21 
22 #define UDP_CKSUM_OFFSET   40   /* UDP check sum offset in network buffer */
23 #define RTP_HDR_OFFSET  42      /* RTP header offset in network buffer */
24 #define EXT_HDR_OFFSET 54       /* Extension header offset in network buffer */
25 #define UDP_PDU_RTP_EXT  0x90   /* ((2 << 6) | (1 << 4)) RTP V2 + X bit */
26 #define IP_VER4_N_NO_EXTRA_HEADERS 0x45
27 #define IPERF3_DATA_OFFSET 12   /* iperf3 data offset from EXT_HDR_OFFSET */
28 #define HAL_RX_40  0x08         /* 40 Mhz */
29 #define HAL_RX_GI  0x04         /* full gi */
30 
31 struct vow_extstats {
32 	uint8_t rx_rssi_ctl0;   /* control channel chain0 rssi */
33 	uint8_t rx_rssi_ctl1;   /* control channel chain1 rssi */
34 	uint8_t rx_rssi_ctl2;   /* control channel chain2 rssi */
35 	uint8_t rx_rssi_ext0;   /* extension channel chain0 rssi */
36 	uint8_t rx_rssi_ext1;   /* extension channel chain1 rssi */
37 	uint8_t rx_rssi_ext2;   /* extension channel chain2 rssi */
38 	uint8_t rx_rssi_comb;   /* combined RSSI value */
39 	uint8_t rx_bw;          /* Band width 0-20, 1-40, 2-80 */
40 	uint8_t rx_sgi;         /* Guard interval, 0-Long GI, 1-Short GI */
41 	uint8_t rx_nss;         /* Number of spatial streams */
42 	uint8_t rx_mcs;         /* Rate MCS value */
43 	uint8_t rx_ratecode;    /* Hardware rate code */
44 	uint8_t rx_rs_flags;    /* Receive misc flags */
45 	uint8_t rx_moreaggr;    /* 0 - non aggr frame */
46 	uint32_t rx_macTs;      /* Time stamp */
47 	uint16_t rx_seqno;      /* rx sequence number */
48 };
49 
50 /**
51  * @brief populates vow ext stats in given network buffer.
52  * @param msdu - network buffer handle
53  * @param pdev - handle to htt dev.
54  */
55 void ol_ath_add_vow_extstats(htt_pdev_handle pdev, qdf_nbuf_t msdu);
56 
57 #endif /* _VOW_DEFINES__H_ */
58