wlan_utility.h 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. /*
  2. * Copyright (c) 2017 The Linux Foundation. All rights reserved.
  3. *
  4. * Permission to use, copy, modify, and/or distribute this software for
  5. * any purpose with or without fee is hereby granted, provided that the
  6. * above copyright notice and this permission notice appear in all
  7. * copies.
  8. *
  9. * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
  10. * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
  11. * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
  12. * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
  13. * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
  14. * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
  15. * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  16. * PERFORMANCE OF THIS SOFTWARE.
  17. */
  18. /**
  19. * DOC: Contains mandatory API from legacy
  20. */
  21. #ifndef _WLAN_UTILITY_H_
  22. #define _WLAN_UTILITY_H_
  23. #include <qdf_types.h>
  24. /**
  25. * wlan_chan_to_freq() - converts channel to frequency
  26. * @chan: channel number
  27. *
  28. * @return frequency of the channel
  29. */
  30. uint32_t wlan_chan_to_freq(uint8_t chan);
  31. /*
  32. * wlan_is_dsrc_channel() - is the channel DSRC
  33. * @center_freq: center freq of the channel
  34. *
  35. * Return: true if DSRC channel or false otherwise
  36. */
  37. bool wlan_is_dsrc_channel(uint16_t center_freq);
  38. /**
  39. * wlan_freq_to_chan() - converts frequency to channel
  40. * @freq: frequency
  41. *
  42. * Return: channel of frequency
  43. */
  44. uint8_t wlan_freq_to_chan(uint32_t freq);
  45. /**
  46. * wlan_get_vendor_ie_ptr_from_oui() - Find out vendor ie
  47. * @oui: oui buffer
  48. * @oui_size: oui size
  49. * @ie: source ie address
  50. * @ie_len: source ie length
  51. *
  52. * This function find out vendor ie by pass source ie and vendor oui.
  53. *
  54. * Return: vendor ie address - success
  55. * NULL - failure
  56. */
  57. uint8_t *wlan_get_vendor_ie_ptr_from_oui(uint8_t *oui,
  58. uint8_t oui_size, uint8_t *ie, uint16_t ie_len);
  59. /**
  60. * wlan_is_emulation_platform() - check if platform is emulation based
  61. * @phy_version - psoc nif phy_version
  62. *
  63. * Return: boolean value based on platform type
  64. */
  65. bool wlan_is_emulation_platform(uint32_t phy_version);
  66. #endif /* _WLAN_UTILITY_H_ */