From: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
To: linux-wireless@vger.kernel.org
Cc: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Subject: [PATCH v2] cfg80211: don't start p2p device while in RFKILL
Date: Tue, 17 Sep 2013 15:30:36 +0300 [thread overview]
Message-ID: <1379421036-6206-1-git-send-email-emmanuel.grumbach@intel.com> (raw)
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
next reply other threads:[~2013-09-17 12:30 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-17 12:30 Emmanuel Grumbach [this message]
2013-09-30 14:29 ` [PATCH v2] cfg80211: don't start p2p device while in RFKILL Johannes Berg
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1379421036-6206-1-git-send-email-emmanuel.grumbach@intel.com \
--to=emmanuel.grumbach@intel.com \
--cc=linux-wireless@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).