From: Johannes Berg <johannes@sipsolutions.net>
To: "Luis R. Rodriguez" <mcgrof@do-not-panic.com>,
linux-wireless <linux-wireless@vger.kernel.org>
Subject: Re: new regdb file format
Date: Wed, 14 Oct 2015 23:01:08 +0200 [thread overview]
Message-ID: <1444856468.3054.17.camel@sipsolutions.net> (raw)
In-Reply-To: <1444855924.3054.9.camel@sipsolutions.net> (sfid-20151014_225211_436416_85634BE8)
Err. Let's try that again.
I spent a bit of time thinking about a file format that would be more
extensible, yet still be loadable into the kernel without having to
parse it into new data structures in the kernel, i.e. be easy enough to
read when needed.
My considerations
* must be extensible in some way
* should be relatively dense/small to not use too much kernel memory
* should still be reasonably easy to parse/read
I came up with a file format that's similar to the existing
regulatory.bin format, but with the following changes:
* put the DFS region into a reg rule collection
* put the frequency range and power rules directly into each reg rule
(i.e. don't try to normalize them)
* have a length field in the collection and rule structures so that we
can extend them with new fields
* use more compact pointers, i.e. u16 offsets, by aligning everything
to 4 bytes and shifting the offsets by 2 bits, this allows for
256KiB database files which seems large enough
More documentation is here:
https://wireless.wiki.kernel.org/en/developers/todo-list/regdb-file
-format
I put together a small sample program to create such a file from db.txt
(https://p.sipsolutions.net/1c42079f2e658a82.txt) and one to print such
a file (https://p.sipsolutions.net/8c180172adbe0ad3.txt)
Thoughts?
johannes
next prev parent reply other threads:[~2015-10-14 21:01 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-14 20:52 new regdb file format Johannes Berg
2015-10-14 21:01 ` Johannes Berg [this message]
2015-10-14 21:04 ` Johannes Berg
2015-10-19 11:28 ` Eliad Peller
2015-10-19 11:31 ` Johannes Berg
2015-10-19 11:52 ` Eliad Peller
2015-10-19 11:53 ` Johannes Berg
2015-10-19 11:59 ` Eliad Peller
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=1444856468.3054.17.camel@sipsolutions.net \
--to=johannes@sipsolutions.net \
--cc=linux-wireless@vger.kernel.org \
--cc=mcgrof@do-not-panic.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.