Commit | Line | Data |
---|---|---|
4bd43f50 LR |
1 | /* |
2 | * Copyright (c) 2007-2008 Atheros Communications Inc. | |
3 | * | |
4 | * Permission to use, copy, modify, and/or distribute this software for any | |
5 | * purpose with or without fee is hereby granted, provided that the above | |
6 | * copyright notice and this permission notice appear in all copies. | |
7 | * | |
8 | * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | |
9 | * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | |
10 | * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | |
11 | * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | |
12 | * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | |
13 | * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | |
14 | * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | |
15 | */ | |
16 | ||
17 | #ifndef _RATECTRL_H | |
18 | #define _RATECTRL_H | |
19 | ||
20 | #define ZM_RATE_CTRL_PROBING_INTERVAL_MS 1000 //1000ms | |
21 | #define ZM_RATE_CTRL_MIN_PROBING_PACKET 8 | |
22 | ||
23 | #define ZM_MIN_RATE_FAIL_COUNT 20 | |
24 | ||
25 | #define ZM_RATE_PROBING_THRESHOLD 15 //6% | |
26 | #define ZM_RATE_SUCCESS_PROBING 10 | |
27 | ||
28 | #define ZM_RATE_CTRL_RSSI_VARIATION 5 //TBD | |
29 | ||
30 | extern const u32_t zcRateToPhyCtrl[]; | |
31 | ||
32 | extern void zfRateCtrlInitCell(zdev_t* dev, struct zsRcCell* rcCell, u8_t type, u8_t gBand, u8_t SG40); | |
33 | extern u16_t zfRateCtrlGetTxRate(zdev_t* dev, struct zsRcCell* rcCell, u16_t* probing); | |
34 | extern void zfRateCtrlTxFailEvent(zdev_t* dev, struct zsRcCell* rcCell, u8_t aggRate, u32_t retryRate); | |
35 | extern void zfRateCtrlTxSuccessEvent(zdev_t* dev, struct zsRcCell* rcCell, u8_t successRate); | |
36 | extern void zfRateCtrlAggrSta(zdev_t* dev); | |
37 | #endif |