1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29#ifndef __BASEBAND_H__
30#define __BASEBAND_H__
31
32#include "device.h"
33
34#define PREAMBLE_LONG 0
35#define PREAMBLE_SHORT 1
36
37
38
39
40#define BB_MAX_CONTEXT_SIZE 256
41
42#define C_SIFS_A 16
43#define C_SIFS_BG 10
44
45#define C_EIFS 80
46
47#define C_SLOT_SHORT 9
48#define C_SLOT_LONG 20
49
50#define C_CWMIN_A 15
51#define C_CWMIN_B 31
52
53#define C_CWMAX 1023
54
55
56#define BB_TYPE_11A 0
57#define BB_TYPE_11B 1
58#define BB_TYPE_11G 2
59
60
61#define PK_TYPE_11A 0
62#define PK_TYPE_11B 1
63#define PK_TYPE_11GB 2
64#define PK_TYPE_11GA 3
65
66#define TOP_RATE_54M 0x80000000
67#define TOP_RATE_48M 0x40000000
68#define TOP_RATE_36M 0x20000000
69#define TOP_RATE_24M 0x10000000
70#define TOP_RATE_18M 0x08000000
71#define TOP_RATE_12M 0x04000000
72#define TOP_RATE_11M 0x02000000
73#define TOP_RATE_9M 0x01000000
74#define TOP_RATE_6M 0x00800000
75#define TOP_RATE_55M 0x00400000
76#define TOP_RATE_2M 0x00200000
77#define TOP_RATE_1M 0x00100000
78
79
80struct vnt_phy_field {
81 u8 signal;
82 u8 service;
83 __le16 len;
84} __packed;
85
86unsigned int vnt_get_frame_time(u8 preamble_type, u8 pkt_type,
87 unsigned int frame_length, u16 tx_rate);
88
89void vnt_get_phy_field(struct vnt_private *, u32 frame_length,
90 u16 tx_rate, u8 pkt_type, struct vnt_phy_field *);
91
92void vnt_set_short_slot_time(struct vnt_private *);
93void vnt_set_vga_gain_offset(struct vnt_private *, u8);
94void vnt_set_antenna_mode(struct vnt_private *, u8);
95int vnt_vt3184_init(struct vnt_private *);
96void vnt_set_deep_sleep(struct vnt_private *);
97void vnt_exit_deep_sleep(struct vnt_private *);
98void vnt_update_pre_ed_threshold(struct vnt_private *, int scanning);
99
100#endif
101