wlan_cfg80211.h 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. /*
  2. * Copyright (c) 2016 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: declares driver functions interfacing with linux kernel
  20. */
  21. #include <linux/version.h>
  22. #include <linux/netdevice.h>
  23. #include <net/cfg80211.h>
  24. #include <qca-vendor.h>
  25. #define COMMON_VENDOR_COMMANDS \
  26. { \
  27. .info.vendor_id = OUI_QCA, \
  28. .info.subcmd = QCA_NL80211_VENDOR_SUBCMD_SET_WIFI_CONFIGURATION,\
  29. .flags = WIPHY_VENDOR_CMD_NEED_WDEV | \
  30. WIPHY_VENDOR_CMD_NEED_NETDEV, \
  31. .doit = NULL \
  32. }, \
  33. { \
  34. .info.vendor_id = OUI_QCA, \
  35. .info.subcmd = QCA_NL80211_VENDOR_SUBCMD_GET_WIFI_CONFIGURATION,\
  36. .flags = WIPHY_VENDOR_CMD_NEED_WDEV | \
  37. WIPHY_VENDOR_CMD_NEED_NETDEV, \
  38. .doit = NULL \
  39. },
  40. /**
  41. * wlan_cfg80211_scan() - API to process cfg80211 scan request
  42. * @wiphy: Pointer to wiphy
  43. * @dev: Pointer to net device
  44. * @request: Pointer to scan request
  45. *
  46. * API to trigger scan and update cfg80211 scan database.
  47. * scan dump command can be used to fetch scan results
  48. * on receipt of scan complete event.
  49. *
  50. * Return: 0 for success, non zero for failure
  51. */
  52. int wlan_cfg80211_scan(struct wiphy *wiphy,
  53. #if (LINUX_VERSION_CODE < KERNEL_VERSION(3, 6, 0))
  54. struct net_device *dev,
  55. #endif
  56. struct cfg80211_scan_request *request);