2 * Copyright (c) 2004 Atheros Communications Inc. All rights reserved.
7 #ifndef _NET_IF_ATH_PROTO_H_
8 #define _NET_IF_ATH_PROTO_H_
11 * Atheros proprietary protocol info.
15 * Atheros RSSI, Signal, Noise, etc.
18 #define ATH_DEFAULT_NOISE -95 /* dBm */
21 * Atheros proprietary SuperG defines.
24 #define ATH_ETH_TYPE 0x88bd
25 #define ATH_SNAP_ORGCODE_0 0x00
26 #define ATH_SNAP_ORGCODE_1 0x03
27 #define ATH_SNAP_ORGCODE_2 0x7f
29 struct athl2p_tunnel_hdr {
30 #if (_BYTE_ORDER == _LITTLE_ENDIAN)
36 #else /* big endian */
46 * The following defines control compiling Atheros-specific features
47 * (see BuildCaps.inc):
50 * set to 1 for fast-frame
53 #define ATH_L2TUNNEL_PROTO_FF 0
55 * 802.2 + FFHDR + HPAD + 802.3 + 802.2 + 1500 + SPAD + 802.3 + 802.2 + 1500:
56 * 8 + 4 + 4 + 14 + 8 + 1500 + 6 + 14 + 8 + 1500
59 #define ATH_FF_MAX_HDR_PAD 4
60 #define ATH_FF_MAX_SEP_PAD 6
61 #define ATH_FF_MAX_HDR 30
62 #define ATH_FF_MAX_PAYLOAD 3066
63 #define ATH_FF_MAX_LEN (ATH_FF_MAX_PAYLOAD + IEEE80211_CRC_LEN + \
64 (IEEE80211_WEP_IVLEN + IEEE80211_WEP_KIDLEN + IEEE80211_WEP_CRCLEN))
67 * Store a magic number in skb->cb[] area to indicate FF within driver.
68 * Offset of 8B into cb[] is used to preserve vlan tag info.
70 #define ATH_FF_MAGIC_PUT(_skb) \
71 (SKB_CB(_skb)->flags |= M_FF)
72 #define ATH_FF_MAGIC_CLR(_skb) \
73 (SKB_CB(_skb)->flags &= ~M_FF)
74 #define ATH_FF_MAGIC_PRESENT(_skb) \
75 ((SKB_CB(_skb)->flags & M_FF) != 0)
78 * default value for the minimum txq depth required for an ath_buf to be
79 * placed on the FF staging queue. this value should be >=3 due to interaction
80 * with HW compression.
82 #define ATH_FF_TXQMIN 3
85 * default maximum age an ath_buf is allowed to remain on the staging queue.
86 * When this number of ath_bufs have been queued on the txq, after an ath_buf
87 * was placed on the staging queue, that ath_buf on the staging queue will be
90 #define ATH_FF_STAGEQAGEMAX 5
93 * Reserve enough buffer header length to avoid reallocation on fast-frame
96 #define USE_HEADERLEN_RESV 1
98 #endif /* _NET_IF_ATH_PROTO_H_ */