Skip to content

Commit

Permalink
wl1271: Checking of rx descriptor status fixed
Browse files Browse the repository at this point in the history
Fixed checking of status of the received packet. On wl1251 status is in the
flags field of the descriptor, on wl1271 there is a separate status field.

Signed-off-by: Teemu Paasikivi <ext-teemu.3.paasikivi@nokia.com>
Reviewed-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
  • Loading branch information
Teemu Paasikivi authored and John W. Linville committed Oct 27, 2009
1 parent a410264 commit 5d07b66
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions drivers/net/wireless/wl12xx/wl1271_rx.c
Original file line number Diff line number Diff line change
Expand Up @@ -142,15 +142,10 @@ static void wl1271_rx_status(struct wl1271 *wl,
if (desc->flags & WL1271_RX_DESC_ENCRYPT_MASK) {
status->flag |= RX_FLAG_IV_STRIPPED | RX_FLAG_MMIC_STRIPPED;

if (likely(!(desc->flags & WL1271_RX_DESC_DECRYPT_FAIL)))
if (likely(!(desc->status & WL1271_RX_DESC_DECRYPT_FAIL)))
status->flag |= RX_FLAG_DECRYPTED;
/* FIXME: Flag should be also set when using 5 GHz band.
* At the moment chip reports MIC failed on all packets,
* so flag is silently discarded.
*/
if (unlikely(desc->flags & WL1271_RX_DESC_MIC_FAIL))
if (status->band != IEEE80211_BAND_5GHZ)
status->flag |= RX_FLAG_MMIC_ERROR;
if (unlikely(desc->status & WL1271_RX_DESC_MIC_FAIL))
status->flag |= RX_FLAG_MMIC_ERROR;
}
}

Expand Down

0 comments on commit 5d07b66

Please sign in to comment.