Search Linux Wireless

Re: rt2x00usb warning while channel hopping

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Aug 01, 2019 at 12:43:26PM -0400, Sid Hayn wrote:
> While testing wireless-testing kernel for some other fixes, I
> encountered this warning.  I have a few different chipsets and drivers
> all channel hopping in monitor mode on the test box, but I get this
> warning from rt2x00 over and over again (lots).  I am testing two
> patches from johill on top of wireless testing, I don't believe they
> are causing this, but I'll include them for completeness.
> 
> https://patchwork.kernel.org/patch/11063915/
> https://patchwork.kernel.org/patch/11069625/

The way to find out is drop those patches and see if the warning
is still there. But it still can be rt2x00 problem that is only
triggered with those patches, so let's try to debug. 
   
> I'm happy to test anything required, although I will be traveling next
> week which may cause delays.
<snip>

> [  170.055276] ------------[ cut here ]------------
> [  170.055305] WARNING: CPU: 3 PID: 5777 at
> rt2x00lib_config.cold.0+0xc/0x2a [rt2x00lib]

This seems to be warning at rt2x00ht_center_channel() in:

        for (i = 0; i < spec->num_channels; i++)
                if (spec->channels[i].channel == center_channel)
                        return i;

        WARN_ON(1);
        return conf->chandef.chan->hw_value;

So looks like we set channel that is not specified in rt2800 channels
table. Not sure at the moment if mac80211 provide wrong channel spec or
rt2x00 do something wrong. Please apply below patch and provide prints.

Stanislaw

diff --git a/drivers/net/wireless/ralink/rt2x00/rt2x00config.c b/drivers/net/wireless/ralink/rt2x00/rt2x00config.c
index 0ee1813e8453..5f6dadef9f7c 100644
--- a/drivers/net/wireless/ralink/rt2x00/rt2x00config.c
+++ b/drivers/net/wireless/ralink/rt2x00/rt2x00config.c
@@ -185,7 +185,11 @@ static u16 rt2x00ht_center_channel(struct rt2x00_dev *rt2x00dev,
 		if (spec->channels[i].channel == center_channel)
 			return i;
 
-	WARN_ON(1);
+	WARN_ONCE(1, "hw_value %d channel %d center_channel %d\n",
+		  conf->chandef.chan->hw_value,
+		  spec->channels[conf->chandef.chan->hw_value].channel,
+		  center_channel);
+
 	return conf->chandef.chan->hw_value;
 }
 



[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Wireless Regulations]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux