Skip to content

Commit

Permalink
ath9k: Return early for invalid rates
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Sujith Manoharan authored and John W. Linville committed Jun 3, 2013
1 parent bda96e8 commit 74a9775
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/net/wireless/ath/ath9k/recv.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 74a9775

Please sign in to comment.