Commit | Line | Data |
---|---|---|
92b96797 FB |
1 | /* |
2 | * Copyright (c) 1996, 2003 VIA Networking Technologies, Inc. | |
3 | * All rights reserved. | |
4 | * | |
5 | * This program is free software; you can redistribute it and/or modify | |
6 | * it under the terms of the GNU General Public License as published by | |
7 | * the Free Software Foundation; either version 2 of the License, or | |
8 | * (at your option) any later version. | |
9 | * | |
10 | * This program is distributed in the hope that it will be useful, | |
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
13 | * GNU General Public License for more details. | |
14 | * | |
15 | * You should have received a copy of the GNU General Public License along | |
16 | * with this program; if not, write to the Free Software Foundation, Inc., | |
17 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | |
18 | * | |
19 | * | |
20 | * File: datarate.h | |
21 | * | |
22 | * Purpose: Handles the auto fallback & data rates functions | |
23 | * | |
24 | * Author: Lyndon Chen | |
25 | * | |
26 | * Date: July 16, 2002 | |
27 | * | |
28 | */ | |
29 | #ifndef __DATARATE_H__ | |
30 | #define __DATARATE_H__ | |
31 | ||
32 | /*--------------------- Export Definitions -------------------------*/ | |
33 | ||
34 | #define FALLBACK_PKT_COLLECT_TR_H 50 // pkts | |
35 | #define FALLBACK_PKT_COLLECT_TR_L 10 // pkts | |
36 | #define FALLBACK_POLL_SECOND 5 // 5 sec | |
37 | #define FALLBACK_RECOVER_SECOND 30 // 30 sec | |
38 | #define FALLBACK_THRESHOLD 15 // percent | |
39 | #define UPGRADE_THRESHOLD 5 // percent | |
40 | #define UPGRADE_CNT_THRD 3 // times | |
41 | #define RETRY_TIMES_THRD_H 2 // times | |
42 | #define RETRY_TIMES_THRD_L 1 // times | |
43 | ||
44 | ||
45 | #define RATE_1M 0 | |
46 | #define RATE_2M 1 | |
47 | #define RATE_5M 2 | |
48 | #define RATE_11M 3 | |
49 | #define RATE_6M 4 | |
50 | #define RATE_9M 5 | |
51 | #define RATE_12M 6 | |
52 | #define RATE_18M 7 | |
53 | #define RATE_24M 8 | |
54 | #define RATE_36M 9 | |
55 | #define RATE_48M 10 | |
56 | #define RATE_54M 11 | |
57 | #define RATE_AUTO 12 | |
58 | #define MAX_RATE 12 | |
59 | ||
60 | /*--------------------- Export Classes ----------------------------*/ | |
61 | ||
62 | /*--------------------- Export Variables --------------------------*/ | |
63 | ||
64 | ||
65 | /*--------------------- Export Types ------------------------------*/ | |
66 | ||
67 | ||
68 | /*--------------------- Export Functions --------------------------*/ | |
69 | ||
70 | ||
71 | ||
8611a29a | 72 | void |
92b96797 | 73 | RATEvParseMaxRate( |
8611a29a | 74 | void *pDeviceHandler, |
592ccfeb AM |
75 | PWLAN_IE_SUPP_RATES pItemRates, |
76 | PWLAN_IE_SUPP_RATES pItemExtRates, | |
77 | BOOL bUpdateBasicRate, | |
6f8c13c7 AM |
78 | PWORD pwMaxBasicRate, |
79 | PWORD pwMaxSuppRate, | |
80 | PWORD pwSuppRate, | |
81 | PBYTE pbyTopCCKRate, | |
82 | PBYTE pbyTopOFDMRate | |
92b96797 FB |
83 | ); |
84 | ||
8611a29a | 85 | void |
92b96797 | 86 | RATEvTxRateFallBack( |
8611a29a | 87 | void *pDeviceHandler, |
592ccfeb | 88 | PKnownNodeDB psNodeDBTable |
92b96797 FB |
89 | ); |
90 | ||
91 | BYTE | |
92 | RATEuSetIE( | |
592ccfeb AM |
93 | PWLAN_IE_SUPP_RATES pSrcRates, |
94 | PWLAN_IE_SUPP_RATES pDstRates, | |
cc856e61 | 95 | unsigned int uRateLen |
92b96797 FB |
96 | ); |
97 | ||
98 | WORD | |
99 | RATEwGetRateIdx( | |
592ccfeb | 100 | BYTE byRate |
92b96797 FB |
101 | ); |
102 | ||
103 | ||
104 | BYTE | |
105 | DATARATEbyGetRateIdx( | |
592ccfeb | 106 | BYTE byRate |
92b96797 FB |
107 | ); |
108 | ||
e7b07d1d | 109 | #endif /* __DATARATE_H__ */ |