wl1251: configure hardware en-/decryption for monitor mode
[pandora-kernel.git] / drivers / net / wireless / wl1251 / tx.c
index 28121c5..08baccf 100644 (file)
@@ -50,7 +50,7 @@ static bool wl1251_tx_double_buffer_busy(struct wl1251 *wl, u32 data_out_count)
                return false;
 }
 
-static int wl1251_tx_path_status(struct wl1251 *wl)
+int wl1251_tx_path_status(struct wl1251 *wl)
 {
        u32 status, addr, data_out_count;
        bool busy;
@@ -278,7 +278,7 @@ static void wl1251_tx_trigger(struct wl1251 *wl)
 }
 
 /* caller must hold wl->mutex */
-static int wl1251_tx_frame(struct wl1251 *wl, struct sk_buff *skb)
+int wl1251_tx_frame(struct wl1251 *wl, struct sk_buff *skb)
 {
        struct ieee80211_tx_info *info;
        int ret = 0;
@@ -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);
@@ -523,6 +526,7 @@ void wl1251_tx_complete(struct wl1251 *wl)
        }
 
        wl->next_tx_complete = result_index;
+       wl->last_io_jiffies = jiffies;
 }
 
 /* caller must hold wl->mutex */