linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] cfg80211: fix reporting 5/10 MHz support to user space
@ 2013-11-09 13:57 Felix Fietkau
  2013-11-17  9:41 ` Johannes Berg
  0 siblings, 1 reply; 2+ messages in thread
From: Felix Fietkau @ 2013-11-09 13:57 UTC (permalink / raw)
  To: linux-wireless; +Cc: johannes

nla_put_flag needs a real nl80211 attribute id, not a wiphy flag bit

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
---
 include/uapi/linux/nl80211.h | 5 +++++
 net/wireless/nl80211.c       | 2 +-
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/include/uapi/linux/nl80211.h b/include/uapi/linux/nl80211.h
index f752e98..9126544 100644
--- a/include/uapi/linux/nl80211.h
+++ b/include/uapi/linux/nl80211.h
@@ -1508,6 +1508,9 @@ enum nl80211_commands {
  *	to react to radar events, e.g. initiate a channel switch or leave the
  *	IBSS network.
  *
+ * @NL80211_ATTR_SUPPORT_5_10_MHZ: A flag indicating that the device supports
+ *	5 MHz and 10 MHz channel bandwidth.
+ *
  * @NL80211_ATTR_MAX: highest attribute number currently defined
  * @__NL80211_ATTR_AFTER_LAST: internal use
  */
@@ -1824,6 +1827,8 @@ enum nl80211_attrs {
 
 	NL80211_ATTR_HANDLE_DFS,
 
+	NL80211_ATTR_SUPPORT_5_10_MHZ,
+
 	/* add attributes here, update the policy in nl80211.c */
 
 	__NL80211_ATTR_AFTER_LAST,
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index a7f4e79..5d17f86 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -1229,7 +1229,7 @@ static int nl80211_send_wiphy(struct cfg80211_registered_device *dev,
 		    nla_put_flag(msg, NL80211_ATTR_TDLS_EXTERNAL_SETUP))
 			goto nla_put_failure;
 		if ((dev->wiphy.flags & WIPHY_FLAG_SUPPORTS_5_10_MHZ) &&
-		    nla_put_flag(msg, WIPHY_FLAG_SUPPORTS_5_10_MHZ))
+		    nla_put_flag(msg, NL80211_ATTR_SUPPORT_5_10_MHZ))
 			goto nla_put_failure;
 
 		state->split_start++;
-- 
1.8.3.4 (Apple Git-47)


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] cfg80211: fix reporting 5/10 MHz support to user space
  2013-11-09 13:57 [PATCH] cfg80211: fix reporting 5/10 MHz support to user space Felix Fietkau
@ 2013-11-17  9:41 ` Johannes Berg
  0 siblings, 0 replies; 2+ messages in thread
From: Johannes Berg @ 2013-11-17  9:41 UTC (permalink / raw)
  To: Felix Fietkau; +Cc: linux-wireless

On Sat, 2013-11-09 at 14:57 +0100, Felix Fietkau wrote:
> nla_put_flag needs a real nl80211 attribute id, not a wiphy flag bit

Applied to mac80211-next, the 3.12/3.13 situation is a bit more
complicated so I'll disable 5/10 MHz support there.

johannes


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-11-17  9:41 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-09 13:57 [PATCH] cfg80211: fix reporting 5/10 MHz support to user space Felix Fietkau
2013-11-17  9:41 ` Johannes Berg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).