wext.h 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. #ifndef __NET_WEXT_H
  3. #define __NET_WEXT_H
  4. #include <net/iw_handler.h>
  5. struct net;
  6. #ifdef CONFIG_WEXT_CORE
  7. int wext_handle_ioctl(struct net *net, unsigned int cmd,
  8. void __user *arg);
  9. int compat_wext_handle_ioctl(struct net *net, unsigned int cmd,
  10. unsigned long arg);
  11. struct iw_statistics *get_wireless_stats(struct net_device *dev);
  12. int call_commit_handler(struct net_device *dev);
  13. #else
  14. static inline int wext_handle_ioctl(struct net *net, unsigned int cmd,
  15. void __user *arg)
  16. {
  17. return -EINVAL;
  18. }
  19. static inline int compat_wext_handle_ioctl(struct net *net, unsigned int cmd,
  20. unsigned long arg)
  21. {
  22. return -EINVAL;
  23. }
  24. #endif
  25. #ifdef CONFIG_WEXT_PROC
  26. int wext_proc_init(struct net *net);
  27. void wext_proc_exit(struct net *net);
  28. #else
  29. static inline int wext_proc_init(struct net *net)
  30. {
  31. return 0;
  32. }
  33. static inline void wext_proc_exit(struct net *net)
  34. {
  35. return;
  36. }
  37. #endif
  38. #ifdef CONFIG_WEXT_PRIV
  39. int ioctl_private_call(struct net_device *dev, struct iwreq *iwr,
  40. unsigned int cmd, struct iw_request_info *info,
  41. iw_handler handler);
  42. int compat_private_call(struct net_device *dev, struct iwreq *iwr,
  43. unsigned int cmd, struct iw_request_info *info,
  44. iw_handler handler);
  45. int iw_handler_get_private(struct net_device * dev,
  46. struct iw_request_info * info,
  47. union iwreq_data * wrqu,
  48. char * extra);
  49. #else
  50. #define ioctl_private_call NULL
  51. #define compat_private_call NULL
  52. #endif
  53. #endif /* __NET_WEXT_H */