xref: /openbmc/linux/include/net/wext.h (revision 87de87d5e47f94b4ea647a5bd1bc8dc1f7930db4)
1295f4a1fSJohannes Berg #ifndef __NET_WEXT_H
2295f4a1fSJohannes Berg #define __NET_WEXT_H
3295f4a1fSJohannes Berg 
4295f4a1fSJohannes Berg /*
5295f4a1fSJohannes Berg  * wireless extensions interface to the core code
6295f4a1fSJohannes Berg  */
7295f4a1fSJohannes Berg 
8881d966bSEric W. Biederman struct net;
9881d966bSEric W. Biederman 
10295f4a1fSJohannes Berg #ifdef CONFIG_WIRELESS_EXT
11881d966bSEric W. Biederman extern int wext_proc_init(struct net *net);
12881d966bSEric W. Biederman extern void wext_proc_exit(struct net *net);
13881d966bSEric W. Biederman extern int wext_handle_ioctl(struct net *net, struct ifreq *ifr, unsigned int cmd,
14295f4a1fSJohannes Berg 			     void __user *arg);
15*87de87d5SDavid S. Miller extern int compat_wext_handle_ioctl(struct net *net, unsigned int cmd,
16*87de87d5SDavid S. Miller 				    unsigned long arg);
17295f4a1fSJohannes Berg #else
18881d966bSEric W. Biederman static inline int wext_proc_init(struct net *net)
19295f4a1fSJohannes Berg {
20295f4a1fSJohannes Berg 	return 0;
21295f4a1fSJohannes Berg }
22881d966bSEric W. Biederman static inline void wext_proc_exit(struct net *net)
23881d966bSEric W. Biederman {
24881d966bSEric W. Biederman 	return;
25881d966bSEric W. Biederman }
26881d966bSEric W. Biederman static inline int wext_handle_ioctl(struct net *net, struct ifreq *ifr, unsigned int cmd,
27295f4a1fSJohannes Berg 				    void __user *arg)
28295f4a1fSJohannes Berg {
29295f4a1fSJohannes Berg 	return -EINVAL;
30295f4a1fSJohannes Berg }
31*87de87d5SDavid S. Miller static inline int compat_wext_handle_ioctl(struct net *net, unsigned int cmd,
32*87de87d5SDavid S. Miller 					   unsigned long arg)
33*87de87d5SDavid S. Miller {
34*87de87d5SDavid S. Miller 	return -EINVAL;
35*87de87d5SDavid S. Miller }
36295f4a1fSJohannes Berg #endif
37295f4a1fSJohannes Berg 
38295f4a1fSJohannes Berg #endif /* __NET_WEXT_H */
39