]> git.karo-electronics.de Git - linux-beck.git/commitdiff
ath9k: Return early for invalid rates
authorSujith Manoharan <c_manoha@qca.qualcomm.com>
Mon, 3 Jun 2013 03:49:23 +0000 (09:19 +0530)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 3 Jun 2013 19:55:45 +0000 (15:55 -0400)
Process and update the internal RSSI average, which
is used by ANI, after verifying that the received
frame has valid rate information.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/ath/ath9k/recv.c

index b4b758deb30e2ef0fb827a665a0208570627da73..865e043e8aa6408c92e2b512ffcc7ba69c4ed39f 100644 (file)
@@ -955,11 +955,11 @@ static int ath9k_rx_skb_preprocess(struct ath_softc *sc,
        if (rx_stats->rs_more)
                return 0;
 
-       ath9k_process_rssi(common, hw, hdr, rx_stats);
-
        if (ath9k_process_rate(common, hw, rx_stats, rx_status))
                return -EINVAL;
 
+       ath9k_process_rssi(common, hw, hdr, rx_stats);
+
        rx_status->band = hw->conf.chandef.chan->band;
        rx_status->freq = hw->conf.chandef.chan->center_freq;
        rx_status->signal = ah->noise + rx_stats->rs_rssi;