Changeset 35751


Ignore:
Timestamp:
2013-02-22T21:13:24+01:00 (5 years ago)
Author:
nbd
Message:

ath9k_htc: fix signal strength reporting issues

Backport of r35749

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/attitude_adjustment/package/mac80211/patches/300-pending_work.patch

    r35153 r35751  
    20212021 #define AR_SREV_9330(_ah) \ 
    20222022        (((_ah)->hw_version.macVersion == AR_SREV_VERSION_9330)) 
     2023--- a/drivers/net/wireless/ath/ath9k/htc_drv_txrx.c 
     2024+++ b/drivers/net/wireless/ath/ath9k/htc_drv_txrx.c 
     2025@@ -1067,15 +1067,19 @@ static bool ath9k_rx_prepare(struct ath9 
     2026  
     2027        last_rssi = priv->rx.last_rssi; 
     2028  
     2029-       if (likely(last_rssi != ATH_RSSI_DUMMY_MARKER)) 
     2030-               rxbuf->rxstatus.rs_rssi = ATH_EP_RND(last_rssi, 
     2031-                                                    ATH_RSSI_EP_MULTIPLIER); 
     2032+       if (ieee80211_is_beacon(hdr->frame_control) && 
     2033+           !is_zero_ether_addr(common->curbssid) && 
     2034+           ether_addr_equal(hdr->addr3, common->curbssid)) { 
     2035+               s8 rssi = rxbuf->rxstatus.rs_rssi; 
     2036  
     2037-       if (rxbuf->rxstatus.rs_rssi < 0) 
     2038-               rxbuf->rxstatus.rs_rssi = 0; 
     2039+               if (likely(last_rssi != ATH_RSSI_DUMMY_MARKER)) 
     2040+                       rssi = ATH_EP_RND(last_rssi, ATH_RSSI_EP_MULTIPLIER); 
     2041  
     2042-       if (ieee80211_is_beacon(fc)) 
     2043-               priv->ah->stats.avgbrssi = rxbuf->rxstatus.rs_rssi; 
     2044+               if (rssi < 0) 
     2045+                       rssi = 0; 
     2046+ 
     2047+               priv->ah->stats.avgbrssi = rssi; 
     2048+       } 
     2049  
     2050        rx_status->mactime = be64_to_cpu(rxbuf->rxstatus.rs_tstamp); 
     2051        rx_status->band = hw->conf.channel->band; 
Note: See TracChangeset for help on using the changeset viewer.