cnss_utils.h 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. /* Copyright (c) 2017 The Linux Foundation. All rights reserved.
  2. *
  3. * This program is free software; you can redistribute it and/or modify
  4. * it under the terms of the GNU General Public License version 2 and
  5. * only version 2 as published by the Free Software Foundation.
  6. *
  7. * This program is distributed in the hope that it will be useful,
  8. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  10. * GNU General Public License for more details.
  11. */
  12. #ifndef _CNSS_UTILS_H_
  13. #define _CNSS_UTILS_H_
  14. enum cnss_utils_cc_src {
  15. CNSS_UTILS_SOURCE_CORE,
  16. CNSS_UTILS_SOURCE_11D,
  17. CNSS_UTILS_SOURCE_USER
  18. };
  19. extern int cnss_utils_set_wlan_unsafe_channel(struct device *dev,
  20. u16 *unsafe_ch_list,
  21. u16 ch_count);
  22. extern int cnss_utils_get_wlan_unsafe_channel(struct device *dev,
  23. u16 *unsafe_ch_list,
  24. u16 *ch_count, u16 buf_len);
  25. extern int cnss_utils_wlan_set_dfs_nol(struct device *dev,
  26. const void *info, u16 info_len);
  27. extern int cnss_utils_wlan_get_dfs_nol(struct device *dev,
  28. void *info, u16 info_len);
  29. extern int cnss_utils_get_driver_load_cnt(struct device *dev);
  30. extern void cnss_utils_increment_driver_load_cnt(struct device *dev);
  31. extern int cnss_utils_set_wlan_mac_address(const u8 *in, uint32_t len);
  32. extern u8 *cnss_utils_get_wlan_mac_address(struct device *dev, uint32_t *num);
  33. extern int cnss_utils_set_wlan_derived_mac_address(const u8 *in, uint32_t len);
  34. extern u8 *cnss_utils_get_wlan_derived_mac_address(struct device *dev,
  35. uint32_t *num);
  36. extern void cnss_utils_set_cc_source(struct device *dev,
  37. enum cnss_utils_cc_src cc_source);
  38. extern enum cnss_utils_cc_src cnss_utils_get_cc_source(struct device *dev);
  39. #endif