* [PATCH] nl80211: Add generic netlink module alias for cfg80211/nl80211
@ 2013-04-28 23:22 Marcel Holtmann
2013-04-29 8:06 ` Arend van Spriel
2013-04-29 14:21 ` Johannes Berg
0 siblings, 2 replies; 4+ messages in thread
From: Marcel Holtmann @ 2013-04-28 23:22 UTC (permalink / raw)
To: linux-wireless
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>
---
include/uapi/linux/nl80211.h | 2 ++
net/wireless/core.c | 1 +
net/wireless/nl80211.c | 8 ++++----
3 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/include/uapi/linux/nl80211.h b/include/uapi/linux/nl80211.h
index d1e48b5..b573a55 100644
--- a/include/uapi/linux/nl80211.h
+++ b/include/uapi/linux/nl80211.h
@@ -27,6 +27,8 @@
#include <linux/types.h>
+#define NL80211_GENL_NAME "nl80211"
+
/**
* DOC: Station handling
*
diff --git a/net/wireless/core.c b/net/wireless/core.c
index 84c9ad7..68f0c96 100644
--- a/net/wireless/core.c
+++ b/net/wireless/core.c
@@ -34,6 +34,7 @@
MODULE_AUTHOR("Johannes Berg");
MODULE_LICENSE("GPL");
MODULE_DESCRIPTION("wireless configuration support");
+MODULE_ALIAS_GENL_FAMILY(NL80211_GENL_NAME);
/* RCU-protected (and cfg80211_mutex for writers) */
LIST_HEAD(cfg80211_rdev_list);
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index afa2838..3c2da0a 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -37,10 +37,10 @@ static void nl80211_post_doit(struct genl_ops *ops, struct sk_buff *skb,
/* the netlink family */
static struct genl_family nl80211_fam = {
- .id = GENL_ID_GENERATE, /* don't bother with a hardcoded ID */
- .name = "nl80211", /* have users key off the name instead */
- .hdrsize = 0, /* no private header */
- .version = 1, /* no particular meaning now */
+ .id = GENL_ID_GENERATE, /* don't bother with a hardcoded ID */
+ .name = NL80211_GENL_NAME, /* have users key off the name instead */
+ .hdrsize = 0, /* no private header */
+ .version = 1, /* no particular meaning now */
.maxattr = NL80211_ATTR_MAX,
.netnsok = true,
.pre_doit = nl80211_pre_doit,
--
1.8.1.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] nl80211: Add generic netlink module alias for cfg80211/nl80211
2013-04-28 23:22 [PATCH] nl80211: Add generic netlink module alias for cfg80211/nl80211 Marcel Holtmann
@ 2013-04-29 8:06 ` Arend van Spriel
2013-04-29 8:08 ` Arend van Spriel
2013-04-29 14:21 ` Johannes Berg
1 sibling, 1 reply; 4+ messages in thread
From: Arend van Spriel @ 2013-04-29 8:06 UTC (permalink / raw)
To: Marcel Holtmann; +Cc: linux-wireless
On 04/29/2013 01:22 AM, Marcel Holtmann wrote:
> diff --git a/net/wireless/core.c b/net/wireless/core.c
> index 84c9ad7..68f0c96 100644
> --- a/net/wireless/core.c
> +++ b/net/wireless/core.c
> @@ -34,6 +34,7 @@
> MODULE_AUTHOR("Johannes Berg");
> MODULE_LICENSE("GPL");
> MODULE_DESCRIPTION("wireless configuration support");
> +MODULE_ALIAS_GENL_FAMILY(NL80211_GENL_NAME);
Just being curious here (might learn something). What does this macro
provide? Is it intended to help user-space tools identify the netlink
API/family it provides?
> /* RCU-protected (and cfg80211_mutex for writers) */
> LIST_HEAD(cfg80211_rdev_list);
Regards,
Arend
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] nl80211: Add generic netlink module alias for cfg80211/nl80211
2013-04-29 8:06 ` Arend van Spriel
@ 2013-04-29 8:08 ` Arend van Spriel
0 siblings, 0 replies; 4+ messages in thread
From: Arend van Spriel @ 2013-04-29 8:08 UTC (permalink / raw)
To: Marcel Holtmann; +Cc: linux-wireless
On 04/29/2013 10:06 AM, Arend van Spriel wrote:
> On 04/29/2013 01:22 AM, Marcel Holtmann wrote:
>> diff --git a/net/wireless/core.c b/net/wireless/core.c
>> index 84c9ad7..68f0c96 100644
>> --- a/net/wireless/core.c
>> +++ b/net/wireless/core.c
>> @@ -34,6 +34,7 @@
>> MODULE_AUTHOR("Johannes Berg");
>> MODULE_LICENSE("GPL");
>> MODULE_DESCRIPTION("wireless configuration support");
>> +MODULE_ALIAS_GENL_FAMILY(NL80211_GENL_NAME);
>
> Just being curious here (might learn something). What does this macro
> provide? Is it intended to help user-space tools identify the netlink
> API/family it provides?
>
Yikes, the answer is probably in the commit message:
"To support auto-loading of wireless modules from netlink users"
Sorry for the noise.
Gr. AvS
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] nl80211: Add generic netlink module alias for cfg80211/nl80211
2013-04-28 23:22 [PATCH] nl80211: Add generic netlink module alias for cfg80211/nl80211 Marcel Holtmann
2013-04-29 8:06 ` Arend van Spriel
@ 2013-04-29 14:21 ` Johannes Berg
1 sibling, 0 replies; 4+ messages in thread
From: Johannes Berg @ 2013-04-29 14:21 UTC (permalink / raw)
To: Marcel Holtmann; +Cc: linux-wireless
On Sun, 2013-04-28 at 16:22 -0700, Marcel Holtmann wrote:
> 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.
Applied, thanks.
johannes
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-04-29 14:21 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-04-28 23:22 [PATCH] nl80211: Add generic netlink module alias for cfg80211/nl80211 Marcel Holtmann
2013-04-29 8:06 ` Arend van Spriel
2013-04-29 8:08 ` Arend van Spriel
2013-04-29 14:21 ` Johannes Berg
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.