From: Stanislaw Gruszka <sgruszka@redhat.com>
To: Adam Borowski <kilobyte@angband.pl>
Cc: Jakub Kicinski <kubakici@wp.pl>, linux-wireless@vger.kernel.org
Subject: Re: WARNING: drivers/net/wireless/mediatek/mt7601u/phy.c:989
Date: Fri, 8 Jun 2018 15:02:56 +0200 [thread overview]
Message-ID: <20180608130255.GA12620@redhat.com> (raw)
In-Reply-To: <20180608104323.vaw6vtbmxdut6yld@angband.pl>
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
prev parent reply other threads:[~2018-06-08 13:02 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-08 10:43 WARNING: drivers/net/wireless/mediatek/mt7601u/phy.c:989 Adam Borowski
2018-06-08 13:02 ` Stanislaw Gruszka [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180608130255.GA12620@redhat.com \
--to=sgruszka@redhat.com \
--cc=kilobyte@angband.pl \
--cc=kubakici@wp.pl \
--cc=linux-wireless@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).