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