From 5387d10b8a6a20814bcf2030f73ba08889fc2e29 Mon Sep 17 00:00:00 2001 From: kimocoder Date: Tue, 26 Jun 2018 10:57:18 +0200 Subject: [PATCH] Enabled more Makefile debug --- Makefile | 13 ++++++++++--- docs/kimocoder_Changelog.txt | 2 +- os_dep/linux/ioctl_cfg80211.c | 3 +++ os_dep/linux/os_intfs.c | 3 +++ 4 files changed, 17 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 11d28b0..e61e515 100755 --- a/Makefile +++ b/Makefile @@ -1,8 +1,8 @@ EXTRA_CFLAGS += $(USER_EXTRA_CFLAGS) EXTRA_CFLAGS += -O1 #EXTRA_CFLAGS += -O3 -#EXTRA_CFLAGS += -Wall -#EXTRA_CFLAGS += -Wextra +EXTRA_CFLAGS += -Wall +EXTRA_CFLAGS += -Wextra #EXTRA_CFLAGS += -Werror #EXTRA_CFLAGS += -pedantic #EXTRA_CFLAGS += -Wshadow -Wpointer-arith -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes @@ -13,7 +13,13 @@ EXTRA_CFLAGS += -Wno-unused-label EXTRA_CFLAGS += -Wno-unused-parameter EXTRA_CFLAGS += -Wno-unused-function EXTRA_CFLAGS += -Wno-unused -#EXTRA_CFLAGS += -Wno-uninitialized +EXTRA_CFLAGS += -Wno-date-time +EXTRA_CFLAGS += -Wno-misleading-indentation +EXTRA_CFLAGS += -Wno-uninitialized +# Relax some warnings from '-Wextra' so we won't get flooded with warnings +EXTRA_CFLAGS += -Wno-sign-compare +EXTRA_CFLAGS += -Wno-missing-field-initializers +EXTRA_CFLAGS += -Wno-type-limits GCC_VER_49 := $(shell echo `$(CC) -dumpversion | cut -f1-2 -d.` \>= 4.9 | bc ) ifeq ($(GCC_VER_49),1) @@ -45,6 +51,7 @@ CONFIG_PCI_HCI = n CONFIG_SDIO_HCI = n CONFIG_GSPI_HCI = n ########################## Features ########################### +CONFIG_NET_NS = y CONFIG_MP_INCLUDED = y CONFIG_POWER_SAVING = n CONFIG_USB_AUTOSUSPEND = n diff --git a/docs/kimocoder_Changelog.txt b/docs/kimocoder_Changelog.txt index 37a8820..b5a12d7 100644 --- a/docs/kimocoder_Changelog.txt +++ b/docs/kimocoder_Changelog.txt @@ -3,7 +3,6 @@ ---------------------------------------------------------------------------------------- TODO: - - Add support for namespaces (NS) - Fix count for frames in RadioTap header (add to stats) - Place signal quality and per antenna rssi into radiotap header - Calculate signal quality in the monitor mode @@ -24,6 +23,7 @@ [2018.06.26] - Enable TX queue in the monitor mode + - Add support for namespaces (CONFIG_NET_NS) [2018.06.25] - Fix injected frames drop diff --git a/os_dep/linux/ioctl_cfg80211.c b/os_dep/linux/ioctl_cfg80211.c index fb033e5..daf80aa 100644 --- a/os_dep/linux/ioctl_cfg80211.c +++ b/os_dep/linux/ioctl_cfg80211.c @@ -7188,6 +7188,9 @@ static void rtw_cfg80211_preinit_wiphy(_adapter *adapter, struct wiphy *wiphy) #endif #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 38) && LINUX_VERSION_CODE < KERNEL_VERSION(3, 0, 0)) +#if defined(CONFIG_NET_NS) + wiphy->flags |= WIPHY_FLAG_NETNS_OK; +#endif //CONFIG_NET_NS wiphy->flags |= WIPHY_FLAG_SUPPORTS_SEPARATE_DEFAULT_KEYS; #endif diff --git a/os_dep/linux/os_intfs.c b/os_dep/linux/os_intfs.c index 2edd23e..b20ba44 100644 --- a/os_dep/linux/os_intfs.c +++ b/os_dep/linux/os_intfs.c @@ -1605,6 +1605,9 @@ int rtw_os_ndev_register(_adapter *adapter, const char *name) rtw_init_netdev_name(ndev, name); _rtw_memcpy(ndev->dev_addr, adapter_mac_addr(adapter), ETH_ALEN); +#if defined(CONFIG_NET_NS) + dev_net_set(ndev, wiphy_net(adapter_to_wiphy(adapter))); +#endif //defined(CONFIG_NET_NS) /* Tell the network stack we exist */