]> git.karo-electronics.de Git - linux-beck.git/commitdiff
ath10k: skip management frames in HTT path
authorJanusz Dziedzic <janusz.dziedzic@tieto.com>
Tue, 25 Feb 2014 06:56:39 +0000 (07:56 +0100)
committerKalle Valo <kvalo@qca.qualcomm.com>
Thu, 27 Feb 2014 16:42:08 +0000 (18:42 +0200)
After we pass frames with INV_PEER to upper layer in commit 716ae53c56cf
("ath10k: pass frames with invalid peer status to upper layer") we could pass
some management frames (in case INVALID_PEER and MGMT_CTRL) twice to upper
layer, once via WMI and once via HTT. Next we could handle assoc request twice.
This patch remove such regression.

Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
drivers/net/wireless/ath/ath10k/htt_rx.c

index fcd00f639e13072b3db8e671dc5fa7b6d71ff36b..23d909555e586be6d8a5b69209717d76e0080052 100644 (file)
@@ -852,6 +852,20 @@ static bool ath10k_htt_rx_has_mic_err(struct sk_buff *skb)
        return false;
 }
 
+static bool ath10k_htt_rx_is_mgmt(struct sk_buff *skb)
+{
+       struct htt_rx_desc *rxd;
+       u32 flags;
+
+       rxd = (void *)skb->data - sizeof(*rxd);
+       flags = __le32_to_cpu(rxd->attention.flags);
+
+       if (flags & RX_ATTENTION_FLAGS_MGMT_TYPE)
+               return true;
+
+       return false;
+}
+
 static int ath10k_htt_rx_get_csum_state(struct sk_buff *skb)
 {
        struct htt_rx_desc *rxd;
@@ -946,7 +960,8 @@ static void ath10k_htt_rx_handler(struct ath10k_htt *htt,
                        status = info.status;
 
                        /* Skip mgmt frames while we handle this in WMI */
-                       if (status == HTT_RX_IND_MPDU_STATUS_MGMT_CTRL) {
+                       if (status == HTT_RX_IND_MPDU_STATUS_MGMT_CTRL ||
+                           ath10k_htt_rx_is_mgmt(msdu_head)) {
                                ath10k_dbg(ATH10K_DBG_HTT, "htt rx mgmt ctrl\n");
                                ath10k_htt_rx_free_msdu_chain(msdu_head);
                                continue;