wext.h 1.5 KB

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