Search Linux Wireless

Re: [PATCH] cfg80211: cap 20MHz VHT bitrate at MCS 8

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

 



On 10/04/2016 02:32 AM, Johannes Berg wrote:
Sorry - needed some time to think through this thread again.

I think it is a moot point as far as this change goes:  Regardless of
whether the NIC should or not, it _does_.  So, mis-reporting it up
the stack only hides the issue and does not even give the user a clue
that on-the-air encoding may be slightly off-spec.

Arguably, reporting something that *seems* sane, like this patch does,
will do more to hide it than reporting 0 which is clearly bogus, no?

I realize you were replying to whether or not the *driver* should
"misreport" it, but the same argument applies the other way here, imho.

If the firmware/NIC is putting it on air at a particular encoding, then
I think the stack should report it exactly as it is on air if possible.

Returning zero is not much of a clue to the user.  Adding a WARN_ON_ONCE()
might be more useful, but no one can fix this by modifying the driver or stack, so the warning
will hit, confuse people, and then still never get fixed since it is a firmware
issue.

And, since someone added specific code to the firmware to use this rate
in certain cases, then maybe it is actually a good thing to do.

If the on-air encoding is an issue, then we need to hack the firmware
to disable this 'feature', but that is a completely separate issue.

I guess it trusts rate control enough to try, and if it cannot be
received by a spec-abiding receiver, it won't use it due to the
failures ... not such a big deal I guess, even though it's odd.

Does /anyone/ know why the spec disallowed it? Perhaps those "system"
people you refer to?

I didn't talk to any system people, but maybe Thomas did.  I can confirm
that the firmware appears to do this on purpose and not just to be buggy
on accident though.

Once this patch goes in, someone might consider properly reporting
CCK rx rates for 5Ghz band too:  ath10k can do this 'feature' as
well, at least in some firmware.  Probably can reproduce by sending
off-channel mgt frames on 5Ghz when associated on 2.4, or something
similar to this.  I was using ath9k as sniffer when I found this long
ago, so at least ath9k needs the change....

I don't see how this is related? It's not advertising those rates, so
it probably also can't use/report them as far as mac80211 and the rest
of the stack are concerned.

I can guarantee you that at least some ath10k firmware has a bug that will
send CCK encodings on 5Ghz.  This is a bug in the firmware, but the packets
will go on air, and they can be decoded by ath9k (and ath10k)
and passed up the stack.

Stock ath9k driver will ignore them (or maybe lie and say rate is 6Mbps, I cannot
recall at this point) currently because it thinks the rate is
bad (since it sort of is).  But, if you relax ath9k, then it can actually
sniff these frames and give you a clue as to what is really wrong.

It reminded me of hiding the rate by setting it to zero, since in both cases,
overly strict decisions based on what is *supposed* to happen caused me
to have to dig closely and modify code in order to understand what is
actually happening on-air.

Basically, if the NIC can decode a frame, and checksums pass and so forth,
then it seems it should pass it up the stack.  Possibly with WARN_ONCE to
give use a better clue that there is an issue.

Thanks,
Ben

--
Ben Greear <greearb@xxxxxxxxxxxxxxx>
Candela Technologies Inc  http://www.candelatech.com




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

  Powered by Linux