Commit | Line | Data |
---|---|---|
5449c685 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 | /*--------------------- Export Classes ----------------------------*/ | |
46 | ||
47 | /*--------------------- Export Variables --------------------------*/ | |
48 | ||
49 | ||
50 | /*--------------------- Export Types ------------------------------*/ | |
51 | ||
52 | ||
53 | /*--------------------- Export Functions --------------------------*/ | |
54 | ||
55 | ||
56 | ||
6b35b7b3 | 57 | void |
5449c685 | 58 | RATEvParseMaxRate( |
3a215e0f CC |
59 | void *pDeviceHandler, |
60 | PWLAN_IE_SUPP_RATES pItemRates, | |
61 | PWLAN_IE_SUPP_RATES pItemExtRates, | |
7b6a0013 | 62 | bool bUpdateBasicRate, |
15df6c2b CC |
63 | unsigned short *pwMaxBasicRate, |
64 | unsigned short *pwMaxSuppRate, | |
65 | unsigned short *pwSuppRate, | |
2989e96f CC |
66 | unsigned char *pbyTopCCKRate, |
67 | unsigned char *pbyTopOFDMRate | |
5449c685 FB |
68 | ); |
69 | ||
6b35b7b3 | 70 | void |
5449c685 | 71 | RATEvTxRateFallBack( |
3a215e0f CC |
72 | void *pDeviceHandler, |
73 | PKnownNodeDB psNodeDBTable | |
5449c685 FB |
74 | ); |
75 | ||
3fc9b584 | 76 | unsigned char |
5449c685 | 77 | RATEuSetIE( |
3a215e0f CC |
78 | PWLAN_IE_SUPP_RATES pSrcRates, |
79 | PWLAN_IE_SUPP_RATES pDstRates, | |
b6e95cd5 | 80 | unsigned int uRateLen |
5449c685 FB |
81 | ); |
82 | ||
2986db5f | 83 | unsigned short |
5449c685 | 84 | wGetRateIdx( |
3fc9b584 | 85 | unsigned char byRate |
5449c685 FB |
86 | ); |
87 | ||
88 | ||
3fc9b584 | 89 | unsigned char |
5449c685 | 90 | DATARATEbyGetRateIdx( |
3fc9b584 | 91 | unsigned char byRate |
5449c685 FB |
92 | ); |
93 | ||
94 | ||
95 | #endif //__DATARATE_H__ |