dhd_linux.h 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. /*
  2. * DHD Linux header file (dhd_linux exports for cfg80211 and other components)
  3. *
  4. * Copyright (C) 1999-2015, Broadcom Corporation
  5. *
  6. * Unless you and Broadcom execute a separate written software license
  7. * agreement governing use of this software, this software is licensed to you
  8. * under the terms of the GNU General Public License version 2 (the "GPL"),
  9. * available at http://www.broadcom.com/licenses/GPLv2.php, with the
  10. * following added to such license:
  11. *
  12. * As a special exception, the copyright holders of this software give you
  13. * permission to link this software with independent modules, and to copy and
  14. * distribute the resulting executable under terms of your choice, provided that
  15. * you also meet, for each linked independent module, the terms and conditions of
  16. * the license of that module. An independent module is a module which is not
  17. * derived from this software. The special exception does not apply to any
  18. * modifications of the software.
  19. *
  20. * Notwithstanding the above, under no circumstances may you combine this
  21. * software in any way with any other Broadcom software provided under a license
  22. * other than the GPL, without Broadcom's express prior written consent.
  23. *
  24. * $Id: dhd_linux.h 399301 2013-04-29 21:41:52Z $
  25. */
  26. /* wifi platform functions for power, interrupt and pre-alloc, either
  27. * from Android-like platform device data, or Broadcom wifi platform
  28. * device data.
  29. *
  30. */
  31. #ifndef __DHD_LINUX_H__
  32. #define __DHD_LINUX_H__
  33. #include <linux/kernel.h>
  34. #include <linux/init.h>
  35. #include <dngl_stats.h>
  36. #include <dhd.h>
  37. #define DHD_REGISTRATION_TIMEOUT 12000 /* msec : allowed time to finished dhd registration */
  38. typedef struct wifi_adapter_info {
  39. const char *name;
  40. uint irq_num;
  41. uint intr_flags;
  42. const char *fw_path;
  43. const char *nv_path;
  44. void *wifi_plat_data; /* wifi ctrl func, for backward compatibility */
  45. uint bus_type;
  46. uint bus_num;
  47. uint slot_num;
  48. } wifi_adapter_info_t;
  49. typedef struct bcmdhd_wifi_platdata {
  50. uint num_adapters;
  51. wifi_adapter_info_t *adapters;
  52. } bcmdhd_wifi_platdata_t;
  53. int dhd_wifi_platform_register_drv(void);
  54. void dhd_wifi_platform_unregister_drv(void);
  55. wifi_adapter_info_t* dhd_wifi_platform_get_adapter(uint32 bus_type, uint32 bus_num,
  56. uint32 slot_num);
  57. int wifi_platform_set_power(wifi_adapter_info_t *adapter, bool on, unsigned long msec);
  58. int wifi_platform_bus_enumerate(wifi_adapter_info_t *adapter, bool device_present);
  59. int wifi_platform_get_irq_number(wifi_adapter_info_t *adapter, unsigned long *irq_flags_ptr);
  60. int wifi_platform_get_mac_addr(wifi_adapter_info_t *adapter, unsigned char *buf);
  61. void *wifi_platform_get_country_code(wifi_adapter_info_t *adapter, char *ccode);
  62. void* wifi_platform_prealloc(wifi_adapter_info_t *adapter, int section, unsigned long size);
  63. void* wifi_platform_get_prealloc_func_ptr(wifi_adapter_info_t *adapter);
  64. int dhd_get_fw_mode(struct dhd_info *dhdinfo);
  65. bool dhd_update_fw_nv_path(struct dhd_info *dhdinfo);
  66. #endif /* __DHD_LINUX_H__ */