From: Kalle Valo <kvalo@qca.qualcomm.com>
To: "Luis R. Rodriguez" <mcgrof@do-not-panic.com>
Cc: Ben Greear <greearb@candelatech.com>,
<linux-wireless@vger.kernel.org>,
<wireless-regdb@lists.infradead.org>,
Adrian Chadd <adrian@freebsd.org>
Subject: Re: [RFC] wireless: improve dfs-region intersection.
Date: Wed, 25 Jun 2014 20:56:07 +0300 [thread overview]
Message-ID: <87pphw3mbs.fsf@kamboji.qca.qualcomm.com> (raw)
In-Reply-To: <20140625165247.GK1390@garbanzo.do-not-panic.com> (Luis R. Rodriguez's message of "Wed, 25 Jun 2014 09:52:47 -0700")
"Luis R. Rodriguez" <mcgrof@do-not-panic.com> writes:
> On Tue, Jun 24, 2014 at 08:47:46AM +0300, Kalle Valo wrote:
>> Ben Greear <greearb@candelatech.com> writes:
>>
>> > As for being confusing, the current code is nasty and it is very hard
>> > to have any idea why things do or do not work, especially if you do not
>> > have ability to add printk all over the place to figure out what the
>> > code is actually doing.
>>
>> Heh, this is exatly what I do when I debug regulatory issues :)
>
> CFG80211_REG_DEBUG isn't too chatty already?
Unfortunately it's not enough. Sometimes I need to debug the regulatory
code line by line, it's just that difficult to understand. There are all
sort of odd checks everywhere in the code which affect behaviour.
>> > I think some more effort should go into printing out a lot more
>> > information about the regulator domain decisions, through printk
>> > or related call if nothing better is found...
>>
>> IMHO the regulatory code is the most fragile part of Linux wireless
>> stack
>
> Changing anything on regulatory can have an impact on many things but
> lets be clear of the difference on the nature of quality over impact due
> to the nature of what the code does and its impact. I invite you to
> compare the code quality on the existing regulatory infrastructure from
> what was in place on the atheros driver HAL for regulatory control. Now
> *that* was incomprensible and somehow we managed to evolve to something
> central and shared on Linux.
Sure. I haven't looked at HAL, but I'm sure what we have in cfg80211 is
better. But the way I'm seeing is that everyone are just submitting
random fixes for their issues and the code is getting more convuluted in
every release :/ And I also see that some of the functionality in
regulatory code seems to happen by accident, not by design. So I'm
getting very worried about this.
> Code needs to evolve though and I do agree we need to evolve things
> to a more mature foundation. More details on that regards below.
>
>> and needs a rewrite. It needs to be simple and easy to understand.
>
> There is actually quite a bit of documentation:
>
> http://wireless.kernel.org/en/developers/Regulatory
> http://wireless.kernel.org/en/developers/Regulatory/processing_rules
> http://wireless.kernel.org/en/developers/Regulatory/CRDA
> http://wireless.kernel.org/en/developers/Regulatory/wireless-regdb
>
> I'm not familiar with smaller pieces of code on the kernel with as much
> documentation as this. The code actually also includes quite a bit of
> kdoc and comments. Small code changes however can have an impact though
> and as technologies advances we have more complex corner cases and
> the state machine of regulatory keeps evolving as such a more evolved
> infrastructure is indeed needed to help us cope and ensure we don't
> have regressions as we evolve the code.
I don't think documentation is the solution here. Documentation is
always behind the actual implementation and it doesn't really help to
fix bugs. The best is if the code is simple enough so that it documents
itself.
--
Kalle Valo
prev parent reply other threads:[~2014-06-25 17:56 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-11 20:08 [RFC] wireless: improve dfs-region intersection greearb
2014-06-23 19:15 ` Luis R. Rodriguez
2014-06-23 20:37 ` Ben Greear
2014-06-23 20:54 ` Luis R. Rodriguez
2014-06-23 21:20 ` Ben Greear
2014-06-24 0:44 ` Luis R. Rodriguez
2014-06-24 2:35 ` Ben Greear
2014-06-24 2:53 ` Luis R. Rodriguez
2014-06-25 16:48 ` Ben Greear
2014-06-25 17:20 ` Luis R. Rodriguez
2014-06-25 17:34 ` Ben Greear
2014-06-25 17:37 ` Luis R. Rodriguez
2014-06-26 6:50 ` Janusz Dziedzic
2014-06-24 5:47 ` Kalle Valo
2014-06-25 16:52 ` Luis R. Rodriguez
2014-06-25 17:56 ` Kalle Valo [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=87pphw3mbs.fsf@kamboji.qca.qualcomm.com \
--to=kvalo@qca.qualcomm.com \
--cc=adrian@freebsd.org \
--cc=greearb@candelatech.com \
--cc=linux-wireless@vger.kernel.org \
--cc=mcgrof@do-not-panic.com \
--cc=wireless-regdb@lists.infradead.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).