Commit 5a710b86 authored by Sara Sharon's avatar Sara Sharon Committed by Luca Coelho

iwlwifi: mvm: cleanup skb queue functions use

Use skb_queue_empty() and not skb_peek_tail() to check for
empty list.
Avoid a redundant check as well - loop will take care of it.
Signed-off-by: default avatarSara Sharon <sara.sharon@intel.com>
Signed-off-by: default avatarLuca Coelho <luciano.coelho@intel.com>
parent 8352e62a
...@@ -418,10 +418,11 @@ static void iwl_mvm_release_frames(struct iwl_mvm *mvm, ...@@ -418,10 +418,11 @@ static void iwl_mvm_release_frames(struct iwl_mvm *mvm,
ssn = ieee80211_sn_inc(ssn); ssn = ieee80211_sn_inc(ssn);
/* holes are valid since nssn indicates frames were received. */ /*
if (skb_queue_empty(skb_list) || !skb_peek_tail(skb_list)) * Empty the list. Will have more than one frame for A-MSDU.
continue; * Empty list is valid as well since nssn indicates frames were
/* Empty the list. Will have more than one frame for A-MSDU */ * received.
*/
while ((skb = __skb_dequeue(skb_list))) { while ((skb = __skb_dequeue(skb_list))) {
iwl_mvm_pass_packet_to_mac80211(mvm, napi, skb, iwl_mvm_pass_packet_to_mac80211(mvm, napi, skb,
reorder_buf->queue, reorder_buf->queue,
...@@ -434,7 +435,7 @@ static void iwl_mvm_release_frames(struct iwl_mvm *mvm, ...@@ -434,7 +435,7 @@ static void iwl_mvm_release_frames(struct iwl_mvm *mvm,
if (reorder_buf->num_stored && !reorder_buf->removed) { if (reorder_buf->num_stored && !reorder_buf->removed) {
u16 index = reorder_buf->head_sn % reorder_buf->buf_size; u16 index = reorder_buf->head_sn % reorder_buf->buf_size;
while (!skb_peek_tail(&reorder_buf->entries[index])) while (skb_queue_empty(&reorder_buf->entries[index]))
index = (index + 1) % reorder_buf->buf_size; index = (index + 1) % reorder_buf->buf_size;
/* modify timer to match next frame's expiration time */ /* modify timer to match next frame's expiration time */
mod_timer(&reorder_buf->reorder_timer, mod_timer(&reorder_buf->reorder_timer,
...@@ -462,7 +463,7 @@ void iwl_mvm_reorder_timer_expired(unsigned long data) ...@@ -462,7 +463,7 @@ void iwl_mvm_reorder_timer_expired(unsigned long data)
for (i = 0; i < buf->buf_size ; i++) { for (i = 0; i < buf->buf_size ; i++) {
index = (buf->head_sn + i) % buf->buf_size; index = (buf->head_sn + i) % buf->buf_size;
if (!skb_peek_tail(&buf->entries[index])) if (skb_queue_empty(&buf->entries[index]))
continue; continue;
if (!time_after(jiffies, buf->reorder_time[index] + if (!time_after(jiffies, buf->reorder_time[index] +
RX_REORDER_BUF_TIMEOUT_MQ)) RX_REORDER_BUF_TIMEOUT_MQ))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment