pub/scm/linux/kernel/git/mcgrof/crda.git  about / heads / tags
Central Regulatory Domain Agent
$ git log --pretty=format:'%h %s (%cs)%d'
9856751 crda: Makefile: fix .so compilation line with some compilers (2019-11-12)
	(HEAD -> master, tag: v4.15)
f4ef253 README: add legacy notice (2018-11-21)
67f1e6d crda: add URLs to README (2018-11-21)
4dcafc8 crda: be explicit about file permission on install (2018-11-21)
d0d549d reglib: properly ident code on reglib_is_valid_rd() (2018-04-28)
067d961 crda: Fix error: `keys’ defined but not used (2018-01-05)
	(tag: v4.14)
48ade1e Update gitignore (2018-01-05)
805d84a crda: Trust regulatory.bin from Seth Forshee (2014-12-10)
	(tag: v3.18)
dd75a8f crda: db2rd, parse/print CAC time (2014-07-02)
2019d70 crda: simplify text parsing for country/rules (2014-06-18)
...

$ git cat-file blob HEAD:README
 Central Regulatory Domain Agent (CRDA)
========================================
<https://wireless.wiki.kernel.org/en/developers/regulatory/crda>

This is the Central Regulatory Domain Agent for Linux. It serves one
purpose: tell Linux kernel what regulatory ruels to enforce for 802.11.

CRDA is no longer needed as of kernel v4.15 since commit 007f6c5e6eb45
("cfg80211: support loading regulatory database as firmware file") added
support to use the kernel's firmware request API which looks for the
firmware on /lib/firmware. Because of this CRDA is legacy software for
older kernels. It will continue to be maintained.

CRDA is a udev helper for communication between the kernel and userspace. You
only need to run this manually for debugging purposes. For manual changing of
regulatory domains use iw (iw reg set) or wpa_supplicant.

 HOST REQUIREMENTS
===================

CRDA is provided as a binary file so all the host needs is libc/uclibc.
You will also need udev and at least libnl1.

 BUILD REQUIREMENTS
====================

The package build requirements currently are:

 * python and the m2crypto package (python-m2crypto)
 * libgcrypt or libssl (openssl) header files
 * nl library and header files (libnl1 and libnl-dev)
   available at git://git.kernel.org/pub/scm/libs/netlink/libnl.git
 * RSA public key of John Linville and Seth Forshee, we include these
   as part of this package so you do not need to install it. The RSA
   public keys comes from the wireless-regdb.git tree and we keep them
   up to date here.
 * regulatory database, clone this tree:

   git://git.kernel.org/pub/scm/linux/kernel/git/sforshee/wireless-regdb.git

   and then stuff regulatory.bin (no need to build) provided there in
   REG_BIN location specified in this Makefile. This regulatory.bin file
   is only required to verify the CRDA built here can read its database file
   which has been signed with the RSA private key.

 CALLING CRDA -- UDEV
======================

Distributions can set up a udev rule to allow the kernel's regulatory
domain change request to be reviewed by CRDA so CRDA can pass an
appropriate regulatory domain. An example regulatory rule is provided
with this package as regulatory.rules

 OVERVIEW
==========
<https://wireless.wiki.kernel.org/en/developers/regulatory>

The database is maintained on the wireless-regdb.git tree. This git
tree maintains a binary regulatory database file which is produced
using its own ASCII db.txt into binary form for size efficiency. The
contents of the binary database are then signed using the private key.

CRDA will use regulatory.bin if its signature checks out with the public
key provided. This will prevent us from using corrupted data (in case
of hard drive failure) in the running kernel. This separation between
CRDA and the regulatory database also allows us to provide regulatory
updates on distributions without having to require an update on CRDA.

Note that upon updating the regulatory database it is advised the
user reboots or all the wireless modules get unloaded and reloaded.

Under certain circumstances it may be desirable to have the regulatory
agent accept multiple keys, this can be achieved by stuffing all the keys
desired into pubkeys. Right now we use John Linville's and Seth Forshee's
public keys.

 REGDB AUTHORS
===============

Authors of regulatory.bin first need a private key, which can be generated
with something like this:

	openssl genrsa -out your.key.priv.pem 2048

You'll then need to generate the public key and publish it. You
can generate it as follows:

	openssl rsa -in your.key.priv.pem -out your.key.pub.pem -pubout -outform PEM

Then with this key you can generate regulatory.bin files like this:

	./utils/db2bin.py regulatory.bin db.txt your.key.priv.pem

 MAGIC PATTERN
===============

Use the following magic(5) pattern to recognise CRDA binary regulatory
database files:

---- %< ----
# CRDA Regulatory database file
# http://git.kernel.org/?p=linux/kernel/git/mcgrof/crda.git;a=summary
# (see regdb.h)
0	belong		0x52474442	CRDA regulatory database file
>4	belong		19		(Version 1)
---- >% ----

# heads (aka `branches'):
$ git for-each-ref --sort=-creatordate refs/heads \
	--format='%(HEAD) %(refname:short) %(subject) (%(creatordate:short))'
* master       crda: Makefile: fix .so compilation line with some compilers (2019-11-12)

# tags:
$ git for-each-ref --sort=-creatordate refs/tags \
	--format='%(refname:short) %(subject) (%(creatordate:short))'
v4.15        v4.15 (2022-07-26) tar.gz
v4.14        CRDA v4.14 - compiler fix warning (2018-01-05) tar.gz
v3.18        Its been a while since a release, now that Seth is the new wireless-regdb maintainer this merits kicking a release out. (2014-12-10) tar.gz
v3.13        Been a while since we do a release, lets kick one out, now we synch to match the kernel releases, just as iw does. (2014-01-24) tar.gz
v1.1.3       Linux distributions are using nl-genl-3 now so make a release to get this to work for them right. (2012-12-11) tar.gz
v1.1.2       libnl-3.0 is the version used for Ubuntu Oneiric, so give it a new bump (2011-08-09) tar.gz
v1.1.1       Now with dynamic key reading for openssl (2010-01-26) tar.gz
v1.1.0       openssl works now - thanks johill (2009-05-12) tar.gz
v1.0.2       v1.0.2 (2009-04-17) tar.gz
v1.0.1       Just some final Makefile fix (2009-01-24) tar.gz
...

# associated public inboxes:
# (number on the left is used for dev purposes)
        186 linux-wireless
        100 ../../../../../../../wireless-regdb
         10 lkml
          4 linux-scsi
          4 u-boot
          3 linux-mm
          3 stable
          3 git
          3 linux-arch
          3 openembedded-devel
          3 reiserfs-devel
          2 linux-block
          2 linux-nvme
          2 netdev
          2 linux-media
          2 xen-devel
          2 linux-rdma
          2 dpdk-dev
          2 backports
          2 dri-devel
          2 linux-omap
          2 linux-perf-users
          2 openembedded-core
          2 linux-trace-kernel
          2 initramfs
          1 linux-samsung-soc
          1 linux-fscrypt
          1 linux-mtd
          1 cocci
          1 linux-riscv
          1 linux-xfs
          1 live-patching
          1 bpf
          1 linux-nfs
          1 qemu-devel
          1 linux-mediatek
          1 linux-crypto
          1 linux-efi
          1 linux-acpi
          1 netfilter-devel
          1 linux-integrity
          1 linux-fsdevel
          1 linux-edac
          1 linux-cifs
          1 linux-devicetree
          1 linux-arm-msm
          1 linux-amlogic
          1 linux-erofs
          1 linux-nvdimm
          1 linux-iommu
          1 linux-snps-arc
          1 linux-mips
          1 fstests
          1 linux-pm
          1 linux-hwmon
          1 linux-rtc
          1 linux-input
          1 alsa-devel
          1 linux-btrfs
          1 linux-arm-kernel
          1 kvmarm
          1 driverdev-devel
          1 linux-usb
          1 linux-renesas-soc
          1 linux-kselftest
          1 selinux
          1 kernel-hardening
          1 linux-clk
          1 linux-iio
          1 linux-gpio
          1 dmaengine
          1 linux-next
          1 linux-parisc
          1 linux-ext4
          1 linux-leds
          1 linux-security-module
          1 linux-pci
          1 linux-f2fs-devel
          1 linuxppc-dev
          1 kvm
          1 linux-modules
          1 kernelnewbies
          1 linux-rt-users
          1 linux-bluetooth
          1 linux-sgx
          1 linux-ide
          1 linux-serial
          1 linux-watchdog
          1 linux-trace-devel
          1 linux-hyperv
          1 workflows
          1 rcu
          1 linux-m68k
          1 linux-i3c
          1 util-linux
          1 linux-spdx
          1 linux-wpan
          1 ksummit-discuss
          1 wireguard
          1 io-uring
          1 linux-kernel-mentees
          1 linux-doc
          1 linux-csky
          1 linux-man
          1 linux-mmc
          1 amd-gfx
          1 intel-gfx
          1 tpmdd-devel
          1 linux-unionfs
          1 linux-firmware
          1 linux-api
          1 cip-dev
          1 linux-audit
          1 linux-spi
          1 linux-i2c
          1 linux-remoteproc
          1 linux-dash
          1 linux-bcache
          1 linux-sparse
          1 mm-commits
          1 linux-pwm
          1 linux-tegra
          1 lttng-dev
          1 virtualization
          1 linux-kbuild
          1 linux-fpga
          1 ceph-devel
          1 linux-can
          1 containers
          1 linux-rockchip
          1 linux-raid
          1 xdp-newbies
          1 platform-driver-x86
          1 phone-devel
          1 openbmc
          1 linux-hardening
          1 dash
          1 dm-devel
          1 keyrings
          1 linux-fbdev
          1 linux-sctp
          1 linux-cxl
          1 target-devel
          1 lustre-devel
          1 linux-sh
          1 soc
          1 ocfs2-devel
          1 rust-for-linux
          1 ath10k
          1 ath11k
          1 nouveau
          1 linux-phy
          1 linux-s390
          1 kernel-janitors
          1 sparclinux
          1 linux-staging
          1 linux-sunxi
          1 mptcp
          1 linux-coco
          1 regressions
          1 ksummit
          1 b43-dev
          1 nvdimm
          1 linux-nfc
          1 linux-bcachefs
          1 ath9k-devel
          1 buildroot
          1 ntfs3
          1 llvm
          1 fio
          1 iwd
          1 ell
          1 ofono
          1 ltp
          1 yocto
          1 yocto-meta-freescale
          1 yocto-toaster
          1 yocto-meta-arm
          1 yocto-docs
          1 bitbake-devel
          1 linux-patches
          1 yocto-meta-virtualization
          1 chrome-platform
          1 ntb
          1 yocto-meta-ti
          1 yocto-meta-arago
          1 outreachy
          1 xenomai
          1 damon
          1 asahi
          1 openrisc
          1 intel-wired-lan
          1 kexec
          1 loongarch
          1 imx
          1 ath12k
          1 b4-sent
          1 oe-linux-nfc
          1 oe-kbuild-all
          1 oe-chipsec
          1 batman
          1 intel-xe
          1 linux-um
          1 virtio-dev
          1 virtio-comment
          1 v9fs
          1 ecryptfs
          1 poky
          1 qemu-riscv
          1 linux-ia64
          1 cluster-devel
          1 grub-devel
          1 kbd
          1 autofs
          1 cpufreq
          1 dccp
          1 cgroups
          1 devicetree-spec
          1 devicetree-compiler
          1 kvm-ppc
          1 hail-devel
          1 kvm-ia64
          1 linux-8086
          1 kernel-testers
          1 linux-alpha
          1 linux-btrace
          1 linux-embedded
          1 linux-hams
          1 linux-hexagon
          1 linux-hotplug
          1 linux-laptop
          1 linux-sound
          1 trinity
          1 linux-metag
          1 linux-x25
          1 linux-nilfs
          1 lvs-devel
          1 netfilter
          1 linux-oxnas
          1 u-boot-amlogic
          1 lm-sensors
          1 lvm-devel
          1 acpica-devel
          1 perfbook
          1 virtio-fs
          1 smatch
          1 ../../../../../../../fuego
          1 ../../../../../../../igt-dev
          1 ../../../../../../../powertop

git clone https://yhbt.net/lore/pub/scm/linux/kernel/git/mcgrof/crda.git