parent
1a7a204145
commit
2b60e6e95c
|
|
@ -0,0 +1,801 @@
|
||||||
|
From 2ebe60c979204b804a5ea70e1dfb77331c7297ac Mon Sep 17 00:00:00 2001
|
||||||
|
From: Patrick Walther <patrick.walther@netmodule.com>
|
||||||
|
Date: Wed, 27 May 2020 19:18:11 +0200
|
||||||
|
Subject: [PATCH] FIX: [mac80211] backport of build patches from openwrt
|
||||||
|
|
||||||
|
---
|
||||||
|
Kconfig.local | 111 --------------------
|
||||||
|
Kconfig.sources | 3 -
|
||||||
|
Makefile | 116 +++++++++++----------
|
||||||
|
Makefile.kernel | 2 -
|
||||||
|
Makefile.real | 9 +-
|
||||||
|
backport-include/linux/kconfig.h | 5 +
|
||||||
|
backport-include/linux/rfkill.h | 6 ++
|
||||||
|
compat/main.c | 25 -----
|
||||||
|
drivers/net/wireless/broadcom/b43/Kconfig | 12 +--
|
||||||
|
drivers/net/wireless/broadcom/b43/main.c | 4 +-
|
||||||
|
drivers/net/wireless/broadcom/b43legacy/Kconfig | 8 +-
|
||||||
|
drivers/net/wireless/broadcom/b43legacy/main.c | 4 +-
|
||||||
|
drivers/net/wireless/broadcom/brcm80211/Kconfig | 2 +-
|
||||||
|
.../wireless/broadcom/brcm80211/brcmsmac/Makefile | 2 +-
|
||||||
|
.../net/wireless/broadcom/brcm80211/brcmsmac/led.h | 2 +-
|
||||||
|
drivers/net/wireless/intel/ipw2x00/ipw2200.c | 18 ++--
|
||||||
|
kconf/Makefile | 4 +-
|
||||||
|
kconf/conf.c | 30 +-----
|
||||||
|
kconf/confdata.c | 4 +-
|
||||||
|
local-symbols | 37 -------
|
||||||
|
net/wireless/Kconfig | 8 +-
|
||||||
|
21 files changed, 114 insertions(+), 298 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/Kconfig.local b/Kconfig.local
|
||||||
|
index 0b3e89c..d5a218a 100644
|
||||||
|
--- a/Kconfig.local
|
||||||
|
+++ b/Kconfig.local
|
||||||
|
@@ -1240,117 +1240,6 @@ config BACKPORTED_USB_NET_CH9200
|
||||||
|
config BACKPORTED_USB_NET_AQC111
|
||||||
|
tristate
|
||||||
|
default USB_NET_AQC111
|
||||||
|
-config BACKPORTED_SSB_POSSIBLE
|
||||||
|
- tristate
|
||||||
|
- default SSB_POSSIBLE
|
||||||
|
-config BACKPORTED_SSB
|
||||||
|
- tristate
|
||||||
|
- default SSB
|
||||||
|
-config BACKPORTED_SSB_SPROM
|
||||||
|
- tristate
|
||||||
|
- default SSB_SPROM
|
||||||
|
-config BACKPORTED_SSB_BLOCKIO
|
||||||
|
- tristate
|
||||||
|
- default SSB_BLOCKIO
|
||||||
|
-config BACKPORTED_SSB_PCIHOST_POSSIBLE
|
||||||
|
- tristate
|
||||||
|
- default SSB_PCIHOST_POSSIBLE
|
||||||
|
-config BACKPORTED_SSB_PCIHOST
|
||||||
|
- tristate
|
||||||
|
- default SSB_PCIHOST
|
||||||
|
-config BACKPORTED_SSB_B43_PCI_BRIDGE
|
||||||
|
- tristate
|
||||||
|
- default SSB_B43_PCI_BRIDGE
|
||||||
|
-config BACKPORTED_SSB_PCMCIAHOST_POSSIBLE
|
||||||
|
- tristate
|
||||||
|
- default SSB_PCMCIAHOST_POSSIBLE
|
||||||
|
-config BACKPORTED_SSB_PCMCIAHOST
|
||||||
|
- tristate
|
||||||
|
- default SSB_PCMCIAHOST
|
||||||
|
-config BACKPORTED_SSB_SDIOHOST_POSSIBLE
|
||||||
|
- tristate
|
||||||
|
- default SSB_SDIOHOST_POSSIBLE
|
||||||
|
-config BACKPORTED_SSB_SDIOHOST
|
||||||
|
- tristate
|
||||||
|
- default SSB_SDIOHOST
|
||||||
|
-config BACKPORTED_SSB_HOST_SOC
|
||||||
|
- tristate
|
||||||
|
- default SSB_HOST_SOC
|
||||||
|
-config BACKPORTED_SSB_SERIAL
|
||||||
|
- tristate
|
||||||
|
- default SSB_SERIAL
|
||||||
|
-config BACKPORTED_SSB_DRIVER_PCICORE_POSSIBLE
|
||||||
|
- tristate
|
||||||
|
- default SSB_DRIVER_PCICORE_POSSIBLE
|
||||||
|
-config BACKPORTED_SSB_DRIVER_PCICORE
|
||||||
|
- tristate
|
||||||
|
- default SSB_DRIVER_PCICORE
|
||||||
|
-config BACKPORTED_SSB_PCICORE_HOSTMODE
|
||||||
|
- tristate
|
||||||
|
- default SSB_PCICORE_HOSTMODE
|
||||||
|
-config BACKPORTED_SSB_DRIVER_MIPS
|
||||||
|
- tristate
|
||||||
|
- default SSB_DRIVER_MIPS
|
||||||
|
-config BACKPORTED_SSB_SFLASH
|
||||||
|
- tristate
|
||||||
|
- default SSB_SFLASH
|
||||||
|
-config BACKPORTED_SSB_EMBEDDED
|
||||||
|
- tristate
|
||||||
|
- default SSB_EMBEDDED
|
||||||
|
-config BACKPORTED_SSB_DRIVER_EXTIF
|
||||||
|
- tristate
|
||||||
|
- default SSB_DRIVER_EXTIF
|
||||||
|
-config BACKPORTED_SSB_DRIVER_GIGE
|
||||||
|
- tristate
|
||||||
|
- default SSB_DRIVER_GIGE
|
||||||
|
-config BACKPORTED_SSB_DRIVER_GPIO
|
||||||
|
- tristate
|
||||||
|
- default SSB_DRIVER_GPIO
|
||||||
|
-config BACKPORTED_BCMA_POSSIBLE
|
||||||
|
- tristate
|
||||||
|
- default BCMA_POSSIBLE
|
||||||
|
-config BACKPORTED_BCMA
|
||||||
|
- tristate
|
||||||
|
- default BCMA
|
||||||
|
-config BACKPORTED_BCMA_BLOCKIO
|
||||||
|
- tristate
|
||||||
|
- default BCMA_BLOCKIO
|
||||||
|
-config BACKPORTED_BCMA_HOST_PCI_POSSIBLE
|
||||||
|
- tristate
|
||||||
|
- default BCMA_HOST_PCI_POSSIBLE
|
||||||
|
-config BACKPORTED_BCMA_HOST_PCI
|
||||||
|
- tristate
|
||||||
|
- default BCMA_HOST_PCI
|
||||||
|
-config BACKPORTED_BCMA_HOST_SOC
|
||||||
|
- tristate
|
||||||
|
- default BCMA_HOST_SOC
|
||||||
|
-config BACKPORTED_BCMA_DRIVER_PCI
|
||||||
|
- tristate
|
||||||
|
- default BCMA_DRIVER_PCI
|
||||||
|
-config BACKPORTED_BCMA_DRIVER_PCI_HOSTMODE
|
||||||
|
- tristate
|
||||||
|
- default BCMA_DRIVER_PCI_HOSTMODE
|
||||||
|
-config BACKPORTED_BCMA_DRIVER_MIPS
|
||||||
|
- tristate
|
||||||
|
- default BCMA_DRIVER_MIPS
|
||||||
|
-config BACKPORTED_BCMA_PFLASH
|
||||||
|
- tristate
|
||||||
|
- default BCMA_PFLASH
|
||||||
|
-config BACKPORTED_BCMA_SFLASH
|
||||||
|
- tristate
|
||||||
|
- default BCMA_SFLASH
|
||||||
|
-config BACKPORTED_BCMA_NFLASH
|
||||||
|
- tristate
|
||||||
|
- default BCMA_NFLASH
|
||||||
|
-config BACKPORTED_BCMA_DRIVER_GMAC_CMN
|
||||||
|
- tristate
|
||||||
|
- default BCMA_DRIVER_GMAC_CMN
|
||||||
|
-config BACKPORTED_BCMA_DRIVER_GPIO
|
||||||
|
- tristate
|
||||||
|
- default BCMA_DRIVER_GPIO
|
||||||
|
-config BACKPORTED_BCMA_DEBUG
|
||||||
|
- tristate
|
||||||
|
- default BCMA_DEBUG
|
||||||
|
config BACKPORTED_USB_ACM
|
||||||
|
tristate
|
||||||
|
default USB_ACM
|
||||||
|
diff --git a/Kconfig.sources b/Kconfig.sources
|
||||||
|
index 5fb4478..347f1c5 100644
|
||||||
|
--- a/Kconfig.sources
|
||||||
|
+++ b/Kconfig.sources
|
||||||
|
@@ -7,9 +7,6 @@ source "$BACKPORT_DIR/net/mac80211/Kconfig"
|
||||||
|
source "$BACKPORT_DIR/drivers/net/wireless/Kconfig"
|
||||||
|
source "$BACKPORT_DIR/drivers/net/usb/Kconfig"
|
||||||
|
|
||||||
|
-source "$BACKPORT_DIR/drivers/ssb/Kconfig"
|
||||||
|
-source "$BACKPORT_DIR/drivers/bcma/Kconfig"
|
||||||
|
-
|
||||||
|
source "$BACKPORT_DIR/drivers/usb/class/Kconfig"
|
||||||
|
|
||||||
|
source "$BACKPORT_DIR/drivers/staging/Kconfig"
|
||||||
|
diff --git a/Makefile b/Makefile
|
||||||
|
index ee7df4b..79e5fab 100644
|
||||||
|
--- a/Makefile
|
||||||
|
+++ b/Makefile
|
||||||
|
@@ -2,10 +2,10 @@
|
||||||
|
# Makefile for the output source package
|
||||||
|
#
|
||||||
|
|
||||||
|
-ifeq ($(KERNELRELEASE),)
|
||||||
|
+ifeq ($(KERNELVERSION),)
|
||||||
|
|
||||||
|
MAKEFLAGS += --no-print-directory
|
||||||
|
-SHELL := /bin/bash
|
||||||
|
+SHELL := /usr/bin/env bash
|
||||||
|
BACKPORT_DIR := $(shell pwd)
|
||||||
|
|
||||||
|
KMODDIR ?= updates
|
||||||
|
@@ -19,6 +19,7 @@ KLIB_BUILD ?= $(KLIB)/build/
|
||||||
|
KERNEL_CONFIG := $(KLIB_BUILD)/.config
|
||||||
|
KERNEL_MAKEFILE := $(KLIB_BUILD)/Makefile
|
||||||
|
CONFIG_MD5 := $(shell md5sum $(KERNEL_CONFIG) 2>/dev/null | sed 's/\s.*//')
|
||||||
|
+STAMP_KERNEL_CONFIG := .kernel_config_md5_$(CONFIG_MD5)
|
||||||
|
|
||||||
|
export KLIB KLIB_BUILD BACKPORT_DIR KMODDIR KMODPATH_ARG
|
||||||
|
|
||||||
|
@@ -36,7 +37,8 @@ mrproper:
|
||||||
|
@rm -f .kernel_config_md5 Kconfig.versions Kconfig.kernel
|
||||||
|
@rm -f backport-include/backport/autoconf.h
|
||||||
|
|
||||||
|
-.DEFAULT:
|
||||||
|
+.SILENT: $(STAMP_KERNEL_CONFIG)
|
||||||
|
+$(STAMP_KERNEL_CONFIG):
|
||||||
|
@set -e ; test -f local-symbols || ( \
|
||||||
|
echo "/--------------" ;\
|
||||||
|
echo "| You shouldn't run make in the backports tree, but only in" ;\
|
||||||
|
@@ -60,58 +62,62 @@ mrproper:
|
||||||
|
echo "| (that isn't currently running.)" ;\
|
||||||
|
echo "\\--" ;\
|
||||||
|
false)
|
||||||
|
- @set -e ; if [ "$$(cat .kernel_config_md5 2>/dev/null)" != "$(CONFIG_MD5)" ] ;\
|
||||||
|
- then \
|
||||||
|
- echo -n "Generating local configuration database from kernel ..." ;\
|
||||||
|
- grep -v -f local-symbols $(KERNEL_CONFIG) | grep = | ( \
|
||||||
|
- while read l ; do \
|
||||||
|
- if [ "$${l:0:7}" != "CONFIG_" ] ; then \
|
||||||
|
- continue ;\
|
||||||
|
- fi ;\
|
||||||
|
- l=$${l:7} ;\
|
||||||
|
- n=$${l%%=*} ;\
|
||||||
|
- v=$${l#*=} ;\
|
||||||
|
- if [ "$$v" = "m" ] ; then \
|
||||||
|
- echo config $$n ;\
|
||||||
|
- echo ' tristate' ;\
|
||||||
|
- elif [ "$$v" = "y" ] ; then \
|
||||||
|
- echo config $$n ;\
|
||||||
|
- echo ' bool' ;\
|
||||||
|
- else \
|
||||||
|
- continue ;\
|
||||||
|
- fi ;\
|
||||||
|
- echo " default $$v" ;\
|
||||||
|
- echo "" ;\
|
||||||
|
- done \
|
||||||
|
- ) > Kconfig.kernel ;\
|
||||||
|
- kver=$$($(MAKE) --no-print-directory -C $(KLIB_BUILD) kernelversion | \
|
||||||
|
- sed 's/^\(\([3-5]\|2\.6\)\.[0-9]\+\).*/\1/;t;d') ;\
|
||||||
|
- test "$$kver" != "" || echo "Kernel version parse failed!" ;\
|
||||||
|
- test "$$kver" != "" ;\
|
||||||
|
- kvers="$$(seq 14 39 | sed 's/^/2.6./')" ;\
|
||||||
|
- kvers="$$kvers $$(seq 0 19 | sed 's/^/3./')" ;\
|
||||||
|
- kvers="$$kvers $$(seq 0 20 | sed 's/^/4./')" ;\
|
||||||
|
- kvers="$$kvers $$(seq 0 99 | sed 's/^/5./')" ;\
|
||||||
|
- print=0 ;\
|
||||||
|
- for v in $$kvers ; do \
|
||||||
|
- if [ "$$print" = "1" ] ; then \
|
||||||
|
- echo config KERNEL_$$(echo $$v | tr . _) ;\
|
||||||
|
- echo " def_bool y" ;\
|
||||||
|
- fi ;\
|
||||||
|
- if [ "$$v" = "$$kver" ] ; then print=1 ; fi ;\
|
||||||
|
- done > Kconfig.versions ;\
|
||||||
|
- # RHEL as well, sadly we need to grep for it ;\
|
||||||
|
- RHEL_MAJOR=$$(grep '^RHEL_MAJOR' $(KERNEL_MAKEFILE) | \
|
||||||
|
- sed 's/.*=\s*\([0-9]*\)/\1/;t;d') ;\
|
||||||
|
- RHEL_MINOR=$$(grep '^RHEL_MINOR' $(KERNEL_MAKEFILE) | \
|
||||||
|
- sed 's/.*=\s*\([0-9]*\)/\1/;t;d') ;\
|
||||||
|
- for v in $$(seq 0 $$RHEL_MINOR) ; do \
|
||||||
|
- echo config BACKPORT_RHEL_KERNEL_$${RHEL_MAJOR}_$$v ;\
|
||||||
|
- echo " def_bool y" ;\
|
||||||
|
- done >> Kconfig.versions ;\
|
||||||
|
- echo " done." ;\
|
||||||
|
- fi ;\
|
||||||
|
- echo "$(CONFIG_MD5)" > .kernel_config_md5
|
||||||
|
+ @rm -f .kernel_config_md5_*
|
||||||
|
+ @touch $@
|
||||||
|
+
|
||||||
|
+Kconfig.kernel: $(STAMP_KERNEL_CONFIG) local-symbols
|
||||||
|
+ @printf "Generating local configuration database from kernel ..."
|
||||||
|
+ @grep -v -f local-symbols $(KERNEL_CONFIG) | grep = | ( \
|
||||||
|
+ while read l ; do \
|
||||||
|
+ if [ "$${l:0:7}" != "CONFIG_" ] ; then \
|
||||||
|
+ continue ;\
|
||||||
|
+ fi ;\
|
||||||
|
+ l=$${l:7} ;\
|
||||||
|
+ n=$${l%%=*} ;\
|
||||||
|
+ v=$${l#*=} ;\
|
||||||
|
+ if [ "$$v" = "m" ] ; then \
|
||||||
|
+ echo config $$n ;\
|
||||||
|
+ echo ' tristate' ;\
|
||||||
|
+ elif [ "$$v" = "y" ] ; then \
|
||||||
|
+ echo config $$n ;\
|
||||||
|
+ echo ' bool' ;\
|
||||||
|
+ else \
|
||||||
|
+ continue ;\
|
||||||
|
+ fi ;\
|
||||||
|
+ echo " default $$v" ;\
|
||||||
|
+ echo "" ;\
|
||||||
|
+ done \
|
||||||
|
+ ) > $@
|
||||||
|
+ @echo " done."
|
||||||
|
+
|
||||||
|
+Kconfig.versions: Kconfig.kernel
|
||||||
|
+ @kver=$$($(MAKE) --no-print-directory -C $(KLIB_BUILD) kernelversion | \
|
||||||
|
+ sed 's/^\(\([3-5]\|2\.6\)\.[0-9]\+\).*/\1/;t;d') ;\
|
||||||
|
+ test "$$kver" != "" || echo "Kernel version parse failed!" ;\
|
||||||
|
+ test "$$kver" != "" ;\
|
||||||
|
+ kvers="$$(seq 14 39 | sed 's/^/2.6./')" ;\
|
||||||
|
+ kvers="$$kvers $$(seq 0 19 | sed 's/^/3./')" ;\
|
||||||
|
+ kvers="$$kvers $$(seq 0 20 | sed 's/^/4./')" ;\
|
||||||
|
+ kvers="$$kvers $$(seq 0 99 | sed 's/^/5./')" ;\
|
||||||
|
+ print=0 ;\
|
||||||
|
+ for v in $$kvers ; do \
|
||||||
|
+ if [ "$$print" = "1" ] ; then \
|
||||||
|
+ echo config KERNEL_$$(echo $$v | tr . _) ;\
|
||||||
|
+ echo " def_bool y" ;\
|
||||||
|
+ fi ;\
|
||||||
|
+ if [ "$$v" = "$$kver" ] ; then print=1 ; fi ;\
|
||||||
|
+ done > $@
|
||||||
|
+ @RHEL_MAJOR=$$(grep '^RHEL_MAJOR' $(KERNEL_MAKEFILE) | \
|
||||||
|
+ sed 's/.*=\s*\([0-9]*\)/\1/;t;d') ;\
|
||||||
|
+ RHEL_MINOR=$$(grep '^RHEL_MINOR' $(KERNEL_MAKEFILE) | \
|
||||||
|
+ sed 's/.*=\s*\([0-9]*\)/\1/;t;d') ;\
|
||||||
|
+ for v in $$(seq 0 $$RHEL_MINOR) ; do \
|
||||||
|
+ echo config BACKPORT_RHEL_KERNEL_$${RHEL_MAJOR}_$$v ;\
|
||||||
|
+ echo " def_bool y" ;\
|
||||||
|
+ done >> $@
|
||||||
|
+
|
||||||
|
+.DEFAULT:
|
||||||
|
+ @$(MAKE) Kconfig.versions
|
||||||
|
@$(MAKE) -f Makefile.real "$@"
|
||||||
|
|
||||||
|
.PHONY: defconfig-help
|
||||||
|
diff --git a/Makefile.kernel b/Makefile.kernel
|
||||||
|
index 5c96697..23b2688 100644
|
||||||
|
--- a/Makefile.kernel
|
||||||
|
+++ b/Makefile.kernel
|
||||||
|
@@ -40,8 +40,6 @@ obj-y += compat/
|
||||||
|
obj-$(CPTCFG_CFG80211) += net/wireless/
|
||||||
|
obj-$(CPTCFG_MAC80211) += net/mac80211/
|
||||||
|
obj-$(CPTCFG_WLAN) += drivers/net/wireless/
|
||||||
|
-obj-$(CPTCFG_SSB) += drivers/ssb/
|
||||||
|
-obj-$(CPTCFG_BCMA) += drivers/bcma/
|
||||||
|
obj-$(CPTCFG_USB_NET_RNDIS_WLAN) += drivers/net/usb/
|
||||||
|
|
||||||
|
obj-$(CPTCFG_USB_WDM) += drivers/usb/class/
|
||||||
|
diff --git a/Makefile.real b/Makefile.real
|
||||||
|
index 6550802..d0a8c20 100644
|
||||||
|
--- a/Makefile.real
|
||||||
|
+++ b/Makefile.real
|
||||||
|
@@ -59,7 +59,7 @@ defconfig-%::
|
||||||
|
|
||||||
|
backport-include/backport/autoconf.h: .config Kconfig.versions Kconfig.kernel
|
||||||
|
@$(MAKE) oldconfig
|
||||||
|
- @echo -n "Building backport-include/backport/autoconf.h ..."
|
||||||
|
+ @printf "Building backport-include/backport/autoconf.h ..."
|
||||||
|
@grep -f local-symbols .config | ( \
|
||||||
|
echo "#ifndef COMPAT_AUTOCONF_INCLUDED" ;\
|
||||||
|
echo "#define COMPAT_AUTOCONF_INCLUDED" ;\
|
||||||
|
@@ -80,7 +80,12 @@ backport-include/backport/autoconf.h: .config Kconfig.versions Kconfig.kernel
|
||||||
|
esac ;\
|
||||||
|
done ;\
|
||||||
|
echo "#endif /* COMPAT_AUTOCONF_INCLUDED */" ;\
|
||||||
|
- ) > backport-include/backport/autoconf.h
|
||||||
|
+ ) > $@.new
|
||||||
|
+ @if cmp -s $@ $@.new; then \
|
||||||
|
+ rm -f $@.new; \
|
||||||
|
+ else \
|
||||||
|
+ mv $@.new $@; \
|
||||||
|
+ fi
|
||||||
|
@echo " done."
|
||||||
|
|
||||||
|
.PHONY: modules
|
||||||
|
diff --git a/backport-include/linux/kconfig.h b/backport-include/linux/kconfig.h
|
||||||
|
index d1faad9..a0bc8c4 100644
|
||||||
|
--- a/backport-include/linux/kconfig.h
|
||||||
|
+++ b/backport-include/linux/kconfig.h
|
||||||
|
@@ -5,6 +5,8 @@
|
||||||
|
#include_next <linux/kconfig.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3,4,0)
|
||||||
|
+
|
||||||
|
#ifndef __ARG_PLACEHOLDER_1
|
||||||
|
#define __ARG_PLACEHOLDER_1 0,
|
||||||
|
#define config_enabled(cfg) _config_enabled(cfg)
|
||||||
|
@@ -16,6 +18,7 @@
|
||||||
|
* 3.1 - 3.3 had a broken version of this, so undef
|
||||||
|
* (they didn't have __ARG_PLACEHOLDER_1)
|
||||||
|
*/
|
||||||
|
+
|
||||||
|
#undef IS_ENABLED
|
||||||
|
#define IS_ENABLED(option) \
|
||||||
|
(config_enabled(option) || config_enabled(option##_MODULE))
|
||||||
|
@@ -31,6 +34,8 @@
|
||||||
|
#undef IS_BUILTIN
|
||||||
|
#define IS_BUILTIN(option) config_enabled(option)
|
||||||
|
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
#ifndef IS_REACHABLE
|
||||||
|
/*
|
||||||
|
* IS_REACHABLE(CONFIG_FOO) evaluates to 1 if the currently compiled
|
||||||
|
diff --git a/backport-include/linux/rfkill.h b/backport-include/linux/rfkill.h
|
||||||
|
index 99015af..0193f96 100644
|
||||||
|
--- a/backport-include/linux/rfkill.h
|
||||||
|
+++ b/backport-include/linux/rfkill.h
|
||||||
|
@@ -2,6 +2,12 @@
|
||||||
|
#define __COMPAT_RFKILL_H
|
||||||
|
#include <linux/version.h>
|
||||||
|
|
||||||
|
+#undef CONFIG_RFKILL
|
||||||
|
+#undef CONFIG_RFKILL_FULL
|
||||||
|
+#undef CONFIG_RFKILL_LEDS
|
||||||
|
+#undef CONFIG_RFKILL_MODULE
|
||||||
|
+#undef CONFIG_RFKILL_FULL_MODULE
|
||||||
|
+
|
||||||
|
#if LINUX_VERSION_IS_GEQ(3,10,0)
|
||||||
|
#include_next <linux/rfkill.h>
|
||||||
|
#else
|
||||||
|
diff --git a/compat/main.c b/compat/main.c
|
||||||
|
index 0bf0420..740bf09 100644
|
||||||
|
--- a/compat/main.c
|
||||||
|
+++ b/compat/main.c
|
||||||
|
@@ -20,31 +20,6 @@ MODULE_LICENSE("GPL");
|
||||||
|
#error "You need a CPTCFG_VERSION"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
-static char *backported_kernel_name = CPTCFG_KERNEL_NAME;
|
||||||
|
-
|
||||||
|
-module_param(backported_kernel_name, charp, 0400);
|
||||||
|
-MODULE_PARM_DESC(backported_kernel_name,
|
||||||
|
- "The kernel tree name that was used for this backport (" CPTCFG_KERNEL_NAME ")");
|
||||||
|
-
|
||||||
|
-#ifdef BACKPORTS_GIT_TRACKED
|
||||||
|
-static char *backports_tracker_id = BACKPORTS_GIT_TRACKED;
|
||||||
|
-module_param(backports_tracker_id, charp, 0400);
|
||||||
|
-MODULE_PARM_DESC(backports_tracker_id,
|
||||||
|
- "The version of the tree containing this backport (" BACKPORTS_GIT_TRACKED ")");
|
||||||
|
-#else
|
||||||
|
-static char *backported_kernel_version = CPTCFG_KERNEL_VERSION;
|
||||||
|
-static char *backports_version = CPTCFG_VERSION;
|
||||||
|
-
|
||||||
|
-module_param(backported_kernel_version, charp, 0400);
|
||||||
|
-MODULE_PARM_DESC(backported_kernel_version,
|
||||||
|
- "The kernel version that was used for this backport (" CPTCFG_KERNEL_VERSION ")");
|
||||||
|
-
|
||||||
|
-module_param(backports_version, charp, 0400);
|
||||||
|
-MODULE_PARM_DESC(backports_version,
|
||||||
|
- "The git version of the backports tree used to generate this backport (" CPTCFG_VERSION ")");
|
||||||
|
-
|
||||||
|
-#endif
|
||||||
|
-
|
||||||
|
void backport_dependency_symbol(void)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
diff --git a/drivers/net/wireless/broadcom/b43/Kconfig b/drivers/net/wireless/broadcom/b43/Kconfig
|
||||||
|
index 07e67e8..b8f1262 100644
|
||||||
|
--- a/drivers/net/wireless/broadcom/b43/Kconfig
|
||||||
|
+++ b/drivers/net/wireless/broadcom/b43/Kconfig
|
||||||
|
@@ -63,21 +63,21 @@ endchoice
|
||||||
|
config B43_PCI_AUTOSELECT
|
||||||
|
bool
|
||||||
|
depends on B43 && SSB_PCIHOST_POSSIBLE
|
||||||
|
- select SSB_PCIHOST
|
||||||
|
- select SSB_B43_PCI_BRIDGE
|
||||||
|
+ depends on SSB_PCIHOST
|
||||||
|
+ depends on SSB_B43_PCI_BRIDGE
|
||||||
|
default y
|
||||||
|
|
||||||
|
# Auto-select SSB PCICORE driver, if possible
|
||||||
|
config B43_PCICORE_AUTOSELECT
|
||||||
|
bool
|
||||||
|
depends on B43 && SSB_DRIVER_PCICORE_POSSIBLE
|
||||||
|
- select SSB_DRIVER_PCICORE
|
||||||
|
+ depends on SSB_DRIVER_PCICORE
|
||||||
|
default y
|
||||||
|
|
||||||
|
config B43_SDIO
|
||||||
|
bool "Broadcom 43xx SDIO device support"
|
||||||
|
depends on B43 && B43_SSB && SSB_SDIOHOST_POSSIBLE
|
||||||
|
- select SSB_SDIOHOST
|
||||||
|
+ depends on SSB_SDIOHOST
|
||||||
|
---help---
|
||||||
|
Broadcom 43xx device support for Soft-MAC SDIO devices.
|
||||||
|
|
||||||
|
@@ -96,13 +96,13 @@ config B43_SDIO
|
||||||
|
config B43_BCMA_PIO
|
||||||
|
bool
|
||||||
|
depends on B43 && B43_BCMA
|
||||||
|
- select BCMA_BLOCKIO
|
||||||
|
+ depends on BCMA_BLOCKIO
|
||||||
|
default y
|
||||||
|
|
||||||
|
config B43_PIO
|
||||||
|
bool
|
||||||
|
depends on B43 && B43_SSB
|
||||||
|
- select SSB_BLOCKIO
|
||||||
|
+ depends on SSB_BLOCKIO
|
||||||
|
default y
|
||||||
|
|
||||||
|
config B43_PHY_G
|
||||||
|
diff --git a/drivers/net/wireless/broadcom/b43/main.c b/drivers/net/wireless/broadcom/b43/main.c
|
||||||
|
index 0c96714..99d0b4a 100644
|
||||||
|
--- a/drivers/net/wireless/broadcom/b43/main.c
|
||||||
|
+++ b/drivers/net/wireless/broadcom/b43/main.c
|
||||||
|
@@ -2851,7 +2851,7 @@ static struct ssb_device *b43_ssb_gpio_dev(struct b43_wldev *dev)
|
||||||
|
{
|
||||||
|
struct ssb_bus *bus = dev->dev->sdev->bus;
|
||||||
|
|
||||||
|
-#ifdef CPTCFG_SSB_DRIVER_PCICORE
|
||||||
|
+#ifdef CONFIG_SSB_DRIVER_PCICORE
|
||||||
|
return (bus->chipco.dev ? bus->chipco.dev : bus->pcicore.dev);
|
||||||
|
#else
|
||||||
|
return bus->chipco.dev;
|
||||||
|
@@ -4868,7 +4868,7 @@ static int b43_wireless_core_init(struct b43_wldev *dev)
|
||||||
|
}
|
||||||
|
if (sprom->boardflags_lo & B43_BFL_XTAL_NOSLOW)
|
||||||
|
hf |= B43_HF_DSCRQ; /* Disable slowclock requests from ucode. */
|
||||||
|
-#if defined(CPTCFG_B43_SSB) && defined(CPTCFG_SSB_DRIVER_PCICORE)
|
||||||
|
+#if defined(CPTCFG_B43_SSB) && defined(CONFIG_SSB_DRIVER_PCICORE)
|
||||||
|
if (dev->dev->bus_type == B43_BUS_SSB &&
|
||||||
|
dev->dev->sdev->bus->bustype == SSB_BUSTYPE_PCI &&
|
||||||
|
dev->dev->sdev->bus->pcicore.dev->id.revision <= 10)
|
||||||
|
diff --git a/drivers/net/wireless/broadcom/b43legacy/Kconfig b/drivers/net/wireless/broadcom/b43legacy/Kconfig
|
||||||
|
index 8205796..8a75208 100644
|
||||||
|
--- a/drivers/net/wireless/broadcom/b43legacy/Kconfig
|
||||||
|
+++ b/drivers/net/wireless/broadcom/b43legacy/Kconfig
|
||||||
|
@@ -3,7 +3,7 @@ config B43LEGACY
|
||||||
|
tristate "Broadcom 43xx-legacy wireless support (mac80211 stack)"
|
||||||
|
depends on m
|
||||||
|
depends on SSB_POSSIBLE && MAC80211 && HAS_DMA
|
||||||
|
- select SSB
|
||||||
|
+ depends on SSB
|
||||||
|
depends on FW_LOADER
|
||||||
|
---help---
|
||||||
|
b43legacy is a driver for 802.11b devices from Broadcom (BCM4301 and
|
||||||
|
@@ -25,15 +25,15 @@ config B43LEGACY
|
||||||
|
config B43LEGACY_PCI_AUTOSELECT
|
||||||
|
bool
|
||||||
|
depends on B43LEGACY && SSB_PCIHOST_POSSIBLE
|
||||||
|
- select SSB_PCIHOST
|
||||||
|
- select SSB_B43_PCI_BRIDGE
|
||||||
|
+ depends on SSB_PCIHOST
|
||||||
|
+ depends on SSB_B43_PCI_BRIDGE
|
||||||
|
default y
|
||||||
|
|
||||||
|
# Auto-select SSB PCICORE driver, if possible
|
||||||
|
config B43LEGACY_PCICORE_AUTOSELECT
|
||||||
|
bool
|
||||||
|
depends on B43LEGACY && SSB_DRIVER_PCICORE_POSSIBLE
|
||||||
|
- select SSB_DRIVER_PCICORE
|
||||||
|
+ depends on SSB_DRIVER_PCICORE
|
||||||
|
default y
|
||||||
|
|
||||||
|
# LED support
|
||||||
|
diff --git a/drivers/net/wireless/broadcom/b43legacy/main.c b/drivers/net/wireless/broadcom/b43legacy/main.c
|
||||||
|
index fef1686..cd8058b 100644
|
||||||
|
--- a/drivers/net/wireless/broadcom/b43legacy/main.c
|
||||||
|
+++ b/drivers/net/wireless/broadcom/b43legacy/main.c
|
||||||
|
@@ -1906,7 +1906,7 @@ static int b43legacy_gpio_init(struct b43legacy_wldev *dev)
|
||||||
|
if (dev->dev->id.revision >= 2)
|
||||||
|
mask |= 0x0010; /* FIXME: This is redundant. */
|
||||||
|
|
||||||
|
-#ifdef CPTCFG_SSB_DRIVER_PCICORE
|
||||||
|
+#ifdef CONFIG_SSB_DRIVER_PCICORE
|
||||||
|
pcidev = bus->pcicore.dev;
|
||||||
|
#endif
|
||||||
|
gpiodev = bus->chipco.dev ? : pcidev;
|
||||||
|
@@ -1925,7 +1925,7 @@ static void b43legacy_gpio_cleanup(struct b43legacy_wldev *dev)
|
||||||
|
struct ssb_bus *bus = dev->dev->bus;
|
||||||
|
struct ssb_device *gpiodev, *pcidev = NULL;
|
||||||
|
|
||||||
|
-#ifdef CPTCFG_SSB_DRIVER_PCICORE
|
||||||
|
+#ifdef CONFIG_SSB_DRIVER_PCICORE
|
||||||
|
pcidev = bus->pcicore.dev;
|
||||||
|
#endif
|
||||||
|
gpiodev = bus->chipco.dev ? : pcidev;
|
||||||
|
diff --git a/drivers/net/wireless/broadcom/brcm80211/Kconfig b/drivers/net/wireless/broadcom/brcm80211/Kconfig
|
||||||
|
index 9f99ad8..2c426b5 100644
|
||||||
|
--- a/drivers/net/wireless/broadcom/brcm80211/Kconfig
|
||||||
|
+++ b/drivers/net/wireless/broadcom/brcm80211/Kconfig
|
||||||
|
@@ -8,7 +8,7 @@ config BRCMSMAC
|
||||||
|
depends on m
|
||||||
|
depends on MAC80211
|
||||||
|
depends on BCMA_POSSIBLE
|
||||||
|
- select BCMA
|
||||||
|
+ depends on BCMA
|
||||||
|
select NEW_LEDS if BCMA_DRIVER_GPIO
|
||||||
|
select LEDS_CLASS if BCMA_DRIVER_GPIO
|
||||||
|
select BRCMUTIL
|
||||||
|
diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmsmac/Makefile b/drivers/net/wireless/broadcom/brcm80211/brcmsmac/Makefile
|
||||||
|
index 50239f6..e90b34e 100644
|
||||||
|
--- a/drivers/net/wireless/broadcom/brcm80211/brcmsmac/Makefile
|
||||||
|
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmsmac/Makefile
|
||||||
|
@@ -42,6 +42,6 @@ brcmsmac-y := \
|
||||||
|
brcms_trace_events.o \
|
||||||
|
debug.o
|
||||||
|
|
||||||
|
-brcmsmac-$(CPTCFG_BCMA_DRIVER_GPIO) += led.o
|
||||||
|
+brcmsmac-$(CONFIG_BCMA_DRIVER_GPIO) += led.o
|
||||||
|
|
||||||
|
obj-$(CPTCFG_BRCMSMAC) += brcmsmac.o
|
||||||
|
diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmsmac/led.h b/drivers/net/wireless/broadcom/brcm80211/brcmsmac/led.h
|
||||||
|
index 09a5bc0..17a0b1f 100644
|
||||||
|
--- a/drivers/net/wireless/broadcom/brcm80211/brcmsmac/led.h
|
||||||
|
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmsmac/led.h
|
||||||
|
@@ -22,7 +22,7 @@ struct brcms_led {
|
||||||
|
bool active_low;
|
||||||
|
};
|
||||||
|
|
||||||
|
-#ifdef CPTCFG_BCMA_DRIVER_GPIO
|
||||||
|
+#ifdef CONFIG_BCMA_DRIVER_GPIO
|
||||||
|
void brcms_led_unregister(struct brcms_info *wl);
|
||||||
|
int brcms_led_register(struct brcms_info *wl);
|
||||||
|
#else
|
||||||
|
diff --git a/drivers/net/wireless/intel/ipw2x00/ipw2200.c b/drivers/net/wireless/intel/ipw2x00/ipw2200.c
|
||||||
|
index 9a99ede..03f7c2a 100644
|
||||||
|
--- a/drivers/net/wireless/intel/ipw2x00/ipw2200.c
|
||||||
|
+++ b/drivers/net/wireless/intel/ipw2x00/ipw2200.c
|
||||||
|
@@ -11482,6 +11482,15 @@ static const struct attribute_group ipw_attribute_group = {
|
||||||
|
.attrs = ipw_sysfs_entries,
|
||||||
|
};
|
||||||
|
|
||||||
|
+#if LINUX_VERSION_IS_LESS(4,10,0)
|
||||||
|
+static int __change_mtu(struct net_device *ndev, int new_mtu){
|
||||||
|
+ if (new_mtu < 68 || new_mtu > LIBIPW_DATA_LEN)
|
||||||
|
+ return -EINVAL;
|
||||||
|
+ ndev->mtu = new_mtu;
|
||||||
|
+ return 0;
|
||||||
|
+}
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
#ifdef CPTCFG_IPW2200_PROMISCUOUS
|
||||||
|
static int ipw_prom_open(struct net_device *dev)
|
||||||
|
{
|
||||||
|
@@ -11530,15 +11539,6 @@ static netdev_tx_t ipw_prom_hard_start_xmit(struct sk_buff *skb,
|
||||||
|
return NETDEV_TX_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
-#if LINUX_VERSION_IS_LESS(4,10,0)
|
||||||
|
-static int __change_mtu(struct net_device *ndev, int new_mtu){
|
||||||
|
- if (new_mtu < 68 || new_mtu > LIBIPW_DATA_LEN)
|
||||||
|
- return -EINVAL;
|
||||||
|
- ndev->mtu = new_mtu;
|
||||||
|
- return 0;
|
||||||
|
-}
|
||||||
|
-#endif
|
||||||
|
-
|
||||||
|
static const struct net_device_ops ipw_prom_netdev_ops = {
|
||||||
|
#if LINUX_VERSION_IS_LESS(4,10,0)
|
||||||
|
.ndo_change_mtu = __change_mtu,
|
||||||
|
diff --git a/kconf/Makefile b/kconf/Makefile
|
||||||
|
index 2004c44..a2790b1 100644
|
||||||
|
--- a/kconf/Makefile
|
||||||
|
+++ b/kconf/Makefile
|
||||||
|
@@ -1,9 +1,9 @@
|
||||||
|
-CFLAGS=-Wall -Wmissing-prototypes -Wstrict-prototypes -O2 -fomit-frame-pointer
|
||||||
|
+CFLAGS=-Wall -Wmissing-prototypes -Wstrict-prototypes -O2 -fomit-frame-pointer -DKBUILD_NO_NLS
|
||||||
|
|
||||||
|
LXDIALOG := lxdialog/checklist.o lxdialog/inputbox.o lxdialog/menubox.o lxdialog/textbox.o lxdialog/util.o lxdialog/yesno.o
|
||||||
|
|
||||||
|
conf: conf.o zconf.tab.o
|
||||||
|
-mconf_CFLAGS := $(shell ./lxdialog/check-lxdialog.sh -ccflags) -DLOCALE
|
||||||
|
+mconf_CFLAGS := $(shell ./lxdialog/check-lxdialog.sh -ccflags)
|
||||||
|
mconf_LDFLAGS := $(shell ./lxdialog/check-lxdialog.sh -ldflags $(CC))
|
||||||
|
mconf: CFLAGS += $(mconf_CFLAGS)
|
||||||
|
|
||||||
|
diff --git a/kconf/conf.c b/kconf/conf.c
|
||||||
|
index 283eeed..1707f05 100644
|
||||||
|
--- a/kconf/conf.c
|
||||||
|
+++ b/kconf/conf.c
|
||||||
|
@@ -598,40 +598,12 @@ int main(int ac, char **av)
|
||||||
|
case oldconfig:
|
||||||
|
case listnewconfig:
|
||||||
|
case olddefconfig:
|
||||||
|
- conf_read(NULL);
|
||||||
|
- break;
|
||||||
|
case allnoconfig:
|
||||||
|
case allyesconfig:
|
||||||
|
case allmodconfig:
|
||||||
|
case alldefconfig:
|
||||||
|
case randconfig:
|
||||||
|
- name = getenv("KCONFIG_ALLCONFIG");
|
||||||
|
- if (!name)
|
||||||
|
- break;
|
||||||
|
- if ((strcmp(name, "") != 0) && (strcmp(name, "1") != 0)) {
|
||||||
|
- if (conf_read_simple(name, S_DEF_USER)) {
|
||||||
|
- fprintf(stderr,
|
||||||
|
- _("*** Can't read seed configuration \"%s\"!\n"),
|
||||||
|
- name);
|
||||||
|
- exit(1);
|
||||||
|
- }
|
||||||
|
- break;
|
||||||
|
- }
|
||||||
|
- switch (input_mode) {
|
||||||
|
- case allnoconfig: name = "allno.config"; break;
|
||||||
|
- case allyesconfig: name = "allyes.config"; break;
|
||||||
|
- case allmodconfig: name = "allmod.config"; break;
|
||||||
|
- case alldefconfig: name = "alldef.config"; break;
|
||||||
|
- case randconfig: name = "allrandom.config"; break;
|
||||||
|
- default: break;
|
||||||
|
- }
|
||||||
|
- if (conf_read_simple(name, S_DEF_USER) &&
|
||||||
|
- conf_read_simple("all.config", S_DEF_USER)) {
|
||||||
|
- fprintf(stderr,
|
||||||
|
- _("*** KCONFIG_ALLCONFIG set, but no \"%s\" or \"all.config\" file found\n"),
|
||||||
|
- name);
|
||||||
|
- exit(1);
|
||||||
|
- }
|
||||||
|
+ conf_read(NULL);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
diff --git a/kconf/confdata.c b/kconf/confdata.c
|
||||||
|
index df26c7b..1038c30 100644
|
||||||
|
--- a/kconf/confdata.c
|
||||||
|
+++ b/kconf/confdata.c
|
||||||
|
@@ -1170,6 +1170,8 @@ bool conf_set_all_new_symbols(enum conf_def_mode mode)
|
||||||
|
}
|
||||||
|
bool has_changed = false;
|
||||||
|
|
||||||
|
+ sym_clear_all_valid();
|
||||||
|
+
|
||||||
|
for_all_symbols(i, sym) {
|
||||||
|
if (sym_has_value(sym) || (sym->flags & SYMBOL_VALID))
|
||||||
|
continue;
|
||||||
|
@@ -1213,8 +1215,6 @@ bool conf_set_all_new_symbols(enum conf_def_mode mode)
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
- sym_clear_all_valid();
|
||||||
|
-
|
||||||
|
/*
|
||||||
|
* We have different type of choice blocks.
|
||||||
|
* If curr.tri equals to mod then we can select several
|
||||||
|
diff --git a/local-symbols b/local-symbols
|
||||||
|
index 33ee823..e7064fd 100644
|
||||||
|
--- a/local-symbols
|
||||||
|
+++ b/local-symbols
|
||||||
|
@@ -412,43 +412,6 @@ USB_SIERRA_NET=
|
||||||
|
USB_VL600=
|
||||||
|
USB_NET_CH9200=
|
||||||
|
USB_NET_AQC111=
|
||||||
|
-SSB_POSSIBLE=
|
||||||
|
-SSB=
|
||||||
|
-SSB_SPROM=
|
||||||
|
-SSB_BLOCKIO=
|
||||||
|
-SSB_PCIHOST_POSSIBLE=
|
||||||
|
-SSB_PCIHOST=
|
||||||
|
-SSB_B43_PCI_BRIDGE=
|
||||||
|
-SSB_PCMCIAHOST_POSSIBLE=
|
||||||
|
-SSB_PCMCIAHOST=
|
||||||
|
-SSB_SDIOHOST_POSSIBLE=
|
||||||
|
-SSB_SDIOHOST=
|
||||||
|
-SSB_HOST_SOC=
|
||||||
|
-SSB_SERIAL=
|
||||||
|
-SSB_DRIVER_PCICORE_POSSIBLE=
|
||||||
|
-SSB_DRIVER_PCICORE=
|
||||||
|
-SSB_PCICORE_HOSTMODE=
|
||||||
|
-SSB_DRIVER_MIPS=
|
||||||
|
-SSB_SFLASH=
|
||||||
|
-SSB_EMBEDDED=
|
||||||
|
-SSB_DRIVER_EXTIF=
|
||||||
|
-SSB_DRIVER_GIGE=
|
||||||
|
-SSB_DRIVER_GPIO=
|
||||||
|
-BCMA_POSSIBLE=
|
||||||
|
-BCMA=
|
||||||
|
-BCMA_BLOCKIO=
|
||||||
|
-BCMA_HOST_PCI_POSSIBLE=
|
||||||
|
-BCMA_HOST_PCI=
|
||||||
|
-BCMA_HOST_SOC=
|
||||||
|
-BCMA_DRIVER_PCI=
|
||||||
|
-BCMA_DRIVER_PCI_HOSTMODE=
|
||||||
|
-BCMA_DRIVER_MIPS=
|
||||||
|
-BCMA_PFLASH=
|
||||||
|
-BCMA_SFLASH=
|
||||||
|
-BCMA_NFLASH=
|
||||||
|
-BCMA_DRIVER_GMAC_CMN=
|
||||||
|
-BCMA_DRIVER_GPIO=
|
||||||
|
-BCMA_DEBUG=
|
||||||
|
USB_ACM=
|
||||||
|
USB_PRINTER=
|
||||||
|
USB_WDM=
|
||||||
|
diff --git a/net/wireless/Kconfig b/net/wireless/Kconfig
|
||||||
|
index 3613e8e..0f9d708 100644
|
||||||
|
--- a/net/wireless/Kconfig
|
||||||
|
+++ b/net/wireless/Kconfig
|
||||||
|
@@ -186,7 +186,7 @@ config CFG80211_WEXT_EXPORT
|
||||||
|
endif # CFG80211
|
||||||
|
|
||||||
|
config LIB80211
|
||||||
|
- tristate
|
||||||
|
+ tristate "lib80211"
|
||||||
|
depends on m
|
||||||
|
default n
|
||||||
|
help
|
||||||
|
@@ -196,18 +196,18 @@ config LIB80211
|
||||||
|
Drivers should select this themselves if needed.
|
||||||
|
|
||||||
|
config LIB80211_CRYPT_WEP
|
||||||
|
- tristate
|
||||||
|
+ tristate "lib80211 WEP support"
|
||||||
|
depends on m
|
||||||
|
select BPAUTO_CRYPTO_LIB_ARC4
|
||||||
|
|
||||||
|
config LIB80211_CRYPT_CCMP
|
||||||
|
- tristate
|
||||||
|
+ tristate "lib80211 CCMP support"
|
||||||
|
depends on m
|
||||||
|
depends on CRYPTO_AES
|
||||||
|
depends on CRYPTO_CCM
|
||||||
|
|
||||||
|
config LIB80211_CRYPT_TKIP
|
||||||
|
- tristate
|
||||||
|
+ tristate "lib80211 TKIP support"
|
||||||
|
depends on m
|
||||||
|
select BPAUTO_CRYPTO_LIB_ARC4
|
||||||
|
|
||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,75 @@
|
||||||
|
From a47e171c23025cb6b2f4afb6eccd59b3cb13c73c Mon Sep 17 00:00:00 2001
|
||||||
|
From: Patrick Walther <patrick.walther@netmodule.com>
|
||||||
|
Date: Wed, 27 May 2020 19:45:07 +0200
|
||||||
|
Subject: [PATCH] backport of mwl patches from openwrt
|
||||||
|
|
||||||
|
---
|
||||||
|
drivers/net/wireless/marvell/libertas/cfg.c | 4 ++++
|
||||||
|
drivers/net/wireless/marvell/libertas/main.c | 1 +
|
||||||
|
drivers/net/wireless/marvell/mwl8k.c | 5 +++--
|
||||||
|
3 files changed, 8 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/drivers/net/wireless/marvell/libertas/cfg.c b/drivers/net/wireless/marvell/libertas/cfg.c
|
||||||
|
index 4e3de68..c861532 100644
|
||||||
|
--- a/drivers/net/wireless/marvell/libertas/cfg.c
|
||||||
|
+++ b/drivers/net/wireless/marvell/libertas/cfg.c
|
||||||
|
@@ -2053,6 +2053,8 @@ struct wireless_dev *lbs_cfg_alloc(struct device *dev)
|
||||||
|
goto err_wiphy_new;
|
||||||
|
}
|
||||||
|
|
||||||
|
+ set_wiphy_dev(wdev->wiphy, dev);
|
||||||
|
+
|
||||||
|
return wdev;
|
||||||
|
|
||||||
|
err_wiphy_new:
|
||||||
|
@@ -2127,6 +2129,8 @@ int lbs_cfg_register(struct lbs_private *priv)
|
||||||
|
wdev->wiphy->n_cipher_suites = ARRAY_SIZE(cipher_suites);
|
||||||
|
wdev->wiphy->reg_notifier = lbs_reg_notifier;
|
||||||
|
|
||||||
|
+ memcpy(wdev->wiphy->perm_addr, priv->current_addr, ETH_ALEN);
|
||||||
|
+
|
||||||
|
ret = wiphy_register(wdev->wiphy);
|
||||||
|
if (ret < 0)
|
||||||
|
pr_err("cannot register wiphy device\n");
|
||||||
|
diff --git a/drivers/net/wireless/marvell/libertas/main.c b/drivers/net/wireless/marvell/libertas/main.c
|
||||||
|
index 2233b59..e0b8e36 100644
|
||||||
|
--- a/drivers/net/wireless/marvell/libertas/main.c
|
||||||
|
+++ b/drivers/net/wireless/marvell/libertas/main.c
|
||||||
|
@@ -935,6 +935,7 @@ struct lbs_private *lbs_add_card(void *card, struct device *dmdev)
|
||||||
|
goto err_adapter;
|
||||||
|
}
|
||||||
|
|
||||||
|
+ dev_net_set(dev, wiphy_net(wdev->wiphy));
|
||||||
|
dev->ieee80211_ptr = wdev;
|
||||||
|
dev->ml_priv = priv;
|
||||||
|
SET_NETDEV_DEV(dev, dmdev);
|
||||||
|
diff --git a/drivers/net/wireless/marvell/mwl8k.c b/drivers/net/wireless/marvell/mwl8k.c
|
||||||
|
index c4db641..4b7d2cb 100644
|
||||||
|
--- a/drivers/net/wireless/marvell/mwl8k.c
|
||||||
|
+++ b/drivers/net/wireless/marvell/mwl8k.c
|
||||||
|
@@ -5694,6 +5694,7 @@ MODULE_FIRMWARE("mwl8k/fmimage_8366.fw");
|
||||||
|
MODULE_FIRMWARE(MWL8K_8366_AP_FW(MWL8K_8366_AP_FW_API));
|
||||||
|
|
||||||
|
static const struct pci_device_id mwl8k_pci_id_table[] = {
|
||||||
|
+ { PCI_VDEVICE(MARVELL, 0x2a02), .driver_data = MWL8363, },
|
||||||
|
{ PCI_VDEVICE(MARVELL, 0x2a0a), .driver_data = MWL8363, },
|
||||||
|
{ PCI_VDEVICE(MARVELL, 0x2a0c), .driver_data = MWL8363, },
|
||||||
|
{ PCI_VDEVICE(MARVELL, 0x2a24), .driver_data = MWL8363, },
|
||||||
|
@@ -6278,6 +6279,8 @@ static int mwl8k_probe(struct pci_dev *pdev,
|
||||||
|
|
||||||
|
priv->running_bsses = 0;
|
||||||
|
|
||||||
|
+ wait_for_completion(&priv->firmware_loading_complete);
|
||||||
|
+
|
||||||
|
return rc;
|
||||||
|
|
||||||
|
err_stop_firmware:
|
||||||
|
@@ -6311,8 +6314,6 @@ static void mwl8k_remove(struct pci_dev *pdev)
|
||||||
|
return;
|
||||||
|
priv = hw->priv;
|
||||||
|
|
||||||
|
- wait_for_completion(&priv->firmware_loading_complete);
|
||||||
|
-
|
||||||
|
if (priv->fw_state == FW_STATE_ERROR) {
|
||||||
|
mwl8k_hw_reset(priv);
|
||||||
|
goto unmap;
|
||||||
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,701 @@
|
||||||
|
From 570a5113d096abd20168f93b3ab3ed3625fda840 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Patrick Walther <patrick.walther@netmodule.com>
|
||||||
|
Date: Fri, 24 Jul 2020 18:56:44 +0200
|
||||||
|
Subject: [PATCH] backport of netmodule patches from openwrt
|
||||||
|
|
||||||
|
---
|
||||||
|
drivers/net/wireless/ath/ath10k/mac.c | 2 +-
|
||||||
|
drivers/net/wireless/ath/ath10k/pci.c | 2 +-
|
||||||
|
drivers/net/wireless/ath/regd.c | 2 +-
|
||||||
|
drivers/net/wireless/ath/regd.h | 3 +-
|
||||||
|
drivers/net/wireless/ath/regd_common.h | 1 +
|
||||||
|
drivers/net/wireless/ti/wlcore/cmd.c | 13 +++-----
|
||||||
|
drivers/net/wireless/ti/wlcore/cmd.h | 2 +-
|
||||||
|
drivers/net/wireless/ti/wlcore/conf.h | 3 ++
|
||||||
|
drivers/net/wireless/ti/wlcore/init.c | 22 ++++++++++---
|
||||||
|
drivers/net/wireless/ti/wlcore/main.c | 54 +++++++++++++++++++------------
|
||||||
|
drivers/net/wireless/ti/wlcore/wlcore_i.h | 1 +
|
||||||
|
include/net/cfg80211.h | 10 ++++--
|
||||||
|
include/net/mac80211.h | 7 ++--
|
||||||
|
include/uapi/linux/nl80211.h | 3 ++
|
||||||
|
net/mac80211/cfg.c | 13 ++++++++
|
||||||
|
net/mac80211/main.c | 4 +--
|
||||||
|
net/wireless/core.c | 41 +++++++++++++++++++----
|
||||||
|
net/wireless/nl80211.c | 13 ++++++++
|
||||||
|
net/wireless/reg.c | 23 ++++++++++---
|
||||||
|
19 files changed, 162 insertions(+), 57 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c
|
||||||
|
index 7946d3b..ba289ad 100644
|
||||||
|
--- a/drivers/net/wireless/ath/ath10k/mac.c
|
||||||
|
+++ b/drivers/net/wireless/ath/ath10k/mac.c
|
||||||
|
@@ -8419,7 +8419,7 @@ static const struct ieee80211_iface_limit ath10k_10x_if_limits[] = {
|
||||||
|
#endif
|
||||||
|
},
|
||||||
|
{
|
||||||
|
- .max = 1,
|
||||||
|
+ .max = 2,
|
||||||
|
.types = BIT(NL80211_IFTYPE_STATION)
|
||||||
|
},
|
||||||
|
};
|
||||||
|
diff --git a/drivers/net/wireless/ath/ath10k/pci.c b/drivers/net/wireless/ath/ath10k/pci.c
|
||||||
|
index d7435c9..57ec879 100644
|
||||||
|
--- a/drivers/net/wireless/ath/ath10k/pci.c
|
||||||
|
+++ b/drivers/net/wireless/ath/ath10k/pci.c
|
||||||
|
@@ -28,7 +28,7 @@ enum ath10k_pci_reset_mode {
|
||||||
|
ATH10K_PCI_RESET_WARM_ONLY = 1,
|
||||||
|
};
|
||||||
|
|
||||||
|
-static unsigned int ath10k_pci_irq_mode = ATH10K_PCI_IRQ_AUTO;
|
||||||
|
+static unsigned int ath10k_pci_irq_mode = ATH10K_PCI_IRQ_LEGACY;
|
||||||
|
static unsigned int ath10k_pci_reset_mode = ATH10K_PCI_RESET_AUTO;
|
||||||
|
|
||||||
|
module_param_named(irq_mode, ath10k_pci_irq_mode, uint, 0644);
|
||||||
|
diff --git a/drivers/net/wireless/ath/regd.c b/drivers/net/wireless/ath/regd.c
|
||||||
|
index e263400..c242f00 100644
|
||||||
|
--- a/drivers/net/wireless/ath/regd.c
|
||||||
|
+++ b/drivers/net/wireless/ath/regd.c
|
||||||
|
@@ -733,7 +733,7 @@ static int __ath_regd_init(struct ath_regulatory *reg)
|
||||||
|
regdmn == CTRY_DEFAULT) {
|
||||||
|
printk(KERN_DEBUG "ath: EEPROM indicates default "
|
||||||
|
"country code should be used\n");
|
||||||
|
- reg->country_code = CTRY_UNITED_STATES;
|
||||||
|
+ reg->country_code = CTRY_EU;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (reg->country_code == CTRY_DEFAULT) {
|
||||||
|
diff --git a/drivers/net/wireless/ath/regd.h b/drivers/net/wireless/ath/regd.h
|
||||||
|
index 8d5a16b..bb59c9d 100644
|
||||||
|
--- a/drivers/net/wireless/ath/regd.h
|
||||||
|
+++ b/drivers/net/wireless/ath/regd.h
|
||||||
|
@@ -254,7 +254,8 @@ enum CountryCode {
|
||||||
|
CTRY_JAPAN59 = 4059,
|
||||||
|
CTRY_AUSTRALIA2 = 5000,
|
||||||
|
CTRY_CANADA2 = 5001,
|
||||||
|
- CTRY_BELGIUM2 = 5002
|
||||||
|
+ CTRY_BELGIUM2 = 5002,
|
||||||
|
+ CTRY_EU = 500,
|
||||||
|
};
|
||||||
|
|
||||||
|
bool ath_is_world_regd(struct ath_regulatory *reg);
|
||||||
|
diff --git a/drivers/net/wireless/ath/regd_common.h b/drivers/net/wireless/ath/regd_common.h
|
||||||
|
index 364011e..4db829c 100644
|
||||||
|
--- a/drivers/net/wireless/ath/regd_common.h
|
||||||
|
+++ b/drivers/net/wireless/ath/regd_common.h
|
||||||
|
@@ -498,6 +498,7 @@ static struct country_code_to_enum_rd allCountries[] = {
|
||||||
|
{CTRY_VIET_NAM, NULL1_WORLD, "VN"},
|
||||||
|
{CTRY_YEMEN, NULL1_WORLD, "YE"},
|
||||||
|
{CTRY_ZIMBABWE, ETSI1_WORLD, "ZW"},
|
||||||
|
+ {CTRY_EU, ETSI1_WORLD, "EU"},
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif
|
||||||
|
diff --git a/drivers/net/wireless/ti/wlcore/cmd.c b/drivers/net/wireless/ti/wlcore/cmd.c
|
||||||
|
index 2a48fc6..888cfd7 100644
|
||||||
|
--- a/drivers/net/wireless/ti/wlcore/cmd.c
|
||||||
|
+++ b/drivers/net/wireless/ti/wlcore/cmd.c
|
||||||
|
@@ -1429,7 +1429,7 @@ out:
|
||||||
|
int wl1271_cmd_set_ap_key(struct wl1271 *wl, struct wl12xx_vif *wlvif,
|
||||||
|
u16 action, u8 id, u8 key_type,
|
||||||
|
u8 key_size, const u8 *key, u8 hlid, u32 tx_seq_32,
|
||||||
|
- u16 tx_seq_16)
|
||||||
|
+ u16 tx_seq_16, bool is_pairwise)
|
||||||
|
{
|
||||||
|
struct wl1271_cmd_set_keys *cmd;
|
||||||
|
int ret = 0;
|
||||||
|
@@ -1444,8 +1444,10 @@ int wl1271_cmd_set_ap_key(struct wl1271 *wl, struct wl12xx_vif *wlvif,
|
||||||
|
lid_type = WEP_DEFAULT_LID_TYPE;
|
||||||
|
else
|
||||||
|
lid_type = BROADCAST_LID_TYPE;
|
||||||
|
- } else {
|
||||||
|
+ } else if (is_pairwise) {
|
||||||
|
lid_type = UNICAST_LID_TYPE;
|
||||||
|
+ } else {
|
||||||
|
+ lid_type = BROADCAST_LID_TYPE;
|
||||||
|
}
|
||||||
|
|
||||||
|
wl1271_debug(DEBUG_CRYPT, "ap key action: %d id: %d lid: %d type: %d"
|
||||||
|
@@ -1565,13 +1567,6 @@ int wl12xx_cmd_add_peer(struct wl1271 *wl, struct wl12xx_vif *wlvif,
|
||||||
|
cpu_to_le32(wl1271_tx_enabled_rates_get(wl, sta_rates,
|
||||||
|
wlvif->band));
|
||||||
|
|
||||||
|
- if (!cmd->supported_rates) {
|
||||||
|
- wl1271_debug(DEBUG_CMD,
|
||||||
|
- "peer has no supported rates yet, configuring basic rates: 0x%x",
|
||||||
|
- wlvif->basic_rate_set);
|
||||||
|
- cmd->supported_rates = cpu_to_le32(wlvif->basic_rate_set);
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
wl1271_debug(DEBUG_CMD, "new peer rates=0x%x queues=0x%x",
|
||||||
|
cmd->supported_rates, sta->uapsd_queues);
|
||||||
|
|
||||||
|
diff --git a/drivers/net/wireless/ti/wlcore/cmd.h b/drivers/net/wireless/ti/wlcore/cmd.h
|
||||||
|
index 084375b..bfad7b5 100644
|
||||||
|
--- a/drivers/net/wireless/ti/wlcore/cmd.h
|
||||||
|
+++ b/drivers/net/wireless/ti/wlcore/cmd.h
|
||||||
|
@@ -65,7 +65,7 @@ int wl1271_cmd_set_sta_key(struct wl1271 *wl, struct wl12xx_vif *wlvif,
|
||||||
|
int wl1271_cmd_set_ap_key(struct wl1271 *wl, struct wl12xx_vif *wlvif,
|
||||||
|
u16 action, u8 id, u8 key_type,
|
||||||
|
u8 key_size, const u8 *key, u8 hlid, u32 tx_seq_32,
|
||||||
|
- u16 tx_seq_16);
|
||||||
|
+ u16 tx_seq_16, bool is_pairwise);
|
||||||
|
int wl12xx_cmd_set_peer_state(struct wl1271 *wl, struct wl12xx_vif *wlvif,
|
||||||
|
u8 hlid);
|
||||||
|
int wl12xx_roc(struct wl1271 *wl, struct wl12xx_vif *wlvif, u8 role_id,
|
||||||
|
diff --git a/drivers/net/wireless/ti/wlcore/conf.h b/drivers/net/wireless/ti/wlcore/conf.h
|
||||||
|
index 6116383..e33f577 100644
|
||||||
|
--- a/drivers/net/wireless/ti/wlcore/conf.h
|
||||||
|
+++ b/drivers/net/wireless/ti/wlcore/conf.h
|
||||||
|
@@ -215,6 +215,9 @@ struct conf_rx_settings {
|
||||||
|
CONF_HW_BIT_RATE_2MBPS | CONF_HW_BIT_RATE_5_5MBPS | \
|
||||||
|
CONF_HW_BIT_RATE_11MBPS)
|
||||||
|
|
||||||
|
+#define CONF_TX_OFDM_BASIC_RATES (CONF_HW_BIT_RATE_6MBPS | \
|
||||||
|
+ CONF_HW_BIT_RATE_12MBPS | CONF_HW_BIT_RATE_24MBPS)
|
||||||
|
+
|
||||||
|
#define CONF_TX_OFDM_RATES (CONF_HW_BIT_RATE_6MBPS | \
|
||||||
|
CONF_HW_BIT_RATE_12MBPS | CONF_HW_BIT_RATE_24MBPS | \
|
||||||
|
CONF_HW_BIT_RATE_36MBPS | CONF_HW_BIT_RATE_48MBPS | \
|
||||||
|
diff --git a/drivers/net/wireless/ti/wlcore/init.c b/drivers/net/wireless/ti/wlcore/init.c
|
||||||
|
index 03b49ba..6334351 100644
|
||||||
|
--- a/drivers/net/wireless/ti/wlcore/init.c
|
||||||
|
+++ b/drivers/net/wireless/ti/wlcore/init.c
|
||||||
|
@@ -425,6 +425,7 @@ int wl1271_init_ap_rates(struct wl1271 *wl, struct wl12xx_vif *wlvif)
|
||||||
|
int i, ret;
|
||||||
|
struct conf_tx_rate_class rc;
|
||||||
|
u32 supported_rates;
|
||||||
|
+ struct ieee80211_vif *vif = wl12xx_wlvif_to_vif(wlvif);
|
||||||
|
|
||||||
|
wl1271_debug(DEBUG_AP, "AP basic rate set: 0x%x",
|
||||||
|
wlvif->basic_rate_set);
|
||||||
|
@@ -432,16 +433,27 @@ int wl1271_init_ap_rates(struct wl1271 *wl, struct wl12xx_vif *wlvif)
|
||||||
|
if (wlvif->basic_rate_set == 0)
|
||||||
|
return -EINVAL;
|
||||||
|
|
||||||
|
- rc.enabled_rates = wlvif->basic_rate_set;
|
||||||
|
- rc.long_retry_limit = 10;
|
||||||
|
- rc.short_retry_limit = 10;
|
||||||
|
- rc.aflags = 0;
|
||||||
|
+ /*In order to handle mesh PREQ/PREP loss, increase retry limit
|
||||||
|
+ and use OFDM basic rates (mgmt policy)*/
|
||||||
|
+ if (ieee80211_vif_is_mesh(vif)) {
|
||||||
|
+ rc.enabled_rates = wlvif->basic_rate_set;
|
||||||
|
+ rc.long_retry_limit = 30;
|
||||||
|
+ rc.short_retry_limit = 30;
|
||||||
|
+ rc.aflags = 0;
|
||||||
|
+ }
|
||||||
|
+ else {
|
||||||
|
+ rc.enabled_rates = wlvif->basic_rate_set;
|
||||||
|
+ rc.long_retry_limit = 10;
|
||||||
|
+ rc.short_retry_limit = 10;
|
||||||
|
+ rc.aflags = 0;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
ret = wl1271_acx_ap_rate_policy(wl, &rc, wlvif->ap.mgmt_rate_idx);
|
||||||
|
if (ret < 0)
|
||||||
|
return ret;
|
||||||
|
|
||||||
|
/* use the min basic rate for AP broadcast/multicast */
|
||||||
|
- rc.enabled_rates = wl1271_tx_min_rate_get(wl, wlvif->basic_rate_set);
|
||||||
|
+ rc.enabled_rates = wlvif->basic_rate;
|
||||||
|
rc.short_retry_limit = 10;
|
||||||
|
rc.long_retry_limit = 10;
|
||||||
|
rc.aflags = 0;
|
||||||
|
diff --git a/drivers/net/wireless/ti/wlcore/main.c b/drivers/net/wireless/ti/wlcore/main.c
|
||||||
|
index 6d36cbf..355d186 100644
|
||||||
|
--- a/drivers/net/wireless/ti/wlcore/main.c
|
||||||
|
+++ b/drivers/net/wireless/ti/wlcore/main.c
|
||||||
|
@@ -2213,12 +2213,13 @@ static u8 wl12xx_get_role_type(struct wl1271 *wl, struct wl12xx_vif *wlvif)
|
||||||
|
static int wl12xx_init_vif_data(struct wl1271 *wl, struct ieee80211_vif *vif)
|
||||||
|
{
|
||||||
|
struct wl12xx_vif *wlvif = wl12xx_vif_to_data(vif);
|
||||||
|
+ enum nl80211_iftype iftype = ieee80211_vif_type_p2p(vif);
|
||||||
|
int i;
|
||||||
|
|
||||||
|
/* clear everything but the persistent data */
|
||||||
|
memset(wlvif, 0, offsetof(struct wl12xx_vif, persistent));
|
||||||
|
|
||||||
|
- switch (ieee80211_vif_type_p2p(vif)) {
|
||||||
|
+ switch (iftype) {
|
||||||
|
case NL80211_IFTYPE_P2P_CLIENT:
|
||||||
|
wlvif->p2p = 1;
|
||||||
|
/* fall-through */
|
||||||
|
@@ -2265,13 +2266,14 @@ static int wl12xx_init_vif_data(struct wl1271 *wl, struct ieee80211_vif *vif)
|
||||||
|
for (i = 0; i < CONF_TX_MAX_AC_COUNT; i++)
|
||||||
|
wl12xx_allocate_rate_policy(wl,
|
||||||
|
&wlvif->ap.ucast_rate_idx[i]);
|
||||||
|
- wlvif->basic_rate_set = CONF_TX_ENABLED_RATES;
|
||||||
|
- /*
|
||||||
|
- * TODO: check if basic_rate shouldn't be
|
||||||
|
- * wl1271_tx_min_rate_get(wl, wlvif->basic_rate_set);
|
||||||
|
- * instead (the same thing for STA above).
|
||||||
|
- */
|
||||||
|
- wlvif->basic_rate = CONF_TX_ENABLED_RATES;
|
||||||
|
+ /* For mesh set default basic rate set to OFDM basic rate set only*/
|
||||||
|
+ if (iftype == NL80211_IFTYPE_MESH_POINT)
|
||||||
|
+ wlvif->basic_rate_set = CONF_TX_OFDM_BASIC_RATES;
|
||||||
|
+ else
|
||||||
|
+ wlvif->basic_rate_set = CONF_TX_ENABLED_RATES;
|
||||||
|
+
|
||||||
|
+ wlvif->basic_rate = wl1271_tx_min_rate_get(wl, CONF_TX_ENABLED_RATES);
|
||||||
|
+
|
||||||
|
/* TODO: this seems to be used only for STA, check it */
|
||||||
|
wlvif->rate_set = CONF_TX_ENABLED_RATES;
|
||||||
|
}
|
||||||
|
@@ -3274,7 +3276,7 @@ out:
|
||||||
|
static int wl1271_record_ap_key(struct wl1271 *wl, struct wl12xx_vif *wlvif,
|
||||||
|
u8 id, u8 key_type, u8 key_size,
|
||||||
|
const u8 *key, u8 hlid, u32 tx_seq_32,
|
||||||
|
- u16 tx_seq_16)
|
||||||
|
+ u16 tx_seq_16, bool is_pairwise)
|
||||||
|
{
|
||||||
|
struct wl1271_ap_key *ap_key;
|
||||||
|
int i;
|
||||||
|
@@ -3312,6 +3314,7 @@ static int wl1271_record_ap_key(struct wl1271 *wl, struct wl12xx_vif *wlvif,
|
||||||
|
ap_key->hlid = hlid;
|
||||||
|
ap_key->tx_seq_32 = tx_seq_32;
|
||||||
|
ap_key->tx_seq_16 = tx_seq_16;
|
||||||
|
+ ap_key->is_pairwise = is_pairwise;
|
||||||
|
|
||||||
|
wlvif->ap.recorded_keys[i] = ap_key;
|
||||||
|
return 0;
|
||||||
|
@@ -3347,7 +3350,7 @@ static int wl1271_ap_init_hwenc(struct wl1271 *wl, struct wl12xx_vif *wlvif)
|
||||||
|
key->id, key->key_type,
|
||||||
|
key->key_size, key->key,
|
||||||
|
hlid, key->tx_seq_32,
|
||||||
|
- key->tx_seq_16);
|
||||||
|
+ key->tx_seq_16, key->is_pairwise);
|
||||||
|
if (ret < 0)
|
||||||
|
goto out;
|
||||||
|
|
||||||
|
@@ -3370,7 +3373,8 @@ out:
|
||||||
|
static int wl1271_set_key(struct wl1271 *wl, struct wl12xx_vif *wlvif,
|
||||||
|
u16 action, u8 id, u8 key_type,
|
||||||
|
u8 key_size, const u8 *key, u32 tx_seq_32,
|
||||||
|
- u16 tx_seq_16, struct ieee80211_sta *sta)
|
||||||
|
+ u16 tx_seq_16, struct ieee80211_sta *sta,
|
||||||
|
+ bool is_pairwise)
|
||||||
|
{
|
||||||
|
int ret;
|
||||||
|
bool is_ap = (wlvif->bss_type == BSS_TYPE_AP_BSS);
|
||||||
|
@@ -3397,12 +3401,12 @@ static int wl1271_set_key(struct wl1271 *wl, struct wl12xx_vif *wlvif,
|
||||||
|
ret = wl1271_record_ap_key(wl, wlvif, id,
|
||||||
|
key_type, key_size,
|
||||||
|
key, hlid, tx_seq_32,
|
||||||
|
- tx_seq_16);
|
||||||
|
+ tx_seq_16, is_pairwise);
|
||||||
|
} else {
|
||||||
|
ret = wl1271_cmd_set_ap_key(wl, wlvif, action,
|
||||||
|
id, key_type, key_size,
|
||||||
|
key, hlid, tx_seq_32,
|
||||||
|
- tx_seq_16);
|
||||||
|
+ tx_seq_16, is_pairwise);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (ret < 0)
|
||||||
|
@@ -3502,6 +3506,7 @@ int wlcore_set_key(struct wl1271 *wl, enum set_key_cmd cmd,
|
||||||
|
u16 tx_seq_16 = 0;
|
||||||
|
u8 key_type;
|
||||||
|
u8 hlid;
|
||||||
|
+ bool is_pairwise;
|
||||||
|
|
||||||
|
wl1271_debug(DEBUG_MAC80211, "mac80211 set key");
|
||||||
|
|
||||||
|
@@ -3551,12 +3556,14 @@ int wlcore_set_key(struct wl1271 *wl, enum set_key_cmd cmd,
|
||||||
|
return -EOPNOTSUPP;
|
||||||
|
}
|
||||||
|
|
||||||
|
+ is_pairwise = key_conf->flags & IEEE80211_KEY_FLAG_PAIRWISE;
|
||||||
|
+
|
||||||
|
switch (cmd) {
|
||||||
|
case SET_KEY:
|
||||||
|
ret = wl1271_set_key(wl, wlvif, KEY_ADD_OR_REPLACE,
|
||||||
|
key_conf->keyidx, key_type,
|
||||||
|
key_conf->keylen, key_conf->key,
|
||||||
|
- tx_seq_32, tx_seq_16, sta);
|
||||||
|
+ tx_seq_32, tx_seq_16, sta, is_pairwise);
|
||||||
|
if (ret < 0) {
|
||||||
|
wl1271_error("Could not add or replace key");
|
||||||
|
return ret;
|
||||||
|
@@ -3582,7 +3589,7 @@ int wlcore_set_key(struct wl1271 *wl, enum set_key_cmd cmd,
|
||||||
|
ret = wl1271_set_key(wl, wlvif, KEY_REMOVE,
|
||||||
|
key_conf->keyidx, key_type,
|
||||||
|
key_conf->keylen, key_conf->key,
|
||||||
|
- 0, 0, sta);
|
||||||
|
+ 0, 0, sta, is_pairwise);
|
||||||
|
if (ret < 0) {
|
||||||
|
wl1271_error("Could not remove key");
|
||||||
|
return ret;
|
||||||
|
@@ -5216,11 +5223,6 @@ static int wl12xx_update_sta_state(struct wl1271 *wl,
|
||||||
|
if (ret < 0)
|
||||||
|
return ret;
|
||||||
|
|
||||||
|
- /* reconfigure rates */
|
||||||
|
- ret = wl12xx_cmd_add_peer(wl, wlvif, sta, wl_sta->hlid);
|
||||||
|
- if (ret < 0)
|
||||||
|
- return ret;
|
||||||
|
-
|
||||||
|
ret = wl1271_acx_set_ht_capabilities(wl, &sta->ht_cap, true,
|
||||||
|
wl_sta->hlid);
|
||||||
|
if (ret)
|
||||||
|
@@ -5794,9 +5796,16 @@ static void wlcore_op_sta_statistics(struct ieee80211_hw *hw,
|
||||||
|
{
|
||||||
|
struct wl1271 *wl = hw->priv;
|
||||||
|
struct wl12xx_vif *wlvif = wl12xx_vif_to_data(vif);
|
||||||
|
+ u8 role_type;
|
||||||
|
s8 rssi_dbm;
|
||||||
|
int ret;
|
||||||
|
|
||||||
|
+ role_type = wl12xx_get_role_type(wl, wlvif);
|
||||||
|
+ if (role_type == WL1271_ROLE_AP ||
|
||||||
|
+ role_type == WL1271_ROLE_MESH_POINT) {
|
||||||
|
+ return;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
wl1271_debug(DEBUG_MAC80211, "mac80211 get_rssi");
|
||||||
|
|
||||||
|
mutex_lock(&wl->mutex);
|
||||||
|
@@ -6224,6 +6233,7 @@ static int wl1271_init_ieee80211(struct wl1271 *wl)
|
||||||
|
|
||||||
|
ieee80211_hw_set(wl->hw, SUPPORT_FAST_XMIT);
|
||||||
|
ieee80211_hw_set(wl->hw, CHANCTX_STA_CSA);
|
||||||
|
+ ieee80211_hw_set(wl->hw, SUPPORTS_PER_STA_GTK);
|
||||||
|
ieee80211_hw_set(wl->hw, QUEUE_CONTROL);
|
||||||
|
ieee80211_hw_set(wl->hw, TX_AMPDU_SETUP_IN_HW);
|
||||||
|
ieee80211_hw_set(wl->hw, AMPDU_AGGREGATION);
|
||||||
|
@@ -6268,9 +6278,11 @@ static int wl1271_init_ieee80211(struct wl1271 *wl)
|
||||||
|
|
||||||
|
wl->hw->wiphy->flags |= WIPHY_FLAG_AP_UAPSD |
|
||||||
|
WIPHY_FLAG_HAS_REMAIN_ON_CHANNEL |
|
||||||
|
- WIPHY_FLAG_HAS_CHANNEL_SWITCH;
|
||||||
|
+ WIPHY_FLAG_HAS_CHANNEL_SWITCH |
|
||||||
|
+ WIPHY_FLAG_IBSS_RSN;
|
||||||
|
|
||||||
|
wl->hw->wiphy->features |= NL80211_FEATURE_AP_SCAN;
|
||||||
|
+ wl->hw->wiphy->features &= ~NL80211_FEATURE_FULL_AP_CLIENT_STATE;
|
||||||
|
|
||||||
|
/* make sure all our channels fit in the scanned_ch bitmask */
|
||||||
|
BUILD_BUG_ON(ARRAY_SIZE(wl1271_channels) +
|
||||||
|
diff --git a/drivers/net/wireless/ti/wlcore/wlcore_i.h b/drivers/net/wireless/ti/wlcore/wlcore_i.h
|
||||||
|
index 6fab60b..eefae3f 100644
|
||||||
|
--- a/drivers/net/wireless/ti/wlcore/wlcore_i.h
|
||||||
|
+++ b/drivers/net/wireless/ti/wlcore/wlcore_i.h
|
||||||
|
@@ -212,6 +212,7 @@ struct wl1271_ap_key {
|
||||||
|
u8 hlid;
|
||||||
|
u32 tx_seq_32;
|
||||||
|
u16 tx_seq_16;
|
||||||
|
+ bool is_pairwise;
|
||||||
|
};
|
||||||
|
|
||||||
|
enum wl12xx_flags {
|
||||||
|
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h
|
||||||
|
index 8099b10..4849bab 100644
|
||||||
|
--- a/include/net/cfg80211.h
|
||||||
|
+++ b/include/net/cfg80211.h
|
||||||
|
@@ -112,6 +112,7 @@ enum ieee80211_channel_flags {
|
||||||
|
IEEE80211_CHAN_IR_CONCURRENT = 1<<10,
|
||||||
|
IEEE80211_CHAN_NO_20MHZ = 1<<11,
|
||||||
|
IEEE80211_CHAN_NO_10MHZ = 1<<12,
|
||||||
|
+ IEEE80211_CHAN_SRD = 1<<13,
|
||||||
|
};
|
||||||
|
|
||||||
|
#define IEEE80211_CHAN_NO_HT40 \
|
||||||
|
@@ -3456,6 +3457,8 @@ struct cfg80211_update_owe_info {
|
||||||
|
* return 0 if successful
|
||||||
|
* @set_antenna_gain: set antenna gain to reduce maximum tx power if necessary
|
||||||
|
*
|
||||||
|
+ * @get_antenna_gain: get antenna gain
|
||||||
|
+ *
|
||||||
|
* @set_wds_peer: set the WDS peer for a WDS interface
|
||||||
|
*
|
||||||
|
* @rfkill_poll: polls the hw rfkill line, use cfg80211 reporting
|
||||||
|
@@ -3771,6 +3774,7 @@ struct cfg80211_ops {
|
||||||
|
int (*get_tx_power)(struct wiphy *wiphy, struct wireless_dev *wdev,
|
||||||
|
int *dbm);
|
||||||
|
int (*set_antenna_gain)(struct wiphy *wiphy, int dbi);
|
||||||
|
+ int (*get_antenna_gain)(struct wiphy *wiphy, int *dbi);
|
||||||
|
|
||||||
|
int (*set_wds_peer)(struct wiphy *wiphy, struct net_device *dev,
|
||||||
|
const u8 *addr);
|
||||||
|
@@ -4771,6 +4775,8 @@ static inline const char *wiphy_name(const struct wiphy *wiphy)
|
||||||
|
* @sizeof_priv: The size of the private area to allocate
|
||||||
|
* @requested_name: Request a particular name.
|
||||||
|
* NULL is valid value, and means use the default phy%d naming.
|
||||||
|
+ * @requested_index: Request a particular index.
|
||||||
|
+ * -1 is valid value, and means use the default phy%d naming.
|
||||||
|
*
|
||||||
|
* Create a new wiphy and associate the given operations with it.
|
||||||
|
* @sizeof_priv bytes are allocated for private use.
|
||||||
|
@@ -4779,7 +4785,7 @@ static inline const char *wiphy_name(const struct wiphy *wiphy)
|
||||||
|
* assigned to each netdev's ieee80211_ptr for proper operation.
|
||||||
|
*/
|
||||||
|
struct wiphy *wiphy_new_nm(const struct cfg80211_ops *ops, int sizeof_priv,
|
||||||
|
- const char *requested_name);
|
||||||
|
+ const char *requested_name, const int requested_index);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* wiphy_new - create a new wiphy for use with cfg80211
|
||||||
|
@@ -4796,7 +4802,7 @@ struct wiphy *wiphy_new_nm(const struct cfg80211_ops *ops, int sizeof_priv,
|
||||||
|
static inline struct wiphy *wiphy_new(const struct cfg80211_ops *ops,
|
||||||
|
int sizeof_priv)
|
||||||
|
{
|
||||||
|
- return wiphy_new_nm(ops, sizeof_priv, NULL);
|
||||||
|
+ return wiphy_new_nm(ops, sizeof_priv, NULL, -1);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
diff --git a/include/net/mac80211.h b/include/net/mac80211.h
|
||||||
|
index bca141e..ae3316f 100644
|
||||||
|
--- a/include/net/mac80211.h
|
||||||
|
+++ b/include/net/mac80211.h
|
||||||
|
@@ -4087,12 +4087,15 @@ struct ieee80211_ops {
|
||||||
|
* @ops: callbacks for this device
|
||||||
|
* @requested_name: Requested name for this device.
|
||||||
|
* NULL is valid value, and means use the default naming (phy%d)
|
||||||
|
+ * @requested_name: Requested index for this device.
|
||||||
|
+ * -1 is valid value, and means use the default naming (phy%d)
|
||||||
|
*
|
||||||
|
* Return: A pointer to the new hardware device, or %NULL on error.
|
||||||
|
*/
|
||||||
|
struct ieee80211_hw *ieee80211_alloc_hw_nm(size_t priv_data_len,
|
||||||
|
const struct ieee80211_ops *ops,
|
||||||
|
- const char *requested_name);
|
||||||
|
+ const char *requested_name,
|
||||||
|
+ int requested_index);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ieee80211_alloc_hw - Allocate a new hardware device
|
||||||
|
@@ -4112,7 +4115,7 @@ static inline
|
||||||
|
struct ieee80211_hw *ieee80211_alloc_hw(size_t priv_data_len,
|
||||||
|
const struct ieee80211_ops *ops)
|
||||||
|
{
|
||||||
|
- return ieee80211_alloc_hw_nm(priv_data_len, ops, NULL);
|
||||||
|
+ return ieee80211_alloc_hw_nm(priv_data_len, ops, NULL, -1);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
diff --git a/include/uapi/linux/nl80211.h b/include/uapi/linux/nl80211.h
|
||||||
|
index ef08258..2f41258 100644
|
||||||
|
--- a/include/uapi/linux/nl80211.h
|
||||||
|
+++ b/include/uapi/linux/nl80211.h
|
||||||
|
@@ -3559,6 +3559,8 @@ enum nl80211_wmm_rule {
|
||||||
|
* @NL80211_FREQUENCY_ATTR_WMM: this channel has wmm limitations.
|
||||||
|
* This is a nested attribute that contains the wmm limitation per AC.
|
||||||
|
* (see &enum nl80211_wmm_rule)
|
||||||
|
+ * @NL80211_FREQUENCY_ATTR_SRD_CHANNEL: short range devices mode
|
||||||
|
+ * on this channel in current regulatory domain.
|
||||||
|
* @NL80211_FREQUENCY_ATTR_MAX: highest frequency attribute number
|
||||||
|
* currently defined
|
||||||
|
* @__NL80211_FREQUENCY_ATTR_AFTER_LAST: internal use
|
||||||
|
@@ -3588,6 +3590,7 @@ enum nl80211_frequency_attr {
|
||||||
|
NL80211_FREQUENCY_ATTR_NO_20MHZ,
|
||||||
|
NL80211_FREQUENCY_ATTR_NO_10MHZ,
|
||||||
|
NL80211_FREQUENCY_ATTR_WMM,
|
||||||
|
+ NL80211_FREQUENCY_ATTR_SRD_CHANNEL,
|
||||||
|
|
||||||
|
/* keep last */
|
||||||
|
__NL80211_FREQUENCY_ATTR_AFTER_LAST,
|
||||||
|
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
|
||||||
|
index 993ee7b..13bd5b2 100644
|
||||||
|
--- a/net/mac80211/cfg.c
|
||||||
|
+++ b/net/mac80211/cfg.c
|
||||||
|
@@ -2595,6 +2595,18 @@ static int ieee80211_set_antenna_gain(struct wiphy *wiphy, int dbi)
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
+static int ieee80211_get_antenna_gain(struct wiphy *wiphy,
|
||||||
|
+ int *dbi)
|
||||||
|
+{
|
||||||
|
+ struct ieee80211_local *local = wiphy_priv(wiphy);
|
||||||
|
+
|
||||||
|
+ if (local) {
|
||||||
|
+ *dbi = local->user_antenna_gain;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ return 0;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
static int ieee80211_set_wds_peer(struct wiphy *wiphy, struct net_device *dev,
|
||||||
|
const u8 *addr)
|
||||||
|
{
|
||||||
|
@@ -4031,6 +4043,7 @@ const struct cfg80211_ops mac80211_config_ops = {
|
||||||
|
.set_tx_power = ieee80211_set_tx_power,
|
||||||
|
.get_tx_power = ieee80211_get_tx_power,
|
||||||
|
.set_antenna_gain = ieee80211_set_antenna_gain,
|
||||||
|
+ .get_antenna_gain = ieee80211_get_antenna_gain,
|
||||||
|
.set_wds_peer = ieee80211_set_wds_peer,
|
||||||
|
.rfkill_poll = ieee80211_rfkill_poll,
|
||||||
|
CFG80211_TESTMODE_CMD(ieee80211_testmode_cmd)
|
||||||
|
diff --git a/net/mac80211/main.c b/net/mac80211/main.c
|
||||||
|
index 71dada6..7bfa7bb 100644
|
||||||
|
--- a/net/mac80211/main.c
|
||||||
|
+++ b/net/mac80211/main.c
|
||||||
|
@@ -512,7 +512,7 @@ static const struct ieee80211_vht_cap mac80211_vht_capa_mod_mask = {
|
||||||
|
|
||||||
|
struct ieee80211_hw *ieee80211_alloc_hw_nm(size_t priv_data_len,
|
||||||
|
const struct ieee80211_ops *ops,
|
||||||
|
- const char *requested_name)
|
||||||
|
+ const char *requested_name, int requested_idx)
|
||||||
|
{
|
||||||
|
struct ieee80211_local *local;
|
||||||
|
int priv_size, i;
|
||||||
|
@@ -552,7 +552,7 @@ struct ieee80211_hw *ieee80211_alloc_hw_nm(size_t priv_data_len,
|
||||||
|
*/
|
||||||
|
priv_size = ALIGN(sizeof(*local), NETDEV_ALIGN) + priv_data_len;
|
||||||
|
|
||||||
|
- wiphy = wiphy_new_nm(&mac80211_config_ops, priv_size, requested_name);
|
||||||
|
+ wiphy = wiphy_new_nm(&mac80211_config_ops, priv_size, requested_name, requested_idx);
|
||||||
|
|
||||||
|
if (!wiphy)
|
||||||
|
return NULL;
|
||||||
|
diff --git a/net/wireless/core.c b/net/wireless/core.c
|
||||||
|
index c8a6c0e..847d4f6 100644
|
||||||
|
--- a/net/wireless/core.c
|
||||||
|
+++ b/net/wireless/core.c
|
||||||
|
@@ -123,6 +123,19 @@ static int cfg80211_dev_check_name(struct cfg80211_registered_device *rdev,
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
+static int cfg80211_dev_check_index(const int index)
|
||||||
|
+{
|
||||||
|
+ struct cfg80211_registered_device *rdev;
|
||||||
|
+
|
||||||
|
+ ASSERT_RTNL();
|
||||||
|
+
|
||||||
|
+ /* Ensure another device does not already have this name. */
|
||||||
|
+ list_for_each_entry(rdev, &cfg80211_rdev_list, list)
|
||||||
|
+ if (rdev->wiphy_idx == index)
|
||||||
|
+ return -EINVAL;
|
||||||
|
+ return 0;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
int cfg80211_dev_rename(struct cfg80211_registered_device *rdev,
|
||||||
|
char *newname)
|
||||||
|
{
|
||||||
|
@@ -396,7 +409,7 @@ static void cfg80211_propagate_cac_done_wk(struct work_struct *work)
|
||||||
|
/* exported functions */
|
||||||
|
|
||||||
|
struct wiphy *wiphy_new_nm(const struct cfg80211_ops *ops, int sizeof_priv,
|
||||||
|
- const char *requested_name)
|
||||||
|
+ const char *requested_name, const int requested_index)
|
||||||
|
{
|
||||||
|
static atomic_t wiphy_counter = ATOMIC_INIT(0);
|
||||||
|
|
||||||
|
@@ -439,17 +452,31 @@ struct wiphy *wiphy_new_nm(const struct cfg80211_ops *ops, int sizeof_priv,
|
||||||
|
|
||||||
|
rdev->ops = ops;
|
||||||
|
|
||||||
|
- rdev->wiphy_idx = atomic_inc_return(&wiphy_counter);
|
||||||
|
+ if (requested_index >= 0) {
|
||||||
|
+ int rv;
|
||||||
|
|
||||||
|
- if (unlikely(rdev->wiphy_idx < 0)) {
|
||||||
|
+ rtnl_lock();
|
||||||
|
+ rv = cfg80211_dev_check_index(requested_index);
|
||||||
|
+
|
||||||
|
+ if (rv < 0) {
|
||||||
|
+ rtnl_unlock();
|
||||||
|
+ goto use_default_index;
|
||||||
|
+ }
|
||||||
|
+ rdev->wiphy_idx = requested_index;
|
||||||
|
+ rtnl_unlock();
|
||||||
|
+ } else {
|
||||||
|
+use_default_index:
|
||||||
|
+ rdev->wiphy_idx = atomic_inc_return(&wiphy_counter);
|
||||||
|
+
|
||||||
|
+ if (unlikely(rdev->wiphy_idx < 0)) {
|
||||||
|
/* ugh, wrapped! */
|
||||||
|
atomic_dec(&wiphy_counter);
|
||||||
|
kfree(rdev);
|
||||||
|
return NULL;
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
- /* atomic_inc_return makes it start at 1, make it start at 0 */
|
||||||
|
- rdev->wiphy_idx--;
|
||||||
|
+ }
|
||||||
|
+ /* atomic_inc_return makes it start at 1, make it start at 0 */
|
||||||
|
+ rdev->wiphy_idx--;
|
||||||
|
+ }
|
||||||
|
|
||||||
|
/* give it a proper name */
|
||||||
|
if (requested_name && requested_name[0]) {
|
||||||
|
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
|
||||||
|
index c93a4e0..1b3c0d9 100644
|
||||||
|
--- a/net/wireless/nl80211.c
|
||||||
|
+++ b/net/wireless/nl80211.c
|
||||||
|
@@ -970,6 +970,9 @@ static int nl80211_msg_put_channel(struct sk_buff *msg, struct wiphy *wiphy,
|
||||||
|
if ((chan->flags & IEEE80211_CHAN_NO_10MHZ) &&
|
||||||
|
nla_put_flag(msg, NL80211_FREQUENCY_ATTR_NO_10MHZ))
|
||||||
|
goto nla_put_failure;
|
||||||
|
+ if ((chan->flags & IEEE80211_CHAN_SRD) &&
|
||||||
|
+ nla_put_flag(msg, NL80211_FREQUENCY_ATTR_SRD_CHANNEL))
|
||||||
|
+ goto nla_put_failure;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (nla_put_u32(msg, NL80211_FREQUENCY_ATTR_MAX_TX_POWER,
|
||||||
|
@@ -3253,6 +3256,16 @@ static int nl80211_send_iface(struct sk_buff *msg, u32 portid, u32 seq, int flag
|
||||||
|
goto nla_put_failure;
|
||||||
|
}
|
||||||
|
|
||||||
|
+ if (rdev->ops->get_antenna_gain) {
|
||||||
|
+ int dbi = 0, ret;
|
||||||
|
+
|
||||||
|
+ ret = rdev->ops->get_antenna_gain(&rdev->wiphy, &dbi);
|
||||||
|
+ if (ret == 0 &&
|
||||||
|
+ nla_put_u32(msg, NL80211_ATTR_WIPHY_ANTENNA_GAIN,
|
||||||
|
+ DBM_TO_MBM(dbi)))
|
||||||
|
+ goto nla_put_failure;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
wdev_lock(wdev);
|
||||||
|
switch (wdev->iftype) {
|
||||||
|
case NL80211_IFTYPE_AP:
|
||||||
|
diff --git a/net/wireless/reg.c b/net/wireless/reg.c
|
||||||
|
index a2908b8..ed16782 100644
|
||||||
|
--- a/net/wireless/reg.c
|
||||||
|
+++ b/net/wireless/reg.c
|
||||||
|
@@ -68,6 +68,7 @@
|
||||||
|
* channels allowed by the current regulatory domain.
|
||||||
|
*/
|
||||||
|
#define REG_ENFORCE_GRACE_MS 60000
|
||||||
|
+#define REG_CHANNEL_LOW_PWR_DBM 15
|
||||||
|
|
||||||
|
/**
|
||||||
|
* enum reg_request_treatment - regulatory request treatment
|
||||||
|
@@ -1778,11 +1779,21 @@ static void handle_channel(struct wiphy *wiphy,
|
||||||
|
MBI_TO_DBI(power_rule->max_antenna_gain));
|
||||||
|
chan->max_reg_power = (int) MBM_TO_DBM(power_rule->max_eirp);
|
||||||
|
|
||||||
|
+ if (chan->max_reg_power <= REG_CHANNEL_LOW_PWR_DBM) {
|
||||||
|
+ chan->flags |= IEEE80211_CHAN_SRD;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
if (chan->flags & IEEE80211_CHAN_RADAR) {
|
||||||
|
- if (reg_rule->dfs_cac_ms)
|
||||||
|
- chan->dfs_cac_ms = reg_rule->dfs_cac_ms;
|
||||||
|
- else
|
||||||
|
- chan->dfs_cac_ms = IEEE80211_DFS_MIN_CAC_TIME_MS;
|
||||||
|
+ if (reg_rule->dfs_cac_ms)
|
||||||
|
+ chan->dfs_cac_ms = reg_rule->dfs_cac_ms;
|
||||||
|
+ else if (regd->dfs_region == NL80211_DFS_ETSI &&
|
||||||
|
+ chan->center_freq >= 5600 &&
|
||||||
|
+ chan->center_freq <= 5640) {
|
||||||
|
+ /* TDWR channels require 10 min */
|
||||||
|
+ chan->dfs_cac_ms = IEEE80211_DFS_MIN_CAC_TIME_MS * 10;
|
||||||
|
+ } else {
|
||||||
|
+ chan->dfs_cac_ms = IEEE80211_DFS_MIN_CAC_TIME_MS;
|
||||||
|
+ }
|
||||||
|
}
|
||||||
|
|
||||||
|
if (chan->orig_mpwr) {
|
||||||
|
@@ -2314,6 +2325,10 @@ static void handle_channel_custom(struct wiphy *wiphy,
|
||||||
|
}
|
||||||
|
|
||||||
|
chan->max_power = chan->max_reg_power;
|
||||||
|
+
|
||||||
|
+ if (chan->max_reg_power <= REG_CHANNEL_LOW_PWR_DBM) {
|
||||||
|
+ chan->flags |= IEEE80211_CHAN_SRD;
|
||||||
|
+ }
|
||||||
|
}
|
||||||
|
|
||||||
|
static void handle_band_custom(struct wiphy *wiphy,
|
||||||
|
|
@ -0,0 +1,70 @@
|
||||||
|
# Copyright (C) 2017 Khem Raj <raj.khem@gmail.com>
|
||||||
|
# Released under the MIT license (see COPYING.MIT for the terms)
|
||||||
|
|
||||||
|
DESCRIPTION = "Linux Backports"
|
||||||
|
HOMEPAGE = "https://backports.wiki.kernel.org"
|
||||||
|
SECTION = "kernel/modules"
|
||||||
|
LICENSE = "GPLv2"
|
||||||
|
LIC_FILES_CHKSUM = "file://COPYING;md5=bbea815ee2795b2f4230826c0c6b8814"
|
||||||
|
|
||||||
|
inherit module cml1
|
||||||
|
|
||||||
|
SHRT_VER = "${@d.getVar('PV', True).split('-')[0]}"
|
||||||
|
|
||||||
|
SRC_URI = "http://www.kernel.org/pub/linux/kernel/projects/backports/stable/v${SHRT_VER}/backports-${PV}.tar.gz \
|
||||||
|
file://0001-backport-of-build-patches-from-openwrt.patch \
|
||||||
|
file://0002-backport-of-subsys-patches-from-openwrt.patch \
|
||||||
|
file://0003-backport-of-ath-patches-from-openwrt.patch \
|
||||||
|
file://0004-backport-of-rt2x00-patches-from-openwrt.patch \
|
||||||
|
file://0005-backport-of-mwl-patches-from-openwrt.patch \
|
||||||
|
file://0006-backport-of-brcm-patches-from-openwrt.patch \
|
||||||
|
file://0007-backport-of-netmodule-patches-from-openwrt.patch \
|
||||||
|
"
|
||||||
|
|
||||||
|
SRC_URI[sha256sum] = "2b060db29386c6f3fb178df33e0b8256703b7e90f7e3799e8b5a26330ca6fc1e"
|
||||||
|
|
||||||
|
|
||||||
|
S = "${WORKDIR}/backports-${PV}"
|
||||||
|
|
||||||
|
DEPENDS += "coreutils-native flex-native bison-native"
|
||||||
|
|
||||||
|
EXTRA_OEMAKE = "KLIB_BUILD=${STAGING_KERNEL_BUILDDIR} KLIB=${base_libdir}/modules/${KERNEL_VERSION}"
|
||||||
|
KCONFIG_CONFIG_COMMAND = "${EXTRA_OEMAKE} CC=${BUILD_CC} menuconfig"
|
||||||
|
|
||||||
|
MAKE_TARGETS = "modules"
|
||||||
|
|
||||||
|
PACKAGE_CONFIGFILE ?= ""
|
||||||
|
do_configure_prepend() {
|
||||||
|
# Make sure kconf is built to run on the host
|
||||||
|
unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS
|
||||||
|
oe_runmake -C kconf CC=${BUILD_CC} conf
|
||||||
|
# Copy our config as a defconfig
|
||||||
|
|
||||||
|
if [ ! -n "${PACKAGE_CONFIGFILE}" ]; then
|
||||||
|
bbfatal "mac80211: no config file given"
|
||||||
|
fi
|
||||||
|
|
||||||
|
cp ${WORKDIR}/${PACKAGE_CONFIGFILE} ${S}/.config
|
||||||
|
oe_runmake oldconfig
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
# Create a meta package with another name, in this way we can
|
||||||
|
# always build this receipe but only install the modules
|
||||||
|
# when requiered.
|
||||||
|
KERNEL_MODULES_META_PACKAGE = "kernel-module-mac80211"
|
||||||
|
|
||||||
|
FILES_${KERNEL_MODULES_META_PACKAGE} = ""
|
||||||
|
ALLOW_EMPTY_${KERNEL_MODULES_META_PACKAGE} = "1"
|
||||||
|
|
||||||
|
PACKAGES += "${KERNEL_MODULES_META_PACKAGE}"
|
||||||
|
|
||||||
|
PACKAGES_DYNAMIC += "^${KERNEL_PACKAGE_NAME}-module-.*"
|
||||||
|
|
||||||
|
KERNEL_MODULE_AUTOLOAD += "\
|
||||||
|
compat \
|
||||||
|
mac80211 \
|
||||||
|
cfg80211 \
|
||||||
|
"
|
||||||
|
|
||||||
|
|
||||||
Loading…
Reference in New Issue