On Fri, Jun 08, 2018 at 12:43:23PM +0200, Adam Borowski wrote: > Hi! > In mid-merge-window kernel I'm getting this warning in mt7601. My tree, > skipping certainly irrelevant extra patches, has merge-base with master at > 289cf155d95df07ac1e692dfaa7036f10235c77c. > > static void mt7601u_agc_tune(struct mt7601u_dev *dev) > { > u8 val = mt7601u_agc_default(dev); > long avg_rssi; > > if (test_bit(MT7601U_STATE_SCANNING, &dev->state)) > return; > > /* Note: only in STA mode and not dozing; perhaps do this only if > * there is enough rssi updates since last run? > * Rssi updates are only on beacons and U2M so should work... > */ > spin_lock_bh(&dev->con_mon_lock); > avg_rssi = ewma_rssi_read(&dev->avg_rssi); > ====> WARN_ON_ONCE(avg_rssi == 0); This WARNING by added by my commit b305a6ab02475f52ef604b36e4cecd3bf4aa5eb7 I assumed that we will never run calibration code without receiving some frames that will provide us RSSI. This turned out not to be true. I will post the fix - just remove warning and return from the function if avg_rssi == 0. Thanks Stanislaw