From 640ae1f6497fa1467adb8fc1089398532fba2a0a Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Thu, 18 Aug 2011 13:45:04 +0200 Subject: [PATCH] compat-wireless: fix building with CONFIG_CFG80211_INTERNAL_REGDB When building with CONFIG_CFG80211_INTERNAL_REGDB set there is a db.txt and genregdb.awk needed. $(srctree) contains the position of the kernel source and not the position of the compat-wireless root directory. Reported-by: Ed W Signed-off-by: Hauke Mehrtens --- config.mk | 1 + patches/35-fix-makefile-includes.patch | 10 ++++++++++ scripts/admin-update.sh | 4 ++++ 3 files changed, 15 insertions(+) diff --git a/config.mk b/config.mk index e2bffeb227e5..7c6bc3bb7be8 100644 --- a/config.mk +++ b/config.mk @@ -158,6 +158,7 @@ CONFIG_CFG80211_DEFAULT_PS=y # CONFIG_NL80211_TESTMODE=y # CONFIG_CFG80211_DEVELOPER_WARNINGS=y # CONFIG_CFG80211_REG_DEBUG=y +# CONFIG_CFG80211_INTERNAL_REGDB=y # See below for wext stuff CONFIG_LIB80211=m diff --git a/patches/35-fix-makefile-includes.patch b/patches/35-fix-makefile-includes.patch index 3211c71e0957..aa3dd92a1718 100644 --- a/patches/35-fix-makefile-includes.patch +++ b/patches/35-fix-makefile-includes.patch @@ -59,3 +59,13 @@ path the make process will search in the kernel tree for the headers. BRCMUTIL_OFILES := \ utils.o \ +--- a/net/wireless/Makefile ++++ b/net/wireless/Makefile +@@ -18,6 +18,6 @@ cfg80211-$(CONFIG_CFG80211_INTERNAL_REGD + ccflags-y += -D__CHECK_ENDIAN__ + + $(obj)/regdb.c: $(src)/db.txt $(src)/genregdb.awk +- @$(AWK) -f $(srctree)/$(src)/genregdb.awk < $< > $@ ++ @$(AWK) -f $(src)/genregdb.awk < $< > $@ + + clean-files := regdb.c diff --git a/scripts/admin-update.sh b/scripts/admin-update.sh index edd45d4073f4..061748c3c669 100755 --- a/scripts/admin-update.sh +++ b/scripts/admin-update.sh @@ -328,6 +328,10 @@ for i in $NET_DIRS; do rm -f net/$i/*.mod.c done +# Copy files needed for statically compiled regulatory rules database +cp $GIT_TREE/net/wireless/db.txt net/wireless/ +cp $GIT_TREE/net/wireless/genregdb.awk net/wireless/ + # net/bluetooth for i in $NET_BT_DIRS; do mkdir -p net/$i -- 2.30.2