carl9170: fix signal strength reporting issues
authorChristian Lamparter <chunkeey@googlemail.com>
Sun, 2 Dec 2012 15:52:00 +0000 (16:52 +0100)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 3 Dec 2012 18:52:00 +0000 (13:52 -0500)
On A-MPDU frames, the hardware only reports valid
signal strength data for the last subframe.

This patch fixes it by flagging everything but the
last subframe in an A-MPDU to tell mac80211 to
ignore the signal strength entirely. Otherwise
the empty value (= 0 dbm) will distort the
average quite badly.

Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/ath/carl9170/rx.c

index 6d22382875bc7f85b894902d1a52c428e1ce2832..876a773fd0b4e792a74a97ef67dc234063f227d0 100644 (file)
@@ -814,6 +814,8 @@ static void carl9170_rx_untie_data(struct ar9170 *ar, u8 *buf, int len)
 
        if (phy)
                carl9170_rx_phy_status(ar, phy, &status);
+       else
+               status.flag |= RX_FLAG_NO_SIGNAL_VAL;
 
        if (carl9170_handle_mpdu(ar, buf, mpdu_len, &status))
                goto drop;