mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-05 09:26:44 +07:00
8f1546cadf
The move away from having drivers assign wireless handlers, in favour of making cfg80211 assign them, broke the sysfs registration (the wireless/ dir went missing) because the handlers are now assigned only after registration, which is too late. Fix this by special-casing cfg80211-based devices, all of which are required to have an ieee80211_ptr, in the sysfs code, and also using get_wireless_stats() to have the same values reported as in procfs. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Reported-by: Hugh Dickins <hugh.dickins@tiscali.co.uk> Tested-by: Hugh Dickins <hugh.dickins@tiscali.co.uk> Signed-off-by: John W. Linville <linville@tuxdriver.com>
40 lines
944 B
C
40 lines
944 B
C
#ifndef __NET_WEXT_H
|
|
#define __NET_WEXT_H
|
|
|
|
/*
|
|
* wireless extensions interface to the core code
|
|
*/
|
|
|
|
struct net;
|
|
|
|
#ifdef CONFIG_WIRELESS_EXT
|
|
extern int wext_proc_init(struct net *net);
|
|
extern void wext_proc_exit(struct net *net);
|
|
extern int wext_handle_ioctl(struct net *net, struct ifreq *ifr, unsigned int cmd,
|
|
void __user *arg);
|
|
extern int compat_wext_handle_ioctl(struct net *net, unsigned int cmd,
|
|
unsigned long arg);
|
|
extern struct iw_statistics *get_wireless_stats(struct net_device *dev);
|
|
#else
|
|
static inline int wext_proc_init(struct net *net)
|
|
{
|
|
return 0;
|
|
}
|
|
static inline void wext_proc_exit(struct net *net)
|
|
{
|
|
return;
|
|
}
|
|
static inline int wext_handle_ioctl(struct net *net, struct ifreq *ifr, unsigned int cmd,
|
|
void __user *arg)
|
|
{
|
|
return -EINVAL;
|
|
}
|
|
static inline int compat_wext_handle_ioctl(struct net *net, unsigned int cmd,
|
|
unsigned long arg)
|
|
{
|
|
return -EINVAL;
|
|
}
|
|
#endif
|
|
|
|
#endif /* __NET_WEXT_H */
|