summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/ti/wl1251/tx.c
diff options
context:
space:
mode:
authorDavid Gnedt <david.gnedt@davizone.at>2014-01-07 13:07:52 +0100
committerJohn W. Linville <linville@tuxdriver.com>2014-01-09 10:54:58 -0500
commit4d09b5378defd4ef685f9d33e0d35b380109eafa (patch)
treec4f78e3938bc864e6140bb1cce434543ea36d096 /drivers/net/wireless/ti/wl1251/tx.c
parent9281691fb2e48f0853bb986a9049e5d9c8bf1578 (diff)
wl1251: configure hardware en-/decryption for monitor mode
Disable hardware encryption (DF_ENCRYPTION_DISABLE) and decryption (DF_SNIFF_MODE_ENABLE) via wl1251_acx_feature_cfg while monitor interface is present. Signed-off-by: David Gnedt <david.gnedt@davizone.at> Signed-off-by: Pali Rohár <pali.rohar@gmail.com> Signed-off-by: Pavel Machek <pavel@ucw.cz> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ti/wl1251/tx.c')
-rw-r--r--drivers/net/wireless/ti/wl1251/tx.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/wireless/ti/wl1251/tx.c b/drivers/net/wireless/ti/wl1251/tx.c
index 28121c590a2b..466cd25c022b 100644
--- a/drivers/net/wireless/ti/wl1251/tx.c
+++ b/drivers/net/wireless/ti/wl1251/tx.c
@@ -287,6 +287,9 @@ static int wl1251_tx_frame(struct wl1251 *wl, struct sk_buff *skb)
info = IEEE80211_SKB_CB(skb);
if (info->control.hw_key) {
+ if (unlikely(wl->monitor_present))
+ return -EINVAL;
+
idx = info->control.hw_key->hw_key_idx;
if (unlikely(wl->default_key != idx)) {
ret = wl1251_acx_default_key(wl, idx);