reglib: add reglib_is_valid_rd() and verify data upon build

This will verify the sanity of a regulatory domain upon build
time. This is useful if you are making modifications to
wireless-regdb and need to verify the regulatory domains
won't be rejected by a similar checker. In the case of the
Linux kernel regulatory domain data structures that get
a complaint would have been rejected completely.

Signed-off-by: Luis R. Rodriguez <>
3 files changed