0001-update-kernel-include-regulatory-database.patch 1.03 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
From 74fd3c56ea44e4f2d8e050a21a91820762039212 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Timo=20Ter=C3=A4s?= <timo.teras@iki.fi>
Date: Fri, 15 Feb 2019 13:27:09 +0200
Subject: [PATCH] update-kernel: include regulatory database

---
 update-kernel.in | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/update-kernel.in b/update-kernel.in
index 94458e1..eeb0716 100644
--- a/update-kernel.in
+++ b/update-kernel.in
@@ -295,8 +295,15 @@ for _xfw in "$modloopfw"; do
 	fi
 done
 
+# wireless regulatory db
+if [ -e "$ROOT"/lib/modules/*/kernel/net/wireless/cfg80211.ko ]; then
+	for _regdb in "$ROOT"/lib/firmware/regulatory.db*; do
+		[ -e "$_regdb" ] && install -pD "$_regdb" "$MODLOOP"/modules/firmware/"${_regdb##*/}"
+	done
+fi
+
 # include bluetooth firmware in modloop
-if [ -d "$MODLOOP/modules/firmware/brcm" ]; then
+if [ -e "$ROOT"/lib/modules/*/kernel/drivers/bluetooth/btbcm.ko ]; then
 	for _btfw in "$ROOT"/lib/firmware/brcm/*.hcd; do
 		install -pD "$_btfw" \
 			"$MODLOOP"/modules/firmware/brcm/"${_btfw##*/}"
-- 
2.20.1