mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-04 08:06:43 +07:00
704232c271
This patch creates the core cfg80211 code along with some sysfs bits. This is a stripped down version to allow mac80211 to function, but doesn't include any configuration yet except for creating and removing virtual interfaces. This patch includes the nl80211 header file but it only contains the interface types which the cfg80211 interface for creating virtual interfaces relies on. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com> Signed-off-by: David S. Miller <davem@davemloft.net>
50 lines
1.3 KiB
C
50 lines
1.3 KiB
C
/*
|
|
* Wireless configuration interface internals.
|
|
*
|
|
* Copyright 2006, 2007 Johannes Berg <johannes@sipsolutions.net>
|
|
*/
|
|
#ifndef __NET_WIRELESS_CORE_H
|
|
#define __NET_WIRELESS_CORE_H
|
|
#include <linux/mutex.h>
|
|
#include <linux/list.h>
|
|
#include <linux/netdevice.h>
|
|
#include <net/genetlink.h>
|
|
#include <net/wireless.h>
|
|
#include <net/cfg80211.h>
|
|
|
|
struct cfg80211_registered_device {
|
|
struct cfg80211_ops *ops;
|
|
struct list_head list;
|
|
/* we hold this mutex during any call so that
|
|
* we cannot do multiple calls at once, and also
|
|
* to avoid the deregister call to proceed while
|
|
* any call is in progress */
|
|
struct mutex mtx;
|
|
|
|
/* wiphy index, internal only */
|
|
int idx;
|
|
|
|
/* associate netdev list */
|
|
struct mutex devlist_mtx;
|
|
struct list_head netdev_list;
|
|
|
|
/* must be last because of the way we do wiphy_priv(),
|
|
* and it should at least be aligned to NETDEV_ALIGN */
|
|
struct wiphy wiphy __attribute__((__aligned__(NETDEV_ALIGN)));
|
|
};
|
|
|
|
static inline
|
|
struct cfg80211_registered_device *wiphy_to_dev(struct wiphy *wiphy)
|
|
{
|
|
BUG_ON(!wiphy);
|
|
return container_of(wiphy, struct cfg80211_registered_device, wiphy);
|
|
}
|
|
|
|
extern struct mutex cfg80211_drv_mutex;
|
|
extern struct list_head cfg80211_drv_list;
|
|
|
|
/* free object */
|
|
extern void cfg80211_dev_free(struct cfg80211_registered_device *drv);
|
|
|
|
#endif /* __NET_WIRELESS_CORE_H */
|