aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c')
-rw-r--r--drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c23
1 files changed, 21 insertions, 2 deletions
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c b/drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c
index b84756dc9d6c..76dc58381e1c 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c
@@ -460,9 +460,9 @@ set_timer:
460 } 460 }
461} 461}
462 462
463void iwl_mvm_reorder_timer_expired(unsigned long data) 463void iwl_mvm_reorder_timer_expired(struct timer_list *t)
464{ 464{
465 struct iwl_mvm_reorder_buffer *buf = (void *)data; 465 struct iwl_mvm_reorder_buffer *buf = from_timer(buf, t, reorder_timer);
466 struct iwl_mvm_baid_data *baid_data = 466 struct iwl_mvm_baid_data *baid_data =
467 iwl_mvm_baid_data_from_reorder_buf(buf); 467 iwl_mvm_baid_data_from_reorder_buf(buf);
468 struct iwl_mvm_reorder_buf_entry *entries = 468 struct iwl_mvm_reorder_buf_entry *entries =
@@ -719,6 +719,22 @@ static bool iwl_mvm_reorder(struct iwl_mvm *mvm,
719 return false; 719 return false;
720 } 720 }
721 721
722 /*
723 * release immediately if there are no stored frames, and the sn is
724 * equal to the head.
725 * This can happen due to reorder timer, where NSSN is behind head_sn.
726 * When we released everything, and we got the next frame in the
727 * sequence, according to the NSSN we can't release immediately,
728 * while technically there is no hole and we can move forward.
729 */
730 if (!buffer->num_stored && sn == buffer->head_sn) {
731 if (!amsdu || last_subframe)
732 buffer->head_sn = ieee80211_sn_inc(buffer->head_sn);
733 /* No need to update AMSDU last SN - we are moving the head */
734 spin_unlock_bh(&buffer->lock);
735 return false;
736 }
737
722 index = sn % buffer->buf_size; 738 index = sn % buffer->buf_size;
723 739
724 /* 740 /*
@@ -818,6 +834,9 @@ void iwl_mvm_rx_mpdu_mq(struct iwl_mvm *mvm, struct napi_struct *napi,
818 struct sk_buff *skb; 834 struct sk_buff *skb;
819 u8 crypt_len = 0; 835 u8 crypt_len = 0;
820 836
837 if (unlikely(test_bit(IWL_MVM_STATUS_IN_HW_RESTART, &mvm->status)))
838 return;
839
821 /* Dont use dev_alloc_skb(), we'll have enough headroom once 840 /* Dont use dev_alloc_skb(), we'll have enough headroom once
822 * ieee80211_hdr pulled. 841 * ieee80211_hdr pulled.
823 */ 842 */