Just wanted to follow-up to let everyone know the status and for
anyone people that may stumble on this from a search. Also, I have a
pcap file from one of the captures done with 2.6.39-1-sn if anyone
wants to inspect the frames themselves, just email me directly if
would like it.
Some observations made in limited testing across various version of
compat-wireless.
* found that 2.6.39-1-sn exhibited the same behavior
* it always seemed that it was HT traffic that this would occur with
* tested an 802.11g client right next to the collection antenna, no frames
from that client would trigger an invalid value
* it was always the same two devices, an HTC phone and a Motorola phone
* found that the per chain RSSIs were always valid even when the combined
RSSI was not
* when the combined RSSI was valid and not equal to the max per chain
RSSI, it was typically was 7 dB or less
So with 2.6.39 demonstrating the behavior as well I did not want to expend
the effort to find a version that this bug did not occur in to do a bisect. To
that end I incorporated a fix-up/work-around/hack to attempt to detect
when a bad combined RSSI, and if so then substitute in the max per
chain RSSI.
@@ -566,9 +566,20 @@ EXPORT_SYMBOL(ath9k_hw_resettxqueue);
int ath9k_hw_rxprocdesc(struct ath_hw *ah, struct ath_desc *ds,
struct ath_rx_status *rs, u64 tsf)
{
+/* shamelessly stole from linux.h */
+#define max3(x, y, z) ({ \
+ typeof(x) _max1 = (x); \
+ typeof(y) _max2 = (y); \
+ typeof(z) _max3 = (z); \
+ (void) (&_max1 == &_max2); \
+ (void) (&_max1 == &_max3); \
+ _max1 > _max2 ? (_max1 > _max3 ? _max1 : _max3) : \
+ (_max2 > _max3 ? _max2 : _max3); })
+
struct ar5416_desc ads;
struct ar5416_desc *adsp = AR5416DESC(ds);
u32 phyerr;
+ int8_t max_rssi;
if ((adsp->ds_rxstatus8 & AR_RxDone) == 0)
return -EINPROGRESS;
@@ -604,6 +615,9 @@ int ath9k_hw_rxprocdesc(struct ath_hw *ah, struct
ath_desc *ds,
rs->rs_rssi_ext2 = MS(ads.ds_rxstatus4,
AR_RxRSSIAnt12);
}
+ max_rssi = max3(rs->rs_rssi_ctl0,rs->rs_rssi_ctl1,rs->rs_rssi_ctl2);
+ if (unlikely( abs(rs->rs_rssi - max_rssi) > 10))
+ rs->rs_rssi = max_rssi;
if (ads.ds_rxstatus8 & AR_RxKeyIdxValid)
rs->rs_keyix = MS(ads.ds_rxstatus8, AR_KeyIdx);
else
@@ -650,6 +664,7 @@ int ath9k_hw_rxprocdesc(struct ath_hw *ah, struct
ath_desc *ds,
}
return 0;
+#undef max3
}
EXPORT_SYMBOL(ath9k_hw_rxprocdesc);
_______________________________________________
ath9k-devel mailing list
[email protected]
https://lists.ath9k.org/mailman/listinfo/ath9k-devel