datarate.h 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  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. /*--------------------- Export Definitions -------------------------*/
  32. #define FALLBACK_PKT_COLLECT_TR_H 50 // pkts
  33. #define FALLBACK_PKT_COLLECT_TR_L 10 // pkts
  34. #define FALLBACK_POLL_SECOND 5 // 5 sec
  35. #define FALLBACK_RECOVER_SECOND 30 // 30 sec
  36. #define FALLBACK_THRESHOLD 15 // percent
  37. #define UPGRADE_THRESHOLD 5 // percent
  38. #define UPGRADE_CNT_THRD 3 // times
  39. #define RETRY_TIMES_THRD_H 2 // times
  40. #define RETRY_TIMES_THRD_L 1 // times
  41. #define RATE_1M 0
  42. #define RATE_2M 1
  43. #define RATE_5M 2
  44. #define RATE_11M 3
  45. #define RATE_6M 4
  46. #define RATE_9M 5
  47. #define RATE_12M 6
  48. #define RATE_18M 7
  49. #define RATE_24M 8
  50. #define RATE_36M 9
  51. #define RATE_48M 10
  52. #define RATE_54M 11
  53. #define RATE_AUTO 12
  54. #define MAX_RATE 12
  55. /*--------------------- Export Classes ----------------------------*/
  56. /*--------------------- Export Variables --------------------------*/
  57. /*--------------------- Export Types ------------------------------*/
  58. /*--------------------- Export Functions --------------------------*/
  59. void
  60. RATEvParseMaxRate(
  61. void *pDeviceHandler,
  62. PWLAN_IE_SUPP_RATES pItemRates,
  63. PWLAN_IE_SUPP_RATES pItemExtRates,
  64. BOOL bUpdateBasicRate,
  65. PWORD pwMaxBasicRate,
  66. PWORD pwMaxSuppRate,
  67. PWORD pwSuppRate,
  68. PBYTE pbyTopCCKRate,
  69. PBYTE pbyTopOFDMRate
  70. );
  71. void
  72. RATEvTxRateFallBack(
  73. void *pDeviceHandler,
  74. PKnownNodeDB psNodeDBTable
  75. );
  76. BYTE
  77. RATEuSetIE(
  78. PWLAN_IE_SUPP_RATES pSrcRates,
  79. PWLAN_IE_SUPP_RATES pDstRates,
  80. unsigned int uRateLen
  81. );
  82. WORD
  83. RATEwGetRateIdx(
  84. BYTE byRate
  85. );
  86. BYTE
  87. DATARATEbyGetRateIdx(
  88. BYTE byRate
  89. );
  90. #endif /* __DATARATE_H__ */