wl1251_init.h 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. /*
  2. * This file is part of wl1251
  3. *
  4. * Copyright (C) 2009 Nokia Corporation
  5. *
  6. * Contact: Kalle Valo <kalle.valo@nokia.com>
  7. *
  8. * This program is free software; you can redistribute it and/or
  9. * modify it under the terms of the GNU General Public License
  10. * version 2 as published by the Free Software Foundation.
  11. *
  12. * This program is distributed in the hope that it will be useful, but
  13. * WITHOUT ANY WARRANTY; without even the implied warranty of
  14. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  15. * General Public License for more details.
  16. *
  17. * You should have received a copy of the GNU General Public License
  18. * along with this program; if not, write to the Free Software
  19. * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
  20. * 02110-1301 USA
  21. *
  22. */
  23. #ifndef __WL1251_INIT_H__
  24. #define __WL1251_INIT_H__
  25. #include "wl1251.h"
  26. enum {
  27. /* best effort/legacy */
  28. AC_BE = 0,
  29. /* background */
  30. AC_BK = 1,
  31. /* video */
  32. AC_VI = 2,
  33. /* voice */
  34. AC_VO = 3,
  35. /* broadcast dummy access category */
  36. AC_BCAST = 4,
  37. NUM_ACCESS_CATEGORIES = 4
  38. };
  39. /* following are defult values for the IE fields*/
  40. #define CWMIN_BK 15
  41. #define CWMIN_BE 15
  42. #define CWMIN_VI 7
  43. #define CWMIN_VO 3
  44. #define CWMAX_BK 1023
  45. #define CWMAX_BE 63
  46. #define CWMAX_VI 15
  47. #define CWMAX_VO 7
  48. /* slot number setting to start transmission at PIFS interval */
  49. #define AIFS_PIFS 1
  50. /*
  51. * slot number setting to start transmission at DIFS interval - normal DCF
  52. * access
  53. */
  54. #define AIFS_DIFS 2
  55. #define AIFSN_BK 7
  56. #define AIFSN_BE 3
  57. #define AIFSN_VI AIFS_PIFS
  58. #define AIFSN_VO AIFS_PIFS
  59. #define TXOP_BK 0
  60. #define TXOP_BE 0
  61. #define TXOP_VI 3008
  62. #define TXOP_VO 1504
  63. int wl1251_hw_init_hwenc_config(struct wl1251 *wl);
  64. int wl1251_hw_init_templates_config(struct wl1251 *wl);
  65. int wl1251_hw_init_rx_config(struct wl1251 *wl, u32 config, u32 filter);
  66. int wl1251_hw_init_phy_config(struct wl1251 *wl);
  67. int wl1251_hw_init_beacon_filter(struct wl1251 *wl);
  68. int wl1251_hw_init_pta(struct wl1251 *wl);
  69. int wl1251_hw_init_energy_detection(struct wl1251 *wl);
  70. int wl1251_hw_init_beacon_broadcast(struct wl1251 *wl);
  71. int wl1251_hw_init_power_auth(struct wl1251 *wl);
  72. int wl1251_hw_init_mem_config(struct wl1251 *wl);
  73. int wl1251_hw_init(struct wl1251 *wl);
  74. #endif