This should make scans on iwn(4) more reliable. At present the calculation of 'passive' in iwn_get_passive_dwell_time() serves no purpose because iwn_limit_dwell() ignores its second parameter. This looks like an accident.
Effectively, this diff extends channel dwell time during passive scans by 20ms on 2Ghz and by 10ms on 5GHz, on top of the default dwell time of 100ms. Given that most APs use a beacon interval of 100ms, these small extensions could make the difference between catching a beacon and not catching it. In if_iwnreg.h there's even a comment which says: * For the most reliable scan, set > AP beacon interval (typically 100msec). ok? diff 1afff35ce04b6804bc4ca370e3ec3962d8a5f38a /usr/src blob - c7bc1ddd8dc8f2637094971d01a3c2915c4ab628 file + sys/dev/pci/if_iwn.c --- sys/dev/pci/if_iwn.c +++ sys/dev/pci/if_iwn.c @@ -4703,7 +4703,7 @@ iwn_limit_dwell(struct iwn_softc *sc, uint16_t dwell_t return (MIN(IWN_PASSIVE_DWELL_BASE, ((bintval * 85) / 100))); /* No association context? Default */ - return (IWN_PASSIVE_DWELL_BASE); + return dwell_time; } uint16_t