mac80211: clean up ieee80211_rx_h_check_dup code

Reduce indentation a bit to make the condition more readable.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
This commit is contained in:
Johannes Berg 2015-10-14 18:27:07 +02:00
parent 4a733ef1be
commit a732fa7001

View File

@ -1113,16 +1113,16 @@ ieee80211_rx_h_check_dup(struct ieee80211_rx_data *rx)
is_multicast_ether_addr(hdr->addr1)) is_multicast_ether_addr(hdr->addr1))
return RX_CONTINUE; return RX_CONTINUE;
if (rx->sta) { if (!rx->sta)
if (unlikely(ieee80211_has_retry(hdr->frame_control) && return RX_CONTINUE;
rx->sta->last_seq_ctrl[rx->seqno_idx] ==
hdr->seq_ctrl)) { if (unlikely(ieee80211_has_retry(hdr->frame_control) &&
I802_DEBUG_INC(rx->local->dot11FrameDuplicateCount); rx->sta->last_seq_ctrl[rx->seqno_idx] == hdr->seq_ctrl)) {
rx->sta->num_duplicates++; I802_DEBUG_INC(rx->local->dot11FrameDuplicateCount);
return RX_DROP_UNUSABLE; rx->sta->num_duplicates++;
} else if (!(status->flag & RX_FLAG_AMSDU_MORE)) { return RX_DROP_UNUSABLE;
rx->sta->last_seq_ctrl[rx->seqno_idx] = hdr->seq_ctrl; } else if (!(status->flag & RX_FLAG_AMSDU_MORE)) {
} rx->sta->last_seq_ctrl[rx->seqno_idx] = hdr->seq_ctrl;
} }
return RX_CONTINUE; return RX_CONTINUE;