datarate.h 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  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. #define FALLBACK_PKT_COLLECT_TR_H 50
  32. #define FALLBACK_PKT_COLLECT_TR_L 10
  33. #define FALLBACK_POLL_SECOND 5
  34. #define FALLBACK_RECOVER_SECOND 30
  35. #define FALLBACK_THRESHOLD 15
  36. #define UPGRADE_THRESHOLD 5
  37. #define UPGRADE_CNT_THRD 3
  38. #define RETRY_TIMES_THRD_H 2
  39. #define RETRY_TIMES_THRD_L 1
  40. void
  41. RATEvParseMaxRate(
  42. void *pDeviceHandler,
  43. PWLAN_IE_SUPP_RATES pItemRates,
  44. PWLAN_IE_SUPP_RATES pItemExtRates,
  45. bool bUpdateBasicRate,
  46. unsigned short *pwMaxBasicRate,
  47. unsigned short *pwMaxSuppRate,
  48. unsigned short *pwSuppRate,
  49. unsigned char *pbyTopCCKRate,
  50. unsigned char *pbyTopOFDMRate
  51. );
  52. void
  53. RATEvTxRateFallBack(
  54. void *pDeviceHandler,
  55. PKnownNodeDB psNodeDBTable
  56. );
  57. unsigned char
  58. RATEuSetIE(
  59. PWLAN_IE_SUPP_RATES pSrcRates,
  60. PWLAN_IE_SUPP_RATES pDstRates,
  61. unsigned int uRateLen
  62. );
  63. unsigned short
  64. wGetRateIdx(
  65. unsigned char byRate
  66. );
  67. unsigned char
  68. DATARATEbyGetRateIdx(
  69. unsigned char byRate
  70. );
  71. #endif //__DATARATE_H__