ath10k: don't drop frames aggressively
authorMichal Kazior <michal.kazior@tieto.com>
Thu, 23 Oct 2014 14:04:23 +0000 (17:04 +0300)
committerKalle Valo <kvalo@qca.qualcomm.com>
Fri, 24 Oct 2014 13:29:07 +0000 (16:29 +0300)
There's little point in dropping, e.g. frames with
FCS error early in ath10k.

This simplifies amsdu_allowed() and gets rid of
htt_rx_mpdu_status usage finally.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
drivers/net/wireless/ath/ath10k/htt_rx.c

index 41a280387cf440a4a93075bfd25fb4befc47f6d5..7fa4d872f05cd2b6fdf3c19efc5573253a232120 100644 (file)
@@ -1171,7 +1171,6 @@ static int ath10k_unchain_msdu(struct sk_buff *msdu_head)
 
 static bool ath10k_htt_rx_amsdu_allowed(struct ath10k_htt *htt,
                                        struct sk_buff *head,
-                                       enum htt_rx_mpdu_status status,
                                        bool channel_set,
                                        u32 attention)
 {
@@ -1200,16 +1199,6 @@ static bool ath10k_htt_rx_amsdu_allowed(struct ath10k_htt *htt,
                return false;
        }
 
-       if (status != HTT_RX_IND_MPDU_STATUS_OK &&
-           status != HTT_RX_IND_MPDU_STATUS_TKIP_MIC_ERR &&
-           status != HTT_RX_IND_MPDU_STATUS_ERR_INV_PEER &&
-           !htt->ar->monitor_started) {
-               ath10k_dbg(ar, ATH10K_DBG_HTT,
-                          "htt rx ignoring frame w/ status %d\n",
-                          status);
-               return false;
-       }
-
        if (test_bit(ATH10K_CAC_RUNNING, &htt->ar->dev_flags)) {
                ath10k_dbg(ar, ATH10K_DBG_HTT,
                           "htt rx CAC running\n");
@@ -1225,7 +1214,6 @@ static void ath10k_htt_rx_handler(struct ath10k_htt *htt,
        struct ath10k *ar = htt->ar;
        struct ieee80211_rx_status *rx_status = &htt->rx_status;
        struct htt_rx_indication_mpdu_range *mpdu_ranges;
-       enum htt_rx_mpdu_status status;
        struct ieee80211_hdr *hdr;
        int num_mpdu_ranges;
        u32 attention;
@@ -1273,8 +1261,6 @@ static void ath10k_htt_rx_handler(struct ath10k_htt *htt,
                                num_mpdu_ranges));
 
        for (i = 0; i < num_mpdu_ranges; i++) {
-               status = mpdu_ranges[i].mpdu_range_status;
-
                for (j = 0; j < mpdu_ranges[i].mpdu_count; j++) {
                        struct sk_buff *msdu_head, *msdu_tail;
 
@@ -1296,7 +1282,6 @@ static void ath10k_htt_rx_handler(struct ath10k_htt *htt,
                        }
 
                        if (!ath10k_htt_rx_amsdu_allowed(htt, msdu_head,
-                                                        status,
                                                         channel_set,
                                                         attention)) {
                                ath10k_htt_rx_free_msdu_chain(msdu_head);