Changeset 35749


Ignore:
Timestamp:
2013-02-22T17:10:15+01:00 (5 years ago)
Author:
nbd
Message:

ath9k_htc: fix signal strength reporting issues

File:
1 edited

Legend:

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

    r35576 r35749  
    31563156                        "lookaround %d\n", 
    31573157                        max(0, (int) mi->total_packets - (int) mi->sample_packets), 
     3158--- a/drivers/net/wireless/ath/ath9k/htc_drv_txrx.c 
     3159+++ b/drivers/net/wireless/ath/ath9k/htc_drv_txrx.c 
     3160@@ -1067,15 +1067,19 @@ static bool ath9k_rx_prepare(struct ath9 
     3161  
     3162        last_rssi = priv->rx.last_rssi; 
     3163  
     3164-       if (likely(last_rssi != ATH_RSSI_DUMMY_MARKER)) 
     3165-               rxbuf->rxstatus.rs_rssi = ATH_EP_RND(last_rssi, 
     3166-                                                    ATH_RSSI_EP_MULTIPLIER); 
     3167+       if (ieee80211_is_beacon(hdr->frame_control) && 
     3168+           !is_zero_ether_addr(common->curbssid) && 
     3169+           ether_addr_equal(hdr->addr3, common->curbssid)) { 
     3170+               s8 rssi = rxbuf->rxstatus.rs_rssi; 
     3171  
     3172-       if (rxbuf->rxstatus.rs_rssi < 0) 
     3173-               rxbuf->rxstatus.rs_rssi = 0; 
     3174+               if (likely(last_rssi != ATH_RSSI_DUMMY_MARKER)) 
     3175+                       rssi = ATH_EP_RND(last_rssi, ATH_RSSI_EP_MULTIPLIER); 
     3176  
     3177-       if (ieee80211_is_beacon(fc)) 
     3178-               priv->ah->stats.avgbrssi = rxbuf->rxstatus.rs_rssi; 
     3179+               if (rssi < 0) 
     3180+                       rssi = 0; 
     3181+ 
     3182+               priv->ah->stats.avgbrssi = rssi; 
     3183+       } 
     3184  
     3185        rx_status->mactime = be64_to_cpu(rxbuf->rxstatus.rs_tstamp); 
     3186        rx_status->band = hw->conf.channel->band; 
Note: See TracChangeset for help on using the changeset viewer.