From e07407ac12794febef4bc9f716a874e0815c9bf6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20=C5=A0tetiar?= Date: Sat, 3 Aug 2019 22:16:11 +0200 Subject: [PATCH] mt7603: fix build with CONFIG_KERNEL_DYNAMIC_DEBUG=y MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When building with CONFIG_KERNEL_DYNAMIC_DEBUG=y enabled, the build fails with following error: :0:37: error: redeclaration of enumerator 'IEEE80211_HW_REPORTS_TX_ACK_STATUS' :0:37: note: in definition of macro 'IEEE80211_HW_TX_STATUS_NO_AMPDU_LEN' In file included from mt76-2019-07-22-75656a45/mt7603/../mt76.h:27:0, from mt76-2019-07-22-75656a45/mt7603/mt7603.h:8, from mt76-2019-07-22-75656a45/mt7603/pci.c:7: usr/include/mac80211/net/mac80211.h:2293:2: note: previous definition of 'IEEE80211_HW_REPORTS_TX_ACK_STATUS' was here IEEE80211_HW_REPORTS_TX_ACK_STATUS, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ This is caused by failing check-cc-enum build check due to the following compile error: ./include/linux/dynamic_debug.h:77:14: error: 'KBUILD_MODNAME' undeclared (first use in this function); did you mean 'KERN_NODENAME'? .modname = KBUILD_MODNAME, \ So this patch adds missing KBUILD_MODNAME variable to CHECK_CC_ENUM_FLAGS in order to make check-cc-enum build check compile again. Fixes: c4e4982fa923 ("mt7603: set IEEE80211_HW_TX_STATUS_NO_AMPDU_LEN") Cc: Felix Fietkau Reported-by: Joan Moreau Signed-off-by: Petr Štetiar --- mt7603/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/mt7603/Makefile b/mt7603/Makefile index 46e3df56..29f896a5 100644 --- a/mt7603/Makefile +++ b/mt7603/Makefile @@ -1,6 +1,7 @@ EXTRA_CFLAGS += -Werror -DCONFIG_MT76_LEDS CHECK_CC_ENUM_FLAGS = $(NOSTDINC_FLAGS) $(LINUXINCLUDE) $(KBUILD_CPPFLAGS) $(KBUILD_CFLAGS) +CHECK_CC_ENUM_FLAGS += -DKBUILD_MODNAME='"mt7603e"' check-cc-enum = $(call try-run, echo "int v = $(1);" | $(CC) -Werror $(CHECK_CC_ENUM_FLAGS) $(2) -c -x c - -o "$$TMP",y,n) # backwards compatibility hack