linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] cfg80211: don't start p2p device while in RFKILL
@ 2013-09-17 12:30 Emmanuel Grumbach
  2013-09-30 14:29 ` Johannes Berg
  0 siblings, 1 reply; 2+ messages in thread
From: Emmanuel Grumbach @ 2013-09-17 12:30 UTC (permalink / raw)
  To: linux-wireless; +Cc: Emmanuel Grumbach

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
---
v2: Check the rfkill before adding the interface
---
 net/wireless/nl80211.c |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index 316503f..a344f23 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -8659,6 +8659,9 @@ static int nl80211_start_p2p_device(struct sk_buff *skb, struct genl_info *info)
 	if (wdev->iftype != NL80211_IFTYPE_P2P_DEVICE)
 		return -EOPNOTSUPP;
 
+	if (rfkill_blocked(rdev->rfkill))
+		return -ERFKILL;
+
 	if (wdev->p2p_started)
 		return 0;
 
-- 
1.7.10.4


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

* Re: [PATCH v2] cfg80211: don't start p2p device while in RFKILL
  2013-09-17 12:30 [PATCH v2] cfg80211: don't start p2p device while in RFKILL Emmanuel Grumbach
@ 2013-09-30 14:29 ` Johannes Berg
  0 siblings, 0 replies; 2+ messages in thread
From: Johannes Berg @ 2013-09-30 14:29 UTC (permalink / raw)
  To: Emmanuel Grumbach; +Cc: linux-wireless

On Tue, 2013-09-17 at 15:30 +0300, Emmanuel Grumbach wrote:
> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
> ---
> v2: Check the rfkill before adding the interface

I'll apply a fixed version that removes the check from the netdev
notifier where it would now be duplicate.

johannes


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

end of thread, other threads:[~2013-09-30 14:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-17 12:30 [PATCH v2] cfg80211: don't start p2p device while in RFKILL Emmanuel Grumbach
2013-09-30 14:29 ` 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).