blob: 0e9d7c357d64f715e8ba86d451bf87a2a9a36da8 [file] [log] [blame]
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001/*
2 * Copyright (c) 2012-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/**
29 * @file htt_common.h
30 *
31 * @details the public header file of HTT layer shared between host and firmware
32 */
33
34#ifndef _HTT_COMMON_H_
35#define _HTT_COMMON_H_
36
37enum htt_sec_type {
38 htt_sec_type_none,
39 htt_sec_type_wep128,
40 htt_sec_type_wep104,
41 htt_sec_type_wep40,
42 htt_sec_type_tkip,
43 htt_sec_type_tkip_nomic,
44 htt_sec_type_aes_ccmp,
45 htt_sec_type_wapi,
46 htt_sec_type_aes_ccmp_256,
47 htt_sec_type_aes_gcmp,
48 htt_sec_type_aes_gcmp_256,
49
50 /* keep this last! */
51 htt_num_sec_types
52};
53
54enum htt_rx_ind_mpdu_status {
55 HTT_RX_IND_MPDU_STATUS_UNKNOWN = 0x0,
56 HTT_RX_IND_MPDU_STATUS_OK,
57 HTT_RX_IND_MPDU_STATUS_ERR_FCS,
58 HTT_RX_IND_MPDU_STATUS_ERR_DUP,
59 HTT_RX_IND_MPDU_STATUS_ERR_REPLAY,
60 HTT_RX_IND_MPDU_STATUS_ERR_INV_PEER,
61 HTT_RX_IND_MPDU_STATUS_UNAUTH_PEER, /* only accept EAPOL frames */
62 HTT_RX_IND_MPDU_STATUS_OUT_OF_SYNC,
63 HTT_RX_IND_MPDU_STATUS_MGMT_CTRL, /* Non-data in promiscous mode */
64 HTT_RX_IND_MPDU_STATUS_TKIP_MIC_ERR,
65 HTT_RX_IND_MPDU_STATUS_DECRYPT_ERR,
66 HTT_RX_IND_MPDU_STATUS_MPDU_LENGTH_ERR,
67 HTT_RX_IND_MPDU_STATUS_ENCRYPT_REQUIRED_ERR,
68 HTT_RX_IND_MPDU_STATUS_PRIVACY_ERR,
69
70 /*
71 * MISC: discard for unspecified reasons.
72 * Leave this enum value last.
73 */
74 HTT_RX_IND_MPDU_STATUS_ERR_MISC = 0xFF
75};
76
77#define HTT_INVALID_PEER 0xffff
78#define HTT_INVALID_VDEV 0xff
79
80#define HTT_NON_QOS_TID 16
81#define HTT_INVALID_TID 31
82
83#define HTT_TX_EXT_TID_DEFAULT 0
84#define HTT_TX_EXT_TID_NON_QOS_MCAST_BCAST HTT_NON_QOS_TID
85#define HTT_TX_EXT_TID_MGMT 17
86#define HTT_TX_EXT_TID_INVALID HTT_INVALID_TID
87#define HTT_TX_EXT_TID_NONPAUSE 19
88
89
90
91#define HTT_TX_L3_CKSUM_OFFLOAD 1
92#define HTT_TX_L4_CKSUM_OFFLOAD 2
93
94
95/**
96 * @brief General specification of the tx frame contents
97 *
98 * @details
99 * For efficiency, the HTT packet type values correspond
100 * to the bit positions of the WAL packet type values, so the
101 * translation is a simple shift operation.
102 * The exception is the "mgmt" type, which specifies frame payload
103 * type rather than L2 header type.
104 */
105enum htt_pkt_type {
106 htt_pkt_type_raw = 0,
107 htt_pkt_type_native_wifi = 1,
108 htt_pkt_type_ethernet = 2,
109 htt_pkt_type_mgmt = 3,
110 htt_pkt_type_eth2 = 4,
111
112 /* keep this last */
113 htt_pkt_num_types
114};
115
116#define HTT_TX_HOST_MSDU_ID_SPACE_BEGIN 0
117#define HTT_TX_IPA_MSDU_ID_SPACE_BEGIN 3000
118#define TGT_RX2TX_MSDU_ID_SPACE_BEGIN 6000
119
120#endif /* _HTT_COMMON_H_ */