#include <linux/device.h>
#include <linux/module.h>
#include <linux/netdevice.h>
#include <linux/nl80211.h>
#include <linux/rtnetlink.h>
#include <net/cfg80211.h>
#include "sysfs.h"
#include "core.h"
#include "rdev-ops.h"
static inline struct cfg80211_registered_device *dev_to_rdev(
struct device *dev)
{ … }
#define SHOW_FMT(name, fmt, member) …
SHOW_FMT(…) …;
SHOW_FMT(…) …;
SHOW_FMT(…) …;
static ssize_t name_show(struct device *dev,
struct device_attribute *attr,
char *buf)
{ … }
static DEVICE_ATTR_RO(name);
static ssize_t addresses_show(struct device *dev,
struct device_attribute *attr,
char *buf)
{ … }
static DEVICE_ATTR_RO(addresses);
static struct attribute *ieee80211_attrs[] = …;
ATTRIBUTE_GROUPS(…);
static void wiphy_dev_release(struct device *dev)
{ … }
#ifdef CONFIG_PM_SLEEP
static void cfg80211_leave_all(struct cfg80211_registered_device *rdev)
{ … }
static int wiphy_suspend(struct device *dev)
{ … }
static int wiphy_resume(struct device *dev)
{ … }
static SIMPLE_DEV_PM_OPS(wiphy_pm_ops, wiphy_suspend, wiphy_resume);
#define WIPHY_PM_OPS …
#else
#define WIPHY_PM_OPS …
#endif
static const void *wiphy_namespace(const struct device *d)
{ … }
struct class ieee80211_class = …;
int wiphy_sysfs_init(void)
{ … }
void wiphy_sysfs_exit(void)
{ … }