nl80211: Add generic netlink module alias for cfg80211/nl80211
To support auto-loading of wireless modules from netlink users, add module alias for nl80211 family. This also adds NL80211_GENL_NAME constant to define the "nl80211" netlink family name as part of uapi. Signed-off-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
This commit is contained in:
parent
55300a13d2
commit
fb4e156886
3 changed files with 7 additions and 4 deletions
|
@ -27,6 +27,8 @@
|
||||||
|
|
||||||
#include <linux/types.h>
|
#include <linux/types.h>
|
||||||
|
|
||||||
|
#define NL80211_GENL_NAME "nl80211"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* DOC: Station handling
|
* DOC: Station handling
|
||||||
*
|
*
|
||||||
|
|
|
@ -34,6 +34,7 @@
|
||||||
MODULE_AUTHOR("Johannes Berg");
|
MODULE_AUTHOR("Johannes Berg");
|
||||||
MODULE_LICENSE("GPL");
|
MODULE_LICENSE("GPL");
|
||||||
MODULE_DESCRIPTION("wireless configuration support");
|
MODULE_DESCRIPTION("wireless configuration support");
|
||||||
|
MODULE_ALIAS_GENL_FAMILY(NL80211_GENL_NAME);
|
||||||
|
|
||||||
/* RCU-protected (and cfg80211_mutex for writers) */
|
/* RCU-protected (and cfg80211_mutex for writers) */
|
||||||
LIST_HEAD(cfg80211_rdev_list);
|
LIST_HEAD(cfg80211_rdev_list);
|
||||||
|
|
|
@ -37,10 +37,10 @@ static void nl80211_post_doit(struct genl_ops *ops, struct sk_buff *skb,
|
||||||
|
|
||||||
/* the netlink family */
|
/* the netlink family */
|
||||||
static struct genl_family nl80211_fam = {
|
static struct genl_family nl80211_fam = {
|
||||||
.id = GENL_ID_GENERATE, /* don't bother with a hardcoded ID */
|
.id = GENL_ID_GENERATE, /* don't bother with a hardcoded ID */
|
||||||
.name = "nl80211", /* have users key off the name instead */
|
.name = NL80211_GENL_NAME, /* have users key off the name instead */
|
||||||
.hdrsize = 0, /* no private header */
|
.hdrsize = 0, /* no private header */
|
||||||
.version = 1, /* no particular meaning now */
|
.version = 1, /* no particular meaning now */
|
||||||
.maxattr = NL80211_ATTR_MAX,
|
.maxattr = NL80211_ATTR_MAX,
|
||||||
.netnsok = true,
|
.netnsok = true,
|
||||||
.pre_doit = nl80211_pre_doit,
|
.pre_doit = nl80211_pre_doit,
|
||||||
|
|
Loading…
Add table
Reference in a new issue