Linux wireless drivers development
 help / color / mirror / Atom feed
* [PATCH] nl80211: fix monitor flags
@ 2008-10-15  9:54 Johannes Berg
  0 siblings, 0 replies; only message in thread
From: Johannes Berg @ 2008-10-15  9:54 UTC (permalink / raw)
  To: John Linville; +Cc: linux-wireless

NLA_NESTED attributes cannot be empty, but we want to be able to
specify "no flags" (empty attribute) vs. "no change" (no attribute).
Therefore, remove the NLA_NESTED policy so it can work as an empty
attribute.

I guess I should have used a u32 for these flags instead, but we're
stuck with it now. Haven't noticed earlier because of a bug in iw...

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
---
 net/wireless/nl80211.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- everything.orig/net/wireless/nl80211.c	2008-10-15 11:42:37.000000000 +0200
+++ everything/net/wireless/nl80211.c	2008-10-15 11:51:28.000000000 +0200
@@ -84,7 +84,7 @@ static struct nla_policy nl80211_policy[
 					       .len = NL80211_MAX_SUPP_RATES },
 	[NL80211_ATTR_STA_PLINK_ACTION] = { .type = NLA_U8 },
 	[NL80211_ATTR_STA_VLAN] = { .type = NLA_U32 },
-	[NL80211_ATTR_MNTR_FLAGS] = { .type = NLA_NESTED },
+	[NL80211_ATTR_MNTR_FLAGS] = { /* NLA_NESTED can't be empty */ },
 	[NL80211_ATTR_MESH_ID] = { .type = NLA_BINARY,
 				.len = IEEE80211_MAX_MESH_ID_LEN },
 	[NL80211_ATTR_MPATH_NEXT_HOP] = { .type = NLA_U32 },



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2008-10-15  9:54 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-15  9:54 [PATCH] nl80211: fix monitor flags Johannes Berg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox