From: Sujith Manoharan Date: Mon, 3 Jun 2013 03:49:23 +0000 (+0530) Subject: ath9k: Return early for invalid rates X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=74a97755f2c2687207e3b1e9e77765b475f7e4e4;p=linux-beck.git ath9k: Return early for invalid rates 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 Signed-off-by: John W. Linville --- diff --git a/drivers/net/wireless/ath/ath9k/recv.c b/drivers/net/wireless/ath/ath9k/recv.c index b4b758deb30e..865e043e8aa6 100644 --- a/drivers/net/wireless/ath/ath9k/recv.c +++ b/drivers/net/wireless/ath/ath9k/recv.c @@ -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;