init.h 2.2 KB

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