1b2441318SGreg Kroah-Hartman /* SPDX-License-Identifier: GPL-2.0 */ 2295f4a1fSJohannes Berg #ifndef __NET_WEXT_H 3295f4a1fSJohannes Berg #define __NET_WEXT_H 4295f4a1fSJohannes Berg 53d23e349SJohannes Berg #include <net/iw_handler.h> 6295f4a1fSJohannes Berg 7881d966bSEric W. Biederman struct net; 8881d966bSEric W. Biederman 93d23e349SJohannes Berg #ifdef CONFIG_WEXT_CORE 10*b1b0c245SAl Viro int wext_handle_ioctl(struct net *net, unsigned int cmd, 11295f4a1fSJohannes Berg void __user *arg); 129e4638cdSJoe Perches int compat_wext_handle_ioctl(struct net *net, unsigned int cmd, 1387de87d5SDavid S. Miller unsigned long arg); 143d23e349SJohannes Berg 159e4638cdSJoe Perches struct iw_statistics *get_wireless_stats(struct net_device *dev); 169e4638cdSJoe Perches int call_commit_handler(struct net_device *dev); 17295f4a1fSJohannes Berg #else 18*b1b0c245SAl Viro static inline int wext_handle_ioctl(struct net *net, unsigned int cmd, 19295f4a1fSJohannes Berg void __user *arg) 20295f4a1fSJohannes Berg { 21295f4a1fSJohannes Berg return -EINVAL; 22295f4a1fSJohannes Berg } 2387de87d5SDavid S. Miller static inline int compat_wext_handle_ioctl(struct net *net, unsigned int cmd, 2487de87d5SDavid S. Miller unsigned long arg) 2587de87d5SDavid S. Miller { 2687de87d5SDavid S. Miller return -EINVAL; 2787de87d5SDavid S. Miller } 28295f4a1fSJohannes Berg #endif 29295f4a1fSJohannes Berg 303d23e349SJohannes Berg #ifdef CONFIG_WEXT_PROC 319e4638cdSJoe Perches int wext_proc_init(struct net *net); 329e4638cdSJoe Perches void wext_proc_exit(struct net *net); 333d23e349SJohannes Berg #else 343d23e349SJohannes Berg static inline int wext_proc_init(struct net *net) 353d23e349SJohannes Berg { 363d23e349SJohannes Berg return 0; 373d23e349SJohannes Berg } 383d23e349SJohannes Berg static inline void wext_proc_exit(struct net *net) 393d23e349SJohannes Berg { 403d23e349SJohannes Berg return; 413d23e349SJohannes Berg } 423d23e349SJohannes Berg #endif 433d23e349SJohannes Berg 443d23e349SJohannes Berg #ifdef CONFIG_WEXT_PRIV 453d23e349SJohannes Berg int ioctl_private_call(struct net_device *dev, struct iwreq *iwr, 463d23e349SJohannes Berg unsigned int cmd, struct iw_request_info *info, 473d23e349SJohannes Berg iw_handler handler); 483d23e349SJohannes Berg int compat_private_call(struct net_device *dev, struct iwreq *iwr, 493d23e349SJohannes Berg unsigned int cmd, struct iw_request_info *info, 503d23e349SJohannes Berg iw_handler handler); 513d23e349SJohannes Berg int iw_handler_get_private(struct net_device * dev, 523d23e349SJohannes Berg struct iw_request_info * info, 533d23e349SJohannes Berg union iwreq_data * wrqu, 543d23e349SJohannes Berg char * extra); 553d23e349SJohannes Berg #else 563d23e349SJohannes Berg #define ioctl_private_call NULL 573d23e349SJohannes Berg #define compat_private_call NULL 583d23e349SJohannes Berg #endif 593d23e349SJohannes Berg 603d23e349SJohannes Berg 61295f4a1fSJohannes Berg #endif /* __NET_WEXT_H */ 62