Skip to content

Commit

Permalink
ath9k: move the rx_stats->rs_datalen check to ath9k_rx_accept()
Browse files Browse the repository at this point in the history
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
  • Loading branch information
Luis R. Rodriguez authored and John W. Linville committed Nov 11, 2009
1 parent 5ca4262 commit 0a45da7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/net/wireless/ath/ath9k/recv.c
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,9 @@ static bool ath9k_rx_accept(struct ath_common *common,
hdr = (struct ieee80211_hdr *) skb->data;
fc = hdr->frame_control;

if (!rx_stats->rs_datalen)
return false;

if (rx_stats->rs_more) {
/*
* Frame spans multiple descriptors; this cannot happen yet
Expand Down Expand Up @@ -793,9 +796,6 @@ int ath_rx_tasklet(struct ath_softc *sc, int flush)
if (flush)
goto requeue;

if (!rx_stats->rs_datalen)
goto requeue;

/* The status portion of the descriptor could get corrupted. */
if (sc->rx.bufsize < rx_stats->rs_datalen)
goto requeue;
Expand Down

0 comments on commit 0a45da7

Please sign in to comment.