From: Victor Goldenshtein <victorg@ti.com>
To: <linux-wireless@vger.kernel.org>
Cc: <kgiori@qca.qualcomm.com>, <mcgrof@frijolero.org>,
<zefir.kurtisi@neratec.com>, <adrian.chadd@gmail.com>, <j@w1.fi>,
<johannes@sipsolutions.net>, <coelho@ti.com>, <assaf@ti.com>,
<yoni.divinsky@ti.com>, <igalc@ti.com>, <adrian@freebsd.org>,
<nbd@nbd.name>, <simon.wunderlich@s2003.tu-chemnitz.de>
Subject: [PATCH 7/7] mac80211: add DFS support to monitor interface
Date: Mon, 18 Jun 2012 17:46:38 +0300 [thread overview]
Message-ID: <1340030798-28992-8-git-send-email-victorg@ti.com> (raw)
In-Reply-To: <1340030798-28992-1-git-send-email-victorg@ti.com>
Stop dropping packets if we are on 'radar channel'
and the DFS is enabled/supported.
Signed-off-by: Victor Goldenshtein <victorg@ti.com>
---
net/mac80211/tx.c | 14 ++++++++------
1 files changed, 8 insertions(+), 6 deletions(-)
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
index e453212..b6a7cee 100644
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -1595,6 +1595,8 @@ netdev_tx_t ieee80211_monitor_start_xmit(struct sk_buff *skb,
struct ieee80211_sub_if_data *tmp_sdata, *sdata;
u16 len_rthdr;
int hdrlen;
+ bool dfs_supported = !!(local->hw.wiphy->features &
+ NL80211_FEATURE_DFS);
/*
* Frame injection is not allowed if beaconing is not allowed
@@ -1607,13 +1609,13 @@ netdev_tx_t ieee80211_monitor_start_xmit(struct sk_buff *skb,
* flag.
*
* Since AP mode uses monitor interfaces to inject/TX management
- * frames we can make AP mode the exception to this rule once it
- * supports radar detection as its implementation can deal with
- * radar detection by itself. We can do that later by adding a
- * monitor flag interfaces used for AP support.
+ * frames we can make AP mode the exception to this rule, in the
+ * case the driver supports radar detection, allow usage of radar
+ * channels.
*/
- if ((chan->flags & (IEEE80211_CHAN_NO_IBSS | IEEE80211_CHAN_RADAR |
- IEEE80211_CHAN_PASSIVE_SCAN)))
+ if ((!(chan->flags & IEEE80211_CHAN_RADAR) || !dfs_supported) &&
+ ((chan->flags & (IEEE80211_CHAN_NO_IBSS | IEEE80211_CHAN_RADAR |
+ IEEE80211_CHAN_PASSIVE_SCAN))))
goto fail;
/* check for not even having the fixed radiotap header part */
--
1.7.5.4
next prev parent reply other threads:[~2012-06-18 14:50 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-18 14:46 [PATCH 0/7] nl/cfg/mac80211: add DFS master ability Victor Goldenshtein
2012-06-18 14:46 ` [PATCH 1/7] nl80211/cfg80211: add radar detection command/event Victor Goldenshtein
2012-06-18 14:46 ` [PATCH 2/7] mac80211: " Victor Goldenshtein
2012-06-18 14:46 ` [PATCH 3/7] nl80211/cfg80211: add ability to enable TX on op-channel Victor Goldenshtein
2012-06-18 14:46 ` [PATCH 4/7] mac80211: " Victor Goldenshtein
2012-06-18 14:46 ` [PATCH 5/7] nl80211/cfg80211: add ap channel switch command/event Victor Goldenshtein
2012-06-18 14:46 ` [PATCH 6/7] mac80211: " Victor Goldenshtein
2012-06-18 14:46 ` Victor Goldenshtein [this message]
2012-06-19 6:44 ` [PATCH 7/7] mac80211: add DFS support to monitor interface Kalle Valo
2012-06-19 6:57 ` Luciano Coelho
2012-06-20 6:09 ` Kalle Valo
2012-06-19 8:42 ` Goldenshtein, Victor
2012-06-18 14:59 ` [PATCH 0/7] nl/cfg/mac80211: add DFS master ability Johannes Berg
2012-06-18 15:02 ` Goldenshtein, Victor
2012-06-18 15:04 ` Johannes Berg
2012-06-20 10:34 ` Zefir Kurtisi
2012-06-20 10:47 ` Goldenshtein, Victor
2012-06-20 10:49 ` Johannes Berg
2012-06-20 11:02 ` Goldenshtein, Victor
2012-06-20 12:03 ` Luciano Coelho
2012-06-20 12:07 ` Luciano Coelho
2012-06-20 16:44 ` Goldenshtein, Victor
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=1340030798-28992-8-git-send-email-victorg@ti.com \
--to=victorg@ti.com \
--cc=adrian.chadd@gmail.com \
--cc=adrian@freebsd.org \
--cc=assaf@ti.com \
--cc=coelho@ti.com \
--cc=igalc@ti.com \
--cc=j@w1.fi \
--cc=johannes@sipsolutions.net \
--cc=kgiori@qca.qualcomm.com \
--cc=linux-wireless@vger.kernel.org \
--cc=mcgrof@frijolero.org \
--cc=nbd@nbd.name \
--cc=simon.wunderlich@s2003.tu-chemnitz.de \
--cc=yoni.divinsky@ti.com \
--cc=zefir.kurtisi@neratec.com \
/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).