Go to the documentation of this file.
30 #ifndef __RTL_BASE_H__
31 #define __RTL_BASE_H__
46 #define RTL_DUMMY_OFFSET 0
47 #define RTL_DUMMY_UNIT 8
48 #define RTL_TX_DUMMY_SIZE (RTL_DUMMY_OFFSET * RTL_DUMMY_UNIT)
49 #define RTL_TX_DESC_SIZE 32
50 #define RTL_TX_HEADER_SIZE (RTL_TX_DESC_SIZE + RTL_TX_DUMMY_SIZE)
52 #define HT_AMSDU_SIZE_4K 3839
53 #define HT_AMSDU_SIZE_8K 7935
55 #define MAX_BIT_RATE_40MHZ_MCS15 300
56 #define MAX_BIT_RATE_40MHZ_MCS7 150
58 #define RTL_RATE_COUNT_LEGACY 12
59 #define RTL_CHANNEL_COUNT 14
61 #define FRAME_OFFSET_FRAME_CONTROL 0
62 #define FRAME_OFFSET_DURATION 2
63 #define FRAME_OFFSET_ADDRESS1 4
64 #define FRAME_OFFSET_ADDRESS2 10
65 #define FRAME_OFFSET_ADDRESS3 16
66 #define FRAME_OFFSET_SEQUENCE 22
67 #define FRAME_OFFSET_ADDRESS4 24
69 #define SET_80211_HDR_FRAME_CONTROL(_hdr, _val) \
70 WRITEEF2BYTE(_hdr, _val)
71 #define SET_80211_HDR_TYPE_AND_SUBTYPE(_hdr, _val) \
72 WRITEEF1BYTE(_hdr, _val)
73 #define SET_80211_HDR_PWR_MGNT(_hdr, _val) \
74 SET_BITS_TO_LE_2BYTE(_hdr, 12, 1, _val)
75 #define SET_80211_HDR_TO_DS(_hdr, _val) \
76 SET_BITS_TO_LE_2BYTE(_hdr, 8, 1, _val)
78 #define SET_80211_PS_POLL_AID(_hdr, _val) \
79 (*(u16 *)((u8 *)(_hdr) + 2) = _val)
80 #define SET_80211_PS_POLL_BSSID(_hdr, _val) \
81 memcpy(((u8 *)(_hdr)) + 4, (u8 *)(_val), ETH_ALEN)
82 #define SET_80211_PS_POLL_TA(_hdr, _val) \
83 memcpy(((u8 *)(_hdr)) + 10, (u8 *)(_val), ETH_ALEN)
85 #define SET_80211_HDR_DURATION(_hdr, _val) \
86 (*(u16 *)((u8 *)(_hdr) + FRAME_OFFSET_DURATION) = le16_to_cpu(_val))
87 #define SET_80211_HDR_ADDRESS1(_hdr, _val) \
88 CP_MACADDR((u8 *)(_hdr)+FRAME_OFFSET_ADDRESS1, (u8 *)(_val))
89 #define SET_80211_HDR_ADDRESS2(_hdr, _val) \
90 CP_MACADDR((u8 *)(_hdr)+FRAME_OFFSET_ADDRESS2, (u8 *)(_val))
91 #define SET_80211_HDR_ADDRESS3(_hdr, _val) \
92 CP_MACADDR((u8 *)(_hdr)+FRAME_OFFSET_ADDRESS3, (u8 *)(_val))
93 #define SET_80211_HDR_FRAGMENT_SEQUENCE(_hdr, _val) \
94 WRITEEF2BYTE((u8 *)(_hdr)+FRAME_OFFSET_SEQUENCE, _val)
96 #define SET_BEACON_PROBE_RSP_TIME_STAMP_LOW(__phdr, __val) \
97 WRITEEF4BYTE(((u8 *)(__phdr)) + 24, __val)
98 #define SET_BEACON_PROBE_RSP_TIME_STAMP_HIGH(__phdr, __val) \
99 WRITEEF4BYTE(((u8 *)(__phdr)) + 28, __val)
100 #define SET_BEACON_PROBE_RSP_BEACON_INTERVAL(__phdr, __val) \
101 WRITEEF2BYTE(((u8 *)(__phdr)) + 32, __val)
102 #define GET_BEACON_PROBE_RSP_CAPABILITY_INFO(__phdr) \
103 READEF2BYTE(((u8 *)(__phdr)) + 34)
104 #define SET_BEACON_PROBE_RSP_CAPABILITY_INFO(__phdr, __val) \
105 WRITEEF2BYTE(((u8 *)(__phdr)) + 34, __val)
106 #define MASK_BEACON_PROBE_RSP_CAPABILITY_INFO(__phdr, __val) \
107 SET_BEACON_PROBE_RSP_CAPABILITY_INFO(__phdr, \
108 (GET_BEACON_PROBE_RSP_CAPABILITY_INFO(__phdr) & (~(__val))))
144 bool isht,
u8 desc_rate,
bool first_ampdu);