wl1251: configure hardware en-/decryption for monitor mode
[linux-drm-fsl-dcu.git] / drivers / net / wireless / ti / wl1251 / tx.c
index 28121c590a2b1a62effa4c17b335b83264c99acf..466cd25c022b552eae797749e254c003f3c3a5fb 100644 (file)
@@ -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);