From: RISCi_ATOM Date: Thu, 23 Mar 2017 22:03:15 +0000 (-0400) Subject: Fresh pull from upstream 17.01 branch X-Git-Tag: v1.4-core-RC1~4 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=b1426a23c685ce07995988682b5421556f104367;p=librecmc%2Flibrecmc.git Fresh pull from upstream 17.01 branch --- diff --git a/Makefile b/Makefile index 5b7fdc963f..b220dfd3c5 100644 --- a/Makefile +++ b/Makefile @@ -14,7 +14,7 @@ export TOPDIR LC_ALL LANG TZ empty:= space:= $(empty) $(empty) -$(if $(findstring $(space),$(TOPDIR)),$(error ERROR: The path to the libreCMC directory must not include any spaces)) +$(if $(findstring $(space),$(TOPDIR)),$(error ERROR: The path to the LEDE directory must not include any spaces)) world: diff --git a/config/Config-build.in b/config/Config-build.in index 9b8e4b2283..e0889fcccf 100644 --- a/config/Config-build.in +++ b/config/Config-build.in @@ -9,7 +9,7 @@ menu "Global build settings" config ALL_NONSHARED bool "Select all target specific packages by default" - default ALL + default ALL || BUILDBOT config ALL_KMODS bool "Select all kernel module packages by default" @@ -19,6 +19,16 @@ menu "Global build settings" bool "Select all userspace packages by default" default n + config BUILDBOT + bool "Set build defaults for automatic builds (e.g. via buildbot)" + default n + help + This option changes several defaults to be more suitable for + automatic builds. This includes the following changes: + - Deleting build directories after compiling (to save space) + - Enabling per-device rootfs support + ... + config SIGNED_PACKAGES bool "Cryptographically signed package lists" default y @@ -61,7 +71,7 @@ menu "Global build settings" bool prompt "Collect kernel debug information" select KERNEL_DEBUG_INFO - default n + default BUILDBOT help This collects debugging symbols from the kernel and all compiled modules. Useful for release builds, so that kernel issues can be debugged offline diff --git a/config/Config-devel.in b/config/Config-devel.in index 938f0b3c9c..1ea66720b8 100644 --- a/config/Config-devel.in +++ b/config/Config-devel.in @@ -59,7 +59,7 @@ menuconfig DEVEL bool "Use ccache" if DEVEL default n help - Compiler cache; see http://ccache.samba.org/. + Compiler cache; see https://ccache.samba.org/ config EXTERNAL_KERNEL_TREE string "Use external kernel tree" if DEVEL diff --git a/config/Config-images.in b/config/Config-images.in index 8e295939d9..f59a33613d 100644 --- a/config/Config-images.in +++ b/config/Config-images.in @@ -201,7 +201,6 @@ menu "Target Images" int "Serial port baud rate" depends on GRUB_IMAGES default 38400 if TARGET_x86_generic - default 38400 if TARGET_x86_geode default 115200 config GRUB_BOOTOPTS diff --git a/config/Config-kernel.in b/config/Config-kernel.in index 3f30013845..a4c46f55ae 100644 --- a/config/Config-kernel.in +++ b/config/Config-kernel.in @@ -26,7 +26,7 @@ config KERNEL_PRINTK config KERNEL_CRASHLOG bool "Crash logging" - depends on !(arm || powerpc || sparc || TARGET_uml) + depends on !(arm || powerpc || sparc || TARGET_uml || i386 || x86_64) default y config KERNEL_SWAP diff --git a/include/autotools.mk b/include/autotools.mk index 63edd5bddd..c6aa47e0be 100644 --- a/include/autotools.mk +++ b/include/autotools.mk @@ -85,11 +85,11 @@ endef define gettext_version_target (cd $(PKG_BUILD_DIR) && \ - GETTEXT_VERSION=$(shell $(STAGING_DIR)/host/bin/gettext -V | $(STAGING_DIR_HOST)/bin/sed -ne '1s/.*\([0-9]\.[0-9]\{2\}\.[0-9]\).*/\1/p' ) && \ + GETTEXT_VERSION=$(shell $(STAGING_DIR_HOSTPKG)/bin/gettext -V | $(STAGING_DIR_HOST)/bin/sed -ne '1s/.*\([0-9]\.[0-9]\{2\}\.[0-9]\).*/\1/p' ) && \ $(STAGING_DIR_HOST)/bin/sed \ -i $(PKG_BUILD_DIR)/configure.ac \ -e "s/AM_GNU_GETTEXT_VERSION(.*)/AM_GNU_GETTEXT_VERSION(\[$$$$GETTEXT_VERSION\])/g" && \ - $(STAGING_DIR)/host/bin/autopoint --force \ + $(STAGING_DIR_HOSTPKG)/bin/autopoint --force \ ); endef diff --git a/include/cmake.mk b/include/cmake.mk index 5f572e9d74..5a403cbf41 100644 --- a/include/cmake.mk +++ b/include/cmake.mk @@ -107,3 +107,7 @@ define Host/Configure/Default $(HOST_CMAKE_SOURCE_DIR) \ ) endef + +MAKE_FLAGS += \ + CMAKE_COMMAND='$$(if $$(CMAKE_DISABLE_$$@),:,$(STAGING_DIR_HOST)/bin/cmake)' \ + CMAKE_DISABLE_cmake_check_build_system=1 diff --git a/include/download.mk b/include/download.mk index 1b981f14b1..ae3167091e 100644 --- a/include/download.mk +++ b/include/download.mk @@ -94,13 +94,10 @@ endif C_md5_deprecated = Use of $(2) is deprecated, switch to $(3) -# Skip MD5SUM check in feeds until OpenWrt is updated -ifneq ($(filter $(foreach dir,package tools toolchain, $(TOPDIR)/$(dir)/%),$(CURDIR)),) check_md5 = \ $(if $(filter-out x,$(1)), \ $(call check_warn,md5_deprecated,$(1),$(2),$(3)) \ ) -endif hash_var = $(if $(filter-out x,$(1)),MD5SUM,HASH) endif diff --git a/include/feeds.mk b/include/feeds.mk index 2ff57e5762..054b5aa796 100644 --- a/include/feeds.mk +++ b/include/feeds.mk @@ -10,7 +10,7 @@ FEEDS_INSTALLED:=$(notdir $(wildcard $(TOPDIR)/package/feeds/*)) FEEDS_AVAILABLE:=$(sort $(FEEDS_INSTALLED) $(shell $(SCRIPT_DIR)/feeds list -n)) -FEEDS_ENABLED:=$(foreach feed,$(FEEDS_INSTALLED),$(if $(CONFIG_FEED_$(feed)),$(feed))) +FEEDS_ENABLED:=$(foreach feed,$(FEEDS_AVAILABLE),$(if $(CONFIG_FEED_$(feed)),$(feed))) FEEDS_DISABLED:=$(filter-out $(FEEDS_ENABLED),$(FEEDS_AVAILABLE)) PACKAGE_SUBDIRS=$(PACKAGE_DIR) diff --git a/include/host-build.mk b/include/host-build.mk index 5cfbdeba51..70bf6e5a39 100644 --- a/include/host-build.mk +++ b/include/host-build.mk @@ -67,6 +67,12 @@ HOST_CONFIGURE_ARGS = \ --localstatedir=$(HOST_BUILD_PREFIX)/var \ --sbindir=$(HOST_BUILD_PREFIX)/bin +HOST_MAKE_VARS = \ + CFLAGS="$(HOST_CFLAGS)" \ + CPPFLAGS="$(HOST_CPPFLAGS)" \ + CXXFLAGS="$(HOST_CXXFLAGS)" \ + LDFLAGS="$(HOST_LDFLAGS)" + HOST_MAKE_FLAGS = HOST_CONFIGURE_CMD = $(BASH) ./configure @@ -89,7 +95,8 @@ define Host/Configure endef define Host/Compile/Default - +$(MAKE) $(HOST_JOBS) -C $(HOST_BUILD_DIR) \ + +$(HOST_MAKE_VARS) \ + $(MAKE) $(HOST_JOBS) -C $(HOST_BUILD_DIR) \ $(HOST_MAKE_FLAGS) \ $(1) endef diff --git a/include/image-commands.mk b/include/image-commands.mk index a7acd0ee67..04fa853fbb 100644 --- a/include/image-commands.mk +++ b/include/image-commands.mk @@ -59,7 +59,7 @@ define Build/fit -D $(DEVICE_NAME) -o $@.its -k $@ \ $(if $(word 2,$(1)),-d $(word 2,$(1))) -C $(word 1,$(1)) \ -a $(KERNEL_LOADADDR) -e $(if $(KERNEL_ENTRY),$(KERNEL_ENTRY),$(KERNEL_LOADADDR)) \ - -A $(ARCH) -v $(LINUX_VERSION) + -A $(LINUX_KARCH) -v $(LINUX_VERSION) PATH=$(LINUX_DIR)/scripts/dtc:$(PATH) mkimage -f $@.its $@.new @mv $@.new $@ endef diff --git a/include/image.mk b/include/image.mk index 3daee35c48..81519cd183 100644 --- a/include/image.mk +++ b/include/image.mk @@ -143,10 +143,17 @@ endef define Image/BuildKernel/MkFIT $(TOPDIR)/scripts/mkits.sh \ -D $(1) -o $(KDIR)/fit-$(1).its -k $(2) $(if $(3),-d $(3)) -C $(4) -a $(5) -e $(6) \ - -A $(ARCH) -v $(LINUX_VERSION) + -A $(LINUX_KARCH) -v $(LINUX_VERSION) PATH=$(LINUX_DIR)/scripts/dtc:$(PATH) mkimage -f $(KDIR)/fit-$(1).its $(KDIR)/fit-$(1)$(7).itb endef +ifdef CONFIG_TARGET_IMAGES_GZIP + define Image/Gzip + rm -f $(1).gz + gzip -9n $(1) + endef +endif + # $(1) source dts file # $(2) target dtb file # $(3) extra CPP flags @@ -445,7 +452,8 @@ define Device/Build/kernel endef define Device/Build/image - $$(_TARGET): $(BIN_DIR)/$(call IMAGE_NAME,$(1),$(2)) + GZ_SUFFIX := $(if $(filter %dtb %gz,$(2)),,$(if $(and $(findstring ext4,$(1)),$(CONFIG_TARGET_IMAGES_GZIP)),.gz)) + $$(_TARGET): $(BIN_DIR)/$(call IMAGE_NAME,$(1),$(2))$$(GZ_SUFFIX) $(eval $(call Device/Export,$(KDIR)/tmp/$(call IMAGE_NAME,$(1),$(2)),$(1))) ROOTFS/$(1)/$(3) := \ $(KDIR)/root.$(1)$$(strip \ @@ -462,6 +470,10 @@ define Device/Build/image $$(call concat_cmd,$(if $(IMAGE/$(2)/$(1)),$(IMAGE/$(2)/$(1)),$(IMAGE/$(2)))) .IGNORE: $(BIN_DIR)/$(call IMAGE_NAME,$(1),$(2)) + + $(BIN_DIR)/$(call IMAGE_NAME,$(1),$(2)).gz: $(KDIR)/tmp/$(call IMAGE_NAME,$(1),$(2)) + gzip -c -9n $$^ > $$@ + $(BIN_DIR)/$(call IMAGE_NAME,$(1),$(2)): $(KDIR)/tmp/$(call IMAGE_NAME,$(1),$(2)) cp $$^ $$@ diff --git a/include/kernel-build.mk b/include/kernel-build.mk index 2bf47b17e4..32da94babc 100644 --- a/include/kernel-build.mk +++ b/include/kernel-build.mk @@ -60,7 +60,7 @@ define Download/git-kernel PROTO:=git VERSION:=$(CONFIG_KERNEL_GIT_BRANCH) FILE:=$(LINUX_SOURCE) - SUBDIR:=linux-$(KERNEL_PATCHVER) + SUBDIR:=linux-$(LINUX_VERSION) OPTS:=$(KERNEL_GIT_OPTS) endef diff --git a/include/kernel-version.mk b/include/kernel-version.mk index 7520ce388b..db34f43a41 100644 --- a/include/kernel-version.mk +++ b/include/kernel-version.mk @@ -3,10 +3,10 @@ LINUX_RELEASE?=1 LINUX_VERSION-3.18 = .43 -LINUX_VERSION-4.4 = .40 +LINUX_VERSION-4.4 = .52 -LINUX_KERNEL_HASH-3.18.43 = 648a61fb3b1d09a14f50a9ced13977302d57b32e2826877950071dc70541f918 -LINUX_KERNEL_HASH-4.4.40 = a3c006893966ec9bee23edb41eebbe2cf0481efe205bf037ee0cc43ce427fc22 +LINUX_KERNEL_HASH-3.18.43 = +LINUX_KERNEL_HASH-4.4.52 = 0f1faafdae47da5f29e740ff655f91c2eb13c8cdfc4d039d903176bd56c2ecbb ifdef KERNEL_PATCHVER LINUX_VERSION:=$(KERNEL_PATCHVER)$(strip $(LINUX_VERSION-$(KERNEL_PATCHVER))) diff --git a/include/package-ipkg.mk b/include/package-ipkg.mk index e168eb390f..d9b6f77cc4 100644 --- a/include/package-ipkg.mk +++ b/include/package-ipkg.mk @@ -209,11 +209,13 @@ $(_endef) ( \ echo "#!/bin/sh"; \ echo "[ \"\$$$${IPKG_NO_SCRIPT}\" = \"1\" ] && exit 0"; \ + echo "[ -x "\$$$${IPKG_INSTROOT}/lib/functions.sh" ] || exit 0"; \ echo ". \$$$${IPKG_INSTROOT}/lib/functions.sh"; \ echo "default_postinst \$$$$0 \$$$$@"; \ ) > postinst; \ ( \ echo "#!/bin/sh"; \ + echo "[ -x "\$$$${IPKG_INSTROOT}/lib/functions.sh" ] || exit 0"; \ echo ". \$$$${IPKG_INSTROOT}/lib/functions.sh"; \ echo "default_prerm \$$$$0 \$$$$@"; \ ) > prerm; \ diff --git a/include/rootfs.mk b/include/rootfs.mk index 90d70a11f2..c014b1d14a 100644 --- a/include/rootfs.mk +++ b/include/rootfs.mk @@ -47,6 +47,14 @@ opkg = \ TARGET_DIR_ORIG := $(TARGET_ROOTFS_DIR)/root.orig-$(BOARD) +ifdef CONFIG_CLEAN_IPKG + define clean_ipkg + -find $(1)/usr/lib/opkg -type f -and -not -name '*.control' | $(XARGS) rm -rf + -sed -i -ne '/^Require-User: /p' $(1)/usr/lib/opkg/info/*.control + -find $(1)/usr/lib/opkg -empty | $(XARGS) rm -rf + endef +endif + define prepare_rootfs @if [ -d $(TOPDIR)/files ]; then \ $(call file_copy,$(TOPDIR)/files/.,$(1)); \ @@ -75,6 +83,6 @@ define prepare_rootfs rm -f $(1)/usr/lib/opkg/lists/* rm -f $(1)/usr/lib/opkg/info/*.postinst* rm -f $(1)/usr/lib/opkg/info/*.prerm* - $(if $(CONFIG_CLEAN_IPKG),rm -rf $(1)/usr/lib/opkg) + $(call clean_ipkg,$(1)) $(call mklibs,$(1)) endef diff --git a/include/target.mk b/include/target.mk index a8d3b2b249..30994485e1 100644 --- a/include/target.mk +++ b/include/target.mk @@ -13,7 +13,7 @@ __target_inc=1 DEVICE_TYPE?=router # Default packages - the really basic set -DEFAULT_PACKAGES:=base-files libc libgcc busybox dropbear mtd uci opkg netifd fstools uclient-fetch +DEFAULT_PACKAGES:=base-files libc libgcc busybox dropbear mtd uci opkg netifd fstools uclient-fetch logd # For nas targets DEFAULT_PACKAGES.nas:=block-mount fdisk lsblk mdadm # For router targets @@ -164,17 +164,15 @@ ifeq ($(DUMP),1) endif CPU_CFLAGS += -mno-branch-likely CPU_CFLAGS_mips32 = -mips32 -mtune=mips32 - CPU_CFLAGS_mips32r2 = -mips32r2 -mtune=mips32r2 CPU_CFLAGS_mips64 = -mips64 -mtune=mips64 -mabi=64 CPU_CFLAGS_24kc = -mips32r2 -mtune=24kc CPU_CFLAGS_74kc = -mips32r2 -mtune=74kc CPU_CFLAGS_octeon = -march=octeon -mabi=64 endif ifeq ($(ARCH),i386) - CPU_TYPE ?= i486 - CPU_CFLAGS_i486 = -march=i486 + CPU_TYPE ?= pentium + CPU_CFLAGS_pentium = -march=pentium-mmx CPU_CFLAGS_pentium4 = -march=pentium4 - CPU_CFLAGS_geode = -march=geode -mmmx -m3dnow endif ifneq ($(findstring arm,$(ARCH)),) CPU_TYPE ?= xscale @@ -259,6 +257,9 @@ ifeq ($(DUMP),1) ifneq ($(CONFIG_VIRTIO),) FEATURES += virtio endif + ifneq ($(CONFIG_CPU_MIPS32_R2),) + FEATURES += mips16 + endif FEATURES += $(foreach v,6 7,$(if $(CONFIG_CPU_V$(v)),arm_v$(v))) # remove duplicates diff --git a/package/base-files/Makefile b/package/base-files/Makefile index 2c81287bad..58bc7d4b3c 100644 --- a/package/base-files/Makefile +++ b/package/base-files/Makefile @@ -11,7 +11,7 @@ include $(INCLUDE_DIR)/kernel.mk include $(INCLUDE_DIR)/version.mk PKG_NAME:=base-files -PKG_RELEASE:=171 +PKG_RELEASE:=172 PKG_FLAGS:=nonshared PKG_FILE_DEPENDS:=$(PLATFORM_DIR)/ $(GENERIC_PLATFORM_DIR)/base-files/ @@ -31,7 +31,7 @@ define Package/base-files SECTION:=base CATEGORY:=Base system DEPENDS:=+netifd +libc +procd +jsonfilter +SIGNED_PACKAGES:usign +SIGNED_PACKAGES:lede-keyring +fstools +fwtool - TITLE:=Base filesystem for Lede + TITLE:=Base filesystem for libreCMC URL:=http://openwrt.org/ VERSION:=$(PKG_RELEASE)-$(REVISION) endef @@ -57,6 +57,7 @@ define Package/base-files/conffiles /etc/sysctl.d/local.conf /etc/sysctl.d/ /etc/iproute2/rt_tables +/etc/iproute2/rt_protos $(call $(TARGET)/conffiles) endef diff --git a/package/base-files/files/etc/init.d/system b/package/base-files/files/etc/init.d/system index 0d243a8a99..8c5f677299 100755 --- a/package/base-files/files/etc/init.d/system +++ b/package/base-files/files/etc/init.d/system @@ -7,7 +7,7 @@ USE_PROCD=1 validate_system_section() { uci_validate_section system system "${1}" \ - 'hostname:string:libreCMC' \ + 'hostname:string:lede' \ 'conloglevel:uinteger' \ 'buffersize:uinteger' \ 'timezone:string:UTC' \ diff --git a/package/base-files/files/etc/iproute2/rt_protos b/package/base-files/files/etc/iproute2/rt_protos new file mode 100644 index 0000000000..5b61798aec --- /dev/null +++ b/package/base-files/files/etc/iproute2/rt_protos @@ -0,0 +1,18 @@ +# +# Reserved protocols. +# +0 unspec +1 redirect +2 kernel +3 boot +4 static +8 gated +9 ra +10 mrt +11 zebra +12 bird +13 dnrouted +14 xorp +15 ntk +16 dhcp +42 babel diff --git a/package/base-files/files/etc/openwrt_release b/package/base-files/files/etc/openwrt_release index 46ad63209f..da86208f7f 100644 --- a/package/base-files/files/etc/openwrt_release +++ b/package/base-files/files/etc/openwrt_release @@ -3,5 +3,6 @@ DISTRIB_RELEASE='%V' DISTRIB_REVISION='%R' DISTRIB_CODENAME='%n' DISTRIB_TARGET='%S' +DISTRIB_ARCH='%A' DISTRIB_DESCRIPTION='%D %N %V %C' DISTRIB_TAINTS='%t' diff --git a/package/base-files/files/etc/uci-defaults/13_fix_group_user b/package/base-files/files/etc/uci-defaults/13_fix_group_user index deade5bbd1..e6dae2419f 100644 --- a/package/base-files/files/etc/uci-defaults/13_fix_group_user +++ b/package/base-files/files/etc/uci-defaults/13_fix_group_user @@ -2,7 +2,7 @@ . /lib/functions.sh -for file in `grep Require-User /usr/lib/opkg/info/*.control | cut -d: -f1`; do +for file in `grep -sl Require-User /usr/lib/opkg/info/*.control`; do file="${file##*/}" file="${file%.control}" add_group_and_user "${file}" diff --git a/package/base-files/files/lib/preinit/10_sysinfo b/package/base-files/files/lib/preinit/10_sysinfo index be1e6aeca9..65b50968e2 100644 --- a/package/base-files/files/lib/preinit/10_sysinfo +++ b/package/base-files/files/lib/preinit/10_sysinfo @@ -3,7 +3,7 @@ do_sysinfo_generic() { mkdir -p /tmp/sysinfo [ -e /tmp/sysinfo/board_name ] || \ echo "$(strings /proc/device-tree/compatible | head -1)" > /tmp/sysinfo/board_name - [ -n /tmp/sysinfo/model -a -e /proc/device-tree/model ] && \ + [ ! -e /tmp/sysinfo/model -a -e /proc/device-tree/model ] && \ echo "$(cat /proc/device-tree/model)" > /tmp/sysinfo/model } diff --git a/package/base-files/files/sbin/wifi b/package/base-files/files/sbin/wifi index f2845c82f6..83befc0d6f 100755 --- a/package/base-files/files/sbin/wifi +++ b/package/base-files/files/sbin/wifi @@ -6,8 +6,8 @@ usage() { cat <&2 echo "WARNING: Wifi detect is deprecated. Use wifi config instead" + >&2 echo "For more information, see commit 5f8f8a366136a07df661e31decce2458357c167a" + exit 1 +} + wifi_config() { [ ! -f /etc/config/wireless ] && touch /etc/config/wireless @@ -229,7 +235,7 @@ scan_wifi case "$1" in down) wifi_updown "disable" "$2";; - detect) ;; + detect) wifi_detect_notice ;; config) wifi_config ;; status) ubus_wifi_cmd "status" "$2";; reload) wifi_reload "$2";; diff --git a/package/base-files/files/usr/lib/os-release b/package/base-files/files/usr/lib/os-release index 79b08d16cf..21abf969e1 100644 --- a/package/base-files/files/usr/lib/os-release +++ b/package/base-files/files/usr/lib/os-release @@ -9,6 +9,7 @@ BUG_URL="%b" SUPPORT_URL="%s" BUILD_ID="%R" LEDE_BOARD="%S" +LEDE_ARCH="%A" LEDE_TAINTS="%t" LEDE_DEVICE_MANUFACTURER="%M" LEDE_DEVICE_MANUFACTURER_URL="%m" diff --git a/package/base-files/image-config.in b/package/base-files/image-config.in index abcc5a0108..3cdb6df0c2 100644 --- a/package/base-files/image-config.in +++ b/package/base-files/image-config.in @@ -92,7 +92,7 @@ config TARGET_PREINIT_NETMASK config TARGET_PREINIT_BROADCAST string prompt "Broadcast address for preinit network messages" if PREINITOPT - default "192.168.10.255" + default "192.168.1.255" help Broadcast address to which to send preinit network messages, as as failsafe messages @@ -190,7 +190,7 @@ if VERSIONOPT config VERSION_REPO string prompt "Release repository" - default "http://downloads.lede-project.org/snapshots" + default "http://downloads.lede-project.org/releases/17.01-SNAPSHOT" help This is the repository address embedded in the image, it defaults to the trunk snapshot repo; the url may contain the following placeholders: @@ -286,7 +286,7 @@ menuconfig PER_FEED_REPO config PER_FEED_REPO_ADD_COMMENTED bool "Comment out not enabled feeds" - default y + default !BUILDBOT depends on PER_FEED_REPO && PER_FEED_REPO_ADD_DISABLED help Add not enabled feeds as commented out source lines to opkg.conf. diff --git a/package/boot/apex/Makefile b/package/boot/apex/Makefile new file mode 100644 index 0000000000..fb3c77c37c --- /dev/null +++ b/package/boot/apex/Makefile @@ -0,0 +1,62 @@ +# +# Copyright (C) 2006-2011 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk +include $(INCLUDE_DIR)/kernel.mk + +PKG_NAME:=apex +PKG_VERSION:=1.6.9 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://downloads.openwrt.org/sources/ +PKG_HASH:=1d2bc04c2c6bb3d2d6c1916b6dc559cda2b1ecb045d7801fd49af6af4234abeb +PKG_TARGETS:=bin + +include $(INCLUDE_DIR)/package.mk + +export GCC_HONOUR_COPTS=s + +define Package/apex + SECTION:=boot + CATEGORY:=Boot Loaders + DEPENDS:=@TARGET_ixp4xx + DEFAULT:=y + TITLE:=Boot loader for NSLU2, FSG3, NAS100D and others + URL:=http://wiki.buici.com/wiki/Apex_Bootloader +endef + +define build_apex + $(MAKE) -C $(PKG_BUILD_DIR) \ + ARCH=arm \ + $(1)_config + $(MAKE) -C $(PKG_BUILD_DIR) \ + $(TARGET_CONFIGURE_OPTS) \ + KBUILD_HAVE_NLS=no \ + ARCH=arm \ + clean all + $(INSTALL_BIN) $(PKG_BUILD_DIR)/apex.bin $(PKG_BUILD_DIR)/out/apex-$(2).bin +endef + +define Build/Compile + $(INSTALL_DIR) $(PKG_BUILD_DIR)/out + $(call build_apex,slugos-nslu2-armeb,nslu2-armeb) + $(call build_apex,slugos-nslu2-16mb-armeb,nslu2-16mb-armeb) + $(call build_apex,slugos-fsg3-armeb,fsg3-armeb) + $(call build_apex,slugos-nas100d-armeb,nas100d-armeb) +endef + +define Package/apex/install + $(INSTALL_DIR) $(STAGING_DIR)/apex + $(CP) $(PKG_BUILD_DIR)/out/*.bin $(1)/ +endef + +define Build/InstallDev + $(CP) $(PKG_BUILD_DIR)/out/*.bin $(KERNEL_BUILD_DIR) +endef + +$(eval $(call BuildPackage,apex)) diff --git a/package/boot/apex/patches/001-compile_fix.patch b/package/boot/apex/patches/001-compile_fix.patch new file mode 100644 index 0000000000..8a25de6570 --- /dev/null +++ b/package/boot/apex/patches/001-compile_fix.patch @@ -0,0 +1,20 @@ +--- a/Makefile ++++ b/Makefile +@@ -444,7 +444,7 @@ ifeq ($(config-targets),1) + include $(srctree)/src/arch-$(SRCARCH)/Makefile + export KBUILD_DEFCONFIG + +-config %config: scripts_basic outputmakefile FORCE ++%config: scripts_basic outputmakefile FORCE + $(Q)mkdir -p include/linux include/config + $(Q)$(MAKE) $(build)=scripts/kconfig $@ + +@@ -1585,7 +1585,7 @@ endif + $(Q)$(MAKE) $(build)=$(build-dir) $(target-dir)$(notdir $@) + + # Modules +-/ %/: prepare scripts FORCE ++%/: prepare scripts FORCE + $(cmd_crmodverdir) + $(Q)$(MAKE) KBUILD_MODULES=$(if $(CONFIG_MODULES),1) \ + $(build)=$(build-dir) diff --git a/package/boot/apex/patches/100-openwrt_nslu2_armeb_config.patch b/package/boot/apex/patches/100-openwrt_nslu2_armeb_config.patch new file mode 100644 index 0000000000..d598ff3287 --- /dev/null +++ b/package/boot/apex/patches/100-openwrt_nslu2_armeb_config.patch @@ -0,0 +1,23 @@ +--- a/src/mach-ixp42x/slugos-nslu2-armeb_config ++++ b/src/mach-ixp42x/slugos-nslu2-armeb_config +@@ -19,7 +19,7 @@ CONFIG_EXPERIMENTAL=y + # + # General Setup + # +-CONFIG_TARGET_DESCRIPTION="SlugOS NSLU2 (bigendian)" ++CONFIG_TARGET_DESCRIPTION="OpenWrt NSLU2 (8MiB Flash)" + CONFIG_CROSS_COMPILE="" + CONFIG_AEABI=y + # CONFIG_DRIVER_LONG_LONG_SIZE is not set +@@ -163,9 +163,9 @@ CONFIG_ENV_REGION_KERNEL_ALT="fis://kern + # Overrides + # + CONFIG_ENV_DEFAULT_CMDLINE_OVERRIDE=y +-CONFIG_ENV_DEFAULT_CMDLINE="root=/dev/mtdblock4 rootfstype=jffs2 console=ttyS0,115200 init=/linuxrc" ++CONFIG_ENV_DEFAULT_CMDLINE="root=/dev/mtdblock4 rootfstype=squashfs,jffs2 console=ttyS0,115200 init=/etc/preinit noinitrd" + CONFIG_ENV_DEFAULT_CMDLINE_ALT_P=y +-CONFIG_ENV_DEFAULT_CMDLINE_ALT="root=/dev/mtdblock4 rootfstype=jffs2 console=ttyS0,115200 init=/linuxrc" ++CONFIG_ENV_DEFAULT_CMDLINE_ALT="root=/dev/mtdblock4 rootfstype=squashfs,jffs2 console=ttyS0,115200 init=/etc/preinit noinitrd" + # CONFIG_ENV_DEFAULT_STARTUP_OVERRIDE is not set + # CONFIG_ENV_DEFAULT_STARTUP_ALT_P is not set + CONFIG_USES_NOR_BOOTFLASH=y diff --git a/package/boot/apex/patches/120-openwrt_nslu2_16mb_armeb_config.patch b/package/boot/apex/patches/120-openwrt_nslu2_16mb_armeb_config.patch new file mode 100644 index 0000000000..5e7ecee27c --- /dev/null +++ b/package/boot/apex/patches/120-openwrt_nslu2_16mb_armeb_config.patch @@ -0,0 +1,23 @@ +--- a/src/mach-ixp42x/slugos-nslu2-16mb-armeb_config ++++ b/src/mach-ixp42x/slugos-nslu2-16mb-armeb_config +@@ -19,7 +19,7 @@ CONFIG_EXPERIMENTAL=y + # + # General Setup + # +-CONFIG_TARGET_DESCRIPTION="SlugOS NSLU2/BE (16MiB Flash)" ++CONFIG_TARGET_DESCRIPTION="OpenWrt NSLU2 (16MiB Flash)" + CONFIG_CROSS_COMPILE="" + CONFIG_AEABI=y + # CONFIG_DRIVER_LONG_LONG_SIZE is not set +@@ -163,9 +163,9 @@ CONFIG_ENV_REGION_KERNEL_ALT="fis://kern + # Overrides + # + CONFIG_ENV_DEFAULT_CMDLINE_OVERRIDE=y +-CONFIG_ENV_DEFAULT_CMDLINE="root=/dev/mtdblock4 rootfstype=jffs2 console=ttyS0,115200 init=/linuxrc" ++CONFIG_ENV_DEFAULT_CMDLINE="root=/dev/mtdblock4 rootfstype=squashfs,jffs2 console=ttyS0,115200 init=/etc/preinit noinitrd" + CONFIG_ENV_DEFAULT_CMDLINE_ALT_P=y +-CONFIG_ENV_DEFAULT_CMDLINE_ALT="root=/dev/mtdblock4 rootfstype=jffs2 console=ttyS0,115200 init=/linuxrc" ++CONFIG_ENV_DEFAULT_CMDLINE_ALT="root=/dev/mtdblock4 rootfstype=squashfs,jffs2 console=ttyS0,115200 init=/etc/preinit noinitrd" + # CONFIG_ENV_DEFAULT_STARTUP_OVERRIDE is not set + # CONFIG_ENV_DEFAULT_STARTUP_ALT_P is not set + CONFIG_USES_NOR_BOOTFLASH=y diff --git a/package/boot/apex/patches/140-openwrt_fsg3_armeb_config.patch b/package/boot/apex/patches/140-openwrt_fsg3_armeb_config.patch new file mode 100644 index 0000000000..fc0e8b9f3d --- /dev/null +++ b/package/boot/apex/patches/140-openwrt_fsg3_armeb_config.patch @@ -0,0 +1,23 @@ +--- a/src/mach-ixp42x/slugos-fsg3-armeb_config ++++ b/src/mach-ixp42x/slugos-fsg3-armeb_config +@@ -17,7 +17,7 @@ CONFIG_EXPERIMENTAL=y + # + # General Setup + # +-CONFIG_TARGET_DESCRIPTION="SlugOS FSG3/BE" ++CONFIG_TARGET_DESCRIPTION="OpenWrt FSG3" + CONFIG_CROSS_COMPILE="" + CONFIG_AEABI=y + CONFIG_CC_OPTIMIZE_FOR_SIZE=y +@@ -148,9 +148,9 @@ CONFIG_ENV_REGION_KERNEL_ALT="fis://kern + # Overrides + # + CONFIG_ENV_DEFAULT_CMDLINE_OVERRIDE=y +-CONFIG_ENV_DEFAULT_CMDLINE="root=/dev/sda1 rootdelay=10 console=ttyS0,115200" ++CONFIG_ENV_DEFAULT_CMDLINE="root=/dev/sda1 rootdelay=10 console=ttyS0,115200 init=/etc/preinit noinitrd" + CONFIG_ENV_DEFAULT_CMDLINE_ALT_P=y +-CONFIG_ENV_DEFAULT_CMDLINE_ALT="root=/dev/sda2 rootdelay=10 console=ttyS0,115200" ++CONFIG_ENV_DEFAULT_CMDLINE_ALT="root=/dev/mtdblock2 rootfstype=squashfs console=ttyS0,115200 init=/etc/preinit noinitrd" + # CONFIG_ENV_DEFAULT_STARTUP_OVERRIDE is not set + # CONFIG_ENV_DEFAULT_STARTUP_ALT_P is not set + CONFIG_USES_NOR_BOOTFLASH=y diff --git a/package/boot/apex/patches/150-limit_ram_to_64mb.patch b/package/boot/apex/patches/150-limit_ram_to_64mb.patch new file mode 100644 index 0000000000..3e178166e1 --- /dev/null +++ b/package/boot/apex/patches/150-limit_ram_to_64mb.patch @@ -0,0 +1,22 @@ +--- a/src/mach-ixp42x/slugos-nslu2-armeb_config ++++ b/src/mach-ixp42x/slugos-nslu2-armeb_config +@@ -137,7 +137,7 @@ CONFIG_AUTOBOOT_DELAY=10 + CONFIG_ENV_STARTUP_KERNEL_COPY=y + # CONFIG_ENV_REGION_KERNEL_SWAP is not set + CONFIG_ENV_STARTUP_PREFIX_P=y +-CONFIG_ENV_STARTUP_PREFIX="sdram-init; memscan -u 0+256m" ++CONFIG_ENV_STARTUP_PREFIX="sdram-init; memscan -u 0+64m" + + # + # Regions +--- a/src/mach-ixp42x/slugos-nslu2-16mb-armeb_config ++++ b/src/mach-ixp42x/slugos-nslu2-16mb-armeb_config +@@ -137,7 +137,7 @@ CONFIG_AUTOBOOT_DELAY=10 + CONFIG_ENV_STARTUP_KERNEL_COPY=y + # CONFIG_ENV_REGION_KERNEL_SWAP is not set + CONFIG_ENV_STARTUP_PREFIX_P=y +-CONFIG_ENV_STARTUP_PREFIX="sdram-init; memscan -u 0+256m" ++CONFIG_ENV_STARTUP_PREFIX="sdram-init; memscan -u 0+64m" + + # + # Regions diff --git a/package/boot/apex/patches/160-openwrt_nas100d_armeb_config.patch b/package/boot/apex/patches/160-openwrt_nas100d_armeb_config.patch new file mode 100644 index 0000000000..e190964857 --- /dev/null +++ b/package/boot/apex/patches/160-openwrt_nas100d_armeb_config.patch @@ -0,0 +1,20 @@ +--- a/src/mach-ixp42x/slugos-nas100d-armeb_config ++++ b/src/mach-ixp42x/slugos-nas100d-armeb_config +@@ -19,7 +19,7 @@ CONFIG_EXPERIMENTAL=y + # + # General Setup + # +-CONFIG_TARGET_DESCRIPTION="SlugOS NAS100D/BE" ++CONFIG_TARGET_DESCRIPTION="OpenWrt NAS100D" + CONFIG_CROSS_COMPILE="" + CONFIG_AEABI=y + # CONFIG_DRIVER_LONG_LONG_SIZE is not set +@@ -158,7 +158,7 @@ CONFIG_ENV_REGION_KERNEL="fis://kernel" + # Overrides + # + CONFIG_ENV_DEFAULT_CMDLINE_OVERRIDE=y +-CONFIG_ENV_DEFAULT_CMDLINE="root=/dev/mtdblock2 rootfstype=jffs2 console=ttyS0,115200 init=/linuxrc" ++CONFIG_ENV_DEFAULT_CMDLINE="root=/dev/mtdblock2 rootfstype=squashfs,jffs2 console=ttyS0,115200 init=/etc/preinit noinitrd" + # CONFIG_ENV_DEFAULT_STARTUP_OVERRIDE is not set + CONFIG_USES_NOR_BOOTFLASH=y + CONFIG_RELOCATE_SIMPLE=y diff --git a/package/boot/fconfig/Makefile b/package/boot/fconfig/Makefile index 077c6e4889..3c33d73c69 100644 --- a/package/boot/fconfig/Makefile +++ b/package/boot/fconfig/Makefile @@ -13,7 +13,7 @@ PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=http://andrzejekiert.ovh.org/software/fconfig/ -PKG_MD5SUM:=dac355e9f2a0f48c414c52e2034b6346 +PKG_HASH:=4ff0e8f07e35e46b705c0dbe9d9544ede01ea092a69e3f7db03e55a3f2bb8eb7 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME) diff --git a/package/boot/grub2/Makefile b/package/boot/grub2/Makefile index 02e6637c32..fde4b1276d 100644 --- a/package/boot/grub2/Makefile +++ b/package/boot/grub2/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/kernel.mk PKG_NAME:=grub -PKG_VERSION:=2.02~beta2 +PKG_VERSION:=2.02~rc1 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz @@ -17,13 +17,16 @@ PKG_SOURCE_URL:=http://alpha.gnu.org/gnu/grub \ http://gnualpha.uib.no/grub/ \ http://mirrors.fe.up.pt/pub/gnu-alpha/grub/ \ http://www.nic.funet.fi/pub/gnu/alpha/gnu/grub/ -PKG_MD5SUM:=be62932eade308a364ea4bbc91295930 +PKG_HASH:=445239e9b96d1143c194c1d37851cf4196b83701c60172e49665e9d453d80278 +PKG_FIXUP:=autoreconf HOST_BUILD_PARALLEL:=1 PKG_BUILD_DEPENDS:=grub2/host PKG_SSP:=0 +PKG_FLAGS:=nonshared + include $(INCLUDE_DIR)/host-build.mk include $(INCLUDE_DIR)/package.mk @@ -50,6 +53,9 @@ endef HOST_BUILD_PREFIX := $(STAGING_DIR_HOST) +CONFIGURE_VARS += \ + grub_build_mkfont_excuse="don't want fonts" + CONFIGURE_ARGS += \ --target=$(REAL_GNU_TARGET_NAME) \ --disable-werror \ @@ -58,7 +64,11 @@ CONFIGURE_ARGS += \ --disable-libzfs \ --disable-grub-mkfont +HOST_CONFIGURE_VARS += \ + grub_build_mkfont_excuse="don't want fonts" + HOST_CONFIGURE_ARGS += \ + --disable-grub-mkfont \ --target=$(REAL_GNU_TARGET_NAME) \ --sbindir="$(STAGING_DIR_HOST)/bin" \ --disable-werror \ diff --git a/package/boot/grub2/patches/100-grub_setup_root.patch b/package/boot/grub2/patches/100-grub_setup_root.patch index 9619c410b8..f053ba95e2 100644 --- a/package/boot/grub2/patches/100-grub_setup_root.patch +++ b/package/boot/grub2/patches/100-grub_setup_root.patch @@ -17,7 +17,7 @@ int force; int fs_probe; int allow_floppy; -@@ -178,6 +181,13 @@ argp_parser (int key, char *arg, struct +@@ -178,6 +181,13 @@ argp_parser (int key, char *arg, struct argp_state *state) arguments->dev_map = xstrdup (arg); break; @@ -42,7 +42,7 @@ --- a/util/setup.c +++ b/util/setup.c -@@ -247,13 +247,12 @@ identify_partmap (grub_disk_t disk __att +@@ -247,13 +247,12 @@ identify_partmap (grub_disk_t disk __attribute__ ((unused)), void SETUP (const char *dir, const char *boot_file, const char *core_file, @@ -69,7 +69,7 @@ char **root_devices = grub_guess_root_devices (dir); char **cur; int found = 0; -@@ -317,6 +319,8 @@ SETUP (const char *dir, +@@ -320,6 +322,8 @@ SETUP (const char *dir, char *drive; grub_device_t try_dev; @@ -80,7 +80,7 @@ continue; --- a/include/grub/util/install.h +++ b/include/grub/util/install.h -@@ -182,13 +182,13 @@ grub_install_get_image_target (const cha +@@ -184,13 +184,13 @@ grub_install_get_image_target (const char *arg); void grub_util_bios_setup (const char *dir, const char *boot_file, const char *core_file, @@ -98,7 +98,7 @@ --- a/util/grub-install.c +++ b/util/grub-install.c -@@ -1660,7 +1660,7 @@ main (int argc, char *argv[]) +@@ -1673,7 +1673,7 @@ main (int argc, char *argv[]) /* Now perform the installation. */ if (install_bootsector) grub_util_bios_setup (platdir, "boot.img", "core.img", @@ -107,12 +107,12 @@ fs_probe, allow_floppy, add_rs_codes); break; } -@@ -1686,7 +1686,7 @@ main (int argc, char *argv[]) +@@ -1699,7 +1699,7 @@ main (int argc, char *argv[]) /* Now perform the installation. */ if (install_bootsector) grub_util_sparc_setup (platdir, "boot.img", "core.img", -- install_device, force, -+ NULL, install_device, force, +- install_drive, force, ++ NULL, install_drive, force, fs_probe, allow_floppy, 0 /* unused */ ); break; diff --git a/package/boot/grub2/patches/100-musl-compat.patch b/package/boot/grub2/patches/100-musl-compat.patch deleted file mode 100644 index e3b12be58a..0000000000 --- a/package/boot/grub2/patches/100-musl-compat.patch +++ /dev/null @@ -1,26 +0,0 @@ ---- a/grub-core/osdep/unix/hostdisk.c -+++ b/grub-core/osdep/unix/hostdisk.c -@@ -48,11 +48,10 @@ - #ifdef __linux__ - # include /* ioctl */ - # include --# if !defined(__GLIBC__) || \ -- ((__GLIBC__ < 2) || ((__GLIBC__ == 2) && (__GLIBC_MINOR__ < 1))) -+# if defined(__UCLIBC__) - /* Maybe libc doesn't have large file support. */ - # include /* _llseek */ --# endif /* (GLIBC < 2) || ((__GLIBC__ == 2) && (__GLIBC_MINOR < 1)) */ -+# endif /* __UCLIBC__ */ - #endif /* __linux__ */ - - grub_uint64_t -@@ -79,8 +78,7 @@ grub_util_get_fd_size (grub_util_fd_t fd - return st.st_size; - } - --#if defined(__linux__) && (!defined(__GLIBC__) || \ -- ((__GLIBC__ < 2) || ((__GLIBC__ == 2) && (__GLIBC_MINOR__ < 1)))) -+#if defined(__linux__) && defined(__UCLIBC__) - /* Maybe libc doesn't have large file support. */ - int - grub_util_fd_seek (grub_util_fd_t fd, grub_uint64_t off) diff --git a/package/boot/grub2/patches/101-disable-gettext-check-macro-version.patch b/package/boot/grub2/patches/101-disable-gettext-check-macro-version.patch new file mode 100644 index 0000000000..4b850ed2a1 --- /dev/null +++ b/package/boot/grub2/patches/101-disable-gettext-check-macro-version.patch @@ -0,0 +1,13 @@ +diff --git a/po/Makefile.in.in b/po/Makefile.in.in +index 3619458..060e0db 100644 +--- a/po/Makefile.in.in ++++ b/po/Makefile.in.in +@@ -97,7 +97,7 @@ CATALOGS = @CATALOGS@ + mv t-$@ $@ + + +-all: check-macro-version all-@USE_NLS@ ++all: all-@USE_NLS@ + + all-yes: stamp-po + all-no: diff --git a/package/boot/grub2/patches/210-fix_serial_rtscts.patch b/package/boot/grub2/patches/210-fix_serial_rtscts.patch deleted file mode 100644 index d60471c1d1..0000000000 --- a/package/boot/grub2/patches/210-fix_serial_rtscts.patch +++ /dev/null @@ -1,14 +0,0 @@ ---- a/grub-core/term/serial.c -+++ b/grub-core/term/serial.c -@@ -241,9 +241,9 @@ grub_cmd_serial (grub_extcmd_context_t c - - if (state[OPTION_RTSCTS].set) - { -- if (grub_strcmp (state[OPTION_PARITY].arg, "on") == 0) -+ if (grub_strcmp (state[OPTION_RTSCTS].arg, "on") == 0) - config.rtscts = 1; -- if (grub_strcmp (state[OPTION_PARITY].arg, "off") == 0) -+ else if (grub_strcmp (state[OPTION_RTSCTS].arg, "off") == 0) - config.rtscts = 0; - else - return grub_error (GRUB_ERR_BAD_ARGUMENT, diff --git a/package/boot/kexec-tools/Config.in b/package/boot/kexec-tools/Config.in index 6c7558f30a..03bc6ee804 100644 --- a/package/boot/kexec-tools/Config.in +++ b/package/boot/kexec-tools/Config.in @@ -1,16 +1,6 @@ menu "Configuration" depends on PACKAGE_kexec-tools -config KEXEC_TOOLS_TARGET_NAME - string - prompt "Target name for kexec kernel" - default EXTRA_TARGET_ARCH_NAME if powerpc64 - default ARCH - help - Defines the target type of the kernels that kexec deals - with. This should be the target specification of - the kernel you're booting. - config KEXEC_TOOLS_kdump bool prompt "kdump support" diff --git a/package/boot/kexec-tools/Makefile b/package/boot/kexec-tools/Makefile index 6f04bce7be..ecd2a6ea11 100644 --- a/package/boot/kexec-tools/Makefile +++ b/package/boot/kexec-tools/Makefile @@ -8,12 +8,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=kexec-tools -PKG_VERSION:=2.0.9 +PKG_VERSION:=2.0.14-rc1 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=@KERNEL/linux/utils/kernel/kexec -PKG_MD5SUM:=6681319934e22e74c532bd392ccb1bbb +PKG_HASH:=3fc505ff8d8a2d24c68aac5e6b4783997d5a086966ff3de8b05a0ceb27e5e23b PKG_FIXUP:=autoreconf @@ -24,7 +24,7 @@ include $(INCLUDE_DIR)/package.mk define Package/kexec-tools SECTION:=utils CATEGORY:=Utilities - DEPENDS:=@KERNEL_KEXEC @armeb||@arm||@i386||@powerpc64||@mipsel||@mips +KEXEC_ZLIB:zlib +KEXEC_LZMA:liblzma + DEPENDS:=@armeb||@arm||@i386||@x86_64||@powerpc64||@mipsel||@mips +KEXEC_ZLIB:zlib +KEXEC_LZMA:liblzma TITLE:=Kernel boots kernel URL:=http://kernel.org/pub/linux/kernel/people/horms/kexec-tools/ MAINTAINER:=Florian Fainelli @@ -40,7 +40,7 @@ define Package/kexec-tools/config source "$(SOURCE)/Config.in" endef -KEXEC_TARGET_NAME:=$(call qstrip,$(CONFIG_KEXEC_TOOLS_TARGET_NAME))-linux-$(TARGET_SUFFIX) +KEXEC_TARGET_NAME:=$(ARCH)-linux-$(TARGET_SUFFIX) CONFIGURE_ARGS = \ --target=$(KEXEC_TARGET_NAME) \ @@ -55,7 +55,8 @@ CONFIGURE_ARGS = \ --libexecdir=/usr/lib \ --sysconfdir=/etc \ $(if $(CONFIG_KEXEC_ZLIB),--with,--without)-zlib \ - $(if $(CONFIG_KEXEC_LZMA),--with,--without)-lzma + $(if $(CONFIG_KEXEC_LZMA),--with,--without)-lzma \ + TARGET_LD="$(TARGET_CROSS)ld" TARGET_CFLAGS += -ffunction-sections -fdata-sections TARGET_LDFLAGS += -Wl,--gc-sections diff --git a/package/boot/kexec-tools/patches/0001-Fix-zlib-lzma-decompression.patch b/package/boot/kexec-tools/patches/0001-Fix-zlib-lzma-decompression.patch deleted file mode 100644 index 06c11ec350..0000000000 --- a/package/boot/kexec-tools/patches/0001-Fix-zlib-lzma-decompression.patch +++ /dev/null @@ -1,171 +0,0 @@ -From d606837b56d46eb7f815b5d85f07fcc3f1555d00 Mon Sep 17 00:00:00 2001 -From: Yousong Zhou -Date: Sun, 1 Feb 2015 00:10:07 +0800 -Subject: [PATCH 1/5] Fix zlib/lzma decompression. - -Let {zlib,lzma}_decompress_file() return NULL if anything wrong happened -to allow the other method to have a chance to run. - -Signed-off-by: Yousong Zhou -Signed-off-by: Simon Horman ---- - kexec/lzma.c | 33 ++++++++++++++++++++++----------- - kexec/zlib.c | 57 +++++++++++++++++++++++++++++++++++---------------------- - 2 files changed, 57 insertions(+), 33 deletions(-) - -diff --git a/kexec/lzma.c b/kexec/lzma.c -index 939aeb3..5bfccb7 100644 ---- a/kexec/lzma.c -+++ b/kexec/lzma.c -@@ -162,13 +162,16 @@ char *lzma_decompress_file(const char *filename, off_t *r_size) - off_t size, allocated; - ssize_t result; - -- if (!filename) { -- *r_size = 0; -- return 0; -- } -+ dbgprintf("Try LZMA decompression.\n"); -+ -+ *r_size = 0; -+ if (!filename) -+ return NULL; -+ - fp = lzopen(filename, "rb"); - if (fp == 0) { -- die("Cannot open `%s'\n", filename); -+ dbgprintf("Cannot open `%s'\n", filename); -+ return NULL; - } - size = 0; - allocated = 65536; -@@ -183,17 +186,25 @@ char *lzma_decompress_file(const char *filename, off_t *r_size) - if ((errno == EINTR) || (errno == EAGAIN)) - continue; - -- die ("read on %s of %ld bytes failed\n", -- filename, (allocated - size) + 0UL); -+ dbgprintf("%s: read on %s of %ld bytes failed\n", -+ __func__, filename, (allocated - size) + 0UL); -+ break; - } - size += result; -- } while(result > 0); -- result = lzclose(fp); -- if (result != LZMA_OK) { -- die ("Close of %s failed\n", filename); -+ } while (result > 0); -+ -+ if (lzclose(fp) != LZMA_OK) { -+ dbgprintf("%s: Close of %s failed\n", __func__, filename); -+ goto fail; - } -+ if (result < 0) -+ goto fail; -+ - *r_size = size; - return buf; -+fail: -+ free(buf); -+ return NULL; - } - #else - char *lzma_decompress_file(const char *UNUSED(filename), off_t *UNUSED(r_size)) -diff --git a/kexec/zlib.c b/kexec/zlib.c -index d44df12..7170ac3 100644 ---- a/kexec/zlib.c -+++ b/kexec/zlib.c -@@ -15,29 +15,39 @@ - #include - #include - -+static void _gzerror(gzFile fp, int *errnum, const char **errmsg) -+{ -+ *errmsg = gzerror(fp, errnum); -+ if (*errnum == Z_ERRNO) { -+ *errmsg = strerror(*errnum); -+ } -+} -+ - char *zlib_decompress_file(const char *filename, off_t *r_size) - { - gzFile fp; - int errnum; - const char *msg; - char *buf; -- off_t size, allocated; -+ off_t size = 0, allocated; - ssize_t result; - -+ dbgprintf("Try gzip decompression.\n"); -+ -+ *r_size = 0; - if (!filename) { -- *r_size = 0; -- return 0; -+ return NULL; - } - fp = gzopen(filename, "rb"); - if (fp == 0) { -- msg = gzerror(fp, &errnum); -- if (errnum == Z_ERRNO) { -- msg = strerror(errno); -- } -- fprintf(stderr, "Cannot open `%s': %s\n", filename, msg); -+ _gzerror(fp, &errnum, &msg); -+ dbgprintf("Cannot open `%s': %s\n", filename, msg); -+ return NULL; -+ } -+ if (gzdirect(fp)) { -+ /* It's not in gzip format */ - return NULL; - } -- size = 0; - allocated = 65536; - buf = xmalloc(allocated); - do { -@@ -49,25 +59,28 @@ char *zlib_decompress_file(const char *filename, off_t *r_size) - if (result < 0) { - if ((errno == EINTR) || (errno == EAGAIN)) - continue; -- -- msg = gzerror(fp, &errnum); -- if (errnum == Z_ERRNO) { -- msg = strerror(errno); -- } -- die ("read on %s of %ld bytes failed: %s\n", -- filename, (allocated - size) + 0UL, msg); -+ _gzerror(fp, &errnum, &msg); -+ dbgprintf("Read on %s of %ld bytes failed: %s\n", -+ filename, (allocated - size) + 0UL, msg); -+ size = 0; -+ goto fail; - } - size += result; - } while(result > 0); -+ -+fail: - result = gzclose(fp); - if (result != Z_OK) { -- msg = gzerror(fp, &errnum); -- if (errnum == Z_ERRNO) { -- msg = strerror(errno); -- } -- die ("Close of %s failed: %s\n", filename, msg); -+ _gzerror(fp, &errnum, &msg); -+ dbgprintf(" Close of %s failed: %s\n", filename, msg); -+ } -+ -+ if (size > 0) { -+ *r_size = size; -+ } else { -+ free(buf); -+ buf = NULL; - } -- *r_size = size; - return buf; - } - #else --- -1.7.10.4 - diff --git a/package/boot/kexec-tools/patches/0002-configure.ac-apply-necessary-quotes-to-result-of-mac.patch b/package/boot/kexec-tools/patches/0002-configure.ac-apply-necessary-quotes-to-result-of-mac.patch deleted file mode 100644 index aba8af7412..0000000000 --- a/package/boot/kexec-tools/patches/0002-configure.ac-apply-necessary-quotes-to-result-of-mac.patch +++ /dev/null @@ -1,52 +0,0 @@ -From eb20884c9bbc42bdf1ccace4444f3ce72657d7d8 Mon Sep 17 00:00:00 2001 -From: Yousong Zhou -Date: Tue, 9 Sep 2014 20:15:16 +0800 -Subject: [PATCH 2/5] configure.ac: apply necessary quotes to result of macro - expansion. - -This can fix the following error when searching for lzma support and -while at it also apply the practice to other uses of the same pattern. - - checking for lzma_code in -llzma... ./configure: line 4756: ac_fn_c_try_link: command not found - -Signed-off-by: Yousong Zhou ---- - configure.ac | 12 ++++++------ - 1 file changed, 6 insertions(+), 6 deletions(-) - -diff --git a/configure.ac b/configure.ac -index db93331..c410e90 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -152,22 +152,22 @@ AC_CHECK_PROG([DIRNAME], dirname, dirname, "no", [$PATH]) - dnl See if I have a usable copy of zlib available - if test "$with_zlib" = yes ; then - AC_CHECK_HEADER(zlib.h, -- AC_CHECK_LIB(z, inflateInit_, , -- AC_MSG_NOTICE([zlib support disabled]))) -+ [AC_CHECK_LIB(z, inflateInit_, , -+ AC_MSG_NOTICE([zlib support disabled]))]) - fi - - dnl See if I have a usable copy of lzma available - if test "$with_lzma" = yes ; then - AC_CHECK_HEADER(lzma.h, -- AC_CHECK_LIB(lzma, lzma_code, , -- AC_MSG_NOTICE([lzma support disabled]))) -+ [AC_CHECK_LIB(lzma, lzma_code, , -+ AC_MSG_NOTICE([lzma support disabled]))]) - fi - - dnl find Xen control stack libraries - if test "$with_xen" = yes ; then - AC_CHECK_HEADER(xenctrl.h, -- AC_CHECK_LIB(xenctrl, xc_kexec_load, , -- AC_MSG_NOTICE([Xen support disabled]))) -+ [AC_CHECK_LIB(xenctrl, xc_kexec_load, , -+ AC_MSG_NOTICE([Xen support disabled]))]) - fi - - dnl ---Sanity checks --- -1.7.10.4 - diff --git a/package/boot/kexec-tools/patches/0003-mips-fix-compiler-warning-on-printing-64-bit-integer.patch b/package/boot/kexec-tools/patches/0003-mips-fix-compiler-warning-on-printing-64-bit-integer.patch deleted file mode 100644 index f4762e94c5..0000000000 --- a/package/boot/kexec-tools/patches/0003-mips-fix-compiler-warning-on-printing-64-bit-integer.patch +++ /dev/null @@ -1,35 +0,0 @@ -From 89d455d785190203b1d3a8766c8babb8c1688fc3 Mon Sep 17 00:00:00 2001 -From: Yousong Zhou -Date: Mon, 9 Feb 2015 19:51:25 +0800 -Subject: [PATCH 3/5] mips: fix compiler warning on printing 64-bit integer. - - -Signed-off-by: Yousong Zhou ---- - kexec/arch/mips/crashdump-mips.c | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/kexec/arch/mips/crashdump-mips.c b/kexec/arch/mips/crashdump-mips.c -index e7840e0..98c9f7c 100644 ---- a/kexec/arch/mips/crashdump-mips.c -+++ b/kexec/arch/mips/crashdump-mips.c -@@ -22,6 +22,7 @@ - #include - #include - #include -+#include - #include - #include - #include -@@ -52,7 +53,7 @@ static int get_kernel_paddr(struct crash_elf_info *elf_info) - - if (parse_iomem_single("Kernel code\n", &start, NULL) == 0) { - elf_info->kern_paddr_start = start; -- dbgprintf("kernel load physical addr start = 0x%lx\n", start); -+ dbgprintf("kernel load physical addr start = 0x%" PRIu64 "\n", start); - return 0; - } - --- -1.7.10.4 - diff --git a/package/boot/kexec-tools/patches/0004-mips-remove-unused-variable.patch b/package/boot/kexec-tools/patches/0004-mips-remove-unused-variable.patch deleted file mode 100644 index 8626c41347..0000000000 --- a/package/boot/kexec-tools/patches/0004-mips-remove-unused-variable.patch +++ /dev/null @@ -1,30 +0,0 @@ -From 904e9ae892b0592c916a013869e3be3d830e0155 Mon Sep 17 00:00:00 2001 -From: Yousong Zhou -Date: Mon, 9 Feb 2015 20:11:04 +0800 -Subject: [PATCH 4/5] mips: remove unused variable. - -Fixes the following compilation warning. - - kexec/arch/mips/crashdump-mips.c:151:6: warning: unused variable 'i' [-Wunused-variable] - -Signed-off-by: Yousong Zhou ---- - kexec/arch/mips/crashdump-mips.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/kexec/arch/mips/crashdump-mips.c b/kexec/arch/mips/crashdump-mips.c -index 98c9f7c..dc68cb4 100644 ---- a/kexec/arch/mips/crashdump-mips.c -+++ b/kexec/arch/mips/crashdump-mips.c -@@ -148,7 +148,7 @@ static int exclude_crash_reserve_region(int *nr_ranges) - static int get_crash_memory_ranges(struct memory_range **range, int *ranges) - { - const char iomem[] = "/proc/iomem"; -- int i, memory_ranges = 0; -+ int memory_ranges = 0; - char line[MAX_LINE]; - FILE *fp; - unsigned long long start, end; --- -1.7.10.4 - diff --git a/package/boot/kexec-tools/patches/0005-mips-fix-warning-about-implicit-type-conversion.patch b/package/boot/kexec-tools/patches/0005-mips-fix-warning-about-implicit-type-conversion.patch deleted file mode 100644 index 008a62dcfd..0000000000 --- a/package/boot/kexec-tools/patches/0005-mips-fix-warning-about-implicit-type-conversion.patch +++ /dev/null @@ -1,30 +0,0 @@ -From 00e75179b3b4b80e6e58d29a2bd948f97682fd00 Mon Sep 17 00:00:00 2001 -From: Yousong Zhou -Date: Mon, 9 Feb 2015 20:28:14 +0800 -Subject: [PATCH 5/5] mips: fix warning about implicit type conversion. - -Fixes the following warning. - - kexec/arch/mips/kexec-elf-mips.c:161:16: warning: assignment makes integer from pointer without a cast [enabled by default] - -Signed-off-by: Yousong Zhou ---- - kexec/arch/mips/kexec-elf-mips.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/kexec/arch/mips/kexec-elf-mips.c b/kexec/arch/mips/kexec-elf-mips.c -index a27d986..8a6419a 100644 ---- a/kexec/arch/mips/kexec-elf-mips.c -+++ b/kexec/arch/mips/kexec-elf-mips.c -@@ -158,7 +158,7 @@ int elf_mips_load(int argc, char **argv, const char *buf, off_t len, - if (info->kexec_flags & KEXEC_ON_CRASH) - /* In case of crashdump segment[0] is kernel. - * Put cmdline just after it. */ -- cmdline_addr = info->segment[0].mem + -+ cmdline_addr = (unsigned long)info->segment[0].mem + - info->segment[0].memsz; - else - cmdline_addr = 0; --- -1.7.10.4 - diff --git a/package/boot/kexec-tools/patches/100-format_string_fix.patch b/package/boot/kexec-tools/patches/100-format_string_fix.patch new file mode 100644 index 0000000000..601121bcc0 --- /dev/null +++ b/package/boot/kexec-tools/patches/100-format_string_fix.patch @@ -0,0 +1,20 @@ +--- a/kexec/arch/i386/kexec-elf-x86.c ++++ b/kexec/arch/i386/kexec-elf-x86.c +@@ -296,6 +296,6 @@ out: + free(command_line); + free(modified_cmdline); + if (error_msg) +- die(error_msg); ++ die("%s", error_msg); + return result; + } +--- a/kexec/arch/x86_64/kexec-elf-x86_64.c ++++ b/kexec/arch/x86_64/kexec-elf-x86_64.c +@@ -276,6 +276,6 @@ out: + free(command_line); + free(modified_cmdline); + if (error_msg) +- die(error_msg); ++ die("%s", error_msg); + return result; + } diff --git a/package/boot/kexec-tools/patches/110-fix-vmcore-dmsg-compilation-error.patch b/package/boot/kexec-tools/patches/110-fix-vmcore-dmsg-compilation-error.patch new file mode 100644 index 0000000000..0cf2d3ebb5 --- /dev/null +++ b/package/boot/kexec-tools/patches/110-fix-vmcore-dmsg-compilation-error.patch @@ -0,0 +1,11 @@ +--- a/vmcore-dmesg/vmcore-dmesg.c ++++ b/vmcore-dmesg/vmcore-dmesg.c +@@ -1,6 +1,8 @@ + #define _XOPEN_SOURCE 600 + #define _LARGEFILE_SOURCE 1 + #define _FILE_OFFSET_BITS 64 ++#define _GNU_SOURCE ++ + #include + #include + #include diff --git a/package/boot/kobs-ng/Makefile b/package/boot/kobs-ng/Makefile new file mode 100644 index 0000000000..3fa8302b8c --- /dev/null +++ b/package/boot/kobs-ng/Makefile @@ -0,0 +1,46 @@ +# +# Copyright (C) 2013-2014 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=kobs-ng +PKG_VERSION:=5.4 +PKG_RELEASE:=1 + +PKG_SOURCE:=imx-kobs-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://www.freescale.com/lgfiles/NMG/MAD/YOCTO/ +PKG_HASH:=85171b46068ac47c42fedb8104167bf9afd33dd9527ed127e1ca2eb29d7a86bf +PKG_BUILD_DIR:=$(BUILD_DIR)/imx-kobs-$(PKG_VERSION) + +PKG_LICENSE:=GPLv2 +PKG_LICENSE_FILES:=COPYING + +include $(INCLUDE_DIR)/package.mk + +define Package/kobs-ng + SECTION:=utils + CATEGORY:=Utilities + TITLE:=Application for writing bootstreams to NAND flash + DEPENDS:=@TARGET_imx6 +endef + +define Package/kobs-ng/description + The kobs-ng application writes a bootstream to NAND flash with the proper + FCB/DBBT headers and replicated streams. +endef + +define Build/Prepare + $(call Build/Prepare/Default) + echo "const char* git_sha = \"$(PKG_VERSION)\";" > $(PKG_BUILD_DIR)/autoversion.h +endef + +define Package/kobs-ng/install + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/kobs-ng $(1)/usr/sbin/ +endef + +$(eval $(call BuildPackage,kobs-ng)) diff --git a/package/boot/kobs-ng/patches/001-compile.patch b/package/boot/kobs-ng/patches/001-compile.patch new file mode 100644 index 0000000000..67da93a324 --- /dev/null +++ b/package/boot/kobs-ng/patches/001-compile.patch @@ -0,0 +1,23 @@ +--- a/src/mtd.c ++++ b/src/mtd.c +@@ -28,6 +28,7 @@ + #include + #include + #include ++#include + #include + #include + #include +--- a/src/mtd.h ++++ b/src/mtd.h +@@ -25,8 +25,10 @@ + #ifndef MTD_H + #define MTD_H + ++#define _GNU_SOURCE + #include + #include ++#include + + #include "BootControlBlocks.h" + #include "rom_nand_hamming_code_ecc.h" diff --git a/package/boot/kobs-ng/patches/002-add-init-size-param.patch b/package/boot/kobs-ng/patches/002-add-init-size-param.patch new file mode 100644 index 0000000000..8ad34e9e71 --- /dev/null +++ b/package/boot/kobs-ng/patches/002-add-init-size-param.patch @@ -0,0 +1,45 @@ +Add --chip_0_size param to override the size of the mtd partition which is +required if the SPL does not occupy the entire partition. For Gateworks +Ventana boards the 'uboot' partition contains both the SPL and uboot. +--- a/src/main.c ++++ b/src/main.c +@@ -94,6 +94,7 @@ void usage(void) + " [KOBS] boot structures config options\n" + " --chip_0_device_path= .......... Device of boot (default /dev/mtd0)\n" + " --chip_1_device_path= .......... The second chip in case of multichip NAND\n" ++ " --chip_0_size= ................. Override size of chip_0 device\n" + " --search_exponent= ............ NCB field (default 2)\n" + " --data_setup_time= ............ NCB field (default 80)\n" + " --data_hold_time= ............. NCB field (default 60)\n" +--- a/src/mtd.c ++++ b/src/mtd.c +@@ -876,6 +876,11 @@ struct mtd_data *mtd_open(const struct m + goto out; + } + ++ /* override MTD size */ ++ if (md->cfg.chip_0_size) { ++ miu->size = md->cfg.chip_0_size; ++ } ++ + /* verify it's a nand */ + if (miu->type != MTD_NANDFLASH + && miu->type != MTD_MLCNANDFLASH) { +@@ -3385,7 +3390,7 @@ static const struct { + } mtd_int_args[] = { + ARG_IGNORE(chip_count), + ARG_IGNORE(chip_0_offset), +- ARG_IGNORE(chip_0_size), ++ ARG(chip_0_size), + ARG_IGNORE(chip_1_offset), + ARG_IGNORE(chip_1_size), + ARG(search_exponent), +@@ -3578,7 +3583,7 @@ void mtd_cfg_dump(struct mtd_config *cfg + // Pd(chip_count); + Ps(chip_0_device_path); + // Pd(chip_0_offset); +-// Pd(chip_0_size); ++ Pd(chip_0_size); + Ps(chip_1_device_path); + // Pd(chip_1_offset); + // Pd(chip_1_size); diff --git a/package/boot/kobs-ng/patches/003-raw-mode.patch b/package/boot/kobs-ng/patches/003-raw-mode.patch new file mode 100644 index 0000000000..5a3be5f058 --- /dev/null +++ b/package/boot/kobs-ng/patches/003-raw-mode.patch @@ -0,0 +1,45 @@ +The downstream Freescale vendor kernel has a patch that allows determining +if raw NAND flash mode is provided via a debugfs file. This is not present +in upstream kernels, but the raw access support was added in the 3.19 +kernel, so we will check the kernel version if we can't find the file. +--- a/src/mtd.c ++++ b/src/mtd.c +@@ -34,6 +34,7 @@ + #include + #include + #include ++#include + + #include "mtd.h" + #include "rand.h" +@@ -808,15 +809,27 @@ struct mtd_data *mtd_open(const struct m + md->cfg = *cfg; + + /* check if use new raw access mode */ ++ /* by looking for debugfs from fsl patch */ ++ md->raw_mode_flag = 0; + fp = fopen("/sys/kernel/debug/gpmi-nand/raw_mode", "r"); + if (!fp) { +- md->raw_mode_flag = 0; +- vp(md, "mtd: use legacy raw access mode\n"); ++ /* fallback to kernel version: raw access added in 3.19 */ ++ struct utsname uts; ++ if (!uname(&uts)) { ++ int major = 0, minor = 0; ++ sscanf(uts.release, "%d.%d", &major, &minor); ++ vp(md, "mtd: Linux %d.%d\n", major, minor); ++ if ((major << 8 | minor) > (3 << 8 | 18)) ++ md->raw_mode_flag = 1; ++ } + } else { + fclose(fp); + md->raw_mode_flag = 1; +- vp(md, "mtd: use new bch layout raw access mode\n"); + } ++ if (md->raw_mode_flag) ++ vp(md, "mtd: use new bch layout raw access mode\n"); ++ else ++ vp(md, "mtd: use legacy raw access mode\n"); + + if (plat_config_data->m_u32UseMultiBootArea) { + diff --git a/package/boot/kobs-ng/patches/004-fix-cal_nfc_geometry.patch b/package/boot/kobs-ng/patches/004-fix-cal_nfc_geometry.patch new file mode 100644 index 0000000000..ebfd62345c --- /dev/null +++ b/package/boot/kobs-ng/patches/004-fix-cal_nfc_geometry.patch @@ -0,0 +1,27 @@ +The Freescale downstream vendor kernel has a patch that exports the bch +flash geometry via a debugfs file. This is not available in mainline linux +kernels so the fallback method calculates the geometry based on known info +from the mtd partition. A bug exists in this funcion where it fails to +assume that block0 ECC is the same as the other blocks by default. +--- a/src/mtd.c ++++ b/src/mtd.c +@@ -610,7 +610,7 @@ static int cal_nfc_geometry(struct mtd_d + /* The two are fixed, please change them when the driver changes. */ + geo->metadata_size_in_bytes = 10; + geo->gf_len = 13; +- geo->ecc_chunkn_size_in_bytes = 512; ++ geo->ecc_chunkn_size_in_bytes = geo->ecc_chunk0_size_in_bytes = 512; + + if (mtd->oobsize > geo->ecc_chunkn_size_in_bytes) { + geo->gf_len = 14; +@@ -700,8 +700,9 @@ int parse_nfc_geometry(struct mtd_data * + unsigned int value; + + if (!plat_config_data->m_u32UseNfcGeo) { ++ /* fsl kernel patch provides bch_geometry via debugfs */ + if (!(node = fopen(dbg_geometry_node_path, "r"))) { +- fprintf(stderr, "Cannot open BCH geometry node: \"%s\"", ++ fprintf(stderr, "Cannot open BCH geometry node: \"%s\"\n", + dbg_geometry_node_path); + return cal_nfc_geometry(md); + } diff --git a/package/boot/rbcfg/Makefile b/package/boot/rbcfg/Makefile new file mode 100644 index 0000000000..412f7ab11a --- /dev/null +++ b/package/boot/rbcfg/Makefile @@ -0,0 +1,47 @@ +# +# Copyright (C) 2010 Gabor Juhos +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=rbcfg +PKG_RELEASE:=1 + +PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME) + +PKG_FLAGS:=nonshared + +include $(INCLUDE_DIR)/package.mk + +define Package/rbcfg + SECTION:=utils + CATEGORY:=Utilities + SUBMENU:=Boot Loaders + TITLE:=RouterBOOT configuration tool + DEPENDS:=@TARGET_ar71xx +endef + +define Package/rbcfg/description + This package contains an utility to manipulate RouterBOOT configuration on the + MikroTIK RB-4XX devices. +endef + +define Build/Configure +endef + +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR) \ + CC="$(TARGET_CC)" \ + CFLAGS="$(TARGET_CFLAGS) -Wall" \ + LDFLAGS="$(TARGET_LDFLAGS)" +endef + +define Package/rbcfg/install + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/rbcfg $(1)/usr/sbin/ +endef + +$(eval $(call BuildPackage,rbcfg)) diff --git a/package/boot/rbcfg/src/Makefile b/package/boot/rbcfg/src/Makefile new file mode 100644 index 0000000000..62c74b2678 --- /dev/null +++ b/package/boot/rbcfg/src/Makefile @@ -0,0 +1,14 @@ +CC = gcc +CFLAGS = -Wall +OBJS = main.o cyg_crc32.o + +all: rbcfg + +%.o: %.c + $(CC) $(CFLAGS) -c -o $@ $< + +rbcfg: $(OBJS) + $(CC) -o $@ $(OBJS) + +clean: + rm -f rbcfg *.o diff --git a/package/boot/rbcfg/src/cyg_crc.h b/package/boot/rbcfg/src/cyg_crc.h new file mode 100644 index 0000000000..7b59803446 --- /dev/null +++ b/package/boot/rbcfg/src/cyg_crc.h @@ -0,0 +1,109 @@ +//========================================================================== +// +// crc.h +// +// Interface for the CRC algorithms. +// +//========================================================================== +//####ECOSGPLCOPYRIGHTBEGIN#### +// ------------------------------------------- +// This file is part of eCos, the Embedded Configurable Operating System. +// Copyright (C) 2002 Andrew Lunn +// +// eCos is free software; you can redistribute it and/or modify it under +// the terms of the GNU General Public License as published by the Free +// Software Foundation; either version 2 or (at your option) any later version. +// +// eCos is distributed in the hope that it will be useful, but WITHOUT ANY +// WARRANTY; without even the implied warranty of MERCHANTABILITY or +// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +// for more details. +// +// You should have received a copy of the GNU General Public License along +// with eCos; if not, write to the Free Software Foundation, Inc., +// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. +// +// As a special exception, if other files instantiate templates or use macros +// or inline functions from this file, or you compile this file and link it +// with other works to produce a work based on this file, this file does not +// by itself cause the resulting work to be covered by the GNU General Public +// License. However the source code for this file must still be made available +// in accordance with section (3) of the GNU General Public License. +// +// This exception does not invalidate any other reasons why a work based on +// this file might be covered by the GNU General Public License. +// +// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc. +// at http://sources.redhat.com/ecos/ecos-license/ +// ------------------------------------------- +//####ECOSGPLCOPYRIGHTEND#### +//========================================================================== +//#####DESCRIPTIONBEGIN#### +// +// Author(s): Andrew Lunn +// Contributors: Andrew Lunn +// Date: 2002-08-06 +// Purpose: +// Description: +// +// This code is part of eCos (tm). +// +//####DESCRIPTIONEND#### +// +//========================================================================== + +#ifndef _SERVICES_CRC_CRC_H_ +#define _SERVICES_CRC_CRC_H_ + +#if 0 +#include +#else +#include +typedef uint32_t cyg_uint32; +typedef uint16_t cyg_uint16; +#endif + +#ifndef __externC +# ifdef __cplusplus +# define __externC extern "C" +# else +# define __externC extern +# endif +#endif + +// Compute a CRC, using the POSIX 1003 definition + +__externC cyg_uint32 +cyg_posix_crc32(unsigned char *s, int len); + +// Gary S. Brown's 32 bit CRC + +__externC cyg_uint32 +cyg_crc32(unsigned char *s, int len); + +// Gary S. Brown's 32 bit CRC, but accumulate the result from a +// previous CRC calculation + +__externC cyg_uint32 +cyg_crc32_accumulate(cyg_uint32 crc, unsigned char *s, int len); + +// Ethernet FCS Algorithm + +__externC cyg_uint32 +cyg_ether_crc32(unsigned char *s, int len); + +// Ethernet FCS algorithm, but accumulate the result from a previous +// CRC calculation. + +__externC cyg_uint32 +cyg_ether_crc32_accumulate(cyg_uint32 crc, unsigned char *s, int len); + +// 16 bit CRC with polynomial x^16+x^12+x^5+1 + +__externC cyg_uint16 +cyg_crc16(unsigned char *s, int len); + +#endif // _SERVICES_CRC_CRC_H_ + + + diff --git a/package/boot/rbcfg/src/cyg_crc32.c b/package/boot/rbcfg/src/cyg_crc32.c new file mode 100644 index 0000000000..9462598ae6 --- /dev/null +++ b/package/boot/rbcfg/src/cyg_crc32.c @@ -0,0 +1,172 @@ +//========================================================================== +// +// crc32.c +// +// Gary S. Brown's 32 bit CRC +// +//========================================================================== +//####ECOSGPLCOPYRIGHTBEGIN#### +// ------------------------------------------- +// This file is part of eCos, the Embedded Configurable Operating System. +// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc. +// Copyright (C) 2002 Gary Thomas +// +// eCos is free software; you can redistribute it and/or modify it under +// the terms of the GNU General Public License as published by the Free +// Software Foundation; either version 2 or (at your option) any later version. +// +// eCos is distributed in the hope that it will be useful, but WITHOUT ANY +// WARRANTY; without even the implied warranty of MERCHANTABILITY or +// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +// for more details. +// +// You should have received a copy of the GNU General Public License along +// with eCos; if not, write to the Free Software Foundation, Inc., +// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. +// +// As a special exception, if other files instantiate templates or use macros +// or inline functions from this file, or you compile this file and link it +// with other works to produce a work based on this file, this file does not +// by itself cause the resulting work to be covered by the GNU General Public +// License. However the source code for this file must still be made available +// in accordance with section (3) of the GNU General Public License. +// +// This exception does not invalidate any other reasons why a work based on +// this file might be covered by the GNU General Public License. +// +// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc. +// at http://sources.redhat.com/ecos/ecos-license/ +// ------------------------------------------- +//####ECOSGPLCOPYRIGHTEND#### +//========================================================================== +//#####DESCRIPTIONBEGIN#### +// +// Author(s): gthomas +// Contributors: gthomas,asl +// Date: 2001-01-31 +// Purpose: +// Description: +// +// This code is part of eCos (tm). +// +//####DESCRIPTIONEND#### +// +//========================================================================== + +#if 0 +#include +#else +#include "cyg_crc.h" +#endif + + /* ====================================================================== */ + /* COPYRIGHT (C) 1986 Gary S. Brown. You may use this program, or */ + /* code or tables extracted from it, as desired without restriction. */ + /* */ + /* First, the polynomial itself and its table of feedback terms. The */ + /* polynomial is */ + /* X^32+X^26+X^23+X^22+X^16+X^12+X^11+X^10+X^8+X^7+X^5+X^4+X^2+X^1+X^0 */ + /* */ + /* ====================================================================== */ + +static const cyg_uint32 crc32_tab[] = { + 0x00000000L, 0x77073096L, 0xee0e612cL, 0x990951baL, 0x076dc419L, + 0x706af48fL, 0xe963a535L, 0x9e6495a3L, 0x0edb8832L, 0x79dcb8a4L, + 0xe0d5e91eL, 0x97d2d988L, 0x09b64c2bL, 0x7eb17cbdL, 0xe7b82d07L, + 0x90bf1d91L, 0x1db71064L, 0x6ab020f2L, 0xf3b97148L, 0x84be41deL, + 0x1adad47dL, 0x6ddde4ebL, 0xf4d4b551L, 0x83d385c7L, 0x136c9856L, + 0x646ba8c0L, 0xfd62f97aL, 0x8a65c9ecL, 0x14015c4fL, 0x63066cd9L, + 0xfa0f3d63L, 0x8d080df5L, 0x3b6e20c8L, 0x4c69105eL, 0xd56041e4L, + 0xa2677172L, 0x3c03e4d1L, 0x4b04d447L, 0xd20d85fdL, 0xa50ab56bL, + 0x35b5a8faL, 0x42b2986cL, 0xdbbbc9d6L, 0xacbcf940L, 0x32d86ce3L, + 0x45df5c75L, 0xdcd60dcfL, 0xabd13d59L, 0x26d930acL, 0x51de003aL, + 0xc8d75180L, 0xbfd06116L, 0x21b4f4b5L, 0x56b3c423L, 0xcfba9599L, + 0xb8bda50fL, 0x2802b89eL, 0x5f058808L, 0xc60cd9b2L, 0xb10be924L, + 0x2f6f7c87L, 0x58684c11L, 0xc1611dabL, 0xb6662d3dL, 0x76dc4190L, + 0x01db7106L, 0x98d220bcL, 0xefd5102aL, 0x71b18589L, 0x06b6b51fL, + 0x9fbfe4a5L, 0xe8b8d433L, 0x7807c9a2L, 0x0f00f934L, 0x9609a88eL, + 0xe10e9818L, 0x7f6a0dbbL, 0x086d3d2dL, 0x91646c97L, 0xe6635c01L, + 0x6b6b51f4L, 0x1c6c6162L, 0x856530d8L, 0xf262004eL, 0x6c0695edL, + 0x1b01a57bL, 0x8208f4c1L, 0xf50fc457L, 0x65b0d9c6L, 0x12b7e950L, + 0x8bbeb8eaL, 0xfcb9887cL, 0x62dd1ddfL, 0x15da2d49L, 0x8cd37cf3L, + 0xfbd44c65L, 0x4db26158L, 0x3ab551ceL, 0xa3bc0074L, 0xd4bb30e2L, + 0x4adfa541L, 0x3dd895d7L, 0xa4d1c46dL, 0xd3d6f4fbL, 0x4369e96aL, + 0x346ed9fcL, 0xad678846L, 0xda60b8d0L, 0x44042d73L, 0x33031de5L, + 0xaa0a4c5fL, 0xdd0d7cc9L, 0x5005713cL, 0x270241aaL, 0xbe0b1010L, + 0xc90c2086L, 0x5768b525L, 0x206f85b3L, 0xb966d409L, 0xce61e49fL, + 0x5edef90eL, 0x29d9c998L, 0xb0d09822L, 0xc7d7a8b4L, 0x59b33d17L, + 0x2eb40d81L, 0xb7bd5c3bL, 0xc0ba6cadL, 0xedb88320L, 0x9abfb3b6L, + 0x03b6e20cL, 0x74b1d29aL, 0xead54739L, 0x9dd277afL, 0x04db2615L, + 0x73dc1683L, 0xe3630b12L, 0x94643b84L, 0x0d6d6a3eL, 0x7a6a5aa8L, + 0xe40ecf0bL, 0x9309ff9dL, 0x0a00ae27L, 0x7d079eb1L, 0xf00f9344L, + 0x8708a3d2L, 0x1e01f268L, 0x6906c2feL, 0xf762575dL, 0x806567cbL, + 0x196c3671L, 0x6e6b06e7L, 0xfed41b76L, 0x89d32be0L, 0x10da7a5aL, + 0x67dd4accL, 0xf9b9df6fL, 0x8ebeeff9L, 0x17b7be43L, 0x60b08ed5L, + 0xd6d6a3e8L, 0xa1d1937eL, 0x38d8c2c4L, 0x4fdff252L, 0xd1bb67f1L, + 0xa6bc5767L, 0x3fb506ddL, 0x48b2364bL, 0xd80d2bdaL, 0xaf0a1b4cL, + 0x36034af6L, 0x41047a60L, 0xdf60efc3L, 0xa867df55L, 0x316e8eefL, + 0x4669be79L, 0xcb61b38cL, 0xbc66831aL, 0x256fd2a0L, 0x5268e236L, + 0xcc0c7795L, 0xbb0b4703L, 0x220216b9L, 0x5505262fL, 0xc5ba3bbeL, + 0xb2bd0b28L, 0x2bb45a92L, 0x5cb36a04L, 0xc2d7ffa7L, 0xb5d0cf31L, + 0x2cd99e8bL, 0x5bdeae1dL, 0x9b64c2b0L, 0xec63f226L, 0x756aa39cL, + 0x026d930aL, 0x9c0906a9L, 0xeb0e363fL, 0x72076785L, 0x05005713L, + 0x95bf4a82L, 0xe2b87a14L, 0x7bb12baeL, 0x0cb61b38L, 0x92d28e9bL, + 0xe5d5be0dL, 0x7cdcefb7L, 0x0bdbdf21L, 0x86d3d2d4L, 0xf1d4e242L, + 0x68ddb3f8L, 0x1fda836eL, 0x81be16cdL, 0xf6b9265bL, 0x6fb077e1L, + 0x18b74777L, 0x88085ae6L, 0xff0f6a70L, 0x66063bcaL, 0x11010b5cL, + 0x8f659effL, 0xf862ae69L, 0x616bffd3L, 0x166ccf45L, 0xa00ae278L, + 0xd70dd2eeL, 0x4e048354L, 0x3903b3c2L, 0xa7672661L, 0xd06016f7L, + 0x4969474dL, 0x3e6e77dbL, 0xaed16a4aL, 0xd9d65adcL, 0x40df0b66L, + 0x37d83bf0L, 0xa9bcae53L, 0xdebb9ec5L, 0x47b2cf7fL, 0x30b5ffe9L, + 0xbdbdf21cL, 0xcabac28aL, 0x53b39330L, 0x24b4a3a6L, 0xbad03605L, + 0xcdd70693L, 0x54de5729L, 0x23d967bfL, 0xb3667a2eL, 0xc4614ab8L, + 0x5d681b02L, 0x2a6f2b94L, 0xb40bbe37L, 0xc30c8ea1L, 0x5a05df1bL, + 0x2d02ef8dL + }; + +/* This is the standard Gary S. Brown's 32 bit CRC algorithm, but + accumulate the CRC into the result of a previous CRC. */ +cyg_uint32 +cyg_crc32_accumulate(cyg_uint32 crc32val, unsigned char *s, int len) +{ + int i; + + for (i = 0; i < len; i++) { + crc32val = crc32_tab[(crc32val ^ s[i]) & 0xff] ^ (crc32val >> 8); + } + return crc32val; +} + +/* This is the standard Gary S. Brown's 32 bit CRC algorithm */ +cyg_uint32 +cyg_crc32(unsigned char *s, int len) +{ + return (cyg_crc32_accumulate(0,s,len)); +} + +/* Return a 32-bit CRC of the contents of the buffer accumulating the + result from a previous CRC calculation. This uses the Ethernet FCS + algorithm.*/ +cyg_uint32 +cyg_ether_crc32_accumulate(cyg_uint32 crc32val, unsigned char *s, int len) +{ + int i; + + if (s == 0) return 0L; + + crc32val = crc32val ^ 0xffffffff; + for (i = 0; i < len; i++) { + crc32val = crc32_tab[(crc32val ^ s[i]) & 0xff] ^ (crc32val >> 8); + } + return crc32val ^ 0xffffffff; +} + +/* Return a 32-bit CRC of the contents of the buffer, using the + Ethernet FCS algorithm. */ +cyg_uint32 +cyg_ether_crc32(unsigned char *s, int len) +{ + return cyg_ether_crc32_accumulate(0,s,len); +} + + diff --git a/package/boot/rbcfg/src/main.c b/package/boot/rbcfg/src/main.c new file mode 100644 index 0000000000..b7cf79ffae --- /dev/null +++ b/package/boot/rbcfg/src/main.c @@ -0,0 +1,791 @@ +/* + * RouterBOOT configuration utility + * + * Copyright (C) 2010 Gabor Juhos + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 as published + * by the Free Software Foundation. + * + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "rbcfg.h" +#include "cyg_crc.h" + +#define RBCFG_TMP_FILE "/tmp/.rbcfg" +#define RBCFG_MTD_NAME "soft_config" + +#define RB_ERR_NOTFOUND 1 +#define RB_ERR_INVALID 2 +#define RB_ERR_NOMEM 3 +#define RB_ERR_IO 4 + +#define ARRAY_SIZE(_a) (sizeof((_a)) / sizeof((_a)[0])) + +struct rbcfg_ctx { + char *mtd_device; + char *tmp_file; + char *buf; + unsigned buflen; +}; + +struct rbcfg_value { + const char *name; + const char *desc; + union { + uint32_t u32; + const char *raw; + } val; +}; + +#define RBCFG_ENV_TYPE_U32 0 + +struct rbcfg_env { + const char *name; + int type; + uint16_t id; + const struct rbcfg_value *values; + int num_values; +}; + +#define CMD_FLAG_USES_CFG 0x01 + +struct rbcfg_command { + const char *command; + const char *usage; + int flags; + int (*exec)(int argc, const char *argv[]); +}; + +static void usage(void); + +/* Globals */ + +static struct rbcfg_ctx *rbcfg_ctx; +static char *rbcfg_name; + +#define CFG_U32(_name, _desc, _val) { \ + .name = (_name), \ + .desc = (_desc), \ + .val.u32 = (_val), \ +} + +static const struct rbcfg_value rbcfg_boot_delay[] = { + CFG_U32("1", "1 second", RB_BOOT_DELAY_1SEC), + CFG_U32("2", "2 seconds", RB_BOOT_DELAY_2SEC), + CFG_U32("3", "3 seconds", RB_BOOT_DELAY_3SEC), + CFG_U32("4", "4 seconds", RB_BOOT_DELAY_4SEC), + CFG_U32("5", "5 seconds", RB_BOOT_DELAY_5SEC), + CFG_U32("6", "6 seconds", RB_BOOT_DELAY_6SEC), + CFG_U32("7", "7 seconds", RB_BOOT_DELAY_7SEC), + CFG_U32("8", "8 seconds", RB_BOOT_DELAY_8SEC), + CFG_U32("9", "9 seconds", RB_BOOT_DELAY_9SEC), +}; + +static const struct rbcfg_value rbcfg_boot_device[] = { + CFG_U32("eth", "boot over Ethernet", + RB_BOOT_DEVICE_ETHER), + CFG_U32("nandeth", "boot from NAND, if fail then Ethernet", + RB_BOOT_DEVICE_NANDETH), + CFG_U32("ethnand", "boot Ethernet once, then NAND", + RB_BOOT_DEVICE_ETHONCE), + CFG_U32("nand", "boot from NAND only", + RB_BOOT_DEVICE_NANDONLY), +}; + +static const struct rbcfg_value rbcfg_boot_key[] = { + CFG_U32("any", "any key", RB_BOOT_KEY_ANY), + CFG_U32("del", " key only", RB_BOOT_KEY_DEL), +}; + +static const struct rbcfg_value rbcfg_boot_protocol[] = { + CFG_U32("bootp", "BOOTP protocol", RB_BOOT_PROTOCOL_BOOTP), + CFG_U32("dhcp", "DHCP protocol", RB_BOOT_PROTOCOL_DHCP), +}; + +static const struct rbcfg_value rbcfg_uart_speed[] = { + CFG_U32("115200", "", RB_UART_SPEED_115200), + CFG_U32("57600", "", RB_UART_SPEED_57600), + CFG_U32("38400", "", RB_UART_SPEED_38400), + CFG_U32("19200", "", RB_UART_SPEED_19200), + CFG_U32("9600", "", RB_UART_SPEED_9600), + CFG_U32("4800", "", RB_UART_SPEED_4800), + CFG_U32("2400", "", RB_UART_SPEED_2400), + CFG_U32("1200", "", RB_UART_SPEED_1200), + CFG_U32("off", "disable console output", RB_UART_SPEED_OFF), +}; + +static const struct rbcfg_value rbcfg_cpu_mode[] = { + CFG_U32("powersave", "power save", RB_CPU_MODE_POWERSAVE), + CFG_U32("regular", "regular (better for -0c environment)", + RB_CPU_MODE_REGULAR), +}; + +static const struct rbcfg_value rbcfg_booter[] = { + CFG_U32("regular", "load regular booter", RB_BOOTER_REGULAR), + CFG_U32("backup", "force backup-booter loading", RB_BOOTER_BACKUP), +}; + +static const struct rbcfg_env rbcfg_envs[] = { + { + .name = "boot_delay", + .id = RB_ID_BOOT_DELAY, + .type = RBCFG_ENV_TYPE_U32, + .values = rbcfg_boot_delay, + .num_values = ARRAY_SIZE(rbcfg_boot_delay), + }, { + .name = "boot_device", + .id = RB_ID_BOOT_DEVICE, + .type = RBCFG_ENV_TYPE_U32, + .values = rbcfg_boot_device, + .num_values = ARRAY_SIZE(rbcfg_boot_device), + }, { + .name = "boot_key", + .id = RB_ID_BOOT_KEY, + .type = RBCFG_ENV_TYPE_U32, + .values = rbcfg_boot_key, + .num_values = ARRAY_SIZE(rbcfg_boot_key), + }, { + .name = "boot_protocol", + .id = RB_ID_BOOT_PROTOCOL, + .type = RBCFG_ENV_TYPE_U32, + .values = rbcfg_boot_protocol, + .num_values = ARRAY_SIZE(rbcfg_boot_protocol), + }, { + .name = "booter", + .id = RB_ID_BOOTER, + .type = RBCFG_ENV_TYPE_U32, + .values = rbcfg_booter, + .num_values = ARRAY_SIZE(rbcfg_booter), + }, { + .name = "cpu_mode", + .id = RB_ID_CPU_MODE, + .type = RBCFG_ENV_TYPE_U32, + .values = rbcfg_cpu_mode, + .num_values = ARRAY_SIZE(rbcfg_cpu_mode), + }, { + .name = "uart_speed", + .id = RB_ID_UART_SPEED, + .type = RBCFG_ENV_TYPE_U32, + .values = rbcfg_uart_speed, + .num_values = ARRAY_SIZE(rbcfg_uart_speed), + } +}; + +static inline uint16_t +get_u16(const void *buf) +{ + const uint8_t *p = buf; + + return ((uint16_t) p[1] + ((uint16_t) p[0] << 8)); +} + +static inline uint32_t +get_u32(const void *buf) +{ + const uint8_t *p = buf; + + return ((uint32_t) p[3] + ((uint32_t) p[2] << 8) + + ((uint32_t) p[1] << 16) + ((uint32_t) p[0] << 24)); +} + +static inline void +put_u32(void *buf, uint32_t val) +{ + uint8_t *p = buf; + + p[3] = val & 0xff; + p[2] = (val >> 8) & 0xff; + p[1] = (val >> 16) & 0xff; + p[0] = (val >> 24) & 0xff; +} + +static int +rbcfg_find_tag(struct rbcfg_ctx *ctx, uint16_t tag_id, uint16_t *tag_len, + void **tag_data) +{ + uint16_t id; + uint16_t len; + char *buf = ctx->buf; + unsigned int buflen = ctx->buflen; + int ret = RB_ERR_NOTFOUND; + + /* skip magic and CRC value */ + buf += 8; + buflen -= 8; + + while (buflen > 2) { + len = get_u16(buf); + buf += 2; + buflen -= 2; + + if (buflen < 2) + break; + + id = get_u16(buf); + buf += 2; + buflen -= 2; + + if (id == RB_ID_TERMINATOR) + break; + + if (buflen < len) + break; + + if (id == tag_id) { + *tag_len = len; + *tag_data = buf; + ret = 0; + break; + } + + buf += len; + buflen -= len; + } + + if (ret) + fprintf(stderr, "no tag found with id=%u\n", tag_id); + + return ret; +} + +static int +rbcfg_get_u32(struct rbcfg_ctx *ctx, uint16_t id, uint32_t *val) +{ + void *tag_data; + uint16_t tag_len; + int err; + + err = rbcfg_find_tag(ctx, id, &tag_len, &tag_data); + if (err) + return err; + + *val = get_u32(tag_data); + return 0; +} + +static int +rbcfg_set_u32(struct rbcfg_ctx *ctx, uint16_t id, uint32_t val) +{ + void *tag_data; + uint16_t tag_len; + int err; + + err = rbcfg_find_tag(ctx, id, &tag_len, &tag_data); + if (err) + return err; + + put_u32(tag_data, val); + return 0; +} + +char *rbcfg_find_mtd(const char *name, int *erase_size) +{ + FILE *f; + int mtd_num; + char dev[PATH_MAX]; + char *ret = NULL; + struct stat s; + int err; + + f = fopen("/proc/mtd", "r"); + if (!f) + return NULL; + + while (1) { + char *p; + p = fgets(dev, sizeof(dev), f); + if (!p) + break; + + if (!strstr(dev, name)) + continue; + + err = sscanf(dev, "mtd%d: %08x", &mtd_num, erase_size); + if (err != 2) + break; + + sprintf(dev, "/dev/mtdblock%d", mtd_num); + err = stat(dev, &s); + if (err < 0) + break; + + if ((s.st_mode & S_IFBLK) == 0) + break; + + ret = malloc(strlen(dev) + 1); + if (ret == NULL) + break; + + strncpy(ret, dev, strlen(dev) + 1); + break; + } + + fclose(f); + return ret; +} + +static int +rbcfg_check_tmp(struct rbcfg_ctx *ctx) +{ + struct stat s; + int err; + + err = stat(ctx->tmp_file, &s); + if (err < 0) + return 0; + + if ((s.st_mode & S_IFREG) == 0) + return 0; + + if (s.st_size != ctx->buflen) + return 0; + + return 1; +} + +static int +rbcfg_load(struct rbcfg_ctx *ctx) +{ + uint32_t magic; + uint32_t crc_orig, crc; + char *name; + int tmp; + int fd; + int err; + + tmp = rbcfg_check_tmp(ctx); + name = (tmp) ? ctx->tmp_file : ctx->mtd_device; + + fd = open(name, O_RDONLY); + if (fd < 0) { + fprintf(stderr, "unable to open %s\n", name); + err = RB_ERR_IO; + goto err; + } + + err = read(fd, ctx->buf, ctx->buflen); + if (err != ctx->buflen) { + fprintf(stderr, "unable to read from %s\n", name); + err = RB_ERR_IO; + goto err_close; + } + + magic = get_u32(ctx->buf); + if (magic != RB_MAGIC_SOFT) { + fprintf(stderr, "invalid configuration\n"); + err = RB_ERR_INVALID; + goto err_close; + } + + crc_orig = get_u32(ctx->buf + 4); + put_u32(ctx->buf + 4, 0); + crc = cyg_ether_crc32((unsigned char *) ctx->buf, ctx->buflen); + if (crc != crc_orig) { + fprintf(stderr, "configuration has CRC error\n"); + err = RB_ERR_INVALID; + goto err_close; + } + + err = 0; + + err_close: + close(fd); + err: + return err; +} + +static int +rbcfg_open() +{ + char *mtd_device; + struct rbcfg_ctx *ctx; + int buflen; + int err; + + mtd_device = rbcfg_find_mtd(RBCFG_MTD_NAME, &buflen); + if (!mtd_device) { + fprintf(stderr, "unable to find configuration\n"); + return RB_ERR_NOTFOUND; + } + + ctx = malloc(sizeof(struct rbcfg_ctx) + buflen); + if (ctx == NULL) { + err = RB_ERR_NOMEM; + goto err_free_mtd; + } + + ctx->mtd_device = mtd_device; + ctx->tmp_file = RBCFG_TMP_FILE; + ctx->buflen = buflen; + ctx->buf = (char *) &ctx[1]; + + err = rbcfg_load(ctx); + if (err) + goto err_free_ctx; + + rbcfg_ctx = ctx; + return 0; + + err_free_ctx: + free(ctx); + err_free_mtd: + free(mtd_device); + return err; +} + +static int +rbcfg_update(int tmp) +{ + struct rbcfg_ctx *ctx = rbcfg_ctx; + char *name; + uint32_t crc; + int fd; + int err; + + put_u32(ctx->buf, RB_MAGIC_SOFT); + put_u32(ctx->buf + 4, 0); + crc = cyg_ether_crc32((unsigned char *) ctx->buf, ctx->buflen); + put_u32(ctx->buf + 4, crc); + + name = (tmp) ? ctx->tmp_file : ctx->mtd_device; + fd = open(name, O_WRONLY | O_CREAT); + if (fd < 0) { + fprintf(stderr, "unable to open %s for writing\n", name); + err = RB_ERR_IO; + goto out; + } + + err = write(fd, ctx->buf, ctx->buflen); + if (err != ctx->buflen) { + err = RB_ERR_IO; + goto out_close; + } + + fsync(fd); + err = 0; + + out_close: + close(fd); + out: + return err; +} + +static void +rbcfg_close(void) +{ + struct rbcfg_ctx *ctx; + + ctx = rbcfg_ctx; + free(ctx->mtd_device); + free(ctx); +} + +static const struct rbcfg_value * +rbcfg_env_find(const struct rbcfg_env *env, const char *name) +{ + unsigned i; + + for (i = 0; i < env->num_values; i++) { + const struct rbcfg_value *v = &env->values[i]; + + if (strcmp(v->name, name) == 0) + return v; + } + + return NULL; +} + +static const struct rbcfg_value * +rbcfg_env_find_u32(const struct rbcfg_env *env, uint32_t val) +{ + unsigned i; + + for (i = 0; i < env->num_values; i++) { + const struct rbcfg_value *v = &env->values[i]; + + if (v->val.u32 == val) + return v; + } + + return NULL; +} + +static const char * +rbcfg_env_get_u32(const struct rbcfg_env *env) +{ + const struct rbcfg_value *v; + uint32_t val; + int err; + + err = rbcfg_get_u32(rbcfg_ctx, env->id, &val); + if (err) + return NULL; + + v = rbcfg_env_find_u32(env, val); + if (v == NULL) { + fprintf(stderr, "unknown value %08x found for %s\n", + val, env->name); + return NULL; + } + + return v->name; +} + +static int +rbcfg_env_set_u32(const struct rbcfg_env *env, const char *data) +{ + const struct rbcfg_value *v; + int err; + + v = rbcfg_env_find(env, data); + if (v == NULL) { + fprintf(stderr, "invalid value '%s'\n", data); + return RB_ERR_INVALID; + } + + err = rbcfg_set_u32(rbcfg_ctx, env->id, v->val.u32); + return err; +} + +static const char * +rbcfg_env_get(const struct rbcfg_env *env) +{ + const char *ret = NULL; + + switch (env->type) { + case RBCFG_ENV_TYPE_U32: + ret = rbcfg_env_get_u32(env); + break; + } + + return ret; +} + +static int +rbcfg_env_set(const struct rbcfg_env *env, const char *data) +{ + int ret = 0; + + switch (env->type) { + case RBCFG_ENV_TYPE_U32: + ret = rbcfg_env_set_u32(env, data); + break; + } + + return ret; +} + +static int +rbcfg_cmd_apply(int argc, const char *argv[]) +{ + return rbcfg_update(0); +} + +static int +rbcfg_cmd_help(int argc, const char *argv[]) +{ + usage(); + return 0; +} + +static int +rbcfg_cmd_get(int argc, const char *argv[]) +{ + int err = RB_ERR_NOTFOUND; + int i; + + if (argc != 1) { + usage(); + return RB_ERR_INVALID; + } + + for (i = 0; i < ARRAY_SIZE(rbcfg_envs); i++) { + const struct rbcfg_env *env = &rbcfg_envs[i]; + const char *value; + + if (strcmp(env->name, argv[0])) + continue; + + value = rbcfg_env_get(env); + if (value) { + fprintf(stdout, "%s\n", value); + err = 0; + } + break; + } + + return err; +} + +static int +rbcfg_cmd_set(int argc, const char *argv[]) +{ + int err = RB_ERR_INVALID; + int i; + + if (argc != 2) { + /* not enough parameters */ + usage(); + return RB_ERR_INVALID; + } + + for (i = 0; i < ARRAY_SIZE(rbcfg_envs); i++) { + const struct rbcfg_env *env = &rbcfg_envs[i]; + + if (strcmp(env->name, argv[0])) + continue; + + err = rbcfg_env_set(env, argv[1]); + if (err == 0) + err = rbcfg_update(1); + break; + } + + return err; +} + +static int +rbcfg_cmd_show(int argc, const char *argv[]) +{ + int i; + + if (argc != 0) { + usage(); + return RB_ERR_INVALID; + } + + for (i = 0; i < ARRAY_SIZE(rbcfg_envs); i++) { + const struct rbcfg_env *env = &rbcfg_envs[i]; + const char *value; + + value = rbcfg_env_get(env); + if (value) + fprintf(stdout, "%s=%s\n", env->name, value); + } + + return 0; +} + +static const struct rbcfg_command rbcfg_commands[] = { + { + .command = "apply", + .usage = "apply\n" + "\t- write configuration to the mtd device", + .flags = CMD_FLAG_USES_CFG, + .exec = rbcfg_cmd_apply, + }, { + .command = "help", + .usage = "help\n" + "\t- show this screen", + .exec = rbcfg_cmd_help, + }, { + .command = "get", + .usage = "get \n" + "\t- get value of the configuration option ", + .flags = CMD_FLAG_USES_CFG, + .exec = rbcfg_cmd_get, + }, { + .command = "set", + .usage = "set \n" + "\t- set value of the configuration option to ", + .flags = CMD_FLAG_USES_CFG, + .exec = rbcfg_cmd_set, + }, { + .command = "show", + .usage = "show\n" + "\t- show value of all configuration options", + .flags = CMD_FLAG_USES_CFG, + .exec = rbcfg_cmd_show, + } +}; + +static void +usage(void) +{ + char buf[255]; + int len; + int i; + + fprintf(stderr, "Usage: %s \n", rbcfg_name); + + fprintf(stderr, "\nCommands:\n"); + for (i = 0; i < ARRAY_SIZE(rbcfg_commands); i++) { + const struct rbcfg_command *cmd; + cmd = &rbcfg_commands[i]; + + len = snprintf(buf, sizeof(buf), "%s", cmd->usage); + buf[len] = '\0'; + fprintf(stderr, "%s\n", buf); + } + + fprintf(stderr, "\nConfiguration options:\n"); + for (i = 0; i < ARRAY_SIZE(rbcfg_envs); i++) { + const struct rbcfg_env *env; + int j; + + env = &rbcfg_envs[i]; + fprintf(stderr, "\n%s:\n", env->name); + for (j = 0; j < env->num_values; j++) { + const struct rbcfg_value *v = &env->values[j]; + fprintf(stderr, "\t%-12s %s\n", v->name, v->desc); + } + } + fprintf(stderr, "\n"); +} + +int main(int argc, const char *argv[]) +{ + const struct rbcfg_command *cmd = NULL; + int ret; + int i; + + rbcfg_name = (char *) argv[0]; + + if (argc < 2) { + usage(); + return EXIT_FAILURE; + } + + for (i = 0; i < ARRAY_SIZE(rbcfg_commands); i++) { + if (strcmp(rbcfg_commands[i].command, argv[1]) == 0) { + cmd = &rbcfg_commands[i]; + break; + } + } + + if (cmd == NULL) { + fprintf(stderr, "unknown command '%s'\n", argv[1]); + usage(); + return EXIT_FAILURE; + } + + argc -= 2; + argv += 2; + + if (cmd->flags & CMD_FLAG_USES_CFG) { + ret = rbcfg_open(); + if (ret) + return EXIT_FAILURE; + } + + ret = cmd->exec(argc, argv); + + if (cmd->flags & CMD_FLAG_USES_CFG) + rbcfg_close(); + + if (ret) + return EXIT_FAILURE; + + return EXIT_SUCCESS; +} diff --git a/package/boot/rbcfg/src/rbcfg.h b/package/boot/rbcfg/src/rbcfg.h new file mode 100644 index 0000000000..899161a10d --- /dev/null +++ b/package/boot/rbcfg/src/rbcfg.h @@ -0,0 +1,75 @@ +/* + * Mikrotik's RouterBOOT configuration defines + * + * Copyright (C) 2010 Gabor Juhos + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 as published + * by the Free Software Foundation. + * + */ + +#ifndef _RBCFG_H +#define _RBCFG_H + +/* + * Magic numbers + */ +#define RB_MAGIC_SOFT 0x74666f53 /* 'Soft' */ + +/* + * ID values for Software settings + */ +#define RB_ID_TERMINATOR 0 +#define RB_ID_UART_SPEED 1 +#define RB_ID_BOOT_DELAY 2 +#define RB_ID_BOOT_DEVICE 3 +#define RB_ID_BOOT_KEY 4 +#define RB_ID_CPU_MODE 5 +#define RB_ID_FW_VERSION 6 +#define RB_ID_SOFT_07 7 +#define RB_ID_SOFT_08 8 +#define RB_ID_BOOT_PROTOCOL 9 +#define RB_ID_SOFT_10 10 +#define RB_ID_SOFT_11 11 +#define RB_ID_BOOTER 13 + +#define RB_UART_SPEED_115200 0 +#define RB_UART_SPEED_57600 1 +#define RB_UART_SPEED_38400 2 +#define RB_UART_SPEED_19200 3 +#define RB_UART_SPEED_9600 4 +#define RB_UART_SPEED_4800 5 +#define RB_UART_SPEED_2400 6 +#define RB_UART_SPEED_1200 7 +#define RB_UART_SPEED_OFF 8 + +#define RB_BOOT_DELAY_1SEC 1 +#define RB_BOOT_DELAY_2SEC 2 +#define RB_BOOT_DELAY_3SEC 3 +#define RB_BOOT_DELAY_4SEC 4 +#define RB_BOOT_DELAY_5SEC 5 +#define RB_BOOT_DELAY_6SEC 6 +#define RB_BOOT_DELAY_7SEC 7 +#define RB_BOOT_DELAY_8SEC 8 +#define RB_BOOT_DELAY_9SEC 9 + +#define RB_BOOT_DEVICE_ETHER 0 +#define RB_BOOT_DEVICE_NANDETH 1 +#define RB_BOOT_DEVICE_CFCARD 2 +#define RB_BOOT_DEVICE_ETHONCE 3 +#define RB_BOOT_DEVICE_NANDONLY 5 + +#define RB_BOOT_KEY_ANY 0 +#define RB_BOOT_KEY_DEL 1 + +#define RB_CPU_MODE_POWERSAVE 0 +#define RB_CPU_MODE_REGULAR 1 + +#define RB_BOOT_PROTOCOL_BOOTP 0 +#define RB_BOOT_PROTOCOL_DHCP 1 + +#define RB_BOOTER_REGULAR 0 +#define RB_BOOTER_BACKUP 1 + +#endif /* _RBCFG_H */ diff --git a/package/boot/yamonenv/Makefile b/package/boot/yamonenv/Makefile index a490f45fe1..011d39acd6 100644 --- a/package/boot/yamonenv/Makefile +++ b/package/boot/yamonenv/Makefile @@ -13,10 +13,12 @@ PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)_gruen.4g__$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=http://downloads.openwrt.org/sources/ -PKG_MD5SUM:=a3e4f24155aa3ba5aa502bc63fdaa6ad +PKG_HASH:=466eca9cdad2c15e957fb9ce7d0b6927ecd17d85c4cc2dff37e97a3e6b209c67 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME) +PKG_FLAGS:=nonshared + include $(INCLUDE_DIR)/package.mk define Package/yamonenv diff --git a/package/kernel/avila-wdt/Makefile b/package/kernel/avila-wdt/Makefile deleted file mode 100644 index 94bda9b8d5..0000000000 --- a/package/kernel/avila-wdt/Makefile +++ /dev/null @@ -1,35 +0,0 @@ -# -# Copyright (C) 2008 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk -include $(INCLUDE_DIR)/kernel.mk - -PKG_NAME:=avila-wdt -PKG_RELEASE:=1 - -include $(INCLUDE_DIR)/package.mk - -define KernelPackage/avila-wdt - SUBMENU:=Other modules - TITLE:=GPIO hardware watchdog driver for modified Avila boards - DEPENDS:=@GPIO_SUPPORT @TARGET_ixp4xx - FILES:=$(PKG_BUILD_DIR)/avila-wdt.ko - AUTOLOAD:=$(call AutoLoad,10,avila-wdt) -endef - -MAKE_OPTS:= \ - ARCH="$(LINUX_KARCH)" \ - CROSS_COMPILE="$(TARGET_CROSS)" \ - SUBDIRS="$(PKG_BUILD_DIR)" - -define Build/Compile - $(MAKE) -C "$(LINUX_DIR)" \ - $(MAKE_OPTS) \ - modules -endef - -$(eval $(call KernelPackage,avila-wdt)) diff --git a/package/kernel/avila-wdt/src/Makefile b/package/kernel/avila-wdt/src/Makefile deleted file mode 100644 index 90d90657ed..0000000000 --- a/package/kernel/avila-wdt/src/Makefile +++ /dev/null @@ -1 +0,0 @@ -obj-m := avila-wdt.o diff --git a/package/kernel/avila-wdt/src/avila-wdt.c b/package/kernel/avila-wdt/src/avila-wdt.c deleted file mode 100644 index 22a3d6c7ea..0000000000 --- a/package/kernel/avila-wdt/src/avila-wdt.c +++ /dev/null @@ -1,231 +0,0 @@ -/* - * avila-wdt.c - * Copyright (C) 2009 Felix Fietkau - * - * based on: - * drivers/char/watchdog/ixp4xx_wdt.c - * - * Watchdog driver for Intel IXP4xx network processors - * - * Author: Deepak Saxena - * - * Copyright 2004 (c) MontaVista, Software, Inc. - * Based on sa1100 driver, Copyright (C) 2000 Oleg Drokin - * - * This file is licensed under the terms of the GNU General Public - * License version 2. This program is licensed "as is" without any - * warranty of any kind, whether express or implied. - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -static int nowayout = WATCHDOG_NOWAYOUT; -static int heartbeat = 20; /* (secs) Default is 20 seconds */ -static unsigned long wdt_status; -static atomic_t wdt_counter; -struct timer_list wdt_timer; - -#define WDT_IN_USE 0 -#define WDT_OK_TO_CLOSE 1 -#define WDT_RUNNING 2 - -static void wdt_refresh(unsigned long data) -{ - if (test_bit(WDT_RUNNING, &wdt_status)) { - if (atomic_dec_and_test(&wdt_counter)) { - printk(KERN_WARNING "Avila watchdog expired, expect a reboot soon!\n"); - clear_bit(WDT_RUNNING, &wdt_status); - return; - } - } - - /* strobe to the watchdog */ - gpio_line_set(14, IXP4XX_GPIO_HIGH); - gpio_line_set(14, IXP4XX_GPIO_LOW); - - mod_timer(&wdt_timer, jiffies + msecs_to_jiffies(500)); -} - -static void wdt_enable(void) -{ - atomic_set(&wdt_counter, heartbeat * 2); - - /* Disable clock generator output on GPIO 14/15 */ - *IXP4XX_GPIO_GPCLKR &= ~(1 << 8); - - /* activate GPIO 14 out */ - gpio_line_config(14, IXP4XX_GPIO_OUT); - gpio_line_set(14, IXP4XX_GPIO_LOW); - - if (!test_bit(WDT_RUNNING, &wdt_status)) - wdt_refresh(0); - set_bit(WDT_RUNNING, &wdt_status); -} - -static void wdt_disable(void) -{ - /* Re-enable clock generator output on GPIO 14/15 */ - *IXP4XX_GPIO_GPCLKR |= (1 << 8); -} - -static int avila_wdt_open(struct inode *inode, struct file *file) -{ - if (test_and_set_bit(WDT_IN_USE, &wdt_status)) - return -EBUSY; - - clear_bit(WDT_OK_TO_CLOSE, &wdt_status); - wdt_enable(); - return nonseekable_open(inode, file); -} - -static ssize_t -avila_wdt_write(struct file *file, const char *data, size_t len, loff_t *ppos) -{ - if (len) { - if (!nowayout) { - size_t i; - - clear_bit(WDT_OK_TO_CLOSE, &wdt_status); - - for (i = 0; i != len; i++) { - char c; - - if (get_user(c, data + i)) - return -EFAULT; - if (c == 'V') - set_bit(WDT_OK_TO_CLOSE, &wdt_status); - } - } - wdt_enable(); - } - return len; -} - -static struct watchdog_info ident = { - .options = WDIOF_CARDRESET | WDIOF_MAGICCLOSE | - WDIOF_SETTIMEOUT | WDIOF_KEEPALIVEPING, - .identity = "Avila Watchdog", -}; - - -static long avila_wdt_ioctl(struct file *file, unsigned int cmd, - unsigned long arg) -{ - int ret = -ENOTTY; - int time; - - switch (cmd) { - case WDIOC_GETSUPPORT: - ret = copy_to_user((struct watchdog_info *)arg, &ident, - sizeof(ident)) ? -EFAULT : 0; - break; - - case WDIOC_GETSTATUS: - ret = put_user(0, (int *)arg); - break; - - case WDIOC_KEEPALIVE: - wdt_enable(); - ret = 0; - break; - - case WDIOC_SETTIMEOUT: - ret = get_user(time, (int *)arg); - if (ret) - break; - - if (time <= 0 || time > 60) { - ret = -EINVAL; - break; - } - - heartbeat = time; - wdt_enable(); - /* Fall through */ - - case WDIOC_GETTIMEOUT: - ret = put_user(heartbeat, (int *)arg); - break; - } - return ret; -} - -static int avila_wdt_release(struct inode *inode, struct file *file) -{ - if (test_bit(WDT_OK_TO_CLOSE, &wdt_status)) - wdt_disable(); - else - printk(KERN_CRIT "WATCHDOG: Device closed unexpectedly - " - "timer will not stop\n"); - clear_bit(WDT_IN_USE, &wdt_status); - clear_bit(WDT_OK_TO_CLOSE, &wdt_status); - - return 0; -} - - -static const struct file_operations avila_wdt_fops = { - .owner = THIS_MODULE, - .llseek = no_llseek, - .write = avila_wdt_write, - .unlocked_ioctl = avila_wdt_ioctl, - .open = avila_wdt_open, - .release = avila_wdt_release, -}; - -static struct miscdevice avila_wdt_miscdev = { - .minor = WATCHDOG_MINOR + 1, - .name = "avila_watchdog", - .fops = &avila_wdt_fops, -}; - -static int __init avila_wdt_init(void) -{ - int ret; - - init_timer(&wdt_timer); - wdt_timer.expires = 0; - wdt_timer.data = 0; - wdt_timer.function = wdt_refresh; - ret = misc_register(&avila_wdt_miscdev); - if (ret == 0) - printk(KERN_INFO "Avila Watchdog Timer: heartbeat %d sec\n", - heartbeat); - return ret; -} - -static void __exit avila_wdt_exit(void) -{ - misc_deregister(&avila_wdt_miscdev); - del_timer(&wdt_timer); - wdt_disable(); -} - - -module_init(avila_wdt_init); -module_exit(avila_wdt_exit); - -MODULE_AUTHOR("Felix Fietkau "); -MODULE_DESCRIPTION("Gateworks Avila Hardware Watchdog"); - -module_param(heartbeat, int, 0); -MODULE_PARM_DESC(heartbeat, "Watchdog heartbeat in seconds (default 20s)"); - -module_param(nowayout, int, 0); -MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started"); - -MODULE_LICENSE("GPL"); -MODULE_ALIAS_MISCDEV(WATCHDOG_MINOR); - diff --git a/package/kernel/kmod-sched-cake/Makefile b/package/kernel/kmod-sched-cake/Makefile index 519278db1c..b58c610b2c 100644 --- a/package/kernel/kmod-sched-cake/Makefile +++ b/package/kernel/kmod-sched-cake/Makefile @@ -12,10 +12,10 @@ PKG_NAME:=sched-cake PKG_RELEASE:=1 PKG_SOURCE_PROTO:=git -PKG_SOURCE_URL:=https://github.com/kdarbyshirebryant/sch_cake.git -PKG_SOURCE_DATE:=2016-12-19 -PKG_SOURCE_VERSION:=70c8eb766d5afcf3cf187594b7cd776da92bee3c -PKG_MIRROR_HASH:=16174db5dad0a5b5ba522d4cfc058cff9851ed013a3a05166b04eb127bb12a24 +PKG_SOURCE_URL:=https://github.com/dtaht/sch_cake.git +PKG_SOURCE_DATE:=2017-01-28 +PKG_SOURCE_VERSION:=9789742cfc596d48583ba4cdbc8f38d026121fa6 +PKG_MIRROR_HASH:=2a5afc45722c28ca8778eb50452eb305306e7898b32d7d6d73d3e77edf3cce99 PKG_MAINTAINER:=Kevin Darbyshire-Bryant include $(INCLUDE_DIR)/package.mk diff --git a/package/kernel/linux/modules/can.mk b/package/kernel/linux/modules/can.mk index eeef88a835..5529fe02e0 100644 --- a/package/kernel/linux/modules/can.mk +++ b/package/kernel/linux/modules/can.mk @@ -241,7 +241,7 @@ $(eval $(call KernelPackage,can-c-can)) define KernelPackage/can-c-can-platform TITLE:=Platform Bus based BOSCH C_CAN/D_CAN driver KCONFIG:=CONFIG_CAN_C_CAN_PLATFORM - DEPENDS:=kmod-can-c-can +LINUX_4_1:kmod-regmap + DEPENDS:=kmod-can-c-can +!LINUX_3_18:kmod-regmap FILES:=$(LINUX_DIR)/drivers/net/can/c_can/c_can_platform.ko AUTOLOAD:=$(call AutoProbe,c_can_platform) $(call AddDepends/can) diff --git a/package/kernel/linux/modules/netfilter.mk b/package/kernel/linux/modules/netfilter.mk index bc2f349c76..a5941d2310 100644 --- a/package/kernel/linux/modules/netfilter.mk +++ b/package/kernel/linux/modules/netfilter.mk @@ -495,7 +495,7 @@ $(eval $(call KernelPackage,ipt-tproxy)) define KernelPackage/ipt-tee TITLE:=TEE support - DEPENDS:=+kmod-ipt-conntrack @!LINUX_4_4 + DEPENDS:=+kmod-ipt-conntrack KCONFIG:= \ CONFIG_NETFILTER_XT_TARGET_TEE FILES:= \ diff --git a/package/kernel/linux/modules/netsupport.mk b/package/kernel/linux/modules/netsupport.mk index ef5c5ba848..3d5e74327a 100644 --- a/package/kernel/linux/modules/netsupport.mk +++ b/package/kernel/linux/modules/netsupport.mk @@ -736,7 +736,7 @@ $(eval $(call KernelPackage,mppe)) SCHED_MODULES = $(patsubst $(LINUX_DIR)/net/sched/%.ko,%,$(wildcard $(LINUX_DIR)/net/sched/*.ko)) -SCHED_MODULES_CORE = sch_ingress sch_fq_codel sch_hfsc cls_fw cls_route cls_flow cls_tcindex cls_u32 em_u32 act_mirred act_skbedit +SCHED_MODULES_CORE = sch_ingress sch_fq_codel sch_hfsc sch_htb sch_tbf cls_fw cls_route cls_flow cls_tcindex cls_u32 em_u32 act_mirred act_skbedit SCHED_MODULES_FILTER = $(SCHED_MODULES_CORE) act_connmark sch_netem SCHED_MODULES_EXTRA = $(filter-out $(SCHED_MODULES_FILTER),$(SCHED_MODULES)) SCHED_FILES = $(patsubst %,$(LINUX_DIR)/net/sched/%.ko,$(filter $(SCHED_MODULES_CORE),$(SCHED_MODULES))) @@ -748,6 +748,8 @@ define KernelPackage/sched-core KCONFIG:= \ CONFIG_NET_SCHED=y \ CONFIG_NET_SCH_HFSC \ + CONFIG_NET_SCH_HTB \ + CONFIG_NET_SCH_TBF \ CONFIG_NET_SCH_INGRESS \ CONFIG_NET_SCH_FQ_CODEL \ CONFIG_NET_CLS=y \ @@ -789,12 +791,10 @@ define KernelPackage/sched KCONFIG:= \ CONFIG_NET_SCH_CODEL \ CONFIG_NET_SCH_DSMARK \ - CONFIG_NET_SCH_HTB \ CONFIG_NET_SCH_FIFO \ CONFIG_NET_SCH_GRED \ CONFIG_NET_SCH_PRIO \ CONFIG_NET_SCH_RED \ - CONFIG_NET_SCH_TBF \ CONFIG_NET_SCH_SFQ \ CONFIG_NET_SCH_TEQL \ CONFIG_NET_SCH_FQ \ diff --git a/package/kernel/linux/modules/nls.mk b/package/kernel/linux/modules/nls.mk index 55c5c1a8a8..05fce27bbc 100644 --- a/package/kernel/linux/modules/nls.mk +++ b/package/kernel/linux/modules/nls.mk @@ -147,6 +147,38 @@ endef $(eval $(call KernelPackage,nls-cp932)) +define KernelPackage/nls-cp936 + SUBMENU:=Native Language Support + TITLE:=Codepage 936 (Simplified Chinese) + KCONFIG:=CONFIG_NLS_CODEPAGE_936 + FILES:=$(LINUX_DIR)/fs/nls/nls_cp936.ko + AUTOLOAD:=$(call AutoLoad,25,nls_cp936) + $(call AddDepends/nls) +endef + +define KernelPackage/nls-cp936/description + Kernel module for NLS Codepage 936 (Simplified Chinese) +endef + +$(eval $(call KernelPackage,nls-cp936)) + + +define KernelPackage/nls-cp950 + SUBMENU:=Native Language Support + TITLE:=Codepage 950 (Traditional Chinese) + KCONFIG:=CONFIG_NLS_CODEPAGE_950 + FILES:=$(LINUX_DIR)/fs/nls/nls_cp950.ko + AUTOLOAD:=$(call AutoLoad,25,nls_cp950) + $(call AddDepends/nls) +endef + +define KernelPackage/nls-cp950/description + Kernel module for NLS Codepage 950 (Traditional Chinese) +endef + +$(eval $(call KernelPackage,nls-cp950)) + + define KernelPackage/nls-cp1250 SUBMENU:=Native Language Support TITLE:=Codepage 1250 (Eastern Europe) diff --git a/package/kernel/mac80211/Makefile b/package/kernel/mac80211/Makefile index 57e13706e9..32ed19e125 100644 --- a/package/kernel/mac80211/Makefile +++ b/package/kernel/mac80211/Makefile @@ -10,13 +10,13 @@ include $(INCLUDE_DIR)/kernel.mk PKG_NAME:=mac80211 -PKG_VERSION:=2016-10-08 +PKG_VERSION:=2017-01-31 PKG_RELEASE:=1 PKG_SOURCE_URL:=http://mirror2.openwrt.org/sources PKG_BACKPORT_VERSION:= -PKG_HASH:=4f6350e3b75815060bfdf47ef266ad613c7bfea5b7b1dc4552dee69e1bebe4fb +PKG_HASH:=75e6d39e34cf156212a2509172a4a62b673b69eb4a1d9aaa565f7fa719fa2317 -PKG_SOURCE:=compat-wireless-$(PKG_VERSION)$(PKG_BACKPORT_VERSION).tar.bz2 +PKG_SOURCE:=compat-wireless-$(PKG_VERSION)$(PKG_BACKPORT_VERSION).tar.xz PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/compat-wireless-$(PKG_VERSION) PKG_BUILD_PARALLEL:=1 diff --git a/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh b/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh index 1fa39b8261..baa023ecf6 100644 --- a/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh +++ b/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh @@ -756,7 +756,7 @@ drv_mac80211_setup() { for_each_interface "ap" mac80211_prepare_vif [ -n "$hostapd_ctrl" ] && { - /usr/sbin/hostapd -P /var/run/wifi-$phy.pid -B "$hostapd_conf_file" + /usr/sbin/hostapd -s -P /var/run/wifi-$phy.pid -B "$hostapd_conf_file" ret="$?" wireless_add_process "$(cat /var/run/wifi-$phy.pid)" "/usr/sbin/hostapd" 1 [ "$ret" != 0 ] && { diff --git a/package/kernel/mac80211/files/lib/wifi/mac80211.sh b/package/kernel/mac80211/files/lib/wifi/mac80211.sh index 4bfc7424b2..3d1299d7da 100644 --- a/package/kernel/mac80211/files/lib/wifi/mac80211.sh +++ b/package/kernel/mac80211/files/lib/wifi/mac80211.sh @@ -122,7 +122,7 @@ detect_mac80211() { set wireless.default_radio${devidx}.device=radio${devidx} set wireless.default_radio${devidx}.network=lan set wireless.default_radio${devidx}.mode=ap - set wireless.default_radio${devidx}.ssid=LEDE + set wireless.default_radio${devidx}.ssid=libreCMC set wireless.default_radio${devidx}.encryption=none EOF uci -q commit wireless diff --git a/package/kernel/mac80211/patches/002-change_allconfig.patch b/package/kernel/mac80211/patches/002-change_allconfig.patch index bd5bebfa45..a071ae6370 100644 --- a/package/kernel/mac80211/patches/002-change_allconfig.patch +++ b/package/kernel/mac80211/patches/002-change_allconfig.patch @@ -1,6 +1,6 @@ --- a/kconf/conf.c +++ b/kconf/conf.c -@@ -593,40 +593,12 @@ int main(int ac, char **av) +@@ -594,40 +594,12 @@ int main(int ac, char **av) case oldconfig: case listnewconfig: case olddefconfig: @@ -44,7 +44,7 @@ break; --- a/kconf/confdata.c +++ b/kconf/confdata.c -@@ -1169,6 +1169,8 @@ bool conf_set_all_new_symbols(enum conf_ +@@ -1170,6 +1170,8 @@ bool conf_set_all_new_symbols(enum conf_ } bool has_changed = false; @@ -53,7 +53,7 @@ for_all_symbols(i, sym) { if (sym_has_value(sym) || (sym->flags & SYMBOL_VALID)) continue; -@@ -1212,8 +1214,6 @@ bool conf_set_all_new_symbols(enum conf_ +@@ -1213,8 +1215,6 @@ bool conf_set_all_new_symbols(enum conf_ } diff --git a/package/kernel/mac80211/patches/004-fix_duplicate_skcipher_backport.patch b/package/kernel/mac80211/patches/004-fix_duplicate_skcipher_backport.patch deleted file mode 100644 index 38b31795a4..0000000000 --- a/package/kernel/mac80211/patches/004-fix_duplicate_skcipher_backport.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/compat/Makefile -+++ b/compat/Makefile -@@ -35,8 +35,6 @@ compat-$(CPTCFG_KERNEL_4_6) += backport- - - compat-$(CPTCFG_BPAUTO_BUILD_CRYPTO_CCM) += crypto-ccm.o - compat-$(CPTCFG_BPAUTO_CRYPTO_SKCIPHER) += crypto-skcipher.o --skcipher-objs += crypto-skcipher.o --obj-$(CPTCFG_BPAUTO_CRYPTO_SKCIPHER) += skcipher.o - compat-$(CPTCFG_BPAUTO_BUILD_WANT_DEV_COREDUMP) += drivers-base-devcoredump.o - compat-$(CPTCFG_BPAUTO_RHASHTABLE) += lib-rhashtable.o - cordic-objs += lib-cordic.o diff --git a/package/kernel/mac80211/patches/004-kconfig_backport_fix.patch b/package/kernel/mac80211/patches/004-kconfig_backport_fix.patch new file mode 100644 index 0000000000..f11029844c --- /dev/null +++ b/package/kernel/mac80211/patches/004-kconfig_backport_fix.patch @@ -0,0 +1,28 @@ +--- a/backport-include/linux/kconfig.h ++++ b/backport-include/linux/kconfig.h +@@ -5,6 +5,8 @@ + #include_next + #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)) +@@ -24,6 +27,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/package/kernel/mac80211/patches/005-backport_skb_get_hash_perturb.patch b/package/kernel/mac80211/patches/005-backport_skb_get_hash_perturb.patch deleted file mode 100644 index 29bccc1e99..0000000000 --- a/package/kernel/mac80211/patches/005-backport_skb_get_hash_perturb.patch +++ /dev/null @@ -1,22 +0,0 @@ ---- a/backport-include/linux/skbuff.h -+++ b/backport-include/linux/skbuff.h -@@ -305,6 +305,19 @@ static inline void skb_free_frag(void *d - { - put_page(virt_to_head_page(data)); - } -+ -+#include -+#include -+ -+static inline u32 skb_get_hash_perturb(struct sk_buff *skb, u32 key) -+{ -+ struct flow_keys keys; -+ -+ skb_flow_dissect(skb, &keys); -+ return jhash_3words((__force u32)keys.dst, -+ (__force u32)keys.src ^ keys.ip_proto, -+ (__force u32)keys.ports, key); -+} - #endif - - #endif /* __BACKPORT_SKBUFF_H */ diff --git a/package/kernel/mac80211/patches/005-revert-devcoredump.patch b/package/kernel/mac80211/patches/005-revert-devcoredump.patch new file mode 100644 index 0000000000..ff460900ff --- /dev/null +++ b/package/kernel/mac80211/patches/005-revert-devcoredump.patch @@ -0,0 +1,152 @@ +--- a/compat/Makefile ++++ b/compat/Makefile +@@ -35,8 +35,6 @@ compat-$(CPTCFG_KERNEL_4_6) += backport- + + compat-$(CPTCFG_BPAUTO_BUILD_CRYPTO_CCM) += crypto-ccm.o + compat-$(CPTCFG_BPAUTO_CRYPTO_SKCIPHER) += crypto-skcipher.o +-skcipher-objs += crypto-skcipher.o +-obj-$(CPTCFG_BPAUTO_CRYPTO_SKCIPHER) += skcipher.o + compat-$(CPTCFG_BPAUTO_BUILD_WANT_DEV_COREDUMP) += drivers-base-devcoredump.o + compat-$(CPTCFG_BPAUTO_RHASHTABLE) += lib-rhashtable.o + cordic-objs += lib-cordic.o +--- a/compat/drivers-base-devcoredump.c ++++ b/compat/drivers-base-devcoredump.c +@@ -31,6 +31,7 @@ + #include + #include + #include ++#include "backports.h" + + static struct class devcd_class; + +@@ -40,6 +41,10 @@ static bool devcd_disabled; + /* if data isn't read by userspace after 5 minutes then delete it */ + #define DEVCD_TIMEOUT (HZ * 60 * 5) + ++#if LINUX_VERSION_CODE < KERNEL_VERSION(3,11,0) ++static struct bin_attribute devcd_attr_data; ++#endif ++ + struct devcd_entry { + struct device devcd_dev; + void *data; +@@ -69,8 +74,7 @@ static void devcd_dev_release(struct dev + * a struct device to know when it goes away? + */ + if (devcd->failing_dev->kobj.sd) +- sysfs_delete_link(&devcd->failing_dev->kobj, &dev->kobj, +- "devcoredump"); ++ sysfs_remove_link(&devcd->failing_dev->kobj, "devcoredump"); + + put_device(devcd->failing_dev); + kfree(devcd); +@@ -82,6 +86,9 @@ static void devcd_del(struct work_struct + + devcd = container_of(wk, struct devcd_entry, del_wk.work); + ++#if LINUX_VERSION_CODE < KERNEL_VERSION(3,11,0) ++ device_remove_bin_file(&devcd->devcd_dev, &devcd_attr_data); ++#endif + device_del(&devcd->devcd_dev); + put_device(&devcd->devcd_dev); + } +@@ -115,6 +122,7 @@ static struct bin_attribute devcd_attr_d + .write = devcd_data_write, + }; + ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,11,0) + static struct bin_attribute *devcd_dev_bin_attrs[] = { + &devcd_attr_data, NULL, + }; +@@ -126,6 +134,7 @@ static const struct attribute_group devc + static const struct attribute_group *devcd_dev_groups[] = { + &devcd_dev_group, NULL, + }; ++#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(3,11,0) */ + + static int devcd_free(struct device *dev, void *data) + { +@@ -160,18 +169,11 @@ static ssize_t disabled_store(struct cla + + return count; + } +-static CLASS_ATTR_RW(disabled); + +-static struct attribute *devcd_class_attrs[] = { +- &class_attr_disabled.attr, +- NULL, ++static struct class_attribute devcd_class_attrs[] = { ++ __ATTR_RW(disabled), ++ __ATTR_NULL + }; +-#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,11,0) +-ATTRIBUTE_GROUPS(devcd_class); +-#else +-#define BP_ATTR_GRP_STRUCT device_attribute +-ATTRIBUTE_GROUPS_BACKPORT(devcd_class); +-#endif + + static struct class devcd_class = { + .name = "devcoredump", +@@ -179,10 +181,8 @@ static struct class devcd_class = { + .dev_release = devcd_dev_release, + #if LINUX_VERSION_CODE >= KERNEL_VERSION(3,11,0) + .dev_groups = devcd_dev_groups, +-#else +- .dev_attrs = devcd_class_dev_attrs, + #endif +- .class_groups = devcd_class_groups, ++ .class_attrs = devcd_class_attrs, + }; + + static ssize_t devcd_readv(char *buffer, loff_t offset, size_t count, +@@ -325,6 +325,11 @@ void dev_coredumpm(struct device *dev, s + if (device_add(&devcd->devcd_dev)) + goto put_device; + ++#if LINUX_VERSION_CODE < KERNEL_VERSION(3,11,0) ++ if (device_create_bin_file(&devcd->devcd_dev, &devcd_attr_data)) ++ goto put_device; ++#endif ++ + if (sysfs_create_link(&devcd->devcd_dev.kobj, &dev->kobj, + "failing_device")) + /* nothing - symlink will be missing */; +@@ -367,16 +372,13 @@ void dev_coredumpsg(struct device *dev, + } + EXPORT_SYMBOL_GPL(dev_coredumpsg); + +-static int __init devcoredump_init(void) ++int __init devcoredump_init(void) + { +- init_devcd_class_attrs(); + return class_register(&devcd_class); + } +-__initcall(devcoredump_init); + +-static void __exit devcoredump_exit(void) ++void __exit devcoredump_exit(void) + { + class_for_each_device(&devcd_class, NULL, NULL, devcd_free); + class_unregister(&devcd_class); + } +-__exitcall(devcoredump_exit); +--- a/include/linux/backport-devcoredump.h ++++ b/include/linux/backport-devcoredump.h +@@ -66,7 +66,7 @@ static inline void _devcd_free_sgtable(s + } + + +-#ifdef CONFIG_DEV_COREDUMP ++#ifdef CPTCFG_BPAUTO_WANT_DEV_COREDUMP + void dev_coredumpv(struct device *dev, void *data, size_t datalen, + gfp_t gfp); + +@@ -100,6 +100,6 @@ static inline void dev_coredumpsg(struct + { + _devcd_free_sgtable(table); + } +-#endif /* CONFIG_DEV_COREDUMP */ ++#endif /* CPTCFG_BPAUTO_WANT_DEV_COREDUMP */ + + #endif /* __DEVCOREDUMP_H */ diff --git a/package/kernel/mac80211/patches/006-revert-ktime-changes.patch b/package/kernel/mac80211/patches/006-revert-ktime-changes.patch new file mode 100644 index 0000000000..b839eb4c8d --- /dev/null +++ b/package/kernel/mac80211/patches/006-revert-ktime-changes.patch @@ -0,0 +1,20 @@ +--- a/drivers/net/wireless/ralink/rt2x00/rt2800usb.c ++++ b/drivers/net/wireless/ralink/rt2x00/rt2800usb.c +@@ -177,7 +177,7 @@ static bool rt2800usb_tx_sta_fifo_read_c + if (rt2800usb_txstatus_pending(rt2x00dev)) { + /* Read register after 1 ms */ + hrtimer_start(&rt2x00dev->txstatus_timer, +- TXSTATUS_READ_INTERVAL, ++ ktime_set(0, TXSTATUS_READ_INTERVAL), + HRTIMER_MODE_REL); + return false; + } +@@ -204,7 +204,7 @@ static void rt2800usb_async_read_tx_stat + + /* Read TX_STA_FIFO register after 2 ms */ + hrtimer_start(&rt2x00dev->txstatus_timer, +- 2 * TXSTATUS_READ_INTERVAL, ++ ktime_set(0, 2*TXSTATUS_READ_INTERVAL), + HRTIMER_MODE_REL); + } + diff --git a/package/kernel/mac80211/patches/007-revert-genetlink-changes.patch b/package/kernel/mac80211/patches/007-revert-genetlink-changes.patch new file mode 100644 index 0000000000..1a85106bc2 --- /dev/null +++ b/package/kernel/mac80211/patches/007-revert-genetlink-changes.patch @@ -0,0 +1,266 @@ +--- a/net/wireless/nl80211.c ++++ b/net/wireless/nl80211.c +@@ -32,8 +32,22 @@ static int nl80211_crypto_settings(struc + struct cfg80211_crypto_settings *settings, + int cipher_limit); + ++static int nl80211_pre_doit(const struct genl_ops *ops, struct sk_buff *skb, ++ struct genl_info *info); ++static void nl80211_post_doit(const struct genl_ops *ops, struct sk_buff *skb, ++ struct genl_info *info); ++ + /* the netlink family */ +-static struct genl_family nl80211_fam; ++static struct genl_family nl80211_fam = { ++ .id = GENL_ID_GENERATE, /* don't bother with a hardcoded ID */ ++ .name = NL80211_GENL_NAME, /* have users key off the name instead */ ++ .hdrsize = 0, /* no private header */ ++ .version = 1, /* no particular meaning now */ ++ .maxattr = NL80211_ATTR_MAX, ++ .netnsok = true, ++ .pre_doit = nl80211_pre_doit, ++ .post_doit = nl80211_post_doit, ++}; + + /* multicast groups */ + enum nl80211_multicast_groups { +@@ -549,14 +563,13 @@ static int nl80211_prepare_wdev_dump(str + + if (!cb->args[0]) { + err = nlmsg_parse(cb->nlh, GENL_HDRLEN + nl80211_fam.hdrsize, +- genl_family_attrbuf(&nl80211_fam), +- nl80211_fam.maxattr, nl80211_policy); ++ nl80211_fam.attrbuf, nl80211_fam.maxattr, ++ nl80211_policy); + if (err) + goto out_unlock; + +- *wdev = __cfg80211_wdev_from_attrs( +- sock_net(skb->sk), +- genl_family_attrbuf(&nl80211_fam)); ++ *wdev = __cfg80211_wdev_from_attrs(sock_net(skb->sk), ++ nl80211_fam.attrbuf); + if (IS_ERR(*wdev)) { + err = PTR_ERR(*wdev); + goto out_unlock; +@@ -1903,7 +1916,7 @@ static int nl80211_dump_wiphy_parse(stru + struct netlink_callback *cb, + struct nl80211_dump_wiphy_state *state) + { +- struct nlattr **tb = genl_family_attrbuf(&nl80211_fam); ++ struct nlattr **tb = nl80211_fam.attrbuf; + int ret = nlmsg_parse(cb->nlh, GENL_HDRLEN + nl80211_fam.hdrsize, + tb, nl80211_fam.maxattr, nl80211_policy); + /* ignore parse errors for backward compatibility */ +@@ -7733,7 +7746,6 @@ static int nl80211_send_survey(struct sk + + static int nl80211_dump_survey(struct sk_buff *skb, struct netlink_callback *cb) + { +- struct nlattr **attrbuf = genl_family_attrbuf(&nl80211_fam); + struct survey_info survey; + struct cfg80211_registered_device *rdev; + struct wireless_dev *wdev; +@@ -7746,7 +7758,7 @@ static int nl80211_dump_survey(struct sk + return res; + + /* prepare_wdev_dump parsed the attributes */ +- radio_stats = attrbuf[NL80211_ATTR_SURVEY_RADIO_STATS]; ++ radio_stats = nl80211_fam.attrbuf[NL80211_ATTR_SURVEY_RADIO_STATS]; + + if (!wdev->netdev) { + res = -EINVAL; +@@ -8594,14 +8606,14 @@ static int nl80211_testmode_dump(struct + */ + phy_idx = cb->args[0] - 1; + } else { +- struct nlattr **attrbuf = genl_family_attrbuf(&nl80211_fam); +- + err = nlmsg_parse(cb->nlh, GENL_HDRLEN + nl80211_fam.hdrsize, +- attrbuf, nl80211_fam.maxattr, nl80211_policy); ++ nl80211_fam.attrbuf, nl80211_fam.maxattr, ++ nl80211_policy); + if (err) + goto out_err; + +- rdev = __cfg80211_rdev_from_attrs(sock_net(skb->sk), attrbuf); ++ rdev = __cfg80211_rdev_from_attrs(sock_net(skb->sk), ++ nl80211_fam.attrbuf); + if (IS_ERR(rdev)) { + err = PTR_ERR(rdev); + goto out_err; +@@ -8609,8 +8621,9 @@ static int nl80211_testmode_dump(struct + phy_idx = rdev->wiphy_idx; + rdev = NULL; + +- if (attrbuf[NL80211_ATTR_TESTDATA]) +- cb->args[1] = (long)attrbuf[NL80211_ATTR_TESTDATA]; ++ if (nl80211_fam.attrbuf[NL80211_ATTR_TESTDATA]) ++ cb->args[1] = ++ (long)nl80211_fam.attrbuf[NL80211_ATTR_TESTDATA]; + } + + if (cb->args[1]) { +@@ -10814,7 +10827,8 @@ static int handle_nan_filter(struct nlat + + i = 0; + nla_for_each_nested(attr, attr_filter, rem) { +- filter[i].filter = nla_memdup(attr, GFP_KERNEL); ++ filter[i].filter = kmemdup(nla_data(attr), nla_len(attr), ++ GFP_KERNEL); + filter[i].len = nla_len(attr); + i++; + } +@@ -11450,7 +11464,6 @@ static int nl80211_prepare_vendor_dump(s + struct cfg80211_registered_device **rdev, + struct wireless_dev **wdev) + { +- struct nlattr **attrbuf = genl_family_attrbuf(&nl80211_fam); + u32 vid, subcmd; + unsigned int i; + int vcmd_idx = -1; +@@ -11486,28 +11499,31 @@ static int nl80211_prepare_vendor_dump(s + } + + err = nlmsg_parse(cb->nlh, GENL_HDRLEN + nl80211_fam.hdrsize, +- attrbuf, nl80211_fam.maxattr, nl80211_policy); ++ nl80211_fam.attrbuf, nl80211_fam.maxattr, ++ nl80211_policy); + if (err) + goto out_unlock; + +- if (!attrbuf[NL80211_ATTR_VENDOR_ID] || +- !attrbuf[NL80211_ATTR_VENDOR_SUBCMD]) { ++ if (!nl80211_fam.attrbuf[NL80211_ATTR_VENDOR_ID] || ++ !nl80211_fam.attrbuf[NL80211_ATTR_VENDOR_SUBCMD]) { + err = -EINVAL; + goto out_unlock; + } + +- *wdev = __cfg80211_wdev_from_attrs(sock_net(skb->sk), attrbuf); ++ *wdev = __cfg80211_wdev_from_attrs(sock_net(skb->sk), ++ nl80211_fam.attrbuf); + if (IS_ERR(*wdev)) + *wdev = NULL; + +- *rdev = __cfg80211_rdev_from_attrs(sock_net(skb->sk), attrbuf); ++ *rdev = __cfg80211_rdev_from_attrs(sock_net(skb->sk), ++ nl80211_fam.attrbuf); + if (IS_ERR(*rdev)) { + err = PTR_ERR(*rdev); + goto out_unlock; + } + +- vid = nla_get_u32(attrbuf[NL80211_ATTR_VENDOR_ID]); +- subcmd = nla_get_u32(attrbuf[NL80211_ATTR_VENDOR_SUBCMD]); ++ vid = nla_get_u32(nl80211_fam.attrbuf[NL80211_ATTR_VENDOR_ID]); ++ subcmd = nla_get_u32(nl80211_fam.attrbuf[NL80211_ATTR_VENDOR_SUBCMD]); + + for (i = 0; i < (*rdev)->wiphy.n_vendor_commands; i++) { + const struct wiphy_vendor_command *vcmd; +@@ -11531,9 +11547,9 @@ static int nl80211_prepare_vendor_dump(s + goto out_unlock; + } + +- if (attrbuf[NL80211_ATTR_VENDOR_DATA]) { +- data = nla_data(attrbuf[NL80211_ATTR_VENDOR_DATA]); +- data_len = nla_len(attrbuf[NL80211_ATTR_VENDOR_DATA]); ++ if (nl80211_fam.attrbuf[NL80211_ATTR_VENDOR_DATA]) { ++ data = nla_data(nl80211_fam.attrbuf[NL80211_ATTR_VENDOR_DATA]); ++ data_len = nla_len(nl80211_fam.attrbuf[NL80211_ATTR_VENDOR_DATA]); + } + + /* 0 is the first index - add 1 to parse only once */ +@@ -12795,21 +12811,6 @@ static __genl_const struct genl_ops nl80 + }, + }; + +-static struct genl_family nl80211_fam __ro_after_init = { +- .name = NL80211_GENL_NAME, /* have users key off the name instead */ +- .hdrsize = 0, /* no private header */ +- .version = 1, /* no particular meaning now */ +- .maxattr = NL80211_ATTR_MAX, +- .netnsok = true, +- .pre_doit = nl80211_pre_doit, +- .post_doit = nl80211_post_doit, +- .module = THIS_MODULE, +- .ops = nl80211_ops, +- .n_ops = ARRAY_SIZE(nl80211_ops), +- .mcgrps = nl80211_mcgrps, +- .n_mcgrps = ARRAY_SIZE(nl80211_mcgrps), +-}; +- + /* notification functions */ + + void nl80211_notify_wiphy(struct cfg80211_registered_device *rdev, +@@ -14759,11 +14760,12 @@ void nl80211_send_ap_stopped(struct wire + + /* initialisation/exit functions */ + +-int __init nl80211_init(void) ++int nl80211_init(void) + { + int err; + +- err = genl_register_family(&nl80211_fam); ++ err = genl_register_family_with_ops_groups(&nl80211_fam, nl80211_ops, ++ nl80211_mcgrps); + if (err) + return err; + +--- a/drivers/net/wireless/mac80211_hwsim.c ++++ b/drivers/net/wireless/mac80211_hwsim.c +@@ -587,8 +587,15 @@ struct hwsim_radiotap_ack_hdr { + __le16 rt_chbitmask; + } __packed; + +-/* MAC80211_HWSIM netlink family */ +-static struct genl_family hwsim_genl_family; ++/* MAC80211_HWSIM netlinf family */ ++static struct genl_family hwsim_genl_family = { ++ .id = GENL_ID_GENERATE, ++ .hdrsize = 0, ++ .name = "MAC80211_HWSIM", ++ .version = 1, ++ .maxattr = HWSIM_ATTR_MAX, ++ .netnsok = true, ++}; + + enum hwsim_multicast_groups { + HWSIM_MCGRP_CONFIG, +@@ -3250,18 +3257,6 @@ static __genl_const struct genl_ops hwsi + }, + }; + +-static struct genl_family hwsim_genl_family __ro_after_init = { +- .name = "MAC80211_HWSIM", +- .version = 1, +- .maxattr = HWSIM_ATTR_MAX, +- .netnsok = true, +- .module = THIS_MODULE, +- .ops = hwsim_ops, +- .n_ops = ARRAY_SIZE(hwsim_ops), +- .mcgrps = hwsim_mcgrps, +- .n_mcgrps = ARRAY_SIZE(hwsim_mcgrps), +-}; +- + static void destroy_radio(struct work_struct *work) + { + struct mac80211_hwsim_data *data = +@@ -3309,13 +3304,15 @@ static struct notifier_block hwsim_netli + .notifier_call = mac80211_hwsim_netlink_notify, + }; + +-static int __init hwsim_init_netlink(void) ++static int hwsim_init_netlink(void) + { + int rc; + + printk(KERN_INFO "mac80211_hwsim: initializing netlink\n"); + +- rc = genl_register_family(&hwsim_genl_family); ++ rc = genl_register_family_with_ops_groups(&hwsim_genl_family, ++ hwsim_ops, ++ hwsim_mcgrps); + if (rc) + goto failure; + diff --git a/package/kernel/mac80211/patches/008-revert-ndo_stats64-cleanup.patch b/package/kernel/mac80211/patches/008-revert-ndo_stats64-cleanup.patch new file mode 100644 index 0000000000..0f6f0f919f --- /dev/null +++ b/package/kernel/mac80211/patches/008-revert-ndo_stats64-cleanup.patch @@ -0,0 +1,20 @@ +--- a/net/mac80211/iface.c ++++ b/net/mac80211/iface.c +@@ -1133,7 +1133,7 @@ static u16 ieee80211_netdev_select_queue + return ieee80211_select_queue(IEEE80211_DEV_TO_SUB_IF(dev), skb); + } + +-static void ++static struct rtnl_link_stats64 * + ieee80211_get_stats64(struct net_device *dev, struct rtnl_link_stats64 *stats) + { + int i; +@@ -1158,6 +1158,8 @@ ieee80211_get_stats64(struct net_device + stats->rx_bytes += rx_bytes; + stats->tx_bytes += tx_bytes; + } ++ ++ return stats; + } + + static const struct net_device_ops ieee80211_dataif_ops = { diff --git a/package/kernel/mac80211/patches/009-revert-mtu-changes.patch b/package/kernel/mac80211/patches/009-revert-mtu-changes.patch new file mode 100644 index 0000000000..f5e2757d3f --- /dev/null +++ b/package/kernel/mac80211/patches/009-revert-mtu-changes.patch @@ -0,0 +1,338 @@ +--- a/net/mac80211/iface.c ++++ b/net/mac80211/iface.c +@@ -151,6 +151,15 @@ void ieee80211_recalc_idle(struct ieee80 + ieee80211_hw_config(local, change); + } + ++static int ieee80211_change_mtu(struct net_device *dev, int new_mtu) ++{ ++ if (new_mtu < 256 || new_mtu > IEEE80211_MAX_DATA_LEN) ++ return -EINVAL; ++ ++ dev->mtu = new_mtu; ++ return 0; ++} ++ + static int ieee80211_verify_mac(struct ieee80211_sub_if_data *sdata, u8 *addr, + bool check_dup) + { +@@ -1168,6 +1177,7 @@ static const struct net_device_ops ieee8 + .ndo_uninit = ieee80211_uninit, + .ndo_start_xmit = ieee80211_subif_start_xmit, + .ndo_set_rx_mode = ieee80211_set_multicast_list, ++ .ndo_change_mtu = ieee80211_change_mtu, + .ndo_set_mac_address = ieee80211_change_mac, + .ndo_select_queue = ieee80211_netdev_select_queue, + .ndo_get_stats64 = ieee80211_get_stats64, +@@ -1211,6 +1221,7 @@ static const struct net_device_ops ieee8 + .ndo_uninit = ieee80211_uninit, + .ndo_start_xmit = ieee80211_monitor_start_xmit, + .ndo_set_rx_mode = ieee80211_set_multicast_list, ++ .ndo_change_mtu = ieee80211_change_mtu, + .ndo_set_mac_address = ieee80211_change_mac, + .ndo_select_queue = ieee80211_monitor_select_queue, + .ndo_get_stats64 = ieee80211_get_stats64, +@@ -1919,10 +1930,6 @@ int ieee80211_if_add(struct ieee80211_lo + + netdev_set_default_ethtool_ops(ndev, &ieee80211_ethtool_ops); + +- /* MTU range: 256 - 2304 */ +- ndev->min_mtu = 256; +- ndev->max_mtu = IEEE80211_MAX_DATA_LEN; +- + ret = register_netdevice(ndev); + if (ret) { + ieee80211_if_free(ndev); +--- a/drivers/net/wireless/ath/wil6210/netdev.c ++++ b/drivers/net/wireless/ath/wil6210/netdev.c +@@ -42,6 +42,21 @@ static int wil_stop(struct net_device *n + return wil_down(wil); + } + ++static int wil_change_mtu(struct net_device *ndev, int new_mtu) ++{ ++ struct wil6210_priv *wil = ndev_to_wil(ndev); ++ ++ if (new_mtu < 68 || new_mtu > mtu_max) { ++ wil_err(wil, "invalid MTU %d\n", new_mtu); ++ return -EINVAL; ++ } ++ ++ wil_dbg_misc(wil, "change MTU %d -> %d\n", ndev->mtu, new_mtu); ++ ndev->mtu = new_mtu; ++ ++ return 0; ++} ++ + static int wil_do_ioctl(struct net_device *ndev, struct ifreq *ifr, int cmd) + { + struct wil6210_priv *wil = ndev_to_wil(ndev); +@@ -55,6 +70,7 @@ static const struct net_device_ops wil_n + .ndo_start_xmit = wil_start_xmit, + .ndo_set_mac_address = eth_mac_addr, + .ndo_validate_addr = eth_validate_addr, ++ .ndo_change_mtu = wil_change_mtu, + .ndo_do_ioctl = wil_do_ioctl, + }; + +@@ -111,7 +127,6 @@ static int wil6210_netdev_poll_tx(struct + static void wil_dev_setup(struct net_device *dev) + { + ether_setup(dev); +- dev->max_mtu = mtu_max; + dev->tx_queue_len = WIL_TX_Q_LEN_DEFAULT; + } + +--- a/drivers/net/wireless/atmel/atmel.c ++++ b/drivers/net/wireless/atmel/atmel.c +@@ -1295,6 +1295,14 @@ static struct iw_statistics *atmel_get_w + return &priv->wstats; + } + ++static int atmel_change_mtu(struct net_device *dev, int new_mtu) ++{ ++ if ((new_mtu < 68) || (new_mtu > 2312)) ++ return -EINVAL; ++ dev->mtu = new_mtu; ++ return 0; ++} ++ + static int atmel_set_mac_address(struct net_device *dev, void *p) + { + struct sockaddr *addr = p; +@@ -1498,6 +1506,7 @@ static const struct file_operations atme + static const struct net_device_ops atmel_netdev_ops = { + .ndo_open = atmel_open, + .ndo_stop = atmel_close, ++ .ndo_change_mtu = atmel_change_mtu, + .ndo_set_mac_address = atmel_set_mac_address, + .ndo_start_xmit = start_tx, + .ndo_do_ioctl = atmel_ioctl, +@@ -1591,10 +1600,6 @@ struct net_device *init_atmel_card(unsig + dev->irq = irq; + dev->base_addr = port; + +- /* MTU range: 68 - 2312 */ +- dev->min_mtu = 68; +- dev->max_mtu = MAX_WIRELESS_BODY - ETH_FCS_LEN; +- + SET_NETDEV_DEV(dev, sys_dev); + + if ((rc = request_irq(dev->irq, service_interrupt, IRQF_SHARED, dev->name, dev))) { +--- a/drivers/net/wireless/cisco/airo.c ++++ b/drivers/net/wireless/cisco/airo.c +@@ -2329,6 +2329,14 @@ static int airo_set_mac_address(struct n + return 0; + } + ++static int airo_change_mtu(struct net_device *dev, int new_mtu) ++{ ++ if ((new_mtu < 68) || (new_mtu > 2400)) ++ return -EINVAL; ++ dev->mtu = new_mtu; ++ return 0; ++} ++ + static LIST_HEAD(airo_devices); + + static void add_airo_dev(struct airo_info *ai) +@@ -2648,6 +2656,7 @@ static const struct net_device_ops airo1 + .ndo_get_stats = airo_get_stats, + .ndo_set_mac_address = airo_set_mac_address, + .ndo_do_ioctl = airo_ioctl, ++ .ndo_change_mtu = airo_change_mtu, + }; + + static void wifi_setup(struct net_device *dev) +@@ -2659,8 +2668,6 @@ static void wifi_setup(struct net_device + dev->type = ARPHRD_IEEE80211; + dev->hard_header_len = ETH_HLEN; + dev->mtu = AIRO_DEF_MTU; +- dev->min_mtu = 68; +- dev->max_mtu = MIC_MSGLEN_MAX; + dev->addr_len = ETH_ALEN; + dev->tx_queue_len = 100; + +@@ -2747,6 +2754,7 @@ static const struct net_device_ops airo_ + .ndo_set_rx_mode = airo_set_multicast_list, + .ndo_set_mac_address = airo_set_mac_address, + .ndo_do_ioctl = airo_ioctl, ++ .ndo_change_mtu = airo_change_mtu, + .ndo_validate_addr = eth_validate_addr, + }; + +@@ -2758,6 +2766,7 @@ static const struct net_device_ops mpi_n + .ndo_set_rx_mode = airo_set_multicast_list, + .ndo_set_mac_address = airo_set_mac_address, + .ndo_do_ioctl = airo_ioctl, ++ .ndo_change_mtu = airo_change_mtu, + .ndo_validate_addr = eth_validate_addr, + }; + +@@ -2813,7 +2822,6 @@ static struct net_device *_init_airo_car + dev->irq = irq; + dev->base_addr = port; + dev->priv_flags &= ~IFF_TX_SKB_SHARING; +- dev->max_mtu = MIC_MSGLEN_MAX; + + SET_NETDEV_DEV(dev, dmdev); + +--- a/drivers/net/wireless/intel/ipw2x00/ipw2100.c ++++ b/drivers/net/wireless/intel/ipw2x00/ipw2100.c +@@ -6039,6 +6039,7 @@ static const struct net_device_ops ipw21 + .ndo_open = ipw2100_open, + .ndo_stop = ipw2100_close, + .ndo_start_xmit = libipw_xmit, ++ .ndo_change_mtu = libipw_change_mtu, + .ndo_tx_timeout = ipw2100_tx_timeout, + .ndo_set_mac_address = ipw2100_set_address, + .ndo_validate_addr = eth_validate_addr, +@@ -6074,8 +6075,6 @@ static struct net_device *ipw2100_alloc_ + dev->wireless_data = &priv->wireless_data; + dev->watchdog_timeo = 3 * HZ; + dev->irq = 0; +- dev->min_mtu = 68; +- dev->max_mtu = LIBIPW_DATA_LEN; + + /* NOTE: We don't use the wireless_handlers hook + * in dev as the system will start throwing WX requests +--- a/drivers/net/wireless/intel/ipw2x00/ipw2200.c ++++ b/drivers/net/wireless/intel/ipw2x00/ipw2200.c +@@ -11561,6 +11561,7 @@ static const struct net_device_ops ipw_p + .ndo_open = ipw_prom_open, + .ndo_stop = ipw_prom_stop, + .ndo_start_xmit = ipw_prom_hard_start_xmit, ++ .ndo_change_mtu = libipw_change_mtu, + .ndo_set_mac_address = eth_mac_addr, + .ndo_validate_addr = eth_validate_addr, + }; +@@ -11586,9 +11587,6 @@ static int ipw_prom_alloc(struct ipw_pri + priv->prom_net_dev->type = ARPHRD_IEEE80211_RADIOTAP; + priv->prom_net_dev->netdev_ops = &ipw_prom_netdev_ops; + +- priv->prom_net_dev->min_mtu = 68; +- priv->prom_net_dev->max_mtu = LIBIPW_DATA_LEN; +- + priv->prom_priv->ieee->iw_mode = IW_MODE_MONITOR; + SET_NETDEV_DEV(priv->prom_net_dev, &priv->pci_dev->dev); + +@@ -11621,6 +11619,7 @@ static const struct net_device_ops ipw_n + .ndo_set_rx_mode = ipw_net_set_multicast_list, + .ndo_set_mac_address = ipw_net_set_mac_address, + .ndo_start_xmit = libipw_xmit, ++ .ndo_change_mtu = libipw_change_mtu, + .ndo_validate_addr = eth_validate_addr, + }; + +@@ -11730,9 +11729,6 @@ static int ipw_pci_probe(struct pci_dev + net_dev->wireless_handlers = &ipw_wx_handler_def; + net_dev->ethtool_ops = &ipw_ethtool_ops; + +- net_dev->min_mtu = 68; +- net_dev->max_mtu = LIBIPW_DATA_LEN; +- + err = sysfs_create_group(&pdev->dev.kobj, &ipw_attribute_group); + if (err) { + IPW_ERROR("failed to create sysfs device attributes\n"); +--- a/drivers/net/wireless/intel/ipw2x00/libipw.h ++++ b/drivers/net/wireless/intel/ipw2x00/libipw.h +@@ -948,6 +948,7 @@ static inline int libipw_is_cck_rate(u8 + /* libipw.c */ + void free_libipw(struct net_device *dev, int monitor); + struct net_device *alloc_libipw(int sizeof_priv, int monitor); ++int libipw_change_mtu(struct net_device *dev, int new_mtu); + + void libipw_networks_age(struct libipw_device *ieee, unsigned long age_secs); + +--- a/drivers/net/wireless/intel/ipw2x00/libipw_module.c ++++ b/drivers/net/wireless/intel/ipw2x00/libipw_module.c +@@ -118,6 +118,15 @@ static void libipw_networks_initialize(s + &ieee->network_free_list); + } + ++int libipw_change_mtu(struct net_device *dev, int new_mtu) ++{ ++ if ((new_mtu < 68) || (new_mtu > LIBIPW_DATA_LEN)) ++ return -EINVAL; ++ dev->mtu = new_mtu; ++ return 0; ++} ++EXPORT_SYMBOL(libipw_change_mtu); ++ + struct net_device *alloc_libipw(int sizeof_priv, int monitor) + { + struct libipw_device *ieee; +--- a/drivers/net/wireless/intersil/hostap/hostap_main.c ++++ b/drivers/net/wireless/intersil/hostap/hostap_main.c +@@ -765,6 +765,16 @@ static void hostap_set_multicast_list(st + } + + ++static int prism2_change_mtu(struct net_device *dev, int new_mtu) ++{ ++ if (new_mtu < PRISM2_MIN_MTU || new_mtu > PRISM2_MAX_MTU) ++ return -EINVAL; ++ ++ dev->mtu = new_mtu; ++ return 0; ++} ++ ++ + static void prism2_tx_timeout(struct net_device *dev) + { + struct hostap_interface *iface; +@@ -803,6 +813,7 @@ static const struct net_device_ops hosta + .ndo_do_ioctl = hostap_ioctl, + .ndo_set_mac_address = prism2_set_mac_address, + .ndo_set_rx_mode = hostap_set_multicast_list, ++ .ndo_change_mtu = prism2_change_mtu, + .ndo_tx_timeout = prism2_tx_timeout, + .ndo_validate_addr = eth_validate_addr, + }; +@@ -815,6 +826,7 @@ static const struct net_device_ops hosta + .ndo_do_ioctl = hostap_ioctl, + .ndo_set_mac_address = prism2_set_mac_address, + .ndo_set_rx_mode = hostap_set_multicast_list, ++ .ndo_change_mtu = prism2_change_mtu, + .ndo_tx_timeout = prism2_tx_timeout, + .ndo_validate_addr = eth_validate_addr, + }; +@@ -827,6 +839,7 @@ static const struct net_device_ops hosta + .ndo_do_ioctl = hostap_ioctl, + .ndo_set_mac_address = prism2_set_mac_address, + .ndo_set_rx_mode = hostap_set_multicast_list, ++ .ndo_change_mtu = prism2_change_mtu, + .ndo_tx_timeout = prism2_tx_timeout, + .ndo_validate_addr = eth_validate_addr, + }; +@@ -838,8 +851,6 @@ void hostap_setup_dev(struct net_device + + iface = netdev_priv(dev); + ether_setup(dev); +- dev->min_mtu = PRISM2_MIN_MTU; +- dev->max_mtu = PRISM2_MAX_MTU; + dev->priv_flags &= ~IFF_TX_SKB_SHARING; + + /* kernel callbacks */ +--- a/drivers/net/wireless/intersil/orinoco/main.c ++++ b/drivers/net/wireless/intersil/orinoco/main.c +@@ -322,6 +322,9 @@ int orinoco_change_mtu(struct net_device + { + struct orinoco_private *priv = ndev_priv(dev); + ++ if ((new_mtu < ORINOCO_MIN_MTU) || (new_mtu > ORINOCO_MAX_MTU)) ++ return -EINVAL; ++ + /* MTU + encapsulation + header length */ + if ((new_mtu + ENCAPS_OVERHEAD + sizeof(struct ieee80211_hdr)) > + (priv->nicbuf_size - ETH_HLEN)) +@@ -2285,9 +2288,6 @@ int orinoco_if_add(struct orinoco_privat + dev->base_addr = base_addr; + dev->irq = irq; + +- dev->min_mtu = ORINOCO_MIN_MTU; +- dev->max_mtu = ORINOCO_MAX_MTU; +- + SET_NETDEV_DEV(dev, priv->dev); + ret = register_netdev(dev); + if (ret) diff --git a/package/kernel/mac80211/patches/011-backport_strscpy.patch b/package/kernel/mac80211/patches/011-backport_strscpy.patch new file mode 100644 index 0000000000..c8e26c46f2 --- /dev/null +++ b/package/kernel/mac80211/patches/011-backport_strscpy.patch @@ -0,0 +1,43 @@ +--- a/backport-include/linux/string.h ++++ b/backport-include/linux/string.h +@@ -25,4 +25,8 @@ extern void *memdup_user_nul(const void + void memzero_explicit(void *s, size_t count); + #endif + ++#if (LINUX_VERSION_CODE < KERNEL_VERSION(4,3,0)) ++ssize_t strscpy(char *dest, const char *src, size_t count); ++#endif ++ + #endif /* __BACKPORT_LINUX_STRING_H */ +--- a/compat/backport-4.3.c ++++ b/compat/backport-4.3.c +@@ -57,3 +57,29 @@ void seq_hex_dump(struct seq_file *m, co + } + } + EXPORT_SYMBOL_GPL(seq_hex_dump); ++ ++ssize_t strscpy(char *dest, const char *src, size_t count) ++{ ++ long res = 0; ++ ++ if (count == 0) ++ return -E2BIG; ++ ++ while (count) { ++ char c; ++ ++ c = src[res]; ++ dest[res] = c; ++ if (!c) ++ return res; ++ res++; ++ count--; ++ } ++ ++ /* Hit buffer length without finding a NUL; force NUL-termination. */ ++ if (res) ++ dest[res-1] = '\0'; ++ ++ return -E2BIG; ++} ++EXPORT_SYMBOL_GPL(strscpy); diff --git a/package/kernel/mac80211/patches/030-rt2x00_options.patch b/package/kernel/mac80211/patches/030-rt2x00_options.patch new file mode 100644 index 0000000000..a4ca8848c6 --- /dev/null +++ b/package/kernel/mac80211/patches/030-rt2x00_options.patch @@ -0,0 +1,47 @@ +--- a/drivers/net/wireless/ralink/rt2x00/Kconfig ++++ b/drivers/net/wireless/ralink/rt2x00/Kconfig +@@ -225,36 +225,37 @@ config RT2800SOC + + + config RT2800_LIB +- tristate ++ tristate "RT2800 USB/PCI support" + depends on m + + config RT2800_LIB_MMIO +- tristate ++ tristate "RT2800 MMIO support" + depends on m + select RT2X00_LIB_MMIO + select RT2800_LIB + + config RT2X00_LIB_MMIO +- tristate ++ tristate "RT2x00 MMIO support" + depends on m + + config RT2X00_LIB_PCI +- tristate ++ tristate "RT2x00 PCI support" + depends on m + select RT2X00_LIB + + config RT2X00_LIB_SOC +- tristate ++ tristate "RT2x00 SoC support" ++ depends on SOC_RT288X || SOC_RT305X + depends on m + select RT2X00_LIB + + config RT2X00_LIB_USB +- tristate ++ tristate "RT2x00 USB support" + depends on m + select RT2X00_LIB + + config RT2X00_LIB +- tristate ++ tristate "RT2x00 support" + depends on m + + config RT2X00_LIB_FIRMWARE diff --git a/package/kernel/mac80211/patches/040-brcmutil_option.patch b/package/kernel/mac80211/patches/040-brcmutil_option.patch new file mode 100644 index 0000000000..167332d916 --- /dev/null +++ b/package/kernel/mac80211/patches/040-brcmutil_option.patch @@ -0,0 +1,9 @@ +--- a/drivers/net/wireless/broadcom/brcm80211/Kconfig ++++ b/drivers/net/wireless/broadcom/brcm80211/Kconfig +@@ -1,5 +1,5 @@ + config BRCMUTIL +- tristate ++ tristate "Broadcom 802.11 driver utility functions" + depends on m + + config BRCMSMAC diff --git a/package/kernel/mac80211/patches/060-no_local_ssb_bcma.patch b/package/kernel/mac80211/patches/060-no_local_ssb_bcma.patch index 4df5ac57f0..527938f015 100644 --- a/package/kernel/mac80211/patches/060-no_local_ssb_bcma.patch +++ b/package/kernel/mac80211/patches/060-no_local_ssb_bcma.patch @@ -1,6 +1,6 @@ --- a/.local-symbols +++ b/.local-symbols -@@ -477,45 +477,6 @@ USB_IPHETH= +@@ -482,45 +482,6 @@ USB_IPHETH= USB_SIERRA_NET= USB_VL600= USB_NET_CH9200= @@ -88,7 +88,7 @@ gpiodev = bus->chipco.dev ? : pcidev; --- a/drivers/net/wireless/broadcom/brcm80211/brcmsmac/Makefile +++ b/drivers/net/wireless/broadcom/brcm80211/brcmsmac/Makefile -@@ -43,6 +43,6 @@ brcmsmac-y := \ +@@ -42,6 +42,6 @@ brcmsmac-y := \ brcms_trace_events.o \ debug.o diff --git a/package/kernel/mac80211/patches/090-remove-cred.patch b/package/kernel/mac80211/patches/090-remove-cred.patch new file mode 100644 index 0000000000..3adb2afb86 --- /dev/null +++ b/package/kernel/mac80211/patches/090-remove-cred.patch @@ -0,0 +1,15 @@ +This is only needed for kernel < 2.6.29 and conflicts with kernel 4.4.42 + +--- a/backport-include/linux/cred.h ++++ /dev/null +@@ -1,10 +0,0 @@ +-#ifndef __BACKPORT_LINUX_CRED_H +-#define __BACKPORT_LINUX_CRED_H +-#include_next +-#include +- +-#ifndef current_user_ns +-#define current_user_ns() (current->nsproxy->user_ns) +-#endif +- +-#endif /* __BACKPORT_LINUX_CRED_H */ diff --git a/package/kernel/mac80211/patches/100-remove-cryptoapi-dependencies.patch b/package/kernel/mac80211/patches/100-remove-cryptoapi-dependencies.patch index b65b0bd00e..95fea441a4 100644 --- a/package/kernel/mac80211/patches/100-remove-cryptoapi-dependencies.patch +++ b/package/kernel/mac80211/patches/100-remove-cryptoapi-dependencies.patch @@ -18,12 +18,12 @@ - aes_gcm.o \ aes_cmac.o \ - aes_gmac.o \ + fils_aead.o \ cfg.o \ ethtool.o \ - rx.o \ --- a/net/mac80211/aes_ccm.c +++ b/net/mac80211/aes_ccm.c -@@ -13,89 +13,132 @@ +@@ -13,103 +13,132 @@ #include #include #include @@ -33,14 +33,39 @@ #include "key.h" #include "aes_ccm.h" --void ieee80211_aes_ccm_encrypt(struct crypto_aead *tfm, u8 *b_0, u8 *aad, +-int ieee80211_aes_ccm_encrypt(struct crypto_aead *tfm, u8 *b_0, u8 *aad, +- u8 *data, size_t data_len, u8 *mic, +- size_t mic_len) +static void aes_ccm_prepare(struct crypto_cipher *tfm, u8 *b_0, u8 *aad, u8 *s_0, + u8 *a, u8 *b) -+{ + { +- struct scatterlist sg[3]; +- struct aead_request *aead_req; +- int reqsize = sizeof(*aead_req) + crypto_aead_reqsize(tfm); +- u8 *__aad; +- +- aead_req = kzalloc(reqsize + CCM_AAD_LEN, GFP_ATOMIC); +- if (!aead_req) +- return -ENOMEM; +- +- __aad = (u8 *)aead_req + reqsize; +- memcpy(__aad, aad, CCM_AAD_LEN); +- +- sg_init_table(sg, 3); +- sg_set_buf(&sg[0], &__aad[2], be16_to_cpup((__be16 *)__aad)); +- sg_set_buf(&sg[1], data, data_len); +- sg_set_buf(&sg[2], mic, mic_len); +- +- aead_request_set_tfm(aead_req, tfm); +- aead_request_set_crypt(aead_req, sg, sg, data_len, b_0); +- aead_request_set_ad(aead_req, sg[0].length); + int i; -+ + +- crypto_aead_encrypt(aead_req); +- kzfree(aead_req); + crypto_cipher_encrypt_one(tfm, b, b_0); -+ + +- return 0; + /* Extra Authenticate-only data (always two AES blocks) */ + for (i = 0; i < AES_BLOCK_SIZE; i++) + aad[i] ^= b[i]; @@ -63,52 +88,38 @@ + + +void ieee80211_aes_ccm_encrypt(struct crypto_cipher *tfm, u8 *b_0, u8 *aad, - u8 *data, size_t data_len, u8 *mic, - size_t mic_len) - { -- struct scatterlist sg[3]; ++ u8 *data, size_t data_len, u8 *mic, ++ size_t mic_len) ++{ + int i, j, last_len, num_blocks; + u8 b[AES_BLOCK_SIZE]; + u8 s_0[AES_BLOCK_SIZE]; + u8 e[AES_BLOCK_SIZE]; + u8 *pos, *cpos; - -- char aead_req_data[sizeof(struct aead_request) + -- crypto_aead_reqsize(tfm)] -- __aligned(__alignof__(struct aead_request)); -- struct aead_request *aead_req = (void *) aead_req_data; ++ + num_blocks = DIV_ROUND_UP(data_len, AES_BLOCK_SIZE); + last_len = data_len % AES_BLOCK_SIZE; + aes_ccm_prepare(tfm, b_0, aad, s_0, b, b); - -- memset(aead_req, 0, sizeof(aead_req_data)); ++ + /* Process payload blocks */ + pos = data; + cpos = data; + for (j = 1; j <= num_blocks; j++) { + int blen = (j == num_blocks && last_len) ? + last_len : AES_BLOCK_SIZE; - -- sg_init_table(sg, 3); -- sg_set_buf(&sg[0], &aad[2], be16_to_cpup((__be16 *)aad)); -- sg_set_buf(&sg[1], data, data_len); -- sg_set_buf(&sg[2], mic, mic_len); ++ + /* Authentication followed by encryption */ + for (i = 0; i < blen; i++) + b[i] ^= pos[i]; + crypto_cipher_encrypt_one(tfm, b, b); - -- aead_request_set_tfm(aead_req, tfm); -- aead_request_set_crypt(aead_req, sg, sg, data_len, b_0); -- aead_request_set_ad(aead_req, sg[0].length); ++ + b_0[14] = (j >> 8) & 0xff; + b_0[15] = j & 0xff; + crypto_cipher_encrypt_one(tfm, e, b_0); + for (i = 0; i < blen; i++) + *cpos++ = *pos++ ^ e[i]; + } - -- crypto_aead_encrypt(aead_req); ++ + for (i = 0; i < mic_len; i++) + mic[i] = b[i] ^ s_0[i]; } @@ -119,34 +130,46 @@ size_t mic_len) { - struct scatterlist sg[3]; -- char aead_req_data[sizeof(struct aead_request) + -- crypto_aead_reqsize(tfm)] -- __aligned(__alignof__(struct aead_request)); -- struct aead_request *aead_req = (void *) aead_req_data; +- struct aead_request *aead_req; +- int reqsize = sizeof(*aead_req) + crypto_aead_reqsize(tfm); +- u8 *__aad; +- int err; +- +- if (data_len == 0) +- return -EINVAL; +- +- aead_req = kzalloc(reqsize + CCM_AAD_LEN, GFP_ATOMIC); +- if (!aead_req) +- return -ENOMEM; +- +- __aad = (u8 *)aead_req + reqsize; +- memcpy(__aad, aad, CCM_AAD_LEN); +- +- sg_init_table(sg, 3); +- sg_set_buf(&sg[0], &__aad[2], be16_to_cpup((__be16 *)__aad)); +- sg_set_buf(&sg[1], data, data_len); +- sg_set_buf(&sg[2], mic, mic_len); +- +- aead_request_set_tfm(aead_req, tfm); +- aead_request_set_crypt(aead_req, sg, sg, data_len + mic_len, b_0); +- aead_request_set_ad(aead_req, sg[0].length); + int i, j, last_len, num_blocks; + u8 *pos, *cpos; + u8 a[AES_BLOCK_SIZE]; + u8 b[AES_BLOCK_SIZE]; + u8 s_0[AES_BLOCK_SIZE]; - -- if (data_len == 0) -- return -EINVAL; ++ + num_blocks = DIV_ROUND_UP(data_len, AES_BLOCK_SIZE); + last_len = data_len % AES_BLOCK_SIZE; + aes_ccm_prepare(tfm, b_0, aad, s_0, a, b); - -- memset(aead_req, 0, sizeof(aead_req_data)); ++ + /* Process payload blocks */ + cpos = data; + pos = data; + for (j = 1; j <= num_blocks; j++) { + int blen = (j == num_blocks && last_len) ? + last_len : AES_BLOCK_SIZE; - -- sg_init_table(sg, 3); -- sg_set_buf(&sg[0], &aad[2], be16_to_cpup((__be16 *)aad)); -- sg_set_buf(&sg[1], data, data_len); -- sg_set_buf(&sg[2], mic, mic_len); ++ + /* Decryption followed by authentication */ + b_0[14] = (j >> 8) & 0xff; + b_0[15] = j & 0xff; @@ -157,16 +180,16 @@ + } + crypto_cipher_encrypt_one(tfm, a, a); + } - -- aead_request_set_tfm(aead_req, tfm); -- aead_request_set_crypt(aead_req, sg, sg, data_len + mic_len, b_0); -- aead_request_set_ad(aead_req, sg[0].length); ++ + for (i = 0; i < mic_len; i++) { + if ((mic[i] ^ s_0[i]) != a[i]) + return -1; + } -- return crypto_aead_decrypt(aead_req); +- err = crypto_aead_decrypt(aead_req); +- kzfree(aead_req); +- +- return err; + return 0; } @@ -179,12 +202,12 @@ { - struct crypto_aead *tfm; - int err; -- ++ struct crypto_cipher *tfm; + - tfm = crypto_alloc_aead("ccm(aes)", 0, CRYPTO_ALG_ASYNC); - if (IS_ERR(tfm)) - return tfm; -+ struct crypto_cipher *tfm; - +- - err = crypto_aead_setkey(tfm, key, key_len); - if (err) - goto free_aead; @@ -209,73 +232,11 @@ - crypto_free_aead(tfm); + crypto_free_cipher(tfm); } ---- a/net/mac80211/aes_ccm.h -+++ b/net/mac80211/aes_ccm.h -@@ -12,15 +12,15 @@ - - #include - --struct crypto_aead *ieee80211_aes_key_setup_encrypt(const u8 key[], -- size_t key_len, -- size_t mic_len); --void ieee80211_aes_ccm_encrypt(struct crypto_aead *tfm, u8 *b_0, u8 *aad, -+struct crypto_cipher *ieee80211_aes_key_setup_encrypt(const u8 key[], -+ size_t key_len, -+ size_t mic_len); -+void ieee80211_aes_ccm_encrypt(struct crypto_cipher *tfm, u8 *b_0, u8 *aad, - u8 *data, size_t data_len, u8 *mic, - size_t mic_len); --int ieee80211_aes_ccm_decrypt(struct crypto_aead *tfm, u8 *b_0, u8 *aad, -+int ieee80211_aes_ccm_decrypt(struct crypto_cipher *tfm, u8 *b_0, u8 *aad, - u8 *data, size_t data_len, u8 *mic, - size_t mic_len); --void ieee80211_aes_key_free(struct crypto_aead *tfm); -+void ieee80211_aes_key_free(struct crypto_cipher *tfm); - - #endif /* AES_CCM_H */ ---- a/net/mac80211/aes_gcm.h -+++ b/net/mac80211/aes_gcm.h -@@ -11,12 +11,28 @@ - - #include - --void ieee80211_aes_gcm_encrypt(struct crypto_aead *tfm, u8 *j_0, u8 *aad, -- u8 *data, size_t data_len, u8 *mic); --int ieee80211_aes_gcm_decrypt(struct crypto_aead *tfm, u8 *j_0, u8 *aad, -- u8 *data, size_t data_len, u8 *mic); --struct crypto_aead *ieee80211_aes_gcm_key_setup_encrypt(const u8 key[], -- size_t key_len); --void ieee80211_aes_gcm_key_free(struct crypto_aead *tfm); -+static inline void -+ieee80211_aes_gcm_encrypt(struct crypto_aead *tfm, u8 *j_0, u8 *aad, -+ u8 *data, size_t data_len, u8 *mic) -+{ -+} -+ -+static inline int -+ieee80211_aes_gcm_decrypt(struct crypto_aead *tfm, u8 *j_0, u8 *aad, -+ u8 *data, size_t data_len, u8 *mic) -+{ -+ return -EOPNOTSUPP; -+} -+ -+static inline struct crypto_aead * -+ieee80211_aes_gcm_key_setup_encrypt(const u8 key[], size_t key_len) -+{ -+ return NULL; -+} -+ -+static inline void -+ieee80211_aes_gcm_key_free(struct crypto_aead *tfm) -+{ -+} - - #endif /* AES_GCM_H */ --- a/net/mac80211/aes_gmac.h +++ b/net/mac80211/aes_gmac.h -@@ -11,10 +11,22 @@ - - #include +@@ -15,10 +15,22 @@ + #define GMAC_MIC_LEN 16 + #define GMAC_NONCE_LEN 12 -struct crypto_aead *ieee80211_aes_gmac_key_setup(const u8 key[], - size_t key_len); @@ -314,7 +275,7 @@ struct { --- a/net/mac80211/wpa.c +++ b/net/mac80211/wpa.c -@@ -304,7 +304,8 @@ ieee80211_crypto_tkip_decrypt(struct iee +@@ -305,7 +305,8 @@ ieee80211_crypto_tkip_decrypt(struct iee } @@ -324,7 +285,7 @@ { __le16 mask_fc; int a4_included, mgmt; -@@ -334,14 +335,8 @@ static void ccmp_special_blocks(struct s +@@ -335,14 +336,8 @@ static void ccmp_special_blocks(struct s else qos_tid = 0; @@ -341,7 +302,7 @@ /* Nonce: Nonce Flags | A2 | PN * Nonce Flags: Priority (b0..b3) | Management (b4) | Reserved (b5..b7) -@@ -349,6 +344,8 @@ static void ccmp_special_blocks(struct s +@@ -350,6 +345,8 @@ static void ccmp_special_blocks(struct s b_0[1] = qos_tid | (mgmt << 4); memcpy(&b_0[2], hdr->addr2, ETH_ALEN); memcpy(&b_0[8], pn, IEEE80211_CCMP_PN_LEN); @@ -350,16 +311,31 @@ /* AAD (extra authenticate-only data) / masked 802.11 header * FC | A1 | A2 | A3 | SC | [A4] | [QC] */ -@@ -460,7 +457,7 @@ static int ccmp_encrypt_skb(struct ieee8 +@@ -406,7 +403,7 @@ static int ccmp_encrypt_skb(struct ieee8 + u8 *pos; + u8 pn[6]; + u64 pn64; +- u8 aad[CCM_AAD_LEN]; ++ u8 aad[2 * AES_BLOCK_SIZE]; + u8 b_0[AES_BLOCK_SIZE]; + + if (info->control.hw_key && +@@ -461,9 +458,11 @@ static int ccmp_encrypt_skb(struct ieee8 return 0; pos += IEEE80211_CCMP_HDR_LEN; - ccmp_special_blocks(skb, pn, b_0, aad); +- return ieee80211_aes_ccm_encrypt(key->u.ccmp.tfm, b_0, aad, pos, len, +- skb_put(skb, mic_len), mic_len); + ccmp_special_blocks(skb, pn, b_0, aad, len); - ieee80211_aes_ccm_encrypt(key->u.ccmp.tfm, b_0, aad, pos, len, - skb_put(skb, mic_len), mic_len); ++ ieee80211_aes_ccm_encrypt(key->u.ccmp.tfm, b_0, aad, pos, len, ++ skb_put(skb, mic_len), mic_len); ++ ++ return 0; + } + -@@ -537,7 +534,7 @@ ieee80211_crypto_ccmp_decrypt(struct iee +@@ -536,7 +535,7 @@ ieee80211_crypto_ccmp_decrypt(struct iee u8 aad[2 * AES_BLOCK_SIZE]; u8 b_0[AES_BLOCK_SIZE]; /* hardware didn't decrypt/verify MIC */ @@ -368,3 +344,113 @@ if (ieee80211_aes_ccm_decrypt( key->u.ccmp.tfm, b_0, aad, +@@ -638,7 +637,7 @@ static int gcmp_encrypt_skb(struct ieee8 + u8 *pos; + u8 pn[6]; + u64 pn64; +- u8 aad[GCM_AAD_LEN]; ++ u8 aad[2 * AES_BLOCK_SIZE]; + u8 j_0[AES_BLOCK_SIZE]; + + if (info->control.hw_key && +@@ -695,8 +694,10 @@ static int gcmp_encrypt_skb(struct ieee8 + + pos += IEEE80211_GCMP_HDR_LEN; + gcmp_special_blocks(skb, pn, j_0, aad); +- return ieee80211_aes_gcm_encrypt(key->u.gcmp.tfm, j_0, aad, pos, len, +- skb_put(skb, IEEE80211_GCMP_MIC_LEN)); ++ ieee80211_aes_gcm_encrypt(key->u.gcmp.tfm, j_0, aad, pos, len, ++ skb_put(skb, IEEE80211_GCMP_MIC_LEN)); ++ ++ return 0; + } + + ieee80211_tx_result +@@ -1120,9 +1121,9 @@ ieee80211_crypto_aes_gmac_encrypt(struct + struct ieee80211_key *key = tx->key; + struct ieee80211_mmie_16 *mmie; + struct ieee80211_hdr *hdr; +- u8 aad[GMAC_AAD_LEN]; ++ u8 aad[20]; + u64 pn64; +- u8 nonce[GMAC_NONCE_LEN]; ++ u8 nonce[12]; + + if (WARN_ON(skb_queue_len(&tx->skbs) != 1)) + return TX_DROP; +@@ -1168,7 +1169,7 @@ ieee80211_crypto_aes_gmac_decrypt(struct + struct ieee80211_rx_status *status = IEEE80211_SKB_RXCB(skb); + struct ieee80211_key *key = rx->key; + struct ieee80211_mmie_16 *mmie; +- u8 aad[GMAC_AAD_LEN], mic[GMAC_MIC_LEN], ipn[6], nonce[GMAC_NONCE_LEN]; ++ u8 aad[20], mic[16], ipn[6], nonce[12]; + struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data; + + if (!ieee80211_is_mgmt(hdr->frame_control)) +--- a/net/mac80211/aes_ccm.h ++++ b/net/mac80211/aes_ccm.h +@@ -12,17 +12,15 @@ + + #include + +-#define CCM_AAD_LEN 32 +- +-struct crypto_aead *ieee80211_aes_key_setup_encrypt(const u8 key[], +- size_t key_len, +- size_t mic_len); +-int ieee80211_aes_ccm_encrypt(struct crypto_aead *tfm, u8 *b_0, u8 *aad, +- u8 *data, size_t data_len, u8 *mic, +- size_t mic_len); +-int ieee80211_aes_ccm_decrypt(struct crypto_aead *tfm, u8 *b_0, u8 *aad, ++struct crypto_cipher *ieee80211_aes_key_setup_encrypt(const u8 key[], ++ size_t key_len, ++ size_t mic_len); ++void ieee80211_aes_ccm_encrypt(struct crypto_cipher *tfm, u8 *b_0, u8 *aad, ++ u8 *data, size_t data_len, u8 *mic, ++ size_t mic_len); ++int ieee80211_aes_ccm_decrypt(struct crypto_cipher *tfm, u8 *b_0, u8 *aad, + u8 *data, size_t data_len, u8 *mic, + size_t mic_len); +-void ieee80211_aes_key_free(struct crypto_aead *tfm); ++void ieee80211_aes_key_free(struct crypto_cipher *tfm); + + #endif /* AES_CCM_H */ +--- a/net/mac80211/aes_gcm.h ++++ b/net/mac80211/aes_gcm.h +@@ -11,14 +11,28 @@ + + #include + +-#define GCM_AAD_LEN 32 ++static inline void ++ieee80211_aes_gcm_encrypt(struct crypto_aead *tfm, u8 *j_0, u8 *aad, ++ u8 *data, size_t data_len, u8 *mic) ++{ ++} + +-int ieee80211_aes_gcm_encrypt(struct crypto_aead *tfm, u8 *j_0, u8 *aad, +- u8 *data, size_t data_len, u8 *mic); +-int ieee80211_aes_gcm_decrypt(struct crypto_aead *tfm, u8 *j_0, u8 *aad, +- u8 *data, size_t data_len, u8 *mic); +-struct crypto_aead *ieee80211_aes_gcm_key_setup_encrypt(const u8 key[], +- size_t key_len); +-void ieee80211_aes_gcm_key_free(struct crypto_aead *tfm); ++static inline int ++ieee80211_aes_gcm_decrypt(struct crypto_aead *tfm, u8 *j_0, u8 *aad, ++ u8 *data, size_t data_len, u8 *mic) ++{ ++ return -EOPNOTSUPP; ++} ++ ++static inline struct crypto_aead * ++ieee80211_aes_gcm_key_setup_encrypt(const u8 key[], size_t key_len) ++{ ++ return NULL; ++} ++ ++static inline void ++ieee80211_aes_gcm_key_free(struct crypto_aead *tfm) ++{ ++} + + #endif /* AES_GCM_H */ diff --git a/package/kernel/mac80211/patches/110-mac80211_keep_keys_on_stop_ap.patch b/package/kernel/mac80211/patches/110-mac80211_keep_keys_on_stop_ap.patch index c42b17de38..ff619129d9 100644 --- a/package/kernel/mac80211/patches/110-mac80211_keep_keys_on_stop_ap.patch +++ b/package/kernel/mac80211/patches/110-mac80211_keep_keys_on_stop_ap.patch @@ -2,7 +2,7 @@ Used for AP+STA support in OpenWrt - preserve AP mode keys across STA reconnects --- a/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c -@@ -1016,7 +1016,6 @@ static int ieee80211_stop_ap(struct wiph +@@ -1014,7 +1014,6 @@ static int ieee80211_stop_ap(struct wiph sdata->u.ap.driver_smps_mode = IEEE80211_SMPS_OFF; __sta_info_flush(sdata, true); diff --git a/package/kernel/mac80211/patches/130-mac80211-hwsim-hrtimer-clock.patch b/package/kernel/mac80211/patches/130-mac80211-hwsim-hrtimer-clock.patch index 29d70343bb..828ed83cb7 100644 --- a/package/kernel/mac80211/patches/130-mac80211-hwsim-hrtimer-clock.patch +++ b/package/kernel/mac80211/patches/130-mac80211-hwsim-hrtimer-clock.patch @@ -1,6 +1,6 @@ --- a/drivers/net/wireless/mac80211_hwsim.c +++ b/drivers/net/wireless/mac80211_hwsim.c -@@ -2662,7 +2662,7 @@ static int mac80211_hwsim_new_radio(stru +@@ -2678,7 +2678,7 @@ static int mac80211_hwsim_new_radio(stru tasklet_hrtimer_init(&data->beacon_timer, mac80211_hwsim_beacon, diff --git a/package/kernel/mac80211/patches/150-disable_addr_notifier.patch b/package/kernel/mac80211/patches/150-disable_addr_notifier.patch index f4cb41cd30..ca1e53f8df 100644 --- a/package/kernel/mac80211/patches/150-disable_addr_notifier.patch +++ b/package/kernel/mac80211/patches/150-disable_addr_notifier.patch @@ -18,7 +18,7 @@ static int ieee80211_ifa6_changed(struct notifier_block *nb, unsigned long data, void *arg) { -@@ -1101,14 +1101,14 @@ int ieee80211_register_hw(struct ieee802 +@@ -1111,14 +1111,14 @@ int ieee80211_register_hw(struct ieee802 if (result) goto fail_flows; @@ -35,7 +35,7 @@ local->ifa6_notifier.notifier_call = ieee80211_ifa6_changed; result = register_inet6addr_notifier(&local->ifa6_notifier); if (result) -@@ -1117,13 +1117,13 @@ int ieee80211_register_hw(struct ieee802 +@@ -1127,13 +1127,13 @@ int ieee80211_register_hw(struct ieee802 return 0; @@ -52,7 +52,7 @@ fail_ifa: #endif ieee80211_txq_teardown_flows(local); -@@ -1153,10 +1153,10 @@ void ieee80211_unregister_hw(struct ieee +@@ -1163,10 +1163,10 @@ void ieee80211_unregister_hw(struct ieee tasklet_kill(&local->tx_pending_tasklet); tasklet_kill(&local->tasklet); diff --git a/package/kernel/mac80211/patches/210-ap_scan.patch b/package/kernel/mac80211/patches/210-ap_scan.patch index 94f5f397c9..3b613bba0e 100644 --- a/package/kernel/mac80211/patches/210-ap_scan.patch +++ b/package/kernel/mac80211/patches/210-ap_scan.patch @@ -1,6 +1,6 @@ --- a/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c -@@ -2175,7 +2175,7 @@ static int ieee80211_scan(struct wiphy * +@@ -2165,7 +2165,7 @@ static int ieee80211_scan(struct wiphy * * the frames sent while scanning on other channel will be * lost) */ diff --git a/package/kernel/mac80211/patches/300-ath9k-Switch-to-using-mac80211-intermediate-software.patch b/package/kernel/mac80211/patches/300-ath9k-Switch-to-using-mac80211-intermediate-software.patch deleted file mode 100644 index 57917c5b45..0000000000 --- a/package/kernel/mac80211/patches/300-ath9k-Switch-to-using-mac80211-intermediate-software.patch +++ /dev/null @@ -1,953 +0,0 @@ -From: =?UTF-8?q?Toke=20H=C3=B8iland-J=C3=B8rgensen?= -Date: Fri, 2 Sep 2016 16:00:30 +0200 -Subject: [PATCH] ath9k: Switch to using mac80211 intermediate software - queues. -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -This switches ath9k over to using the mac80211 intermediate software -queueing mechanism for data packets. It removes the queueing inside the -driver, except for the retry queue, and instead pulls from mac80211 when -a packet is needed. The retry queue is used to store a packet that was -pulled but can't be sent immediately. - -The old code path in ath_tx_start that would queue packets has been -removed completely, as has the qlen limit tunables (since there's no -longer a queue in the driver to limit). - -Based on Tim's original patch set, but reworked quite thoroughly. - -Cc: Tim Shepard -Cc: Felix Fietkau -Signed-off-by: Toke Høiland-Jørgensen ---- - ---- a/drivers/net/wireless/ath/ath9k/ath9k.h -+++ b/drivers/net/wireless/ath/ath9k/ath9k.h -@@ -91,7 +91,6 @@ int ath_descdma_setup(struct ath_softc * - #define ATH_RXBUF 512 - #define ATH_TXBUF 512 - #define ATH_TXBUF_RESERVE 5 --#define ATH_MAX_QDEPTH (ATH_TXBUF / 4 - ATH_TXBUF_RESERVE) - #define ATH_TXMAXTRY 13 - #define ATH_MAX_SW_RETRIES 30 - -@@ -145,7 +144,7 @@ int ath_descdma_setup(struct ath_softc * - #define BAW_WITHIN(_start, _bawsz, _seqno) \ - ((((_seqno) - (_start)) & 4095) < (_bawsz)) - --#define ATH_AN_2_TID(_an, _tidno) (&(_an)->tid[(_tidno)]) -+#define ATH_AN_2_TID(_an, _tidno) ath_node_to_tid(_an, _tidno) - - #define IS_HT_RATE(rate) (rate & 0x80) - #define IS_CCK_RATE(rate) ((rate >= 0x18) && (rate <= 0x1e)) -@@ -164,7 +163,6 @@ struct ath_txq { - spinlock_t axq_lock; - u32 axq_depth; - u32 axq_ampdu_depth; -- bool stopped; - bool axq_tx_inprogress; - struct list_head txq_fifo[ATH_TXFIFO_DEPTH]; - u8 txq_headidx; -@@ -232,7 +230,6 @@ struct ath_buf { - - struct ath_atx_tid { - struct list_head list; -- struct sk_buff_head buf_q; - struct sk_buff_head retry_q; - struct ath_node *an; - struct ath_txq *txq; -@@ -247,13 +244,13 @@ struct ath_atx_tid { - s8 bar_index; - bool active; - bool clear_ps_filter; -+ bool has_queued; - }; - - struct ath_node { - struct ath_softc *sc; - struct ieee80211_sta *sta; /* station struct we're part of */ - struct ieee80211_vif *vif; /* interface with which we're associated */ -- struct ath_atx_tid tid[IEEE80211_NUM_TIDS]; - - u16 maxampdu; - u8 mpdudensity; -@@ -276,7 +273,6 @@ struct ath_tx_control { - struct ath_node *an; - struct ieee80211_sta *sta; - u8 paprd; -- bool force_channel; - }; - - -@@ -293,7 +289,6 @@ struct ath_tx { - struct ath_descdma txdma; - struct ath_txq *txq_map[IEEE80211_NUM_ACS]; - struct ath_txq *uapsdq; -- u32 txq_max_pending[IEEE80211_NUM_ACS]; - u16 max_aggr_framelen[IEEE80211_NUM_ACS][4][32]; - }; - -@@ -421,6 +416,22 @@ struct ath_offchannel { - int duration; - }; - -+static inline struct ath_atx_tid * -+ath_node_to_tid(struct ath_node *an, u8 tidno) -+{ -+ struct ieee80211_sta *sta = an->sta; -+ struct ieee80211_vif *vif = an->vif; -+ struct ieee80211_txq *txq; -+ -+ BUG_ON(!vif); -+ if (sta) -+ txq = sta->txq[tidno % ARRAY_SIZE(sta->txq)]; -+ else -+ txq = vif->txq; -+ -+ return (struct ath_atx_tid *) txq->drv_priv; -+} -+ - #define case_rtn_string(val) case val: return #val - - #define ath_for_each_chanctx(_sc, _ctx) \ -@@ -575,7 +586,6 @@ void ath_tx_edma_tasklet(struct ath_soft - int ath_tx_aggr_start(struct ath_softc *sc, struct ieee80211_sta *sta, - u16 tid, u16 *ssn); - void ath_tx_aggr_stop(struct ath_softc *sc, struct ieee80211_sta *sta, u16 tid); --void ath_tx_aggr_resume(struct ath_softc *sc, struct ieee80211_sta *sta, u16 tid); - - void ath_tx_aggr_wakeup(struct ath_softc *sc, struct ath_node *an); - void ath_tx_aggr_sleep(struct ieee80211_sta *sta, struct ath_softc *sc, -@@ -585,6 +595,7 @@ void ath9k_release_buffered_frames(struc - u16 tids, int nframes, - enum ieee80211_frame_release_type reason, - bool more_data); -+void ath9k_wake_tx_queue(struct ieee80211_hw *hw, struct ieee80211_txq *queue); - - /********/ - /* VIFs */ ---- a/drivers/net/wireless/ath/ath9k/channel.c -+++ b/drivers/net/wireless/ath/ath9k/channel.c -@@ -1010,7 +1010,6 @@ static void ath_scan_send_probe(struct a - goto error; - - txctl.txq = sc->tx.txq_map[IEEE80211_AC_VO]; -- txctl.force_channel = true; - if (ath_tx_start(sc->hw, skb, &txctl)) - goto error; - -@@ -1133,7 +1132,6 @@ ath_chanctx_send_vif_ps_frame(struct ath - memset(&txctl, 0, sizeof(txctl)); - txctl.txq = sc->tx.txq_map[IEEE80211_AC_VO]; - txctl.sta = sta; -- txctl.force_channel = true; - if (ath_tx_start(sc->hw, skb, &txctl)) { - ieee80211_free_txskb(sc->hw, skb); - return false; ---- a/drivers/net/wireless/ath/ath9k/debug.c -+++ b/drivers/net/wireless/ath/ath9k/debug.c -@@ -600,7 +600,6 @@ static int read_file_xmit(struct seq_fil - PR("MPDUs XRetried: ", xretries); - PR("Aggregates: ", a_aggr); - PR("AMPDUs Queued HW:", a_queued_hw); -- PR("AMPDUs Queued SW:", a_queued_sw); - PR("AMPDUs Completed:", a_completed); - PR("AMPDUs Retried: ", a_retries); - PR("AMPDUs XRetried: ", a_xretries); -@@ -629,8 +628,7 @@ static void print_queue(struct ath_softc - seq_printf(file, "%s: %d ", "qnum", txq->axq_qnum); - seq_printf(file, "%s: %2d ", "qdepth", txq->axq_depth); - seq_printf(file, "%s: %2d ", "ampdu-depth", txq->axq_ampdu_depth); -- seq_printf(file, "%s: %3d ", "pending", txq->pending_frames); -- seq_printf(file, "%s: %d\n", "stopped", txq->stopped); -+ seq_printf(file, "%s: %3d\n", "pending", txq->pending_frames); - - ath_txq_unlock(sc, txq); - } -@@ -1208,7 +1206,6 @@ static const char ath9k_gstrings_stats[] - AMKSTR(d_tx_mpdu_xretries), - AMKSTR(d_tx_aggregates), - AMKSTR(d_tx_ampdus_queued_hw), -- AMKSTR(d_tx_ampdus_queued_sw), - AMKSTR(d_tx_ampdus_completed), - AMKSTR(d_tx_ampdu_retries), - AMKSTR(d_tx_ampdu_xretries), -@@ -1288,7 +1285,6 @@ void ath9k_get_et_stats(struct ieee80211 - AWDATA(xretries); - AWDATA(a_aggr); - AWDATA(a_queued_hw); -- AWDATA(a_queued_sw); - AWDATA(a_completed); - AWDATA(a_retries); - AWDATA(a_xretries); -@@ -1346,14 +1342,6 @@ int ath9k_init_debug(struct ath_hw *ah) - read_file_xmit); - debugfs_create_devm_seqfile(sc->dev, "queues", sc->debug.debugfs_phy, - read_file_queues); -- debugfs_create_u32("qlen_bk", S_IRUSR | S_IWUSR, sc->debug.debugfs_phy, -- &sc->tx.txq_max_pending[IEEE80211_AC_BK]); -- debugfs_create_u32("qlen_be", S_IRUSR | S_IWUSR, sc->debug.debugfs_phy, -- &sc->tx.txq_max_pending[IEEE80211_AC_BE]); -- debugfs_create_u32("qlen_vi", S_IRUSR | S_IWUSR, sc->debug.debugfs_phy, -- &sc->tx.txq_max_pending[IEEE80211_AC_VI]); -- debugfs_create_u32("qlen_vo", S_IRUSR | S_IWUSR, sc->debug.debugfs_phy, -- &sc->tx.txq_max_pending[IEEE80211_AC_VO]); - debugfs_create_devm_seqfile(sc->dev, "misc", sc->debug.debugfs_phy, - read_file_misc); - debugfs_create_devm_seqfile(sc->dev, "reset", sc->debug.debugfs_phy, ---- a/drivers/net/wireless/ath/ath9k/debug.h -+++ b/drivers/net/wireless/ath/ath9k/debug.h -@@ -147,7 +147,6 @@ struct ath_interrupt_stats { - * @completed: Total MPDUs (non-aggr) completed - * @a_aggr: Total no. of aggregates queued - * @a_queued_hw: Total AMPDUs queued to hardware -- * @a_queued_sw: Total AMPDUs queued to software queues - * @a_completed: Total AMPDUs completed - * @a_retries: No. of AMPDUs retried (SW) - * @a_xretries: No. of AMPDUs dropped due to xretries -@@ -174,7 +173,6 @@ struct ath_tx_stats { - u32 xretries; - u32 a_aggr; - u32 a_queued_hw; -- u32 a_queued_sw; - u32 a_completed; - u32 a_retries; - u32 a_xretries; ---- a/drivers/net/wireless/ath/ath9k/debug_sta.c -+++ b/drivers/net/wireless/ath/ath9k/debug_sta.c -@@ -52,8 +52,8 @@ static ssize_t read_file_node_aggr(struc - "TID", "SEQ_START", "SEQ_NEXT", "BAW_SIZE", - "BAW_HEAD", "BAW_TAIL", "BAR_IDX", "SCHED", "PAUSED"); - -- for (tidno = 0, tid = &an->tid[tidno]; -- tidno < IEEE80211_NUM_TIDS; tidno++, tid++) { -+ for (tidno = 0; tidno < IEEE80211_NUM_TIDS; tidno++) { -+ tid = ath_node_to_tid(an, tidno); - txq = tid->txq; - ath_txq_lock(sc, txq); - if (tid->active) { ---- a/drivers/net/wireless/ath/ath9k/init.c -+++ b/drivers/net/wireless/ath/ath9k/init.c -@@ -358,7 +358,6 @@ static int ath9k_init_queues(struct ath_ - for (i = 0; i < IEEE80211_NUM_ACS; i++) { - sc->tx.txq_map[i] = ath_txq_setup(sc, ATH9K_TX_QUEUE_DATA, i); - sc->tx.txq_map[i]->mac80211_qnum = i; -- sc->tx.txq_max_pending[i] = ATH_MAX_QDEPTH; - } - return 0; - } -@@ -877,6 +876,7 @@ static void ath9k_set_hw_capab(struct at - hw->max_rate_tries = 10; - hw->sta_data_size = sizeof(struct ath_node); - hw->vif_data_size = sizeof(struct ath_vif); -+ hw->txq_data_size = sizeof(struct ath_atx_tid); - hw->extra_tx_headroom = 4; - - hw->wiphy->available_antennas_rx = BIT(ah->caps.max_rxchains) - 1; ---- a/drivers/net/wireless/ath/ath9k/main.c -+++ b/drivers/net/wireless/ath/ath9k/main.c -@@ -1902,9 +1902,11 @@ static int ath9k_ampdu_action(struct iee - bool flush = false; - int ret = 0; - struct ieee80211_sta *sta = params->sta; -+ struct ath_node *an = (struct ath_node *)sta->drv_priv; - enum ieee80211_ampdu_mlme_action action = params->action; - u16 tid = params->tid; - u16 *ssn = ¶ms->ssn; -+ struct ath_atx_tid *atid; - - mutex_lock(&sc->mutex); - -@@ -1937,9 +1939,9 @@ static int ath9k_ampdu_action(struct iee - ath9k_ps_restore(sc); - break; - case IEEE80211_AMPDU_TX_OPERATIONAL: -- ath9k_ps_wakeup(sc); -- ath_tx_aggr_resume(sc, sta, tid); -- ath9k_ps_restore(sc); -+ atid = ath_node_to_tid(an, tid); -+ atid->baw_size = IEEE80211_MIN_AMPDU_BUF << -+ sta->ht_cap.ampdu_factor; - break; - default: - ath_err(ath9k_hw_common(sc->sc_ah), "Unknown AMPDU action\n"); -@@ -2701,4 +2703,5 @@ struct ieee80211_ops ath9k_ops = { - .sw_scan_start = ath9k_sw_scan_start, - .sw_scan_complete = ath9k_sw_scan_complete, - .get_txpower = ath9k_get_txpower, -+ .wake_tx_queue = ath9k_wake_tx_queue, - }; ---- a/drivers/net/wireless/ath/ath9k/xmit.c -+++ b/drivers/net/wireless/ath/ath9k/xmit.c -@@ -67,6 +67,8 @@ static struct ath_buf *ath_tx_setup_buff - struct ath_txq *txq, - struct ath_atx_tid *tid, - struct sk_buff *skb); -+static int ath_tx_prepare(struct ieee80211_hw *hw, struct sk_buff *skb, -+ struct ath_tx_control *txctl); - - enum { - MCS_HT20, -@@ -137,6 +139,26 @@ static void ath_tx_queue_tid(struct ath_ - list_add_tail(&tid->list, list); - } - -+void ath9k_wake_tx_queue(struct ieee80211_hw *hw, struct ieee80211_txq *queue) -+{ -+ struct ath_softc *sc = hw->priv; -+ struct ath_common *common = ath9k_hw_common(sc->sc_ah); -+ struct ath_atx_tid *tid = (struct ath_atx_tid *) queue->drv_priv; -+ struct ath_txq *txq = tid->txq; -+ -+ ath_dbg(common, QUEUE, "Waking TX queue: %pM (%d)\n", -+ queue->sta ? queue->sta->addr : queue->vif->addr, -+ tid->tidno); -+ -+ ath_txq_lock(sc, txq); -+ -+ tid->has_queued = true; -+ ath_tx_queue_tid(sc, txq, tid); -+ ath_txq_schedule(sc, txq); -+ -+ ath_txq_unlock(sc, txq); -+} -+ - static struct ath_frame_info *get_frame_info(struct sk_buff *skb) - { - struct ieee80211_tx_info *tx_info = IEEE80211_SKB_CB(skb); -@@ -164,7 +186,6 @@ static void ath_set_rates(struct ieee802 - static void ath_txq_skb_done(struct ath_softc *sc, struct ath_txq *txq, - struct sk_buff *skb) - { -- struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb); - struct ath_frame_info *fi = get_frame_info(skb); - int q = fi->txq; - -@@ -175,14 +196,6 @@ static void ath_txq_skb_done(struct ath_ - if (WARN_ON(--txq->pending_frames < 0)) - txq->pending_frames = 0; - -- if (txq->stopped && -- txq->pending_frames < sc->tx.txq_max_pending[q]) { -- if (ath9k_is_chanctx_enabled()) -- ieee80211_wake_queue(sc->hw, info->hw_queue); -- else -- ieee80211_wake_queue(sc->hw, q); -- txq->stopped = false; -- } - } - - static struct ath_atx_tid * -@@ -192,9 +205,48 @@ ath_get_skb_tid(struct ath_softc *sc, st - return ATH_AN_2_TID(an, tidno); - } - -+static struct sk_buff * -+ath_tid_pull(struct ath_atx_tid *tid) -+{ -+ struct ieee80211_txq *txq = container_of((void*)tid, struct ieee80211_txq, drv_priv); -+ struct ath_softc *sc = tid->an->sc; -+ struct ieee80211_hw *hw = sc->hw; -+ struct ath_tx_control txctl = { -+ .txq = tid->txq, -+ .sta = tid->an->sta, -+ }; -+ struct sk_buff *skb; -+ struct ath_frame_info *fi; -+ int q; -+ -+ if (!tid->has_queued) -+ return NULL; -+ -+ skb = ieee80211_tx_dequeue(hw, txq); -+ if (!skb) { -+ tid->has_queued = false; -+ return NULL; -+ } -+ -+ if (ath_tx_prepare(hw, skb, &txctl)) { -+ ieee80211_free_txskb(hw, skb); -+ return NULL; -+ } -+ -+ q = skb_get_queue_mapping(skb); -+ if (tid->txq == sc->tx.txq_map[q]) { -+ fi = get_frame_info(skb); -+ fi->txq = q; -+ ++tid->txq->pending_frames; -+ } -+ -+ return skb; -+ } -+ -+ - static bool ath_tid_has_buffered(struct ath_atx_tid *tid) - { -- return !skb_queue_empty(&tid->buf_q) || !skb_queue_empty(&tid->retry_q); -+ return !skb_queue_empty(&tid->retry_q) || tid->has_queued; - } - - static struct sk_buff *ath_tid_dequeue(struct ath_atx_tid *tid) -@@ -203,46 +255,11 @@ static struct sk_buff *ath_tid_dequeue(s - - skb = __skb_dequeue(&tid->retry_q); - if (!skb) -- skb = __skb_dequeue(&tid->buf_q); -+ skb = ath_tid_pull(tid); - - return skb; - } - --/* -- * ath_tx_tid_change_state: -- * - clears a-mpdu flag of previous session -- * - force sequence number allocation to fix next BlockAck Window -- */ --static void --ath_tx_tid_change_state(struct ath_softc *sc, struct ath_atx_tid *tid) --{ -- struct ath_txq *txq = tid->txq; -- struct ieee80211_tx_info *tx_info; -- struct sk_buff *skb, *tskb; -- struct ath_buf *bf; -- struct ath_frame_info *fi; -- -- skb_queue_walk_safe(&tid->buf_q, skb, tskb) { -- fi = get_frame_info(skb); -- bf = fi->bf; -- -- tx_info = IEEE80211_SKB_CB(skb); -- tx_info->flags &= ~IEEE80211_TX_CTL_AMPDU; -- -- if (bf) -- continue; -- -- bf = ath_tx_setup_buffer(sc, txq, tid, skb); -- if (!bf) { -- __skb_unlink(skb, &tid->buf_q); -- ath_txq_skb_done(sc, txq, skb); -- ieee80211_free_txskb(sc->hw, skb); -- continue; -- } -- } -- --} -- - static void ath_tx_flush_tid(struct ath_softc *sc, struct ath_atx_tid *tid) - { - struct ath_txq *txq = tid->txq; -@@ -883,20 +900,16 @@ static int ath_compute_num_delims(struct - - static struct ath_buf * - ath_tx_get_tid_subframe(struct ath_softc *sc, struct ath_txq *txq, -- struct ath_atx_tid *tid, struct sk_buff_head **q) -+ struct ath_atx_tid *tid) - { - struct ieee80211_tx_info *tx_info; - struct ath_frame_info *fi; -- struct sk_buff *skb; -+ struct sk_buff *skb, *first_skb = NULL; - struct ath_buf *bf; - u16 seqno; - - while (1) { -- *q = &tid->retry_q; -- if (skb_queue_empty(*q)) -- *q = &tid->buf_q; -- -- skb = skb_peek(*q); -+ skb = ath_tid_dequeue(tid); - if (!skb) - break; - -@@ -908,7 +921,6 @@ ath_tx_get_tid_subframe(struct ath_softc - bf->bf_state.stale = false; - - if (!bf) { -- __skb_unlink(skb, *q); - ath_txq_skb_done(sc, txq, skb); - ieee80211_free_txskb(sc->hw, skb); - continue; -@@ -937,8 +949,20 @@ ath_tx_get_tid_subframe(struct ath_softc - seqno = bf->bf_state.seqno; - - /* do not step over block-ack window */ -- if (!BAW_WITHIN(tid->seq_start, tid->baw_size, seqno)) -+ if (!BAW_WITHIN(tid->seq_start, tid->baw_size, seqno)) { -+ __skb_queue_tail(&tid->retry_q, skb); -+ -+ /* If there are other skbs in the retry q, they are -+ * probably within the BAW, so loop immediately to get -+ * one of them. Otherwise the queue can get stuck. */ -+ if (!skb_queue_is_first(&tid->retry_q, skb) && -+ !WARN_ON(skb == first_skb)) { -+ if(!first_skb) /* infinite loop prevention */ -+ first_skb = skb; -+ continue; -+ } - break; -+ } - - if (tid->bar_index > ATH_BA_INDEX(tid->seq_start, seqno)) { - struct ath_tx_status ts = {}; -@@ -946,7 +970,6 @@ ath_tx_get_tid_subframe(struct ath_softc - - INIT_LIST_HEAD(&bf_head); - list_add(&bf->list, &bf_head); -- __skb_unlink(skb, *q); - ath_tx_update_baw(sc, tid, seqno); - ath_tx_complete_buf(sc, bf, txq, &bf_head, NULL, &ts, 0); - continue; -@@ -958,11 +981,10 @@ ath_tx_get_tid_subframe(struct ath_softc - return NULL; - } - --static bool -+static int - ath_tx_form_aggr(struct ath_softc *sc, struct ath_txq *txq, - struct ath_atx_tid *tid, struct list_head *bf_q, -- struct ath_buf *bf_first, struct sk_buff_head *tid_q, -- int *aggr_len) -+ struct ath_buf *bf_first) - { - #define PADBYTES(_len) ((4 - ((_len) % 4)) % 4) - struct ath_buf *bf = bf_first, *bf_prev = NULL; -@@ -972,12 +994,13 @@ ath_tx_form_aggr(struct ath_softc *sc, s - struct ieee80211_tx_info *tx_info; - struct ath_frame_info *fi; - struct sk_buff *skb; -- bool closed = false; -+ - - bf = bf_first; - aggr_limit = ath_lookup_rate(sc, bf, tid); - -- do { -+ while (bf) -+ { - skb = bf->bf_mpdu; - fi = get_frame_info(skb); - -@@ -986,12 +1009,12 @@ ath_tx_form_aggr(struct ath_softc *sc, s - if (nframes) { - if (aggr_limit < al + bpad + al_delta || - ath_lookup_legacy(bf) || nframes >= h_baw) -- break; -+ goto stop; - - tx_info = IEEE80211_SKB_CB(bf->bf_mpdu); - if ((tx_info->flags & IEEE80211_TX_CTL_RATE_CTRL_PROBE) || - !(tx_info->flags & IEEE80211_TX_CTL_AMPDU)) -- break; -+ goto stop; - } - - /* add padding for previous frame to aggregation length */ -@@ -1013,20 +1036,18 @@ ath_tx_form_aggr(struct ath_softc *sc, s - ath_tx_addto_baw(sc, tid, bf); - bf->bf_state.ndelim = ndelim; - -- __skb_unlink(skb, tid_q); - list_add_tail(&bf->list, bf_q); - if (bf_prev) - bf_prev->bf_next = bf; - - bf_prev = bf; - -- bf = ath_tx_get_tid_subframe(sc, txq, tid, &tid_q); -- if (!bf) { -- closed = true; -- break; -- } -- } while (ath_tid_has_buffered(tid)); -- -+ bf = ath_tx_get_tid_subframe(sc, txq, tid); -+ } -+ goto finish; -+stop: -+ __skb_queue_tail(&tid->retry_q, bf->bf_mpdu); -+finish: - bf = bf_first; - bf->bf_lastbf = bf_prev; - -@@ -1037,9 +1058,7 @@ ath_tx_form_aggr(struct ath_softc *sc, s - TX_STAT_INC(txq->axq_qnum, a_aggr); - } - -- *aggr_len = al; -- -- return closed; -+ return al; - #undef PADBYTES - } - -@@ -1416,18 +1435,15 @@ static void ath_tx_fill_desc(struct ath_ - static void - ath_tx_form_burst(struct ath_softc *sc, struct ath_txq *txq, - struct ath_atx_tid *tid, struct list_head *bf_q, -- struct ath_buf *bf_first, struct sk_buff_head *tid_q) -+ struct ath_buf *bf_first) - { - struct ath_buf *bf = bf_first, *bf_prev = NULL; -- struct sk_buff *skb; - int nframes = 0; - - do { - struct ieee80211_tx_info *tx_info; -- skb = bf->bf_mpdu; - - nframes++; -- __skb_unlink(skb, tid_q); - list_add_tail(&bf->list, bf_q); - if (bf_prev) - bf_prev->bf_next = bf; -@@ -1436,13 +1452,15 @@ ath_tx_form_burst(struct ath_softc *sc, - if (nframes >= 2) - break; - -- bf = ath_tx_get_tid_subframe(sc, txq, tid, &tid_q); -+ bf = ath_tx_get_tid_subframe(sc, txq, tid); - if (!bf) - break; - - tx_info = IEEE80211_SKB_CB(bf->bf_mpdu); -- if (tx_info->flags & IEEE80211_TX_CTL_AMPDU) -+ if (tx_info->flags & IEEE80211_TX_CTL_AMPDU) { -+ __skb_queue_tail(&tid->retry_q, bf->bf_mpdu); - break; -+ } - - ath_set_rates(tid->an->vif, tid->an->sta, bf); - } while (1); -@@ -1453,34 +1471,33 @@ static bool ath_tx_sched_aggr(struct ath - { - struct ath_buf *bf; - struct ieee80211_tx_info *tx_info; -- struct sk_buff_head *tid_q; - struct list_head bf_q; - int aggr_len = 0; -- bool aggr, last = true; -+ bool aggr; - - if (!ath_tid_has_buffered(tid)) - return false; - - INIT_LIST_HEAD(&bf_q); - -- bf = ath_tx_get_tid_subframe(sc, txq, tid, &tid_q); -+ bf = ath_tx_get_tid_subframe(sc, txq, tid); - if (!bf) - return false; - - tx_info = IEEE80211_SKB_CB(bf->bf_mpdu); - aggr = !!(tx_info->flags & IEEE80211_TX_CTL_AMPDU); - if ((aggr && txq->axq_ampdu_depth >= ATH_AGGR_MIN_QDEPTH) || -- (!aggr && txq->axq_depth >= ATH_NON_AGGR_MIN_QDEPTH)) { -+ (!aggr && txq->axq_depth >= ATH_NON_AGGR_MIN_QDEPTH)) { -+ __skb_queue_tail(&tid->retry_q, bf->bf_mpdu); - *stop = true; - return false; - } - - ath_set_rates(tid->an->vif, tid->an->sta, bf); - if (aggr) -- last = ath_tx_form_aggr(sc, txq, tid, &bf_q, bf, -- tid_q, &aggr_len); -+ aggr_len = ath_tx_form_aggr(sc, txq, tid, &bf_q, bf); - else -- ath_tx_form_burst(sc, txq, tid, &bf_q, bf, tid_q); -+ ath_tx_form_burst(sc, txq, tid, &bf_q, bf); - - if (list_empty(&bf_q)) - return false; -@@ -1523,9 +1540,6 @@ int ath_tx_aggr_start(struct ath_softc * - an->mpdudensity = density; - } - -- /* force sequence number allocation for pending frames */ -- ath_tx_tid_change_state(sc, txtid); -- - txtid->active = true; - *ssn = txtid->seq_start = txtid->seq_next; - txtid->bar_index = -1; -@@ -1550,7 +1564,6 @@ void ath_tx_aggr_stop(struct ath_softc * - ath_txq_lock(sc, txq); - txtid->active = false; - ath_tx_flush_tid(sc, txtid); -- ath_tx_tid_change_state(sc, txtid); - ath_txq_unlock_complete(sc, txq); - } - -@@ -1560,14 +1573,12 @@ void ath_tx_aggr_sleep(struct ieee80211_ - struct ath_common *common = ath9k_hw_common(sc->sc_ah); - struct ath_atx_tid *tid; - struct ath_txq *txq; -- bool buffered; - int tidno; - - ath_dbg(common, XMIT, "%s called\n", __func__); - -- for (tidno = 0, tid = &an->tid[tidno]; -- tidno < IEEE80211_NUM_TIDS; tidno++, tid++) { -- -+ for (tidno = 0; tidno < IEEE80211_NUM_TIDS; tidno++) { -+ tid = ath_node_to_tid(an, tidno); - txq = tid->txq; - - ath_txq_lock(sc, txq); -@@ -1577,13 +1588,12 @@ void ath_tx_aggr_sleep(struct ieee80211_ - continue; - } - -- buffered = ath_tid_has_buffered(tid); -+ if (!skb_queue_empty(&tid->retry_q)) -+ ieee80211_sta_set_buffered(sta, tid->tidno, true); - - list_del_init(&tid->list); - - ath_txq_unlock(sc, txq); -- -- ieee80211_sta_set_buffered(sta, tidno, buffered); - } - } - -@@ -1596,49 +1606,20 @@ void ath_tx_aggr_wakeup(struct ath_softc - - ath_dbg(common, XMIT, "%s called\n", __func__); - -- for (tidno = 0, tid = &an->tid[tidno]; -- tidno < IEEE80211_NUM_TIDS; tidno++, tid++) { -- -+ for (tidno = 0; tidno < IEEE80211_NUM_TIDS; tidno++) { -+ tid = ath_node_to_tid(an, tidno); - txq = tid->txq; - - ath_txq_lock(sc, txq); - tid->clear_ps_filter = true; -- - if (ath_tid_has_buffered(tid)) { - ath_tx_queue_tid(sc, txq, tid); - ath_txq_schedule(sc, txq); - } -- - ath_txq_unlock_complete(sc, txq); - } - } - --void ath_tx_aggr_resume(struct ath_softc *sc, struct ieee80211_sta *sta, -- u16 tidno) --{ -- struct ath_common *common = ath9k_hw_common(sc->sc_ah); -- struct ath_atx_tid *tid; -- struct ath_node *an; -- struct ath_txq *txq; -- -- ath_dbg(common, XMIT, "%s called\n", __func__); -- -- an = (struct ath_node *)sta->drv_priv; -- tid = ATH_AN_2_TID(an, tidno); -- txq = tid->txq; -- -- ath_txq_lock(sc, txq); -- -- tid->baw_size = IEEE80211_MIN_AMPDU_BUF << sta->ht_cap.ampdu_factor; -- -- if (ath_tid_has_buffered(tid)) { -- ath_tx_queue_tid(sc, txq, tid); -- ath_txq_schedule(sc, txq); -- } -- -- ath_txq_unlock_complete(sc, txq); --} -- - void ath9k_release_buffered_frames(struct ieee80211_hw *hw, - struct ieee80211_sta *sta, - u16 tids, int nframes, -@@ -1651,7 +1632,6 @@ void ath9k_release_buffered_frames(struc - struct ieee80211_tx_info *info; - struct list_head bf_q; - struct ath_buf *bf_tail = NULL, *bf; -- struct sk_buff_head *tid_q; - int sent = 0; - int i; - -@@ -1666,11 +1646,10 @@ void ath9k_release_buffered_frames(struc - - ath_txq_lock(sc, tid->txq); - while (nframes > 0) { -- bf = ath_tx_get_tid_subframe(sc, sc->tx.uapsdq, tid, &tid_q); -+ bf = ath_tx_get_tid_subframe(sc, sc->tx.uapsdq, tid); - if (!bf) - break; - -- __skb_unlink(bf->bf_mpdu, tid_q); - list_add_tail(&bf->list, &bf_q); - ath_set_rates(tid->an->vif, tid->an->sta, bf); - if (bf_isampdu(bf)) { -@@ -1685,7 +1664,7 @@ void ath9k_release_buffered_frames(struc - sent++; - TX_STAT_INC(txq->axq_qnum, a_queued_hw); - -- if (an->sta && !ath_tid_has_buffered(tid)) -+ if (an->sta && skb_queue_empty(&tid->retry_q)) - ieee80211_sta_set_buffered(an->sta, i, false); - } - ath_txq_unlock_complete(sc, tid->txq); -@@ -1914,13 +1893,7 @@ bool ath_drain_all_txq(struct ath_softc - if (!ATH_TXQ_SETUP(sc, i)) - continue; - -- /* -- * The caller will resume queues with ieee80211_wake_queues. -- * Mark the queue as not stopped to prevent ath_tx_complete -- * from waking the queue too early. -- */ - txq = &sc->tx.txq[i]; -- txq->stopped = false; - ath_draintxq(sc, txq); - } - -@@ -2319,16 +2292,14 @@ int ath_tx_start(struct ieee80211_hw *hw - struct ath_softc *sc = hw->priv; - struct ath_txq *txq = txctl->txq; - struct ath_atx_tid *tid = NULL; -+ struct ath_node *an = NULL; - struct ath_buf *bf; -- bool queue, skip_uapsd = false, ps_resp; -+ bool ps_resp; - int q, ret; - - if (vif) - avp = (void *)vif->drv_priv; - -- if (info->flags & IEEE80211_TX_CTL_TX_OFFCHAN) -- txctl->force_channel = true; -- - ps_resp = !!(info->control.flags & IEEE80211_TX_CTRL_PS_RESPONSE); - - ret = ath_tx_prepare(hw, skb, txctl); -@@ -2343,63 +2314,18 @@ int ath_tx_start(struct ieee80211_hw *hw - - q = skb_get_queue_mapping(skb); - -- ath_txq_lock(sc, txq); -- if (txq == sc->tx.txq_map[q]) { -- fi->txq = q; -- if (++txq->pending_frames > sc->tx.txq_max_pending[q] && -- !txq->stopped) { -- if (ath9k_is_chanctx_enabled()) -- ieee80211_stop_queue(sc->hw, info->hw_queue); -- else -- ieee80211_stop_queue(sc->hw, q); -- txq->stopped = true; -- } -- } -- -- queue = ieee80211_is_data_present(hdr->frame_control); -- -- /* If chanctx, queue all null frames while NOA could be there */ -- if (ath9k_is_chanctx_enabled() && -- ieee80211_is_nullfunc(hdr->frame_control) && -- !txctl->force_channel) -- queue = true; -- -- /* Force queueing of all frames that belong to a virtual interface on -- * a different channel context, to ensure that they are sent on the -- * correct channel. -- */ -- if (((avp && avp->chanctx != sc->cur_chan) || -- sc->cur_chan->stopped) && !txctl->force_channel) { -- if (!txctl->an) -- txctl->an = &avp->mcast_node; -- queue = true; -- skip_uapsd = true; -- } -- -- if (txctl->an && queue) -- tid = ath_get_skb_tid(sc, txctl->an, skb); -- -- if (!skip_uapsd && ps_resp) { -- ath_txq_unlock(sc, txq); -+ if (ps_resp) - txq = sc->tx.uapsdq; -- ath_txq_lock(sc, txq); -- } else if (txctl->an && queue) { -- WARN_ON(tid->txq != txctl->txq); -- -- if (info->flags & IEEE80211_TX_CTL_CLEAR_PS_FILT) -- tid->clear_ps_filter = true; - -- /* -- * Add this frame to software queue for scheduling later -- * for aggregation. -- */ -- TX_STAT_INC(txq->axq_qnum, a_queued_sw); -- __skb_queue_tail(&tid->buf_q, skb); -- if (!txctl->an->sleeping) -- ath_tx_queue_tid(sc, txq, tid); -+ if (txctl->sta) { -+ an = (struct ath_node *) sta->drv_priv; -+ tid = ath_get_skb_tid(sc, an, skb); -+ } - -- ath_txq_schedule(sc, txq); -- goto out; -+ ath_txq_lock(sc, txq); -+ if (txq == sc->tx.txq_map[q]) { -+ fi->txq = q; -+ ++txq->pending_frames; - } - - bf = ath_tx_setup_buffer(sc, txq, tid, skb); -@@ -2892,9 +2818,8 @@ void ath_tx_node_init(struct ath_softc * - struct ath_atx_tid *tid; - int tidno, acno; - -- for (tidno = 0, tid = &an->tid[tidno]; -- tidno < IEEE80211_NUM_TIDS; -- tidno++, tid++) { -+ for (tidno = 0; tidno < IEEE80211_NUM_TIDS; tidno++) { -+ tid = ath_node_to_tid(an, tidno); - tid->an = an; - tid->tidno = tidno; - tid->seq_start = tid->seq_next = 0; -@@ -2902,11 +2827,14 @@ void ath_tx_node_init(struct ath_softc * - tid->baw_head = tid->baw_tail = 0; - tid->active = false; - tid->clear_ps_filter = true; -- __skb_queue_head_init(&tid->buf_q); -+ tid->has_queued = false; - __skb_queue_head_init(&tid->retry_q); - INIT_LIST_HEAD(&tid->list); - acno = TID_TO_WME_AC(tidno); - tid->txq = sc->tx.txq_map[acno]; -+ -+ if (!an->sta) -+ break; /* just one multicast ath_atx_tid */ - } - } - -@@ -2916,9 +2844,8 @@ void ath_tx_node_cleanup(struct ath_soft - struct ath_txq *txq; - int tidno; - -- for (tidno = 0, tid = &an->tid[tidno]; -- tidno < IEEE80211_NUM_TIDS; tidno++, tid++) { -- -+ for (tidno = 0; tidno < IEEE80211_NUM_TIDS; tidno++) { -+ tid = ath_node_to_tid(an, tidno); - txq = tid->txq; - - ath_txq_lock(sc, txq); -@@ -2930,6 +2857,9 @@ void ath_tx_node_cleanup(struct ath_soft - tid->active = false; - - ath_txq_unlock(sc, txq); -+ -+ if (!an->sta) -+ break; /* just one multicast ath_atx_tid */ - } - } - diff --git a/package/kernel/mac80211/patches/300-ath9k_hw-reset-AHB-WMAC-interface-on-AR91xx.patch b/package/kernel/mac80211/patches/300-ath9k_hw-reset-AHB-WMAC-interface-on-AR91xx.patch new file mode 100644 index 0000000000..a7bcfa549b --- /dev/null +++ b/package/kernel/mac80211/patches/300-ath9k_hw-reset-AHB-WMAC-interface-on-AR91xx.patch @@ -0,0 +1,25 @@ +From: Felix Fietkau +Date: Sat, 9 Jul 2016 15:25:24 +0200 +Subject: [PATCH] ath9k_hw: reset AHB-WMAC interface on AR91xx + +Should fix a few stability issues + +Signed-off-by: Felix Fietkau +--- + +--- a/drivers/net/wireless/ath/ath9k/hw.c ++++ b/drivers/net/wireless/ath/ath9k/hw.c +@@ -1394,8 +1394,12 @@ static bool ath9k_hw_set_reset(struct at + if (!AR_SREV_9100(ah)) + REG_WRITE(ah, AR_RC, 0); + +- if (AR_SREV_9100(ah)) ++ if (AR_SREV_9100(ah)) { ++ /* Reset the AHB-WMAC interface */ ++ if (ah->external_reset) ++ ah->external_reset(); + udelay(50); ++ } + + return true; + } diff --git a/package/kernel/mac80211/patches/301-ath9k-force-rx_clear-when-disabling-rx.patch b/package/kernel/mac80211/patches/301-ath9k-force-rx_clear-when-disabling-rx.patch deleted file mode 100644 index 098bda7e93..0000000000 --- a/package/kernel/mac80211/patches/301-ath9k-force-rx_clear-when-disabling-rx.patch +++ /dev/null @@ -1,35 +0,0 @@ -From: Felix Fietkau -Date: Sun, 7 Jun 2015 13:53:35 +0200 -Subject: [PATCH] ath9k: force rx_clear when disabling rx - -This makes stopping Rx more reliable and should reduce the frequency of -Rx related DMA stop warnings. Don't use rx_clear in TX99 mode. - -Cc: stable@vger.kernel.org -Signed-off-by: Felix Fietkau -Signed-off-by: Helmut Schaa ---- - ---- a/drivers/net/wireless/ath/ath9k/mac.c -+++ b/drivers/net/wireless/ath/ath9k/mac.c -@@ -677,13 +677,18 @@ void ath9k_hw_startpcureceive(struct ath - - ath9k_ani_reset(ah, is_scanning); - -- REG_CLR_BIT(ah, AR_DIAG_SW, (AR_DIAG_RX_DIS | AR_DIAG_RX_ABORT)); -+ REG_CLR_BIT(ah, AR_DIAG_SW, -+ AR_DIAG_RX_DIS | AR_DIAG_RX_ABORT | AR_DIAG_FORCE_RX_CLEAR); - } - EXPORT_SYMBOL(ath9k_hw_startpcureceive); - - void ath9k_hw_abortpcurecv(struct ath_hw *ah) - { -- REG_SET_BIT(ah, AR_DIAG_SW, AR_DIAG_RX_ABORT | AR_DIAG_RX_DIS); -+ u32 reg = AR_DIAG_RX_DIS | AR_DIAG_RX_ABORT; -+ -+ if (!config_enabled(CPTCFG_ATH9K_TX99)) -+ reg |= AR_DIAG_FORCE_RX_CLEAR; -+ REG_SET_BIT(ah, AR_DIAG_SW, reg); - - ath9k_hw_disable_mib_counters(ah); - } diff --git a/package/kernel/mac80211/patches/301-ath9k_hw-issue-external-reset-for-QCA955x.patch b/package/kernel/mac80211/patches/301-ath9k_hw-issue-external-reset-for-QCA955x.patch new file mode 100644 index 0000000000..5eb69b898d --- /dev/null +++ b/package/kernel/mac80211/patches/301-ath9k_hw-issue-external-reset-for-QCA955x.patch @@ -0,0 +1,129 @@ +From: Felix Fietkau +Date: Sat, 9 Jul 2016 15:26:44 +0200 +Subject: [PATCH] ath9k_hw: issue external reset for QCA955x + +The RTC interface on the SoC needs to be reset along with the rest of +the WMAC. + +Signed-off-by: Felix Fietkau +--- + +--- a/drivers/net/wireless/ath/ath9k/hw.c ++++ b/drivers/net/wireless/ath/ath9k/hw.c +@@ -1271,39 +1271,56 @@ void ath9k_hw_get_delta_slope_vals(struc + *coef_exponent = coef_exp - 16; + } + +-/* AR9330 WAR: +- * call external reset function to reset WMAC if: +- * - doing a cold reset +- * - we have pending frames in the TX queues. +- */ +-static bool ath9k_hw_ar9330_reset_war(struct ath_hw *ah, int type) ++static bool ath9k_hw_need_external_reset(struct ath_hw *ah, int type) + { +- int i, npend = 0; ++ int i; + +- for (i = 0; i < AR_NUM_QCU; i++) { +- npend = ath9k_hw_numtxpending(ah, i); +- if (npend) +- break; +- } +- +- if (ah->external_reset && +- (npend || type == ATH9K_RESET_COLD)) { +- int reset_err = 0; +- +- ath_dbg(ath9k_hw_common(ah), RESET, +- "reset MAC via external reset\n"); +- +- reset_err = ah->external_reset(); +- if (reset_err) { +- ath_err(ath9k_hw_common(ah), +- "External reset failed, err=%d\n", +- reset_err); +- return false; ++ if (type == ATH9K_RESET_COLD) ++ return true; ++ ++ if (AR_SREV_9550(ah)) ++ return true; ++ ++ /* AR9330 WAR: ++ * call external reset function to reset WMAC if: ++ * - doing a cold reset ++ * - we have pending frames in the TX queues. ++ */ ++ if (AR_SREV_9330(ah)) { ++ for (i = 0; i < AR_NUM_QCU; i++) { ++ if (ath9k_hw_numtxpending(ah, i)) ++ return true; + } ++ } ++ ++ return false; ++} ++ ++static bool ath9k_hw_external_reset(struct ath_hw *ah, int type) ++{ ++ int err; ++ ++ if (!ah->external_reset || !ath9k_hw_need_external_reset(ah, type)) ++ return true; ++ ++ ath_dbg(ath9k_hw_common(ah), RESET, ++ "reset MAC via external reset\n"); + +- REG_WRITE(ah, AR_RTC_RESET, 1); ++ err = ah->external_reset(); ++ if (err) { ++ ath_err(ath9k_hw_common(ah), ++ "External reset failed, err=%d\n", err); ++ return false; + } + ++ if (AR_SREV_9550(ah)) { ++ REG_WRITE(ah, AR_RTC_RESET, 0); ++ udelay(10); ++ } ++ ++ REG_WRITE(ah, AR_RTC_RESET, 1); ++ udelay(10); ++ + return true; + } + +@@ -1356,24 +1373,24 @@ static bool ath9k_hw_set_reset(struct at + rst_flags |= AR_RTC_RC_MAC_COLD; + } + +- if (AR_SREV_9330(ah)) { +- if (!ath9k_hw_ar9330_reset_war(ah, type)) +- return false; +- } +- + if (ath9k_hw_mci_is_enabled(ah)) + ar9003_mci_check_gpm_offset(ah); + + /* DMA HALT added to resolve ar9300 and ar9580 bus error during +- * RTC_RC reg read ++ * RTC_RC reg read. Also needed for AR9550 external reset + */ +- if (AR_SREV_9300(ah) || AR_SREV_9580(ah)) { ++ if (AR_SREV_9300(ah) || AR_SREV_9580(ah) || AR_SREV_9550(ah)) { + REG_SET_BIT(ah, AR_CFG, AR_CFG_HALT_REQ); + ath9k_hw_wait(ah, AR_CFG, AR_CFG_HALT_ACK, AR_CFG_HALT_ACK, + 20 * AH_WAIT_TIMEOUT); +- REG_CLR_BIT(ah, AR_CFG, AR_CFG_HALT_REQ); + } + ++ if (!AR_SREV_9100(ah)) ++ ath9k_hw_external_reset(ah, type); ++ ++ if (AR_SREV_9300(ah) || AR_SREV_9580(ah)) ++ REG_CLR_BIT(ah, AR_CFG, AR_CFG_HALT_REQ); ++ + REG_WRITE(ah, AR_RTC_RC, rst_flags); + + REGWRITE_BUFFER_FLUSH(ah); diff --git a/package/kernel/mac80211/patches/302-ath9k-limit-retries-for-powersave-response-frames.patch b/package/kernel/mac80211/patches/302-ath9k-limit-retries-for-powersave-response-frames.patch deleted file mode 100644 index 8c19ea22f4..0000000000 --- a/package/kernel/mac80211/patches/302-ath9k-limit-retries-for-powersave-response-frames.patch +++ /dev/null @@ -1,96 +0,0 @@ -From: Felix Fietkau -Date: Thu, 2 Jul 2015 15:20:56 +0200 -Subject: [PATCH] ath9k: limit retries for powersave response frames - -In some cases, the channel might be busy enough that an ath9k AP's -response to PS-Poll frames might be too slow and the station has already -gone to sleep. To avoid wasting too much airtime on this, limit the -number of retries on such frames and ensure that no sample rate gets -used. - -Signed-off-by: Felix Fietkau ---- - ---- a/drivers/net/wireless/ath/ath9k/xmit.c -+++ b/drivers/net/wireless/ath/ath9k/xmit.c -@@ -177,10 +177,25 @@ static void ath_send_bar(struct ath_atx_ - } - - static void ath_set_rates(struct ieee80211_vif *vif, struct ieee80211_sta *sta, -- struct ath_buf *bf) -+ struct ath_buf *bf, bool ps) - { -+ struct ieee80211_tx_info *info = IEEE80211_SKB_CB(bf->bf_mpdu); -+ -+ if (ps) { -+ /* Clear the first rate to avoid using a sample rate for PS frames */ -+ info->control.rates[0].idx = -1; -+ info->control.rates[0].count = 0; -+ } -+ - ieee80211_get_tx_rates(vif, sta, bf->bf_mpdu, bf->rates, - ARRAY_SIZE(bf->rates)); -+ if (!ps) -+ return; -+ -+ if (bf->rates[0].count > 2) -+ bf->rates[0].count = 2; -+ -+ bf->rates[1].idx = -1; - } - - static void ath_txq_skb_done(struct ath_softc *sc, struct ath_txq *txq, -@@ -1462,7 +1477,7 @@ ath_tx_form_burst(struct ath_softc *sc, - break; - } - -- ath_set_rates(tid->an->vif, tid->an->sta, bf); -+ ath_set_rates(tid->an->vif, tid->an->sta, bf, false); - } while (1); - } - -@@ -1493,7 +1508,7 @@ static bool ath_tx_sched_aggr(struct ath - return false; - } - -- ath_set_rates(tid->an->vif, tid->an->sta, bf); -+ ath_set_rates(tid->an->vif, tid->an->sta, bf, false); - if (aggr) - aggr_len = ath_tx_form_aggr(sc, txq, tid, &bf_q, bf); - else -@@ -1651,7 +1666,7 @@ void ath9k_release_buffered_frames(struc - break; - - list_add_tail(&bf->list, &bf_q); -- ath_set_rates(tid->an->vif, tid->an->sta, bf); -+ ath_set_rates(tid->an->vif, tid->an->sta, bf, true); - if (bf_isampdu(bf)) { - ath_tx_addto_baw(sc, tid, bf); - bf->bf_state.bf_type &= ~BUF_AGGR; -@@ -2343,7 +2358,7 @@ int ath_tx_start(struct ieee80211_hw *hw - if (txctl->paprd) - bf->bf_state.bfs_paprd_timestamp = jiffies; - -- ath_set_rates(vif, sta, bf); -+ ath_set_rates(vif, sta, bf, ps_resp); - ath_tx_send_normal(sc, txq, tid, skb); - - out: -@@ -2382,7 +2397,7 @@ void ath_tx_cabq(struct ieee80211_hw *hw - break; - - bf->bf_lastbf = bf; -- ath_set_rates(vif, NULL, bf); -+ ath_set_rates(vif, NULL, bf, false); - ath_buf_set_rate(sc, bf, &info, fi->framelen, false); - duration += info.rates[0].PktDuration; - if (bf_tail) -@@ -2898,7 +2913,7 @@ int ath9k_tx99_send(struct ath_softc *sc - return -EINVAL; - } - -- ath_set_rates(sc->tx99_vif, NULL, bf); -+ ath_set_rates(sc->tx99_vif, NULL, bf, false); - - ath9k_hw_set_desc_link(sc->sc_ah, bf->bf_desc, bf->bf_daddr); - ath9k_hw_tx99_start(sc->sc_ah, txctl->txq->axq_qnum); diff --git a/package/kernel/mac80211/patches/302-ath9k_hw-set-spectral-scan-enable-bit-on-trigger-for.patch b/package/kernel/mac80211/patches/302-ath9k_hw-set-spectral-scan-enable-bit-on-trigger-for.patch new file mode 100644 index 0000000000..dfe9aae268 --- /dev/null +++ b/package/kernel/mac80211/patches/302-ath9k_hw-set-spectral-scan-enable-bit-on-trigger-for.patch @@ -0,0 +1,21 @@ +From: Felix Fietkau +Date: Mon, 11 Jul 2016 12:07:40 +0200 +Subject: [PATCH] ath9k_hw: set spectral scan enable bit on trigger for + AR9003+ + +AR9002 code and QCA AR9003+ code do the same. + +Signed-off-by: Felix Fietkau +--- + +--- a/drivers/net/wireless/ath/ath9k/ar9003_phy.c ++++ b/drivers/net/wireless/ath/ath9k/ar9003_phy.c +@@ -1800,6 +1800,8 @@ static void ar9003_hw_spectral_scan_conf + + static void ar9003_hw_spectral_scan_trigger(struct ath_hw *ah) + { ++ REG_SET_BIT(ah, AR_PHY_SPECTRAL_SCAN, ++ AR_PHY_SPECTRAL_SCAN_ENABLE); + /* Activate spectral scan */ + REG_SET_BIT(ah, AR_PHY_SPECTRAL_SCAN, + AR_PHY_SPECTRAL_SCAN_ACTIVE); diff --git a/package/kernel/mac80211/patches/303-Revert-ath9k-interpret-requested-txpower-in-EIRP-dom.patch b/package/kernel/mac80211/patches/303-Revert-ath9k-interpret-requested-txpower-in-EIRP-dom.patch deleted file mode 100644 index 57f45c1c93..0000000000 --- a/package/kernel/mac80211/patches/303-Revert-ath9k-interpret-requested-txpower-in-EIRP-dom.patch +++ /dev/null @@ -1,37 +0,0 @@ -From: Felix Fietkau -Date: Sat, 14 May 2016 14:51:02 +0200 -Subject: [PATCH] Revert "ath9k: interpret requested txpower in EIRP - domain" - -This reverts commit 71f5137bf010c6faffab50c0ec15374c59c4a411. ---- - ---- a/drivers/net/wireless/ath/ath9k/hw.c -+++ b/drivers/net/wireless/ath/ath9k/hw.c -@@ -2910,7 +2910,8 @@ void ath9k_hw_apply_txpower(struct ath_h - { - struct ath_regulatory *reg = ath9k_hw_regulatory(ah); - struct ieee80211_channel *channel; -- int chan_pwr, new_pwr; -+ int chan_pwr, new_pwr, max_gain; -+ int ant_gain, ant_reduction = 0; - - if (!chan) - return; -@@ -2918,10 +2919,15 @@ void ath9k_hw_apply_txpower(struct ath_h - channel = chan->chan; - chan_pwr = min_t(int, channel->max_power * 2, MAX_RATE_POWER); - new_pwr = min_t(int, chan_pwr, reg->power_limit); -+ max_gain = chan_pwr - new_pwr + channel->max_antenna_gain * 2; -+ -+ ant_gain = get_antenna_gain(ah, chan); -+ if (ant_gain > max_gain) -+ ant_reduction = ant_gain - max_gain; - - ah->eep_ops->set_txpower(ah, chan, - ath9k_regd_get_ctl(reg, chan), -- get_antenna_gain(ah, chan), new_pwr, test); -+ ant_reduction, new_pwr, test); - } - - void ath9k_hw_set_txpowerlimit(struct ath_hw *ah, u32 limit, bool test) diff --git a/package/kernel/mac80211/patches/303-ath9k-don-t-run-periodic-and-nf-calibation-at-the-sa.patch b/package/kernel/mac80211/patches/303-ath9k-don-t-run-periodic-and-nf-calibation-at-the-sa.patch new file mode 100644 index 0000000000..22f5154146 --- /dev/null +++ b/package/kernel/mac80211/patches/303-ath9k-don-t-run-periodic-and-nf-calibation-at-the-sa.patch @@ -0,0 +1,27 @@ +From: Felix Fietkau +Date: Tue, 27 Dec 2016 23:16:23 +0100 +Subject: [PATCH] ath9k: don't run periodic and nf calibation at the same + time + +The checks already prevents periodic cal from being started while noise +floor calibration runs. It is missing checks for the other way around. + +Signed-off-by: Felix Fietkau +--- + +--- a/drivers/net/wireless/ath/ath9k/ar9002_calib.c ++++ b/drivers/net/wireless/ath/ath9k/ar9002_calib.c +@@ -676,10 +676,10 @@ static int ar9002_hw_calibrate(struct at + return 0; + + ah->cal_list_curr = currCal = currCal->calNext; +- if (currCal->calState == CAL_WAITING) { ++ if (currCal->calState == CAL_WAITING) + ath9k_hw_reset_calibration(ah, currCal); +- return 0; +- } ++ ++ return 0; + } + + /* Do NF cal only at longer intervals */ diff --git a/package/kernel/mac80211/patches/304-ath9k-force-rx_clear-when-disabling-rx.patch b/package/kernel/mac80211/patches/304-ath9k-force-rx_clear-when-disabling-rx.patch new file mode 100644 index 0000000000..eb6862db6d --- /dev/null +++ b/package/kernel/mac80211/patches/304-ath9k-force-rx_clear-when-disabling-rx.patch @@ -0,0 +1,35 @@ +From: Felix Fietkau +Date: Sun, 7 Jun 2015 13:53:35 +0200 +Subject: [PATCH] ath9k: force rx_clear when disabling rx + +This makes stopping Rx more reliable and should reduce the frequency of +Rx related DMA stop warnings. Don't use rx_clear in TX99 mode. + +Cc: stable@vger.kernel.org +Signed-off-by: Felix Fietkau +Signed-off-by: Helmut Schaa +--- + +--- a/drivers/net/wireless/ath/ath9k/mac.c ++++ b/drivers/net/wireless/ath/ath9k/mac.c +@@ -677,13 +677,18 @@ void ath9k_hw_startpcureceive(struct ath + + ath9k_ani_reset(ah, is_scanning); + +- REG_CLR_BIT(ah, AR_DIAG_SW, (AR_DIAG_RX_DIS | AR_DIAG_RX_ABORT)); ++ REG_CLR_BIT(ah, AR_DIAG_SW, ++ AR_DIAG_RX_DIS | AR_DIAG_RX_ABORT | AR_DIAG_FORCE_RX_CLEAR); + } + EXPORT_SYMBOL(ath9k_hw_startpcureceive); + + void ath9k_hw_abortpcurecv(struct ath_hw *ah) + { +- REG_SET_BIT(ah, AR_DIAG_SW, AR_DIAG_RX_ABORT | AR_DIAG_RX_DIS); ++ u32 reg = AR_DIAG_RX_DIS | AR_DIAG_RX_ABORT; ++ ++ if (!IS_ENABLED(CPTCFG_ATH9K_TX99)) ++ reg |= AR_DIAG_FORCE_RX_CLEAR; ++ REG_SET_BIT(ah, AR_DIAG_SW, reg); + + ath9k_hw_disable_mib_counters(ah); + } diff --git a/package/kernel/mac80211/patches/304-mac80211-add-hdrlen-to-ieee80211_tx_data.patch b/package/kernel/mac80211/patches/304-mac80211-add-hdrlen-to-ieee80211_tx_data.patch deleted file mode 100644 index 72e81ee1b0..0000000000 --- a/package/kernel/mac80211/patches/304-mac80211-add-hdrlen-to-ieee80211_tx_data.patch +++ /dev/null @@ -1,219 +0,0 @@ -From: Janusz Dziedzic -Date: Fri, 19 Feb 2016 11:01:49 +0100 -Subject: [PATCH] mac80211: add hdrlen to ieee80211_tx_data - -Add hdrlen to ieee80211_tx_data and use this -when wep/ccmd/tkip. This is preparation for -aligned4 code. - -Signed-off-by: Janusz Dziedzic ---- - ---- a/net/mac80211/ieee80211_i.h -+++ b/net/mac80211/ieee80211_i.h -@@ -175,6 +175,7 @@ struct ieee80211_tx_data { - struct ieee80211_tx_rate rate; - - unsigned int flags; -+ unsigned int hdrlen; - }; - - ---- a/net/mac80211/tx.c -+++ b/net/mac80211/tx.c -@@ -955,7 +955,7 @@ ieee80211_tx_h_fragment(struct ieee80211 - struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb); - struct ieee80211_hdr *hdr = (void *)skb->data; - int frag_threshold = tx->local->hw.wiphy->frag_threshold; -- int hdrlen; -+ int hdrlen = tx->hdrlen; - int fragnum; - - /* no matter what happens, tx->skb moves to tx->skbs */ -@@ -976,8 +976,6 @@ ieee80211_tx_h_fragment(struct ieee80211 - if (WARN_ON(info->flags & IEEE80211_TX_CTL_AMPDU)) - return TX_DROP; - -- hdrlen = ieee80211_hdrlen(hdr->frame_control); -- - /* internal error, why isn't DONTFRAG set? */ - if (WARN_ON(skb->len + FCS_LEN <= frag_threshold)) - return TX_DROP; -@@ -1209,6 +1207,8 @@ ieee80211_tx_prepare(struct ieee80211_su - - hdr = (struct ieee80211_hdr *) skb->data; - -+ tx->hdrlen = ieee80211_hdrlen(hdr->frame_control); -+ - if (likely(sta)) { - if (!IS_ERR(sta)) - tx->sta = sta; -@@ -3414,6 +3414,7 @@ begin: - tx.local = local; - tx.skb = skb; - tx.sdata = vif_to_sdata(info->control.vif); -+ tx.hdrlen = ieee80211_padded_hdrlen(hw, hdr->frame_control); - - if (txq->sta) - tx.sta = container_of(txq->sta, struct sta_info, sta); -@@ -3584,6 +3585,7 @@ ieee80211_build_data_template(struct iee - hdr = (void *)skb->data; - tx.sta = sta_info_get(sdata, hdr->addr1); - tx.skb = skb; -+ tx.hdrlen = ieee80211_padded_hdrlen(&tx.local->hw, hdr->frame_control); - - if (ieee80211_tx_h_select_key(&tx) != TX_CONTINUE) { - rcu_read_unlock(); ---- a/net/mac80211/util.c -+++ b/net/mac80211/util.c -@@ -1227,6 +1227,7 @@ void ieee80211_send_auth(struct ieee8021 - struct ieee80211_local *local = sdata->local; - struct sk_buff *skb; - struct ieee80211_mgmt *mgmt; -+ unsigned int hdrlen; - int err; - - /* 24 + 6 = header + auth_algo + auth_transaction + status_code */ -@@ -1251,8 +1252,10 @@ void ieee80211_send_auth(struct ieee8021 - memcpy(skb_put(skb, extra_len), extra, extra_len); - - if (auth_alg == WLAN_AUTH_SHARED_KEY && transaction == 3) { -+ hdrlen = ieee80211_hdrlen(mgmt->frame_control); - mgmt->frame_control |= cpu_to_le16(IEEE80211_FCTL_PROTECTED); -- err = ieee80211_wep_encrypt(local, skb, key, key_len, key_idx); -+ err = ieee80211_wep_encrypt(local, skb, hdrlen, key, -+ key_len, key_idx); - WARN_ON(err); - } - ---- a/net/mac80211/wep.c -+++ b/net/mac80211/wep.c -@@ -89,11 +89,11 @@ static void ieee80211_wep_get_iv(struct - - static u8 *ieee80211_wep_add_iv(struct ieee80211_local *local, - struct sk_buff *skb, -+ unsigned int hdrlen, - int keylen, int keyidx) - { - struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data; - struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb); -- unsigned int hdrlen; - u8 *newhdr; - - hdr->frame_control |= cpu_to_le16(IEEE80211_FCTL_PROTECTED); -@@ -101,7 +101,6 @@ static u8 *ieee80211_wep_add_iv(struct i - if (WARN_ON(skb_headroom(skb) < IEEE80211_WEP_IV_LEN)) - return NULL; - -- hdrlen = ieee80211_hdrlen(hdr->frame_control); - newhdr = skb_push(skb, IEEE80211_WEP_IV_LEN); - memmove(newhdr, newhdr + IEEE80211_WEP_IV_LEN, hdrlen); - -@@ -160,6 +159,7 @@ int ieee80211_wep_encrypt_data(struct cr - */ - int ieee80211_wep_encrypt(struct ieee80211_local *local, - struct sk_buff *skb, -+ unsigned int hdrlen, - const u8 *key, int keylen, int keyidx) - { - u8 *iv; -@@ -169,7 +169,7 @@ int ieee80211_wep_encrypt(struct ieee802 - if (WARN_ON(skb_tailroom(skb) < IEEE80211_WEP_ICV_LEN)) - return -1; - -- iv = ieee80211_wep_add_iv(local, skb, keylen, keyidx); -+ iv = ieee80211_wep_add_iv(local, skb, hdrlen, keylen, keyidx); - if (!iv) - return -1; - -@@ -306,13 +306,14 @@ static int wep_encrypt_skb(struct ieee80 - struct ieee80211_key_conf *hw_key = info->control.hw_key; - - if (!hw_key) { -- if (ieee80211_wep_encrypt(tx->local, skb, tx->key->conf.key, -+ if (ieee80211_wep_encrypt(tx->local, skb, tx->hdrlen, -+ tx->key->conf.key, - tx->key->conf.keylen, - tx->key->conf.keyidx)) - return -1; - } else if ((hw_key->flags & IEEE80211_KEY_FLAG_GENERATE_IV) || - (hw_key->flags & IEEE80211_KEY_FLAG_PUT_IV_SPACE)) { -- if (!ieee80211_wep_add_iv(tx->local, skb, -+ if (!ieee80211_wep_add_iv(tx->local, skb, tx->hdrlen, - tx->key->conf.keylen, - tx->key->conf.keyidx)) - return -1; ---- a/net/mac80211/wep.h -+++ b/net/mac80211/wep.h -@@ -22,6 +22,7 @@ int ieee80211_wep_encrypt_data(struct cr - size_t klen, u8 *data, size_t data_len); - int ieee80211_wep_encrypt(struct ieee80211_local *local, - struct sk_buff *skb, -+ unsigned int hdrlen, - const u8 *key, int keylen, int keyidx); - int ieee80211_wep_decrypt_data(struct crypto_cipher *tfm, u8 *rc4key, - size_t klen, u8 *data, size_t data_len); ---- a/net/mac80211/wpa.c -+++ b/net/mac80211/wpa.c -@@ -43,7 +43,7 @@ ieee80211_tx_h_michael_mic_add(struct ie - skb->len < 24 || !ieee80211_is_data_present(hdr->frame_control)) - return TX_CONTINUE; - -- hdrlen = ieee80211_hdrlen(hdr->frame_control); -+ hdrlen = tx->hdrlen; - if (skb->len < hdrlen) - return TX_DROP; - -@@ -186,7 +186,6 @@ mic_fail_no_key: - - static int tkip_encrypt_skb(struct ieee80211_tx_data *tx, struct sk_buff *skb) - { -- struct ieee80211_hdr *hdr = (struct ieee80211_hdr *) skb->data; - struct ieee80211_key *key = tx->key; - struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb); - unsigned int hdrlen; -@@ -201,7 +200,7 @@ static int tkip_encrypt_skb(struct ieee8 - return 0; - } - -- hdrlen = ieee80211_hdrlen(hdr->frame_control); -+ hdrlen = tx->hdrlen; - len = skb->len - hdrlen; - - if (info->control.hw_key) -@@ -418,7 +417,7 @@ static int ccmp_encrypt_skb(struct ieee8 - return 0; - } - -- hdrlen = ieee80211_hdrlen(hdr->frame_control); -+ hdrlen = tx->hdrlen; - len = skb->len - hdrlen; - - if (info->control.hw_key) -@@ -651,7 +650,7 @@ static int gcmp_encrypt_skb(struct ieee8 - return 0; - } - -- hdrlen = ieee80211_hdrlen(hdr->frame_control); -+ hdrlen = tx->hdrlen; - len = skb->len - hdrlen; - - if (info->control.hw_key) -@@ -791,7 +790,6 @@ static ieee80211_tx_result - ieee80211_crypto_cs_encrypt(struct ieee80211_tx_data *tx, - struct sk_buff *skb) - { -- struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data; - struct ieee80211_key *key = tx->key; - struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb); - int hdrlen; -@@ -807,8 +805,7 @@ ieee80211_crypto_cs_encrypt(struct ieee8 - pskb_expand_head(skb, iv_len, 0, GFP_ATOMIC))) - return TX_DROP; - -- hdrlen = ieee80211_hdrlen(hdr->frame_control); -- -+ hdrlen = tx->hdrlen; - pos = skb_push(skb, iv_len); - memmove(pos, pos + iv_len, hdrlen); - diff --git a/package/kernel/mac80211/patches/305-ath9k-limit-retries-for-powersave-response-frames.patch b/package/kernel/mac80211/patches/305-ath9k-limit-retries-for-powersave-response-frames.patch new file mode 100644 index 0000000000..5923594be3 --- /dev/null +++ b/package/kernel/mac80211/patches/305-ath9k-limit-retries-for-powersave-response-frames.patch @@ -0,0 +1,96 @@ +From: Felix Fietkau +Date: Thu, 2 Jul 2015 15:20:56 +0200 +Subject: [PATCH] ath9k: limit retries for powersave response frames + +In some cases, the channel might be busy enough that an ath9k AP's +response to PS-Poll frames might be too slow and the station has already +gone to sleep. To avoid wasting too much airtime on this, limit the +number of retries on such frames and ensure that no sample rate gets +used. + +Signed-off-by: Felix Fietkau +--- + +--- a/drivers/net/wireless/ath/ath9k/xmit.c ++++ b/drivers/net/wireless/ath/ath9k/xmit.c +@@ -188,10 +188,25 @@ static void ath_send_bar(struct ath_atx_ + } + + static void ath_set_rates(struct ieee80211_vif *vif, struct ieee80211_sta *sta, +- struct ath_buf *bf) ++ struct ath_buf *bf, bool ps) + { ++ struct ieee80211_tx_info *info = IEEE80211_SKB_CB(bf->bf_mpdu); ++ ++ if (ps) { ++ /* Clear the first rate to avoid using a sample rate for PS frames */ ++ info->control.rates[0].idx = -1; ++ info->control.rates[0].count = 0; ++ } ++ + ieee80211_get_tx_rates(vif, sta, bf->bf_mpdu, bf->rates, + ARRAY_SIZE(bf->rates)); ++ if (!ps) ++ return; ++ ++ if (bf->rates[0].count > 2) ++ bf->rates[0].count = 2; ++ ++ bf->rates[1].idx = -1; + } + + static void ath_txq_skb_done(struct ath_softc *sc, struct ath_txq *txq, +@@ -1522,7 +1537,7 @@ ath_tx_form_burst(struct ath_softc *sc, + break; + } + +- ath_set_rates(tid->an->vif, tid->an->sta, bf); ++ ath_set_rates(tid->an->vif, tid->an->sta, bf, false); + } while (1); + } + +@@ -1552,7 +1567,7 @@ static bool ath_tx_sched_aggr(struct ath + return false; + } + +- ath_set_rates(tid->an->vif, tid->an->sta, bf); ++ ath_set_rates(tid->an->vif, tid->an->sta, bf, false); + if (aggr) + aggr_len = ath_tx_form_aggr(sc, txq, tid, &bf_q, bf); + else +@@ -1710,7 +1725,7 @@ void ath9k_release_buffered_frames(struc + break; + + list_add_tail(&bf->list, &bf_q); +- ath_set_rates(tid->an->vif, tid->an->sta, bf); ++ ath_set_rates(tid->an->vif, tid->an->sta, bf, true); + if (bf_isampdu(bf)) { + ath_tx_addto_baw(sc, tid, bf); + bf->bf_state.bf_type &= ~BUF_AGGR; +@@ -2410,7 +2425,7 @@ int ath_tx_start(struct ieee80211_hw *hw + if (txctl->paprd) + bf->bf_state.bfs_paprd_timestamp = jiffies; + +- ath_set_rates(vif, sta, bf); ++ ath_set_rates(vif, sta, bf, ps_resp); + ath_tx_send_normal(sc, txq, tid, skb); + + out: +@@ -2449,7 +2464,7 @@ void ath_tx_cabq(struct ieee80211_hw *hw + break; + + bf->bf_lastbf = bf; +- ath_set_rates(vif, NULL, bf); ++ ath_set_rates(vif, NULL, bf, false); + ath_buf_set_rate(sc, bf, &info, fi->framelen, false); + duration += info.rates[0].PktDuration; + if (bf_tail) +@@ -2968,7 +2983,7 @@ int ath9k_tx99_send(struct ath_softc *sc + return -EINVAL; + } + +- ath_set_rates(sc->tx99_vif, NULL, bf); ++ ath_set_rates(sc->tx99_vif, NULL, bf, false); + + ath9k_hw_set_desc_link(sc->sc_ah, bf->bf_desc, bf->bf_daddr); + ath9k_hw_tx99_start(sc->sc_ah, txctl->txq->axq_qnum); diff --git a/package/kernel/mac80211/patches/305-mac80211-add-NEED_ALIGNED4_SKBS-hw-flag.patch b/package/kernel/mac80211/patches/305-mac80211-add-NEED_ALIGNED4_SKBS-hw-flag.patch deleted file mode 100644 index 704e7f7815..0000000000 --- a/package/kernel/mac80211/patches/305-mac80211-add-NEED_ALIGNED4_SKBS-hw-flag.patch +++ /dev/null @@ -1,233 +0,0 @@ -From: Janusz Dziedzic -Date: Fri, 19 Feb 2016 11:01:50 +0100 -Subject: [PATCH] mac80211: add NEED_ALIGNED4_SKBS hw flag - -HW/driver should set NEED_ALIGNED4_SKBS flag in case -require aligned skbs to four-byte boundaries. -This affect only TX direction. - -Padding is added after ieee80211_hdr, before IV/LLC. - -Before we have to do memmove(hdrlen) twice in the -dirver. Once before we pass this to HW and next -in tx completion (to be sure monitor will report -this tx frame correctly). - -With this patch we can skip this memmove() and save CPU. - -Currently this was tested with ath9k, both hw/sw crypt for -wep/tkip/ccmp. - -Signed-off-by: Janusz Dziedzic ---- - ---- a/include/net/mac80211.h -+++ b/include/net/mac80211.h -@@ -2025,6 +2025,9 @@ struct ieee80211_txq { - * drivers, mac80211 packet loss mechanism will not be triggered and driver - * is completely depending on firmware event for station kickout. - * -+ * @IEEE80211_HW_NEEDS_ALIGNED4_SKBS: Driver need aligned skbs to four-byte. -+ * Padding will be added after ieee80211_hdr, before IV/LLC. -+ * - * @NUM_IEEE80211_HW_FLAGS: number of hardware flags, used for sizing arrays - */ - enum ieee80211_hw_flags { -@@ -2066,6 +2069,7 @@ enum ieee80211_hw_flags { - IEEE80211_HW_TX_AMSDU, - IEEE80211_HW_TX_FRAG_LIST, - IEEE80211_HW_REPORTS_LOW_ACK, -+ IEEE80211_HW_NEEDS_ALIGNED4_SKBS, - - /* keep last, obviously */ - NUM_IEEE80211_HW_FLAGS ---- a/net/mac80211/debugfs.c -+++ b/net/mac80211/debugfs.c -@@ -210,6 +210,7 @@ static const char *hw_flag_names[] = { - FLAG(TX_AMSDU), - FLAG(TX_FRAG_LIST), - FLAG(REPORTS_LOW_ACK), -+ FLAG(NEEDS_ALIGNED4_SKBS), - #undef FLAG - }; - ---- a/net/mac80211/ieee80211_i.h -+++ b/net/mac80211/ieee80211_i.h -@@ -1529,6 +1529,29 @@ ieee80211_have_rx_timestamp(struct ieee8 - return false; - } - -+static inline unsigned int -+ieee80211_hdr_padsize(struct ieee80211_hw *hw, unsigned int hdrlen) -+{ -+ /* -+ * While hdrlen is already aligned to two-byte boundaries, -+ * simple check with & 2 will return correct padsize. -+ */ -+ if (ieee80211_hw_check(hw, NEEDS_ALIGNED4_SKBS)) -+ return hdrlen & 2; -+ return 0; -+} -+ -+static inline unsigned int -+ieee80211_padded_hdrlen(struct ieee80211_hw *hw, __le16 fc) -+{ -+ unsigned int hdrlen; -+ -+ hdrlen = ieee80211_hdrlen(fc); -+ hdrlen += ieee80211_hdr_padsize(hw, hdrlen); -+ -+ return hdrlen; -+} -+ - u64 ieee80211_calculate_rx_timestamp(struct ieee80211_local *local, - struct ieee80211_rx_status *status, - unsigned int mpdu_len, ---- a/net/mac80211/sta_info.h -+++ b/net/mac80211/sta_info.h -@@ -282,7 +282,7 @@ struct ieee80211_fast_tx { - u8 hdr_len; - u8 sa_offs, da_offs, pn_offs; - u8 band; -- u8 hdr[30 + 2 + IEEE80211_FAST_XMIT_MAX_IV + -+ u8 hdr[30 + 2 + 2 + IEEE80211_FAST_XMIT_MAX_IV + - sizeof(rfc1042_header)] __aligned(2); - - struct rcu_head rcu_head; ---- a/net/mac80211/status.c -+++ b/net/mac80211/status.c -@@ -689,9 +689,22 @@ void ieee80211_tx_monitor(struct ieee802 - struct sk_buff *skb2; - struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb); - struct ieee80211_sub_if_data *sdata; -+ struct ieee80211_hdr *hdr = (void *)skb->data; - struct net_device *prev_dev = NULL; -+ unsigned int hdrlen, padsize; - int rtap_len; - -+ /* Remove padding if was added */ -+ if (ieee80211_hw_check(&local->hw, NEEDS_ALIGNED4_SKBS)) { -+ hdrlen = ieee80211_hdrlen(hdr->frame_control); -+ padsize = ieee80211_hdr_padsize(&local->hw, hdrlen); -+ -+ if (padsize && skb->len > hdrlen + padsize) { -+ memmove(skb->data + padsize, skb->data, hdrlen); -+ skb_pull(skb, padsize); -+ } -+ } -+ - /* send frame to monitor interfaces now */ - rtap_len = ieee80211_tx_radiotap_len(info); - if (WARN_ON_ONCE(skb_headroom(skb) < rtap_len)) { ---- a/net/mac80211/tkip.c -+++ b/net/mac80211/tkip.c -@@ -201,10 +201,12 @@ void ieee80211_get_tkip_p2k(struct ieee8 - { - struct ieee80211_key *key = (struct ieee80211_key *) - container_of(keyconf, struct ieee80211_key, conf); -+ struct ieee80211_hw *hw = &key->local->hw; - const u8 *tk = &key->conf.key[NL80211_TKIP_DATA_OFFSET_ENCR_KEY]; - struct tkip_ctx *ctx = &key->u.tkip.tx; - struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data; -- const u8 *data = (u8 *)hdr + ieee80211_hdrlen(hdr->frame_control); -+ const u8 *data = (u8 *)hdr + ieee80211_padded_hdrlen(hw, -+ hdr->frame_control); - u32 iv32 = get_unaligned_le32(&data[4]); - u16 iv16 = data[2] | (data[0] << 8); - ---- a/net/mac80211/tx.c -+++ b/net/mac80211/tx.c -@@ -1206,8 +1206,7 @@ ieee80211_tx_prepare(struct ieee80211_su - info->flags &= ~IEEE80211_TX_INTFL_NEED_TXPROCESSING; - - hdr = (struct ieee80211_hdr *) skb->data; -- -- tx->hdrlen = ieee80211_hdrlen(hdr->frame_control); -+ tx->hdrlen = ieee80211_padded_hdrlen(&local->hw, hdr->frame_control); - - if (likely(sta)) { - if (!IS_ERR(sta)) -@@ -2158,7 +2157,7 @@ netdev_tx_t ieee80211_monitor_start_xmit - goto fail; - - hdr = (struct ieee80211_hdr *)(skb->data + len_rthdr); -- hdrlen = ieee80211_hdrlen(hdr->frame_control); -+ hdrlen = ieee80211_padded_hdrlen(&local->hw, hdr->frame_control); - - if (skb->len < len_rthdr + hdrlen) - goto fail; -@@ -2376,7 +2375,7 @@ static struct sk_buff *ieee80211_build_h - struct ieee80211_chanctx_conf *chanctx_conf; - struct ieee80211_sub_if_data *ap_sdata; - enum nl80211_band band; -- int ret; -+ int padsize, ret; - - if (IS_ERR(sta)) - sta = NULL; -@@ -2596,6 +2595,9 @@ static struct sk_buff *ieee80211_build_h - hdrlen += 2; - } - -+ /* Check aligned4 skb required */ -+ padsize = ieee80211_hdr_padsize(&sdata->local->hw, hdrlen); -+ - /* - * Drop unicast frames to unauthorised stations unless they are - * EAPOL frames from the local station. -@@ -2676,6 +2678,7 @@ static struct sk_buff *ieee80211_build_h - - skb_pull(skb, skip_header_bytes); - head_need = hdrlen + encaps_len + meshhdrlen - skb_headroom(skb); -+ head_need += padsize; - - /* - * So we need to modify the skb header and hence need a copy of -@@ -2708,6 +2711,9 @@ static struct sk_buff *ieee80211_build_h - memcpy(skb_push(skb, meshhdrlen), &mesh_hdr, meshhdrlen); - #endif - -+ if (padsize) -+ memset(skb_push(skb, padsize), 0, padsize); -+ - if (ieee80211_is_data_qos(fc)) { - __le16 *qos_control; - -@@ -2883,6 +2889,9 @@ void ieee80211_check_fast_xmit(struct st - fc |= cpu_to_le16(IEEE80211_STYPE_QOS_DATA); - } - -+ /* Check aligned4 skb required */ -+ build.hdr_len += ieee80211_hdr_padsize(&local->hw, build.hdr_len); -+ - /* We store the key here so there's no point in using rcu_dereference() - * but that's fine because the code that changes the pointers will call - * this function after doing so. For a single CPU that would be enough, -@@ -3436,7 +3445,7 @@ begin: - - if (tx.key && - (tx.key->conf.flags & IEEE80211_KEY_FLAG_GENERATE_IV)) -- pn_offs = ieee80211_hdrlen(hdr->frame_control); -+ pn_offs = tx.hdrlen; - - ieee80211_xmit_fast_finish(sta->sdata, sta, pn_offs, - tx.key, skb); ---- a/net/mac80211/util.c -+++ b/net/mac80211/util.c -@@ -1225,6 +1225,7 @@ void ieee80211_send_auth(struct ieee8021 - u32 tx_flags) - { - struct ieee80211_local *local = sdata->local; -+ struct ieee80211_hw *hw = &local->hw; - struct sk_buff *skb; - struct ieee80211_mgmt *mgmt; - unsigned int hdrlen; -@@ -1252,7 +1253,7 @@ void ieee80211_send_auth(struct ieee8021 - memcpy(skb_put(skb, extra_len), extra, extra_len); - - if (auth_alg == WLAN_AUTH_SHARED_KEY && transaction == 3) { -- hdrlen = ieee80211_hdrlen(mgmt->frame_control); -+ hdrlen = ieee80211_padded_hdrlen(hw, mgmt->frame_control); - mgmt->frame_control |= cpu_to_le16(IEEE80211_FCTL_PROTECTED); - err = ieee80211_wep_encrypt(local, skb, hdrlen, key, - key_len, key_idx); diff --git a/package/kernel/mac80211/patches/306-Revert-ath9k-interpret-requested-txpower-in-EIRP-dom.patch b/package/kernel/mac80211/patches/306-Revert-ath9k-interpret-requested-txpower-in-EIRP-dom.patch new file mode 100644 index 0000000000..956ab83903 --- /dev/null +++ b/package/kernel/mac80211/patches/306-Revert-ath9k-interpret-requested-txpower-in-EIRP-dom.patch @@ -0,0 +1,37 @@ +From: Felix Fietkau +Date: Sat, 14 May 2016 14:51:02 +0200 +Subject: [PATCH] Revert "ath9k: interpret requested txpower in EIRP + domain" + +This reverts commit 71f5137bf010c6faffab50c0ec15374c59c4a411. +--- + +--- a/drivers/net/wireless/ath/ath9k/hw.c ++++ b/drivers/net/wireless/ath/ath9k/hw.c +@@ -2931,7 +2931,8 @@ void ath9k_hw_apply_txpower(struct ath_h + { + struct ath_regulatory *reg = ath9k_hw_regulatory(ah); + struct ieee80211_channel *channel; +- int chan_pwr, new_pwr; ++ int chan_pwr, new_pwr, max_gain; ++ int ant_gain, ant_reduction = 0; + + if (!chan) + return; +@@ -2939,10 +2940,15 @@ void ath9k_hw_apply_txpower(struct ath_h + channel = chan->chan; + chan_pwr = min_t(int, channel->max_power * 2, MAX_RATE_POWER); + new_pwr = min_t(int, chan_pwr, reg->power_limit); ++ max_gain = chan_pwr - new_pwr + channel->max_antenna_gain * 2; ++ ++ ant_gain = get_antenna_gain(ah, chan); ++ if (ant_gain > max_gain) ++ ant_reduction = ant_gain - max_gain; + + ah->eep_ops->set_txpower(ah, chan, + ath9k_regd_get_ctl(reg, chan), +- get_antenna_gain(ah, chan), new_pwr, test); ++ ant_reduction, new_pwr, test); + } + + void ath9k_hw_set_txpowerlimit(struct ath_hw *ah, u32 limit, bool test) diff --git a/package/kernel/mac80211/patches/306-mac80211-minstrel-Enable-STBC-and-LDPC-for-VHT-Rates.patch b/package/kernel/mac80211/patches/306-mac80211-minstrel-Enable-STBC-and-LDPC-for-VHT-Rates.patch deleted file mode 100644 index 6e7ecb9c4d..0000000000 --- a/package/kernel/mac80211/patches/306-mac80211-minstrel-Enable-STBC-and-LDPC-for-VHT-Rates.patch +++ /dev/null @@ -1,81 +0,0 @@ -From: Chaitanya T K -Date: Mon, 27 Jun 2016 15:23:26 +0530 -Subject: [PATCH] mac80211: minstrel: Enable STBC and LDPC for VHT Rates - -If peer support reception of STBC and LDPC, enable them for better -performance. - -Signed-off-by: Chaitanya TK ---- - ---- a/include/linux/ieee80211.h -+++ b/include/linux/ieee80211.h -@@ -1551,6 +1551,7 @@ struct ieee80211_vht_operation { - #define IEEE80211_VHT_CAP_RXSTBC_3 0x00000300 - #define IEEE80211_VHT_CAP_RXSTBC_4 0x00000400 - #define IEEE80211_VHT_CAP_RXSTBC_MASK 0x00000700 -+#define IEEE80211_VHT_CAP_RXSTBC_SHIFT 8 - #define IEEE80211_VHT_CAP_SU_BEAMFORMER_CAPABLE 0x00000800 - #define IEEE80211_VHT_CAP_SU_BEAMFORMEE_CAPABLE 0x00001000 - #define IEEE80211_VHT_CAP_BEAMFORMEE_STS_SHIFT 13 ---- a/net/mac80211/rc80211_minstrel_ht.c -+++ b/net/mac80211/rc80211_minstrel_ht.c -@@ -1166,13 +1166,14 @@ minstrel_ht_update_caps(void *priv, stru - struct minstrel_ht_sta_priv *msp = priv_sta; - struct minstrel_ht_sta *mi = &msp->ht; - struct ieee80211_mcs_info *mcs = &sta->ht_cap.mcs; -- u16 sta_cap = sta->ht_cap.cap; -+ u16 ht_cap = sta->ht_cap.cap; - struct ieee80211_sta_vht_cap *vht_cap = &sta->vht_cap; - int use_vht; - int n_supported = 0; - int ack_dur; - int stbc; - int i; -+ bool ldpc = false; - - /* fall back to the old minstrel for legacy stations */ - if (!sta->ht_cap.ht_supported) -@@ -1210,16 +1211,24 @@ minstrel_ht_update_caps(void *priv, stru - } - mi->sample_tries = 4; - -- /* TODO tx_flags for vht - ATM the RC API is not fine-grained enough */ - if (!use_vht) { -- stbc = (sta_cap & IEEE80211_HT_CAP_RX_STBC) >> -+ stbc = (ht_cap & IEEE80211_HT_CAP_RX_STBC) >> - IEEE80211_HT_CAP_RX_STBC_SHIFT; -- mi->tx_flags |= stbc << IEEE80211_TX_CTL_STBC_SHIFT; - -- if (sta_cap & IEEE80211_HT_CAP_LDPC_CODING) -- mi->tx_flags |= IEEE80211_TX_CTL_LDPC; -+ if (ht_cap & IEEE80211_HT_CAP_LDPC_CODING) -+ ldpc = true; -+ } else { -+ stbc = (vht_cap->cap & IEEE80211_VHT_CAP_RXSTBC_MASK) >> -+ IEEE80211_VHT_CAP_RXSTBC_SHIFT; -+ -+ if (vht_cap->cap & IEEE80211_VHT_CAP_RXLDPC) -+ ldpc = true; - } - -+ mi->tx_flags |= stbc << IEEE80211_TX_CTL_STBC_SHIFT; -+ if (ldpc) -+ mi->tx_flags |= IEEE80211_TX_CTL_LDPC; -+ - for (i = 0; i < ARRAY_SIZE(mi->groups); i++) { - u32 gflags = minstrel_mcs_groups[i].flags; - int bw, nss; -@@ -1232,10 +1241,10 @@ minstrel_ht_update_caps(void *priv, stru - - if (gflags & IEEE80211_TX_RC_SHORT_GI) { - if (gflags & IEEE80211_TX_RC_40_MHZ_WIDTH) { -- if (!(sta_cap & IEEE80211_HT_CAP_SGI_40)) -+ if (!(ht_cap & IEEE80211_HT_CAP_SGI_40)) - continue; - } else { -- if (!(sta_cap & IEEE80211_HT_CAP_SGI_20)) -+ if (!(ht_cap & IEEE80211_HT_CAP_SGI_20)) - continue; - } - } diff --git a/package/kernel/mac80211/patches/307-ath9k-fix-moredata-bit-in-PS-buffered-frame-release.patch b/package/kernel/mac80211/patches/307-ath9k-fix-moredata-bit-in-PS-buffered-frame-release.patch deleted file mode 100644 index 4fc6dc1ec3..0000000000 --- a/package/kernel/mac80211/patches/307-ath9k-fix-moredata-bit-in-PS-buffered-frame-release.patch +++ /dev/null @@ -1,50 +0,0 @@ -From: Felix Fietkau -Date: Sun, 28 Aug 2016 13:13:01 +0200 -Subject: [PATCH] ath9k: fix moredata bit in PS buffered frame release - -Signed-off-by: Felix Fietkau ---- - ---- a/drivers/net/wireless/ath/ath9k/xmit.c -+++ b/drivers/net/wireless/ath/ath9k/xmit.c -@@ -1635,6 +1635,22 @@ void ath_tx_aggr_wakeup(struct ath_softc - } - } - -+ -+static void -+ath9k_set_moredata(struct ath_softc *sc, struct ath_buf *bf, bool val) -+{ -+ struct ieee80211_hdr *hdr; -+ u16 mask = cpu_to_le16(IEEE80211_FCTL_MOREDATA); -+ u16 mask_val = mask * val; -+ -+ hdr = (struct ieee80211_hdr *) bf->bf_mpdu->data; -+ if ((hdr->frame_control & mask) != mask_val) { -+ hdr->frame_control = (hdr->frame_control & ~mask) | mask_val; -+ dma_sync_single_for_device(sc->dev, bf->bf_buf_addr, -+ sizeof(*hdr), DMA_TO_DEVICE); -+ } -+} -+ - void ath9k_release_buffered_frames(struct ieee80211_hw *hw, - struct ieee80211_sta *sta, - u16 tids, int nframes, -@@ -1665,6 +1681,7 @@ void ath9k_release_buffered_frames(struc - if (!bf) - break; - -+ ath9k_set_moredata(sc, bf, true); - list_add_tail(&bf->list, &bf_q); - ath_set_rates(tid->an->vif, tid->an->sta, bf, true); - if (bf_isampdu(bf)) { -@@ -1688,6 +1705,9 @@ void ath9k_release_buffered_frames(struc - if (list_empty(&bf_q)) - return; - -+ if (!more_data) -+ ath9k_set_moredata(sc, bf_tail, false); -+ - info = IEEE80211_SKB_CB(bf_tail->bf_mpdu); - info->flags |= IEEE80211_TX_STATUS_EOSP; - diff --git a/package/kernel/mac80211/patches/307-mac80211-add-hdrlen-to-ieee80211_tx_data.patch b/package/kernel/mac80211/patches/307-mac80211-add-hdrlen-to-ieee80211_tx_data.patch new file mode 100644 index 0000000000..1a6fd8471c --- /dev/null +++ b/package/kernel/mac80211/patches/307-mac80211-add-hdrlen-to-ieee80211_tx_data.patch @@ -0,0 +1,219 @@ +From: Janusz Dziedzic +Date: Fri, 19 Feb 2016 11:01:49 +0100 +Subject: [PATCH] mac80211: add hdrlen to ieee80211_tx_data + +Add hdrlen to ieee80211_tx_data and use this +when wep/ccmd/tkip. This is preparation for +aligned4 code. + +Signed-off-by: Janusz Dziedzic +--- + +--- a/net/mac80211/ieee80211_i.h ++++ b/net/mac80211/ieee80211_i.h +@@ -177,6 +177,7 @@ struct ieee80211_tx_data { + struct ieee80211_tx_rate rate; + + unsigned int flags; ++ unsigned int hdrlen; + }; + + +--- a/net/mac80211/tx.c ++++ b/net/mac80211/tx.c +@@ -925,7 +925,7 @@ ieee80211_tx_h_fragment(struct ieee80211 + struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb); + struct ieee80211_hdr *hdr = (void *)skb->data; + int frag_threshold = tx->local->hw.wiphy->frag_threshold; +- int hdrlen; ++ int hdrlen = tx->hdrlen; + int fragnum; + + /* no matter what happens, tx->skb moves to tx->skbs */ +@@ -946,8 +946,6 @@ ieee80211_tx_h_fragment(struct ieee80211 + if (WARN_ON(info->flags & IEEE80211_TX_CTL_AMPDU)) + return TX_DROP; + +- hdrlen = ieee80211_hdrlen(hdr->frame_control); +- + /* internal error, why isn't DONTFRAG set? */ + if (WARN_ON(skb->len + FCS_LEN <= frag_threshold)) + return TX_DROP; +@@ -1179,6 +1177,8 @@ ieee80211_tx_prepare(struct ieee80211_su + + hdr = (struct ieee80211_hdr *) skb->data; + ++ tx->hdrlen = ieee80211_hdrlen(hdr->frame_control); ++ + if (likely(sta)) { + if (!IS_ERR(sta)) + tx->sta = sta; +@@ -3437,6 +3437,7 @@ begin: + tx.local = local; + tx.skb = skb; + tx.sdata = vif_to_sdata(info->control.vif); ++ tx.hdrlen = ieee80211_padded_hdrlen(hw, hdr->frame_control); + + if (txq->sta) + tx.sta = container_of(txq->sta, struct sta_info, sta); +@@ -3731,6 +3732,7 @@ ieee80211_build_data_template(struct iee + hdr = (void *)skb->data; + tx.sta = sta_info_get(sdata, hdr->addr1); + tx.skb = skb; ++ tx.hdrlen = ieee80211_padded_hdrlen(&tx.local->hw, hdr->frame_control); + + if (ieee80211_tx_h_select_key(&tx) != TX_CONTINUE) { + rcu_read_unlock(); +--- a/net/mac80211/util.c ++++ b/net/mac80211/util.c +@@ -1227,6 +1227,7 @@ void ieee80211_send_auth(struct ieee8021 + struct ieee80211_local *local = sdata->local; + struct sk_buff *skb; + struct ieee80211_mgmt *mgmt; ++ unsigned int hdrlen; + int err; + + /* 24 + 6 = header + auth_algo + auth_transaction + status_code */ +@@ -1251,8 +1252,10 @@ void ieee80211_send_auth(struct ieee8021 + memcpy(skb_put(skb, extra_len), extra, extra_len); + + if (auth_alg == WLAN_AUTH_SHARED_KEY && transaction == 3) { ++ hdrlen = ieee80211_hdrlen(mgmt->frame_control); + mgmt->frame_control |= cpu_to_le16(IEEE80211_FCTL_PROTECTED); +- err = ieee80211_wep_encrypt(local, skb, key, key_len, key_idx); ++ err = ieee80211_wep_encrypt(local, skb, hdrlen, key, ++ key_len, key_idx); + WARN_ON(err); + } + +--- a/net/mac80211/wep.c ++++ b/net/mac80211/wep.c +@@ -89,11 +89,11 @@ static void ieee80211_wep_get_iv(struct + + static u8 *ieee80211_wep_add_iv(struct ieee80211_local *local, + struct sk_buff *skb, ++ unsigned int hdrlen, + int keylen, int keyidx) + { + struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data; + struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb); +- unsigned int hdrlen; + u8 *newhdr; + + hdr->frame_control |= cpu_to_le16(IEEE80211_FCTL_PROTECTED); +@@ -101,7 +101,6 @@ static u8 *ieee80211_wep_add_iv(struct i + if (WARN_ON(skb_headroom(skb) < IEEE80211_WEP_IV_LEN)) + return NULL; + +- hdrlen = ieee80211_hdrlen(hdr->frame_control); + newhdr = skb_push(skb, IEEE80211_WEP_IV_LEN); + memmove(newhdr, newhdr + IEEE80211_WEP_IV_LEN, hdrlen); + +@@ -160,6 +159,7 @@ int ieee80211_wep_encrypt_data(struct cr + */ + int ieee80211_wep_encrypt(struct ieee80211_local *local, + struct sk_buff *skb, ++ unsigned int hdrlen, + const u8 *key, int keylen, int keyidx) + { + u8 *iv; +@@ -169,7 +169,7 @@ int ieee80211_wep_encrypt(struct ieee802 + if (WARN_ON(skb_tailroom(skb) < IEEE80211_WEP_ICV_LEN)) + return -1; + +- iv = ieee80211_wep_add_iv(local, skb, keylen, keyidx); ++ iv = ieee80211_wep_add_iv(local, skb, hdrlen, keylen, keyidx); + if (!iv) + return -1; + +@@ -307,13 +307,14 @@ static int wep_encrypt_skb(struct ieee80 + struct ieee80211_key_conf *hw_key = info->control.hw_key; + + if (!hw_key) { +- if (ieee80211_wep_encrypt(tx->local, skb, tx->key->conf.key, ++ if (ieee80211_wep_encrypt(tx->local, skb, tx->hdrlen, ++ tx->key->conf.key, + tx->key->conf.keylen, + tx->key->conf.keyidx)) + return -1; + } else if ((hw_key->flags & IEEE80211_KEY_FLAG_GENERATE_IV) || + (hw_key->flags & IEEE80211_KEY_FLAG_PUT_IV_SPACE)) { +- if (!ieee80211_wep_add_iv(tx->local, skb, ++ if (!ieee80211_wep_add_iv(tx->local, skb, tx->hdrlen, + tx->key->conf.keylen, + tx->key->conf.keyidx)) + return -1; +--- a/net/mac80211/wep.h ++++ b/net/mac80211/wep.h +@@ -22,6 +22,7 @@ int ieee80211_wep_encrypt_data(struct cr + size_t klen, u8 *data, size_t data_len); + int ieee80211_wep_encrypt(struct ieee80211_local *local, + struct sk_buff *skb, ++ unsigned int hdrlen, + const u8 *key, int keylen, int keyidx); + int ieee80211_wep_decrypt_data(struct crypto_cipher *tfm, u8 *rc4key, + size_t klen, u8 *data, size_t data_len); +--- a/net/mac80211/wpa.c ++++ b/net/mac80211/wpa.c +@@ -43,7 +43,7 @@ ieee80211_tx_h_michael_mic_add(struct ie + skb->len < 24 || !ieee80211_is_data_present(hdr->frame_control)) + return TX_CONTINUE; + +- hdrlen = ieee80211_hdrlen(hdr->frame_control); ++ hdrlen = tx->hdrlen; + if (skb->len < hdrlen) + return TX_DROP; + +@@ -186,7 +186,6 @@ mic_fail_no_key: + + static int tkip_encrypt_skb(struct ieee80211_tx_data *tx, struct sk_buff *skb) + { +- struct ieee80211_hdr *hdr = (struct ieee80211_hdr *) skb->data; + struct ieee80211_key *key = tx->key; + struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb); + unsigned int hdrlen; +@@ -201,7 +200,7 @@ static int tkip_encrypt_skb(struct ieee8 + return 0; + } + +- hdrlen = ieee80211_hdrlen(hdr->frame_control); ++ hdrlen = tx->hdrlen; + len = skb->len - hdrlen; + + if (info->control.hw_key) +@@ -419,7 +418,7 @@ static int ccmp_encrypt_skb(struct ieee8 + return 0; + } + +- hdrlen = ieee80211_hdrlen(hdr->frame_control); ++ hdrlen = tx->hdrlen; + len = skb->len - hdrlen; + + if (info->control.hw_key) +@@ -652,7 +651,7 @@ static int gcmp_encrypt_skb(struct ieee8 + return 0; + } + +- hdrlen = ieee80211_hdrlen(hdr->frame_control); ++ hdrlen = tx->hdrlen; + len = skb->len - hdrlen; + + if (info->control.hw_key) +@@ -792,7 +791,6 @@ static ieee80211_tx_result + ieee80211_crypto_cs_encrypt(struct ieee80211_tx_data *tx, + struct sk_buff *skb) + { +- struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data; + struct ieee80211_key *key = tx->key; + struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb); + int hdrlen; +@@ -808,8 +806,7 @@ ieee80211_crypto_cs_encrypt(struct ieee8 + pskb_expand_head(skb, iv_len, 0, GFP_ATOMIC))) + return TX_DROP; + +- hdrlen = ieee80211_hdrlen(hdr->frame_control); +- ++ hdrlen = tx->hdrlen; + pos = skb_push(skb, iv_len); + memmove(pos, pos + iv_len, hdrlen); + diff --git a/package/kernel/mac80211/patches/308-ath9k-clear-potentially-stale-EOSP-status-bit-in-int.patch b/package/kernel/mac80211/patches/308-ath9k-clear-potentially-stale-EOSP-status-bit-in-int.patch deleted file mode 100644 index 929da25d75..0000000000 --- a/package/kernel/mac80211/patches/308-ath9k-clear-potentially-stale-EOSP-status-bit-in-int.patch +++ /dev/null @@ -1,22 +0,0 @@ -From: Felix Fietkau -Date: Sun, 28 Aug 2016 13:13:42 +0200 -Subject: [PATCH] ath9k: clear potentially stale EOSP status bit in - intermediate queues - -Prevents spurious ieee80211_sta_eosp calls. - -Signed-off-by: Felix Fietkau ---- - ---- a/drivers/net/wireless/ath/ath9k/xmit.c -+++ b/drivers/net/wireless/ath/ath9k/xmit.c -@@ -945,7 +945,8 @@ ath_tx_get_tid_subframe(struct ath_softc - bf->bf_lastbf = bf; - - tx_info = IEEE80211_SKB_CB(skb); -- tx_info->flags &= ~IEEE80211_TX_CTL_CLEAR_PS_FILT; -+ tx_info->flags &= ~(IEEE80211_TX_CTL_CLEAR_PS_FILT | -+ IEEE80211_TX_STATUS_EOSP); - - /* - * No aggregation session is running, but there may be frames diff --git a/package/kernel/mac80211/patches/308-mac80211-add-NEED_ALIGNED4_SKBS-hw-flag.patch b/package/kernel/mac80211/patches/308-mac80211-add-NEED_ALIGNED4_SKBS-hw-flag.patch new file mode 100644 index 0000000000..43455773f1 --- /dev/null +++ b/package/kernel/mac80211/patches/308-mac80211-add-NEED_ALIGNED4_SKBS-hw-flag.patch @@ -0,0 +1,233 @@ +From: Janusz Dziedzic +Date: Fri, 19 Feb 2016 11:01:50 +0100 +Subject: [PATCH] mac80211: add NEED_ALIGNED4_SKBS hw flag + +HW/driver should set NEED_ALIGNED4_SKBS flag in case +require aligned skbs to four-byte boundaries. +This affect only TX direction. + +Padding is added after ieee80211_hdr, before IV/LLC. + +Before we have to do memmove(hdrlen) twice in the +dirver. Once before we pass this to HW and next +in tx completion (to be sure monitor will report +this tx frame correctly). + +With this patch we can skip this memmove() and save CPU. + +Currently this was tested with ath9k, both hw/sw crypt for +wep/tkip/ccmp. + +Signed-off-by: Janusz Dziedzic +--- + +--- a/include/net/mac80211.h ++++ b/include/net/mac80211.h +@@ -2043,6 +2043,9 @@ struct ieee80211_txq { + * The stack will not do fragmentation. + * The callback for @set_frag_threshold should be set as well. + * ++ * @IEEE80211_HW_NEEDS_ALIGNED4_SKBS: Driver need aligned skbs to four-byte. ++ * Padding will be added after ieee80211_hdr, before IV/LLC. ++ * + * @NUM_IEEE80211_HW_FLAGS: number of hardware flags, used for sizing arrays + */ + enum ieee80211_hw_flags { +@@ -2085,6 +2088,7 @@ enum ieee80211_hw_flags { + IEEE80211_HW_TX_FRAG_LIST, + IEEE80211_HW_REPORTS_LOW_ACK, + IEEE80211_HW_SUPPORTS_TX_FRAG, ++ IEEE80211_HW_NEEDS_ALIGNED4_SKBS, + + /* keep last, obviously */ + NUM_IEEE80211_HW_FLAGS +--- a/net/mac80211/debugfs.c ++++ b/net/mac80211/debugfs.c +@@ -211,6 +211,7 @@ static const char *hw_flag_names[] = { + FLAG(TX_FRAG_LIST), + FLAG(REPORTS_LOW_ACK), + FLAG(SUPPORTS_TX_FRAG), ++ FLAG(NEEDS_ALIGNED4_SKBS), + #undef FLAG + }; + +--- a/net/mac80211/ieee80211_i.h ++++ b/net/mac80211/ieee80211_i.h +@@ -1553,6 +1553,29 @@ ieee80211_vif_get_num_mcast_if(struct ie + return -1; + } + ++static inline unsigned int ++ieee80211_hdr_padsize(struct ieee80211_hw *hw, unsigned int hdrlen) ++{ ++ /* ++ * While hdrlen is already aligned to two-byte boundaries, ++ * simple check with & 2 will return correct padsize. ++ */ ++ if (ieee80211_hw_check(hw, NEEDS_ALIGNED4_SKBS)) ++ return hdrlen & 2; ++ return 0; ++} ++ ++static inline unsigned int ++ieee80211_padded_hdrlen(struct ieee80211_hw *hw, __le16 fc) ++{ ++ unsigned int hdrlen; ++ ++ hdrlen = ieee80211_hdrlen(fc); ++ hdrlen += ieee80211_hdr_padsize(hw, hdrlen); ++ ++ return hdrlen; ++} ++ + u64 ieee80211_calculate_rx_timestamp(struct ieee80211_local *local, + struct ieee80211_rx_status *status, + unsigned int mpdu_len, +--- a/net/mac80211/sta_info.h ++++ b/net/mac80211/sta_info.h +@@ -282,7 +282,7 @@ struct ieee80211_fast_tx { + u8 hdr_len; + u8 sa_offs, da_offs, pn_offs; + u8 band; +- u8 hdr[30 + 2 + IEEE80211_FAST_XMIT_MAX_IV + ++ u8 hdr[30 + 2 + 2 + IEEE80211_FAST_XMIT_MAX_IV + + sizeof(rfc1042_header)] __aligned(2); + + struct rcu_head rcu_head; +--- a/net/mac80211/status.c ++++ b/net/mac80211/status.c +@@ -693,9 +693,22 @@ void ieee80211_tx_monitor(struct ieee802 + struct sk_buff *skb2; + struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb); + struct ieee80211_sub_if_data *sdata; ++ struct ieee80211_hdr *hdr = (void *)skb->data; + struct net_device *prev_dev = NULL; ++ unsigned int hdrlen, padsize; + int rtap_len; + ++ /* Remove padding if was added */ ++ if (ieee80211_hw_check(&local->hw, NEEDS_ALIGNED4_SKBS)) { ++ hdrlen = ieee80211_hdrlen(hdr->frame_control); ++ padsize = ieee80211_hdr_padsize(&local->hw, hdrlen); ++ ++ if (padsize && skb->len > hdrlen + padsize) { ++ memmove(skb->data + padsize, skb->data, hdrlen); ++ skb_pull(skb, padsize); ++ } ++ } ++ + /* send frame to monitor interfaces now */ + rtap_len = ieee80211_tx_radiotap_len(info); + if (WARN_ON_ONCE(skb_headroom(skb) < rtap_len)) { +--- a/net/mac80211/tkip.c ++++ b/net/mac80211/tkip.c +@@ -201,10 +201,12 @@ void ieee80211_get_tkip_p2k(struct ieee8 + { + struct ieee80211_key *key = (struct ieee80211_key *) + container_of(keyconf, struct ieee80211_key, conf); ++ struct ieee80211_hw *hw = &key->local->hw; + const u8 *tk = &key->conf.key[NL80211_TKIP_DATA_OFFSET_ENCR_KEY]; + struct tkip_ctx *ctx = &key->u.tkip.tx; + struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data; +- const u8 *data = (u8 *)hdr + ieee80211_hdrlen(hdr->frame_control); ++ const u8 *data = (u8 *)hdr + ieee80211_padded_hdrlen(hw, ++ hdr->frame_control); + u32 iv32 = get_unaligned_le32(&data[4]); + u16 iv16 = data[2] | (data[0] << 8); + +--- a/net/mac80211/tx.c ++++ b/net/mac80211/tx.c +@@ -1176,8 +1176,7 @@ ieee80211_tx_prepare(struct ieee80211_su + info->flags &= ~IEEE80211_TX_INTFL_NEED_TXPROCESSING; + + hdr = (struct ieee80211_hdr *) skb->data; +- +- tx->hdrlen = ieee80211_hdrlen(hdr->frame_control); ++ tx->hdrlen = ieee80211_padded_hdrlen(&local->hw, hdr->frame_control); + + if (likely(sta)) { + if (!IS_ERR(sta)) +@@ -2152,7 +2151,7 @@ netdev_tx_t ieee80211_monitor_start_xmit + goto fail; + + hdr = (struct ieee80211_hdr *)(skb->data + len_rthdr); +- hdrlen = ieee80211_hdrlen(hdr->frame_control); ++ hdrlen = ieee80211_padded_hdrlen(&local->hw, hdr->frame_control); + + if (skb->len < len_rthdr + hdrlen) + goto fail; +@@ -2370,7 +2369,7 @@ static struct sk_buff *ieee80211_build_h + struct ieee80211_chanctx_conf *chanctx_conf; + struct ieee80211_sub_if_data *ap_sdata; + enum nl80211_band band; +- int ret; ++ int padsize, ret; + + if (IS_ERR(sta)) + sta = NULL; +@@ -2590,6 +2589,9 @@ static struct sk_buff *ieee80211_build_h + hdrlen += 2; + } + ++ /* Check aligned4 skb required */ ++ padsize = ieee80211_hdr_padsize(&sdata->local->hw, hdrlen); ++ + /* + * Drop unicast frames to unauthorised stations unless they are + * EAPOL frames from the local station. +@@ -2670,6 +2672,7 @@ static struct sk_buff *ieee80211_build_h + + skb_pull(skb, skip_header_bytes); + head_need = hdrlen + encaps_len + meshhdrlen - skb_headroom(skb); ++ head_need += padsize; + + /* + * So we need to modify the skb header and hence need a copy of +@@ -2702,6 +2705,9 @@ static struct sk_buff *ieee80211_build_h + memcpy(skb_push(skb, meshhdrlen), &mesh_hdr, meshhdrlen); + #endif + ++ if (padsize) ++ memset(skb_push(skb, padsize), 0, padsize); ++ + if (ieee80211_is_data_qos(fc)) { + __le16 *qos_control; + +@@ -2877,6 +2883,9 @@ void ieee80211_check_fast_xmit(struct st + fc |= cpu_to_le16(IEEE80211_STYPE_QOS_DATA); + } + ++ /* Check aligned4 skb required */ ++ build.hdr_len += ieee80211_hdr_padsize(&local->hw, build.hdr_len); ++ + /* We store the key here so there's no point in using rcu_dereference() + * but that's fine because the code that changes the pointers will call + * this function after doing so. For a single CPU that would be enough, +@@ -3464,7 +3473,7 @@ begin: + + if (tx.key && + (tx.key->conf.flags & IEEE80211_KEY_FLAG_GENERATE_IV)) +- pn_offs = ieee80211_hdrlen(hdr->frame_control); ++ pn_offs = tx.hdrlen; + + ieee80211_xmit_fast_finish(sta->sdata, sta, pn_offs, + tx.key, skb); +--- a/net/mac80211/util.c ++++ b/net/mac80211/util.c +@@ -1225,6 +1225,7 @@ void ieee80211_send_auth(struct ieee8021 + u32 tx_flags) + { + struct ieee80211_local *local = sdata->local; ++ struct ieee80211_hw *hw = &local->hw; + struct sk_buff *skb; + struct ieee80211_mgmt *mgmt; + unsigned int hdrlen; +@@ -1252,7 +1253,7 @@ void ieee80211_send_auth(struct ieee8021 + memcpy(skb_put(skb, extra_len), extra, extra_len); + + if (auth_alg == WLAN_AUTH_SHARED_KEY && transaction == 3) { +- hdrlen = ieee80211_hdrlen(mgmt->frame_control); ++ hdrlen = ieee80211_padded_hdrlen(hw, mgmt->frame_control); + mgmt->frame_control |= cpu_to_le16(IEEE80211_FCTL_PROTECTED); + err = ieee80211_wep_encrypt(local, skb, hdrlen, key, + key_len, key_idx); diff --git a/package/kernel/mac80211/patches/309-ath9k-report-tx-status-on-EOSP.patch b/package/kernel/mac80211/patches/309-ath9k-report-tx-status-on-EOSP.patch deleted file mode 100644 index 80a3074a4d..0000000000 --- a/package/kernel/mac80211/patches/309-ath9k-report-tx-status-on-EOSP.patch +++ /dev/null @@ -1,19 +0,0 @@ -From: Felix Fietkau -Date: Sun, 28 Aug 2016 13:23:27 +0200 -Subject: [PATCH] ath9k: report tx status on EOSP - -Signed-off-by: Felix Fietkau ---- - ---- a/drivers/net/wireless/ath/ath9k/xmit.c -+++ b/drivers/net/wireless/ath/ath9k/xmit.c -@@ -86,7 +86,8 @@ static void ath_tx_status(struct ieee802 - struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb); - struct ieee80211_sta *sta = info->status.status_driver_data[0]; - -- if (info->flags & IEEE80211_TX_CTL_REQ_TX_STATUS) { -+ if (info->flags & (IEEE80211_TX_CTL_REQ_TX_STATUS | -+ IEEE80211_TX_STATUS_EOSP)) { - ieee80211_tx_status(hw, skb); - return; - } diff --git a/package/kernel/mac80211/patches/309-mac80211-minstrel-Enable-STBC-and-LDPC-for-VHT-Rates.patch b/package/kernel/mac80211/patches/309-mac80211-minstrel-Enable-STBC-and-LDPC-for-VHT-Rates.patch new file mode 100644 index 0000000000..a62b1bb28e --- /dev/null +++ b/package/kernel/mac80211/patches/309-mac80211-minstrel-Enable-STBC-and-LDPC-for-VHT-Rates.patch @@ -0,0 +1,82 @@ +From: Chaitanya T K +Date: Mon, 27 Jun 2016 15:23:26 +0530 +Subject: [PATCH] mac80211: minstrel: Enable STBC and LDPC for VHT Rates + +If peer support reception of STBC and LDPC, enable them for better +performance. + +Signed-off-by: Chaitanya TK +--- + +--- a/include/linux/ieee80211.h ++++ b/include/linux/ieee80211.h +@@ -1553,6 +1553,7 @@ struct ieee80211_vht_operation { + #define IEEE80211_VHT_CAP_RXSTBC_3 0x00000300 + #define IEEE80211_VHT_CAP_RXSTBC_4 0x00000400 + #define IEEE80211_VHT_CAP_RXSTBC_MASK 0x00000700 ++#define IEEE80211_VHT_CAP_RXSTBC_SHIFT 8 + #define IEEE80211_VHT_CAP_SU_BEAMFORMER_CAPABLE 0x00000800 + #define IEEE80211_VHT_CAP_SU_BEAMFORMEE_CAPABLE 0x00001000 + #define IEEE80211_VHT_CAP_BEAMFORMEE_STS_SHIFT 13 +--- a/net/mac80211/rc80211_minstrel_ht.c ++++ b/net/mac80211/rc80211_minstrel_ht.c +@@ -1130,7 +1130,7 @@ minstrel_ht_update_caps(void *priv, stru + struct minstrel_ht_sta_priv *msp = priv_sta; + struct minstrel_ht_sta *mi = &msp->ht; + struct ieee80211_mcs_info *mcs = &sta->ht_cap.mcs; +- u16 sta_cap = sta->ht_cap.cap; ++ u16 ht_cap = sta->ht_cap.cap; + struct ieee80211_sta_vht_cap *vht_cap = &sta->vht_cap; + struct sta_info *sinfo = container_of(sta, struct sta_info, sta); + int use_vht; +@@ -1138,6 +1138,7 @@ minstrel_ht_update_caps(void *priv, stru + int ack_dur; + int stbc; + int i; ++ bool ldpc = false; + + /* fall back to the old minstrel for legacy stations */ + if (!sta->ht_cap.ht_supported) +@@ -1175,16 +1176,24 @@ minstrel_ht_update_caps(void *priv, stru + } + mi->sample_tries = 4; + +- /* TODO tx_flags for vht - ATM the RC API is not fine-grained enough */ + if (!use_vht) { +- stbc = (sta_cap & IEEE80211_HT_CAP_RX_STBC) >> ++ stbc = (ht_cap & IEEE80211_HT_CAP_RX_STBC) >> + IEEE80211_HT_CAP_RX_STBC_SHIFT; +- mi->tx_flags |= stbc << IEEE80211_TX_CTL_STBC_SHIFT; + +- if (sta_cap & IEEE80211_HT_CAP_LDPC_CODING) +- mi->tx_flags |= IEEE80211_TX_CTL_LDPC; ++ if (ht_cap & IEEE80211_HT_CAP_LDPC_CODING) ++ ldpc = true; ++ } else { ++ stbc = (vht_cap->cap & IEEE80211_VHT_CAP_RXSTBC_MASK) >> ++ IEEE80211_VHT_CAP_RXSTBC_SHIFT; ++ ++ if (vht_cap->cap & IEEE80211_VHT_CAP_RXLDPC) ++ ldpc = true; + } + ++ mi->tx_flags |= stbc << IEEE80211_TX_CTL_STBC_SHIFT; ++ if (ldpc) ++ mi->tx_flags |= IEEE80211_TX_CTL_LDPC; ++ + for (i = 0; i < ARRAY_SIZE(mi->groups); i++) { + u32 gflags = minstrel_mcs_groups[i].flags; + int bw, nss; +@@ -1197,10 +1206,10 @@ minstrel_ht_update_caps(void *priv, stru + + if (gflags & IEEE80211_TX_RC_SHORT_GI) { + if (gflags & IEEE80211_TX_RC_40_MHZ_WIDTH) { +- if (!(sta_cap & IEEE80211_HT_CAP_SGI_40)) ++ if (!(ht_cap & IEEE80211_HT_CAP_SGI_40)) + continue; + } else { +- if (!(sta_cap & IEEE80211_HT_CAP_SGI_20)) ++ if (!(ht_cap & IEEE80211_HT_CAP_SGI_20)) + continue; + } + } diff --git a/package/kernel/mac80211/patches/310-ath9k-fix-block-ack-window-tracking-issues.patch b/package/kernel/mac80211/patches/310-ath9k-fix-block-ack-window-tracking-issues.patch deleted file mode 100644 index 2993cbab74..0000000000 --- a/package/kernel/mac80211/patches/310-ath9k-fix-block-ack-window-tracking-issues.patch +++ /dev/null @@ -1,114 +0,0 @@ -From: Felix Fietkau -Date: Tue, 30 Aug 2016 12:44:08 +0200 -Subject: [PATCH] ath9k: fix block-ack window tracking issues - -Ensure that a buffer gets tracked as part of the block-ack window as -soon as it's dequeued from the tid for the first time. Ensure that -double calls to ath_tx_addto_baw (e.g. on retransmission) don't cause -any issues. - -Signed-off-by: Felix Fietkau ---- - ---- a/drivers/net/wireless/ath/ath9k/xmit.c -+++ b/drivers/net/wireless/ath/ath9k/xmit.c -@@ -62,7 +62,7 @@ static void ath_tx_rc_status(struct ath_ - struct ath_tx_status *ts, int nframes, int nbad, - int txok); - static void ath_tx_update_baw(struct ath_softc *sc, struct ath_atx_tid *tid, -- int seqno); -+ struct ath_buf *bf); - static struct ath_buf *ath_tx_setup_buffer(struct ath_softc *sc, - struct ath_txq *txq, - struct ath_atx_tid *tid, -@@ -300,7 +300,7 @@ static void ath_tx_flush_tid(struct ath_ - } - - if (fi->baw_tracked) { -- ath_tx_update_baw(sc, tid, bf->bf_state.seqno); -+ ath_tx_update_baw(sc, tid, bf); - sendbar = true; - } - -@@ -316,10 +316,15 @@ static void ath_tx_flush_tid(struct ath_ - } - - static void ath_tx_update_baw(struct ath_softc *sc, struct ath_atx_tid *tid, -- int seqno) -+ struct ath_buf *bf) - { -+ struct ath_frame_info *fi = get_frame_info(bf->bf_mpdu); -+ u16 seqno = bf->bf_state.seqno; - int index, cindex; - -+ if (!fi->baw_tracked) -+ return; -+ - index = ATH_BA_INDEX(tid->seq_start, seqno); - cindex = (tid->baw_head + index) & (ATH_TID_MAX_BUFS - 1); - -@@ -340,6 +345,9 @@ static void ath_tx_addto_baw(struct ath_ - u16 seqno = bf->bf_state.seqno; - int index, cindex; - -+ if (fi->baw_tracked) -+ return; -+ - index = ATH_BA_INDEX(tid->seq_start, seqno); - cindex = (tid->baw_head + index) & (ATH_TID_MAX_BUFS - 1); - __set_bit(cindex, tid->tx_buf); -@@ -616,7 +624,7 @@ static void ath_tx_complete_aggr(struct - * complete the acked-ones/xretried ones; update - * block-ack window - */ -- ath_tx_update_baw(sc, tid, seqno); -+ ath_tx_update_baw(sc, tid, bf); - - if (rc_update && (acked_cnt == 1 || txfail_cnt == 1)) { - memcpy(tx_info->control.rates, rates, sizeof(rates)); -@@ -646,7 +654,7 @@ static void ath_tx_complete_aggr(struct - * run out of tx buf. - */ - if (!tbf) { -- ath_tx_update_baw(sc, tid, seqno); -+ ath_tx_update_baw(sc, tid, bf); - - ath_tx_complete_buf(sc, bf, txq, - &bf_head, NULL, ts, -@@ -987,11 +995,14 @@ ath_tx_get_tid_subframe(struct ath_softc - - INIT_LIST_HEAD(&bf_head); - list_add(&bf->list, &bf_head); -- ath_tx_update_baw(sc, tid, seqno); -+ ath_tx_update_baw(sc, tid, bf); - ath_tx_complete_buf(sc, bf, txq, &bf_head, NULL, &ts, 0); - continue; - } - -+ if (bf_isampdu(bf)) -+ ath_tx_addto_baw(sc, tid, bf); -+ - return bf; - } - -@@ -1049,8 +1060,6 @@ ath_tx_form_aggr(struct ath_softc *sc, s - bf->bf_next = NULL; - - /* link buffers of this frame to the aggregate */ -- if (!fi->baw_tracked) -- ath_tx_addto_baw(sc, tid, bf); - bf->bf_state.ndelim = ndelim; - - list_add_tail(&bf->list, bf_q); -@@ -1686,10 +1695,8 @@ void ath9k_release_buffered_frames(struc - ath9k_set_moredata(sc, bf, true); - list_add_tail(&bf->list, &bf_q); - ath_set_rates(tid->an->vif, tid->an->sta, bf, true); -- if (bf_isampdu(bf)) { -- ath_tx_addto_baw(sc, tid, bf); -+ if (bf_isampdu(bf)) - bf->bf_state.bf_type &= ~BUF_AGGR; -- } - if (bf_tail) - bf_tail->bf_next = bf; - diff --git a/package/kernel/mac80211/patches/310-ath9k-fix-moredata-bit-in-PS-buffered-frame-release.patch b/package/kernel/mac80211/patches/310-ath9k-fix-moredata-bit-in-PS-buffered-frame-release.patch new file mode 100644 index 0000000000..b2a74ccbac --- /dev/null +++ b/package/kernel/mac80211/patches/310-ath9k-fix-moredata-bit-in-PS-buffered-frame-release.patch @@ -0,0 +1,50 @@ +From: Felix Fietkau +Date: Sun, 28 Aug 2016 13:13:01 +0200 +Subject: [PATCH] ath9k: fix moredata bit in PS buffered frame release + +Signed-off-by: Felix Fietkau +--- + +--- a/drivers/net/wireless/ath/ath9k/xmit.c ++++ b/drivers/net/wireless/ath/ath9k/xmit.c +@@ -1694,6 +1694,22 @@ void ath_tx_aggr_wakeup(struct ath_softc + } + } + ++ ++static void ++ath9k_set_moredata(struct ath_softc *sc, struct ath_buf *bf, bool val) ++{ ++ struct ieee80211_hdr *hdr; ++ u16 mask = cpu_to_le16(IEEE80211_FCTL_MOREDATA); ++ u16 mask_val = mask * val; ++ ++ hdr = (struct ieee80211_hdr *) bf->bf_mpdu->data; ++ if ((hdr->frame_control & mask) != mask_val) { ++ hdr->frame_control = (hdr->frame_control & ~mask) | mask_val; ++ dma_sync_single_for_device(sc->dev, bf->bf_buf_addr, ++ sizeof(*hdr), DMA_TO_DEVICE); ++ } ++} ++ + void ath9k_release_buffered_frames(struct ieee80211_hw *hw, + struct ieee80211_sta *sta, + u16 tids, int nframes, +@@ -1724,6 +1740,7 @@ void ath9k_release_buffered_frames(struc + if (!bf) + break; + ++ ath9k_set_moredata(sc, bf, true); + list_add_tail(&bf->list, &bf_q); + ath_set_rates(tid->an->vif, tid->an->sta, bf, true); + if (bf_isampdu(bf)) { +@@ -1747,6 +1764,9 @@ void ath9k_release_buffered_frames(struc + if (list_empty(&bf_q)) + return; + ++ if (!more_data) ++ ath9k_set_moredata(sc, bf_tail, false); ++ + info = IEEE80211_SKB_CB(bf_tail->bf_mpdu); + info->flags |= IEEE80211_TX_STATUS_EOSP; + diff --git a/package/kernel/mac80211/patches/311-ath9k-clear-potentially-stale-EOSP-status-bit-in-int.patch b/package/kernel/mac80211/patches/311-ath9k-clear-potentially-stale-EOSP-status-bit-in-int.patch new file mode 100644 index 0000000000..9863dffc90 --- /dev/null +++ b/package/kernel/mac80211/patches/311-ath9k-clear-potentially-stale-EOSP-status-bit-in-int.patch @@ -0,0 +1,22 @@ +From: Felix Fietkau +Date: Sun, 28 Aug 2016 13:13:42 +0200 +Subject: [PATCH] ath9k: clear potentially stale EOSP status bit in + intermediate queues + +Prevents spurious ieee80211_sta_eosp calls. + +Signed-off-by: Felix Fietkau +--- + +--- a/drivers/net/wireless/ath/ath9k/xmit.c ++++ b/drivers/net/wireless/ath/ath9k/xmit.c +@@ -1004,7 +1004,8 @@ ath_tx_get_tid_subframe(struct ath_softc + bf->bf_lastbf = bf; + + tx_info = IEEE80211_SKB_CB(skb); +- tx_info->flags &= ~IEEE80211_TX_CTL_CLEAR_PS_FILT; ++ tx_info->flags &= ~(IEEE80211_TX_CTL_CLEAR_PS_FILT | ++ IEEE80211_TX_STATUS_EOSP); + + /* + * No aggregation session is running, but there may be frames diff --git a/package/kernel/mac80211/patches/312-ath9k-report-tx-status-on-EOSP.patch b/package/kernel/mac80211/patches/312-ath9k-report-tx-status-on-EOSP.patch new file mode 100644 index 0000000000..80a3074a4d --- /dev/null +++ b/package/kernel/mac80211/patches/312-ath9k-report-tx-status-on-EOSP.patch @@ -0,0 +1,19 @@ +From: Felix Fietkau +Date: Sun, 28 Aug 2016 13:23:27 +0200 +Subject: [PATCH] ath9k: report tx status on EOSP + +Signed-off-by: Felix Fietkau +--- + +--- a/drivers/net/wireless/ath/ath9k/xmit.c ++++ b/drivers/net/wireless/ath/ath9k/xmit.c +@@ -86,7 +86,8 @@ static void ath_tx_status(struct ieee802 + struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb); + struct ieee80211_sta *sta = info->status.status_driver_data[0]; + +- if (info->flags & IEEE80211_TX_CTL_REQ_TX_STATUS) { ++ if (info->flags & (IEEE80211_TX_CTL_REQ_TX_STATUS | ++ IEEE80211_TX_STATUS_EOSP)) { + ieee80211_tx_status(hw, skb); + return; + } diff --git a/package/kernel/mac80211/patches/312-mac80211-Use-rhltable-instead-of-rhashtable.patch b/package/kernel/mac80211/patches/312-mac80211-Use-rhltable-instead-of-rhashtable.patch deleted file mode 100644 index 4c5fff1274..0000000000 --- a/package/kernel/mac80211/patches/312-mac80211-Use-rhltable-instead-of-rhashtable.patch +++ /dev/null @@ -1,275 +0,0 @@ -From: Herbert Xu -Date: Mon, 19 Sep 2016 19:00:10 +0800 -Subject: [PATCH] mac80211: Use rhltable instead of rhashtable - -mac80211 currently uses rhashtable with insecure_elasticity set -to true. The latter is because of duplicate objects. What's -more, mac80211 walks the rhashtable chains by hand which is broken -as rhashtable may contain multiple tables due to resizing or -rehashing. - -This patch fixes it by converting it to the newly added rhltable -interface which is designed for use with duplicate objects. - -With rhltable a lookup returns a list of objects instead of a -single one. This is then fed into the existing for_each_sta_info -macro. - -This patch also deletes the sta_addr_hash function since rhashtable -defaults to jhash. - -Signed-off-by: Herbert Xu ---- - ---- a/net/mac80211/ieee80211_i.h -+++ b/net/mac80211/ieee80211_i.h -@@ -1233,7 +1233,7 @@ struct ieee80211_local { - spinlock_t tim_lock; - unsigned long num_sta; - struct list_head sta_list; -- struct rhashtable sta_hash; -+ struct rhltable sta_hash; - struct timer_list sta_cleanup; - int sta_generation; - ---- a/net/mac80211/rx.c -+++ b/net/mac80211/rx.c -@@ -4004,7 +4004,7 @@ static void __ieee80211_rx_handle_packet - __le16 fc; - struct ieee80211_rx_data rx; - struct ieee80211_sub_if_data *prev; -- struct rhash_head *tmp; -+ struct rhlist_head *tmp; - int err = 0; - - fc = ((struct ieee80211_hdr *)skb->data)->frame_control; -@@ -4047,13 +4047,10 @@ static void __ieee80211_rx_handle_packet - goto out; - } else if (ieee80211_is_data(fc)) { - struct sta_info *sta, *prev_sta; -- const struct bucket_table *tbl; - - prev_sta = NULL; - -- tbl = rht_dereference_rcu(local->sta_hash.tbl, &local->sta_hash); -- -- for_each_sta_info(local, tbl, hdr->addr2, sta, tmp) { -+ for_each_sta_info(local, hdr->addr2, sta, tmp) { - if (!prev_sta) { - prev_sta = sta; - continue; ---- a/net/mac80211/sta_info.c -+++ b/net/mac80211/sta_info.c -@@ -67,12 +67,10 @@ - - static const struct rhashtable_params sta_rht_params = { - .nelem_hint = 3, /* start small */ -- .insecure_elasticity = true, /* Disable chain-length checks. */ - .automatic_shrinking = true, - .head_offset = offsetof(struct sta_info, hash_node), - .key_offset = offsetof(struct sta_info, addr), - .key_len = ETH_ALEN, -- .hashfn = sta_addr_hash, - .max_size = CPTCFG_MAC80211_STA_HASH_MAX_SIZE, - }; - -@@ -80,8 +78,8 @@ static const struct rhashtable_params st - static int sta_info_hash_del(struct ieee80211_local *local, - struct sta_info *sta) - { -- return rhashtable_remove_fast(&local->sta_hash, &sta->hash_node, -- sta_rht_params); -+ return rhltable_remove(&local->sta_hash, &sta->hash_node, -+ sta_rht_params); - } - - static void __cleanup_single_sta(struct sta_info *sta) -@@ -157,19 +155,22 @@ static void cleanup_single_sta(struct st - sta_info_free(local, sta); - } - -+struct rhlist_head *sta_info_hash_lookup(struct ieee80211_local *local, -+ const u8 *addr) -+{ -+ return rhltable_lookup(&local->sta_hash, addr, sta_rht_params); -+} -+ - /* protected by RCU */ - struct sta_info *sta_info_get(struct ieee80211_sub_if_data *sdata, - const u8 *addr) - { - struct ieee80211_local *local = sdata->local; -+ struct rhlist_head *tmp; - struct sta_info *sta; -- struct rhash_head *tmp; -- const struct bucket_table *tbl; - - rcu_read_lock(); -- tbl = rht_dereference_rcu(local->sta_hash.tbl, &local->sta_hash); -- -- for_each_sta_info(local, tbl, addr, sta, tmp) { -+ for_each_sta_info(local, addr, sta, tmp) { - if (sta->sdata == sdata) { - rcu_read_unlock(); - /* this is safe as the caller must already hold -@@ -190,14 +191,11 @@ struct sta_info *sta_info_get_bss(struct - const u8 *addr) - { - struct ieee80211_local *local = sdata->local; -+ struct rhlist_head *tmp; - struct sta_info *sta; -- struct rhash_head *tmp; -- const struct bucket_table *tbl; - - rcu_read_lock(); -- tbl = rht_dereference_rcu(local->sta_hash.tbl, &local->sta_hash); -- -- for_each_sta_info(local, tbl, addr, sta, tmp) { -+ for_each_sta_info(local, addr, sta, tmp) { - if (sta->sdata == sdata || - (sta->sdata->bss && sta->sdata->bss == sdata->bss)) { - rcu_read_unlock(); -@@ -263,8 +261,8 @@ void sta_info_free(struct ieee80211_loca - static int sta_info_hash_add(struct ieee80211_local *local, - struct sta_info *sta) - { -- return rhashtable_insert_fast(&local->sta_hash, &sta->hash_node, -- sta_rht_params); -+ return rhltable_insert(&local->sta_hash, &sta->hash_node, -+ sta_rht_params); - } - - static void sta_deliver_ps_frames(struct work_struct *wk) -@@ -453,9 +451,9 @@ static int sta_info_insert_check(struct - is_multicast_ether_addr(sta->sta.addr))) - return -EINVAL; - -- /* Strictly speaking this isn't necessary as we hold the mutex, but -- * the rhashtable code can't really deal with that distinction. We -- * do require the mutex for correctness though. -+ /* The RCU read lock is required by rhashtable due to -+ * asynchronous resize/rehash. We also require the mutex -+ * for correctness. - */ - rcu_read_lock(); - lockdep_assert_held(&sdata->local->sta_mtx); -@@ -1043,16 +1041,11 @@ static void sta_info_cleanup(unsigned lo - round_jiffies(jiffies + STA_INFO_CLEANUP_INTERVAL)); - } - --u32 sta_addr_hash(const void *key, u32 length, u32 seed) --{ -- return jhash(key, ETH_ALEN, seed); --} -- - int sta_info_init(struct ieee80211_local *local) - { - int err; - -- err = rhashtable_init(&local->sta_hash, &sta_rht_params); -+ err = rhltable_init(&local->sta_hash, &sta_rht_params); - if (err) - return err; - -@@ -1068,7 +1061,7 @@ int sta_info_init(struct ieee80211_local - void sta_info_stop(struct ieee80211_local *local) - { - del_timer_sync(&local->sta_cleanup); -- rhashtable_destroy(&local->sta_hash); -+ rhltable_destroy(&local->sta_hash); - } - - -@@ -1138,17 +1131,14 @@ struct ieee80211_sta *ieee80211_find_sta - const u8 *localaddr) - { - struct ieee80211_local *local = hw_to_local(hw); -+ struct rhlist_head *tmp; - struct sta_info *sta; -- struct rhash_head *tmp; -- const struct bucket_table *tbl; -- -- tbl = rht_dereference_rcu(local->sta_hash.tbl, &local->sta_hash); - - /* - * Just return a random station if localaddr is NULL - * ... first in list. - */ -- for_each_sta_info(local, tbl, addr, sta, tmp) { -+ for_each_sta_info(local, addr, sta, tmp) { - if (localaddr && - !ether_addr_equal(sta->sdata->vif.addr, localaddr)) - continue; ---- a/net/mac80211/sta_info.h -+++ b/net/mac80211/sta_info.h -@@ -455,7 +455,7 @@ struct sta_info { - /* General information, mostly static */ - struct list_head list, free_list; - struct rcu_head rcu_head; -- struct rhash_head hash_node; -+ struct rhlist_head hash_node; - u8 addr[ETH_ALEN]; - struct ieee80211_local *local; - struct ieee80211_sub_if_data *sdata; -@@ -638,6 +638,9 @@ rcu_dereference_protected_tid_tx(struct - */ - #define STA_INFO_CLEANUP_INTERVAL (10 * HZ) - -+struct rhlist_head *sta_info_hash_lookup(struct ieee80211_local *local, -+ const u8 *addr); -+ - /* - * Get a STA info, must be under RCU read lock. - */ -@@ -647,17 +650,9 @@ struct sta_info *sta_info_get(struct iee - struct sta_info *sta_info_get_bss(struct ieee80211_sub_if_data *sdata, - const u8 *addr); - --u32 sta_addr_hash(const void *key, u32 length, u32 seed); -- --#define _sta_bucket_idx(_tbl, _a) \ -- rht_bucket_index(_tbl, sta_addr_hash(_a, ETH_ALEN, (_tbl)->hash_rnd)) -- --#define for_each_sta_info(local, tbl, _addr, _sta, _tmp) \ -- rht_for_each_entry_rcu(_sta, _tmp, tbl, \ -- _sta_bucket_idx(tbl, _addr), \ -- hash_node) \ -- /* compare address and run code only if it matches */ \ -- if (ether_addr_equal(_sta->addr, (_addr))) -+#define for_each_sta_info(local, _addr, _sta, _tmp) \ -+ rhl_for_each_entry_rcu(_sta, _tmp, \ -+ sta_info_hash_lookup(local, _addr), hash_node) - - /* - * Get STA info by index, BROKEN! ---- a/net/mac80211/status.c -+++ b/net/mac80211/status.c -@@ -759,8 +759,8 @@ void ieee80211_tx_status(struct ieee8021 - struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb); - __le16 fc; - struct ieee80211_supported_band *sband; -+ struct rhlist_head *tmp; - struct sta_info *sta; -- struct rhash_head *tmp; - int retry_count; - int rates_idx; - bool send_to_cooked; -@@ -768,7 +768,6 @@ void ieee80211_tx_status(struct ieee8021 - struct ieee80211_bar *bar; - int shift = 0; - int tid = IEEE80211_NUM_TIDS; -- const struct bucket_table *tbl; - - rates_idx = ieee80211_tx_get_rates(hw, info, &retry_count); - -@@ -777,9 +776,7 @@ void ieee80211_tx_status(struct ieee8021 - sband = local->hw.wiphy->bands[info->band]; - fc = hdr->frame_control; - -- tbl = rht_dereference_rcu(local->sta_hash.tbl, &local->sta_hash); -- -- for_each_sta_info(local, tbl, hdr->addr1, sta, tmp) { -+ for_each_sta_info(local, hdr->addr1, sta, tmp) { - /* skip wrong virtual interface */ - if (!ether_addr_equal(hdr->addr2, sta->sdata->vif.addr)) - continue; diff --git a/package/kernel/mac80211/patches/313-ath9k-fix-block-ack-window-tracking-issues.patch b/package/kernel/mac80211/patches/313-ath9k-fix-block-ack-window-tracking-issues.patch new file mode 100644 index 0000000000..fb8df08afe --- /dev/null +++ b/package/kernel/mac80211/patches/313-ath9k-fix-block-ack-window-tracking-issues.patch @@ -0,0 +1,114 @@ +From: Felix Fietkau +Date: Tue, 30 Aug 2016 12:44:08 +0200 +Subject: [PATCH] ath9k: fix block-ack window tracking issues + +Ensure that a buffer gets tracked as part of the block-ack window as +soon as it's dequeued from the tid for the first time. Ensure that +double calls to ath_tx_addto_baw (e.g. on retransmission) don't cause +any issues. + +Signed-off-by: Felix Fietkau +--- + +--- a/drivers/net/wireless/ath/ath9k/xmit.c ++++ b/drivers/net/wireless/ath/ath9k/xmit.c +@@ -62,7 +62,7 @@ static void ath_tx_rc_status(struct ath_ + struct ath_tx_status *ts, int nframes, int nbad, + int txok); + static void ath_tx_update_baw(struct ath_softc *sc, struct ath_atx_tid *tid, +- int seqno); ++ struct ath_buf *bf); + static struct ath_buf *ath_tx_setup_buffer(struct ath_softc *sc, + struct ath_txq *txq, + struct ath_atx_tid *tid, +@@ -311,7 +311,7 @@ static void ath_tx_flush_tid(struct ath_ + } + + if (fi->baw_tracked) { +- ath_tx_update_baw(sc, tid, bf->bf_state.seqno); ++ ath_tx_update_baw(sc, tid, bf); + sendbar = true; + } + +@@ -327,10 +327,15 @@ static void ath_tx_flush_tid(struct ath_ + } + + static void ath_tx_update_baw(struct ath_softc *sc, struct ath_atx_tid *tid, +- int seqno) ++ struct ath_buf *bf) + { ++ struct ath_frame_info *fi = get_frame_info(bf->bf_mpdu); ++ u16 seqno = bf->bf_state.seqno; + int index, cindex; + ++ if (!fi->baw_tracked) ++ return; ++ + index = ATH_BA_INDEX(tid->seq_start, seqno); + cindex = (tid->baw_head + index) & (ATH_TID_MAX_BUFS - 1); + +@@ -351,6 +356,9 @@ static void ath_tx_addto_baw(struct ath_ + u16 seqno = bf->bf_state.seqno; + int index, cindex; + ++ if (fi->baw_tracked) ++ return; ++ + index = ATH_BA_INDEX(tid->seq_start, seqno); + cindex = (tid->baw_head + index) & (ATH_TID_MAX_BUFS - 1); + __set_bit(cindex, tid->tx_buf); +@@ -627,7 +635,7 @@ static void ath_tx_complete_aggr(struct + * complete the acked-ones/xretried ones; update + * block-ack window + */ +- ath_tx_update_baw(sc, tid, seqno); ++ ath_tx_update_baw(sc, tid, bf); + + if (rc_update && (acked_cnt == 1 || txfail_cnt == 1)) { + memcpy(tx_info->control.rates, rates, sizeof(rates)); +@@ -657,7 +665,7 @@ static void ath_tx_complete_aggr(struct + * run out of tx buf. + */ + if (!tbf) { +- ath_tx_update_baw(sc, tid, seqno); ++ ath_tx_update_baw(sc, tid, bf); + + ath_tx_complete_buf(sc, bf, txq, + &bf_head, NULL, ts, +@@ -1046,11 +1054,14 @@ ath_tx_get_tid_subframe(struct ath_softc + + INIT_LIST_HEAD(&bf_head); + list_add(&bf->list, &bf_head); +- ath_tx_update_baw(sc, tid, seqno); ++ ath_tx_update_baw(sc, tid, bf); + ath_tx_complete_buf(sc, bf, txq, &bf_head, NULL, &ts, 0); + continue; + } + ++ if (bf_isampdu(bf)) ++ ath_tx_addto_baw(sc, tid, bf); ++ + return bf; + } + +@@ -1108,8 +1119,6 @@ ath_tx_form_aggr(struct ath_softc *sc, s + bf->bf_next = NULL; + + /* link buffers of this frame to the aggregate */ +- if (!fi->baw_tracked) +- ath_tx_addto_baw(sc, tid, bf); + bf->bf_state.ndelim = ndelim; + + list_add_tail(&bf->list, bf_q); +@@ -1745,10 +1754,8 @@ void ath9k_release_buffered_frames(struc + ath9k_set_moredata(sc, bf, true); + list_add_tail(&bf->list, &bf_q); + ath_set_rates(tid->an->vif, tid->an->sta, bf, true); +- if (bf_isampdu(bf)) { +- ath_tx_addto_baw(sc, tid, bf); ++ if (bf_isampdu(bf)) + bf->bf_state.bf_type &= ~BUF_AGGR; +- } + if (bf_tail) + bf_tail->bf_next = bf; + diff --git a/package/kernel/mac80211/patches/313-mac80211-fix-sequence-number-allocation-regression.patch b/package/kernel/mac80211/patches/313-mac80211-fix-sequence-number-allocation-regression.patch deleted file mode 100644 index c1548be0d2..0000000000 --- a/package/kernel/mac80211/patches/313-mac80211-fix-sequence-number-allocation-regression.patch +++ /dev/null @@ -1,37 +0,0 @@ -From: Felix Fietkau -Date: Tue, 11 Oct 2016 11:24:07 +0200 -Subject: [PATCH] mac80211: fix sequence number allocation regression - -The recent commit that moved around TX handlers dropped the sequence -number allocation at the end of ieee80211_tx_dequeue and calls -ieee80211_tx_h_sequence instead (for the non-fast-xmit case). -However, it did not change the fast-xmit sequence allocation condition -in ieee80211_xmit_fast_finish, which skipped seqno alloc if intermediate -tx queues are being used. - -Drop the now obsolete condition. - -Fixes: bb42f2d13ffc ("mac80211: Move reorder-sensitive TX handlers to after TXQ dequeue") -Signed-off-by: Felix Fietkau ---- - ---- a/net/mac80211/tx.c -+++ b/net/mac80211/tx.c -@@ -3212,7 +3212,6 @@ static void ieee80211_xmit_fast_finish(s - struct sk_buff *skb) - { - struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb); -- struct ieee80211_local *local = sdata->local; - struct ieee80211_hdr *hdr = (void *)skb->data; - u8 tid = IEEE80211_NUM_TIDS; - -@@ -3224,8 +3223,7 @@ static void ieee80211_xmit_fast_finish(s - if (hdr->frame_control & cpu_to_le16(IEEE80211_STYPE_QOS_DATA)) { - tid = skb->priority & IEEE80211_QOS_CTL_TAG1D_MASK; - *ieee80211_get_qos_ctl(hdr) = tid; -- if (!ieee80211_get_txq(local, &sdata->vif, &sta->sta, skb)) -- hdr->seq_ctrl = ieee80211_tx_next_seq(sta, tid); -+ hdr->seq_ctrl = ieee80211_tx_next_seq(sta, tid); - } else { - info->flags |= IEEE80211_TX_CTL_ASSIGN_SEQ; - hdr->seq_ctrl = cpu_to_le16(sdata->sequence_number); diff --git a/package/kernel/mac80211/patches/314-ath9k-rename-tx_complete_work-to-hw_check_work.patch b/package/kernel/mac80211/patches/314-ath9k-rename-tx_complete_work-to-hw_check_work.patch new file mode 100644 index 0000000000..5465df3ccf --- /dev/null +++ b/package/kernel/mac80211/patches/314-ath9k-rename-tx_complete_work-to-hw_check_work.patch @@ -0,0 +1,175 @@ +From: Felix Fietkau +Date: Wed, 25 Jan 2017 12:57:05 +0100 +Subject: [PATCH] ath9k: rename tx_complete_work to hw_check_work + +Also include common MAC alive check. This should make the hang checks +more reliable for modes where beacons are not sent and is used as a +starting point for further hang check improvements + +Signed-off-by: Felix Fietkau +--- + +--- a/drivers/net/wireless/ath/ath9k/ath9k.h ++++ b/drivers/net/wireless/ath/ath9k/ath9k.h +@@ -108,7 +108,7 @@ int ath_descdma_setup(struct ath_softc * + #define ATH_AGGR_MIN_QDEPTH 2 + /* minimum h/w qdepth for non-aggregated traffic */ + #define ATH_NON_AGGR_MIN_QDEPTH 8 +-#define ATH_TX_COMPLETE_POLL_INT 1000 ++#define ATH_HW_CHECK_POLL_INT 1000 + #define ATH_TXFIFO_DEPTH 8 + #define ATH_TX_ERROR 0x01 + +@@ -745,7 +745,7 @@ void ath9k_csa_update(struct ath_softc * + #define ATH_PAPRD_TIMEOUT 100 /* msecs */ + #define ATH_PLL_WORK_INTERVAL 100 + +-void ath_tx_complete_poll_work(struct work_struct *work); ++void ath_hw_check_work(struct work_struct *work); + void ath_reset_work(struct work_struct *work); + bool ath_hw_check(struct ath_softc *sc); + void ath_hw_pll_work(struct work_struct *work); +@@ -1053,7 +1053,7 @@ struct ath_softc { + #ifdef CPTCFG_ATH9K_DEBUGFS + struct ath9k_debug debug; + #endif +- struct delayed_work tx_complete_work; ++ struct delayed_work hw_check_work; + struct delayed_work hw_pll_work; + struct timer_list sleep_timer; + +--- a/drivers/net/wireless/ath/ath9k/init.c ++++ b/drivers/net/wireless/ath/ath9k/init.c +@@ -681,6 +681,7 @@ static int ath9k_init_softc(u16 devid, s + INIT_WORK(&sc->hw_reset_work, ath_reset_work); + INIT_WORK(&sc->paprd_work, ath_paprd_calibrate); + INIT_DELAYED_WORK(&sc->hw_pll_work, ath_hw_pll_work); ++ INIT_DELAYED_WORK(&sc->hw_check_work, ath_hw_check_work); + + ath9k_init_channel_context(sc); + +--- a/drivers/net/wireless/ath/ath9k/link.c ++++ b/drivers/net/wireless/ath/ath9k/link.c +@@ -20,20 +20,13 @@ + * TX polling - checks if the TX engine is stuck somewhere + * and issues a chip reset if so. + */ +-void ath_tx_complete_poll_work(struct work_struct *work) ++static bool ath_tx_complete_check(struct ath_softc *sc) + { +- struct ath_softc *sc = container_of(work, struct ath_softc, +- tx_complete_work.work); + struct ath_txq *txq; + int i; +- bool needreset = false; +- + +- if (sc->tx99_state) { +- ath_dbg(ath9k_hw_common(sc->sc_ah), RESET, +- "skip tx hung detection on tx99\n"); +- return; +- } ++ if (sc->tx99_state) ++ return true; + + for (i = 0; i < IEEE80211_NUM_ACS; i++) { + txq = sc->tx.txq_map[i]; +@@ -41,25 +34,36 @@ void ath_tx_complete_poll_work(struct wo + ath_txq_lock(sc, txq); + if (txq->axq_depth) { + if (txq->axq_tx_inprogress) { +- needreset = true; + ath_txq_unlock(sc, txq); +- break; +- } else { +- txq->axq_tx_inprogress = true; ++ goto reset; + } ++ ++ txq->axq_tx_inprogress = true; + } + ath_txq_unlock(sc, txq); + } + +- if (needreset) { +- ath_dbg(ath9k_hw_common(sc->sc_ah), RESET, +- "tx hung, resetting the chip\n"); +- ath9k_queue_reset(sc, RESET_TYPE_TX_HANG); ++ return true; ++ ++reset: ++ ath_dbg(ath9k_hw_common(sc->sc_ah), RESET, ++ "tx hung, resetting the chip\n"); ++ ath9k_queue_reset(sc, RESET_TYPE_TX_HANG); ++ return false; ++ ++} ++ ++void ath_hw_check_work(struct work_struct *work) ++{ ++ struct ath_softc *sc = container_of(work, struct ath_softc, ++ hw_check_work.work); ++ ++ if (!ath_hw_check(sc) || ++ !ath_tx_complete_check(sc)) + return; +- } + +- ieee80211_queue_delayed_work(sc->hw, &sc->tx_complete_work, +- msecs_to_jiffies(ATH_TX_COMPLETE_POLL_INT)); ++ ieee80211_queue_delayed_work(sc->hw, &sc->hw_check_work, ++ msecs_to_jiffies(ATH_HW_CHECK_POLL_INT)); + } + + /* +--- a/drivers/net/wireless/ath/ath9k/main.c ++++ b/drivers/net/wireless/ath/ath9k/main.c +@@ -181,7 +181,7 @@ void ath9k_ps_restore(struct ath_softc * + static void __ath_cancel_work(struct ath_softc *sc) + { + cancel_work_sync(&sc->paprd_work); +- cancel_delayed_work_sync(&sc->tx_complete_work); ++ cancel_delayed_work_sync(&sc->hw_check_work); + cancel_delayed_work_sync(&sc->hw_pll_work); + + #ifdef CPTCFG_ATH9K_BTCOEX_SUPPORT +@@ -198,7 +198,8 @@ void ath_cancel_work(struct ath_softc *s + + void ath_restart_work(struct ath_softc *sc) + { +- ieee80211_queue_delayed_work(sc->hw, &sc->tx_complete_work, 0); ++ ieee80211_queue_delayed_work(sc->hw, &sc->hw_check_work, ++ ATH_HW_CHECK_POLL_INT); + + if (AR_SREV_9340(sc->sc_ah) || AR_SREV_9330(sc->sc_ah)) + ieee80211_queue_delayed_work(sc->hw, &sc->hw_pll_work, +@@ -2091,7 +2092,7 @@ void __ath9k_flush(struct ieee80211_hw * + int timeout; + bool drain_txq; + +- cancel_delayed_work_sync(&sc->tx_complete_work); ++ cancel_delayed_work_sync(&sc->hw_check_work); + + if (ah->ah_flags & AH_UNPLUGGED) { + ath_dbg(common, ANY, "Device has been unplugged!\n"); +@@ -2129,7 +2130,8 @@ void __ath9k_flush(struct ieee80211_hw * + ath9k_ps_restore(sc); + } + +- ieee80211_queue_delayed_work(hw, &sc->tx_complete_work, 0); ++ ieee80211_queue_delayed_work(hw, &sc->hw_check_work, ++ ATH_HW_CHECK_POLL_INT); + } + + static bool ath9k_tx_frames_pending(struct ieee80211_hw *hw) +--- a/drivers/net/wireless/ath/ath9k/xmit.c ++++ b/drivers/net/wireless/ath/ath9k/xmit.c +@@ -2916,8 +2916,6 @@ int ath_tx_init(struct ath_softc *sc, in + return error; + } + +- INIT_DELAYED_WORK(&sc->tx_complete_work, ath_tx_complete_poll_work); +- + if (sc->sc_ah->caps.hw_caps & ATH9K_HW_CAP_EDMA) + error = ath_tx_edma_init(sc); + diff --git a/package/kernel/mac80211/patches/314-ath9k_hw-reset-AHB-WMAC-interface-on-AR91xx.patch b/package/kernel/mac80211/patches/314-ath9k_hw-reset-AHB-WMAC-interface-on-AR91xx.patch deleted file mode 100644 index a7bcfa549b..0000000000 --- a/package/kernel/mac80211/patches/314-ath9k_hw-reset-AHB-WMAC-interface-on-AR91xx.patch +++ /dev/null @@ -1,25 +0,0 @@ -From: Felix Fietkau -Date: Sat, 9 Jul 2016 15:25:24 +0200 -Subject: [PATCH] ath9k_hw: reset AHB-WMAC interface on AR91xx - -Should fix a few stability issues - -Signed-off-by: Felix Fietkau ---- - ---- a/drivers/net/wireless/ath/ath9k/hw.c -+++ b/drivers/net/wireless/ath/ath9k/hw.c -@@ -1394,8 +1394,12 @@ static bool ath9k_hw_set_reset(struct at - if (!AR_SREV_9100(ah)) - REG_WRITE(ah, AR_RC, 0); - -- if (AR_SREV_9100(ah)) -+ if (AR_SREV_9100(ah)) { -+ /* Reset the AHB-WMAC interface */ -+ if (ah->external_reset) -+ ah->external_reset(); - udelay(50); -+ } - - return true; - } diff --git a/package/kernel/mac80211/patches/315-ath9k_hw-check-if-the-chip-failed-to-wake-up.patch b/package/kernel/mac80211/patches/315-ath9k_hw-check-if-the-chip-failed-to-wake-up.patch new file mode 100644 index 0000000000..b0cb74ad05 --- /dev/null +++ b/package/kernel/mac80211/patches/315-ath9k_hw-check-if-the-chip-failed-to-wake-up.patch @@ -0,0 +1,30 @@ +From: Felix Fietkau +Date: Wed, 25 Jan 2017 12:58:17 +0100 +Subject: [PATCH] ath9k_hw: check if the chip failed to wake up + +In an RFC patch, Sven Eckelmann and Simon Wunderlich reported: + +"QCA 802.11n chips (especially AR9330/AR9340) sometimes end up in a +state in which a read of AR_CFG always returns 0xdeadbeef. +This should not happen when when the power_mode of the device is +ATH9K_PM_AWAKE." + +Include the check for the default register state in the existing MAC +hang check. + +Signed-off-by: Felix Fietkau +--- + +--- a/drivers/net/wireless/ath/ath9k/hw.c ++++ b/drivers/net/wireless/ath/ath9k/hw.c +@@ -1624,6 +1624,10 @@ bool ath9k_hw_check_alive(struct ath_hw + int count = 50; + u32 reg, last_val; + ++ /* Check if chip failed to wake up */ ++ if (REG_READ(ah, AR_CFG) == 0xdeadbeef) ++ return false; ++ + if (AR_SREV_9300(ah)) + return !ath9k_hw_detect_mac_hang(ah); + diff --git a/package/kernel/mac80211/patches/315-ath9k_hw-issue-external-reset-for-QCA955x.patch b/package/kernel/mac80211/patches/315-ath9k_hw-issue-external-reset-for-QCA955x.patch deleted file mode 100644 index 34d7d3b1cf..0000000000 --- a/package/kernel/mac80211/patches/315-ath9k_hw-issue-external-reset-for-QCA955x.patch +++ /dev/null @@ -1,126 +0,0 @@ -From: Felix Fietkau -Date: Sat, 9 Jul 2016 15:26:44 +0200 -Subject: [PATCH] ath9k_hw: issue external reset for QCA955x - -The RTC interface on the SoC needs to be reset along with the rest of -the WMAC. - -Signed-off-by: Felix Fietkau ---- - ---- a/drivers/net/wireless/ath/ath9k/hw.c -+++ b/drivers/net/wireless/ath/ath9k/hw.c -@@ -1271,39 +1271,56 @@ void ath9k_hw_get_delta_slope_vals(struc - *coef_exponent = coef_exp - 16; - } - --/* AR9330 WAR: -- * call external reset function to reset WMAC if: -- * - doing a cold reset -- * - we have pending frames in the TX queues. -- */ --static bool ath9k_hw_ar9330_reset_war(struct ath_hw *ah, int type) -+static bool ath9k_hw_need_external_reset(struct ath_hw *ah, int type) - { -- int i, npend = 0; -+ int i; - -- for (i = 0; i < AR_NUM_QCU; i++) { -- npend = ath9k_hw_numtxpending(ah, i); -- if (npend) -- break; -+ if (type == ATH9K_RESET_COLD) -+ return true; -+ -+ if (AR_SREV_9550(ah)) -+ return true; -+ -+ /* AR9330 WAR: -+ * call external reset function to reset WMAC if: -+ * - doing a cold reset -+ * - we have pending frames in the TX queues. -+ */ -+ if (AR_SREV_9330(ah)) { -+ for (i = 0; i < AR_NUM_QCU; i++) { -+ if (ath9k_hw_numtxpending(ah, i)) -+ return true; -+ } - } - -- if (ah->external_reset && -- (npend || type == ATH9K_RESET_COLD)) { -- int reset_err = 0; -+ return false; -+} - -- ath_dbg(ath9k_hw_common(ah), RESET, -- "reset MAC via external reset\n"); -+static bool ath9k_hw_external_reset(struct ath_hw *ah, int type) -+{ -+ int err; - -- reset_err = ah->external_reset(); -- if (reset_err) { -- ath_err(ath9k_hw_common(ah), -- "External reset failed, err=%d\n", -- reset_err); -- return false; -- } -+ if (!ah->external_reset || !ath9k_hw_need_external_reset(ah, type)) -+ return true; - -- REG_WRITE(ah, AR_RTC_RESET, 1); -+ ath_dbg(ath9k_hw_common(ah), RESET, -+ "reset MAC via external reset\n"); -+ -+ err = ah->external_reset(); -+ if (err) { -+ ath_err(ath9k_hw_common(ah), -+ "External reset failed, err=%d\n", err); -+ return false; -+ } -+ -+ if (AR_SREV_9550(ah)) { -+ REG_WRITE(ah, AR_RTC_RESET, 0); -+ udelay(10); - } - -+ REG_WRITE(ah, AR_RTC_RESET, 1); -+ udelay(10); -+ - return true; - } - -@@ -1356,24 +1373,24 @@ static bool ath9k_hw_set_reset(struct at - rst_flags |= AR_RTC_RC_MAC_COLD; - } - -- if (AR_SREV_9330(ah)) { -- if (!ath9k_hw_ar9330_reset_war(ah, type)) -- return false; -- } -- - if (ath9k_hw_mci_is_enabled(ah)) - ar9003_mci_check_gpm_offset(ah); - - /* DMA HALT added to resolve ar9300 and ar9580 bus error during -- * RTC_RC reg read -+ * RTC_RC reg read. Also needed for AR9550 external reset - */ -- if (AR_SREV_9300(ah) || AR_SREV_9580(ah)) { -+ if (AR_SREV_9300(ah) || AR_SREV_9580(ah) || AR_SREV_9550(ah)) { - REG_SET_BIT(ah, AR_CFG, AR_CFG_HALT_REQ); - ath9k_hw_wait(ah, AR_CFG, AR_CFG_HALT_ACK, AR_CFG_HALT_ACK, - 20 * AH_WAIT_TIMEOUT); -- REG_CLR_BIT(ah, AR_CFG, AR_CFG_HALT_REQ); - } - -+ if (!AR_SREV_9100(ah)) -+ ath9k_hw_external_reset(ah, type); -+ -+ if (AR_SREV_9300(ah) || AR_SREV_9580(ah)) -+ REG_CLR_BIT(ah, AR_CFG, AR_CFG_HALT_REQ); -+ - REG_WRITE(ah, AR_RTC_RC, rst_flags); - - REGWRITE_BUFFER_FLUSH(ah); diff --git a/package/kernel/mac80211/patches/316-ath9k-fix-race-condition-in-enabling-disabling-IRQs.patch b/package/kernel/mac80211/patches/316-ath9k-fix-race-condition-in-enabling-disabling-IRQs.patch new file mode 100644 index 0000000000..7a41206132 --- /dev/null +++ b/package/kernel/mac80211/patches/316-ath9k-fix-race-condition-in-enabling-disabling-IRQs.patch @@ -0,0 +1,197 @@ +From: Felix Fietkau +Date: Wed, 25 Jan 2017 15:10:37 +0100 +Subject: [PATCH] ath9k: fix race condition in enabling/disabling IRQs + +The code currently relies on refcounting to disable IRQs from within the +IRQ handler and re-enabling them again after the tasklet has run. + +However, due to race conditions sometimes the IRQ handler might be +called twice, or the tasklet may not run at all (if interrupted in the +middle of a reset). + +This can cause nasty imbalances in the irq-disable refcount which will +get the driver permanently stuck until the entire radio has been stopped +and started again (ath_reset will not recover from this). + +Instead of using this fragile logic, change the code to ensure that +running the irq handler during tasklet processing is safe, and leave the +refcount untouched. + +Cc: stable@vger.kernel.org +Signed-off-by: Felix Fietkau +--- + +--- a/drivers/net/wireless/ath/ath9k/ath9k.h ++++ b/drivers/net/wireless/ath/ath9k/ath9k.h +@@ -998,6 +998,7 @@ struct ath_softc { + struct survey_info *cur_survey; + struct survey_info survey[ATH9K_NUM_CHANNELS]; + ++ spinlock_t intr_lock; + struct tasklet_struct intr_tq; + struct tasklet_struct bcon_tasklet; + struct ath_hw *sc_ah; +--- a/drivers/net/wireless/ath/ath9k/init.c ++++ b/drivers/net/wireless/ath/ath9k/init.c +@@ -669,6 +669,7 @@ static int ath9k_init_softc(u16 devid, s + common->bt_ant_diversity = 1; + + spin_lock_init(&common->cc_lock); ++ spin_lock_init(&sc->intr_lock); + spin_lock_init(&sc->sc_serial_rw); + spin_lock_init(&sc->sc_pm_lock); + spin_lock_init(&sc->chan_lock); +--- a/drivers/net/wireless/ath/ath9k/mac.c ++++ b/drivers/net/wireless/ath/ath9k/mac.c +@@ -810,21 +810,12 @@ void ath9k_hw_disable_interrupts(struct + } + EXPORT_SYMBOL(ath9k_hw_disable_interrupts); + +-void ath9k_hw_enable_interrupts(struct ath_hw *ah) ++static void __ath9k_hw_enable_interrupts(struct ath_hw *ah) + { + struct ath_common *common = ath9k_hw_common(ah); + u32 sync_default = AR_INTR_SYNC_DEFAULT; + u32 async_mask; + +- if (!(ah->imask & ATH9K_INT_GLOBAL)) +- return; +- +- if (!atomic_inc_and_test(&ah->intr_ref_cnt)) { +- ath_dbg(common, INTERRUPT, "Do not enable IER ref count %d\n", +- atomic_read(&ah->intr_ref_cnt)); +- return; +- } +- + if (AR_SREV_9340(ah) || AR_SREV_9550(ah) || AR_SREV_9531(ah) || + AR_SREV_9561(ah)) + sync_default &= ~AR_INTR_SYNC_HOST1_FATAL; +@@ -846,6 +837,39 @@ void ath9k_hw_enable_interrupts(struct a + ath_dbg(common, INTERRUPT, "AR_IMR 0x%x IER 0x%x\n", + REG_READ(ah, AR_IMR), REG_READ(ah, AR_IER)); + } ++ ++void ath9k_hw_resume_interrupts(struct ath_hw *ah) ++{ ++ struct ath_common *common = ath9k_hw_common(ah); ++ ++ if (!(ah->imask & ATH9K_INT_GLOBAL)) ++ return; ++ ++ if (atomic_read(&ah->intr_ref_cnt) != 0) { ++ ath_dbg(common, INTERRUPT, "Do not enable IER ref count %d\n", ++ atomic_read(&ah->intr_ref_cnt)); ++ return; ++ } ++ ++ __ath9k_hw_enable_interrupts(ah); ++} ++EXPORT_SYMBOL(ath9k_hw_resume_interrupts); ++ ++void ath9k_hw_enable_interrupts(struct ath_hw *ah) ++{ ++ struct ath_common *common = ath9k_hw_common(ah); ++ ++ if (!(ah->imask & ATH9K_INT_GLOBAL)) ++ return; ++ ++ if (!atomic_inc_and_test(&ah->intr_ref_cnt)) { ++ ath_dbg(common, INTERRUPT, "Do not enable IER ref count %d\n", ++ atomic_read(&ah->intr_ref_cnt)); ++ return; ++ } ++ ++ __ath9k_hw_enable_interrupts(ah); ++} + EXPORT_SYMBOL(ath9k_hw_enable_interrupts); + + void ath9k_hw_set_interrupts(struct ath_hw *ah) +--- a/drivers/net/wireless/ath/ath9k/mac.h ++++ b/drivers/net/wireless/ath/ath9k/mac.h +@@ -744,6 +744,7 @@ void ath9k_hw_set_interrupts(struct ath_ + void ath9k_hw_enable_interrupts(struct ath_hw *ah); + void ath9k_hw_disable_interrupts(struct ath_hw *ah); + void ath9k_hw_kill_interrupts(struct ath_hw *ah); ++void ath9k_hw_resume_interrupts(struct ath_hw *ah); + + void ar9002_hw_attach_mac_ops(struct ath_hw *ah); + +--- a/drivers/net/wireless/ath/ath9k/main.c ++++ b/drivers/net/wireless/ath/ath9k/main.c +@@ -374,21 +374,20 @@ void ath9k_tasklet(unsigned long data) + struct ath_common *common = ath9k_hw_common(ah); + enum ath_reset_type type; + unsigned long flags; +- u32 status = sc->intrstatus; ++ u32 status; + u32 rxmask; + ++ spin_lock_irqsave(&sc->intr_lock, flags); ++ status = sc->intrstatus; ++ sc->intrstatus = 0; ++ spin_unlock_irqrestore(&sc->intr_lock, flags); ++ + ath9k_ps_wakeup(sc); + spin_lock(&sc->sc_pcu_lock); + + if (status & ATH9K_INT_FATAL) { + type = RESET_TYPE_FATAL_INT; + ath9k_queue_reset(sc, type); +- +- /* +- * Increment the ref. counter here so that +- * interrupts are enabled in the reset routine. +- */ +- atomic_inc(&ah->intr_ref_cnt); + ath_dbg(common, RESET, "FATAL: Skipping interrupts\n"); + goto out; + } +@@ -404,11 +403,6 @@ void ath9k_tasklet(unsigned long data) + type = RESET_TYPE_BB_WATCHDOG; + ath9k_queue_reset(sc, type); + +- /* +- * Increment the ref. counter here so that +- * interrupts are enabled in the reset routine. +- */ +- atomic_inc(&ah->intr_ref_cnt); + ath_dbg(common, RESET, + "BB_WATCHDOG: Skipping interrupts\n"); + goto out; +@@ -421,7 +415,6 @@ void ath9k_tasklet(unsigned long data) + if ((sc->gtt_cnt >= MAX_GTT_CNT) && !ath9k_hw_check_alive(ah)) { + type = RESET_TYPE_TX_GTT; + ath9k_queue_reset(sc, type); +- atomic_inc(&ah->intr_ref_cnt); + ath_dbg(common, RESET, + "GTT: Skipping interrupts\n"); + goto out; +@@ -478,7 +471,7 @@ void ath9k_tasklet(unsigned long data) + ath9k_btcoex_handle_interrupt(sc, status); + + /* re-enable hardware interrupt */ +- ath9k_hw_enable_interrupts(ah); ++ ath9k_hw_resume_interrupts(ah); + out: + spin_unlock(&sc->sc_pcu_lock); + ath9k_ps_restore(sc); +@@ -542,7 +535,9 @@ irqreturn_t ath_isr(int irq, void *dev) + return IRQ_NONE; + + /* Cache the status */ +- sc->intrstatus = status; ++ spin_lock(&sc->intr_lock); ++ sc->intrstatus |= status; ++ spin_unlock(&sc->intr_lock); + + if (status & SCHED_INTR) + sched = true; +@@ -588,7 +583,7 @@ chip_reset: + + if (sched) { + /* turn off every interrupt */ +- ath9k_hw_disable_interrupts(ah); ++ ath9k_hw_kill_interrupts(ah); + tasklet_schedule(&sc->intr_tq); + } + diff --git a/package/kernel/mac80211/patches/316-ath9k_hw-set-spectral-scan-enable-bit-on-trigger-for.patch b/package/kernel/mac80211/patches/316-ath9k_hw-set-spectral-scan-enable-bit-on-trigger-for.patch deleted file mode 100644 index dfe9aae268..0000000000 --- a/package/kernel/mac80211/patches/316-ath9k_hw-set-spectral-scan-enable-bit-on-trigger-for.patch +++ /dev/null @@ -1,21 +0,0 @@ -From: Felix Fietkau -Date: Mon, 11 Jul 2016 12:07:40 +0200 -Subject: [PATCH] ath9k_hw: set spectral scan enable bit on trigger for - AR9003+ - -AR9002 code and QCA AR9003+ code do the same. - -Signed-off-by: Felix Fietkau ---- - ---- a/drivers/net/wireless/ath/ath9k/ar9003_phy.c -+++ b/drivers/net/wireless/ath/ath9k/ar9003_phy.c -@@ -1800,6 +1800,8 @@ static void ar9003_hw_spectral_scan_conf - - static void ar9003_hw_spectral_scan_trigger(struct ath_hw *ah) - { -+ REG_SET_BIT(ah, AR_PHY_SPECTRAL_SCAN, -+ AR_PHY_SPECTRAL_SCAN_ENABLE); - /* Activate spectral scan */ - REG_SET_BIT(ah, AR_PHY_SPECTRAL_SCAN, - AR_PHY_SPECTRAL_SCAN_ACTIVE); diff --git a/package/kernel/mac80211/patches/317-Revert-ath9k_hw-implement-temperature-compensation-s.patch b/package/kernel/mac80211/patches/317-Revert-ath9k_hw-implement-temperature-compensation-s.patch deleted file mode 100644 index 687df35a9e..0000000000 --- a/package/kernel/mac80211/patches/317-Revert-ath9k_hw-implement-temperature-compensation-s.patch +++ /dev/null @@ -1,101 +0,0 @@ -From: Felix Fietkau -Date: Tue, 11 Oct 2016 19:45:41 +0200 -Subject: [PATCH] Revert "ath9k_hw: implement temperature compensation support - for AR9003+" - -This reverts commit 171f6402e4aa5cd3b8407f82501f7ea21fa54ccc. -Some users report that this commit causes a regression in performance -under some conditions. - -Signed-off-by: Felix Fietkau ---- - ---- a/drivers/net/wireless/ath/ath9k/ar9003_calib.c -+++ b/drivers/net/wireless/ath/ath9k/ar9003_calib.c -@@ -33,7 +33,6 @@ struct coeff { - - enum ar9003_cal_types { - IQ_MISMATCH_CAL = BIT(0), -- TEMP_COMP_CAL = BIT(1), - }; - - static void ar9003_hw_setup_calibration(struct ath_hw *ah, -@@ -59,12 +58,6 @@ static void ar9003_hw_setup_calibration( - /* Kick-off cal */ - REG_SET_BIT(ah, AR_PHY_TIMING4, AR_PHY_TIMING4_DO_CAL); - break; -- case TEMP_COMP_CAL: -- ath_dbg(common, CALIBRATE, -- "starting Temperature Compensation Calibration\n"); -- REG_SET_BIT(ah, AR_CH0_THERM, AR_CH0_THERM_LOCAL); -- REG_SET_BIT(ah, AR_CH0_THERM, AR_CH0_THERM_START); -- break; - default: - ath_err(common, "Invalid calibration type\n"); - break; -@@ -93,8 +86,7 @@ static bool ar9003_hw_per_calibration(st - /* - * Accumulate cal measures for active chains - */ -- if (cur_caldata->calCollect) -- cur_caldata->calCollect(ah); -+ cur_caldata->calCollect(ah); - ah->cal_samples++; - - if (ah->cal_samples >= cur_caldata->calNumSamples) { -@@ -107,8 +99,7 @@ static bool ar9003_hw_per_calibration(st - /* - * Process accumulated data - */ -- if (cur_caldata->calPostProc) -- cur_caldata->calPostProc(ah, numChains); -+ cur_caldata->calPostProc(ah, numChains); - - /* Calibration has finished. */ - caldata->CalValid |= cur_caldata->calType; -@@ -323,16 +314,9 @@ static const struct ath9k_percal_data iq - ar9003_hw_iqcalibrate - }; - --static const struct ath9k_percal_data temp_cal_single_sample = { -- TEMP_COMP_CAL, -- MIN_CAL_SAMPLES, -- PER_MAX_LOG_COUNT, --}; -- - static void ar9003_hw_init_cal_settings(struct ath_hw *ah) - { - ah->iq_caldata.calData = &iq_cal_single_sample; -- ah->temp_caldata.calData = &temp_cal_single_sample; - - if (AR_SREV_9300_20_OR_LATER(ah)) { - ah->enabled_cals |= TX_IQ_CAL; -@@ -340,7 +324,7 @@ static void ar9003_hw_init_cal_settings( - ah->enabled_cals |= TX_IQ_ON_AGC_CAL; - } - -- ah->supp_cals = IQ_MISMATCH_CAL | TEMP_COMP_CAL; -+ ah->supp_cals = IQ_MISMATCH_CAL; - } - - #define OFF_UPPER_LT 24 -@@ -1399,9 +1383,6 @@ static void ar9003_hw_init_cal_common(st - INIT_CAL(&ah->iq_caldata); - INSERT_CAL(ah, &ah->iq_caldata); - -- INIT_CAL(&ah->temp_caldata); -- INSERT_CAL(ah, &ah->temp_caldata); -- - /* Initialize current pointer to first element in list */ - ah->cal_list_curr = ah->cal_list; - ---- a/drivers/net/wireless/ath/ath9k/hw.h -+++ b/drivers/net/wireless/ath/ath9k/hw.h -@@ -830,7 +830,6 @@ struct ath_hw { - /* Calibration */ - u32 supp_cals; - struct ath9k_cal_list iq_caldata; -- struct ath9k_cal_list temp_caldata; - struct ath9k_cal_list adcgain_caldata; - struct ath9k_cal_list adcdc_caldata; - struct ath9k_cal_list *cal_list; diff --git a/package/kernel/mac80211/patches/317-rt2x00-avoid-introducing-a-USB-dependency-in-the-rt2.patch b/package/kernel/mac80211/patches/317-rt2x00-avoid-introducing-a-USB-dependency-in-the-rt2.patch new file mode 100644 index 0000000000..c0274ddde9 --- /dev/null +++ b/package/kernel/mac80211/patches/317-rt2x00-avoid-introducing-a-USB-dependency-in-the-rt2.patch @@ -0,0 +1,73 @@ +From: Stanislaw Gruszka +Date: Thu, 2 Feb 2017 10:57:40 +0100 +Subject: [PATCH] rt2x00: avoid introducing a USB dependency in the + rt2x00lib module + +As reported by Felix: + +Though protected by an ifdef, introducing an usb symbol dependency in +the rt2x00lib module is a major inconvenience for distributions that +package kernel modules split into individual packages. + +Get rid of this unnecessary dependency by calling the usb related +function from a more suitable place. + +Cc: Vishal Thanki +Reported-by: Felix Fietkau +Fixes: 8b4c0009313f ("rt2x00usb: Use usb anchor to manage URB") +Signed-off-by: Stanislaw Gruszka +--- + +--- a/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c ++++ b/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c +@@ -1436,21 +1436,6 @@ void rt2x00lib_remove_dev(struct rt2x00_ + cancel_work_sync(&rt2x00dev->intf_work); + cancel_delayed_work_sync(&rt2x00dev->autowakeup_work); + cancel_work_sync(&rt2x00dev->sleep_work); +-#if IS_ENABLED(CPTCFG_RT2X00_LIB_USB) +- if (rt2x00_is_usb(rt2x00dev)) { +- usb_kill_anchored_urbs(rt2x00dev->anchor); +- hrtimer_cancel(&rt2x00dev->txstatus_timer); +- cancel_work_sync(&rt2x00dev->rxdone_work); +- cancel_work_sync(&rt2x00dev->txdone_work); +- } +-#endif +- if (rt2x00dev->workqueue) +- destroy_workqueue(rt2x00dev->workqueue); +- +- /* +- * Free the tx status fifo. +- */ +- kfifo_free(&rt2x00dev->txstatus_fifo); + + /* + * Kill the tx status tasklet. +@@ -1466,6 +1451,14 @@ void rt2x00lib_remove_dev(struct rt2x00_ + */ + rt2x00lib_uninitialize(rt2x00dev); + ++ if (rt2x00dev->workqueue) ++ destroy_workqueue(rt2x00dev->workqueue); ++ ++ /* ++ * Free the tx status fifo. ++ */ ++ kfifo_free(&rt2x00dev->txstatus_fifo); ++ + /* + * Free extra components + */ +--- a/drivers/net/wireless/ralink/rt2x00/rt2x00usb.c ++++ b/drivers/net/wireless/ralink/rt2x00/rt2x00usb.c +@@ -744,6 +744,11 @@ void rt2x00usb_uninitialize(struct rt2x0 + { + struct data_queue *queue; + ++ usb_kill_anchored_urbs(rt2x00dev->anchor); ++ hrtimer_cancel(&rt2x00dev->txstatus_timer); ++ cancel_work_sync(&rt2x00dev->rxdone_work); ++ cancel_work_sync(&rt2x00dev->txdone_work); ++ + queue_for_each(rt2x00dev, queue) + rt2x00usb_free_entries(queue); + } diff --git a/package/kernel/mac80211/patches/318-0001-brcmfmac-check-brcmf_bus_get_memdump-result-for-erro.patch b/package/kernel/mac80211/patches/318-0001-brcmfmac-check-brcmf_bus_get_memdump-result-for-erro.patch new file mode 100644 index 0000000000..4ae4c606c5 --- /dev/null +++ b/package/kernel/mac80211/patches/318-0001-brcmfmac-check-brcmf_bus_get_memdump-result-for-erro.patch @@ -0,0 +1,52 @@ +From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= +Date: Mon, 30 Jan 2017 16:09:51 +0100 +Subject: [PATCH] brcmfmac: check brcmf_bus_get_memdump result for error +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +This method may be unsupported (see: USB bus) or may just fail (see: +SDIO bus). +While at it rework logic in brcmf_sdio_bus_get_memdump function to avoid +too many conditional code nesting levels. + +Signed-off-by: Rafał Miłecki +Acked-by: Arend van Spriel +Signed-off-by: Kalle Valo +--- + +--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/debug.c ++++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/debug.c +@@ -32,16 +32,25 @@ static int brcmf_debug_create_memdump(st + { + void *dump; + size_t ramsize; ++ int err; + + ramsize = brcmf_bus_get_ramsize(bus); +- if (ramsize) { +- dump = vzalloc(len + ramsize); +- if (!dump) +- return -ENOMEM; +- memcpy(dump, data, len); +- brcmf_bus_get_memdump(bus, dump + len, ramsize); +- dev_coredumpv(bus->dev, dump, len + ramsize, GFP_KERNEL); ++ if (!ramsize) ++ return -ENOTSUPP; ++ ++ dump = vzalloc(len + ramsize); ++ if (!dump) ++ return -ENOMEM; ++ ++ memcpy(dump, data, len); ++ err = brcmf_bus_get_memdump(bus, dump + len, ramsize); ++ if (err) { ++ vfree(dump); ++ return err; + } ++ ++ dev_coredumpv(bus->dev, dump, len + ramsize, GFP_KERNEL); ++ + return 0; + } + diff --git a/package/kernel/mac80211/patches/318-mac80211-fix-up-mismerge-of-ieee80211_tx_dequeue.patch b/package/kernel/mac80211/patches/318-mac80211-fix-up-mismerge-of-ieee80211_tx_dequeue.patch deleted file mode 100644 index 2e742e4484..0000000000 --- a/package/kernel/mac80211/patches/318-mac80211-fix-up-mismerge-of-ieee80211_tx_dequeue.patch +++ /dev/null @@ -1,35 +0,0 @@ -From: Bob Copeland -Date: Wed, 12 Oct 2016 08:24:54 -0400 -Subject: [PATCH] mac80211: fix up mismerge of ieee80211_tx_dequeue - -Looks like this spinlock wound up on the wrong side of the -linearize, and I also lost the part that re-enters the loop. -Fix up to match mac80211-next. - -Signed-off-by: Bob Copeland ---- - ---- a/net/mac80211/tx.c -+++ b/net/mac80211/tx.c -@@ -3457,17 +3457,17 @@ begin: - skb_queue_splice_tail(&tx.skbs, &txqi->frags); - } - --out: -- spin_unlock_bh(&fq->lock); -- - if (skb && skb_has_frag_list(skb) && - !ieee80211_hw_check(&local->hw, TX_FRAG_LIST)) { - if (skb_linearize(skb)) { - ieee80211_free_txskb(&local->hw, skb); -- return NULL; -+ goto begin; - } - } - -+out: -+ spin_unlock_bh(&fq->lock); -+ - return skb; - } - EXPORT_SYMBOL(ieee80211_tx_dequeue); diff --git a/package/kernel/mac80211/patches/319-0002-brcmfmac-be-more-verbose-when-PSM-s-watchdog-fires.patch b/package/kernel/mac80211/patches/319-0002-brcmfmac-be-more-verbose-when-PSM-s-watchdog-fires.patch new file mode 100644 index 0000000000..2a3b83864e --- /dev/null +++ b/package/kernel/mac80211/patches/319-0002-brcmfmac-be-more-verbose-when-PSM-s-watchdog-fires.patch @@ -0,0 +1,38 @@ +From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= +Date: Mon, 30 Jan 2017 16:09:52 +0100 +Subject: [PATCH] brcmfmac: be more verbose when PSM's watchdog fires +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +It's important to inform user so he knows things went wrong. He may also +want to get memory dump for further debugging purposes. + +Signed-off-by: Rafał Miłecki +Acked-by: Arend van Spriel +Signed-off-by: Kalle Valo +--- + +--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/debug.c ++++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/debug.c +@@ -58,10 +58,18 @@ static int brcmf_debug_psm_watchdog_noti + const struct brcmf_event_msg *evtmsg, + void *data) + { ++ int err; ++ + brcmf_dbg(TRACE, "enter: bsscfgidx=%d\n", ifp->bsscfgidx); + +- return brcmf_debug_create_memdump(ifp->drvr->bus_if, data, +- evtmsg->datalen); ++ brcmf_err("PSM's watchdog has fired!\n"); ++ ++ err = brcmf_debug_create_memdump(ifp->drvr->bus_if, data, ++ evtmsg->datalen); ++ if (err) ++ brcmf_err("Failed to get memory dump, %d\n", err); ++ ++ return err; + } + + void brcmf_debugfs_init(void) diff --git a/package/kernel/mac80211/patches/319-0003-brcmfmac-use-wiphy_read_of_freq_limits-to-respect-li.patch b/package/kernel/mac80211/patches/319-0003-brcmfmac-use-wiphy_read_of_freq_limits-to-respect-li.patch new file mode 100644 index 0000000000..6448bad5e9 --- /dev/null +++ b/package/kernel/mac80211/patches/319-0003-brcmfmac-use-wiphy_read_of_freq_limits-to-respect-li.patch @@ -0,0 +1,44 @@ +From 0f83ff69735651cc7a3d150466a5257ff829b62b Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= +Date: Tue, 17 Jan 2017 23:35:50 +0100 +Subject: [PATCH] brcmfmac: use wiphy_read_of_freq_limits to respect limits + from DT +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +This new helper reads extra frequency limits specified in DT and +disables unavailable chanels. This is useful for devices (like home +routers) with chipsets limited e.g. by board design. + +In order to respect info read from DT we simply need to check for +IEEE80211_CHAN_DISABLED bit when constructing channel info. + +Signed-off-by: Rafał Miłecki +Signed-off-by: Kalle Valo +--- + drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c | 6 ++++++ + 1 file changed, 6 insertions(+) + +--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c ++++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c +@@ -5908,6 +5908,9 @@ static int brcmf_construct_chaninfo(stru + continue; + } + ++ if (channel->orig_flags & IEEE80211_CHAN_DISABLED) ++ continue; ++ + /* assuming the chanspecs order is HT20, + * HT40 upper, HT40 lower, and VHT80. + */ +@@ -6509,6 +6512,9 @@ static int brcmf_setup_wiphy(struct wiph + wiphy->bands[NL80211_BAND_5GHZ] = band; + } + } ++ ++ wiphy_read_of_freq_limits(wiphy); ++ + return 0; + } + diff --git a/package/kernel/mac80211/patches/319-0004-brcmfmac-merge-two-brcmf_err-macros-into-one.patch b/package/kernel/mac80211/patches/319-0004-brcmfmac-merge-two-brcmf_err-macros-into-one.patch new file mode 100644 index 0000000000..defd5792ea --- /dev/null +++ b/package/kernel/mac80211/patches/319-0004-brcmfmac-merge-two-brcmf_err-macros-into-one.patch @@ -0,0 +1,43 @@ +From 9587a01a7ead9efc5032c16e0d9668de58be1186 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= +Date: Thu, 2 Feb 2017 22:33:13 +0100 +Subject: [PATCH] brcmfmac: merge two brcmf_err macros into one +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +This allows simplifying the code by adding a simple IS_ENABLED check for +CONFIG_BRCMDB symbol. + +Signed-off-by: Rafał Miłecki +Acked-by: Arend van Spriel +Signed-off-by: Kalle Valo +--- + drivers/net/wireless/broadcom/brcm80211/brcmfmac/debug.h | 8 ++------ + 1 file changed, 2 insertions(+), 6 deletions(-) + +--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/debug.h ++++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/debug.h +@@ -45,20 +45,16 @@ + #undef pr_fmt + #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt + ++#ifndef CPTCFG_BRCM_TRACING + /* Macro for error messages. net_ratelimit() is used when driver + * debugging is not selected. When debugging the driver error + * messages are as important as other tracing or even more so. + */ +-#ifndef CPTCFG_BRCM_TRACING +-#ifdef CPTCFG_BRCMDBG +-#define brcmf_err(fmt, ...) pr_err("%s: " fmt, __func__, ##__VA_ARGS__) +-#else + #define brcmf_err(fmt, ...) \ + do { \ +- if (net_ratelimit()) \ ++ if (IS_ENABLED(CPTCFG_BRCMDBG) || net_ratelimit()) \ + pr_err("%s: " fmt, __func__, ##__VA_ARGS__); \ + } while (0) +-#endif + #else + __printf(2, 3) + void __brcmf_err(const char *func, const char *fmt, ...); diff --git a/package/kernel/mac80211/patches/319-0005-brcmfmac-switch-to-C-function-__brcmf_err-for-printi.patch b/package/kernel/mac80211/patches/319-0005-brcmfmac-switch-to-C-function-__brcmf_err-for-printi.patch new file mode 100644 index 0000000000..5baf6960ec --- /dev/null +++ b/package/kernel/mac80211/patches/319-0005-brcmfmac-switch-to-C-function-__brcmf_err-for-printi.patch @@ -0,0 +1,69 @@ +From 087fa712a00685dac4bcc64b7c3dc8ae6bee8026 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= +Date: Thu, 2 Feb 2017 22:33:14 +0100 +Subject: [PATCH] brcmfmac: switch to C function (__brcmf_err) for printing + errors +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +This will allow extending code and using more detailed messages e.g. +with the help of dev_err. + +Signed-off-by: Rafał Miłecki +Acked-by: Arend van Spriel +Signed-off-by: Kalle Valo +--- + .../net/wireless/broadcom/brcm80211/brcmfmac/common.c | 16 ++++++++++++++++ + drivers/net/wireless/broadcom/brcm80211/brcmfmac/debug.h | 6 +++--- + 2 files changed, 19 insertions(+), 3 deletions(-) + +--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.c ++++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.c +@@ -218,6 +218,22 @@ done: + return err; + } + ++#ifndef CPTCFG_BRCM_TRACING ++void __brcmf_err(const char *func, const char *fmt, ...) ++{ ++ struct va_format vaf; ++ va_list args; ++ ++ va_start(args, fmt); ++ ++ vaf.fmt = fmt; ++ vaf.va = &args; ++ pr_err("%s: %pV", func, &vaf); ++ ++ va_end(args); ++} ++#endif ++ + #if defined(CPTCFG_BRCM_TRACING) || defined(CPTCFG_BRCMDBG) + void __brcmf_dbg(u32 level, const char *func, const char *fmt, ...) + { +--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/debug.h ++++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/debug.h +@@ -45,6 +45,8 @@ + #undef pr_fmt + #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt + ++__printf(2, 3) ++void __brcmf_err(const char *func, const char *fmt, ...); + #ifndef CPTCFG_BRCM_TRACING + /* Macro for error messages. net_ratelimit() is used when driver + * debugging is not selected. When debugging the driver error +@@ -53,11 +55,9 @@ + #define brcmf_err(fmt, ...) \ + do { \ + if (IS_ENABLED(CPTCFG_BRCMDBG) || net_ratelimit()) \ +- pr_err("%s: " fmt, __func__, ##__VA_ARGS__); \ ++ __brcmf_err(__func__, fmt, ##__VA_ARGS__); \ + } while (0) + #else +-__printf(2, 3) +-void __brcmf_err(const char *func, const char *fmt, ...); + #define brcmf_err(fmt, ...) \ + __brcmf_err(__func__, fmt, ##__VA_ARGS__) + #endif diff --git a/package/kernel/mac80211/patches/319-0006-brcmfmac-merge-two-remaining-brcmf_err-macros.patch b/package/kernel/mac80211/patches/319-0006-brcmfmac-merge-two-remaining-brcmf_err-macros.patch new file mode 100644 index 0000000000..3aaddb800d --- /dev/null +++ b/package/kernel/mac80211/patches/319-0006-brcmfmac-merge-two-remaining-brcmf_err-macros.patch @@ -0,0 +1,46 @@ +From d0630555650a394cf5743268820511f527a561a5 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= +Date: Thu, 2 Feb 2017 22:33:15 +0100 +Subject: [PATCH] brcmfmac: merge two remaining brcmf_err macros +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Now we always have __brcmf_err function we can do perfectly fine with +just one macro. + +Signed-off-by: Rafał Miłecki +Acked-by: Arend van Spriel +Signed-off-by: Kalle Valo +--- + drivers/net/wireless/broadcom/brcm80211/brcmfmac/debug.h | 14 +++++--------- + 1 file changed, 5 insertions(+), 9 deletions(-) + +--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/debug.h ++++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/debug.h +@@ -47,20 +47,16 @@ + + __printf(2, 3) + void __brcmf_err(const char *func, const char *fmt, ...); +-#ifndef CPTCFG_BRCM_TRACING +-/* Macro for error messages. net_ratelimit() is used when driver +- * debugging is not selected. When debugging the driver error +- * messages are as important as other tracing or even more so. ++/* Macro for error messages. When debugging / tracing the driver all error ++ * messages are important to us. + */ + #define brcmf_err(fmt, ...) \ + do { \ +- if (IS_ENABLED(CPTCFG_BRCMDBG) || net_ratelimit()) \ ++ if (IS_ENABLED(CPTCFG_BRCMDBG) || \ ++ IS_ENABLED(CPTCFG_BRCM_TRACING) || \ ++ net_ratelimit()) \ + __brcmf_err(__func__, fmt, ##__VA_ARGS__); \ + } while (0) +-#else +-#define brcmf_err(fmt, ...) \ +- __brcmf_err(__func__, fmt, ##__VA_ARGS__) +-#endif + + #if defined(DEBUG) || defined(CPTCFG_BRCM_TRACING) + __printf(3, 4) diff --git a/package/kernel/mac80211/patches/319-mac80211-avoid-extra-memcpy-in-A-MSDU-head-creation.patch b/package/kernel/mac80211/patches/319-mac80211-avoid-extra-memcpy-in-A-MSDU-head-creation.patch deleted file mode 100644 index fb6bd30243..0000000000 --- a/package/kernel/mac80211/patches/319-mac80211-avoid-extra-memcpy-in-A-MSDU-head-creation.patch +++ /dev/null @@ -1,55 +0,0 @@ -From: Michael Braun -Date: Sat, 15 Oct 2016 13:28:18 +0200 -Subject: [PATCH] mac80211: avoid extra memcpy in A-MSDU head creation - -Signed-off-by: Michael Braun -Signed-off-by: Johannes Berg ---- - ---- a/net/mac80211/tx.c -+++ b/net/mac80211/tx.c -@@ -3069,11 +3069,11 @@ static bool ieee80211_amsdu_prepare_head - struct ieee80211_local *local = sdata->local; - struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb); - struct ieee80211_hdr *hdr; -- struct ethhdr amsdu_hdr; -+ struct ethhdr *amsdu_hdr; - int hdr_len = fast_tx->hdr_len - sizeof(rfc1042_header); - int subframe_len = skb->len - hdr_len; - void *data; -- u8 *qc; -+ u8 *qc, *h_80211_src, *h_80211_dst; - - if (info->flags & IEEE80211_TX_CTL_RATE_CTRL_PROBE) - return false; -@@ -3081,19 +3081,22 @@ static bool ieee80211_amsdu_prepare_head - if (info->control.flags & IEEE80211_TX_CTRL_AMSDU) - return true; - -- if (!ieee80211_amsdu_realloc_pad(local, skb, sizeof(amsdu_hdr), -+ if (!ieee80211_amsdu_realloc_pad(local, skb, sizeof(*amsdu_hdr), - &subframe_len)) - return false; - -- amsdu_hdr.h_proto = cpu_to_be16(subframe_len); -- memcpy(amsdu_hdr.h_source, skb->data + fast_tx->sa_offs, ETH_ALEN); -- memcpy(amsdu_hdr.h_dest, skb->data + fast_tx->da_offs, ETH_ALEN); -+ data = skb_push(skb, sizeof(*amsdu_hdr)); -+ memmove(data, data + sizeof(*amsdu_hdr), hdr_len); -+ hdr = data; -+ amsdu_hdr = data + hdr_len; -+ /* h_80211_src/dst is addr* field within hdr */ -+ h_80211_src = data + fast_tx->sa_offs; -+ h_80211_dst = data + fast_tx->da_offs; - -- data = skb_push(skb, sizeof(amsdu_hdr)); -- memmove(data, data + sizeof(amsdu_hdr), hdr_len); -- memcpy(data + hdr_len, &amsdu_hdr, sizeof(amsdu_hdr)); -+ amsdu_hdr->h_proto = cpu_to_be16(subframe_len); -+ ether_addr_copy(amsdu_hdr->h_source, h_80211_src); -+ ether_addr_copy(amsdu_hdr->h_dest, h_80211_dst); - -- hdr = data; - qc = ieee80211_get_qos_ctl(hdr); - *qc |= IEEE80211_QOS_CTL_A_MSDU_PRESENT; - diff --git a/package/kernel/mac80211/patches/320-ath9k-clean-up-and-fix-ath_tx_count_airtime.patch b/package/kernel/mac80211/patches/320-ath9k-clean-up-and-fix-ath_tx_count_airtime.patch new file mode 100644 index 0000000000..a6a3bfca6d --- /dev/null +++ b/package/kernel/mac80211/patches/320-ath9k-clean-up-and-fix-ath_tx_count_airtime.patch @@ -0,0 +1,107 @@ +From: Felix Fietkau +Date: Sun, 12 Feb 2017 13:13:05 +0100 +Subject: [PATCH] ath9k: clean up and fix ath_tx_count_airtime + +ath_tx_count_airtime is doing a lot of unnecessary work: + +- Redundant station lookup +- Redundant rcu_read_lock/unlock +- Useless memcpy of bf->rates +- Useless NULL check of bf->bf_mpdu +- Redundant lookup of the skb tid + +Additionally, it tries to look up the mac80211 queue index from the txq, +which fails if the frame was delivered via the power save queue. + +This patch fixes all of these issues by passing down the right set of +pointers instead of doing extra work + +Cc: stable@vger.kernel.org +Fixes: 63fefa050477 ("ath9k: Introduce airtime fairness scheduling between stations") +Signed-off-by: Felix Fietkau +--- + +--- a/drivers/net/wireless/ath/ath9k/xmit.c ++++ b/drivers/net/wireless/ath/ath9k/xmit.c +@@ -723,51 +723,31 @@ static bool bf_is_ampdu_not_probing(stru + return bf_isampdu(bf) && !(info->flags & IEEE80211_TX_CTL_RATE_CTRL_PROBE); + } + +-static void ath_tx_count_airtime(struct ath_softc *sc, struct ath_txq *txq, +- struct ath_buf *bf, struct ath_tx_status *ts) ++static void ath_tx_count_airtime(struct ath_softc *sc, struct ath_node *an, ++ struct ath_atx_tid *tid, struct ath_buf *bf, ++ struct ath_tx_status *ts) + { +- struct ath_node *an; +- struct ath_acq *acq = &sc->cur_chan->acq[txq->mac80211_qnum]; +- struct sk_buff *skb; +- struct ieee80211_hdr *hdr; +- struct ieee80211_hw *hw = sc->hw; +- struct ieee80211_tx_rate rates[4]; +- struct ieee80211_sta *sta; +- int i; ++ struct ath_txq *txq = tid->txq; + u32 airtime = 0; +- +- skb = bf->bf_mpdu; +- if(!skb) +- return; +- +- hdr = (struct ieee80211_hdr *)skb->data; +- memcpy(rates, bf->rates, sizeof(rates)); +- +- rcu_read_lock(); +- +- sta = ieee80211_find_sta_by_ifaddr(hw, hdr->addr1, hdr->addr2); +- if(!sta) +- goto exit; +- +- +- an = (struct ath_node *) sta->drv_priv; ++ int i; + + airtime += ts->duration * (ts->ts_longretry + 1); ++ for(i = 0; i < ts->ts_rateindex; i++) { ++ int rate_dur = ath9k_hw_get_duration(sc->sc_ah, bf->bf_desc, i); ++ airtime += rate_dur * bf->rates[i].count; ++ } + +- for(i=0; i < ts->ts_rateindex; i++) +- airtime += ath9k_hw_get_duration(sc->sc_ah, bf->bf_desc, i) * rates[i].count; ++ if (sc->airtime_flags & AIRTIME_USE_TX) { ++ int q = txq->mac80211_qnum; ++ struct ath_acq *acq = &sc->cur_chan->acq[q]; + +- if (!!(sc->airtime_flags & AIRTIME_USE_TX)) { + spin_lock_bh(&acq->lock); +- an->airtime_deficit[txq->mac80211_qnum] -= airtime; +- if (an->airtime_deficit[txq->mac80211_qnum] <= 0) +- __ath_tx_queue_tid(sc, ath_get_skb_tid(sc, an, skb)); ++ an->airtime_deficit[q] -= airtime; ++ if (an->airtime_deficit[q] <= 0) ++ __ath_tx_queue_tid(sc, tid); + spin_unlock_bh(&acq->lock); + } + ath_debug_airtime(sc, an, 0, airtime); +- +-exit: +- rcu_read_unlock(); + } + + static void ath_tx_process_buffer(struct ath_softc *sc, struct ath_txq *txq, +@@ -791,13 +771,13 @@ static void ath_tx_process_buffer(struct + + ts->duration = ath9k_hw_get_duration(sc->sc_ah, bf->bf_desc, + ts->ts_rateindex); +- ath_tx_count_airtime(sc, txq, bf, ts); + + hdr = (struct ieee80211_hdr *) bf->bf_mpdu->data; + sta = ieee80211_find_sta_by_ifaddr(hw, hdr->addr1, hdr->addr2); + if (sta) { + struct ath_node *an = (struct ath_node *)sta->drv_priv; + tid = ath_get_skb_tid(sc, an, bf->bf_mpdu); ++ ath_tx_count_airtime(sc, an, tid, bf, ts); + if (ts->ts_status & (ATH9K_TXERR_FILT | ATH9K_TXERR_XRETRY)) + tid->clear_ps_filter = true; + } diff --git a/package/kernel/mac80211/patches/320-mac80211-fix-A-MSDU-outer-SA-DA.patch b/package/kernel/mac80211/patches/320-mac80211-fix-A-MSDU-outer-SA-DA.patch deleted file mode 100644 index 7700254cd1..0000000000 --- a/package/kernel/mac80211/patches/320-mac80211-fix-A-MSDU-outer-SA-DA.patch +++ /dev/null @@ -1,73 +0,0 @@ -From: Michael Braun -Date: Sat, 15 Oct 2016 13:28:19 +0200 -Subject: [PATCH] mac80211: fix A-MSDU outer SA/DA - -According to IEEE 802.11-2012 section 8.3.2 table 8-19, the outer SA/DA -of A-MSDU frames need to be changed depending on FromDS/ToDS values. - -Signed-off-by: Michael Braun -[use ether_addr_copy and add alignment annotations] -Signed-off-by: Johannes Berg ---- - ---- a/include/net/mac80211.h -+++ b/include/net/mac80211.h -@@ -1438,7 +1438,7 @@ enum ieee80211_vif_flags { - struct ieee80211_vif { - enum nl80211_iftype type; - struct ieee80211_bss_conf bss_conf; -- u8 addr[ETH_ALEN]; -+ u8 addr[ETH_ALEN] __aligned(2); - bool p2p; - bool csa_active; - bool mu_mimo_owner; ---- a/net/mac80211/ieee80211_i.h -+++ b/net/mac80211/ieee80211_i.h -@@ -443,7 +443,7 @@ struct ieee80211_if_managed { - struct ieee80211_mgd_auth_data *auth_data; - struct ieee80211_mgd_assoc_data *assoc_data; - -- u8 bssid[ETH_ALEN]; -+ u8 bssid[ETH_ALEN] __aligned(2); - - u16 aid; - ---- a/net/mac80211/tx.c -+++ b/net/mac80211/tx.c -@@ -3074,6 +3074,7 @@ static bool ieee80211_amsdu_prepare_head - int subframe_len = skb->len - hdr_len; - void *data; - u8 *qc, *h_80211_src, *h_80211_dst; -+ const u8 *bssid; - - if (info->flags & IEEE80211_TX_CTL_RATE_CTRL_PROBE) - return false; -@@ -3097,6 +3098,28 @@ static bool ieee80211_amsdu_prepare_head - ether_addr_copy(amsdu_hdr->h_source, h_80211_src); - ether_addr_copy(amsdu_hdr->h_dest, h_80211_dst); - -+ /* according to IEEE 802.11-2012 8.3.2 table 8-19, the outer SA/DA -+ * fields needs to be changed to BSSID for A-MSDU frames depending -+ * on FromDS/ToDS values. -+ */ -+ switch (sdata->vif.type) { -+ case NL80211_IFTYPE_STATION: -+ bssid = sdata->u.mgd.bssid; -+ break; -+ case NL80211_IFTYPE_AP: -+ case NL80211_IFTYPE_AP_VLAN: -+ bssid = sdata->vif.addr; -+ break; -+ default: -+ bssid = NULL; -+ } -+ -+ if (bssid && ieee80211_has_fromds(hdr->frame_control)) -+ ether_addr_copy(h_80211_src, bssid); -+ -+ if (bssid && ieee80211_has_tods(hdr->frame_control)) -+ ether_addr_copy(h_80211_dst, bssid); -+ - qc = ieee80211_get_qos_ctl(hdr); - *qc |= IEEE80211_QOS_CTL_A_MSDU_PRESENT; - diff --git a/package/kernel/mac80211/patches/321-Revert-mac80211-allow-using-AP_LINK_PS-with-mac80211.patch b/package/kernel/mac80211/patches/321-Revert-mac80211-allow-using-AP_LINK_PS-with-mac80211.patch deleted file mode 100644 index ace20e706b..0000000000 --- a/package/kernel/mac80211/patches/321-Revert-mac80211-allow-using-AP_LINK_PS-with-mac80211.patch +++ /dev/null @@ -1,28 +0,0 @@ -From: Felix Fietkau -Date: Thu, 3 Nov 2016 12:10:34 +0100 -Subject: [PATCH] Revert "mac80211: allow using AP_LINK_PS with - mac80211-generated TIM IE" - -This reverts commit c68df2e7be0c1238ea3c281fd744a204ef3b15a0. - -__sta_info_recalc_tim turns into a no-op if local->ops->set_tim is not -set. This prevents the beacon TIM bit from being set for all drivers -that do not implement this op (almost all of them), thus thoroughly -essential AP mode powersave functionality. - -Cc: Emmanuel Grumbach -Fixes: c68df2e7be0c ("mac80211: allow using AP_LINK_PS with mac80211-generated TIM IE") -Signed-off-by: Felix Fietkau ---- - ---- a/net/mac80211/sta_info.c -+++ b/net/mac80211/sta_info.c -@@ -688,7 +688,7 @@ static void __sta_info_recalc_tim(struct - } - - /* No need to do anything if the driver does all */ -- if (!local->ops->set_tim) -+ if (ieee80211_hw_check(&local->hw, AP_LINK_PS)) - return; - - if (sta->dead) diff --git a/package/kernel/mac80211/patches/321-mac80211-fix-CSA-in-IBSS-mode.patch b/package/kernel/mac80211/patches/321-mac80211-fix-CSA-in-IBSS-mode.patch new file mode 100644 index 0000000000..13765b2900 --- /dev/null +++ b/package/kernel/mac80211/patches/321-mac80211-fix-CSA-in-IBSS-mode.patch @@ -0,0 +1,34 @@ +From: Koen Vandeputte +Date: Wed, 8 Feb 2017 15:29:45 +0100 +Subject: [PATCH] mac80211: fix CSA in IBSS mode +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Add the missing IBSS capability flag during capability init as it needs +to be inserted into the generated beacon in order for CSA to work. + +Signed-off-by: Piotr Gawlowicz +Signed-off-by: Mikołaj Chwalisz +Tested-by: Koen Vandeputte +--- + +--- a/net/mac80211/ibss.c ++++ b/net/mac80211/ibss.c +@@ -487,14 +487,14 @@ int ieee80211_ibss_csa_beacon(struct iee + struct beacon_data *presp, *old_presp; + struct cfg80211_bss *cbss; + const struct cfg80211_bss_ies *ies; +- u16 capability = 0; ++ u16 capability = WLAN_CAPABILITY_IBSS; + u64 tsf; + int ret = 0; + + sdata_assert_lock(sdata); + + if (ifibss->privacy) +- capability = WLAN_CAPABILITY_PRIVACY; ++ capability |= WLAN_CAPABILITY_PRIVACY; + + cbss = cfg80211_get_bss(sdata->local->hw.wiphy, ifibss->chandef.chan, + ifibss->bssid, ifibss->ssid, diff --git a/package/kernel/mac80211/patches/322-mac80211-don-t-handle-filtered-frames-within-a-BA-se.patch b/package/kernel/mac80211/patches/322-mac80211-don-t-handle-filtered-frames-within-a-BA-se.patch new file mode 100644 index 0000000000..66e1bfb4c1 --- /dev/null +++ b/package/kernel/mac80211/patches/322-mac80211-don-t-handle-filtered-frames-within-a-BA-se.patch @@ -0,0 +1,28 @@ +From: Felix Fietkau +Date: Wed, 22 Feb 2017 16:13:17 +0100 +Subject: [PATCH] mac80211: don't handle filtered frames within a BA session + +When running a BA session, the driver (or the hardware) already takes +care of retransmitting failed frames, since it has to keep the receiver +reorder window in sync. + +Adding another layer of retransmit around that does not improve +anything. In fact, it can only lead to some strong reordering with huge +latency. + +Cc: stable@vger.kernel.org +Signed-off-by: Felix Fietkau +--- + +--- a/net/mac80211/status.c ++++ b/net/mac80211/status.c +@@ -51,7 +51,8 @@ static void ieee80211_handle_filtered_fr + struct ieee80211_hdr *hdr = (void *)skb->data; + int ac; + +- if (info->flags & IEEE80211_TX_CTL_NO_PS_BUFFER) { ++ if (info->flags & (IEEE80211_TX_CTL_NO_PS_BUFFER | ++ IEEE80211_TX_CTL_AMPDU)) { + ieee80211_free_txskb(&local->hw, skb); + return; + } diff --git a/package/kernel/mac80211/patches/322-mac80211-update-A-MPDU-flag-on-tx-dequeue.patch b/package/kernel/mac80211/patches/322-mac80211-update-A-MPDU-flag-on-tx-dequeue.patch deleted file mode 100644 index 1898d23584..0000000000 --- a/package/kernel/mac80211/patches/322-mac80211-update-A-MPDU-flag-on-tx-dequeue.patch +++ /dev/null @@ -1,30 +0,0 @@ -From: Felix Fietkau -Date: Fri, 4 Nov 2016 10:13:34 +0100 -Subject: [PATCH] mac80211: update A-MPDU flag on tx dequeue - -The sequence number counter is used to derive the starting sequence -number. Since that counter is updated on tx dequeue, the A-MPDU flag -needs to be up to date at the tme of dequeue as well. - -This patch prevents sending more A-MPDU frames after the session has -been terminated and also ensures that aggregation starts right after the -session has been established - -Fixes: bb42f2d13ffc ("mac80211: Move reorder-sensitive TX handlers to after TXQ dequeue") -Signed-off-by: Felix Fietkau ---- - ---- a/net/mac80211/tx.c -+++ b/net/mac80211/tx.c -@@ -3462,6 +3462,11 @@ begin: - goto begin; - } - -+ if (test_bit(IEEE80211_TXQ_AMPDU, &txqi->flags)) -+ info->flags |= IEEE80211_TX_CTL_AMPDU; -+ else -+ info->flags &= ~IEEE80211_TX_CTL_AMPDU; -+ - if (info->control.flags & IEEE80211_TX_CTRL_FAST_XMIT) { - struct sta_info *sta = container_of(txq->sta, struct sta_info, - sta); diff --git a/package/kernel/mac80211/patches/323-mac80211-remove-bogus-skb-vif-assignment.patch b/package/kernel/mac80211/patches/323-mac80211-remove-bogus-skb-vif-assignment.patch deleted file mode 100644 index 66449aca2b..0000000000 --- a/package/kernel/mac80211/patches/323-mac80211-remove-bogus-skb-vif-assignment.patch +++ /dev/null @@ -1,29 +0,0 @@ -From: Felix Fietkau -Date: Fri, 4 Nov 2016 10:17:38 +0100 -Subject: [PATCH] mac80211: remove bogus skb vif assignment - -The call to ieee80211_txq_enqueue overwrites the vif pointer with the -codel enqueue time, so setting it just before that call makes no sense. - -Signed-off-by: Felix Fietkau ---- - ---- a/net/mac80211/tx.c -+++ b/net/mac80211/tx.c -@@ -1500,7 +1500,6 @@ static bool ieee80211_queue_skb(struct i - struct sta_info *sta, - struct sk_buff *skb) - { -- struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb); - struct fq *fq = &local->fq; - struct ieee80211_vif *vif; - struct txq_info *txqi; -@@ -1525,8 +1524,6 @@ static bool ieee80211_queue_skb(struct i - if (!txqi) - return false; - -- info->control.vif = vif; -- - spin_lock_bh(&fq->lock); - ieee80211_txq_enqueue(local, txqi, skb); - spin_unlock_bh(&fq->lock); diff --git a/package/kernel/mac80211/patches/324-mac80211-fix-A-MSDU-aggregation-with-fast-xmit-txq.patch b/package/kernel/mac80211/patches/324-mac80211-fix-A-MSDU-aggregation-with-fast-xmit-txq.patch deleted file mode 100644 index 579f112f71..0000000000 --- a/package/kernel/mac80211/patches/324-mac80211-fix-A-MSDU-aggregation-with-fast-xmit-txq.patch +++ /dev/null @@ -1,34 +0,0 @@ -From: Felix Fietkau -Date: Fri, 4 Nov 2016 10:18:51 +0100 -Subject: [PATCH] mac80211: fix A-MSDU aggregation with fast-xmit + txq - -A-MSDU aggregation alters the QoS header after a frame has been -enqueued, so it needs to be ready before enqueue and not overwritten -again afterwards - -Fixes: bb42f2d13ffc ("mac80211: Move reorder-sensitive TX handlers to after TXQ dequeue") -Signed-off-by: Felix Fietkau ---- - ---- a/net/mac80211/tx.c -+++ b/net/mac80211/tx.c -@@ -3245,7 +3245,6 @@ static void ieee80211_xmit_fast_finish(s - - if (hdr->frame_control & cpu_to_le16(IEEE80211_STYPE_QOS_DATA)) { - tid = skb->priority & IEEE80211_QOS_CTL_TAG1D_MASK; -- *ieee80211_get_qos_ctl(hdr) = tid; - hdr->seq_ctrl = ieee80211_tx_next_seq(sta, tid); - } else { - info->flags |= IEEE80211_TX_CTL_ASSIGN_SEQ; -@@ -3370,6 +3369,11 @@ static bool ieee80211_xmit_fast(struct i - (tid_tx ? IEEE80211_TX_CTL_AMPDU : 0); - info->control.flags = IEEE80211_TX_CTRL_FAST_XMIT; - -+ if (hdr->frame_control & cpu_to_le16(IEEE80211_STYPE_QOS_DATA)) { -+ tid = skb->priority & IEEE80211_QOS_CTL_TAG1D_MASK; -+ *ieee80211_get_qos_ctl(hdr) = tid; -+ } -+ - __skb_queue_head_init(&tx.skbs); - - tx.flags = IEEE80211_TX_UNICAST; diff --git a/package/kernel/mac80211/patches/325-ath9k-fix-ath9k_hw_gpio_get-to-return-0-or-1-on-succ.patch b/package/kernel/mac80211/patches/325-ath9k-fix-ath9k_hw_gpio_get-to-return-0-or-1-on-succ.patch deleted file mode 100644 index 012a49de9b..0000000000 --- a/package/kernel/mac80211/patches/325-ath9k-fix-ath9k_hw_gpio_get-to-return-0-or-1-on-succ.patch +++ /dev/null @@ -1,29 +0,0 @@ -From: Matthias Schiffer -Date: Tue, 15 Nov 2016 16:08:29 +0100 -Subject: [PATCH] ath9k: fix ath9k_hw_gpio_get() to return 0 or 1 on success - -Commit b2d70d4944c1 ("ath9k: make GPIO API to support both of WMAC and -SOC") refactored ath9k_hw_gpio_get() to support both WMAC and SOC GPIOs, -changing the return on success from 1 to BIT(gpio). This broke some callers -like ath_is_rfkill_set(). - -Instead of fixing all callers, change ath9k_hw_gpio_get() back to only -return 0 or 1. - -Fixes: b2d70d4944c1 ("ath9k: make GPIO API to support both of WMAC and SOC") -Signed-off-by: Matthias Schiffer ---- - drivers/net/wireless/ath/ath9k/hw.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - ---- a/drivers/net/wireless/ath/ath9k/hw.c -+++ b/drivers/net/wireless/ath/ath9k/hw.c -@@ -2813,7 +2813,7 @@ u32 ath9k_hw_gpio_get(struct ath_hw *ah, - WARN_ON(1); - } - -- return val; -+ return !!val; - } - EXPORT_SYMBOL(ath9k_hw_gpio_get); - diff --git a/package/kernel/mac80211/patches/326-Documentation-dt-net-add-ath9k-wireless-device-bindi.patch b/package/kernel/mac80211/patches/326-Documentation-dt-net-add-ath9k-wireless-device-bindi.patch deleted file mode 100644 index 72a459c9e6..0000000000 --- a/package/kernel/mac80211/patches/326-Documentation-dt-net-add-ath9k-wireless-device-bindi.patch +++ /dev/null @@ -1,67 +0,0 @@ -From b263e0bb9d4585ca3ec04d7257ca5308d21333bb Mon Sep 17 00:00:00 2001 -From: Martin Blumenstingl -Date: Sun, 16 Oct 2016 22:59:05 +0200 -Subject: [PATCH 1/3] Documentation: dt: net: add ath9k wireless device binding - -Add documentation how devicetree can be used to configure ath9k based -devices. - -Signed-off-by: Martin Blumenstingl -Acked-by: Rob Herring -Signed-off-by: Kalle Valo ---- - .../devicetree/bindings/net/wireless/qca,ath9k.txt | 48 ++++++++++++++++++++++ - 1 file changed, 48 insertions(+) - create mode 100644 Documentation/devicetree/bindings/net/wireless/qca,ath9k.txt - ---- /dev/null -+++ b/Documentation/devicetree/bindings/net/wireless/qca,ath9k.txt -@@ -0,0 +1,48 @@ -+* Qualcomm Atheros ath9k wireless devices -+ -+This node provides properties for configuring the ath9k wireless device. The -+node is expected to be specified as a child node of the PCI controller to -+which the wireless chip is connected. -+ -+Required properties: -+- compatible: For PCI and PCIe devices this should be an identifier following -+ the format as defined in "PCI Bus Binding to Open Firmware" -+ Revision 2.1. One of the possible formats is "pciVVVV,DDDD" -+ where VVVV is the PCI vendor ID and DDDD is PCI device ID. -+ Typically QCA's PCI vendor ID 168c is used while the PCI device -+ ID depends on the chipset - see the following (possibly -+ incomplete) list: -+ - 0023 for AR5416 -+ - 0024 for AR5418 -+ - 0027 for AR9160 -+ - 0029 for AR9220 and AR9223 -+ - 002a for AR9280 and AR9283 -+ - 002b for AR9285 -+ - 002c for AR2427 -+ - 002d for AR9227 -+ - 002e for AR9287 -+ - 0030 for AR9380, AR9381 and AR9382 -+ - 0032 for AR9485 -+ - 0033 for AR9580 and AR9590 -+ - 0034 for AR9462 -+ - 0036 for AR9565 -+ - 0037 for AR9485 -+- reg: Address and length of the register set for the device. -+ -+Optional properties: -+- qca,no-eeprom: Indicates that there is no physical EEPROM connected to the -+ ath9k wireless chip (in this case the calibration / -+ EEPROM data will be loaded from userspace using the -+ kernel firmware loader). -+- mac-address: See ethernet.txt in the parent directory -+- local-mac-address: See ethernet.txt in the parent directory -+ -+ -+In this example, the node is defined as child node of the PCI controller: -+&pci0 { -+ wifi@168c,002d { -+ compatible = "pci168c,002d"; -+ reg = <0x7000 0 0 0 0x1000>; -+ qca,no-eeprom; -+ }; -+}; diff --git a/package/kernel/mac80211/patches/327-ath9k-add-a-helper-to-get-the-string-representation-.patch b/package/kernel/mac80211/patches/327-ath9k-add-a-helper-to-get-the-string-representation-.patch deleted file mode 100644 index c191495b84..0000000000 --- a/package/kernel/mac80211/patches/327-ath9k-add-a-helper-to-get-the-string-representation-.patch +++ /dev/null @@ -1,42 +0,0 @@ -From 25b8b2d57def4854558c135228a52326a7d346ad Mon Sep 17 00:00:00 2001 -From: Martin Blumenstingl -Date: Sun, 16 Oct 2016 22:59:06 +0200 -Subject: [PATCH 2/3] ath9k: add a helper to get the string representation of - ath_bus_type - -This can be used when the ath_bus_type has to be presented in a log -message or firmware filename. - -Signed-off-by: Martin Blumenstingl -Signed-off-by: Kalle Valo ---- - drivers/net/wireless/ath/ath.h | 6 ++++++ - drivers/net/wireless/ath/main.c | 7 +++++++ - 2 files changed, 13 insertions(+) - ---- a/drivers/net/wireless/ath/ath.h -+++ b/drivers/net/wireless/ath/ath.h -@@ -327,4 +327,10 @@ static inline const char *ath_opmode_to_ - } - #endif - -+extern const char *ath_bus_type_strings[]; -+static inline const char *ath_bus_type_to_string(enum ath_bus_type bustype) -+{ -+ return ath_bus_type_strings[bustype]; -+} -+ - #endif /* ATH_H */ ---- a/drivers/net/wireless/ath/main.c -+++ b/drivers/net/wireless/ath/main.c -@@ -90,3 +90,10 @@ void ath_printk(const char *level, const - va_end(args); - } - EXPORT_SYMBOL(ath_printk); -+ -+const char *ath_bus_type_strings[] = { -+ [ATH_PCI] = "pci", -+ [ATH_AHB] = "ahb", -+ [ATH_USB] = "usb", -+}; -+EXPORT_SYMBOL(ath_bus_type_strings); diff --git a/package/kernel/mac80211/patches/328-ath9k-parse-the-device-configuration-from-an-OF-node.patch b/package/kernel/mac80211/patches/328-ath9k-parse-the-device-configuration-from-an-OF-node.patch deleted file mode 100644 index b260858d45..0000000000 --- a/package/kernel/mac80211/patches/328-ath9k-parse-the-device-configuration-from-an-OF-node.patch +++ /dev/null @@ -1,85 +0,0 @@ -From cea03be5a848823cb8052e2e7b93cb2249d5f60c Mon Sep 17 00:00:00 2001 -From: Martin Blumenstingl -Date: Sun, 16 Oct 2016 22:59:07 +0200 -Subject: [PATCH 3/3] ath9k: parse the device configuration from an OF node - -This allows setting the MAC address and specifying that the firmware -will be requested from userspace (because there might not be a hardware -EEPROM connected to the chip) for ath9k based PCI devices using -the device tree. - -There is some out-of-tree code to "convert devicetree to -ath9k_platform_data" (for example in OpenWrt and LEDE) which becomes -obsolete with this patch. - -Signed-off-by: Martin Blumenstingl -Signed-off-by: Kalle Valo ---- - drivers/net/wireless/ath/ath9k/init.c | 42 +++++++++++++++++++++++++++++++++++ - 1 file changed, 42 insertions(+) - ---- a/drivers/net/wireless/ath/ath9k/init.c -+++ b/drivers/net/wireless/ath/ath9k/init.c -@@ -20,6 +20,8 @@ - #include - #include - #include -+#include -+#include - #include - #include - -@@ -554,6 +556,42 @@ static int ath9k_init_platform(struct at - return 0; - } - -+static int ath9k_of_init(struct ath_softc *sc) -+{ -+ struct device_node *np = sc->dev->of_node; -+ struct ath_hw *ah = sc->sc_ah; -+ struct ath_common *common = ath9k_hw_common(ah); -+ enum ath_bus_type bus_type = common->bus_ops->ath_bus_type; -+ const char *mac; -+ char eeprom_name[100]; -+ int ret; -+ -+ if (!of_device_is_available(np)) -+ return 0; -+ -+ ath_dbg(common, CONFIG, "parsing configuration from OF node\n"); -+ -+ if (of_property_read_bool(np, "qca,no-eeprom")) { -+ /* ath9k-eeprom--.bin */ -+ scnprintf(eeprom_name, sizeof(eeprom_name), -+ "ath9k-eeprom-%s-%s.bin", -+ ath_bus_type_to_string(bus_type), dev_name(ah->dev)); -+ -+ ret = ath9k_eeprom_request(sc, eeprom_name); -+ if (ret) -+ return ret; -+ } -+ -+ mac = of_get_mac_address(np); -+ if (mac) -+ ether_addr_copy(common->macaddr, mac); -+ -+ ah->ah_flags &= ~AH_USE_EEPROM; -+ ah->ah_flags |= AH_NO_EEP_SWAP; -+ -+ return 0; -+} -+ - static int ath9k_init_softc(u16 devid, struct ath_softc *sc, - const struct ath_bus_ops *bus_ops) - { -@@ -610,6 +648,10 @@ static int ath9k_init_softc(u16 devid, s - if (ret) - return ret; - -+ ret = ath9k_of_init(sc); -+ if (ret) -+ return ret; -+ - if (ath9k_led_active_high != -1) - ah->config.led_active_high = ath9k_led_active_high == 1; - diff --git a/package/kernel/mac80211/patches/329-ath9k-unlock-rcu-read-when-returning-early.patch b/package/kernel/mac80211/patches/329-ath9k-unlock-rcu-read-when-returning-early.patch deleted file mode 100644 index b8ba355899..0000000000 --- a/package/kernel/mac80211/patches/329-ath9k-unlock-rcu-read-when-returning-early.patch +++ /dev/null @@ -1,65 +0,0 @@ -From: Tobias Klausmann -Date: Mon, 12 Dec 2016 19:50:01 +0100 -Subject: [PATCH] ath9k: unlock rcu read when returning early - -Starting with ath9k: use ieee80211_tx_status_noskb where possible -[d94a461d7a7df68991fb9663531173f60ef89c68] the driver uses rcu_read_lock() && -rcu_read_unlock() yet on returning early in ath_tx_edma_tasklet() the unlock is -missing leading to stalls and suspicious RCU usage: - - =============================== - [ INFO: suspicious RCU usage. ] - 4.9.0-rc8 #11 Not tainted - ------------------------------- - kernel/rcu/tree.c:705 Illegal idle entry in RCU read-side critical section.! - - other info that might help us debug this: - - RCU used illegally from idle CPU! - rcu_scheduler_active = 1, debug_locks = 0 - RCU used illegally from extended quiescent state! - 1 lock held by swapper/7/0: - #0: - ( - rcu_read_lock - ){......} - , at: - [] ath_tx_edma_tasklet+0x0/0x450 [ath9k] - - stack backtrace: - CPU: 7 PID: 0 Comm: swapper/7 Not tainted 4.9.0-rc8 #11 - Hardware name: Acer Aspire V3-571G/VA50_HC_CR, BIOS V2.21 12/16/2013 - ffff88025efc3f38 ffffffff8132b1e5 ffff88017ede4540 0000000000000001 - ffff88025efc3f68 ffffffff810a25f7 ffff88025efcee60 ffff88017edebdd8 - ffff88025eeb5400 0000000000000091 ffff88025efc3f88 ffffffff810c3cd4 - Call Trace: - - [] dump_stack+0x68/0x93 - [] lockdep_rcu_suspicious+0xd7/0x110 - [] rcu_eqs_enter_common.constprop.85+0x154/0x200 - [] rcu_irq_exit+0x44/0xa0 - [] irq_exit+0x61/0xd0 - [] do_IRQ+0x65/0x110 - [] common_interrupt+0x89/0x89 - - [] ? cpuidle_enter_state+0x151/0x200 - [] cpuidle_enter+0x12/0x20 - [] call_cpuidle+0x1e/0x40 - [] cpu_startup_entry+0x146/0x220 - [] start_secondary+0x148/0x170 - -Signed-off-by: Tobias Klausmann -Signed-off-by: Felix Fietkau ---- - ---- a/drivers/net/wireless/ath/ath9k/xmit.c -+++ b/drivers/net/wireless/ath/ath9k/xmit.c -@@ -2757,7 +2757,7 @@ void ath_tx_edma_tasklet(struct ath_soft - fifo_list = &txq->txq_fifo[txq->txq_tailidx]; - if (list_empty(fifo_list)) { - ath_txq_unlock(sc, txq); -- return; -+ break; - } - - bf = list_first_entry(fifo_list, struct ath_buf, list); diff --git a/package/kernel/mac80211/patches/334-mac80211-minstrel_ht-move-supported-bitrate-mask-out.patch b/package/kernel/mac80211/patches/334-mac80211-minstrel_ht-move-supported-bitrate-mask-out.patch deleted file mode 100644 index 5e5992e6b4..0000000000 --- a/package/kernel/mac80211/patches/334-mac80211-minstrel_ht-move-supported-bitrate-mask-out.patch +++ /dev/null @@ -1,196 +0,0 @@ -From: Felix Fietkau -Date: Wed, 14 Dec 2016 19:33:23 +0100 -Subject: [PATCH] mac80211: minstrel_ht: move supported bitrate mask out of - group data - -Improves dcache footprint by ensuring that fewer cache lines need to be -touched. - -Signed-off-by: Felix Fietkau ---- - ---- a/net/mac80211/rc80211_minstrel_ht.c -+++ b/net/mac80211/rc80211_minstrel_ht.c -@@ -301,7 +301,7 @@ minstrel_ht_get_stats(struct minstrel_pr - break; - - /* short preamble */ -- if (!(mi->groups[group].supported & BIT(idx))) -+ if (!(mi->supported[group] & BIT(idx))) - idx += 4; - } - return &mi->groups[group].rates[idx]; -@@ -486,7 +486,7 @@ minstrel_ht_prob_rate_reduce_streams(str - MCS_GROUP_RATES].streams; - for (group = 0; group < ARRAY_SIZE(minstrel_mcs_groups); group++) { - mg = &mi->groups[group]; -- if (!mg->supported || group == MINSTREL_CCK_GROUP) -+ if (!mi->supported[group] || group == MINSTREL_CCK_GROUP) - continue; - - tmp_idx = mg->max_group_prob_rate % MCS_GROUP_RATES; -@@ -540,7 +540,7 @@ minstrel_ht_update_stats(struct minstrel - for (group = 0; group < ARRAY_SIZE(minstrel_mcs_groups); group++) { - - mg = &mi->groups[group]; -- if (!mg->supported) -+ if (!mi->supported[group]) - continue; - - mi->sample_count++; -@@ -550,7 +550,7 @@ minstrel_ht_update_stats(struct minstrel - tmp_group_tp_rate[j] = group; - - for (i = 0; i < MCS_GROUP_RATES; i++) { -- if (!(mg->supported & BIT(i))) -+ if (!(mi->supported[group] & BIT(i))) - continue; - - index = MCS_GROUP_RATES * group + i; -@@ -636,7 +636,7 @@ minstrel_set_next_sample_idx(struct mins - mi->sample_group %= ARRAY_SIZE(minstrel_mcs_groups); - mg = &mi->groups[mi->sample_group]; - -- if (!mg->supported) -+ if (!mi->supported[mi->sample_group]) - continue; - - if (++mg->index >= MCS_GROUP_RATES) { -@@ -657,7 +657,7 @@ minstrel_downgrade_rate(struct minstrel_ - while (group > 0) { - group--; - -- if (!mi->groups[group].supported) -+ if (!mi->supported[group]) - continue; - - if (minstrel_mcs_groups[group].streams > -@@ -994,7 +994,7 @@ minstrel_get_sample_rate(struct minstrel - sample_idx = sample_table[mg->column][mg->index]; - minstrel_set_next_sample_idx(mi); - -- if (!(mg->supported & BIT(sample_idx))) -+ if (!(mi->supported[sample_group] & BIT(sample_idx))) - return -1; - - mrs = &mg->rates[sample_idx]; -@@ -1052,7 +1052,7 @@ static void - minstrel_ht_check_cck_shortpreamble(struct minstrel_priv *mp, - struct minstrel_ht_sta *mi, bool val) - { -- u8 supported = mi->groups[MINSTREL_CCK_GROUP].supported; -+ u8 supported = mi->supported[MINSTREL_CCK_GROUP]; - - if (!supported || !mi->cck_supported_short) - return; -@@ -1061,7 +1061,7 @@ minstrel_ht_check_cck_shortpreamble(stru - return; - - supported ^= mi->cck_supported_short | (mi->cck_supported_short << 4); -- mi->groups[MINSTREL_CCK_GROUP].supported = supported; -+ mi->supported[MINSTREL_CCK_GROUP] = supported; - } - - static void -@@ -1154,7 +1154,7 @@ minstrel_ht_update_cck(struct minstrel_p - mi->cck_supported_short |= BIT(i); - } - -- mi->groups[MINSTREL_CCK_GROUP].supported = mi->cck_supported; -+ mi->supported[MINSTREL_CCK_GROUP] = mi->cck_supported; - } - - static void -@@ -1233,7 +1233,7 @@ minstrel_ht_update_caps(void *priv, stru - u32 gflags = minstrel_mcs_groups[i].flags; - int bw, nss; - -- mi->groups[i].supported = 0; -+ mi->supported[i] = 0; - if (i == MINSTREL_CCK_GROUP) { - minstrel_ht_update_cck(mp, mi, sband, sta); - continue; -@@ -1265,8 +1265,8 @@ minstrel_ht_update_caps(void *priv, stru - if (use_vht && minstrel_vht_only) - continue; - #endif -- mi->groups[i].supported = mcs->rx_mask[nss - 1]; -- if (mi->groups[i].supported) -+ mi->supported[i] = mcs->rx_mask[nss - 1]; -+ if (mi->supported[i]) - n_supported++; - continue; - } -@@ -1292,10 +1292,10 @@ minstrel_ht_update_caps(void *priv, stru - else - bw = BW_20; - -- mi->groups[i].supported = minstrel_get_valid_vht_rates(bw, nss, -+ mi->supported[i] = minstrel_get_valid_vht_rates(bw, nss, - vht_cap->vht_mcs.tx_mcs_map); - -- if (mi->groups[i].supported) -+ if (mi->supported[i]) - n_supported++; - } - ---- a/net/mac80211/rc80211_minstrel_ht.h -+++ b/net/mac80211/rc80211_minstrel_ht.h -@@ -52,9 +52,6 @@ struct minstrel_mcs_group_data { - u8 index; - u8 column; - -- /* bitfield of supported MCS rates of this group */ -- u16 supported; -- - /* sorted rate set within a MCS group*/ - u16 max_group_tp_rate[MAX_THR_RATES]; - u16 max_group_prob_rate; -@@ -101,6 +98,9 @@ struct minstrel_ht_sta { - u8 cck_supported; - u8 cck_supported_short; - -+ /* Bitfield of supported MCS rates of all groups */ -+ u16 supported[MINSTREL_GROUPS_NB]; -+ - /* MCS rate group info and statistics */ - struct minstrel_mcs_group_data groups[MINSTREL_GROUPS_NB]; - }; ---- a/net/mac80211/rc80211_minstrel_ht_debugfs.c -+++ b/net/mac80211/rc80211_minstrel_ht_debugfs.c -@@ -24,7 +24,7 @@ minstrel_ht_stats_dump(struct minstrel_h - char gimode = 'L'; - u32 gflags; - -- if (!mi->groups[i].supported) -+ if (!mi->supported[i]) - return p; - - mg = &minstrel_mcs_groups[i]; -@@ -42,7 +42,7 @@ minstrel_ht_stats_dump(struct minstrel_h - static const int bitrates[4] = { 10, 20, 55, 110 }; - int idx = i * MCS_GROUP_RATES + j; - -- if (!(mi->groups[i].supported & BIT(j))) -+ if (!(mi->supported[i] & BIT(j))) - continue; - - if (gflags & IEEE80211_TX_RC_MCS) { -@@ -170,7 +170,7 @@ minstrel_ht_stats_csv_dump(struct minstr - char gimode = 'L'; - u32 gflags; - -- if (!mi->groups[i].supported) -+ if (!mi->supported[i]) - return p; - - mg = &minstrel_mcs_groups[i]; -@@ -188,7 +188,7 @@ minstrel_ht_stats_csv_dump(struct minstr - static const int bitrates[4] = { 10, 20, 55, 110 }; - int idx = i * MCS_GROUP_RATES + j; - -- if (!(mi->groups[i].supported & BIT(j))) -+ if (!(mi->supported[i] & BIT(j))) - continue; - - if (gflags & IEEE80211_TX_RC_MCS) { diff --git a/package/kernel/mac80211/patches/335-mac80211-minstrel_ht-move-short-preamble-check-out-o.patch b/package/kernel/mac80211/patches/335-mac80211-minstrel_ht-move-short-preamble-check-out-o.patch deleted file mode 100644 index 7a6e8cdb91..0000000000 --- a/package/kernel/mac80211/patches/335-mac80211-minstrel_ht-move-short-preamble-check-out-o.patch +++ /dev/null @@ -1,70 +0,0 @@ -From: Felix Fietkau -Date: Wed, 14 Dec 2016 20:06:08 +0100 -Subject: [PATCH] mac80211: minstrel_ht: move short preamble check out of - get_rate - -Test short preamble support in minstrel_ht_update_caps instead of -looking at the per-packet flag. Makes the code more efficient. - -Signed-off-by: Felix Fietkau ---- - ---- a/net/mac80211/rc80211_minstrel_ht.c -+++ b/net/mac80211/rc80211_minstrel_ht.c -@@ -14,6 +14,7 @@ - #include - #include - #include "rate.h" -+#include "sta_info.h" - #include "rc80211_minstrel.h" - #include "rc80211_minstrel_ht.h" - -@@ -1049,22 +1050,6 @@ minstrel_get_sample_rate(struct minstrel - } - - static void --minstrel_ht_check_cck_shortpreamble(struct minstrel_priv *mp, -- struct minstrel_ht_sta *mi, bool val) --{ -- u8 supported = mi->supported[MINSTREL_CCK_GROUP]; -- -- if (!supported || !mi->cck_supported_short) -- return; -- -- if (supported & (mi->cck_supported_short << (val * 4))) -- return; -- -- supported ^= mi->cck_supported_short | (mi->cck_supported_short << 4); -- mi->supported[MINSTREL_CCK_GROUP] = supported; --} -- --static void - minstrel_ht_get_rate(void *priv, struct ieee80211_sta *sta, void *priv_sta, - struct ieee80211_tx_rate_control *txrc) - { -@@ -1087,7 +1072,6 @@ minstrel_ht_get_rate(void *priv, struct - minstrel_aggr_check(sta, txrc->skb); - - info->flags |= mi->tx_flags; -- minstrel_ht_check_cck_shortpreamble(mp, mi, txrc->short_preamble); - - #ifdef CPTCFG_MAC80211_DEBUGFS - if (mp->fixed_rate_idx != -1) -@@ -1168,6 +1152,7 @@ minstrel_ht_update_caps(void *priv, stru - struct ieee80211_mcs_info *mcs = &sta->ht_cap.mcs; - u16 ht_cap = sta->ht_cap.cap; - struct ieee80211_sta_vht_cap *vht_cap = &sta->vht_cap; -+ struct sta_info *sinfo = container_of(sta, struct sta_info, sta); - int use_vht; - int n_supported = 0; - int ack_dur; -@@ -1302,6 +1287,9 @@ minstrel_ht_update_caps(void *priv, stru - if (!n_supported) - goto use_legacy; - -+ if (test_sta_flag(sinfo, WLAN_STA_SHORT_PREAMBLE)) -+ mi->cck_supported_short |= mi->cck_supported_short << 4; -+ - /* create an initial rate table with the lowest supported rates */ - minstrel_ht_update_stats(mp, mi); - minstrel_ht_update_rates(mp, mi); diff --git a/package/kernel/mac80211/patches/336-mac80211-minstrel_ht-make-att_hist-and-succ_hist-u32.patch b/package/kernel/mac80211/patches/336-mac80211-minstrel_ht-make-att_hist-and-succ_hist-u32.patch deleted file mode 100644 index 40d03001c6..0000000000 --- a/package/kernel/mac80211/patches/336-mac80211-minstrel_ht-make-att_hist-and-succ_hist-u32.patch +++ /dev/null @@ -1,22 +0,0 @@ -From: Felix Fietkau -Date: Wed, 14 Dec 2016 20:09:14 +0100 -Subject: [PATCH] mac80211: minstrel_ht: make att_hist and succ_hist u32 - instead of u64 - -They are only used for debugging purposes and take a very long time to -overflow. Visibly reduces the size of the per-sta rate control data. - -Signed-off-by: Felix Fietkau ---- - ---- a/net/mac80211/rc80211_minstrel.h -+++ b/net/mac80211/rc80211_minstrel.h -@@ -59,7 +59,7 @@ struct minstrel_rate_stats { - u16 success, last_success; - - /* total attempts/success counters */ -- u64 att_hist, succ_hist; -+ u32 att_hist, succ_hist; - - /* statistis of packet delivery probability - * cur_prob - current prob within last update intervall diff --git a/package/kernel/mac80211/patches/337-mac80211-check-for-MCS-in-ieee80211_duration-before-.patch b/package/kernel/mac80211/patches/337-mac80211-check-for-MCS-in-ieee80211_duration-before-.patch deleted file mode 100644 index 066e1d1445..0000000000 --- a/package/kernel/mac80211/patches/337-mac80211-check-for-MCS-in-ieee80211_duration-before-.patch +++ /dev/null @@ -1,34 +0,0 @@ -From: Felix Fietkau -Date: Wed, 14 Dec 2016 20:12:25 +0100 -Subject: [PATCH] mac80211: check for MCS in ieee80211_duration before fetching - chanctx - -Makes the code a bit more efficient - -Signed-off-by: Felix Fietkau ---- - ---- a/net/mac80211/tx.c -+++ b/net/mac80211/tx.c -@@ -63,6 +63,10 @@ static __le16 ieee80211_duration(struct - struct ieee80211_chanctx_conf *chanctx_conf; - u32 rate_flags = 0; - -+ /* assume HW handles this */ -+ if (tx->rate.flags & (IEEE80211_TX_RC_MCS | IEEE80211_TX_RC_VHT_MCS)) -+ return 0; -+ - rcu_read_lock(); - chanctx_conf = rcu_dereference(tx->sdata->vif.chanctx_conf); - if (chanctx_conf) { -@@ -71,10 +75,6 @@ static __le16 ieee80211_duration(struct - } - rcu_read_unlock(); - -- /* assume HW handles this */ -- if (tx->rate.flags & (IEEE80211_TX_RC_MCS | IEEE80211_TX_RC_VHT_MCS)) -- return 0; -- - /* uh huh? */ - if (WARN_ON_ONCE(tx->rate.idx < 0)) - return 0; diff --git a/package/kernel/mac80211/patches/338-mac80211-minstrel-remove-cur_prob-from-debugfs.patch b/package/kernel/mac80211/patches/338-mac80211-minstrel-remove-cur_prob-from-debugfs.patch deleted file mode 100644 index f25b0a8a8c..0000000000 --- a/package/kernel/mac80211/patches/338-mac80211-minstrel-remove-cur_prob-from-debugfs.patch +++ /dev/null @@ -1,192 +0,0 @@ -From: Felix Fietkau -Date: Wed, 14 Dec 2016 20:13:58 +0100 -Subject: [PATCH] mac80211: minstrel: remove cur_prob from debugfs - -This field is redundant, because it is simply last success divided by -last attempt count. Removing it from the rate stats struct saves about -1.2 KiB per HT station. - -Signed-off-by: Felix Fietkau ---- - ---- a/net/mac80211/rc80211_minstrel.c -+++ b/net/mac80211/rc80211_minstrel.c -@@ -159,21 +159,23 @@ minstrel_update_rates(struct minstrel_pr - void - minstrel_calc_rate_stats(struct minstrel_rate_stats *mrs) - { -+ unsigned int cur_prob; -+ - if (unlikely(mrs->attempts > 0)) { - mrs->sample_skipped = 0; -- mrs->cur_prob = MINSTREL_FRAC(mrs->success, mrs->attempts); -+ cur_prob = MINSTREL_FRAC(mrs->success, mrs->attempts); - if (unlikely(!mrs->att_hist)) { -- mrs->prob_ewma = mrs->cur_prob; -+ mrs->prob_ewma = cur_prob; - } else { - /* update exponential weighted moving variance */ - mrs->prob_ewmsd = minstrel_ewmsd(mrs->prob_ewmsd, -- mrs->cur_prob, -+ cur_prob, - mrs->prob_ewma, - EWMA_LEVEL); - - /*update exponential weighted moving avarage */ - mrs->prob_ewma = minstrel_ewma(mrs->prob_ewma, -- mrs->cur_prob, -+ cur_prob, - EWMA_LEVEL); - } - mrs->att_hist += mrs->attempts; ---- a/net/mac80211/rc80211_minstrel.h -+++ b/net/mac80211/rc80211_minstrel.h -@@ -62,10 +62,8 @@ struct minstrel_rate_stats { - u32 att_hist, succ_hist; - - /* statistis of packet delivery probability -- * cur_prob - current prob within last update intervall - * prob_ewma - exponential weighted moving average of prob - * prob_ewmsd - exp. weighted moving standard deviation of prob */ -- unsigned int cur_prob; - unsigned int prob_ewma; - u16 prob_ewmsd; - ---- a/net/mac80211/rc80211_minstrel_debugfs.c -+++ b/net/mac80211/rc80211_minstrel_debugfs.c -@@ -75,7 +75,7 @@ minstrel_stats_open(struct inode *inode, - { - struct minstrel_sta_info *mi = inode->i_private; - struct minstrel_debugfs_info *ms; -- unsigned int i, tp_max, tp_avg, prob, eprob; -+ unsigned int i, tp_max, tp_avg, eprob; - char *p; - - ms = kmalloc(2048, GFP_KERNEL); -@@ -86,9 +86,9 @@ minstrel_stats_open(struct inode *inode, - p = ms->buf; - p += sprintf(p, "\n"); - p += sprintf(p, -- "best __________rate_________ ________statistics________ ________last_______ ______sum-of________\n"); -+ "best __________rate_________ ________statistics________ ____last_____ ______sum-of________\n"); - p += sprintf(p, -- "rate [name idx airtime max_tp] [avg(tp) avg(prob) sd(prob)] [prob.|retry|suc|att] [#success | #attempts]\n"); -+ "rate [name idx airtime max_tp] [avg(tp) avg(prob) sd(prob)] [retry|suc|att] [#success | #attempts]\n"); - - for (i = 0; i < mi->n_rates; i++) { - struct minstrel_rate *mr = &mi->r[i]; -@@ -107,17 +107,15 @@ minstrel_stats_open(struct inode *inode, - - tp_max = minstrel_get_tp_avg(mr, MINSTREL_FRAC(100,100)); - tp_avg = minstrel_get_tp_avg(mr, mrs->prob_ewma); -- prob = MINSTREL_TRUNC(mrs->cur_prob * 1000); - eprob = MINSTREL_TRUNC(mrs->prob_ewma * 1000); - - p += sprintf(p, "%4u.%1u %4u.%1u %3u.%1u %3u.%1u" -- " %3u.%1u %3u %3u %-3u " -+ " %3u %3u %-3u " - "%9llu %-9llu\n", - tp_max / 10, tp_max % 10, - tp_avg / 10, tp_avg % 10, - eprob / 10, eprob % 10, - mrs->prob_ewmsd / 10, mrs->prob_ewmsd % 10, -- prob / 10, prob % 10, - mrs->retry_count, - mrs->last_success, - mrs->last_attempts, -@@ -148,7 +146,7 @@ minstrel_stats_csv_open(struct inode *in - { - struct minstrel_sta_info *mi = inode->i_private; - struct minstrel_debugfs_info *ms; -- unsigned int i, tp_max, tp_avg, prob, eprob; -+ unsigned int i, tp_max, tp_avg, eprob; - char *p; - - ms = kmalloc(2048, GFP_KERNEL); -@@ -175,16 +173,14 @@ minstrel_stats_csv_open(struct inode *in - - tp_max = minstrel_get_tp_avg(mr, MINSTREL_FRAC(100,100)); - tp_avg = minstrel_get_tp_avg(mr, mrs->prob_ewma); -- prob = MINSTREL_TRUNC(mrs->cur_prob * 1000); - eprob = MINSTREL_TRUNC(mrs->prob_ewma * 1000); - -- p += sprintf(p, "%u.%u,%u.%u,%u.%u,%u.%u,%u.%u,%u,%u,%u," -+ p += sprintf(p, "%u.%u,%u.%u,%u.%u,%u.%u,%u,%u,%u," - "%llu,%llu,%d,%d\n", - tp_max / 10, tp_max % 10, - tp_avg / 10, tp_avg % 10, - eprob / 10, eprob % 10, - mrs->prob_ewmsd / 10, mrs->prob_ewmsd % 10, -- prob / 10, prob % 10, - mrs->retry_count, - mrs->last_success, - mrs->last_attempts, ---- a/net/mac80211/rc80211_minstrel_ht_debugfs.c -+++ b/net/mac80211/rc80211_minstrel_ht_debugfs.c -@@ -19,7 +19,7 @@ static char * - minstrel_ht_stats_dump(struct minstrel_ht_sta *mi, int i, char *p) - { - const struct mcs_group *mg; -- unsigned int j, tp_max, tp_avg, prob, eprob, tx_time; -+ unsigned int j, tp_max, tp_avg, eprob, tx_time; - char htmode = '2'; - char gimode = 'L'; - u32 gflags; -@@ -83,17 +83,15 @@ minstrel_ht_stats_dump(struct minstrel_h - - tp_max = minstrel_ht_get_tp_avg(mi, i, j, MINSTREL_FRAC(100, 100)); - tp_avg = minstrel_ht_get_tp_avg(mi, i, j, mrs->prob_ewma); -- prob = MINSTREL_TRUNC(mrs->cur_prob * 1000); - eprob = MINSTREL_TRUNC(mrs->prob_ewma * 1000); - - p += sprintf(p, "%4u.%1u %4u.%1u %3u.%1u %3u.%1u" -- " %3u.%1u %3u %3u %-3u " -+ " %3u %3u %-3u " - "%9llu %-9llu\n", - tp_max / 10, tp_max % 10, - tp_avg / 10, tp_avg % 10, - eprob / 10, eprob % 10, - mrs->prob_ewmsd / 10, mrs->prob_ewmsd % 10, -- prob / 10, prob % 10, - mrs->retry_count, - mrs->last_success, - mrs->last_attempts, -@@ -130,9 +128,9 @@ minstrel_ht_stats_open(struct inode *ino - - p += sprintf(p, "\n"); - p += sprintf(p, -- " best ____________rate__________ ________statistics________ ________last_______ ______sum-of________\n"); -+ " best ____________rate__________ ________statistics________ _____last____ ______sum-of________\n"); - p += sprintf(p, -- "mode guard # rate [name idx airtime max_tp] [avg(tp) avg(prob) sd(prob)] [prob.|retry|suc|att] [#success | #attempts]\n"); -+ "mode guard # rate [name idx airtime max_tp] [avg(tp) avg(prob) sd(prob)] [retry|suc|att] [#success | #attempts]\n"); - - p = minstrel_ht_stats_dump(mi, MINSTREL_CCK_GROUP, p); - for (i = 0; i < MINSTREL_CCK_GROUP; i++) -@@ -165,7 +163,7 @@ static char * - minstrel_ht_stats_csv_dump(struct minstrel_ht_sta *mi, int i, char *p) - { - const struct mcs_group *mg; -- unsigned int j, tp_max, tp_avg, prob, eprob, tx_time; -+ unsigned int j, tp_max, tp_avg, eprob, tx_time; - char htmode = '2'; - char gimode = 'L'; - u32 gflags; -@@ -226,16 +224,14 @@ minstrel_ht_stats_csv_dump(struct minstr - - tp_max = minstrel_ht_get_tp_avg(mi, i, j, MINSTREL_FRAC(100, 100)); - tp_avg = minstrel_ht_get_tp_avg(mi, i, j, mrs->prob_ewma); -- prob = MINSTREL_TRUNC(mrs->cur_prob * 1000); - eprob = MINSTREL_TRUNC(mrs->prob_ewma * 1000); - -- p += sprintf(p, "%u.%u,%u.%u,%u.%u,%u.%u,%u.%u,%u,%u," -+ p += sprintf(p, "%u.%u,%u.%u,%u.%u,%u.%u,%u,%u," - "%u,%llu,%llu,", - tp_max / 10, tp_max % 10, - tp_avg / 10, tp_avg % 10, - eprob / 10, eprob % 10, - mrs->prob_ewmsd / 10, mrs->prob_ewmsd % 10, -- prob / 10, prob % 10, - mrs->retry_count, - mrs->last_success, - mrs->last_attempts, diff --git a/package/kernel/mac80211/patches/339-mac80211-minstrel-reduce-MINSTREL_SCALE.patch b/package/kernel/mac80211/patches/339-mac80211-minstrel-reduce-MINSTREL_SCALE.patch deleted file mode 100644 index 0416cf5900..0000000000 --- a/package/kernel/mac80211/patches/339-mac80211-minstrel-reduce-MINSTREL_SCALE.patch +++ /dev/null @@ -1,22 +0,0 @@ -From: Felix Fietkau -Date: Wed, 14 Dec 2016 20:15:33 +0100 -Subject: [PATCH] mac80211: minstrel: reduce MINSTREL_SCALE - -The loss of a bit of extra precision does not hurt the calculation, 12 -bits is still enough to calculate probabilities well. Reducing the scale -makes it easier to avoid overflows - -Signed-off-by: Felix Fietkau ---- - ---- a/net/mac80211/rc80211_minstrel.h -+++ b/net/mac80211/rc80211_minstrel.h -@@ -14,7 +14,7 @@ - #define SAMPLE_COLUMNS 10 /* number of columns in sample table */ - - /* scaled fraction values */ --#define MINSTREL_SCALE 16 -+#define MINSTREL_SCALE 12 - #define MINSTREL_FRAC(val, div) (((val) << MINSTREL_SCALE) / div) - #define MINSTREL_TRUNC(val) ((val) >> MINSTREL_SCALE) - diff --git a/package/kernel/mac80211/patches/340-mac80211-minstrel-store-probability-variance-instead.patch b/package/kernel/mac80211/patches/340-mac80211-minstrel-store-probability-variance-instead.patch deleted file mode 100644 index f679a43224..0000000000 --- a/package/kernel/mac80211/patches/340-mac80211-minstrel-store-probability-variance-instead.patch +++ /dev/null @@ -1,186 +0,0 @@ -From: Felix Fietkau -Date: Wed, 14 Dec 2016 20:17:06 +0100 -Subject: [PATCH] mac80211: minstrel: store probability variance instead of - standard deviation - -This avoids the costly int_sqrt calls in the statistics update and moves -it to the debugfs code instead. -This also fixes an overflow in the previous standard deviation -calculation. - -Signed-off-by: Thomas Huehn -Signed-off-by: Felix Fietkau ---- - ---- a/net/mac80211/rc80211_minstrel.c -+++ b/net/mac80211/rc80211_minstrel.c -@@ -168,10 +168,10 @@ minstrel_calc_rate_stats(struct minstrel - mrs->prob_ewma = cur_prob; - } else { - /* update exponential weighted moving variance */ -- mrs->prob_ewmsd = minstrel_ewmsd(mrs->prob_ewmsd, -- cur_prob, -- mrs->prob_ewma, -- EWMA_LEVEL); -+ mrs->prob_ewmv = minstrel_ewmv(mrs->prob_ewmv, -+ cur_prob, -+ mrs->prob_ewma, -+ EWMA_LEVEL); - - /*update exponential weighted moving avarage */ - mrs->prob_ewma = minstrel_ewma(mrs->prob_ewma, ---- a/net/mac80211/rc80211_minstrel.h -+++ b/net/mac80211/rc80211_minstrel.h -@@ -36,21 +36,16 @@ minstrel_ewma(int old, int new, int weig - } - - /* -- * Perform EWMSD (Exponentially Weighted Moving Standard Deviation) calculation -+ * Perform EWMV (Exponentially Weighted Moving Variance) calculation - */ - static inline int --minstrel_ewmsd(int old_ewmsd, int cur_prob, int prob_ewma, int weight) -+minstrel_ewmv(int old_ewmv, int cur_prob, int prob_ewma, int weight) - { -- int diff, incr, tmp_var; -+ int diff, incr; - -- /* calculate exponential weighted moving variance */ -- diff = MINSTREL_TRUNC((cur_prob - prob_ewma) * 1000000); -+ diff = cur_prob - prob_ewma; - incr = (EWMA_DIV - weight) * diff / EWMA_DIV; -- tmp_var = old_ewmsd * old_ewmsd; -- tmp_var = weight * (tmp_var + diff * incr / 1000000) / EWMA_DIV; -- -- /* return standard deviation */ -- return (u16) int_sqrt(tmp_var); -+ return weight * (old_ewmv + MINSTREL_TRUNC(diff * incr)) / EWMA_DIV; - } - - struct minstrel_rate_stats { -@@ -65,7 +60,7 @@ struct minstrel_rate_stats { - * prob_ewma - exponential weighted moving average of prob - * prob_ewmsd - exp. weighted moving standard deviation of prob */ - unsigned int prob_ewma; -- u16 prob_ewmsd; -+ u16 prob_ewmv; - - /* maximum retry counts */ - u8 retry_count; -@@ -151,6 +146,14 @@ struct minstrel_debugfs_info { - char buf[]; - }; - -+/* Get EWMSD (Exponentially Weighted Moving Standard Deviation) * 10 */ -+static inline int -+minstrel_get_ewmsd10(struct minstrel_rate_stats *mrs) -+{ -+ unsigned int ewmv = mrs->prob_ewmv; -+ return int_sqrt(MINSTREL_TRUNC(ewmv * 1000 * 1000)); -+} -+ - extern const struct rate_control_ops mac80211_minstrel; - void minstrel_add_sta_debugfs(void *priv, void *priv_sta, struct dentry *dir); - void minstrel_remove_sta_debugfs(void *priv, void *priv_sta); ---- a/net/mac80211/rc80211_minstrel_debugfs.c -+++ b/net/mac80211/rc80211_minstrel_debugfs.c -@@ -93,6 +93,7 @@ minstrel_stats_open(struct inode *inode, - for (i = 0; i < mi->n_rates; i++) { - struct minstrel_rate *mr = &mi->r[i]; - struct minstrel_rate_stats *mrs = &mi->r[i].stats; -+ unsigned int prob_ewmsd; - - *(p++) = (i == mi->max_tp_rate[0]) ? 'A' : ' '; - *(p++) = (i == mi->max_tp_rate[1]) ? 'B' : ' '; -@@ -108,6 +109,7 @@ minstrel_stats_open(struct inode *inode, - tp_max = minstrel_get_tp_avg(mr, MINSTREL_FRAC(100,100)); - tp_avg = minstrel_get_tp_avg(mr, mrs->prob_ewma); - eprob = MINSTREL_TRUNC(mrs->prob_ewma * 1000); -+ prob_ewmsd = minstrel_get_ewmsd10(mrs); - - p += sprintf(p, "%4u.%1u %4u.%1u %3u.%1u %3u.%1u" - " %3u %3u %-3u " -@@ -115,7 +117,7 @@ minstrel_stats_open(struct inode *inode, - tp_max / 10, tp_max % 10, - tp_avg / 10, tp_avg % 10, - eprob / 10, eprob % 10, -- mrs->prob_ewmsd / 10, mrs->prob_ewmsd % 10, -+ prob_ewmsd / 10, prob_ewmsd % 10, - mrs->retry_count, - mrs->last_success, - mrs->last_attempts, -@@ -159,6 +161,7 @@ minstrel_stats_csv_open(struct inode *in - for (i = 0; i < mi->n_rates; i++) { - struct minstrel_rate *mr = &mi->r[i]; - struct minstrel_rate_stats *mrs = &mi->r[i].stats; -+ unsigned int prob_ewmsd; - - p += sprintf(p, "%s" ,((i == mi->max_tp_rate[0]) ? "A" : "")); - p += sprintf(p, "%s" ,((i == mi->max_tp_rate[1]) ? "B" : "")); -@@ -174,13 +177,14 @@ minstrel_stats_csv_open(struct inode *in - tp_max = minstrel_get_tp_avg(mr, MINSTREL_FRAC(100,100)); - tp_avg = minstrel_get_tp_avg(mr, mrs->prob_ewma); - eprob = MINSTREL_TRUNC(mrs->prob_ewma * 1000); -+ prob_ewmsd = minstrel_get_ewmsd10(mrs); - - p += sprintf(p, "%u.%u,%u.%u,%u.%u,%u.%u,%u,%u,%u," - "%llu,%llu,%d,%d\n", - tp_max / 10, tp_max % 10, - tp_avg / 10, tp_avg % 10, - eprob / 10, eprob % 10, -- mrs->prob_ewmsd / 10, mrs->prob_ewmsd % 10, -+ prob_ewmsd / 10, prob_ewmsd % 10, - mrs->retry_count, - mrs->last_success, - mrs->last_attempts, ---- a/net/mac80211/rc80211_minstrel_ht_debugfs.c -+++ b/net/mac80211/rc80211_minstrel_ht_debugfs.c -@@ -41,6 +41,7 @@ minstrel_ht_stats_dump(struct minstrel_h - struct minstrel_rate_stats *mrs = &mi->groups[i].rates[j]; - static const int bitrates[4] = { 10, 20, 55, 110 }; - int idx = i * MCS_GROUP_RATES + j; -+ unsigned int prob_ewmsd; - - if (!(mi->supported[i] & BIT(j))) - continue; -@@ -84,6 +85,7 @@ minstrel_ht_stats_dump(struct minstrel_h - tp_max = minstrel_ht_get_tp_avg(mi, i, j, MINSTREL_FRAC(100, 100)); - tp_avg = minstrel_ht_get_tp_avg(mi, i, j, mrs->prob_ewma); - eprob = MINSTREL_TRUNC(mrs->prob_ewma * 1000); -+ prob_ewmsd = minstrel_get_ewmsd10(mrs); - - p += sprintf(p, "%4u.%1u %4u.%1u %3u.%1u %3u.%1u" - " %3u %3u %-3u " -@@ -91,7 +93,7 @@ minstrel_ht_stats_dump(struct minstrel_h - tp_max / 10, tp_max % 10, - tp_avg / 10, tp_avg % 10, - eprob / 10, eprob % 10, -- mrs->prob_ewmsd / 10, mrs->prob_ewmsd % 10, -+ prob_ewmsd / 10, prob_ewmsd % 10, - mrs->retry_count, - mrs->last_success, - mrs->last_attempts, -@@ -185,6 +187,7 @@ minstrel_ht_stats_csv_dump(struct minstr - struct minstrel_rate_stats *mrs = &mi->groups[i].rates[j]; - static const int bitrates[4] = { 10, 20, 55, 110 }; - int idx = i * MCS_GROUP_RATES + j; -+ unsigned int prob_ewmsd; - - if (!(mi->supported[i] & BIT(j))) - continue; -@@ -225,13 +228,14 @@ minstrel_ht_stats_csv_dump(struct minstr - tp_max = minstrel_ht_get_tp_avg(mi, i, j, MINSTREL_FRAC(100, 100)); - tp_avg = minstrel_ht_get_tp_avg(mi, i, j, mrs->prob_ewma); - eprob = MINSTREL_TRUNC(mrs->prob_ewma * 1000); -+ prob_ewmsd = minstrel_get_ewmsd10(mrs); - - p += sprintf(p, "%u.%u,%u.%u,%u.%u,%u.%u,%u,%u," - "%u,%llu,%llu,", - tp_max / 10, tp_max % 10, - tp_avg / 10, tp_avg % 10, - eprob / 10, eprob % 10, -- mrs->prob_ewmsd / 10, mrs->prob_ewmsd % 10, -+ prob_ewmsd / 10, prob_ewmsd % 10, - mrs->retry_count, - mrs->last_success, - mrs->last_attempts, diff --git a/package/kernel/mac80211/patches/341-mac80211-minstrel-make-prob_ewma-u16-instead-of-u32.patch b/package/kernel/mac80211/patches/341-mac80211-minstrel-make-prob_ewma-u16-instead-of-u32.patch deleted file mode 100644 index 570cd19ee4..0000000000 --- a/package/kernel/mac80211/patches/341-mac80211-minstrel-make-prob_ewma-u16-instead-of-u32.patch +++ /dev/null @@ -1,20 +0,0 @@ -From: Felix Fietkau -Date: Wed, 14 Dec 2016 20:19:56 +0100 -Subject: [PATCH] mac80211: minstrel: make prob_ewma u16 instead of u32 - -Saves about 1.2 KiB memory per station - -Signed-off-by: Felix Fietkau ---- - ---- a/net/mac80211/rc80211_minstrel.h -+++ b/net/mac80211/rc80211_minstrel.h -@@ -59,7 +59,7 @@ struct minstrel_rate_stats { - /* statistis of packet delivery probability - * prob_ewma - exponential weighted moving average of prob - * prob_ewmsd - exp. weighted moving standard deviation of prob */ -- unsigned int prob_ewma; -+ u16 prob_ewma; - u16 prob_ewmv; - - /* maximum retry counts */ diff --git a/package/kernel/mac80211/patches/342-mac80211-minstrel_ht-remove-obsolete-if-for-3-stream.patch b/package/kernel/mac80211/patches/342-mac80211-minstrel_ht-remove-obsolete-if-for-3-stream.patch deleted file mode 100644 index 39d3c99e74..0000000000 --- a/package/kernel/mac80211/patches/342-mac80211-minstrel_ht-remove-obsolete-if-for-3-stream.patch +++ /dev/null @@ -1,80 +0,0 @@ -From: Felix Fietkau -Date: Wed, 14 Dec 2016 20:23:29 +0100 -Subject: [PATCH] mac80211: minstrel_ht: remove obsolete #if for >= 3 streams - -This was added during early development when 3x3 hardware was not very -common yet. This is completely unnecessary now. - -Signed-off-by: Felix Fietkau ---- - ---- a/net/mac80211/rc80211_minstrel_ht.c -+++ b/net/mac80211/rc80211_minstrel_ht.c -@@ -155,67 +155,47 @@ MODULE_PARM_DESC(minstrel_vht_only, - const struct mcs_group minstrel_mcs_groups[] = { - MCS_GROUP(1, 0, BW_20), - MCS_GROUP(2, 0, BW_20), --#if MINSTREL_MAX_STREAMS >= 3 - MCS_GROUP(3, 0, BW_20), --#endif - - MCS_GROUP(1, 1, BW_20), - MCS_GROUP(2, 1, BW_20), --#if MINSTREL_MAX_STREAMS >= 3 - MCS_GROUP(3, 1, BW_20), --#endif - - MCS_GROUP(1, 0, BW_40), - MCS_GROUP(2, 0, BW_40), --#if MINSTREL_MAX_STREAMS >= 3 - MCS_GROUP(3, 0, BW_40), --#endif - - MCS_GROUP(1, 1, BW_40), - MCS_GROUP(2, 1, BW_40), --#if MINSTREL_MAX_STREAMS >= 3 - MCS_GROUP(3, 1, BW_40), --#endif - - CCK_GROUP, - - #ifdef CPTCFG_MAC80211_RC_MINSTREL_VHT - VHT_GROUP(1, 0, BW_20), - VHT_GROUP(2, 0, BW_20), --#if MINSTREL_MAX_STREAMS >= 3 - VHT_GROUP(3, 0, BW_20), --#endif - - VHT_GROUP(1, 1, BW_20), - VHT_GROUP(2, 1, BW_20), --#if MINSTREL_MAX_STREAMS >= 3 - VHT_GROUP(3, 1, BW_20), --#endif - - VHT_GROUP(1, 0, BW_40), - VHT_GROUP(2, 0, BW_40), --#if MINSTREL_MAX_STREAMS >= 3 - VHT_GROUP(3, 0, BW_40), --#endif - - VHT_GROUP(1, 1, BW_40), - VHT_GROUP(2, 1, BW_40), --#if MINSTREL_MAX_STREAMS >= 3 - VHT_GROUP(3, 1, BW_40), --#endif - - VHT_GROUP(1, 0, BW_80), - VHT_GROUP(2, 0, BW_80), --#if MINSTREL_MAX_STREAMS >= 3 - VHT_GROUP(3, 0, BW_80), --#endif - - VHT_GROUP(1, 1, BW_80), - VHT_GROUP(2, 1, BW_80), --#if MINSTREL_MAX_STREAMS >= 3 - VHT_GROUP(3, 1, BW_80), - #endif --#endif - }; - - static u8 sample_table[SAMPLE_COLUMNS][MCS_GROUP_RATES] __read_mostly; diff --git a/package/kernel/mac80211/patches/343-cfg80211-limit-scan-results-cache-size.patch b/package/kernel/mac80211/patches/343-cfg80211-limit-scan-results-cache-size.patch deleted file mode 100644 index f26548a3df..0000000000 --- a/package/kernel/mac80211/patches/343-cfg80211-limit-scan-results-cache-size.patch +++ /dev/null @@ -1,150 +0,0 @@ -From: Johannes Berg -Date: Tue, 15 Nov 2016 12:05:11 +0100 -Subject: [PATCH] cfg80211: limit scan results cache size - -It's possible to make scanning consume almost arbitrary amounts -of memory, e.g. by sending beacon frames with random BSSIDs at -high rates while somebody is scanning. - -Limit the number of BSS table entries we're willing to cache to -1000, limiting maximum memory usage to maybe 4-5MB, but lower -in practice - that would be the case for having both full-sized -beacon and probe response frames for each entry; this seems not -possible in practice, so a limit of 1000 entries will likely be -closer to 0.5 MB. - -Cc: stable@vger.kernel.org -Signed-off-by: Johannes Berg ---- - ---- a/net/wireless/core.h -+++ b/net/wireless/core.h -@@ -71,6 +71,7 @@ struct cfg80211_registered_device { - struct list_head bss_list; - struct rb_root bss_tree; - u32 bss_generation; -+ u32 bss_entries; - struct cfg80211_scan_request *scan_req; /* protected by RTNL */ - struct sk_buff *scan_msg; - struct cfg80211_sched_scan_request __rcu *sched_scan_req; ---- a/net/wireless/scan.c -+++ b/net/wireless/scan.c -@@ -57,6 +57,19 @@ - * also linked into the probe response struct. - */ - -+/* -+ * Limit the number of BSS entries stored in mac80211. Each one is -+ * a bit over 4k at most, so this limits to roughly 4-5M of memory. -+ * If somebody wants to really attack this though, they'd likely -+ * use small beacons, and only one type of frame, limiting each of -+ * the entries to a much smaller size (in order to generate more -+ * entries in total, so overhead is bigger.) -+ */ -+static int bss_entries_limit = 1000; -+module_param(bss_entries_limit, int, 0644); -+MODULE_PARM_DESC(bss_entries_limit, -+ "limit to number of scan BSS entries (per wiphy, default 1000)"); -+ - #define IEEE80211_SCAN_RESULT_EXPIRE (30 * HZ) - - static void bss_free(struct cfg80211_internal_bss *bss) -@@ -137,6 +150,10 @@ static bool __cfg80211_unlink_bss(struct - - list_del_init(&bss->list); - rb_erase(&bss->rbn, &rdev->bss_tree); -+ rdev->bss_entries--; -+ WARN_ONCE((rdev->bss_entries == 0) ^ list_empty(&rdev->bss_list), -+ "rdev bss entries[%d]/list[empty:%d] corruption\n", -+ rdev->bss_entries, list_empty(&rdev->bss_list)); - bss_ref_put(rdev, bss); - return true; - } -@@ -163,6 +180,40 @@ static void __cfg80211_bss_expire(struct - rdev->bss_generation++; - } - -+static bool cfg80211_bss_expire_oldest(struct cfg80211_registered_device *rdev) -+{ -+ struct cfg80211_internal_bss *bss, *oldest = NULL; -+ bool ret; -+ -+ lockdep_assert_held(&rdev->bss_lock); -+ -+ list_for_each_entry(bss, &rdev->bss_list, list) { -+ if (atomic_read(&bss->hold)) -+ continue; -+ -+ if (!list_empty(&bss->hidden_list) && -+ !bss->pub.hidden_beacon_bss) -+ continue; -+ -+ if (oldest && time_before(oldest->ts, bss->ts)) -+ continue; -+ oldest = bss; -+ } -+ -+ if (WARN_ON(!oldest)) -+ return false; -+ -+ /* -+ * The callers make sure to increase rdev->bss_generation if anything -+ * gets removed (and a new entry added), so there's no need to also do -+ * it here. -+ */ -+ -+ ret = __cfg80211_unlink_bss(rdev, oldest); -+ WARN_ON(!ret); -+ return ret; -+} -+ - void ___cfg80211_scan_done(struct cfg80211_registered_device *rdev, - bool send_message) - { -@@ -689,6 +740,7 @@ static bool cfg80211_combine_bsses(struc - const u8 *ie; - int i, ssidlen; - u8 fold = 0; -+ u32 n_entries = 0; - - ies = rcu_access_pointer(new->pub.beacon_ies); - if (WARN_ON(!ies)) -@@ -712,6 +764,12 @@ static bool cfg80211_combine_bsses(struc - /* This is the bad part ... */ - - list_for_each_entry(bss, &rdev->bss_list, list) { -+ /* -+ * we're iterating all the entries anyway, so take the -+ * opportunity to validate the list length accounting -+ */ -+ n_entries++; -+ - if (!ether_addr_equal(bss->pub.bssid, new->pub.bssid)) - continue; - if (bss->pub.channel != new->pub.channel) -@@ -740,6 +798,10 @@ static bool cfg80211_combine_bsses(struc - new->pub.beacon_ies); - } - -+ WARN_ONCE(n_entries != rdev->bss_entries, -+ "rdev bss entries[%d]/list[len:%d] corruption\n", -+ rdev->bss_entries, n_entries); -+ - return true; - } - -@@ -894,7 +956,14 @@ cfg80211_bss_update(struct cfg80211_regi - } - } - -+ if (rdev->bss_entries >= bss_entries_limit && -+ !cfg80211_bss_expire_oldest(rdev)) { -+ kfree(new); -+ goto drop; -+ } -+ - list_add_tail(&new->list, &rdev->bss_list); -+ rdev->bss_entries++; - rb_insert_bss(rdev, new); - found = new; - } diff --git a/package/kernel/mac80211/patches/346-ath5k-drop-bogus-warning-on-drv_set_key-with-unsuppo.patch b/package/kernel/mac80211/patches/346-ath5k-drop-bogus-warning-on-drv_set_key-with-unsuppo.patch deleted file mode 100644 index 243907cb26..0000000000 --- a/package/kernel/mac80211/patches/346-ath5k-drop-bogus-warning-on-drv_set_key-with-unsuppo.patch +++ /dev/null @@ -1,23 +0,0 @@ -From: Felix Fietkau -Date: Tue, 27 Dec 2016 12:15:14 +0100 -Subject: [PATCH] ath5k: drop bogus warning on drv_set_key with unsupported - cipher - -Simply return -EOPNOTSUPP instead. - -Cc: stable@vger.kernel.org -Signed-off-by: Felix Fietkau ---- - ---- a/drivers/net/wireless/ath/ath5k/mac80211-ops.c -+++ b/drivers/net/wireless/ath/ath5k/mac80211-ops.c -@@ -502,8 +502,7 @@ ath5k_set_key(struct ieee80211_hw *hw, e - break; - return -EOPNOTSUPP; - default: -- WARN_ON(1); -- return -EINVAL; -+ return -EOPNOTSUPP; - } - - mutex_lock(&ah->lock); diff --git a/package/kernel/mac80211/patches/347-0001-cfg80211-move-function-checking-range-fit-to-util.c.patch b/package/kernel/mac80211/patches/347-0001-cfg80211-move-function-checking-range-fit-to-util.c.patch deleted file mode 100644 index 4a50d37b2e..0000000000 --- a/package/kernel/mac80211/patches/347-0001-cfg80211-move-function-checking-range-fit-to-util.c.patch +++ /dev/null @@ -1,101 +0,0 @@ -From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= -Date: Wed, 4 Jan 2017 18:58:30 +0100 -Subject: [PATCH] cfg80211: move function checking range fit to util.c -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -It is needed for another cfg80211 helper that will be out of reg.c so -move it to common util.c file and make it non-static. - -Signed-off-by: Rafał Miłecki -Signed-off-by: Johannes Berg ---- - ---- a/net/wireless/core.h -+++ b/net/wireless/core.h -@@ -429,6 +429,9 @@ int cfg80211_change_iface(struct cfg8021 - void cfg80211_process_rdev_events(struct cfg80211_registered_device *rdev); - void cfg80211_process_wdev_events(struct wireless_dev *wdev); - -+bool cfg80211_does_bw_fit_range(const struct ieee80211_freq_range *freq_range, -+ u32 center_freq_khz, u32 bw_khz); -+ - /** - * cfg80211_chandef_dfs_usable - checks if chandef is DFS usable - * @wiphy: the wiphy to validate against ---- a/net/wireless/reg.c -+++ b/net/wireless/reg.c -@@ -748,21 +748,6 @@ static bool is_valid_rd(const struct iee - return true; - } - --static bool reg_does_bw_fit(const struct ieee80211_freq_range *freq_range, -- u32 center_freq_khz, u32 bw_khz) --{ -- u32 start_freq_khz, end_freq_khz; -- -- start_freq_khz = center_freq_khz - (bw_khz/2); -- end_freq_khz = center_freq_khz + (bw_khz/2); -- -- if (start_freq_khz >= freq_range->start_freq_khz && -- end_freq_khz <= freq_range->end_freq_khz) -- return true; -- -- return false; --} -- - /** - * freq_in_rule_band - tells us if a frequency is in a frequency band - * @freq_range: frequency rule we want to query -@@ -1070,7 +1055,7 @@ freq_reg_info_regd(u32 center_freq, - if (!band_rule_found) - band_rule_found = freq_in_rule_band(fr, center_freq); - -- bw_fits = reg_does_bw_fit(fr, center_freq, bw); -+ bw_fits = cfg80211_does_bw_fit_range(fr, center_freq, bw); - - if (band_rule_found && bw_fits) - return rr; -@@ -1138,11 +1123,13 @@ static uint32_t reg_rule_to_chan_bw_flag - max_bandwidth_khz = reg_get_max_bandwidth(regd, reg_rule); - - /* If we get a reg_rule we can assume that at least 5Mhz fit */ -- if (!reg_does_bw_fit(freq_range, MHZ_TO_KHZ(chan->center_freq), -- MHZ_TO_KHZ(10))) -+ if (!cfg80211_does_bw_fit_range(freq_range, -+ MHZ_TO_KHZ(chan->center_freq), -+ MHZ_TO_KHZ(10))) - bw_flags |= IEEE80211_CHAN_NO_10MHZ; -- if (!reg_does_bw_fit(freq_range, MHZ_TO_KHZ(chan->center_freq), -- MHZ_TO_KHZ(20))) -+ if (!cfg80211_does_bw_fit_range(freq_range, -+ MHZ_TO_KHZ(chan->center_freq), -+ MHZ_TO_KHZ(20))) - bw_flags |= IEEE80211_CHAN_NO_20MHZ; - - if (max_bandwidth_khz < MHZ_TO_KHZ(10)) ---- a/net/wireless/util.c -+++ b/net/wireless/util.c -@@ -1788,6 +1788,21 @@ void cfg80211_free_nan_func(struct cfg80 - } - EXPORT_SYMBOL(cfg80211_free_nan_func); - -+bool cfg80211_does_bw_fit_range(const struct ieee80211_freq_range *freq_range, -+ u32 center_freq_khz, u32 bw_khz) -+{ -+ u32 start_freq_khz, end_freq_khz; -+ -+ start_freq_khz = center_freq_khz - (bw_khz / 2); -+ end_freq_khz = center_freq_khz + (bw_khz / 2); -+ -+ if (start_freq_khz >= freq_range->start_freq_khz && -+ end_freq_khz <= freq_range->end_freq_khz) -+ return true; -+ -+ return false; -+} -+ - /* See IEEE 802.1H for LLC/SNAP encapsulation/decapsulation */ - /* Ethernet-II snap header (RFC1042 for most EtherTypes) */ - const unsigned char rfc1042_header[] __aligned(2) = diff --git a/package/kernel/mac80211/patches/347-0002-cfg80211-support-ieee80211-freq-limit-DT-property.patch b/package/kernel/mac80211/patches/347-0002-cfg80211-support-ieee80211-freq-limit-DT-property.patch deleted file mode 100644 index 3e1aae72db..0000000000 --- a/package/kernel/mac80211/patches/347-0002-cfg80211-support-ieee80211-freq-limit-DT-property.patch +++ /dev/null @@ -1,211 +0,0 @@ -From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= -Date: Wed, 4 Jan 2017 18:58:31 +0100 -Subject: [PATCH] cfg80211: support ieee80211-freq-limit DT property -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -This patch adds a helper for reading that new property and applying -limitations of supported channels specified this way. -It is used with devices that normally support a wide wireless band but -in a given config are limited to some part of it (usually due to board -design). For example a dual-band chipset may be able to support one band -only because of used antennas. -It's also common that tri-band routers have separated radios for lower -and higher part of 5 GHz band and it may be impossible to say which is -which without a DT info. - -Signed-off-by: Rafał Miłecki -[add new function to documentation, fix link] -Signed-off-by: Johannes Berg ---- - create mode 100644 net/wireless/of.c - ---- a/include/net/cfg80211.h -+++ b/include/net/cfg80211.h -@@ -311,6 +311,34 @@ struct ieee80211_supported_band { - struct ieee80211_sta_vht_cap vht_cap; - }; - -+/** -+ * wiphy_read_of_freq_limits - read frequency limits from device tree -+ * -+ * @wiphy: the wireless device to get extra limits for -+ * -+ * Some devices may have extra limitations specified in DT. This may be useful -+ * for chipsets that normally support more bands but are limited due to board -+ * design (e.g. by antennas or external power amplifier). -+ * -+ * This function reads info from DT and uses it to *modify* channels (disable -+ * unavailable ones). It's usually a *bad* idea to use it in drivers with -+ * shared channel data as DT limitations are device specific. You should make -+ * sure to call it only if channels in wiphy are copied and can be modified -+ * without affecting other devices. -+ * -+ * As this function access device node it has to be called after set_wiphy_dev. -+ * It also modifies channels so they have to be set first. -+ * If using this helper, call it before wiphy_register(). -+ */ -+#ifdef CONFIG_OF -+void wiphy_read_of_freq_limits(struct wiphy *wiphy); -+#else /* CONFIG_OF */ -+static inline void wiphy_read_of_freq_limits(struct wiphy *wiphy) -+{ -+} -+#endif /* !CONFIG_OF */ -+ -+ - /* - * Wireless hardware/device configuration structures and methods - */ ---- a/net/wireless/Makefile -+++ b/net/wireless/Makefile -@@ -11,6 +11,7 @@ obj-$(CONFIG_WEXT_PRIV) += wext-priv.o - - cfg80211-y += core.o sysfs.o radiotap.o util.o reg.o scan.o nl80211.o - cfg80211-y += mlme.o ibss.o sme.o chan.o ethtool.o mesh.o ap.o trace.o ocb.o -+cfg80211-$(CONFIG_OF) += of.o - cfg80211-$(CPTCFG_CFG80211_DEBUGFS) += debugfs.o - cfg80211-$(CPTCFG_CFG80211_WEXT) += wext-compat.o wext-sme.o - cfg80211-$(CPTCFG_CFG80211_INTERNAL_REGDB) += regdb.o ---- /dev/null -+++ b/net/wireless/of.c -@@ -0,0 +1,138 @@ -+/* -+ * Copyright (C) 2017 Rafał Miłecki -+ * -+ * Permission to use, copy, modify, and/or distribute this software for any -+ * purpose with or without fee is hereby granted, provided that the above -+ * copyright notice and this permission notice appear in all copies. -+ * -+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -+ */ -+ -+#include -+#include -+#include "core.h" -+ -+static bool wiphy_freq_limits_valid_chan(struct wiphy *wiphy, -+ struct ieee80211_freq_range *freq_limits, -+ unsigned int n_freq_limits, -+ struct ieee80211_channel *chan) -+{ -+ u32 bw = MHZ_TO_KHZ(20); -+ int i; -+ -+ for (i = 0; i < n_freq_limits; i++) { -+ struct ieee80211_freq_range *limit = &freq_limits[i]; -+ -+ if (cfg80211_does_bw_fit_range(limit, -+ MHZ_TO_KHZ(chan->center_freq), -+ bw)) -+ return true; -+ } -+ -+ return false; -+} -+ -+static void wiphy_freq_limits_apply(struct wiphy *wiphy, -+ struct ieee80211_freq_range *freq_limits, -+ unsigned int n_freq_limits) -+{ -+ enum nl80211_band band; -+ int i; -+ -+ if (WARN_ON(!n_freq_limits)) -+ return; -+ -+ for (band = 0; band < NUM_NL80211_BANDS; band++) { -+ struct ieee80211_supported_band *sband = wiphy->bands[band]; -+ -+ if (!sband) -+ continue; -+ -+ for (i = 0; i < sband->n_channels; i++) { -+ struct ieee80211_channel *chan = &sband->channels[i]; -+ -+ if (chan->flags & IEEE80211_CHAN_DISABLED) -+ continue; -+ -+ if (!wiphy_freq_limits_valid_chan(wiphy, freq_limits, -+ n_freq_limits, -+ chan)) { -+ pr_debug("Disabling freq %d MHz as it's out of OF limits\n", -+ chan->center_freq); -+ chan->flags |= IEEE80211_CHAN_DISABLED; -+ } -+ } -+ } -+} -+ -+void wiphy_read_of_freq_limits(struct wiphy *wiphy) -+{ -+ struct device *dev = wiphy_dev(wiphy); -+ struct device_node *np; -+ struct property *prop; -+ struct ieee80211_freq_range *freq_limits; -+ unsigned int n_freq_limits; -+ const __be32 *p; -+ int len, i; -+ int err = 0; -+ -+ if (!dev) -+ return; -+ np = dev_of_node(dev); -+ if (!np) -+ return; -+ -+ prop = of_find_property(np, "ieee80211-freq-limit", &len); -+ if (!prop) -+ return; -+ -+ if (!len || len % sizeof(u32) || len / sizeof(u32) % 2) { -+ dev_err(dev, "ieee80211-freq-limit wrong format"); -+ return; -+ } -+ n_freq_limits = len / sizeof(u32) / 2; -+ -+ freq_limits = kcalloc(n_freq_limits, sizeof(*freq_limits), GFP_KERNEL); -+ if (!freq_limits) { -+ err = -ENOMEM; -+ goto out_kfree; -+ } -+ -+ p = NULL; -+ for (i = 0; i < n_freq_limits; i++) { -+ struct ieee80211_freq_range *limit = &freq_limits[i]; -+ -+ p = of_prop_next_u32(prop, p, &limit->start_freq_khz); -+ if (!p) { -+ err = -EINVAL; -+ goto out_kfree; -+ } -+ -+ p = of_prop_next_u32(prop, p, &limit->end_freq_khz); -+ if (!p) { -+ err = -EINVAL; -+ goto out_kfree; -+ } -+ -+ if (!limit->start_freq_khz || -+ !limit->end_freq_khz || -+ limit->start_freq_khz >= limit->end_freq_khz) { -+ err = -EINVAL; -+ goto out_kfree; -+ } -+ } -+ -+ wiphy_freq_limits_apply(wiphy, freq_limits, n_freq_limits); -+ -+out_kfree: -+ kfree(freq_limits); -+ if (err) -+ dev_err(dev, "Failed to get limits: %d\n", err); -+} -+EXPORT_SYMBOL(wiphy_read_of_freq_limits); diff --git a/package/kernel/mac80211/patches/347-ath9k-don-t-run-periodic-and-nf-calibation-at-the-sa.patch b/package/kernel/mac80211/patches/347-ath9k-don-t-run-periodic-and-nf-calibation-at-the-sa.patch deleted file mode 100644 index 529e1098b3..0000000000 --- a/package/kernel/mac80211/patches/347-ath9k-don-t-run-periodic-and-nf-calibation-at-the-sa.patch +++ /dev/null @@ -1,26 +0,0 @@ -From: Felix Fietkau -Date: Tue, 27 Dec 2016 23:16:23 +0100 -Subject: [PATCH] ath9k: don't run periodic and nf calibation at the same time - -The checks already prevents periodic cal from being started while noise -floor calibration runs. It is missing checks for the other way around. - -Signed-off-by: Felix Fietkau ---- - ---- a/drivers/net/wireless/ath/ath9k/ar9002_calib.c -+++ b/drivers/net/wireless/ath/ath9k/ar9002_calib.c -@@ -676,10 +676,10 @@ static int ar9002_hw_calibrate(struct at - return 0; - - ah->cal_list_curr = currCal = currCal->calNext; -- if (currCal->calState == CAL_WAITING) { -+ if (currCal->calState == CAL_WAITING) - ath9k_hw_reset_calibration(ah, currCal); -- return 0; -- } -+ -+ return 0; - } - - /* Do NF cal only at longer intervals */ diff --git a/package/kernel/mac80211/patches/400-ath_move_debug_code.patch b/package/kernel/mac80211/patches/400-ath_move_debug_code.patch index a5e1f067c5..ed65053d77 100644 --- a/package/kernel/mac80211/patches/400-ath_move_debug_code.patch +++ b/package/kernel/mac80211/patches/400-ath_move_debug_code.patch @@ -11,7 +11,7 @@ -ath-$(CPTCFG_ATH_DEBUG) += debug.o ath-$(CPTCFG_ATH_TRACEPOINTS) += trace.o - ccflags-y += -D__CHECK_ENDIAN__ + CFLAGS_trace.o := -I$(src) --- a/drivers/net/wireless/ath/ath.h +++ b/drivers/net/wireless/ath/ath.h @@ -318,14 +318,7 @@ void _ath_dbg(struct ath_common *common, diff --git a/package/kernel/mac80211/patches/402-ath_regd_optional.patch b/package/kernel/mac80211/patches/402-ath_regd_optional.patch index 7a7c2d4174..0d6d3dbdbd 100644 --- a/package/kernel/mac80211/patches/402-ath_regd_optional.patch +++ b/package/kernel/mac80211/patches/402-ath_regd_optional.patch @@ -49,7 +49,7 @@ if (!wiphy->bands[NL80211_BAND_5GHZ]) return; -@@ -633,6 +647,10 @@ ath_regd_init_wiphy(struct ath_regulator +@@ -634,6 +648,10 @@ ath_regd_init_wiphy(struct ath_regulator const struct ieee80211_regdomain *regd; wiphy->reg_notifier = reg_notifier; @@ -74,7 +74,7 @@ ---help--- --- a/.local-symbols +++ b/.local-symbols -@@ -127,6 +127,7 @@ ADM8211= +@@ -130,6 +130,7 @@ ADM8211= ATH_COMMON= WLAN_VENDOR_ATH= ATH_DEBUG= diff --git a/package/kernel/mac80211/patches/404-regd_no_assoc_hints.patch b/package/kernel/mac80211/patches/404-regd_no_assoc_hints.patch index 1ef55456c5..469da90160 100644 --- a/package/kernel/mac80211/patches/404-regd_no_assoc_hints.patch +++ b/package/kernel/mac80211/patches/404-regd_no_assoc_hints.patch @@ -1,6 +1,6 @@ --- a/net/wireless/reg.c +++ b/net/wireless/reg.c -@@ -2411,6 +2411,8 @@ void regulatory_hint_country_ie(struct w +@@ -2398,6 +2398,8 @@ void regulatory_hint_country_ie(struct w enum environment_cap env = ENVIRON_ANY; struct regulatory_request *request = NULL, *lr; @@ -9,7 +9,7 @@ /* IE len must be evenly divisible by 2 */ if (country_ie_len & 0x01) return; -@@ -2617,6 +2619,7 @@ static void restore_regulatory_settings( +@@ -2604,6 +2606,7 @@ static void restore_regulatory_settings( void regulatory_hint_disconnect(void) { diff --git a/package/kernel/mac80211/patches/406-ath_relax_default_regd.patch b/package/kernel/mac80211/patches/406-ath_relax_default_regd.patch index 5b20b4518e..b6190b9363 100644 --- a/package/kernel/mac80211/patches/406-ath_relax_default_regd.patch +++ b/package/kernel/mac80211/patches/406-ath_relax_default_regd.patch @@ -39,7 +39,7 @@ bool ath_is_world_regd(struct ath_regulatory *reg) { return is_wwr_sku(ath_regd_get_eepromRD(reg)); -@@ -651,6 +659,9 @@ ath_regd_init_wiphy(struct ath_regulator +@@ -652,6 +660,9 @@ ath_regd_init_wiphy(struct ath_regulator if (IS_ENABLED(CPTCFG_ATH_USER_REGD)) return 0; diff --git a/package/kernel/mac80211/patches/410-ath9k_allow_adhoc_and_ap.patch b/package/kernel/mac80211/patches/410-ath9k_allow_adhoc_and_ap.patch index 0fc30bb868..86f96e8e97 100644 --- a/package/kernel/mac80211/patches/410-ath9k_allow_adhoc_and_ap.patch +++ b/package/kernel/mac80211/patches/410-ath9k_allow_adhoc_and_ap.patch @@ -1,10 +1,10 @@ --- a/drivers/net/wireless/ath/ath9k/init.c +++ b/drivers/net/wireless/ath/ath9k/init.c -@@ -773,6 +773,7 @@ static const struct ieee80211_iface_limi +@@ -777,6 +777,7 @@ static const struct ieee80211_iface_limi BIT(NL80211_IFTYPE_AP) }, { .max = 1, .types = BIT(NL80211_IFTYPE_P2P_CLIENT) | BIT(NL80211_IFTYPE_P2P_GO) }, + { .max = 1, .types = BIT(NL80211_IFTYPE_ADHOC) }, }; - static const struct ieee80211_iface_limit wds_limits[] = { + #ifdef CPTCFG_WIRELESS_WDS diff --git a/package/kernel/mac80211/patches/440-ath5k_channel_bw_debugfs.patch b/package/kernel/mac80211/patches/440-ath5k_channel_bw_debugfs.patch index 924b62e0d4..1d249a9723 100644 --- a/package/kernel/mac80211/patches/440-ath5k_channel_bw_debugfs.patch +++ b/package/kernel/mac80211/patches/440-ath5k_channel_bw_debugfs.patch @@ -11,7 +11,7 @@ drivers/net/wireless/ath/ath5k/debug.c | 86 ++++++++++++++++++++++++++++++++ --- a/drivers/net/wireless/ath/ath5k/debug.c +++ b/drivers/net/wireless/ath/ath5k/debug.c -@@ -823,6 +823,97 @@ static const struct file_operations fops +@@ -822,6 +822,97 @@ static const struct file_operations fops .llseek = default_llseek, }; @@ -109,7 +109,7 @@ drivers/net/wireless/ath/ath5k/debug.c | 86 ++++++++++++++++++++++++++++++++ /* debugfs: queues etc */ -@@ -1010,6 +1101,9 @@ ath5k_debug_init_device(struct ath5k_hw +@@ -1009,6 +1100,9 @@ ath5k_debug_init_device(struct ath5k_hw debugfs_create_file("beacon", S_IWUSR | S_IRUSR, phydir, ah, &fops_beacon); diff --git a/package/kernel/mac80211/patches/501-ath9k_ahb_init.patch b/package/kernel/mac80211/patches/501-ath9k_ahb_init.patch index 4f52c12389..d076e3c2eb 100644 --- a/package/kernel/mac80211/patches/501-ath9k_ahb_init.patch +++ b/package/kernel/mac80211/patches/501-ath9k_ahb_init.patch @@ -1,6 +1,6 @@ --- a/drivers/net/wireless/ath/ath9k/init.c +++ b/drivers/net/wireless/ath/ath9k/init.c -@@ -1076,23 +1076,23 @@ static int __init ath9k_init(void) +@@ -1086,23 +1086,23 @@ static int __init ath9k_init(void) { int error; diff --git a/package/kernel/mac80211/patches/513-ath9k_add_pci_ids.patch b/package/kernel/mac80211/patches/513-ath9k_add_pci_ids.patch index 78b22e71a9..59daf4fe11 100644 --- a/package/kernel/mac80211/patches/513-ath9k_add_pci_ids.patch +++ b/package/kernel/mac80211/patches/513-ath9k_add_pci_ids.patch @@ -20,7 +20,7 @@ #define AR9160_DEVID_PCI 0x0027 --- a/drivers/net/wireless/ath/ath9k/pci.c +++ b/drivers/net/wireless/ath/ath9k/pci.c -@@ -760,6 +760,7 @@ static const struct pci_device_id ath_pc +@@ -763,6 +763,7 @@ static const struct pci_device_id ath_pc .driver_data = ATH9K_PCI_BT_ANT_DIV }, #endif diff --git a/package/kernel/mac80211/patches/522-mac80211_configure_antenna_gain.patch b/package/kernel/mac80211/patches/522-mac80211_configure_antenna_gain.patch index 6e4962b09d..9a0f6f5dbd 100644 --- a/package/kernel/mac80211/patches/522-mac80211_configure_antenna_gain.patch +++ b/package/kernel/mac80211/patches/522-mac80211_configure_antenna_gain.patch @@ -1,6 +1,6 @@ --- a/include/net/cfg80211.h +++ b/include/net/cfg80211.h -@@ -2562,6 +2562,7 @@ struct cfg80211_nan_func { +@@ -2660,6 +2660,7 @@ struct cfg80211_nan_func { * (as advertised by the nl80211 feature flag.) * @get_tx_power: store the current TX power into the dbm variable; * return 0 if successful @@ -8,7 +8,7 @@ * * @set_wds_peer: set the WDS peer for a WDS interface * -@@ -2836,6 +2837,7 @@ struct cfg80211_ops { +@@ -2940,6 +2941,7 @@ struct cfg80211_ops { enum nl80211_tx_power_setting type, int mbm); int (*get_tx_power)(struct wiphy *wiphy, struct wireless_dev *wdev, int *dbm); @@ -18,7 +18,7 @@ const u8 *addr); --- a/include/net/mac80211.h +++ b/include/net/mac80211.h -@@ -1319,6 +1319,7 @@ enum ieee80211_smps_mode { +@@ -1325,6 +1325,7 @@ enum ieee80211_smps_mode { * * @power_level: requested transmit power (in dBm), backward compatibility * value only that is set to the minimum of all interfaces @@ -26,7 +26,7 @@ * * @chandef: the channel definition to tune to * @radar_enabled: whether radar detection is enabled -@@ -1339,6 +1340,7 @@ enum ieee80211_smps_mode { +@@ -1345,6 +1346,7 @@ enum ieee80211_smps_mode { struct ieee80211_conf { u32 flags; int power_level, dynamic_ps_timeout; @@ -36,9 +36,9 @@ u8 ps_dtim_period; --- a/include/uapi/linux/nl80211.h +++ b/include/uapi/linux/nl80211.h -@@ -1937,6 +1937,9 @@ enum nl80211_commands { - * @NL80211_ATTR_NAN_MATCH: used to report a match. This is a nested attribute. - * See &enum nl80211_nan_match_attributes. +@@ -2002,6 +2002,9 @@ enum nl80211_commands { + * u32 attribute with an &enum nl80211_timeout_reason value. This is used, + * e.g., with %NL80211_CMD_CONNECT event. * + * @NL80211_ATTR_WIPHY_ANTENNA_GAIN: Configured antenna gain. Used to reduce + * transmit power to stay within regulatory limits. u32, dBi. @@ -46,9 +46,9 @@ * @NUM_NL80211_ATTR: total number of nl80211_attrs available * @NL80211_ATTR_MAX: highest attribute number currently defined * @__NL80211_ATTR_AFTER_LAST: internal use -@@ -2336,6 +2339,8 @@ enum nl80211_attrs { - NL80211_ATTR_NAN_FUNC, - NL80211_ATTR_NAN_MATCH, +@@ -2413,6 +2416,8 @@ enum nl80211_attrs { + + NL80211_ATTR_TIMEOUT_REASON, + NL80211_ATTR_WIPHY_ANTENNA_GAIN, + @@ -57,7 +57,7 @@ __NL80211_ATTR_AFTER_LAST, --- a/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c -@@ -2406,6 +2406,19 @@ static int ieee80211_get_tx_power(struct +@@ -2396,6 +2396,19 @@ static int ieee80211_get_tx_power(struct return 0; } @@ -77,7 +77,7 @@ static int ieee80211_set_wds_peer(struct wiphy *wiphy, struct net_device *dev, const u8 *addr) { -@@ -3633,6 +3646,7 @@ const struct cfg80211_ops mac80211_confi +@@ -3627,6 +3640,7 @@ const struct cfg80211_ops mac80211_confi .set_wiphy_params = ieee80211_set_wiphy_params, .set_tx_power = ieee80211_set_tx_power, .get_tx_power = ieee80211_get_tx_power, @@ -87,7 +87,7 @@ CFG80211_TESTMODE_CMD(ieee80211_testmode_cmd) --- a/net/mac80211/ieee80211_i.h +++ b/net/mac80211/ieee80211_i.h -@@ -1363,6 +1363,7 @@ struct ieee80211_local { +@@ -1370,6 +1370,7 @@ struct ieee80211_local { int dynamic_ps_forced_timeout; int user_power_level; /* in dBm, for all interfaces */ @@ -119,7 +119,7 @@ if (local->hw.conf.power_level != power) { changed |= IEEE80211_CONF_CHANGE_POWER; local->hw.conf.power_level = power; -@@ -588,6 +594,7 @@ struct ieee80211_hw *ieee80211_alloc_hw_ +@@ -589,6 +595,7 @@ struct ieee80211_hw *ieee80211_alloc_hw_ IEEE80211_RADIOTAP_MCS_HAVE_BW; local->hw.radiotap_vht_details = IEEE80211_RADIOTAP_VHT_KNOWN_GI | IEEE80211_RADIOTAP_VHT_KNOWN_BANDWIDTH; @@ -129,15 +129,15 @@ local->user_power_level = IEEE80211_UNSET_POWER_LEVEL; --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c -@@ -416,6 +416,7 @@ static const struct nla_policy nl80211_p - [NL80211_ATTR_NAN_MASTER_PREF] = { .type = NLA_U8 }, - [NL80211_ATTR_NAN_DUAL] = { .type = NLA_U8 }, - [NL80211_ATTR_NAN_FUNC] = { .type = NLA_NESTED }, +@@ -424,6 +424,7 @@ static const struct nla_policy nl80211_p + .len = sizeof(struct nl80211_bss_select_rssi_adjust) + }, + [NL80211_ATTR_TIMEOUT_REASON] = { .type = NLA_U32 }, + [NL80211_ATTR_WIPHY_ANTENNA_GAIN] = { .type = NLA_U32 }, }; /* policy for the key attributes */ -@@ -2353,6 +2354,20 @@ static int nl80211_set_wiphy(struct sk_b +@@ -2385,6 +2386,20 @@ static int nl80211_set_wiphy(struct sk_b if (result) return result; } diff --git a/package/kernel/mac80211/patches/530-ath9k_extra_leds.patch b/package/kernel/mac80211/patches/530-ath9k_extra_leds.patch index 3fbe316690..b3b51b4433 100644 --- a/package/kernel/mac80211/patches/530-ath9k_extra_leds.patch +++ b/package/kernel/mac80211/patches/530-ath9k_extra_leds.patch @@ -1,6 +1,6 @@ --- a/drivers/net/wireless/ath/ath9k/ath9k.h +++ b/drivers/net/wireless/ath/ath9k/ath9k.h -@@ -827,6 +827,9 @@ static inline int ath9k_dump_btcoex(stru +@@ -850,6 +850,9 @@ static inline int ath9k_dump_btcoex(stru #ifdef CPTCFG_MAC80211_LEDS void ath_init_leds(struct ath_softc *sc); void ath_deinit_leds(struct ath_softc *sc); @@ -10,9 +10,9 @@ #else static inline void ath_init_leds(struct ath_softc *sc) { -@@ -963,6 +966,13 @@ void ath_ant_comb_scan(struct ath_softc - - #define ATH9K_NUM_CHANCTX 2 /* supports 2 operating channels */ +@@ -991,6 +994,13 @@ void ath_ant_comb_scan(struct ath_softc + #define AIRTIME_USE_NEW_QUEUES BIT(2) + #define AIRTIME_ACTIVE(flags) (!!(flags & (AIRTIME_USE_TX|AIRTIME_USE_RX))) +struct ath_led { + struct list_head list; @@ -24,7 +24,7 @@ struct ath_softc { struct ieee80211_hw *hw; struct device *dev; -@@ -1015,9 +1025,8 @@ struct ath_softc { +@@ -1046,9 +1056,8 @@ struct ath_softc { spinlock_t chan_lock; #ifdef CPTCFG_MAC80211_LEDS @@ -103,8 +103,7 @@ + GFP_KERNEL); + if (!led) + return -ENOMEM; - -- ath9k_hw_set_gpio(sc->sc_ah, sc->sc_ah->led_pin, val); ++ + led->gpio = gpio = (struct gpio_led *) (led + 1); + _name = (char *) (led->gpio + 1); + @@ -117,7 +116,8 @@ + ret = ath_add_led(sc, led); + if (unlikely(ret < 0)) + kfree(led); -+ + +- ath9k_hw_set_gpio(sc->sc_ah, sc->sc_ah->led_pin, val); + return ret; } @@ -125,11 +125,11 @@ { - if (!sc->led_registered) - return; -- -- ath_led_brightness(&sc->led_cdev, LED_OFF); -- led_classdev_unregister(&sc->led_cdev); + struct ath_led *led; +- ath_led_brightness(&sc->led_cdev, LED_OFF); +- led_classdev_unregister(&sc->led_cdev); +- - ath9k_hw_gpio_free(sc->sc_ah, sc->sc_ah->led_pin); + while (!list_empty(&sc->leds)) { + led = list_first_entry(&sc->leds, struct ath_led, list); @@ -181,7 +181,7 @@ --- a/drivers/net/wireless/ath/ath9k/init.c +++ b/drivers/net/wireless/ath/ath9k/init.c -@@ -988,7 +988,7 @@ int ath9k_init_device(u16 devid, struct +@@ -998,7 +998,7 @@ int ath9k_init_device(u16 devid, struct #ifdef CPTCFG_MAC80211_LEDS /* must be initialized before ieee80211_register_hw */ diff --git a/package/kernel/mac80211/patches/542-ath9k_debugfs_diag.patch b/package/kernel/mac80211/patches/542-ath9k_debugfs_diag.patch index 08acc0e0c9..3e687792da 100644 --- a/package/kernel/mac80211/patches/542-ath9k_debugfs_diag.patch +++ b/package/kernel/mac80211/patches/542-ath9k_debugfs_diag.patch @@ -94,7 +94,7 @@ struct ath_gen_timer *ath_gen_timer_alloc(struct ath_hw *ah, --- a/drivers/net/wireless/ath/ath9k/hw.c +++ b/drivers/net/wireless/ath/ath9k/hw.c -@@ -1838,6 +1838,20 @@ u32 ath9k_hw_get_tsf_offset(struct times +@@ -1842,6 +1842,20 @@ u32 ath9k_hw_get_tsf_offset(struct times } EXPORT_SYMBOL(ath9k_hw_get_tsf_offset); @@ -115,7 +115,7 @@ int ath9k_hw_reset(struct ath_hw *ah, struct ath9k_channel *chan, struct ath9k_hw_cal_data *caldata, bool fastcc) { -@@ -2046,6 +2060,7 @@ int ath9k_hw_reset(struct ath_hw *ah, st +@@ -2050,6 +2064,7 @@ int ath9k_hw_reset(struct ath_hw *ah, st ar9003_hw_disable_phy_restart(ah); ath9k_hw_apply_gpio_override(ah); @@ -125,7 +125,7 @@ REG_SET_BIT(ah, AR_BTCOEX_WL_LNADIV, AR_BTCOEX_WL_LNADIV_FORCE_ON); --- a/drivers/net/wireless/ath/ath9k/main.c +++ b/drivers/net/wireless/ath/ath9k/main.c -@@ -533,6 +533,11 @@ irqreturn_t ath_isr(int irq, void *dev) +@@ -527,6 +527,11 @@ irqreturn_t ath_isr(int irq, void *dev) if (test_bit(ATH_OP_HW_RESET, &common->op_flags)) return IRQ_HANDLED; diff --git a/package/kernel/mac80211/patches/543-ath9k_entropy_from_adc.patch b/package/kernel/mac80211/patches/543-ath9k_entropy_from_adc.patch index 237c3217a1..6f7370203b 100644 --- a/package/kernel/mac80211/patches/543-ath9k_entropy_from_adc.patch +++ b/package/kernel/mac80211/patches/543-ath9k_entropy_from_adc.patch @@ -55,7 +55,7 @@ ops->spectral_scan_config = ar9003_hw_spectral_scan_config; --- a/drivers/net/wireless/ath/ath9k/init.c +++ b/drivers/net/wireless/ath/ath9k/init.c -@@ -761,7 +761,8 @@ static void ath9k_init_txpower_limits(st +@@ -765,7 +765,8 @@ static void ath9k_init_txpower_limits(st if (ah->caps.hw_caps & ATH9K_HW_CAP_5GHZ) ath9k_init_band_txpower(sc, NL80211_BAND_5GHZ); @@ -65,7 +65,7 @@ } static const struct ieee80211_iface_limit if_limits[] = { -@@ -948,6 +949,18 @@ static void ath9k_set_hw_capab(struct at +@@ -958,6 +959,18 @@ static void ath9k_set_hw_capab(struct at SET_IEEE80211_PERM_ADDR(hw, common->macaddr); } @@ -84,7 +84,7 @@ int ath9k_init_device(u16 devid, struct ath_softc *sc, const struct ath_bus_ops *bus_ops) { -@@ -993,6 +1006,8 @@ int ath9k_init_device(u16 devid, struct +@@ -1003,6 +1016,8 @@ int ath9k_init_device(u16 devid, struct ARRAY_SIZE(ath9k_tpt_blink)); #endif diff --git a/package/kernel/mac80211/patches/544-ath9k-ar933x-usb-hang-workaround.patch b/package/kernel/mac80211/patches/544-ath9k-ar933x-usb-hang-workaround.patch index 200a3a28f6..680bb6d590 100644 --- a/package/kernel/mac80211/patches/544-ath9k-ar933x-usb-hang-workaround.patch +++ b/package/kernel/mac80211/patches/544-ath9k-ar933x-usb-hang-workaround.patch @@ -40,7 +40,7 @@ return true; } -@@ -1816,8 +1835,14 @@ static int ath9k_hw_do_fastcc(struct ath +@@ -1820,8 +1839,14 @@ static int ath9k_hw_do_fastcc(struct ath if (AR_SREV_9271(ah)) ar9002_hw_load_ani_reg(ah, chan); @@ -55,7 +55,7 @@ return -EINVAL; } -@@ -2071,6 +2096,9 @@ int ath9k_hw_reset(struct ath_hw *ah, st +@@ -2075,6 +2100,9 @@ int ath9k_hw_reset(struct ath_hw *ah, st ath9k_hw_set_radar_params(ah); } diff --git a/package/kernel/mac80211/patches/548-ath9k_enable_gpio_chip.patch b/package/kernel/mac80211/patches/548-ath9k_enable_gpio_chip.patch index 1330dfed8b..d4269282d9 100644 --- a/package/kernel/mac80211/patches/548-ath9k_enable_gpio_chip.patch +++ b/package/kernel/mac80211/patches/548-ath9k_enable_gpio_chip.patch @@ -18,7 +18,7 @@ Signed-off-by: Felix Fietkau #include "common.h" #include "debug.h" -@@ -973,6 +974,14 @@ struct ath_led { +@@ -1001,6 +1002,14 @@ struct ath_led { struct led_classdev cdev; }; @@ -33,7 +33,7 @@ Signed-off-by: Felix Fietkau struct ath_softc { struct ieee80211_hw *hw; struct device *dev; -@@ -1027,6 +1036,9 @@ struct ath_softc { +@@ -1058,6 +1067,9 @@ struct ath_softc { #ifdef CPTCFG_MAC80211_LEDS const char *led_default_trigger; struct list_head leds; @@ -123,6 +123,7 @@ Signed-off-by: Felix Fietkau + if (!gc) + return; + ++ gc->sc = sc; + snprintf(gc->label, sizeof(gc->label), "ath9k-%s", + wiphy_name(sc->hw->wiphy)); +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,5,0) @@ -146,7 +147,6 @@ Signed-off-by: Felix Fietkau + + gc->gchip.owner = NULL; + sc->gpiochip = gc; -+ gc->sc = sc; +} + +/* remove GPIO chip */ diff --git a/package/kernel/mac80211/patches/549-ath9k_enable_gpio_buttons.patch b/package/kernel/mac80211/patches/549-ath9k_enable_gpio_buttons.patch index f86b0152ea..f40bac93c3 100644 --- a/package/kernel/mac80211/patches/549-ath9k_enable_gpio_buttons.patch +++ b/package/kernel/mac80211/patches/549-ath9k_enable_gpio_buttons.patch @@ -10,7 +10,7 @@ Signed-off-by: Felix Fietkau --- --- a/drivers/net/wireless/ath/ath9k/ath9k.h +++ b/drivers/net/wireless/ath/ath9k/ath9k.h -@@ -1038,6 +1038,7 @@ struct ath_softc { +@@ -1069,6 +1069,7 @@ struct ath_softc { struct list_head leds; #ifdef CONFIG_GPIOLIB struct ath9k_gpio_chip *gpiochip; diff --git a/package/kernel/mac80211/patches/550-ath9k-Add-a-define-for-the-EEPROM-eepmisc-endianness.patch b/package/kernel/mac80211/patches/550-ath9k-Add-a-define-for-the-EEPROM-eepmisc-endianness.patch deleted file mode 100644 index a17f95682f..0000000000 --- a/package/kernel/mac80211/patches/550-ath9k-Add-a-define-for-the-EEPROM-eepmisc-endianness.patch +++ /dev/null @@ -1,95 +0,0 @@ -From 9692ab1ff30ae0abc1000d11b2f929b6e2e4cb7f Mon Sep 17 00:00:00 2001 -From: Martin Blumenstingl -Date: Mon, 3 Oct 2016 00:29:07 +0200 -Subject: [v2 PATCH 1/7] ath9k: Add a #define for the EEPROM "eepmisc" endianness - bit - -This replaces a magic number with a named #define. Additionally it -removes two "eeprom format" specific #defines for the "big endianness" -bit which are the same on all eeprom formats. - -Signed-off-by: Martin Blumenstingl ---- - drivers/net/wireless/ath/ath9k/ar9003_eeprom.c | 3 ++- - drivers/net/wireless/ath/ath9k/ar9003_eeprom.h | 1 - - drivers/net/wireless/ath/ath9k/eeprom.h | 4 +++- - drivers/net/wireless/ath/ath9k/eeprom_4k.c | 2 +- - drivers/net/wireless/ath/ath9k/eeprom_9287.c | 2 +- - drivers/net/wireless/ath/ath9k/eeprom_def.c | 2 +- - 6 files changed, 8 insertions(+), 6 deletions(-) - ---- a/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c -+++ b/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c -@@ -3468,7 +3468,8 @@ static u32 ath9k_hw_ar9003_dump_eeprom(s - AR5416_OPFLAGS_N_5G_HT20)); - PR_EEP("Disable 5Ghz HT40", !!(pBase->opCapFlags.opFlags & - AR5416_OPFLAGS_N_5G_HT40)); -- PR_EEP("Big Endian", !!(pBase->opCapFlags.eepMisc & 0x01)); -+ PR_EEP("Big Endian", !!(pBase->opCapFlags.eepMisc & -+ AR5416_EEPMISC_BIG_ENDIAN)); - PR_EEP("RF Silent", pBase->rfSilent); - PR_EEP("BT option", pBase->blueToothOptions); - PR_EEP("Device Cap", pBase->deviceCap); ---- a/drivers/net/wireless/ath/ath9k/ar9003_eeprom.h -+++ b/drivers/net/wireless/ath/ath9k/ar9003_eeprom.h -@@ -38,7 +38,6 @@ - #define AR9300_NUM_CTLS_2G 12 - #define AR9300_NUM_BAND_EDGES_5G 8 - #define AR9300_NUM_BAND_EDGES_2G 4 --#define AR9300_EEPMISC_BIG_ENDIAN 0x01 - #define AR9300_EEPMISC_WOW 0x02 - #define AR9300_CUSTOMER_DATA_SIZE 20 - ---- a/drivers/net/wireless/ath/ath9k/eeprom.h -+++ b/drivers/net/wireless/ath/ath9k/eeprom.h -@@ -161,6 +161,9 @@ - #define AR5416_EEP_TXGAIN_ORIGINAL 0 - #define AR5416_EEP_TXGAIN_HIGH_POWER 1 - -+/* Endianness of EEPROM content */ -+#define AR5416_EEPMISC_BIG_ENDIAN 0x01 -+ - #define AR5416_EEP4K_START_LOC 64 - #define AR5416_EEP4K_NUM_2G_CAL_PIERS 3 - #define AR5416_EEP4K_NUM_2G_CCK_TARGET_POWERS 3 -@@ -191,7 +194,6 @@ - #define AR9287_NUM_CTLS 12 - #define AR9287_NUM_BAND_EDGES 4 - #define AR9287_PD_GAIN_ICEPTS 1 --#define AR9287_EEPMISC_BIG_ENDIAN 0x01 - #define AR9287_EEPMISC_WOW 0x02 - #define AR9287_MAX_CHAINS 2 - #define AR9287_ANT_16S 32 ---- a/drivers/net/wireless/ath/ath9k/eeprom_4k.c -+++ b/drivers/net/wireless/ath/ath9k/eeprom_4k.c -@@ -154,7 +154,7 @@ static u32 ath9k_hw_4k_dump_eeprom(struc - AR5416_OPFLAGS_N_5G_HT20)); - PR_EEP("Disable 5Ghz HT40", !!(pBase->opCapFlags & - AR5416_OPFLAGS_N_5G_HT40)); -- PR_EEP("Big Endian", !!(pBase->eepMisc & 0x01)); -+ PR_EEP("Big Endian", !!(pBase->eepMisc & AR5416_EEPMISC_BIG_ENDIAN)); - PR_EEP("Cal Bin Major Ver", (pBase->binBuildNumber >> 24) & 0xFF); - PR_EEP("Cal Bin Minor Ver", (pBase->binBuildNumber >> 16) & 0xFF); - PR_EEP("Cal Bin Build", (pBase->binBuildNumber >> 8) & 0xFF); ---- a/drivers/net/wireless/ath/ath9k/eeprom_9287.c -+++ b/drivers/net/wireless/ath/ath9k/eeprom_9287.c -@@ -150,7 +150,7 @@ static u32 ath9k_hw_ar9287_dump_eeprom(s - AR5416_OPFLAGS_N_5G_HT20)); - PR_EEP("Disable 5Ghz HT40", !!(pBase->opCapFlags & - AR5416_OPFLAGS_N_5G_HT40)); -- PR_EEP("Big Endian", !!(pBase->eepMisc & 0x01)); -+ PR_EEP("Big Endian", !!(pBase->eepMisc & AR5416_EEPMISC_BIG_ENDIAN)); - PR_EEP("Cal Bin Major Ver", (pBase->binBuildNumber >> 24) & 0xFF); - PR_EEP("Cal Bin Minor Ver", (pBase->binBuildNumber >> 16) & 0xFF); - PR_EEP("Cal Bin Build", (pBase->binBuildNumber >> 8) & 0xFF); ---- a/drivers/net/wireless/ath/ath9k/eeprom_def.c -+++ b/drivers/net/wireless/ath/ath9k/eeprom_def.c -@@ -232,7 +232,7 @@ static u32 ath9k_hw_def_dump_eeprom(stru - AR5416_OPFLAGS_N_5G_HT20)); - PR_EEP("Disable 5Ghz HT40", !!(pBase->opCapFlags & - AR5416_OPFLAGS_N_5G_HT40)); -- PR_EEP("Big Endian", !!(pBase->eepMisc & 0x01)); -+ PR_EEP("Big Endian", !!(pBase->eepMisc & AR5416_EEPMISC_BIG_ENDIAN)); - PR_EEP("Cal Bin Major Ver", (pBase->binBuildNumber >> 24) & 0xFF); - PR_EEP("Cal Bin Minor Ver", (pBase->binBuildNumber >> 16) & 0xFF); - PR_EEP("Cal Bin Build", (pBase->binBuildNumber >> 8) & 0xFF); diff --git a/package/kernel/mac80211/patches/550-ath9k-disable-bands-via-dt.patch b/package/kernel/mac80211/patches/550-ath9k-disable-bands-via-dt.patch new file mode 100644 index 0000000000..55f040f170 --- /dev/null +++ b/package/kernel/mac80211/patches/550-ath9k-disable-bands-via-dt.patch @@ -0,0 +1,15 @@ +--- a/drivers/net/wireless/ath/ath9k/init.c ++++ b/drivers/net/wireless/ath/ath9k/init.c +@@ -571,6 +571,12 @@ static int ath9k_of_init(struct ath_soft + + ath_dbg(common, CONFIG, "parsing configuration from OF node\n"); + ++ if (of_property_read_bool(np, "qca,disable-2ghz")) ++ ah->disable_2ghz = true; ++ ++ if (of_property_read_bool(np, "qca,disable-5ghz")) ++ ah->disable_5ghz = true; ++ + if (of_property_read_bool(np, "qca,no-eeprom")) { + /* ath9k-eeprom--.bin */ + scnprintf(eeprom_name, sizeof(eeprom_name), diff --git a/package/kernel/mac80211/patches/551-ath9k-indicate-that-the-AR9003-EEPROM-template-value.patch b/package/kernel/mac80211/patches/551-ath9k-indicate-that-the-AR9003-EEPROM-template-value.patch deleted file mode 100644 index a4a3595531..0000000000 --- a/package/kernel/mac80211/patches/551-ath9k-indicate-that-the-AR9003-EEPROM-template-value.patch +++ /dev/null @@ -1,78 +0,0 @@ -From e88ab4a2649d0fbf675193fb2c176f65375bdd2d Mon Sep 17 00:00:00 2001 -From: Martin Blumenstingl -Date: Mon, 3 Oct 2016 00:29:08 +0200 -Subject: [v2 PATCH 2/7] ath9k: indicate that the AR9003 EEPROM template values - are little endian - -The eepMisc field was not set explicitly. The default value of 0 means -that the values in the EEPROM (template) should be interpreted as little -endian. However, this is not clear until comparing the AR9003 code with -the other EEPROM formats. -To make the code easier to understand we explicitly state that the values -are little endian - there are no functional changes with this patch. - -Signed-off-by: Martin Blumenstingl ---- - drivers/net/wireless/ath/ath9k/ar9003_eeprom.c | 10 +++++----- - drivers/net/wireless/ath/ath9k/ar9003_eeprom.h | 3 +++ - 2 files changed, 8 insertions(+), 5 deletions(-) - ---- a/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c -+++ b/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c -@@ -53,7 +53,7 @@ static const struct ar9300_eeprom ar9300 - .txrxMask = 0x77, /* 4 bits tx and 4 bits rx */ - .opCapFlags = { - .opFlags = AR5416_OPFLAGS_11G | AR5416_OPFLAGS_11A, -- .eepMisc = 0, -+ .eepMisc = AR9300_EEPMISC_LITTLE_ENDIAN, - }, - .rfSilent = 0, - .blueToothOptions = 0, -@@ -631,7 +631,7 @@ static const struct ar9300_eeprom ar9300 - .txrxMask = 0x77, /* 4 bits tx and 4 bits rx */ - .opCapFlags = { - .opFlags = AR5416_OPFLAGS_11A, -- .eepMisc = 0, -+ .eepMisc = AR9300_EEPMISC_LITTLE_ENDIAN, - }, - .rfSilent = 0, - .blueToothOptions = 0, -@@ -1210,7 +1210,7 @@ static const struct ar9300_eeprom ar9300 - .txrxMask = 0x77, /* 4 bits tx and 4 bits rx */ - .opCapFlags = { - .opFlags = AR5416_OPFLAGS_11G | AR5416_OPFLAGS_11A, -- .eepMisc = 0, -+ .eepMisc = AR9300_EEPMISC_LITTLE_ENDIAN, - }, - .rfSilent = 0, - .blueToothOptions = 0, -@@ -1789,7 +1789,7 @@ static const struct ar9300_eeprom ar9300 - .txrxMask = 0x77, /* 4 bits tx and 4 bits rx */ - .opCapFlags = { - .opFlags = AR5416_OPFLAGS_11G | AR5416_OPFLAGS_11A, -- .eepMisc = 0, -+ .eepMisc = AR9300_EEPMISC_LITTLE_ENDIAN, - }, - .rfSilent = 0, - .blueToothOptions = 0, -@@ -2367,7 +2367,7 @@ static const struct ar9300_eeprom ar9300 - .txrxMask = 0x33, /* 4 bits tx and 4 bits rx */ - .opCapFlags = { - .opFlags = AR5416_OPFLAGS_11G | AR5416_OPFLAGS_11A, -- .eepMisc = 0, -+ .eepMisc = AR9300_EEPMISC_LITTLE_ENDIAN, - }, - .rfSilent = 0, - .blueToothOptions = 0, ---- a/drivers/net/wireless/ath/ath9k/ar9003_eeprom.h -+++ b/drivers/net/wireless/ath/ath9k/ar9003_eeprom.h -@@ -69,6 +69,9 @@ - #define AR9300_BASE_ADDR 0x3ff - #define AR9300_BASE_ADDR_512 0x1ff - -+/* AR5416_EEPMISC_BIG_ENDIAN not set indicates little endian */ -+#define AR9300_EEPMISC_LITTLE_ENDIAN 0 -+ - #define AR9300_OTP_BASE \ - ((AR_SREV_9340(ah) || AR_SREV_9550(ah)) ? 0x30000 : 0x14000) - #define AR9300_OTP_STATUS \ diff --git a/package/kernel/mac80211/patches/551-ath9k_ubnt_uap_plus_hsr.patch b/package/kernel/mac80211/patches/551-ath9k_ubnt_uap_plus_hsr.patch new file mode 100644 index 0000000000..45284c71ee --- /dev/null +++ b/package/kernel/mac80211/patches/551-ath9k_ubnt_uap_plus_hsr.patch @@ -0,0 +1,418 @@ +--- a/drivers/net/wireless/ath/ath9k/channel.c ++++ b/drivers/net/wireless/ath/ath9k/channel.c +@@ -15,6 +15,8 @@ + */ + + #include "ath9k.h" ++#include ++#include "hsr.h" + + /* Set/change channels. If the channel is really being changed, it's done + * by reseting the chip. To accomplish this we must first cleanup any pending +@@ -22,6 +24,7 @@ + */ + static int ath_set_channel(struct ath_softc *sc) + { ++ struct ath9k_platform_data *pdata = sc->dev->platform_data; + struct ath_hw *ah = sc->sc_ah; + struct ath_common *common = ath9k_hw_common(ah); + struct ieee80211_hw *hw = sc->hw; +@@ -41,6 +44,11 @@ static int ath_set_channel(struct ath_so + ath_dbg(common, CONFIG, "Set channel: %d MHz width: %d\n", + chan->center_freq, chandef->width); + ++ if (pdata && pdata->ubnt_hsr) { ++ ath9k_hsr_enable(ah, chandef->width, chan->center_freq); ++ ath9k_hsr_status(ah); ++ } ++ + /* update survey stats for the old channel before switching */ + spin_lock_bh(&common->cc_lock); + ath_update_survey_stats(sc); +--- /dev/null ++++ b/drivers/net/wireless/ath/ath9k/hsr.c +@@ -0,0 +1,247 @@ ++/* ++ * ++ * The MIT License (MIT) ++ * ++ * Copyright (c) 2015 Kirill Berezin ++ * ++ * Permission is hereby granted, free of charge, to any person obtaining a copy ++ * of this software and associated documentation files (the "Software"), to deal ++ * in the Software without restriction, including without limitation the rights ++ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell ++ * copies of the Software, and to permit persons to whom the Software is ++ * furnished to do so, subject to the following conditions: ++ * ++ * The above copyright notice and this permission notice shall be included in ++ * all copies or substantial portions of the Software. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR ++ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, ++ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE ++ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER ++ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, ++ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ * ++ */ ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#include "hw.h" ++#include "ath9k.h" ++ ++#define HSR_GPIO_CSN 8 ++#define HSR_GPIO_CLK 6 ++#define HSR_GPIO_DOUT 7 ++#define HSR_GPIO_DIN 5 ++ ++/* delays are in useconds */ ++#define HSR_DELAY_HALF_TICK 100 ++#define HSR_DELAY_PRE_WRITE 75 ++#define HSR_DELAY_FINAL 20000 ++#define HSR_DELAY_TRAILING 200 ++ ++void ath9k_hsr_init(struct ath_hw *ah) ++{ ++ ath9k_hw_gpio_request_in(ah, HSR_GPIO_DIN, NULL); ++ ath9k_hw_gpio_request_out(ah, HSR_GPIO_CSN, NULL, ++ AR_GPIO_OUTPUT_MUX_AS_OUTPUT); ++ ath9k_hw_gpio_request_out(ah, HSR_GPIO_CLK, NULL, ++ AR_GPIO_OUTPUT_MUX_AS_OUTPUT); ++ ath9k_hw_gpio_request_out(ah, HSR_GPIO_DOUT, NULL, ++ AR_GPIO_OUTPUT_MUX_AS_OUTPUT); ++ ++ ath9k_hw_set_gpio(ah, HSR_GPIO_CSN, 1); ++ ath9k_hw_set_gpio(ah, HSR_GPIO_CLK, 0); ++ ath9k_hw_set_gpio(ah, HSR_GPIO_DOUT, 0); ++ ++ udelay(HSR_DELAY_TRAILING); ++} ++ ++static u32 ath9k_hsr_write_byte(struct ath_hw *ah, int delay, u32 value) ++{ ++ struct ath_common *common = ath9k_hw_common(ah); ++ int i; ++ u32 rval = 0; ++ ++ udelay(delay); ++ ++ ath9k_hw_set_gpio(ah, HSR_GPIO_CLK, 0); ++ udelay(HSR_DELAY_HALF_TICK); ++ ++ ath9k_hw_set_gpio(ah, HSR_GPIO_CSN, 0); ++ udelay(HSR_DELAY_HALF_TICK); ++ ++ for (i = 0; i < 8; ++i) { ++ rval = rval << 1; ++ ++ /* pattern is left to right, that is 7-th bit runs first */ ++ ath9k_hw_set_gpio(ah, HSR_GPIO_DOUT, (value >> (7 - i)) & 0x1); ++ udelay(HSR_DELAY_HALF_TICK); ++ ++ ath9k_hw_set_gpio(ah, HSR_GPIO_CLK, 1); ++ udelay(HSR_DELAY_HALF_TICK); ++ ++ rval |= ath9k_hw_gpio_get(ah, HSR_GPIO_DIN); ++ ++ ath9k_hw_set_gpio(ah, HSR_GPIO_CLK, 0); ++ udelay(HSR_DELAY_HALF_TICK); ++ } ++ ++ ath9k_hw_set_gpio(ah, HSR_GPIO_CSN, 1); ++ udelay(HSR_DELAY_HALF_TICK); ++ ++ ath_dbg(common, CONFIG, "ath9k_hsr_write_byte: write byte %d return value is %d %c\n", ++ value, rval, rval > 32 ? rval : '-'); ++ ++ return rval & 0xff; ++} ++ ++static int ath9k_hsr_write_a_chain(struct ath_hw *ah, char *chain, int items) ++{ ++ int status = 0; ++ int i = 0; ++ int err; ++ ++ /* a preamble */ ++ ath9k_hsr_write_byte(ah, HSR_DELAY_PRE_WRITE, 0); ++ status = ath9k_hsr_write_byte(ah, HSR_DELAY_PRE_WRITE, 0); ++ ++ /* clear HSR's reply buffer */ ++ if (status) { ++ int loop = 0; ++ ++ for (loop = 0; (loop < 42) && status; ++loop) ++ status = ath9k_hsr_write_byte(ah, HSR_DELAY_PRE_WRITE, ++ 0); ++ ++ if (loop >= 42) { ++ ATH_DBG_WARN(1, ++ "ath9k_hsr_write_a_chain: can't clear an output buffer after a 42 cycles.\n"); ++ return -1; ++ } ++ } ++ ++ for (i = 0; (i < items) && (chain[i] != 0); ++i) ++ ath9k_hsr_write_byte(ah, HSR_DELAY_PRE_WRITE, (u32)chain[i]); ++ ++ ath9k_hsr_write_byte(ah, HSR_DELAY_PRE_WRITE, 0); ++ mdelay(HSR_DELAY_FINAL / 1000); ++ ++ /* reply */ ++ memset(chain, 0, items); ++ ++ ath9k_hsr_write_byte(ah, HSR_DELAY_PRE_WRITE, 0); ++ udelay(HSR_DELAY_TRAILING); ++ ++ for (i = 0; i < (items - 1); ++i) { ++ u32 ret; ++ ++ ret = ath9k_hsr_write_byte(ah, HSR_DELAY_PRE_WRITE, 0); ++ if (ret != 0) ++ chain[i] = (char)ret; ++ else ++ break; ++ ++ udelay(HSR_DELAY_TRAILING); ++ } ++ ++ if (i <= 1) ++ return 0; ++ ++ err = kstrtoint(chain + 1, 10, &i); ++ if (err) ++ return err; ++ ++ return i; ++} ++ ++int ath9k_hsr_disable(struct ath_hw *ah) ++{ ++ char cmd[10] = {'b', '4', '0', 0, 0, 0, 0, 0, 0, 0}; ++ int ret; ++ ++ ret = ath9k_hsr_write_a_chain(ah, cmd, sizeof(cmd)); ++ if ((ret > 0) && (*cmd == 'B')) ++ return 0; ++ ++ return -1; ++} ++ ++int ath9k_hsr_enable(struct ath_hw *ah, int bw, int fq) ++{ ++ char cmd[10]; ++ int ret; ++ ++ /* Bandwidth argument is 0 sometimes. Assume default 802.11bgn ++ * 20MHz on invalid values ++ */ ++ if ((bw != 5) && (bw != 10) && (bw != 20) && (bw != 40)) ++ bw = 20; ++ ++ memset(cmd, 0, sizeof(cmd)); ++ *cmd = 'b'; ++ snprintf(cmd + 1, 3, "%02d", bw); ++ ++ ret = ath9k_hsr_write_a_chain(ah, cmd, sizeof(cmd)); ++ if ((*cmd != 'B') || (ret != bw)) { ++ ATH_DBG_WARN(1, ++ "ath9k_hsr_enable: failed changing bandwidth -> set (%d,%d) reply (%d, %d)\n", ++ 'b', bw, *cmd, ret); ++ return -1; ++ } ++ ++ memset(cmd, 0, sizeof(cmd)); ++ *cmd = 'x'; ++ ret = ath9k_hsr_write_a_chain(ah, cmd, sizeof(cmd)); ++ if (*cmd != 'X') { ++ ATH_DBG_WARN(1, ++ "ath9k_hsr_enable: failed 'x' command -> reply (%d, %d)\n", ++ *cmd, ret); ++ return -1; ++ } ++ ++ memset(cmd, 0, sizeof(cmd)); ++ *cmd = 'm'; ++ ret = ath9k_hsr_write_a_chain(ah, cmd, sizeof(cmd)); ++ if (*cmd != 'M') { ++ ATH_DBG_WARN(1, ++ "ath9k_hsr_enable: failed 'm' command -> reply (%d, %d)\n", ++ *cmd, ret); ++ return -1; ++ } ++ ++ memset(cmd, 0, sizeof(cmd)); ++ *cmd = 'f'; ++ snprintf(cmd + 1, 6, "%05d", fq); ++ ret = ath9k_hsr_write_a_chain(ah, cmd, sizeof(cmd)); ++ if ((*cmd != 'F') && (ret != fq)) { ++ ATH_DBG_WARN(1, ++ "ath9k_hsr_enable: failed set frequency -> reply (%d, %d)\n", ++ *cmd, ret); ++ return -1; ++ } ++ ++ return 0; ++} ++ ++int ath9k_hsr_status(struct ath_hw *ah) ++{ ++ char cmd[10] = {'s', 0, 0, 0, 0, 0, 0, 0, 0, 0}; ++ int ret; ++ ++ ret = ath9k_hsr_write_a_chain(ah, cmd, sizeof(cmd)); ++ if (*cmd != 'S') { ++ ATH_DBG_WARN(1, "ath9k_hsr_status: returned %d,%d\n", *cmd, ++ ret); ++ return -1; ++ } ++ ++ return 0; ++} +--- /dev/null ++++ b/drivers/net/wireless/ath/ath9k/hsr.h +@@ -0,0 +1,48 @@ ++/* ++ * The MIT License (MIT) ++ * ++ * Copyright (c) 2015 Kirill Berezin ++ * ++ * Permission is hereby granted, free of charge, to any person obtaining a copy ++ * of this software and associated documentation files (the "Software"), to deal ++ * in the Software without restriction, including without limitation the rights ++ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell ++ * copies of the Software, and to permit persons to whom the Software is ++ * furnished to do so, subject to the following conditions: ++ * ++ * The above copyright notice and this permission notice shall be included in ++ * all copies or substantial portions of the Software. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR ++ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, ++ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE ++ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER ++ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, ++ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#ifndef HSR_H ++#define HSR_H ++ ++#ifdef CPTCFG_ATH9K_UBNTHSR ++ ++void ath9k_hsr_init(struct ath_hw *ah); ++int ath9k_hsr_disable(struct ath_hw *ah); ++int ath9k_hsr_enable(struct ath_hw *ah, int bw, int fq); ++int ath9k_hsr_status(struct ath_hw *ah); ++ ++#else ++static inline void ath9k_hsr_init(struct ath_hw *ah) {} ++ ++static inline int ath9k_hsr_enable(struct ath_hw *ah, int bw, int fq) ++{ ++ return 0; ++} ++ ++static inline int ath9k_hsr_disable(struct ath_hw *ah) { return 0; } ++static inline int ath9k_hsr_status(struct ath_hw *ah) { return 0; } ++ ++#endif ++ ++#endif /* HSR_H */ +--- a/drivers/net/wireless/ath/ath9k/main.c ++++ b/drivers/net/wireless/ath/ath9k/main.c +@@ -16,8 +16,10 @@ + + #include + #include ++#include + #include "ath9k.h" + #include "btcoex.h" ++#include "hsr.h" + + u8 ath9k_parse_mpdudensity(u8 mpdudensity) + { +@@ -648,6 +650,7 @@ void ath_reset_work(struct work_struct * + static int ath9k_start(struct ieee80211_hw *hw) + { + struct ath_softc *sc = hw->priv; ++ struct ath9k_platform_data *pdata = sc->dev->platform_data; + struct ath_hw *ah = sc->sc_ah; + struct ath_common *common = ath9k_hw_common(ah); + struct ieee80211_channel *curchan = sc->cur_chan->chandef.chan; +@@ -726,6 +729,11 @@ static int ath9k_start(struct ieee80211_ + AR_GPIO_OUTPUT_MUX_AS_OUTPUT); + } + ++ if (pdata && pdata->ubnt_hsr) { ++ ath9k_hsr_init(ah); ++ ath9k_hsr_disable(ah); ++ } ++ + /* + * Reset key cache to sane defaults (all entries cleared) instead of + * semi-random values after suspend/resume. +--- a/drivers/net/wireless/ath/ath9k/Makefile ++++ b/drivers/net/wireless/ath/ath9k/Makefile +@@ -16,6 +16,7 @@ ath9k-$(CPTCFG_ATH9K_DFS_CERTIFIED) += d + ath9k-$(CPTCFG_ATH9K_TX99) += tx99.o + ath9k-$(CPTCFG_ATH9K_WOW) += wow.o + ath9k-$(CPTCFG_ATH9K_HWRNG) += rng.o ++ath9k-$(CPTCFG_ATH9K_UBNTHSR) += hsr.o + + ath9k-$(CPTCFG_ATH9K_DEBUGFS) += debug.o + +--- a/include/linux/ath9k_platform.h ++++ b/include/linux/ath9k_platform.h +@@ -54,6 +54,8 @@ struct ath9k_platform_data { + unsigned num_btns; + const struct gpio_keys_button *btns; + unsigned btn_poll_interval; ++ ++ bool ubnt_hsr; + }; + + #endif /* _LINUX_ATH9K_PLATFORM_H */ +--- a/.local-symbols ++++ b/.local-symbols +@@ -157,6 +157,7 @@ ATH9K_WOW= + ATH9K_RFKILL= + ATH9K_CHANNEL_CONTEXT= + ATH9K_PCOEM= ++ATH9K_UBNTHSR= + ATH9K_HTC= + ATH9K_HTC_DEBUGFS= + ATH9K_HWRNG= +--- a/drivers/net/wireless/ath/ath9k/Kconfig ++++ b/drivers/net/wireless/ath/ath9k/Kconfig +@@ -59,6 +59,19 @@ config ATH9K_AHB + Say Y, if you have a SoC with a compatible built-in + wireless MAC. Say N if unsure. + ++config ATH9K_UBNTHSR ++ bool "Ubiquiti UniFi Outdoor Plus HSR support" ++ depends on ATH9K ++ ---help--- ++ This options enables code to control the HSR RF ++ filter in the receive path of the Ubiquiti UniFi ++ Outdoor Plus access point. ++ ++ Say Y if you want to use the access point. The ++ code will only be used if the device is detected, ++ so it does not harm other setup other than occupying ++ a bit of memory. ++ + config ATH9K_DEBUGFS + bool "Atheros ath9k debugging" + depends on ATH9K && DEBUG_FS diff --git a/package/kernel/mac80211/patches/552-ath9k-Add-an-eeprom_ops-callback-for-retrieving-the-.patch b/package/kernel/mac80211/patches/552-ath9k-Add-an-eeprom_ops-callback-for-retrieving-the-.patch deleted file mode 100644 index 1b4dd3d134..0000000000 --- a/package/kernel/mac80211/patches/552-ath9k-Add-an-eeprom_ops-callback-for-retrieving-the-.patch +++ /dev/null @@ -1,117 +0,0 @@ -From e8f60fa28e619ad238457ac84fb292541be180d3 Mon Sep 17 00:00:00 2001 -From: Martin Blumenstingl -Date: Mon, 3 Oct 2016 00:29:09 +0200 -Subject: [v2 PATCH 3/7] ath9k: Add an eeprom_ops callback for retrieving the - eepmisc value - -This allows deciding if we have to swap the EEPROM data (so it matches -the system's native endianness) even if no byte-swapping (swab16, based on -the first two bytes in the EEPROM) is needed. - -Signed-off-by: Martin Blumenstingl ---- - drivers/net/wireless/ath/ath9k/ar9003_eeprom.c | 8 +++++++- - drivers/net/wireless/ath/ath9k/eeprom.h | 1 + - drivers/net/wireless/ath/ath9k/eeprom_4k.c | 8 +++++++- - drivers/net/wireless/ath/ath9k/eeprom_9287.c | 8 +++++++- - drivers/net/wireless/ath/ath9k/eeprom_def.c | 8 +++++++- - 5 files changed, 29 insertions(+), 4 deletions(-) - ---- a/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c -+++ b/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c -@@ -5498,6 +5498,11 @@ unsigned int ar9003_get_paprd_scale_fact - } - } - -+static u8 ar9003_get_eepmisc(struct ath_hw *ah) -+{ -+ return ah->eeprom.map4k.baseEepHeader.eepMisc; -+} -+ - const struct eeprom_ops eep_ar9300_ops = { - .check_eeprom = ath9k_hw_ar9300_check_eeprom, - .get_eeprom = ath9k_hw_ar9300_get_eeprom, -@@ -5508,5 +5513,6 @@ const struct eeprom_ops eep_ar9300_ops = - .set_board_values = ath9k_hw_ar9300_set_board_values, - .set_addac = ath9k_hw_ar9300_set_addac, - .set_txpower = ath9k_hw_ar9300_set_txpower, -- .get_spur_channel = ath9k_hw_ar9300_get_spur_channel -+ .get_spur_channel = ath9k_hw_ar9300_get_spur_channel, -+ .get_eepmisc = ar9003_get_eepmisc - }; ---- a/drivers/net/wireless/ath/ath9k/eeprom.h -+++ b/drivers/net/wireless/ath/ath9k/eeprom.h -@@ -655,6 +655,7 @@ struct eeprom_ops { - u16 cfgCtl, u8 twiceAntennaReduction, - u8 powerLimit, bool test); - u16 (*get_spur_channel)(struct ath_hw *ah, u16 i, bool is2GHz); -+ u8 (*get_eepmisc)(struct ath_hw *ah); - }; - - void ath9k_hw_analog_shift_regwrite(struct ath_hw *ah, u32 reg, u32 val); ---- a/drivers/net/wireless/ath/ath9k/eeprom_4k.c -+++ b/drivers/net/wireless/ath/ath9k/eeprom_4k.c -@@ -1064,6 +1064,11 @@ static u16 ath9k_hw_4k_get_spur_channel( - return ah->eeprom.map4k.modalHeader.spurChans[i].spurChan; - } - -+static u8 ath9k_hw_4k_get_eepmisc(struct ath_hw *ah) -+{ -+ return ah->eeprom.map4k.baseEepHeader.eepMisc; -+} -+ - const struct eeprom_ops eep_4k_ops = { - .check_eeprom = ath9k_hw_4k_check_eeprom, - .get_eeprom = ath9k_hw_4k_get_eeprom, -@@ -1073,5 +1078,6 @@ const struct eeprom_ops eep_4k_ops = { - .get_eeprom_rev = ath9k_hw_4k_get_eeprom_rev, - .set_board_values = ath9k_hw_4k_set_board_values, - .set_txpower = ath9k_hw_4k_set_txpower, -- .get_spur_channel = ath9k_hw_4k_get_spur_channel -+ .get_spur_channel = ath9k_hw_4k_get_spur_channel, -+ .get_eepmisc = ath9k_hw_4k_get_eepmisc - }; ---- a/drivers/net/wireless/ath/ath9k/eeprom_9287.c -+++ b/drivers/net/wireless/ath/ath9k/eeprom_9287.c -@@ -986,6 +986,11 @@ static u16 ath9k_hw_ar9287_get_spur_chan - return ah->eeprom.map9287.modalHeader.spurChans[i].spurChan; - } - -+static u8 ath9k_hw_ar9287_get_eepmisc(struct ath_hw *ah) -+{ -+ return ah->eeprom.map9287.baseEepHeader.eepMisc; -+} -+ - const struct eeprom_ops eep_ar9287_ops = { - .check_eeprom = ath9k_hw_ar9287_check_eeprom, - .get_eeprom = ath9k_hw_ar9287_get_eeprom, -@@ -995,5 +1000,6 @@ const struct eeprom_ops eep_ar9287_ops = - .get_eeprom_rev = ath9k_hw_ar9287_get_eeprom_rev, - .set_board_values = ath9k_hw_ar9287_set_board_values, - .set_txpower = ath9k_hw_ar9287_set_txpower, -- .get_spur_channel = ath9k_hw_ar9287_get_spur_channel -+ .get_spur_channel = ath9k_hw_ar9287_get_spur_channel, -+ .get_eepmisc = ath9k_hw_ar9287_get_eepmisc - }; ---- a/drivers/net/wireless/ath/ath9k/eeprom_def.c -+++ b/drivers/net/wireless/ath/ath9k/eeprom_def.c -@@ -1317,6 +1317,11 @@ static u16 ath9k_hw_def_get_spur_channel - return ah->eeprom.def.modalHeader[is2GHz].spurChans[i].spurChan; - } - -+static u8 ath9k_hw_def_get_eepmisc(struct ath_hw *ah) -+{ -+ return ah->eeprom.def.baseEepHeader.eepMisc; -+} -+ - const struct eeprom_ops eep_def_ops = { - .check_eeprom = ath9k_hw_def_check_eeprom, - .get_eeprom = ath9k_hw_def_get_eeprom, -@@ -1327,5 +1332,6 @@ const struct eeprom_ops eep_def_ops = { - .set_board_values = ath9k_hw_def_set_board_values, - .set_addac = ath9k_hw_def_set_addac, - .set_txpower = ath9k_hw_def_set_txpower, -- .get_spur_channel = ath9k_hw_def_get_spur_channel -+ .get_spur_channel = ath9k_hw_def_get_spur_channel, -+ .get_eepmisc = ath9k_hw_def_get_eepmisc - }; diff --git a/package/kernel/mac80211/patches/553-ath9k-replace-eeprom_param-EEP_MINOR_REV-with-get_ee.patch b/package/kernel/mac80211/patches/553-ath9k-replace-eeprom_param-EEP_MINOR_REV-with-get_ee.patch deleted file mode 100644 index 277aa6f61c..0000000000 --- a/package/kernel/mac80211/patches/553-ath9k-replace-eeprom_param-EEP_MINOR_REV-with-get_ee.patch +++ /dev/null @@ -1,117 +0,0 @@ -From 9f247f908d5166e16e1cc6a50b0901e0f6733410 Mon Sep 17 00:00:00 2001 -From: Martin Blumenstingl -Date: Mon, 3 Oct 2016 00:29:10 +0200 -Subject: [v2 PATCH 4/7] ath9k: replace eeprom_param EEP_MINOR_REV with - get_eeprom_rev - -get_eeprom(ah, EEP_MINOR_REV) and get_eeprom_rev(ah) are both doing the -same thing: returning the EEPROM revision (12 lowest bits). Make the -code consistent by using get_eeprom_rev(ah) everywhere. - -Signed-off-by: Martin Blumenstingl ---- - drivers/net/wireless/ath/ath9k/ar5008_phy.c | 2 +- - drivers/net/wireless/ath/ath9k/ar9002_hw.c | 6 ++---- - drivers/net/wireless/ath/ath9k/eeprom.h | 1 - - drivers/net/wireless/ath/ath9k/eeprom_4k.c | 5 ----- - drivers/net/wireless/ath/ath9k/eeprom_9287.c | 6 +----- - drivers/net/wireless/ath/ath9k/eeprom_def.c | 2 -- - 6 files changed, 4 insertions(+), 18 deletions(-) - ---- a/drivers/net/wireless/ath/ath9k/ar5008_phy.c -+++ b/drivers/net/wireless/ath/ath9k/ar5008_phy.c -@@ -524,7 +524,7 @@ static bool ar5008_hw_set_rf_regs(struct - return true; - - /* Setup rf parameters */ -- eepMinorRev = ah->eep_ops->get_eeprom(ah, EEP_MINOR_REV); -+ eepMinorRev = ah->eep_ops->get_eeprom_rev(ah); - - for (i = 0; i < ah->iniBank6.ia_rows; i++) - ah->analogBank6Data[i] = INI_RA(&ah->iniBank6, i, modesIndex); ---- a/drivers/net/wireless/ath/ath9k/ar9002_hw.c -+++ b/drivers/net/wireless/ath/ath9k/ar9002_hw.c -@@ -108,8 +108,7 @@ static void ar9280_20_hw_init_rxgain_ini - { - u32 rxgain_type; - -- if (ah->eep_ops->get_eeprom(ah, EEP_MINOR_REV) >= -- AR5416_EEP_MINOR_VER_17) { -+ if (ah->eep_ops->get_eeprom_rev(ah) >= AR5416_EEP_MINOR_VER_17) { - rxgain_type = ah->eep_ops->get_eeprom(ah, EEP_RXGAIN_TYPE); - - if (rxgain_type == AR5416_EEP_RXGAIN_13DB_BACKOFF) -@@ -129,8 +128,7 @@ static void ar9280_20_hw_init_rxgain_ini - - static void ar9280_20_hw_init_txgain_ini(struct ath_hw *ah, u32 txgain_type) - { -- if (ah->eep_ops->get_eeprom(ah, EEP_MINOR_REV) >= -- AR5416_EEP_MINOR_VER_19) { -+ if (ah->eep_ops->get_eeprom_rev(ah) >= AR5416_EEP_MINOR_VER_19) { - if (txgain_type == AR5416_EEP_TXGAIN_HIGH_POWER) - INIT_INI_ARRAY(&ah->iniModesTxGain, - ar9280Modes_high_power_tx_gain_9280_2); ---- a/drivers/net/wireless/ath/ath9k/eeprom.h -+++ b/drivers/net/wireless/ath/ath9k/eeprom.h -@@ -230,7 +230,6 @@ enum eeprom_param { - EEP_DB_5, - EEP_OB_2, - EEP_DB_2, -- EEP_MINOR_REV, - EEP_TX_MASK, - EEP_RX_MASK, - EEP_FSTCLK_5G, ---- a/drivers/net/wireless/ath/ath9k/eeprom_4k.c -+++ b/drivers/net/wireless/ath/ath9k/eeprom_4k.c -@@ -254,9 +254,6 @@ static u32 ath9k_hw_4k_get_eeprom(struct - struct ar5416_eeprom_4k *eep = &ah->eeprom.map4k; - struct modal_eep_4k_header *pModal = &eep->modalHeader; - struct base_eep_header_4k *pBase = &eep->baseEepHeader; -- u16 ver_minor; -- -- ver_minor = pBase->version & AR5416_EEP_VER_MINOR_MASK; - - switch (param) { - case EEP_NFTHRESH_2: -@@ -279,8 +276,6 @@ static u32 ath9k_hw_4k_get_eeprom(struct - return pModal->ob_0; - case EEP_DB_2: - return pModal->db1_1; -- case EEP_MINOR_REV: -- return ver_minor; - case EEP_TX_MASK: - return pBase->txMask; - case EEP_RX_MASK: ---- a/drivers/net/wireless/ath/ath9k/eeprom_9287.c -+++ b/drivers/net/wireless/ath/ath9k/eeprom_9287.c -@@ -250,9 +250,7 @@ static u32 ath9k_hw_ar9287_get_eeprom(st - struct ar9287_eeprom *eep = &ah->eeprom.map9287; - struct modal_eep_ar9287_header *pModal = &eep->modalHeader; - struct base_eep_ar9287_header *pBase = &eep->baseEepHeader; -- u16 ver_minor; -- -- ver_minor = pBase->version & AR9287_EEP_VER_MINOR_MASK; -+ u16 ver_minor = ath9k_hw_ar9287_get_eeprom_rev(ah); - - switch (param) { - case EEP_NFTHRESH_2: -@@ -271,8 +269,6 @@ static u32 ath9k_hw_ar9287_get_eeprom(st - return pBase->opCapFlags; - case EEP_RF_SILENT: - return pBase->rfSilent; -- case EEP_MINOR_REV: -- return ver_minor; - case EEP_TX_MASK: - return pBase->txMask; - case EEP_RX_MASK: ---- a/drivers/net/wireless/ath/ath9k/eeprom_def.c -+++ b/drivers/net/wireless/ath/ath9k/eeprom_def.c -@@ -380,8 +380,6 @@ static u32 ath9k_hw_def_get_eeprom(struc - return pModal[1].ob; - case EEP_DB_2: - return pModal[1].db; -- case EEP_MINOR_REV: -- return AR5416_VER_MASK; - case EEP_TX_MASK: - return pBase->txMask; - case EEP_RX_MASK: diff --git a/package/kernel/mac80211/patches/554-ath9k-consistently-use-get_eeprom_rev-ah.patch b/package/kernel/mac80211/patches/554-ath9k-consistently-use-get_eeprom_rev-ah.patch deleted file mode 100644 index 64e70467a3..0000000000 --- a/package/kernel/mac80211/patches/554-ath9k-consistently-use-get_eeprom_rev-ah.patch +++ /dev/null @@ -1,342 +0,0 @@ -From c763af71bcc2f01bd5ef6e65c7c34b46c7235a16 Mon Sep 17 00:00:00 2001 -From: Martin Blumenstingl -Date: Mon, 3 Oct 2016 00:29:11 +0200 -Subject: [v2 PATCH 5/7] ath9k: consistently use get_eeprom_rev(ah) - -The AR5416_VER_MASK macro does the same as get_eeprom_rev, except that -one has to know the actual EEPROM type (and providing a reference to -that in a variable named "eep"). Additionally the eeprom_*.c -implementations used the same shifting logic multiple times to get the -eeprom revision which was also unnecessary duplication of -get_eeprom_rev. - -Also use the AR5416_EEP_VER_MINOR_MASK macro where needed and introduce -a similar macro (AR5416_EEP_VER_MAJOR_MASK) for the major version. -Finally drop AR9287_EEP_VER_MINOR_MASK since it simply duplicates the -already defined AR5416_EEP_VER_MINOR_MASK. - -Signed-off-by: Martin Blumenstingl ---- - drivers/net/wireless/ath/ath9k/eeprom.h | 4 +-- - drivers/net/wireless/ath/ath9k/eeprom_4k.c | 32 ++++++++++------------ - drivers/net/wireless/ath/ath9k/eeprom_9287.c | 19 +++++++------ - drivers/net/wireless/ath/ath9k/eeprom_def.c | 41 +++++++++++++++------------- - drivers/net/wireless/ath/ath9k/xmit.c | 3 +- - 5 files changed, 52 insertions(+), 47 deletions(-) - ---- a/drivers/net/wireless/ath/ath9k/eeprom.h -+++ b/drivers/net/wireless/ath/ath9k/eeprom.h -@@ -99,7 +99,6 @@ - #define FBIN2FREQ(x, y) ((y) ? (2300 + x) : (4800 + 5 * x)) - #define ath9k_hw_use_flash(_ah) (!(_ah->ah_flags & AH_USE_EEPROM)) - --#define AR5416_VER_MASK (eep->baseEepHeader.version & AR5416_EEP_VER_MINOR_MASK) - #define OLC_FOR_AR9280_20_LATER (AR_SREV_9280_20_OR_LATER(ah) && \ - ah->eep_ops->get_eeprom(ah, EEP_OL_PWRCTRL)) - #define OLC_FOR_AR9287_10_LATER (AR_SREV_9287_11_OR_LATER(ah) && \ -@@ -121,6 +120,8 @@ - - #define AR5416_EEP_NO_BACK_VER 0x1 - #define AR5416_EEP_VER 0xE -+#define AR5416_EEP_VER_MAJOR_SHIFT 12 -+#define AR5416_EEP_VER_MAJOR_MASK 0xF000 - #define AR5416_EEP_VER_MINOR_MASK 0x0FFF - #define AR5416_EEP_MINOR_VER_2 0x2 - #define AR5416_EEP_MINOR_VER_3 0x3 -@@ -177,7 +178,6 @@ - #define AR9280_TX_GAIN_TABLE_SIZE 22 - - #define AR9287_EEP_VER 0xE --#define AR9287_EEP_VER_MINOR_MASK 0xFFF - #define AR9287_EEP_MINOR_VER_1 0x1 - #define AR9287_EEP_MINOR_VER_2 0x2 - #define AR9287_EEP_MINOR_VER_3 0x3 ---- a/drivers/net/wireless/ath/ath9k/eeprom_4k.c -+++ b/drivers/net/wireless/ath/ath9k/eeprom_4k.c -@@ -20,12 +20,17 @@ - - static int ath9k_hw_4k_get_eeprom_ver(struct ath_hw *ah) - { -- return ((ah->eeprom.map4k.baseEepHeader.version >> 12) & 0xF); -+ u16 version = ah->eeprom.map4k.baseEepHeader.version; -+ -+ return (version & AR5416_EEP_VER_MAJOR_MASK) >> -+ AR5416_EEP_VER_MAJOR_SHIFT; - } - - static int ath9k_hw_4k_get_eeprom_rev(struct ath_hw *ah) - { -- return ((ah->eeprom.map4k.baseEepHeader.version) & 0xFFF); -+ u16 version = ah->eeprom.map4k.baseEepHeader.version; -+ -+ return version & AR5416_EEP_VER_MINOR_MASK; - } - - #define SIZE_EEPROM_4K (sizeof(struct ar5416_eeprom_4k) / sizeof(u16)) -@@ -136,8 +141,8 @@ static u32 ath9k_hw_4k_dump_eeprom(struc - goto out; - } - -- PR_EEP("Major Version", pBase->version >> 12); -- PR_EEP("Minor Version", pBase->version & 0xFFF); -+ PR_EEP("Major Version", ath9k_hw_4k_get_eeprom_ver(ah)); -+ PR_EEP("Minor Version", ath9k_hw_4k_get_eeprom_rev(ah)); - PR_EEP("Checksum", pBase->checksum); - PR_EEP("Length", pBase->length); - PR_EEP("RegDomain1", pBase->regDmn[0]); -@@ -314,14 +319,12 @@ static void ath9k_hw_set_4k_power_cal_ta - - xpdMask = pEepData->modalHeader.xpdGain; - -- if ((pEepData->baseEepHeader.version & AR5416_EEP_VER_MINOR_MASK) >= -- AR5416_EEP_MINOR_VER_2) { -+ if (ath9k_hw_4k_get_eeprom_rev(ah) >= AR5416_EEP_MINOR_VER_2) - pdGainOverlap_t2 = - pEepData->modalHeader.pdGainOverlap; -- } else { -+ else - pdGainOverlap_t2 = (u16)(MS(REG_READ(ah, AR_PHY_TPCRG5), - AR_PHY_TPCRG5_PD_GAIN_OVERLAP)); -- } - - pCalBChans = pEepData->calFreqPier2G; - numPiers = AR5416_EEP4K_NUM_2G_CAL_PIERS; -@@ -607,10 +610,8 @@ static void ath9k_hw_4k_set_txpower(stru - - memset(ratesArray, 0, sizeof(ratesArray)); - -- if ((pEepData->baseEepHeader.version & AR5416_EEP_VER_MINOR_MASK) >= -- AR5416_EEP_MINOR_VER_2) { -+ if (ath9k_hw_4k_get_eeprom_rev(ah) >= AR5416_EEP_MINOR_VER_2) - ht40PowerIncForPdadc = pModal->ht40PowerIncForPdadc; -- } - - ath9k_hw_set_4k_power_per_rate_table(ah, chan, - &ratesArray[0], cfgCtl, -@@ -730,8 +731,7 @@ static void ath9k_hw_4k_set_gain(struct - SM(pModal->iqCalQCh[0], AR_PHY_TIMING_CTRL4_IQCORR_Q_Q_COFF), - AR_PHY_TIMING_CTRL4_IQCORR_Q_Q_COFF | AR_PHY_TIMING_CTRL4_IQCORR_Q_I_COFF); - -- if ((eep->baseEepHeader.version & AR5416_EEP_VER_MINOR_MASK) >= -- AR5416_EEP_MINOR_VER_3) { -+ if (ath9k_hw_4k_get_eeprom_rev(ah) >= AR5416_EEP_MINOR_VER_3) { - txRxAttenLocal = pModal->txRxAttenCh[0]; - - REG_RMW_FIELD(ah, AR_PHY_GAIN_2GHZ, -@@ -1009,16 +1009,14 @@ static void ath9k_hw_4k_set_board_values - REG_RMW_FIELD(ah, AR_PHY_EXT_CCA0, AR_PHY_EXT_CCA0_THRESH62, - pModal->thresh62); - -- if ((eep->baseEepHeader.version & AR5416_EEP_VER_MINOR_MASK) >= -- AR5416_EEP_MINOR_VER_2) { -+ if (ath9k_hw_4k_get_eeprom_rev(ah) >= AR5416_EEP_MINOR_VER_2) { - REG_RMW_FIELD(ah, AR_PHY_RF_CTL2, AR_PHY_TX_END_DATA_START, - pModal->txFrameToDataStart); - REG_RMW_FIELD(ah, AR_PHY_RF_CTL2, AR_PHY_TX_END_PA_ON, - pModal->txFrameToPaOn); - } - -- if ((eep->baseEepHeader.version & AR5416_EEP_VER_MINOR_MASK) >= -- AR5416_EEP_MINOR_VER_3) { -+ if (ath9k_hw_4k_get_eeprom_rev(ah) >= AR5416_EEP_MINOR_VER_3) { - if (IS_CHAN_HT40(chan)) - REG_RMW_FIELD(ah, AR_PHY_SETTLING, - AR_PHY_SETTLING_SWITCH, ---- a/drivers/net/wireless/ath/ath9k/eeprom_9287.c -+++ b/drivers/net/wireless/ath/ath9k/eeprom_9287.c -@@ -22,12 +22,17 @@ - - static int ath9k_hw_ar9287_get_eeprom_ver(struct ath_hw *ah) - { -- return (ah->eeprom.map9287.baseEepHeader.version >> 12) & 0xF; -+ u16 version = ah->eeprom.map9287.baseEepHeader.version; -+ -+ return (version & AR5416_EEP_VER_MAJOR_MASK) >> -+ AR5416_EEP_VER_MAJOR_SHIFT; - } - - static int ath9k_hw_ar9287_get_eeprom_rev(struct ath_hw *ah) - { -- return (ah->eeprom.map9287.baseEepHeader.version) & 0xFFF; -+ u16 version = ah->eeprom.map9287.baseEepHeader.version; -+ -+ return version & AR5416_EEP_VER_MINOR_MASK; - } - - static bool __ath9k_hw_ar9287_fill_eeprom(struct ath_hw *ah) -@@ -132,8 +137,8 @@ static u32 ath9k_hw_ar9287_dump_eeprom(s - goto out; - } - -- PR_EEP("Major Version", pBase->version >> 12); -- PR_EEP("Minor Version", pBase->version & 0xFFF); -+ PR_EEP("Major Version", ath9k_hw_ar9287_get_eeprom_ver(ah)); -+ PR_EEP("Minor Version", ath9k_hw_ar9287_get_eeprom_rev(ah)); - PR_EEP("Checksum", pBase->checksum); - PR_EEP("Length", pBase->length); - PR_EEP("RegDomain1", pBase->regDmn[0]); -@@ -383,8 +388,7 @@ static void ath9k_hw_set_ar9287_power_ca - - xpdMask = pEepData->modalHeader.xpdGain; - -- if ((pEepData->baseEepHeader.version & AR9287_EEP_VER_MINOR_MASK) >= -- AR9287_EEP_MINOR_VER_2) -+ if (ath9k_hw_ar9287_get_eeprom_rev(ah) >= AR9287_EEP_MINOR_VER_2) - pdGainOverlap_t2 = pEepData->modalHeader.pdGainOverlap; - else - pdGainOverlap_t2 = (u16)(MS(REG_READ(ah, AR_PHY_TPCRG5), -@@ -733,8 +737,7 @@ static void ath9k_hw_ar9287_set_txpower( - - memset(ratesArray, 0, sizeof(ratesArray)); - -- if ((pEepData->baseEepHeader.version & AR9287_EEP_VER_MINOR_MASK) >= -- AR9287_EEP_MINOR_VER_2) -+ if (ath9k_hw_ar9287_get_eeprom_rev(ah) >= AR9287_EEP_MINOR_VER_2) - ht40PowerIncForPdadc = pModal->ht40PowerIncForPdadc; - - ath9k_hw_set_ar9287_power_per_rate_table(ah, chan, ---- a/drivers/net/wireless/ath/ath9k/eeprom_def.c -+++ b/drivers/net/wireless/ath/ath9k/eeprom_def.c -@@ -79,12 +79,17 @@ static void ath9k_olc_get_pdadcs(struct - - static int ath9k_hw_def_get_eeprom_ver(struct ath_hw *ah) - { -- return ((ah->eeprom.def.baseEepHeader.version >> 12) & 0xF); -+ u16 version = ah->eeprom.def.baseEepHeader.version; -+ -+ return (version & AR5416_EEP_VER_MAJOR_MASK) >> -+ AR5416_EEP_VER_MAJOR_SHIFT; - } - - static int ath9k_hw_def_get_eeprom_rev(struct ath_hw *ah) - { -- return ((ah->eeprom.def.baseEepHeader.version) & 0xFFF); -+ u16 version = ah->eeprom.def.baseEepHeader.version; -+ -+ return version & AR5416_EEP_VER_MINOR_MASK; - } - - #define SIZE_EEPROM_DEF (sizeof(struct ar5416_eeprom_def) / sizeof(u16)) -@@ -214,8 +219,8 @@ static u32 ath9k_hw_def_dump_eeprom(stru - goto out; - } - -- PR_EEP("Major Version", pBase->version >> 12); -- PR_EEP("Minor Version", pBase->version & 0xFFF); -+ PR_EEP("Major Version", ath9k_hw_def_get_eeprom_ver(ah)); -+ PR_EEP("Minor Version", ath9k_hw_def_get_eeprom_rev(ah)); - PR_EEP("Checksum", pBase->checksum); - PR_EEP("Length", pBase->length); - PR_EEP("RegDomain1", pBase->regDmn[0]); -@@ -391,27 +396,27 @@ static u32 ath9k_hw_def_get_eeprom(struc - case EEP_TXGAIN_TYPE: - return pBase->txGainType; - case EEP_OL_PWRCTRL: -- if (AR5416_VER_MASK >= AR5416_EEP_MINOR_VER_19) -+ if (ath9k_hw_def_get_eeprom_rev(ah) >= AR5416_EEP_MINOR_VER_19) - return pBase->openLoopPwrCntl ? true : false; - else - return false; - case EEP_RC_CHAIN_MASK: -- if (AR5416_VER_MASK >= AR5416_EEP_MINOR_VER_19) -+ if (ath9k_hw_def_get_eeprom_rev(ah) >= AR5416_EEP_MINOR_VER_19) - return pBase->rcChainMask; - else - return 0; - case EEP_DAC_HPWR_5G: -- if (AR5416_VER_MASK >= AR5416_EEP_MINOR_VER_20) -+ if (ath9k_hw_def_get_eeprom_rev(ah) >= AR5416_EEP_MINOR_VER_20) - return pBase->dacHiPwrMode_5G; - else - return 0; - case EEP_FRAC_N_5G: -- if (AR5416_VER_MASK >= AR5416_EEP_MINOR_VER_22) -+ if (ath9k_hw_def_get_eeprom_rev(ah) >= AR5416_EEP_MINOR_VER_22) - return pBase->frac_n_5g; - else - return 0; - case EEP_PWR_TABLE_OFFSET: -- if (AR5416_VER_MASK >= AR5416_EEP_MINOR_VER_21) -+ if (ath9k_hw_def_get_eeprom_rev(ah) >= AR5416_EEP_MINOR_VER_21) - return pBase->pwr_table_offset; - else - return AR5416_PWR_TABLE_OFFSET_DB; -@@ -434,7 +439,7 @@ static void ath9k_hw_def_set_gain(struct - u8 txRxAttenLocal, int regChainOffset, int i) - { - ENABLE_REG_RMW_BUFFER(ah); -- if (AR5416_VER_MASK >= AR5416_EEP_MINOR_VER_3) { -+ if (ath9k_hw_def_get_eeprom_rev(ah) >= AR5416_EEP_MINOR_VER_3) { - txRxAttenLocal = pModal->txRxAttenCh[i]; - - if (AR_SREV_9280_20_OR_LATER(ah)) { -@@ -603,7 +608,7 @@ static void ath9k_hw_def_set_board_value - pModal->thresh62); - } - -- if (AR5416_VER_MASK >= AR5416_EEP_MINOR_VER_2) { -+ if (ath9k_hw_def_get_eeprom_rev(ah) >= AR5416_EEP_MINOR_VER_2) { - REG_RMW_FIELD(ah, AR_PHY_RF_CTL2, - AR_PHY_TX_END_DATA_START, - pModal->txFrameToDataStart); -@@ -611,7 +616,7 @@ static void ath9k_hw_def_set_board_value - pModal->txFrameToPaOn); - } - -- if (AR5416_VER_MASK >= AR5416_EEP_MINOR_VER_3) { -+ if (ath9k_hw_def_get_eeprom_rev(ah) >= AR5416_EEP_MINOR_VER_3) { - if (IS_CHAN_HT40(chan)) - REG_RMW_FIELD(ah, AR_PHY_SETTLING, - AR_PHY_SETTLING_SWITCH, -@@ -619,13 +624,14 @@ static void ath9k_hw_def_set_board_value - } - - if (AR_SREV_9280_20_OR_LATER(ah) && -- AR5416_VER_MASK >= AR5416_EEP_MINOR_VER_19) -+ ath9k_hw_def_get_eeprom_rev(ah) >= AR5416_EEP_MINOR_VER_19) - REG_RMW_FIELD(ah, AR_PHY_CCK_TX_CTRL, - AR_PHY_CCK_TX_CTRL_TX_DAC_SCALE_CCK, - pModal->miscBits); - - -- if (AR_SREV_9280_20(ah) && AR5416_VER_MASK >= AR5416_EEP_MINOR_VER_20) { -+ if (AR_SREV_9280_20(ah) && -+ ath9k_hw_def_get_eeprom_rev(ah) >= AR5416_EEP_MINOR_VER_20) { - if (IS_CHAN_2GHZ(chan)) - REG_RMW_FIELD(ah, AR_AN_TOP1, AR_AN_TOP1_DACIPMODE, - eep->baseEepHeader.dacLpMode); -@@ -796,8 +802,7 @@ static void ath9k_hw_set_def_power_cal_t - - pwr_table_offset = ah->eep_ops->get_eeprom(ah, EEP_PWR_TABLE_OFFSET); - -- if ((pEepData->baseEepHeader.version & AR5416_EEP_VER_MINOR_MASK) >= -- AR5416_EEP_MINOR_VER_2) { -+ if (ath9k_hw_def_get_eeprom_rev(ah) >= AR5416_EEP_MINOR_VER_2) { - pdGainOverlap_t2 = - pEepData->modalHeader[modalIdx].pdGainOverlap; - } else { -@@ -1169,10 +1174,8 @@ static void ath9k_hw_def_set_txpower(str - - memset(ratesArray, 0, sizeof(ratesArray)); - -- if ((pEepData->baseEepHeader.version & AR5416_EEP_VER_MINOR_MASK) >= -- AR5416_EEP_MINOR_VER_2) { -+ if (ath9k_hw_def_get_eeprom_rev(ah) >= AR5416_EEP_MINOR_VER_2) - ht40PowerIncForPdadc = pModal->ht40PowerIncForPdadc; -- } - - ath9k_hw_set_def_power_per_rate_table(ah, chan, - &ratesArray[0], cfgCtl, ---- a/drivers/net/wireless/ath/ath9k/xmit.c -+++ b/drivers/net/wireless/ath/ath9k/xmit.c -@@ -1177,8 +1177,9 @@ static u8 ath_get_rate_txpower(struct at - if (is_40) { - u8 power_ht40delta; - struct ar5416_eeprom_def *eep = &ah->eeprom.def; -+ u16 eeprom_rev = ah->eep_ops->get_eeprom_rev(ah); - -- if (AR5416_VER_MASK >= AR5416_EEP_MINOR_VER_2) { -+ if (eeprom_rev >= AR5416_EEP_MINOR_VER_2) { - bool is_2ghz; - struct modal_eep_header *pmodal; - diff --git a/package/kernel/mac80211/patches/555-ath9k-Make-the-EEPROM-swapping-check-use-the-eepmisc.patch b/package/kernel/mac80211/patches/555-ath9k-Make-the-EEPROM-swapping-check-use-the-eepmisc.patch deleted file mode 100644 index 3e3c2ea7a3..0000000000 --- a/package/kernel/mac80211/patches/555-ath9k-Make-the-EEPROM-swapping-check-use-the-eepmisc.patch +++ /dev/null @@ -1,128 +0,0 @@ -From 1f796f9265c10384a274ac330f671ef4ac6d56e5 Mon Sep 17 00:00:00 2001 -From: Martin Blumenstingl -Date: Mon, 3 Oct 2016 00:29:12 +0200 -Subject: [v2 PATCH 6/7] ath9k: Make the EEPROM swapping check use the eepmisc - register - -There are two ways of swapping the EEPROM data in the ath9k driver: -1) swab16 based on the first two EEPROM "magic" bytes (same for all - EEPROM formats) -2) field and EEPROM format specific swab16/swab32 (different for - eeprom_def, eeprom_4k and eeprom_9287) - -The result of the first check was used to also enable the second swap. -This behavior seems incorrect, since the data may only be byte-swapped -(afterwards the data could be in the correct endianness). -Thus we introduce a separate check based on the "eepmisc" register -(which is part of the EEPROM data). When bit 0 is set, then the EEPROM -format specific values are in "big endian". This is also done by the -FreeBSD kernel, see [0] for example. - -This allows us to parse EEPROMs with the "correct" magic bytes but -swapped EEPROM format specific values. These EEPROMs (mostly found in -lantiq and broadcom based big endian MIPS based devices) only worked -due to platform specific "hacks" which swapped the EEPROM so the -magic was inverted, which also enabled the format specific swapping. -With this patch the old behavior is still supported, but neither -recommended nor needed anymore. - -[0] -https://github.com/freebsd/freebsd/blob/50719b56d9ce8d7d4beb53b16e9edb2e9a4a7a18/sys/dev/ath/ath_hal/ah_eeprom_9287.c#L351 - -Signed-off-by: Martin Blumenstingl ---- - drivers/net/wireless/ath/ath9k/eeprom.c | 57 ++++++++++++++++++++++++--------- - 1 file changed, 41 insertions(+), 16 deletions(-) - ---- a/drivers/net/wireless/ath/ath9k/eeprom.c -+++ b/drivers/net/wireless/ath/ath9k/eeprom.c -@@ -155,11 +155,19 @@ bool ath9k_hw_nvram_read(struct ath_hw * - return ret; - } - -+#ifdef __BIG_ENDIAN -+#define EXPECTED_EEPMISC_ENDIAN AR5416_EEPMISC_BIG_ENDIAN -+#else -+#define EXPECTED_EEPMISC_ENDIAN 0 -+#endif -+ - int ath9k_hw_nvram_swap_data(struct ath_hw *ah, bool *swap_needed, int size) - { - u16 magic; - u16 *eepdata; -+ u8 eepmisc; - int i; -+ bool needs_byteswap = false; - struct ath_common *common = ath9k_hw_common(ah); - - if (!ath9k_hw_nvram_read(ah, AR5416_EEPROM_MAGIC_OFFSET, &magic)) { -@@ -167,36 +175,53 @@ int ath9k_hw_nvram_swap_data(struct ath_ - return -EIO; - } - -- *swap_needed = false; - if (swab16(magic) == AR5416_EEPROM_MAGIC) { -+ needs_byteswap = true; -+ ath_dbg(common, EEPROM, -+ "EEPROM needs byte-swapping to correct endianness.\n"); -+ } else if (magic != AR5416_EEPROM_MAGIC) { -+ if (ath9k_hw_use_flash(ah)) { -+ ath_dbg(common, EEPROM, -+ "Ignoring invalid EEPROM magic (0x%04x).\n", -+ magic); -+ } else { -+ ath_err(common, -+ "Invalid EEPROM magic (0x%04x).\n", magic); -+ return -EINVAL; -+ } -+ } -+ -+ if (needs_byteswap) { - if (ah->ah_flags & AH_NO_EEP_SWAP) { - ath_info(common, - "Ignoring endianness difference in EEPROM magic bytes.\n"); - } else { -- *swap_needed = true; -- } -- } else if (magic != AR5416_EEPROM_MAGIC) { -- if (ath9k_hw_use_flash(ah)) -- return 0; -+ eepdata = (u16 *)(&ah->eeprom); - -- ath_err(common, -- "Invalid EEPROM Magic (0x%04x).\n", magic); -- return -EINVAL; -+ for (i = 0; i < size; i++) -+ eepdata[i] = swab16(eepdata[i]); -+ } - } - -- eepdata = (u16 *)(&ah->eeprom); -- -- if (*swap_needed) { -- ath_dbg(common, EEPROM, -- "EEPROM Endianness is not native.. Changing.\n"); -+ *swap_needed = false; - -- for (i = 0; i < size; i++) -- eepdata[i] = swab16(eepdata[i]); -+ eepmisc = ah->eep_ops->get_eepmisc(ah); -+ if ((eepmisc & AR5416_EEPMISC_BIG_ENDIAN) != EXPECTED_EEPMISC_ENDIAN) { -+ if (ah->ah_flags & AH_NO_EEP_SWAP) { -+ ath_info(common, -+ "Ignoring endianness difference in eepmisc register.\n"); -+ } else { -+ *swap_needed = true; -+ ath_dbg(common, EEPROM, -+ "EEPROM needs swapping according to the eepmisc register.\n"); -+ } - } - - return 0; - } - -+#undef EXPECTED_EEPMISC_VAL -+ - bool ath9k_hw_nvram_validate_checksum(struct ath_hw *ah, int size) - { - u32 i, sum = 0; diff --git a/package/kernel/mac80211/patches/556-ath9k-define-all-EEPROM-fields-in-Little-Endian-form.patch b/package/kernel/mac80211/patches/556-ath9k-define-all-EEPROM-fields-in-Little-Endian-form.patch deleted file mode 100644 index 292ea8a558..0000000000 --- a/package/kernel/mac80211/patches/556-ath9k-define-all-EEPROM-fields-in-Little-Endian-form.patch +++ /dev/null @@ -1,849 +0,0 @@ -From 7e1047f3cf8dcdb4825f3c785f7f708d07508096 Mon Sep 17 00:00:00 2001 -From: Martin Blumenstingl -Date: Mon, 3 Oct 2016 00:29:13 +0200 -Subject: [v2 PATCH 7/7] ath9k: define all EEPROM fields in Little Endian format - -The ar9300_eeprom logic is already using only 8-bit (endian neutral), -__le16 and __le32 fields to state explicitly how the values should be -interpreted. -All other EEPROM implementations (4k, 9287 and def) were using u16 and -u32 fields with additional logic to swap the values (read from the -original EEPROM) so they match the current CPUs endianness. - -The EEPROM format defaults to "all values are Little Endian", indicated -by the absence of the AR5416_EEPMISC_BIG_ENDIAN in the u8 EEPMISC -register. If we detect that the EEPROM indicates Big Endian mode -(AR5416_EEPMISC_BIG_ENDIAN is set in the EEPMISC register) then we'll -swap the values to convert them into Little Endian. This is done by -activating the EEPMISC based logic in ath9k_hw_nvram_swap_data even if -AH_NO_EEP_SWAP is set (this makes ath9k behave like the FreeBSD driver, -which also does not have a flag to enable swapping based on the -AR5416_EEPMISC_BIG_ENDIAN bit). Before this logic was only used to -enable swapping when "current CPU endianness != EEPROM endianness". - -After changing all relevant fields to __le16 and __le32 sparse was used -to check that all code which reads any of these fields uses -le{16,32}_to_cpu. - -Signed-off-by: Martin Blumenstingl ---- - drivers/net/wireless/ath/ath9k/eeprom.c | 27 ++----- - drivers/net/wireless/ath/ath9k/eeprom.h | 75 ++++++++++-------- - drivers/net/wireless/ath/ath9k/eeprom_4k.c | 94 +++++++++------------- - drivers/net/wireless/ath/ath9k/eeprom_9287.c | 98 ++++++++++------------- - drivers/net/wireless/ath/ath9k/eeprom_def.c | 114 ++++++++++++--------------- - 5 files changed, 174 insertions(+), 234 deletions(-) - ---- a/drivers/net/wireless/ath/ath9k/eeprom.c -+++ b/drivers/net/wireless/ath/ath9k/eeprom.c -@@ -155,17 +155,10 @@ bool ath9k_hw_nvram_read(struct ath_hw * - return ret; - } - --#ifdef __BIG_ENDIAN --#define EXPECTED_EEPMISC_ENDIAN AR5416_EEPMISC_BIG_ENDIAN --#else --#define EXPECTED_EEPMISC_ENDIAN 0 --#endif -- - int ath9k_hw_nvram_swap_data(struct ath_hw *ah, bool *swap_needed, int size) - { - u16 magic; - u16 *eepdata; -- u8 eepmisc; - int i; - bool needs_byteswap = false; - struct ath_common *common = ath9k_hw_common(ah); -@@ -203,25 +196,17 @@ int ath9k_hw_nvram_swap_data(struct ath_ - } - } - -- *swap_needed = false; -- -- eepmisc = ah->eep_ops->get_eepmisc(ah); -- if ((eepmisc & AR5416_EEPMISC_BIG_ENDIAN) != EXPECTED_EEPMISC_ENDIAN) { -- if (ah->ah_flags & AH_NO_EEP_SWAP) { -- ath_info(common, -- "Ignoring endianness difference in eepmisc register.\n"); -- } else { -- *swap_needed = true; -- ath_dbg(common, EEPROM, -- "EEPROM needs swapping according to the eepmisc register.\n"); -- } -+ if (ah->eep_ops->get_eepmisc(ah) & AR5416_EEPMISC_BIG_ENDIAN) { -+ *swap_needed = true; -+ ath_dbg(common, EEPROM, -+ "Big Endian EEPROM detected according to EEPMISC register.\n"); -+ } else { -+ *swap_needed = false; - } - - return 0; - } - --#undef EXPECTED_EEPMISC_VAL -- - bool ath9k_hw_nvram_validate_checksum(struct ath_hw *ah, int size) - { - u32 i, sum = 0; ---- a/drivers/net/wireless/ath/ath9k/eeprom.h -+++ b/drivers/net/wireless/ath/ath9k/eeprom.h -@@ -23,6 +23,17 @@ - #include - #include "ar9003_eeprom.h" - -+/* helpers to swap EEPROM fields, which are stored as __le16 or __le32. Since -+ * we are 100% sure about it we __force these to u16/u32 for the swab calls to -+ * silence the sparse checks. These macros are used when we have a Big Endian -+ * EEPROM (according to AR5416_EEPMISC_BIG_ENDIAN) and need to convert the -+ * fields to __le16/__le32. -+ */ -+#define EEPROM_FIELD_SWAB16(field) \ -+ (field = (__force __le16)swab16((__force u16)field)) -+#define EEPROM_FIELD_SWAB32(field) \ -+ (field = (__force __le32)swab32((__force u32)field)) -+ - #ifdef __BIG_ENDIAN - #define AR5416_EEPROM_MAGIC 0x5aa5 - #else -@@ -270,19 +281,19 @@ enum ath9k_hal_freq_band { - }; - - struct base_eep_header { -- u16 length; -- u16 checksum; -- u16 version; -+ __le16 length; -+ __le16 checksum; -+ __le16 version; - u8 opCapFlags; - u8 eepMisc; -- u16 regDmn[2]; -+ __le16 regDmn[2]; - u8 macAddr[6]; - u8 rxMask; - u8 txMask; -- u16 rfSilent; -- u16 blueToothOptions; -- u16 deviceCap; -- u32 binBuildNumber; -+ __le16 rfSilent; -+ __le16 blueToothOptions; -+ __le16 deviceCap; -+ __le32 binBuildNumber; - u8 deviceType; - u8 pwdclkind; - u8 fastClk5g; -@@ -300,33 +311,33 @@ struct base_eep_header { - } __packed; - - struct base_eep_header_4k { -- u16 length; -- u16 checksum; -- u16 version; -+ __le16 length; -+ __le16 checksum; -+ __le16 version; - u8 opCapFlags; - u8 eepMisc; -- u16 regDmn[2]; -+ __le16 regDmn[2]; - u8 macAddr[6]; - u8 rxMask; - u8 txMask; -- u16 rfSilent; -- u16 blueToothOptions; -- u16 deviceCap; -- u32 binBuildNumber; -+ __le16 rfSilent; -+ __le16 blueToothOptions; -+ __le16 deviceCap; -+ __le32 binBuildNumber; - u8 deviceType; - u8 txGainType; - } __packed; - - - struct spur_chan { -- u16 spurChan; -+ __le16 spurChan; - u8 spurRangeLow; - u8 spurRangeHigh; - } __packed; - - struct modal_eep_header { -- u32 antCtrlChain[AR5416_MAX_CHAINS]; -- u32 antCtrlCommon; -+ __le32 antCtrlChain[AR5416_MAX_CHAINS]; -+ __le32 antCtrlCommon; - u8 antennaGainCh[AR5416_MAX_CHAINS]; - u8 switchSettling; - u8 txRxAttenCh[AR5416_MAX_CHAINS]; -@@ -361,7 +372,7 @@ struct modal_eep_header { - u8 db_ch1; - u8 lna_ctl; - u8 miscBits; -- u16 xpaBiasLvlFreq[3]; -+ __le16 xpaBiasLvlFreq[3]; - u8 futureModal[6]; - - struct spur_chan spurChans[AR_EEPROM_MODAL_SPURS]; -@@ -375,8 +386,8 @@ struct calDataPerFreqOpLoop { - } __packed; - - struct modal_eep_4k_header { -- u32 antCtrlChain[AR5416_EEP4K_MAX_CHAINS]; -- u32 antCtrlCommon; -+ __le32 antCtrlChain[AR5416_EEP4K_MAX_CHAINS]; -+ __le32 antCtrlCommon; - u8 antennaGainCh[AR5416_EEP4K_MAX_CHAINS]; - u8 switchSettling; - u8 txRxAttenCh[AR5416_EEP4K_MAX_CHAINS]; -@@ -440,19 +451,19 @@ struct modal_eep_4k_header { - } __packed; - - struct base_eep_ar9287_header { -- u16 length; -- u16 checksum; -- u16 version; -+ __le16 length; -+ __le16 checksum; -+ __le16 version; - u8 opCapFlags; - u8 eepMisc; -- u16 regDmn[2]; -+ __le16 regDmn[2]; - u8 macAddr[6]; - u8 rxMask; - u8 txMask; -- u16 rfSilent; -- u16 blueToothOptions; -- u16 deviceCap; -- u32 binBuildNumber; -+ __le16 rfSilent; -+ __le16 blueToothOptions; -+ __le16 deviceCap; -+ __le32 binBuildNumber; - u8 deviceType; - u8 openLoopPwrCntl; - int8_t pwrTableOffset; -@@ -462,8 +473,8 @@ struct base_eep_ar9287_header { - } __packed; - - struct modal_eep_ar9287_header { -- u32 antCtrlChain[AR9287_MAX_CHAINS]; -- u32 antCtrlCommon; -+ __le32 antCtrlChain[AR9287_MAX_CHAINS]; -+ __le32 antCtrlCommon; - int8_t antennaGainCh[AR9287_MAX_CHAINS]; - u8 switchSettling; - u8 txRxAttenCh[AR9287_MAX_CHAINS]; ---- a/drivers/net/wireless/ath/ath9k/eeprom_4k.c -+++ b/drivers/net/wireless/ath/ath9k/eeprom_4k.c -@@ -20,7 +20,7 @@ - - static int ath9k_hw_4k_get_eeprom_ver(struct ath_hw *ah) - { -- u16 version = ah->eeprom.map4k.baseEepHeader.version; -+ u16 version = le16_to_cpu(ah->eeprom.map4k.baseEepHeader.version); - - return (version & AR5416_EEP_VER_MAJOR_MASK) >> - AR5416_EEP_VER_MAJOR_SHIFT; -@@ -28,7 +28,7 @@ static int ath9k_hw_4k_get_eeprom_ver(st - - static int ath9k_hw_4k_get_eeprom_rev(struct ath_hw *ah) - { -- u16 version = ah->eeprom.map4k.baseEepHeader.version; -+ u16 version = le16_to_cpu(ah->eeprom.map4k.baseEepHeader.version); - - return version & AR5416_EEP_VER_MINOR_MASK; - } -@@ -76,8 +76,8 @@ static bool ath9k_hw_4k_fill_eeprom(stru - static u32 ath9k_dump_4k_modal_eeprom(char *buf, u32 len, u32 size, - struct modal_eep_4k_header *modal_hdr) - { -- PR_EEP("Chain0 Ant. Control", modal_hdr->antCtrlChain[0]); -- PR_EEP("Ant. Common Control", modal_hdr->antCtrlCommon); -+ PR_EEP("Chain0 Ant. Control", le16_to_cpu(modal_hdr->antCtrlChain[0])); -+ PR_EEP("Ant. Common Control", le32_to_cpu(modal_hdr->antCtrlCommon)); - PR_EEP("Chain0 Ant. Gain", modal_hdr->antennaGainCh[0]); - PR_EEP("Switch Settle", modal_hdr->switchSettling); - PR_EEP("Chain0 TxRxAtten", modal_hdr->txRxAttenCh[0]); -@@ -132,6 +132,7 @@ static u32 ath9k_hw_4k_dump_eeprom(struc - { - struct ar5416_eeprom_4k *eep = &ah->eeprom.map4k; - struct base_eep_header_4k *pBase = &eep->baseEepHeader; -+ u32 binBuildNumber = le32_to_cpu(pBase->binBuildNumber); - - if (!dump_base_hdr) { - len += scnprintf(buf + len, size - len, -@@ -143,10 +144,10 @@ static u32 ath9k_hw_4k_dump_eeprom(struc - - PR_EEP("Major Version", ath9k_hw_4k_get_eeprom_ver(ah)); - PR_EEP("Minor Version", ath9k_hw_4k_get_eeprom_rev(ah)); -- PR_EEP("Checksum", pBase->checksum); -- PR_EEP("Length", pBase->length); -- PR_EEP("RegDomain1", pBase->regDmn[0]); -- PR_EEP("RegDomain2", pBase->regDmn[1]); -+ PR_EEP("Checksum", le16_to_cpu(pBase->checksum)); -+ PR_EEP("Length", le16_to_cpu(pBase->length)); -+ PR_EEP("RegDomain1", le16_to_cpu(pBase->regDmn[0])); -+ PR_EEP("RegDomain2", le16_to_cpu(pBase->regDmn[1])); - PR_EEP("TX Mask", pBase->txMask); - PR_EEP("RX Mask", pBase->rxMask); - PR_EEP("Allow 5GHz", !!(pBase->opCapFlags & AR5416_OPFLAGS_11A)); -@@ -160,9 +161,9 @@ static u32 ath9k_hw_4k_dump_eeprom(struc - PR_EEP("Disable 5Ghz HT40", !!(pBase->opCapFlags & - AR5416_OPFLAGS_N_5G_HT40)); - PR_EEP("Big Endian", !!(pBase->eepMisc & AR5416_EEPMISC_BIG_ENDIAN)); -- PR_EEP("Cal Bin Major Ver", (pBase->binBuildNumber >> 24) & 0xFF); -- PR_EEP("Cal Bin Minor Ver", (pBase->binBuildNumber >> 16) & 0xFF); -- PR_EEP("Cal Bin Build", (pBase->binBuildNumber >> 8) & 0xFF); -+ PR_EEP("Cal Bin Major Ver", (binBuildNumber >> 24) & 0xFF); -+ PR_EEP("Cal Bin Minor Ver", (binBuildNumber >> 16) & 0xFF); -+ PR_EEP("Cal Bin Build", (binBuildNumber >> 8) & 0xFF); - PR_EEP("TX Gain type", pBase->txGainType); - - len += scnprintf(buf + len, size - len, "%20s : %pM\n", "MacAddress", -@@ -194,54 +195,31 @@ static int ath9k_hw_4k_check_eeprom(stru - return err; - - if (need_swap) -- el = swab16(eep->baseEepHeader.length); -+ el = swab16((__force u16)eep->baseEepHeader.length); - else -- el = eep->baseEepHeader.length; -+ el = le16_to_cpu(eep->baseEepHeader.length); - - el = min(el / sizeof(u16), SIZE_EEPROM_4K); - if (!ath9k_hw_nvram_validate_checksum(ah, el)) - return -EINVAL; - - if (need_swap) { -- u32 integer; -- u16 word; -- -- word = swab16(eep->baseEepHeader.length); -- eep->baseEepHeader.length = word; -- -- word = swab16(eep->baseEepHeader.checksum); -- eep->baseEepHeader.checksum = word; -- -- word = swab16(eep->baseEepHeader.version); -- eep->baseEepHeader.version = word; -- -- word = swab16(eep->baseEepHeader.regDmn[0]); -- eep->baseEepHeader.regDmn[0] = word; -- -- word = swab16(eep->baseEepHeader.regDmn[1]); -- eep->baseEepHeader.regDmn[1] = word; -- -- word = swab16(eep->baseEepHeader.rfSilent); -- eep->baseEepHeader.rfSilent = word; -- -- word = swab16(eep->baseEepHeader.blueToothOptions); -- eep->baseEepHeader.blueToothOptions = word; -- -- word = swab16(eep->baseEepHeader.deviceCap); -- eep->baseEepHeader.deviceCap = word; -- -- integer = swab32(eep->modalHeader.antCtrlCommon); -- eep->modalHeader.antCtrlCommon = integer; -+ EEPROM_FIELD_SWAB16(eep->baseEepHeader.length); -+ EEPROM_FIELD_SWAB16(eep->baseEepHeader.checksum); -+ EEPROM_FIELD_SWAB16(eep->baseEepHeader.version); -+ EEPROM_FIELD_SWAB16(eep->baseEepHeader.regDmn[0]); -+ EEPROM_FIELD_SWAB16(eep->baseEepHeader.regDmn[1]); -+ EEPROM_FIELD_SWAB16(eep->baseEepHeader.rfSilent); -+ EEPROM_FIELD_SWAB16(eep->baseEepHeader.blueToothOptions); -+ EEPROM_FIELD_SWAB16(eep->baseEepHeader.deviceCap); -+ EEPROM_FIELD_SWAB32(eep->modalHeader.antCtrlCommon); - -- for (i = 0; i < AR5416_EEP4K_MAX_CHAINS; i++) { -- integer = swab32(eep->modalHeader.antCtrlChain[i]); -- eep->modalHeader.antCtrlChain[i] = integer; -- } -+ for (i = 0; i < AR5416_EEP4K_MAX_CHAINS; i++) -+ EEPROM_FIELD_SWAB32(eep->modalHeader.antCtrlChain[i]); - -- for (i = 0; i < AR_EEPROM_MODAL_SPURS; i++) { -- word = swab16(eep->modalHeader.spurChans[i].spurChan); -- eep->modalHeader.spurChans[i].spurChan = word; -- } -+ for (i = 0; i < AR_EEPROM_MODAL_SPURS; i++) -+ EEPROM_FIELD_SWAB16( -+ eep->modalHeader.spurChans[i].spurChan); - } - - if (!ath9k_hw_nvram_check_version(ah, AR5416_EEP_VER, -@@ -270,13 +248,13 @@ static u32 ath9k_hw_4k_get_eeprom(struct - case EEP_MAC_MSW: - return get_unaligned_be16(pBase->macAddr + 4); - case EEP_REG_0: -- return pBase->regDmn[0]; -+ return le16_to_cpu(pBase->regDmn[0]); - case EEP_OP_CAP: -- return pBase->deviceCap; -+ return le16_to_cpu(pBase->deviceCap); - case EEP_OP_MODE: - return pBase->opCapFlags; - case EEP_RF_SILENT: -- return pBase->rfSilent; -+ return le16_to_cpu(pBase->rfSilent); - case EEP_OB_2: - return pModal->ob_0; - case EEP_DB_2: -@@ -724,7 +702,7 @@ static void ath9k_hw_4k_set_gain(struct - { - ENABLE_REG_RMW_BUFFER(ah); - REG_RMW(ah, AR_PHY_SWITCH_CHAIN_0, -- pModal->antCtrlChain[0], 0); -+ le32_to_cpu(pModal->antCtrlChain[0]), 0); - - REG_RMW(ah, AR_PHY_TIMING_CTRL4(0), - SM(pModal->iqCalICh[0], AR_PHY_TIMING_CTRL4_IQCORR_Q_I_COFF) | -@@ -790,7 +768,7 @@ static void ath9k_hw_4k_set_board_values - pModal = &eep->modalHeader; - txRxAttenLocal = 23; - -- REG_WRITE(ah, AR_PHY_SWITCH_COM, pModal->antCtrlCommon); -+ REG_WRITE(ah, AR_PHY_SWITCH_COM, le32_to_cpu(pModal->antCtrlCommon)); - - /* Single chain for 4K EEPROM*/ - ath9k_hw_4k_set_gain(ah, pModal, eep, txRxAttenLocal); -@@ -1054,7 +1032,7 @@ static void ath9k_hw_4k_set_board_values - - static u16 ath9k_hw_4k_get_spur_channel(struct ath_hw *ah, u16 i, bool is2GHz) - { -- return ah->eeprom.map4k.modalHeader.spurChans[i].spurChan; -+ return le16_to_cpu(ah->eeprom.map4k.modalHeader.spurChans[i].spurChan); - } - - static u8 ath9k_hw_4k_get_eepmisc(struct ath_hw *ah) ---- a/drivers/net/wireless/ath/ath9k/eeprom_9287.c -+++ b/drivers/net/wireless/ath/ath9k/eeprom_9287.c -@@ -22,7 +22,7 @@ - - static int ath9k_hw_ar9287_get_eeprom_ver(struct ath_hw *ah) - { -- u16 version = ah->eeprom.map9287.baseEepHeader.version; -+ u16 version = le16_to_cpu(ah->eeprom.map9287.baseEepHeader.version); - - return (version & AR5416_EEP_VER_MAJOR_MASK) >> - AR5416_EEP_VER_MAJOR_SHIFT; -@@ -30,7 +30,7 @@ static int ath9k_hw_ar9287_get_eeprom_ve - - static int ath9k_hw_ar9287_get_eeprom_rev(struct ath_hw *ah) - { -- u16 version = ah->eeprom.map9287.baseEepHeader.version; -+ u16 version = le16_to_cpu(ah->eeprom.map9287.baseEepHeader.version); - - return version & AR5416_EEP_VER_MINOR_MASK; - } -@@ -79,9 +79,9 @@ static bool ath9k_hw_ar9287_fill_eeprom( - static u32 ar9287_dump_modal_eeprom(char *buf, u32 len, u32 size, - struct modal_eep_ar9287_header *modal_hdr) - { -- PR_EEP("Chain0 Ant. Control", modal_hdr->antCtrlChain[0]); -- PR_EEP("Chain1 Ant. Control", modal_hdr->antCtrlChain[1]); -- PR_EEP("Ant. Common Control", modal_hdr->antCtrlCommon); -+ PR_EEP("Chain0 Ant. Control", le16_to_cpu(modal_hdr->antCtrlChain[0])); -+ PR_EEP("Chain1 Ant. Control", le16_to_cpu(modal_hdr->antCtrlChain[1])); -+ PR_EEP("Ant. Common Control", le32_to_cpu(modal_hdr->antCtrlCommon)); - PR_EEP("Chain0 Ant. Gain", modal_hdr->antennaGainCh[0]); - PR_EEP("Chain1 Ant. Gain", modal_hdr->antennaGainCh[1]); - PR_EEP("Switch Settle", modal_hdr->switchSettling); -@@ -128,6 +128,7 @@ static u32 ath9k_hw_ar9287_dump_eeprom(s - { - struct ar9287_eeprom *eep = &ah->eeprom.map9287; - struct base_eep_ar9287_header *pBase = &eep->baseEepHeader; -+ u32 binBuildNumber = le32_to_cpu(pBase->binBuildNumber); - - if (!dump_base_hdr) { - len += scnprintf(buf + len, size - len, -@@ -139,10 +140,10 @@ static u32 ath9k_hw_ar9287_dump_eeprom(s - - PR_EEP("Major Version", ath9k_hw_ar9287_get_eeprom_ver(ah)); - PR_EEP("Minor Version", ath9k_hw_ar9287_get_eeprom_rev(ah)); -- PR_EEP("Checksum", pBase->checksum); -- PR_EEP("Length", pBase->length); -- PR_EEP("RegDomain1", pBase->regDmn[0]); -- PR_EEP("RegDomain2", pBase->regDmn[1]); -+ PR_EEP("Checksum", le16_to_cpu(pBase->checksum)); -+ PR_EEP("Length", le16_to_cpu(pBase->length)); -+ PR_EEP("RegDomain1", le16_to_cpu(pBase->regDmn[0])); -+ PR_EEP("RegDomain2", le16_to_cpu(pBase->regDmn[1])); - PR_EEP("TX Mask", pBase->txMask); - PR_EEP("RX Mask", pBase->rxMask); - PR_EEP("Allow 5GHz", !!(pBase->opCapFlags & AR5416_OPFLAGS_11A)); -@@ -156,9 +157,9 @@ static u32 ath9k_hw_ar9287_dump_eeprom(s - PR_EEP("Disable 5Ghz HT40", !!(pBase->opCapFlags & - AR5416_OPFLAGS_N_5G_HT40)); - PR_EEP("Big Endian", !!(pBase->eepMisc & AR5416_EEPMISC_BIG_ENDIAN)); -- PR_EEP("Cal Bin Major Ver", (pBase->binBuildNumber >> 24) & 0xFF); -- PR_EEP("Cal Bin Minor Ver", (pBase->binBuildNumber >> 16) & 0xFF); -- PR_EEP("Cal Bin Build", (pBase->binBuildNumber >> 8) & 0xFF); -+ PR_EEP("Cal Bin Major Ver", (binBuildNumber >> 24) & 0xFF); -+ PR_EEP("Cal Bin Minor Ver", (binBuildNumber >> 16) & 0xFF); -+ PR_EEP("Cal Bin Build", (binBuildNumber >> 8) & 0xFF); - PR_EEP("Power Table Offset", pBase->pwrTableOffset); - PR_EEP("OpenLoop Power Ctrl", pBase->openLoopPwrCntl); - -@@ -182,8 +183,7 @@ static u32 ath9k_hw_ar9287_dump_eeprom(s - - static int ath9k_hw_ar9287_check_eeprom(struct ath_hw *ah) - { -- u32 el, integer; -- u16 word; -+ u32 el; - int i, err; - bool need_swap; - struct ar9287_eeprom *eep = &ah->eeprom.map9287; -@@ -193,51 +193,31 @@ static int ath9k_hw_ar9287_check_eeprom( - return err; - - if (need_swap) -- el = swab16(eep->baseEepHeader.length); -+ el = swab16((__force u16)eep->baseEepHeader.length); - else -- el = eep->baseEepHeader.length; -+ el = le16_to_cpu(eep->baseEepHeader.length); - - el = min(el / sizeof(u16), SIZE_EEPROM_AR9287); - if (!ath9k_hw_nvram_validate_checksum(ah, el)) - return -EINVAL; - - if (need_swap) { -- word = swab16(eep->baseEepHeader.length); -- eep->baseEepHeader.length = word; -- -- word = swab16(eep->baseEepHeader.checksum); -- eep->baseEepHeader.checksum = word; -- -- word = swab16(eep->baseEepHeader.version); -- eep->baseEepHeader.version = word; -- -- word = swab16(eep->baseEepHeader.regDmn[0]); -- eep->baseEepHeader.regDmn[0] = word; -- -- word = swab16(eep->baseEepHeader.regDmn[1]); -- eep->baseEepHeader.regDmn[1] = word; -- -- word = swab16(eep->baseEepHeader.rfSilent); -- eep->baseEepHeader.rfSilent = word; -- -- word = swab16(eep->baseEepHeader.blueToothOptions); -- eep->baseEepHeader.blueToothOptions = word; -- -- word = swab16(eep->baseEepHeader.deviceCap); -- eep->baseEepHeader.deviceCap = word; -- -- integer = swab32(eep->modalHeader.antCtrlCommon); -- eep->modalHeader.antCtrlCommon = integer; -+ EEPROM_FIELD_SWAB16(eep->baseEepHeader.length); -+ EEPROM_FIELD_SWAB16(eep->baseEepHeader.checksum); -+ EEPROM_FIELD_SWAB16(eep->baseEepHeader.version); -+ EEPROM_FIELD_SWAB16(eep->baseEepHeader.regDmn[0]); -+ EEPROM_FIELD_SWAB16(eep->baseEepHeader.regDmn[1]); -+ EEPROM_FIELD_SWAB16(eep->baseEepHeader.rfSilent); -+ EEPROM_FIELD_SWAB16(eep->baseEepHeader.blueToothOptions); -+ EEPROM_FIELD_SWAB16(eep->baseEepHeader.deviceCap); -+ EEPROM_FIELD_SWAB32(eep->modalHeader.antCtrlCommon); - -- for (i = 0; i < AR9287_MAX_CHAINS; i++) { -- integer = swab32(eep->modalHeader.antCtrlChain[i]); -- eep->modalHeader.antCtrlChain[i] = integer; -- } -+ for (i = 0; i < AR9287_MAX_CHAINS; i++) -+ EEPROM_FIELD_SWAB32(eep->modalHeader.antCtrlChain[i]); - -- for (i = 0; i < AR_EEPROM_MODAL_SPURS; i++) { -- word = swab16(eep->modalHeader.spurChans[i].spurChan); -- eep->modalHeader.spurChans[i].spurChan = word; -- } -+ for (i = 0; i < AR_EEPROM_MODAL_SPURS; i++) -+ EEPROM_FIELD_SWAB16( -+ eep->modalHeader.spurChans[i].spurChan); - } - - if (!ath9k_hw_nvram_check_version(ah, AR9287_EEP_VER, -@@ -267,13 +247,13 @@ static u32 ath9k_hw_ar9287_get_eeprom(st - case EEP_MAC_MSW: - return get_unaligned_be16(pBase->macAddr + 4); - case EEP_REG_0: -- return pBase->regDmn[0]; -+ return le16_to_cpu(pBase->regDmn[0]); - case EEP_OP_CAP: -- return pBase->deviceCap; -+ return le16_to_cpu(pBase->deviceCap); - case EEP_OP_MODE: - return pBase->opCapFlags; - case EEP_RF_SILENT: -- return pBase->rfSilent; -+ return le16_to_cpu(pBase->rfSilent); - case EEP_TX_MASK: - return pBase->txMask; - case EEP_RX_MASK: -@@ -878,13 +858,13 @@ static void ath9k_hw_ar9287_set_board_va - - pModal = &eep->modalHeader; - -- REG_WRITE(ah, AR_PHY_SWITCH_COM, pModal->antCtrlCommon); -+ REG_WRITE(ah, AR_PHY_SWITCH_COM, le32_to_cpu(pModal->antCtrlCommon)); - - for (i = 0; i < AR9287_MAX_CHAINS; i++) { - regChainOffset = i * 0x1000; - - REG_WRITE(ah, AR_PHY_SWITCH_CHAIN_0 + regChainOffset, -- pModal->antCtrlChain[i]); -+ le32_to_cpu(pModal->antCtrlChain[i])); - - REG_WRITE(ah, AR_PHY_TIMING_CTRL4(0) + regChainOffset, - (REG_READ(ah, AR_PHY_TIMING_CTRL4(0) + regChainOffset) -@@ -982,7 +962,9 @@ static void ath9k_hw_ar9287_set_board_va - static u16 ath9k_hw_ar9287_get_spur_channel(struct ath_hw *ah, - u16 i, bool is2GHz) - { -- return ah->eeprom.map9287.modalHeader.spurChans[i].spurChan; -+ __le16 spur_ch = ah->eeprom.map9287.modalHeader.spurChans[i].spurChan; -+ -+ return le16_to_cpu(spur_ch); - } - - static u8 ath9k_hw_ar9287_get_eepmisc(struct ath_hw *ah) ---- a/drivers/net/wireless/ath/ath9k/eeprom_def.c -+++ b/drivers/net/wireless/ath/ath9k/eeprom_def.c -@@ -79,7 +79,7 @@ static void ath9k_olc_get_pdadcs(struct - - static int ath9k_hw_def_get_eeprom_ver(struct ath_hw *ah) - { -- u16 version = ah->eeprom.def.baseEepHeader.version; -+ u16 version = le16_to_cpu(ah->eeprom.def.baseEepHeader.version); - - return (version & AR5416_EEP_VER_MAJOR_MASK) >> - AR5416_EEP_VER_MAJOR_SHIFT; -@@ -87,7 +87,7 @@ static int ath9k_hw_def_get_eeprom_ver(s - - static int ath9k_hw_def_get_eeprom_rev(struct ath_hw *ah) - { -- u16 version = ah->eeprom.def.baseEepHeader.version; -+ u16 version = le16_to_cpu(ah->eeprom.def.baseEepHeader.version); - - return version & AR5416_EEP_VER_MINOR_MASK; - } -@@ -135,10 +135,10 @@ static bool ath9k_hw_def_fill_eeprom(str - static u32 ath9k_def_dump_modal_eeprom(char *buf, u32 len, u32 size, - struct modal_eep_header *modal_hdr) - { -- PR_EEP("Chain0 Ant. Control", modal_hdr->antCtrlChain[0]); -- PR_EEP("Chain1 Ant. Control", modal_hdr->antCtrlChain[1]); -- PR_EEP("Chain2 Ant. Control", modal_hdr->antCtrlChain[2]); -- PR_EEP("Ant. Common Control", modal_hdr->antCtrlCommon); -+ PR_EEP("Chain0 Ant. Control", le16_to_cpu(modal_hdr->antCtrlChain[0])); -+ PR_EEP("Chain1 Ant. Control", le16_to_cpu(modal_hdr->antCtrlChain[1])); -+ PR_EEP("Chain2 Ant. Control", le16_to_cpu(modal_hdr->antCtrlChain[2])); -+ PR_EEP("Ant. Common Control", le32_to_cpu(modal_hdr->antCtrlCommon)); - PR_EEP("Chain0 Ant. Gain", modal_hdr->antennaGainCh[0]); - PR_EEP("Chain1 Ant. Gain", modal_hdr->antennaGainCh[1]); - PR_EEP("Chain2 Ant. Gain", modal_hdr->antennaGainCh[2]); -@@ -194,9 +194,9 @@ static u32 ath9k_def_dump_modal_eeprom(c - PR_EEP("Chain1 OutputBias", modal_hdr->ob_ch1); - PR_EEP("Chain1 DriverBias", modal_hdr->db_ch1); - PR_EEP("LNA Control", modal_hdr->lna_ctl); -- PR_EEP("XPA Bias Freq0", modal_hdr->xpaBiasLvlFreq[0]); -- PR_EEP("XPA Bias Freq1", modal_hdr->xpaBiasLvlFreq[1]); -- PR_EEP("XPA Bias Freq2", modal_hdr->xpaBiasLvlFreq[2]); -+ PR_EEP("XPA Bias Freq0", le16_to_cpu(modal_hdr->xpaBiasLvlFreq[0])); -+ PR_EEP("XPA Bias Freq1", le16_to_cpu(modal_hdr->xpaBiasLvlFreq[1])); -+ PR_EEP("XPA Bias Freq2", le16_to_cpu(modal_hdr->xpaBiasLvlFreq[2])); - - return len; - } -@@ -206,6 +206,7 @@ static u32 ath9k_hw_def_dump_eeprom(stru - { - struct ar5416_eeprom_def *eep = &ah->eeprom.def; - struct base_eep_header *pBase = &eep->baseEepHeader; -+ u32 binBuildNumber = le32_to_cpu(pBase->binBuildNumber); - - if (!dump_base_hdr) { - len += scnprintf(buf + len, size - len, -@@ -221,10 +222,10 @@ static u32 ath9k_hw_def_dump_eeprom(stru - - PR_EEP("Major Version", ath9k_hw_def_get_eeprom_ver(ah)); - PR_EEP("Minor Version", ath9k_hw_def_get_eeprom_rev(ah)); -- PR_EEP("Checksum", pBase->checksum); -- PR_EEP("Length", pBase->length); -- PR_EEP("RegDomain1", pBase->regDmn[0]); -- PR_EEP("RegDomain2", pBase->regDmn[1]); -+ PR_EEP("Checksum", le16_to_cpu(pBase->checksum)); -+ PR_EEP("Length", le16_to_cpu(pBase->length)); -+ PR_EEP("RegDomain1", le16_to_cpu(pBase->regDmn[0])); -+ PR_EEP("RegDomain2", le16_to_cpu(pBase->regDmn[1])); - PR_EEP("TX Mask", pBase->txMask); - PR_EEP("RX Mask", pBase->rxMask); - PR_EEP("Allow 5GHz", !!(pBase->opCapFlags & AR5416_OPFLAGS_11A)); -@@ -238,9 +239,9 @@ static u32 ath9k_hw_def_dump_eeprom(stru - PR_EEP("Disable 5Ghz HT40", !!(pBase->opCapFlags & - AR5416_OPFLAGS_N_5G_HT40)); - PR_EEP("Big Endian", !!(pBase->eepMisc & AR5416_EEPMISC_BIG_ENDIAN)); -- PR_EEP("Cal Bin Major Ver", (pBase->binBuildNumber >> 24) & 0xFF); -- PR_EEP("Cal Bin Minor Ver", (pBase->binBuildNumber >> 16) & 0xFF); -- PR_EEP("Cal Bin Build", (pBase->binBuildNumber >> 8) & 0xFF); -+ PR_EEP("Cal Bin Major Ver", (binBuildNumber >> 24) & 0xFF); -+ PR_EEP("Cal Bin Minor Ver", (binBuildNumber >> 16) & 0xFF); -+ PR_EEP("Cal Bin Build", (binBuildNumber >> 8) & 0xFF); - PR_EEP("OpenLoop Power Ctrl", pBase->openLoopPwrCntl); - - len += scnprintf(buf + len, size - len, "%20s : %pM\n", "MacAddress", -@@ -273,61 +274,40 @@ static int ath9k_hw_def_check_eeprom(str - return err; - - if (need_swap) -- el = swab16(eep->baseEepHeader.length); -+ el = swab16((__force u16)eep->baseEepHeader.length); - else -- el = eep->baseEepHeader.length; -+ el = le16_to_cpu(eep->baseEepHeader.length); - - el = min(el / sizeof(u16), SIZE_EEPROM_DEF); - if (!ath9k_hw_nvram_validate_checksum(ah, el)) - return -EINVAL; - - if (need_swap) { -- u32 integer, j; -- u16 word; -- -- word = swab16(eep->baseEepHeader.length); -- eep->baseEepHeader.length = word; -- -- word = swab16(eep->baseEepHeader.checksum); -- eep->baseEepHeader.checksum = word; -- -- word = swab16(eep->baseEepHeader.version); -- eep->baseEepHeader.version = word; -- -- word = swab16(eep->baseEepHeader.regDmn[0]); -- eep->baseEepHeader.regDmn[0] = word; -- -- word = swab16(eep->baseEepHeader.regDmn[1]); -- eep->baseEepHeader.regDmn[1] = word; -- -- word = swab16(eep->baseEepHeader.rfSilent); -- eep->baseEepHeader.rfSilent = word; -- -- word = swab16(eep->baseEepHeader.blueToothOptions); -- eep->baseEepHeader.blueToothOptions = word; -+ u32 j; - -- word = swab16(eep->baseEepHeader.deviceCap); -- eep->baseEepHeader.deviceCap = word; -+ EEPROM_FIELD_SWAB16(eep->baseEepHeader.length); -+ EEPROM_FIELD_SWAB16(eep->baseEepHeader.checksum); -+ EEPROM_FIELD_SWAB16(eep->baseEepHeader.version); -+ EEPROM_FIELD_SWAB16(eep->baseEepHeader.regDmn[0]); -+ EEPROM_FIELD_SWAB16(eep->baseEepHeader.regDmn[1]); -+ EEPROM_FIELD_SWAB16(eep->baseEepHeader.rfSilent); -+ EEPROM_FIELD_SWAB16(eep->baseEepHeader.blueToothOptions); -+ EEPROM_FIELD_SWAB16(eep->baseEepHeader.deviceCap); - - for (j = 0; j < ARRAY_SIZE(eep->modalHeader); j++) { - struct modal_eep_header *pModal = - &eep->modalHeader[j]; -- integer = swab32(pModal->antCtrlCommon); -- pModal->antCtrlCommon = integer; -+ EEPROM_FIELD_SWAB32(pModal->antCtrlCommon); - -- for (i = 0; i < AR5416_MAX_CHAINS; i++) { -- integer = swab32(pModal->antCtrlChain[i]); -- pModal->antCtrlChain[i] = integer; -- } -- for (i = 0; i < 3; i++) { -- word = swab16(pModal->xpaBiasLvlFreq[i]); -- pModal->xpaBiasLvlFreq[i] = word; -- } -+ for (i = 0; i < AR5416_MAX_CHAINS; i++) -+ EEPROM_FIELD_SWAB32(pModal->antCtrlChain[i]); - -- for (i = 0; i < AR_EEPROM_MODAL_SPURS; i++) { -- word = swab16(pModal->spurChans[i].spurChan); -- pModal->spurChans[i].spurChan = word; -- } -+ for (i = 0; i < 3; i++) -+ EEPROM_FIELD_SWAB16(pModal->xpaBiasLvlFreq[i]); -+ -+ for (i = 0; i < AR_EEPROM_MODAL_SPURS; i++) -+ EEPROM_FIELD_SWAB16( -+ pModal->spurChans[i].spurChan); - } - } - -@@ -337,7 +317,7 @@ static int ath9k_hw_def_check_eeprom(str - - /* Enable fixup for AR_AN_TOP2 if necessary */ - if ((ah->hw_version.devid == AR9280_DEVID_PCI) && -- ((eep->baseEepHeader.version & 0xff) > 0x0a) && -+ ((le16_to_cpu(eep->baseEepHeader.version) & 0xff) > 0x0a) && - (eep->baseEepHeader.pwdclkind == 0)) - ah->need_an_top2_fixup = true; - -@@ -370,13 +350,13 @@ static u32 ath9k_hw_def_get_eeprom(struc - case EEP_MAC_MSW: - return get_unaligned_be16(pBase->macAddr + 4); - case EEP_REG_0: -- return pBase->regDmn[0]; -+ return le16_to_cpu(pBase->regDmn[0]); - case EEP_OP_CAP: -- return pBase->deviceCap; -+ return le16_to_cpu(pBase->deviceCap); - case EEP_OP_MODE: - return pBase->opCapFlags; - case EEP_RF_SILENT: -- return pBase->rfSilent; -+ return le16_to_cpu(pBase->rfSilent); - case EEP_OB_5: - return pModal[0].ob; - case EEP_DB_5: -@@ -490,11 +470,13 @@ static void ath9k_hw_def_set_board_value - struct ar5416_eeprom_def *eep = &ah->eeprom.def; - int i, regChainOffset; - u8 txRxAttenLocal; -+ u32 antCtrlCommon; - - pModal = &(eep->modalHeader[IS_CHAN_2GHZ(chan)]); - txRxAttenLocal = IS_CHAN_2GHZ(chan) ? 23 : 44; -+ antCtrlCommon = le32_to_cpu(pModal->antCtrlCommon); - -- REG_WRITE(ah, AR_PHY_SWITCH_COM, pModal->antCtrlCommon & 0xffff); -+ REG_WRITE(ah, AR_PHY_SWITCH_COM, antCtrlCommon & 0xffff); - - for (i = 0; i < AR5416_MAX_CHAINS; i++) { - if (AR_SREV_9280(ah)) { -@@ -508,7 +490,7 @@ static void ath9k_hw_def_set_board_value - regChainOffset = i * 0x1000; - - REG_WRITE(ah, AR_PHY_SWITCH_CHAIN_0 + regChainOffset, -- pModal->antCtrlChain[i]); -+ le32_to_cpu(pModal->antCtrlChain[i])); - - REG_WRITE(ah, AR_PHY_TIMING_CTRL4(0) + regChainOffset, - (REG_READ(ah, AR_PHY_TIMING_CTRL4(0) + regChainOffset) & -@@ -655,7 +637,7 @@ static void ath9k_hw_def_set_board_value - static void ath9k_hw_def_set_addac(struct ath_hw *ah, - struct ath9k_channel *chan) - { --#define XPA_LVL_FREQ(cnt) (pModal->xpaBiasLvlFreq[cnt]) -+#define XPA_LVL_FREQ(cnt) (le16_to_cpu(pModal->xpaBiasLvlFreq[cnt])) - struct modal_eep_header *pModal; - struct ar5416_eeprom_def *eep = &ah->eeprom.def; - u8 biaslevel; -@@ -1315,7 +1297,9 @@ static void ath9k_hw_def_set_txpower(str - - static u16 ath9k_hw_def_get_spur_channel(struct ath_hw *ah, u16 i, bool is2GHz) - { -- return ah->eeprom.def.modalHeader[is2GHz].spurChans[i].spurChan; -+ __le16 spch = ah->eeprom.def.modalHeader[is2GHz].spurChans[i].spurChan; -+ -+ return le16_to_cpu(spch); - } - - static u8 ath9k_hw_def_get_eepmisc(struct ath_hw *ah) diff --git a/package/kernel/mac80211/patches/557-ath9k-disable-bands-via-dt.patch b/package/kernel/mac80211/patches/557-ath9k-disable-bands-via-dt.patch deleted file mode 100644 index ae447ce1f5..0000000000 --- a/package/kernel/mac80211/patches/557-ath9k-disable-bands-via-dt.patch +++ /dev/null @@ -1,32 +0,0 @@ ---- a/Documentation/devicetree/bindings/net/wireless/qca,ath9k.txt -+++ b/Documentation/devicetree/bindings/net/wireless/qca,ath9k.txt -@@ -34,6 +34,14 @@ Optional properties: - ath9k wireless chip (in this case the calibration / - EEPROM data will be loaded from userspace using the - kernel firmware loader). -+- qca,disable-2ghz: Overrides the settings from the EEPROM and disables the -+ 2.4GHz band. Setting this property is only needed -+ when the RF circuit does not support the 2.4GHz band -+ while it is enabled nevertheless in the EEPROM. -+- qca,disable-5ghz: Overrides the settings from the EEPROM and disables the -+ 5GHz band. Setting this property is only needed when -+ the RF circuit does not support the 5GHz band while -+ it is enabled nevertheless in the EEPROM. - - mac-address: See ethernet.txt in the parent directory - - local-mac-address: See ethernet.txt in the parent directory - ---- a/drivers/net/wireless/ath/ath9k/init.c -+++ b/drivers/net/wireless/ath/ath9k/init.c -@@ -571,6 +571,12 @@ static int ath9k_of_init(struct ath_soft - - ath_dbg(common, CONFIG, "parsing configuration from OF node\n"); - -+ if (of_property_read_bool(np, "qca,disable-2ghz")) -+ ah->disable_2ghz = true; -+ -+ if (of_property_read_bool(np, "qca,disable-5ghz")) -+ ah->disable_5ghz = true; -+ - if (of_property_read_bool(np, "qca,no-eeprom")) { - /* ath9k-eeprom--.bin */ - scnprintf(eeprom_name, sizeof(eeprom_name), diff --git a/package/kernel/mac80211/patches/560-ath9k_ubnt_uap_plus_hsr.patch b/package/kernel/mac80211/patches/560-ath9k_ubnt_uap_plus_hsr.patch deleted file mode 100644 index 723749259c..0000000000 --- a/package/kernel/mac80211/patches/560-ath9k_ubnt_uap_plus_hsr.patch +++ /dev/null @@ -1,418 +0,0 @@ ---- a/drivers/net/wireless/ath/ath9k/channel.c -+++ b/drivers/net/wireless/ath/ath9k/channel.c -@@ -15,6 +15,8 @@ - */ - - #include "ath9k.h" -+#include -+#include "hsr.h" - - /* Set/change channels. If the channel is really being changed, it's done - * by reseting the chip. To accomplish this we must first cleanup any pending -@@ -22,6 +24,7 @@ - */ - static int ath_set_channel(struct ath_softc *sc) - { -+ struct ath9k_platform_data *pdata = sc->dev->platform_data; - struct ath_hw *ah = sc->sc_ah; - struct ath_common *common = ath9k_hw_common(ah); - struct ieee80211_hw *hw = sc->hw; -@@ -41,6 +44,11 @@ static int ath_set_channel(struct ath_so - ath_dbg(common, CONFIG, "Set channel: %d MHz width: %d\n", - chan->center_freq, chandef->width); - -+ if (pdata && pdata->ubnt_hsr) { -+ ath9k_hsr_enable(ah, chandef->width, chan->center_freq); -+ ath9k_hsr_status(ah); -+ } -+ - /* update survey stats for the old channel before switching */ - spin_lock_bh(&common->cc_lock); - ath_update_survey_stats(sc); ---- /dev/null -+++ b/drivers/net/wireless/ath/ath9k/hsr.c -@@ -0,0 +1,247 @@ -+/* -+ * -+ * The MIT License (MIT) -+ * -+ * Copyright (c) 2015 Kirill Berezin -+ * -+ * Permission is hereby granted, free of charge, to any person obtaining a copy -+ * of this software and associated documentation files (the "Software"), to deal -+ * in the Software without restriction, including without limitation the rights -+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -+ * copies of the Software, and to permit persons to whom the Software is -+ * furnished to do so, subject to the following conditions: -+ * -+ * The above copyright notice and this permission notice shall be included in -+ * all copies or substantial portions of the Software. -+ * -+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -+ * SOFTWARE. -+ * -+ */ -+ -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+ -+#include "hw.h" -+#include "ath9k.h" -+ -+#define HSR_GPIO_CSN 8 -+#define HSR_GPIO_CLK 6 -+#define HSR_GPIO_DOUT 7 -+#define HSR_GPIO_DIN 5 -+ -+/* delays are in useconds */ -+#define HSR_DELAY_HALF_TICK 100 -+#define HSR_DELAY_PRE_WRITE 75 -+#define HSR_DELAY_FINAL 20000 -+#define HSR_DELAY_TRAILING 200 -+ -+void ath9k_hsr_init(struct ath_hw *ah) -+{ -+ ath9k_hw_gpio_request_in(ah, HSR_GPIO_DIN, NULL); -+ ath9k_hw_gpio_request_out(ah, HSR_GPIO_CSN, NULL, -+ AR_GPIO_OUTPUT_MUX_AS_OUTPUT); -+ ath9k_hw_gpio_request_out(ah, HSR_GPIO_CLK, NULL, -+ AR_GPIO_OUTPUT_MUX_AS_OUTPUT); -+ ath9k_hw_gpio_request_out(ah, HSR_GPIO_DOUT, NULL, -+ AR_GPIO_OUTPUT_MUX_AS_OUTPUT); -+ -+ ath9k_hw_set_gpio(ah, HSR_GPIO_CSN, 1); -+ ath9k_hw_set_gpio(ah, HSR_GPIO_CLK, 0); -+ ath9k_hw_set_gpio(ah, HSR_GPIO_DOUT, 0); -+ -+ udelay(HSR_DELAY_TRAILING); -+} -+ -+static u32 ath9k_hsr_write_byte(struct ath_hw *ah, int delay, u32 value) -+{ -+ struct ath_common *common = ath9k_hw_common(ah); -+ int i; -+ u32 rval = 0; -+ -+ udelay(delay); -+ -+ ath9k_hw_set_gpio(ah, HSR_GPIO_CLK, 0); -+ udelay(HSR_DELAY_HALF_TICK); -+ -+ ath9k_hw_set_gpio(ah, HSR_GPIO_CSN, 0); -+ udelay(HSR_DELAY_HALF_TICK); -+ -+ for (i = 0; i < 8; ++i) { -+ rval = rval << 1; -+ -+ /* pattern is left to right, that is 7-th bit runs first */ -+ ath9k_hw_set_gpio(ah, HSR_GPIO_DOUT, (value >> (7 - i)) & 0x1); -+ udelay(HSR_DELAY_HALF_TICK); -+ -+ ath9k_hw_set_gpio(ah, HSR_GPIO_CLK, 1); -+ udelay(HSR_DELAY_HALF_TICK); -+ -+ rval |= ath9k_hw_gpio_get(ah, HSR_GPIO_DIN); -+ -+ ath9k_hw_set_gpio(ah, HSR_GPIO_CLK, 0); -+ udelay(HSR_DELAY_HALF_TICK); -+ } -+ -+ ath9k_hw_set_gpio(ah, HSR_GPIO_CSN, 1); -+ udelay(HSR_DELAY_HALF_TICK); -+ -+ ath_dbg(common, CONFIG, "ath9k_hsr_write_byte: write byte %d return value is %d %c\n", -+ value, rval, rval > 32 ? rval : '-'); -+ -+ return rval & 0xff; -+} -+ -+static int ath9k_hsr_write_a_chain(struct ath_hw *ah, char *chain, int items) -+{ -+ int status = 0; -+ int i = 0; -+ int err; -+ -+ /* a preamble */ -+ ath9k_hsr_write_byte(ah, HSR_DELAY_PRE_WRITE, 0); -+ status = ath9k_hsr_write_byte(ah, HSR_DELAY_PRE_WRITE, 0); -+ -+ /* clear HSR's reply buffer */ -+ if (status) { -+ int loop = 0; -+ -+ for (loop = 0; (loop < 42) && status; ++loop) -+ status = ath9k_hsr_write_byte(ah, HSR_DELAY_PRE_WRITE, -+ 0); -+ -+ if (loop >= 42) { -+ ATH_DBG_WARN(1, -+ "ath9k_hsr_write_a_chain: can't clear an output buffer after a 42 cycles.\n"); -+ return -1; -+ } -+ } -+ -+ for (i = 0; (i < items) && (chain[i] != 0); ++i) -+ ath9k_hsr_write_byte(ah, HSR_DELAY_PRE_WRITE, (u32)chain[i]); -+ -+ ath9k_hsr_write_byte(ah, HSR_DELAY_PRE_WRITE, 0); -+ mdelay(HSR_DELAY_FINAL / 1000); -+ -+ /* reply */ -+ memset(chain, 0, items); -+ -+ ath9k_hsr_write_byte(ah, HSR_DELAY_PRE_WRITE, 0); -+ udelay(HSR_DELAY_TRAILING); -+ -+ for (i = 0; i < (items - 1); ++i) { -+ u32 ret; -+ -+ ret = ath9k_hsr_write_byte(ah, HSR_DELAY_PRE_WRITE, 0); -+ if (ret != 0) -+ chain[i] = (char)ret; -+ else -+ break; -+ -+ udelay(HSR_DELAY_TRAILING); -+ } -+ -+ if (i <= 1) -+ return 0; -+ -+ err = kstrtoint(chain + 1, 10, &i); -+ if (err) -+ return err; -+ -+ return i; -+} -+ -+int ath9k_hsr_disable(struct ath_hw *ah) -+{ -+ char cmd[10] = {'b', '4', '0', 0, 0, 0, 0, 0, 0, 0}; -+ int ret; -+ -+ ret = ath9k_hsr_write_a_chain(ah, cmd, sizeof(cmd)); -+ if ((ret > 0) && (*cmd == 'B')) -+ return 0; -+ -+ return -1; -+} -+ -+int ath9k_hsr_enable(struct ath_hw *ah, int bw, int fq) -+{ -+ char cmd[10]; -+ int ret; -+ -+ /* Bandwidth argument is 0 sometimes. Assume default 802.11bgn -+ * 20MHz on invalid values -+ */ -+ if ((bw != 5) && (bw != 10) && (bw != 20) && (bw != 40)) -+ bw = 20; -+ -+ memset(cmd, 0, sizeof(cmd)); -+ *cmd = 'b'; -+ snprintf(cmd + 1, 3, "%02d", bw); -+ -+ ret = ath9k_hsr_write_a_chain(ah, cmd, sizeof(cmd)); -+ if ((*cmd != 'B') || (ret != bw)) { -+ ATH_DBG_WARN(1, -+ "ath9k_hsr_enable: failed changing bandwidth -> set (%d,%d) reply (%d, %d)\n", -+ 'b', bw, *cmd, ret); -+ return -1; -+ } -+ -+ memset(cmd, 0, sizeof(cmd)); -+ *cmd = 'x'; -+ ret = ath9k_hsr_write_a_chain(ah, cmd, sizeof(cmd)); -+ if (*cmd != 'X') { -+ ATH_DBG_WARN(1, -+ "ath9k_hsr_enable: failed 'x' command -> reply (%d, %d)\n", -+ *cmd, ret); -+ return -1; -+ } -+ -+ memset(cmd, 0, sizeof(cmd)); -+ *cmd = 'm'; -+ ret = ath9k_hsr_write_a_chain(ah, cmd, sizeof(cmd)); -+ if (*cmd != 'M') { -+ ATH_DBG_WARN(1, -+ "ath9k_hsr_enable: failed 'm' command -> reply (%d, %d)\n", -+ *cmd, ret); -+ return -1; -+ } -+ -+ memset(cmd, 0, sizeof(cmd)); -+ *cmd = 'f'; -+ snprintf(cmd + 1, 6, "%05d", fq); -+ ret = ath9k_hsr_write_a_chain(ah, cmd, sizeof(cmd)); -+ if ((*cmd != 'F') && (ret != fq)) { -+ ATH_DBG_WARN(1, -+ "ath9k_hsr_enable: failed set frequency -> reply (%d, %d)\n", -+ *cmd, ret); -+ return -1; -+ } -+ -+ return 0; -+} -+ -+int ath9k_hsr_status(struct ath_hw *ah) -+{ -+ char cmd[10] = {'s', 0, 0, 0, 0, 0, 0, 0, 0, 0}; -+ int ret; -+ -+ ret = ath9k_hsr_write_a_chain(ah, cmd, sizeof(cmd)); -+ if (*cmd != 'S') { -+ ATH_DBG_WARN(1, "ath9k_hsr_status: returned %d,%d\n", *cmd, -+ ret); -+ return -1; -+ } -+ -+ return 0; -+} ---- /dev/null -+++ b/drivers/net/wireless/ath/ath9k/hsr.h -@@ -0,0 +1,48 @@ -+/* -+ * The MIT License (MIT) -+ * -+ * Copyright (c) 2015 Kirill Berezin -+ * -+ * Permission is hereby granted, free of charge, to any person obtaining a copy -+ * of this software and associated documentation files (the "Software"), to deal -+ * in the Software without restriction, including without limitation the rights -+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -+ * copies of the Software, and to permit persons to whom the Software is -+ * furnished to do so, subject to the following conditions: -+ * -+ * The above copyright notice and this permission notice shall be included in -+ * all copies or substantial portions of the Software. -+ * -+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -+ * SOFTWARE. -+ */ -+ -+#ifndef HSR_H -+#define HSR_H -+ -+#ifdef CPTCFG_ATH9K_UBNTHSR -+ -+void ath9k_hsr_init(struct ath_hw *ah); -+int ath9k_hsr_disable(struct ath_hw *ah); -+int ath9k_hsr_enable(struct ath_hw *ah, int bw, int fq); -+int ath9k_hsr_status(struct ath_hw *ah); -+ -+#else -+static inline void ath9k_hsr_init(struct ath_hw *ah) {} -+ -+static inline int ath9k_hsr_enable(struct ath_hw *ah, int bw, int fq) -+{ -+ return 0; -+} -+ -+static inline int ath9k_hsr_disable(struct ath_hw *ah) { return 0; } -+static inline int ath9k_hsr_status(struct ath_hw *ah) { return 0; } -+ -+#endif -+ -+#endif /* HSR_H */ ---- a/drivers/net/wireless/ath/ath9k/main.c -+++ b/drivers/net/wireless/ath/ath9k/main.c -@@ -16,8 +16,10 @@ - - #include - #include -+#include - #include "ath9k.h" - #include "btcoex.h" -+#include "hsr.h" - - u8 ath9k_parse_mpdudensity(u8 mpdudensity) - { -@@ -652,6 +654,7 @@ void ath_reset_work(struct work_struct * - static int ath9k_start(struct ieee80211_hw *hw) - { - struct ath_softc *sc = hw->priv; -+ struct ath9k_platform_data *pdata = sc->dev->platform_data; - struct ath_hw *ah = sc->sc_ah; - struct ath_common *common = ath9k_hw_common(ah); - struct ieee80211_channel *curchan = sc->cur_chan->chandef.chan; -@@ -730,6 +733,11 @@ static int ath9k_start(struct ieee80211_ - AR_GPIO_OUTPUT_MUX_AS_OUTPUT); - } - -+ if (pdata && pdata->ubnt_hsr) { -+ ath9k_hsr_init(ah); -+ ath9k_hsr_disable(ah); -+ } -+ - /* - * Reset key cache to sane defaults (all entries cleared) instead of - * semi-random values after suspend/resume. ---- a/drivers/net/wireless/ath/ath9k/Makefile -+++ b/drivers/net/wireless/ath/ath9k/Makefile -@@ -16,6 +16,7 @@ ath9k-$(CPTCFG_ATH9K_DFS_CERTIFIED) += d - ath9k-$(CPTCFG_ATH9K_TX99) += tx99.o - ath9k-$(CPTCFG_ATH9K_WOW) += wow.o - ath9k-$(CPTCFG_ATH9K_HWRNG) += rng.o -+ath9k-$(CPTCFG_ATH9K_UBNTHSR) += hsr.o - - ath9k-$(CPTCFG_ATH9K_DEBUGFS) += debug.o - ---- a/include/linux/ath9k_platform.h -+++ b/include/linux/ath9k_platform.h -@@ -54,6 +54,8 @@ struct ath9k_platform_data { - unsigned num_btns; - const struct gpio_keys_button *btns; - unsigned btn_poll_interval; -+ -+ bool ubnt_hsr; - }; - - #endif /* _LINUX_ATH9K_PLATFORM_H */ ---- a/.local-symbols -+++ b/.local-symbols -@@ -153,6 +153,7 @@ ATH9K_WOW= - ATH9K_RFKILL= - ATH9K_CHANNEL_CONTEXT= - ATH9K_PCOEM= -+ATH9K_UBNTHSR= - ATH9K_HTC= - ATH9K_HTC_DEBUGFS= - ATH9K_HWRNG= ---- a/drivers/net/wireless/ath/ath9k/Kconfig -+++ b/drivers/net/wireless/ath/ath9k/Kconfig -@@ -59,6 +59,19 @@ config ATH9K_AHB - Say Y, if you have a SoC with a compatible built-in - wireless MAC. Say N if unsure. - -+config ATH9K_UBNTHSR -+ bool "Ubiquiti UniFi Outdoor Plus HSR support" -+ depends on ATH9K -+ ---help--- -+ This options enables code to control the HSR RF -+ filter in the receive path of the Ubiquiti UniFi -+ Outdoor Plus access point. -+ -+ Say Y if you want to use the access point. The -+ code will only be used if the device is detected, -+ so it does not harm other setup other than occupying -+ a bit of memory. -+ - config ATH9K_DEBUGFS - bool "Atheros ath9k debugging" - depends on ATH9K && DEBUG_FS diff --git a/package/kernel/mac80211/patches/600-01-rt2x00-allow-to-build-rt2800soc-module-for-RT3883.patch b/package/kernel/mac80211/patches/600-01-rt2x00-allow-to-build-rt2800soc-module-for-RT3883.patch new file mode 100644 index 0000000000..565e39de5f --- /dev/null +++ b/package/kernel/mac80211/patches/600-01-rt2x00-allow-to-build-rt2800soc-module-for-RT3883.patch @@ -0,0 +1,30 @@ +From 91094ed065f7794886b4a5490fd6de942f036bb4 Mon Sep 17 00:00:00 2001 +From: Gabor Juhos +Date: Sun, 24 Mar 2013 19:26:26 +0100 +Subject: [PATCH] rt2x00: allow to build rt2800soc module for RT3883 + +Signed-off-by: Gabor Juhos +--- + drivers/net/wireless/ralink/rt2x00/Kconfig | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/net/wireless/ralink/rt2x00/Kconfig ++++ b/drivers/net/wireless/ralink/rt2x00/Kconfig +@@ -210,7 +210,7 @@ endif + config RT2800SOC + tristate "Ralink WiSoC support" + depends on m +- depends on SOC_RT288X || SOC_RT305X ++ depends on SOC_RT288X || SOC_RT305X || SOC_RT3883 + select RT2X00_LIB_SOC + select RT2X00_LIB_MMIO + select RT2X00_LIB_CRYPTO +@@ -245,7 +245,7 @@ config RT2X00_LIB_PCI + + config RT2X00_LIB_SOC + tristate "RT2x00 SoC support" +- depends on SOC_RT288X || SOC_RT305X ++ depends on SOC_RT288X || SOC_RT305X || SOC_RT3883 + depends on m + select RT2X00_LIB + diff --git a/package/kernel/mac80211/patches/600-02-rt2x00-rt2800lib-enable-support-for-RT3883.patch b/package/kernel/mac80211/patches/600-02-rt2x00-rt2800lib-enable-support-for-RT3883.patch new file mode 100644 index 0000000000..f8680108c8 --- /dev/null +++ b/package/kernel/mac80211/patches/600-02-rt2x00-rt2800lib-enable-support-for-RT3883.patch @@ -0,0 +1,20 @@ +From 4f16582c93a71eba9d389e0f0a8aa9099a9587cd Mon Sep 17 00:00:00 2001 +From: Gabor Juhos +Date: Sun, 24 Mar 2013 19:26:26 +0100 +Subject: [PATCH] rt2x00: rt2800lib: enable support for RT3883 + +Signed-off-by: Gabor Juhos +--- + drivers/net/wireless/ralink/rt2x00/rt2800lib.c | 1 + + 1 file changed, 1 insertion(+) + +--- a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c ++++ b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c +@@ -7956,6 +7956,7 @@ static int rt2800_probe_rt(struct rt2x00 + case RT3390: + case RT3572: + case RT3593: ++ case RT3883: + case RT5350: + case RT5390: + case RT5392: diff --git a/package/kernel/mac80211/patches/600-03-rt2x00-rt2800lib-add-rf_vals-for-RF3853.patch b/package/kernel/mac80211/patches/600-03-rt2x00-rt2800lib-add-rf_vals-for-RF3853.patch new file mode 100644 index 0000000000..46e98aff0f --- /dev/null +++ b/package/kernel/mac80211/patches/600-03-rt2x00-rt2800lib-add-rf_vals-for-RF3853.patch @@ -0,0 +1,112 @@ +From ecb394ccf248d8652c463133c4f404458a57a9c1 Mon Sep 17 00:00:00 2001 +From: Gabor Juhos +Date: Sun, 24 Mar 2013 19:26:26 +0100 +Subject: [PATCH] rt2x00: rt2800lib: add rf_vals for RF3853 + +Signed-off-by: Gabor Juhos +--- + drivers/net/wireless/ralink/rt2x00/rt2800.h | 4 +- + drivers/net/wireless/ralink/rt2x00/rt2800lib.c | 65 +++++++++++++++++++++++++++++++ + 2 files changed, 68 insertions(+), 1 deletion(-) + +--- a/drivers/net/wireless/ralink/rt2x00/rt2800.h ++++ b/drivers/net/wireless/ralink/rt2x00/rt2800.h +@@ -48,7 +48,8 @@ + * RF2853 2.4G/5G 3T3R + * RF3320 2.4G 1T1R(RT3350/RT3370/RT3390) + * RF3322 2.4G 2T2R(RT3352/RT3371/RT3372/RT3391/RT3392) +- * RF3053 2.4G/5G 3T3R(RT3883/RT3563/RT3573/RT3593/RT3662) ++ * RF3053 2.4G/5G 3T3R(RT3563/RT3573/RT3593) ++ * RF3853 2.4G/5G 3T3R(RT3883/RT3662) + * RF5592 2.4G/5G 2T2R + * RF3070 2.4G 1T1R + * RF5360 2.4G 1T1R +@@ -72,6 +73,7 @@ + #define RF5592 0x000f + #define RF3070 0x3070 + #define RF3290 0x3290 ++#define RF3853 0x3853 + #define RF5350 0x5350 + #define RF5360 0x5360 + #define RF5362 0x5362 +--- a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c ++++ b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c +@@ -7557,6 +7557,66 @@ static const struct rf_channel rf_vals_3 + {14, 0xF0, 2, 0x18}, + }; + ++static const struct rf_channel rf_vals_3853[] = { ++ {1, 241, 6, 2}, ++ {2, 241, 6, 7}, ++ {3, 242, 6, 2}, ++ {4, 242, 6, 7}, ++ {5, 243, 6, 2}, ++ {6, 243, 6, 7}, ++ {7, 244, 6, 2}, ++ {8, 244, 6, 7}, ++ {9, 245, 6, 2}, ++ {10, 245, 6, 7}, ++ {11, 246, 6, 2}, ++ {12, 246, 6, 7}, ++ {13, 247, 6, 2}, ++ {14, 248, 6, 4}, ++ ++ {36, 0x56, 8, 4}, ++ {38, 0x56, 8, 6}, ++ {40, 0x56, 8, 8}, ++ {44, 0x57, 8, 0}, ++ {46, 0x57, 8, 2}, ++ {48, 0x57, 8, 4}, ++ {52, 0x57, 8, 8}, ++ {54, 0x57, 8, 10}, ++ {56, 0x58, 8, 0}, ++ {60, 0x58, 8, 4}, ++ {62, 0x58, 8, 6}, ++ {64, 0x58, 8, 8}, ++ ++ {100, 0x5b, 8, 8}, ++ {102, 0x5b, 8, 10}, ++ {104, 0x5c, 8, 0}, ++ {108, 0x5c, 8, 4}, ++ {110, 0x5c, 8, 6}, ++ {112, 0x5c, 8, 8}, ++ {114, 0x5c, 8, 10}, ++ {116, 0x5d, 8, 0}, ++ {118, 0x5d, 8, 2}, ++ {120, 0x5d, 8, 4}, ++ {124, 0x5d, 8, 8}, ++ {126, 0x5d, 8, 10}, ++ {128, 0x5e, 8, 0}, ++ {132, 0x5e, 8, 4}, ++ {134, 0x5e, 8, 6}, ++ {136, 0x5e, 8, 8}, ++ {140, 0x5f, 8, 0}, ++ ++ {149, 0x5f, 8, 9}, ++ {151, 0x5f, 8, 11}, ++ {153, 0x60, 8, 1}, ++ {157, 0x60, 8, 5}, ++ {159, 0x60, 8, 7}, ++ {161, 0x60, 8, 9}, ++ {165, 0x61, 8, 1}, ++ {167, 0x61, 8, 3}, ++ {169, 0x61, 8, 5}, ++ {171, 0x61, 8, 7}, ++ {173, 0x61, 8, 9}, ++}; ++ + static const struct rf_channel rf_vals_5592_xtal20[] = { + /* Channel, N, K, mod, R */ + {1, 482, 4, 10, 3}, +@@ -7798,6 +7858,11 @@ static int rt2800_probe_hw_mode(struct r + spec->channels = rf_vals_3x; + break; + ++ case RF3853: ++ spec->num_channels = ARRAY_SIZE(rf_vals_3853); ++ spec->channels = rf_vals_3853; ++ break; ++ + case RF5592: + rt2800_register_read(rt2x00dev, MAC_DEBUG_INDEX, ®); + if (rt2x00_get_field32(reg, MAC_DEBUG_INDEX_XTAL)) { diff --git a/package/kernel/mac80211/patches/600-04-rt2x00-rt2800lib-enable-VCO-calibration-for-RF3853.patch b/package/kernel/mac80211/patches/600-04-rt2x00-rt2800lib-enable-VCO-calibration-for-RF3853.patch new file mode 100644 index 0000000000..eca49773ec --- /dev/null +++ b/package/kernel/mac80211/patches/600-04-rt2x00-rt2800lib-enable-VCO-calibration-for-RF3853.patch @@ -0,0 +1,28 @@ +From f8e3fcf18e1f2d7f9e6a9680c5452da090f33d88 Mon Sep 17 00:00:00 2001 +From: Gabor Juhos +Date: Thu, 1 Aug 2013 14:40:44 +0200 +Subject: [PATCH] rt2x00: rt2800lib: enable VCO calibration for RF3853 + +Signed-off-by: Gabor Juhos +--- + drivers/net/wireless/ralink/rt2x00/rt2800lib.c | 2 ++ + 1 file changed, 2 insertions(+) + +--- a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c ++++ b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c +@@ -4363,6 +4363,7 @@ void rt2800_vco_calibration(struct rt2x0 + case RF3053: + case RF3070: + case RF3290: ++ case RF3853: + case RF5350: + case RF5360: + case RF5362: +@@ -7980,6 +7981,7 @@ static int rt2800_probe_hw_mode(struct r + case RF3053: + case RF3070: + case RF3290: ++ case RF3853: + case RF5350: + case RF5360: + case RF5362: diff --git a/package/kernel/mac80211/patches/600-05-rt2x00-rt2800lib-add-channel-configuration-function-.patch b/package/kernel/mac80211/patches/600-05-rt2x00-rt2800lib-add-channel-configuration-function-.patch new file mode 100644 index 0000000000..a1e5883035 --- /dev/null +++ b/package/kernel/mac80211/patches/600-05-rt2x00-rt2800lib-add-channel-configuration-function-.patch @@ -0,0 +1,235 @@ +From 6e3a17190815c6aa4dc53c2cfe9125fb1154f187 Mon Sep 17 00:00:00 2001 +From: Gabor Juhos +Date: Sun, 24 Mar 2013 19:26:27 +0100 +Subject: [PATCH] rt2x00: rt2800lib: add channel configuration function for + RF3853 + +Signed-off-by: Gabor Juhos +--- + drivers/net/wireless/ralink/rt2x00/rt2800lib.c | 208 +++++++++++++++++++++++++++++++ + 1 file changed, 208 insertions(+) + +--- a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c ++++ b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c +@@ -2584,6 +2584,211 @@ static void rt2800_config_channel_rf3053 + } + } + ++static void rt2800_config_channel_rf3853(struct rt2x00_dev *rt2x00dev, ++ struct ieee80211_conf *conf, ++ struct rf_channel *rf, ++ struct channel_info *info) ++{ ++ u8 rfcsr; ++ u8 bbp; ++ u8 pwr1, pwr2, pwr3; ++ ++ const bool txbf_enabled = false; /* TODO */ ++ ++ /* TODO: add band selection */ ++ ++ if (rf->channel <= 14) ++ rt2800_rfcsr_write(rt2x00dev, 6, 0x40); ++ else if (rf->channel < 132) ++ rt2800_rfcsr_write(rt2x00dev, 6, 0x80); ++ else ++ rt2800_rfcsr_write(rt2x00dev, 6, 0x40); ++ ++ rt2800_rfcsr_write(rt2x00dev, 8, rf->rf1); ++ rt2800_rfcsr_write(rt2x00dev, 9, rf->rf3); ++ ++ if (rf->channel <= 14) ++ rt2800_rfcsr_write(rt2x00dev, 11, 0x46); ++ else ++ rt2800_rfcsr_write(rt2x00dev, 11, 0x48); ++ ++ if (rf->channel <= 14) ++ rt2800_rfcsr_write(rt2x00dev, 12, 0x1a); ++ else ++ rt2800_rfcsr_write(rt2x00dev, 12, 0x52); ++ ++ rt2800_rfcsr_write(rt2x00dev, 13, 0x12); ++ ++ rt2800_rfcsr_read(rt2x00dev, 1, &rfcsr); ++ rt2x00_set_field8(&rfcsr, RFCSR1_RX0_PD, 0); ++ rt2x00_set_field8(&rfcsr, RFCSR1_TX0_PD, 0); ++ rt2x00_set_field8(&rfcsr, RFCSR1_RX1_PD, 0); ++ rt2x00_set_field8(&rfcsr, RFCSR1_TX1_PD, 0); ++ rt2x00_set_field8(&rfcsr, RFCSR1_RX2_PD, 0); ++ rt2x00_set_field8(&rfcsr, RFCSR1_TX2_PD, 0); ++ rt2x00_set_field8(&rfcsr, RFCSR1_RF_BLOCK_EN, 1); ++ rt2x00_set_field8(&rfcsr, RFCSR1_PLL_PD, 1); ++ ++ switch (rt2x00dev->default_ant.tx_chain_num) { ++ case 3: ++ rt2x00_set_field8(&rfcsr, RFCSR1_TX2_PD, 1); ++ /* fallthrough */ ++ case 2: ++ rt2x00_set_field8(&rfcsr, RFCSR1_TX1_PD, 1); ++ /* fallthrough */ ++ case 1: ++ rt2x00_set_field8(&rfcsr, RFCSR1_TX0_PD, 1); ++ break; ++ } ++ ++ switch (rt2x00dev->default_ant.rx_chain_num) { ++ case 3: ++ rt2x00_set_field8(&rfcsr, RFCSR1_RX2_PD, 1); ++ /* fallthrough */ ++ case 2: ++ rt2x00_set_field8(&rfcsr, RFCSR1_RX1_PD, 1); ++ /* fallthrough */ ++ case 1: ++ rt2x00_set_field8(&rfcsr, RFCSR1_RX0_PD, 1); ++ break; ++ } ++ rt2800_rfcsr_write(rt2x00dev, 1, rfcsr); ++ ++ rt2800_freq_cal_mode1(rt2x00dev); ++ ++ rt2800_rfcsr_read(rt2x00dev, 30, &rfcsr); ++ if (!conf_is_ht40(conf)) ++ rfcsr &= ~(0x06); ++ else ++ rfcsr |= 0x06; ++ rt2800_rfcsr_write(rt2x00dev, 30, rfcsr); ++ ++ if (rf->channel <= 14) ++ rt2800_rfcsr_write(rt2x00dev, 31, 0xa0); ++ else ++ rt2800_rfcsr_write(rt2x00dev, 31, 0x80); ++ ++ if (conf_is_ht40(conf)) ++ rt2800_rfcsr_write(rt2x00dev, 32, 0x80); ++ else ++ rt2800_rfcsr_write(rt2x00dev, 32, 0xd8); ++ ++ if (rf->channel <= 14) ++ rt2800_rfcsr_write(rt2x00dev, 34, 0x3c); ++ else ++ rt2800_rfcsr_write(rt2x00dev, 34, 0x20); ++ ++ /* loopback RF_BS */ ++ rt2800_rfcsr_read(rt2x00dev, 36, &rfcsr); ++ if (rf->channel <= 14) ++ rt2x00_set_field8(&rfcsr, RFCSR36_RF_BS, 1); ++ else ++ rt2x00_set_field8(&rfcsr, RFCSR36_RF_BS, 0); ++ rt2800_rfcsr_write(rt2x00dev, 36, rfcsr); ++ ++ if (rf->channel <= 14) ++ rfcsr = 0x23; ++ else if (rf->channel < 100) ++ rfcsr = 0x36; ++ else if (rf->channel < 132) ++ rfcsr = 0x32; ++ else ++ rfcsr = 0x30; ++ ++ if (txbf_enabled) ++ rfcsr |= 0x40; ++ ++ rt2800_rfcsr_write(rt2x00dev, 39, rfcsr); ++ ++ if (rf->channel <= 14) ++ rt2800_rfcsr_write(rt2x00dev, 44, 0x93); ++ else ++ rt2800_rfcsr_write(rt2x00dev, 44, 0x9b); ++ ++ if (rf->channel <= 14) ++ rfcsr = 0xbb; ++ else if (rf->channel < 100) ++ rfcsr = 0xeb; ++ else if (rf->channel < 132) ++ rfcsr = 0xb3; ++ else ++ rfcsr = 0x9b; ++ rt2800_rfcsr_write(rt2x00dev, 45, rfcsr); ++ ++ if (rf->channel <= 14) ++ rfcsr = 0x8e; ++ else ++ rfcsr = 0x8a; ++ ++ if (txbf_enabled) ++ rfcsr |= 0x20; ++ ++ rt2800_rfcsr_write(rt2x00dev, 49, rfcsr); ++ ++ rt2800_rfcsr_write(rt2x00dev, 50, 0x86); ++ ++ rt2800_rfcsr_read(rt2x00dev, 51, &rfcsr); ++ if (rf->channel <= 14) ++ rt2800_rfcsr_write(rt2x00dev, 51, 0x75); ++ else ++ rt2800_rfcsr_write(rt2x00dev, 51, 0x51); ++ ++ rt2800_rfcsr_read(rt2x00dev, 52, &rfcsr); ++ if (rf->channel <= 14) ++ rt2800_rfcsr_write(rt2x00dev, 52, 0x45); ++ else ++ rt2800_rfcsr_write(rt2x00dev, 52, 0x05); ++ ++ if (rf->channel <= 14) { ++ pwr1 = info->default_power1 & 0x1f; ++ pwr2 = info->default_power2 & 0x1f; ++ pwr3 = info->default_power3 & 0x1f; ++ } else { ++ pwr1 = 0x48 | ((info->default_power1 & 0x18) << 1) | ++ (info->default_power1 & 0x7); ++ pwr2 = 0x48 | ((info->default_power2 & 0x18) << 1) | ++ (info->default_power2 & 0x7); ++ pwr3 = 0x48 | ((info->default_power3 & 0x18) << 1) | ++ (info->default_power3 & 0x7); ++ } ++ ++ rt2800_rfcsr_write(rt2x00dev, 53, pwr1); ++ rt2800_rfcsr_write(rt2x00dev, 54, pwr2); ++ rt2800_rfcsr_write(rt2x00dev, 55, pwr3); ++ ++ rt2x00_dbg(rt2x00dev, "Channel:%d, pwr1:%02x, pwr2:%02x, pwr3:%02x\n", ++ rf->channel, pwr1, pwr2, pwr3); ++ ++ bbp = (info->default_power1 >> 5) | ++ ((info->default_power2 & 0xe0) >> 1); ++ rt2800_bbp_write(rt2x00dev, 109, bbp); ++ ++ rt2800_bbp_read(rt2x00dev, 110, &bbp); ++ bbp &= 0x0f; ++ bbp |= (info->default_power3 & 0xe0) >> 1; ++ rt2800_bbp_write(rt2x00dev, 110, bbp); ++ ++ rt2800_rfcsr_read(rt2x00dev, 57, &rfcsr); ++ if (rf->channel <= 14) ++ rt2800_rfcsr_write(rt2x00dev, 57, 0x6e); ++ else ++ rt2800_rfcsr_write(rt2x00dev, 57, 0x3e); ++ ++ /* Enable RF tuning */ ++ rt2800_rfcsr_read(rt2x00dev, 3, &rfcsr); ++ rt2x00_set_field8(&rfcsr, RFCSR3_VCOCAL_EN, 1); ++ rt2800_rfcsr_write(rt2x00dev, 3, rfcsr); ++ ++ udelay(2000); ++ ++ rt2800_bbp_read(rt2x00dev, 49, &bbp); ++ /* clear update flag */ ++ rt2800_bbp_write(rt2x00dev, 49, bbp & 0xfe); ++ rt2800_bbp_write(rt2x00dev, 49, bbp); ++ ++ /* TODO: add calibration for TxBF */ ++} ++ + #define POWER_BOUND 0x27 + #define POWER_BOUND_5G 0x2b + +@@ -3203,6 +3408,9 @@ static void rt2800_config_channel(struct + case RF3322: + rt2800_config_channel_rf3322(rt2x00dev, conf, rf, info); + break; ++ case RF3853: ++ rt2800_config_channel_rf3853(rt2x00dev, conf, rf, info); ++ break; + case RF3070: + case RF5350: + case RF5360: diff --git a/package/kernel/mac80211/patches/600-06-rt2x00-rt2800lib-enable-RF3853-support.patch b/package/kernel/mac80211/patches/600-06-rt2x00-rt2800lib-enable-RF3853-support.patch new file mode 100644 index 0000000000..2d65119fd0 --- /dev/null +++ b/package/kernel/mac80211/patches/600-06-rt2x00-rt2800lib-enable-RF3853-support.patch @@ -0,0 +1,20 @@ +From afd38ae82226551bf879b6c7c4b620c271fee9d2 Mon Sep 17 00:00:00 2001 +From: Gabor Juhos +Date: Thu, 1 Aug 2013 14:42:05 +0200 +Subject: [PATCH] rt2x00: rt2800lib: enable RF3853 support + +Signed-off-by: Gabor Juhos +--- + drivers/net/wireless/ralink/rt2x00/rt2800lib.c | 1 + + 1 file changed, 1 insertion(+) + +--- a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c ++++ b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c +@@ -7483,6 +7483,7 @@ static int rt2800_init_eeprom(struct rt2 + case RF3290: + case RF3320: + case RF3322: ++ case RF3853: + case RF5350: + case RF5360: + case RF5362: diff --git a/package/kernel/mac80211/patches/600-07-rt2x00-rt2800lib-add-MAC-register-initialization-for.patch b/package/kernel/mac80211/patches/600-07-rt2x00-rt2800lib-add-MAC-register-initialization-for.patch new file mode 100644 index 0000000000..d073c01697 --- /dev/null +++ b/package/kernel/mac80211/patches/600-07-rt2x00-rt2800lib-add-MAC-register-initialization-for.patch @@ -0,0 +1,62 @@ +From 0094872a5e8e4664c6ea1b2dfa487063d39ae363 Mon Sep 17 00:00:00 2001 +From: Gabor Juhos +Date: Sun, 24 Mar 2013 19:26:26 +0100 +Subject: [PATCH] rt2x00: rt2800lib: add MAC register initialization for + RT3883 + +Signed-off-by: Gabor Juhos +--- + drivers/net/wireless/ralink/rt2x00/rt2800.h | 14 ++++++++++++++ + drivers/net/wireless/ralink/rt2x00/rt2800lib.c | 19 ++++++++++++++++--- + 2 files changed, 30 insertions(+), 3 deletions(-) + +--- a/drivers/net/wireless/ralink/rt2x00/rt2800.h ++++ b/drivers/net/wireless/ralink/rt2x00/rt2800.h +@@ -1574,6 +1574,20 @@ + #define TX_PWR_CFG_9_STBC7_CH2 FIELD32(0x00000f00) + + /* ++ * TX_TXBF_CFG: ++ */ ++#define TX_TXBF_CFG_0 0x138c ++#define TX_TXBF_CFG_1 0x13a4 ++#define TX_TXBF_CFG_2 0x13a8 ++#define TX_TXBF_CFG_3 0x13ac ++ ++/* ++ * TX_FBK_CFG_3S: ++ */ ++#define TX_FBK_CFG_3S_0 0x13c4 ++#define TX_FBK_CFG_3S_1 0x13c8 ++ ++/* + * RX_FILTER_CFG: RX configuration register. + */ + #define RX_FILTER_CFG 0x1400 +--- a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c ++++ b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c +@@ -4946,6 +4946,12 @@ static int rt2800_init_registers(struct + rt2800_register_write(rt2x00dev, TX_SW_CFG2, + 0x00000000); + } ++ } else if (rt2x00_rt(rt2x00dev, RT3883)) { ++ rt2800_register_write(rt2x00dev, TX_SW_CFG0, 0x00000402); ++ rt2800_register_write(rt2x00dev, TX_SW_CFG1, 0x00000000); ++ rt2800_register_write(rt2x00dev, TX_SW_CFG2, 0x00040000); ++ rt2800_register_write(rt2x00dev, TX_TXBF_CFG_0, 0x8000fc21); ++ rt2800_register_write(rt2x00dev, TX_TXBF_CFG_3, 0x00009c40); + } else if (rt2x00_rt(rt2x00dev, RT5390) || + rt2x00_rt(rt2x00dev, RT5392)) { + rt2800_register_write(rt2x00dev, TX_SW_CFG0, 0x00000404); +@@ -5140,6 +5146,11 @@ static int rt2800_init_registers(struct + reg = rt2x00_rt(rt2x00dev, RT5592) ? 0x00000082 : 0x00000002; + rt2800_register_write(rt2x00dev, TXOP_HLDR_ET, reg); + ++ if (rt2x00_rt(rt2x00dev, RT3883)) { ++ rt2800_register_write(rt2x00dev, TX_FBK_CFG_3S_0, 0x12111008); ++ rt2800_register_write(rt2x00dev, TX_FBK_CFG_3S_1, 0x16151413); ++ } ++ + rt2800_register_read(rt2x00dev, TX_RTS_CFG, ®); + rt2x00_set_field32(®, TX_RTS_CFG_AUTO_RTS_RETRY_LIMIT, 7); + rt2x00_set_field32(®, TX_RTS_CFG_RTS_THRES, diff --git a/package/kernel/mac80211/patches/600-08-rt2x00-rt2800soc-fix-rt2800soc_disable_radio-for-RT3.patch b/package/kernel/mac80211/patches/600-08-rt2x00-rt2800soc-fix-rt2800soc_disable_radio-for-RT3.patch new file mode 100644 index 0000000000..d68ad50447 --- /dev/null +++ b/package/kernel/mac80211/patches/600-08-rt2x00-rt2800soc-fix-rt2800soc_disable_radio-for-RT3.patch @@ -0,0 +1,30 @@ +From 6c2d32478159fffff0b85abb6817a21bb2338231 Mon Sep 17 00:00:00 2001 +From: Gabor Juhos +Date: Sun, 24 Mar 2013 19:26:27 +0100 +Subject: [PATCH] rt2x00: rt2800soc: fix rt2800soc_disable_radio for RT3883 + +Signed-off-by: Gabor Juhos +--- + drivers/net/wireless/ralink/rt2x00/rt2800soc.c | 9 ++++++++- + 1 file changed, 8 insertions(+), 1 deletion(-) + +--- a/drivers/net/wireless/ralink/rt2x00/rt2800soc.c ++++ b/drivers/net/wireless/ralink/rt2x00/rt2800soc.c +@@ -51,9 +51,16 @@ static bool rt2800soc_hwcrypt_disabled(s + + static void rt2800soc_disable_radio(struct rt2x00_dev *rt2x00dev) + { ++ u32 reg; ++ + rt2800_disable_radio(rt2x00dev); + rt2x00mmio_register_write(rt2x00dev, PWR_PIN_CFG, 0); +- rt2x00mmio_register_write(rt2x00dev, TX_PIN_CFG, 0); ++ ++ reg = 0; ++ if (rt2x00_rt(rt2x00dev, RT3883)) ++ rt2x00_set_field32(®, TX_PIN_CFG_RFTR_EN, 1); ++ ++ rt2x00mmio_register_write(rt2x00dev, TX_PIN_CFG, reg); + } + + static int rt2800soc_set_device_state(struct rt2x00_dev *rt2x00dev, diff --git a/package/kernel/mac80211/patches/600-09-rt2x00-rt2800lib-add-BBP-register-initialization-for.patch b/package/kernel/mac80211/patches/600-09-rt2x00-rt2800lib-add-BBP-register-initialization-for.patch new file mode 100644 index 0000000000..41ed4d3de9 --- /dev/null +++ b/package/kernel/mac80211/patches/600-09-rt2x00-rt2800lib-add-BBP-register-initialization-for.patch @@ -0,0 +1,71 @@ +From 84833056aa7dd25f5b097e31c78f2a0914c5160c Mon Sep 17 00:00:00 2001 +From: Gabor Juhos +Date: Sun, 24 Mar 2013 19:26:26 +0100 +Subject: [PATCH] rt2x00: rt2800lib: add BBP register initialization for + RT3883 + +Signed-off-by: Gabor Juhos +--- + drivers/net/wireless/ralink/rt2x00/rt2800lib.c | 44 +++++++++++++++++++++++++++++++ + 1 file changed, 44 insertions(+) + +--- a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c ++++ b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c +@@ -5767,6 +5767,47 @@ static void rt2800_init_bbp_3593(struct + rt2800_bbp_write(rt2x00dev, 103, 0xc0); + } + ++static void rt2800_init_bbp_3883(struct rt2x00_dev *rt2x00dev) ++{ ++ rt2800_init_bbp_early(rt2x00dev); ++ ++ rt2800_bbp_write(rt2x00dev, 4, 0x50); ++ rt2800_bbp_write(rt2x00dev, 47, 0x48); ++ ++ rt2800_bbp_write(rt2x00dev, 86, 0x46); ++ rt2800_bbp_write(rt2x00dev, 88, 0x90); ++ ++ rt2800_bbp_write(rt2x00dev, 92, 0x02); ++ ++ rt2800_bbp_write(rt2x00dev, 103, 0xc0); ++ rt2800_bbp_write(rt2x00dev, 104, 0x92); ++ rt2800_bbp_write(rt2x00dev, 105, 0x34); ++ rt2800_bbp_write(rt2x00dev, 106, 0x12); ++ rt2800_bbp_write(rt2x00dev, 120, 0x50); ++ rt2800_bbp_write(rt2x00dev, 137, 0x0f); ++ rt2800_bbp_write(rt2x00dev, 163, 0x9d); ++ ++ /* Set ITxBF timeout to 0x9C40=1000msec */ ++ rt2800_bbp_write(rt2x00dev, 179, 0x02); ++ rt2800_bbp_write(rt2x00dev, 180, 0x00); ++ rt2800_bbp_write(rt2x00dev, 182, 0x40); ++ rt2800_bbp_write(rt2x00dev, 180, 0x01); ++ rt2800_bbp_write(rt2x00dev, 182, 0x9c); ++ ++ rt2800_bbp_write(rt2x00dev, 179, 0x00); ++ ++ /* Reprogram the inband interface to put right values in RXWI */ ++ rt2800_bbp_write(rt2x00dev, 142, 0x04); ++ rt2800_bbp_write(rt2x00dev, 143, 0x3b); ++ rt2800_bbp_write(rt2x00dev, 142, 0x06); ++ rt2800_bbp_write(rt2x00dev, 143, 0xa0); ++ rt2800_bbp_write(rt2x00dev, 142, 0x07); ++ rt2800_bbp_write(rt2x00dev, 143, 0xa1); ++ rt2800_bbp_write(rt2x00dev, 142, 0x08); ++ rt2800_bbp_write(rt2x00dev, 143, 0xa2); ++ rt2800_bbp_write(rt2x00dev, 148, 0xc8); ++} ++ + static void rt2800_init_bbp_53xx(struct rt2x00_dev *rt2x00dev) + { + int ant, div_mode; +@@ -5986,6 +6027,9 @@ static void rt2800_init_bbp(struct rt2x0 + case RT3593: + rt2800_init_bbp_3593(rt2x00dev); + return; ++ case RT3883: ++ rt2800_init_bbp_3883(rt2x00dev); ++ return; + case RT5390: + case RT5392: + rt2800_init_bbp_53xx(rt2x00dev); diff --git a/package/kernel/mac80211/patches/600-10-rt2x00-rt2800lib-add-RFCSR-initialization-for-RT3883.patch b/package/kernel/mac80211/patches/600-10-rt2x00-rt2800lib-add-RFCSR-initialization-for-RT3883.patch new file mode 100644 index 0000000000..7e772ec676 --- /dev/null +++ b/package/kernel/mac80211/patches/600-10-rt2x00-rt2800lib-add-RFCSR-initialization-for-RT3883.patch @@ -0,0 +1,178 @@ +From 99c659cf345640fd0f733cbcaf4583cc2c868ec0 Mon Sep 17 00:00:00 2001 +From: Gabor Juhos +Date: Mon, 29 Apr 2013 13:21:48 +0200 +Subject: [PATCH] rt2x00: rt2800lib: add RFCSR initialization for RT3883 + +Signed-off-by: Gabor Juhos +--- + drivers/net/wireless/ralink/rt2x00/rt2800.h | 1 + + drivers/net/wireless/ralink/rt2x00/rt2800lib.c | 141 +++++++++++++++++++++++++++++++ + 2 files changed, 142 insertions(+) + +--- a/drivers/net/wireless/ralink/rt2x00/rt2800.h ++++ b/drivers/net/wireless/ralink/rt2x00/rt2800.h +@@ -2155,6 +2155,7 @@ struct mac_iveiv_entry { + /* + * RFCSR 2: + */ ++#define RFCSR2_RESCAL_BP FIELD8(0x40) + #define RFCSR2_RESCAL_EN FIELD8(0x80) + + /* +--- a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c ++++ b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c +@@ -6899,6 +6899,144 @@ static void rt2800_init_rfcsr_5350(struc + rt2800_rfcsr_write(rt2x00dev, 63, 0x00); + } + ++static void rt2800_init_rfcsr_3883(struct rt2x00_dev *rt2x00dev) ++{ ++ u8 rfcsr; ++ ++ /* TODO: get the actual ECO value from the SoC */ ++ const unsigned int eco = 5; ++ ++ rt2800_rf_init_calibration(rt2x00dev, 2); ++ ++ rt2800_rfcsr_write(rt2x00dev, 0, 0xe0); ++ rt2800_rfcsr_write(rt2x00dev, 1, 0x03); ++ rt2800_rfcsr_write(rt2x00dev, 2, 0x50); ++ rt2800_rfcsr_write(rt2x00dev, 3, 0x20); ++ rt2800_rfcsr_write(rt2x00dev, 4, 0x00); ++ rt2800_rfcsr_write(rt2x00dev, 5, 0x00); ++ rt2800_rfcsr_write(rt2x00dev, 6, 0x40); ++ rt2800_rfcsr_write(rt2x00dev, 7, 0x00); ++ rt2800_rfcsr_write(rt2x00dev, 8, 0x5b); ++ rt2800_rfcsr_write(rt2x00dev, 9, 0x08); ++ rt2800_rfcsr_write(rt2x00dev, 10, 0xd3); ++ rt2800_rfcsr_write(rt2x00dev, 11, 0x48); ++ rt2800_rfcsr_write(rt2x00dev, 12, 0x1a); ++ rt2800_rfcsr_write(rt2x00dev, 13, 0x12); ++ rt2800_rfcsr_write(rt2x00dev, 14, 0x00); ++ rt2800_rfcsr_write(rt2x00dev, 15, 0x00); ++ rt2800_rfcsr_write(rt2x00dev, 16, 0x00); ++ ++ /* RFCSR 17 will be initialized later based on the ++ * frequency offset stored in the EEPROM ++ */ ++ ++ rt2800_rfcsr_write(rt2x00dev, 18, 0x40); ++ rt2800_rfcsr_write(rt2x00dev, 19, 0x00); ++ rt2800_rfcsr_write(rt2x00dev, 20, 0x00); ++ rt2800_rfcsr_write(rt2x00dev, 21, 0x00); ++ rt2800_rfcsr_write(rt2x00dev, 22, 0x20); ++ rt2800_rfcsr_write(rt2x00dev, 23, 0xc0); ++ rt2800_rfcsr_write(rt2x00dev, 24, 0x00); ++ rt2800_rfcsr_write(rt2x00dev, 25, 0x00); ++ rt2800_rfcsr_write(rt2x00dev, 26, 0x00); ++ rt2800_rfcsr_write(rt2x00dev, 27, 0x00); ++ rt2800_rfcsr_write(rt2x00dev, 28, 0x00); ++ rt2800_rfcsr_write(rt2x00dev, 29, 0x00); ++ rt2800_rfcsr_write(rt2x00dev, 30, 0x10); ++ rt2800_rfcsr_write(rt2x00dev, 31, 0x80); ++ rt2800_rfcsr_write(rt2x00dev, 32, 0x80); ++ rt2800_rfcsr_write(rt2x00dev, 33, 0x00); ++ rt2800_rfcsr_write(rt2x00dev, 34, 0x20); ++ rt2800_rfcsr_write(rt2x00dev, 35, 0x00); ++ rt2800_rfcsr_write(rt2x00dev, 36, 0x00); ++ rt2800_rfcsr_write(rt2x00dev, 37, 0x00); ++ rt2800_rfcsr_write(rt2x00dev, 38, 0x86); ++ rt2800_rfcsr_write(rt2x00dev, 39, 0x23); ++ rt2800_rfcsr_write(rt2x00dev, 40, 0x00); ++ rt2800_rfcsr_write(rt2x00dev, 41, 0x00); ++ rt2800_rfcsr_write(rt2x00dev, 42, 0x00); ++ rt2800_rfcsr_write(rt2x00dev, 43, 0x00); ++ rt2800_rfcsr_write(rt2x00dev, 44, 0x93); ++ rt2800_rfcsr_write(rt2x00dev, 45, 0xbb); ++ rt2800_rfcsr_write(rt2x00dev, 46, 0x60); ++ rt2800_rfcsr_write(rt2x00dev, 47, 0x00); ++ rt2800_rfcsr_write(rt2x00dev, 48, 0x00); ++ rt2800_rfcsr_write(rt2x00dev, 49, 0x8e); ++ rt2800_rfcsr_write(rt2x00dev, 50, 0x86); ++ rt2800_rfcsr_write(rt2x00dev, 51, 0x51); ++ rt2800_rfcsr_write(rt2x00dev, 52, 0x05); ++ rt2800_rfcsr_write(rt2x00dev, 53, 0x76); ++ rt2800_rfcsr_write(rt2x00dev, 54, 0x76); ++ rt2800_rfcsr_write(rt2x00dev, 55, 0x76); ++ rt2800_rfcsr_write(rt2x00dev, 56, 0xdb); ++ rt2800_rfcsr_write(rt2x00dev, 57, 0x3e); ++ rt2800_rfcsr_write(rt2x00dev, 58, 0x00); ++ rt2800_rfcsr_write(rt2x00dev, 59, 0x00); ++ rt2800_rfcsr_write(rt2x00dev, 60, 0x00); ++ rt2800_rfcsr_write(rt2x00dev, 61, 0x00); ++ rt2800_rfcsr_write(rt2x00dev, 62, 0x00); ++ rt2800_rfcsr_write(rt2x00dev, 63, 0x00); ++ ++ /* TODO: rx filter calibration? */ ++ ++ rt2800_bbp_write(rt2x00dev, 137, 0x0f); ++ ++ rt2800_bbp_write(rt2x00dev, 163, 0x9d); ++ ++ rt2800_bbp_write(rt2x00dev, 105, 0x05); ++ ++ rt2800_bbp_write(rt2x00dev, 179, 0x02); ++ rt2800_bbp_write(rt2x00dev, 180, 0x00); ++ rt2800_bbp_write(rt2x00dev, 182, 0x40); ++ rt2800_bbp_write(rt2x00dev, 180, 0x01); ++ rt2800_bbp_write(rt2x00dev, 182, 0x9c); ++ ++ rt2800_bbp_write(rt2x00dev, 179, 0x00); ++ ++ rt2800_bbp_write(rt2x00dev, 142, 0x04); ++ rt2800_bbp_write(rt2x00dev, 143, 0x3b); ++ rt2800_bbp_write(rt2x00dev, 142, 0x06); ++ rt2800_bbp_write(rt2x00dev, 143, 0xa0); ++ rt2800_bbp_write(rt2x00dev, 142, 0x07); ++ rt2800_bbp_write(rt2x00dev, 143, 0xa1); ++ rt2800_bbp_write(rt2x00dev, 142, 0x08); ++ rt2800_bbp_write(rt2x00dev, 143, 0xa2); ++ rt2800_bbp_write(rt2x00dev, 148, 0xc8); ++ ++ if (eco == 5) { ++ rt2800_rfcsr_write(rt2x00dev, 32, 0xd8); ++ rt2800_rfcsr_write(rt2x00dev, 33, 0x32); ++ } ++ ++ rt2800_rfcsr_read(rt2x00dev, 2, &rfcsr); ++ rt2x00_set_field8(&rfcsr, RFCSR2_RESCAL_BP, 0); ++ rt2x00_set_field8(&rfcsr, RFCSR2_RESCAL_EN, 1); ++ rt2800_rfcsr_write(rt2x00dev, 2, rfcsr); ++ msleep(1); ++ rt2x00_set_field8(&rfcsr, RFCSR2_RESCAL_EN, 0); ++ rt2800_rfcsr_write(rt2x00dev, 2, rfcsr); ++ ++ rt2800_rfcsr_read(rt2x00dev, 1, &rfcsr); ++ rt2x00_set_field8(&rfcsr, RFCSR1_RF_BLOCK_EN, 1); ++ rt2800_rfcsr_write(rt2x00dev, 1, rfcsr); ++ ++ rt2800_rfcsr_read(rt2x00dev, 6, &rfcsr); ++ rfcsr |= 0xc0; ++ rt2800_rfcsr_write(rt2x00dev, 6, rfcsr); ++ ++ rt2800_rfcsr_read(rt2x00dev, 22, &rfcsr); ++ rfcsr |= 0x20; ++ rt2800_rfcsr_write(rt2x00dev, 22, rfcsr); ++ ++ rt2800_rfcsr_read(rt2x00dev, 46, &rfcsr); ++ rfcsr |= 0x20; ++ rt2800_rfcsr_write(rt2x00dev, 46, rfcsr); ++ ++ rt2800_rfcsr_read(rt2x00dev, 20, &rfcsr); ++ rfcsr &= ~0xee; ++ rt2800_rfcsr_write(rt2x00dev, 20, rfcsr); ++} ++ + static void rt2800_init_rfcsr_5390(struct rt2x00_dev *rt2x00dev) + { + rt2800_rf_init_calibration(rt2x00dev, 2); +@@ -7130,6 +7268,9 @@ static void rt2800_init_rfcsr(struct rt2 + case RT3390: + rt2800_init_rfcsr_3390(rt2x00dev); + break; ++ case RT3883: ++ rt2800_init_rfcsr_3883(rt2x00dev); ++ break; + case RT3572: + rt2800_init_rfcsr_3572(rt2x00dev); + break; diff --git a/package/kernel/mac80211/patches/600-11-rt2x00-rt2800lib-use-the-extended-EEPROM-map-for-RT3.patch b/package/kernel/mac80211/patches/600-11-rt2x00-rt2800lib-use-the-extended-EEPROM-map-for-RT3.patch new file mode 100644 index 0000000000..00e00b959f --- /dev/null +++ b/package/kernel/mac80211/patches/600-11-rt2x00-rt2800lib-use-the-extended-EEPROM-map-for-RT3.patch @@ -0,0 +1,22 @@ +From 86022438ffeb1b87dfcd018bf477fdbb43076691 Mon Sep 17 00:00:00 2001 +From: Gabor Juhos +Date: Wed, 8 May 2013 19:35:33 +0200 +Subject: [PATCH] rt2x00: rt2800lib: use the extended EEPROM map for RT3883 + +Signed-off-by: Gabor Juhos +--- + drivers/net/wireless/ralink/rt2x00/rt2800lib.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +--- a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c ++++ b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c +@@ -309,7 +309,8 @@ static unsigned int rt2800_eeprom_word_i + wiphy_name(rt2x00dev->hw->wiphy), word)) + return 0; + +- if (rt2x00_rt(rt2x00dev, RT3593)) ++ if (rt2x00_rt(rt2x00dev, RT3593) || ++ rt2x00_rt(rt2x00dev, RT3883)) + map = rt2800_eeprom_map_ext; + else + map = rt2800_eeprom_map; diff --git a/package/kernel/mac80211/patches/600-12-rt2x00-rt2800lib-force-rf-type-to-RF3853-on-RT3883.patch b/package/kernel/mac80211/patches/600-12-rt2x00-rt2800lib-force-rf-type-to-RF3853-on-RT3883.patch new file mode 100644 index 0000000000..11d3c8ccec --- /dev/null +++ b/package/kernel/mac80211/patches/600-12-rt2x00-rt2800lib-force-rf-type-to-RF3853-on-RT3883.patch @@ -0,0 +1,21 @@ +From 4cf5403f02fa65dc2207f61d223cffa9ae50e907 Mon Sep 17 00:00:00 2001 +From: Gabor Juhos +Date: Thu, 1 Aug 2013 14:48:21 +0200 +Subject: [PATCH] rt2x00: rt2800lib: force rf type to RF3853 on RT3883 + +Signed-off-by: Gabor Juhos +--- + drivers/net/wireless/ralink/rt2x00/rt2800lib.c | 2 ++ + 1 file changed, 2 insertions(+) + +--- a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c ++++ b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c +@@ -7660,6 +7660,8 @@ static int rt2800_init_eeprom(struct rt2 + rt2800_eeprom_read(rt2x00dev, EEPROM_CHIP_ID, &rf); + else if (rt2x00_rt(rt2x00dev, RT3352)) + rf = RF3322; ++ else if (rt2x00_rt(rt2x00dev, RT3883)) ++ rf = RF3853; + else if (rt2x00_rt(rt2x00dev, RT5350)) + rf = RF5350; + else diff --git a/package/kernel/mac80211/patches/600-13-rt2x00-rt2800lib-add-channel-configuration-code-for-.patch b/package/kernel/mac80211/patches/600-13-rt2x00-rt2800lib-add-channel-configuration-code-for-.patch new file mode 100644 index 0000000000..beebe90d36 --- /dev/null +++ b/package/kernel/mac80211/patches/600-13-rt2x00-rt2800lib-add-channel-configuration-code-for-.patch @@ -0,0 +1,136 @@ +From 269f19c848a2380db03a3f207cafb88e28d71c53 Mon Sep 17 00:00:00 2001 +From: Gabor Juhos +Date: Sun, 24 Mar 2013 19:26:28 +0100 +Subject: [PATCH] rt2x00: rt2800lib: add channel configuration code for RT3883 + +Signed-off-by: Gabor Juhos +--- + drivers/net/wireless/ralink/rt2x00/rt2800lib.c | 72 +++++++++++++++++++++++++++++-- + 1 file changed, 69 insertions(+), 3 deletions(-) + +--- a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c ++++ b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c +@@ -3371,6 +3371,36 @@ static char rt2800_txpower_to_dev(struct + return clamp_t(char, txpower, MIN_A_TXPOWER, MAX_A_TXPOWER); + } + ++static void rt3883_bbp_adjust(struct rt2x00_dev *rt2x00dev, ++ struct rf_channel *rf) ++{ ++ u8 bbp; ++ ++ bbp = (rf->channel > 14) ? 0x48 : 0x38; ++ rt2800_bbp_write_with_rx_chain(rt2x00dev, 66, bbp); ++ ++ rt2800_bbp_write(rt2x00dev, 69, 0x12); ++ ++ if (rf->channel <= 14) { ++ rt2800_bbp_write(rt2x00dev, 70, 0x0a); ++ } else { ++ /* Disable CCK packet detection */ ++ rt2800_bbp_write(rt2x00dev, 70, 0x00); ++ } ++ ++ rt2800_bbp_write(rt2x00dev, 73, 0x10); ++ ++ if (rf->channel > 14) { ++ rt2800_bbp_write(rt2x00dev, 62, 0x1d); ++ rt2800_bbp_write(rt2x00dev, 63, 0x1d); ++ rt2800_bbp_write(rt2x00dev, 64, 0x1d); ++ } else { ++ rt2800_bbp_write(rt2x00dev, 62, 0x2d); ++ rt2800_bbp_write(rt2x00dev, 63, 0x2d); ++ rt2800_bbp_write(rt2x00dev, 64, 0x2d); ++ } ++} ++ + static void rt2800_config_channel(struct rt2x00_dev *rt2x00dev, + struct ieee80211_conf *conf, + struct rf_channel *rf, +@@ -3389,6 +3419,12 @@ static void rt2800_config_channel(struct + rt2800_txpower_to_dev(rt2x00dev, rf->channel, + info->default_power3); + ++ switch (rt2x00dev->chip.rt) { ++ case RT3883: ++ rt3883_bbp_adjust(rt2x00dev, rf); ++ break; ++ } ++ + switch (rt2x00dev->chip.rf) { + case RF2020: + case RF3020: +@@ -3490,6 +3526,15 @@ static void rt2800_config_channel(struct + rt2800_bbp_write(rt2x00dev, 63, 0x37 - rt2x00dev->lna_gain); + rt2800_bbp_write(rt2x00dev, 64, 0x37 - rt2x00dev->lna_gain); + rt2800_bbp_write(rt2x00dev, 77, 0x98); ++ } else if (rt2x00_rt(rt2x00dev, RT3883)) { ++ rt2800_bbp_write(rt2x00dev, 62, 0x37 - rt2x00dev->lna_gain); ++ rt2800_bbp_write(rt2x00dev, 63, 0x37 - rt2x00dev->lna_gain); ++ rt2800_bbp_write(rt2x00dev, 64, 0x37 - rt2x00dev->lna_gain); ++ ++ if (rt2x00dev->default_ant.rx_chain_num > 1) ++ rt2800_bbp_write(rt2x00dev, 86, 0x46); ++ else ++ rt2800_bbp_write(rt2x00dev, 86, 0); + } else { + rt2800_bbp_write(rt2x00dev, 62, 0x37 - rt2x00dev->lna_gain); + rt2800_bbp_write(rt2x00dev, 63, 0x37 - rt2x00dev->lna_gain); +@@ -3502,6 +3547,7 @@ static void rt2800_config_channel(struct + !rt2x00_rt(rt2x00dev, RT5392)) { + if (rt2x00_has_cap_external_lna_bg(rt2x00dev)) { + rt2800_bbp_write(rt2x00dev, 82, 0x62); ++ rt2800_bbp_write(rt2x00dev, 82, 0x62); + rt2800_bbp_write(rt2x00dev, 75, 0x46); + } else { + if (rt2x00_rt(rt2x00dev, RT3593)) +@@ -3510,19 +3556,22 @@ static void rt2800_config_channel(struct + rt2800_bbp_write(rt2x00dev, 82, 0x84); + rt2800_bbp_write(rt2x00dev, 75, 0x50); + } +- if (rt2x00_rt(rt2x00dev, RT3593)) ++ if (rt2x00_rt(rt2x00dev, RT3593) || ++ rt2x00_rt(rt2x00dev, RT3883)) + rt2800_bbp_write(rt2x00dev, 83, 0x8a); + } + + } else { + if (rt2x00_rt(rt2x00dev, RT3572)) + rt2800_bbp_write(rt2x00dev, 82, 0x94); +- else if (rt2x00_rt(rt2x00dev, RT3593)) ++ else if (rt2x00_rt(rt2x00dev, RT3593) || ++ rt2x00_rt(rt2x00dev, RT3883)) + rt2800_bbp_write(rt2x00dev, 82, 0x82); + else + rt2800_bbp_write(rt2x00dev, 82, 0xf2); + +- if (rt2x00_rt(rt2x00dev, RT3593)) ++ if (rt2x00_rt(rt2x00dev, RT3593) || ++ rt2x00_rt(rt2x00dev, RT3883)) + rt2800_bbp_write(rt2x00dev, 83, 0x9a); + + if (rt2x00_has_cap_external_lna_a(rt2x00dev)) +@@ -3644,6 +3693,23 @@ static void rt2800_config_channel(struct + + rt2800_bbp_write_with_rx_chain(rt2x00dev, 66, reg); + ++ usleep_range(1000, 1500); ++ } ++ ++ if (rt2x00_rt(rt2x00dev, RT3883)) { ++ if (!conf_is_ht40(conf)) ++ rt2800_bbp_write(rt2x00dev, 105, 0x34); ++ else ++ rt2800_bbp_write(rt2x00dev, 105, 0x04); ++ ++ /* AGC init */ ++ if (rf->channel <= 14) ++ reg = 0x2e + rt2x00dev->lna_gain; ++ else ++ reg = 0x20 + ((rt2x00dev->lna_gain * 5) / 3); ++ ++ rt2800_bbp_write_with_rx_chain(rt2x00dev, 66, reg); ++ + usleep_range(1000, 1500); + } + diff --git a/package/kernel/mac80211/patches/600-14-rt2x00-rt2800lib-fix-txpower_to_dev-function-for-RT3.patch b/package/kernel/mac80211/patches/600-14-rt2x00-rt2800lib-fix-txpower_to_dev-function-for-RT3.patch new file mode 100644 index 0000000000..f18f9d5714 --- /dev/null +++ b/package/kernel/mac80211/patches/600-14-rt2x00-rt2800lib-fix-txpower_to_dev-function-for-RT3.patch @@ -0,0 +1,30 @@ +From e37d93abaabe3ab72b0332a18092acc162307274 Mon Sep 17 00:00:00 2001 +From: Gabor Juhos +Date: Mon, 30 Sep 2013 13:57:26 +0200 +Subject: [PATCH] rt2x00: rt2800lib: fix txpower_to_dev function for RT3883 + +Signed-off-by: Gabor Juhos +--- + drivers/net/wireless/ralink/rt2x00/rt2800lib.c | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +--- a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c ++++ b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c +@@ -3358,13 +3358,15 @@ static char rt2800_txpower_to_dev(struct + unsigned int channel, + char txpower) + { +- if (rt2x00_rt(rt2x00dev, RT3593)) ++ if (rt2x00_rt(rt2x00dev, RT3593) || ++ rt2x00_rt(rt2x00dev, RT3883)) + txpower = rt2x00_get_field8(txpower, EEPROM_TXPOWER_ALC); + + if (channel <= 14) + return clamp_t(char, txpower, MIN_G_TXPOWER, MAX_G_TXPOWER); + +- if (rt2x00_rt(rt2x00dev, RT3593)) ++ if (rt2x00_rt(rt2x00dev, RT3593) || ++ rt2x00_rt(rt2x00dev, RT3883)) + return clamp_t(char, txpower, MIN_A_TXPOWER_3593, + MAX_A_TXPOWER_3593); + else diff --git a/package/kernel/mac80211/patches/600-15-rt2x00-rt2800lib-use-correct-txpower-calculation-fun.patch b/package/kernel/mac80211/patches/600-15-rt2x00-rt2800lib-use-correct-txpower-calculation-fun.patch new file mode 100644 index 0000000000..0acdf2af79 --- /dev/null +++ b/package/kernel/mac80211/patches/600-15-rt2x00-rt2800lib-use-correct-txpower-calculation-fun.patch @@ -0,0 +1,23 @@ +From c4d79e344bd580d85821390d49f92dced7d8e125 Mon Sep 17 00:00:00 2001 +From: Gabor Juhos +Date: Sun, 24 Mar 2013 19:26:29 +0100 +Subject: [PATCH] rt2x00: rt2800lib: use correct txpower calculation function + for RT3883 + +Signed-off-by: Gabor Juhos +--- + drivers/net/wireless/ralink/rt2x00/rt2800lib.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +--- a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c ++++ b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c +@@ -4596,7 +4596,8 @@ static void rt2800_config_txpower(struct + struct ieee80211_channel *chan, + int power_level) + { +- if (rt2x00_rt(rt2x00dev, RT3593)) ++ if (rt2x00_rt(rt2x00dev, RT3593) || ++ rt2x00_rt(rt2x00dev, RT3883)) + rt2800_config_txpower_rt3593(rt2x00dev, chan, power_level); + else + rt2800_config_txpower_rt28xx(rt2x00dev, chan, power_level); diff --git a/package/kernel/mac80211/patches/600-16-rt2x00-rt2800lib-hardcode-txmixer-gain-values-to-zer.patch b/package/kernel/mac80211/patches/600-16-rt2x00-rt2800lib-hardcode-txmixer-gain-values-to-zer.patch new file mode 100644 index 0000000000..5877a32bd8 --- /dev/null +++ b/package/kernel/mac80211/patches/600-16-rt2x00-rt2800lib-hardcode-txmixer-gain-values-to-zer.patch @@ -0,0 +1,33 @@ +From caea0671cd8fd9ade4f5969cbe0ee545e94ae105 Mon Sep 17 00:00:00 2001 +From: Gabor Juhos +Date: Sat, 24 Aug 2013 11:49:55 +0200 +Subject: [PATCH] rt2x00: rt2800lib: hardcode txmixer gain values to zero for + RT3883 + +Signed-off-by: Gabor Juhos +--- + drivers/net/wireless/ralink/rt2x00/rt2800lib.c | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +--- a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c ++++ b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c +@@ -7543,7 +7543,8 @@ static u8 rt2800_get_txmixer_gain_24g(st + { + u16 word; + +- if (rt2x00_rt(rt2x00dev, RT3593)) ++ if (rt2x00_rt(rt2x00dev, RT3593) || ++ rt2x00_rt(rt2x00dev, RT3883)) + return 0; + + rt2800_eeprom_read(rt2x00dev, EEPROM_TXMIXER_GAIN_BG, &word); +@@ -7557,7 +7558,8 @@ static u8 rt2800_get_txmixer_gain_5g(str + { + u16 word; + +- if (rt2x00_rt(rt2x00dev, RT3593)) ++ if (rt2x00_rt(rt2x00dev, RT3593) || ++ rt2x00_rt(rt2x00dev, RT3883)) + return 0; + + rt2800_eeprom_read(rt2x00dev, EEPROM_TXMIXER_GAIN_A, &word); diff --git a/package/kernel/mac80211/patches/600-17-rt2x00-rt2800lib-use-correct-RT-XWI-size-for-RT3883.patch b/package/kernel/mac80211/patches/600-17-rt2x00-rt2800lib-use-correct-RT-XWI-size-for-RT3883.patch new file mode 100644 index 0000000000..abc6eb4414 --- /dev/null +++ b/package/kernel/mac80211/patches/600-17-rt2x00-rt2800lib-use-correct-RT-XWI-size-for-RT3883.patch @@ -0,0 +1,20 @@ +From 11c40fb47c4a4dd6ad060c2ae127ced89ffb9fe1 Mon Sep 17 00:00:00 2001 +From: Gabor Juhos +Date: Thu, 18 Apr 2013 14:33:33 +0200 +Subject: [PATCH] rt2x00: rt2800lib: use correct [RT]XWI size for RT3883 + +Signed-off-by: Gabor Juhos +--- + drivers/net/wireless/ralink/rt2x00/rt2800lib.c | 1 + + 1 file changed, 1 insertion(+) + +--- a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c ++++ b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c +@@ -520,6 +520,7 @@ void rt2800_get_txwi_rxwi_size(struct rt + { + switch (rt2x00dev->chip.rt) { + case RT3593: ++ case RT3883: + *txwi_size = TXWI_DESC_SIZE_4WORDS; + *rxwi_size = RXWI_DESC_SIZE_5WORDS; + break; diff --git a/package/kernel/mac80211/patches/600-18-rt2x00-rt2800lib-fix-antenna-configuration-for-RT388.patch b/package/kernel/mac80211/patches/600-18-rt2x00-rt2800lib-fix-antenna-configuration-for-RT388.patch new file mode 100644 index 0000000000..c1e41bb84e --- /dev/null +++ b/package/kernel/mac80211/patches/600-18-rt2x00-rt2800lib-fix-antenna-configuration-for-RT388.patch @@ -0,0 +1,22 @@ +From fa5ad9c025610c22048add2f0ad03f62b6ca1e74 Mon Sep 17 00:00:00 2001 +From: Gabor Juhos +Date: Mon, 30 Sep 2013 16:53:33 +0200 +Subject: [PATCH] rt2x00: rt2800lib: fix antenna configuration for RT3883 + +Signed-off-by: Gabor Juhos +--- + drivers/net/wireless/ralink/rt2x00/rt2800lib.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +--- a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c ++++ b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c +@@ -1888,7 +1888,8 @@ void rt2800_config_ant(struct rt2x00_dev + rt2800_bbp_write(rt2x00dev, 3, r3); + rt2800_bbp_write(rt2x00dev, 1, r1); + +- if (rt2x00_rt(rt2x00dev, RT3593)) { ++ if (rt2x00_rt(rt2x00dev, RT3593) || ++ rt2x00_rt(rt2x00dev, RT3883)) { + if (ant->rx_chain_num == 1) + rt2800_bbp_write(rt2x00dev, 86, 0x00); + else diff --git a/package/kernel/mac80211/patches/600-19-rt2x00-rt2800lib-fix-LNA-gain-configuration-for-RT38.patch b/package/kernel/mac80211/patches/600-19-rt2x00-rt2800lib-fix-LNA-gain-configuration-for-RT38.patch new file mode 100644 index 0000000000..645b3c54e9 --- /dev/null +++ b/package/kernel/mac80211/patches/600-19-rt2x00-rt2800lib-fix-LNA-gain-configuration-for-RT38.patch @@ -0,0 +1,32 @@ +From 6d668fef3a1baa60bdd715ee062ddb6333d2647c Mon Sep 17 00:00:00 2001 +From: Gabor Juhos +Date: Mon, 30 Sep 2013 16:58:23 +0200 +Subject: [PATCH] rt2x00: rt2800lib: fix LNA gain configuration for RT3883 + +Signed-off-by: Gabor Juhos +--- + drivers/net/wireless/ralink/rt2x00/rt2800lib.c | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +--- a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c ++++ b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c +@@ -1911,7 +1911,8 @@ static void rt2800_config_lna_gain(struc + rt2800_eeprom_read(rt2x00dev, EEPROM_LNA, &eeprom); + lna_gain = rt2x00_get_field16(eeprom, EEPROM_LNA_A0); + } else if (libconf->rf.channel <= 128) { +- if (rt2x00_rt(rt2x00dev, RT3593)) { ++ if (rt2x00_rt(rt2x00dev, RT3593) || ++ rt2x00_rt(rt2x00dev, RT3883)) { + rt2800_eeprom_read(rt2x00dev, EEPROM_EXT_LNA2, &eeprom); + lna_gain = rt2x00_get_field16(eeprom, + EEPROM_EXT_LNA2_A1); +@@ -1921,7 +1922,8 @@ static void rt2800_config_lna_gain(struc + EEPROM_RSSI_BG2_LNA_A1); + } + } else { +- if (rt2x00_rt(rt2x00dev, RT3593)) { ++ if (rt2x00_rt(rt2x00dev, RT3593) || ++ rt2x00_rt(rt2x00dev, RT3883)) { + rt2800_eeprom_read(rt2x00dev, EEPROM_EXT_LNA2, &eeprom); + lna_gain = rt2x00_get_field16(eeprom, + EEPROM_EXT_LNA2_A2); diff --git a/package/kernel/mac80211/patches/600-20-rt2x00-rt2800lib-fix-VGC-setup-for-RT3883.patch b/package/kernel/mac80211/patches/600-20-rt2x00-rt2800lib-fix-VGC-setup-for-RT3883.patch new file mode 100644 index 0000000000..57ea80ea0f --- /dev/null +++ b/package/kernel/mac80211/patches/600-20-rt2x00-rt2800lib-fix-VGC-setup-for-RT3883.patch @@ -0,0 +1,44 @@ +From c49b2d829aa1c816a46a577cdec6d2ff14d9f06e Mon Sep 17 00:00:00 2001 +From: Gabor Juhos +Date: Tue, 1 Oct 2013 15:40:08 +0200 +Subject: [PATCH] rt2x00: rt2800lib: fix VGC setup for RT3883 + +Signed-off-by: Gabor Juhos +--- + drivers/net/wireless/ralink/rt2x00/rt2800lib.c | 11 +++++++++-- + 1 file changed, 9 insertions(+), 2 deletions(-) + +--- a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c ++++ b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c +@@ -4799,7 +4799,8 @@ static u8 rt2800_get_default_vgc(struct + else + vgc = 0x2e + rt2x00dev->lna_gain; + } else { /* 5GHZ band */ +- if (rt2x00_rt(rt2x00dev, RT3593)) ++ if (rt2x00_rt(rt2x00dev, RT3593) || ++ rt2x00_rt(rt2x00dev, RT3883)) + vgc = 0x20 + (rt2x00dev->lna_gain * 5) / 3; + else if (rt2x00_rt(rt2x00dev, RT5592)) + vgc = 0x24 + (2 * rt2x00dev->lna_gain); +@@ -4819,7 +4820,8 @@ static inline void rt2800_set_vgc(struct + { + if (qual->vgc_level != vgc_level) { + if (rt2x00_rt(rt2x00dev, RT3572) || +- rt2x00_rt(rt2x00dev, RT3593)) { ++ rt2x00_rt(rt2x00dev, RT3593) || ++ rt2x00_rt(rt2x00dev, RT3883)) { + rt2800_bbp_write_with_rx_chain(rt2x00dev, 66, + vgc_level); + } else if (rt2x00_rt(rt2x00dev, RT5592)) { +@@ -4866,6 +4868,11 @@ void rt2800_link_tuner(struct rt2x00_dev + } + break; + ++ case RT3883: ++ if (qual->rssi > -65) ++ vgc += 0x10; ++ break; ++ + case RT5592: + if (qual->rssi > -65) + vgc += 0x20; diff --git a/package/kernel/mac80211/patches/600-21-rt2x00-rt2800lib-fix-EEPROM-LNA-validation-for-RT388.patch b/package/kernel/mac80211/patches/600-21-rt2x00-rt2800lib-fix-EEPROM-LNA-validation-for-RT388.patch new file mode 100644 index 0000000000..bb6f4fd684 --- /dev/null +++ b/package/kernel/mac80211/patches/600-21-rt2x00-rt2800lib-fix-EEPROM-LNA-validation-for-RT388.patch @@ -0,0 +1,42 @@ +From 1616650aea676541d4dc8adc6f4219856d193c8b Mon Sep 17 00:00:00 2001 +From: Gabor Juhos +Date: Tue, 1 Oct 2013 17:27:57 +0200 +Subject: [PATCH] rt2x00: rt2800lib: fix EEPROM LNA validation for RT3883 + +Signed-off-by: Gabor Juhos +--- + drivers/net/wireless/ralink/rt2x00/rt2800lib.c | 9 ++++++--- + 1 file changed, 6 insertions(+), 3 deletions(-) + +--- a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c ++++ b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c +@@ -7676,7 +7676,8 @@ static int rt2800_validate_eeprom(struct + rt2800_eeprom_read(rt2x00dev, EEPROM_RSSI_BG2, &word); + if (abs(rt2x00_get_field16(word, EEPROM_RSSI_BG2_OFFSET2)) > 10) + rt2x00_set_field16(&word, EEPROM_RSSI_BG2_OFFSET2, 0); +- if (!rt2x00_rt(rt2x00dev, RT3593)) { ++ if (!rt2x00_rt(rt2x00dev, RT3593) && ++ !rt2x00_rt(rt2x00dev, RT3883)) { + if (rt2x00_get_field16(word, EEPROM_RSSI_BG2_LNA_A1) == 0x00 || + rt2x00_get_field16(word, EEPROM_RSSI_BG2_LNA_A1) == 0xff) + rt2x00_set_field16(&word, EEPROM_RSSI_BG2_LNA_A1, +@@ -7696,7 +7697,8 @@ static int rt2800_validate_eeprom(struct + rt2800_eeprom_read(rt2x00dev, EEPROM_RSSI_A2, &word); + if (abs(rt2x00_get_field16(word, EEPROM_RSSI_A2_OFFSET2)) > 10) + rt2x00_set_field16(&word, EEPROM_RSSI_A2_OFFSET2, 0); +- if (!rt2x00_rt(rt2x00dev, RT3593)) { ++ if (!rt2x00_rt(rt2x00dev, RT3593) && ++ !rt2x00_rt(rt2x00dev, RT3883)) { + if (rt2x00_get_field16(word, EEPROM_RSSI_A2_LNA_A2) == 0x00 || + rt2x00_get_field16(word, EEPROM_RSSI_A2_LNA_A2) == 0xff) + rt2x00_set_field16(&word, EEPROM_RSSI_A2_LNA_A2, +@@ -7704,7 +7706,8 @@ static int rt2800_validate_eeprom(struct + } + rt2800_eeprom_write(rt2x00dev, EEPROM_RSSI_A2, word); + +- if (rt2x00_rt(rt2x00dev, RT3593)) { ++ if (rt2x00_rt(rt2x00dev, RT3593) || ++ rt2x00_rt(rt2x00dev, RT3883)) { + rt2800_eeprom_read(rt2x00dev, EEPROM_EXT_LNA2, &word); + if (rt2x00_get_field16(word, EEPROM_EXT_LNA2_A1) == 0x00 || + rt2x00_get_field16(word, EEPROM_EXT_LNA2_A1) == 0xff) diff --git a/package/kernel/mac80211/patches/600-22-rt2x00-rt2800lib-fix-txpower-compensation-for-RT3883.patch b/package/kernel/mac80211/patches/600-22-rt2x00-rt2800lib-fix-txpower-compensation-for-RT3883.patch new file mode 100644 index 0000000000..b4872b5108 --- /dev/null +++ b/package/kernel/mac80211/patches/600-22-rt2x00-rt2800lib-fix-txpower-compensation-for-RT3883.patch @@ -0,0 +1,22 @@ +From e3871034a0e7c8a95152dc3eafbcc4535398cbdc Mon Sep 17 00:00:00 2001 +From: Gabor Juhos +Date: Wed, 2 Oct 2013 10:11:59 +0200 +Subject: [PATCH] rt2x00: rt2800lib: fix txpower compensation for RT3883 + +Signed-off-by: Gabor Juhos +--- + drivers/net/wireless/ralink/rt2x00/rt2800lib.c | 3 +++ + 1 file changed, 3 insertions(+) + +--- a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c ++++ b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c +@@ -3965,6 +3965,9 @@ static u8 rt2800_compensate_txpower(stru + if (rt2x00_rt(rt2x00dev, RT3593)) + return min_t(u8, txpower, 0xc); + ++ if (rt2x00_rt(rt2x00dev, RT3883)) ++ return min_t(u8, txpower, 0xf); ++ + if (rt2x00_has_cap_power_limit(rt2x00dev)) { + /* + * Check if eirp txpower exceed txpower_limit. diff --git a/package/kernel/mac80211/patches/600-23-rt2x00-rt2800mmio-add-a-workaround-for-spurious-TX_F.patch b/package/kernel/mac80211/patches/600-23-rt2x00-rt2800mmio-add-a-workaround-for-spurious-TX_F.patch new file mode 100644 index 0000000000..a6dc6a6afb --- /dev/null +++ b/package/kernel/mac80211/patches/600-23-rt2x00-rt2800mmio-add-a-workaround-for-spurious-TX_F.patch @@ -0,0 +1,136 @@ +From 5e67d4f8a46d19748b501c2ef86de3f50d3cfd51 Mon Sep 17 00:00:00 2001 +From: Gabor Juhos +Date: Sun, 24 Mar 2013 19:26:27 +0100 +Subject: [PATCH] rt2x00: rt2800mmio: add a workaround for spurious + TX_FIFO_STATUS interrupts + +Signed-off-by: Gabor Juhos +--- + drivers/net/wireless/ralink/rt2x00/rt2800mmio.c | 72 +++++++++++++++++++++++++----- + drivers/net/wireless/ralink/rt2x00/rt2x00.h | 5 +++ + 2 files changed, 65 insertions(+), 12 deletions(-) + +--- a/drivers/net/wireless/ralink/rt2x00/rt2800mmio.c ++++ b/drivers/net/wireless/ralink/rt2x00/rt2800mmio.c +@@ -415,9 +415,9 @@ void rt2800mmio_autowake_tasklet(unsigne + } + EXPORT_SYMBOL_GPL(rt2800mmio_autowake_tasklet); + +-static void rt2800mmio_txstatus_interrupt(struct rt2x00_dev *rt2x00dev) ++static void rt2800mmio_txstatus_interrupt(struct rt2x00_dev *rt2x00dev, ++ u32 status) + { +- u32 status; + int i; + + /* +@@ -438,29 +438,77 @@ static void rt2800mmio_txstatus_interrup + * Since we have only one producer and one consumer we don't + * need to lock the kfifo. + */ +- for (i = 0; i < rt2x00dev->tx->limit; i++) { +- rt2x00mmio_register_read(rt2x00dev, TX_STA_FIFO, &status); +- +- if (!rt2x00_get_field32(status, TX_STA_FIFO_VALID)) +- break; +- ++ i = 0; ++ do { + if (!kfifo_put(&rt2x00dev->txstatus_fifo, status)) { +- rt2x00_warn(rt2x00dev, "TX status FIFO overrun, drop tx status report\n"); ++ rt2x00_warn(rt2x00dev, ++ "TX status FIFO overrun, drop TX status report\n"); + break; + } +- } ++ ++ if (++i >= rt2x00dev->tx->limit) ++ break; ++ ++ rt2x00mmio_register_read(rt2x00dev, TX_STA_FIFO, &status); ++ } while (rt2x00_get_field32(status, TX_STA_FIFO_VALID)); + + /* Schedule the tasklet for processing the tx status. */ + tasklet_schedule(&rt2x00dev->txstatus_tasklet); + } + ++#define RT2800MMIO_TXSTATUS_IRQ_MAX_RETRIES 4 ++ ++static bool rt2800mmio_txstatus_is_spurious(struct rt2x00_dev *rt2x00dev, ++ u32 txstatus) ++{ ++ if (likely(rt2x00_get_field32(txstatus, TX_STA_FIFO_VALID))) { ++ rt2x00dev->txstatus_irq_retries = 0; ++ return false; ++ } ++ ++ rt2x00dev->txstatus_irq_retries++; ++ ++ /* Ensure that we don't go into an infinite IRQ loop. */ ++ if (rt2x00dev->txstatus_irq_retries >= ++ RT2800MMIO_TXSTATUS_IRQ_MAX_RETRIES) { ++ rt2x00_warn(rt2x00dev, ++ "%u spurious TX_FIFO_STATUS interrupt(s)\n", ++ rt2x00dev->txstatus_irq_retries); ++ rt2x00dev->txstatus_irq_retries = 0; ++ return false; ++ } ++ ++ return true; ++} ++ + irqreturn_t rt2800mmio_interrupt(int irq, void *dev_instance) + { + struct rt2x00_dev *rt2x00dev = dev_instance; + u32 reg, mask; ++ u32 txstatus = 0; + +- /* Read status and ACK all interrupts */ ++ /* Read status */ + rt2x00mmio_register_read(rt2x00dev, INT_SOURCE_CSR, ®); ++ ++ if (rt2x00_get_field32(reg, INT_SOURCE_CSR_TX_FIFO_STATUS)) { ++ /* Due to unknown reason the hardware generates a ++ * TX_FIFO_STATUS interrupt before the TX_STA_FIFO ++ * register contain valid data. Read the TX status ++ * here to see if we have to process the actual ++ * request. ++ */ ++ rt2x00mmio_register_read(rt2x00dev, TX_STA_FIFO, &txstatus); ++ if (rt2800mmio_txstatus_is_spurious(rt2x00dev, txstatus)) { ++ /* Remove the TX_FIFO_STATUS bit so it won't be ++ * processed in this turn. The hardware will ++ * generate another IRQ for us. ++ */ ++ rt2x00_set_field32(®, ++ INT_SOURCE_CSR_TX_FIFO_STATUS, 0); ++ } ++ } ++ ++ /* ACK interrupts */ + rt2x00mmio_register_write(rt2x00dev, INT_SOURCE_CSR, reg); + + if (!reg) +@@ -477,7 +525,7 @@ irqreturn_t rt2800mmio_interrupt(int irq + mask = ~reg; + + if (rt2x00_get_field32(reg, INT_SOURCE_CSR_TX_FIFO_STATUS)) { +- rt2800mmio_txstatus_interrupt(rt2x00dev); ++ rt2800mmio_txstatus_interrupt(rt2x00dev, txstatus); + /* + * Never disable the TX_FIFO_STATUS interrupt. + */ +--- a/drivers/net/wireless/ralink/rt2x00/rt2x00.h ++++ b/drivers/net/wireless/ralink/rt2x00/rt2x00.h +@@ -999,6 +999,11 @@ struct rt2x00_dev { + int rf_channel; + + /* ++ * Counter for tx status irq retries (rt2800pci). ++ */ ++ unsigned int txstatus_irq_retries; ++ ++ /* + * Protect the interrupt mask register. + */ + spinlock_t irqmask_lock; diff --git a/package/kernel/mac80211/patches/601-rt2x00-introduce-rt2x00_platform_h.patch b/package/kernel/mac80211/patches/601-rt2x00-introduce-rt2x00_platform_h.patch new file mode 100644 index 0000000000..9d47076ff6 --- /dev/null +++ b/package/kernel/mac80211/patches/601-rt2x00-introduce-rt2x00_platform_h.patch @@ -0,0 +1,32 @@ +--- /dev/null ++++ b/include/linux/rt2x00_platform.h +@@ -0,0 +1,19 @@ ++/* ++ * Platform data definition for the rt2x00 driver ++ * ++ * Copyright (C) 2011 Gabor Juhos ++ * ++ * This program is free software; you can redistribute it and/or modify it ++ * under the terms of the GNU General Public License version 2 as published ++ * by the Free Software Foundation. ++ * ++ */ ++ ++#ifndef _RT2X00_PLATFORM_H ++#define _RT2X00_PLATFORM_H ++ ++struct rt2x00_platform_data { ++ char *eeprom_file_name; ++}; ++ ++#endif /* _RT2X00_PLATFORM_H */ +--- a/drivers/net/wireless/ralink/rt2x00/rt2x00.h ++++ b/drivers/net/wireless/ralink/rt2x00/rt2x00.h +@@ -40,6 +40,7 @@ + #include + #include + #include ++#include + + #include + diff --git a/package/kernel/mac80211/patches/602-rt2x00-introduce-rt2x00eeprom.patch b/package/kernel/mac80211/patches/602-rt2x00-introduce-rt2x00eeprom.patch new file mode 100644 index 0000000000..65711ae330 --- /dev/null +++ b/package/kernel/mac80211/patches/602-rt2x00-introduce-rt2x00eeprom.patch @@ -0,0 +1,295 @@ +--- a/.local-symbols ++++ b/.local-symbols +@@ -336,6 +336,7 @@ RT2X00_LIB_FIRMWARE= + RT2X00_LIB_CRYPTO= + RT2X00_LIB_LEDS= + RT2X00_LIB_DEBUGFS= ++RT2X00_LIB_EEPROM= + RT2X00_DEBUG= + WLAN_VENDOR_REALTEK= + RTL8180= +--- a/drivers/net/wireless/ralink/rt2x00/Kconfig ++++ b/drivers/net/wireless/ralink/rt2x00/Kconfig +@@ -69,6 +69,7 @@ config RT2800PCI + select RT2X00_LIB_MMIO + select RT2X00_LIB_PCI + select RT2X00_LIB_FIRMWARE ++ select RT2X00_LIB_EEPROM + select RT2X00_LIB_CRYPTO + depends on CRC_CCITT + depends on EEPROM_93CX6 +@@ -215,6 +216,7 @@ config RT2800SOC + select RT2X00_LIB_MMIO + select RT2X00_LIB_CRYPTO + select RT2X00_LIB_FIRMWARE ++ select RT2X00_LIB_EEPROM + select RT2800_LIB + select RT2800_LIB_MMIO + ---help--- +@@ -265,6 +267,9 @@ config RT2X00_LIB_FIRMWARE + config RT2X00_LIB_CRYPTO + bool + ++config RT2X00_LIB_EEPROM ++ boolean ++ + config RT2X00_LIB_LEDS + bool + default y if (RT2X00_LIB=y && LEDS_CLASS=y) || (RT2X00_LIB=m && LEDS_CLASS!=n) +--- a/drivers/net/wireless/ralink/rt2x00/Makefile ++++ b/drivers/net/wireless/ralink/rt2x00/Makefile +@@ -7,6 +7,7 @@ rt2x00lib-$(CPTCFG_RT2X00_LIB_DEBUGFS) + + rt2x00lib-$(CPTCFG_RT2X00_LIB_CRYPTO) += rt2x00crypto.o + rt2x00lib-$(CPTCFG_RT2X00_LIB_FIRMWARE) += rt2x00firmware.o + rt2x00lib-$(CPTCFG_RT2X00_LIB_LEDS) += rt2x00leds.o ++rt2x00lib-$(CPTCFG_RT2X00_LIB_EEPROM) += rt2x00eeprom.o + + obj-$(CPTCFG_RT2X00_LIB) += rt2x00lib.o + obj-$(CPTCFG_RT2X00_LIB_MMIO) += rt2x00mmio.o +--- a/drivers/net/wireless/ralink/rt2x00/rt2800lib.h ++++ b/drivers/net/wireless/ralink/rt2x00/rt2800lib.h +@@ -20,6 +20,8 @@ + #ifndef RT2800LIB_H + #define RT2800LIB_H + ++#include "rt2800.h" ++ + struct rt2800_ops { + void (*register_read)(struct rt2x00_dev *rt2x00dev, + const unsigned int offset, u32 *value); +@@ -119,6 +121,15 @@ static inline int rt2800_read_eeprom(str + { + const struct rt2800_ops *rt2800ops = rt2x00dev->ops->drv; + ++ if (rt2x00dev->eeprom_file) { ++ memcpy(rt2x00dev->eeprom, rt2x00dev->eeprom_file->data, ++ EEPROM_SIZE); ++ return 0; ++ } ++ ++ if (!rt2800ops->read_eeprom) ++ return -EINVAL; ++ + return rt2800ops->read_eeprom(rt2x00dev); + } + +--- a/drivers/net/wireless/ralink/rt2x00/rt2800soc.c ++++ b/drivers/net/wireless/ralink/rt2x00/rt2800soc.c +@@ -102,19 +102,6 @@ static int rt2800soc_set_device_state(st + return retval; + } + +-static int rt2800soc_read_eeprom(struct rt2x00_dev *rt2x00dev) +-{ +- void __iomem *base_addr = ioremap(0x1F040000, EEPROM_SIZE); +- +- if (!base_addr) +- return -ENOMEM; +- +- memcpy_fromio(rt2x00dev->eeprom, base_addr, EEPROM_SIZE); +- +- iounmap(base_addr); +- return 0; +-} +- + /* Firmware functions */ + static char *rt2800soc_get_firmware_name(struct rt2x00_dev *rt2x00dev) + { +@@ -178,7 +165,6 @@ static const struct rt2800_ops rt2800soc + .register_multiread = rt2x00mmio_register_multiread, + .register_multiwrite = rt2x00mmio_register_multiwrite, + .regbusy_read = rt2x00mmio_regbusy_read, +- .read_eeprom = rt2800soc_read_eeprom, + .hwcrypt_disabled = rt2800soc_hwcrypt_disabled, + .drv_write_firmware = rt2800soc_write_firmware, + .drv_init_registers = rt2800mmio_init_registers, +--- a/drivers/net/wireless/ralink/rt2x00/rt2x00.h ++++ b/drivers/net/wireless/ralink/rt2x00/rt2x00.h +@@ -701,6 +701,7 @@ enum rt2x00_capability_flags { + REQUIRE_HT_TX_DESC, + REQUIRE_PS_AUTOWAKE, + REQUIRE_DELAYED_RFKILL, ++ REQUIRE_EEPROM_FILE, + + /* + * Capabilities +@@ -976,6 +977,11 @@ struct rt2x00_dev { + const struct firmware *fw; + + /* ++ * EEPROM image. ++ */ ++ const struct firmware *eeprom_file; ++ ++ /* + * FIFO for storing tx status reports between isr and tasklet. + */ + DECLARE_KFIFO_PTR(txstatus_fifo, u32); +--- a/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c ++++ b/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c +@@ -1346,6 +1346,10 @@ int rt2x00lib_probe_dev(struct rt2x00_de + INIT_DELAYED_WORK(&rt2x00dev->autowakeup_work, rt2x00lib_autowakeup); + INIT_WORK(&rt2x00dev->sleep_work, rt2x00lib_sleep); + ++ retval = rt2x00lib_load_eeprom_file(rt2x00dev); ++ if (retval) ++ goto exit; ++ + /* + * Let the driver probe the device to detect the capabilities. + */ +@@ -1484,6 +1488,11 @@ void rt2x00lib_remove_dev(struct rt2x00_ + * Free the driver data. + */ + kfree(rt2x00dev->drv_data); ++ ++ /* ++ * Free EEPROM image. ++ */ ++ rt2x00lib_free_eeprom_file(rt2x00dev); + } + EXPORT_SYMBOL_GPL(rt2x00lib_remove_dev); + +--- /dev/null ++++ b/drivers/net/wireless/ralink/rt2x00/rt2x00eeprom.c +@@ -0,0 +1,105 @@ ++/* ++ Copyright (C) 2004 - 2009 Ivo van Doorn ++ Copyright (C) 2004 - 2009 Gertjan van Wingerde ++ ++ ++ This program is free software; you can redistribute it and/or modify ++ it under the terms of the GNU General Public License as published by ++ the Free Software Foundation; either version 2 of the License, or ++ (at your option) any later version. ++ ++ This program is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ GNU General Public License for more details. ++ ++ You should have received a copy of the GNU General Public License ++ along with this program; if not, write to the ++ Free Software Foundation, Inc., ++ 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ++ */ ++ ++/* ++ Module: rt2x00lib ++ Abstract: rt2x00 eeprom file loading routines. ++ */ ++ ++#include ++#include ++ ++#include "rt2x00.h" ++#include "rt2x00lib.h" ++ ++static const char * ++rt2x00lib_get_eeprom_file_name(struct rt2x00_dev *rt2x00dev) ++{ ++ struct rt2x00_platform_data *pdata = rt2x00dev->dev->platform_data; ++ ++ if (pdata && pdata->eeprom_file_name) ++ return pdata->eeprom_file_name; ++ ++ return NULL ++} ++ ++static int rt2x00lib_request_eeprom_file(struct rt2x00_dev *rt2x00dev) ++{ ++ const struct firmware *ee; ++ const char *ee_name; ++ int retval; ++ ++ ee_name = rt2x00lib_get_eeprom_file_name(rt2x00dev); ++ if (!ee_name && test_bit(REQUIRE_EEPROM_FILE, &rt2x00dev->cap_flags)) { ++ rt2x00_err(rt2x00dev, "Required EEPROM name is missing."); ++ return -EINVAL; ++ } ++ ++ if (!ee_name) ++ return 0; ++ ++ rt2x00_info(rt2x00dev, "Loading EEPROM data from '%s'.\n", ee_name); ++ ++ retval = request_firmware(&ee, ee_name, rt2x00dev->dev); ++ if (retval) { ++ rt2x00_err(rt2x00dev, "Failed to request EEPROM.\n"); ++ return retval; ++ } ++ ++ if (!ee || !ee->size || !ee->data) { ++ rt2x00_err(rt2x00dev, "Failed to read EEPROM file.\n"); ++ retval = -ENOENT; ++ goto err_exit; ++ } ++ ++ if (ee->size != rt2x00dev->ops->eeprom_size) { ++ rt2x00_err(rt2x00dev, ++ "EEPROM file size is invalid, it should be %d bytes\n", ++ rt2x00dev->ops->eeprom_size); ++ retval = -EINVAL; ++ goto err_release_ee; ++ } ++ ++ rt2x00dev->eeprom_file = ee; ++ return 0; ++ ++err_release_ee: ++ release_firmware(ee); ++err_exit: ++ return retval; ++} ++ ++int rt2x00lib_load_eeprom_file(struct rt2x00_dev *rt2x00dev) ++{ ++ int retval; ++ ++ retval = rt2x00lib_request_eeprom_file(rt2x00dev); ++ if (retval) ++ return retval; ++ ++ return 0; ++} ++ ++void rt2x00lib_free_eeprom_file(struct rt2x00_dev *rt2x00dev) ++{ ++ release_firmware(rt2x00dev->eeprom_file); ++ rt2x00dev->eeprom_file = NULL; ++} +--- a/drivers/net/wireless/ralink/rt2x00/rt2x00lib.h ++++ b/drivers/net/wireless/ralink/rt2x00/rt2x00lib.h +@@ -297,6 +297,22 @@ static inline void rt2x00lib_free_firmwa + #endif /* CPTCFG_RT2X00_LIB_FIRMWARE */ + + /* ++ * EEPROM file handlers. ++ */ ++#ifdef CPTCFG_RT2X00_LIB_EEPROM ++int rt2x00lib_load_eeprom_file(struct rt2x00_dev *rt2x00dev); ++void rt2x00lib_free_eeprom_file(struct rt2x00_dev *rt2x00dev); ++#else ++static inline int rt2x00lib_load_eeprom_file(struct rt2x00_dev *rt2x00dev) ++{ ++ return 0; ++} ++static inline void rt2x00lib_free_eeprom_file(struct rt2x00_dev *rt2x00dev) ++{ ++} ++#endif /* CPTCFG_RT2X00_LIB_EEPROM */ ++ ++/* + * Debugfs handlers. + */ + #ifdef CPTCFG_RT2X00_LIB_DEBUGFS +--- a/drivers/net/wireless/ralink/rt2x00/rt2x00soc.c ++++ b/drivers/net/wireless/ralink/rt2x00/rt2x00soc.c +@@ -97,6 +97,7 @@ int rt2x00soc_probe(struct platform_devi + if (IS_ERR(rt2x00dev->clk)) + rt2x00dev->clk = NULL; + ++ set_bit(REQUIRE_EEPROM_FILE, &rt2x00dev->cap_flags); + rt2x00_set_chip_intf(rt2x00dev, RT2X00_CHIP_INTF_SOC); + + retval = rt2x00soc_alloc_reg(rt2x00dev); diff --git a/package/kernel/mac80211/patches/603-rt2x00-of_load_eeprom_filename.patch b/package/kernel/mac80211/patches/603-rt2x00-of_load_eeprom_filename.patch new file mode 100644 index 0000000000..9dffef1812 --- /dev/null +++ b/package/kernel/mac80211/patches/603-rt2x00-of_load_eeprom_filename.patch @@ -0,0 +1,33 @@ +--- a/drivers/net/wireless/ralink/rt2x00/rt2x00eeprom.c ++++ b/drivers/net/wireless/ralink/rt2x00/rt2x00eeprom.c +@@ -26,6 +26,7 @@ + + #include + #include ++#include + + #include "rt2x00.h" + #include "rt2x00lib.h" +@@ -34,11 +35,21 @@ static const char * + rt2x00lib_get_eeprom_file_name(struct rt2x00_dev *rt2x00dev) + { + struct rt2x00_platform_data *pdata = rt2x00dev->dev->platform_data; ++#ifdef CONFIG_OF ++ struct device_node *np; ++ const char *eep; ++#endif + + if (pdata && pdata->eeprom_file_name) + return pdata->eeprom_file_name; + +- return NULL ++#ifdef CONFIG_OF ++ np = rt2x00dev->dev->of_node; ++ if (np && of_property_read_string(np, "ralink,eeprom", &eep) == 0) ++ return eep; ++#endif ++ ++ return NULL; + } + + static int rt2x00lib_request_eeprom_file(struct rt2x00_dev *rt2x00dev) diff --git a/package/kernel/mac80211/patches/604-rt2x00-load-eeprom-on-SoC-from-a-mtd-device-defines-.patch b/package/kernel/mac80211/patches/604-rt2x00-load-eeprom-on-SoC-from-a-mtd-device-defines-.patch new file mode 100644 index 0000000000..a98b49c541 --- /dev/null +++ b/package/kernel/mac80211/patches/604-rt2x00-load-eeprom-on-SoC-from-a-mtd-device-defines-.patch @@ -0,0 +1,108 @@ +From 339fe73f340161a624cc08e738d2244814852c3e Mon Sep 17 00:00:00 2001 +From: John Crispin +Date: Sun, 17 Mar 2013 00:55:04 +0100 +Subject: [PATCH] rt2x00: load eeprom on SoC from a mtd device defines inside + OF + +Signed-off-by: John Crispin +--- + drivers/net/wireless/ralink/rt2x00/Kconfig | 1 + + drivers/net/wireless/ralink/rt2x00/rt2x00eeprom.c | 65 +++++++++++++++++++++++ + 2 files changed, 66 insertions(+) + +--- a/drivers/net/wireless/ralink/rt2x00/Kconfig ++++ b/drivers/net/wireless/ralink/rt2x00/Kconfig +@@ -219,6 +219,7 @@ config RT2800SOC + select RT2X00_LIB_EEPROM + select RT2800_LIB + select RT2800_LIB_MMIO ++ select MTD if SOC_RT288X || SOC_RT305X + ---help--- + This adds support for Ralink WiSoC devices. + Supported chips: RT2880, RT3050, RT3052, RT3350, RT3352. +--- a/drivers/net/wireless/ralink/rt2x00/rt2x00eeprom.c ++++ b/drivers/net/wireless/ralink/rt2x00/rt2x00eeprom.c +@@ -26,11 +26,73 @@ + + #include + #include ++#include ++#include + #include + + #include "rt2x00.h" + #include "rt2x00lib.h" + ++static int rt2800lib_read_eeprom_mtd(struct rt2x00_dev *rt2x00dev) ++{ ++ int ret = -EINVAL; ++#ifdef CONFIG_OF ++ static struct firmware mtd_fw; ++ struct device_node *np = rt2x00dev->dev->of_node, *mtd_np = NULL; ++ size_t retlen, len = rt2x00dev->ops->eeprom_size; ++ int i, size, offset = 0; ++ struct mtd_info *mtd; ++ const char *part; ++ const __be32 *list; ++ phandle phandle; ++ ++ list = of_get_property(np, "ralink,mtd-eeprom", &size); ++ if (!list) ++ return -ENOENT; ++ ++ phandle = be32_to_cpup(list++); ++ if (phandle) ++ mtd_np = of_find_node_by_phandle(phandle); ++ if (!mtd_np) { ++ dev_err(rt2x00dev->dev, "failed to load mtd phandle\n"); ++ return -EINVAL; ++ } ++ ++ part = of_get_property(mtd_np, "label", NULL); ++ if (!part) ++ part = mtd_np->name; ++ ++ mtd = get_mtd_device_nm(part); ++ if (IS_ERR(mtd)) { ++ dev_err(rt2x00dev->dev, "failed to get mtd device \"%s\"\n", part); ++ return PTR_ERR(mtd); ++ } ++ ++ if (size > sizeof(*list)) ++ offset = be32_to_cpup(list); ++ ++ ret = mtd_read(mtd, offset, len, &retlen, (u_char *) rt2x00dev->eeprom); ++ put_mtd_device(mtd); ++ ++ if ((retlen != rt2x00dev->ops->eeprom_size) || ret) { ++ dev_err(rt2x00dev->dev, "failed to load eeprom from device \"%s\"\n", part); ++ return ret; ++ } ++ ++ if (of_find_property(np, "ralink,mtd-eeprom-swap", NULL)) ++ for (i = 0; i < len/sizeof(u16); i++) ++ rt2x00dev->eeprom[i] = swab16(rt2x00dev->eeprom[i]); ++ ++ rt2x00dev->eeprom_file = &mtd_fw; ++ mtd_fw.size = len; ++ mtd_fw.data = (const u8 *) rt2x00dev->eeprom; ++ ++ dev_info(rt2x00dev->dev, "loaded eeprom from mtd device \"%s\"\n", part); ++#endif ++ ++ return ret; ++} ++ + static const char * + rt2x00lib_get_eeprom_file_name(struct rt2x00_dev *rt2x00dev) + { +@@ -58,6 +120,9 @@ static int rt2x00lib_request_eeprom_file + const char *ee_name; + int retval; + ++ if (!rt2800lib_read_eeprom_mtd(rt2x00dev)) ++ return 0; ++ + ee_name = rt2x00lib_get_eeprom_file_name(rt2x00dev); + if (!ee_name && test_bit(REQUIRE_EEPROM_FILE, &rt2x00dev->cap_flags)) { + rt2x00_err(rt2x00dev, "Required EEPROM name is missing."); diff --git a/package/kernel/mac80211/patches/606-rt2x00-allow_disabling_bands_through_platform_data.patch b/package/kernel/mac80211/patches/606-rt2x00-allow_disabling_bands_through_platform_data.patch new file mode 100644 index 0000000000..522670ece7 --- /dev/null +++ b/package/kernel/mac80211/patches/606-rt2x00-allow_disabling_bands_through_platform_data.patch @@ -0,0 +1,47 @@ +--- a/include/linux/rt2x00_platform.h ++++ b/include/linux/rt2x00_platform.h +@@ -14,6 +14,9 @@ + + struct rt2x00_platform_data { + char *eeprom_file_name; ++ ++ int disable_2ghz; ++ int disable_5ghz; + }; + + #endif /* _RT2X00_PLATFORM_H */ +--- a/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c ++++ b/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c +@@ -951,6 +951,22 @@ static int rt2x00lib_probe_hw_modes(stru + unsigned int num_rates; + unsigned int i; + ++ if (rt2x00dev->dev->platform_data) { ++ struct rt2x00_platform_data *pdata; ++ ++ pdata = rt2x00dev->dev->platform_data; ++ if (pdata->disable_2ghz) ++ spec->supported_bands &= ~SUPPORT_BAND_2GHZ; ++ if (pdata->disable_5ghz) ++ spec->supported_bands &= ~SUPPORT_BAND_5GHZ; ++ } ++ ++ if ((spec->supported_bands & SUPPORT_BAND_BOTH) == 0) { ++ rt2x00_err(rt2x00dev, "No supported bands\n"); ++ return -EINVAL; ++ } ++ ++ + num_rates = 0; + if (spec->supported_rates & SUPPORT_RATE_CCK) + num_rates += 4; +--- a/drivers/net/wireless/ralink/rt2x00/rt2x00.h ++++ b/drivers/net/wireless/ralink/rt2x00/rt2x00.h +@@ -408,6 +408,7 @@ struct hw_mode_spec { + unsigned int supported_bands; + #define SUPPORT_BAND_2GHZ 0x00000001 + #define SUPPORT_BAND_5GHZ 0x00000002 ++#define SUPPORT_BAND_BOTH (SUPPORT_BAND_2GHZ | SUPPORT_BAND_5GHZ) + + unsigned int supported_rates; + #define SUPPORT_RATE_CCK 0x00000001 diff --git a/package/kernel/mac80211/patches/607-rt2x00-add_platform_data_mac_addr.patch b/package/kernel/mac80211/patches/607-rt2x00-add_platform_data_mac_addr.patch new file mode 100644 index 0000000000..5a3f858090 --- /dev/null +++ b/package/kernel/mac80211/patches/607-rt2x00-add_platform_data_mac_addr.patch @@ -0,0 +1,26 @@ +--- a/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c ++++ b/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c +@@ -929,8 +929,13 @@ static void rt2x00lib_rate(struct ieee80 + + void rt2x00lib_set_mac_address(struct rt2x00_dev *rt2x00dev, u8 *eeprom_mac_addr) + { ++ struct rt2x00_platform_data *pdata; + const char *mac_addr; + ++ pdata = rt2x00dev->dev->platform_data; ++ if (pdata && pdata->mac_address) ++ ether_addr_copy(eeprom_mac_addr, pdata->mac_address); ++ + mac_addr = of_get_mac_address(rt2x00dev->dev->of_node); + if (mac_addr) + ether_addr_copy(eeprom_mac_addr, mac_addr); +--- a/include/linux/rt2x00_platform.h ++++ b/include/linux/rt2x00_platform.h +@@ -14,6 +14,7 @@ + + struct rt2x00_platform_data { + char *eeprom_file_name; ++ const u8 *mac_address; + + int disable_2ghz; + int disable_5ghz; diff --git a/package/kernel/mac80211/patches/608-rt2x00-allow_disabling_bands_through_dts.patch b/package/kernel/mac80211/patches/608-rt2x00-allow_disabling_bands_through_dts.patch new file mode 100644 index 0000000000..e312c1dc8a --- /dev/null +++ b/package/kernel/mac80211/patches/608-rt2x00-allow_disabling_bands_through_dts.patch @@ -0,0 +1,19 @@ +--- a/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c ++++ b/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c +@@ -955,6 +955,16 @@ static int rt2x00lib_probe_hw_modes(stru + struct ieee80211_rate *rates; + unsigned int num_rates; + unsigned int i; ++#ifdef CONFIG_OF ++ struct device_node *np = rt2x00dev->dev->of_node; ++ unsigned int enabled; ++ if (!of_property_read_u32(np, "ralink,2ghz", ++ &enabled) && !enabled) ++ spec->supported_bands &= ~SUPPORT_BAND_2GHZ; ++ if (!of_property_read_u32(np, "ralink,5ghz", ++ &enabled) && !enabled) ++ spec->supported_bands &= ~SUPPORT_BAND_5GHZ; ++#endif /* CONFIG_OF */ + + if (rt2x00dev->dev->platform_data) { + struct rt2x00_platform_data *pdata; diff --git a/package/kernel/mac80211/patches/609-rt2x00-make-wmac-loadable-via-OF-on-rt288x-305x-SoC.patch b/package/kernel/mac80211/patches/609-rt2x00-make-wmac-loadable-via-OF-on-rt288x-305x-SoC.patch new file mode 100644 index 0000000000..02b66e3bc0 --- /dev/null +++ b/package/kernel/mac80211/patches/609-rt2x00-make-wmac-loadable-via-OF-on-rt288x-305x-SoC.patch @@ -0,0 +1,33 @@ +From 04dbd87265f6ba4a373b211ba324b437d224fb2d Mon Sep 17 00:00:00 2001 +From: John Crispin +Date: Sun, 17 Mar 2013 00:03:31 +0100 +Subject: [PATCH 21/38] rt2x00: make wmac loadable via OF on rt288x/305x SoC + +This patch ads the match table to allow loading the wmac support from a +devicetree. + +Signed-off-by: John Crispin +--- + drivers/net/wireless/ralink/rt2x00/rt2800pci.c | 7 +++++++ + 1 file changed, 7 insertions(+) + +--- a/drivers/net/wireless/ralink/rt2x00/rt2800soc.c ++++ b/drivers/net/wireless/ralink/rt2x00/rt2800soc.c +@@ -234,10 +234,17 @@ static int rt2800soc_probe(struct platfo + return rt2x00soc_probe(pdev, &rt2800soc_ops); + } + ++static const struct of_device_id rt2880_wmac_match[] = { ++ { .compatible = "ralink,rt2880-wmac" }, ++ {}, ++}; ++MODULE_DEVICE_TABLE(of, rt2880_wmac_match); ++ + static struct platform_driver rt2800soc_driver = { + .driver = { + .name = "rt2800_wmac", + .mod_name = KBUILD_MODNAME, ++ .of_match_table = rt2880_wmac_match, + }, + .probe = rt2800soc_probe, + .remove = rt2x00soc_remove, diff --git a/package/kernel/mac80211/patches/610-rt2x00-change-led-polarity-from-OF.patch b/package/kernel/mac80211/patches/610-rt2x00-change-led-polarity-from-OF.patch new file mode 100644 index 0000000000..89fc706100 --- /dev/null +++ b/package/kernel/mac80211/patches/610-rt2x00-change-led-polarity-from-OF.patch @@ -0,0 +1,40 @@ +--- a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c ++++ b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c +@@ -36,6 +36,7 @@ + #include + #include + #include ++#include + + #include "rt2x00.h" + #include "rt2800lib.h" +@@ -7861,6 +7862,17 @@ static int rt2800_init_eeprom(struct rt2 + rt2800_init_led(rt2x00dev, &rt2x00dev->led_assoc, LED_TYPE_ASSOC); + rt2800_init_led(rt2x00dev, &rt2x00dev->led_qual, LED_TYPE_QUALITY); + ++ { ++ struct device_node *np = rt2x00dev->dev->of_node; ++ unsigned int led_polarity; ++ ++ /* Allow overriding polarity from OF */ ++ if (!of_property_read_u32(np, "ralink,led-polarity", ++ &led_polarity)) ++ rt2x00_set_field16(&eeprom, EEPROM_FREQ_LED_POLARITY, ++ led_polarity); ++ } ++ + rt2x00dev->led_mcu_reg = eeprom; + #endif /* CPTCFG_RT2X00_LIB_LEDS */ + +--- a/drivers/net/wireless/ralink/rt2x00/rt2x00leds.c ++++ b/drivers/net/wireless/ralink/rt2x00/rt2x00leds.c +@@ -109,6 +109,9 @@ static int rt2x00leds_register_led(struc + led->led_dev.name = name; + led->led_dev.brightness = LED_OFF; + ++ if (rt2x00_is_soc(rt2x00dev)) ++ led->led_dev.brightness_set(&led->led_dev, LED_OFF); ++ + retval = led_classdev_register(device, &led->led_dev); + if (retval) { + rt2x00_err(rt2x00dev, "Failed to register led handler\n"); diff --git a/package/kernel/mac80211/patches/611-rt2x00-add-AP+STA-support.patch b/package/kernel/mac80211/patches/611-rt2x00-add-AP+STA-support.patch new file mode 100644 index 0000000000..2dac89566a --- /dev/null +++ b/package/kernel/mac80211/patches/611-rt2x00-add-AP+STA-support.patch @@ -0,0 +1,11 @@ +--- a/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c ++++ b/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c +@@ -1286,7 +1286,7 @@ static inline void rt2x00lib_set_if_comb + */ + if_limit = &rt2x00dev->if_limits_ap; + if_limit->max = rt2x00dev->ops->max_ap_intf; +- if_limit->types = BIT(NL80211_IFTYPE_AP); ++ if_limit->types = BIT(NL80211_IFTYPE_AP) | BIT(NL80211_IFTYPE_STATION); + #ifdef CPTCFG_MAC80211_MESH + if_limit->types |= BIT(NL80211_IFTYPE_MESH_POINT); + #endif diff --git a/package/kernel/mac80211/patches/620-rt2x00-enable-rt2800soc-for-mt7620.patch b/package/kernel/mac80211/patches/620-rt2x00-enable-rt2800soc-for-mt7620.patch new file mode 100644 index 0000000000..bc9f799520 --- /dev/null +++ b/package/kernel/mac80211/patches/620-rt2x00-enable-rt2800soc-for-mt7620.patch @@ -0,0 +1,20 @@ +--- a/drivers/net/wireless/ralink/rt2x00/Kconfig ++++ b/drivers/net/wireless/ralink/rt2x00/Kconfig +@@ -211,7 +211,7 @@ endif + config RT2800SOC + tristate "Ralink WiSoC support" + depends on m +- depends on SOC_RT288X || SOC_RT305X || SOC_RT3883 ++ depends on SOC_RT288X || SOC_RT305X || SOC_RT3883 || SOC_MT7620 + select RT2X00_LIB_SOC + select RT2X00_LIB_MMIO + select RT2X00_LIB_CRYPTO +@@ -248,7 +248,7 @@ config RT2X00_LIB_PCI + + config RT2X00_LIB_SOC + tristate "RT2x00 SoC support" +- depends on SOC_RT288X || SOC_RT305X || SOC_RT3883 ++ depends on SOC_RT288X || SOC_RT305X || SOC_RT3883 || SOC_MT7620 + depends on m + select RT2X00_LIB + diff --git a/package/kernel/mac80211/patches/621-rt2x00-add-support-for-mt7620.patch b/package/kernel/mac80211/patches/621-rt2x00-add-support-for-mt7620.patch new file mode 100644 index 0000000000..41b7562137 --- /dev/null +++ b/package/kernel/mac80211/patches/621-rt2x00-add-support-for-mt7620.patch @@ -0,0 +1,1200 @@ +From: Roman Yeryomin +Date: Tue, 1 Jul 2014 10:26:18 +0000 +Subject: [PATCH] mac80211: rt2x00: add support for mt7620 + +Support for MT7620 was added to OpenWrt in r41441 and heavily reworked +since in order to match the Kernel's code quality standards. + +Signed-off-by: Roman Yeryomin +Signed-off-by: Daniel Golle +--- + +--- a/drivers/net/wireless/ralink/rt2x00/rt2800.h ++++ b/drivers/net/wireless/ralink/rt2x00/rt2800.h +@@ -81,6 +81,7 @@ + #define RF5372 0x5372 + #define RF5390 0x5390 + #define RF5392 0x5392 ++#define RF7620 0x7620 + + /* + * Chipset revisions. +@@ -641,6 +642,14 @@ + #define RF_CSR_CFG_BUSY FIELD32(0x00020000) + + /* ++ * mt7620 RF registers (reversed order) ++ */ ++#define RF_CSR_CFG_DATA_MT7620 FIELD32(0x0000ff00) ++#define RF_CSR_CFG_REGNUM_MT7620 FIELD32(0x03ff0000) ++#define RF_CSR_CFG_WRITE_MT7620 FIELD32(0x00000010) ++#define RF_CSR_CFG_BUSY_MT7620 FIELD32(0x00000001) ++ ++/* + * EFUSE_CSR: RT30x0 EEPROM + */ + #define EFUSE_CTRL 0x0580 +@@ -1024,6 +1033,11 @@ + #define AUTOWAKEUP_CFG_AUTOWAKE FIELD32(0x00008000) + + /* ++ * mt7620 ++ */ ++#define MIMO_PS_CFG 0x1210 ++ ++/* + * EDCA_AC0_CFG: + */ + #define EDCA_AC0_CFG 0x1300 +@@ -1203,6 +1217,8 @@ + #define TX_PIN_CFG_RFTR_POL FIELD32(0x00020000) + #define TX_PIN_CFG_TRSW_EN FIELD32(0x00040000) + #define TX_PIN_CFG_TRSW_POL FIELD32(0x00080000) ++#define TX_PIN_CFG_RFRX_EN FIELD32(0x00100000) /* mt7620 */ ++#define TX_PIN_CFG_RFRX_POL FIELD32(0x00200000) /* mt7620 */ + #define TX_PIN_CFG_PA_PE_A2_EN FIELD32(0x01000000) + #define TX_PIN_CFG_PA_PE_G2_EN FIELD32(0x02000000) + #define TX_PIN_CFG_PA_PE_A2_POL FIELD32(0x04000000) +@@ -1549,6 +1565,17 @@ + #define TX_PWR_CFG_4_EXT_STBC4_CH2 FIELD32(0x0000000f) + #define TX_PWR_CFG_4_EXT_STBC6_CH2 FIELD32(0x00000f00) + ++/* mt7620 */ ++#define TX0_RF_GAIN_CORRECT 0x13a0 ++#define TX1_RF_GAIN_CORRECT 0x13a4 ++#define TX0_RF_GAIN_ATTEN 0x13a8 ++#define TX1_RF_GAIN_ATTEN 0x13ac ++#define TX_ALG_CFG_0 0x13b0 ++#define TX_ALG_CFG_1 0x13b4 ++#define TX0_BB_GAIN_ATTEN 0x13c0 ++#define TX1_BB_GAIN_ATTEN 0x13c4 ++#define TX_ALC_VGA3 0x13c8 ++ + /* TX_PWR_CFG_7 */ + #define TX_PWR_CFG_7 0x13d4 + #define TX_PWR_CFG_7_OFDM54_CH0 FIELD32(0x0000000f) +--- a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c ++++ b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c +@@ -60,6 +60,9 @@ + rt2800_regbusy_read((__dev), BBP_CSR_CFG, BBP_CSR_CFG_BUSY, (__reg)) + #define WAIT_FOR_RFCSR(__dev, __reg) \ + rt2800_regbusy_read((__dev), RF_CSR_CFG, RF_CSR_CFG_BUSY, (__reg)) ++#define WAIT_FOR_RFCSR_MT7620(__dev, __reg) \ ++ rt2800_regbusy_read((__dev), RF_CSR_CFG, RF_CSR_CFG_BUSY_MT7620, \ ++ (__reg)) + #define WAIT_FOR_RF(__dev, __reg) \ + rt2800_regbusy_read((__dev), RF_CSR_CFG0, RF_CSR_CFG0_BUSY, (__reg)) + #define WAIT_FOR_MCU(__dev, __reg) \ +@@ -151,19 +154,56 @@ static void rt2800_rfcsr_write(struct rt + * Wait until the RFCSR becomes available, afterwards we + * can safely write the new data into the register. + */ +- if (WAIT_FOR_RFCSR(rt2x00dev, ®)) { +- reg = 0; +- rt2x00_set_field32(®, RF_CSR_CFG_DATA, value); +- rt2x00_set_field32(®, RF_CSR_CFG_REGNUM, word); +- rt2x00_set_field32(®, RF_CSR_CFG_WRITE, 1); +- rt2x00_set_field32(®, RF_CSR_CFG_BUSY, 1); ++ switch (rt2x00dev->chip.rf) { ++ case RF7620: ++ if (WAIT_FOR_RFCSR_MT7620(rt2x00dev, ®)) { ++ reg = 0; ++ rt2x00_set_field32(®, RF_CSR_CFG_DATA_MT7620, value); ++ rt2x00_set_field32(®, RF_CSR_CFG_REGNUM_MT7620, ++ word); ++ rt2x00_set_field32(®, RF_CSR_CFG_WRITE_MT7620, 1); ++ rt2x00_set_field32(®, RF_CSR_CFG_BUSY_MT7620, 1); ++ ++ rt2800_register_write_lock(rt2x00dev, RF_CSR_CFG, reg); ++ } ++ break; ++ ++ default: ++ if (WAIT_FOR_RFCSR(rt2x00dev, ®)) { ++ reg = 0; ++ rt2x00_set_field32(®, RF_CSR_CFG_DATA, value); ++ rt2x00_set_field32(®, RF_CSR_CFG_REGNUM, word); ++ rt2x00_set_field32(®, RF_CSR_CFG_WRITE, 1); ++ rt2x00_set_field32(®, RF_CSR_CFG_BUSY, 1); + +- rt2800_register_write_lock(rt2x00dev, RF_CSR_CFG, reg); ++ rt2800_register_write_lock(rt2x00dev, RF_CSR_CFG, reg); ++ } ++ break; + } + + mutex_unlock(&rt2x00dev->csr_mutex); + } + ++static void rt2800_rfcsr_write_bank(struct rt2x00_dev *rt2x00dev, const u8 bank, ++ const unsigned int reg, const u8 value) ++{ ++ rt2800_rfcsr_write(rt2x00dev, (reg | (bank << 6)), value); ++} ++ ++static void rt2800_rfcsr_write_chanreg(struct rt2x00_dev *rt2x00dev, ++ const unsigned int reg, const u8 value) ++{ ++ rt2800_rfcsr_write_bank(rt2x00dev, 4, reg, value); ++ rt2800_rfcsr_write_bank(rt2x00dev, 6, reg, value); ++} ++ ++static void rt2800_rfcsr_write_dccal(struct rt2x00_dev *rt2x00dev, ++ const unsigned int reg, const u8 value) ++{ ++ rt2800_rfcsr_write_bank(rt2x00dev, 5, reg, value); ++ rt2800_rfcsr_write_bank(rt2x00dev, 7, reg, value); ++} ++ + static void rt2800_rfcsr_read(struct rt2x00_dev *rt2x00dev, + const unsigned int word, u8 *value) + { +@@ -179,22 +219,48 @@ static void rt2800_rfcsr_read(struct rt2 + * doesn't become available in time, reg will be 0xffffffff + * which means we return 0xff to the caller. + */ +- if (WAIT_FOR_RFCSR(rt2x00dev, ®)) { +- reg = 0; +- rt2x00_set_field32(®, RF_CSR_CFG_REGNUM, word); +- rt2x00_set_field32(®, RF_CSR_CFG_WRITE, 0); +- rt2x00_set_field32(®, RF_CSR_CFG_BUSY, 1); ++ switch (rt2x00dev->chip.rf) { ++ case RF7620: ++ if (WAIT_FOR_RFCSR_MT7620(rt2x00dev, ®)) { ++ reg = 0; ++ rt2x00_set_field32(®, RF_CSR_CFG_REGNUM_MT7620, ++ word); ++ rt2x00_set_field32(®, RF_CSR_CFG_WRITE_MT7620, 0); ++ rt2x00_set_field32(®, RF_CSR_CFG_BUSY_MT7620, 1); + +- rt2800_register_write_lock(rt2x00dev, RF_CSR_CFG, reg); ++ rt2800_register_write_lock(rt2x00dev, RF_CSR_CFG, reg); + +- WAIT_FOR_RFCSR(rt2x00dev, ®); +- } ++ WAIT_FOR_RFCSR_MT7620(rt2x00dev, ®); ++ } ++ ++ *value = rt2x00_get_field32(reg, RF_CSR_CFG_DATA_MT7620); ++ break; ++ ++ default: ++ if (WAIT_FOR_RFCSR(rt2x00dev, ®)) { ++ reg = 0; ++ rt2x00_set_field32(®, RF_CSR_CFG_REGNUM, word); ++ rt2x00_set_field32(®, RF_CSR_CFG_WRITE, 0); ++ rt2x00_set_field32(®, RF_CSR_CFG_BUSY, 1); + +- *value = rt2x00_get_field32(reg, RF_CSR_CFG_DATA); ++ rt2800_register_write_lock(rt2x00dev, RF_CSR_CFG, reg); ++ ++ WAIT_FOR_RFCSR(rt2x00dev, ®); ++ } ++ ++ *value = rt2x00_get_field32(reg, RF_CSR_CFG_DATA); ++ break; ++ } + + mutex_unlock(&rt2x00dev->csr_mutex); + } + ++static void rt2800_rfcsr_read_bank(struct rt2x00_dev *rt2x00dev, const u8 bank, ++ const unsigned int reg, u8 *value) ++{ ++ rt2800_rfcsr_read(rt2x00dev, (reg | (bank << 6)), value); ++} ++ + static void rt2800_rf_write(struct rt2x00_dev *rt2x00dev, + const unsigned int word, const u32 value) + { +@@ -526,6 +592,16 @@ void rt2800_get_txwi_rxwi_size(struct rt + *rxwi_size = RXWI_DESC_SIZE_5WORDS; + break; + ++ case RT5390: ++ if (rt2x00dev->chip.rf == RF7620) { ++ *txwi_size = TXWI_DESC_SIZE_5WORDS; ++ *rxwi_size = RXWI_DESC_SIZE_6WORDS; ++ } else { ++ *txwi_size = TXWI_DESC_SIZE_4WORDS; ++ *rxwi_size = RXWI_DESC_SIZE_4WORDS; ++ } ++ break; ++ + case RT5592: + *txwi_size = TXWI_DESC_SIZE_5WORDS; + *rxwi_size = RXWI_DESC_SIZE_6WORDS; +@@ -3258,6 +3334,296 @@ static void rt2800_config_channel_rf55xx + rt2800_bbp_write(rt2x00dev, 196, (rf->channel <= 14) ? 0x19 : 0x7F); + } + ++static void rt2800_config_channel_rf7620(struct rt2x00_dev *rt2x00dev, ++ struct ieee80211_conf *conf, ++ struct rf_channel *rf, ++ struct channel_info *info) ++{ ++ struct rt2800_drv_data *drv_data = rt2x00dev->drv_data; ++ u32 mac_sys_ctrl, mac_status; ++ u16 eeprom, target_power; ++ u32 tx_pin = 0x00150F0F; ++ u8 txrx_agc_fc; ++ u8 rfcsr; ++ u32 reg; ++ u8 bbp; ++ int i; ++ ++ /* Frequeny plan setting */ ++ /* Rdiv setting (stored in rf->rf1) ++ * R13[1:0] ++ */ ++ rt2800_rfcsr_read(rt2x00dev, 13, &rfcsr); ++ rfcsr = rfcsr & (~0x03); ++ if (rt2800_clk_is_20mhz(rt2x00dev)) ++ rfcsr |= (rf->rf1 & 0x03); ++ ++ rt2800_rfcsr_write(rt2x00dev, 13, rfcsr); ++ ++ /* N setting (stored in rf->rf2) ++ * R21[0], R20[7:0] ++ */ ++ rt2800_rfcsr_read(rt2x00dev, 20, &rfcsr); ++ rfcsr = (rf->rf2 & 0x00ff); ++ rt2800_rfcsr_write(rt2x00dev, 20, rfcsr); ++ ++ rt2800_rfcsr_read(rt2x00dev, 21, &rfcsr); ++ rfcsr = rfcsr & (~0x01); ++ rfcsr |= ((rf->rf2 & 0x0100) >> 8); ++ rt2800_rfcsr_write(rt2x00dev, 21, rfcsr); ++ ++ /* K setting (stored in rf->rf3[0:7]) ++ * R16[3:0] (RF PLL freq selection) ++ */ ++ rt2800_rfcsr_read(rt2x00dev, 16, &rfcsr); ++ rfcsr = rfcsr & (~0x0f); ++ rfcsr |= (rf->rf3 & 0x0f); ++ rt2800_rfcsr_write(rt2x00dev, 16, rfcsr); ++ ++ /* D setting (stored in rf->rf3[8:15]) ++ * R22[2:0] (D=15, R22[2:0]=<111>) ++ */ ++ rt2800_rfcsr_read(rt2x00dev, 22, &rfcsr); ++ rfcsr = rfcsr & (~0x07); ++ rfcsr |= ((rf->rf3 >> 8) & 0x07); ++ rt2800_rfcsr_write(rt2x00dev, 22, rfcsr); ++ ++ /* Ksd setting (stored in rf->rf4) ++ * Ksd: R19<1:0>,R18<7:0>,R17<7:0> ++ */ ++ rt2800_rfcsr_read(rt2x00dev, 17, &rfcsr); ++ rfcsr = (rf->rf4 & 0x000000ff); ++ rt2800_rfcsr_write(rt2x00dev, 17, rfcsr); ++ ++ rt2800_rfcsr_read(rt2x00dev, 18, &rfcsr); ++ rfcsr = ((rf->rf4 & 0x0000ff00) >> 8); ++ rt2800_rfcsr_write(rt2x00dev, 18, rfcsr); ++ ++ rt2800_rfcsr_read(rt2x00dev, 19, &rfcsr); ++ rfcsr = rfcsr & (~0x03); ++ rfcsr |= ((rf->rf4 & 0x00030000) >> 16); ++ rt2800_rfcsr_write(rt2x00dev, 19, rfcsr); ++ ++ /* Default: XO=20MHz , SDM mode */ ++ rt2800_rfcsr_read(rt2x00dev, 16, &rfcsr); ++ rfcsr = rfcsr & (~0xE0); ++ rfcsr |= 0x80; ++ rt2800_rfcsr_write(rt2x00dev, 16, rfcsr); ++ ++ rt2800_rfcsr_read(rt2x00dev, 21, &rfcsr); ++ rfcsr |= 0x80; ++ rt2800_rfcsr_write(rt2x00dev, 21, rfcsr); ++ ++ rt2800_rfcsr_read(rt2x00dev, 1, &rfcsr); ++ if (rt2x00dev->default_ant.tx_chain_num == 1) ++ rfcsr &= (~0x2); ++ else ++ rfcsr |= 0x2; ++ rt2800_rfcsr_write(rt2x00dev, 1, rfcsr); ++ ++ rt2800_rfcsr_read(rt2x00dev, 2, &rfcsr); ++ if (rt2x00dev->default_ant.tx_chain_num == 1) ++ rfcsr &= (~0x20); ++ else ++ rfcsr |= 0x20; ++ if (rt2x00dev->default_ant.rx_chain_num == 1) ++ rfcsr &= (~0x02); ++ else ++ rfcsr |= 0x02; ++ rt2800_rfcsr_write(rt2x00dev, 2, rfcsr); ++ ++ rt2800_rfcsr_read(rt2x00dev, 42, &rfcsr); ++ if (rt2x00dev->default_ant.tx_chain_num == 1) ++ rfcsr &= (~0x40); ++ else ++ rfcsr |= 0x40; ++ rt2800_rfcsr_write(rt2x00dev, 42, rfcsr); ++ ++ /* RF for DC Cal BW */ ++ if (conf_is_ht40(conf)) { ++ rt2800_rfcsr_write_dccal(rt2x00dev, 6, 0x10); ++ rt2800_rfcsr_write_dccal(rt2x00dev, 7, 0x10); ++ rt2800_rfcsr_write_dccal(rt2x00dev, 8, 0x04); ++ rt2800_rfcsr_write_dccal(rt2x00dev, 58, 0x10); ++ rt2800_rfcsr_write_dccal(rt2x00dev, 59, 0x10); ++ } else { ++ rt2800_rfcsr_write_dccal(rt2x00dev, 6, 0x20); ++ rt2800_rfcsr_write_dccal(rt2x00dev, 7, 0x20); ++ rt2800_rfcsr_write_dccal(rt2x00dev, 8, 0x00); ++ rt2800_rfcsr_write_dccal(rt2x00dev, 58, 0x20); ++ rt2800_rfcsr_write_dccal(rt2x00dev, 59, 0x20); ++ } ++ ++ if (conf_is_ht40(conf)) { ++ rt2800_rfcsr_write_dccal(rt2x00dev, 58, 0x08); ++ rt2800_rfcsr_write_dccal(rt2x00dev, 59, 0x08); ++ } else { ++ rt2800_rfcsr_write_dccal(rt2x00dev, 58, 0x28); ++ rt2800_rfcsr_write_dccal(rt2x00dev, 59, 0x28); ++ } ++ ++ rt2800_rfcsr_read(rt2x00dev, 28, &rfcsr); ++ if (conf_is_ht40(conf) && (rf->channel == 11)) ++ rfcsr |= 0x4; ++ else ++ rfcsr &= (~0x4); ++ rt2800_rfcsr_write(rt2x00dev, 28, rfcsr); ++ ++ /*if (bScan == FALSE)*/ ++ if (conf_is_ht40(conf)) { ++ txrx_agc_fc = rt2x00_get_field8(drv_data->calibration_bw40, ++ RFCSR24_TX_AGC_FC); ++ } else { ++ txrx_agc_fc = rt2x00_get_field8(drv_data->calibration_bw20, ++ RFCSR24_TX_AGC_FC); ++ } ++ rt2800_rfcsr_read_bank(rt2x00dev, 5, 6, &rfcsr); ++ rfcsr &= (~0x3F); ++ rfcsr |= txrx_agc_fc; ++ rt2800_rfcsr_write_bank(rt2x00dev, 5, 6, rfcsr); ++ rt2800_rfcsr_read_bank(rt2x00dev, 5, 7, &rfcsr); ++ rfcsr &= (~0x3F); ++ rfcsr |= txrx_agc_fc; ++ rt2800_rfcsr_write_bank(rt2x00dev, 5, 7, rfcsr); ++ rt2800_rfcsr_read_bank(rt2x00dev, 7, 6, &rfcsr); ++ rfcsr &= (~0x3F); ++ rfcsr |= txrx_agc_fc; ++ rt2800_rfcsr_write_bank(rt2x00dev, 7, 6, rfcsr); ++ rt2800_rfcsr_read_bank(rt2x00dev, 7, 7, &rfcsr); ++ rfcsr &= (~0x3F); ++ rfcsr |= txrx_agc_fc; ++ rt2800_rfcsr_write_bank(rt2x00dev, 7, 7, rfcsr); ++ ++ rt2800_rfcsr_read_bank(rt2x00dev, 5, 58, &rfcsr); ++ rfcsr &= (~0x3F); ++ rfcsr |= txrx_agc_fc; ++ rt2800_rfcsr_write_bank(rt2x00dev, 5, 58, rfcsr); ++ rt2800_rfcsr_read_bank(rt2x00dev, 5, 59, &rfcsr); ++ rfcsr &= (~0x3F); ++ rfcsr |= txrx_agc_fc; ++ rt2800_rfcsr_write_bank(rt2x00dev, 5, 59, rfcsr); ++ rt2800_rfcsr_read_bank(rt2x00dev, 7, 58, &rfcsr); ++ rfcsr &= (~0x3F); ++ rfcsr |= txrx_agc_fc; ++ rt2800_rfcsr_write_bank(rt2x00dev, 7, 58, rfcsr); ++ rt2800_rfcsr_read_bank(rt2x00dev, 7, 59, &rfcsr); ++ rfcsr &= (~0x3F); ++ rfcsr |= txrx_agc_fc; ++ rt2800_rfcsr_write_bank(rt2x00dev, 7, 59, rfcsr); ++ ++ rt2800_register_read(rt2x00dev, TX_ALG_CFG_0, ®); ++ reg = reg & (~0x3F3F); ++ reg |= info->default_power1; ++ reg |= (info->default_power2 << 8); ++ reg |= (0x2F << 16); ++ reg |= (0x2F << 24); ++ ++ rt2800_eeprom_read(rt2x00dev, EEPROM_NIC_CONF1, &eeprom); ++ if (rt2x00_get_field16(eeprom, EEPROM_NIC_CONF1_INTERNAL_TX_ALC)) { ++ /* init base power by e2p target power */ ++ rt2800_eeprom_read(rt2x00dev, 0xD0, &target_power); ++ target_power &= 0x3F; ++ reg = reg & (~0x3F3F); ++ reg |= target_power; ++ reg |= (target_power << 8); ++ } ++ rt2800_register_write(rt2x00dev, TX_ALG_CFG_0, reg); ++ ++ rt2800_register_read(rt2x00dev, TX_ALG_CFG_1, ®); ++ reg = reg & (~0x3F); ++ rt2800_register_write(rt2x00dev, TX_ALG_CFG_1, reg); ++ ++ /*if (bScan == FALSE)*/ ++ /* Save MAC SYS CTRL registers */ ++ rt2800_register_read(rt2x00dev, MAC_SYS_CTRL, &mac_sys_ctrl); ++ /* Disable Tx/Rx */ ++ rt2800_register_write(rt2x00dev, MAC_SYS_CTRL, 0); ++ /* Check MAC Tx/Rx idle */ ++ for (i = 0; i < 10000; i++) { ++ rt2800_register_read(rt2x00dev, MAC_STATUS_CFG, &mac_status); ++ if (mac_status & 0x3) ++ usleep_range(50, 200); ++ else ++ break; ++ } ++ ++ if (i == 10000) ++ rt2x00_warn(rt2x00dev, "Wait MAC Status to MAX !!!\n"); ++ ++ if (rf->channel > 10) { ++ rt2800_bbp_read(rt2x00dev, 30, &bbp); ++ bbp = 0x40; ++ rt2800_bbp_write(rt2x00dev, 30, bbp); ++ rt2800_rfcsr_write(rt2x00dev, 39, 0); ++ if (rt2x00_has_cap_external_lna_bg(rt2x00dev)) ++ rt2800_rfcsr_write(rt2x00dev, 42, 0xfb); ++ else ++ rt2800_rfcsr_write(rt2x00dev, 42, 0x7b); ++ } else { ++ rt2800_bbp_read(rt2x00dev, 30, &bbp); ++ bbp = 0x1f; ++ rt2800_bbp_write(rt2x00dev, 30, bbp); ++ rt2800_rfcsr_write(rt2x00dev, 39, 0x80); ++ if (rt2x00_has_cap_external_lna_bg(rt2x00dev)) ++ rt2800_rfcsr_write(rt2x00dev, 42, 0xdb); ++ else ++ rt2800_rfcsr_write(rt2x00dev, 42, 0x5b); ++ } ++ ++ rt2800_register_write(rt2x00dev, MAC_SYS_CTRL, mac_sys_ctrl); ++ ++ rt2800_rfcsr_write(rt2x00dev, 5, 0x40); ++ rt2800_rfcsr_write(rt2x00dev, 4, 0x0C); ++ ++ /* vcocal_en (initiate VCO calibration (reset after completion)) */ ++ rt2800_rfcsr_read(rt2x00dev, 4, &rfcsr); ++ rfcsr = ((rfcsr & ~0x80) | 0x80); ++ rt2800_rfcsr_write(rt2x00dev, 4, rfcsr); ++ usleep_range(2000, 3000); ++ ++ rt2800_register_write(rt2x00dev, TX_PIN_CFG, tx_pin); ++ ++ if (rt2x00dev->default_ant.tx_chain_num == 1) { ++ rt2800_bbp_write(rt2x00dev, 91, 0x07); ++ rt2800_bbp_write(rt2x00dev, 95, 0x1A); ++ rt2800_bbp_write(rt2x00dev, 195, 128); ++ rt2800_bbp_write(rt2x00dev, 196, 0xA0); ++ rt2800_bbp_write(rt2x00dev, 195, 170); ++ rt2800_bbp_write(rt2x00dev, 196, 0x12); ++ rt2800_bbp_write(rt2x00dev, 195, 171); ++ rt2800_bbp_write(rt2x00dev, 196, 0x10); ++ } else { ++ rt2800_bbp_write(rt2x00dev, 91, 0x06); ++ rt2800_bbp_write(rt2x00dev, 95, 0x9A); ++ rt2800_bbp_write(rt2x00dev, 195, 128); ++ rt2800_bbp_write(rt2x00dev, 196, 0xE0); ++ rt2800_bbp_write(rt2x00dev, 195, 170); ++ rt2800_bbp_write(rt2x00dev, 196, 0x30); ++ rt2800_bbp_write(rt2x00dev, 195, 171); ++ rt2800_bbp_write(rt2x00dev, 196, 0x30); ++ } ++ ++ if (rt2x00_has_cap_external_lna_bg(rt2x00dev)) { ++ rt2800_bbp_write(rt2x00dev, 75, 0x60); ++ rt2800_bbp_write(rt2x00dev, 76, 0x44); ++ rt2800_bbp_write(rt2x00dev, 79, 0x1C); ++ rt2800_bbp_write(rt2x00dev, 80, 0x0C); ++ rt2800_bbp_write(rt2x00dev, 82, 0xB6); ++ ++ if (!conf_is_ht40(conf)) { ++ rt2800_bbp_write(rt2x00dev, 195, 141); ++ rt2800_bbp_write(rt2x00dev, 196, 0x1A); ++ } ++ } ++ ++ /* On 11A, We should delay and wait RF/BBP to be stable ++ * and the appropriate time should be 1000 micro seconds ++ * 2005/06/05 - On 11G, we also need this delay time. ++ * Otherwise it's difficult to pass the WHQL. ++ */ ++ usleep_range(1000, 1500); ++} ++ + static void rt2800_bbp_write_with_rx_chain(struct rt2x00_dev *rt2x00dev, + const unsigned int word, + const u8 value) +@@ -3414,7 +3780,7 @@ static void rt2800_config_channel(struct + struct channel_info *info) + { + u32 reg; +- unsigned int tx_pin; ++ u32 tx_pin; + u8 bbp, rfcsr; + + info->default_power1 = rt2800_txpower_to_dev(rt2x00dev, rf->channel, +@@ -3468,6 +3834,9 @@ static void rt2800_config_channel(struct + case RF5592: + rt2800_config_channel_rf55xx(rt2x00dev, conf, rf, info); + break; ++ case RF7620: ++ rt2800_config_channel_rf7620(rt2x00dev, conf, rf, info); ++ break; + default: + rt2800_config_channel_rf2xxx(rt2x00dev, conf, rf, info); + } +@@ -3574,7 +3943,7 @@ static void rt2800_config_channel(struct + else if (rt2x00_rt(rt2x00dev, RT3593) || + rt2x00_rt(rt2x00dev, RT3883)) + rt2800_bbp_write(rt2x00dev, 82, 0x82); +- else ++ else if (rt2x00dev->chip.rf != RF7620) + rt2800_bbp_write(rt2x00dev, 82, 0xf2); + + if (rt2x00_rt(rt2x00dev, RT3593) || +@@ -3596,7 +3965,7 @@ static void rt2800_config_channel(struct + if (rt2x00_rt(rt2x00dev, RT3572)) + rt2800_rfcsr_write(rt2x00dev, 8, 0); + +- tx_pin = 0; ++ rt2800_register_read(rt2x00dev, TX_PIN_CFG, &tx_pin); + + switch (rt2x00dev->default_ant.tx_chain_num) { + case 3: +@@ -3645,6 +4014,7 @@ static void rt2800_config_channel(struct + + rt2x00_set_field32(&tx_pin, TX_PIN_CFG_RFTR_EN, 1); + rt2x00_set_field32(&tx_pin, TX_PIN_CFG_TRSW_EN, 1); ++ rt2x00_set_field32(&tx_pin, TX_PIN_CFG_RFRX_EN, 1); /* mt7620 */ + + rt2800_register_write(rt2x00dev, TX_PIN_CFG, tx_pin); + +@@ -3720,7 +4090,8 @@ static void rt2800_config_channel(struct + usleep_range(1000, 1500); + } + +- if (rt2x00_rt(rt2x00dev, RT5592)) { ++ if (rt2x00_rt(rt2x00dev, RT5592) || ++ (rt2x00_rt(rt2x00dev, RT5390) && rt2x00_rf(rt2x00dev, RF7620))) { + rt2800_bbp_write(rt2x00dev, 195, 141); + rt2800_bbp_write(rt2x00dev, 196, conf_is_ht40(conf) ? 0x10 : 0x1a); + +@@ -4662,6 +5033,15 @@ void rt2800_vco_calibration(struct rt2x0 + rt2x00_set_field8(&rfcsr, RFCSR3_VCOCAL_EN, 1); + rt2800_rfcsr_write(rt2x00dev, 3, rfcsr); + break; ++ case RF7620: ++ rt2800_rfcsr_read(rt2x00dev, 4, &rfcsr); ++ /* vcocal_en (initiate VCO calibration (reset after completion)) ++ * It should be at the end of RF configuration. ++ */ ++ rfcsr = ((rfcsr & ~0x80) | 0x80); ++ rt2800_rfcsr_write(rt2x00dev, 4, rfcsr); ++ usleep_range(2000, 3000); ++ break; + default: + WARN_ONCE(1, "Not supported RF chipet %x for VCO recalibration", + rt2x00dev->chip.rf); +@@ -5037,6 +5417,24 @@ static int rt2800_init_registers(struct + rt2800_register_write(rt2x00dev, TX_SW_CFG2, 0x00040000); + rt2800_register_write(rt2x00dev, TX_TXBF_CFG_0, 0x8000fc21); + rt2800_register_write(rt2x00dev, TX_TXBF_CFG_3, 0x00009c40); ++ } else if (rt2x00_rf(rt2x00dev, RF7620)) { ++ rt2800_register_write(rt2x00dev, TX_SW_CFG0, 0x00000401); ++ rt2800_register_write(rt2x00dev, TX_SW_CFG1, 0x000C0000); ++ rt2800_register_write(rt2x00dev, TX_SW_CFG2, 0x00000000); ++ rt2800_register_write(rt2x00dev, MIMO_PS_CFG, 0x00000002); ++ rt2800_register_write(rt2x00dev, TX_PIN_CFG, 0x00150F0F); ++ rt2800_register_write(rt2x00dev, TX_ALC_VGA3, 0x06060606); ++ rt2800_register_write(rt2x00dev, TX0_BB_GAIN_ATTEN, 0x0); ++ rt2800_register_write(rt2x00dev, TX1_BB_GAIN_ATTEN, 0x0); ++ rt2800_register_write(rt2x00dev, TX0_RF_GAIN_ATTEN, 0x6C6C666C); ++ rt2800_register_write(rt2x00dev, TX1_RF_GAIN_ATTEN, 0x6C6C666C); ++ rt2800_register_write(rt2x00dev, TX0_RF_GAIN_CORRECT, ++ 0x3630363A); ++ rt2800_register_write(rt2x00dev, TX1_RF_GAIN_CORRECT, ++ 0x3630363A); ++ rt2800_register_read(rt2x00dev, TX_ALG_CFG_1, ®); ++ reg = reg & (~0x80000000); ++ rt2800_register_write(rt2x00dev, TX_ALG_CFG_1, reg); + } else if (rt2x00_rt(rt2x00dev, RT5390) || + rt2x00_rt(rt2x00dev, RT5392)) { + rt2800_register_write(rt2x00dev, TX_SW_CFG0, 0x00000404); +@@ -6075,6 +6473,225 @@ static void rt2800_init_bbp_5592(struct + rt2800_bbp_write(rt2x00dev, 103, 0xc0); + } + ++static void rt2800_bbp_glrt_write(struct rt2x00_dev *rt2x00dev, ++ const u8 reg, const u8 value) ++{ ++ rt2800_bbp_write(rt2x00dev, 195, reg); ++ rt2800_bbp_write(rt2x00dev, 196, value); ++} ++ ++static void rt2800_bbp_dcoc_write(struct rt2x00_dev *rt2x00dev, ++ const u8 reg, const u8 value) ++{ ++ rt2800_bbp_write(rt2x00dev, 158, reg); ++ rt2800_bbp_write(rt2x00dev, 159, value); ++} ++ ++static void rt2800_init_bbp_7620(struct rt2x00_dev *rt2x00dev) ++{ ++ u8 bbp; ++ ++ /* Apply Maximum Likelihood Detection (MLD) for 2 stream case */ ++ rt2800_bbp_read(rt2x00dev, 105, &bbp); ++ rt2x00_set_field8(&bbp, BBP105_MLD, ++ rt2x00dev->default_ant.rx_chain_num == 2); ++ rt2800_bbp_write(rt2x00dev, 105, bbp); ++ ++ /* Avoid data loss and CRC errors */ ++ /* MAC interface control (MAC_IF_80M, 1: 80 MHz) */ ++ rt2800_bbp4_mac_if_ctrl(rt2x00dev); ++ ++ /* Fix I/Q swap issue */ ++ rt2800_bbp_read(rt2x00dev, 1, &bbp); ++ bbp |= 0x04; ++ rt2800_bbp_write(rt2x00dev, 1, bbp); ++ ++ /* BBP for G band */ ++ rt2800_bbp_write(rt2x00dev, 3, 0x08); ++ rt2800_bbp_write(rt2x00dev, 4, 0x00); /* rt2800_bbp4_mac_if_ctrl? */ ++ rt2800_bbp_write(rt2x00dev, 6, 0x08); ++ rt2800_bbp_write(rt2x00dev, 14, 0x09); ++ rt2800_bbp_write(rt2x00dev, 15, 0xFF); ++ rt2800_bbp_write(rt2x00dev, 16, 0x01); ++ rt2800_bbp_write(rt2x00dev, 20, 0x06); ++ rt2800_bbp_write(rt2x00dev, 21, 0x00); ++ rt2800_bbp_write(rt2x00dev, 22, 0x00); ++ rt2800_bbp_write(rt2x00dev, 27, 0x00); ++ rt2800_bbp_write(rt2x00dev, 28, 0x00); ++ rt2800_bbp_write(rt2x00dev, 30, 0x00); ++ rt2800_bbp_write(rt2x00dev, 31, 0x48); ++ rt2800_bbp_write(rt2x00dev, 47, 0x40); ++ rt2800_bbp_write(rt2x00dev, 62, 0x00); ++ rt2800_bbp_write(rt2x00dev, 63, 0x00); ++ rt2800_bbp_write(rt2x00dev, 64, 0x00); ++ rt2800_bbp_write(rt2x00dev, 65, 0x2C); ++ rt2800_bbp_write(rt2x00dev, 66, 0x1C); ++ rt2800_bbp_write(rt2x00dev, 67, 0x20); ++ rt2800_bbp_write(rt2x00dev, 68, 0xDD); ++ rt2800_bbp_write(rt2x00dev, 69, 0x10); ++ rt2800_bbp_write(rt2x00dev, 70, 0x05); ++ rt2800_bbp_write(rt2x00dev, 73, 0x18); ++ rt2800_bbp_write(rt2x00dev, 74, 0x0F); ++ rt2800_bbp_write(rt2x00dev, 75, 0x60); ++ rt2800_bbp_write(rt2x00dev, 76, 0x44); ++ rt2800_bbp_write(rt2x00dev, 77, 0x59); ++ rt2800_bbp_write(rt2x00dev, 78, 0x1E); ++ rt2800_bbp_write(rt2x00dev, 79, 0x1C); ++ rt2800_bbp_write(rt2x00dev, 80, 0x0C); ++ rt2800_bbp_write(rt2x00dev, 81, 0x3A); ++ rt2800_bbp_write(rt2x00dev, 82, 0xB6); ++ rt2800_bbp_write(rt2x00dev, 83, 0x9A); ++ rt2800_bbp_write(rt2x00dev, 84, 0x9A); ++ rt2800_bbp_write(rt2x00dev, 86, 0x38); ++ rt2800_bbp_write(rt2x00dev, 88, 0x90); ++ rt2800_bbp_write(rt2x00dev, 91, 0x04); ++ rt2800_bbp_write(rt2x00dev, 92, 0x02); ++ rt2800_bbp_write(rt2x00dev, 95, 0x9A); ++ rt2800_bbp_write(rt2x00dev, 96, 0x00); ++ rt2800_bbp_write(rt2x00dev, 103, 0xC0); ++ rt2800_bbp_write(rt2x00dev, 104, 0x92); ++ /* FIXME BBP105 owerwrite */ ++ rt2800_bbp_write(rt2x00dev, 105, 0x3C); ++ rt2800_bbp_write(rt2x00dev, 106, 0x12); ++ rt2800_bbp_write(rt2x00dev, 109, 0x00); ++ rt2800_bbp_write(rt2x00dev, 134, 0x10); ++ rt2800_bbp_write(rt2x00dev, 135, 0xA6); ++ rt2800_bbp_write(rt2x00dev, 137, 0x04); ++ rt2800_bbp_write(rt2x00dev, 142, 0x30); ++ rt2800_bbp_write(rt2x00dev, 143, 0xF7); ++ rt2800_bbp_write(rt2x00dev, 160, 0xEC); ++ rt2800_bbp_write(rt2x00dev, 161, 0xC4); ++ rt2800_bbp_write(rt2x00dev, 162, 0x77); ++ rt2800_bbp_write(rt2x00dev, 163, 0xF9); ++ rt2800_bbp_write(rt2x00dev, 164, 0x00); ++ rt2800_bbp_write(rt2x00dev, 165, 0x00); ++ rt2800_bbp_write(rt2x00dev, 186, 0x00); ++ rt2800_bbp_write(rt2x00dev, 187, 0x00); ++ rt2800_bbp_write(rt2x00dev, 188, 0x00); ++ rt2800_bbp_write(rt2x00dev, 186, 0x00); ++ rt2800_bbp_write(rt2x00dev, 187, 0x01); ++ rt2800_bbp_write(rt2x00dev, 188, 0x00); ++ rt2800_bbp_write(rt2x00dev, 189, 0x00); ++ ++ rt2800_bbp_write(rt2x00dev, 91, 0x06); ++ rt2800_bbp_write(rt2x00dev, 92, 0x04); ++ rt2800_bbp_write(rt2x00dev, 93, 0x54); ++ rt2800_bbp_write(rt2x00dev, 99, 0x50); ++ rt2800_bbp_write(rt2x00dev, 148, 0x84); ++ rt2800_bbp_write(rt2x00dev, 167, 0x80); ++ rt2800_bbp_write(rt2x00dev, 178, 0xFF); ++ rt2800_bbp_write(rt2x00dev, 106, 0x13); ++ ++ /* BBP for G band GLRT function (BBP_128 ~ BBP_221) */ ++ rt2800_bbp_glrt_write(rt2x00dev, 0, 0x00); ++ rt2800_bbp_glrt_write(rt2x00dev, 1, 0x14); /* ? see above */ ++ rt2800_bbp_glrt_write(rt2x00dev, 2, 0x20); ++ rt2800_bbp_glrt_write(rt2x00dev, 3, 0x0A); ++ rt2800_bbp_glrt_write(rt2x00dev, 10, 0x16); ++ rt2800_bbp_glrt_write(rt2x00dev, 11, 0x06); ++ rt2800_bbp_glrt_write(rt2x00dev, 12, 0x02); ++ rt2800_bbp_glrt_write(rt2x00dev, 13, 0x07); ++ rt2800_bbp_glrt_write(rt2x00dev, 14, 0x05); ++ rt2800_bbp_glrt_write(rt2x00dev, 15, 0x09); ++ rt2800_bbp_glrt_write(rt2x00dev, 16, 0x20); ++ rt2800_bbp_glrt_write(rt2x00dev, 17, 0x08); ++ rt2800_bbp_glrt_write(rt2x00dev, 18, 0x4A); ++ rt2800_bbp_glrt_write(rt2x00dev, 19, 0x00); ++ rt2800_bbp_glrt_write(rt2x00dev, 20, 0x00); ++ rt2800_bbp_glrt_write(rt2x00dev, 128, 0xE0); ++ rt2800_bbp_glrt_write(rt2x00dev, 129, 0x1F); ++ rt2800_bbp_glrt_write(rt2x00dev, 130, 0x4F); ++ rt2800_bbp_glrt_write(rt2x00dev, 131, 0x32); ++ rt2800_bbp_glrt_write(rt2x00dev, 132, 0x08); ++ rt2800_bbp_glrt_write(rt2x00dev, 133, 0x28); ++ rt2800_bbp_glrt_write(rt2x00dev, 134, 0x19); ++ rt2800_bbp_glrt_write(rt2x00dev, 135, 0x0A); ++ rt2800_bbp_glrt_write(rt2x00dev, 138, 0x16); ++ rt2800_bbp_glrt_write(rt2x00dev, 139, 0x10); ++ rt2800_bbp_glrt_write(rt2x00dev, 140, 0x10); ++ rt2800_bbp_glrt_write(rt2x00dev, 141, 0x1A); ++ rt2800_bbp_glrt_write(rt2x00dev, 142, 0x36); ++ rt2800_bbp_glrt_write(rt2x00dev, 143, 0x2C); ++ rt2800_bbp_glrt_write(rt2x00dev, 144, 0x26); ++ rt2800_bbp_glrt_write(rt2x00dev, 145, 0x24); ++ rt2800_bbp_glrt_write(rt2x00dev, 146, 0x42); ++ rt2800_bbp_glrt_write(rt2x00dev, 147, 0x40); ++ rt2800_bbp_glrt_write(rt2x00dev, 148, 0x30); ++ rt2800_bbp_glrt_write(rt2x00dev, 149, 0x29); ++ rt2800_bbp_glrt_write(rt2x00dev, 150, 0x4C); ++ rt2800_bbp_glrt_write(rt2x00dev, 151, 0x46); ++ rt2800_bbp_glrt_write(rt2x00dev, 152, 0x3D); ++ rt2800_bbp_glrt_write(rt2x00dev, 153, 0x40); ++ rt2800_bbp_glrt_write(rt2x00dev, 154, 0x3E); ++ rt2800_bbp_glrt_write(rt2x00dev, 155, 0x38); ++ rt2800_bbp_glrt_write(rt2x00dev, 156, 0x3D); ++ rt2800_bbp_glrt_write(rt2x00dev, 157, 0x2F); ++ rt2800_bbp_glrt_write(rt2x00dev, 158, 0x3C); ++ rt2800_bbp_glrt_write(rt2x00dev, 159, 0x34); ++ rt2800_bbp_glrt_write(rt2x00dev, 160, 0x2C); ++ rt2800_bbp_glrt_write(rt2x00dev, 161, 0x2F); ++ rt2800_bbp_glrt_write(rt2x00dev, 162, 0x3C); ++ rt2800_bbp_glrt_write(rt2x00dev, 163, 0x35); ++ rt2800_bbp_glrt_write(rt2x00dev, 164, 0x2E); ++ rt2800_bbp_glrt_write(rt2x00dev, 165, 0x2F); ++ rt2800_bbp_glrt_write(rt2x00dev, 166, 0x49); ++ rt2800_bbp_glrt_write(rt2x00dev, 167, 0x41); ++ rt2800_bbp_glrt_write(rt2x00dev, 168, 0x36); ++ rt2800_bbp_glrt_write(rt2x00dev, 169, 0x39); ++ rt2800_bbp_glrt_write(rt2x00dev, 170, 0x30); ++ rt2800_bbp_glrt_write(rt2x00dev, 171, 0x30); ++ rt2800_bbp_glrt_write(rt2x00dev, 172, 0x0E); ++ rt2800_bbp_glrt_write(rt2x00dev, 173, 0x0D); ++ rt2800_bbp_glrt_write(rt2x00dev, 174, 0x28); ++ rt2800_bbp_glrt_write(rt2x00dev, 175, 0x21); ++ rt2800_bbp_glrt_write(rt2x00dev, 176, 0x1C); ++ rt2800_bbp_glrt_write(rt2x00dev, 177, 0x16); ++ rt2800_bbp_glrt_write(rt2x00dev, 178, 0x50); ++ rt2800_bbp_glrt_write(rt2x00dev, 179, 0x4A); ++ rt2800_bbp_glrt_write(rt2x00dev, 180, 0x43); ++ rt2800_bbp_glrt_write(rt2x00dev, 181, 0x50); ++ rt2800_bbp_glrt_write(rt2x00dev, 182, 0x10); ++ rt2800_bbp_glrt_write(rt2x00dev, 183, 0x10); ++ rt2800_bbp_glrt_write(rt2x00dev, 184, 0x10); ++ rt2800_bbp_glrt_write(rt2x00dev, 185, 0x10); ++ rt2800_bbp_glrt_write(rt2x00dev, 200, 0x7D); ++ rt2800_bbp_glrt_write(rt2x00dev, 201, 0x14); ++ rt2800_bbp_glrt_write(rt2x00dev, 202, 0x32); ++ rt2800_bbp_glrt_write(rt2x00dev, 203, 0x2C); ++ rt2800_bbp_glrt_write(rt2x00dev, 204, 0x36); ++ rt2800_bbp_glrt_write(rt2x00dev, 205, 0x4C); ++ rt2800_bbp_glrt_write(rt2x00dev, 206, 0x43); ++ rt2800_bbp_glrt_write(rt2x00dev, 207, 0x2C); ++ rt2800_bbp_glrt_write(rt2x00dev, 208, 0x2E); ++ rt2800_bbp_glrt_write(rt2x00dev, 209, 0x36); ++ rt2800_bbp_glrt_write(rt2x00dev, 210, 0x30); ++ rt2800_bbp_glrt_write(rt2x00dev, 211, 0x6E); ++ ++ /* BBP for G band DCOC function */ ++ rt2800_bbp_dcoc_write(rt2x00dev, 140, 0x0C); ++ rt2800_bbp_dcoc_write(rt2x00dev, 141, 0x00); ++ rt2800_bbp_dcoc_write(rt2x00dev, 142, 0x10); ++ rt2800_bbp_dcoc_write(rt2x00dev, 143, 0x10); ++ rt2800_bbp_dcoc_write(rt2x00dev, 144, 0x10); ++ rt2800_bbp_dcoc_write(rt2x00dev, 145, 0x10); ++ rt2800_bbp_dcoc_write(rt2x00dev, 146, 0x08); ++ rt2800_bbp_dcoc_write(rt2x00dev, 147, 0x40); ++ rt2800_bbp_dcoc_write(rt2x00dev, 148, 0x04); ++ rt2800_bbp_dcoc_write(rt2x00dev, 149, 0x04); ++ rt2800_bbp_dcoc_write(rt2x00dev, 150, 0x08); ++ rt2800_bbp_dcoc_write(rt2x00dev, 151, 0x08); ++ rt2800_bbp_dcoc_write(rt2x00dev, 152, 0x03); ++ rt2800_bbp_dcoc_write(rt2x00dev, 153, 0x03); ++ rt2800_bbp_dcoc_write(rt2x00dev, 154, 0x03); ++ rt2800_bbp_dcoc_write(rt2x00dev, 155, 0x02); ++ rt2800_bbp_dcoc_write(rt2x00dev, 156, 0x40); ++ rt2800_bbp_dcoc_write(rt2x00dev, 157, 0x40); ++ rt2800_bbp_dcoc_write(rt2x00dev, 158, 0x64); ++ rt2800_bbp_dcoc_write(rt2x00dev, 159, 0x64); ++ ++ rt2800_bbp4_mac_if_ctrl(rt2x00dev); ++} ++ + static void rt2800_init_bbp(struct rt2x00_dev *rt2x00dev) + { + unsigned int i; +@@ -6117,7 +6734,10 @@ static void rt2800_init_bbp(struct rt2x0 + return; + case RT5390: + case RT5392: +- rt2800_init_bbp_53xx(rt2x00dev); ++ if (rt2x00dev->chip.rf == RF7620) ++ rt2800_init_bbp_7620(rt2x00dev); ++ else ++ rt2800_init_bbp_53xx(rt2x00dev); + break; + case RT5592: + rt2800_init_bbp_5592(rt2x00dev); +@@ -7331,6 +7951,277 @@ static void rt2800_init_rfcsr_5592(struc + rt2800_led_open_drain_enable(rt2x00dev); + } + ++static void rt2800_init_rfcsr_7620(struct rt2x00_dev *rt2x00dev) ++{ ++ u8 rfvalue; ++ u16 freq; ++ ++ /* Initialize RF central register to default value */ ++ rt2800_rfcsr_write(rt2x00dev, 0, 0x02); ++ rt2800_rfcsr_write(rt2x00dev, 1, 0x03); ++ rt2800_rfcsr_write(rt2x00dev, 2, 0x33); ++ rt2800_rfcsr_write(rt2x00dev, 3, 0xFF); ++ rt2800_rfcsr_write(rt2x00dev, 4, 0x0C); ++ rt2800_rfcsr_write(rt2x00dev, 5, 0x40); /* Read only */ ++ rt2800_rfcsr_write(rt2x00dev, 6, 0x00); ++ rt2800_rfcsr_write(rt2x00dev, 7, 0x00); ++ rt2800_rfcsr_write(rt2x00dev, 8, 0x00); ++ rt2800_rfcsr_write(rt2x00dev, 9, 0x00); ++ rt2800_rfcsr_write(rt2x00dev, 10, 0x00); ++ rt2800_rfcsr_write(rt2x00dev, 11, 0x00); ++ /* rt2800_rfcsr_write(rt2x00dev, 12, 0x43); *//* EEPROM */ ++ rt2800_rfcsr_write(rt2x00dev, 13, 0x00); ++ rt2800_rfcsr_write(rt2x00dev, 14, 0x40); ++ rt2800_rfcsr_write(rt2x00dev, 15, 0x22); ++ rt2800_rfcsr_write(rt2x00dev, 16, 0x4C); ++ rt2800_rfcsr_write(rt2x00dev, 17, 0x00); ++ rt2800_rfcsr_write(rt2x00dev, 18, 0x00); ++ rt2800_rfcsr_write(rt2x00dev, 19, 0x00); ++ rt2800_rfcsr_write(rt2x00dev, 20, 0xA0); ++ rt2800_rfcsr_write(rt2x00dev, 21, 0x12); ++ rt2800_rfcsr_write(rt2x00dev, 22, 0x07); ++ rt2800_rfcsr_write(rt2x00dev, 23, 0x13); ++ rt2800_rfcsr_write(rt2x00dev, 24, 0xFE); ++ rt2800_rfcsr_write(rt2x00dev, 25, 0x24); ++ rt2800_rfcsr_write(rt2x00dev, 26, 0x7A); ++ rt2800_rfcsr_write(rt2x00dev, 27, 0x00); ++ rt2800_rfcsr_write(rt2x00dev, 28, 0x00); ++ rt2800_rfcsr_write(rt2x00dev, 29, 0x05); ++ rt2800_rfcsr_write(rt2x00dev, 30, 0x00); ++ rt2800_rfcsr_write(rt2x00dev, 31, 0x00); ++ rt2800_rfcsr_write(rt2x00dev, 32, 0x00); ++ rt2800_rfcsr_write(rt2x00dev, 33, 0x00); ++ rt2800_rfcsr_write(rt2x00dev, 34, 0x00); ++ rt2800_rfcsr_write(rt2x00dev, 35, 0x00); ++ rt2800_rfcsr_write(rt2x00dev, 36, 0x00); ++ rt2800_rfcsr_write(rt2x00dev, 37, 0x00); ++ rt2800_rfcsr_write(rt2x00dev, 38, 0x00); ++ rt2800_rfcsr_write(rt2x00dev, 39, 0x00); ++ rt2800_rfcsr_write(rt2x00dev, 40, 0x00); ++ rt2800_rfcsr_write(rt2x00dev, 41, 0xD0); ++ rt2800_rfcsr_write(rt2x00dev, 42, 0x5B); ++ rt2800_rfcsr_write(rt2x00dev, 43, 0x00); ++ ++ rt2800_rfcsr_write(rt2x00dev, 11, 0x21); ++ if (rt2800_clk_is_20mhz(rt2x00dev)) ++ rt2800_rfcsr_write(rt2x00dev, 13, 0x03); ++ else ++ rt2800_rfcsr_write(rt2x00dev, 13, 0x00); ++ rt2800_rfcsr_write(rt2x00dev, 14, 0x7C); ++ rt2800_rfcsr_write(rt2x00dev, 16, 0x80); ++ rt2800_rfcsr_write(rt2x00dev, 17, 0x99); ++ rt2800_rfcsr_write(rt2x00dev, 18, 0x99); ++ rt2800_rfcsr_write(rt2x00dev, 19, 0x09); ++ rt2800_rfcsr_write(rt2x00dev, 20, 0x50); ++ rt2800_rfcsr_write(rt2x00dev, 21, 0xB0); ++ rt2800_rfcsr_write(rt2x00dev, 22, 0x00); ++ rt2800_rfcsr_write(rt2x00dev, 23, 0x06); ++ rt2800_rfcsr_write(rt2x00dev, 24, 0x00); ++ rt2800_rfcsr_write(rt2x00dev, 25, 0x00); ++ rt2800_rfcsr_write(rt2x00dev, 26, 0x5D); ++ rt2800_rfcsr_write(rt2x00dev, 27, 0x00); ++ rt2800_rfcsr_write(rt2x00dev, 28, 0x61); ++ rt2800_rfcsr_write(rt2x00dev, 29, 0xB5); ++ rt2800_rfcsr_write(rt2x00dev, 43, 0x02); ++ ++ rt2800_rfcsr_write(rt2x00dev, 28, 0x62); ++ rt2800_rfcsr_write(rt2x00dev, 29, 0xAD); ++ rt2800_rfcsr_write(rt2x00dev, 39, 0x80); ++ ++ /* use rt2800_adjust_freq_offset ? */ ++ rt2800_eeprom_read(rt2x00dev, EEPROM_FREQ, &freq); ++ rfvalue = freq & 0xff; ++ rt2800_rfcsr_write(rt2x00dev, 12, rfvalue); ++ ++ /* Initialize RF channel register to default value */ ++ rt2800_rfcsr_write_chanreg(rt2x00dev, 0, 0x03); ++ rt2800_rfcsr_write_chanreg(rt2x00dev, 1, 0x00); ++ rt2800_rfcsr_write_chanreg(rt2x00dev, 2, 0x00); ++ rt2800_rfcsr_write_chanreg(rt2x00dev, 3, 0x00); ++ rt2800_rfcsr_write_chanreg(rt2x00dev, 4, 0x00); ++ rt2800_rfcsr_write_chanreg(rt2x00dev, 5, 0x08); ++ rt2800_rfcsr_write_chanreg(rt2x00dev, 6, 0x00); ++ rt2800_rfcsr_write_chanreg(rt2x00dev, 7, 0x51); ++ rt2800_rfcsr_write_chanreg(rt2x00dev, 8, 0x53); ++ rt2800_rfcsr_write_chanreg(rt2x00dev, 9, 0x16); ++ rt2800_rfcsr_write_chanreg(rt2x00dev, 10, 0x61); ++ rt2800_rfcsr_write_chanreg(rt2x00dev, 11, 0x53); ++ rt2800_rfcsr_write_chanreg(rt2x00dev, 12, 0x22); ++ /* rt2800_rfcsr_write_chanreg(rt2x00dev, 13, 0x3D); */ /* fails */ ++ rt2800_rfcsr_write_chanreg(rt2x00dev, 14, 0x06); ++ rt2800_rfcsr_write_chanreg(rt2x00dev, 15, 0x13); ++ rt2800_rfcsr_write_chanreg(rt2x00dev, 16, 0x22); ++ rt2800_rfcsr_write_chanreg(rt2x00dev, 17, 0x27); ++ rt2800_rfcsr_write_chanreg(rt2x00dev, 18, 0x02); ++ rt2800_rfcsr_write_chanreg(rt2x00dev, 19, 0xA7); ++ rt2800_rfcsr_write_chanreg(rt2x00dev, 20, 0x01); ++ rt2800_rfcsr_write_chanreg(rt2x00dev, 21, 0x52); ++ rt2800_rfcsr_write_chanreg(rt2x00dev, 22, 0x80); ++ rt2800_rfcsr_write_chanreg(rt2x00dev, 23, 0xB3); ++ rt2800_rfcsr_write_chanreg(rt2x00dev, 24, 0x00); ++ rt2800_rfcsr_write_chanreg(rt2x00dev, 25, 0x00); ++ rt2800_rfcsr_write_chanreg(rt2x00dev, 26, 0x00); ++ rt2800_rfcsr_write_chanreg(rt2x00dev, 27, 0x00); ++ rt2800_rfcsr_write_chanreg(rt2x00dev, 28, 0x5C); ++ rt2800_rfcsr_write_chanreg(rt2x00dev, 29, 0x6B); ++ rt2800_rfcsr_write_chanreg(rt2x00dev, 30, 0x6B); ++ rt2800_rfcsr_write_chanreg(rt2x00dev, 31, 0x31); ++ rt2800_rfcsr_write_chanreg(rt2x00dev, 32, 0x5D); ++ rt2800_rfcsr_write_chanreg(rt2x00dev, 33, 0x00); ++ rt2800_rfcsr_write_chanreg(rt2x00dev, 34, 0xE6); ++ rt2800_rfcsr_write_chanreg(rt2x00dev, 35, 0x55); ++ rt2800_rfcsr_write_chanreg(rt2x00dev, 36, 0x00); ++ rt2800_rfcsr_write_chanreg(rt2x00dev, 37, 0xBB); ++ rt2800_rfcsr_write_chanreg(rt2x00dev, 38, 0xB3); ++ rt2800_rfcsr_write_chanreg(rt2x00dev, 39, 0xB3); ++ rt2800_rfcsr_write_chanreg(rt2x00dev, 40, 0x03); ++ rt2800_rfcsr_write_chanreg(rt2x00dev, 41, 0x00); ++ rt2800_rfcsr_write_chanreg(rt2x00dev, 42, 0x00); ++ rt2800_rfcsr_write_chanreg(rt2x00dev, 43, 0xB3); ++ rt2800_rfcsr_write_chanreg(rt2x00dev, 44, 0xD3); ++ rt2800_rfcsr_write_chanreg(rt2x00dev, 45, 0xD5); ++ rt2800_rfcsr_write_chanreg(rt2x00dev, 46, 0x07); ++ rt2800_rfcsr_write_chanreg(rt2x00dev, 47, 0x68); ++ rt2800_rfcsr_write_chanreg(rt2x00dev, 48, 0xEF); ++ rt2800_rfcsr_write_chanreg(rt2x00dev, 49, 0x1C); ++ rt2800_rfcsr_write_chanreg(rt2x00dev, 54, 0x07); ++ rt2800_rfcsr_write_chanreg(rt2x00dev, 55, 0xA8); ++ rt2800_rfcsr_write_chanreg(rt2x00dev, 56, 0x85); ++ rt2800_rfcsr_write_chanreg(rt2x00dev, 57, 0x10); ++ rt2800_rfcsr_write_chanreg(rt2x00dev, 58, 0x07); ++ rt2800_rfcsr_write_chanreg(rt2x00dev, 59, 0x6A); ++ rt2800_rfcsr_write_chanreg(rt2x00dev, 60, 0x85); ++ rt2800_rfcsr_write_chanreg(rt2x00dev, 61, 0x10); ++ rt2800_rfcsr_write_chanreg(rt2x00dev, 62, 0x1C); ++ rt2800_rfcsr_write_chanreg(rt2x00dev, 63, 0x00); ++ ++ rt2800_rfcsr_write_bank(rt2x00dev, 6, 45, 0xC5); ++ ++ rt2800_rfcsr_write_chanreg(rt2x00dev, 9, 0x47); ++ rt2800_rfcsr_write_chanreg(rt2x00dev, 10, 0x71); ++ rt2800_rfcsr_write_chanreg(rt2x00dev, 11, 0x33); ++ rt2800_rfcsr_write_chanreg(rt2x00dev, 14, 0x0E); ++ rt2800_rfcsr_write_chanreg(rt2x00dev, 17, 0x23); ++ rt2800_rfcsr_write_chanreg(rt2x00dev, 19, 0xA4); ++ rt2800_rfcsr_write_chanreg(rt2x00dev, 20, 0x02); ++ rt2800_rfcsr_write_chanreg(rt2x00dev, 21, 0x12); ++ rt2800_rfcsr_write_chanreg(rt2x00dev, 28, 0x1C); ++ rt2800_rfcsr_write_chanreg(rt2x00dev, 29, 0xEB); ++ rt2800_rfcsr_write_chanreg(rt2x00dev, 32, 0x7D); ++ rt2800_rfcsr_write_chanreg(rt2x00dev, 34, 0xD6); ++ rt2800_rfcsr_write_chanreg(rt2x00dev, 36, 0x08); ++ rt2800_rfcsr_write_chanreg(rt2x00dev, 38, 0xB4); ++ rt2800_rfcsr_write_chanreg(rt2x00dev, 43, 0xD3); ++ rt2800_rfcsr_write_chanreg(rt2x00dev, 44, 0xB3); ++ rt2800_rfcsr_write_chanreg(rt2x00dev, 45, 0xD5); ++ rt2800_rfcsr_write_chanreg(rt2x00dev, 46, 0x27); ++ rt2800_rfcsr_write_chanreg(rt2x00dev, 47, 0x69); ++ rt2800_rfcsr_write_chanreg(rt2x00dev, 48, 0xFF); ++ rt2800_rfcsr_write_chanreg(rt2x00dev, 54, 0x20); ++ rt2800_rfcsr_write_chanreg(rt2x00dev, 55, 0x66); ++ rt2800_rfcsr_write_chanreg(rt2x00dev, 56, 0xFF); ++ rt2800_rfcsr_write_chanreg(rt2x00dev, 57, 0x1C); ++ rt2800_rfcsr_write_chanreg(rt2x00dev, 58, 0x20); ++ rt2800_rfcsr_write_chanreg(rt2x00dev, 59, 0x6B); ++ rt2800_rfcsr_write_chanreg(rt2x00dev, 60, 0xF7); ++ rt2800_rfcsr_write_chanreg(rt2x00dev, 61, 0x09); ++ ++ rt2800_rfcsr_write_chanreg(rt2x00dev, 10, 0x51); ++ rt2800_rfcsr_write_chanreg(rt2x00dev, 14, 0x06); ++ rt2800_rfcsr_write_chanreg(rt2x00dev, 19, 0xA7); ++ rt2800_rfcsr_write_chanreg(rt2x00dev, 28, 0x2C); ++ rt2800_rfcsr_write_chanreg(rt2x00dev, 55, 0x64); ++ rt2800_rfcsr_write_chanreg(rt2x00dev, 8, 0x51); ++ rt2800_rfcsr_write_chanreg(rt2x00dev, 9, 0x36); ++ rt2800_rfcsr_write_chanreg(rt2x00dev, 11, 0x53); ++ rt2800_rfcsr_write_chanreg(rt2x00dev, 14, 0x16); ++ ++ rt2800_rfcsr_write_chanreg(rt2x00dev, 47, 0x6C); ++ rt2800_rfcsr_write_chanreg(rt2x00dev, 48, 0xFC); ++ rt2800_rfcsr_write_chanreg(rt2x00dev, 49, 0x1F); ++ rt2800_rfcsr_write_chanreg(rt2x00dev, 54, 0x27); ++ rt2800_rfcsr_write_chanreg(rt2x00dev, 55, 0x66); ++ rt2800_rfcsr_write_chanreg(rt2x00dev, 59, 0x6B); ++ ++ /* Initialize RF channel register for DRQFN */ ++ rt2800_rfcsr_write_chanreg(rt2x00dev, 43, 0xD3); ++ rt2800_rfcsr_write_chanreg(rt2x00dev, 44, 0xE3); ++ rt2800_rfcsr_write_chanreg(rt2x00dev, 45, 0xE5); ++ rt2800_rfcsr_write_chanreg(rt2x00dev, 47, 0x28); ++ rt2800_rfcsr_write_chanreg(rt2x00dev, 55, 0x68); ++ rt2800_rfcsr_write_chanreg(rt2x00dev, 56, 0xF7); ++ rt2800_rfcsr_write_chanreg(rt2x00dev, 58, 0x02); ++ rt2800_rfcsr_write_chanreg(rt2x00dev, 60, 0xC7); ++ ++ /* Initialize RF DC calibration register to default value */ ++ rt2800_rfcsr_write_dccal(rt2x00dev, 0, 0x47); ++ rt2800_rfcsr_write_dccal(rt2x00dev, 1, 0x00); ++ rt2800_rfcsr_write_dccal(rt2x00dev, 2, 0x00); ++ rt2800_rfcsr_write_dccal(rt2x00dev, 3, 0x00); ++ rt2800_rfcsr_write_dccal(rt2x00dev, 4, 0x00); ++ rt2800_rfcsr_write_dccal(rt2x00dev, 5, 0x00); ++ rt2800_rfcsr_write_dccal(rt2x00dev, 6, 0x10); ++ rt2800_rfcsr_write_dccal(rt2x00dev, 7, 0x10); ++ rt2800_rfcsr_write_dccal(rt2x00dev, 8, 0x04); ++ rt2800_rfcsr_write_dccal(rt2x00dev, 9, 0x00); ++ rt2800_rfcsr_write_dccal(rt2x00dev, 10, 0x07); ++ rt2800_rfcsr_write_dccal(rt2x00dev, 11, 0x01); ++ rt2800_rfcsr_write_dccal(rt2x00dev, 12, 0x07); ++ rt2800_rfcsr_write_dccal(rt2x00dev, 13, 0x07); ++ rt2800_rfcsr_write_dccal(rt2x00dev, 14, 0x07); ++ rt2800_rfcsr_write_dccal(rt2x00dev, 15, 0x20); ++ rt2800_rfcsr_write_dccal(rt2x00dev, 16, 0x22); ++ rt2800_rfcsr_write_dccal(rt2x00dev, 17, 0x00); ++ rt2800_rfcsr_write_dccal(rt2x00dev, 18, 0x00); ++ rt2800_rfcsr_write_dccal(rt2x00dev, 19, 0x00); ++ rt2800_rfcsr_write_dccal(rt2x00dev, 20, 0x00); ++ rt2800_rfcsr_write_dccal(rt2x00dev, 21, 0xF1); ++ rt2800_rfcsr_write_dccal(rt2x00dev, 22, 0x11); ++ rt2800_rfcsr_write_dccal(rt2x00dev, 23, 0x02); ++ rt2800_rfcsr_write_dccal(rt2x00dev, 24, 0x41); ++ rt2800_rfcsr_write_dccal(rt2x00dev, 25, 0x20); ++ rt2800_rfcsr_write_dccal(rt2x00dev, 26, 0x00); ++ rt2800_rfcsr_write_dccal(rt2x00dev, 27, 0xD7); ++ rt2800_rfcsr_write_dccal(rt2x00dev, 28, 0xA2); ++ rt2800_rfcsr_write_dccal(rt2x00dev, 29, 0x20); ++ rt2800_rfcsr_write_dccal(rt2x00dev, 30, 0x49); ++ rt2800_rfcsr_write_dccal(rt2x00dev, 31, 0x20); ++ rt2800_rfcsr_write_dccal(rt2x00dev, 32, 0x04); ++ rt2800_rfcsr_write_dccal(rt2x00dev, 33, 0xF1); ++ rt2800_rfcsr_write_dccal(rt2x00dev, 34, 0xA1); ++ rt2800_rfcsr_write_dccal(rt2x00dev, 35, 0x01); ++ rt2800_rfcsr_write_dccal(rt2x00dev, 41, 0x00); ++ rt2800_rfcsr_write_dccal(rt2x00dev, 42, 0x00); ++ rt2800_rfcsr_write_dccal(rt2x00dev, 43, 0x00); ++ rt2800_rfcsr_write_dccal(rt2x00dev, 44, 0x00); ++ rt2800_rfcsr_write_dccal(rt2x00dev, 45, 0x00); ++ rt2800_rfcsr_write_dccal(rt2x00dev, 46, 0x00); ++ rt2800_rfcsr_write_dccal(rt2x00dev, 47, 0x3E); ++ rt2800_rfcsr_write_dccal(rt2x00dev, 48, 0x3D); ++ rt2800_rfcsr_write_dccal(rt2x00dev, 49, 0x3E); ++ rt2800_rfcsr_write_dccal(rt2x00dev, 50, 0x3D); ++ rt2800_rfcsr_write_dccal(rt2x00dev, 51, 0x3E); ++ rt2800_rfcsr_write_dccal(rt2x00dev, 52, 0x3D); ++ rt2800_rfcsr_write_dccal(rt2x00dev, 53, 0x00); ++ rt2800_rfcsr_write_dccal(rt2x00dev, 54, 0x00); ++ rt2800_rfcsr_write_dccal(rt2x00dev, 55, 0x00); ++ rt2800_rfcsr_write_dccal(rt2x00dev, 56, 0x00); ++ rt2800_rfcsr_write_dccal(rt2x00dev, 57, 0x00); ++ rt2800_rfcsr_write_dccal(rt2x00dev, 58, 0x10); ++ rt2800_rfcsr_write_dccal(rt2x00dev, 59, 0x10); ++ rt2800_rfcsr_write_dccal(rt2x00dev, 60, 0x0A); ++ rt2800_rfcsr_write_dccal(rt2x00dev, 61, 0x00); ++ rt2800_rfcsr_write_dccal(rt2x00dev, 62, 0x00); ++ rt2800_rfcsr_write_dccal(rt2x00dev, 63, 0x00); ++ ++ rt2800_rfcsr_write_dccal(rt2x00dev, 3, 0x08); ++ rt2800_rfcsr_write_dccal(rt2x00dev, 4, 0x04); ++ rt2800_rfcsr_write_dccal(rt2x00dev, 5, 0x20); ++ ++ rt2800_rfcsr_write_dccal(rt2x00dev, 5, 0x00); ++ rt2800_rfcsr_write_dccal(rt2x00dev, 17, 0x7C); ++} ++ + static void rt2800_init_rfcsr(struct rt2x00_dev *rt2x00dev) + { + if (rt2800_is_305x_soc(rt2x00dev)) { +@@ -7366,7 +8257,10 @@ static void rt2800_init_rfcsr(struct rt2 + rt2800_init_rfcsr_5350(rt2x00dev); + break; + case RT5390: +- rt2800_init_rfcsr_5390(rt2x00dev); ++ if (rt2x00dev->chip.rf == RF7620) ++ rt2800_init_rfcsr_7620(rt2x00dev); ++ else ++ rt2800_init_rfcsr_5390(rt2x00dev); + break; + case RT5392: + rt2800_init_rfcsr_5392(rt2x00dev); +@@ -7780,6 +8674,7 @@ static int rt2800_init_eeprom(struct rt2 + case RF5390: + case RF5392: + case RF5592: ++ case RF7620: + break; + default: + rt2x00_err(rt2x00dev, "Invalid RF chipset 0x%04x detected\n", +@@ -8258,6 +9153,24 @@ static const struct rf_channel rf_vals_5 + {196, 83, 0, 12, 1}, + }; + ++static const struct rf_channel rf_vals_7620[] = { ++ /* Channel, Rdiv, N, K | (D >> 8), Ksd */ ++ {1, 3, 0x50, 0 | (0 >> 8), 0x19999}, ++ {2, 3, 0x50, 0 | (0 >> 8), 0x24444}, ++ {3, 3, 0x50, 0 | (0 >> 8), 0x2EEEE}, ++ {4, 3, 0x50, 0 | (0 >> 8), 0x39999}, ++ {5, 3, 0x51, 0 | (0 >> 8), 0x04444}, ++ {6, 3, 0x51, 0 | (0 >> 8), 0x0EEEE}, ++ {7, 3, 0x51, 0 | (0 >> 8), 0x19999}, ++ {8, 3, 0x51, 0 | (0 >> 8), 0x24444}, ++ {9, 3, 0x51, 0 | (0 >> 8), 0x2EEEE}, ++ {10, 3, 0x51, 0 | (0 >> 8), 0x39999}, ++ {11, 3, 0x52, 0 | (0 >> 8), 0x04444}, ++ {12, 3, 0x52, 0 | (0 >> 8), 0x0EEEE}, ++ {13, 3, 0x52, 0 | (0 >> 8), 0x19999}, ++ {14, 3, 0x52, 0 | (0 >> 8), 0x33333}, ++}; ++ + static int rt2800_probe_hw_mode(struct rt2x00_dev *rt2x00dev) + { + struct hw_mode_spec *spec = &rt2x00dev->spec; +@@ -8361,6 +9274,11 @@ static int rt2800_probe_hw_mode(struct r + spec->channels = rf_vals_3x; + break; + ++ case RF7620: ++ spec->num_channels = ARRAY_SIZE(rf_vals_7620); ++ spec->channels = rf_vals_7620; ++ break; ++ + case RF3052: + case RF3053: + spec->num_channels = ARRAY_SIZE(rf_vals_3x); +@@ -8498,6 +9416,7 @@ static int rt2800_probe_hw_mode(struct r + case RF5390: + case RF5392: + case RF5592: ++ case RF7620: + __set_bit(CAPABILITY_VCO_RECALIBRATION, &rt2x00dev->cap_flags); + break; + } diff --git a/package/kernel/mac80211/patches/700-mwl8k-missing-pci-id-for-WNR854T.patch b/package/kernel/mac80211/patches/700-mwl8k-missing-pci-id-for-WNR854T.patch deleted file mode 100644 index a901a44ba4..0000000000 --- a/package/kernel/mac80211/patches/700-mwl8k-missing-pci-id-for-WNR854T.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- a/drivers/net/wireless/marvell/mwl8k.c -+++ b/drivers/net/wireless/marvell/mwl8k.c -@@ -5681,6 +5681,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, }, diff --git a/package/kernel/mac80211/patches/801-libertas-configure-sysfs-links.patch b/package/kernel/mac80211/patches/801-libertas-configure-sysfs-links.patch new file mode 100644 index 0000000000..106ef706b8 --- /dev/null +++ b/package/kernel/mac80211/patches/801-libertas-configure-sysfs-links.patch @@ -0,0 +1,21 @@ +--- a/drivers/net/wireless/marvell/libertas/cfg.c ++++ b/drivers/net/wireless/marvell/libertas/cfg.c +@@ -2127,6 +2127,8 @@ struct wireless_dev *lbs_cfg_alloc(struc + goto err_wiphy_new; + } + ++ set_wiphy_dev(wdev->wiphy, dev); ++ + lbs_deb_leave(LBS_DEB_CFG80211); + return wdev; + +--- a/drivers/net/wireless/marvell/libertas/main.c ++++ b/drivers/net/wireless/marvell/libertas/main.c +@@ -986,6 +986,7 @@ struct lbs_private *lbs_add_card(void *c + 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/package/kernel/mac80211/patches/802-libertas-set-wireless-macaddr.patch b/package/kernel/mac80211/patches/802-libertas-set-wireless-macaddr.patch new file mode 100644 index 0000000000..04b4954d29 --- /dev/null +++ b/package/kernel/mac80211/patches/802-libertas-set-wireless-macaddr.patch @@ -0,0 +1,11 @@ +--- a/drivers/net/wireless/marvell/libertas/cfg.c ++++ b/drivers/net/wireless/marvell/libertas/cfg.c +@@ -2217,6 +2217,8 @@ int lbs_cfg_register(struct lbs_private + 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/package/kernel/mac80211/patches/850-brcmsmac-remove-extra-regulation-restriction.patch b/package/kernel/mac80211/patches/850-brcmsmac-remove-extra-regulation-restriction.patch new file mode 100644 index 0000000000..3c93386b30 --- /dev/null +++ b/package/kernel/mac80211/patches/850-brcmsmac-remove-extra-regulation-restriction.patch @@ -0,0 +1,27 @@ +--- a/drivers/net/wireless/broadcom/brcm80211/brcmsmac/channel.c ++++ b/drivers/net/wireless/broadcom/brcm80211/brcmsmac/channel.c +@@ -58,19 +58,12 @@ + (((c) < 149) ? 3 : 4)))) + + #define BRCM_2GHZ_2412_2462 REG_RULE(2412-10, 2462+10, 40, 0, 19, 0) +-#define BRCM_2GHZ_2467_2472 REG_RULE(2467-10, 2472+10, 20, 0, 19, \ +- NL80211_RRF_NO_IR) ++#define BRCM_2GHZ_2467_2472 REG_RULE(2467-10, 2472+10, 20, 0, 19, 0) + +-#define BRCM_5GHZ_5180_5240 REG_RULE(5180-10, 5240+10, 40, 0, 21, \ +- NL80211_RRF_NO_IR) +-#define BRCM_5GHZ_5260_5320 REG_RULE(5260-10, 5320+10, 40, 0, 21, \ +- NL80211_RRF_DFS | \ +- NL80211_RRF_NO_IR) +-#define BRCM_5GHZ_5500_5700 REG_RULE(5500-10, 5700+10, 40, 0, 21, \ +- NL80211_RRF_DFS | \ +- NL80211_RRF_NO_IR) +-#define BRCM_5GHZ_5745_5825 REG_RULE(5745-10, 5825+10, 40, 0, 21, \ +- NL80211_RRF_NO_IR) ++#define BRCM_5GHZ_5180_5240 REG_RULE(5180-10, 5240+10, 40, 0, 21, 0) ++#define BRCM_5GHZ_5260_5320 REG_RULE(5260-10, 5320+10, 40, 0, 21, 0) ++#define BRCM_5GHZ_5500_5700 REG_RULE(5500-10, 5700+10, 40, 0, 21, 0) ++#define BRCM_5GHZ_5745_5825 REG_RULE(5745-10, 5825+10, 40, 0, 21, 0) + + static const struct ieee80211_regdomain brcms_regdom_x2 = { + .n_reg_rules = 6, diff --git a/package/kernel/mac80211/patches/860-brcmfmac-register-wiphy-s-during-module_init.patch b/package/kernel/mac80211/patches/860-brcmfmac-register-wiphy-s-during-module_init.patch new file mode 100644 index 0000000000..d09057f896 --- /dev/null +++ b/package/kernel/mac80211/patches/860-brcmfmac-register-wiphy-s-during-module_init.patch @@ -0,0 +1,97 @@ +From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= +Date: Mon, 8 Jun 2015 16:11:40 +0200 +Subject: [PATCH] brcmfmac: register wiphy(s) during module_init +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +This is needed by OpenWrt which expects all PHYs to be created after +module loads successfully. + +Signed-off-by: Rafał Miłecki +--- + +--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c ++++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c +@@ -1196,6 +1196,7 @@ int __init brcmf_core_init(void) + { + if (!schedule_work(&brcmf_driver_work)) + return -EBUSY; ++ flush_work(&brcmf_driver_work); + + return 0; + } +--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.c ++++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.c +@@ -444,6 +444,7 @@ struct brcmf_fw { + u16 bus_nr; + void (*done)(struct device *dev, const struct firmware *fw, + void *nvram_image, u32 nvram_len); ++ struct completion *completion; + }; + + static void brcmf_fw_request_nvram_done(const struct firmware *fw, void *ctx) +@@ -478,6 +479,8 @@ static void brcmf_fw_request_nvram_done( + goto fail; + + fwctx->done(fwctx->dev, fwctx->code, nvram, nvram_length); ++ if (fwctx->completion) ++ complete(fwctx->completion); + kfree(fwctx); + return; + +@@ -485,6 +488,8 @@ fail: + brcmf_dbg(TRACE, "failed: dev=%s\n", dev_name(fwctx->dev)); + release_firmware(fwctx->code); + device_release_driver(fwctx->dev); ++ if (fwctx->completion) ++ complete(fwctx->completion); + kfree(fwctx); + } + +@@ -500,6 +505,8 @@ static void brcmf_fw_request_code_done(c + /* only requested code so done here */ + if (!(fwctx->flags & BRCMF_FW_REQUEST_NVRAM)) { + fwctx->done(fwctx->dev, fw, NULL, 0); ++ if (fwctx->completion) ++ complete(fwctx->completion); + kfree(fwctx); + return; + } +@@ -517,6 +524,8 @@ static void brcmf_fw_request_code_done(c + fail: + brcmf_dbg(TRACE, "failed: dev=%s\n", dev_name(fwctx->dev)); + device_release_driver(fwctx->dev); ++ if (fwctx->completion) ++ complete(fwctx->completion); + kfree(fwctx); + } + +@@ -528,6 +537,8 @@ int brcmf_fw_get_firmwares_pcie(struct d + u16 domain_nr, u16 bus_nr) + { + struct brcmf_fw *fwctx; ++ struct completion completion; ++ int err; + + brcmf_dbg(TRACE, "enter: dev=%s\n", dev_name(dev)); + if (!fw_cb || !code) +@@ -548,9 +559,17 @@ int brcmf_fw_get_firmwares_pcie(struct d + fwctx->domain_nr = domain_nr; + fwctx->bus_nr = bus_nr; + +- return request_firmware_nowait(THIS_MODULE, true, code, dev, ++ init_completion(&completion); ++ fwctx->completion = &completion; ++ ++ err = request_firmware_nowait(THIS_MODULE, true, code, dev, + GFP_KERNEL, fwctx, + brcmf_fw_request_code_done); ++ if (!err) ++ wait_for_completion_timeout(fwctx->completion, ++ msecs_to_jiffies(5000)); ++ fwctx->completion = NULL; ++ return err; + } + + int brcmf_fw_get_firmwares(struct device *dev, u16 flags, diff --git a/package/kernel/mac80211/patches/861-brcmfmac-workaround-bug-with-some-inconsistent-BSSes.patch b/package/kernel/mac80211/patches/861-brcmfmac-workaround-bug-with-some-inconsistent-BSSes.patch new file mode 100644 index 0000000000..774b333402 --- /dev/null +++ b/package/kernel/mac80211/patches/861-brcmfmac-workaround-bug-with-some-inconsistent-BSSes.patch @@ -0,0 +1,50 @@ +From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= +Date: Thu, 9 Jul 2015 00:07:59 +0200 +Subject: [PATCH] brcmfmac: workaround bug with some inconsistent BSSes state +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Signed-off-by: Rafał Miłecki +--- + +--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c ++++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c +@@ -656,9 +656,37 @@ static struct wireless_dev *brcmf_cfg802 + u32 *flags, + struct vif_params *params) + { ++ struct net_device *dev; + struct wireless_dev *wdev; + int err; + ++ /* ++ * There is a bug with in-firmware BSS management. When adding virtual ++ * interface brcmfmac first tells firmware to create new BSS and then ++ * it creates new struct net_device. ++ * ++ * If creating/registering netdev(ice) fails, BSS remains in some bugged ++ * state. It conflicts with existing BSSes by overtaking their auth ++ * requests. ++ * ++ * It results in one BSS (addresss X) sending beacons and another BSS ++ * (address Y) replying to authentication requests. This makes interface ++ * unusable as AP. ++ * ++ * To workaround this bug we may try to guess if register_netdev(ice) ++ * will fail. The most obvious case is using interface name that already ++ * exists. This is actually quite likely with brcmfmac & some user space ++ * scripts as brcmfmac doesn't allow deleting virtual interfaces. ++ * So this bug can be triggered even by something trivial like: ++ * iw dev wlan0 delete ++ * iw phy phy0 interface add wlan0 type __ap ++ */ ++ dev = dev_get_by_name(&init_net, name); ++ if (dev) { ++ dev_put(dev); ++ return ERR_PTR(-ENFILE); ++ } ++ + brcmf_dbg(TRACE, "enter: %s type %d\n", name, type); + err = brcmf_vif_add_validate(wiphy_to_cfg(wiphy), type); + if (err) { diff --git a/package/kernel/mac80211/patches/862-brcmfmac-Disable-power-management.patch b/package/kernel/mac80211/patches/862-brcmfmac-Disable-power-management.patch new file mode 100644 index 0000000000..1819cf3999 --- /dev/null +++ b/package/kernel/mac80211/patches/862-brcmfmac-Disable-power-management.patch @@ -0,0 +1,27 @@ +From 66ae1b1750720a33e29792a177b1e696f4f005fb Mon Sep 17 00:00:00 2001 +From: Phil Elwell +Date: Wed, 9 Mar 2016 17:25:59 +0000 +Subject: [PATCH] brcmfmac: Disable power management + +Disable wireless power saving in the brcmfmac WLAN driver. This is a +temporary measure until the connectivity loss resulting from power +saving is resolved. + +Signed-off-by: Phil Elwell +--- + drivers/net/wireless/brcm80211/brcmfmac/cfg80211.c | 2 ++ + 1 file changed, 2 insertions(+) + +--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c ++++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c +@@ -2775,6 +2775,10 @@ brcmf_cfg80211_set_power_mgmt(struct wip + * preference in cfg struct to apply this to + * FW later while initializing the dongle + */ ++#if defined(CONFIG_ARCH_BCM2835) ++ brcmf_dbg(INFO, "power management disabled\n"); ++ enabled = false; ++#endif + cfg->pwr_save = enabled; + if (!check_vif_up(ifp->vif)) { + diff --git a/package/kernel/mac80211/patches/863-brcmfmac-add-in-driver-tables-with-country-codes.patch b/package/kernel/mac80211/patches/863-brcmfmac-add-in-driver-tables-with-country-codes.patch new file mode 100644 index 0000000000..e7551c3a70 --- /dev/null +++ b/package/kernel/mac80211/patches/863-brcmfmac-add-in-driver-tables-with-country-codes.patch @@ -0,0 +1,60 @@ +From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= +Subject: [PATCH] brcmfmac: add in-driver tables with country codes +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +This adds early support for changing region. Ideally this data should +be stored in DT as all these mappings are devices specific. + +Signed-off-by: Rafał Miłecki +--- + +--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/of.c ++++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/of.c +@@ -23,6 +23,36 @@ + #include "common.h" + #include "of.h" + ++/* TODO: FIXME: Use DT */ ++static void brcmf_of_probe_cc(struct device *dev, ++ struct brcmf_mp_device *settings) ++{ ++ static struct brcmfmac_pd_cc_entry netgear_r8000_cc_ent[] = { ++ { "JP", "JP", 78 }, ++ { "US", "Q2", 86 }, ++ }; ++ struct brcmfmac_pd_cc_entry *cc_ent = NULL; ++ int table_size = 0; ++ ++ if (of_machine_is_compatible("netgear,r8000")) { ++ cc_ent = netgear_r8000_cc_ent; ++ table_size = ARRAY_SIZE(netgear_r8000_cc_ent); ++ } ++ ++ if (cc_ent && table_size) { ++ struct brcmfmac_pd_cc *cc; ++ size_t memsize; ++ ++ memsize = table_size * sizeof(struct brcmfmac_pd_cc_entry); ++ cc = devm_kzalloc(dev, sizeof(*cc) + memsize, GFP_KERNEL); ++ if (!cc) ++ return; ++ cc->table_size = table_size; ++ memcpy(cc->table, cc_ent, memsize); ++ settings->country_codes = cc; ++ } ++} ++ + void brcmf_of_probe(struct device *dev, enum brcmf_bus_type bus_type, + struct brcmf_mp_device *settings) + { +@@ -32,6 +62,8 @@ void brcmf_of_probe(struct device *dev, + u32 irqf; + u32 val; + ++ brcmf_of_probe_cc(dev, settings); ++ + if (!np || bus_type != BRCMF_BUSTYPE_SDIO || + !of_device_is_compatible(np, "brcm,bcm4329-fmac")) + return; diff --git a/package/kernel/mac80211/patches/864-brcmfmac-do-not-use-internal-roaming-engine-by-default.patch b/package/kernel/mac80211/patches/864-brcmfmac-do-not-use-internal-roaming-engine-by-default.patch new file mode 100644 index 0000000000..891c539fbf --- /dev/null +++ b/package/kernel/mac80211/patches/864-brcmfmac-do-not-use-internal-roaming-engine-by-default.patch @@ -0,0 +1,23 @@ +brcmfmac: do not use internal roaming engine by default + +Some evidence of curing disconnects with this disabled, so make it a default. +Can be overridden with module parameter roamoff=0 +See: http://projectable.me/optimize-my-pi-wi-fi/ + +Signed-off-by: Phil Elwell +--- + +--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.c ++++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.c +@@ -69,7 +69,11 @@ static int brcmf_fcmode; + module_param_named(fcmode, brcmf_fcmode, int, 0); + MODULE_PARM_DESC(fcmode, "Mode of firmware signalled flow control"); + ++#if defined(CONFIG_ARCH_BCM2835) ++static int brcmf_roamoff = 1; ++#else + static int brcmf_roamoff; ++#endif + module_param_named(roamoff, brcmf_roamoff, int, S_IRUSR); + MODULE_PARM_DESC(roamoff, "Do not use internal roaming engine"); + diff --git a/package/kernel/om-watchdog/files/om-watchdog.init b/package/kernel/om-watchdog/files/om-watchdog.init index 4ed178db7e..4ba6beafb6 100644 --- a/package/kernel/om-watchdog/files/om-watchdog.init +++ b/package/kernel/om-watchdog/files/om-watchdog.init @@ -17,9 +17,11 @@ get_gpio() { case "$board" in "om2p" | \ + "om2pv4" | \ "om2p-hs" | \ "om2p-hsv2" | \ "om2p-hsv3" | \ + "om2p-hsv4" | \ "om5p-acv2") return 12 ;; @@ -40,7 +42,9 @@ get_gpio() { "mr900" | \ "mr900v2" | \ "mr1750" | \ - "mr1750v2") + "mr1750v2" | \ + "a40" | \ + "a60") return 16 ;; esac diff --git a/package/libs/libpcap/Config.in b/package/libs/libpcap/Config.in index 5fee75a595..11599273e7 100644 --- a/package/libs/libpcap/Config.in +++ b/package/libs/libpcap/Config.in @@ -3,13 +3,15 @@ menu "Configuration" config PCAP_HAS_USB bool "Include USB support" - depends on PACKAGE_kmod-usb-core default n config PCAP_HAS_BT bool "Include bluetooth support" - depends on PACKAGE_kmod-bluetooth depends on BROKEN default n +config PCAP_HAS_NETFILTER + bool "Include netfilter support" + default n + endmenu diff --git a/package/libs/libpcap/Makefile b/package/libs/libpcap/Makefile index d3360d2dee..4d0ce40993 100644 --- a/package/libs/libpcap/Makefile +++ b/package/libs/libpcap/Makefile @@ -48,9 +48,12 @@ TARGET_CFLAGS += \ CONFIGURE_VARS += \ ac_cv_linux_vers=$(LINUX_VERSION) \ - ac_cv_header_libusb_1_0_libusb_h=no \ - ac_cv_netfilter_can_compile=no + ac_cv_header_libusb_1_0_libusb_h=no +ifeq ($(CONFIG_PCAP_HAS_NETFILTER),) +CONFIGURE_VARS += \ + ac_cv_netfilter_can_compile=no +endif CONFIGURE_ARGS += \ --enable-shared \ diff --git a/package/libs/libtool/Makefile b/package/libs/libtool/Makefile index 2d5cedf786..5eb521a72b 100644 --- a/package/libs/libtool/Makefile +++ b/package/libs/libtool/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=libtool PKG_VERSION:=2.4 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=@GNU/libtool @@ -34,14 +34,14 @@ endef define Build/InstallDev $(MAKE) -C $(PKG_BUILD_DIR) \ - bindir="$(2)/bin" \ - datadir="$(2)/share" \ - prefix="$(2)" \ - exec_prefix="$(2)" \ + bindir="$(2)/libltdl/bin" \ + datadir="$(2)/libltdl/share" \ + prefix="$(2)/libltdl" \ + exec_prefix="$(2)/libltdl" \ install $(INSTALL_DIR) $(1)/usr/lib $(1)/usr/include - mv $(2)/lib/* $(1)/usr/lib/ - mv $(2)/include/* $(1)/usr/include/ + mv $(2)/libltdl/lib/* $(1)/usr/lib/ + mv $(2)/libltdl/include/* $(1)/usr/include/ endef define Package/libltdl/install diff --git a/package/libs/libubox/Makefile b/package/libs/libubox/Makefile index 38dce1a714..71c53ae8fe 100644 --- a/package/libs/libubox/Makefile +++ b/package/libs/libubox/Makefile @@ -5,9 +5,9 @@ PKG_RELEASE=1 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL=$(LEDE_GIT)/project/libubox.git -PKG_SOURCE_DATE:=2016-11-29 -PKG_SOURCE_VERSION:=77a629375d7387a33a59509d9d751a8798134cab -PKG_MIRROR_HASH:=b11c24d45cdf5a1909f0f97d185c3e1ba49602561a8cf3ad18f594ca0eaf4a64 +PKG_SOURCE_DATE:=2017-02-24 +PKG_SOURCE_VERSION:=96305a3cafcc9c0df7f189567671bb26ce3eb129 +PKG_MIRROR_HASH:=19dc9f73621a65d1374427160f59e338db45ee6edc30edff6a6fee10dcdfc8b6 CMAKE_INSTALL:=1 PKG_LICENSE:=ISC diff --git a/package/libs/mbedtls/Makefile b/package/libs/mbedtls/Makefile index 990aabe066..65a6750c4b 100644 --- a/package/libs/mbedtls/Makefile +++ b/package/libs/mbedtls/Makefile @@ -8,13 +8,13 @@ include $(TOPDIR)/rules.mk PKG_NAME:=mbedtls -PKG_VERSION:=2.4.0 -PKG_RELEASE:=2 +PKG_VERSION:=2.4.2 +PKG_RELEASE:=1 PKG_USE_MIPS16:=0 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-gpl.tgz PKG_SOURCE_URL:=https://tls.mbed.org/download/ -PKG_HASH:=80eff0e0028f969355d6e34ffdd3dbf4eb2a9367b07ff2f3f70e6d75beee9e3f +PKG_HASH:=d01f2d5586a52055329d194d909103f445bd2d0b6b2b5f1c830fbf828ac6299f PKG_BUILD_PARALLEL:=1 PKG_LICENSE:=GPL-2.0+ @@ -48,6 +48,8 @@ endef PKG_INSTALL:=1 +TARGET_CFLAGS += -ffunction-sections -fdata-sections + CMAKE_OPTIONS += \ -DCMAKE_BUILD_TYPE:String="Release" \ -DUSE_SHARED_MBEDTLS_LIBRARY:Bool=ON \ @@ -59,6 +61,7 @@ define Build/InstallDev $(CP) $(PKG_INSTALL_DIR)/usr/include/mbedtls $(1)/usr/include/ $(INSTALL_DIR) $(1)/usr/lib $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib*.so* $(1)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib*.a $(1)/usr/lib/ endef define Package/libmbedtls/install diff --git a/package/libs/mbedtls/patches/200-config.patch b/package/libs/mbedtls/patches/200-config.patch index 96d7c156a7..510872380f 100644 --- a/package/libs/mbedtls/patches/200-config.patch +++ b/package/libs/mbedtls/patches/200-config.patch @@ -222,7 +222,7 @@ /** * \def MBEDTLS_MD_C @@ -2158,7 +2158,7 @@ - * Caller: library/mbedtls_md.c + * Caller: library/md.c * */ -#define MBEDTLS_RIPEMD160_C diff --git a/package/libs/ncurses/Makefile b/package/libs/ncurses/Makefile index 88a31e299b..60a8a176df 100644 --- a/package/libs/ncurses/Makefile +++ b/package/libs/ncurses/Makefile @@ -135,7 +135,7 @@ define Build/InstallDev $(CP) $(PKG_INSTALL_DIR)/usr/bin/ncursesw6-config $(2)/bin/ $(SED) 's,^\(prefix\|exec_prefix\)=.*,\1=$(STAGING_DIR)/usr,g' -e 's/$$$$INCS //g' \ $(2)/bin/ncursesw6-config - ln -sf $(STAGING_DIR_HOSTPKG)/bin/ncursesw6-config $(1)/usr/bin/ncursesw6-config + ln -sf $(STAGING_DIR)/host/bin/ncursesw6-config $(1)/usr/bin/ncursesw6-config endef define Host/Compile diff --git a/package/libs/openssl/Makefile b/package/libs/openssl/Makefile index 0d69d705c9..9b6430234e 100644 --- a/package/libs/openssl/Makefile +++ b/package/libs/openssl/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=openssl PKG_BASE:=1.0.2 -PKG_BUGFIX:=j +PKG_BUGFIX:=k PKG_VERSION:=$(PKG_BASE)$(PKG_BUGFIX) PKG_RELEASE:=1 PKG_USE_MIPS16:=0 @@ -23,7 +23,7 @@ PKG_SOURCE_URL:=http://www.openssl.org/source/ \ http://www.openssl.org/source/old/$(PKG_BASE)/ \ ftp://ftp.funet.fi/pub/crypt/mirrors/ftp.openssl.org/source \ ftp://ftp.sunet.se/pub/security/tools/net/openssl/source/ -PKG_HASH:=e7aff292be21c259c6af26469c7a9b3ba26e9abaaffd325e3dccc9785256c431 +PKG_HASH:=6b3977c61f2aedf0f96367dcfb5c6e578cf37e7b8d913b4ecb6643c3cb88d8c0 PKG_LICENSE:=OpenSSL PKG_LICENSE_FILES:=LICENSE diff --git a/package/libs/openssl/patches/110-optimize-for-size.patch b/package/libs/openssl/patches/110-optimize-for-size.patch index 172184228e..0f174a3469 100644 --- a/package/libs/openssl/patches/110-optimize-for-size.patch +++ b/package/libs/openssl/patches/110-optimize-for-size.patch @@ -1,6 +1,6 @@ --- a/Configure +++ b/Configure -@@ -468,6 +468,12 @@ my %table=( +@@ -470,6 +470,12 @@ my %table=( "linux-alpha-ccc","ccc:-fast -readonly_strings -DL_ENDIAN::-D_REENTRANT:::SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_PTR DES_RISC1 DES_UNROLL:${alpha_asm}", "linux-alpha+bwx-ccc","ccc:-fast -readonly_strings -DL_ENDIAN::-D_REENTRANT:::SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_INT DES_PTR DES_RISC1 DES_UNROLL:${alpha_asm}", diff --git a/package/libs/openssl/patches/150-no_engines.patch b/package/libs/openssl/patches/150-no_engines.patch index 274ecbe0a5..586d1f2935 100644 --- a/package/libs/openssl/patches/150-no_engines.patch +++ b/package/libs/openssl/patches/150-no_engines.patch @@ -1,6 +1,6 @@ --- a/Configure +++ b/Configure -@@ -2114,6 +2114,11 @@ EOF +@@ -2128,6 +2128,11 @@ EOF close(OUT); } diff --git a/package/libs/openssl/patches/160-disable_doc_tests.patch b/package/libs/openssl/patches/160-disable_doc_tests.patch index 0fd1fa19dd..73459ff905 100644 --- a/package/libs/openssl/patches/160-disable_doc_tests.patch +++ b/package/libs/openssl/patches/160-disable_doc_tests.patch @@ -27,7 +27,7 @@ WDIRS= windows LIBS= libcrypto.a libssl.a SHARED_CRYPTO=libcrypto$(SHLIB_EXT) -@@ -275,7 +275,7 @@ reflect: +@@ -276,7 +276,7 @@ reflect: sub_all: build_all @@ -36,7 +36,7 @@ build_libs: build_libcrypto build_libssl openssl.pc -@@ -533,7 +533,7 @@ dist: +@@ -534,7 +534,7 @@ dist: @$(MAKE) SDIRS='$(SDIRS)' clean @$(MAKE) TAR='$(TAR)' TARFLAGS='$(TARFLAGS)' $(DISTTARVARS) tar @@ -47,7 +47,7 @@ @$(PERL) $(TOP)/util/mkdir-p.pl $(INSTALL_PREFIX)$(INSTALLTOP)/bin \ --- a/Makefile.org +++ b/Makefile.org -@@ -531,7 +531,7 @@ dist: +@@ -532,7 +532,7 @@ dist: @$(MAKE) SDIRS='$(SDIRS)' clean @$(MAKE) TAR='$(TAR)' TARFLAGS='$(TARFLAGS)' $(DISTTARVARS) tar diff --git a/package/libs/openssl/patches/190-remove_timestamp_check.patch b/package/libs/openssl/patches/190-remove_timestamp_check.patch index 4620bf90a6..424e66063c 100644 --- a/package/libs/openssl/patches/190-remove_timestamp_check.patch +++ b/package/libs/openssl/patches/190-remove_timestamp_check.patch @@ -9,7 +9,7 @@ # as we stick to -e, CLEARENV ensures that local variables in lower # Makefiles remain local and variable. $${VAR+VAR} is tribute to Korn -@@ -403,11 +403,6 @@ openssl.pc: Makefile +@@ -404,11 +404,6 @@ openssl.pc: Makefile echo 'Version: '$(VERSION); \ echo 'Requires: libssl libcrypto' ) > openssl.pc diff --git a/package/libs/openssl/patches/200-parallel_build.patch b/package/libs/openssl/patches/200-parallel_build.patch index 276800378d..f1d9f07051 100644 --- a/package/libs/openssl/patches/200-parallel_build.patch +++ b/package/libs/openssl/patches/200-parallel_build.patch @@ -1,6 +1,6 @@ --- a/Makefile.org +++ b/Makefile.org -@@ -281,17 +281,17 @@ build_libcrypto: build_crypto build_engi +@@ -282,17 +282,17 @@ build_libcrypto: build_crypto build_engi build_libssl: build_ssl libssl.pc build_crypto: @@ -24,7 +24,7 @@ all_testapps: build_libs build_testapps build_testapps: -@@ -464,7 +464,7 @@ update: errors stacks util/libeay.num ut +@@ -465,7 +465,7 @@ update: errors stacks util/libeay.num ut @set -e; target=update; $(RECURSIVE_BUILD_CMD) depend: @@ -33,7 +33,7 @@ lint: @set -e; target=lint; $(RECURSIVE_BUILD_CMD) -@@ -526,9 +526,9 @@ dist: +@@ -527,9 +527,9 @@ dist: @$(MAKE) SDIRS='$(SDIRS)' clean @$(MAKE) TAR='$(TAR)' TARFLAGS='$(TARFLAGS)' $(DISTTARVARS) tar @@ -45,7 +45,7 @@ @$(PERL) $(TOP)/util/mkdir-p.pl $(INSTALL_PREFIX)$(INSTALLTOP)/bin \ $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR) \ $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines \ -@@ -537,12 +537,19 @@ install_sw: +@@ -538,12 +538,19 @@ install_sw: $(INSTALL_PREFIX)$(OPENSSLDIR)/misc \ $(INSTALL_PREFIX)$(OPENSSLDIR)/certs \ $(INSTALL_PREFIX)$(OPENSSLDIR)/private @@ -66,7 +66,7 @@ @set -e; liblist="$(LIBS)"; for i in $$liblist ;\ do \ if [ -f "$$i" ]; then \ -@@ -626,12 +633,7 @@ install_html_docs: +@@ -627,12 +634,7 @@ install_html_docs: done; \ done diff --git a/package/libs/polarssl/Makefile b/package/libs/polarssl/Makefile deleted file mode 100644 index 04a7107a95..0000000000 --- a/package/libs/polarssl/Makefile +++ /dev/null @@ -1,74 +0,0 @@ -# -# Copyright (C) 2011-2015 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=polarssl -SRC_PKG_NAME:=mbedtls -PKG_VERSION:=1.3.18 -PKG_RELEASE:=1 -PKG_USE_MIPS16:=0 - -PKG_SOURCE:=$(SRC_PKG_NAME)-$(PKG_VERSION)-gpl.tgz -PKG_SOURCE_URL:=https://tls.mbed.org/download/ -PKG_HASH:=a229217182e024847deba3cb70bdd17e5ff4ffd9ff306cbbccfdbdff41950ea1 - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(SRC_PKG_NAME)-$(PKG_VERSION) - -PKG_BUILD_PARALLEL:=1 -PKG_LICENSE:=GPL-2.0+ - -include $(INCLUDE_DIR)/package.mk -include $(INCLUDE_DIR)/cmake.mk - -define Package/polarssl/Default - SUBMENU:=SSL - TITLE:=Embedded SSL - URL:=http://polarssl.org/ -endef - -define Package/polarssl/Default/description -The aim of the PolarSSL project is to provide a quality, open-source -cryptographic library written in C and targeted at embedded systems. -endef - -define Package/libpolarssl -$(call Package/polarssl/Default) - SECTION:=libs - CATEGORY:=Libraries - TITLE+= (library) - ABI_VERSION:=$(PKG_VERSION)-$(PKG_RELEASE) -endef - -define Package/libpolarssl/description -$(call Package/polarssl/Default/description) -This package contains the PolarSSL library. -endef - -PKG_INSTALL:=1 - -CMAKE_OPTIONS += \ - -DCMAKE_BUILD_TYPE:String="Release" \ - -DUSE_SHARED_MBEDTLS_LIBRARY:Bool=ON \ - -DENABLE_TESTING:Bool=OFF \ - -DENABLE_PROGRAMS:Bool=OFF \ - -define Build/InstallDev - $(INSTALL_DIR) $(1)/usr/include - $(CP) $(PKG_INSTALL_DIR)/usr/include/polarssl $(1)/usr/include/ - $(INSTALL_DIR) $(1)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libmbedtls.so.* $(1)/usr/lib/ - $(LN) libmbedtls.so.$(PKG_VERSION) $(1)/usr/lib/libpolarssl.so -endef - -define Package/libpolarssl/install - $(INSTALL_DIR) $(1)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libmbedtls.so.* $(1)/usr/lib/ - $(LN) libmbedtls.so.$(PKG_VERSION) $(1)/usr/lib/libpolarssl.so -endef - -$(eval $(call BuildPackage,libpolarssl)) diff --git a/package/libs/polarssl/patches/200-reduce_config.patch b/package/libs/polarssl/patches/200-reduce_config.patch deleted file mode 100644 index 491ecec388..0000000000 --- a/package/libs/polarssl/patches/200-reduce_config.patch +++ /dev/null @@ -1,242 +0,0 @@ ---- a/include/polarssl/config.h -+++ b/include/polarssl/config.h -@@ -432,8 +432,8 @@ - * Requires: POLARSSL_HMAC_DRBG_C - * - * Comment this macro to disable deterministic ECDSA. -- */ - #define POLARSSL_ECDSA_DETERMINISTIC -+ */ - - /** - * \def POLARSSL_KEY_EXCHANGE_PSK_ENABLED -@@ -454,8 +454,8 @@ - * TLS_PSK_WITH_CAMELLIA_128_CBC_SHA256 - * TLS_PSK_WITH_3DES_EDE_CBC_SHA - * TLS_PSK_WITH_RC4_128_SHA -- */ - #define POLARSSL_KEY_EXCHANGE_PSK_ENABLED -+ */ - - /** - * \def POLARSSL_KEY_EXCHANGE_DHE_PSK_ENABLED -@@ -478,8 +478,8 @@ - * TLS_DHE_PSK_WITH_CAMELLIA_128_CBC_SHA256 - * TLS_DHE_PSK_WITH_3DES_EDE_CBC_SHA - * TLS_DHE_PSK_WITH_RC4_128_SHA -- */ - #define POLARSSL_KEY_EXCHANGE_DHE_PSK_ENABLED -+ */ - - /** - * \def POLARSSL_KEY_EXCHANGE_ECDHE_PSK_ENABLED -@@ -498,8 +498,8 @@ - * TLS_ECDHE_PSK_WITH_CAMELLIA_128_CBC_SHA256 - * TLS_ECDHE_PSK_WITH_3DES_EDE_CBC_SHA - * TLS_ECDHE_PSK_WITH_RC4_128_SHA -- */ - #define POLARSSL_KEY_EXCHANGE_ECDHE_PSK_ENABLED -+ */ - - /** - * \def POLARSSL_KEY_EXCHANGE_RSA_PSK_ENABLED -@@ -523,8 +523,8 @@ - * TLS_RSA_PSK_WITH_CAMELLIA_128_CBC_SHA256 - * TLS_RSA_PSK_WITH_3DES_EDE_CBC_SHA - * TLS_RSA_PSK_WITH_RC4_128_SHA -- */ - #define POLARSSL_KEY_EXCHANGE_RSA_PSK_ENABLED -+ */ - - /** - * \def POLARSSL_KEY_EXCHANGE_RSA_ENABLED -@@ -602,8 +602,8 @@ - * TLS_ECDHE_RSA_WITH_CAMELLIA_128_CBC_SHA256 - * TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA - * TLS_ECDHE_RSA_WITH_RC4_128_SHA -- */ - #define POLARSSL_KEY_EXCHANGE_ECDHE_RSA_ENABLED -+ */ - - /** - * \def POLARSSL_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED -@@ -626,8 +626,8 @@ - * TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_CBC_SHA256 - * TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA - * TLS_ECDHE_ECDSA_WITH_RC4_128_SHA -- */ - #define POLARSSL_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED -+ */ - - /** - * \def POLARSSL_KEY_EXCHANGE_ECDH_ECDSA_ENABLED -@@ -650,8 +650,8 @@ - * TLS_ECDH_ECDSA_WITH_CAMELLIA_256_CBC_SHA384 - * TLS_ECDH_ECDSA_WITH_CAMELLIA_128_GCM_SHA256 - * TLS_ECDH_ECDSA_WITH_CAMELLIA_256_GCM_SHA384 -- */ - #define POLARSSL_KEY_EXCHANGE_ECDH_ECDSA_ENABLED -+ */ - - /** - * \def POLARSSL_KEY_EXCHANGE_ECDH_RSA_ENABLED -@@ -674,8 +674,8 @@ - * TLS_ECDH_RSA_WITH_CAMELLIA_256_CBC_SHA384 - * TLS_ECDH_RSA_WITH_CAMELLIA_128_GCM_SHA256 - * TLS_ECDH_RSA_WITH_CAMELLIA_256_GCM_SHA384 -- */ - #define POLARSSL_KEY_EXCHANGE_ECDH_RSA_ENABLED -+ */ - - /** - * \def POLARSSL_PK_PARSE_EC_EXTENDED -@@ -835,8 +835,8 @@ - * \def POLARSSL_SELF_TEST - * - * Enable the checkup functions (*_self_test). -- */ - #define POLARSSL_SELF_TEST -+ */ - - /** - * \def POLARSSL_SSL_ALL_ALERT_MESSAGES -@@ -1139,8 +1139,8 @@ - * Requires: POLARSSL_VERSION_C - * - * Comment this to disable run-time checking and save ROM space -- */ - #define POLARSSL_VERSION_FEATURES -+ */ - - /** - * \def POLARSSL_X509_ALLOW_EXTENSIONS_NON_V3 -@@ -1469,8 +1469,8 @@ - * TLS_PSK_WITH_CAMELLIA_256_CBC_SHA384 - * TLS_PSK_WITH_CAMELLIA_128_GCM_SHA256 - * TLS_PSK_WITH_CAMELLIA_128_CBC_SHA256 -- */ - #define POLARSSL_CAMELLIA_C -+ */ - - /** - * \def POLARSSL_CCM_C -@@ -1497,8 +1497,8 @@ - * Requires: POLARSSL_PEM_PARSE_C - * - * This module is used for testing (ssl_client/server). -- */ - #define POLARSSL_CERTS_C -+ */ - - /** - * \def POLARSSL_CIPHER_C -@@ -1537,8 +1537,8 @@ - * library/ssl_tls.c - * - * This module provides debugging functions. -- */ - #define POLARSSL_DEBUG_C -+ */ - - /** - * \def POLARSSL_DES_C -@@ -1593,8 +1593,8 @@ - * ECDHE-ECDSA, ECDHE-RSA, DHE-PSK - * - * Requires: POLARSSL_ECP_C -- */ - #define POLARSSL_ECDH_C -+ */ - - /** - * \def POLARSSL_ECDSA_C -@@ -1608,8 +1608,8 @@ - * ECDHE-ECDSA - * - * Requires: POLARSSL_ECP_C, POLARSSL_ASN1_WRITE_C, POLARSSL_ASN1_PARSE_C -- */ - #define POLARSSL_ECDSA_C -+ */ - - /** - * \def POLARSSL_ECP_C -@@ -1621,8 +1621,8 @@ - * library/ecdsa.c - * - * Requires: POLARSSL_BIGNUM_C and at least one POLARSSL_ECP_DP_XXX_ENABLED -- */ - #define POLARSSL_ECP_C -+ */ - - /** - * \def POLARSSL_ENTROPY_C -@@ -1698,8 +1698,8 @@ - * Requires: POLARSSL_MD_C - * - * Uncomment to enable the HMAC_DRBG random number geerator. -- */ - #define POLARSSL_HMAC_DRBG_C -+ */ - - /** - * \def POLARSSL_MD_C -@@ -1825,8 +1825,8 @@ - * Requires: POLARSSL_HAVE_ASM - * - * This modules adds support for the VIA PadLock on x86. -- */ - #define POLARSSL_PADLOCK_C -+ */ - - /** - * \def POLARSSL_PBKDF2_C -@@ -1991,8 +1991,8 @@ - * Module: library/ripemd160.c - * Caller: library/md.c - * -- */ - #define POLARSSL_RIPEMD160_C -+ */ - - /** - * \def POLARSSL_RSA_C -@@ -2071,8 +2071,8 @@ - * Caller: - * - * Requires: POLARSSL_SSL_CACHE_C -- */ - #define POLARSSL_SSL_CACHE_C -+ */ - - /** - * \def POLARSSL_SSL_CLI_C -@@ -2148,8 +2148,8 @@ - * Caller: library/havege.c - * - * This module is used by the HAVEGE random number generator. -- */ - #define POLARSSL_TIMING_C -+ */ - - /** - * \def POLARSSL_VERSION_C -@@ -2159,8 +2159,8 @@ - * Module: library/version.c - * - * This module provides run-time version information. -- */ - #define POLARSSL_VERSION_C -+ */ - - /** - * \def POLARSSL_X509_USE_C -@@ -2269,8 +2269,8 @@ - * - * Module: library/xtea.c - * Caller: -- */ - #define POLARSSL_XTEA_C -+ */ - - /* \} name SECTION: mbed TLS modules */ - diff --git a/package/libs/uclibc++/patches/050-Bugfix-erase-on-derived-__base_associative.patch b/package/libs/uclibc++/patches/050-Bugfix-erase-on-derived-__base_associative.patch new file mode 100644 index 0000000000..2ddb8a984e --- /dev/null +++ b/package/libs/uclibc++/patches/050-Bugfix-erase-on-derived-__base_associative.patch @@ -0,0 +1,40 @@ +From 946b29e62927eadfc4e87f27b8d30e5974b78c4c Mon Sep 17 00:00:00 2001 +From: Ben Kelly +Date: Mon, 6 Feb 2017 13:08:25 +0200 +Subject: [PATCH] Bugfix erase() on derived __base_associative + +When calling erase() on a containers derived from __base_associative +(e.g. multimap) and providing a pair of iterators a segfault will +occur. + +Example code to reproduce: + + typedef std::multimap testmap; + testmap t; + t.insert(std::pair(1, 1)); + t.insert(std::pair(2, 1)); + t.insert(std::pair(3, 1)); + t.erase(t.begin(), t.end()); + +Signed-off-by: Ben Kelly +--- + include/associative_base | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +diff --git a/include/associative_base b/include/associative_base +index 27ae0ef..be8b27f 100644 +--- a/include/associative_base ++++ b/include/associative_base +@@ -200,8 +200,7 @@ public: + } + void erase(iterator first, iterator last){ + while(first != last){ +- backing.erase(first.base_iterator()); +- ++first; ++ first = backing.erase(first.base_iterator()); + } + } + +-- +2.7.4 + diff --git a/package/libs/zlib/Makefile b/package/libs/zlib/Makefile index d6155b6d4e..902381bdea 100644 --- a/package/libs/zlib/Makefile +++ b/package/libs/zlib/Makefile @@ -8,12 +8,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=zlib -PKG_VERSION:=1.2.10 +PKG_VERSION:=1.2.11 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz -PKG_SOURCE_URL:=http://www.zlib.net @SF/libpng -PKG_HASH:=9612bf086047078ce3a1c154fc9052113fc1a2a97234a059da17a6299bd4dd32 +PKG_SOURCE_URL:=@SF/libpng http://www.zlib.net +PKG_HASH:=4ff941449631ace0d4d203e3483be9dbc9da454084111f97ea0a2114e19bf066 PKG_LICENSE:=Zlib PKG_LICENSE_FILES:=README diff --git a/package/luci/.buildpath b/package/luci/.buildpath deleted file mode 100644 index 81fa6469ec..0000000000 --- a/package/luci/.buildpath +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/package/luci/.cproject b/package/luci/.cproject deleted file mode 100644 index e1a4774106..0000000000 --- a/package/luci/.cproject +++ /dev/null @@ -1,221 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/package/luci/.gitignore b/package/luci/.gitignore deleted file mode 100644 index 07494e98ef..0000000000 --- a/package/luci/.gitignore +++ /dev/null @@ -1,8 +0,0 @@ -dist/ -/host -*.o -*.so -*.swp -*.po~ -/docs -modules/luci-base/src/po2lmo diff --git a/package/luci/.project b/package/luci/.project deleted file mode 100644 index 11b398b269..0000000000 --- a/package/luci/.project +++ /dev/null @@ -1,78 +0,0 @@ - - - luci - - - - - - org.eclipse.cdt.managedbuilder.core.genmakebuilder - clean,full,incremental, - - - ?name? - - - - org.eclipse.cdt.make.core.append_environment - true - - - org.eclipse.cdt.make.core.autoBuildTarget - all - - - org.eclipse.cdt.make.core.buildArguments - - - - org.eclipse.cdt.make.core.buildCommand - make - - - org.eclipse.cdt.make.core.cleanBuildTarget - clean - - - org.eclipse.cdt.make.core.contents - org.eclipse.cdt.make.core.activeConfigSettings - - - org.eclipse.cdt.make.core.enableAutoBuild - false - - - org.eclipse.cdt.make.core.enableCleanBuild - true - - - org.eclipse.cdt.make.core.enableFullBuild - true - - - org.eclipse.cdt.make.core.fullBuildTarget - all - - - org.eclipse.cdt.make.core.stopOnError - true - - - org.eclipse.cdt.make.core.useDefaultBuildCmd - true - - - - - org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder - - - - - - org.eclipse.cdt.managedbuilder.core.ScannerConfigNature - org.eclipse.cdt.managedbuilder.core.managedBuildNature - org.eclipse.cdt.core.cnature - org.eclipse.dltk.lua.core.nature - - diff --git a/package/luci/applications/luci-app-adblock/luasrc/model/cbi/adblock.lua b/package/luci/applications/luci-app-adblock/luasrc/model/cbi/adblock.lua index d80cb486e3..0a4a4cdd2f 100644 --- a/package/luci/applications/luci-app-adblock/luasrc/model/cbi/adblock.lua +++ b/package/luci/applications/luci-app-adblock/luasrc/model/cbi/adblock.lua @@ -34,13 +34,13 @@ des = bl:option(DummyValue, "adb_src_desc", translate("Description")) -- Additional options -s2 = m:section(NamedSection, "backup", "service", translate("Backup options")) +s2 = m:section(NamedSection, "global", "adblock", translate("Backup options")) -o4 = s2:option(Flag, "enabled", translate("Enable blocklist backup")) +o4 = s2:option(Flag, "adb_backup", translate("Enable blocklist backup")) o4.rmempty = false o4.default = 0 -o5 = s2:option(Value, "adb_dir", translate("Backup directory")) +o5 = s2:option(Value, "adb_backupdir", translate("Backup directory")) o5.rmempty = false o5.datatype = "directory" diff --git a/package/luci/applications/luci-app-adblock/po/pt-br/adblock.po b/package/luci/applications/luci-app-adblock/po/pt-br/adblock.po new file mode 100644 index 0000000000..a238dc7f94 --- /dev/null +++ b/package/luci/applications/luci-app-adblock/po/pt-br/adblock.po @@ -0,0 +1,92 @@ +msgid "" +msgstr "" +"Content-Type: text/plain; charset=UTF-8\n" +"Project-Id-Version: \n" +"POT-Creation-Date: \n" +"PO-Revision-Date: \n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Poedit 1.8.11\n" +"Last-Translator: Luiz Angelo Daros de Luca \n" +"Plural-Forms: nplurals=2; plural=(n > 1);\n" +"Language: pt_BR\n" + +msgid "" +"). Note that list URLs and Shallalist category selections are not " +"configurable via Luci." +msgstr "" +"). Note que a lista de URL e as seleções de categoria da Shallalist não são " +"configuráveis pelo Luci." + +msgid "Adblock" +msgstr "Adblock" + +msgid "Available blocklist sources (" +msgstr "Fontes de listas de bloqueio disponíveis (" + +msgid "Backup directory" +msgstr "Diretório da cópia de segurança" + +msgid "Backup options" +msgstr "Opções da cópia de segurança" + +msgid "Blocklist sources" +msgstr "Fontes de listas de bloqueio" + +msgid "" +"Configuration of the adblock package to block ad/abuse domains by using DNS." +msgstr "" +"Configuração do pacote adblock para bloquear, usando o DNS, domínios que " +"distribuem propagandas abusivas." + +msgid "Description" +msgstr "Descrição" + +msgid "Enable adblock" +msgstr "Habilitar adblock" + +msgid "Enable blocklist backup" +msgstr "Habilitar cópia de segurança da lista de bloqueio" + +msgid "Enable verbose debug logging" +msgstr "Habilite registros detalhados para depuração" + +msgid "Enabled" +msgstr "Habilitado" + +msgid "Extra options" +msgstr "Opções adicionais" + +msgid "" +"File with whitelisted hosts/domains that are allowed despite being on a " +"blocklist." +msgstr "" +"Arquivo com a lista branca dos equipamentos/domínios que serão autorizados " +"mesmo estando na lista de bloqueio." + +msgid "Global options" +msgstr "Opções Globais" + +msgid "" +"Options for further tweaking in case the defaults are not suitable for you." +msgstr "" +"Opções para aprimoramentos adicionais caso as opções padrão não sejam " +"suficientes para você." + +msgid "Restrict reload trigger to certain interface(s)" +msgstr "Restringir o gatilho de recarga para somente alguma(s) interface(s)" + +msgid "" +"Space separated list of wan interfaces that trigger reload action. To " +"disable reload trigger set it to 'false'. Default: empty" +msgstr "" +"Lista das interfaces WAN, separadas por espaço, que podem disparar uma ação " +"de recarga. Para desabilitar este gatilho, defina-o como 'false'. Padrão: em " +"branco" + +msgid "Whitelist file" +msgstr "Arquivo da lista branca" + +msgid "see list details" +msgstr "veja os detalhes da lista" diff --git a/package/luci/applications/luci-app-ahcp/po/pt-br/ahcp.po b/package/luci/applications/luci-app-ahcp/po/pt-br/ahcp.po index 55ec29cdc7..741c14572b 100644 --- a/package/luci/applications/luci-app-ahcp/po/pt-br/ahcp.po +++ b/package/luci/applications/luci-app-ahcp/po/pt-br/ahcp.po @@ -1,20 +1,20 @@ msgid "" msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" -"PO-Revision-Date: 2014-03-29 23:07+0200\n" -"Last-Translator: Luiz Angelo \n" +"Project-Id-Version: \n" +"PO-Revision-Date: 2017-02-17 17:07-0200\n" +"Last-Translator: Luiz Angelo Daros de Luca \n" "Language-Team: none\n" "Language: pt_BR\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n" -"X-Generator: Pootle 2.0.6\n" +"X-Generator: Poedit 1.8.11\n" +"POT-Creation-Date: \n" msgid "AHCP Server" msgstr "Servidor AHCP" -#, fuzzy msgid "" "AHCP is an autoconfiguration protocol for IPv6 and dual-stack IPv6/IPv4 " "networks designed to be used in place of router discovery or DHCP on " diff --git a/package/luci/applications/luci-app-aria2/po/pt-br/aria2.po b/package/luci/applications/luci-app-aria2/po/pt-br/aria2.po new file mode 100644 index 0000000000..1bb4137446 --- /dev/null +++ b/package/luci/applications/luci-app-aria2/po/pt-br/aria2.po @@ -0,0 +1,236 @@ +msgid "" +msgstr "" +"Content-Type: text/plain; charset=UTF-8\n" +"Project-Id-Version: \n" +"POT-Creation-Date: \n" +"PO-Revision-Date: \n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Poedit 1.8.11\n" +"Last-Translator: Luiz Angelo Daros de Luca \n" +"Plural-Forms: nplurals=2; plural=(n > 1);\n" +"Language: pt_BR\n" + +msgid "\"Falloc\" is not available in all cases." +msgstr "\"Falloc\" não está disponível em todas as classes." + +msgid "DHT enabled" +msgstr "" +"DHT habilitado" + +msgid "LPD enabled" +msgstr "" +"LPD habilitado" + +msgid "Additional Bt tracker enabled" +msgstr "Rastreadores BitTorrent adicionais habilitado" + +msgid "Aria2" +msgstr "Aria2" + +msgid "Aria2 Settings" +msgstr "Configurações do Aria2" + +msgid "Aria2 Status" +msgstr "Estado do Aria2" + +msgid "" +"Aria2 is a multi-protocol & multi-source download utility, here you can " +"configure the settings." +msgstr "" +"Aria2 é um utilitário de transferência multi-protocolo de múltiplas fontes, " +"aqui você pode configurá-lo." + +msgid "Autosave session interval" +msgstr "Intervalo para autossalvamento da sessão" + +msgid "BitTorrent Settings" +msgstr "Configurações do BitTorrent" + +msgid "BitTorrent listen port" +msgstr "Porta de escuta do BitTorrent" + +msgid "Collecting data..." +msgstr "Coletando dados..." + +msgid "Config file directory" +msgstr "Diretório dos arquivos de configuração" + +msgid "Debug" +msgstr "Depuração" + +msgid "Default download directory" +msgstr "Diretório padrão de arquivos baixados" + +msgid "Disk cache" +msgstr "Cache em Disco" + +msgid "Enable log" +msgstr "Habilitar registros" + +msgid "Enabled" +msgstr "Habilitado" + +msgid "Error" +msgstr "Erro" + +msgid "Extra Settings" +msgstr "Configurações Adicionais" + +msgid "Falloc" +msgstr "Falloc" + +msgid "Files and Locations" +msgstr "Arquivos e Locais" + +msgid "Follow torrent" +msgstr "Seguir torrent" + +msgid "General Settings" +msgstr "Configurações Gerais" + +msgid "Generate Randomly" +msgstr "Gerar aleatoriamente" + +msgid "Info" +msgstr "Informações" + +msgid "List of additional Bt tracker" +msgstr "Lista de rastreadores BitTorrent adicionais" + +msgid "List of extra settings" +msgstr "Lista de configurações adicionais" + +msgid "Log file is in the config file dir." +msgstr "" +"Arquivo de registro (log) está no diretório do arquivo de configuração." + +msgid "Log level" +msgstr "Nível do registro" + +msgid "Max concurrent downloads" +msgstr "Número máximo de transferencias simultâneas" + +msgid "Max connection per server" +msgstr "Numero máximo de conexões por servidor" + +msgid "Max number of peers per torrent" +msgstr "Numero máximo de parceiros por torrent" + +msgid "Max number of split" +msgstr "Numero máximo de divisões" + +msgid "Min split size" +msgstr "Tamanho mínimo da divisão" + +msgid "No Authentication" +msgstr "Sem Autenticação" + +msgid "Notice" +msgstr "Aviso" + +msgid "Off" +msgstr "Desligado" + +msgid "Open WebUI-Aria2" +msgstr "Abrir WebUI-Aria2" + +msgid "Open YAAW" +msgstr "Abrir YAAW" + +msgid "Overall download limit" +msgstr "Limite global para baixar" + +msgid "Overall speed limit enabled" +msgstr "Limite da taxa de transferência global habilitado" + +msgid "Overall upload limit" +msgstr "Limite global para subir" + +msgid "Per task download limit" +msgstr "Limite por tarefa para baixar" + +msgid "Per task speed limit enabled" +msgstr "Limite da taxa de transferência por tarefa habilitado" + +msgid "Per task upload limit" +msgstr "Limite por tarefa para subir" + +msgid "Prealloc" +msgstr "Pré-alocação" + +msgid "Preallocation" +msgstr "Pré-alocação" + +msgid "Prefix of peer ID" +msgstr "Prefixo da identificação do paceiro" + +msgid "RPC Token" +msgstr "" +"Chave eletrônica do RPC" + +msgid "RPC authentication method" +msgstr "" +"Método de autenticação do RPC" + +msgid "RPC password" +msgstr "" +"Senha do RPC" + +msgid "RPC port" +msgstr "" +"Porta do RPC" + +msgid "RPC username" +msgstr "" +"Nome do usuario do RPC" + +msgid "Run daemon as user" +msgstr "Executar serviço como usuário" + +msgid "Sec" +msgstr "Segurança" + +msgid "Task Settings" +msgstr "Configurações das tarefas" + +msgid "The Aria2 service is not running." +msgstr "O serviço Aria2 está parado." + +msgid "The Aria2 service is running." +msgstr "O serviço Aria2 está em execução." + +msgid "Token" +msgstr "Chave eletrônica" + +msgid "Trunc" +msgstr "Truncar" + +msgid "Use WebSocket" +msgstr "Use WebSockets" + +msgid "User agent value" +msgstr "Valor da identificação do agente do usuário" + +msgid "Username & Password" +msgstr "Usuário & Senha" + +msgid "View Json-RPC URL" +msgstr "Visualizar URL do JSON-RPC" + +msgid "Warn" +msgstr "Atenção" + +msgid "in bytes, You can append K or M." +msgstr "em bytes. Você pode sufixar com K (quilo) ou M (mega)." + +msgid "in bytes/sec, You can append K or M." +msgstr "em bytes por segundo. Você pode sufixar com K (quilo) ou M (mega)." diff --git a/package/luci/applications/luci-app-commands/po/pt-br/commands.po b/package/luci/applications/luci-app-commands/po/pt-br/commands.po index 83c7bd5db5..a0c7724d6e 100644 --- a/package/luci/applications/luci-app-commands/po/pt-br/commands.po +++ b/package/luci/applications/luci-app-commands/po/pt-br/commands.po @@ -1,15 +1,16 @@ msgid "" msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" -"PO-Revision-Date: 2014-03-15 22:02+0200\n" -"Last-Translator: Luiz Angelo \n" +"Project-Id-Version: \n" +"PO-Revision-Date: 2017-02-20 17:39-0300\n" +"Last-Translator: Luiz Angelo Daros de Luca \n" "Language-Team: none\n" "Language: pt_BR\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n" -"X-Generator: Pootle 2.0.6\n" +"X-Generator: Poedit 1.8.11\n" +"POT-Creation-Date: \n" msgid "A short textual description of the configured command" msgstr "Uma pequena descrição textual do comando configurado" @@ -96,3 +97,21 @@ msgstr "" msgid "Waiting for command to complete..." msgstr "Aguardando a conclusão do comando..." + +#~ msgid "Command executed successfully." +#~ msgstr "O comando executou com sucesso." + +#~ msgid "Command exited with status code" +#~ msgstr "O comando encerrou com um estado de erro" + +#~ msgid "Download execution result" +#~ msgstr "Baixar os resultados da execução" + +#~ msgid "Or display result" +#~ msgstr "Ou mostre o resultado" + +#~ msgid "Standard Error" +#~ msgstr "Saída de Erro" + +#~ msgid "Standard Output" +#~ msgstr "Saída Padrão" diff --git a/package/luci/applications/luci-app-ddns/po/pt-br/ddns.po b/package/luci/applications/luci-app-ddns/po/pt-br/ddns.po index 4970846516..ab22837b28 100644 --- a/package/luci/applications/luci-app-ddns/po/pt-br/ddns.po +++ b/package/luci/applications/luci-app-ddns/po/pt-br/ddns.po @@ -2,15 +2,15 @@ msgid "" msgstr "" "Project-Id-Version: luci-app-ddns 2.4.0-1\n" "POT-Creation-Date: 2016-01-30 11:07+0100\n" -"PO-Revision-Date: 2016-07-01 22:40-0300\n" -"Last-Translator: Matheus Dal Mago \n" +"PO-Revision-Date: 2017-02-20 17:41-0300\n" +"Last-Translator: Luiz Angelo Daros de Luca \n" "Language-Team: \n" "Language: pt_BR\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n" -"X-Generator: Poedit 1.8.8\n" +"X-Generator: Poedit 1.8.11\n" msgid "&" msgstr "&" @@ -228,7 +228,7 @@ msgid "Error Retry Interval" msgstr "Intervalo de tentativas em Erro" msgid "Event Network" -msgstr "" +msgstr "Rede de Evento" msgid "File" msgstr "Arquivo" @@ -438,16 +438,16 @@ msgid "No certificates found" msgstr "Nenhum certificado encontrado" msgid "No data" -msgstr "" +msgstr "Sem dados" msgid "No logging" -msgstr "" +msgstr "Sem registros" msgid "Non-public and by default blocked IP's" msgstr "IPs não públicos e bloqueados por padrão" msgid "Notice" -msgstr "" +msgstr "Aviso" msgid "Number of last lines stored in log files" msgstr "Número das últimas linhas salvas nos arquivos de log" @@ -475,7 +475,7 @@ msgstr "" "Em Erro, o script irá para a execução após um número definido de tentativas" msgid "OpenWrt Wiki" -msgstr "" +msgstr "Wiki do OpenWRT" msgid "Optional Encoded Parameter" msgstr "Parâmetro Opcionalmente Codificado" @@ -490,7 +490,7 @@ msgid "Optional: Replaces [PARAMOPT] in Update-URL (NOT URL-encoded)" msgstr "Opcional: Substitui [PARAMOPT] na URL de atualização" msgid "Overview" -msgstr "" +msgstr "Visão Geral" msgid "PROXY-Server" msgstr "servidor PROXY" @@ -575,7 +575,7 @@ msgid "There is no service configured." msgstr "Não há serviço configurado" msgid "Timer Settings" -msgstr "" +msgstr "Configurações do Controlador de Tempo" msgid "To change global settings click here" msgstr "Clique aqui para mudar configurações globais" diff --git a/package/luci/applications/luci-app-dynapoint/Makefile b/package/luci/applications/luci-app-dynapoint/Makefile new file mode 100644 index 0000000000..d16ef4a8fa --- /dev/null +++ b/package/luci/applications/luci-app-dynapoint/Makefile @@ -0,0 +1,20 @@ +# +# Copyright (C) 2016 The LuCI Team +# +# This is free software, licensed under the GNU General Public License v3. +# + +include $(TOPDIR)/rules.mk + +LUCI_TITLE:=LuCI Support for DynaPoint +LUCI_DEPENDS:=+dynapoint + +PKG_NAME:=luci-app-dynapoint +PKG_VERSION:=1.0 +PKG_RELEASE:=1 +PKG_LICENSE:=GPL-3.0+ +PKG_MAINTAINER:=Tobias Ilte +include ../../luci.mk + +# call BuildPackage - OpenWrt buildroot signature + diff --git a/package/luci/applications/luci-app-dynapoint/luasrc/controller/dynapoint.lua b/package/luci/applications/luci-app-dynapoint/luasrc/controller/dynapoint.lua new file mode 100644 index 0000000000..65348632e9 --- /dev/null +++ b/package/luci/applications/luci-app-dynapoint/luasrc/controller/dynapoint.lua @@ -0,0 +1,9 @@ +module("luci.controller.dynapoint", package.seeall) + +function index() + if not nixio.fs.access("/etc/config/dynapoint") then + return + end + entry({"admin", "services", "dynapoint"}, cbi("dynapoint"), _("DynaPoint")) +end + diff --git a/package/luci/applications/luci-app-dynapoint/luasrc/model/cbi/dynapoint.lua b/package/luci/applications/luci-app-dynapoint/luasrc/model/cbi/dynapoint.lua new file mode 100644 index 0000000000..e6871a5bc4 --- /dev/null +++ b/package/luci/applications/luci-app-dynapoint/luasrc/model/cbi/dynapoint.lua @@ -0,0 +1,99 @@ +local uci = require "luci.model.uci".cursor() +local a = require "luci.model.ipkg" +local DISP = require "luci.dispatcher" + +local wlcursor = luci.model.uci.cursor_state() +local wireless = wlcursor:get_all("wireless") +local ifaces = {} + +for k, v in pairs(wireless) do + if v[".type"] == "wifi-iface" then + table.insert(ifaces, v) + end +end + +m = Map("dynapoint") +m:chain("wireless") + +s = m:section(NamedSection, "internet", "rule", translate("Configuration"), translate("Check Internet connectivity via HTTP header download")) + +hosts = s:option(DynamicList, "hosts", translate("List of host addresses"), translate("List of host addresses (url or IP) to track and request http headers from")) +hosts.datatype = "string" + +interval = s:option(Value, "interval", translate("Test-run interval"), translate("Time interval in seconds to re-start a new test run")) +interval.datatype = "uinteger" +interval.default = "30" + +offline_treshold = s:option(Value, "offline_threshold", translate("Switch_to_offline threshold"), translate("Failure counter after how many failed download attempts, the state is considered as offline")) +offline_treshold.datatype = "uinteger" +offline_treshold.default = "1" + +add_hostname_to_ssid = s:option(Flag, "add_hostname_to_ssid", translate("Append hostname to ssid"), translate("Append the router's hostname to the SSID when connectivity check fails")) +add_hostname_to_ssid.rmempty = false + + +if (a.installed("curl") == true) then + use_curl = s:option(Flag, "use_curl", translate("Use curl"), translate("Use curl instead of wget for testing the connectivity.")) + use_curl.rmempty = false + + curl_interface = s:option(Value, "curl_interface", translate("Used interface"), translate("Which interface should curl use. (Use ifconfig to find out)")) + curl_interface.datatype = "string" + curl_interface:depends("use_curl","1") + curl_interface.placeholder = "eth0" +else + use_curl = s:option(Flag, "use_curl", translate("Use curl instead of wget"), translate("Curl is currently not installed.") + .." Please install the package in the " + ..[[]] + .. "Software Section" .. [[]] + .. "." + ) + use_curl.rmempty = false + use_curl.template = "dynapoint/cbi_checkbox" +end + +m1 = Map("wireless", "DynaPoint", translate("Dynamic Access Point Manager")) + +aps = m1:section(TypedSection, "wifi-iface", translate("List of Wireless Virtual Interfaces (wVIF)")) +aps.addremove = false +aps.anonymous = true +aps.template = "cbi/tblsection" + +status = aps:option(DummyValue, "disabled", translate("WiFi Status")) +status.template = "dynapoint/cbi_color" + +function status.cfgvalue(self,section) + local val = m1:get(section, "disabled") + if val == "1" then return translate("Disabled") end + if (val == nil or val == "0") then return translate("Enabled") end + return val +end + +device = aps:option(DummyValue, "device", translate("Device")) +function device.cfgvalue(self,section) + local dev = m1:get(section, "device") + local val = m1:get(dev, "hwmode") + if val == "11a" then return dev .. " (5 GHz)" else + return dev .. " (2,4 GHz)" + end + return val +end + + + + + +mode = aps:option(DummyValue, "mode", translate("Mode")) + +ssid = aps:option(DummyValue, "ssid", translate("SSID")) + + +action = aps:option(ListValue, "dynapoint_rule", translate("Activate this wVIF if status is:")) +action.widget="select" +action:value("internet",translate("Online")) +action:value("!internet",translate("Offline")) +action:value("",translate("Not used by DynaPoint")) +action.default = "" + +return m1,m + diff --git a/package/luci/applications/luci-app-dynapoint/luasrc/view/dynapoint/cbi_checkbox.htm b/package/luci/applications/luci-app-dynapoint/luasrc/view/dynapoint/cbi_checkbox.htm new file mode 100644 index 0000000000..5f8bcd5ee0 --- /dev/null +++ b/package/luci/applications/luci-app-dynapoint/luasrc/view/dynapoint/cbi_checkbox.htm @@ -0,0 +1,6 @@ +<%+cbi/valueheader%> + + + + +<%+cbi/valuefooter%> diff --git a/package/luci/applications/luci-app-dynapoint/luasrc/view/dynapoint/cbi_color.htm b/package/luci/applications/luci-app-dynapoint/luasrc/view/dynapoint/cbi_color.htm new file mode 100644 index 0000000000..bfc710e236 --- /dev/null +++ b/package/luci/applications/luci-app-dynapoint/luasrc/view/dynapoint/cbi_color.htm @@ -0,0 +1,18 @@ +<%+cbi/valueheader%> + + +<% +if (self:cfgvalue(section) == translate("Disabled")) then +%> + +<%=self:cfgvalue(section)%> + +<% +else +%> +<%=self:cfgvalue(section)%> +<% +end +%> + +<%+cbi/valuefooter%> diff --git a/package/luci/applications/luci-app-dynapoint/po/de/dynapoint.po b/package/luci/applications/luci-app-dynapoint/po/de/dynapoint.po new file mode 100644 index 0000000000..e2507e493e --- /dev/null +++ b/package/luci/applications/luci-app-dynapoint/po/de/dynapoint.po @@ -0,0 +1,106 @@ +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"PO-Revision-Date: 2016-08-31 15:51+0200\n" +"Language-Team: German\n" +"Language: de\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +msgid "Activate this wVIF if status is:" +msgstr "Aktiviere diese drahtlose Schnittstelle wenn:" + +msgid "Append hostname to ssid" +msgstr "Anfügen des hostname zur SSID" + +msgid "Append the router's hostname to the SSID when connectivity check fails" +msgstr "" +"Fügt den hostname des routers zur SSID an, wenn die Verbindungsüberprüfung " +"fehl schlägt" + +msgid "Check Internet connectivity via HTTP header download" +msgstr "Testen der Internetverfügbarkeit via HTTP header download" + +msgid "Configuration" +msgstr "Konfiguration" + +msgid "Curl is currently not installed." +msgstr "Curl ist momentan nicht installiert." + +msgid "Device" +msgstr "Gerät" + +msgid "Disabled" +msgstr "Deaktiviert" + +msgid "DynaPoint" +msgstr "" + +msgid "Dynamic Access Point Manager" +msgstr "" + +msgid "Enabled" +msgstr "Aktiviert" + +msgid "" +"Failure counter after how many failed download attempts, the state is " +"considered as offline" +msgstr "" +"Anzahl der fehlgeschlagenen Downloadversuche, nach denen die Verbindung als offline angesehen wird" + +msgid "List of Wireless Virtual Interfaces (wVIF)" +msgstr "Liste der Drahtlosen virtuellen Schnittstellen" + +msgid "List of host addresses" +msgstr "Liste der Zieladressen" + +msgid "" +"List of host addresses (url or IP) to track and request http headers from" +msgstr "Liste der Zieladressen (URL oder IP) für den HTTP header download" + +msgid "Mode" +msgstr "Modus" + +msgid "Not used by DynaPoint" +msgstr "Nicht von DynaPoint benutzt" + +msgid "Offline" +msgstr "Offline" + +msgid "Online" +msgstr "Online" + +msgid "SSID" +msgstr "" + +msgid "Switch_to_offline threshold" +msgstr "Offline-Schwelle" + +msgid "Test-run interval" +msgstr "Testlaufintervall" + +msgid "Time interval in seconds to re-start a new test run" +msgstr "Zeitintervall in Sekunden für einen Testlauf" + +msgid "Use curl" +msgstr "Curl benutzen" + +msgid "Use curl instead of wget" +msgstr "Curl anstatt wget benutzen" + +msgid "Use curl instead of wget for testing the connectivity." +msgstr "Curl anstatt wget benutzen, um die Internetverbindung zu überprüfen." + +msgid "Used interface" +msgstr "Benutztes interface" + +msgid "Which interface should curl use. (Use ifconfig to find out)" +msgstr "" +"Welches Interface von curl benutzt werden soll. (ifconfig benutzen, um das " +"herauszufinden" + +msgid "WiFi Status" +msgstr "" + diff --git a/package/luci/applications/luci-app-dynapoint/po/ja/dynapoint.po b/package/luci/applications/luci-app-dynapoint/po/ja/dynapoint.po new file mode 100644 index 0000000000..75031985f7 --- /dev/null +++ b/package/luci/applications/luci-app-dynapoint/po/ja/dynapoint.po @@ -0,0 +1,108 @@ +msgid "" +msgstr "" +"Content-Type: text/plain; charset=UTF-8\n" +"Project-Id-Version: \n" +"POT-Creation-Date: \n" +"PO-Revision-Date: \n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Poedit 1.8.11\n" +"Last-Translator: INAGAKI Hiroshi \n" +"Plural-Forms: nplurals=1; plural=0;\n" +"Language: ja\n" + +msgid "Activate this wVIF if status is:" +msgstr "wVIFを有効化する接続ステータス:" + +msgid "Append hostname to ssid" +msgstr "ホスト名をSSIDに追加する" + +msgid "Append the router's hostname to the SSID when connectivity check fails" +msgstr "接続性のチェックが失敗した場合、ルーターのホスト名をSSIDに追加します。" + +msgid "Check Internet connectivity via HTTP header download" +msgstr "" +"HTTP ヘッダーのダウンロードを通して、インターネットの接続性をチェックします。" + +msgid "Configuration" +msgstr "設定" + +msgid "Curl is currently not installed." +msgstr "curl は現在インストールされていません。" + +msgid "Device" +msgstr "デバイス" + +msgid "Disabled" +msgstr "無効" + +msgid "DynaPoint" +msgstr "DynaPoint" + +msgid "Dynamic Access Point Manager" +msgstr "ダイナミック アクセスポイント マネージャー" + +msgid "Enabled" +msgstr "有効" + +msgid "" +"Failure counter after how many failed download attempts, the state is " +"considered as offline" +msgstr "状態をオフラインと見なすまでの、ダウンロード試行の失敗回数です。" + +msgid "List of Wireless Virtual Interfaces (wVIF)" +msgstr "無線仮想インターフェース (wVIF) のリスト" + +msgid "List of host addresses" +msgstr "ホストアドレスのリスト" + +msgid "" +"List of host addresses (url or IP) to track and request http headers from" +msgstr "" +"HTTP ヘッダーの追跡およびリクエストを行う、ホスト アドレス(URLまたはIP)のリ" +"ストです。" + +msgid "Mode" +msgstr "モード" + +msgid "Not used by DynaPoint" +msgstr "DynaPointで使用しない" + +msgid "Offline" +msgstr "オフライン" + +msgid "Online" +msgstr "オンライン" + +msgid "SSID" +msgstr "SSID" + +msgid "Switch_to_offline threshold" +msgstr "オフライン化閾値" + +msgid "Test-run interval" +msgstr "テスト実行間隔" + +msgid "Time interval in seconds to re-start a new test run" +msgstr "接続性テストを再実行するまでの時間間隔(秒)です。" + +msgid "Use curl" +msgstr "curl を使用する" + +msgid "Use curl instead of wget" +msgstr "wget の代わりに curl を使用する" + +msgid "Use curl instead of wget for testing the connectivity." +msgstr "接続性のテストの際、wget の代わりに curl を使用します。" + +msgid "Used interface" +msgstr "使用するインターフェース" + +msgid "Which interface should curl use. (Use ifconfig to find out)" +msgstr "" +"curl が使用するインターフェースです。ifconfigを使用してインターフェース名を確" +"認します。" + +msgid "WiFi Status" +msgstr "無線ステータス" diff --git a/package/luci/applications/luci-app-dynapoint/po/pt-br/dynapoint.po b/package/luci/applications/luci-app-dynapoint/po/pt-br/dynapoint.po new file mode 100644 index 0000000000..59b02629a9 --- /dev/null +++ b/package/luci/applications/luci-app-dynapoint/po/pt-br/dynapoint.po @@ -0,0 +1,107 @@ +msgid "" +msgstr "" +"Content-Type: text/plain; charset=UTF-8\n" +"Project-Id-Version: \n" +"POT-Creation-Date: \n" +"PO-Revision-Date: \n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Poedit 1.8.11\n" +"Last-Translator: Luiz Angelo Daros de Luca \n" +"Plural-Forms: nplurals=2; plural=(n > 1);\n" +"Language: pt_BR\n" + +msgid "Activate this wVIF if status is:" +msgstr "Aivar este wVIF se o estado for:" + +msgid "Append hostname to ssid" +msgstr "Sufixar o nome do equipamento ao SSID" + +msgid "Append the router's hostname to the SSID when connectivity check fails" +msgstr "" +"Sufixar o nome do roteador ao SSID quando a verificação da conectividade " +"falhar" + +msgid "Check Internet connectivity via HTTP header download" +msgstr "Cerifique a conectividade com a internet baixando o cabeçalho HTTP " + +msgid "Configuration" +msgstr "Configuração" + +msgid "Curl is currently not installed." +msgstr "O cURL não está instalado." + +msgid "Device" +msgstr "Dispositivo" + +msgid "Disabled" +msgstr "Desabilitado" + +msgid "DynaPoint" +msgstr "DynaPoint" + +msgid "Dynamic Access Point Manager" +msgstr "Gerenciamento do Ponto de Acesso Dinâmico" + +msgid "Enabled" +msgstr "Habilitado" + +msgid "" +"Failure counter after how many failed download attempts, the state is " +"considered as offline" +msgstr "Numero de falhar para considerar como inalcançável" + +msgid "List of Wireless Virtual Interfaces (wVIF)" +msgstr "Lista de Interfaces Virtuais Wireless (wVIF)" + +msgid "List of host addresses" +msgstr "Lista de endereços dos equipamentos" + +msgid "" +"List of host addresses (url or IP) to track and request http headers from" +msgstr "" +"Lista de endereços dos equipamentos (URL ou endereço IP) para requisitar " +"cabeçalhos HTTP" + +msgid "Mode" +msgstr "Modo" + +msgid "Not used by DynaPoint" +msgstr "Não usado pelo DynaPoint" + +msgid "Offline" +msgstr "Desconectado" + +msgid "Online" +msgstr "Conectado" + +msgid "SSID" +msgstr "SSID" + +msgid "Switch_to_offline threshold" +msgstr "Limiar para mudar para desconectado" + +msgid "Test-run interval" +msgstr "Intervalo para execução do teste" + +msgid "Time interval in seconds to re-start a new test run" +msgstr "Intervalo, em segundos, para reiniciar um nova execução do teste" + +msgid "Use curl" +msgstr "Usar cURL" + +msgid "Use curl instead of wget" +msgstr "Usar cURL ao invés do wget" + +msgid "Use curl instead of wget for testing the connectivity." +msgstr "Usar cURL ao invés do wget para testar a conectividade." + +msgid "Used interface" +msgstr "Dispositivos usadas" + +msgid "Which interface should curl use. (Use ifconfig to find out)" +msgstr "Qual dispositivo o cURL deve usar. (Use ifconfig para listá-las)" + +msgid "WiFi Status" +msgstr "Estado da WiFi" diff --git a/package/luci/applications/luci-app-dynapoint/po/templates/dynapoint.pot b/package/luci/applications/luci-app-dynapoint/po/templates/dynapoint.pot new file mode 100644 index 0000000000..f352425be3 --- /dev/null +++ b/package/luci/applications/luci-app-dynapoint/po/templates/dynapoint.pot @@ -0,0 +1,92 @@ +msgid "" +msgstr "Content-Type: text/plain; charset=UTF-8" + +msgid "Activate this wVIF if status is:" +msgstr "" + +msgid "Append hostname to ssid" +msgstr "" + +msgid "Append the router's hostname to the SSID when connectivity check fails" +msgstr "" + +msgid "Check Internet connectivity via HTTP header download" +msgstr "" + +msgid "Configuration" +msgstr "" + +msgid "Curl is currently not installed." +msgstr "" + +msgid "Device" +msgstr "" + +msgid "Disabled" +msgstr "" + +msgid "DynaPoint" +msgstr "" + +msgid "Dynamic Access Point Manager" +msgstr "" + +msgid "Enabled" +msgstr "" + +msgid "" +"Failure counter after how many failed download attempts, the state is " +"considered as offline" +msgstr "" + +msgid "List of Wireless Virtual Interfaces (wVIF)" +msgstr "" + +msgid "List of host addresses" +msgstr "" + +msgid "" +"List of host addresses (url or IP) to track and request http headers from" +msgstr "" + +msgid "Mode" +msgstr "" + +msgid "Not used by DynaPoint" +msgstr "" + +msgid "Offline" +msgstr "" + +msgid "Online" +msgstr "" + +msgid "SSID" +msgstr "" + +msgid "Switch_to_offline threshold" +msgstr "" + +msgid "Test-run interval" +msgstr "" + +msgid "Time interval in seconds to re-start a new test run" +msgstr "" + +msgid "Use curl" +msgstr "" + +msgid "Use curl instead of wget" +msgstr "" + +msgid "Use curl instead of wget for testing the connectivity." +msgstr "" + +msgid "Used interface" +msgstr "" + +msgid "Which interface should curl use. (Use ifconfig to find out)" +msgstr "" + +msgid "WiFi Status" +msgstr "" diff --git a/package/luci/applications/luci-app-dynapoint/root/etc/uci-defaults/40_luci-dynapoint b/package/luci/applications/luci-app-dynapoint/root/etc/uci-defaults/40_luci-dynapoint new file mode 100644 index 0000000000..7287ccd420 --- /dev/null +++ b/package/luci/applications/luci-app-dynapoint/root/etc/uci-defaults/40_luci-dynapoint @@ -0,0 +1,13 @@ +#!/bin/sh + +# needed for "Save and Apply" to restart dynapoint +uci -q batch <<-EOF >/dev/null + delete ucitrack.@dynapoint[-1] + add ucitrack dynapoint + set ucitrack.@dynapoint[-1].init="dynapoint" + commit dynapoint +EOF + +rm -f /tmp/luci-indexcache +exit 0 + diff --git a/package/luci/applications/luci-app-firewall/luasrc/model/cbi/firewall/forward-details.lua b/package/luci/applications/luci-app-firewall/luasrc/model/cbi/firewall/forward-details.lua index 22f1c77164..17a49483d7 100644 --- a/package/luci/applications/luci-app-firewall/luasrc/model/cbi/firewall/forward-details.lua +++ b/package/luci/applications/luci-app-firewall/luasrc/model/cbi/firewall/forward-details.lua @@ -73,7 +73,7 @@ o = s:option(Value, "src_ip", translate("Source IP address"), translate("Only match incoming traffic from this IP or range.")) o.rmempty = true -o.datatype = "neg(ip4addr)" +o.datatype = "neg(ipmask4)" o.placeholder = translate("any") luci.sys.net.ipv4_hints(function(ip, name) @@ -99,7 +99,7 @@ end) o.rmempty = true -o.datatype = "neg(ip4addr)" +o.datatype = "neg(ipmask4)" o.placeholder = translate("any") @@ -119,7 +119,7 @@ o.template = "cbi/firewall_zonelist" o = s:option(Value, "dest_ip", translate("Internal IP address"), translate("Redirect matched incoming traffic to the specified \ internal host")) -o.datatype = "ip4addr" +o.datatype = "ipmask4" luci.sys.net.ipv4_hints(function(ip, name) o:value(ip, "%s (%s)" %{ ip, name }) diff --git a/package/luci/applications/luci-app-firewall/luasrc/model/cbi/firewall/rule-details.lua b/package/luci/applications/luci-app-firewall/luasrc/model/cbi/firewall/rule-details.lua index 97e93ae050..1c838888f1 100644 --- a/package/luci/applications/luci-app-firewall/luasrc/model/cbi/firewall/rule-details.lua +++ b/package/luci/applications/luci-app-firewall/luasrc/model/cbi/firewall/rule-details.lua @@ -99,7 +99,7 @@ elseif rule_type == "redirect" then o = s:option(Value, "src_ip", translate("Source IP address")) o.rmempty = true - o.datatype = "neg(ipaddr)" + o.datatype = "neg(ipmask4)" o.placeholder = translate("any") luci.sys.net.ipv4_hints(function(ip, name) @@ -123,7 +123,7 @@ elseif rule_type == "redirect" then o = s:option(Value, "dest_ip", translate("Destination IP address")) - o.datatype = "neg(ip4addr)" + o.datatype = "neg(ipmask4)" luci.sys.net.ipv4_hints(function(ip, name) o:value(ip, "%s (%s)" %{ ip, name }) @@ -269,7 +269,7 @@ else o = s:option(Value, "src_ip", translate("Source address")) - o.datatype = "neg(ipaddr)" + o.datatype = "neg(ipmask)" o.placeholder = translate("any") luci.sys.net.ipv4_hints(function(ip, name) @@ -290,7 +290,7 @@ else o = s:option(Value, "dest_ip", translate("Destination address")) - o.datatype = "neg(ipaddr)" + o.datatype = "neg(ipmask)" o.placeholder = translate("any") luci.sys.net.ipv4_hints(function(ip, name) diff --git a/package/luci/applications/luci-app-firewall/luasrc/model/cbi/firewall/zone-details.lua b/package/luci/applications/luci-app-firewall/luasrc/model/cbi/firewall/zone-details.lua index c8b8f22bda..500d1bf32f 100644 --- a/package/luci/applications/luci-app-firewall/luasrc/model/cbi/firewall/zone-details.lua +++ b/package/luci/applications/luci-app-firewall/luasrc/model/cbi/firewall/zone-details.lua @@ -126,7 +126,7 @@ msrc = s:taboption("advanced", DynamicList, "masq_src", translate("Restrict Masquerading to given source subnets")) msrc.optional = true -msrc.datatype = "list(neg(or(uciname,hostname,ip4addr)))" +msrc.datatype = "list(neg(or(uciname,hostname,ipmask4)))" msrc.placeholder = "0.0.0.0/0" msrc:depends("family", "") msrc:depends("family", "ipv4") @@ -135,7 +135,7 @@ mdest = s:taboption("advanced", DynamicList, "masq_dest", translate("Restrict Masquerading to given destination subnets")) mdest.optional = true -mdest.datatype = "list(neg(or(uciname,hostname,ip4addr)))" +mdest.datatype = "list(neg(or(uciname,hostname,ipmask4)))" mdest.placeholder = "0.0.0.0/0" mdest:depends("family", "") mdest:depends("family", "ipv4") diff --git a/package/luci/applications/luci-app-firewall/luasrc/model/cbi/firewall/zones.lua b/package/luci/applications/luci-app-firewall/luasrc/model/cbi/firewall/zones.lua index 694bbd872e..500e5078f4 100644 --- a/package/luci/applications/luci-app-firewall/luasrc/model/cbi/firewall/zones.lua +++ b/package/luci/applications/luci-app-firewall/luasrc/model/cbi/firewall/zones.lua @@ -19,7 +19,6 @@ s.addremove = false s:option(Flag, "syn_flood", translate("Enable SYN-flood protection")) o = s:option(Flag, "drop_invalid", translate("Drop invalid packets")) -o.default = o.enabled p = { s:option(ListValue, "input", translate("Input")), diff --git a/package/luci/applications/luci-app-firewall/po/ko/firewall.po b/package/luci/applications/luci-app-firewall/po/ko/firewall.po new file mode 100644 index 0000000000..f43fdc8826 --- /dev/null +++ b/package/luci/applications/luci-app-firewall/po/ko/firewall.po @@ -0,0 +1,505 @@ +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2010-03-30 17:00+0200\n" +"PO-Revision-Date: 2012-11-14 17:32+0200\n" +"Last-Translator: Weongyo Jeong \n" +"Language-Team: LANGUAGE \n" +"Language: ko\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=1; plural=0;\n" +"X-Generator: Pootle 2.0.6\n" + +msgid "%s in %s" +msgstr "" + +msgid "%s%s with %s" +msgstr "%s%s ,%s" + +msgid "%s, %s in %s" +msgstr "" + +msgid "(Unnamed Entry)" +msgstr "" + +msgid "(Unnamed Rule)" +msgstr "" + +msgid "(Unnamed SNAT)" +msgstr "" + +msgid "%d pkts. per %s" +msgstr "" + +msgid "%d pkts. per %s, burst %d pkts." +msgstr "" + +msgid "%s and limit to %s" +msgstr "" + +msgid "Action" +msgstr "" + +msgid "Add" +msgstr "" + +msgid "Add and edit..." +msgstr "추가 후 수정..." + +msgid "Advanced Settings" +msgstr "" + +msgid "Allow forward from source zones:" +msgstr "Source zone 로부터의 forward 허용:" + +msgid "Allow forward to destination zones:" +msgstr "Destination zone 으로 forward 허용:" + +msgid "Any" +msgstr "" + +msgid "Covered networks" +msgstr "" + +msgid "Custom Rules" +msgstr "Custom Rule" + +msgid "" +"Custom rules allow you to execute arbritary iptables commands which are not " +"otherwise covered by the firewall framework. The commands are executed after " +"each firewall restart, right after the default ruleset has been loaded." +msgstr "" +"Custom rule 은 방화벽 UI 로 해결이 되지 않는 임의의 iptables 명령을 실행할 " +"수 있도록 합니다. 입력된 명령어들은 매 방화벽 재시작시 실행되는데 default " +"ruleset 이 load 된 후 시점입니다." + +msgid "Destination IP address" +msgstr "Destination IP 주소" + +msgid "Destination address" +msgstr "Destination 주소" + +msgid "Destination port" +msgstr "" + +msgid "Destination zone" +msgstr "" + +msgid "Do not rewrite" +msgstr "" + +msgid "Drop invalid packets" +msgstr "" + +msgid "Enable" +msgstr "활성화" + +msgid "Enable NAT Loopback" +msgstr "NAT Loopback 활성화" + +msgid "Enable SYN-flood protection" +msgstr "SYN-flood protection 활성화" + +msgid "Enable logging on this zone" +msgstr "zone 의 logging 활성화" + +msgid "External IP address" +msgstr "외부 IP 주소" + +msgid "External port" +msgstr "외부 port" + +msgid "External zone" +msgstr "외부 zone" + +msgid "Extra arguments" +msgstr "추가 argument" + +msgid "Firewall" +msgstr "방화벽" + +msgid "Firewall - Custom Rules" +msgstr "방화벽 - Custom Rules" + +msgid "Firewall - Port Forwards" +msgstr "방화벽 - Port Forwards" + +msgid "Firewall - Traffic Rules" +msgstr "방화벽 - Traffic Rules" + +msgid "Firewall - Zone Settings" +msgstr "방화벽 - Zone 설정" + +msgid "Force connection tracking" +msgstr "" + +msgid "Forward" +msgstr "" + +msgid "Forward to" +msgstr "" + +msgid "Friday" +msgstr "금요일" + +msgid "From %s in %s" +msgstr "" + +msgid "From %s in %s with source %s" +msgstr "" + +msgid "From %s in %s with source %s and %s" +msgstr "" + +msgid "General Settings" +msgstr "" + +msgid "IPv4" +msgstr "" + +msgid "IPv4 and IPv6" +msgstr "" + +msgid "IPv4 only" +msgstr "" + +msgid "IPv6" +msgstr "" + +msgid "IPv6 only" +msgstr "" + +msgid "Input" +msgstr "" + +msgid "Inter-Zone Forwarding" +msgstr "" + +msgid "Internal IP address" +msgstr "내부 IP 주소" + +msgid "Internal port" +msgstr "내부 port" + +msgid "Internal zone" +msgstr "내부 zone" + +msgid "Limit log messages" +msgstr "" + +msgid "MSS clamping" +msgstr "" + +msgid "Masquerading" +msgstr "" + +msgid "Match" +msgstr "" + +msgid "Match ICMP type" +msgstr "" + +msgid "Match forwarded traffic to the given destination port or port range." +msgstr "" + +msgid "" +"Match incoming traffic directed at the given destination port or port range " +"on this host" +msgstr "" + +msgid "" +"Match incoming traffic originating from the given source port or port range " +"on the client host." +msgstr "" + +msgid "Monday" +msgstr "월요일" + +msgid "Month Days" +msgstr "" + +msgid "Name" +msgstr "이름" + +msgid "New SNAT rule" +msgstr "새로운 SNAT rule" + +msgid "New forward rule" +msgstr "새로운 forward rule" + +msgid "New input rule" +msgstr "새로운 input rule" + +msgid "New port forward" +msgstr "새로운 port forward" + +msgid "New source NAT" +msgstr "새로운 source NAT" + +msgid "Only match incoming traffic directed at the given IP address." +msgstr "" + +msgid "Only match incoming traffic from these MACs." +msgstr "" + +msgid "Only match incoming traffic from this IP or range." +msgstr "" + +msgid "" +"Only match incoming traffic originating from the given source port or port " +"range on the client host" +msgstr "" + +msgid "Open ports on router" +msgstr "" + +msgid "Other..." +msgstr "" + +msgid "Output" +msgstr "" + +msgid "Passes additional arguments to iptables. Use with care!" +msgstr "iptables 명령에 추가 인자들을 더합니다. 조심해 사용하세요!" + +msgid "Port Forwards" +msgstr "Port Forward" + +msgid "" +"Port forwarding allows remote computers on the Internet to connect to a " +"specific computer or service within the private LAN." +msgstr "" +"Port forwarding 기능은 인터넷 상의 원격 컴퓨터가 내부 LAN 에 속한 특정 컴퓨터" +"나 서비스에 접속할 수 있도록 합니다." + +msgid "Protocol" +msgstr "" + +msgid "" +"Redirect matched incoming traffic to the given port on the internal host" +msgstr "" + +msgid "Redirect matched incoming traffic to the specified internal host" +msgstr "" + +msgid "Restart Firewall" +msgstr "" + +msgid "Restrict Masquerading to given destination subnets" +msgstr "주어진 destination subnet 으로 Masquerading 제한" + +msgid "Restrict Masquerading to given source subnets" +msgstr "주어진 source subnet 으로 Masquerading 제한" + +msgid "Restrict to address family" +msgstr "Address family 제한" + +msgid "Rewrite matched traffic to the given address." +msgstr "" + +msgid "" +"Rewrite matched traffic to the given source port. May be left empty to only " +"rewrite the IP address." +msgstr "" + +msgid "Rewrite to source %s" +msgstr "" + +msgid "Rewrite to source %s, %s" +msgstr "" + +msgid "SNAT IP address" +msgstr "" + +msgid "SNAT port" +msgstr "" + +msgid "Saturday" +msgstr "토요일" + +msgid "Source IP address" +msgstr "Source IP 주소" + +msgid "Source MAC address" +msgstr "Source MAC 주소" + +msgid "Source NAT" +msgstr "" + +msgid "" +"Source NAT is a specific form of masquerading which allows fine grained " +"control over the source IP used for outgoing traffic, for example to map " +"multiple WAN addresses to internal subnets." +msgstr "" +"Source NAT 기능은 masquerading 의 한 형태로써 outgoing 트래픽이 사용할 " +"source IP 를 세밀하게 제어할 수 있습니다. 예를 들어 다수의 WAN 주소들을 내" +"부 subnet 에 매핑(mapping) 할 경우 사용됩니다." + +msgid "Source address" +msgstr "Source 주소" + +msgid "Source port" +msgstr "" + +msgid "Source zone" +msgstr "" + +msgid "Start Date (yyyy-mm-dd)" +msgstr "시작 날짜 (yyyy-mm-dd)" + +msgid "Start Time (hh:mm:ss)" +msgstr "시작 시간 (hh:mm:ss)" + +msgid "Stop Date (yyyy-mm-dd)" +msgstr "종료 날짜 (yyyy-mm-dd)" + +msgid "Stop Time (hh:mm:ss)" +msgstr "종료 시간 (hh:mm:ss)" + +msgid "Sunday" +msgstr "일요일" + +msgid "" +"The firewall creates zones over your network interfaces to control network " +"traffic flow." +msgstr "" +"방화벽 기능을 이용하여 네트워크 인터페이스와 연결된 zone 을 생성할 수 있고 이" +"를 이용하여 네트워크 traffic flow 를 제어할 수 있습니다." + +msgid "" +"The options below control the forwarding policies between this zone (%s) and " +"other zones. Destination zones cover forwarded traffic " +"originating from %q. Source zones match forwarded " +"traffic from other zones targeted at %q. The forwarding " +"rule is unidirectional, e.g. a forward from lan to wan does " +"not imply a permission to forward from wan to lan as well." +msgstr "" +"이 zone (%s) ê³¼ 다른 zone 들 사이의 forwarding 정책을 제어하는 옵션들입니다. " +"Destination zones 은 %q 에서 출발한 forward " +"traffic 을 뜻하고, Source zones 은 다른 zone 들에서 %q 로 전" +"달되는 forward traffic 을 뜻합니다. Forwarding rule 은 " +"unidirectional 인데, 예를 들어 LAN 에서 WAN 으로의 forward 규칙이 " +"WAN 에서 LAN 으로의 forward 를 허락하는 것이 아닙니다." + +msgid "" +"This page allows you to change advanced properties of the port forwarding " +"entry. In most cases there is no need to modify those settings." +msgstr "" +"이 메뉴에서는 port forwarding 의 고급 설정 정보를 변경할 수 있습니다. 대부분" +"의 경우 이 설정을 수정할 일이 없습니다." + +msgid "" +"This page allows you to change advanced properties of the traffic rule " +"entry, such as matched source and destination hosts." +msgstr "" +"이 메뉴에서는 traffic rule 항목의 고급 설정, 예를 들어 source host 와 " +"destination host 매칭, 을 변경할 수 있습니다." + +#, fuzzy +msgid "" +"This section defines common properties of %q. The input and " +"output options set the default policies for traffic entering and " +"leaving this zone while the forward option describes the policy for " +"forwarded traffic between different networks within the zone. Covered " +"networks specifies which available networks are members of this zone." +msgstr "" +"이 섹션은 %q 의 공통 속성을 설정할 수 있습니다. input ê³¼ " +"output 옵션은 이 zone 으로 전달되어 들오거나 나가는 트래픽에 대한 기" +"본 정책을 뜻합니다. forward 옵션은 zone 내에서 다른 네트워크들 사이" +"를 오가는 forward traffic 에 대한 정책을 뜻합니다. Covered networks " +"에서는 zone 의 영향을 받을 네트워크들을 지정할 수 있습니다." + +msgid "Thursday" +msgstr "목요일" + +msgid "Time in UTC" +msgstr "UTC 기준시" + +msgid "To %s at %s on this device" +msgstr "" + +msgid "To %s in %s" +msgstr "" + +msgid "To %s on this device" +msgstr "" + +msgid "To %s, %s in %s" +msgstr "" + +msgid "To source IP" +msgstr "" + +msgid "To source port" +msgstr "" + +msgid "Traffic Rules" +msgstr "Traffic Rule" + +msgid "" +"Traffic rules define policies for packets traveling between different zones, " +"for example to reject traffic between certain hosts or to open WAN ports on " +"the router." +msgstr "" +"Traffic rule 은 서로 다른 zone 사이를 오가는 패킷들에 대한 정책을 정의합니" +"다. 예를 들어 특정 host 들 사이의 트래픽을 차단하거나 공유기의 WAN port 를 " +"open 할때 사용됩니다." + +msgid "Tuesday" +msgstr "화요일" + +msgid "Via %s" +msgstr "" + +msgid "Via %s at %s" +msgstr "" + +msgid "Wednesday" +msgstr "수요일" + +msgid "Week Days" +msgstr "주일" + +msgid "" +"You may specify multiple by selecting \"-- custom --\" and then entering " +"protocols separated by space." +msgstr "" + +msgid "Zone %q" +msgstr "" + +msgid "Zone ⇒ Forwardings" +msgstr "" + +msgid "Zones" +msgstr "Zone 내역" + +msgid "accept" +msgstr "" + +msgid "any" +msgstr "" + +msgid "any host" +msgstr "" + +msgid "any router IP" +msgstr "" + +msgid "any zone" +msgstr "" + +msgid "don't track" +msgstr "" + +msgid "drop" +msgstr "" + +msgid "reject" +msgstr "" + +msgid "traffic" +msgstr "" diff --git a/package/luci/applications/luci-app-firewall/po/pt-br/firewall.po b/package/luci/applications/luci-app-firewall/po/pt-br/firewall.po index 2d601f8575..ab714b50b9 100644 --- a/package/luci/applications/luci-app-firewall/po/pt-br/firewall.po +++ b/package/luci/applications/luci-app-firewall/po/pt-br/firewall.po @@ -1,17 +1,17 @@ msgid "" msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" +"Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2010-03-30 17:00+0200\n" -"PO-Revision-Date: 2014-06-21 19:03+0200\n" -"Last-Translator: Éder \n" -"Language-Team: LANGUAGE \n" +"PO-Revision-Date: 2017-02-20 17:43-0300\n" +"Last-Translator: Luiz Angelo Daros de Luca \n" "Language: pt_BR\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n" -"X-Generator: Pootle 2.0.6\n" +"X-Generator: Poedit 1.8.11\n" +"Language-Team: \n" msgid "%s in %s" msgstr "%s in %s" @@ -143,7 +143,7 @@ msgid "Forward to" msgstr "Encaminhar para" msgid "Friday" -msgstr "" +msgstr "Sexta-feira" msgid "From %s in %s" msgstr "Vindo de %s em %s" @@ -222,10 +222,10 @@ msgstr "" "equipamento cliente." msgid "Monday" -msgstr "" +msgstr "Segunda-Feira" msgid "Month Days" -msgstr "" +msgstr "Dias do mês" msgid "Name" msgstr "Nome" @@ -296,7 +296,7 @@ msgid "Redirect matched incoming traffic to the specified internal host" msgstr "Redireciona tráfego entrante para o computador interno especificado" msgid "Restart Firewall" -msgstr "" +msgstr "Reiniciar o Firewall" msgid "Restrict Masquerading to given destination subnets" msgstr "Restringe o mascaramento para uma subrede de destino específica" @@ -330,7 +330,7 @@ msgid "SNAT port" msgstr "Porta da SNAT" msgid "Saturday" -msgstr "" +msgstr "Sábado" msgid "Source IP address" msgstr "Endereço IP de origem" @@ -360,19 +360,19 @@ msgid "Source zone" msgstr "Zona de origem" msgid "Start Date (yyyy-mm-dd)" -msgstr "" +msgstr "Dia inicial (aaaa-mm-dd)" msgid "Start Time (hh:mm:ss)" -msgstr "" +msgstr "Hora inicial (hh:mm:ss)" msgid "Stop Date (yyyy-mm-dd)" -msgstr "" +msgstr "Dia final (aaaa-mm-dd)" msgid "Stop Time (hh:mm:ss)" -msgstr "" +msgstr "Hora final (hh:mm:ss)" msgid "Sunday" -msgstr "" +msgstr "Domingo" msgid "" "The firewall creates zones over your network interfaces to control network " @@ -411,7 +411,6 @@ msgstr "" "Esta página permite que você mude propriedades avançadas da entrada da regra " "de tráfego, como os equipamentos de origem e destino." -#, fuzzy msgid "" "This section defines common properties of %q. The input and " "output options set the default policies for traffic entering and " @@ -427,10 +426,10 @@ msgstr "" "zona." msgid "Thursday" -msgstr "" +msgstr "Quita-feira" msgid "Time in UTC" -msgstr "" +msgstr "Hora em UTC" msgid "To %s at %s on this device" msgstr "Para %s em %s neste dispositivo" @@ -463,7 +462,7 @@ msgstr "" "ou abrir portas WAN no roteador." msgid "Tuesday" -msgstr "" +msgstr "Terça-feira" msgid "Via %s" msgstr "Via %s" @@ -472,10 +471,10 @@ msgid "Via %s at %s" msgstr "Via %s at %s" msgid "Wednesday" -msgstr "" +msgstr "Quarta-feira" msgid "Week Days" -msgstr "" +msgstr "Dias da semana" msgid "" "You may specify multiple by selecting \"-- custom --\" and then entering " diff --git a/package/luci/applications/luci-app-fwknopd/po/pt-br/fwknopd.po b/package/luci/applications/luci-app-fwknopd/po/pt-br/fwknopd.po new file mode 100644 index 0000000000..286b49db31 --- /dev/null +++ b/package/luci/applications/luci-app-fwknopd/po/pt-br/fwknopd.po @@ -0,0 +1,116 @@ +msgid "" +msgstr "" +"Content-Type: text/plain; charset=UTF-8\n" +"Project-Id-Version: \n" +"POT-Creation-Date: \n" +"PO-Revision-Date: \n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Poedit 1.8.11\n" +"Last-Translator: Luiz Angelo Daros de Luca \n" +"Plural-Forms: nplurals=2; plural=(n > 1);\n" +"Language: pt_BR\n" + +msgid "" +"Allow SPA clients to request access to services through an iptables firewall " +"instead of just to it." +msgstr "" +"Permitir que clientes SPA requeiram acesso a serviços através de um firewall " +"iptables ao invés de apenas fazê-lo." + +msgid "Allow SPA clients to request forwarding destination by DNS name." +msgstr "" +"Permitir que clientes SPA requeiram encaminhamento de destinos por nome DNS." + +msgid "Base 64 key" +msgstr "Chave em formato base64" + +msgid "" +"Define a set of ports and protocols (tcp or udp) that will be opened if a " +"valid knock sequence is seen. If this entry is not set, fwknopd will attempt " +"to honor any proto/port request specified in the SPA data (unless of it " +"matches any “RESTRICT_PORTS” entries). Multiple entries are comma-separated." +msgstr "" +"Define um conjunto de porta e protocolos (TCP ou UDP) que serão abertos se " +"uma sequência de batidas for observada. Se esta entrada não estiver " +"definida, fwknopd irá tentar honrar qualquer requisição de protocolo/porta " +"especificada nos dados SPA (a não ser se casar com qualquer entrada de " +"\"RESTRICT_PORTS\"). Múltiplas entradas serão separadas por vírgula." + +msgid "" +"Define the length of time access will be granted by fwknopd through the " +"firewall after a valid knock sequence from a source IP address. If " +"“FW_ACCESS_TIMEOUT” is not set then the default timeout of 30 seconds will " +"automatically be set." +msgstr "" +"Define a duração do tempo de acesso que será concedido pelo fwknopd através " +"do firewall depois de uma sequência de batidas válida de um endereço IP. Se " +"“FW_ACCESS_TIMEOUT” não estiver definido, o valor padrão será de 30 " +"segundos. " + +msgid "" +"Define the symmetric key used for decrypting an incoming SPA packet that is " +"encrypted by the fwknop client with Rijndael." +msgstr "" +"Define a chave simétrica usada para decifrar um pacote SPA entrante que foi " +"cifrado pelo cliente fwknop com o algoritmo Rijndael." + +msgid "Enable Uci/Luci control" +msgstr "Habilitar o controle UCI/Luci" + +msgid "Enable config overwrite" +msgstr "Habilitar a sobrescrita da configuração" + +msgid "Firewall Knock Daemon" +msgstr "Servidor do Firwall Knock" + +msgid "Firewall Knock Operator" +msgstr "Operador do Firewall Knock" + +msgid "" +"Force all SPA packets to contain a real IP address within the encrypted " +"data. This makes it impossible to use the -s command line argument on the " +"fwknop client command line, so either -R has to be used to automatically " +"resolve the external address (if the client behind a NAT) or the client must " +"know the external IP and set it via the -a argument." +msgstr "" +"Forçar que todos os pacotes SPA contenham um endereço IP real dentro do " +"pacote cifrado. Isto torna impossível o uso do argumento de linha de comando " +"'-s' no cliente fwknop. Desta forma, ou o argumento '-R' deve ser usada para " +"resolver os endereços externos automaticamente (se o cliente estiver atrás " +"de uma NAT) ou o ciente deve conhecer o seu endereço IP externo e defini-lo " +"através do argumento '-a'." + +msgid "" +"Maximum age in seconds that an SPA packet will be accepted. defaults to 120 " +"seconds" +msgstr "" +"Idade máxima, em segundos, que um pacote SPA será aceito. Padrão é 120 " +"segundos." + +msgid "Normal Key" +msgstr "Chave Normal" + +msgid "Specify the ethernet interface on which fwknopd will sniff packets." +msgstr "" +"Especifica o dispositivo ethernet no qual o fwknopd irá observar os pacotes." + +msgid "The base64 hmac key" +msgstr "A chave de autenticação HMAC em formato base64" + +msgid "Use ANY for any source ip" +msgstr "Use \"ANY\" para qualquer endereço IP de origem" + +msgid "" +"When unchecked, the config files in /etc/fwknopd will be used as is, " +"ignoring any settings here." +msgstr "" +"Quando desmarcado, os arquivos de configuração em /etc/fwknopd serão usados " +"como estão, ignorando qualquer ajustes feitos aqui." + +msgid "access.conf stanzas" +msgstr "Estâncias do access.conf" + +msgid "fwknopd.conf config options" +msgstr "Opções do fwknopd.conf" diff --git a/package/luci/applications/luci-app-meshwizard/po/pt-br/meshwizard.po b/package/luci/applications/luci-app-meshwizard/po/pt-br/meshwizard.po index a2238e52e8..9421e02531 100644 --- a/package/luci/applications/luci-app-meshwizard/po/pt-br/meshwizard.po +++ b/package/luci/applications/luci-app-meshwizard/po/pt-br/meshwizard.po @@ -1,17 +1,17 @@ msgid "" msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" +"Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2011-10-11 00:23+0200\n" -"PO-Revision-Date: 2014-03-17 10:01+0200\n" -"Last-Translator: Luiz Angelo \n" -"Language-Team: LANGUAGE \n" +"PO-Revision-Date: 2017-02-20 18:00-0300\n" +"Last-Translator: Luiz Angelo Daros de Luca \n" "Language: pt_BR\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n" -"X-Generator: Pootle 2.0.6\n" +"X-Generator: Poedit 1.8.11\n" +"Language-Team: \n" msgid "Activate or deactivate IPv6 config globally." msgstr "Habilita e desabilita a configuração IPv6 globalmente." @@ -70,7 +70,6 @@ msgstr "Endereço IPv6 da rede em malha" msgid "Mesh Wizard" msgstr "Assistente de Configuração da Rede em Malha" -#, fuzzy msgid "" "Note: this will set up this interface for mesh operation, i.e. add it to " "zone 'freifunk' and enable olsr." diff --git a/package/luci/applications/luci-app-mjpg-streamer/po/pt-br/mjpg-streamer.po b/package/luci/applications/luci-app-mjpg-streamer/po/pt-br/mjpg-streamer.po new file mode 100644 index 0000000000..28bfa186b0 --- /dev/null +++ b/package/luci/applications/luci-app-mjpg-streamer/po/pt-br/mjpg-streamer.po @@ -0,0 +1,172 @@ +msgid "" +msgstr "" +"Content-Type: text/plain; charset=UTF-8\n" +"Project-Id-Version: \n" +"POT-Creation-Date: \n" +"PO-Revision-Date: \n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Poedit 1.8.11\n" +"Last-Translator: Luiz Angelo Daros de Luca \n" +"Plural-Forms: nplurals=2; plural=(n > 1);\n" +"Language: pt_BR\n" + +msgid "Allow ringbuffer to exceed limit by this amount" +msgstr "Permitir que o buffer em anel exceda o limite por essa quantidade" + +msgid "Ask for username and password on connect" +msgstr "Pergunte por um usuário e senha na conexão" + +msgid "Authentication required" +msgstr "Requer autenticação" + +msgid "Auto" +msgstr "Automático" + +msgid "Automatic disabling of MJPEG mode" +msgstr "Desativação automática do modo MJPEG" + +msgid "Blink" +msgstr "Pisca" + +msgid "Check to save the stream to an mjpeg file" +msgstr "Marque para salvar o fluxo em um arquivo MJPEG" + +msgid "Command to run" +msgstr "Comando para executar:" + +msgid "Device" +msgstr "Dispositivo" + +msgid "Do not initalize dynctrls of Linux-UVC driver" +msgstr "Não inicie o dynctrls do driver do Linux-UVC" + +msgid "Don't initalize dynctrls" +msgstr "Não inicia o dynctrls" + +msgid "Drop frames smaller then this limit" +msgstr "Descarte quadros menores que este limite" + +msgid "Enable MJPG-streamer" +msgstr "Ativa o MJPG-streamer" + +msgid "Enable YUYV format" +msgstr "Ativar Formato YUYV" + +msgid "Enabled" +msgstr "Habilitado" + +msgid "Exceed" +msgstr "Ultrapassado" + +msgid "" +"Execute command after saving picture. Mjpg-streamer parse the filename as " +"first parameter to your script." +msgstr "" +"Execute o comando depois de salvar a imagem. Mjpg-streamer passa o nome do " +"arquivo como primeiro parâmetro para o comando." + +msgid "File input" +msgstr "Entrada do arquivo" + +msgid "File output" +msgstr "Saída do arquivo" + +msgid "Folder" +msgstr "Pasta" + +msgid "Folder that contains webpages" +msgstr "Pasta que contém páginas web" + +msgid "Frames per second" +msgstr "Quadros por segundos" + +msgid "General" +msgstr "Geral" + +msgid "HTTP output" +msgstr "Saída HTTP" + +msgid "Input plugin" +msgstr "Plugins de entrada" + +msgid "Interval between saving pictures" +msgstr "Intervalo entre o salvamento das imagens" + +msgid "JPEG compression quality" +msgstr "Qualidade da compressão JPEG" + +msgid "Led control" +msgstr "Controle de LED" + +msgid "MJPG-streamer" +msgstr "MJPG-streamer" + +msgid "Max. number of pictures to hold" +msgstr "Número máximo de imagens a serem mantidas" + +msgid "Mjpeg output" +msgstr "Saída Mjpeg" + +msgid "Off" +msgstr "Desligado" + +msgid "On" +msgstr "Ligado" + +msgid "Output plugin" +msgstr "Plugin de saída" + +msgid "Password" +msgstr "Senha" + +msgid "Plugin settings" +msgstr "Configurações do Plugin" + +msgid "Port" +msgstr "Porta" + +msgid "Resolution" +msgstr "Resolução" + +msgid "Ring buffer size" +msgstr "Tamanho do buffer em anel" + +msgid "Set folder to save pictures" +msgstr "Definir pasta para salvas as imagens" + +msgid "Set the inteval in millisecond" +msgstr "Defina o intervalo em milisegundos" + +msgid "" +"Set the minimum size if the webcam produces small-sized garbage frames. May " +"happen under low light conditions" +msgstr "" +"Defina o tamanho mínimo se a webcam produz quadros lixo de tamanho pequeno. " +"Pode acontecer sob condições de pouca luz" + +msgid "" +"Set the quality in percent. This setting activates YUYV format, disables " +"MJPEG" +msgstr "" +"Defina a qualidade em porcentagem. Esta definição ativa o formato YUYV, " +"desativa MJPEG" + +msgid "TCP port for this HTTP server" +msgstr "Porta TCP para este servidor HTTP" + +msgid "UVC input" +msgstr "Dispositivo UVC de entrada" + +msgid "Username" +msgstr "Usuário" + +msgid "WWW folder" +msgstr "Pasta WWW" + +msgid "" +"mjpg streamer is a streaming application for Linux-UVC compatible webcams" +msgstr "" +"Mjpg streamer é uma aplicação de streaming para webcams compatíveis com o " +"Linux-UVC" diff --git a/package/luci/applications/luci-app-olsr/po/pt-br/olsr.po b/package/luci/applications/luci-app-olsr/po/pt-br/olsr.po index 1461c1dd8b..499176c16b 100644 --- a/package/luci/applications/luci-app-olsr/po/pt-br/olsr.po +++ b/package/luci/applications/luci-app-olsr/po/pt-br/olsr.po @@ -1,17 +1,17 @@ msgid "" msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" +"Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2009-06-10 03:41+0200\n" -"PO-Revision-Date: 2014-06-21 19:36+0200\n" -"Last-Translator: Éder \n" -"Language-Team: LANGUAGE \n" +"PO-Revision-Date: 2017-02-20 18:01-0300\n" +"Last-Translator: Luiz Angelo Daros de Luca \n" "Language: pt_BR\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n" -"X-Generator: Pootle 2.0.6\n" +"X-Generator: Poedit 1.8.11\n" +"Language-Team: \n" msgid "Active MID announcements" msgstr "" @@ -59,7 +59,6 @@ msgstr "" "Somente pode ser um endereço IPv4 ou IPv6 válidos ou um endereço 'padrão'" # 20140621: edersg: tradução -#, fuzzy msgid "Can only be a valid IPv6 address or 'default'" msgstr "" "Somente pode ser um endereço IPv4 ou IPv6 válidos ou um endereço 'padrão'" @@ -173,7 +172,6 @@ msgstr "" "Validade do HNA" -#, fuzzy msgid "HNA6 Announcements" msgstr "" "Anúncios do reduzir LQ para todos os nós nesta interface em 20%: padrão 0.8" # 20140621: edersg: tradução -#, fuzzy msgid "" "Multiply routes with the factor given here. Allowed values are between 0.01 " "and 1.0. It is only used when LQ-Level is greater than 0. Examples:
HNA
" -#, fuzzy msgid "OLSR - HNA6-Announcements" msgstr "" "OLSR - Anúncios HNA " "local de 0.0.0.0/0, ::ffff:0:0/96 ou 2000::/3. O padrão é \"ambos\"." -#, fuzzy msgid "" "Which kind of uplink is exported to the other mesh nodes. An uplink is " "detected by looking for a local HNA6 ::ffff:0:0/96 or 2000::/3. Default " diff --git a/package/luci/applications/luci-app-openvpn/po/pt-br/openvpn.po b/package/luci/applications/luci-app-openvpn/po/pt-br/openvpn.po index 916370e7f9..84b0540581 100644 --- a/package/luci/applications/luci-app-openvpn/po/pt-br/openvpn.po +++ b/package/luci/applications/luci-app-openvpn/po/pt-br/openvpn.po @@ -1,17 +1,17 @@ msgid "" msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" +"Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2009-06-10 03:41+0200\n" -"PO-Revision-Date: 2014-03-29 23:19+0200\n" -"Last-Translator: Luiz Angelo \n" -"Language-Team: LANGUAGE \n" +"PO-Revision-Date: 2017-02-20 18:04-0300\n" +"Last-Translator: Luiz Angelo Daros de Luca \n" "Language: pt_BR\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n" -"X-Generator: Pootle 2.0.6\n" +"X-Generator: Poedit 1.8.11\n" +"Language-Team: \n" msgid "%s" msgstr "%s" @@ -154,7 +154,7 @@ msgid "Don't log timestamps" msgstr "Não registar a data/hora" msgid "Don't pull routes automatically" -msgstr "" +msgstr "Não puxe as rotas automaticamente" msgid "Don't re-read key on restart" msgstr "Não reler a chave entre os reinícios" @@ -505,13 +505,13 @@ msgid "Temporary directory for client-connect return file" msgstr "Diretório temporário para arquivo de retorno de conexão-cliente" msgid "The highest supported TLS version" -msgstr "" +msgstr "A mais alta versão suporta do TLS" msgid "The key direction for 'tls-auth' and 'secret' options" -msgstr "" +msgstr "A direção da chave para as opções 'tls-auth' e 'secret'" msgid "The lowest supported TLS version" -msgstr "" +msgstr "A mais baixa versão suporta do TLS" msgid "Timeframe for key exchange" msgstr "Janela temporal para troca de chaves" diff --git a/package/luci/applications/luci-app-privoxy/po/pt-br/privoxy.po b/package/luci/applications/luci-app-privoxy/po/pt-br/privoxy.po new file mode 100644 index 0000000000..8d3eee20d5 --- /dev/null +++ b/package/luci/applications/luci-app-privoxy/po/pt-br/privoxy.po @@ -0,0 +1,516 @@ +msgid "" +msgstr "" +"Content-Type: text/plain; charset=UTF-8\n" +"Project-Id-Version: \n" +"POT-Creation-Date: \n" +"PO-Revision-Date: \n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Poedit 1.8.11\n" +"Last-Translator: Luiz Angelo Daros de Luca \n" +"Plural-Forms: nplurals=2; plural=(n > 1);\n" +"Language: pt_BR\n" + +msgid "" +"A URL to be displayed in the error page that users will see if access to an " +"untrusted page is denied." +msgstr "" +"A URL a ser exibida na página de erro que os usuários verão se o acesso a " +"uma página não confiável é negado." + +msgid "" +"A URL to documentation about the local Privoxy setup, configuration or " +"policies." +msgstr "" +"A URL para a documentação sobre o Privoxy local, configuração ou políticas." + +msgid "A directory where Privoxy can create temporary files." +msgstr "Um diretório onde Privoxy pode criar arquivos temporários." + +msgid "Access Control" +msgstr "Controle de Acesso" + +msgid "Actions that are applied to all sites and maybe overruled later on." +msgstr "" +"Ações que são aplicadas a todos as páginas e talvez descartado mais tarde." + +msgid "An alternative directory where the templates are loaded from." +msgstr "Um diretório alternativo de onde os modelos são carregados." + +msgid "An email address to reach the Privoxy administrator." +msgstr "Um endereço de e-mail para alcançar o administrador do Privoxy." + +msgid "" +"Assumed server-side keep-alive timeout (in seconds) if not specified by the " +"server." +msgstr "" +"Tempo limite, em segundos, da manutenção da conexão (keep-alive) do servidor " +"se não for especificado." + +msgid "Boot delay" +msgstr "Atraso de iniciação" + +msgid "CGI user interface" +msgstr "Interface de usuário CGI" + +msgid "Common Log Format" +msgstr "Formato de registros (log) comum" + +msgid "" +"Configure here the routing of HTTP requests through a chain of multiple " +"proxies. Note that parent proxies can severely decrease your privacy level. " +"Also specified here are SOCKS proxies." +msgstr "" +"Configure aqui o encaminhamento de pedidos HTTP através de uma cadeia de " +"múltiplos proxies. Note-se que proxies pai pode diminuir muito o nível de " +"privacidade. Também serão aceitos proxies SOCKS." + +msgid "Debug GIF de-animation" +msgstr "Depurar de-animação GIF" + +msgid "Debug force feature" +msgstr "Recurso de depuração forçado" + +msgid "Debug redirects" +msgstr "Redirecionamentos de depuração" + +msgid "Debug regular expression filters" +msgstr "Depuração de filtros de expressão regular" + +msgid "Delay (in seconds) during system boot before Privoxy start" +msgstr "" +"Atraso (em segundos) durante a inicialização do sistema antes do Privoxy " +"iniciar" + +msgid "Directory does not exist!" +msgstr "O diretório não existe!" + +msgid "Disabled == Transparent Proxy Mode" +msgstr "Desativado == Modo Proxy Transparente" + +msgid "Documentation" +msgstr "Documentação" + +msgid "During delay ifup-events are not monitored !" +msgstr "Durante a espera, eventos ifup não serão monitorados!" + +msgid "Enable proxy authentication forwarding" +msgstr "Habilitar o encaminhamento de autenticação de proxy" + +msgid "" +"Enable/Disable autostart of Privoxy on system startup and interface events" +msgstr "" +"Ativar/Desativar a iniciação automática do Privoxy junto com a iniciação do " +"sistema ou eventos de interface" + +msgid "Enable/Disable filtering when Privoxy starts." +msgstr "Ativar / Desativar filtragem quando Privoxy iniciar." + +msgid "Enabled" +msgstr "Habilitado" + +msgid "" +"Enabling this option is NOT recommended if there is no parent proxy that " +"requires authentication!" +msgstr "" +"A ativação dessa opção não é recomendado se não houver nenhum proxy pai que " +"requer autenticação!" + +msgid "File '%s' not found inside Configuration Directory" +msgstr "O arquivo '%s' não foi encontrado dentro do Diretório de Configuração" + +msgid "File not found or empty" +msgstr "Arquivo não encontrado ou vazio" + +msgid "Files and Directories" +msgstr "Arquivos e diretórios" + +msgid "For help use link at the relevant option" +msgstr "Para ajuda, use o link na respectiva opção" + +msgid "Forwarding" +msgstr "Encaminhando" + +msgid "" +"If enabled, Privoxy hides the 'go there anyway' link. The user obviously " +"should not be able to bypass any blocks." +msgstr "" +"Se ativado, Privoxy esconde o link \"ir lá de qualquer maneira\". O usuário, " +"obviamente, não deve ser capaz de contornar qualquer bloqueio." + +msgid "" +"If you intend to operate Privoxy for more users than just yourself, it might " +"be a good idea to let them know how to reach you, what you block and why you " +"do that, your policies, etc." +msgstr "" +"Se você pretende operar Privoxy para mais usuários do que apenas a si mesmo, " +"pode ser uma boa ideia para que eles saibam como falar com você, o que você " +"bloquear e por que você faz isso, as suas políticas, etc." + +msgid "Invalid email address" +msgstr "Endereço de e-mail inválido" + +msgid "It is NOT recommended for the casual user." +msgstr "Não é recomendado para o usuário casual." + +msgid "Location of the Privoxy User Manual." +msgstr "Localização do Manual do Usuário do Privoxy." + +msgid "Log File Viewer" +msgstr "Visualizador de arquivo de registros (log)" + +msgid "Log all data read from the network" +msgstr "Registrar todos os dados lidos da rede" + +msgid "Log all data written to the network" +msgstr "Registrar todos os dados gravados na rede" + +msgid "Log the applying actions" +msgstr "Registrar as ações aplicadas" + +msgid "" +"Log the destination for each request Privoxy let through. See also 'Debug " +"1024'." +msgstr "" +"Registrar o destino para cada pedido que o Privoxy deixou passar. Consulte " +"também 'Debug 1024'." + +msgid "" +"Log the destination for requests Privoxy didn't let through, and the reason " +"why." +msgstr "" +"Registrar o destino para os pedidos que o Privoxy não deixou passar, e a " +"razão pela qual." + +msgid "Logging" +msgstr "Registrando (logging)" + +msgid "Main actions file" +msgstr "Arquivo principal de ações" + +msgid "Mandatory Input: No Data given!" +msgstr "Entrada obrigatória: Dados não foram informados!" + +msgid "Mandatory Input: No Directory given!" +msgstr "Entrada obrigatória: Nenhum Diretório foi informado!" + +msgid "Mandatory Input: No File given!" +msgstr "Entrada obrigatória: Nenhum Arquivo foi informado!" + +msgid "Mandatory Input: No Port given!" +msgstr "Entrada obrigatória: Nenhuma Porta foi informado!" + +msgid "Mandatory Input: No files given!" +msgstr "Entrada obrigatória: Nenhum Arquivo foi informado!" + +msgid "Mandatory Input: No valid IPv4 address or host given!" +msgstr "" +"Entrada obrigatória: Nenhum endereço IPv4 ou nome de equipamento válido foi " +"fornecido!" + +msgid "Mandatory Input: No valid IPv6 address given!" +msgstr "Entrada obrigatória: Nenhum endereço IPv6 válido foi informado!" + +msgid "Mandatory Input: No valid Port given!" +msgstr "Entrada obrigatória: Nenhuma porta válida foi informada!" + +msgid "Maximum number of client connections that will be served." +msgstr "O número máximo de conexões de cliente que será aceito." + +msgid "Maximum size (in KB) of the buffer for content filtering." +msgstr "Tamanho máximo (em KB) do buffer para filtragem de conteúdo." + +msgid "Miscellaneous" +msgstr "Diversos" + +msgid "NOT installed" +msgstr "NÃO instalado" + +msgid "No trailing '/', please." +msgstr "Sem '/' final, por favor." + +msgid "Non-fatal errors - *we highly recommended enabling this*" +msgstr "Erros não fatais - *é altamente recomendado ativar isto*" + +msgid "" +"Number of seconds after which a socket times out if no data is received." +msgstr "" +"Número de segundos após o qual uma conexão expira se nenhum dado for " +"recebido." + +msgid "" +"Number of seconds after which an open connection will no longer be reused." +msgstr "" +"Número de segundos após o qual uma conexão aberta deixará de ser reutilizada." + +msgid "" +"Only when using 'external filters', Privoxy has to create temporary files." +msgstr "" +"Somente quando for usado os \"filtros externos\". O Privoxy tem que criar " +"arquivos temporários." + +msgid "Please install current version !" +msgstr "Por favor, instale a versão atual!" + +msgid "Please press [Read] button" +msgstr "Por favor, pressione o botão [Ler]" + +msgid "Please read Privoxy manual for details!" +msgstr "Por favor, leia o manual do Privoxy para mais detalhes!" + +msgid "Please update to the current version!" +msgstr "Por favor, atualize para a versão atual!" + +msgid "Privoxy WEB proxy" +msgstr "Privoxy Web Proxy" + +msgid "" +"Privoxy can (and normally does) use a number of other files for additional " +"configuration, help and logging. This section of the configuration file " +"tells Privoxy where to find those other files." +msgstr "" +"Privoxy pode (e normalmente o faz) utilizar uma série de outros arquivos de " +"configuração, ajuda e de registros. Esta seção do arquivo de configuração " +"informa o Privoxy onde encontrar os outros arquivos." + +msgid "" +"Privoxy is a non-caching web proxy with advanced filtering capabilities for " +"enhancing privacy, modifying web page data and HTTP headers, controlling " +"access, and removing ads and other obnoxious Internet junk." +msgstr "" +"Privoxy é um proxy web sem cache com capacidades avançadas de filtragem para " +"aumentar a privacidade, modificar dados de páginas web e cabeçalhos HTTP, " +"controlar o acesso e remover anúncios e outras porcarias detestável da " +"Internet." + +msgid "Read / Reread log file" +msgstr "Ler / Ler novamente o arquivo de registros (log)" + +msgid "Show I/O status" +msgstr "Mostrar status de Entrada/Saída" + +msgid "Show each connection status" +msgstr "Mostrar cada estado de conexão" + +msgid "Show header parsing" +msgstr "Mostrar análise do cabeçalho" + +msgid "Software package '%s' is not installed." +msgstr "O pacote de software '%s' não está instalado." + +msgid "Software package '%s' is outdated." +msgstr "O pacote '%' está desatualizado." + +msgid "Start" +msgstr "Iniciar" + +msgid "Start / Stop" +msgstr "Iniciar / Parar" + +msgid "Start/Stop Privoxy WEB Proxy" +msgstr "Inicia / Para o Privoxy Web Proxy" + +msgid "Startup banner and warnings." +msgstr "Mensagens e avisos iniciais." + +msgid "Syntax:" +msgstr "Sintaxe:" + +msgid "Syntax: Client header names delimited by spaces." +msgstr "Sintaxe: nomes de cabeçalho do cliente delimitados por espaços." + +msgid "Syntax: target_pattern http_parent[:port]" +msgstr "Sintaxe: padrão_alvo http_superior[:porta]" + +msgid "Syntax: target_pattern socks_proxy[:port] http_parent[:port]" +msgstr "Sintaxe: padrão_alvo proxy_socks[:porta] http_superior[:porta]" + +msgid "System" +msgstr "Sistema" + +msgid "" +"The actions file(s) to use. Multiple actionsfile lines are permitted, and " +"are in fact recommended!" +msgstr "" +"O(s) arquivo(s) ações a ser usado. Várias linhas no arquivo são permitidas, " +"e são, de fato, recomendadas!" + +msgid "" +"The address and TCP port on which Privoxy will listen for client requests." +msgstr "" +"O endereço e porta TCP em que Privoxy vai esperar por pedidos dos clientes." + +msgid "" +"The compression level that is passed to the zlib library when compressing " +"buffered content." +msgstr "" +"O nível de compressão que é passada para a biblioteca zlib ao comprimir o " +"conteúdo em buffer." + +msgid "" +"The directory where all logging takes place (i.e. where the logfile is " +"located)." +msgstr "" +"O diretório onde todos os registros ocorrem (ex: onde o arquivo de log está " +"localizado)." + +msgid "The directory where the other configuration files are located." +msgstr "O diretório onde os outros arquivos de configuração estão localizados." + +msgid "" +"The filter files contain content modification rules that use regular " +"expressions." +msgstr "" +"Os arquivos de filtro contêm regras de modificação de conteúdo que usam " +"expressões regulares." + +msgid "The hostname shown on the CGI pages." +msgstr "O nome da máquina mostrado nas páginas de CGI." + +msgid "The log file to use. File name, relative to log directory." +msgstr "" +"O arquivo de registros a ser usado. O nome do arquivo, relativo ao diretório " +"de log." + +msgid "The order in which client headers are sorted before forwarding them." +msgstr "" +"A ordem em que os cabeçalhos dos clientes são classificados antes de " +"encaminhá-los." + +msgid "" +"The status code Privoxy returns for pages blocked with +handle-as-empty-" +"document." +msgstr "" +"O código de status Privoxy retorna para páginas bloqueadas com +handle-as-" +"empty-document." + +msgid "" +"The trust mechanism is an experimental feature for building white-lists and " +"should be used with care." +msgstr "" +"O mecanismo de confiança é um recurso experimental para a construção de " +"listas de destinos confiáveis e deve ser usado com cuidado." + +msgid "" +"The value of this option only matters if the experimental trust mechanism " +"has been activated." +msgstr "" +"O valor desta opção só importa se o mecanismo de confiança experimental foi " +"ativado." + +msgid "" +"This option is only there for debugging purposes. It will drastically reduce " +"performance." +msgstr "" +"Esta opção só está lá para fins de depuração. Ele irá reduzir drasticamente " +"o desempenho." + +msgid "" +"This option will be removed in future releases as it has been obsoleted by " +"the more general header taggers." +msgstr "" +"Esta opção será removida em versões futuras, uma vez que ficou obsoleta " +"pelos marcadores de cabeçalho mais genéricos." + +msgid "" +"This tab controls the security-relevant aspects of Privoxy's configuration." +msgstr "" +"Esta guia controla os aspectos da configuração do Privoxy relevantes para a " +"segurança." + +msgid "" +"Through which SOCKS proxy (and optionally to which parent HTTP proxy) " +"specific requests should be routed." +msgstr "" +"Através de qual Proxy SOCKS (e, opcionalmente, para o qual proxy HTTP " +"superior) pedidos específicos devem ser encaminhados." + +msgid "To which parent HTTP proxy specific requests should be routed." +msgstr "" +"Para qual proxy HTTP superior os pedidos específicos devem ser encaminhados." + +msgid "User customizations" +msgstr "Personalizações do usuário" + +msgid "Value is not a number" +msgstr "O valor não é um número" + +msgid "Value not between 0 and 300" +msgstr "Valor não está entre 0 e 300" + +msgid "Value not between 0 and 9" +msgstr "Valor não está entre 0 e 9" + +msgid "Value not between 1 and 4096" +msgstr "Valor não entre 1 e 4096" + +msgid "Value not greater 0 or empty" +msgstr "Valor não é maior que 0 ou vazio" + +msgid "Value range 1 to 4096, no entry defaults to 4096" +msgstr "Faixa do valor de 1 até 4096. Se vazio, será 4096" + +msgid "Version" +msgstr "Versão" + +msgid "Version Information" +msgstr "Informação da Versão" + +msgid "Whether intercepted requests should be treated as valid." +msgstr "Se as solicitações interceptados deve ser tratadas como válidas." + +msgid "" +"Whether or not Privoxy recognizes special HTTP headers to change toggle " +"state." +msgstr "" +"Se o Privoxy deve reconhecer cabeçalhos HTTP especiais para mudar de " +"alternância do estado." + +msgid "Whether or not buffered content is compressed before delivery." +msgstr "Se o conteúdo em buffer é comprimido antes da entrega." + +msgid "" +"Whether or not outgoing connections that have been kept alive should be " +"shared between different incoming connections." +msgstr "" +"Se as conexões de saída que foram mantidas vivas devem ser compartilhadas " +"entre diferentes conexões de entrada." + +msgid "Whether or not pipelined requests should be served." +msgstr "Se os pedidos de pipeline deve ser aceitos." + +msgid "Whether or not proxy authentication through Privoxy should work." +msgstr "Se a autenticação de proxy através do Privoxy deve funcionar." + +msgid "Whether or not the web-based actions file editor may be used." +msgstr "Se o editor de arquivos de ações baseadas na web deve ser utilizado." + +msgid "Whether or not the web-based toggle feature may be used." +msgstr "Se deve ser usado o recurso de alternância baseado na web." + +msgid "Whether requests to Privoxy's CGI pages can be blocked or redirected." +msgstr "" +"Se as solicitações para páginas CGI do Privoxy podem ser bloqueadas ou " +"redirecionadas." + +msgid "" +"Whether the CGI interface should stay compatible with broken HTTP clients." +msgstr "" +"Se a interface CGI deve se manter compatível com clientes HTTP mal " +"implementados." + +msgid "Whether to run only one server thread." +msgstr "Se deseja executar o servidor como apenas uma thread." + +msgid "Who can access what." +msgstr "Quem pode acessar o quê." + +msgid "installed" +msgstr "instalado" + +msgid "or higher" +msgstr "ou maior" + +msgid "required" +msgstr "necessário" diff --git a/package/luci/applications/luci-app-radicale/po/pt-br/radicale.po b/package/luci/applications/luci-app-radicale/po/pt-br/radicale.po new file mode 100644 index 0000000000..67bf586908 --- /dev/null +++ b/package/luci/applications/luci-app-radicale/po/pt-br/radicale.po @@ -0,0 +1,432 @@ +msgid "" +msgstr "" +"Content-Type: text/plain; charset=UTF-8\n" +"Project-Id-Version: \n" +"POT-Creation-Date: \n" +"PO-Revision-Date: \n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Poedit 1.8.11\n" +"Last-Translator: Luiz Angelo Daros de Luca \n" +"Plural-Forms: nplurals=2; plural=(n > 1);\n" +"Language: pt_BR\n" + +msgid "" +"'AUTO' selects the highest protocol version that client and server support." +msgstr "'AUTO' seleciona a versão mais alto protocolo que o cliente e o servidor suportar." + +msgid "" +"'Hostname:Port' or 'IPv4:Port' or '[IPv6]:Port' Radicale should listen on" +msgstr "'NomeDoEquipamento:porta' ou 'IPv4:Porta' ou '[IPv6]:Porta' em que o Radicale deve escutar" + +msgid "AUTO" +msgstr "AUTO" + +msgid "Access-Control-Allow-Headers" +msgstr "Access-Control-Allow-Headers" + +msgid "Access-Control-Allow-Methods" +msgstr "Access-Control-Allow-Methods" + +msgid "Access-Control-Allow-Origin" +msgstr "Access-Control-Allow-Origin" + +msgid "Access-Control-Expose-Headers" +msgstr "Access-Control-Expose-Headers" + +msgid "Additional HTTP headers" +msgstr "Additional HTTP headers" + +msgid "Address:Port" +msgstr "Endereço: Porta" + +#, fuzzy +msgid "Authentication" +msgstr "Autenticação" + +msgid "" +"Authentication login is matched against the 'user' key, and collection's " +"path is matched against the 'collection' key." +msgstr "O nome do usuário na autenticação é comparado com a chave do 'user', e o caminho da coleção é comparado com a chave 'coleção'." + +msgid "Authentication method" +msgstr "Método de autenticação" + +msgid "Authentication method to allow access to Radicale server." +msgstr "Método de autenticação para permitir o acesso ao servidor Radicale." + +msgid "Auto-start" +msgstr "Iniciar automaticamente" + +msgid "Boot delay" +msgstr "Atraso na iniciação" + +msgid "CalDAV/CardDAV" +msgstr "CalDAV/CardDAV" + +msgid "" +"Calendars and address books are available for both local and remote access, " +"possibly limited through authentication policies." +msgstr "Agendas e contados estão disponíveis tanto para acesso local como remoto, possivelmente limitado através das políticas de autenticação." + +msgid "Certificate file" +msgstr "Arquivo do certificado" + +msgid "" +"Change here the encoding Radicale will use instead of 'UTF-8' for responses " +"to the client and/or to store data inside collections." +msgstr "Mude aqui a codificação que o Radicale usará em vez de 'UTF-8' para respostas a clientes ou para armazenar dados dentro das coleções." + +msgid "Ciphers" +msgstr "Cifras" + +msgid "Console Log level" +msgstr "Nível de detalhamento dos registros (log)" + +msgid "Control the access to data collections." +msgstr "Controlar o acesso às coleções de dados." + +#, fuzzy +msgid "Critical" +msgstr "Crítico" + +msgid "" +"Cross-origin resource sharing (CORS) is a mechanism that allows restricted " +"resources (e.g. fonts, JavaScript, etc.) on a web page to be requested from " +"another domain outside the domain from which the resource originated." +msgstr "O compartilhamento de recursos de origem cruzada (CORS) é um mecanismo que permite que os recursos de acesso restrito (por exemplo, fontes, JavaScript, etc.) em uma página web ser solicitado de outro domínio fora do domínio a partir do qual o recurso foi originado." + +msgid "Custom" +msgstr "Personalizadas" + +msgid "Database" +msgstr "Banco de Dados" + +#, fuzzy +msgid "Debug" +msgstr "Depuração" + +msgid "Delay (in seconds) during system boot before Radicale start" +msgstr "Atraso (em segundos) durante a inicialização do sistema antes do Radicale iniciar" + +#, fuzzy +msgid "Directory" +msgstr "Diretório" + +msgid "Directory not exists/found !" +msgstr "O diretório não foi encontrado!" + +msgid "Directory required !" +msgstr "O diretório é necessário!" + +msgid "Directory where the rotating log-files are stored" +msgstr "O diretório onde os registros(log) rotativos são armazenados" + +msgid "During delay ifup-events are not monitored !" +msgstr "Durante a espera, eventos ifup não serão monitorados!" + +msgid "Enable HTTPS" +msgstr "Ativar HTTPS" + +msgid "" +"Enable/Disable auto-start of Radicale on system start-up and interface events" +msgstr "Ativar/Desativar iniciação automática do Radicale na iniciação do sistema e em eventos de interface" + +msgid "Encoding" +msgstr "Codificação" + +msgid "Encoding for responding requests." +msgstr "Codificação para responder pedidos." + +msgid "Encoding for storing local collections." +msgstr "Codificação para armazenar coleções locais." + +msgid "Encryption method" +msgstr "Método de criptografia" + +#, fuzzy +msgid "Error" +msgstr "Erro" + +msgid "File '%s' not found !" +msgstr "Arquivo '%s' não encontrado!" + +msgid "File Log level" +msgstr "Nível de detalhamento dos registos(log) em arquivos" + +msgid "File not found !" +msgstr "Arquivo não encontrado!" + +msgid "File-system" +msgstr "Sistema de arquivos" + +msgid "" +"For example, for the 'user' key, '.+' means 'authenticated user' and '.*' " +"means 'anybody' (including anonymous users)." +msgstr "Por exemplo, para a chave 'user', '.+' Significa 'usuário autenticado' e '.*' Significa 'qualquer um' (incluindo usuários anônimos)." + +msgid "Full access for Owner only" +msgstr "Acesso completo somente para o proprietário" + +msgid "Full access for authenticated Users" +msgstr "Acesso completo para usuários autenticados" + +msgid "Full access for everybody (including anonymous)" +msgstr "Acesso completo para todos (incluindo anônimo)" + +msgid "Full path and file name of certificate" +msgstr "Caminho completo e nome do arquivo do certificado" + +msgid "Full path and file name of private key" +msgstr "Caminho e arquivo nome completo da chave privada" + +#, fuzzy +msgid "Info" +msgstr "Informações" + +msgid "Keep in mind to use the correct hashing algorithm !" +msgstr "Fique atento para usar o algoritmo de resumo digital(hash) correto!" + +msgid "Leading or ending slashes are trimmed from collection's path." +msgstr "Barras inicias e finais serão removidas do caminho da coleção." + +msgid "Log-backup Count" +msgstr "Contagem Registro(log) de Backup" + +msgid "Log-file Viewer" +msgstr "Visualizador de Arquivo de Registros(log)" + +msgid "Log-file directory" +msgstr "Diretório do arquivo de registros(log)" + +msgid "Log-file size" +msgstr "Tamanho do arquivo de registros(log)" + +#, fuzzy +msgid "Logging" +msgstr "Registrando os eventos" + +msgid "Logon message" +msgstr "Mensagem de entrada" + +msgid "Maximum size of each rotation log-file." +msgstr "Tamanho máximo para a rotação do arquivo de registros(log)" + +msgid "Message displayed in the client when a password is needed." +msgstr "Mensagem exibida para o cliente quando uma senha é necessária." + +#, fuzzy +msgid "NOT installed" +msgstr "NÃO instalado" + +#, fuzzy +msgid "None" +msgstr "Nada" + +msgid "Number of backup files of log to create." +msgstr "Número de backups dos arquivos de registros(log) a serem criados." + +msgid "OPTIONAL: See python's ssl module for available ciphers" +msgstr "Opcional: veja o módulo SSL do python para conhecer as cifras disponíveis" + +msgid "One or more missing/invalid fields on tab" +msgstr "Um ou campos inválidos/ausentes na aba" + +msgid "Owner allow write, authenticated users allow read" +msgstr "O proprietário pode escrever, os usuários autenticados podem ler" + +msgid "Path/File required !" +msgstr "O caminho/arquivo é necessário!" + +msgid "" +"Place here the 'user:password' pairs for your users which should have access " +"to Radicale." +msgstr "Coloque aqui os pares 'usuário:senha' para os seus usuários que devem ter acesso a Radicale." + +msgid "Please install current version !" +msgstr "Por favor, instale a versão atual!" + +msgid "Please press [Reload] button below to reread the file." +msgstr "Por favor, pressione o botão [Recarregar] abaixo para reler o arquivo." + +msgid "Please update to current version !" +msgstr "Por favor, atualize para a versão atual!" + +msgid "Port numbers below 1024 (Privileged ports) are not supported" +msgstr "Os porta abaixo de 1024 (portas privilegiadas) não são suportadas" + +msgid "Private key file" +msgstr "Arquivo da chave privada" + +msgid "Radicale CalDAV/CardDAV Server" +msgstr "Radicale Servidor CalDAV/CardDAV" + +msgid "Radicale uses '/etc/radicale/rights' as regexp-based file." +msgstr "Radicale usa o '/etc/radicale/rights' como arquivo baseado em expressão regular." + +msgid "Radicale uses '/etc/radicale/users' as htpasswd file." +msgstr "Radicale usa o '/etc/radicale/users' como o arquivo htpasswd." + +msgid "Read only!" +msgstr "Somente leitura!" + +msgid "RegExp file" +msgstr "Arquivo de expressões regulares" + +msgid "Reload" +msgstr "Recarregar" + +msgid "Response Encoding" +msgstr "Codificação da Resposta" + +msgid "Rights" +msgstr "Direitos" + +msgid "Rights are based on a regexp-based file" +msgstr "Os direitos são baseados em um arquivo baseado em expressões regulares" + +msgid "Rights backend" +msgstr "Serviço de Direitos" + +msgid "SHA-1" +msgstr "SHA-1" + +msgid "SSL Protocol" +msgstr "Protocolo SSL" + +#, fuzzy +msgid "Save" +msgstr "Salvar" + +msgid "Section names are only used for naming the rule." +msgstr "Os nomes das seção são usados ​​apenas para nomear a regra." + +#, fuzzy +msgid "Server" +msgstr "Servidor" + +msgid "Setting this parameter to '0' will disable rotation of log-file." +msgstr "Definindo este parâmetro para '0' irá desativar a rotação dos arquivos de registros(log)." + +msgid "Software package '%s' is not installed." +msgstr "O pacote de software '%s' não está instalado." + +msgid "Software package '%s' is outdated." +msgstr "O pacote '%' está desatualizado." + +#, fuzzy +msgid "Software update required" +msgstr "A atualização do software é necessária" + +#, fuzzy +msgid "Start" +msgstr "Iniciar" + +#, fuzzy +msgid "Start / Stop" +msgstr "Iniciar / Parar" + +msgid "Start/Stop Radicale server" +msgstr "Iniciar/Parar o servidor Radicale" + +msgid "Storage" +msgstr "Armazenamento" + +msgid "Storage Encoding" +msgstr "Codificação do Armazenamento" + +msgid "Storage backend" +msgstr "Serviço de armazenamento" + +msgid "Syslog Log level" +msgstr "Nível de detalhamento do serviço de registro (syslog)" + +#, fuzzy +msgid "System" +msgstr "Sistema" + +msgid "" +"The Radicale Project is a complete CalDAV (calendar) and CardDAV (contact) " +"server solution." +msgstr "O Projeto Radicale é uma solução completa de CalDAV (agenda) e CardDAV (contatos)." + +msgid "" +"They can be viewed and edited by calendar and contact clients on mobile " +"phones or computers." +msgstr "Eles podem ser visualizados e editados pelos clientes de agenda e de contatos em telefones celulares ou computadores." + +msgid "To edit the file follow this link!" +msgstr "Para editar o arquivo, siga este link!" + +msgid "To view latest log file follow this link!" +msgstr "Para visualizar mais recente arquivo de registros(log), siga este link!" + +msgid "Value is not a number" +msgstr "O valor não é um número" + +msgid "Value is not an Integer >= 0 !" +msgstr "O valor não é um número natural (>=0)!" + +msgid "Value not between 0 and 300" +msgstr "Valor não está entre 0 e 300" + +msgid "Value required ! Integer >= 0 !" +msgstr "O valor é necessário! Número natural (>=0)!" + +#, fuzzy +msgid "Version" +msgstr "Versão" + +#, fuzzy +msgid "Version Information" +msgstr "Informação da Versão" + +msgid "" +"WARNING: Only 'File-system' is documented and tested by Radicale development" +msgstr "AVISO: Apenas 'Sistema de Arquivos "está documentado e testado pelo desenvolvimento do Radicale" + +#, fuzzy +msgid "Warning" +msgstr "Alerta" + +msgid "" +"You can also get groups from the user regex in the collection with {0}, {1}, " +"etc." +msgstr "Você também pode obter grupos a partir da expressão regular do usuário na coleção com {0}, {1} , etc." + +msgid "" +"You can use Python's ConfigParser interpolation values %(login)s and " +"%(path)s." +msgstr "Você pode usar a interpolação de valores %(login)s e %(path)s do ConfigParser do Python." + +msgid "crypt" +msgstr "cifrar" + +msgid "custom" +msgstr "personalizado" + +msgid "htpasswd file" +msgstr "arquivo htpasswd" + +#, fuzzy +msgid "installed" +msgstr "instalado" + +msgid "no valid path given!" +msgstr "Nenhum caminho válido foi informado!" + +#, fuzzy +msgid "or higher" +msgstr "ou maior" + +msgid "plain" +msgstr "plano" + +#, fuzzy +msgid "required" +msgstr "necessário" + +msgid "salted SHA-1" +msgstr "SHA-1 com salto" + diff --git a/package/luci/applications/luci-app-shadowsocks-libev/po/pt-br/shadowsocks-libev.po b/package/luci/applications/luci-app-shadowsocks-libev/po/pt-br/shadowsocks-libev.po new file mode 100644 index 0000000000..f2b18e374c --- /dev/null +++ b/package/luci/applications/luci-app-shadowsocks-libev/po/pt-br/shadowsocks-libev.po @@ -0,0 +1,97 @@ +msgid "" +msgstr "" +"Content-Type: text/plain; charset=UTF-8\n" +"Project-Id-Version: \n" +"POT-Creation-Date: \n" +"PO-Revision-Date: \n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Poedit 1.8.11\n" +"Last-Translator: Luiz Angelo Daros de Luca \n" +"Plural-Forms: nplurals=2; plural=(n > 1);\n" +"Language: pt_BR\n" + +msgid "Access Control" +msgstr "Controle de Acesso" + +msgid "Allow all except listed" +msgstr "Permitir todos, exceto os listados" + +msgid "Allow listed only" +msgstr "Permitir somente os listados" + +msgid "Bypassed IP" +msgstr "Endereços IP Ignorados" + +msgid "Connection Timeout" +msgstr "Tempo limite de conexão" + +msgid "Custom" +msgstr "Personalizado" + +msgid "Disabled" +msgstr "Desabilitado" + +msgid "Enable" +msgstr "Ativar" + +msgid "Enabled" +msgstr "Ativado" + +msgid "Encrypt Method" +msgstr "Método de Cifragem" + +msgid "Forwarded IP" +msgstr "Endereço IP Encaminhado" + +msgid "Forwarding Tunnel" +msgstr "Tunel para Encaminhamento" + +msgid "Global Setting" +msgstr "Opções Globais" + +msgid "Ignore List" +msgstr "Lista de Ignorados" + +msgid "LAN" +msgstr "LAN" + +msgid "LAN IP List" +msgstr "Lista de endereços IP da LAN" + +msgid "Local Port" +msgstr "Porta Local" + +msgid "Password" +msgstr "Senha" + +msgid "Relay Mode" +msgstr "Modo de Retransmissor" + +msgid "Server Address" +msgstr "Endereço do Servidor" + +msgid "Server Port" +msgstr "Porta do servidor" + +msgid "ShadowSocks-libev" +msgstr "ShadowSocks-libev" + +msgid "ShadowSocks-libev is not running" +msgstr "O serviço ShadowSocks-libev está parado" + +msgid "ShadowSocks-libev is running" +msgstr "O serviço ShadowSocks-libev está em execução." + +msgid "UDP Forward" +msgstr "Encaminhamento UDP" + +msgid "UDP Local Port" +msgstr "Porta Local UDP" + +msgid "UDP Relay" +msgstr "Retransmissão UDP" + +msgid "WAN" +msgstr "WAN" diff --git a/package/luci/applications/luci-app-shairplay/po/pt-br/shairplay.po b/package/luci/applications/luci-app-shairplay/po/pt-br/shairplay.po new file mode 100644 index 0000000000..c7d0ab18a3 --- /dev/null +++ b/package/luci/applications/luci-app-shairplay/po/pt-br/shairplay.po @@ -0,0 +1,54 @@ +msgid "" +msgstr "" +"Content-Type: text/plain; charset=UTF-8\n" +"Project-Id-Version: \n" +"POT-Creation-Date: \n" +"PO-Revision-Date: \n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Poedit 1.8.11\n" +"Last-Translator: Luiz Angelo Daros de Luca \n" +"Plural-Forms: nplurals=2; plural=(n > 1);\n" +"Language: pt_BR\n" +"X-Poedit-Bookmarks: -1,5,-1,-1,-1,-1,-1,-1,-1,-1\n" + +msgid "AO Device ID" +msgstr "Identificador do dispositivo AO" + +msgid "AO Device Name" +msgstr "Nome do dispositivo AO" + +msgid "AO Driver" +msgstr "Driver do AO" + +msgid "Airport Name" +msgstr "Nome do Airport" + +msgid "Default" +msgstr "Padrão" + +msgid "Enabled" +msgstr "Habilitado" + +msgid "HW Address" +msgstr "Endereço de Hardware" + +msgid "Password" +msgstr "Senha" + +msgid "Port" +msgstr "Porta" + +msgid "Respawn" +msgstr "Redisparar" + +msgid "Shairplay" +msgstr "Shairplay" + +msgid "" +"Shairplay is a simple AirPlay server implementation, here you can configure " +"the settings." +msgstr "" +"Shairplay é uma implementação simples de um servidor AirPlay. Aqui você pode " +"configurá-lo." diff --git a/package/luci/applications/luci-app-statistics/po/pt-br/statistics.po b/package/luci/applications/luci-app-statistics/po/pt-br/statistics.po index 3b3590f264..357f54317f 100644 --- a/package/luci/applications/luci-app-statistics/po/pt-br/statistics.po +++ b/package/luci/applications/luci-app-statistics/po/pt-br/statistics.po @@ -1,17 +1,17 @@ msgid "" msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" +"Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2009-06-10 03:41+0200\n" -"PO-Revision-Date: 2014-03-15 22:12+0200\n" -"Last-Translator: Luiz Angelo \n" -"Language-Team: LANGUAGE \n" +"PO-Revision-Date: 2017-02-22 18:27-0300\n" +"Last-Translator: Luiz Angelo Daros de Luca \n" "Language: pt_BR\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n" -"X-Generator: Pootle 2.0.6\n" +"X-Generator: Poedit 1.8.11\n" +"Language-Team: \n" msgid "Action (target)" msgstr "Ação (destino)" @@ -29,7 +29,7 @@ msgid "Add notification command" msgstr "Adicionar o comando de notificação" msgid "Aggregate number of connected users" -msgstr "" +msgstr "Numero agregado de usuários conectados" msgid "Base Directory" msgstr "Diretório Base" @@ -38,10 +38,10 @@ msgid "Basic monitoring" msgstr "Monitoramento básico" msgid "CPU Frequency" -msgstr "" +msgstr "Frequência da CPU" msgid "CPU Frequency Plugin Configuration" -msgstr "" +msgstr "Configuração do Plugin da Frequência da CPU" msgid "CPU Plugin Configuration" msgstr "Configuração do plugin CPU" @@ -134,16 +134,16 @@ msgid "Email" msgstr "Email" msgid "Empty value = monitor all" -msgstr "" +msgstr "Valor vazio = monitore todos" msgid "Enable this plugin" msgstr "Habilitar este plugin" msgid "Entropy" -msgstr "" +msgstr "Entropia" msgid "Entropy Plugin Configuration" -msgstr "" +msgstr "Configuração do Plugin de Entropia" msgid "Exec" msgstr "Exec" @@ -165,13 +165,13 @@ msgstr "" "Encaminhamento entre o endereço de escuta e os endereços dos servidores" msgid "Gather compression statistics" -msgstr "" +msgstr "Obter estatísticas sobre a compressão" msgid "General plugins" -msgstr "" +msgstr "Plugins Gerais" msgid "Generate a separate graph for each logged user" -msgstr "" +msgstr "Gerar um gráfico separado para cada usuário conectado" msgid "Graphs" msgstr "Gráficos" @@ -204,6 +204,7 @@ msgstr "" msgid "Hold Ctrl to select multiple items or to deselect entries." msgstr "" +"Segure o Ctrl para selecionar múltiplos itens ou para retirar entradas. " msgid "Host" msgstr "Equipamento" @@ -259,6 +260,8 @@ msgid "" "Max values for a period can be used instead of averages when not using 'only " "average RRAs'" msgstr "" +"Valores máximos para um período podem ser usados em vez de médias quando não " +"estiver usando 'somente RRAs de médias'" msgid "Maximum allowed connections" msgstr "Máximo de conexões permitidas" @@ -276,10 +279,10 @@ msgid "Monitor all local listen ports" msgstr "Monitorar todas as portas locais" msgid "Monitor all sensors" -msgstr "" +msgstr "Monitorar todas os sensores" msgid "Monitor device(s) / thermal zone(s)" -msgstr "" +msgstr "Dispositivo(s) de monitoramento / zona(s) térmica(s)" msgid "Monitor devices" msgstr "Monitorar dispositivos" @@ -345,13 +348,13 @@ msgid "Only create average RRAs" msgstr "Somente criar RRAs de média" msgid "OpenVPN" -msgstr "" +msgstr "OpenVPN" msgid "OpenVPN Plugin Configuration" -msgstr "" +msgstr "Configuração do Plugin do OpenVPN" msgid "OpenVPN status files" -msgstr "" +msgstr "Arquivos de estado do OpenVPN" msgid "Options" msgstr "Opções" @@ -411,13 +414,13 @@ msgid "Seconds" msgstr "Segundos" msgid "Sensor list" -msgstr "" +msgstr "Lista de sensores" msgid "Sensors" -msgstr "" +msgstr "Sensores" msgid "Sensors Plugin Configuration" -msgstr "" +msgstr "Configuração do Plugin de Sensores" msgid "Server host" msgstr "Endereço do servidor" @@ -426,13 +429,13 @@ msgid "Server port" msgstr "Porta do servidor" msgid "Setup" -msgstr "" +msgstr "Configuração" msgid "Shaping class monitoring" msgstr "Monitoramento das Classes de Shaping" msgid "Show max values instead of averages" -msgstr "" +msgstr "Mostrar valores máximos em vez de médias" msgid "Socket file" msgstr "Arquivo do socket" @@ -456,10 +459,10 @@ msgid "Specifies what information to collect about the global topology." msgstr "Especifica quais informações serão coletadas sobre a topologia global." msgid "Splash Leases" -msgstr "" +msgstr "Concessões do Splash" msgid "Splash Leases Plugin Configuration" -msgstr "" +msgstr "Configuração do Plugin das Concessões do Splash" msgid "Statistics" msgstr "Estatística" @@ -508,6 +511,7 @@ msgid "" "The OpenVPN plugin gathers information about the current vpn connection " "status." msgstr "" +"O plugin OpenVPN reúne informações sobre o status atual da conexão VPN." msgid "" "The conntrack plugin collects statistics about the number of tracked " @@ -560,7 +564,7 @@ msgstr "" "Plugin::Collectd mas pode ser utilizado de outras maneiras também." msgid "The entropy plugin collects statistics about the available entropy." -msgstr "" +msgstr "O plugin de entropia coleta estatísticas sobre a entropia disponível." msgid "" "The exec plugin starts external commands to read values from or to notify " @@ -651,17 +655,24 @@ msgid "" "The sensors plugin uses the Linux Sensors framework to gather environmental " "statistics." msgstr "" +"O plugin de sensores usa a estrutura de sensores do Linux para coletar " +"estatísticas ambientais." msgid "" "The splash leases plugin uses libuci to collect statistics about splash " "leases." msgstr "" +"O plug-in de concessões splash usa o libuci para coletar estatísticas sobre " +"concessões de splash." msgid "" "The statistics package uses Collectd " "to gather data and RRDtool to " "render diagram images." msgstr "" +"O pacote de estatísticas usa Collectd para coletar dados e RRDtool para desenhar os gráficos." msgid "" "The tcpconns plugin collects informations about open tcp connections on " @@ -675,6 +686,9 @@ msgid "" "read from /sys/class/thermal/*/temp ( '*' denotes the thermal device to be " "read, e.g. thermal_zone1 )" msgstr "" +"O plugin térmico monitorará a temperatura do sistema. Os dados são " +"tipicamente lidos de /sys/class/thermal/*/temp ('*' indica o dispositivo " +"térmico a ser lido, ex:, thermal_zone1)" msgid "" "The unixsock plugin creates a unix socket which can be used to read " @@ -685,15 +699,19 @@ msgstr "" msgid "The uptime plugin collects statistics about the uptime of the system." msgstr "" +"O plugin de tempo de atividade coleta estatísticas sobre o tempo de " +"atividade do sistema." msgid "Thermal" -msgstr "" +msgstr "Térmico" msgid "Thermal Plugin Configuration" -msgstr "" +msgstr "Configuração do Plugin Térmico" msgid "This plugin collects statistics about the processor frequency scaling." msgstr "" +"Este plugin coleta as estatísticas sobre o escalonamento da frequência do " +"processador." msgid "" "This section defines on which interfaces collectd will wait for incoming " @@ -727,13 +745,13 @@ msgid "Unixsock Plugin Configuration" msgstr "Configuração do plugin Unixsock" msgid "Uptime" -msgstr "" +msgstr "Tempo de atividade" msgid "Uptime Plugin Configuration" -msgstr "" +msgstr "Configuração do Plugin de Tempo de Atividade" msgid "Use improved naming schema" -msgstr "" +msgstr "Use um esquema de nomeação melhorado" msgid "Used PID file" msgstr "Arquivo PID usado" @@ -753,6 +771,8 @@ msgstr "Configuração do Plugin iwinfo da Rede Sem Fio (Wireless)" msgid "" "You can install additional collectd-mod-* plugins to enable more statistics." msgstr "" +"Você pode instalar plugins adicionais (collectd-mod-*) para habilitar mais " +"estatísticas." msgid "e.g. br-ff" msgstr "ex: br-ff" @@ -775,6 +795,15 @@ msgstr "segundos; vários valores, separar com espaço" msgid "server interfaces" msgstr "interfaces do servidor" +#~ msgid "" +#~ "Note: as pages are rendered by user 'nobody', the *.rrd files, the " +#~ "storage directory and all its parent directories need to be world " +#~ "readable." +#~ msgstr "" +#~ "Nota: como as páginas são renderizadas pelo usuário 'nobody', os arquivos " +#~ "* .rrd, o diretório de armazenamento e todos os seus diretórios " +#~ "superiores precisam ser legíveis a todos." + #~ msgid "Collectd" #~ msgstr "Coletar" diff --git a/package/luci/applications/luci-app-travelmate/luasrc/model/cbi/travelmate.lua b/package/luci/applications/luci-app-travelmate/luasrc/model/cbi/travelmate.lua index 9050ae9686..fa44d4b523 100644 --- a/package/luci/applications/luci-app-travelmate/luasrc/model/cbi/travelmate.lua +++ b/package/luci/applications/luci-app-travelmate/luasrc/model/cbi/travelmate.lua @@ -18,17 +18,17 @@ o = s:option(Flag, "trm_enabled", translate("Enable Travelmate")) o.rmempty = false o.default = 0 -o = s:option(Value, "trm_loop", translate("Loop timeout in seconds for wlan monitoring"), - translate("Default 30, range 5-60")) +o = s:option(Value, "trm_maxwait", translate("Max. timeout in seconds for wlan interface reload"), + translate("Default 20, range 10-60")) o.rmempty = false -o.default = 30 -o.datatype = "range(5,60)" +o.default = 20 +o.datatype = "range(10,60)" o = s:option(Value, "trm_maxretry", translate("Max. number of connection retries to an uplink"), - translate("Default 3, range 0-10. Set to 0 to allow unlimited retries")) + translate("Default 3, range 1-10")) o.rmempty = false o.default = 3 -o.datatype = "range(0,10)" +o.datatype = "range(1,10)" -- Extra options @@ -38,8 +38,8 @@ a = e:option(Flag, "trm_debug", translate("Debug logging")) a.rmempty = true a.default = a.disabled -a = e:option(Value, "trm_device", translate("Use only one radio, e.g. 'radio0'"), - translate("Default: empty = use all radios.")) +a = e:option(Value, "trm_iface", translate("Restrict reload trigger to certain interface(s)"), + translate("Space separated list of wwan interfaces that trigger reload action. To disable reload trigger set it to 'false'. Default: empty")) a.rmempty = true a.default = "" a.datatype = "uciname" diff --git a/package/luci/applications/luci-app-travelmate/po/ja/travelmate.po b/package/luci/applications/luci-app-travelmate/po/ja/travelmate.po index 986d7b32b6..de1aceed95 100644 --- a/package/luci/applications/luci-app-travelmate/po/ja/travelmate.po +++ b/package/luci/applications/luci-app-travelmate/po/ja/travelmate.po @@ -32,14 +32,11 @@ msgstr "トラベル ルータ機能を有効にする、Travelmate パッケー msgid "Debug logging" msgstr "デバッグ ログ" -msgid "Default 3, range 0-10. Set to 0 to allow unlimited retries" -msgstr "既定値 3、範囲 0 - 10。再試行回数を制限しない場合、0 に設定します。" +msgid "Default 20, range 10-60" +msgstr "既定値 20、範囲 10 - 60" -msgid "Default 30, range 5-60" -msgstr "既定値 30、範囲 5 - 60" - -msgid "Default: empty = use all radios." -msgstr "デフォルト:(空)= 全ての無線を使用" +msgid "Default 3, range 1-10" +msgstr "既定値 3、範囲 1 - 10" msgid "Disable this if you want to use iwinfo instead of iw" msgstr "iw の代わりに iwinfo を使用したい場合、この設定を無効にします。" @@ -56,17 +53,39 @@ msgstr "全般オプション" msgid "Link to detailed advice" msgstr "詳細な解説へのリンク" -msgid "Loop timeout in seconds for wlan monitoring" -msgstr "無線LAN モニターのループ タイムアウト(秒)" - msgid "Max. number of connection retries to an uplink" msgstr "確立までの接続試行回数" +msgid "Max. timeout in seconds for wlan interface reload" +msgstr "無線LANインターフェース リロード時の最大待機時間(秒)" + +msgid "Restrict reload trigger to certain interface(s)" +msgstr "リロード トリガを特定のインターフェースに限定する" + +msgid "" +"Space separated list of wwan interfaces that trigger reload action. To " +"disable reload trigger set it to 'false'. Default: empty" +msgstr "" +"リロード動作のトリガとなる、スペースで区切られたWWAN インターフェースのリスト" +"です。リロードのトリガを無効にするには、'false' を設定します。既定値:(空)" + msgid "Travelmate" msgstr "Travelmate" msgid "Use iw for scanning" msgstr "スキャンに iw を使用する" -msgid "Use only one radio, e.g. 'radio0'" -msgstr "単一の無線のみ使用する 例: 'radio0'" +#~ msgid "Default 3, range 0-10. Set to 0 to allow unlimited retries" +#~ msgstr "既定値 3、範囲 0 - 10。再試行回数を制限しない場合、0 に設定します。" + +#~ msgid "Default 30, range 5-60" +#~ msgstr "既定値 30、範囲 5 - 60" + +#~ msgid "Default: empty = use all radios." +#~ msgstr "デフォルト:(空)= 全ての無線を使用" + +#~ msgid "Loop timeout in seconds for wlan monitoring" +#~ msgstr "無線LAN モニターのループ タイムアウト(秒)" + +#~ msgid "Use only one radio, e.g. 'radio0'" +#~ msgstr "単一の無線のみ使用する 例: 'radio0'" diff --git a/package/luci/applications/luci-app-travelmate/po/pt-br/travelmate.po b/package/luci/applications/luci-app-travelmate/po/pt-br/travelmate.po new file mode 100644 index 0000000000..bcfc1cfa2f --- /dev/null +++ b/package/luci/applications/luci-app-travelmate/po/pt-br/travelmate.po @@ -0,0 +1,78 @@ +msgid "" +msgstr "" +"Content-Type: text/plain; charset=UTF-8\n" +"Project-Id-Version: \n" +"POT-Creation-Date: \n" +"PO-Revision-Date: \n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Poedit 1.8.11\n" +"Last-Translator: Luiz Angelo Daros de Luca \n" +"Plural-Forms: nplurals=2; plural=(n > 1);\n" +"Language: pt_BR\n" + +msgid "" +"Brief advice: Create a wwan interface, configure it to use dhcp and add it " +"to the wan zone in firewall. Create the wifi interfaces to be used ('client' " +"mode, assigned to wwan network, left as disabled). Travelmate will try to " +"connect to the known wifi client interfaces in the defined order." +msgstr "" +"Breve conselho: Crie uma interface wwan, configure-a para usar DHCP e " +"adicione-a à zona wan no firewall. Crie as interfaces wifi a serem usadas " +"(modo 'cliente', atribuído à rede wwan, deixado como desativado). O " +"Travelmate tentará se conectar às interfaces de cliente wifi conhecidas na " +"ordem definida." + +msgid "" +"Configuration of the Travelmate package to enable travel router " +"functionality." +msgstr "" +"Configuração do pacote Travelmate para permitir a funcionalidade de roteador " +"de viagem." + +msgid "Debug logging" +msgstr "Registros(log) para depuração" + +msgid "Default 20, range 10-60" +msgstr "Padrão 20, faixa 10-60" + +msgid "Default 3, range 1-10" +msgstr "Padrão 3, faixa 1-10" + +msgid "Disable this if you want to use iwinfo instead of iw" +msgstr "Desabilite isto se você quer usar o iwinfo ao invés do iw" + +msgid "Enable Travelmate" +msgstr "Habilitar o Travelmate" + +msgid "Extra options" +msgstr "Opções adicionais" + +msgid "Global options" +msgstr "Opções Globais" + +msgid "Link to detailed advice" +msgstr "Endereço para conselhos detalhados" + +msgid "Max. number of connection retries to an uplink" +msgstr "Máximo número de tentativas de conexão para um enlace" + +msgid "Max. timeout in seconds for wlan interface reload" +msgstr "Tempo limite máximo em segundos para recarregar a interface wlan" + +msgid "Restrict reload trigger to certain interface(s)" +msgstr "Restringir o gatilho de recarga para somente alguma(s) interface(s)" + +msgid "" +"Space separated list of wwan interfaces that trigger reload action. To " +"disable reload trigger set it to 'false'. Default: empty" +msgstr "" +"Lista separada por espaços de interfaces wwan que acionam a ação de recarga. " +"Para desabilitar o gatilho de recarga, defina-o como 'false'. Padrão: vazio" + +msgid "Travelmate" +msgstr "Travelmate" + +msgid "Use iw for scanning" +msgstr "Use o iw para escaneamento" diff --git a/package/luci/applications/luci-app-travelmate/po/templates/travelmate.pot b/package/luci/applications/luci-app-travelmate/po/templates/travelmate.pot index 533b3e2639..20628196b6 100644 --- a/package/luci/applications/luci-app-travelmate/po/templates/travelmate.pot +++ b/package/luci/applications/luci-app-travelmate/po/templates/travelmate.pot @@ -16,13 +16,10 @@ msgstr "" msgid "Debug logging" msgstr "" -msgid "Default 3, range 0-10. Set to 0 to allow unlimited retries" +msgid "Default 20, range 10-60" msgstr "" -msgid "Default 30, range 5-60" -msgstr "" - -msgid "Default: empty = use all radios." +msgid "Default 3, range 1-10" msgstr "" msgid "Disable this if you want to use iwinfo instead of iw" @@ -40,17 +37,22 @@ msgstr "" msgid "Link to detailed advice" msgstr "" -msgid "Loop timeout in seconds for wlan monitoring" +msgid "Max. number of connection retries to an uplink" msgstr "" -msgid "Max. number of connection retries to an uplink" +msgid "Max. timeout in seconds for wlan interface reload" msgstr "" -msgid "Travelmate" +msgid "Restrict reload trigger to certain interface(s)" msgstr "" -msgid "Use iw for scanning" +msgid "" +"Space separated list of wwan interfaces that trigger reload action. To " +"disable reload trigger set it to 'false'. Default: empty" msgstr "" -msgid "Use only one radio, e.g. 'radio0'" +msgid "Travelmate" +msgstr "" + +msgid "Use iw for scanning" msgstr "" diff --git a/package/luci/applications/luci-app-uhttpd/po/pt-br/uhttpd.po b/package/luci/applications/luci-app-uhttpd/po/pt-br/uhttpd.po new file mode 100644 index 0000000000..af68b9e140 --- /dev/null +++ b/package/luci/applications/luci-app-uhttpd/po/pt-br/uhttpd.po @@ -0,0 +1,208 @@ +msgid "" +msgstr "" +"Content-Type: text/plain; charset=UTF-8\n" +"Project-Id-Version: \n" +"POT-Creation-Date: \n" +"PO-Revision-Date: \n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Poedit 1.8.11\n" +"Last-Translator: Luiz Angelo Daros de Luca \n" +"Plural-Forms: nplurals=2; plural=(n > 1);\n" +"Language: pt_BR\n" + +msgid "" +"(/old/path=/new/path) or (just /old/path which becomes /cgi-prefix/old/path)" +msgstr "" +"(/old/path=/new/path) ou (just /old/path que se torna /cgi-prefix/old/path)" + +msgid "404 Error" +msgstr "Erro 404" + +msgid "A lightweight single-threaded HTTP(S) server" +msgstr "Um servidor HTTP(S) leve de únida thread." + +msgid "Advanced Settings" +msgstr "Opções Avançadas" + +msgid "Aliases" +msgstr "Pseudônimos (Aliases)" + +msgid "Base directory for files to be served" +msgstr "Diretório Base para publicar arquivos" + +msgid "Bind to specific interface:port (by specifying interface address" +msgstr "" +"Escute em uma interface:porta específica (especificando o endereço da " +"interface" + +msgid "CGI filetype handler" +msgstr "Interpretador de tipo de arquivo CGI" + +msgid "CGI is disabled if not present." +msgstr "O CGI estará desabilitado se não presente." + +msgid "Config file (e.g. for credentials for Basic Auth)" +msgstr "Arquivo de configuração (ex: credenciais para autenticação básica)" + +msgid "Connection reuse" +msgstr "Reutilizar conexão" + +msgid "Country" +msgstr "País" + +msgid "Disable JSON-RPC authorization via ubus session API" +msgstr "Desabilita a autorização JSON-RPC através da API de sessão ubus" + +msgid "Do not follow symlinks outside document root" +msgstr "Não siga ligações simbólicas (symlinks) para fora do documento raiz" + +msgid "Do not generate directory listings." +msgstr "Não gere listagens de diretórios" + +msgid "Document root" +msgstr "Documento Raiz" + +msgid "E.g specify with index.html and index.php when using PHP" +msgstr "Ex: use index.html e index.php quando usar PHP" + +msgid "Embedded Lua interpreter is disabled if not present." +msgstr "O interpretador Lua embutido será desabilitado se não presente." + +msgid "Enable JSON-RPC Cross-Origin Resource Support" +msgstr "Habilite o suporte para recursos JSON-RPC de origem cruzada" + +msgid "For settings primarily geared to serving more than the web UI" +msgstr "Para ajustes envolvidos com mais do que prover a interface web" + +msgid "Full Web Server Settings" +msgstr "Configurações Completas do Servidor Web" + +msgid "Full real path to handler for Lua scripts" +msgstr "Caminho completo para o interpretador de scripts Lua" + +msgid "General Settings" +msgstr "Configurações Gerais" + +msgid "HTTP listeners (address:port)" +msgstr "Escutas do HTTP (endereço:porta)" + +msgid "HTTPS Certificate (DER Encoded)" +msgstr "Certificado do HTTPS (codificado em formato PEM)" + +msgid "HTTPS Private Key (DER Encoded)" +msgstr "Chave Privada do HTTPS (codificado como DER)" + +msgid "HTTPS listener (address:port)" +msgstr "Escuta do HTTPS (endereço:porta)" + +msgid "Ignore private IPs on public interface" +msgstr "Ignore endereços IP privados na interface pública" + +msgid "Index page(s)" +msgstr "Página(s) Índice(s)" + +msgid "" +"Interpreter to associate with file endings ('suffix=handler', e.g. '.php=/" +"usr/bin/php-cgi')" +msgstr "" +"Interpretador para associar com extensões de arquivos " +"('extensão=interpretador', ex: '.php=/usr/bin/php-cgi')" + +msgid "Length of key in bits" +msgstr "Comprimento da chave em bits" + +msgid "Location" +msgstr "Localização" + +msgid "Maximum number of connections" +msgstr "Número máximo de requisições para script" + +msgid "Maximum number of script requests" +msgstr "Número máximo de requisições para script" + +msgid "Maximum wait time for Lua, CGI, or ubus execution" +msgstr "Tempo máximo de espera para execuções de Lua, CGI ou ubus" + +msgid "Maximum wait time for network activity" +msgstr "Tempo máximo de espera para atividade na rede" + +msgid "Override path for ubus socket" +msgstr "Sobrescrever o caminho do socket ubus" + +msgid "Path prefix for CGI scripts" +msgstr "Prefixo do caminho para scripts CGI" + +msgid "" +"Prevent access from private (RFC1918) IPs on an interface if it has an " +"public IP address" +msgstr "" +"Evite acesso de endereços privados (RFC1918) na interface que tem um " +"endereço IP público" + +msgid "Realm for Basic Auth" +msgstr "Reino para Autenticação Simples" + +msgid "Redirect all HTTP to HTTPS" +msgstr "Redirecionar todo tráfego HTTP para HTTPS" + +msgid "Remove configuration for certificate and key" +msgstr "Remove a configuração para o certificado e chave" + +msgid "Remove old certificate and key" +msgstr "Remove os certificados e chaves antigas" + +msgid "Server Hostname" +msgstr "Nome do Servidor" + +msgid "" +"Settings which are either rarely needed or which affect serving the WebUI" +msgstr "Ajustes que são raramente usadas ou que afetam a interface web" + +msgid "State" +msgstr "Estado" + +msgid "TCP Keepalive" +msgstr "Manter conexões TCP abertas (Keepalive)" + +msgid "This permanently deletes the cert, key, and configuration to use same." +msgstr "Isto apaga permanentemente o certificado, a chave e a configuração." + +msgid "Valid for # of Days" +msgstr "Valido por # dias" + +msgid "" +"Virtual URL or CGI script to display on status '404 Not Found'. Must begin " +"with '/'" +msgstr "" +"URL virtual ou script CGI para mostrar quando ocorrer erro '404 Não " +"Encontrado'. Deve começar com '/'" + +msgid "Virtual path prefix for Lua scripts" +msgstr "Prefixo do caminho virtual para scripts Lua" + +msgid "Virtual path prefix for ubus via JSON-RPC integration" +msgstr "Prefixo do caminho virtual para o ubus através da integração JSON-RPC" + +msgid "Will not use HTTP authentication if not present" +msgstr "Não usar autenticação HTTP se não presente" + +msgid "a.k.a CommonName" +msgstr "também conhecido como Nome Comum" + +msgid "uHTTPd" +msgstr "uHTTPd" + +msgid "uHTTPd Self-signed Certificate Parameters" +msgstr "Parâmetros do Certificado Auto-assinado do uHTTPd" + +msgid "" +"uHTTPd will generate a new self-signed certificate using the configuration " +"shown below." +msgstr "" +"o uHTTPd gerará um certificado auto-assinado usando a configuração mostrada " +"abaixo." + +msgid "ubus integration is disabled if not present" +msgstr "A integração com o ubus será desativada se não presente" diff --git a/package/luci/applications/luci-app-unbound/luasrc/model/cbi/unbound.lua b/package/luci/applications/luci-app-unbound/luasrc/model/cbi/unbound.lua index 6d876c2c83..847c98a3e8 100644 --- a/package/luci/applications/luci-app-unbound/luasrc/model/cbi/unbound.lua +++ b/package/luci/applications/luci-app-unbound/luasrc/model/cbi/unbound.lua @@ -5,26 +5,29 @@ m = Map("unbound", translate("Recursive DNS"), translate("Unbound is a validating, recursive, and caching DNS resolver.")) - -s = m:section(TypedSection, "unbound", translate("Unbound Settings")) -s.addremove = false -s.anonymous = true -s:tab("service", translate("Unbound Service")) -s:tab("resource", translate("Unbound Resources")) -s:tab("dnsmasq", translate("Dnsmasq Link")) +s1 = m:section(TypedSection, "unbound") +s1.addremove = false +s1.anonymous = true +s1:tab("service", translate("Basic Settings")) +s1:tab("advanced", translate("Advanced Settings")) +s1:tab("resource", translate("Resource Settings")) ---Enable Unbound +--LuCI or Not -e = s:taboption("service", Flag, "enabled", translate("Enable Unbound:"), +ena = s1:taboption("service", Flag, "enabled", translate("Enable Unbound:"), translate("Enable the initialization scripts for Unbound")) -e.rmempty = false +ena.rmempty = false -function e.cfgvalue(self, section) +mcf = s1:taboption("service", Flag, "manual_conf", translate("Manual Conf:"), + translate("Skip UCI and use /etc/unbound/unbound.conf")) +mcf.rmempty = false + +function ena.cfgvalue(self, section) return luci.sys.init.enabled("unbound") and self.enabled or self.disabled end -function e.write(self, section, value) +function ena.write(self, section, value) if value == "1" then luci.sys.init.enable("unbound") luci.sys.call("/etc/init.d/unbound start >/dev/null") @@ -36,72 +39,136 @@ function e.write(self, section, value) return Flag.write(self, section, value) end ---Service Tab - -mcf = s:taboption("service", Flag, "manual_conf", translate("Manual Conf:"), - translate("Skip UCI and use /etc/unbound/unbound.conf")) -mcf.rmempty = false +--Basic Tab -lsv = s:taboption("service", Flag, "localservice", translate("Local Service:"), +lsv = s1:taboption("service", Flag, "localservice", translate("Local Service:"), translate("Accept queries only from local subnets")) lsv.rmempty = false -qry = s:taboption("service", Flag, "query_minimize", translate("Query Minimize:"), - translate("Break down query components for small added privacy")) -qry.rmempty = false - -rlh = s:taboption("service", Flag, "rebind_localhost", translate("Block Localhost Rebind:"), +rlh = s1:taboption("service", Flag, "rebind_localhost", translate("Block Localhost Rebind:"), translate("Prevent upstream response of 127.0.0.0/8")) rlh.rmempty = false -rpv = s:taboption("service", Flag, "rebind_protection", translate("Block Private Rebind:"), +rpv = s1:taboption("service", Flag, "rebind_protection", translate("Block Private Rebind:"), translate("Prevent upstream response of RFC1918 ranges")) rpv.rmempty = false -vld = s:taboption("service", Flag, "validator", translate("Enable DNSSEC:"), +vld = s1:taboption("service", Flag, "validator", translate("Enable DNSSEC:"), translate("Enable the DNSSEC validator module")) vld.rmempty = false -nvd = s:taboption("service", Flag, "validator_ntp", translate("DNSSEC NTP Fix:"), +nvd = s1:taboption("service", Flag, "validator_ntp", translate("DNSSEC NTP Fix:"), translate("Break the loop where DNSSEC needs NTP and NTP needs DNS")) nvd.rmempty = false +nvd:depends({ validator = true }) -eds = s:taboption("service", Value, "edns_size", translate("EDNS Size:"), +eds = s1:taboption("service", Value, "edns_size", translate("EDNS Size:"), translate("Limit extended DNS packet size")) eds.datatype = "and(uinteger,min(512),max(4096))" eds.rmempty = false -prt = s:taboption("service", Value, "listen_port", translate("Listening Port:"), +prt = s1:taboption("service", Value, "listen_port", translate("Listening Port:"), translate("Choose Unbounds listening port")) prt.datatype = "port" prt.rmempty = false -tlm = s:taboption("service", Value, "ttl_min", translate("TTL Minimum:"), +tlm = s1:taboption("service", Value, "ttl_min", translate("TTL Minimum:"), translate("Prevent excessively short cache periods")) tlm.datatype = "and(uinteger,min(0),max(600))" tlm.rmempty = false -d64 = s:taboption("service", Flag, "dns64", translate("Enable DNS64:"), +--Advanced Tab + +ctl = s1:taboption("advanced", Flag, "unbound_control", translate("Unbound Control App:"), + translate("Enable unecrypted localhost access for unbound-control")) +ctl.rmempty = false + +dlk = s1:taboption("advanced", ListValue, "dhcp_link", translate("DHCP Link:"), + translate("Link to supported programs to load DHCP into DNS")) +dlk:value("none", translate("No Link")) +dlk:value("dnsmasq", "dnsmasq") +dlk:value("odhcpd", "odhcpd") +dlk.rmempty = false + +dom = s1:taboption("advanced", Value, "domain", translate("Local Domain:"), + translate("Domain suffix for this router and DHCP clients")) +dom.placeholder = "lan" +dom:depends({ dhcp_link = "none" }) +dom:depends({ dhcp_link = "odhcpd" }) + +dty = s1:taboption("advanced", ListValue, "domain_type", translate("Local Domain Type:"), + translate("How to treat queries of this local domain")) +dty:value("deny", translate("Ignored")) +dty:value("refuse", translate("Refused")) +dty:value("static", translate("Only Local")) +dty:value("transparent", translate("Also Forwarded")) +dty:depends({ dhcp_link = "none" }) +dty:depends({ dhcp_link = "odhcpd" }) + +lfq = s1:taboption("advanced", ListValue, "add_local_fqdn", translate("LAN DNS:"), + translate("How to enter the LAN or local network router in DNS")) +lfq:value("0", translate("No DNS")) +lfq:value("1", translate("Hostname, Primary Address")) +lfq:value("2", translate("Hostname, All Addresses")) +lfq:value("3", translate("Host FQDN, All Addresses")) +lfq:value("4", translate("Interface FQDN, All Addresses")) +lfq:depends({ dhcp_link = "none" }) +lfq:depends({ dhcp_link = "odhcpd" }) + +wfq = s1:taboption("advanced", ListValue, "add_wan_fqdn", translate("WAN DNS:"), + translate("Override the WAN side router entry in DNS")) +wfq:value("0", translate("Upstream")) +wfq:value("1", translate("Hostname, Primary Address")) +wfq:value("2", translate("Hostname, All Addresses")) +wfq:value("3", translate("Host FQDN, All Addresses")) +wfq:value("4", translate("Interface FQDN, All Addresses")) +wfq:depends({ dhcp_link = "none" }) +wfq:depends({ dhcp_link = "odhcpd" }) + +ctl = s1:taboption("advanced", Flag, "dhcp4_slaac6", translate("DHCPv4 to SLAAC:"), + translate("Use DHCPv4 MAC to discover IP6 hosts SLAAC (EUI64)")) +ctl.rmempty = false + +d64 = s1:taboption("advanced", Flag, "dns64", translate("Enable DNS64:"), translate("Enable the DNS64 module")) d64.rmempty = false -pfx = s:taboption("service", Value, "dns64_prefix", translate("DNS64 Prefix:"), +pfx = s1:taboption("advanced", Value, "dns64_prefix", translate("DNS64 Prefix:"), translate("Prefix for generated DNS64 addresses")) pfx.datatype = "ip6addr" pfx.placeholder = "64:ff9b::/96" pfx.optional = true -pfx:depends({ dns64 = "1" }) +pfx:depends({ dns64 = true }) + +qry = s1:taboption("advanced", Flag, "query_minimize", translate("Query Minimize:"), + translate("Break down query components for limited added privacy")) +qry.rmempty = false + +qrs = s1:taboption("advanced", Flag, "query_min_strict", translate("Strict Minimize:"), + translate("Strict version of 'query minimize' but it can break DNS")) +qrs.rmempty = false +qrs:depends({ query_minimize = true }) + +--TODO: dnsmasq needs to not reference resolve-file and get off port 53. --Resource Tuning Tab -rsn = s:taboption("resource", ListValue, "recursion", translate("Recursion Strength:"), +pro = s1:taboption("resource", ListValue, "protocol", translate("Recursion Protocol:"), + translate("Chose the protocol recursion queries leave on")) +pro:value("mixed", translate("IP4 and IP6")) +pro:value("ip6_prefer", translate("IP6 Preferred")) +pro:value("ip4_only", translate("IP4 Only")) +pro:value("ip6_only", translate("IP6 Only")) +pro.rmempty = false + +rsn = s1:taboption("resource", ListValue, "recursion", translate("Recursion Strength:"), translate("Recursion activity affects memory growth and CPU load")) rsn:value("aggressive", translate("Aggressive")) rsn:value("default", translate("Default")) rsn:value("passive", translate("Passive")) rsn.rmempty = false -rsc = s:taboption("resource", ListValue, "resource", translate("Memory Resource:"), +rsc = s1:taboption("resource", ListValue, "resource", translate("Memory Resource:"), translate("Use menu System/Processes to observe any memory growth")) rsc:value("large", translate("Large")) rsc:value("medium", translate("Medium")) @@ -109,27 +176,14 @@ rsc:value("small", translate("Small")) rsc:value("tiny", translate("Tiny")) rsc.rmempty = false -age = s:taboption("resource", Value, "root_age", translate("Root DSKEY Age:"), +ag2 = s1:taboption("resource", Value, "root_age", translate("Root DSKEY Age:"), translate("Limit days between RFC5011 to reduce flash writes")) -age.datatype = "and(uinteger,min(1),max(99))" -age:value("14", "14") -age:value("28", "28 ("..translate("default")..")") -age:value("45", "45") -age:value("90", "90") -age:value("99", "99 ("..translate("never")..")") - ---Dnsmasq Link Tab - -dld = s:taboption("dnsmasq", Flag, "dnsmasq_link_dns", translate("Link dnsmasq:"), - translate("Forward queries to dnsmasq for local clients")) -dld.rmempty = false - -dgn = s:taboption("dnsmasq", Flag, "dnsmsaq_gate_name", translate("Local Gateway Name:"), - translate("Also query dnsmasq for this hosts outbound gateway")) -dgn.rmempty = false - ---TODO: Read only repective dnsmasq options and inform user of link requirements. ---TODO: dnsmasq needs to not reference resolve-file and get off port 53. +ag2.datatype = "and(uinteger,min(1),max(99))" +ag2:value("14", "14") +ag2:value("28", "28 ("..translate("default")..")") +ag2:value("45", "45") +ag2:value("90", "90") +ag2:value("99", "99 ("..translate("never")..")") return m diff --git a/package/luci/applications/luci-app-unbound/root/etc/uci-defaults/60_luci-unbound b/package/luci/applications/luci-app-unbound/root/etc/uci-defaults/60_luci-unbound new file mode 100644 index 0000000000..cc714ac53e --- /dev/null +++ b/package/luci/applications/luci-app-unbound/root/etc/uci-defaults/60_luci-unbound @@ -0,0 +1,25 @@ +#!/bin/sh + +uci -q batch <<-EOF >/dev/null + delete ucitrack.@unbound[-1] + add ucitrack unbound + set ucitrack.@unbound[-1].init=unbound + commit ucitrack +EOF + +rm -f /tmp/luci-indexcache +[ ! -x /usr/sbin/unbound-control ] && exit 0 + +uci -q batch <<-EOF >/dev/null + set luci.unboundhosts=command + set luci.unboundhosts.name='Unbound Local Hosts' + set luci.unboundhosts.command='unbound-control -c /var/lib/unbound/unbound.conf list_local_data' + set luci.unboundzones=command + set luci.unboundzones.name='Unbound Local Zones' + set luci.unboundzones.command='unbound-control -c /var/lib/unbound/unbound.conf list_local_zones' + commit luci +EOF + +rm -f /tmp/luci-indexcache +exit 0 + diff --git a/package/luci/applications/luci-app-vpnbypass/po/pt-br/vpnbypass.po b/package/luci/applications/luci-app-vpnbypass/po/pt-br/vpnbypass.po new file mode 100644 index 0000000000..6eda027c40 --- /dev/null +++ b/package/luci/applications/luci-app-vpnbypass/po/pt-br/vpnbypass.po @@ -0,0 +1,55 @@ +msgid "" +msgstr "" +"Content-Type: text/plain; charset=UTF-8\n" +"Project-Id-Version: \n" +"POT-Creation-Date: \n" +"PO-Revision-Date: \n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Poedit 1.8.11\n" +"Last-Translator: Luiz Angelo Daros de Luca \n" +"Plural-Forms: nplurals=2; plural=(n > 1);\n" +"Language: pt_BR\n" + +msgid "Configuration of VPN Bypass Settings" +msgstr "Configurações do VPN Bypass" + +msgid "Domains to Bypass" +msgstr "Domínios para evitar a VPN" + +msgid "Domains which will be accessed directly (outside of the VPN tunnel)" +msgstr "Domínios que serão acessados diretamente (fora do túnel VPN)" + +msgid "Enable VPN Bypass" +msgstr "Habilitar o VPN Bypass" + +msgid "Local IP Subnets to Bypass" +msgstr "Subredes IP locais para evitar a VPN" + +msgid "Local IP ranges with direct internet access (outside of the VPN tunnel)" +msgstr "Faixa de endereços IP locais que terão acesso internet direto (fora do túnel VPN)" + +msgid "Local Ports to Bypass" +msgstr "Portas locais para evitar a VPN" + +msgid "Local ports to trigger VPN Bypass" +msgstr "Portas locais para disparar o VPN Bypass" + +msgid "Remote IP Subnets to Bypass" +msgstr "Subredes IP remotas para evitar a VPN" + +msgid "Remote IP ranges which will be accessed directly (outside of the VPN tunnel)" +msgstr "Faixa de endereços IP remotos que serão acessados diretamente (fora do túnel VPN)" + +msgid "Remote Ports to Bypass" +msgstr "Portas remotas para evitar a VPN" + +msgid "Remote ports to trigger VPN Bypass" +msgstr "Portas remotas para disparar o VPN Bypass" + +msgid "VPN Bypass" +msgstr "VPN Bypass" + +msgid "VPN Bypass Settings" +msgstr "Configurações do VPN Bypass" diff --git a/package/luci/applications/luci-app-watchcat/po/pt-br/watchcat.po b/package/luci/applications/luci-app-watchcat/po/pt-br/watchcat.po index fe97036379..e37066c3d9 100644 --- a/package/luci/applications/luci-app-watchcat/po/pt-br/watchcat.po +++ b/package/luci/applications/luci-app-watchcat/po/pt-br/watchcat.po @@ -1,15 +1,16 @@ msgid "" msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" -"PO-Revision-Date: 2014-03-29 23:20+0200\n" -"Last-Translator: Luiz Angelo \n" +"Project-Id-Version: \n" +"PO-Revision-Date: 2017-02-20 18:10-0300\n" +"Last-Translator: Luiz Angelo Daros de Luca \n" "Language-Team: none\n" "Language: pt_BR\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n" -"X-Generator: Pootle 2.0.6\n" +"X-Generator: Poedit 1.8.11\n" +"POT-Creation-Date: \n" msgid "Forced reboot delay" msgstr "Atraso para reinício forçado" @@ -51,15 +52,13 @@ msgstr "Período de ping" msgid "Watchcat" msgstr "Watchcat" -#, fuzzy msgid "" "Watchcat allows configuring a periodic reboot when the Internet connection " "has been lost for a certain period of time." msgstr "" -"Watchcat permite que se configure um período para reiniciar e/ou quando a " +"Watchcat permite a configuração de um período para reiniciar e/ou quando a " "conexão com à Internet foi perdida por um ser período de tempo." -#, fuzzy msgid "" "When rebooting the system, the watchcat will trigger a soft reboot. Entering " "a non zero value here will trigger a delayed hard reboot if the soft reboot " diff --git a/package/luci/applications/luci-app-wifischedule/po/pt-br/wifischedule.po b/package/luci/applications/luci-app-wifischedule/po/pt-br/wifischedule.po new file mode 100644 index 0000000000..19e31b54ca --- /dev/null +++ b/package/luci/applications/luci-app-wifischedule/po/pt-br/wifischedule.po @@ -0,0 +1,114 @@ +msgid "" +msgstr "" +"Content-Type: text/plain; charset=UTF-8\n" +"Project-Id-Version: \n" +"POT-Creation-Date: \n" +"PO-Revision-Date: \n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Poedit 1.8.11\n" +"Last-Translator: Luiz Angelo Daros de Luca \n" +"Plural-Forms: nplurals=2; plural=(n > 1);\n" +"Language: pt_BR\n" + +msgid "Activate wifi" +msgstr "Ativar a WiFi" + +msgid "Could not find required /usr/bin/wifi_schedule.sh or /sbin/wifi" +msgstr "" +"Não foi possível localizar os programas necessários '/usr/bin/wifi_schedule." +"sh' ou '/sbin/wifi'." + +msgid "Could not find required programm /usr/bin/iwinfo" +msgstr "Não foi possível localizar o programa necessário '/usr/bin/iwinfo'" + +msgid "Cron Jobs" +msgstr "Tarefas da Cron" + +msgid "Day(s) of Week" +msgstr "Dia(s) da semana" + +msgid "Defines a schedule when to turn on and off wifi." +msgstr "Define um agendamento para quando ligar ou desligar a WiFi." + +msgid "Determine Modules Automatically" +msgstr "Determinar os Módulos Automaticamente" + +msgid "Disable wifi gracefully" +msgstr "Desabilitar a WiFi amistosamente" + +msgid "Disabled wifi forced" +msgstr "WiFi foi desabilitada de forma forçada." + +msgid "Enable" +msgstr "Habilitar" + +msgid "Enable Wifi Schedule" +msgstr "Habilitar o agendamento da WiFi" + +msgid "Enable logging" +msgstr "Habilite os registros (log)" + +msgid "Force disabling wifi even if stations associated" +msgstr "Force a desativação da WiFi mesmo se existirem estações associadas " + +msgid "Friday" +msgstr "Sexta-feira" + +msgid "Global Settings" +msgstr "Configurações Globais" + +msgid "Monday" +msgstr "Segunda-Feira" + +msgid "Saturday" +msgstr "Sábado" + +msgid "Schedule" +msgstr "Agendamento" + +msgid "Schedule events" +msgstr "Eventos do agendamento" + +msgid "Start Time" +msgstr "Hora Inicial" + +msgid "Start WiFi" +msgstr "Iniciar WiFi" + +msgid "Stop Time" +msgstr "Hora Final" + +msgid "Stop WiFi" +msgstr "Parar WiFi" + +msgid "Sunday" +msgstr "Domingo" + +msgid "The value %s is invalid" +msgstr "O valor %s é inválido" + +msgid "Thursday" +msgstr "Quita-feira" + +msgid "Tuesday" +msgstr "Terça-feira" + +msgid "Unload Modules (experimental; saves more power)" +msgstr "Descarregar Módulos (experimental, poupa mais energia)" + +msgid "View Cron Jobs" +msgstr "Visualizar Tarefas da Cron" + +msgid "View Logfile" +msgstr "Visualizar o Arquivo de Registros (log)" + +msgid "Wednesday" +msgstr "Quarta-feira" + +msgid "Wifi Schedule" +msgstr "Agendamento da Wifi" + +msgid "Wifi Schedule Logfile" +msgstr "Arquivo de Registros (log) do Agendamento da Wifi" diff --git a/package/luci/applications/luci-app-wol/po/pt-br/wol.po b/package/luci/applications/luci-app-wol/po/pt-br/wol.po index 6a21a855b6..df66ad24b9 100644 --- a/package/luci/applications/luci-app-wol/po/pt-br/wol.po +++ b/package/luci/applications/luci-app-wol/po/pt-br/wol.po @@ -2,18 +2,18 @@ # msgid "" msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" +"Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2010-04-19 00:29+0200\n" -"PO-Revision-Date: 2011-10-11 20:31+0200\n" -"Last-Translator: Luiz Angelo \n" +"PO-Revision-Date: 2017-02-20 18:13-0300\n" +"Last-Translator: Luiz Angelo Daros de Luca \n" "Language-Team: none\n" "Language: pt_BR\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n" -"X-Generator: Pootle 2.0.4\n" +"X-Generator: Poedit 1.8.11\n" msgid "Broadcast on all interfaces" msgstr "Broadcast em todas as interfaces" @@ -27,12 +27,11 @@ msgstr "Computador para acordar" msgid "Network interface to use" msgstr "Interfaces de rede para usar" -#, fuzzy msgid "" "Sometimes only one of the two tools works. If one fails, try the other one" msgstr "" -"Algumas vezes, somente uma das ferramentas funciona. Se uma delas falhar, " -"tente a outra" +"Algumas vezes, somente uma das duas ferramentas funciona. Se uma delas " +"falhar, tente a outra" msgid "Specifies the interface the WoL packet is sent on" msgstr "Especifica a interface para onde os pacotes de WoL serão enviados" @@ -54,3 +53,6 @@ msgstr "Acorda um computador" msgid "WoL program" msgstr "Programa WoL" + +#~ msgid "Send to broadcast address" +#~ msgstr "Enviar para o endereço de broadcast" diff --git a/package/luci/collections/luci-ssl-openssl/Makefile b/package/luci/collections/luci-ssl-openssl/Makefile index b5f4b091b1..d1e752e8b8 100644 --- a/package/luci/collections/luci-ssl-openssl/Makefile +++ b/package/luci/collections/luci-ssl-openssl/Makefile @@ -11,10 +11,10 @@ LUCI_BASENAME:=ssl-openssl LUCI_TITLE:=LuCI with HTTPS support (OpenSSL as SSL backend) LUCI_DESCRIPTION:=LuCI with OpenSSL as the SSL backend (libustream-openssl). \ - Note: px5g still requires libmbedtls (in LEDE) or libpolarssl (in Openwrt). \ - In LEDE it is also possible to replace px5g with openssl-util as uhttpd can \ - also generate keys with openssl commandline tools if px5g is not installed. -LUCI_DEPENDS:=+luci +libustream-openssl +px5g + OpenSSL cmd tools (openssl-util) are used by uhttpd for SSL key generation \ + instead of the default px5g. (If px5g is installed, uhttpd will prefer that.) + +LUCI_DEPENDS:=+luci +libustream-openssl +openssl-util include ../../luci.mk diff --git a/package/luci/collections/luci-ssl/Makefile b/package/luci/collections/luci-ssl/Makefile index ad2acf7874..8fb8ff4627 100644 --- a/package/luci/collections/luci-ssl/Makefile +++ b/package/luci/collections/luci-ssl/Makefile @@ -10,7 +10,7 @@ LUCI_TYPE:=col LUCI_BASENAME:=ssl LUCI_TITLE:=LuCI with HTTPS support (mbedTLS as SSL backend) -LUCI_DEPENDS:=+luci +libustream-mbedtls +px5g-mbedtls +LUCI_DEPENDS:=+luci +libustream-mbedtls +px5g include ../../luci.mk diff --git a/package/luci/contrib/package/freifunk-common/Makefile b/package/luci/contrib/package/freifunk-common/Makefile index c15f02dcf6..d9bbd994a1 100644 --- a/package/luci/contrib/package/freifunk-common/Makefile +++ b/package/luci/contrib/package/freifunk-common/Makefile @@ -4,7 +4,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=freifunk-common -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME) diff --git a/package/luci/luci.mk b/package/luci/luci.mk index 69aecaa250..137886f1b3 100644 --- a/package/luci/luci.mk +++ b/package/luci/luci.mk @@ -70,7 +70,8 @@ PKG_VERSION?=$(if $(DUMP),x,$(strip $(shell \ PKG_GITBRANCH?=$(if $(DUMP),x,$(strip $(shell \ variant="LuCI"; \ if git log -1 >/dev/null 2>/dev/null; then \ - branch="$$(git symbolic-ref --short -q HEAD 2>/dev/null)"; \ + branch="$$(git branch --remote --verbose --no-abbrev --contains 2>/dev/null | \ + sed -rne 's|^[^/]+/([^ ]+) [a-f0-9]{40} .+$$|\1|p' | head -n1)"; \ if [ "$$branch" != "master" ]; then \ variant="LuCI $$branch branch"; \ else \ diff --git a/package/luci/modules/luci-base/htdocs/luci-static/resources/cbi.js b/package/luci/modules/luci-base/htdocs/luci-static/resources/cbi.js index 5790e303dd..8e66cbc380 100644 --- a/package/luci/modules/luci-base/htdocs/luci-static/resources/cbi.js +++ b/package/luci/modules/luci-base/htdocs/luci-static/resources/cbi.js @@ -118,6 +118,50 @@ var cbi_validators = { return false; }, + 'ipmask': function() + { + return cbi_validators.ipmask4.apply(this) || + cbi_validators.ipmask6.apply(this); + }, + + 'ipmask4': function() + { + var ip = this, mask = 32; + + if (ip.match(/^(\S+)\/(\S+)$/)) + { + ip = RegExp.$1; + mask = RegExp.$2; + } + + if (!isNaN(mask) && (mask < 0 || mask > 32)) + return false; + + if (isNaN(mask) && !cbi_validators.ip4addr.apply(mask)) + return false; + + return cbi_validators.ip4addr.apply(ip); + }, + + 'ipmask6': function() + { + var ip = this, mask = 128; + + if (ip.match(/^(\S+)\/(\S+)$/)) + { + ip = RegExp.$1; + mask = RegExp.$2; + } + + if (!isNaN(mask) && (mask < 0 || mask > 128)) + return false; + + if (isNaN(mask) && !cbi_validators.ip6addr.apply(mask)) + return false; + + return cbi_validators.ip6addr.apply(ip); + }, + 'port': function() { var p = Int(this); @@ -523,13 +567,6 @@ function cbi_init() { } } - nodes = document.querySelectorAll('[data-type]'); - - for (var i = 0, node; (node = nodes[i]) !== undefined; i++) { - cbi_validate_field(node, node.getAttribute('data-optional') === 'true', - node.getAttribute('data-type')); - } - nodes = document.querySelectorAll('[data-choices]'); for (var i = 0, node; (node = nodes[i]) !== undefined; i++) { @@ -562,6 +599,13 @@ function cbi_init() { cbi_dynlist_init(node, choices[2], choices[3], options); } + nodes = document.querySelectorAll('[data-type]'); + + for (var i = 0, node; (node = nodes[i]) !== undefined; i++) { + cbi_validate_field(node, node.getAttribute('data-optional') === 'true', + node.getAttribute('data-type')); + } + cbi_d_update(); } diff --git a/package/luci/modules/luci-base/luasrc/cbi/datatypes.lua b/package/luci/modules/luci-base/luasrc/cbi/datatypes.lua index 626ad91c75..036d6ff5e3 100644 --- a/package/luci/modules/luci-base/luasrc/cbi/datatypes.lua +++ b/package/luci/modules/luci-base/luasrc/cbi/datatypes.lua @@ -131,6 +131,48 @@ function ip6prefix(val) return ( val and val >= 0 and val <= 128 ) end +function ipmask(val) + return ipmask4(val) or ipmask6(val) +end + +function ipmask4(val) + local ip, mask = val:match("^([^/]+)/([^/]+)$") + local bits = tonumber(mask) + + if bits and (bits < 0 or bits > 32) then + return false + end + + if not bits and mask and not ip4addr(mask) then + return false + end + + return ip4addr(ip or val) +end + +function ipmask6(val) + local ip, mask = val:match("^([^/]+)/([^/]+)$") + local bits = tonumber(mask) + + if bits and (bits < 0 or bits > 128) then + return false + end + + if not bits and mask and not ip6addr(mask) then + return false + end + + return ip6addr(ip or val) +end + +function ip6hostid(val) + if val and val:match("^[a-fA-F0-9:]+$") and (#val > 2) then + return (ip6addr("2001:db8:0:0" .. val) or ip6addr("2001:db8:0:0:" .. val)) + end + + return false +end + function port(val) val = tonumber(val) return ( val and val >= 0 and val <= 65535 ) @@ -233,6 +275,28 @@ function wepkey(val) end end +function hexstring(val) + if val then + return (val:match("^[a-fA-F0-9]+$") ~= nil) + end + return false +end + +function hex(val, maxbytes) + maxbytes = tonumber(maxbytes) + if val and maxbytes ~= nil then + return ((val:match("^0x[a-fA-F0-9]+$") ~= nil) and (#val <= 2 + maxbytes * 2)) + end + return false +end + +function base64(val) + if val then + return (val:match("^[a-zA-Z0-9/+]+=?=?$") ~= nil) and (math.fmod(#val, 4) == 0) + end + return false +end + function string(val) return true -- Everything qualifies as valid string end @@ -378,29 +442,29 @@ function dateyyyymmdd(val) return false; end - local days_in_month = { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 } - - local function is_leap_year(year) - return (year % 4 == 0) and ((year % 100 ~= 0) or (year % 400 == 0)) - end - - function get_days_in_month(month, year) - if (month == 2) and is_leap_year(year) then - return 29 - else - return days_in_month[month] - end - end - if (year < 2015) then - return false - end - if ((month == 0) or (month > 12)) then - return false - end - if ((day == 0) or (day > get_days_in_month(month, year))) then - return false - end - return true + local days_in_month = { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 } + + local function is_leap_year(year) + return (year % 4 == 0) and ((year % 100 ~= 0) or (year % 400 == 0)) + end + + function get_days_in_month(month, year) + if (month == 2) and is_leap_year(year) then + return 29 + else + return days_in_month[month] + end + end + if (year < 2015) then + return false + end + if ((month == 0) or (month > 12)) then + return false + end + if ((day == 0) or (day > get_days_in_month(month, year))) then + return false + end + return true end return false end diff --git a/package/luci/modules/luci-base/luasrc/model/network.lua b/package/luci/modules/luci-base/luasrc/model/network.lua index 2d8336bf33..49d91b875a 100644 --- a/package/luci/modules/luci-base/luasrc/model/network.lua +++ b/package/luci/modules/luci-base/luasrc/model/network.lua @@ -950,6 +950,13 @@ function protocol.dns6addrs(self) return dns end +function protocol.ip6prefix(self) + local prefix = self:_ubus("ipv6-prefix") + if prefix and #prefix > 0 then + return "%s/%d" %{ prefix[1].address, prefix[1].mask } + end +end + function protocol.is_bridge(self) return (not self:is_virtual() and self:type() == "bridge") end diff --git a/package/luci/modules/luci-base/luasrc/view/cbi/mvalue.htm b/package/luci/modules/luci-base/luasrc/view/cbi/mvalue.htm index 246ef43aad..db17450d27 100644 --- a/package/luci/modules/luci-base/luasrc/view/cbi/mvalue.htm +++ b/package/luci/modules/luci-base/luasrc/view/cbi/mvalue.htm @@ -36,7 +36,7 @@ > <%=pcdata(self.vallist[i])%> - <% if i == self.size then write('
') end %> + <% if self.size and (i % self.size) == 0 then write('
') end %> <% end %> <% end %> diff --git a/package/luci/modules/luci-base/po/ca/base.po b/package/luci/modules/luci-base/po/ca/base.po index 044339bc0f..f72c2a634b 100644 --- a/package/luci/modules/luci-base/po/ca/base.po +++ b/package/luci/modules/luci-base/po/ca/base.po @@ -43,18 +43,45 @@ msgstr "" msgid "-- match by label --" msgstr "" +msgid "-- match by uuid --" +msgstr "" + msgid "1 Minute Load:" msgstr "Càrrega d'1 minut:" msgid "15 Minute Load:" msgstr "Càrrega de 15 minuts:" +msgid "4-character hexadecimal ID" +msgstr "" + msgid "464XLAT (CLAT)" msgstr "" msgid "5 Minute Load:" msgstr "Càrrega de 5 minuts:" +msgid "6-octet identifier as a hex string - no colons" +msgstr "" + +msgid "802.11r Fast Transition" +msgstr "" + +msgid "802.11w Association SA Query maximum timeout" +msgstr "" + +msgid "802.11w Association SA Query retry timeout" +msgstr "" + +msgid "802.11w Management Frame Protection" +msgstr "" + +msgid "802.11w maximum timeout" +msgstr "" + +msgid "802.11w retry timeout" +msgstr "" + msgid "BSSID" msgstr "BSSID" @@ -861,6 +888,9 @@ msgstr "Inhabilita el temporitzador HW-Beacon" msgid "Disabled" msgstr "Inhabilitat" +msgid "Disabled (default)" +msgstr "" + msgid "Discard upstream RFC1918 responses" msgstr "Descarta les respostes RFC1918 des de dalt" @@ -1029,6 +1059,11 @@ msgstr "Activa/Desactiva" msgid "Enabled" msgstr "Habilitat" +msgid "" +"Enables fast roaming among access points that belong to the same Mobility " +"Domain" +msgstr "" + msgid "Enables the Spanning Tree Protocol on this bridge" msgstr "Habilita l'Spanning Tree Protocol a aquest pont" @@ -1075,6 +1110,12 @@ msgstr "" msgid "External" msgstr "" +msgid "External R0 Key Holder List" +msgstr "" + +msgid "External R1 Key Holder List" +msgstr "" + msgid "External system log server" msgstr "" @@ -1325,6 +1366,9 @@ msgstr "" msgid "IKE DH Group" msgstr "" +msgid "IP Addresses" +msgstr "" + msgid "IP address" msgstr "Adreça IP" @@ -1418,6 +1462,9 @@ msgstr "" msgid "IPv6-Address" msgstr "Adreça IPv6" +msgid "IPv6-PD" +msgstr "" + msgid "IPv6-in-IPv4 (RFC4213)" msgstr "IPv6-en-IPv4 (RFC4213)" @@ -1684,6 +1731,22 @@ msgid "" "requests to" msgstr "" +msgid "" +"List of R0KHs in the same Mobility Domain.
Format: MAC-address,NAS-" +"Identifier,128-bit key as hex string.
This list is used to map R0KH-ID " +"(NAS Identifier) to a destination MAC address when requesting PMK-R1 key " +"from the R0KH that the STA used during the Initial Mobility Domain " +"Association." +msgstr "" + +msgid "" +"List of R1KHs in the same Mobility Domain.
Format: MAC-address,R1KH-ID " +"as 6 octets with colons,128-bit key as hex string.
This list is used " +"to map R1KH-ID to a destination MAC address when sending PMK-R1 key from the " +"R0KH. This is also the list of authorized R1KHs in the MD that can request " +"PMK-R1 keys." +msgstr "" + msgid "List of SSH key files for auth" msgstr "" @@ -1869,6 +1932,9 @@ msgstr "" msgid "Missing protocol extension for proto %q" msgstr "Manca l'extensió de protocol del protocol %q" +msgid "Mobility Domain" +msgstr "" + msgid "Mode" msgstr "Mode" @@ -2122,6 +2188,9 @@ msgstr "Opció canviada" msgid "Option removed" msgstr "Opció treta" +msgid "Optional" +msgstr "" + msgid "Optional, specify to override default server (tic.sixxs.net)" msgstr "" @@ -2220,6 +2289,9 @@ msgstr "PID" msgid "PIN" msgstr "PIN" +msgid "PMK R1 Push" +msgstr "" + msgid "PPP" msgstr "PPP" @@ -2349,6 +2421,9 @@ msgstr "" msgid "Pre-emtive CRC errors (CRCP_P)" msgstr "" +msgid "Prefix Delegated" +msgstr "" + msgid "Preshared Key" msgstr "" @@ -2414,6 +2489,12 @@ msgstr "" msgid "Quality" msgstr "Calidad" +msgid "R0 Key Lifetime" +msgstr "" + +msgid "R1 Key Holder" +msgstr "" + msgid "RFC3947 NAT-T mode" msgstr "" @@ -2495,6 +2576,9 @@ msgstr "" msgid "Realtime Wireless" msgstr "" +msgid "Reassociation Deadline" +msgstr "" + msgid "Rebind protection" msgstr "" @@ -2513,6 +2597,9 @@ msgstr "Rep" msgid "Receiver Antenna" msgstr "Antena receptora" +msgid "Recommended. IP addresses of the WireGuard interface." +msgstr "" + msgid "Reconnect this interface" msgstr "Reconnex aquesta interfície" @@ -2564,6 +2651,9 @@ msgstr "" msgid "Require TLS" msgstr "" +msgid "Required" +msgstr "" + msgid "Required for certain ISPs, e.g. Charter with DOCSIS 3" msgstr "Alguns ISP ho requereixen, per exemple el Charter amb DOCSIS 3" @@ -2579,6 +2669,11 @@ msgstr "" msgid "Required. Public key of peer." msgstr "" +msgid "" +"Requires the 'full' version of wpad/hostapd and support from the wifi driver " +"
(as of Feb 2017: ath9k and ath10k, in LEDE also mwlwifi and mt76)" +msgstr "" + msgid "" "Requires upstream supports DNSSEC; verify unsigned domain responses really " "come from unsigned domains" @@ -3296,6 +3391,9 @@ msgstr "UMTS/GPRS/EV-DO" msgid "USB Device" msgstr "Dispositiu USB" +msgid "USB Ports" +msgstr "" + msgid "UUID" msgstr "UUID" @@ -3397,6 +3495,11 @@ msgstr "Usat" msgid "Used Key Slot" msgstr "" +msgid "" +"Used for two different purposes: RADIUS NAS ID and 802.11r R0KH-ID. Not " +"needed with normal WPA(2)-PSK." +msgstr "" + msgid "User certificate (PEM encoded)" msgstr "" @@ -3657,6 +3760,9 @@ msgstr "fitxer DNS local" msgid "minimum 1280, maximum 1480" msgstr "" +msgid "minutes" +msgstr "" + msgid "navigation Navigation" msgstr "" @@ -3711,6 +3817,9 @@ msgstr "" msgid "tagged" msgstr "etiquetat" +msgid "time units (TUs / 1.024 ms) [1000-65535]" +msgstr "" + msgid "unknown" msgstr "desconegut" diff --git a/package/luci/modules/luci-base/po/cs/base.po b/package/luci/modules/luci-base/po/cs/base.po index 8c850a26e8..3f6a4e10b9 100644 --- a/package/luci/modules/luci-base/po/cs/base.po +++ b/package/luci/modules/luci-base/po/cs/base.po @@ -41,18 +41,45 @@ msgstr "" msgid "-- match by label --" msgstr "" +msgid "-- match by uuid --" +msgstr "" + msgid "1 Minute Load:" msgstr "Zatížení za 1 minutu:" msgid "15 Minute Load:" msgstr "Zatížení za 15 minut:" +msgid "4-character hexadecimal ID" +msgstr "" + msgid "464XLAT (CLAT)" msgstr "" msgid "5 Minute Load:" msgstr "Zatížení za 5 minut:" +msgid "6-octet identifier as a hex string - no colons" +msgstr "" + +msgid "802.11r Fast Transition" +msgstr "" + +msgid "802.11w Association SA Query maximum timeout" +msgstr "" + +msgid "802.11w Association SA Query retry timeout" +msgstr "" + +msgid "802.11w Management Frame Protection" +msgstr "" + +msgid "802.11w maximum timeout" +msgstr "" + +msgid "802.11w retry timeout" +msgstr "" + msgid "BSSID" msgstr "BSSID" @@ -867,6 +894,9 @@ msgstr "Zakázat HW-Beacon časovač" msgid "Disabled" msgstr "Zakázáno" +msgid "Disabled (default)" +msgstr "" + msgid "Discard upstream RFC1918 responses" msgstr "Vyřadit upstream RFC1918 odpovědi" @@ -1039,6 +1069,11 @@ msgstr "Povolit/Zakázat" msgid "Enabled" msgstr "Povoleno" +msgid "" +"Enables fast roaming among access points that belong to the same Mobility " +"Domain" +msgstr "" + msgid "Enables the Spanning Tree Protocol on this bridge" msgstr "Na tomto síťovém mostě povolit Spanning Tree Protocol" @@ -1087,6 +1122,12 @@ msgstr "" msgid "External" msgstr "" +msgid "External R0 Key Holder List" +msgstr "" + +msgid "External R1 Key Holder List" +msgstr "" + msgid "External system log server" msgstr "Externí protokolovací server" @@ -1336,6 +1377,9 @@ msgstr "" msgid "IKE DH Group" msgstr "" +msgid "IP Addresses" +msgstr "" + msgid "IP address" msgstr "IP adresy" @@ -1429,6 +1473,9 @@ msgstr "" msgid "IPv6-Address" msgstr "IPv6 adresa" +msgid "IPv6-PD" +msgstr "" + msgid "IPv6-in-IPv4 (RFC4213)" msgstr "IPv6-in-IPv4 (RFC4213)" @@ -1699,6 +1746,22 @@ msgstr "" "Seznam DNS serverů, na které " "přeposílat požadavky" +msgid "" +"List of R0KHs in the same Mobility Domain.
Format: MAC-address,NAS-" +"Identifier,128-bit key as hex string.
This list is used to map R0KH-ID " +"(NAS Identifier) to a destination MAC address when requesting PMK-R1 key " +"from the R0KH that the STA used during the Initial Mobility Domain " +"Association." +msgstr "" + +msgid "" +"List of R1KHs in the same Mobility Domain.
Format: MAC-address,R1KH-ID " +"as 6 octets with colons,128-bit key as hex string.
This list is used " +"to map R1KH-ID to a destination MAC address when sending PMK-R1 key from the " +"R0KH. This is also the list of authorized R1KHs in the MD that can request " +"PMK-R1 keys." +msgstr "" + msgid "List of SSH key files for auth" msgstr "" @@ -1891,6 +1954,9 @@ msgstr "" msgid "Missing protocol extension for proto %q" msgstr "Chybějící rozšíření protokolu %q" +msgid "Mobility Domain" +msgstr "" + msgid "Mode" msgstr "Mód" @@ -2143,6 +2209,9 @@ msgstr "Volba změněna" msgid "Option removed" msgstr "Volba odstraněna" +msgid "Optional" +msgstr "" + msgid "Optional, specify to override default server (tic.sixxs.net)" msgstr "" @@ -2243,6 +2312,9 @@ msgstr "PID" msgid "PIN" msgstr "PIN" +msgid "PMK R1 Push" +msgstr "" + msgid "PPP" msgstr "PPP" @@ -2372,6 +2444,9 @@ msgstr "" msgid "Pre-emtive CRC errors (CRCP_P)" msgstr "" +msgid "Prefix Delegated" +msgstr "" + msgid "Preshared Key" msgstr "" @@ -2439,6 +2514,12 @@ msgstr "" msgid "Quality" msgstr "Kvalita" +msgid "R0 Key Lifetime" +msgstr "" + +msgid "R1 Key Holder" +msgstr "" + msgid "RFC3947 NAT-T mode" msgstr "" @@ -2533,6 +2614,9 @@ msgstr "Provoz v reálném čase" msgid "Realtime Wireless" msgstr "Wireless v reálném čase" +msgid "Reassociation Deadline" +msgstr "" + msgid "Rebind protection" msgstr "Opětovné nastavení ochrany" @@ -2551,6 +2635,9 @@ msgstr "Přijmout" msgid "Receiver Antenna" msgstr "Přijímací anténa" +msgid "Recommended. IP addresses of the WireGuard interface." +msgstr "" + msgid "Reconnect this interface" msgstr "Přepojit toto rozhraní" @@ -2602,6 +2689,9 @@ msgstr "" msgid "Require TLS" msgstr "" +msgid "Required" +msgstr "" + # Charter je poskytovate msgid "Required for certain ISPs, e.g. Charter with DOCSIS 3" msgstr "Vyžadováno u některých ISP, např. Charter s DocSIS 3" @@ -2618,6 +2708,11 @@ msgstr "" msgid "Required. Public key of peer." msgstr "" +msgid "" +"Requires the 'full' version of wpad/hostapd and support from the wifi driver " +"
(as of Feb 2017: ath9k and ath10k, in LEDE also mwlwifi and mt76)" +msgstr "" + msgid "" "Requires upstream supports DNSSEC; verify unsigned domain responses really " "come from unsigned domains" @@ -3362,6 +3457,9 @@ msgstr "UMTS/GPRS/EV-DO" msgid "USB Device" msgstr "USB zařízení" +msgid "USB Ports" +msgstr "" + msgid "UUID" msgstr "UUID" @@ -3469,6 +3567,11 @@ msgstr "Použit" msgid "Used Key Slot" msgstr "" +msgid "" +"Used for two different purposes: RADIUS NAS ID and 802.11r R0KH-ID. Not " +"needed with normal WPA(2)-PSK." +msgstr "" + msgid "User certificate (PEM encoded)" msgstr "" @@ -3726,6 +3829,9 @@ msgstr "místní DNS soubor" msgid "minimum 1280, maximum 1480" msgstr "" +msgid "minutes" +msgstr "" + msgid "navigation Navigation" msgstr "" @@ -3780,6 +3886,9 @@ msgstr "" msgid "tagged" msgstr "označený" +msgid "time units (TUs / 1.024 ms) [1000-65535]" +msgstr "" + msgid "unknown" msgstr "neznámý" diff --git a/package/luci/modules/luci-base/po/de/base.po b/package/luci/modules/luci-base/po/de/base.po index e44d8bb234..ea2d7c917e 100644 --- a/package/luci/modules/luci-base/po/de/base.po +++ b/package/luci/modules/luci-base/po/de/base.po @@ -43,18 +43,45 @@ msgstr "" msgid "-- match by label --" msgstr "" +msgid "-- match by uuid --" +msgstr "" + msgid "1 Minute Load:" msgstr "Systemlast (1 Minute):" msgid "15 Minute Load:" msgstr "Systemlast (15 Minuten):" +msgid "4-character hexadecimal ID" +msgstr "" + msgid "464XLAT (CLAT)" msgstr "" msgid "5 Minute Load:" msgstr "Systemlast (5 Minuten):" +msgid "6-octet identifier as a hex string - no colons" +msgstr "" + +msgid "802.11r Fast Transition" +msgstr "" + +msgid "802.11w Association SA Query maximum timeout" +msgstr "" + +msgid "802.11w Association SA Query retry timeout" +msgstr "" + +msgid "802.11w Management Frame Protection" +msgstr "" + +msgid "802.11w maximum timeout" +msgstr "" + +msgid "802.11w retry timeout" +msgstr "" + msgid "BSSID" msgstr "BSSID" @@ -862,6 +889,9 @@ msgstr "Deaktiviere Hardware-Beacon Zeitgeber" msgid "Disabled" msgstr "Deaktiviert" +msgid "Disabled (default)" +msgstr "" + msgid "Discard upstream RFC1918 responses" msgstr "Eingehende RFC1918-Antworten verwerfen" @@ -1034,6 +1064,11 @@ msgstr "Aktivieren/Deaktivieren" msgid "Enabled" msgstr "Aktiviert" +msgid "" +"Enables fast roaming among access points that belong to the same Mobility " +"Domain" +msgstr "" + msgid "Enables the Spanning Tree Protocol on this bridge" msgstr "Aktiviert das Spanning Tree Protokoll auf dieser Netzwerkbrücke" @@ -1083,6 +1118,12 @@ msgstr "" msgid "External" msgstr "" +msgid "External R0 Key Holder List" +msgstr "" + +msgid "External R1 Key Holder List" +msgstr "" + msgid "External system log server" msgstr "Externer Protokollserver IP" @@ -1335,6 +1376,9 @@ msgstr "" msgid "IKE DH Group" msgstr "" +msgid "IP Addresses" +msgstr "" + msgid "IP address" msgstr "IP-Adresse" @@ -1428,6 +1472,9 @@ msgstr "" msgid "IPv6-Address" msgstr "IPv6-Adresse" +msgid "IPv6-PD" +msgstr "" + msgid "IPv6-in-IPv4 (RFC4213)" msgstr "IPv6-in-IPv4 (RFC4213)" @@ -1699,6 +1746,22 @@ msgstr "" "Liste von DNS-Servern an welche " "Requests weitergeleitet werden" +msgid "" +"List of R0KHs in the same Mobility Domain.
Format: MAC-address,NAS-" +"Identifier,128-bit key as hex string.
This list is used to map R0KH-ID " +"(NAS Identifier) to a destination MAC address when requesting PMK-R1 key " +"from the R0KH that the STA used during the Initial Mobility Domain " +"Association." +msgstr "" + +msgid "" +"List of R1KHs in the same Mobility Domain.
Format: MAC-address,R1KH-ID " +"as 6 octets with colons,128-bit key as hex string.
This list is used " +"to map R1KH-ID to a destination MAC address when sending PMK-R1 key from the " +"R0KH. This is also the list of authorized R1KHs in the MD that can request " +"PMK-R1 keys." +msgstr "" + msgid "List of SSH key files for auth" msgstr "" @@ -1894,6 +1957,9 @@ msgstr "" msgid "Missing protocol extension for proto %q" msgstr "Erweiterung für Protokoll %q fehlt" +msgid "Mobility Domain" +msgstr "" + msgid "Mode" msgstr "Modus" @@ -2148,6 +2214,9 @@ msgstr "Option geändert" msgid "Option removed" msgstr "Option entfernt" +msgid "Optional" +msgstr "" + msgid "Optional, specify to override default server (tic.sixxs.net)" msgstr "" @@ -2248,6 +2317,9 @@ msgstr "PID" msgid "PIN" msgstr "PIN" +msgid "PMK R1 Push" +msgstr "" + msgid "PPP" msgstr "PPP" @@ -2377,6 +2449,9 @@ msgstr "" msgid "Pre-emtive CRC errors (CRCP_P)" msgstr "" +msgid "Prefix Delegated" +msgstr "" + msgid "Preshared Key" msgstr "" @@ -2444,6 +2519,12 @@ msgstr "" msgid "Quality" msgstr "Qualität" +msgid "R0 Key Lifetime" +msgstr "" + +msgid "R1 Key Holder" +msgstr "" + msgid "RFC3947 NAT-T mode" msgstr "" @@ -2539,6 +2620,9 @@ msgstr "Echtzeitverkehr" msgid "Realtime Wireless" msgstr "Echtzeit-WLAN-Signal" +msgid "Reassociation Deadline" +msgstr "" + msgid "Rebind protection" msgstr "DNS-Rebind-Schutz" @@ -2557,6 +2641,9 @@ msgstr "Empfangen" msgid "Receiver Antenna" msgstr "Empfangsantenne" +msgid "Recommended. IP addresses of the WireGuard interface." +msgstr "" + msgid "Reconnect this interface" msgstr "Diese Schnittstelle neu verbinden" @@ -2608,6 +2695,9 @@ msgstr "" msgid "Require TLS" msgstr "" +msgid "Required" +msgstr "" + msgid "Required for certain ISPs, e.g. Charter with DOCSIS 3" msgstr "" "Wird von bestimmten Internet-Providern benötigt, z.B. Charter mit DOCSIS 3" @@ -2624,6 +2714,11 @@ msgstr "" msgid "Required. Public key of peer." msgstr "" +msgid "" +"Requires the 'full' version of wpad/hostapd and support from the wifi driver " +"
(as of Feb 2017: ath9k and ath10k, in LEDE also mwlwifi and mt76)" +msgstr "" + msgid "" "Requires upstream supports DNSSEC; verify unsigned domain responses really " "come from unsigned domains" @@ -3385,6 +3480,9 @@ msgstr "UMTS/GPRS/EV-DO" msgid "USB Device" msgstr "USB-Gerät" +msgid "USB Ports" +msgstr "" + msgid "UUID" msgstr "UUID" @@ -3493,6 +3591,11 @@ msgstr "Belegt" msgid "Used Key Slot" msgstr "Benutzer Schlüsselindex" +msgid "" +"Used for two different purposes: RADIUS NAS ID and 802.11r R0KH-ID. Not " +"needed with normal WPA(2)-PSK." +msgstr "" + msgid "User certificate (PEM encoded)" msgstr "" @@ -3750,6 +3853,9 @@ msgstr "Lokale DNS-Datei" msgid "minimum 1280, maximum 1480" msgstr "" +msgid "minutes" +msgstr "" + msgid "navigation Navigation" msgstr "" @@ -3804,6 +3910,9 @@ msgstr "" msgid "tagged" msgstr "tagged" +msgid "time units (TUs / 1.024 ms) [1000-65535]" +msgstr "" + msgid "unknown" msgstr "unbekannt" diff --git a/package/luci/modules/luci-base/po/el/base.po b/package/luci/modules/luci-base/po/el/base.po index a196f5b08e..8b11a99f08 100644 --- a/package/luci/modules/luci-base/po/el/base.po +++ b/package/luci/modules/luci-base/po/el/base.po @@ -43,18 +43,45 @@ msgstr "" msgid "-- match by label --" msgstr "" +msgid "-- match by uuid --" +msgstr "" + msgid "1 Minute Load:" msgstr "Φορτίο 1 λεπτού:" msgid "15 Minute Load:" msgstr "Φορτίο 15 λεπτών:" +msgid "4-character hexadecimal ID" +msgstr "" + msgid "464XLAT (CLAT)" msgstr "" msgid "5 Minute Load:" msgstr "Φορτίο 5 λεπτών:" +msgid "6-octet identifier as a hex string - no colons" +msgstr "" + +msgid "802.11r Fast Transition" +msgstr "" + +msgid "802.11w Association SA Query maximum timeout" +msgstr "" + +msgid "802.11w Association SA Query retry timeout" +msgstr "" + +msgid "802.11w Management Frame Protection" +msgstr "" + +msgid "802.11w maximum timeout" +msgstr "" + +msgid "802.11w retry timeout" +msgstr "" + msgid "BSSID" msgstr "BSSID" @@ -876,6 +903,9 @@ msgstr "Απενεργοποίηση χρονιστή HW-Beacon" msgid "Disabled" msgstr "Απενεργοποιημένο" +msgid "Disabled (default)" +msgstr "" + msgid "Discard upstream RFC1918 responses" msgstr "Αγνόησε τις απαντήσεις ανοδικής ροής RFC1918" @@ -1051,6 +1081,11 @@ msgstr "Ενεργοποίηση/Απενεργοποίηση" msgid "Enabled" msgstr "Ενεργοποιημένο" +msgid "" +"Enables fast roaming among access points that belong to the same Mobility " +"Domain" +msgstr "" + msgid "Enables the Spanning Tree Protocol on this bridge" msgstr "" @@ -1100,6 +1135,12 @@ msgstr "" msgid "External" msgstr "" +msgid "External R0 Key Holder List" +msgstr "" + +msgid "External R1 Key Holder List" +msgstr "" + msgid "External system log server" msgstr "Εξωτερικός εξυπηρετητής καταγραφής συστήματος" @@ -1349,6 +1390,9 @@ msgstr "" msgid "IKE DH Group" msgstr "" +msgid "IP Addresses" +msgstr "" + msgid "IP address" msgstr "Διεύθυνση IP" @@ -1442,6 +1486,9 @@ msgstr "" msgid "IPv6-Address" msgstr "" +msgid "IPv6-PD" +msgstr "" + msgid "IPv6-in-IPv4 (RFC4213)" msgstr "IPv6-in-IPv4 (RFC4213)" @@ -1712,6 +1759,22 @@ msgid "" "requests to" msgstr "" +msgid "" +"List of R0KHs in the same Mobility Domain.
Format: MAC-address,NAS-" +"Identifier,128-bit key as hex string.
This list is used to map R0KH-ID " +"(NAS Identifier) to a destination MAC address when requesting PMK-R1 key " +"from the R0KH that the STA used during the Initial Mobility Domain " +"Association." +msgstr "" + +msgid "" +"List of R1KHs in the same Mobility Domain.
Format: MAC-address,R1KH-ID " +"as 6 octets with colons,128-bit key as hex string.
This list is used " +"to map R1KH-ID to a destination MAC address when sending PMK-R1 key from the " +"R0KH. This is also the list of authorized R1KHs in the MD that can request " +"PMK-R1 keys." +msgstr "" + msgid "List of SSH key files for auth" msgstr "" @@ -1898,6 +1961,9 @@ msgstr "" msgid "Missing protocol extension for proto %q" msgstr "" +msgid "Mobility Domain" +msgstr "" + msgid "Mode" msgstr "Λειτουργία" @@ -2152,6 +2218,9 @@ msgstr "Η επιλογή άλλαξε" msgid "Option removed" msgstr "Η επιλογή αφαιρέθηκε" +msgid "Optional" +msgstr "" + msgid "Optional, specify to override default server (tic.sixxs.net)" msgstr "" @@ -2250,6 +2319,9 @@ msgstr "PID" msgid "PIN" msgstr "PIN" +msgid "PMK R1 Push" +msgstr "" + msgid "PPP" msgstr "PPP" @@ -2379,6 +2451,9 @@ msgstr "" msgid "Pre-emtive CRC errors (CRCP_P)" msgstr "" +msgid "Prefix Delegated" +msgstr "" + msgid "Preshared Key" msgstr "" @@ -2445,6 +2520,12 @@ msgstr "" msgid "Quality" msgstr "" +msgid "R0 Key Lifetime" +msgstr "" + +msgid "R1 Key Holder" +msgstr "" + msgid "RFC3947 NAT-T mode" msgstr "" @@ -2526,6 +2607,9 @@ msgstr "Κίνηση πραγματικού χρόνου" msgid "Realtime Wireless" msgstr "" +msgid "Reassociation Deadline" +msgstr "" + msgid "Rebind protection" msgstr "" @@ -2544,6 +2628,9 @@ msgstr "Λήψη" msgid "Receiver Antenna" msgstr "Κεραία Λήψης" +msgid "Recommended. IP addresses of the WireGuard interface." +msgstr "" + msgid "Reconnect this interface" msgstr "Επανασύνδεση της διεπαφής" @@ -2595,6 +2682,9 @@ msgstr "" msgid "Require TLS" msgstr "" +msgid "Required" +msgstr "" + msgid "Required for certain ISPs, e.g. Charter with DOCSIS 3" msgstr "" @@ -2610,6 +2700,11 @@ msgstr "" msgid "Required. Public key of peer." msgstr "" +msgid "" +"Requires the 'full' version of wpad/hostapd and support from the wifi driver " +"
(as of Feb 2017: ath9k and ath10k, in LEDE also mwlwifi and mt76)" +msgstr "" + msgid "" "Requires upstream supports DNSSEC; verify unsigned domain responses really " "come from unsigned domains" @@ -3321,6 +3416,9 @@ msgstr "UMTS/GPRS/EV-DO" msgid "USB Device" msgstr "Συσκευή USB" +msgid "USB Ports" +msgstr "" + msgid "UUID" msgstr "UUID" @@ -3422,6 +3520,11 @@ msgstr "Σε χρήση" msgid "Used Key Slot" msgstr "Χρησιμοποιούμενη Υποδοχή Κλειδιού" +msgid "" +"Used for two different purposes: RADIUS NAS ID and 802.11r R0KH-ID. Not " +"needed with normal WPA(2)-PSK." +msgstr "" + msgid "User certificate (PEM encoded)" msgstr "" @@ -3679,6 +3782,9 @@ msgstr "τοπικό αρχείο DNS" msgid "minimum 1280, maximum 1480" msgstr "" +msgid "minutes" +msgstr "" + msgid "navigation Navigation" msgstr "" @@ -3733,6 +3839,9 @@ msgstr "" msgid "tagged" msgstr "" +msgid "time units (TUs / 1.024 ms) [1000-65535]" +msgstr "" + msgid "unknown" msgstr "" diff --git a/package/luci/modules/luci-base/po/en/base.po b/package/luci/modules/luci-base/po/en/base.po index 125314d83b..e11c0faac9 100644 --- a/package/luci/modules/luci-base/po/en/base.po +++ b/package/luci/modules/luci-base/po/en/base.po @@ -43,18 +43,45 @@ msgstr "" msgid "-- match by label --" msgstr "" +msgid "-- match by uuid --" +msgstr "" + msgid "1 Minute Load:" msgstr "1 Minute Load:" msgid "15 Minute Load:" msgstr "15 Minute Load:" +msgid "4-character hexadecimal ID" +msgstr "" + msgid "464XLAT (CLAT)" msgstr "" msgid "5 Minute Load:" msgstr "5 Minute Load:" +msgid "6-octet identifier as a hex string - no colons" +msgstr "" + +msgid "802.11r Fast Transition" +msgstr "" + +msgid "802.11w Association SA Query maximum timeout" +msgstr "" + +msgid "802.11w Association SA Query retry timeout" +msgstr "" + +msgid "802.11w Management Frame Protection" +msgstr "" + +msgid "802.11w maximum timeout" +msgstr "" + +msgid "802.11w retry timeout" +msgstr "" + msgid "BSSID" msgstr "BSSID" @@ -862,6 +889,9 @@ msgstr "Disable HW-Beacon timer" msgid "Disabled" msgstr "Disabled" +msgid "Disabled (default)" +msgstr "" + msgid "Discard upstream RFC1918 responses" msgstr "" @@ -1030,6 +1060,11 @@ msgstr "Enable/Disable" msgid "Enabled" msgstr "Enabled" +msgid "" +"Enables fast roaming among access points that belong to the same Mobility " +"Domain" +msgstr "" + msgid "Enables the Spanning Tree Protocol on this bridge" msgstr "Enables the Spanning Tree Protocol on this bridge" @@ -1076,6 +1111,12 @@ msgstr "" msgid "External" msgstr "" +msgid "External R0 Key Holder List" +msgstr "" + +msgid "External R1 Key Holder List" +msgstr "" + msgid "External system log server" msgstr "" @@ -1323,6 +1364,9 @@ msgstr "" msgid "IKE DH Group" msgstr "" +msgid "IP Addresses" +msgstr "" + msgid "IP address" msgstr "IP address" @@ -1416,6 +1460,9 @@ msgstr "" msgid "IPv6-Address" msgstr "" +msgid "IPv6-PD" +msgstr "" + msgid "IPv6-in-IPv4 (RFC4213)" msgstr "" @@ -1681,6 +1728,22 @@ msgid "" "requests to" msgstr "" +msgid "" +"List of R0KHs in the same Mobility Domain.
Format: MAC-address,NAS-" +"Identifier,128-bit key as hex string.
This list is used to map R0KH-ID " +"(NAS Identifier) to a destination MAC address when requesting PMK-R1 key " +"from the R0KH that the STA used during the Initial Mobility Domain " +"Association." +msgstr "" + +msgid "" +"List of R1KHs in the same Mobility Domain.
Format: MAC-address,R1KH-ID " +"as 6 octets with colons,128-bit key as hex string.
This list is used " +"to map R1KH-ID to a destination MAC address when sending PMK-R1 key from the " +"R0KH. This is also the list of authorized R1KHs in the MD that can request " +"PMK-R1 keys." +msgstr "" + msgid "List of SSH key files for auth" msgstr "" @@ -1866,6 +1929,9 @@ msgstr "" msgid "Missing protocol extension for proto %q" msgstr "" +msgid "Mobility Domain" +msgstr "" + msgid "Mode" msgstr "Mode" @@ -2119,6 +2185,9 @@ msgstr "" msgid "Option removed" msgstr "" +msgid "Optional" +msgstr "" + msgid "Optional, specify to override default server (tic.sixxs.net)" msgstr "" @@ -2217,6 +2286,9 @@ msgstr "PID" msgid "PIN" msgstr "" +msgid "PMK R1 Push" +msgstr "" + msgid "PPP" msgstr "" @@ -2346,6 +2418,9 @@ msgstr "" msgid "Pre-emtive CRC errors (CRCP_P)" msgstr "" +msgid "Prefix Delegated" +msgstr "" + msgid "Preshared Key" msgstr "" @@ -2411,6 +2486,12 @@ msgstr "" msgid "Quality" msgstr "" +msgid "R0 Key Lifetime" +msgstr "" + +msgid "R1 Key Holder" +msgstr "" + msgid "RFC3947 NAT-T mode" msgstr "" @@ -2492,6 +2573,9 @@ msgstr "" msgid "Realtime Wireless" msgstr "" +msgid "Reassociation Deadline" +msgstr "" + msgid "Rebind protection" msgstr "" @@ -2510,6 +2594,9 @@ msgstr "Receive" msgid "Receiver Antenna" msgstr "Receiver Antenna" +msgid "Recommended. IP addresses of the WireGuard interface." +msgstr "" + msgid "Reconnect this interface" msgstr "" @@ -2561,6 +2648,9 @@ msgstr "" msgid "Require TLS" msgstr "" +msgid "Required" +msgstr "" + msgid "Required for certain ISPs, e.g. Charter with DOCSIS 3" msgstr "" @@ -2576,6 +2666,11 @@ msgstr "" msgid "Required. Public key of peer." msgstr "" +msgid "" +"Requires the 'full' version of wpad/hostapd and support from the wifi driver " +"
(as of Feb 2017: ath9k and ath10k, in LEDE also mwlwifi and mt76)" +msgstr "" + msgid "" "Requires upstream supports DNSSEC; verify unsigned domain responses really " "come from unsigned domains" @@ -3278,6 +3373,9 @@ msgstr "" msgid "USB Device" msgstr "" +msgid "USB Ports" +msgstr "" + msgid "UUID" msgstr "" @@ -3379,6 +3477,11 @@ msgstr "Used" msgid "Used Key Slot" msgstr "" +msgid "" +"Used for two different purposes: RADIUS NAS ID and 802.11r R0KH-ID. Not " +"needed with normal WPA(2)-PSK." +msgstr "" + msgid "User certificate (PEM encoded)" msgstr "" @@ -3635,6 +3738,9 @@ msgstr "local DNS file" msgid "minimum 1280, maximum 1480" msgstr "" +msgid "minutes" +msgstr "" + msgid "navigation Navigation" msgstr "" @@ -3689,6 +3795,9 @@ msgstr "" msgid "tagged" msgstr "" +msgid "time units (TUs / 1.024 ms) [1000-65535]" +msgstr "" + msgid "unknown" msgstr "" diff --git a/package/luci/modules/luci-base/po/es/base.po b/package/luci/modules/luci-base/po/es/base.po index da786b69d6..bfc0305a2e 100644 --- a/package/luci/modules/luci-base/po/es/base.po +++ b/package/luci/modules/luci-base/po/es/base.po @@ -43,18 +43,45 @@ msgstr "" msgid "-- match by label --" msgstr "" +msgid "-- match by uuid --" +msgstr "" + msgid "1 Minute Load:" msgstr "Carga a 1 minuto:" msgid "15 Minute Load:" msgstr "Carga a 15 minutos:" +msgid "4-character hexadecimal ID" +msgstr "" + msgid "464XLAT (CLAT)" msgstr "" msgid "5 Minute Load:" msgstr "Carga a 5 minutos:" +msgid "6-octet identifier as a hex string - no colons" +msgstr "" + +msgid "802.11r Fast Transition" +msgstr "" + +msgid "802.11w Association SA Query maximum timeout" +msgstr "" + +msgid "802.11w Association SA Query retry timeout" +msgstr "" + +msgid "802.11w Management Frame Protection" +msgstr "" + +msgid "802.11w maximum timeout" +msgstr "" + +msgid "802.11w retry timeout" +msgstr "" + msgid "BSSID" msgstr "" "BSSID" @@ -873,6 +900,9 @@ msgstr "Desactivar el temporizador de baliza hardware" msgid "Disabled" msgstr "Desactivar" +msgid "Disabled (default)" +msgstr "" + msgid "Discard upstream RFC1918 responses" msgstr "Descartar respuestas RFC1918 salientes" @@ -1045,6 +1075,11 @@ msgstr "Activar/Desactivar" msgid "Enabled" msgstr "Activado" +msgid "" +"Enables fast roaming among access points that belong to the same Mobility " +"Domain" +msgstr "" + msgid "Enables the Spanning Tree Protocol on this bridge" msgstr "Activa el protocol STP en este puente" @@ -1094,6 +1129,12 @@ msgstr "" msgid "External" msgstr "" +msgid "External R0 Key Holder List" +msgstr "" + +msgid "External R1 Key Holder List" +msgstr "" + msgid "External system log server" msgstr "Servidor externo de registro del sistema" @@ -1345,6 +1386,9 @@ msgstr "" msgid "IKE DH Group" msgstr "" +msgid "IP Addresses" +msgstr "" + msgid "IP address" msgstr "Dirección IP" @@ -1438,6 +1482,9 @@ msgstr "" msgid "IPv6-Address" msgstr "Dirección IPv6" +msgid "IPv6-PD" +msgstr "" + msgid "IPv6-in-IPv4 (RFC4213)" msgstr "IPv6-en-IPv4 (RFC4213)" @@ -1713,6 +1760,22 @@ msgstr "" "Lista de servidores DNS a los que " "enviar solicitudes" +msgid "" +"List of R0KHs in the same Mobility Domain.
Format: MAC-address,NAS-" +"Identifier,128-bit key as hex string.
This list is used to map R0KH-ID " +"(NAS Identifier) to a destination MAC address when requesting PMK-R1 key " +"from the R0KH that the STA used during the Initial Mobility Domain " +"Association." +msgstr "" + +msgid "" +"List of R1KHs in the same Mobility Domain.
Format: MAC-address,R1KH-ID " +"as 6 octets with colons,128-bit key as hex string.
This list is used " +"to map R1KH-ID to a destination MAC address when sending PMK-R1 key from the " +"R0KH. This is also the list of authorized R1KHs in the MD that can request " +"PMK-R1 keys." +msgstr "" + msgid "List of SSH key files for auth" msgstr "" @@ -1905,6 +1968,9 @@ msgstr "" msgid "Missing protocol extension for proto %q" msgstr "Extensión de protocolo faltante para %q" +msgid "Mobility Domain" +msgstr "" + msgid "Mode" msgstr "Modo" @@ -2157,6 +2223,9 @@ msgstr "Opción cambiada" msgid "Option removed" msgstr "Opción eliminada" +msgid "Optional" +msgstr "" + msgid "Optional, specify to override default server (tic.sixxs.net)" msgstr "" @@ -2257,6 +2326,9 @@ msgstr "PID" msgid "PIN" msgstr "PIN" +msgid "PMK R1 Push" +msgstr "" + msgid "PPP" msgstr "PPP" @@ -2386,6 +2458,9 @@ msgstr "" msgid "Pre-emtive CRC errors (CRCP_P)" msgstr "" +msgid "Prefix Delegated" +msgstr "" + msgid "Preshared Key" msgstr "" @@ -2453,6 +2528,12 @@ msgstr "" msgid "Quality" msgstr "Calidad" +msgid "R0 Key Lifetime" +msgstr "" + +msgid "R1 Key Holder" +msgstr "" + msgid "RFC3947 NAT-T mode" msgstr "" @@ -2546,6 +2627,9 @@ msgstr "Tráfico en tiempo real" msgid "Realtime Wireless" msgstr "Red inalámbrica en tiempo real" +msgid "Reassociation Deadline" +msgstr "" + msgid "Rebind protection" msgstr "Protección contra reasociación" @@ -2564,6 +2648,9 @@ msgstr "Recibir" msgid "Receiver Antenna" msgstr "Antena Receptora" +msgid "Recommended. IP addresses of the WireGuard interface." +msgstr "" + msgid "Reconnect this interface" msgstr "Reconectar esta interfaz" @@ -2615,6 +2702,9 @@ msgstr "" msgid "Require TLS" msgstr "" +msgid "Required" +msgstr "" + msgid "Required for certain ISPs, e.g. Charter with DOCSIS 3" msgstr "Necesario para ciertos ISPs, por ejemplo Charter con DOCSIS 3" @@ -2630,6 +2720,11 @@ msgstr "" msgid "Required. Public key of peer." msgstr "" +msgid "" +"Requires the 'full' version of wpad/hostapd and support from the wifi driver " +"
(as of Feb 2017: ath9k and ath10k, in LEDE also mwlwifi and mt76)" +msgstr "" + msgid "" "Requires upstream supports DNSSEC; verify unsigned domain responses really " "come from unsigned domains" @@ -3387,6 +3482,9 @@ msgstr "UMTS/GPRS/EV-DO" msgid "USB Device" msgstr "Dispositivo USB" +msgid "USB Ports" +msgstr "" + msgid "UUID" msgstr "UUID" @@ -3495,6 +3593,11 @@ msgstr "Usado" msgid "Used Key Slot" msgstr "Espacio de clave usado" +msgid "" +"Used for two different purposes: RADIUS NAS ID and 802.11r R0KH-ID. Not " +"needed with normal WPA(2)-PSK." +msgstr "" + msgid "User certificate (PEM encoded)" msgstr "" @@ -3754,6 +3857,9 @@ msgstr "Archvo DNS local" msgid "minimum 1280, maximum 1480" msgstr "" +msgid "minutes" +msgstr "" + msgid "navigation Navigation" msgstr "" @@ -3808,6 +3914,9 @@ msgstr "" msgid "tagged" msgstr "marcado" +msgid "time units (TUs / 1.024 ms) [1000-65535]" +msgstr "" + msgid "unknown" msgstr "desconocido" diff --git a/package/luci/modules/luci-base/po/fr/base.po b/package/luci/modules/luci-base/po/fr/base.po index cce8ee20ad..8e610fb864 100644 --- a/package/luci/modules/luci-base/po/fr/base.po +++ b/package/luci/modules/luci-base/po/fr/base.po @@ -43,18 +43,45 @@ msgstr "" msgid "-- match by label --" msgstr "" +msgid "-- match by uuid --" +msgstr "" + msgid "1 Minute Load:" msgstr "Charge sur 1 minute :" msgid "15 Minute Load:" msgstr "Charge sur 15 minutes :" +msgid "4-character hexadecimal ID" +msgstr "" + msgid "464XLAT (CLAT)" msgstr "" msgid "5 Minute Load:" msgstr "Charge sur 5 minutes :" +msgid "6-octet identifier as a hex string - no colons" +msgstr "" + +msgid "802.11r Fast Transition" +msgstr "" + +msgid "802.11w Association SA Query maximum timeout" +msgstr "" + +msgid "802.11w Association SA Query retry timeout" +msgstr "" + +msgid "802.11w Management Frame Protection" +msgstr "" + +msgid "802.11w maximum timeout" +msgstr "" + +msgid "802.11w retry timeout" +msgstr "" + msgid "BSSID" msgstr "BSSID" @@ -880,6 +907,9 @@ msgstr "Désactiver l'émission périodique de balises wifi (« HW-Beacon »)" msgid "Disabled" msgstr "Désactivé" +msgid "Disabled (default)" +msgstr "" + msgid "Discard upstream RFC1918 responses" msgstr "Jeter les réponses en RFC1918 amont" @@ -1055,6 +1085,11 @@ msgstr "Activer/Désactiver" msgid "Enabled" msgstr "Activé" +msgid "" +"Enables fast roaming among access points that belong to the same Mobility " +"Domain" +msgstr "" + msgid "Enables the Spanning Tree Protocol on this bridge" msgstr "" "Activer le protocole STP sur " @@ -1106,6 +1141,12 @@ msgstr "" msgid "External" msgstr "" +msgid "External R0 Key Holder List" +msgstr "" + +msgid "External R1 Key Holder List" +msgstr "" + msgid "External system log server" msgstr "Serveur distant de journaux système" @@ -1357,6 +1398,9 @@ msgstr "" msgid "IKE DH Group" msgstr "" +msgid "IP Addresses" +msgstr "" + msgid "IP address" msgstr "Adresse IP" @@ -1450,6 +1494,9 @@ msgstr "" msgid "IPv6-Address" msgstr "Adresse IPv6" +msgid "IPv6-PD" +msgstr "" + msgid "IPv6-in-IPv4 (RFC4213)" msgstr "IPv6 dans IPv4 (RFC 4213)" @@ -1724,6 +1771,22 @@ msgstr "" "Liste des serveurs auquels sont transmis les requêtes DNS" +msgid "" +"List of R0KHs in the same Mobility Domain.
Format: MAC-address,NAS-" +"Identifier,128-bit key as hex string.
This list is used to map R0KH-ID " +"(NAS Identifier) to a destination MAC address when requesting PMK-R1 key " +"from the R0KH that the STA used during the Initial Mobility Domain " +"Association." +msgstr "" + +msgid "" +"List of R1KHs in the same Mobility Domain.
Format: MAC-address,R1KH-ID " +"as 6 octets with colons,128-bit key as hex string.
This list is used " +"to map R1KH-ID to a destination MAC address when sending PMK-R1 key from the " +"R0KH. This is also the list of authorized R1KHs in the MD that can request " +"PMK-R1 keys." +msgstr "" + msgid "List of SSH key files for auth" msgstr "" @@ -1919,6 +1982,9 @@ msgstr "" msgid "Missing protocol extension for proto %q" msgstr "Extention de protocole manquante pour le proto %q" +msgid "Mobility Domain" +msgstr "" + msgid "Mode" msgstr "Mode" @@ -2170,6 +2236,9 @@ msgstr "Option modifiée" msgid "Option removed" msgstr "Option retirée" +msgid "Optional" +msgstr "" + msgid "Optional, specify to override default server (tic.sixxs.net)" msgstr "" @@ -2270,6 +2339,9 @@ msgstr "PID" msgid "PIN" msgstr "code PIN" +msgid "PMK R1 Push" +msgstr "" + msgid "PPP" msgstr "PPP" @@ -2399,6 +2471,9 @@ msgstr "" msgid "Pre-emtive CRC errors (CRCP_P)" msgstr "" +msgid "Prefix Delegated" +msgstr "" + msgid "Preshared Key" msgstr "" @@ -2466,6 +2541,12 @@ msgstr "" msgid "Quality" msgstr "Qualitée" +msgid "R0 Key Lifetime" +msgstr "" + +msgid "R1 Key Holder" +msgstr "" + msgid "RFC3947 NAT-T mode" msgstr "" @@ -2559,6 +2640,9 @@ msgstr "Trafic temps-réel" msgid "Realtime Wireless" msgstr "Qualité de réception actuelle" +msgid "Reassociation Deadline" +msgstr "" + msgid "Rebind protection" msgstr "Protection contre l'attaque « rebind »" @@ -2577,6 +2661,9 @@ msgstr "Reçoit" msgid "Receiver Antenna" msgstr "Antenne émettrice" +msgid "Recommended. IP addresses of the WireGuard interface." +msgstr "" + msgid "Reconnect this interface" msgstr "Reconnecter cet interface" @@ -2628,6 +2715,9 @@ msgstr "" msgid "Require TLS" msgstr "" +msgid "Required" +msgstr "" + msgid "Required for certain ISPs, e.g. Charter with DOCSIS 3" msgstr "Nécessaire avec certains FAIs, par ex. : Charter avec DOCSIS 3" @@ -2643,6 +2733,11 @@ msgstr "" msgid "Required. Public key of peer." msgstr "" +msgid "" +"Requires the 'full' version of wpad/hostapd and support from the wifi driver " +"
(as of Feb 2017: ath9k and ath10k, in LEDE also mwlwifi and mt76)" +msgstr "" + msgid "" "Requires upstream supports DNSSEC; verify unsigned domain responses really " "come from unsigned domains" @@ -3405,6 +3500,9 @@ msgstr "UMTS/GPRS/EV-DO" msgid "USB Device" msgstr "Périphérique USB" +msgid "USB Ports" +msgstr "" + msgid "UUID" msgstr "UUID" @@ -3514,6 +3612,11 @@ msgstr "Utilisé" msgid "Used Key Slot" msgstr "Clé utilisée" +msgid "" +"Used for two different purposes: RADIUS NAS ID and 802.11r R0KH-ID. Not " +"needed with normal WPA(2)-PSK." +msgstr "" + msgid "User certificate (PEM encoded)" msgstr "" @@ -3772,6 +3875,9 @@ msgstr "fichier de résolution local" msgid "minimum 1280, maximum 1480" msgstr "" +msgid "minutes" +msgstr "" + msgid "navigation Navigation" msgstr "" @@ -3826,6 +3932,9 @@ msgstr "" msgid "tagged" msgstr "marqué" +msgid "time units (TUs / 1.024 ms) [1000-65535]" +msgstr "" + msgid "unknown" msgstr "inconnu" diff --git a/package/luci/modules/luci-base/po/he/base.po b/package/luci/modules/luci-base/po/he/base.po index 0b11005ca0..70a1238e53 100644 --- a/package/luci/modules/luci-base/po/he/base.po +++ b/package/luci/modules/luci-base/po/he/base.po @@ -41,18 +41,45 @@ msgstr "" msgid "-- match by label --" msgstr "" +msgid "-- match by uuid --" +msgstr "" + msgid "1 Minute Load:" msgstr "עומס במשך דקה:" msgid "15 Minute Load:" msgstr "עומס במשך רבע שעה:" +msgid "4-character hexadecimal ID" +msgstr "" + msgid "464XLAT (CLAT)" msgstr "" msgid "5 Minute Load:" msgstr "עומס במשך 5 דקות:" +msgid "6-octet identifier as a hex string - no colons" +msgstr "" + +msgid "802.11r Fast Transition" +msgstr "" + +msgid "802.11w Association SA Query maximum timeout" +msgstr "" + +msgid "802.11w Association SA Query retry timeout" +msgstr "" + +msgid "802.11w Management Frame Protection" +msgstr "" + +msgid "802.11w maximum timeout" +msgstr "" + +msgid "802.11w retry timeout" +msgstr "" + msgid "BSSID" msgstr "" @@ -854,6 +881,9 @@ msgstr "" msgid "Disabled" msgstr "" +msgid "Disabled (default)" +msgstr "" + msgid "Discard upstream RFC1918 responses" msgstr "" @@ -1015,6 +1045,11 @@ msgstr "" msgid "Enabled" msgstr "אפשר" +msgid "" +"Enables fast roaming among access points that belong to the same Mobility " +"Domain" +msgstr "" + msgid "Enables the Spanning Tree Protocol on this bridge" msgstr "" @@ -1061,6 +1096,12 @@ msgstr "" msgid "External" msgstr "" +msgid "External R0 Key Holder List" +msgstr "" + +msgid "External R1 Key Holder List" +msgstr "" + msgid "External system log server" msgstr "" @@ -1306,6 +1347,9 @@ msgstr "" msgid "IKE DH Group" msgstr "" +msgid "IP Addresses" +msgstr "" + msgid "IP address" msgstr "" @@ -1399,6 +1443,9 @@ msgstr "" msgid "IPv6-Address" msgstr "" +msgid "IPv6-PD" +msgstr "" + msgid "IPv6-in-IPv4 (RFC4213)" msgstr "" @@ -1656,6 +1703,22 @@ msgid "" "requests to" msgstr "" +msgid "" +"List of R0KHs in the same Mobility Domain.
Format: MAC-address,NAS-" +"Identifier,128-bit key as hex string.
This list is used to map R0KH-ID " +"(NAS Identifier) to a destination MAC address when requesting PMK-R1 key " +"from the R0KH that the STA used during the Initial Mobility Domain " +"Association." +msgstr "" + +msgid "" +"List of R1KHs in the same Mobility Domain.
Format: MAC-address,R1KH-ID " +"as 6 octets with colons,128-bit key as hex string.
This list is used " +"to map R1KH-ID to a destination MAC address when sending PMK-R1 key from the " +"R0KH. This is also the list of authorized R1KHs in the MD that can request " +"PMK-R1 keys." +msgstr "" + msgid "List of SSH key files for auth" msgstr "" @@ -1841,6 +1904,9 @@ msgstr "" msgid "Missing protocol extension for proto %q" msgstr "" +msgid "Mobility Domain" +msgstr "" + msgid "Mode" msgstr "" @@ -2086,6 +2152,9 @@ msgstr "" msgid "Option removed" msgstr "" +msgid "Optional" +msgstr "" + msgid "Optional, specify to override default server (tic.sixxs.net)" msgstr "" @@ -2184,6 +2253,9 @@ msgstr "" msgid "PIN" msgstr "" +msgid "PMK R1 Push" +msgstr "" + msgid "PPP" msgstr "" @@ -2313,6 +2385,9 @@ msgstr "" msgid "Pre-emtive CRC errors (CRCP_P)" msgstr "" +msgid "Prefix Delegated" +msgstr "" + msgid "Preshared Key" msgstr "" @@ -2378,6 +2453,12 @@ msgstr "" msgid "Quality" msgstr "" +msgid "R0 Key Lifetime" +msgstr "" + +msgid "R1 Key Holder" +msgstr "" + msgid "RFC3947 NAT-T mode" msgstr "" @@ -2460,6 +2541,9 @@ msgstr "" msgid "Realtime Wireless" msgstr "" +msgid "Reassociation Deadline" +msgstr "" + msgid "Rebind protection" msgstr "" @@ -2478,6 +2562,9 @@ msgstr "" msgid "Receiver Antenna" msgstr "" +msgid "Recommended. IP addresses of the WireGuard interface." +msgstr "" + msgid "Reconnect this interface" msgstr "" @@ -2529,6 +2616,9 @@ msgstr "" msgid "Require TLS" msgstr "" +msgid "Required" +msgstr "" + msgid "Required for certain ISPs, e.g. Charter with DOCSIS 3" msgstr "" @@ -2544,6 +2634,11 @@ msgstr "" msgid "Required. Public key of peer." msgstr "" +msgid "" +"Requires the 'full' version of wpad/hostapd and support from the wifi driver " +"
(as of Feb 2017: ath9k and ath10k, in LEDE also mwlwifi and mt76)" +msgstr "" + msgid "" "Requires upstream supports DNSSEC; verify unsigned domain responses really " "come from unsigned domains" @@ -3236,6 +3331,9 @@ msgstr "" msgid "USB Device" msgstr "" +msgid "USB Ports" +msgstr "" + msgid "UUID" msgstr "" @@ -3337,6 +3435,11 @@ msgstr "" msgid "Used Key Slot" msgstr "" +msgid "" +"Used for two different purposes: RADIUS NAS ID and 802.11r R0KH-ID. Not " +"needed with normal WPA(2)-PSK." +msgstr "" + msgid "User certificate (PEM encoded)" msgstr "" @@ -3586,6 +3689,9 @@ msgstr "" msgid "minimum 1280, maximum 1480" msgstr "" +msgid "minutes" +msgstr "" + msgid "navigation Navigation" msgstr "" @@ -3640,6 +3746,9 @@ msgstr "" msgid "tagged" msgstr "מתויג" +msgid "time units (TUs / 1.024 ms) [1000-65535]" +msgstr "" + msgid "unknown" msgstr "" diff --git a/package/luci/modules/luci-base/po/hu/base.po b/package/luci/modules/luci-base/po/hu/base.po index 2b85df15aa..700efd964d 100644 --- a/package/luci/modules/luci-base/po/hu/base.po +++ b/package/luci/modules/luci-base/po/hu/base.po @@ -41,18 +41,45 @@ msgstr "" msgid "-- match by label --" msgstr "" +msgid "-- match by uuid --" +msgstr "" + msgid "1 Minute Load:" msgstr "Terhelés (utolsó 1 perc):" msgid "15 Minute Load:" msgstr "Terhelés (utolsó 15 perc):" +msgid "4-character hexadecimal ID" +msgstr "" + msgid "464XLAT (CLAT)" msgstr "" msgid "5 Minute Load:" msgstr "Terhelés (utolsó 5 perc):" +msgid "6-octet identifier as a hex string - no colons" +msgstr "" + +msgid "802.11r Fast Transition" +msgstr "" + +msgid "802.11w Association SA Query maximum timeout" +msgstr "" + +msgid "802.11w Association SA Query retry timeout" +msgstr "" + +msgid "802.11w Management Frame Protection" +msgstr "" + +msgid "802.11w maximum timeout" +msgstr "" + +msgid "802.11w retry timeout" +msgstr "" + msgid "BSSID" msgstr "BSSID" @@ -874,6 +901,9 @@ msgstr "Hardveres beacon időzítő letiltása" msgid "Disabled" msgstr "Letiltva" +msgid "Disabled (default)" +msgstr "" + msgid "Discard upstream RFC1918 responses" msgstr "Beérkező RFC1918 DHCP válaszok elvetése. " @@ -1048,6 +1078,11 @@ msgstr "Engedélyezés/Letiltás" msgid "Enabled" msgstr "Engedélyezve" +msgid "" +"Enables fast roaming among access points that belong to the same Mobility " +"Domain" +msgstr "" + msgid "Enables the Spanning Tree Protocol on this bridge" msgstr "A Spanning Tree prokoll engedélyezése erre a hídra" @@ -1095,6 +1130,12 @@ msgstr "A bérelt címek lejárati ideje, a minimális érték 2 perc." msgid "External" msgstr "" +msgid "External R0 Key Holder List" +msgstr "" + +msgid "External R1 Key Holder List" +msgstr "" + msgid "External system log server" msgstr "Külső rendszernapló kiszolgáló" @@ -1346,6 +1387,9 @@ msgstr "" msgid "IKE DH Group" msgstr "" +msgid "IP Addresses" +msgstr "" + msgid "IP address" msgstr "IP cím" @@ -1439,6 +1483,9 @@ msgstr "" msgid "IPv6-Address" msgstr "IPv6-cím" +msgid "IPv6-PD" +msgstr "" + msgid "IPv6-in-IPv4 (RFC4213)" msgstr "IPv6 IPv4-ben (RFC4213)" @@ -1713,6 +1760,22 @@ msgstr "" "DNS szerverek listája, ahová a " "kérések továbbításra kerülnek" +msgid "" +"List of R0KHs in the same Mobility Domain.
Format: MAC-address,NAS-" +"Identifier,128-bit key as hex string.
This list is used to map R0KH-ID " +"(NAS Identifier) to a destination MAC address when requesting PMK-R1 key " +"from the R0KH that the STA used during the Initial Mobility Domain " +"Association." +msgstr "" + +msgid "" +"List of R1KHs in the same Mobility Domain.
Format: MAC-address,R1KH-ID " +"as 6 octets with colons,128-bit key as hex string.
This list is used " +"to map R1KH-ID to a destination MAC address when sending PMK-R1 key from the " +"R0KH. This is also the list of authorized R1KHs in the MD that can request " +"PMK-R1 keys." +msgstr "" + msgid "List of SSH key files for auth" msgstr "" @@ -1908,6 +1971,9 @@ msgstr "" msgid "Missing protocol extension for proto %q" msgstr "Hiányzó protokoll kiterjesztés a %q progokoll számára" +msgid "Mobility Domain" +msgstr "" + msgid "Mode" msgstr "Mód" @@ -2160,6 +2226,9 @@ msgstr "Beállítás módosítva" msgid "Option removed" msgstr "Beállítás eltávolítva" +msgid "Optional" +msgstr "" + msgid "Optional, specify to override default server (tic.sixxs.net)" msgstr "" @@ -2260,6 +2329,9 @@ msgstr "PID" msgid "PIN" msgstr "PIN" +msgid "PMK R1 Push" +msgstr "" + msgid "PPP" msgstr "PPP" @@ -2389,6 +2461,9 @@ msgstr "" msgid "Pre-emtive CRC errors (CRCP_P)" msgstr "" +msgid "Prefix Delegated" +msgstr "" + msgid "Preshared Key" msgstr "" @@ -2456,6 +2531,12 @@ msgstr "" msgid "Quality" msgstr "Minőség" +msgid "R0 Key Lifetime" +msgstr "" + +msgid "R1 Key Holder" +msgstr "" + msgid "RFC3947 NAT-T mode" msgstr "" @@ -2550,6 +2631,9 @@ msgstr "Valósidejű forgalom" msgid "Realtime Wireless" msgstr "Valósidejű vezetéknélküli adatok" +msgid "Reassociation Deadline" +msgstr "" + msgid "Rebind protection" msgstr "Rebind elleni védelem" @@ -2568,6 +2652,9 @@ msgstr "Fogadás" msgid "Receiver Antenna" msgstr "Vevő antenna" +msgid "Recommended. IP addresses of the WireGuard interface." +msgstr "" + msgid "Reconnect this interface" msgstr "Csatlakoztassa újra az interfészt" @@ -2619,6 +2706,9 @@ msgstr "" msgid "Require TLS" msgstr "" +msgid "Required" +msgstr "" + msgid "Required for certain ISPs, e.g. Charter with DOCSIS 3" msgstr "" "Szükséges bizonyos internetszolgáltatók esetén, pl. Charter 'DOCSIS 3'-al" @@ -2635,6 +2725,11 @@ msgstr "" msgid "Required. Public key of peer." msgstr "" +msgid "" +"Requires the 'full' version of wpad/hostapd and support from the wifi driver " +"
(as of Feb 2017: ath9k and ath10k, in LEDE also mwlwifi and mt76)" +msgstr "" + msgid "" "Requires upstream supports DNSSEC; verify unsigned domain responses really " "come from unsigned domains" @@ -3393,6 +3488,9 @@ msgstr "UMTS/GPRS/EV-DO" msgid "USB Device" msgstr "USB eszköz" +msgid "USB Ports" +msgstr "" + msgid "UUID" msgstr "UUID" @@ -3501,6 +3599,11 @@ msgstr "Használt" msgid "Used Key Slot" msgstr "Használt kulcsindex" +msgid "" +"Used for two different purposes: RADIUS NAS ID and 802.11r R0KH-ID. Not " +"needed with normal WPA(2)-PSK." +msgstr "" + msgid "User certificate (PEM encoded)" msgstr "" @@ -3760,6 +3863,9 @@ msgstr "helyi DNS fájl" msgid "minimum 1280, maximum 1480" msgstr "" +msgid "minutes" +msgstr "" + msgid "navigation Navigation" msgstr "" @@ -3814,6 +3920,9 @@ msgstr "" msgid "tagged" msgstr "cimkézett" +msgid "time units (TUs / 1.024 ms) [1000-65535]" +msgstr "" + msgid "unknown" msgstr "ismeretlen" diff --git a/package/luci/modules/luci-base/po/it/base.po b/package/luci/modules/luci-base/po/it/base.po index 2f5350dd78..06ae794f85 100644 --- a/package/luci/modules/luci-base/po/it/base.po +++ b/package/luci/modules/luci-base/po/it/base.po @@ -43,18 +43,45 @@ msgstr "" msgid "-- match by label --" msgstr "" +msgid "-- match by uuid --" +msgstr "" + msgid "1 Minute Load:" msgstr "Carico in 1 minuto:" msgid "15 Minute Load:" msgstr "Carico in 15 minut:" +msgid "4-character hexadecimal ID" +msgstr "" + msgid "464XLAT (CLAT)" msgstr "" msgid "5 Minute Load:" msgstr "Carico in 5 minuti:" +msgid "6-octet identifier as a hex string - no colons" +msgstr "" + +msgid "802.11r Fast Transition" +msgstr "" + +msgid "802.11w Association SA Query maximum timeout" +msgstr "" + +msgid "802.11w Association SA Query retry timeout" +msgstr "" + +msgid "802.11w Management Frame Protection" +msgstr "" + +msgid "802.11w maximum timeout" +msgstr "" + +msgid "802.11w retry timeout" +msgstr "" + msgid "BSSID" msgstr "" "BSSID" @@ -878,6 +905,9 @@ msgstr "Disabilita Timer Beacon HW" msgid "Disabled" msgstr "Disabilitato" +msgid "Disabled (default)" +msgstr "" + msgid "Discard upstream RFC1918 responses" msgstr "Ignora risposte RFC1918 upstream" @@ -1049,6 +1079,11 @@ msgstr "Abilita/Disabilita" msgid "Enabled" msgstr "Abilitato" +msgid "" +"Enables fast roaming among access points that belong to the same Mobility " +"Domain" +msgstr "" + msgid "Enables the Spanning Tree Protocol on this bridge" msgstr "Abilita il protocollo di Spanning Tree su questo bridge" @@ -1097,6 +1132,12 @@ msgstr "" msgid "External" msgstr "" +msgid "External R0 Key Holder List" +msgstr "" + +msgid "External R1 Key Holder List" +msgstr "" + msgid "External system log server" msgstr "Server Log di Sistema esterno" @@ -1349,6 +1390,9 @@ msgstr "" msgid "IKE DH Group" msgstr "" +msgid "IP Addresses" +msgstr "" + msgid "IP address" msgstr "Indirizzo IP" @@ -1442,6 +1486,9 @@ msgstr "" msgid "IPv6-Address" msgstr "Indirizzo-IPv6" +msgid "IPv6-PD" +msgstr "" + msgid "IPv6-in-IPv4 (RFC4213)" msgstr "IPv6-in-IPv4 (RFC4213)" @@ -1715,6 +1762,22 @@ msgstr "" "Elenco di Server DNSa cui " "inoltrare le richieste in" +msgid "" +"List of R0KHs in the same Mobility Domain.
Format: MAC-address,NAS-" +"Identifier,128-bit key as hex string.
This list is used to map R0KH-ID " +"(NAS Identifier) to a destination MAC address when requesting PMK-R1 key " +"from the R0KH that the STA used during the Initial Mobility Domain " +"Association." +msgstr "" + +msgid "" +"List of R1KHs in the same Mobility Domain.
Format: MAC-address,R1KH-ID " +"as 6 octets with colons,128-bit key as hex string.
This list is used " +"to map R1KH-ID to a destination MAC address when sending PMK-R1 key from the " +"R0KH. This is also the list of authorized R1KHs in the MD that can request " +"PMK-R1 keys." +msgstr "" + msgid "List of SSH key files for auth" msgstr "" @@ -1906,6 +1969,9 @@ msgstr "" msgid "Missing protocol extension for proto %q" msgstr "" +msgid "Mobility Domain" +msgstr "" + msgid "Mode" msgstr "Modalità" @@ -2158,6 +2224,9 @@ msgstr "Opzione cambiata" msgid "Option removed" msgstr "Opzione cancellata" +msgid "Optional" +msgstr "" + msgid "Optional, specify to override default server (tic.sixxs.net)" msgstr "" @@ -2256,6 +2325,9 @@ msgstr "PID" msgid "PIN" msgstr "" +msgid "PMK R1 Push" +msgstr "" + msgid "PPP" msgstr "" @@ -2385,6 +2457,9 @@ msgstr "" msgid "Pre-emtive CRC errors (CRCP_P)" msgstr "" +msgid "Prefix Delegated" +msgstr "" + msgid "Preshared Key" msgstr "" @@ -2450,6 +2525,12 @@ msgstr "" msgid "Quality" msgstr "" +msgid "R0 Key Lifetime" +msgstr "" + +msgid "R1 Key Holder" +msgstr "" + msgid "RFC3947 NAT-T mode" msgstr "" @@ -2534,6 +2615,9 @@ msgstr "Traffico in tempo reale" msgid "Realtime Wireless" msgstr "" +msgid "Reassociation Deadline" +msgstr "" + msgid "Rebind protection" msgstr "" @@ -2552,6 +2636,9 @@ msgstr "Ricezione" msgid "Receiver Antenna" msgstr "Antenna ricevente" +msgid "Recommended. IP addresses of the WireGuard interface." +msgstr "" + msgid "Reconnect this interface" msgstr "Ricollega questa interfaccia" @@ -2603,6 +2690,9 @@ msgstr "" msgid "Require TLS" msgstr "" +msgid "Required" +msgstr "" + msgid "Required for certain ISPs, e.g. Charter with DOCSIS 3" msgstr "" @@ -2618,6 +2708,11 @@ msgstr "" msgid "Required. Public key of peer." msgstr "" +msgid "" +"Requires the 'full' version of wpad/hostapd and support from the wifi driver " +"
(as of Feb 2017: ath9k and ath10k, in LEDE also mwlwifi and mt76)" +msgstr "" + msgid "" "Requires upstream supports DNSSEC; verify unsigned domain responses really " "come from unsigned domains" @@ -3344,6 +3439,9 @@ msgstr "" msgid "USB Device" msgstr "" +msgid "USB Ports" +msgstr "" + msgid "UUID" msgstr "" @@ -3452,6 +3550,11 @@ msgstr "Usato" msgid "Used Key Slot" msgstr "Slot Chiave Usata" +msgid "" +"Used for two different purposes: RADIUS NAS ID and 802.11r R0KH-ID. Not " +"needed with normal WPA(2)-PSK." +msgstr "" + msgid "User certificate (PEM encoded)" msgstr "" @@ -3713,6 +3816,9 @@ msgstr "File DNS locale" msgid "minimum 1280, maximum 1480" msgstr "" +msgid "minutes" +msgstr "" + msgid "navigation Navigation" msgstr "" @@ -3767,6 +3873,9 @@ msgstr "" msgid "tagged" msgstr "etichettato" +msgid "time units (TUs / 1.024 ms) [1000-65535]" +msgstr "" + msgid "unknown" msgstr "sconosciuto" diff --git a/package/luci/modules/luci-base/po/ja/base.po b/package/luci/modules/luci-base/po/ja/base.po index ed72412540..96e52b013f 100644 --- a/package/luci/modules/luci-base/po/ja/base.po +++ b/package/luci/modules/luci-base/po/ja/base.po @@ -43,18 +43,45 @@ msgstr "-- デバイスで設定 --" msgid "-- match by label --" msgstr "-- ラベルで設定 --" +msgid "-- match by uuid --" +msgstr "" + msgid "1 Minute Load:" msgstr "過去1分の負荷:" msgid "15 Minute Load:" msgstr "過去15分の負荷:" +msgid "4-character hexadecimal ID" +msgstr "" + msgid "464XLAT (CLAT)" msgstr "" msgid "5 Minute Load:" msgstr "過去5分の負荷:" +msgid "6-octet identifier as a hex string - no colons" +msgstr "" + +msgid "802.11r Fast Transition" +msgstr "" + +msgid "802.11w Association SA Query maximum timeout" +msgstr "" + +msgid "802.11w Association SA Query retry timeout" +msgstr "" + +msgid "802.11w Management Frame Protection" +msgstr "" + +msgid "802.11w maximum timeout" +msgstr "" + +msgid "802.11w retry timeout" +msgstr "" + msgid "BSSID" msgstr "BSSID" @@ -873,6 +900,9 @@ msgstr "HWビーコンタイマーを無効にする" msgid "Disabled" msgstr "無効" +msgid "Disabled (default)" +msgstr "" + msgid "Discard upstream RFC1918 responses" msgstr "RFC1918の応答を破棄します" @@ -1045,6 +1075,11 @@ msgstr "有効/無効" msgid "Enabled" msgstr "有効" +msgid "" +"Enables fast roaming among access points that belong to the same Mobility " +"Domain" +msgstr "" + msgid "Enables the Spanning Tree Protocol on this bridge" msgstr "スパニングツリー・プロトコルを有効にする" @@ -1094,6 +1129,12 @@ msgstr "" msgid "External" msgstr "外部" +msgid "External R0 Key Holder List" +msgstr "" + +msgid "External R1 Key Holder List" +msgstr "" + msgid "External system log server" msgstr "外部システムログ・サーバー" @@ -1344,6 +1385,9 @@ msgstr "ハイブリッド" msgid "IKE DH Group" msgstr "" +msgid "IP Addresses" +msgstr "" + msgid "IP address" msgstr "IPアドレス" @@ -1437,6 +1481,9 @@ msgstr "" msgid "IPv6-Address" msgstr "IPv6-アドレス" +msgid "IPv6-PD" +msgstr "" + msgid "IPv6-in-IPv4 (RFC4213)" msgstr "IPv6-in-IPv4 (RFC4213)" @@ -1705,6 +1752,22 @@ msgstr "" "問い合わせを転送するDNS サーバーの" "リストを設定します" +msgid "" +"List of R0KHs in the same Mobility Domain.
Format: MAC-address,NAS-" +"Identifier,128-bit key as hex string.
This list is used to map R0KH-ID " +"(NAS Identifier) to a destination MAC address when requesting PMK-R1 key " +"from the R0KH that the STA used during the Initial Mobility Domain " +"Association." +msgstr "" + +msgid "" +"List of R1KHs in the same Mobility Domain.
Format: MAC-address,R1KH-ID " +"as 6 octets with colons,128-bit key as hex string.
This list is used " +"to map R1KH-ID to a destination MAC address when sending PMK-R1 key from the " +"R0KH. This is also the list of authorized R1KHs in the MD that can request " +"PMK-R1 keys." +msgstr "" + msgid "List of SSH key files for auth" msgstr "認証用 SSH暗号キー ファイルのリスト" @@ -1898,6 +1961,9 @@ msgstr "" msgid "Missing protocol extension for proto %q" msgstr "プロトコル %qのプロトコル拡張が見つかりません" +msgid "Mobility Domain" +msgstr "" + msgid "Mode" msgstr "モード" @@ -2151,6 +2217,9 @@ msgstr "変更されるオプション" msgid "Option removed" msgstr "削除されるオプション" +msgid "Optional" +msgstr "" + msgid "Optional, specify to override default server (tic.sixxs.net)" msgstr "" @@ -2251,6 +2320,9 @@ msgstr "PID" msgid "PIN" msgstr "PIN" +msgid "PMK R1 Push" +msgstr "" + msgid "PPP" msgstr "PPP" @@ -2380,6 +2452,9 @@ msgstr "" msgid "Pre-emtive CRC errors (CRCP_P)" msgstr "" +msgid "Prefix Delegated" +msgstr "" + msgid "Preshared Key" msgstr "事前共有鍵" @@ -2447,6 +2522,12 @@ msgstr "" msgid "Quality" msgstr "クオリティ" +msgid "R0 Key Lifetime" +msgstr "" + +msgid "R1 Key Holder" +msgstr "" + msgid "RFC3947 NAT-T mode" msgstr "" @@ -2542,6 +2623,9 @@ msgstr "リアルタイム・トラフィック" msgid "Realtime Wireless" msgstr "リアルタイム・無線LAN" +msgid "Reassociation Deadline" +msgstr "" + msgid "Rebind protection" msgstr "DNSリバインディング・プロテクション" @@ -2560,6 +2644,9 @@ msgstr "受信" msgid "Receiver Antenna" msgstr "受信アンテナ" +msgid "Recommended. IP addresses of the WireGuard interface." +msgstr "" + msgid "Reconnect this interface" msgstr "インターフェースの再接続" @@ -2611,6 +2698,9 @@ msgstr "" msgid "Require TLS" msgstr "TLSが必要" +msgid "Required" +msgstr "" + msgid "Required for certain ISPs, e.g. Charter with DOCSIS 3" msgstr "DOCSIS 3.0を使用するいくつかのISPでは必要になります" @@ -2626,6 +2716,11 @@ msgstr "" msgid "Required. Public key of peer." msgstr "" +msgid "" +"Requires the 'full' version of wpad/hostapd and support from the wifi driver " +"
(as of Feb 2017: ath9k and ath10k, in LEDE also mwlwifi and mt76)" +msgstr "" + msgid "" "Requires upstream supports DNSSEC; verify unsigned domain responses really " "come from unsigned domains" @@ -3368,6 +3463,9 @@ msgstr "UMTS/GPRS/EV-DO" msgid "USB Device" msgstr "USBデバイス" +msgid "USB Ports" +msgstr "" + msgid "UUID" msgstr "UUID" @@ -3477,6 +3575,11 @@ msgstr "使用" msgid "Used Key Slot" msgstr "使用するキースロット" +msgid "" +"Used for two different purposes: RADIUS NAS ID and 802.11r R0KH-ID. Not " +"needed with normal WPA(2)-PSK." +msgstr "" + msgid "User certificate (PEM encoded)" msgstr "" @@ -3735,6 +3838,9 @@ msgstr "ローカル DNSファイル" msgid "minimum 1280, maximum 1480" msgstr "" +msgid "minutes" +msgstr "" + msgid "navigation Navigation" msgstr "" @@ -3789,6 +3895,9 @@ msgstr "ステートレス + ステートフル" msgid "tagged" msgstr "tagged" +msgid "time units (TUs / 1.024 ms) [1000-65535]" +msgstr "" + msgid "unknown" msgstr "不明" diff --git a/package/luci/modules/luci-base/po/ko/base.po b/package/luci/modules/luci-base/po/ko/base.po index 9a1a815785..59372bd976 100644 --- a/package/luci/modules/luci-base/po/ko/base.po +++ b/package/luci/modules/luci-base/po/ko/base.po @@ -43,18 +43,45 @@ msgstr "" msgid "-- match by label --" msgstr "" +msgid "-- match by uuid --" +msgstr "" + msgid "1 Minute Load:" msgstr "1 분 부하:" msgid "15 Minute Load:" msgstr "15 분 부하:" +msgid "4-character hexadecimal ID" +msgstr "" + msgid "464XLAT (CLAT)" msgstr "" msgid "5 Minute Load:" msgstr "5 분 부하:" +msgid "6-octet identifier as a hex string - no colons" +msgstr "" + +msgid "802.11r Fast Transition" +msgstr "" + +msgid "802.11w Association SA Query maximum timeout" +msgstr "" + +msgid "802.11w Association SA Query retry timeout" +msgstr "" + +msgid "802.11w Management Frame Protection" +msgstr "" + +msgid "802.11w maximum timeout" +msgstr "" + +msgid "802.11w retry timeout" +msgstr "" + msgid "BSSID" msgstr "" @@ -862,6 +889,9 @@ msgstr "" msgid "Disabled" msgstr "" +msgid "Disabled (default)" +msgstr "" + msgid "Discard upstream RFC1918 responses" msgstr "" @@ -1028,6 +1058,11 @@ msgstr "활성/비활성" msgid "Enabled" msgstr "활성화됨" +msgid "" +"Enables fast roaming among access points that belong to the same Mobility " +"Domain" +msgstr "" + msgid "Enables the Spanning Tree Protocol on this bridge" msgstr "이 bridge 에 Spanning Tree Protocol 활성화합니다" @@ -1074,6 +1109,12 @@ msgstr "임대한 주소의 유효 시간. 최소값은 2 분 (2m msgid "External" msgstr "" +msgid "External R0 Key Holder List" +msgstr "" + +msgid "External R1 Key Holder List" +msgstr "" + msgid "External system log server" msgstr "외부 system log 서버" @@ -1244,7 +1285,7 @@ msgid "Global network options" msgstr "" msgid "Go to password configuration..." -msgstr "" +msgstr "암호 설정 하기" msgid "Go to relevant configuration page" msgstr "" @@ -1322,6 +1363,9 @@ msgstr "" msgid "IKE DH Group" msgstr "" +msgid "IP Addresses" +msgstr "" + msgid "IP address" msgstr "IP 주소" @@ -1415,6 +1459,9 @@ msgstr "" msgid "IPv6-Address" msgstr "IPv6-주소" +msgid "IPv6-PD" +msgstr "" + msgid "IPv6-in-IPv4 (RFC4213)" msgstr "" @@ -1673,6 +1720,22 @@ msgid "" "requests to" msgstr "" +msgid "" +"List of R0KHs in the same Mobility Domain.
Format: MAC-address,NAS-" +"Identifier,128-bit key as hex string.
This list is used to map R0KH-ID " +"(NAS Identifier) to a destination MAC address when requesting PMK-R1 key " +"from the R0KH that the STA used during the Initial Mobility Domain " +"Association." +msgstr "" + +msgid "" +"List of R1KHs in the same Mobility Domain.
Format: MAC-address,R1KH-ID " +"as 6 octets with colons,128-bit key as hex string.
This list is used " +"to map R1KH-ID to a destination MAC address when sending PMK-R1 key from the " +"R0KH. This is also the list of authorized R1KHs in the MD that can request " +"PMK-R1 keys." +msgstr "" + msgid "List of SSH key files for auth" msgstr "" @@ -1859,6 +1922,9 @@ msgstr "" msgid "Missing protocol extension for proto %q" msgstr "" +msgid "Mobility Domain" +msgstr "" + msgid "Mode" msgstr "" @@ -2000,7 +2066,7 @@ msgid "No package lists available" msgstr "" msgid "No password set!" -msgstr "" +msgstr "암호 설정을 해주세요!" msgid "No rules in this chain" msgstr "" @@ -2110,6 +2176,9 @@ msgstr "변경된 option" msgid "Option removed" msgstr "삭제된 option" +msgid "Optional" +msgstr "" + msgid "Optional, specify to override default server (tic.sixxs.net)" msgstr "" @@ -2210,6 +2279,9 @@ msgstr "" msgid "PIN" msgstr "" +msgid "PMK R1 Push" +msgstr "" + msgid "PPP" msgstr "" @@ -2339,6 +2411,9 @@ msgstr "" msgid "Pre-emtive CRC errors (CRCP_P)" msgstr "" +msgid "Prefix Delegated" +msgstr "" + msgid "Preshared Key" msgstr "" @@ -2404,6 +2479,12 @@ msgstr "" msgid "Quality" msgstr "" +msgid "R0 Key Lifetime" +msgstr "" + +msgid "R1 Key Holder" +msgstr "" + msgid "RFC3947 NAT-T mode" msgstr "" @@ -2487,6 +2568,9 @@ msgstr "실시간 트래픽" msgid "Realtime Wireless" msgstr "" +msgid "Reassociation Deadline" +msgstr "" + msgid "Rebind protection" msgstr "" @@ -2505,6 +2589,9 @@ msgstr "" msgid "Receiver Antenna" msgstr "" +msgid "Recommended. IP addresses of the WireGuard interface." +msgstr "" + msgid "Reconnect this interface" msgstr "이 인터페이스를 재연결합니다" @@ -2556,6 +2643,9 @@ msgstr "" msgid "Require TLS" msgstr "" +msgid "Required" +msgstr "" + msgid "Required for certain ISPs, e.g. Charter with DOCSIS 3" msgstr "특정 ISP 들에 요구됨. 예: Charter (DOCSIS 3 기반)" @@ -2571,6 +2661,11 @@ msgstr "" msgid "Required. Public key of peer." msgstr "" +msgid "" +"Requires the 'full' version of wpad/hostapd and support from the wifi driver " +"
(as of Feb 2017: ath9k and ath10k, in LEDE also mwlwifi and mt76)" +msgstr "" + msgid "" "Requires upstream supports DNSSEC; verify unsigned domain responses really " "come from unsigned domains" @@ -2734,7 +2829,7 @@ msgid "Service Type" msgstr "" msgid "Services" -msgstr "Services" +msgstr "서비스" msgid "Set up Time Synchronization" msgstr "" @@ -3120,6 +3215,8 @@ msgid "" "There is no password set on this router. Please configure a root password to " "protect the web interface and enable SSH." msgstr "" +"이 공유기에 암호 설정이 되지 않았습니다. 웹 UI 와 SSH 부분을 보호하기 위해서 " +"꼭 root 암호를 설정해 주세요." msgid "This IPv4 address of the relay" msgstr "" @@ -3278,6 +3375,9 @@ msgstr "" msgid "USB Device" msgstr "" +msgid "USB Ports" +msgstr "" + msgid "UUID" msgstr "" @@ -3387,6 +3487,11 @@ msgstr "" msgid "Used Key Slot" msgstr "" +msgid "" +"Used for two different purposes: RADIUS NAS ID and 802.11r R0KH-ID. Not " +"needed with normal WPA(2)-PSK." +msgstr "" + msgid "User certificate (PEM encoded)" msgstr "" @@ -3642,6 +3747,9 @@ msgstr "local DNS 파일" msgid "minimum 1280, maximum 1480" msgstr "" +msgid "minutes" +msgstr "" + msgid "navigation Navigation" msgstr "" @@ -3696,6 +3804,9 @@ msgstr "" msgid "tagged" msgstr "" +msgid "time units (TUs / 1.024 ms) [1000-65535]" +msgstr "" + msgid "unknown" msgstr "" diff --git a/package/luci/modules/luci-base/po/ms/base.po b/package/luci/modules/luci-base/po/ms/base.po index 8ba922f87f..517d237d91 100644 --- a/package/luci/modules/luci-base/po/ms/base.po +++ b/package/luci/modules/luci-base/po/ms/base.po @@ -43,18 +43,45 @@ msgstr "" msgid "-- match by label --" msgstr "" +msgid "-- match by uuid --" +msgstr "" + msgid "1 Minute Load:" msgstr "" msgid "15 Minute Load:" msgstr "" +msgid "4-character hexadecimal ID" +msgstr "" + msgid "464XLAT (CLAT)" msgstr "" msgid "5 Minute Load:" msgstr "" +msgid "6-octet identifier as a hex string - no colons" +msgstr "" + +msgid "802.11r Fast Transition" +msgstr "" + +msgid "802.11w Association SA Query maximum timeout" +msgstr "" + +msgid "802.11w Association SA Query retry timeout" +msgstr "" + +msgid "802.11w Management Frame Protection" +msgstr "" + +msgid "802.11w maximum timeout" +msgstr "" + +msgid "802.11w retry timeout" +msgstr "" + msgid "BSSID" msgstr "BSSID" @@ -835,6 +862,9 @@ msgstr "Mematikan pemasa HW-Beacon" msgid "Disabled" msgstr "" +msgid "Disabled (default)" +msgstr "" + msgid "Discard upstream RFC1918 responses" msgstr "" @@ -1000,6 +1030,11 @@ msgstr "" msgid "Enabled" msgstr "" +msgid "" +"Enables fast roaming among access points that belong to the same Mobility " +"Domain" +msgstr "" + msgid "Enables the Spanning Tree Protocol on this bridge" msgstr "Aktifkan spanning Tree Protokol di jambatan ini" @@ -1046,6 +1081,12 @@ msgstr "" msgid "External" msgstr "" +msgid "External R0 Key Holder List" +msgstr "" + +msgid "External R1 Key Holder List" +msgstr "" + msgid "External system log server" msgstr "" @@ -1293,6 +1334,9 @@ msgstr "" msgid "IKE DH Group" msgstr "" +msgid "IP Addresses" +msgstr "" + msgid "IP address" msgstr "Alamat IP" @@ -1386,6 +1430,9 @@ msgstr "" msgid "IPv6-Address" msgstr "" +msgid "IPv6-PD" +msgstr "" + msgid "IPv6-in-IPv4 (RFC4213)" msgstr "" @@ -1652,6 +1699,22 @@ msgid "" "requests to" msgstr "" +msgid "" +"List of R0KHs in the same Mobility Domain.
Format: MAC-address,NAS-" +"Identifier,128-bit key as hex string.
This list is used to map R0KH-ID " +"(NAS Identifier) to a destination MAC address when requesting PMK-R1 key " +"from the R0KH that the STA used during the Initial Mobility Domain " +"Association." +msgstr "" + +msgid "" +"List of R1KHs in the same Mobility Domain.
Format: MAC-address,R1KH-ID " +"as 6 octets with colons,128-bit key as hex string.
This list is used " +"to map R1KH-ID to a destination MAC address when sending PMK-R1 key from the " +"R0KH. This is also the list of authorized R1KHs in the MD that can request " +"PMK-R1 keys." +msgstr "" + msgid "List of SSH key files for auth" msgstr "" @@ -1839,6 +1902,9 @@ msgstr "" msgid "Missing protocol extension for proto %q" msgstr "" +msgid "Mobility Domain" +msgstr "" + msgid "Mode" msgstr "Mode" @@ -2091,6 +2157,9 @@ msgstr "" msgid "Option removed" msgstr "" +msgid "Optional" +msgstr "" + msgid "Optional, specify to override default server (tic.sixxs.net)" msgstr "" @@ -2189,6 +2258,9 @@ msgstr "PID" msgid "PIN" msgstr "" +msgid "PMK R1 Push" +msgstr "" + msgid "PPP" msgstr "" @@ -2318,6 +2390,9 @@ msgstr "" msgid "Pre-emtive CRC errors (CRCP_P)" msgstr "" +msgid "Prefix Delegated" +msgstr "" + msgid "Preshared Key" msgstr "" @@ -2383,6 +2458,12 @@ msgstr "" msgid "Quality" msgstr "" +msgid "R0 Key Lifetime" +msgstr "" + +msgid "R1 Key Holder" +msgstr "" + msgid "RFC3947 NAT-T mode" msgstr "" @@ -2463,6 +2544,9 @@ msgstr "" msgid "Realtime Wireless" msgstr "" +msgid "Reassociation Deadline" +msgstr "" + msgid "Rebind protection" msgstr "" @@ -2481,6 +2565,9 @@ msgstr "Menerima" msgid "Receiver Antenna" msgstr "Antena Penerima" +msgid "Recommended. IP addresses of the WireGuard interface." +msgstr "" + msgid "Reconnect this interface" msgstr "" @@ -2532,6 +2619,9 @@ msgstr "" msgid "Require TLS" msgstr "" +msgid "Required" +msgstr "" + msgid "Required for certain ISPs, e.g. Charter with DOCSIS 3" msgstr "" @@ -2547,6 +2637,11 @@ msgstr "" msgid "Required. Public key of peer." msgstr "" +msgid "" +"Requires the 'full' version of wpad/hostapd and support from the wifi driver " +"
(as of Feb 2017: ath9k and ath10k, in LEDE also mwlwifi and mt76)" +msgstr "" + msgid "" "Requires upstream supports DNSSEC; verify unsigned domain responses really " "come from unsigned domains" @@ -3254,6 +3349,9 @@ msgstr "" msgid "USB Device" msgstr "" +msgid "USB Ports" +msgstr "" + msgid "UUID" msgstr "" @@ -3355,6 +3453,11 @@ msgstr "Diguna" msgid "Used Key Slot" msgstr "" +msgid "" +"Used for two different purposes: RADIUS NAS ID and 802.11r R0KH-ID. Not " +"needed with normal WPA(2)-PSK." +msgstr "" + msgid "User certificate (PEM encoded)" msgstr "" @@ -3606,6 +3709,9 @@ msgstr "Fail DNS tempatan" msgid "minimum 1280, maximum 1480" msgstr "" +msgid "minutes" +msgstr "" + msgid "navigation Navigation" msgstr "" @@ -3660,6 +3766,9 @@ msgstr "" msgid "tagged" msgstr "" +msgid "time units (TUs / 1.024 ms) [1000-65535]" +msgstr "" + msgid "unknown" msgstr "" diff --git a/package/luci/modules/luci-base/po/no/base.po b/package/luci/modules/luci-base/po/no/base.po index f9dad0a4e6..d17e4aadd9 100644 --- a/package/luci/modules/luci-base/po/no/base.po +++ b/package/luci/modules/luci-base/po/no/base.po @@ -38,18 +38,45 @@ msgstr "" msgid "-- match by label --" msgstr "" +msgid "-- match by uuid --" +msgstr "" + msgid "1 Minute Load:" msgstr "1 minutts belastning:" msgid "15 Minute Load:" msgstr "15 minutters belastning:" +msgid "4-character hexadecimal ID" +msgstr "" + msgid "464XLAT (CLAT)" msgstr "" msgid "5 Minute Load:" msgstr "5 minutters belastning:" +msgid "6-octet identifier as a hex string - no colons" +msgstr "" + +msgid "802.11r Fast Transition" +msgstr "" + +msgid "802.11w Association SA Query maximum timeout" +msgstr "" + +msgid "802.11w Association SA Query retry timeout" +msgstr "" + +msgid "802.11w Management Frame Protection" +msgstr "" + +msgid "802.11w maximum timeout" +msgstr "" + +msgid "802.11w retry timeout" +msgstr "" + msgid "BSSID" msgstr "BSSID" @@ -863,6 +890,9 @@ msgstr "Deaktiver HW-Beacon timer" msgid "Disabled" msgstr "Deaktivert" +msgid "Disabled (default)" +msgstr "" + msgid "Discard upstream RFC1918 responses" msgstr "Forkast oppstrøms RFC1918 svar" @@ -1035,6 +1065,11 @@ msgstr "Aktiver/Deaktiver" msgid "Enabled" msgstr "Aktivert" +msgid "" +"Enables fast roaming among access points that belong to the same Mobility " +"Domain" +msgstr "" + msgid "Enables the Spanning Tree Protocol on this bridge" msgstr "Aktiverer Spanning Tree Protocol på denne broen" @@ -1082,6 +1117,12 @@ msgstr "Utløpstid på leide adresser, minimum er 2 minutter (2m)." msgid "External" msgstr "" +msgid "External R0 Key Holder List" +msgstr "" + +msgid "External R1 Key Holder List" +msgstr "" + msgid "External system log server" msgstr "Ekstern systemlogg server" @@ -1332,6 +1373,9 @@ msgstr "" msgid "IKE DH Group" msgstr "" +msgid "IP Addresses" +msgstr "" + msgid "IP address" msgstr "IP adresse" @@ -1425,6 +1469,9 @@ msgstr "" msgid "IPv6-Address" msgstr "IPv6-Adresse" +msgid "IPv6-PD" +msgstr "" + msgid "IPv6-in-IPv4 (RFC4213)" msgstr "IPv6-i-IPv4 (RFC4213)" @@ -1691,6 +1738,22 @@ msgstr "" "Liste med DNS servere som " "forespørsler blir videresendt til" +msgid "" +"List of R0KHs in the same Mobility Domain.
Format: MAC-address,NAS-" +"Identifier,128-bit key as hex string.
This list is used to map R0KH-ID " +"(NAS Identifier) to a destination MAC address when requesting PMK-R1 key " +"from the R0KH that the STA used during the Initial Mobility Domain " +"Association." +msgstr "" + +msgid "" +"List of R1KHs in the same Mobility Domain.
Format: MAC-address,R1KH-ID " +"as 6 octets with colons,128-bit key as hex string.
This list is used " +"to map R1KH-ID to a destination MAC address when sending PMK-R1 key from the " +"R0KH. This is also the list of authorized R1KHs in the MD that can request " +"PMK-R1 keys." +msgstr "" + msgid "List of SSH key files for auth" msgstr "" @@ -1882,6 +1945,9 @@ msgstr "" msgid "Missing protocol extension for proto %q" msgstr "Mangler protokoll utvidelse for proto %q" +msgid "Mobility Domain" +msgstr "" + msgid "Mode" msgstr "Modus" @@ -2135,6 +2201,9 @@ msgstr "Innstilling endret" msgid "Option removed" msgstr "Innstilling fjernet" +msgid "Optional" +msgstr "" + msgid "Optional, specify to override default server (tic.sixxs.net)" msgstr "" @@ -2235,6 +2304,9 @@ msgstr "PID" msgid "PIN" msgstr "PIN" +msgid "PMK R1 Push" +msgstr "" + msgid "PPP" msgstr "PPP" @@ -2364,6 +2436,9 @@ msgstr "" msgid "Pre-emtive CRC errors (CRCP_P)" msgstr "" +msgid "Prefix Delegated" +msgstr "" + msgid "Preshared Key" msgstr "" @@ -2431,6 +2506,12 @@ msgstr "" msgid "Quality" msgstr "Kvalitet" +msgid "R0 Key Lifetime" +msgstr "" + +msgid "R1 Key Holder" +msgstr "" + msgid "RFC3947 NAT-T mode" msgstr "" @@ -2524,6 +2605,9 @@ msgstr "Trafikk Sanntid" msgid "Realtime Wireless" msgstr "Trådløst i sanntid" +msgid "Reassociation Deadline" +msgstr "" + msgid "Rebind protection" msgstr "Binde beskyttelse" @@ -2542,6 +2626,9 @@ msgstr "Motta" msgid "Receiver Antenna" msgstr "Mottak antenne" +msgid "Recommended. IP addresses of the WireGuard interface." +msgstr "" + msgid "Reconnect this interface" msgstr "Koble til igjen" @@ -2593,6 +2680,9 @@ msgstr "" msgid "Require TLS" msgstr "" +msgid "Required" +msgstr "" + msgid "Required for certain ISPs, e.g. Charter with DOCSIS 3" msgstr "Er nødvendig for noen nettleverandører, f.eks Charter med DOCSIS 3" @@ -2608,6 +2698,11 @@ msgstr "" msgid "Required. Public key of peer." msgstr "" +msgid "" +"Requires the 'full' version of wpad/hostapd and support from the wifi driver " +"
(as of Feb 2017: ath9k and ath10k, in LEDE also mwlwifi and mt76)" +msgstr "" + msgid "" "Requires upstream supports DNSSEC; verify unsigned domain responses really " "come from unsigned domains" @@ -3359,6 +3454,9 @@ msgstr "UMTS/GPRS/EV-DO" msgid "USB Device" msgstr "USB Enhet" +msgid "USB Ports" +msgstr "" + msgid "UUID" msgstr "UUID" @@ -3467,6 +3565,11 @@ msgstr "Brukt" msgid "Used Key Slot" msgstr "Brukte Nøkler" +msgid "" +"Used for two different purposes: RADIUS NAS ID and 802.11r R0KH-ID. Not " +"needed with normal WPA(2)-PSK." +msgstr "" + msgid "User certificate (PEM encoded)" msgstr "" @@ -3726,6 +3829,9 @@ msgstr "lokal DNS-fil" msgid "minimum 1280, maximum 1480" msgstr "" +msgid "minutes" +msgstr "" + msgid "navigation Navigation" msgstr "" @@ -3780,6 +3886,9 @@ msgstr "" msgid "tagged" msgstr "tagget" +msgid "time units (TUs / 1.024 ms) [1000-65535]" +msgstr "" + msgid "unknown" msgstr "ukjent" diff --git a/package/luci/modules/luci-base/po/pl/base.po b/package/luci/modules/luci-base/po/pl/base.po index a78584cbbc..8b0368bdeb 100644 --- a/package/luci/modules/luci-base/po/pl/base.po +++ b/package/luci/modules/luci-base/po/pl/base.po @@ -44,18 +44,45 @@ msgstr "" msgid "-- match by label --" msgstr "" +msgid "-- match by uuid --" +msgstr "" + msgid "1 Minute Load:" msgstr "Obciążenie 1 min.:" msgid "15 Minute Load:" msgstr "Obciążenie 15 min.:" +msgid "4-character hexadecimal ID" +msgstr "" + msgid "464XLAT (CLAT)" msgstr "" msgid "5 Minute Load:" msgstr "Obciążenie 5 min.:" +msgid "6-octet identifier as a hex string - no colons" +msgstr "" + +msgid "802.11r Fast Transition" +msgstr "" + +msgid "802.11w Association SA Query maximum timeout" +msgstr "" + +msgid "802.11w Association SA Query retry timeout" +msgstr "" + +msgid "802.11w Management Frame Protection" +msgstr "" + +msgid "802.11w maximum timeout" +msgstr "" + +msgid "802.11w retry timeout" +msgstr "" + msgid "BSSID" msgstr "BSSID" @@ -885,6 +912,9 @@ msgstr "Wyłącz zegar HW-Beacon" msgid "Disabled" msgstr "Wyłączony" +msgid "Disabled (default)" +msgstr "" + msgid "Discard upstream RFC1918 responses" msgstr "Odrzuć wychodzące odpowiedzi RFC1918" @@ -1062,6 +1092,11 @@ msgstr "Wlącz/Wyłącz" msgid "Enabled" msgstr "Włączony" +msgid "" +"Enables fast roaming among access points that belong to the same Mobility " +"Domain" +msgstr "" + msgid "Enables the Spanning Tree Protocol on this bridge" msgstr "" "Włącz protokół STP na tym " @@ -1113,6 +1148,12 @@ msgstr "" msgid "External" msgstr "" +msgid "External R0 Key Holder List" +msgstr "" + +msgid "External R1 Key Holder List" +msgstr "" + msgid "External system log server" msgstr "Zewnętrzny serwer dla loga systemowego" @@ -1369,6 +1410,9 @@ msgstr "" msgid "IKE DH Group" msgstr "" +msgid "IP Addresses" +msgstr "" + msgid "IP address" msgstr "Adres IP" @@ -1462,6 +1506,9 @@ msgstr "" msgid "IPv6-Address" msgstr "Adres IPv6" +msgid "IPv6-PD" +msgstr "" + msgid "IPv6-in-IPv4 (RFC4213)" msgstr "IPv6-w-IPv4 (RFC4213)" @@ -1736,6 +1783,22 @@ msgstr "" "Lista serwerów DNS do których będą " "przekazywane zapytania" +msgid "" +"List of R0KHs in the same Mobility Domain.
Format: MAC-address,NAS-" +"Identifier,128-bit key as hex string.
This list is used to map R0KH-ID " +"(NAS Identifier) to a destination MAC address when requesting PMK-R1 key " +"from the R0KH that the STA used during the Initial Mobility Domain " +"Association." +msgstr "" + +msgid "" +"List of R1KHs in the same Mobility Domain.
Format: MAC-address,R1KH-ID " +"as 6 octets with colons,128-bit key as hex string.
This list is used " +"to map R1KH-ID to a destination MAC address when sending PMK-R1 key from the " +"R0KH. This is also the list of authorized R1KHs in the MD that can request " +"PMK-R1 keys." +msgstr "" + msgid "List of SSH key files for auth" msgstr "" @@ -1928,6 +1991,9 @@ msgstr "" msgid "Missing protocol extension for proto %q" msgstr "Brakujące rozszerzenie protokołu dla protokołu %q" +msgid "Mobility Domain" +msgstr "" + msgid "Mode" msgstr "Tryb" @@ -2180,6 +2246,9 @@ msgstr "Wartość zmieniona" msgid "Option removed" msgstr "Usunięto wartość" +msgid "Optional" +msgstr "" + msgid "Optional, specify to override default server (tic.sixxs.net)" msgstr "" @@ -2280,6 +2349,9 @@ msgstr "PID" msgid "PIN" msgstr "PIN" +msgid "PMK R1 Push" +msgstr "" + msgid "PPP" msgstr "PPP" @@ -2411,6 +2483,9 @@ msgstr "" msgid "Pre-emtive CRC errors (CRCP_P)" msgstr "" +msgid "Prefix Delegated" +msgstr "" + msgid "Preshared Key" msgstr "" @@ -2479,6 +2554,12 @@ msgstr "" msgid "Quality" msgstr "Jakość" +msgid "R0 Key Lifetime" +msgstr "" + +msgid "R1 Key Holder" +msgstr "" + msgid "RFC3947 NAT-T mode" msgstr "" @@ -2573,6 +2654,9 @@ msgstr "Ruch w czasie rzeczywistym" msgid "Realtime Wireless" msgstr "WiFi w czasie rzeczywistym" +msgid "Reassociation Deadline" +msgstr "" + msgid "Rebind protection" msgstr "Przypisz ochronę" @@ -2591,6 +2675,9 @@ msgstr "Odebrane" msgid "Receiver Antenna" msgstr "Antena odbiorcza" +msgid "Recommended. IP addresses of the WireGuard interface." +msgstr "" + msgid "Reconnect this interface" msgstr "Połącz ponownie ten interfejs" @@ -2642,6 +2729,9 @@ msgstr "" msgid "Require TLS" msgstr "" +msgid "Required" +msgstr "" + msgid "Required for certain ISPs, e.g. Charter with DOCSIS 3" msgstr "Wymagany dla niektórych dostawców internetu, np. Charter z DOCSIS 3" @@ -2657,6 +2747,11 @@ msgstr "" msgid "Required. Public key of peer." msgstr "" +msgid "" +"Requires the 'full' version of wpad/hostapd and support from the wifi driver " +"
(as of Feb 2017: ath9k and ath10k, in LEDE also mwlwifi and mt76)" +msgstr "" + msgid "" "Requires upstream supports DNSSEC; verify unsigned domain responses really " "come from unsigned domains" @@ -3422,6 +3517,9 @@ msgstr "UMTS/GPRS/EV-DO" msgid "USB Device" msgstr "Urządzenie USB" +msgid "USB Ports" +msgstr "" + msgid "UUID" msgstr "UUID" @@ -3531,6 +3629,11 @@ msgstr "Użyte" msgid "Used Key Slot" msgstr "Użyte gniazdo klucza" +msgid "" +"Used for two different purposes: RADIUS NAS ID and 802.11r R0KH-ID. Not " +"needed with normal WPA(2)-PSK." +msgstr "" + msgid "User certificate (PEM encoded)" msgstr "" @@ -3791,6 +3894,9 @@ msgstr "lokalny plik DNS" msgid "minimum 1280, maximum 1480" msgstr "" +msgid "minutes" +msgstr "" + msgid "navigation Navigation" msgstr "" @@ -3846,6 +3952,9 @@ msgstr "" msgid "tagged" msgstr "tagowane" +msgid "time units (TUs / 1.024 ms) [1000-65535]" +msgstr "" + msgid "unknown" msgstr "nieznane" diff --git a/package/luci/modules/luci-base/po/pt-br/base.po b/package/luci/modules/luci-base/po/pt-br/base.po index 0bcd6398d5..6315f7727d 100644 --- a/package/luci/modules/luci-base/po/pt-br/base.po +++ b/package/luci/modules/luci-base/po/pt-br/base.po @@ -1,20 +1,20 @@ msgid "" msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" +"Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2009-06-10 03:41+0200\n" -"PO-Revision-Date: 2014-03-29 23:31+0200\n" -"Last-Translator: Luiz Angelo \n" -"Language-Team: LANGUAGE \n" +"PO-Revision-Date: 2017-02-22 20:30-0300\n" +"Last-Translator: Luiz Angelo Daros de Luca \n" "Language: pt_BR\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n" -"X-Generator: Pootle 2.0.6\n" +"X-Generator: Poedit 1.8.11\n" +"Language-Team: \n" msgid "%s is untagged in multiple VLANs!" -msgstr "" +msgstr "%s está sem etiqueta em múltiplas VLANs!" msgid "(%d minute window, %d second interval)" msgstr "(janela de %d minutos, intervalo de %d segundos)" @@ -38,10 +38,15 @@ msgid "-- custom --" msgstr "-- personalizado --" msgid "-- match by device --" -msgstr "" +msgstr "-- casar por dispositivo --" msgid "-- match by label --" +msgstr "-- casar por rótulo --" + +msgid "-- match by uuid --" msgstr "" +"-- casar por UUID --" msgid "1 Minute Load:" msgstr "Carga 1 Minuto:" @@ -49,12 +54,38 @@ msgstr "Carga 1 Minuto:" msgid "15 Minute Load:" msgstr "Carga 15 Minutos:" +msgid "4-character hexadecimal ID" +msgstr "Identificador hexadecimal de 4 caracteres" + msgid "464XLAT (CLAT)" -msgstr "" +msgstr "464XLAT (CLAT)" msgid "5 Minute Load:" msgstr "Carga 5 Minutos:" +msgid "6-octet identifier as a hex string - no colons" +msgstr "" +"Identificador de 6 octetos como uma cadeia hexadecimal - sem dois pontos" + +msgid "802.11r Fast Transition" +msgstr "802.11r Fast Transition" + +msgid "802.11w Association SA Query maximum timeout" +msgstr "Tempo de expiração máximo da consulta da Associação SA do 802.11w" + +msgid "802.11w Association SA Query retry timeout" +msgstr "" +"Tempo de expiração de tentativa de consulta da Associação SA do 802.11w" + +msgid "802.11w Management Frame Protection" +msgstr "Proteção do Quadro de Gerenciamento do 802.11w" + +msgid "802.11w maximum timeout" +msgstr "Estouro de tempo máximo do 802.11w" + +msgid "802.11w retry timeout" +msgstr "Estouro de tempo da nova tentativa do 802.11w" + msgid "BSSID" msgstr "" "BSSID" @@ -100,6 +131,8 @@ msgstr "Roteador IPv6" msgid "IPv6-Suffix (hex)" msgstr "" +"IPv6-Suffix (hex)" msgid "LED Configuration" msgstr "Configuração do LED" @@ -131,19 +164,23 @@ msgid "%s - %s" msgstr "%s - %s" msgid "A43C + J43 + A43" -msgstr "" +msgstr "A43C + J43 + A43" msgid "A43C + J43 + A43 + V43" -msgstr "" +msgstr "A43C + J43 + A43 + V43" msgid "ADSL" msgstr "" +"ADSL" msgid "AICCU (SIXXS)" msgstr "" +"AICCU (SIXXS)" msgid "ANSI T1.413" -msgstr "" +msgstr "ANSI T1.413" msgid "APN" msgstr "APN" @@ -157,16 +194,20 @@ msgstr "" "abbr>" msgid "ATM (Asynchronous Transfer Mode)" -msgstr "" +msgstr "ATM (Asynchronous Transfer Mode)" msgid "ATM Bridges" msgstr "Ponte ATM" msgid "ATM Virtual Channel Identifier (VCI)" -msgstr "Identificador de Canal Virtual ATM (VCI)" +msgstr "" +"Identificador de Canal Virtual ATM (VCI)" msgid "ATM Virtual Path Identifier (VPI)" -msgstr "Identificador de Caminho Virtual ATM (VPI)" +msgstr "" +"Identificador de Caminho Virtual ATM (VPI)" msgid "" "ATM bridges expose encapsulated ethernet in AAL5 connections as virtual " @@ -181,10 +222,10 @@ msgid "ATM device number" msgstr "Número do dispositivo ATM" msgid "ATU-C System Vendor ID" -msgstr "" +msgstr "Identificador de" msgid "AYIYA" -msgstr "" +msgstr "AYIYA" msgid "Access Concentrator" msgstr "Concentrador de Acesso" @@ -234,7 +275,7 @@ msgid "Additional Hosts files" msgstr "Arquivos adicionais de equipamentos conhecidos (hosts)" msgid "Additional servers file" -msgstr "" +msgstr "Arquivo de servidores adicionais" msgid "Address" msgstr "Endereço" @@ -250,6 +291,8 @@ msgstr "Opções Avançadas" msgid "Aggregate Transmit Power(ACTATP)" msgstr "" +"Potência de Transmissão Agregada (ACTATP)" msgid "Alert" msgstr "Alerta" @@ -258,9 +301,11 @@ msgid "" "Allocate IP addresses sequentially, starting from the lowest available " "address" msgstr "" +"Alocar endereços IP sequencialmente, iniciando a partir do endereço mais " +"baixo disponível" msgid "Allocate IP sequentially" -msgstr "" +msgstr "Alocar endereços IP sequencialmente" msgid "Allow SSH password authentication" msgstr "" @@ -293,78 +338,81 @@ msgstr "" "exemplo, para os serviços RBL" msgid "Allowed IPs" -msgstr "" +msgstr "Endereços IP autorizados" msgid "" "Also see
Tunneling Comparison on SIXXS" msgstr "" +"Veja também a Comparação de Tunelamentos em SIXXS" msgid "Always announce default router" -msgstr "" +msgstr "Sempre anuncie o roteador padrão" msgid "Annex" -msgstr "" +msgstr "Anexo" msgid "Annex A + L + M (all)" -msgstr "" +msgstr "Anexos A + L + M (todo)" msgid "Annex A G.992.1" -msgstr "" +msgstr "Anexo A G.992.1" msgid "Annex A G.992.2" -msgstr "" +msgstr "Anexo A G.992.2" msgid "Annex A G.992.3" -msgstr "" +msgstr "Anexo A G.992.3" msgid "Annex A G.992.5" -msgstr "" +msgstr "Anexo A G.992.5" msgid "Annex B (all)" -msgstr "" +msgstr "Anexo B (todo)" msgid "Annex B G.992.1" -msgstr "" +msgstr "Anexo B G.992.1" msgid "Annex B G.992.3" -msgstr "" +msgstr "Anexo B G.992.3" msgid "Annex B G.992.5" -msgstr "" +msgstr "Anexo B G.992.5" msgid "Annex J (all)" -msgstr "" +msgstr "Anexo J (todo)" msgid "Annex L G.992.3 POTS 1" -msgstr "" +msgstr "Anexo L G.992.3 POTS 1" msgid "Annex M (all)" -msgstr "" +msgstr "Anexo M (todo)" msgid "Annex M G.992.3" -msgstr "" +msgstr "Anexo M G.992.3" msgid "Annex M G.992.5" -msgstr "" +msgstr "Anexo M G.992.5" msgid "Announce as default router even if no public prefix is available." msgstr "" +"Anuncie-se como rotador padrão mesmo se não existir um prefixo público." msgid "Announced DNS domains" -msgstr "" +msgstr "Domínios DNS anunciados" msgid "Announced DNS servers" -msgstr "" +msgstr "Servidores DNS anunciados" msgid "Anonymous Identity" -msgstr "" +msgstr "Identidade Anônima" msgid "Anonymous Mount" -msgstr "" +msgstr "Montagem Anônima" msgid "Anonymous Swap" -msgstr "" +msgstr "Espaço de Troca (swap) Anônimo" msgid "Antenna 1" msgstr "Antena 1" @@ -387,6 +435,8 @@ msgstr "Aplicar as alterações" msgid "" "Assign a part of given length of every public IPv6-prefix to this interface" msgstr "" +"Atribua uma parte do comprimento de cada prefixo IPv6 público para esta " +"interface" msgid "Assign interfaces..." msgstr "atribuir as interfaces" @@ -394,6 +444,8 @@ msgstr "atribuir as interfaces" msgid "" "Assign prefix parts using this hexadecimal subprefix ID for this interface." msgstr "" +"Atribua partes do prefixo usando este identificador hexadecimal do " +"subprefixo para esta interface" msgid "Associated Stations" msgstr "Estações associadas" @@ -402,16 +454,16 @@ msgid "Atheros 802.11%s Wireless Controller" msgstr "Controlador Wireless Atheros 802.11%s" msgid "Auth Group" -msgstr "" +msgstr "Grupo de Autenticação" msgid "AuthGroup" -msgstr "" +msgstr "Grupo de Autenticação" msgid "Authentication" msgstr "Autenticação" msgid "Authentication Type" -msgstr "" +msgstr "Tipo de Autenticação" msgid "Authoritative" msgstr "Autoritário" @@ -423,25 +475,29 @@ msgid "Auto Refresh" msgstr "Atualização Automática" msgid "Automatic" -msgstr "" +msgstr "Automático" msgid "Automatic Homenet (HNCP)" msgstr "" +"Rede Doméstica Automática (HNCP)" msgid "Automatically check filesystem for errors before mounting" msgstr "" +"Execute automaticamente a verificação do sistema de arquivos antes da " +"montagem do dispositivo" msgid "Automatically mount filesystems on hotplug" -msgstr "" +msgstr "Monte automaticamente o espaço de troca (swap) ao conectar" msgid "Automatically mount swap on hotplug" -msgstr "" +msgstr "Monte automaticamente o espaço de troca (swap) ao conectar" msgid "Automount Filesystem" -msgstr "" +msgstr "Montagem Automática de Sistema de Arquivo" msgid "Automount Swap" -msgstr "" +msgstr "Montagem Automática do Espaço de Troca (swap) " msgid "Available" msgstr "Disponível" @@ -453,13 +509,13 @@ msgid "Average:" msgstr "Média:" msgid "B43 + B43C" -msgstr "" +msgstr "B43 + B43C" msgid "B43 + B43C + V43" -msgstr "" +msgstr "B43 + B43C + V43" msgid "BR / DMR / AFTR" -msgstr "" +msgstr "BR / DMR / AFTR" msgid "BSSID" msgstr "BSSID" @@ -495,10 +551,10 @@ msgid "Bad address specified!" msgstr "Endereço especificado está incorreto!" msgid "Band" -msgstr "" +msgstr "Banda" msgid "Behind NAT" -msgstr "" +msgstr "Atrás da NAT" msgid "" "Below is the determined list of files to backup. It consists of changed " @@ -510,13 +566,15 @@ msgstr "" "padrões para a cópia de segurança definidos pelo usuário." msgid "Bind interface" -msgstr "" +msgstr "Interface Vinculada" msgid "Bind only to specific interfaces rather than wildcard address." msgstr "" +"Vincule somente para as explicitamenteinterfaces ao invés do endereço " +"coringa." msgid "Bind the tunnel to this interface (optional)." -msgstr "" +msgstr "Vincule o túnel a esta interface (opcional)" msgid "Bitrate" msgstr "Taxa de bits" @@ -549,12 +607,15 @@ msgid "" "Build/distribution specific feed definitions. This file will NOT be " "preserved in any sysupgrade." msgstr "" +"Fonte de pacotes específico da compilação/distribuição. Esta NÃO será " +"preservada em qualquer atualização do sistema." msgid "Buttons" msgstr "Botões" msgid "CA certificate; if empty it will be saved after the first connection." msgstr "" +"Certificado da CA; se em branco, será salvo depois da primeira conexão." msgid "CPU usage (%)" msgstr "Uso da CPU (%)" @@ -563,7 +624,7 @@ msgid "Cancel" msgstr "Cancelar" msgid "Category" -msgstr "" +msgstr "Categoria" msgid "Chain" msgstr "Cadeia" @@ -585,9 +646,10 @@ msgstr "Verificar" msgid "Check fileystems before mount" msgstr "" +"Execute a verificação do sistema de arquivos antes da montagem do dispositivo" msgid "Check this option to delete the existing networks from this radio." -msgstr "" +msgstr "Marque esta opção para remover as redes existentes neste rádio." msgid "Checksum" msgstr "Soma de verificação" @@ -614,7 +676,7 @@ msgid "Cipher" msgstr "Cifra" msgid "Cisco UDP encapsulation" -msgstr "" +msgstr "Encapsulamento UDP da Cisco" msgid "" "Click \"Generate archive\" to download a tar archive of the current " @@ -676,7 +738,7 @@ msgid "Connection Limit" msgstr "Limite de conexão" msgid "Connection to server fails when TLS cannot be used" -msgstr "" +msgstr "A conexão para este servidor falhará quando o TLS não puder ser usado" msgid "Connections" msgstr "Conexões" @@ -712,15 +774,17 @@ msgid "Custom Interface" msgstr "Interface Personalizada" msgid "Custom delegated IPv6-prefix" -msgstr "" +msgstr "Prefixo IPv6 delegado personalizado" msgid "" "Custom feed definitions, e.g. private feeds. This file can be preserved in a " "sysupgrade." msgstr "" +"Definições de fonte de pacotes personalizadas, ex: fontes privadas. Este " +"arquivo será preservado em uma atualização do sistema." msgid "Custom feeds" -msgstr "" +msgstr "Fontes de pacotes customizadas" msgid "" "Customizes the behaviour of the device DNS-Requests without " @@ -961,7 +1028,7 @@ msgstr "" "integrado" msgid "Dual-Stack Lite (RFC6333)" -msgstr "" +msgstr "Duas Pilhas Leve (RFC6333)" msgid "Dynamic DHCP" msgstr "" @@ -979,7 +1046,7 @@ msgstr "" "somente os clientes com atribuições estáticas serão servidos. " msgid "EA-bits length" -msgstr "" +msgstr "Comprimento dos bits EA" msgid "EAP-Method" msgstr "Método EAP" @@ -991,6 +1058,8 @@ msgid "" "Edit the raw configuration data above to fix any error and hit \"Save\" to " "reload the page." msgstr "" +"Edite os dados de configuração brutos abaixo para arrumar qualquer erro e " +"clique em \"Salvar\" para recarregar a página." msgid "Edit this interface" msgstr "Editar esta interface" @@ -1011,7 +1080,7 @@ msgid "Enable HE.net dynamic endpoint update" msgstr "Ativar a atualização de ponto final dinâmico HE.net" msgid "Enable IPv6 negotiation" -msgstr "" +msgstr "Ativar a negociação de IPv6" msgid "Enable IPv6 negotiation on the PPP link" msgstr "Ativar a negociação de IPv6 no enlace PPP" @@ -1023,7 +1092,7 @@ msgid "Enable NTP client" msgstr "Ativar o cliente NTP" msgid "Enable Single DES" -msgstr "" +msgstr "Habilitar DES Simples" msgid "Enable TFTP server" msgstr "Ativar servidor TFTP" @@ -1032,19 +1101,19 @@ msgid "Enable VLAN functionality" msgstr "Ativar funcionalidade de VLAN" msgid "Enable WPS pushbutton, requires WPA(2)-PSK" -msgstr "" +msgstr "Habilite o botão WPS. requer WPA(2)-PSK" msgid "Enable learning and aging" msgstr "Ativar o aprendizado e obsolescência" msgid "Enable mirroring of incoming packets" -msgstr "" +msgstr "Habilitar espelhamento dos pacotes entrantes" msgid "Enable mirroring of outgoing packets" -msgstr "" +msgstr "Habilitar espelhamento dos pacotes saintes" msgid "Enable the DF (Don't Fragment) flag of the encapsulating packets." -msgstr "" +msgstr "Habilita o campo DF (Não Fragmentar) dos pacotes encapsulados." msgid "Enable this mount" msgstr "Ativar esta montagem" @@ -1058,6 +1127,13 @@ msgstr "Ativar/Desativar" msgid "Enabled" msgstr "Ativado" +msgid "" +"Enables fast roaming among access points that belong to the same Mobility " +"Domain" +msgstr "" +"Ativa a troca rápida entre pontos de acesso que pertencem ao mesmo Domínio " +"de Mobilidade" + msgid "Enables the Spanning Tree Protocol on this bridge" msgstr "Ativa o protocolo STP nesta ponte" @@ -1068,10 +1144,10 @@ msgid "Encryption" msgstr "Cifragem" msgid "Endpoint Host" -msgstr "" +msgstr "Equipamento do ponto final" msgid "Endpoint Port" -msgstr "" +msgstr "Porta do ponto final" msgid "Erasing..." msgstr "Apagando..." @@ -1080,7 +1156,7 @@ msgid "Error" msgstr "Erro" msgid "Errored seconds (ES)" -msgstr "" +msgstr "Segundos com erro (ES)" msgid "Ethernet Adapter" msgstr "Adaptador Ethernet" @@ -1089,7 +1165,7 @@ msgid "Ethernet Switch" msgstr "Switch Ethernet" msgid "Exclude interfaces" -msgstr "" +msgstr "Excluir interfaces" msgid "Expand hosts" msgstr "Expandir arquivos de equipamentos conhecidos (hosts)" @@ -1097,7 +1173,6 @@ msgstr "Expandir arquivos de equipamentos conhecidos (hosts)" msgid "Expires" msgstr "Expira" -#, fuzzy msgid "" "Expiry time of leased addresses, minimum is 2 minutes (2m)." msgstr "" @@ -1105,7 +1180,13 @@ msgstr "" "code>)." msgid "External" -msgstr "" +msgstr "Externo" + +msgid "External R0 Key Holder List" +msgstr "Lista dos Detentor de Chave R0 Externa" + +msgid "External R1 Key Holder List" +msgstr "Lista dos Detentor de Chave R1 Externa" msgid "External system log server" msgstr "Servidor externo de registros do sistema (syslog)" @@ -1114,10 +1195,10 @@ msgid "External system log server port" msgstr "Porta do servidor externo de registro do sistema (syslog)" msgid "External system log server protocol" -msgstr "" +msgstr "Protocolo do servidor externo de registro do sistema (syslog)" msgid "Extra SSH command options" -msgstr "" +msgstr "Opções adicionais do comando SSH" msgid "Fast Frames" msgstr "Quadros Rápidos" @@ -1144,6 +1225,9 @@ msgid "" "Find all currently attached filesystems and swap and replace configuration " "with defaults based on what was detected" msgstr "" +"Encontre todos os sistemas de arquivos e espaços de troca (swap) atualmente " +"conectados e substitua a configuração com valores padrão baseados no que foi " +"detectado" msgid "Find and join network" msgstr "Procurar e conectar à rede" @@ -1164,7 +1248,7 @@ msgid "Firewall Status" msgstr "Estado do Firewall" msgid "Firmware File" -msgstr "" +msgstr "Arquivo da Firmware" msgid "Firmware Version" msgstr "Versão do Firmware" @@ -1203,16 +1287,18 @@ msgid "Force TKIP and CCMP (AES)" msgstr "Forçar TKIP e CCMP (AES)" msgid "Force use of NAT-T" -msgstr "" +msgstr "Force o uso do NAT-T" msgid "Form token mismatch" -msgstr "" +msgstr "Chave eletrônica do formulário não casa" msgid "Forward DHCP traffic" msgstr "Encaminhar tráfego DHCP" msgid "Forward Error Correction Seconds (FECS)" msgstr "" +"Segundos a frente de correção de erros ( FECS)" msgid "Forward broadcast traffic" msgstr "Encaminhar tráfego broadcast" @@ -1236,6 +1322,8 @@ msgid "" "Further information about WireGuard interfaces and peers at wireguard.io." msgstr "" +"Mais informações sobre interfaces e parceiros WireGuard em wireguard.io." msgid "GHz" msgstr "GHz" @@ -1256,10 +1344,10 @@ msgid "General Setup" msgstr "Configurações Gerais" msgid "General options for opkg" -msgstr "" +msgstr "Opções gerais para o opkg" msgid "Generate Config" -msgstr "" +msgstr "Gerar Configuração" msgid "Generate archive" msgstr "Gerar arquivo" @@ -1271,10 +1359,10 @@ msgid "Given password confirmation did not match, password not changed!" msgstr "A senha de confirmação informada não casa. Senha não alterada!" msgid "Global Settings" -msgstr "" +msgstr "Configurações Globais" msgid "Global network options" -msgstr "" +msgstr "Opções de rede globais" msgid "Go to password configuration..." msgstr "Ir para a configuração de senha..." @@ -1283,19 +1371,21 @@ msgid "Go to relevant configuration page" msgstr "Ir para a página de configuração pertinente" msgid "Group Password" -msgstr "" +msgstr "Senha do Grupo" msgid "Guest" -msgstr "" +msgstr "Convidado\t" msgid "HE.net password" msgstr "Senha HE.net" msgid "HE.net username" -msgstr "" +msgstr "Usuário do HE.net" msgid "HT mode (802.11n)" msgstr "" +"Modo HT " +"(802.11n)" # Não sei que contexto isto está sendo usado msgid "Handler" @@ -1306,9 +1396,11 @@ msgstr "Suspender" msgid "Header Error Code Errors (HEC)" msgstr "" +"Erros de Código de Erro de Cabeçalho (HEC)" msgid "Heartbeat" -msgstr "" +msgstr "Pulso de vida" msgid "" "Here you can configure the basic aspects of your device like its hostname or " @@ -1333,7 +1425,7 @@ msgstr "" "\">ESSID" msgid "Host" -msgstr "" +msgstr "Equipamento" msgid "Host entries" msgstr "Entradas de Equipamentos" @@ -1356,10 +1448,15 @@ msgid "Hostnames" msgstr "Nome dos equipamentos" msgid "Hybrid" -msgstr "" +msgstr "Híbrido" msgid "IKE DH Group" msgstr "" +"Grupo DH do IKE" + +msgid "IP Addresses" +msgstr "Endereços IP" msgid "IP address" msgstr "Endereço IP" @@ -1380,7 +1477,7 @@ msgid "IPv4 and IPv6" msgstr "IPv4 e IPv6" msgid "IPv4 assignment length" -msgstr "" +msgstr "Tamanho da atribuição IPv4" msgid "IPv4 broadcast" msgstr "Broadcast IPv4" @@ -1395,7 +1492,7 @@ msgid "IPv4 only" msgstr "Somente IPv4" msgid "IPv4 prefix" -msgstr "" +msgstr "Prefixo IPv4" msgid "IPv4 prefix length" msgstr "Tamanho do prefixo IPv4" @@ -1404,7 +1501,7 @@ msgid "IPv4-Address" msgstr "Endereço IPv4" msgid "IPv4-in-IPv4 (RFC2003)" -msgstr "" +msgstr "IPv4-in-IPv4 (RFC2003)" msgid "IPv6" msgstr "IPv6" @@ -1413,13 +1510,15 @@ msgid "IPv6 Firewall" msgstr "Firewall para IPv6" msgid "IPv6 Neighbours" -msgstr "" +msgstr "Vizinhos IPv6" msgid "IPv6 Settings" -msgstr "" +msgstr "Configurações IPv6" msgid "IPv6 ULA-Prefix" msgstr "" +"Prefixo ULA " +"IPv6" msgid "IPv6 WAN Status" msgstr "Estado IPv6 da WAN" @@ -1428,13 +1527,13 @@ msgid "IPv6 address" msgstr "Endereço IPv6" msgid "IPv6 address delegated to the local tunnel endpoint (optional)" -msgstr "" +msgstr "Endereços IPv6 delegados para o ponta local do túnel (opcional)" msgid "IPv6 assignment hint" -msgstr "" +msgstr "Sugestão de atribuição IPv6" msgid "IPv6 assignment length" -msgstr "" +msgstr "Tamanho da atribuição IPv6" msgid "IPv6 gateway" msgstr "Roteador padrão do IPv6" @@ -1449,11 +1548,14 @@ msgid "IPv6 prefix length" msgstr "Tamanho Prefixo IPv6" msgid "IPv6 routed prefix" -msgstr "" +msgstr "Prefixo roteável IPv6" msgid "IPv6-Address" msgstr "Endereço IPv6" +msgid "IPv6-PD" +msgstr "IPv6-PD" + msgid "IPv6-in-IPv4 (RFC4213)" msgstr "IPv6-in-IPv4 (RFC4213)" @@ -1467,10 +1569,10 @@ msgid "Identity" msgstr "Identidade PEAP" msgid "If checked, 1DES is enaled" -msgstr "" +msgstr "Se marcado, a cifragem 1DES será habilitada" msgid "If checked, encryption is disabled" -msgstr "" +msgstr "Se marcado, a cifragem estará desabilitada" msgid "" "If specified, mount the device by its UUID instead of a fixed device node" @@ -1526,6 +1628,8 @@ msgid "" "In order to prevent unauthorized access to the system, your request has been " "blocked. Click \"Continue »\" below to return to the previous page." msgstr "" +"Para prevenir acesso não autorizado neste sistema, sua requisição foi " +"bloqueada. Clique abaixo em \"Continuar »\" para retornar à página anterior." msgid "Inactivity timeout" msgstr "Tempo limite de inatividade" @@ -1546,7 +1650,7 @@ msgid "Install" msgstr "Instalar" msgid "Install iputils-traceroute6 for IPv6 traceroute" -msgstr "" +msgstr "Instale iputils-traceroute6 para rastrear rotas IPv6" msgid "Install package %q" msgstr "Instalar pacote %q" @@ -1573,7 +1677,7 @@ msgid "Interface is shutting down..." msgstr "A interface está desligando..." msgid "Interface name" -msgstr "" +msgstr "Nome da Interface" msgid "Interface not present or not connected yet." msgstr "A interface não está presente ou não está conectada ainda." @@ -1588,7 +1692,7 @@ msgid "Interfaces" msgstr "Interfaces" msgid "Internal" -msgstr "" +msgstr "Interno" msgid "Internal Server Error" msgstr "erro no servidor interno" @@ -1609,7 +1713,6 @@ msgstr "" msgid "Invalid username and/or password! Please try again." msgstr "Usuário e/ou senha inválida! Por favor, tente novamente." -#, fuzzy msgid "" "It appears that you are trying to flash an image that does not fit into the " "flash memory, please verify the image file!" @@ -1627,7 +1730,7 @@ msgid "Join Network: Wireless Scan" msgstr "Conectar à Rede: Busca por Rede Sem Fio" msgid "Joining Network: %q" -msgstr "" +msgstr "Juntando-se à rede %q" msgid "Keep settings" msgstr "Manter configurações" @@ -1672,13 +1775,13 @@ msgid "Language and Style" msgstr "Idioma e Estilo" msgid "Latency" -msgstr "" +msgstr "Latência" msgid "Leaf" -msgstr "" +msgstr "Folha" msgid "Lease time" -msgstr "" +msgstr "Tempo de concessão" msgid "Lease validity time" msgstr "Tempo de validade da atribuição" @@ -1706,21 +1809,23 @@ msgstr "Limite" msgid "Limit DNS service to subnets interfaces on which we are serving DNS." msgstr "" +"Limite o serviço DNS para subredes das interfaces nas quais estamos servindo " +"DNS." msgid "Limit listening to these interfaces, and loopback." -msgstr "" +msgstr "Escute somente nestas interfaces e na interface local (loopback) " msgid "Line Attenuation (LATN)" -msgstr "" +msgstr "Atenuação de Linha (LATN)" msgid "Line Mode" -msgstr "" +msgstr "Modo da Linha" msgid "Line State" -msgstr "" +msgstr "Estado da Linha" msgid "Line Uptime" -msgstr "" +msgstr "Tempo de Atividade da Linha" msgid "Link On" msgstr "Enlace Ativo" @@ -1732,8 +1837,34 @@ msgstr "" "Lista dos servidores DNS para " "encaminhar as requisições" +msgid "" +"List of R0KHs in the same Mobility Domain.
Format: MAC-address,NAS-" +"Identifier,128-bit key as hex string.
This list is used to map R0KH-ID " +"(NAS Identifier) to a destination MAC address when requesting PMK-R1 key " +"from the R0KH that the STA used during the Initial Mobility Domain " +"Association." +msgstr "" +"Lista dos R0KHs no mesmo Domínio de Mobilidade.
Formato: Endereço " +"MAC, Identificador NAS, chave de 128 bits como cadeia hexadecimal.
" +"Esta lista é usada para mapear o Identificador R0KH (Identificador NAS) para " +"um endereço MAC de destino ao solicitar a chave PMK-R1 a partir do R0KH que " +"o STA usado durante a Associação de Domínio de Mobilidade Inicial." + +msgid "" +"List of R1KHs in the same Mobility Domain.
Format: MAC-address,R1KH-ID " +"as 6 octets with colons,128-bit key as hex string.
This list is used " +"to map R1KH-ID to a destination MAC address when sending PMK-R1 key from the " +"R0KH. This is also the list of authorized R1KHs in the MD that can request " +"PMK-R1 keys." +msgstr "" +"Lista dos R1KHs no mesmo Domínio de Mobilidade.
Formato: Endereço " +"MAC, R1KH-ID como 6 octetos com dois pontos, chave de 128 bits como cadeia " +"hexadecimal.
Esta lista é usada para mapear o identificador R1KH para " +"um endereço MAC de destino ao enviar a chave PMK-R1 a partir do R0KH. Esta é " +"também a lista de R1KHs autorizados no MD que podem solicitar chaves PMK-R1." + msgid "List of SSH key files for auth" -msgstr "" +msgstr "Lista de arquivos de chaves SSH para autenticação" msgid "List of domains to allow RFC1918 responses for" msgstr "" @@ -1746,10 +1877,10 @@ msgstr "" "fornecem resultados errados para consultas a domínios inexistentes (NX)" msgid "Listen Interfaces" -msgstr "" +msgstr "Interfaces de Escuta" msgid "Listen Port" -msgstr "" +msgstr "Porta de Escuta" msgid "Listen only on the given interface or, if unspecified, on all" msgstr "" @@ -1768,7 +1899,7 @@ msgid "Loading" msgstr "Carregando" msgid "Local IP address to assign" -msgstr "" +msgstr "Endereço IP local para atribuir" msgid "Local IPv4 address" msgstr "Endereço IPv4 local" @@ -1777,7 +1908,7 @@ msgid "Local IPv6 address" msgstr "Endereço IPv6 local" msgid "Local Service Only" -msgstr "" +msgstr "Somente Serviço Local" msgid "Local Startup" msgstr "Iniciação Local" @@ -1788,7 +1919,6 @@ msgstr "Hora Local" msgid "Local domain" msgstr "Domínio Local" -#, fuzzy msgid "" "Local domain specification. Names matching this domain are never forwarded " "and are resolved from DHCP or hosts files only" @@ -1816,7 +1946,7 @@ msgid "Localise queries" msgstr "Localizar consultas" msgid "Locked to channel %s used by: %s" -msgstr "" +msgstr "Travado no canal %s usado por: %s" msgid "Log output level" msgstr "Nível de detalhamento de saída dos registros" @@ -1835,6 +1965,8 @@ msgstr "Sair" msgid "Loss of Signal Seconds (LOSS)" msgstr "" +"Segundos de Perda de Sinal (LOSS)" msgid "Lowest leased address as offset from the network address." msgstr "O endereço mais baixo concedido como deslocamento do endereço da rede." @@ -1852,13 +1984,13 @@ msgid "MAC-List" msgstr "Lista de MAC" msgid "MAP / LW4over6" -msgstr "" +msgstr "MAP / LW4over6" msgid "MB/s" msgstr "MB/s" msgid "MD5" -msgstr "" +msgstr "MD5" msgid "MHz" msgstr "MHz" @@ -1872,12 +2004,16 @@ msgid "" "Make sure to clone the root filesystem using something like the commands " "below:" msgstr "" +"Certifique-se que clonou o sistema de arquivos raiz com algo como o comando " +"abaixo:" msgid "Manual" -msgstr "" +msgstr "Manual" msgid "Max. Attainable Data Rate (ATTNDR)" msgstr "" +"Taxa de Dados Atingível Máxima (ATTNDR)" msgid "Maximum Rate" msgstr "Taxa Máxima" @@ -1902,6 +2038,8 @@ msgid "" "Maximum length of the name is 15 characters including the automatic protocol/" "bridge prefix (br-, 6in4-, pppoe- etc.)" msgstr "" +"Comprimento máximo do nome é de 15 caracteres, incluindo o prefixo " +"automático do protocolo/ponte (br-, 6in4- pppoe-, etc.)" msgid "Maximum number of leased addresses." msgstr "Número máximo de endereços atribuídos." @@ -1925,19 +2063,22 @@ msgid "Minimum hold time" msgstr "Tempo mínimo de espera" msgid "Mirror monitor port" -msgstr "" +msgstr "Porta de monitoramento do espelho" msgid "Mirror source port" -msgstr "" +msgstr "Porta de origem do espelho" msgid "Missing protocol extension for proto %q" msgstr "Extensão para o protocolo %q está ausente" +msgid "Mobility Domain" +msgstr "Domínio da Mobilidade" + msgid "Mode" msgstr "Modo" msgid "Model" -msgstr "" +msgstr "Modelo" msgid "Modem device" msgstr "Dispositivo do Modem" @@ -1971,7 +2112,7 @@ msgstr "" "anexado ao sistema de arquivos" msgid "Mount filesystems not specifically configured" -msgstr "" +msgstr "Monte sistemas de arquivos não especificamente configurados" msgid "Mount options" msgstr "Opções de montagem" @@ -1980,7 +2121,7 @@ msgid "Mount point" msgstr "Ponto de montagem" msgid "Mount swap not specifically configured" -msgstr "" +msgstr "Montar espalho de troca (swap) não especificamente configurado" msgid "Mounted file systems" msgstr "Sistemas de arquivos montados" @@ -2001,22 +2142,22 @@ msgid "NAS ID" msgstr "NAS ID" msgid "NAT-T Mode" -msgstr "" +msgstr "Modo NAT-T" msgid "NAT64 Prefix" -msgstr "" +msgstr "Prefixo NAT64" msgid "NDP-Proxy" -msgstr "" +msgstr "Proxy NDP" msgid "NT Domain" -msgstr "" +msgstr "Domínio NT" msgid "NTP server candidates" msgstr "Candidatos a servidor NTP" msgid "NTP sync time-out" -msgstr "" +msgstr "Tempo limite da sincronia do NTP" msgid "Name" msgstr "Nome" @@ -2052,7 +2193,7 @@ msgid "No DHCP Server configured for this interface" msgstr "Nenhum Servidor DHCP configurado para esta interface" msgid "No NAT-T" -msgstr "" +msgstr "Sem NAT-T" msgid "No chains in this table" msgstr "Nenhuma cadeira nesta tabela" @@ -2088,16 +2229,18 @@ msgid "Noise" msgstr "Ruído" msgid "Noise Margin (SNR)" -msgstr "" +msgstr "Margem de Ruído (SNR)" msgid "Noise:" msgstr "Ruído:" msgid "Non Pre-emtive CRC errors (CRC_P)" msgstr "" +"Erros CRC Não PreemptivosCRC_P" msgid "Non-wildcard" -msgstr "" +msgstr "Sem caracter curinga" msgid "None" msgstr "Nenhum" @@ -2118,7 +2261,7 @@ msgid "Note: Configuration files will be erased." msgstr "Nota: Os arquivos de configuração serão apagados." msgid "Note: interface name length" -msgstr "" +msgstr "Aviso: tamanho do nome da interface" msgid "Notice" msgstr "Aviso" @@ -2133,10 +2276,10 @@ msgid "OPKG-Configuration" msgstr "Configuração-OPKG" msgid "Obfuscated Group Password" -msgstr "" +msgstr "Senha Ofuscada do Grupo" msgid "Obfuscated Password" -msgstr "" +msgstr "Senha Ofuscada" msgid "Off-State Delay" msgstr "Atraso no estado de desligado" @@ -2167,7 +2310,7 @@ msgid "One or more fields contain invalid values!" msgstr "Um ou mais campos contém valores inválidos!" msgid "One or more invalid/required values on tab" -msgstr "" +msgstr "Um ou mais valores inválidos/obrigatórios na aba" msgid "One or more required fields have no value!" msgstr "Um ou mais campos obrigatórios não tem valor!" @@ -2176,10 +2319,10 @@ msgid "Open list..." msgstr "Abrir lista..." msgid "OpenConnect (CISCO AnyConnect)" -msgstr "" +msgstr "OpenConnect (CISCO AnyConnect)" msgid "Operating frequency" -msgstr "" +msgstr "Frequência de Operação" msgid "Option changed" msgstr "Opção alterada" @@ -2187,41 +2330,52 @@ msgstr "Opção alterada" msgid "Option removed" msgstr "Opção removida" +msgid "Optional" +msgstr "Opcional" + msgid "Optional, specify to override default server (tic.sixxs.net)" msgstr "" +"Opcional, especifique para sobrescrever o servidor padrão (tic.sixxs.net)" msgid "Optional, use when the SIXXS account has more than one tunnel" -msgstr "" +msgstr "Opcional, para usar quando a conta SIXXS tem mais de um túnel" msgid "Optional." -msgstr "" +msgstr "Opcional." msgid "" "Optional. Adds in an additional layer of symmetric-key cryptography for post-" "quantum resistance." msgstr "" +"Opcional. Adiciona uma camada extra de cifragem simétrica para resistência " +"pós quântica." msgid "Optional. Create routes for Allowed IPs for this peer." -msgstr "" +msgstr "Opcional. Cria rotas para endereços IP Autorizados para este parceiro." msgid "" "Optional. Host of peer. Names are resolved prior to bringing up the " "interface." msgstr "" +"Opcional. Equipamento do parceiro. Nomes serão resolvido antes de levantar a " +"interface." msgid "Optional. Maximum Transmission Unit of tunnel interface." -msgstr "" +msgstr "Opcional. Unidade Máxima de Transmissão da interface do túnel." msgid "Optional. Port of peer." -msgstr "" +msgstr "Opcional. Porta do parceiro." msgid "" "Optional. Seconds between keep alive messages. Default is 0 (disabled). " "Recommended value if this device is behind a NAT is 25." msgstr "" +"Opcional. Segundos entre mensagens para manutenção da conexão. O padrão é 0 " +"(desabilitado). O valor recomendado caso este dispositivo esteja atrás de " +"uma NAT é 25." msgid "Optional. UDP port used for outgoing and incoming packets." -msgstr "" +msgstr "opcional. Porta UDP usada para pacotes saintes ou entrantes." msgid "Options" msgstr "Opções" @@ -2239,22 +2393,24 @@ msgid "Outdoor Channels" msgstr "Canais para externo" msgid "Output Interface" -msgstr "" +msgstr "Interface de Saída" msgid "Override MAC address" msgstr "Sobrescrever o endereço MAC" msgid "Override MTU" -msgstr "Sobrescrever o MTU" +msgstr "" +"Sobrescrever o MTU" msgid "Override TOS" -msgstr "" +msgstr "Sobrescrever o TOS" msgid "Override TTL" -msgstr "" +msgstr "Sobrescrever o TTL" msgid "Override default interface name" -msgstr "" +msgstr "Sobrescrever o nome da nova interface" msgid "Override the gateway in DHCP responses" msgstr "Sobrescrever o roteador padrão nas respostas do DHCP" @@ -2288,6 +2444,9 @@ msgstr "PID" msgid "PIN" msgstr "PIN" +msgid "PMK R1 Push" +msgstr "PMK R1 Push" + msgid "PPP" msgstr "PPP" @@ -2301,19 +2460,19 @@ msgid "PPPoE" msgstr "PPPoE" msgid "PPPoSSH" -msgstr "" +msgstr "PPPoSSH" msgid "PPtP" msgstr "PPtP" msgid "PSID offset" -msgstr "" +msgstr "Deslocamento PSID" msgid "PSID-bits length" -msgstr "" +msgstr "Comprimento dos bits PSID" msgid "PTM/EFM (Packet Transfer Mode)" -msgstr "" +msgstr "PTM/EFM (Modo de Transferência de Pacotes)" msgid "Package libiwinfo required!" msgstr "O pacote libiwinfo é necessário!" @@ -2340,7 +2499,7 @@ msgid "Password of Private Key" msgstr "Senha da Chave Privada" msgid "Password of inner Private Key" -msgstr "" +msgstr "Senha da Chave Privada interna" msgid "Password successfully changed!" msgstr "A senha foi alterada com sucesso!" @@ -2358,25 +2517,25 @@ msgid "Path to executable which handles the button event" msgstr "Caminho para o executável que trata o evento do botão" msgid "Path to inner CA-Certificate" -msgstr "" +msgstr "Caminho para os certificados CA interno" msgid "Path to inner Client-Certificate" -msgstr "" +msgstr "Caminho para o Certificado do Cliente interno" msgid "Path to inner Private Key" -msgstr "" +msgstr "Caminho para a Chave Privada interna" msgid "Peak:" msgstr "Pico:" msgid "Peer IP address to assign" -msgstr "" +msgstr "Endereço IP do parceiro para atribuir" msgid "Peers" -msgstr "" +msgstr "Parceiros" msgid "Perfect Forward Secrecy" -msgstr "" +msgstr "Sigilo Encaminhado Perfeito" msgid "Perform reboot" msgstr "Reiniciar o sistema" @@ -2385,7 +2544,7 @@ msgid "Perform reset" msgstr "Zerar configuração" msgid "Persistent Keep Alive" -msgstr "" +msgstr "Manutenção da Conexão Persistente" msgid "Phy Rate:" msgstr "Taxa física:" @@ -2412,13 +2571,17 @@ msgid "Port status:" msgstr "Status da porta" msgid "Power Management Mode" -msgstr "" +msgstr "Modo de Gerenciamento de Energia" msgid "Pre-emtive CRC errors (CRCP_P)" msgstr "" +"Erros CRC PreemptivosCRCP_P" + +msgid "Prefix Delegated" +msgstr "Prefixo Delegado" msgid "Preshared Key" -msgstr "" +msgstr "Chave Compartilhada" msgid "" "Presume peer to be dead after given amount of LCP echo failures, use 0 to " @@ -2428,7 +2591,7 @@ msgstr "" "echo do LCP. Use 0 para ignorar as falhas" msgid "Prevent listening on these interfaces." -msgstr "" +msgstr "Evite escutar nestas Interfaces." msgid "Prevents client-to-client communication" msgstr "Impede a comunicação de cliente para cliente" @@ -2437,7 +2600,7 @@ msgid "Prism2/2.5/3 802.11b Wireless Controller" msgstr "Prism2/2.5/3 802.11b Wireless Controlador" msgid "Private Key" -msgstr "" +msgstr "Chave Privada" msgid "Proceed" msgstr "Proceder" @@ -2446,7 +2609,7 @@ msgid "Processes" msgstr "Processos" msgid "Profile" -msgstr "" +msgstr "Perfil" msgid "Prot." msgstr "Protocolo" @@ -2473,19 +2636,27 @@ msgid "Pseudo Ad-Hoc (ahdemo)" msgstr "Ad-Hoc falso (ahdemo)" msgid "Public Key" -msgstr "" +msgstr "Chave Pública" msgid "Public prefix routed to this device for distribution to clients." msgstr "" +"Prefixo público roteado para este dispositivo para distribuição a seus " +"clientes." msgid "QMI Cellular" -msgstr "" +msgstr "Celular QMI" msgid "Quality" msgstr "Qualidade" +msgid "R0 Key Lifetime" +msgstr "Validade da Chave R0" + +msgid "R1 Key Holder" +msgstr "Detentor da Chave R1" + msgid "RFC3947 NAT-T mode" -msgstr "" +msgstr "Modo NAT-T (RFC3947)" msgid "RTS/CTS Threshold" msgstr "Limiar RTS/CTS" @@ -2544,7 +2715,6 @@ msgstr "" msgid "Really reset all changes?" msgstr "Realmente limpar todas as mudanças?" -#, fuzzy msgid "" "Really shut down network?\\nYou might lose access to this device if you are " "connected via this interface." @@ -2579,6 +2749,9 @@ msgstr "Tráfego em Tempo Real" msgid "Realtime Wireless" msgstr "Rede sem fio em Tempo Real" +msgid "Reassociation Deadline" +msgstr "Limite para Reassociação" + msgid "Rebind protection" msgstr "Proteção contra \"Rebind\"" @@ -2597,6 +2770,9 @@ msgstr "Receber" msgid "Receiver Antenna" msgstr "Antena de Recepção" +msgid "Recommended. IP addresses of the WireGuard interface." +msgstr "Recomendado. Endereços IP da interface do WireGuard." + msgid "Reconnect this interface" msgstr "Reconectar esta interface" @@ -2625,7 +2801,7 @@ msgid "Remote IPv4 address" msgstr "Endereço IPv4 remoto" msgid "Remote IPv4 address or FQDN" -msgstr "" +msgstr "Endereço IPv4 remoto ou FQDN" msgid "Remove" msgstr "Remover" @@ -2640,33 +2816,47 @@ msgid "Replace wireless configuration" msgstr "Substituir a configuração da rede sem fio" msgid "Request IPv6-address" -msgstr "" +msgstr "Solicita endereço IPv6" msgid "Request IPv6-prefix of length" -msgstr "" +msgstr "Solicita prefixo IPv6 de tamanho" msgid "Require TLS" -msgstr "" +msgstr "Requer TLS" + +msgid "Required" +msgstr "Necessário" msgid "Required for certain ISPs, e.g. Charter with DOCSIS 3" -msgstr "Requerido para alguns provedores de internet, ex. Charter com DOCSIS 3" +msgstr "" +"Obrigatório para alguns provedores de internet, ex. Charter com DOCSIS 3" msgid "Required. Base64-encoded private key for this interface." -msgstr "" +msgstr "Obrigatório. Chave privada codificada em Base64 para esta interface." msgid "" "Required. IP addresses and prefixes that this peer is allowed to use inside " "the tunnel. Usually the peer's tunnel IP addresses and the networks the peer " "routes through the tunnel." msgstr "" +"Obrigatório. Endereços IP e prefixos que este parceiro está autorizado a " +"usar dentro do túnel. Normalmente é o endereço IP do parceiro no túnel e as " +"redes que o parceiro roteia através do túnel." msgid "Required. Public key of peer." -msgstr "" +msgstr "Obrigatório. Chave pública do parceiro." + +msgid "" +"Requires the 'full' version of wpad/hostapd and support from the wifi driver " +"
(as of Feb 2017: ath9k and ath10k, in LEDE also mwlwifi and mt76)" +msgstr "Obrigatório. Chave Pública do parceiro." msgid "" "Requires upstream supports DNSSEC; verify unsigned domain responses really " "come from unsigned domains" msgstr "" +"Exige o suporte DNSSEC do servidor superior; verifica se resposta não " +"assinadas realmente vẽm de domínios não assinados." msgid "Reset" msgstr "Limpar" @@ -2705,19 +2895,19 @@ msgid "Root directory for files served via TFTP" msgstr "Diretório raiz para arquivos disponibilizados pelo TFTP" msgid "Root preparation" -msgstr "" +msgstr "Prepação da raiz (/)" msgid "Route Allowed IPs" -msgstr "" +msgstr "Roteie Andereços IP Autorizados" msgid "Route type" -msgstr "" +msgstr "Tipo de rota" msgid "Routed IPv6 prefix for downstream interfaces" -msgstr "" +msgstr "Prefixo roteável IPv6 para interfaces internas" msgid "Router Advertisement-Service" -msgstr "" +msgstr "Serviço de Anúncio de Roteador" msgid "Router Password" msgstr "Senha do Roteador" @@ -2740,30 +2930,32 @@ msgid "Run filesystem check" msgstr "Execute a verificação do sistema de arquivos " msgid "SHA256" -msgstr "" +msgstr "SHA256" msgid "" "SIXXS supports TIC only, for static tunnels using IP protocol 41 (RFC4213) " "use 6in4 instead" msgstr "" +"O SIXXS suporta somente TIC. Use o 6in4 para túneis estáticos usando o " +"protocolo IP 41 (RFC4213)" msgid "SIXXS-handle[/Tunnel-ID]" -msgstr "" +msgstr "Identificador do SIXXS[/Identificador do Túnel]" msgid "SNR" -msgstr "" +msgstr "SNR" msgid "SSH Access" msgstr "Acesso SSH" msgid "SSH server address" -msgstr "" +msgstr "Endereço do servidor SSH" msgid "SSH server port" -msgstr "" +msgstr "Porta do servidor SSH" msgid "SSH username" -msgstr "" +msgstr "Usuário do SSH" msgid "SSH-Keys" msgstr "Chaves SSH" @@ -2812,15 +3004,17 @@ msgid "Server Settings" msgstr "Configurações do Servidor" msgid "Server password" -msgstr "" +msgstr "Senha do servidor" msgid "" "Server password, enter the specific password of the tunnel when the username " "contains the tunnel ID" msgstr "" +"Senha do servidor. Informe a senha para este túnel quando o nome do usuário " +"contiver o identificador do túnel" msgid "Server username" -msgstr "" +msgstr "Usuário do servidor" msgid "Service Name" msgstr "Nome do Serviço" @@ -2831,7 +3025,6 @@ msgstr "Tipo do Serviço" msgid "Services" msgstr "Serviços" -#, fuzzy msgid "Set up Time Synchronization" msgstr "Configurar a Sincronização do Horário" @@ -2840,9 +3033,11 @@ msgstr "Configurar Servidor DHCP" msgid "Severely Errored Seconds (SES)" msgstr "" +"Segundos com erro severos (SES)" msgid "Short GI" -msgstr "" +msgstr "Intervalo de guarda curto" msgid "Show current backup file list" msgstr "Mostra a lista atual de arquivos para a cópia de segurança" @@ -2857,7 +3052,7 @@ msgid "Signal" msgstr "Sinal" msgid "Signal Attenuation (SATN)" -msgstr "" +msgstr "Atenuação do Sinal (SATN)" msgid "Signal:" msgstr "Sinal:" @@ -2866,7 +3061,7 @@ msgid "Size" msgstr "Tamanho" msgid "Size (.ipk)" -msgstr "" +msgstr "Tamanho (.ipk)" msgid "Skip" msgstr "Pular" @@ -2884,7 +3079,7 @@ msgid "Software" msgstr "Software" msgid "Software VLAN" -msgstr "" +msgstr "VLAN em Software" msgid "Some fields are invalid, cannot save values!" msgstr "Alguns campos estão inválidos e os valores não podem ser salvos!" @@ -2911,7 +3106,7 @@ msgid "Source" msgstr "Origem" msgid "Source routing" -msgstr "" +msgstr "Roteamento pela origem" msgid "Specifies the button state to handle" msgstr "Especifica o estado do botão para ser tratado" @@ -2937,17 +3132,21 @@ msgstr "" "equipamento está morto" msgid "Specify a TOS (Type of Service)." -msgstr "" +msgstr "Especifique um Tipo de Serviço (TOS)" msgid "" "Specify a TTL (Time to Live) for the encapsulating packet other than the " "default (64)." msgstr "" +"Especifica o tempo de vida (TTL) para os " +"pacotes encapsulados ao invés do padrão (64)." msgid "" "Specify an MTU (Maximum Transmission Unit) other than the default (1280 " "bytes)." msgstr "" +"Especifica a unidade máxima de transmissão (MTU) ao invés do valor padrão (1280 bytes)" msgid "Specify the secret encryption key here." msgstr "Especifique a chave de cifragem secreta aqui." @@ -3002,13 +3201,13 @@ msgid "Submit" msgstr "Enviar" msgid "Suppress logging" -msgstr "" +msgstr "Suprimir registros (log)" msgid "Suppress logging of the routine operation of these protocols" -msgstr "" +msgstr "Suprimir registros (log) de operações rotineiras destes protocolos" msgid "Swap" -msgstr "" +msgstr "Espaço de Troca (swap)" msgid "Swap Entry" msgstr "Entrada do espaço de troca (Swap)" @@ -3025,9 +3224,11 @@ msgstr "Switch %q (%s)" msgid "" "Switch %q has an unknown topology - the VLAN settings might not be accurate." msgstr "" +"O Switch %q tem uma topologia desconhecida - as configurações de VLAN podem " +"não ser precisas." msgid "Switch VLAN" -msgstr "" +msgstr "Switch VLAN" msgid "Switch protocol" msgstr "Trocar o protocolo" @@ -3072,12 +3273,11 @@ msgid "Target" msgstr "Destino" msgid "Target network" -msgstr "" +msgstr "Rede de destino" msgid "Terminate" msgstr "Terminar" -#, fuzzy msgid "" "The Device Configuration section covers physical settings of the " "radio hardware such as channel, transmit power or antenna selection which " @@ -3103,10 +3303,12 @@ msgid "" "The HE.net endpoint update configuration changed, you must now use the plain " "username instead of the user ID!" msgstr "" +"A configuração da atualização de pontas HE.net mudou. Você deve agora usar o " +"nome do usuário ao invés do identificador do usuário!" msgid "" "The IPv4 address or the fully-qualified domain name of the remote tunnel end." -msgstr "" +msgstr "O endereço IPv4 ou o nome completo (FQDN) da ponta remota do túnel." msgid "" "The IPv6 prefix assigned to the provider, usually ends with ::" @@ -3122,13 +3324,14 @@ msgstr "" msgid "The configuration file could not be loaded due to the following error:" msgstr "" +"O arquivo de configuração não pode ser carregado devido ao seguinte erro:" msgid "" "The device file of the memory or partition (e.g." " /dev/sda1)" msgstr "" -"O arquivo do dispositivo de armazenamento ou da partição (ex. /dev/sda1)" +"O arquivo do dispositivo de armazenamento ou da partição (ex: /dev/" +"sda1)" msgid "" "The filesystem that was used to format the memory ( DO NOT POWER OFF THE DEVICE!
Wait a " "few minutes before you try to reconnect. It might be necessary to renew the " @@ -3226,6 +3427,8 @@ msgid "" "The tunnel end-point is behind NAT, defaults to disabled and only applies to " "AYIYA" msgstr "" +"O final do túnel está atrás de um NAT. Por padrão será desabilitado e " +"somente se aplica a AYIYA" msgid "" "The uploaded image file does not contain a supported format. Make sure that " @@ -3268,6 +3471,9 @@ msgid "" "'server=1.2.3.4' fordomain-specific or full upstream DNS servers." msgstr "" +"Este arquivo deve conter linhas como 'server=/domain/1.2.3.4' ou " +"'server=1.2.3.4' para servidores DNS por domínio ou completos." msgid "" "This is a list of shell glob patterns for matching files and directories to " @@ -3283,6 +3489,8 @@ msgid "" "This is either the \"Update Key\" configured for the tunnel or the account " "password if no update key has been configured" msgstr "" +"Isto é a \"Update Key\" configurada para o túnel ou a senha da cpnta se não " +"tem uma \"Update Keu\" configurada" msgid "" "This is the content of /etc/rc.local. Insert your own commands here (in " @@ -3306,11 +3514,13 @@ msgstr "" "\">DHCP
na rede local" msgid "This is the plain username for logging into the account" -msgstr "" +msgstr "Este é o nome do usuário em para se autenticar na sua conta" msgid "" "This is the prefix routed to you by the tunnel broker for use by clients" msgstr "" +"Este é o prefixo roteado pelo agente do tunel para você usar com seus " +"clientes" msgid "This is the system crontab in which scheduled tasks can be defined." msgstr "Este é o sistema de agendamento de tarefas." @@ -3354,7 +3564,7 @@ msgstr "" "de segurança anterior." msgid "Tone" -msgstr "" +msgstr "Tom" msgid "Total Available" msgstr "Total Disponível" @@ -3393,16 +3603,16 @@ msgid "Tunnel Interface" msgstr "Interface de Tunelamento" msgid "Tunnel Link" -msgstr "" +msgstr "Enlace do túnel" msgid "Tunnel broker protocol" -msgstr "" +msgstr "Protocolo do agente do túnel" msgid "Tunnel setup server" -msgstr "" +msgstr "Servidor de configuração do túnel" msgid "Tunnel type" -msgstr "" +msgstr "Tipo de túnel" msgid "Turbo Mode" msgstr "Modo Turbo" @@ -3425,6 +3635,9 @@ msgstr "UMTS/GPRS/EV-DO" msgid "USB Device" msgstr "Dispositivo USB" +msgid "USB Ports" +msgstr "Portas USB" + msgid "UUID" msgstr "UUID" @@ -3433,6 +3646,8 @@ msgstr "Não é possível a expedição" msgid "Unavailable Seconds (UAS)" msgstr "" +"Segundos de indisponibilidade (UAS)" msgid "Unknown" msgstr "Desconhecido" @@ -3444,7 +3659,7 @@ msgid "Unmanaged" msgstr "Não gerenciado" msgid "Unmount" -msgstr "" +msgstr "Desmontar" msgid "Unsaved Changes" msgstr "Alterações Não Salvas" @@ -3486,22 +3701,24 @@ msgid "Use ISO/IEC 3166 alpha2 country codes." msgstr "Usar códigos de países ISO/IEC 3166 alpha2." msgid "Use MTU on tunnel interface" -msgstr "Use MTU na interface do túnel" +msgstr "" +"Use o MTU na interface do túnel" msgid "Use TTL on tunnel interface" msgstr "Use TTL na interface do túnel" msgid "Use as external overlay (/overlay)" -msgstr "" +msgstr "Use como uma sobreposição externa (/overlay)" msgid "Use as root filesystem (/)" -msgstr "" +msgstr "Usar como o sistema de arquivos raiz (/)" msgid "Use broadcast flag" msgstr "Use a marcação de broadcast" msgid "Use builtin IPv6-management" -msgstr "" +msgstr "Use o gerenciamento do IPv6 embarcado" msgid "Use custom DNS servers" msgstr "Use servidores DNS personalizados" @@ -3534,11 +3751,18 @@ msgstr "Usado" msgid "Used Key Slot" msgstr "Posição da Chave Usada" -msgid "User certificate (PEM encoded)" +msgid "" +"Used for two different purposes: RADIUS NAS ID and 802.11r R0KH-ID. Not " +"needed with normal WPA(2)-PSK." msgstr "" +"Usado para dois diferentes propósitos: identificador do RADIUS NAS e do " +"802.11r R0KH. Não necessário com o WPA(2)-PSK normal." + +msgid "User certificate (PEM encoded)" +msgstr "Certificado do usuário (codificado em formato PEM)" msgid "User key (PEM encoded)" -msgstr "" +msgstr "Chave do usuário (codificada em formato PEM)" msgid "Username" msgstr "Usuário" @@ -3547,7 +3771,7 @@ msgid "VC-Mux" msgstr "VC-Mux" msgid "VDSL" -msgstr "" +msgstr "VDSL" msgid "VLANs on %q" msgstr "VLANs em %q" @@ -3556,34 +3780,34 @@ msgid "VLANs on %q (%s)" msgstr "VLANs em %q (%s)" msgid "VPN Local address" -msgstr "" +msgstr "Endereço Local da VPN" msgid "VPN Local port" -msgstr "" +msgstr "Porta Local da VPN" msgid "VPN Server" msgstr "Servidor VPN" msgid "VPN Server port" -msgstr "" +msgstr "Porta do Servidor VPN" msgid "VPN Server's certificate SHA1 hash" -msgstr "" +msgstr "Resumo digital SHA1 do certificado do servidor VPN" msgid "VPNC (CISCO 3000 (and others) VPN)" -msgstr "" +msgstr "VPNC (VPN do CISCO 3000 (e outros))" msgid "Vendor" -msgstr "" +msgstr "Fabricante" msgid "Vendor Class to send when requesting DHCP" msgstr "Classe do fabricante para enviar quando requisitar o DHCP" msgid "Verbose" -msgstr "" +msgstr "Detalhado" msgid "Verbose logging by aiccu daemon" -msgstr "" +msgstr "Habilite registros detalhados do serviço AICCU" msgid "Verify" msgstr "Verificar" @@ -3619,6 +3843,8 @@ msgstr "" msgid "" "Wait for NTP sync that many seconds, seting to 0 disables waiting (optional)" msgstr "" +"Espere esta quantidade de segundos pela sincronia do NTP. Definindo como 0 " +"desabilita a espera (opcional)" msgid "Waiting for changes to be applied..." msgstr "Esperando a aplicação das mudanças..." @@ -3627,25 +3853,25 @@ msgid "Waiting for command to complete..." msgstr "Esperando o término do comando..." msgid "Waiting for device..." -msgstr "" +msgstr "Esperando pelo dispositivo..." msgid "Warning" msgstr "Atenção" msgid "Warning: There are unsaved changes that will get lost on reboot!" -msgstr "" +msgstr "Atenção: Existem mudanças não salvas que serão perdidas ao reiniciar!" msgid "Whether to create an IPv6 default route over the tunnel" -msgstr "" +msgstr "Se deve criar uma rota padrão IPv6 sobre o túnel" msgid "Whether to route only packets from delegated prefixes" -msgstr "" +msgstr "Se deve rotear somente pacotes de prefixos delegados" msgid "Width" -msgstr "" +msgstr "Largura" msgid "WireGuard VPN" -msgstr "" +msgstr "VPN WireGuard" msgid "Wireless" msgstr "Rede sem fio" @@ -3684,7 +3910,7 @@ msgid "Write received DNS requests to syslog" msgstr "Escreva as requisições DNS para o servidor de registro (syslog)" msgid "Write system log to file" -msgstr "" +msgstr "Escrever registo do sistema (log) no arquivo" msgid "XR Support" msgstr "Suporte a XR" @@ -3711,6 +3937,9 @@ msgid "" "upgrade it to at least version 7 or use another browser like Firefox, Opera " "or Safari." msgstr "" +"Seu Internet Explorer é muito velho para mostrar esta página corretamente. " +"Por favor, atualiza para, ao menos, a versão 7 ou use outro navegador como o " +"Firefox, Opera ou Safari." msgid "any" msgstr "qualquer" @@ -3718,9 +3947,8 @@ msgstr "qualquer" msgid "auto" msgstr "automático" -#, fuzzy msgid "automatic" -msgstr "estático" +msgstr "automático" msgid "baseT" msgstr "baseT" @@ -3744,7 +3972,7 @@ msgid "disable" msgstr "desativar" msgid "disabled" -msgstr "" +msgstr "desabilitado" msgid "expired" msgstr "expirado" @@ -3772,7 +4000,7 @@ msgid "hidden" msgstr "ocultar" msgid "hybrid mode" -msgstr "" +msgstr "Modo Híbrido" msgid "if target is a network" msgstr "se o destino for uma rede" @@ -3794,10 +4022,13 @@ msgstr "" "Arquivo local de DNS" msgid "minimum 1280, maximum 1480" -msgstr "" +msgstr "mínimo 1280, máximo 1480" + +msgid "minutes" +msgstr "minutos" msgid "navigation Navigation" -msgstr "" +msgstr "navegação Navegação" # Is this yes/no or no like in no one? msgid "no" @@ -3810,7 +4041,7 @@ msgid "none" msgstr "nenhum" msgid "not present" -msgstr "" +msgstr "não presente " msgid "off" msgstr "desligado" @@ -3822,35 +4053,38 @@ msgid "open" msgstr "aberto" msgid "overlay" -msgstr "" +msgstr "sobreposição" msgid "relay mode" -msgstr "" +msgstr "modo retransmissor" msgid "routed" msgstr "roteado" msgid "server mode" -msgstr "" +msgstr "modo servidor" msgid "skiplink1 Skip to navigation" -msgstr "" +msgstr "skiplink1 Pular para a navegação" msgid "skiplink2 Skip to content" -msgstr "" +msgstr "skiplink2 Pular para o conteúdo" msgid "stateful-only" -msgstr "" +msgstr "somente com estado" msgid "stateless" -msgstr "" +msgstr "sem estado" msgid "stateless + stateful" -msgstr "" +msgstr "sem estado + com estado" msgid "tagged" msgstr "etiquetado" +msgid "time units (TUs / 1.024 ms) [1000-65535]" +msgstr "unidades de tempo (TUs / 1.024 ms) [1000-65535]" + msgid "unknown" msgstr "desconhecido" @@ -3872,6 +4106,9 @@ msgstr "sim" msgid "« Back" msgstr "« Voltar" +#~ msgid "Required. Base64-encoded public key of peer." +#~ msgstr "Necessário. Chave Pública do parceiro codificada como Base64." + #~ msgid "An additional network will be created if you leave this unchecked." #~ msgstr "Uma rede adicional será criada se você deixar isto desmarcado." diff --git a/package/luci/modules/luci-base/po/pt/base.po b/package/luci/modules/luci-base/po/pt/base.po index d8790dc1ff..389b077a32 100644 --- a/package/luci/modules/luci-base/po/pt/base.po +++ b/package/luci/modules/luci-base/po/pt/base.po @@ -43,18 +43,45 @@ msgstr "" msgid "-- match by label --" msgstr "" +msgid "-- match by uuid --" +msgstr "" + msgid "1 Minute Load:" msgstr "Carga de 1 Minuto:" msgid "15 Minute Load:" msgstr "Carga de 15 minutos:" +msgid "4-character hexadecimal ID" +msgstr "" + msgid "464XLAT (CLAT)" msgstr "" msgid "5 Minute Load:" msgstr "Carga 5 Minutos:" +msgid "6-octet identifier as a hex string - no colons" +msgstr "" + +msgid "802.11r Fast Transition" +msgstr "" + +msgid "802.11w Association SA Query maximum timeout" +msgstr "" + +msgid "802.11w Association SA Query retry timeout" +msgstr "" + +msgid "802.11w Management Frame Protection" +msgstr "" + +msgid "802.11w maximum timeout" +msgstr "" + +msgid "802.11w retry timeout" +msgstr "" + msgid "BSSID" msgstr "" "BSSID" @@ -877,6 +904,9 @@ msgstr "Desativar temporizador de HW-Beacon" msgid "Disabled" msgstr "Desativado" +msgid "Disabled (default)" +msgstr "" + msgid "Discard upstream RFC1918 responses" msgstr "Descartar respostas RFC1918 a montante" @@ -1051,6 +1081,11 @@ msgstr "Ativar/Desativar" msgid "Enabled" msgstr "Ativado" +msgid "" +"Enables fast roaming among access points that belong to the same Mobility " +"Domain" +msgstr "" + msgid "Enables the Spanning Tree Protocol on this bridge" msgstr "Ativa o Spanning Tree nesta bridge" @@ -1100,6 +1135,12 @@ msgstr "" msgid "External" msgstr "" +msgid "External R0 Key Holder List" +msgstr "" + +msgid "External R1 Key Holder List" +msgstr "" + msgid "External system log server" msgstr "Servidor externo de logs de sistema" @@ -1353,6 +1394,9 @@ msgstr "" msgid "IKE DH Group" msgstr "" +msgid "IP Addresses" +msgstr "" + msgid "IP address" msgstr "Endereço IP" @@ -1446,6 +1490,9 @@ msgstr "" msgid "IPv6-Address" msgstr "Endereço-IPv6" +msgid "IPv6-PD" +msgstr "" + msgid "IPv6-in-IPv4 (RFC4213)" msgstr "IPv6-em-IPv4 (RFC4213)" @@ -1715,6 +1762,22 @@ msgstr "" "Lista de servidores DNS para " "onde encaminhar os pedidos" +msgid "" +"List of R0KHs in the same Mobility Domain.
Format: MAC-address,NAS-" +"Identifier,128-bit key as hex string.
This list is used to map R0KH-ID " +"(NAS Identifier) to a destination MAC address when requesting PMK-R1 key " +"from the R0KH that the STA used during the Initial Mobility Domain " +"Association." +msgstr "" + +msgid "" +"List of R1KHs in the same Mobility Domain.
Format: MAC-address,R1KH-ID " +"as 6 octets with colons,128-bit key as hex string.
This list is used " +"to map R1KH-ID to a destination MAC address when sending PMK-R1 key from the " +"R0KH. This is also the list of authorized R1KHs in the MD that can request " +"PMK-R1 keys." +msgstr "" + msgid "List of SSH key files for auth" msgstr "" @@ -1906,6 +1969,9 @@ msgstr "" msgid "Missing protocol extension for proto %q" msgstr "Falta a extensão de protocolo para o protocolo %q" +msgid "Mobility Domain" +msgstr "" + msgid "Mode" msgstr "Modo" @@ -2159,6 +2225,9 @@ msgstr "Opção alterada" msgid "Option removed" msgstr "Opção removida" +msgid "Optional" +msgstr "" + msgid "Optional, specify to override default server (tic.sixxs.net)" msgstr "" @@ -2257,6 +2326,9 @@ msgstr "PID" msgid "PIN" msgstr "PIN" +msgid "PMK R1 Push" +msgstr "" + msgid "PPP" msgstr "PPP" @@ -2386,6 +2458,9 @@ msgstr "" msgid "Pre-emtive CRC errors (CRCP_P)" msgstr "" +msgid "Prefix Delegated" +msgstr "" + msgid "Preshared Key" msgstr "" @@ -2451,6 +2526,12 @@ msgstr "" msgid "Quality" msgstr "Qualidade" +msgid "R0 Key Lifetime" +msgstr "" + +msgid "R1 Key Holder" +msgstr "" + msgid "RFC3947 NAT-T mode" msgstr "" @@ -2543,6 +2624,9 @@ msgstr "Tráfego em Tempo Real" msgid "Realtime Wireless" msgstr "Wireless em Tempo Real" +msgid "Reassociation Deadline" +msgstr "" + msgid "Rebind protection" msgstr "Religar protecção" @@ -2561,6 +2645,9 @@ msgstr "Receber" msgid "Receiver Antenna" msgstr "Antena de Recepção" +msgid "Recommended. IP addresses of the WireGuard interface." +msgstr "" + msgid "Reconnect this interface" msgstr "Reconetar esta interface" @@ -2612,6 +2699,9 @@ msgstr "" msgid "Require TLS" msgstr "" +msgid "Required" +msgstr "" + msgid "Required for certain ISPs, e.g. Charter with DOCSIS 3" msgstr "Necessário para certos ISPs, p.ex. Charter with DOCSIS 3" @@ -2627,6 +2717,11 @@ msgstr "" msgid "Required. Public key of peer." msgstr "" +msgid "" +"Requires the 'full' version of wpad/hostapd and support from the wifi driver " +"
(as of Feb 2017: ath9k and ath10k, in LEDE also mwlwifi and mt76)" +msgstr "" + msgid "" "Requires upstream supports DNSSEC; verify unsigned domain responses really " "come from unsigned domains" @@ -3360,6 +3455,9 @@ msgstr "UMTS/GPRS/EV-DO" msgid "USB Device" msgstr "Dispositivo USB" +msgid "USB Ports" +msgstr "" + msgid "UUID" msgstr "UUID" @@ -3461,6 +3559,11 @@ msgstr "Usado" msgid "Used Key Slot" msgstr "" +msgid "" +"Used for two different purposes: RADIUS NAS ID and 802.11r R0KH-ID. Not " +"needed with normal WPA(2)-PSK." +msgstr "" + msgid "User certificate (PEM encoded)" msgstr "" @@ -3723,6 +3826,9 @@ msgstr "" msgid "minimum 1280, maximum 1480" msgstr "" +msgid "minutes" +msgstr "" + msgid "navigation Navigation" msgstr "" @@ -3777,6 +3883,9 @@ msgstr "" msgid "tagged" msgstr "" +msgid "time units (TUs / 1.024 ms) [1000-65535]" +msgstr "" + msgid "unknown" msgstr "desconhecido" diff --git a/package/luci/modules/luci-base/po/ro/base.po b/package/luci/modules/luci-base/po/ro/base.po index 4135c796a8..365574b174 100644 --- a/package/luci/modules/luci-base/po/ro/base.po +++ b/package/luci/modules/luci-base/po/ro/base.po @@ -42,18 +42,45 @@ msgstr "" msgid "-- match by label --" msgstr "" +msgid "-- match by uuid --" +msgstr "" + msgid "1 Minute Load:" msgstr "Incarcarea in ultimul minut" msgid "15 Minute Load:" msgstr "Incarcarea in ultimele 15 minute" +msgid "4-character hexadecimal ID" +msgstr "" + msgid "464XLAT (CLAT)" msgstr "" msgid "5 Minute Load:" msgstr "Incarcarea in ultimele 5 minute" +msgid "6-octet identifier as a hex string - no colons" +msgstr "" + +msgid "802.11r Fast Transition" +msgstr "" + +msgid "802.11w Association SA Query maximum timeout" +msgstr "" + +msgid "802.11w Association SA Query retry timeout" +msgstr "" + +msgid "802.11w Management Frame Protection" +msgstr "" + +msgid "802.11w maximum timeout" +msgstr "" + +msgid "802.11w retry timeout" +msgstr "" + msgid "BSSID" msgstr "BSSID" @@ -847,6 +874,9 @@ msgstr "" msgid "Disabled" msgstr "Dezactivat" +msgid "Disabled (default)" +msgstr "" + msgid "Discard upstream RFC1918 responses" msgstr "" @@ -1006,6 +1036,11 @@ msgstr "Activeaza/Dezactiveaza" msgid "Enabled" msgstr "Activat" +msgid "" +"Enables fast roaming among access points that belong to the same Mobility " +"Domain" +msgstr "" + msgid "Enables the Spanning Tree Protocol on this bridge" msgstr "" @@ -1052,6 +1087,12 @@ msgstr "" msgid "External" msgstr "" +msgid "External R0 Key Holder List" +msgstr "" + +msgid "External R1 Key Holder List" +msgstr "" + msgid "External system log server" msgstr "Server de log-uri extern" @@ -1300,6 +1341,9 @@ msgstr "" msgid "IKE DH Group" msgstr "" +msgid "IP Addresses" +msgstr "" + msgid "IP address" msgstr "Adresa IP" @@ -1393,6 +1437,9 @@ msgstr "" msgid "IPv6-Address" msgstr "" +msgid "IPv6-PD" +msgstr "" + msgid "IPv6-in-IPv4 (RFC4213)" msgstr "" @@ -1653,6 +1700,22 @@ msgid "" "requests to" msgstr "" +msgid "" +"List of R0KHs in the same Mobility Domain.
Format: MAC-address,NAS-" +"Identifier,128-bit key as hex string.
This list is used to map R0KH-ID " +"(NAS Identifier) to a destination MAC address when requesting PMK-R1 key " +"from the R0KH that the STA used during the Initial Mobility Domain " +"Association." +msgstr "" + +msgid "" +"List of R1KHs in the same Mobility Domain.
Format: MAC-address,R1KH-ID " +"as 6 octets with colons,128-bit key as hex string.
This list is used " +"to map R1KH-ID to a destination MAC address when sending PMK-R1 key from the " +"R0KH. This is also the list of authorized R1KHs in the MD that can request " +"PMK-R1 keys." +msgstr "" + msgid "List of SSH key files for auth" msgstr "" @@ -1838,6 +1901,9 @@ msgstr "" msgid "Missing protocol extension for proto %q" msgstr "" +msgid "Mobility Domain" +msgstr "" + msgid "Mode" msgstr "Mod" @@ -2083,6 +2149,9 @@ msgstr "Optiunea schimbata" msgid "Option removed" msgstr "Optiunea eliminata" +msgid "Optional" +msgstr "" + msgid "Optional, specify to override default server (tic.sixxs.net)" msgstr "" @@ -2181,6 +2250,9 @@ msgstr "PID" msgid "PIN" msgstr "" +msgid "PMK R1 Push" +msgstr "" + msgid "PPP" msgstr "" @@ -2310,6 +2382,9 @@ msgstr "" msgid "Pre-emtive CRC errors (CRCP_P)" msgstr "" +msgid "Prefix Delegated" +msgstr "" + msgid "Preshared Key" msgstr "" @@ -2375,6 +2450,12 @@ msgstr "" msgid "Quality" msgstr "Calitate" +msgid "R0 Key Lifetime" +msgstr "" + +msgid "R1 Key Holder" +msgstr "" + msgid "RFC3947 NAT-T mode" msgstr "" @@ -2456,6 +2537,9 @@ msgstr "Traficul in timp real" msgid "Realtime Wireless" msgstr "" +msgid "Reassociation Deadline" +msgstr "" + msgid "Rebind protection" msgstr "" @@ -2474,6 +2558,9 @@ msgstr "" msgid "Receiver Antenna" msgstr "Antena receptorului" +msgid "Recommended. IP addresses of the WireGuard interface." +msgstr "" + msgid "Reconnect this interface" msgstr "Reconecteaza aceasta interfata" @@ -2525,6 +2612,9 @@ msgstr "" msgid "Require TLS" msgstr "" +msgid "Required" +msgstr "" + msgid "Required for certain ISPs, e.g. Charter with DOCSIS 3" msgstr "" @@ -2540,6 +2630,11 @@ msgstr "" msgid "Required. Public key of peer." msgstr "" +msgid "" +"Requires the 'full' version of wpad/hostapd and support from the wifi driver " +"
(as of Feb 2017: ath9k and ath10k, in LEDE also mwlwifi and mt76)" +msgstr "" + msgid "" "Requires upstream supports DNSSEC; verify unsigned domain responses really " "come from unsigned domains" @@ -3227,6 +3322,9 @@ msgstr "" msgid "USB Device" msgstr "Dispozitiv USB" +msgid "USB Ports" +msgstr "" + msgid "UUID" msgstr "UUID" @@ -3328,6 +3426,11 @@ msgstr "Folosit" msgid "Used Key Slot" msgstr "Slot de cheie folosit" +msgid "" +"Used for two different purposes: RADIUS NAS ID and 802.11r R0KH-ID. Not " +"needed with normal WPA(2)-PSK." +msgstr "" + msgid "User certificate (PEM encoded)" msgstr "" @@ -3579,6 +3682,9 @@ msgstr "" msgid "minimum 1280, maximum 1480" msgstr "" +msgid "minutes" +msgstr "" + msgid "navigation Navigation" msgstr "" @@ -3633,6 +3739,9 @@ msgstr "" msgid "tagged" msgstr "etichetat" +msgid "time units (TUs / 1.024 ms) [1000-65535]" +msgstr "" + msgid "unknown" msgstr "necunoscut" diff --git a/package/luci/modules/luci-base/po/ru/base.po b/package/luci/modules/luci-base/po/ru/base.po index e7045884be..d11fbc2cde 100644 --- a/package/luci/modules/luci-base/po/ru/base.po +++ b/package/luci/modules/luci-base/po/ru/base.po @@ -45,18 +45,45 @@ msgstr "" msgid "-- match by label --" msgstr "" +msgid "-- match by uuid --" +msgstr "" + msgid "1 Minute Load:" msgstr "Загрузка за 1 минуту:" msgid "15 Minute Load:" msgstr "Загрузка за 15 минут:" +msgid "4-character hexadecimal ID" +msgstr "" + msgid "464XLAT (CLAT)" msgstr "" msgid "5 Minute Load:" msgstr "Загрузка за 5 минут:" +msgid "6-octet identifier as a hex string - no colons" +msgstr "" + +msgid "802.11r Fast Transition" +msgstr "" + +msgid "802.11w Association SA Query maximum timeout" +msgstr "" + +msgid "802.11w Association SA Query retry timeout" +msgstr "" + +msgid "802.11w Management Frame Protection" +msgstr "" + +msgid "802.11w maximum timeout" +msgstr "" + +msgid "802.11w retry timeout" +msgstr "" + msgid "BSSID" msgstr "BSSID" @@ -876,6 +903,9 @@ msgstr "Отключить таймер HW-Beacon" msgid "Disabled" msgstr "Отключено" +msgid "Disabled (default)" +msgstr "" + msgid "Discard upstream RFC1918 responses" msgstr "Отбрасывать ответы RFC1918" @@ -1052,6 +1082,11 @@ msgstr "Включить/выключить" msgid "Enabled" msgstr "Включено" +msgid "" +"Enables fast roaming among access points that belong to the same Mobility " +"Domain" +msgstr "" + msgid "Enables the Spanning Tree Protocol on this bridge" msgstr "Включает Spanning Tree Protocol на этом мосту" @@ -1101,6 +1136,12 @@ msgstr "" msgid "External" msgstr "" +msgid "External R0 Key Holder List" +msgstr "" + +msgid "External R1 Key Holder List" +msgstr "" + msgid "External system log server" msgstr "Сервер системного журнала" @@ -1352,6 +1393,9 @@ msgstr "" msgid "IKE DH Group" msgstr "" +msgid "IP Addresses" +msgstr "" + msgid "IP address" msgstr "IP-адрес" @@ -1445,6 +1489,9 @@ msgstr "" msgid "IPv6-Address" msgstr "IPv6-адрес" +msgid "IPv6-PD" +msgstr "" + msgid "IPv6-in-IPv4 (RFC4213)" msgstr "IPv6 в IPv4 (RFC4213)" @@ -1719,6 +1766,22 @@ msgstr "" "Список DNS-серверов для " "перенаправления запросов" +msgid "" +"List of R0KHs in the same Mobility Domain.
Format: MAC-address,NAS-" +"Identifier,128-bit key as hex string.
This list is used to map R0KH-ID " +"(NAS Identifier) to a destination MAC address when requesting PMK-R1 key " +"from the R0KH that the STA used during the Initial Mobility Domain " +"Association." +msgstr "" + +msgid "" +"List of R1KHs in the same Mobility Domain.
Format: MAC-address,R1KH-ID " +"as 6 octets with colons,128-bit key as hex string.
This list is used " +"to map R1KH-ID to a destination MAC address when sending PMK-R1 key from the " +"R0KH. This is also the list of authorized R1KHs in the MD that can request " +"PMK-R1 keys." +msgstr "" + msgid "List of SSH key files for auth" msgstr "" @@ -1911,6 +1974,9 @@ msgstr "" msgid "Missing protocol extension for proto %q" msgstr "Отсутствует расширение протокола %q" +msgid "Mobility Domain" +msgstr "" + msgid "Mode" msgstr "Режим" @@ -2165,6 +2231,9 @@ msgstr "Опция изменена" msgid "Option removed" msgstr "Опция удалена" +msgid "Optional" +msgstr "" + msgid "Optional, specify to override default server (tic.sixxs.net)" msgstr "" @@ -2265,6 +2334,9 @@ msgstr "PID" msgid "PIN" msgstr "PIN" +msgid "PMK R1 Push" +msgstr "" + msgid "PPP" msgstr "PPP" @@ -2394,6 +2466,9 @@ msgstr "" msgid "Pre-emtive CRC errors (CRCP_P)" msgstr "" +msgid "Prefix Delegated" +msgstr "" + msgid "Preshared Key" msgstr "" @@ -2461,6 +2536,12 @@ msgstr "" msgid "Quality" msgstr "Качество" +msgid "R0 Key Lifetime" +msgstr "" + +msgid "R1 Key Holder" +msgstr "" + msgid "RFC3947 NAT-T mode" msgstr "" @@ -2553,6 +2634,9 @@ msgstr "Трафик в реальном времени" msgid "Realtime Wireless" msgstr "Беспроводная сеть в реальном времени" +msgid "Reassociation Deadline" +msgstr "" + msgid "Rebind protection" msgstr "Защита от DNS Rebinding" @@ -2571,6 +2655,9 @@ msgstr "Приём" msgid "Receiver Antenna" msgstr "Приёмная антенна" +msgid "Recommended. IP addresses of the WireGuard interface." +msgstr "" + msgid "Reconnect this interface" msgstr "Переподключить этот интерфейс" @@ -2623,6 +2710,9 @@ msgstr "" msgid "Require TLS" msgstr "" +msgid "Required" +msgstr "" + msgid "Required for certain ISPs, e.g. Charter with DOCSIS 3" msgstr "Требуется для некоторых интернет-провайдеров" @@ -2638,6 +2728,11 @@ msgstr "" msgid "Required. Public key of peer." msgstr "" +msgid "" +"Requires the 'full' version of wpad/hostapd and support from the wifi driver " +"
(as of Feb 2017: ath9k and ath10k, in LEDE also mwlwifi and mt76)" +msgstr "" + msgid "" "Requires upstream supports DNSSEC; verify unsigned domain responses really " "come from unsigned domains" @@ -3394,6 +3489,9 @@ msgstr "UMTS/GPRS/EV-DO" msgid "USB Device" msgstr "USB-устройство" +msgid "USB Ports" +msgstr "" + msgid "UUID" msgstr "UUID" @@ -3502,6 +3600,11 @@ msgstr "Использовано" msgid "Used Key Slot" msgstr "Используемый слот ключа" +msgid "" +"Used for two different purposes: RADIUS NAS ID and 802.11r R0KH-ID. Not " +"needed with normal WPA(2)-PSK." +msgstr "" + msgid "User certificate (PEM encoded)" msgstr "" @@ -3764,6 +3867,9 @@ msgstr "локальный BSSID" msgstr "" @@ -828,6 +855,9 @@ msgstr "" msgid "Disabled" msgstr "" +msgid "Disabled (default)" +msgstr "" + msgid "Discard upstream RFC1918 responses" msgstr "" @@ -987,6 +1017,11 @@ msgstr "" msgid "Enabled" msgstr "" +msgid "" +"Enables fast roaming among access points that belong to the same Mobility " +"Domain" +msgstr "" + msgid "Enables the Spanning Tree Protocol on this bridge" msgstr "" @@ -1033,6 +1068,12 @@ msgstr "" msgid "External" msgstr "" +msgid "External R0 Key Holder List" +msgstr "" + +msgid "External R1 Key Holder List" +msgstr "" + msgid "External system log server" msgstr "" @@ -1278,6 +1319,9 @@ msgstr "" msgid "IKE DH Group" msgstr "" +msgid "IP Addresses" +msgstr "" + msgid "IP address" msgstr "" @@ -1371,6 +1415,9 @@ msgstr "" msgid "IPv6-Address" msgstr "" +msgid "IPv6-PD" +msgstr "" + msgid "IPv6-in-IPv4 (RFC4213)" msgstr "" @@ -1628,6 +1675,22 @@ msgid "" "requests to" msgstr "" +msgid "" +"List of R0KHs in the same Mobility Domain.
Format: MAC-address,NAS-" +"Identifier,128-bit key as hex string.
This list is used to map R0KH-ID " +"(NAS Identifier) to a destination MAC address when requesting PMK-R1 key " +"from the R0KH that the STA used during the Initial Mobility Domain " +"Association." +msgstr "" + +msgid "" +"List of R1KHs in the same Mobility Domain.
Format: MAC-address,R1KH-ID " +"as 6 octets with colons,128-bit key as hex string.
This list is used " +"to map R1KH-ID to a destination MAC address when sending PMK-R1 key from the " +"R0KH. This is also the list of authorized R1KHs in the MD that can request " +"PMK-R1 keys." +msgstr "" + msgid "List of SSH key files for auth" msgstr "" @@ -1813,6 +1876,9 @@ msgstr "" msgid "Missing protocol extension for proto %q" msgstr "" +msgid "Mobility Domain" +msgstr "" + msgid "Mode" msgstr "" @@ -2058,6 +2124,9 @@ msgstr "" msgid "Option removed" msgstr "" +msgid "Optional" +msgstr "" + msgid "Optional, specify to override default server (tic.sixxs.net)" msgstr "" @@ -2156,6 +2225,9 @@ msgstr "" msgid "PIN" msgstr "" +msgid "PMK R1 Push" +msgstr "" + msgid "PPP" msgstr "" @@ -2285,6 +2357,9 @@ msgstr "" msgid "Pre-emtive CRC errors (CRCP_P)" msgstr "" +msgid "Prefix Delegated" +msgstr "" + msgid "Preshared Key" msgstr "" @@ -2350,6 +2425,12 @@ msgstr "" msgid "Quality" msgstr "" +msgid "R0 Key Lifetime" +msgstr "" + +msgid "R1 Key Holder" +msgstr "" + msgid "RFC3947 NAT-T mode" msgstr "" @@ -2429,6 +2510,9 @@ msgstr "" msgid "Realtime Wireless" msgstr "" +msgid "Reassociation Deadline" +msgstr "" + msgid "Rebind protection" msgstr "" @@ -2447,6 +2531,9 @@ msgstr "" msgid "Receiver Antenna" msgstr "" +msgid "Recommended. IP addresses of the WireGuard interface." +msgstr "" + msgid "Reconnect this interface" msgstr "" @@ -2498,6 +2585,9 @@ msgstr "" msgid "Require TLS" msgstr "" +msgid "Required" +msgstr "" + msgid "Required for certain ISPs, e.g. Charter with DOCSIS 3" msgstr "" @@ -2513,6 +2603,11 @@ msgstr "" msgid "Required. Public key of peer." msgstr "" +msgid "" +"Requires the 'full' version of wpad/hostapd and support from the wifi driver " +"
(as of Feb 2017: ath9k and ath10k, in LEDE also mwlwifi and mt76)" +msgstr "" + msgid "" "Requires upstream supports DNSSEC; verify unsigned domain responses really " "come from unsigned domains" @@ -3197,6 +3292,9 @@ msgstr "" msgid "USB Device" msgstr "" +msgid "USB Ports" +msgstr "" + msgid "UUID" msgstr "" @@ -3298,6 +3396,11 @@ msgstr "" msgid "Used Key Slot" msgstr "" +msgid "" +"Used for two different purposes: RADIUS NAS ID and 802.11r R0KH-ID. Not " +"needed with normal WPA(2)-PSK." +msgstr "" + msgid "User certificate (PEM encoded)" msgstr "" @@ -3547,6 +3650,9 @@ msgstr "" msgid "minimum 1280, maximum 1480" msgstr "" +msgid "minutes" +msgstr "" + msgid "navigation Navigation" msgstr "" @@ -3601,6 +3707,9 @@ msgstr "" msgid "tagged" msgstr "" +msgid "time units (TUs / 1.024 ms) [1000-65535]" +msgstr "" + msgid "unknown" msgstr "" diff --git a/package/luci/modules/luci-base/po/sv/base.po b/package/luci/modules/luci-base/po/sv/base.po index 4e228082e2..e7e437fe5c 100644 --- a/package/luci/modules/luci-base/po/sv/base.po +++ b/package/luci/modules/luci-base/po/sv/base.po @@ -41,18 +41,45 @@ msgstr "" msgid "-- match by label --" msgstr "" +msgid "-- match by uuid --" +msgstr "" + msgid "1 Minute Load:" msgstr "Belastning senaste minuten:" msgid "15 Minute Load:" msgstr "Belastning senaste 15 minutrarna:" +msgid "4-character hexadecimal ID" +msgstr "" + msgid "464XLAT (CLAT)" msgstr "" msgid "5 Minute Load:" msgstr "Belastning senaste 5 minutrarna:" +msgid "6-octet identifier as a hex string - no colons" +msgstr "" + +msgid "802.11r Fast Transition" +msgstr "" + +msgid "802.11w Association SA Query maximum timeout" +msgstr "" + +msgid "802.11w Association SA Query retry timeout" +msgstr "" + +msgid "802.11w Management Frame Protection" +msgstr "" + +msgid "802.11w maximum timeout" +msgstr "" + +msgid "802.11w retry timeout" +msgstr "" + msgid "BSSID" msgstr "BSSID" @@ -834,6 +861,9 @@ msgstr "" msgid "Disabled" msgstr "" +msgid "Disabled (default)" +msgstr "" + msgid "Discard upstream RFC1918 responses" msgstr "" @@ -993,6 +1023,11 @@ msgstr "" msgid "Enabled" msgstr "" +msgid "" +"Enables fast roaming among access points that belong to the same Mobility " +"Domain" +msgstr "" + msgid "Enables the Spanning Tree Protocol on this bridge" msgstr "" @@ -1039,6 +1074,12 @@ msgstr "" msgid "External" msgstr "" +msgid "External R0 Key Holder List" +msgstr "" + +msgid "External R1 Key Holder List" +msgstr "" + msgid "External system log server" msgstr "" @@ -1284,6 +1325,9 @@ msgstr "" msgid "IKE DH Group" msgstr "" +msgid "IP Addresses" +msgstr "" + msgid "IP address" msgstr "" @@ -1377,6 +1421,9 @@ msgstr "" msgid "IPv6-Address" msgstr "" +msgid "IPv6-PD" +msgstr "" + msgid "IPv6-in-IPv4 (RFC4213)" msgstr "" @@ -1634,6 +1681,22 @@ msgid "" "requests to" msgstr "" +msgid "" +"List of R0KHs in the same Mobility Domain.
Format: MAC-address,NAS-" +"Identifier,128-bit key as hex string.
This list is used to map R0KH-ID " +"(NAS Identifier) to a destination MAC address when requesting PMK-R1 key " +"from the R0KH that the STA used during the Initial Mobility Domain " +"Association." +msgstr "" + +msgid "" +"List of R1KHs in the same Mobility Domain.
Format: MAC-address,R1KH-ID " +"as 6 octets with colons,128-bit key as hex string.
This list is used " +"to map R1KH-ID to a destination MAC address when sending PMK-R1 key from the " +"R0KH. This is also the list of authorized R1KHs in the MD that can request " +"PMK-R1 keys." +msgstr "" + msgid "List of SSH key files for auth" msgstr "" @@ -1819,6 +1882,9 @@ msgstr "" msgid "Missing protocol extension for proto %q" msgstr "" +msgid "Mobility Domain" +msgstr "" + msgid "Mode" msgstr "" @@ -2064,6 +2130,9 @@ msgstr "" msgid "Option removed" msgstr "" +msgid "Optional" +msgstr "" + msgid "Optional, specify to override default server (tic.sixxs.net)" msgstr "" @@ -2162,6 +2231,9 @@ msgstr "" msgid "PIN" msgstr "" +msgid "PMK R1 Push" +msgstr "" + msgid "PPP" msgstr "" @@ -2291,6 +2363,9 @@ msgstr "" msgid "Pre-emtive CRC errors (CRCP_P)" msgstr "" +msgid "Prefix Delegated" +msgstr "" + msgid "Preshared Key" msgstr "" @@ -2356,6 +2431,12 @@ msgstr "" msgid "Quality" msgstr "" +msgid "R0 Key Lifetime" +msgstr "" + +msgid "R1 Key Holder" +msgstr "" + msgid "RFC3947 NAT-T mode" msgstr "" @@ -2435,6 +2516,9 @@ msgstr "" msgid "Realtime Wireless" msgstr "" +msgid "Reassociation Deadline" +msgstr "" + msgid "Rebind protection" msgstr "" @@ -2453,6 +2537,9 @@ msgstr "" msgid "Receiver Antenna" msgstr "" +msgid "Recommended. IP addresses of the WireGuard interface." +msgstr "" + msgid "Reconnect this interface" msgstr "" @@ -2504,6 +2591,9 @@ msgstr "" msgid "Require TLS" msgstr "" +msgid "Required" +msgstr "" + msgid "Required for certain ISPs, e.g. Charter with DOCSIS 3" msgstr "" @@ -2519,6 +2609,11 @@ msgstr "" msgid "Required. Public key of peer." msgstr "" +msgid "" +"Requires the 'full' version of wpad/hostapd and support from the wifi driver " +"
(as of Feb 2017: ath9k and ath10k, in LEDE also mwlwifi and mt76)" +msgstr "" + msgid "" "Requires upstream supports DNSSEC; verify unsigned domain responses really " "come from unsigned domains" @@ -3203,6 +3298,9 @@ msgstr "" msgid "USB Device" msgstr "" +msgid "USB Ports" +msgstr "" + msgid "UUID" msgstr "" @@ -3304,6 +3402,11 @@ msgstr "" msgid "Used Key Slot" msgstr "" +msgid "" +"Used for two different purposes: RADIUS NAS ID and 802.11r R0KH-ID. Not " +"needed with normal WPA(2)-PSK." +msgstr "" + msgid "User certificate (PEM encoded)" msgstr "" @@ -3553,6 +3656,9 @@ msgstr "" msgid "minimum 1280, maximum 1480" msgstr "" +msgid "minutes" +msgstr "" + msgid "navigation Navigation" msgstr "" @@ -3607,6 +3713,9 @@ msgstr "" msgid "tagged" msgstr "" +msgid "time units (TUs / 1.024 ms) [1000-65535]" +msgstr "" + msgid "unknown" msgstr "" diff --git a/package/luci/modules/luci-base/po/templates/base.pot b/package/luci/modules/luci-base/po/templates/base.pot index 5a77cd2938..cc47c2c6f2 100644 --- a/package/luci/modules/luci-base/po/templates/base.pot +++ b/package/luci/modules/luci-base/po/templates/base.pot @@ -31,18 +31,45 @@ msgstr "" msgid "-- match by label --" msgstr "" +msgid "-- match by uuid --" +msgstr "" + msgid "1 Minute Load:" msgstr "" msgid "15 Minute Load:" msgstr "" +msgid "4-character hexadecimal ID" +msgstr "" + msgid "464XLAT (CLAT)" msgstr "" msgid "5 Minute Load:" msgstr "" +msgid "6-octet identifier as a hex string - no colons" +msgstr "" + +msgid "802.11r Fast Transition" +msgstr "" + +msgid "802.11w Association SA Query maximum timeout" +msgstr "" + +msgid "802.11w Association SA Query retry timeout" +msgstr "" + +msgid "802.11w Management Frame Protection" +msgstr "" + +msgid "802.11w maximum timeout" +msgstr "" + +msgid "802.11w retry timeout" +msgstr "" + msgid "BSSID" msgstr "" @@ -821,6 +848,9 @@ msgstr "" msgid "Disabled" msgstr "" +msgid "Disabled (default)" +msgstr "" + msgid "Discard upstream RFC1918 responses" msgstr "" @@ -980,6 +1010,11 @@ msgstr "" msgid "Enabled" msgstr "" +msgid "" +"Enables fast roaming among access points that belong to the same Mobility " +"Domain" +msgstr "" + msgid "Enables the Spanning Tree Protocol on this bridge" msgstr "" @@ -1026,6 +1061,12 @@ msgstr "" msgid "External" msgstr "" +msgid "External R0 Key Holder List" +msgstr "" + +msgid "External R1 Key Holder List" +msgstr "" + msgid "External system log server" msgstr "" @@ -1271,6 +1312,9 @@ msgstr "" msgid "IKE DH Group" msgstr "" +msgid "IP Addresses" +msgstr "" + msgid "IP address" msgstr "" @@ -1364,6 +1408,9 @@ msgstr "" msgid "IPv6-Address" msgstr "" +msgid "IPv6-PD" +msgstr "" + msgid "IPv6-in-IPv4 (RFC4213)" msgstr "" @@ -1621,6 +1668,22 @@ msgid "" "requests to" msgstr "" +msgid "" +"List of R0KHs in the same Mobility Domain.
Format: MAC-address,NAS-" +"Identifier,128-bit key as hex string.
This list is used to map R0KH-ID " +"(NAS Identifier) to a destination MAC address when requesting PMK-R1 key " +"from the R0KH that the STA used during the Initial Mobility Domain " +"Association." +msgstr "" + +msgid "" +"List of R1KHs in the same Mobility Domain.
Format: MAC-address,R1KH-ID " +"as 6 octets with colons,128-bit key as hex string.
This list is used " +"to map R1KH-ID to a destination MAC address when sending PMK-R1 key from the " +"R0KH. This is also the list of authorized R1KHs in the MD that can request " +"PMK-R1 keys." +msgstr "" + msgid "List of SSH key files for auth" msgstr "" @@ -1806,6 +1869,9 @@ msgstr "" msgid "Missing protocol extension for proto %q" msgstr "" +msgid "Mobility Domain" +msgstr "" + msgid "Mode" msgstr "" @@ -2051,6 +2117,9 @@ msgstr "" msgid "Option removed" msgstr "" +msgid "Optional" +msgstr "" + msgid "Optional, specify to override default server (tic.sixxs.net)" msgstr "" @@ -2149,6 +2218,9 @@ msgstr "" msgid "PIN" msgstr "" +msgid "PMK R1 Push" +msgstr "" + msgid "PPP" msgstr "" @@ -2278,6 +2350,9 @@ msgstr "" msgid "Pre-emtive CRC errors (CRCP_P)" msgstr "" +msgid "Prefix Delegated" +msgstr "" + msgid "Preshared Key" msgstr "" @@ -2343,6 +2418,12 @@ msgstr "" msgid "Quality" msgstr "" +msgid "R0 Key Lifetime" +msgstr "" + +msgid "R1 Key Holder" +msgstr "" + msgid "RFC3947 NAT-T mode" msgstr "" @@ -2422,6 +2503,9 @@ msgstr "" msgid "Realtime Wireless" msgstr "" +msgid "Reassociation Deadline" +msgstr "" + msgid "Rebind protection" msgstr "" @@ -2440,6 +2524,9 @@ msgstr "" msgid "Receiver Antenna" msgstr "" +msgid "Recommended. IP addresses of the WireGuard interface." +msgstr "" + msgid "Reconnect this interface" msgstr "" @@ -2491,6 +2578,9 @@ msgstr "" msgid "Require TLS" msgstr "" +msgid "Required" +msgstr "" + msgid "Required for certain ISPs, e.g. Charter with DOCSIS 3" msgstr "" @@ -2506,6 +2596,11 @@ msgstr "" msgid "Required. Public key of peer." msgstr "" +msgid "" +"Requires the 'full' version of wpad/hostapd and support from the wifi driver " +"
(as of Feb 2017: ath9k and ath10k, in LEDE also mwlwifi and mt76)" +msgstr "" + msgid "" "Requires upstream supports DNSSEC; verify unsigned domain responses really " "come from unsigned domains" @@ -3190,6 +3285,9 @@ msgstr "" msgid "USB Device" msgstr "" +msgid "USB Ports" +msgstr "" + msgid "UUID" msgstr "" @@ -3291,6 +3389,11 @@ msgstr "" msgid "Used Key Slot" msgstr "" +msgid "" +"Used for two different purposes: RADIUS NAS ID and 802.11r R0KH-ID. Not " +"needed with normal WPA(2)-PSK." +msgstr "" + msgid "User certificate (PEM encoded)" msgstr "" @@ -3540,6 +3643,9 @@ msgstr "" msgid "minimum 1280, maximum 1480" msgstr "" +msgid "minutes" +msgstr "" + msgid "navigation Navigation" msgstr "" @@ -3594,6 +3700,9 @@ msgstr "" msgid "tagged" msgstr "" +msgid "time units (TUs / 1.024 ms) [1000-65535]" +msgstr "" + msgid "unknown" msgstr "" diff --git a/package/luci/modules/luci-base/po/tr/base.po b/package/luci/modules/luci-base/po/tr/base.po index 7f0ea7e166..09312734a2 100644 --- a/package/luci/modules/luci-base/po/tr/base.po +++ b/package/luci/modules/luci-base/po/tr/base.po @@ -41,18 +41,45 @@ msgstr "" msgid "-- match by label --" msgstr "" +msgid "-- match by uuid --" +msgstr "" + msgid "1 Minute Load:" msgstr "1 Dakikalık Yük:" msgid "15 Minute Load:" msgstr "15 Dakikalık Yük:" +msgid "4-character hexadecimal ID" +msgstr "" + msgid "464XLAT (CLAT)" msgstr "" msgid "5 Minute Load:" msgstr "5 Dakikalık Yük:" +msgid "6-octet identifier as a hex string - no colons" +msgstr "" + +msgid "802.11r Fast Transition" +msgstr "" + +msgid "802.11w Association SA Query maximum timeout" +msgstr "" + +msgid "802.11w Association SA Query retry timeout" +msgstr "" + +msgid "802.11w Management Frame Protection" +msgstr "" + +msgid "802.11w maximum timeout" +msgstr "" + +msgid "802.11w retry timeout" +msgstr "" + msgid "BSSID" msgstr " BSSID " @@ -841,6 +868,9 @@ msgstr "" msgid "Disabled" msgstr "" +msgid "Disabled (default)" +msgstr "" + msgid "Discard upstream RFC1918 responses" msgstr "" @@ -1000,6 +1030,11 @@ msgstr "" msgid "Enabled" msgstr "" +msgid "" +"Enables fast roaming among access points that belong to the same Mobility " +"Domain" +msgstr "" + msgid "Enables the Spanning Tree Protocol on this bridge" msgstr "" @@ -1046,6 +1081,12 @@ msgstr "" msgid "External" msgstr "" +msgid "External R0 Key Holder List" +msgstr "" + +msgid "External R1 Key Holder List" +msgstr "" + msgid "External system log server" msgstr "" @@ -1291,6 +1332,9 @@ msgstr "" msgid "IKE DH Group" msgstr "" +msgid "IP Addresses" +msgstr "" + msgid "IP address" msgstr "" @@ -1384,6 +1428,9 @@ msgstr "" msgid "IPv6-Address" msgstr "" +msgid "IPv6-PD" +msgstr "" + msgid "IPv6-in-IPv4 (RFC4213)" msgstr "" @@ -1641,6 +1688,22 @@ msgid "" "requests to" msgstr "" +msgid "" +"List of R0KHs in the same Mobility Domain.
Format: MAC-address,NAS-" +"Identifier,128-bit key as hex string.
This list is used to map R0KH-ID " +"(NAS Identifier) to a destination MAC address when requesting PMK-R1 key " +"from the R0KH that the STA used during the Initial Mobility Domain " +"Association." +msgstr "" + +msgid "" +"List of R1KHs in the same Mobility Domain.
Format: MAC-address,R1KH-ID " +"as 6 octets with colons,128-bit key as hex string.
This list is used " +"to map R1KH-ID to a destination MAC address when sending PMK-R1 key from the " +"R0KH. This is also the list of authorized R1KHs in the MD that can request " +"PMK-R1 keys." +msgstr "" + msgid "List of SSH key files for auth" msgstr "" @@ -1826,6 +1889,9 @@ msgstr "" msgid "Missing protocol extension for proto %q" msgstr "" +msgid "Mobility Domain" +msgstr "" + msgid "Mode" msgstr "" @@ -2071,6 +2137,9 @@ msgstr "" msgid "Option removed" msgstr "" +msgid "Optional" +msgstr "" + msgid "Optional, specify to override default server (tic.sixxs.net)" msgstr "" @@ -2169,6 +2238,9 @@ msgstr "" msgid "PIN" msgstr "" +msgid "PMK R1 Push" +msgstr "" + msgid "PPP" msgstr "" @@ -2298,6 +2370,9 @@ msgstr "" msgid "Pre-emtive CRC errors (CRCP_P)" msgstr "" +msgid "Prefix Delegated" +msgstr "" + msgid "Preshared Key" msgstr "" @@ -2363,6 +2438,12 @@ msgstr "" msgid "Quality" msgstr "" +msgid "R0 Key Lifetime" +msgstr "" + +msgid "R1 Key Holder" +msgstr "" + msgid "RFC3947 NAT-T mode" msgstr "" @@ -2442,6 +2523,9 @@ msgstr "" msgid "Realtime Wireless" msgstr "" +msgid "Reassociation Deadline" +msgstr "" + msgid "Rebind protection" msgstr "" @@ -2460,6 +2544,9 @@ msgstr "" msgid "Receiver Antenna" msgstr "" +msgid "Recommended. IP addresses of the WireGuard interface." +msgstr "" + msgid "Reconnect this interface" msgstr "" @@ -2511,6 +2598,9 @@ msgstr "" msgid "Require TLS" msgstr "" +msgid "Required" +msgstr "" + msgid "Required for certain ISPs, e.g. Charter with DOCSIS 3" msgstr "" @@ -2526,6 +2616,11 @@ msgstr "" msgid "Required. Public key of peer." msgstr "" +msgid "" +"Requires the 'full' version of wpad/hostapd and support from the wifi driver " +"
(as of Feb 2017: ath9k and ath10k, in LEDE also mwlwifi and mt76)" +msgstr "" + msgid "" "Requires upstream supports DNSSEC; verify unsigned domain responses really " "come from unsigned domains" @@ -3210,6 +3305,9 @@ msgstr "" msgid "USB Device" msgstr "" +msgid "USB Ports" +msgstr "" + msgid "UUID" msgstr "" @@ -3311,6 +3409,11 @@ msgstr "" msgid "Used Key Slot" msgstr "" +msgid "" +"Used for two different purposes: RADIUS NAS ID and 802.11r R0KH-ID. Not " +"needed with normal WPA(2)-PSK." +msgstr "" + msgid "User certificate (PEM encoded)" msgstr "" @@ -3562,6 +3665,9 @@ msgstr "yerel DNS dosyası" msgid "minimum 1280, maximum 1480" msgstr "" +msgid "minutes" +msgstr "" + msgid "navigation Navigation" msgstr "" @@ -3616,6 +3722,9 @@ msgstr "" msgid "tagged" msgstr "etiketlendi" +msgid "time units (TUs / 1.024 ms) [1000-65535]" +msgstr "" + msgid "unknown" msgstr "" diff --git a/package/luci/modules/luci-base/po/uk/base.po b/package/luci/modules/luci-base/po/uk/base.po index 29b1514e27..5abf039e85 100644 --- a/package/luci/modules/luci-base/po/uk/base.po +++ b/package/luci/modules/luci-base/po/uk/base.po @@ -42,18 +42,45 @@ msgstr "" msgid "-- match by label --" msgstr "" +msgid "-- match by uuid --" +msgstr "" + msgid "1 Minute Load:" msgstr "Навантаження за 1 хвилину:" msgid "15 Minute Load:" msgstr "Навантаження за 15 хвилин:" +msgid "4-character hexadecimal ID" +msgstr "" + msgid "464XLAT (CLAT)" msgstr "" msgid "5 Minute Load:" msgstr "Навантаження за 5 хвилин:" +msgid "6-octet identifier as a hex string - no colons" +msgstr "" + +msgid "802.11r Fast Transition" +msgstr "" + +msgid "802.11w Association SA Query maximum timeout" +msgstr "" + +msgid "802.11w Association SA Query retry timeout" +msgstr "" + +msgid "802.11w Management Frame Protection" +msgstr "" + +msgid "802.11w maximum timeout" +msgstr "" + +msgid "802.11w retry timeout" +msgstr "" + msgid "BSSID" msgstr "" "STP на цьому мосту" @@ -1109,6 +1144,12 @@ msgstr "Термін оренди адрес, мінімум 2 хвилини (< msgid "External" msgstr "" +msgid "External R0 Key Holder List" +msgstr "" + +msgid "External R1 Key Holder List" +msgstr "" + msgid "External system log server" msgstr "Зовнішній сервер системного журналу" @@ -1360,6 +1401,9 @@ msgstr "" msgid "IKE DH Group" msgstr "" +msgid "IP Addresses" +msgstr "" + msgid "IP address" msgstr "IP-адреса" @@ -1453,6 +1497,9 @@ msgstr "" msgid "IPv6-Address" msgstr "IPv6-адреса" +msgid "IPv6-PD" +msgstr "" + msgid "IPv6-in-IPv4 (RFC4213)" msgstr "IPv6 у IPv4 (RFC4213)" @@ -1726,6 +1773,22 @@ msgstr "" "Список DNS-серверів, до яких " "пересилати запити" +msgid "" +"List of R0KHs in the same Mobility Domain.
Format: MAC-address,NAS-" +"Identifier,128-bit key as hex string.
This list is used to map R0KH-ID " +"(NAS Identifier) to a destination MAC address when requesting PMK-R1 key " +"from the R0KH that the STA used during the Initial Mobility Domain " +"Association." +msgstr "" + +msgid "" +"List of R1KHs in the same Mobility Domain.
Format: MAC-address,R1KH-ID " +"as 6 octets with colons,128-bit key as hex string.
This list is used " +"to map R1KH-ID to a destination MAC address when sending PMK-R1 key from the " +"R0KH. This is also the list of authorized R1KHs in the MD that can request " +"PMK-R1 keys." +msgstr "" + msgid "List of SSH key files for auth" msgstr "" @@ -1920,6 +1983,9 @@ msgstr "" msgid "Missing protocol extension for proto %q" msgstr "Відсутні розширення для протоколу %q" +msgid "Mobility Domain" +msgstr "" + msgid "Mode" msgstr "Режим" @@ -2173,6 +2239,9 @@ msgstr "Опція змінена" msgid "Option removed" msgstr "Опція видалена" +msgid "Optional" +msgstr "" + msgid "Optional, specify to override default server (tic.sixxs.net)" msgstr "" @@ -2276,6 +2345,9 @@ msgstr "" ">PIN" +msgid "PMK R1 Push" +msgstr "" + msgid "PPP" msgstr "PPP" @@ -2405,6 +2477,9 @@ msgstr "" msgid "Pre-emtive CRC errors (CRCP_P)" msgstr "" +msgid "Prefix Delegated" +msgstr "" + msgid "Preshared Key" msgstr "" @@ -2472,6 +2547,12 @@ msgstr "" msgid "Quality" msgstr "Якість" +msgid "R0 Key Lifetime" +msgstr "" + +msgid "R1 Key Holder" +msgstr "" + msgid "RFC3947 NAT-T mode" msgstr "" @@ -2567,6 +2648,9 @@ msgstr "Трафік у реальному часі" msgid "Realtime Wireless" msgstr "Бездротові мережі у реальному часі" +msgid "Reassociation Deadline" +msgstr "" + msgid "Rebind protection" msgstr "Захист від переприв'язки" @@ -2585,6 +2669,9 @@ msgstr "Прийом" msgid "Receiver Antenna" msgstr "Антена приймача" +msgid "Recommended. IP addresses of the WireGuard interface." +msgstr "" + msgid "Reconnect this interface" msgstr "Перепідключити цей інтерфейс" @@ -2636,6 +2723,9 @@ msgstr "" msgid "Require TLS" msgstr "" +msgid "Required" +msgstr "" + msgid "Required for certain ISPs, e.g. Charter with DOCSIS 3" msgstr "Потрібно для деяких провайдерів, наприклад, Charter із DOCSIS 3" @@ -2651,6 +2741,11 @@ msgstr "" msgid "Required. Public key of peer." msgstr "" +msgid "" +"Requires the 'full' version of wpad/hostapd and support from the wifi driver " +"
(as of Feb 2017: ath9k and ath10k, in LEDE also mwlwifi and mt76)" +msgstr "" + msgid "" "Requires upstream supports DNSSEC; verify unsigned domain responses really " "come from unsigned domains" @@ -3410,6 +3505,9 @@ msgstr "UMTS/GPRS/EV-DO" msgid "USB Device" msgstr "USB-пристрій" +msgid "USB Ports" +msgstr "" + msgid "UUID" msgstr "UUID" @@ -3518,6 +3616,11 @@ msgstr "Використано" msgid "Used Key Slot" msgstr "Використовується слот ключа" +msgid "" +"Used for two different purposes: RADIUS NAS ID and 802.11r R0KH-ID. Not " +"needed with normal WPA(2)-PSK." +msgstr "" + msgid "User certificate (PEM encoded)" msgstr "" @@ -3779,6 +3882,9 @@ msgstr "" msgid "minimum 1280, maximum 1480" msgstr "" +msgid "minutes" +msgstr "" + msgid "navigation Navigation" msgstr "" @@ -3833,6 +3939,9 @@ msgstr "" msgid "tagged" msgstr "з позначкою" +msgid "time units (TUs / 1.024 ms) [1000-65535]" +msgstr "" + msgid "unknown" msgstr "невідомий" diff --git a/package/luci/modules/luci-base/po/vi/base.po b/package/luci/modules/luci-base/po/vi/base.po index 0cc83bf5a1..162bd30664 100644 --- a/package/luci/modules/luci-base/po/vi/base.po +++ b/package/luci/modules/luci-base/po/vi/base.po @@ -43,18 +43,45 @@ msgstr "" msgid "-- match by label --" msgstr "" +msgid "-- match by uuid --" +msgstr "" + msgid "1 Minute Load:" msgstr "" msgid "15 Minute Load:" msgstr "" +msgid "4-character hexadecimal ID" +msgstr "" + msgid "464XLAT (CLAT)" msgstr "" msgid "5 Minute Load:" msgstr "" +msgid "6-octet identifier as a hex string - no colons" +msgstr "" + +msgid "802.11r Fast Transition" +msgstr "" + +msgid "802.11w Association SA Query maximum timeout" +msgstr "" + +msgid "802.11w Association SA Query retry timeout" +msgstr "" + +msgid "802.11w Management Frame Protection" +msgstr "" + +msgid "802.11w maximum timeout" +msgstr "" + +msgid "802.11w retry timeout" +msgstr "" + msgid "BSSID" msgstr "BSSID" @@ -837,6 +864,9 @@ msgstr "Vô hiệu hóa bộ chỉnh giờ HW-Beacon" msgid "Disabled" msgstr "" +msgid "Disabled (default)" +msgstr "" + msgid "Discard upstream RFC1918 responses" msgstr "" @@ -1005,6 +1035,11 @@ msgstr "Cho kích hoạt/ Vô hiệu hóa" msgid "Enabled" msgstr "" +msgid "" +"Enables fast roaming among access points that belong to the same Mobility " +"Domain" +msgstr "" + msgid "Enables the Spanning Tree Protocol on this bridge" msgstr "Kích hoạt Spanning Tree Protocol trên cầu nối này" @@ -1051,6 +1086,12 @@ msgstr "" msgid "External" msgstr "" +msgid "External R0 Key Holder List" +msgstr "" + +msgid "External R1 Key Holder List" +msgstr "" + msgid "External system log server" msgstr "" @@ -1298,6 +1339,9 @@ msgstr "" msgid "IKE DH Group" msgstr "" +msgid "IP Addresses" +msgstr "" + msgid "IP address" msgstr "Địa chỉ IP" @@ -1391,6 +1435,9 @@ msgstr "" msgid "IPv6-Address" msgstr "" +msgid "IPv6-PD" +msgstr "" + msgid "IPv6-in-IPv4 (RFC4213)" msgstr "" @@ -1656,6 +1703,22 @@ msgid "" "requests to" msgstr "" +msgid "" +"List of R0KHs in the same Mobility Domain.
Format: MAC-address,NAS-" +"Identifier,128-bit key as hex string.
This list is used to map R0KH-ID " +"(NAS Identifier) to a destination MAC address when requesting PMK-R1 key " +"from the R0KH that the STA used during the Initial Mobility Domain " +"Association." +msgstr "" + +msgid "" +"List of R1KHs in the same Mobility Domain.
Format: MAC-address,R1KH-ID " +"as 6 octets with colons,128-bit key as hex string.
This list is used " +"to map R1KH-ID to a destination MAC address when sending PMK-R1 key from the " +"R0KH. This is also the list of authorized R1KHs in the MD that can request " +"PMK-R1 keys." +msgstr "" + msgid "List of SSH key files for auth" msgstr "" @@ -1841,6 +1904,9 @@ msgstr "" msgid "Missing protocol extension for proto %q" msgstr "" +msgid "Mobility Domain" +msgstr "" + msgid "Mode" msgstr "Chế độ" @@ -2094,6 +2160,9 @@ msgstr "" msgid "Option removed" msgstr "" +msgid "Optional" +msgstr "" + msgid "Optional, specify to override default server (tic.sixxs.net)" msgstr "" @@ -2192,6 +2261,9 @@ msgstr "PID" msgid "PIN" msgstr "" +msgid "PMK R1 Push" +msgstr "" + msgid "PPP" msgstr "" @@ -2321,6 +2393,9 @@ msgstr "" msgid "Pre-emtive CRC errors (CRCP_P)" msgstr "" +msgid "Prefix Delegated" +msgstr "" + msgid "Preshared Key" msgstr "" @@ -2386,6 +2461,12 @@ msgstr "" msgid "Quality" msgstr "" +msgid "R0 Key Lifetime" +msgstr "" + +msgid "R1 Key Holder" +msgstr "" + msgid "RFC3947 NAT-T mode" msgstr "" @@ -2467,6 +2548,9 @@ msgstr "" msgid "Realtime Wireless" msgstr "" +msgid "Reassociation Deadline" +msgstr "" + msgid "Rebind protection" msgstr "" @@ -2485,6 +2569,9 @@ msgstr "Receive" msgid "Receiver Antenna" msgstr "Máy thu Antenna" +msgid "Recommended. IP addresses of the WireGuard interface." +msgstr "" + msgid "Reconnect this interface" msgstr "" @@ -2536,6 +2623,9 @@ msgstr "" msgid "Require TLS" msgstr "" +msgid "Required" +msgstr "" + msgid "Required for certain ISPs, e.g. Charter with DOCSIS 3" msgstr "" @@ -2551,6 +2641,11 @@ msgstr "" msgid "Required. Public key of peer." msgstr "" +msgid "" +"Requires the 'full' version of wpad/hostapd and support from the wifi driver " +"
(as of Feb 2017: ath9k and ath10k, in LEDE also mwlwifi and mt76)" +msgstr "" + msgid "" "Requires upstream supports DNSSEC; verify unsigned domain responses really " "come from unsigned domains" @@ -3252,6 +3347,9 @@ msgstr "" msgid "USB Device" msgstr "" +msgid "USB Ports" +msgstr "" + msgid "UUID" msgstr "" @@ -3353,6 +3451,11 @@ msgstr "Đã sử dụng" msgid "Used Key Slot" msgstr "" +msgid "" +"Used for two different purposes: RADIUS NAS ID and 802.11r R0KH-ID. Not " +"needed with normal WPA(2)-PSK." +msgstr "" + msgid "User certificate (PEM encoded)" msgstr "" @@ -3609,6 +3712,9 @@ msgstr "Tập tin DNS địa phương" msgid "minimum 1280, maximum 1480" msgstr "" +msgid "minutes" +msgstr "" + msgid "navigation Navigation" msgstr "" @@ -3663,6 +3769,9 @@ msgstr "" msgid "tagged" msgstr "" +msgid "time units (TUs / 1.024 ms) [1000-65535]" +msgstr "" + msgid "unknown" msgstr "" diff --git a/package/luci/modules/luci-base/po/zh-cn/base.po b/package/luci/modules/luci-base/po/zh-cn/base.po index 7c00f8ff88..dca93f0a19 100644 --- a/package/luci/modules/luci-base/po/zh-cn/base.po +++ b/package/luci/modules/luci-base/po/zh-cn/base.po @@ -43,18 +43,45 @@ msgstr "-- 根据设备匹配 --" msgid "-- match by label --" msgstr "-- 根据标签匹配 --" +msgid "-- match by uuid --" +msgstr "" + msgid "1 Minute Load:" msgstr "1分钟负载:" msgid "15 Minute Load:" msgstr "15分钟负载:" +msgid "4-character hexadecimal ID" +msgstr "" + msgid "464XLAT (CLAT)" msgstr "464XLAT (CLAT)" msgid "5 Minute Load:" msgstr "5分钟负载:" +msgid "6-octet identifier as a hex string - no colons" +msgstr "" + +msgid "802.11r Fast Transition" +msgstr "" + +msgid "802.11w Association SA Query maximum timeout" +msgstr "" + +msgid "802.11w Association SA Query retry timeout" +msgstr "" + +msgid "802.11w Management Frame Protection" +msgstr "" + +msgid "802.11w maximum timeout" +msgstr "" + +msgid "802.11w retry timeout" +msgstr "" + msgid "BSSID" msgstr "BSSID" @@ -844,6 +871,9 @@ msgstr "停用HW-Beacon计时器" msgid "Disabled" msgstr "禁用" +msgid "Disabled (default)" +msgstr "" + msgid "Discard upstream RFC1918 responses" msgstr "丢弃RFC1918上行响应数据" @@ -1005,6 +1035,11 @@ msgstr "启用/禁用" msgid "Enabled" msgstr "启用" +msgid "" +"Enables fast roaming among access points that belong to the same Mobility " +"Domain" +msgstr "" + msgid "Enables the Spanning Tree Protocol on this bridge" msgstr "在此桥接上启用生成协议树" @@ -1051,6 +1086,12 @@ msgstr "租用地址的到期时间,最短2分钟(2m)。" msgid "External" msgstr "远程" +msgid "External R0 Key Holder List" +msgstr "" + +msgid "External R1 Key Holder List" +msgstr "" + msgid "External system log server" msgstr "远程日志服务器" @@ -1300,6 +1341,9 @@ msgstr "混合" msgid "IKE DH Group" msgstr "IKE DH组" +msgid "IP Addresses" +msgstr "" + msgid "IP address" msgstr "IP地址" @@ -1393,6 +1437,9 @@ msgstr "IPv6路由前缀" msgid "IPv6-Address" msgstr "IPv6-地址" +msgid "IPv6-PD" +msgstr "" + msgid "IPv6-in-IPv4 (RFC4213)" msgstr "IPv6-in-IPv4 (RFC4213)" @@ -1652,6 +1699,22 @@ msgid "" "requests to" msgstr "将指定的域名DNS解析转发到指定的DNS服务器(按照示例填写)" +msgid "" +"List of R0KHs in the same Mobility Domain.
Format: MAC-address,NAS-" +"Identifier,128-bit key as hex string.
This list is used to map R0KH-ID " +"(NAS Identifier) to a destination MAC address when requesting PMK-R1 key " +"from the R0KH that the STA used during the Initial Mobility Domain " +"Association." +msgstr "" + +msgid "" +"List of R1KHs in the same Mobility Domain.
Format: MAC-address,R1KH-ID " +"as 6 octets with colons,128-bit key as hex string.
This list is used " +"to map R1KH-ID to a destination MAC address when sending PMK-R1 key from the " +"R0KH. This is also the list of authorized R1KHs in the MD that can request " +"PMK-R1 keys." +msgstr "" + msgid "List of SSH key files for auth" msgstr "用于认证的SSH密钥文件列表" @@ -1838,6 +1901,9 @@ msgstr "数据包镜像源端口" msgid "Missing protocol extension for proto %q" msgstr "缺少协议 %q 的协议扩展" +msgid "Mobility Domain" +msgstr "" + msgid "Mode" msgstr "模式" @@ -2083,6 +2149,9 @@ msgstr "修改的选项" msgid "Option removed" msgstr "移除的选项" +msgid "Optional" +msgstr "" + msgid "Optional, specify to override default server (tic.sixxs.net)" msgstr "可选,设置这个选项会覆盖默认设定的服务器(tic.sixxs.net)" @@ -2183,6 +2252,9 @@ msgstr "PID" msgid "PIN" msgstr "PIN" +msgid "PMK R1 Push" +msgstr "" + msgid "PPP" msgstr "PPP" @@ -2312,6 +2384,9 @@ msgstr "电源管理模式" msgid "Pre-emtive CRC errors (CRCP_P)" msgstr "抢占式CRC错误(CRCP_P)" +msgid "Prefix Delegated" +msgstr "" + msgid "Preshared Key" msgstr "预共享密钥" @@ -2377,6 +2452,12 @@ msgstr "QMI蜂窝" msgid "Quality" msgstr "质量" +msgid "R0 Key Lifetime" +msgstr "" + +msgid "R1 Key Holder" +msgstr "" + msgid "RFC3947 NAT-T mode" msgstr "RFC3947 NAT-T模式" @@ -2465,6 +2546,9 @@ msgstr "实时流量" msgid "Realtime Wireless" msgstr "实时无线" +msgid "Reassociation Deadline" +msgstr "" + msgid "Rebind protection" msgstr "重绑定保护" @@ -2483,6 +2567,9 @@ msgstr "接收" msgid "Receiver Antenna" msgstr "接收天线" +msgid "Recommended. IP addresses of the WireGuard interface." +msgstr "" + msgid "Reconnect this interface" msgstr "重连此接口" @@ -2534,6 +2621,9 @@ msgstr "请求指定长度的IPv6前缀" msgid "Require TLS" msgstr "必须使用TLS" +msgid "Required" +msgstr "" + msgid "Required for certain ISPs, e.g. Charter with DOCSIS 3" msgstr "某些ISP需要,例如:同轴线网络DOCSIS 3" @@ -2551,6 +2641,11 @@ msgstr "" msgid "Required. Public key of peer." msgstr "必须,Peer的公钥。" +msgid "" +"Requires the 'full' version of wpad/hostapd and support from the wifi driver " +"
(as of Feb 2017: ath9k and ath10k, in LEDE also mwlwifi and mt76)" +msgstr "" + msgid "" "Requires upstream supports DNSSEC; verify unsigned domain responses really " "come from unsigned domains" @@ -3257,6 +3352,9 @@ msgstr "UMTS/GPRS/EV-DO" msgid "USB Device" msgstr "USB设备" +msgid "USB Ports" +msgstr "" + msgid "UUID" msgstr "UUID" @@ -3360,6 +3458,11 @@ msgstr "已用" msgid "Used Key Slot" msgstr "启用密码组" +msgid "" +"Used for two different purposes: RADIUS NAS ID and 802.11r R0KH-ID. Not " +"needed with normal WPA(2)-PSK." +msgstr "" + msgid "User certificate (PEM encoded)" msgstr "客户证书(PEM加密的)" @@ -3615,6 +3718,9 @@ msgstr "本地DNS解析文件" msgid "minimum 1280, maximum 1480" msgstr "最小值1280,最大值1480" +msgid "minutes" +msgstr "" + msgid "navigation Navigation" msgstr "导航" @@ -3669,6 +3775,9 @@ msgstr "有状态和无状态的" msgid "tagged" msgstr "关联" +msgid "time units (TUs / 1.024 ms) [1000-65535]" +msgstr "" + msgid "unknown" msgstr "未知" diff --git a/package/luci/modules/luci-base/po/zh-tw/base.po b/package/luci/modules/luci-base/po/zh-tw/base.po index 15ffafc2b4..8f759b8d5f 100644 --- a/package/luci/modules/luci-base/po/zh-tw/base.po +++ b/package/luci/modules/luci-base/po/zh-tw/base.po @@ -41,18 +41,45 @@ msgstr "" msgid "-- match by label --" msgstr "" +msgid "-- match by uuid --" +msgstr "" + msgid "1 Minute Load:" msgstr "1分鐘負載" msgid "15 Minute Load:" msgstr "15分鐘負載" +msgid "4-character hexadecimal ID" +msgstr "" + msgid "464XLAT (CLAT)" msgstr "" msgid "5 Minute Load:" msgstr "5分鐘負載" +msgid "6-octet identifier as a hex string - no colons" +msgstr "" + +msgid "802.11r Fast Transition" +msgstr "" + +msgid "802.11w Association SA Query maximum timeout" +msgstr "" + +msgid "802.11w Association SA Query retry timeout" +msgstr "" + +msgid "802.11w Management Frame Protection" +msgstr "" + +msgid "802.11w maximum timeout" +msgstr "" + +msgid "802.11w retry timeout" +msgstr "" + msgid "BSSID" msgstr "BSSID" @@ -851,6 +878,9 @@ msgstr "關閉硬體燈號計時器" msgid "Disabled" msgstr "關閉" +msgid "Disabled (default)" +msgstr "" + msgid "Discard upstream RFC1918 responses" msgstr "丟棄上游RFC1918 虛擬IP網路的回應" @@ -1017,6 +1047,11 @@ msgstr "啟用/關閉" msgid "Enabled" msgstr "啟用" +msgid "" +"Enables fast roaming among access points that belong to the same Mobility " +"Domain" +msgstr "" + msgid "Enables the Spanning Tree Protocol on this bridge" msgstr "在橋接器上啟用802.1d Spanning Tree協定" @@ -1064,6 +1099,12 @@ msgstr "釋放位址的過期週期,最少兩分鐘 (2m)." msgid "External" msgstr "" +msgid "External R0 Key Holder List" +msgstr "" + +msgid "External R1 Key Holder List" +msgstr "" + msgid "External system log server" msgstr "外部系統日誌伺服器" @@ -1309,6 +1350,9 @@ msgstr "" msgid "IKE DH Group" msgstr "" +msgid "IP Addresses" +msgstr "" + msgid "IP address" msgstr "IP位址" @@ -1402,6 +1446,9 @@ msgstr "" msgid "IPv6-Address" msgstr "IPv6-位址" +msgid "IPv6-PD" +msgstr "" + msgid "IPv6-in-IPv4 (RFC4213)" msgstr "IPv6包覆在IPv4內(RFC4213)" @@ -1664,6 +1711,22 @@ msgid "" "requests to" msgstr "列出 DNS 伺服器以便轉發請求" +msgid "" +"List of R0KHs in the same Mobility Domain.
Format: MAC-address,NAS-" +"Identifier,128-bit key as hex string.
This list is used to map R0KH-ID " +"(NAS Identifier) to a destination MAC address when requesting PMK-R1 key " +"from the R0KH that the STA used during the Initial Mobility Domain " +"Association." +msgstr "" + +msgid "" +"List of R1KHs in the same Mobility Domain.
Format: MAC-address,R1KH-ID " +"as 6 octets with colons,128-bit key as hex string.
This list is used " +"to map R1KH-ID to a destination MAC address when sending PMK-R1 key from the " +"R0KH. This is also the list of authorized R1KHs in the MD that can request " +"PMK-R1 keys." +msgstr "" + msgid "List of SSH key files for auth" msgstr "" @@ -1850,6 +1913,9 @@ msgstr "" msgid "Missing protocol extension for proto %q" msgstr "協定 %q 漏失的延伸協定" +msgid "Mobility Domain" +msgstr "" + msgid "Mode" msgstr "模式" @@ -2099,6 +2165,9 @@ msgstr "選項已變更" msgid "Option removed" msgstr "選項已移除" +msgid "Optional" +msgstr "" + msgid "Optional, specify to override default server (tic.sixxs.net)" msgstr "" @@ -2197,6 +2266,9 @@ msgstr "PID碼" msgid "PIN" msgstr "PIN碼" +msgid "PMK R1 Push" +msgstr "" + msgid "PPP" msgstr "PPP協定" @@ -2326,6 +2398,9 @@ msgstr "" msgid "Pre-emtive CRC errors (CRCP_P)" msgstr "" +msgid "Prefix Delegated" +msgstr "" + msgid "Preshared Key" msgstr "" @@ -2391,6 +2466,12 @@ msgstr "" msgid "Quality" msgstr "品質" +msgid "R0 Key Lifetime" +msgstr "" + +msgid "R1 Key Holder" +msgstr "" + msgid "RFC3947 NAT-T mode" msgstr "" @@ -2481,6 +2562,9 @@ msgstr "即時流量" msgid "Realtime Wireless" msgstr "即時無線網路" +msgid "Reassociation Deadline" +msgstr "" + msgid "Rebind protection" msgstr "重新綁護" @@ -2499,6 +2583,9 @@ msgstr "接收" msgid "Receiver Antenna" msgstr "接收天線" +msgid "Recommended. IP addresses of the WireGuard interface." +msgstr "" + msgid "Reconnect this interface" msgstr "重新連接這個介面" @@ -2550,6 +2637,9 @@ msgstr "" msgid "Require TLS" msgstr "" +msgid "Required" +msgstr "" + msgid "Required for certain ISPs, e.g. Charter with DOCSIS 3" msgstr "對特定的ISP需要,例如.DOCSIS 3 加速有線電視寬頻網路" @@ -2565,6 +2655,11 @@ msgstr "" msgid "Required. Public key of peer." msgstr "" +msgid "" +"Requires the 'full' version of wpad/hostapd and support from the wifi driver " +"
(as of Feb 2017: ath9k and ath10k, in LEDE also mwlwifi and mt76)" +msgstr "" + msgid "" "Requires upstream supports DNSSEC; verify unsigned domain responses really " "come from unsigned domains" @@ -3284,6 +3379,9 @@ msgstr "UMTS/GPRS/EV-DO" msgid "USB Device" msgstr "USB設備" +msgid "USB Ports" +msgstr "" + msgid "UUID" msgstr "設備通用唯一識別碼UUID" @@ -3390,6 +3488,11 @@ msgstr "已使用" msgid "Used Key Slot" msgstr "已使用的關鍵插槽" +msgid "" +"Used for two different purposes: RADIUS NAS ID and 802.11r R0KH-ID. Not " +"needed with normal WPA(2)-PSK." +msgstr "" + msgid "User certificate (PEM encoded)" msgstr "" @@ -3645,6 +3748,9 @@ msgstr "本地DNS 檔案" msgid "minimum 1280, maximum 1480" msgstr "" +msgid "minutes" +msgstr "" + msgid "navigation Navigation" msgstr "" @@ -3699,6 +3805,9 @@ msgstr "" msgid "tagged" msgstr "標籤" +msgid "time units (TUs / 1.024 ms) [1000-65535]" +msgstr "" + msgid "unknown" msgstr "未知" diff --git a/package/luci/modules/luci-base/src/mkversion.sh b/package/luci/modules/luci-base/src/mkversion.sh index 229bee4952..e2d02c1c74 100755 --- a/package/luci/modules/luci-base/src/mkversion.sh +++ b/package/luci/modules/luci-base/src/mkversion.sh @@ -15,7 +15,7 @@ if pcall(dofile, "/etc/openwrt_release") and _G.DISTRIB_DESCRIPTION then end end else - distname = "libreCMC" + distname = "OpenWrt" distversion = "Development Snapshot" end diff --git a/package/luci/modules/luci-mod-admin-full/luasrc/controller/admin/network.lua b/package/luci/modules/luci-mod-admin-full/luasrc/controller/admin/network.lua index 3b5f3eb8de..2cb2108b9f 100644 --- a/package/luci/modules/luci-mod-admin-full/luasrc/controller/admin/network.lua +++ b/package/luci/modules/luci-mod-admin-full/luasrc/controller/admin/network.lua @@ -238,6 +238,7 @@ function iface_status(ifaces) ipaddrs = net:ipaddrs(), ip6addrs = net:ip6addrs(), dnsaddrs = net:dnsaddrs(), + ip6prefix = net:ip6prefix(), name = device:shortname(), type = device:type(), ifname = device:name(), diff --git a/package/luci/modules/luci-mod-admin-full/luasrc/controller/admin/status.lua b/package/luci/modules/luci-mod-admin-full/luasrc/controller/admin/status.lua index 24db1e4ff5..ad575e0d26 100644 --- a/package/luci/modules/luci-mod-admin-full/luasrc/controller/admin/status.lua +++ b/package/luci/modules/luci-mod-admin-full/luasrc/controller/admin/status.lua @@ -24,8 +24,10 @@ function index() entry({"admin", "status", "realtime", "bandwidth"}, template("admin_status/bandwidth"), _("Traffic"), 2).leaf = true entry({"admin", "status", "realtime", "bandwidth_status"}, call("action_bandwidth")).leaf = true - entry({"admin", "status", "realtime", "wireless"}, template("admin_status/wireless"), _("Wireless"), 3).leaf = true - entry({"admin", "status", "realtime", "wireless_status"}, call("action_wireless")).leaf = true + if nixio.fs.access("/etc/config/wireless") then + entry({"admin", "status", "realtime", "wireless"}, template("admin_status/wireless"), _("Wireless"), 3).leaf = true + entry({"admin", "status", "realtime", "wireless_status"}, call("action_wireless")).leaf = true + end entry({"admin", "status", "realtime", "connections"}, template("admin_status/connections"), _("Connections"), 4).leaf = true entry({"admin", "status", "realtime", "connections_status"}, call("action_connections")).leaf = true diff --git a/package/luci/modules/luci-mod-admin-full/luasrc/controller/admin/system.lua b/package/luci/modules/luci-mod-admin-full/luasrc/controller/admin/system.lua index cf8cfb5d2d..5478afa3e6 100644 --- a/package/luci/modules/luci-mod-admin-full/luasrc/controller/admin/system.lua +++ b/package/luci/modules/luci-mod-admin-full/luasrc/controller/admin/system.lua @@ -52,6 +52,7 @@ function action_clock_status() luci.sys.call("date -s '%04d-%02d-%02d %02d:%02d:%02d'" %{ date.year, date.month, date.day, date.hour, date.min, date.sec }) + luci.sys.call("/etc/init.d/sysfixtime restart") end end diff --git a/package/luci/modules/luci-mod-admin-full/luasrc/model/cbi/admin_network/wifi.lua b/package/luci/modules/luci-mod-admin-full/luasrc/model/cbi/admin_network/wifi.lua index 2dff4ddc81..222b362731 100644 --- a/package/luci/modules/luci-mod-admin-full/luasrc/model/cbi/admin_network/wifi.lua +++ b/package/luci/modules/luci-mod-admin-full/luasrc/model/cbi/admin_network/wifi.lua @@ -42,6 +42,9 @@ end -- wireless toggle was requested, commit and reload page function m.parse(map) + local new_cc = m:formvalue("cbid.wireless.%s.country" % wdev:name()) + local old_cc = m:get(wdev:name(), "country") + if m:formvalue("cbid.wireless.%s.__toggle" % wdev:name()) then if wdev:get("disabled") == "1" or wnet:get("disabled") == "1" then wnet:set("disabled", nil) @@ -56,7 +59,14 @@ function m.parse(map) luci.http.redirect(luci.dispatcher.build_url("admin/network/wireless", arg[1])) return end + Map.parse(map) + + if m:get(wdev:name(), "type") == "mac80211" and new_cc and new_cc ~= old_cc then + luci.sys.call("iw reg set %q" % new_cc) + luci.http.redirect(luci.dispatcher.build_url("admin/network/wireless", arg[1])) + return + end end m.title = luci.util.pcdata(wnet:get_i18n()) @@ -94,7 +104,7 @@ local function txpower_current(pwr, list) end end end - return (list[#list] and list[#list].driver_dbm) or pwr or 0 + return pwr or "" end local iw = luci.sys.wifi.getiwinfo(arg[1]) @@ -191,7 +201,7 @@ end ------------------- MAC80211 Device ------------------ if hwtype == "mac80211" then - if #tx_power_list > 1 then + if #tx_power_list > 0 then tp = s:taboption("general", ListValue, "txpower", translate("Transmit Power"), "dBm") tp.rmempty = true @@ -200,6 +210,7 @@ if hwtype == "mac80211" then return txpower_current(Value.cfgvalue(...), tx_power_list) end + tp:value("", translate("auto")) for _, p in ipairs(tx_power_list) do tp:value(p.driver_dbm, "%i dBm (%i mW)" %{ p.display_dbm, p.display_mw }) @@ -251,6 +262,7 @@ if hwtype == "atheros" then return txpower_current(Value.cfgvalue(...), tx_power_list) end + tp:value("", translate("auto")) for _, p in ipairs(tx_power_list) do tp:value(p.driver_dbm, "%i dBm (%i mW)" %{ p.display_dbm, p.display_mw }) @@ -308,6 +320,7 @@ if hwtype == "broadcom" then return txpower_current(Value.cfgvalue(...), tx_power_list) end + tp:value("", translate("auto")) for _, p in ipairs(tx_power_list) do tp:value(p.driver_dbm, "%i dBm (%i mW)" %{ p.display_dbm, p.display_mw }) @@ -887,13 +900,91 @@ end if hwtype == "atheros" or hwtype == "mac80211" or hwtype == "prism2" then - nasid = s:taboption("encryption", Value, "nasid", translate("NAS ID")) + + -- Probe 802.11r support (and EAP support as a proxy for Openwrt) + local has_80211r = (os.execute("hostapd -v11r 2>/dev/null || hostapd -veap 2>/dev/null") == 0) + + ieee80211r = s:taboption("encryption", Flag, "ieee80211r", + translate("802.11r Fast Transition"), + translate("Enables fast roaming among access points that belong " .. + "to the same Mobility Domain")) + ieee80211r:depends({mode="ap", encryption="wpa"}) + ieee80211r:depends({mode="ap", encryption="wpa2"}) + ieee80211r:depends({mode="ap-wds", encryption="wpa"}) + ieee80211r:depends({mode="ap-wds", encryption="wpa2"}) + if has_80211r then + ieee80211r:depends({mode="ap", encryption="psk"}) + ieee80211r:depends({mode="ap", encryption="psk2"}) + ieee80211r:depends({mode="ap", encryption="psk-mixed"}) + end + ieee80211r.rmempty = true + + nasid = s:taboption("encryption", Value, "nasid", translate("NAS ID"), + translate("Used for two different purposes: RADIUS NAS ID and " .. + "802.11r R0KH-ID. Not needed with normal WPA(2)-PSK.")) nasid:depends({mode="ap", encryption="wpa"}) nasid:depends({mode="ap", encryption="wpa2"}) nasid:depends({mode="ap-wds", encryption="wpa"}) nasid:depends({mode="ap-wds", encryption="wpa2"}) + nasid:depends({ieee80211r="1"}) nasid.rmempty = true + mobility_domain = s:taboption("encryption", Value, "mobility_domain", + translate("Mobility Domain"), + translate("4-character hexadecimal ID")) + mobility_domain:depends({ieee80211r="1"}) + mobility_domain.placeholder = "4f57" + mobility_domain.datatype = "and(hexstring,rangelength(4,4))" + mobility_domain.rmempty = true + + r0_key_lifetime = s:taboption("encryption", Value, "r0_key_lifetime", + translate("R0 Key Lifetime"), translate("minutes")) + r0_key_lifetime:depends({ieee80211r="1"}) + r0_key_lifetime.placeholder = "10000" + r0_key_lifetime.datatype = "uinteger" + r0_key_lifetime.rmempty = true + + r1_key_holder = s:taboption("encryption", Value, "r1_key_holder", + translate("R1 Key Holder"), + translate("6-octet identifier as a hex string - no colons")) + r1_key_holder:depends({ieee80211r="1"}) + r1_key_holder.placeholder = "00004f577274" + r1_key_holder.datatype = "and(hexstring,rangelength(12,12))" + r1_key_holder.rmempty = true + + reassociation_deadline = s:taboption("encryption", Value, "reassociation_deadline", + translate("Reassociation Deadline"), + translate("time units (TUs / 1.024 ms) [1000-65535]")) + reassociation_deadline:depends({ieee80211r="1"}) + reassociation_deadline.placeholder = "1000" + reassociation_deadline.datatype = "range(1000,65535)" + reassociation_deadline.rmempty = true + + pmk_r1_push = s:taboption("encryption", Flag, "pmk_r1_push", translate("PMK R1 Push")) + pmk_r1_push:depends({ieee80211r="1"}) + pmk_r1_push.placeholder = "0" + pmk_r1_push.rmempty = true + + r0kh = s:taboption("encryption", DynamicList, "r0kh", translate("External R0 Key Holder List"), + translate("List of R0KHs in the same Mobility Domain. " .. + "
Format: MAC-address,NAS-Identifier,128-bit key as hex string. " .. + "
This list is used to map R0KH-ID (NAS Identifier) to a destination " .. + "MAC address when requesting PMK-R1 key from the R0KH that the STA " .. + "used during the Initial Mobility Domain Association.")) + + r0kh:depends({ieee80211r="1"}) + r0kh.rmempty = true + + r1kh = s:taboption("encryption", DynamicList, "r1kh", translate("External R1 Key Holder List"), + translate ("List of R1KHs in the same Mobility Domain. ".. + "
Format: MAC-address,R1KH-ID as 6 octets with colons,128-bit key as hex string. ".. + "
This list is used to map R1KH-ID to a destination MAC address " .. + "when sending PMK-R1 key from the R0KH. This is also the " .. + "list of authorized R1KHs in the MD that can request PMK-R1 keys.")) + r1kh:depends({ieee80211r="1"}) + r1kh.rmempty = true + -- End of 802.11r options + eaptype = s:taboption("encryption", ListValue, "eap_type", translate("EAP-Method")) eaptype:value("tls", "TLS") eaptype:value("ttls", "TTLS") @@ -1032,6 +1123,47 @@ if hwtype == "atheros" or hwtype == "mac80211" or hwtype == "prism2" then password.password = true end +-- ieee802.11w options +if hwtype == "mac80211" then + local has_80211w = (os.execute("hostapd -v11w 2>/dev/null || hostapd -veap 2>/dev/null") == 0) + if has_80211w then + ieee80211w = s:taboption("encryption", ListValue, "ieee80211w", + translate("802.11w Management Frame Protection"), + translate("Requires the 'full' version of wpad/hostapd " .. + "and support from the wifi driver
(as of Feb 2017: " .. + "ath9k and ath10k, in LEDE also mwlwifi and mt76)")) + ieee80211w.default = "" + ieee80211w.rmempty = true + ieee80211w:value("", translate("Disabled (default)")) + ieee80211w:value("1", translate("Optional")) + ieee80211w:value("2", translate("Required")) + ieee80211w:depends({mode="ap", encryption="wpa2"}) + ieee80211w:depends({mode="ap-wds", encryption="wpa2"}) + ieee80211w:depends({mode="ap", encryption="psk2"}) + ieee80211w:depends({mode="ap", encryption="psk-mixed"}) + ieee80211w:depends({mode="ap-wds", encryption="psk2"}) + ieee80211w:depends({mode="ap-wds", encryption="psk-mixed"}) + + max_timeout = s:taboption("encryption", Value, "ieee80211w_max_timeout", + translate("802.11w maximum timeout"), + translate("802.11w Association SA Query maximum timeout")) + max_timeout:depends({ieee80211w="1"}) + max_timeout:depends({ieee80211w="2"}) + max_timeout.datatype = "uinteger" + max_timeout.placeholder = "1000" + max_timeout.rmempty = true + + retry_timeout = s:taboption("encryption", Value, "ieee80211w_retry_timeout", + translate("802.11w retry timeout"), + translate("802.11w Association SA Query retry timeout")) + retry_timeout:depends({ieee80211w="1"}) + retry_timeout:depends({ieee80211w="2"}) + retry_timeout.datatype = "uinteger" + retry_timeout.placeholder = "201" + retry_timeout.rmempty = true + end +end + if hwtype == "atheros" or hwtype == "mac80211" or hwtype == "prism2" then local wpasupplicant = fs.access("/usr/sbin/wpa_supplicant") local hostcli = fs.access("/usr/sbin/hostapd_cli") diff --git a/package/luci/modules/luci-mod-admin-full/luasrc/model/cbi/admin_network/wifi_add.lua b/package/luci/modules/luci-mod-admin-full/luasrc/model/cbi/admin_network/wifi_add.lua index 7dd094d7ec..8277deb2f6 100644 --- a/package/luci/modules/luci-mod-admin-full/luasrc/model/cbi/admin_network/wifi_add.lua +++ b/package/luci/modules/luci-mod-admin-full/luasrc/model/cbi/admin_network/wifi_add.lua @@ -16,7 +16,7 @@ if not iw then return end -m = SimpleForm("network", translate("Joining Network: %q", http.formvalue("join"))) +m = SimpleForm("network", translatef("Joining Network: %q", http.formvalue("join"))) m.cancel = translate("Back to scan results") m.reset = false diff --git a/package/luci/modules/luci-mod-admin-full/luasrc/model/cbi/admin_system/admin.lua b/package/luci/modules/luci-mod-admin-full/luasrc/model/cbi/admin_system/admin.lua index 1e475640be..493a735bde 100644 --- a/package/luci/modules/luci-mod-admin-full/luasrc/model/cbi/admin_system/admin.lua +++ b/package/luci/modules/luci-mod-admin-full/luasrc/model/cbi/admin_system/admin.lua @@ -21,7 +21,7 @@ function s.cfgsections() return { "_pass" } end -function m.on_commit(map) +function m.parse(map) local v1 = pw1:formvalue("_pass") local v2 = pw2:formvalue("_pass") @@ -36,6 +36,8 @@ function m.on_commit(map) m.message = translate("Given password confirmation did not match, password not changed!") end end + + Map.parse(map) end diff --git a/package/luci/modules/luci-mod-admin-full/luasrc/model/cbi/admin_system/fstab/mount.lua b/package/luci/modules/luci-mod-admin-full/luasrc/model/cbi/admin_system/fstab/mount.lua index f5751673fd..a85872afad 100644 --- a/package/luci/modules/luci-mod-admin-full/luasrc/model/cbi/admin_system/fstab/mount.lua +++ b/package/luci/modules/luci-mod-admin-full/luasrc/model/cbi/admin_system/fstab/mount.lua @@ -56,6 +56,8 @@ mount:taboption("general", Flag, "enabled", translate("Enable this mount")).rmem o = mount:taboption("general", Value, "uuid", translate("UUID"), translate("If specified, mount the device by its UUID instead of a fixed device node")) +o:value("", translate("-- match by uuid --")) + for i, d in ipairs(devices) do if d.uuid and d.size then o:value(d.uuid, "%s (%s, %d MB)" %{ d.uuid, d.dev, d.size }) @@ -64,12 +66,12 @@ for i, d in ipairs(devices) do end end -o:value("", translate("-- match by label --")) - o = mount:taboption("general", Value, "label", translate("Label"), translate("If specified, mount the device by the partition label instead of a fixed device node")) +o:value("", translate("-- match by label --")) + o:depends("uuid", "") for i, d in ipairs(devices) do @@ -80,12 +82,12 @@ for i, d in ipairs(devices) do end end -o:value("", translate("-- match by device --")) - o = mount:taboption("general", Value, "device", translate("Device"), translate("The device file of the memory or partition (e.g. /dev/sda1)")) +o:value("", translate("-- match by device --")) + o:depends({ uuid = "", label = "" }) for i, d in ipairs(devices) do diff --git a/package/luci/modules/luci-mod-admin-full/luasrc/model/cbi/admin_system/leds.lua b/package/luci/modules/luci-mod-admin-full/luasrc/model/cbi/admin_system/leds.lua index 8d9bcb1371..74e2f1a19d 100644 --- a/package/luci/modules/luci-mod-admin-full/luasrc/model/cbi/admin_system/leds.lua +++ b/package/luci/modules/luci-mod-admin-full/luasrc/model/cbi/admin_system/leds.lua @@ -7,10 +7,11 @@ local sysfs_path = "/sys/class/leds/" local leds = {} local fs = require "nixio.fs" -local util = require "nixio.util" +local nu = require "nixio.util" +local util = require "luci.util" if fs.access(sysfs_path) then - leds = util.consume((fs.dir(sysfs_path))) + leds = nu.consume((fs.dir(sysfs_path))) end if #leds == 0 then @@ -109,6 +110,33 @@ function usbdev.remove(self, section) end end + +usbport = s:option(MultiValue, "port", translate("USB Ports")) +usbport:depends("trigger", "usbport") +usbport.rmempty = true +usbport.widget = "checkbox" +usbport.cast = "table" +usbport.size = 1 + +function usbport.valuelist(self, section) + local port, ports = nil, {} + for port in util.imatch(m.uci:get("system", section, "port")) do + local b, n = port:match("^usb(%d+)-port(%d+)$") + if not (b and n) then + b, n = port:match("^(%d+)-(%d+)$") + end + if b and n then + ports[#ports+1] = "usb%u-port%u" %{ tonumber(b), tonumber(n) } + end + end + return ports +end + +function usbport.validate(self, value) + return type(value) == "string" and { value } or value +end + + for p in nixio.fs.glob("/sys/bus/usb/devices/[0-9]*/manufacturer") do local id = p:match("%d+-%d+") local mf = nixio.fs.readfile("/sys/bus/usb/devices/" .. id .. "/manufacturer") or "?" @@ -116,4 +144,12 @@ for p in nixio.fs.glob("/sys/bus/usb/devices/[0-9]*/manufacturer") do usbdev:value(id, "%s (%s - %s)" %{ id, mf, pr }) end +for p in nixio.fs.glob("/sys/bus/usb/devices/*/usb[0-9]*-port[0-9]*") do + local bus, port = p:match("usb(%d+)-port(%d+)") + if bus and port then + usbport:value("usb%u-port%u" %{ tonumber(bus), tonumber(port) }, + "Hub %u, Port %u" %{ tonumber(bus), tonumber(port) }) + end +end + return m diff --git a/package/luci/modules/luci-mod-admin-full/luasrc/view/admin_network/iface_overview.htm b/package/luci/modules/luci-mod-admin-full/luasrc/view/admin_network/iface_overview.htm index 646d931f37..2512a35b3c 100644 --- a/package/luci/modules/luci-mod-admin-full/luasrc/view/admin_network/iface_overview.htm +++ b/package/luci/modules/luci-mod-admin-full/luasrc/view/admin_network/iface_overview.htm @@ -164,6 +164,11 @@ ifc.ip6addrs[i] ); } + + if (ifc.ip6prefix) + { + html += String.format('<%:IPv6-PD%>: %s
', ifc.ip6prefix); + } d.innerHTML = html; } diff --git a/package/luci/modules/luci-mod-admin-full/luasrc/view/admin_network/iface_status.htm b/package/luci/modules/luci-mod-admin-full/luasrc/view/admin_network/iface_status.htm index 8c3b1abcc7..b15dd13f39 100644 --- a/package/luci/modules/luci-mod-admin-full/luasrc/view/admin_network/iface_status.htm +++ b/package/luci/modules/luci-mod-admin-full/luasrc/view/admin_network/iface_status.htm @@ -54,6 +54,11 @@ ifc.ip6addrs[i] ); } + + if (ifc.ip6prefix) + { + html += String.format('<%:IPv6-PD%>: %s
', ifc.ip6prefix); + } d.innerHTML = html; } diff --git a/package/luci/modules/luci-mod-admin-full/luasrc/view/admin_status/connections.htm b/package/luci/modules/luci-mod-admin-full/luasrc/view/admin_status/connections.htm index 0b2e52e059..b7ebc41451 100644 --- a/package/luci/modules/luci-mod-admin-full/luasrc/view/admin_status/connections.htm +++ b/package/luci/modules/luci-mod-admin-full/luasrc/view/admin_status/connections.htm @@ -153,7 +153,8 @@ { var c = conn[i]; - if (c.src == '127.0.0.1' && c.dst == '127.0.0.1') + if ((c.src == '127.0.0.1' && c.dst == '127.0.0.1') + || (c.src == '::1' && c.dst == '::1')) continue; var tr = conn_table.rows[0].parentNode.insertRow(-1); diff --git a/package/luci/modules/luci-mod-admin-full/luasrc/view/admin_status/index.htm b/package/luci/modules/luci-mod-admin-full/luasrc/view/admin_status/index.htm index 8976e30cba..206f9ef82a 100644 --- a/package/luci/modules/luci-mod-admin-full/luasrc/view/admin_status/index.htm +++ b/package/luci/modules/luci-mod-admin-full/luasrc/view/admin_status/index.htm @@ -76,12 +76,14 @@ if wan6 then rv.wan6 = { - ip6addr = wan6:ip6addr(), - gw6addr = wan6:gw6addr(), - dns = wan6:dns6addrs(), - uptime = wan6:uptime(), - ifname = wan6:ifname(), - link = wan6:adminlink() + ip6addr = wan6:ip6addr(), + gw6addr = wan6:gw6addr(), + dns = wan6:dns6addrs(), + ip6prefix = wan6:ip6prefix(), + uptime = wan6:uptime(), + proto = wan6:proto(), + ifname = wan6:ifname(), + link = wan6:adminlink() } end @@ -233,9 +235,34 @@ if (ifc6 && ifc6.ifname && ifc6.proto != 'none') { var s = String.format( - '<%:Address%>: %s
' + + '<%:Type%>: %s%s
', + ifc6.proto, (ifc6.ip6prefix) ? '-pd' : '' + ); + + if (!ifc6.ip6prefix) + { + s += String.format( + '<%:Address%>: %s
', + (ifc6.ip6addr) ? ifc6.ip6addr : '::' + ); + } + else + { + s += String.format( + '<%:Prefix Delegated%>: %s
', + ifc6.ip6prefix + ); + if (ifc6.ip6addr) + { + s += String.format( + '<%:Address%>: %s
', + ifc6.ip6addr + ); + } + } + + s += String.format( '<%:Gateway%>: %s
', - (ifc6.ip6addr) ? ifc6.ip6addr : '::', (ifc6.gw6addr) ? ifc6.gw6addr : '::' ); diff --git a/package/luci/modules/luci-mod-admin-full/src/luci-bwc.c b/package/luci/modules/luci-mod-admin-full/src/luci-bwc.c index 63668d42b3..8ddd91727a 100644 --- a/package/luci/modules/luci-mod-admin-full/src/luci-bwc.c +++ b/package/luci/modules/luci-mod-admin-full/src/luci-bwc.c @@ -521,8 +521,8 @@ static int run_daemon(void) if (strstr(line, "TIME_WAIT")) continue; - if (strstr(line, "src=127.0.0.1 ") && - strstr(line, "dst=127.0.0.1 ")) + if ((strstr(line, "src=127.0.0.1 ") && strstr(line, "dst=127.0.0.1 ")) + || (strstr(line, "src=::1 ") && strstr(line, "dst=::1 "))) continue; if (sscanf(line, "%*s %*d %s", ifname) || sscanf(line, "%s %*d", ifname)) diff --git a/package/luci/protocols/luci-proto-wireguard/luasrc/model/cbi/admin_network/proto_wireguard.lua b/package/luci/protocols/luci-proto-wireguard/luasrc/model/cbi/admin_network/proto_wireguard.lua index 774c6db22b..e585324106 100644 --- a/package/luci/protocols/luci-proto-wireguard/luasrc/model/cbi/admin_network/proto_wireguard.lua +++ b/package/luci/protocols/luci-proto-wireguard/luasrc/model/cbi/admin_network/proto_wireguard.lua @@ -1,4 +1,4 @@ --- Copyright 2016 Dan Luedtke +-- Copyright 2016-2017 Dan Luedtke -- Licensed to the public under the Apache License 2.0. @@ -34,6 +34,16 @@ listen_port.datatype = "port" listen_port.placeholder = "51820" listen_port.optional = true +addresses = section:taboption( + "general", + DynamicList, + "addresses", + translate("IP Addresses"), + translate("Recommended. IP addresses of the WireGuard interface.") +) +addresses.datatype = "ipaddr" +addresses.optional = true + -- advanced -------------------------------------------------------------------- diff --git a/package/network/config/firewall/Makefile b/package/network/config/firewall/Makefile index ee31d17b25..0d57340ab9 100644 --- a/package/network/config/firewall/Makefile +++ b/package/network/config/firewall/Makefile @@ -13,9 +13,9 @@ PKG_RELEASE:=1 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL=$(LEDE_GIT)/project/firewall3.git -PKG_SOURCE_DATE:=2016-11-29 -PKG_SOURCE_VERSION:=13698aafb52c45817ee7815da3405e620657c8d0 -PKG_MIRROR_HASH:=6ba6e96a588dd3afd7e9db7e9246c5cc6c560aa95385592960c6b71b5a9c6395 +PKG_SOURCE_DATE:=2017-01-13 +PKG_SOURCE_VERSION:=37cb4cb437fd685f31926a4c326ba8afe329e4a6 +PKG_MIRROR_HASH:=7ee075f05977e5d9a78e661b537e6eb077c8f328ff2e71d1e2fbef44cca97355 PKG_MAINTAINER:=Jo-Philipp Wich PKG_LICENSE:=ISC diff --git a/package/network/config/netifd/Makefile b/package/network/config/netifd/Makefile index c0a354b881..fb03586401 100644 --- a/package/network/config/netifd/Makefile +++ b/package/network/config/netifd/Makefile @@ -5,9 +5,9 @@ PKG_RELEASE:=1 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL=$(LEDE_GIT)/project/netifd.git -PKG_SOURCE_DATE:=2016-12-23 -PKG_SOURCE_VERSION:=64a655d8ffa9f0cea1bbdd35cac6b3b99b865270 -PKG_MIRROR_HASH:=1fa244a10f6d12d8bad2e60c054c0542d6f9ebe1cde319085f02289e8676612a +PKG_SOURCE_DATE:=2017-01-25 +PKG_SOURCE_VERSION:=650758b16e5185505a3fbc1307949340af70b611 +PKG_MIRROR_HASH:=d09c740bc1bf6269678bd75c9af52ecd4be3d1d59402a543ceb9d4459cecfa2b PKG_MAINTAINER:=Felix Fietkau PKG_LICENSE:=GPL-2.0 diff --git a/package/network/config/netifd/files/etc/init.d/network b/package/network/config/netifd/files/etc/init.d/network index bdadbbce6d..a825dfd31f 100755 --- a/package/network/config/netifd/files/etc/init.d/network +++ b/package/network/config/netifd/files/etc/init.d/network @@ -31,9 +31,10 @@ reload_service() { /sbin/wifi reload_legacy } -stop() { +stop_service() { /sbin/wifi down - procd_kill network '' + ifdown -a + sleep 1 } service_running() { @@ -137,14 +138,6 @@ service_triggers() procd_close_validate } -restart() { - ifdown -a - sleep 1 - trap '' TERM - stop "$@" - start "$@" -} - shutdown() { ifdown -a sleep 1 diff --git a/package/network/config/qos-scripts/files/usr/lib/qos/generate.sh b/package/network/config/qos-scripts/files/usr/lib/qos/generate.sh index 285617c0d7..9ce4eb41ef 100755 --- a/package/network/config/qos-scripts/files/usr/lib/qos/generate.sh +++ b/package/network/config/qos-scripts/files/usr/lib/qos/generate.sh @@ -347,7 +347,6 @@ tc filter add dev $device parent ffff: prio 1 u32 match u32 0 0 flowid 1:1 actio fi add_insmod cls_fw add_insmod sch_hfsc - add_insmod sch_fq_codel cat <type, "switch_port")) { - char *devn, *port, *port_err = NULL; + char *devn = NULL, *port = NULL, *port_err = NULL; int port_n; uci_foreach_element(&s->options, os) { @@ -190,7 +190,7 @@ found: swlib_map_settings(dev, SWLIB_ATTR_GROUP_PORT, port_n, s); } else if (!strcmp(s->type, "switch_vlan")) { - char *devn, *vlan, *vlan_err = NULL; + char *devn = NULL, *vlan = NULL, *vlan_err = NULL; int vlan_n; uci_foreach_element(&s->options, os) { diff --git a/package/network/ipv6/6in4/files/6in4.sh b/package/network/ipv6/6in4/files/6in4.sh index 45d8ab75ad..786f37fc14 100755 --- a/package/network/ipv6/6in4/files/6in4.sh +++ b/package/network/ipv6/6in4/files/6in4.sh @@ -84,7 +84,7 @@ proto_6in4_setup() { local http="http" local urlget="uclient-fetch" local urlget_opts="-qO-" - local ca_path="${SSL_CERT_DIR-/etc/ssl/certs}" + local ca_path="${SSL_CERT_DIR:-/etc/ssl/certs}" [ -f /lib/libustream-ssl.so ] && http=https [ "$http" = "https" -a -z "$(find $ca_path -name "*.0" 2>/dev/null)" ] && { diff --git a/package/network/ipv6/map/Makefile b/package/network/ipv6/map/Makefile index 8cc1afeda1..fd8291d683 100644 --- a/package/network/ipv6/map/Makefile +++ b/package/network/ipv6/map/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=map PKG_VERSION:=4 -PKG_RELEASE:=5 +PKG_RELEASE:=6 PKG_LICENSE:=GPL-2.0 include $(INCLUDE_DIR)/package.mk @@ -20,7 +20,7 @@ define Package/map CATEGORY:=Network DEPENDS:=@IPV6 +kmod-ip6-tunnel +libubox +libubus +iptables-mod-conntrack-extra TITLE:=MAP-E and Lightweight 4over6 configuration support - MAINTAINER:=Steven Barth + MAINTAINER:=Hans Dedecker endef define Package/map/description diff --git a/package/network/ipv6/map/files/map.sh b/package/network/ipv6/map/files/map.sh index 98a493dd57..fe872828c3 100755 --- a/package/network/ipv6/map/files/map.sh +++ b/package/network/ipv6/map/files/map.sh @@ -192,7 +192,17 @@ proto_map_setup() { proto_map_teardown() { local cfg="$1" - ifdown "${cfg}_" + local link="map-$cfg" + + json_get_var type type + + [ -z "$type" ] && type="map-e" + + case "$type" in + "map-e"|"lw4o6") ifdown "${cfg}_" ;; + "map-t") [ -f "/proc/net/nat46/control" ] && echo del $link > /proc/net/nat46/control ;; + esac + rm -f /tmp/map-$cfg.rules } diff --git a/package/network/ipv6/odhcp6c/Makefile b/package/network/ipv6/odhcp6c/Makefile index 60602f5554..0ed9b581f5 100644 --- a/package/network/ipv6/odhcp6c/Makefile +++ b/package/network/ipv6/odhcp6c/Makefile @@ -10,12 +10,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=odhcp6c PKG_RELEASE:=1 -PKG_SOURCE_URL:=git://git.lede-project.org/project/odhcp6c.git PKG_SOURCE_PROTO:=git -PKG_SOURCE_DATE:=2017-01-07 -PKG_SOURCE_VERSION:=d420f49396c627ce1072b83170889baf0720bc8b -PKG_MIRROR_HASH:=a7c599b5600b6cca9aec221dd32fc7754e0e942b0192bd902f1e789f53345127 -PKG_MAINTAINER:=Steven Barth +PKG_SOURCE_URL:=$(LEDE_GIT)/project/odhcp6c.git +PKG_SOURCE_DATE:=2017-01-30 +PKG_SOURCE_VERSION:=c13b6a05dbd9174356cc4b7fd1edf39445efd982 +PKG_MIRROR_HASH:=001e58f1ab6eb8903d9e47060ae037a2e4f021f1fef5032347b767f56f4664f6 +PKG_MAINTAINER:=Hans Dedecker PKG_LICENSE:=GPL-2.0 include $(INCLUDE_DIR)/package.mk diff --git a/package/network/services/dnsmasq/Makefile b/package/network/services/dnsmasq/Makefile index 98333850af..bbcda9afb7 100644 --- a/package/network/services/dnsmasq/Makefile +++ b/package/network/services/dnsmasq/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=dnsmasq PKG_VERSION:=2.76 -PKG_RELEASE:=7 +PKG_RELEASE:=6 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=http://thekelleys.org.uk/dnsmasq diff --git a/package/network/services/dnsmasq/files/dnsmasq.init b/package/network/services/dnsmasq/files/dnsmasq.init index 87332a9081..46607dfe25 100644 --- a/package/network/services/dnsmasq/files/dnsmasq.init +++ b/package/network/services/dnsmasq/files/dnsmasq.init @@ -8,7 +8,6 @@ PROG=/usr/sbin/dnsmasq ADD_LOCAL_DOMAIN=1 ADD_LOCAL_HOSTNAME=1 -ADD_WAN_HOSTNAME=0 BASECONFIGFILE="/var/etc/dnsmasq.conf" BASEHOSTFILE="/tmp/hosts/dhcp" @@ -294,26 +293,6 @@ dhcp_host_add() { xappend "--dhcp-host=$macs${duid:+,id:$duid}${networkid:+,net:$networkid}${broadcast:+,set:needs-broadcast}${tag:+,set:$tag}${ip:+,$ip${hostid:+,[::$hostid]}}${name:+,$name}${leasetime:+,$leasetime}" } -dhcp_this_host_add() { - # TODO: case-in do/not short-host or FQDN; UCI already intended ... - local ifname="$1" - local do_enable="$2" - local routerstub routername ifdashname - - - if [ "$do_enable" -gt 0 ] ; then - # All IP addresses discovered by dnsmasq will be labeled robustly (except fe80::) - ifdashname="${ifname//./-}" - routerstub="$( md5sum /etc/os-release )" - routerstub="router-${routerstub// */}" - routername="$( uci_get system @system[0] hostname $routerstub )" - - xappend "--interface-name=$ifdashname.$routername.$DOMAIN,$ifname" - xappend "--interface-name=$routername.$DOMAIN,$ifname" - xappend "--interface-name=$routername,$ifname" - fi -} - dhcp_tag_add() { local cfg="$1" @@ -384,11 +363,7 @@ dhcp_add() { DNS_SERVERS="$DNS_SERVERS $dnsserver" } - append_bool "$cfg" ignore "--no-dhcp-interface=$ifname" && { - # Many ISP do not have useful names for DHCP customers (your WAN). - dhcp_this_host_add $ifname $ADD_WAN_HOSTNAME - return 0 - } + append_bool "$cfg" ignore "--no-dhcp-interface=$ifname" && return 0 # Do not support non-static interfaces for now [ static = "$proto" ] || return 0 @@ -406,9 +381,6 @@ dhcp_add() { config_get options "$cfg" options config_get_bool dynamicdhcp "$cfg" dynamicdhcp 1 - # Put the router host name on this DHCP served interface address(es) - dhcp_this_host_add $ifname $ADD_LOCAL_HOSTNAME - leasetime="${leasetime:-12h}" start="$(dhcp_calc "${start:-100}")" limit="${limit:-150}" @@ -633,7 +605,6 @@ dnsmasq_start() config_get_bool ADD_LOCAL_DOMAIN "$cfg" add_local_domain 1 config_get_bool ADD_LOCAL_HOSTNAME "$cfg" add_local_hostname 1 - config_get_bool ADD_WAN_HOSTNAME "$cfg" add_wan_hostname 0 config_get_bool readethers "$cfg" readethers [ "$readethers" = "1" -a \! -e "/etc/ethers" ] && touch /etc/ethers @@ -731,6 +702,27 @@ dnsmasq_start() config_foreach filter_dnsmasq hostrecord dhcp_hostrecord_add "$cfg" config_foreach filter_dnsmasq relay dhcp_relay_add "$cfg" + # add own hostname + [ $ADD_LOCAL_HOSTNAME -eq 1 ] && { + local lanaddr lanaddr6 + local ulaprefix="$(uci_get network @globals[0] ula_prefix)" + local hostname="$(uci_get system @system[0] hostname Lede)" + + network_get_ipaddr lanaddr "lan" && { + dhcp_domain_add "" "$hostname" "$lanaddr" + } + + [ -n "$ulaprefix" ] && network_get_ipaddrs6 lanaddr6 "lan" && { + for lanaddr6 in $lanaddr6; do + case "$lanaddr6" in + "${ulaprefix%%:/*}"*) + dhcp_domain_add "" "$hostname" "$lanaddr6" + ;; + esac + done + } + } + echo >> $CONFIGFILE_TMP config_foreach filter_dnsmasq srvhost dhcp_srv_add "$cfg" config_foreach filter_dnsmasq mxhost dhcp_mx_add "$cfg" diff --git a/package/network/services/dnsmasq/files/dnsmasqsec.hotplug b/package/network/services/dnsmasq/files/dnsmasqsec.hotplug index 5c69314bd9..a155eb0f6e 100644 --- a/package/network/services/dnsmasq/files/dnsmasqsec.hotplug +++ b/package/network/services/dnsmasq/files/dnsmasqsec.hotplug @@ -1,5 +1,7 @@ #!/bin/sh +. /lib/functions/procd.sh + TIMEVALIDFILE="/var/state/dnsmasqsec" [ "$ACTION" = stratum ] || exit 0 @@ -7,8 +9,6 @@ TIMEVALIDFILE="/var/state/dnsmasqsec" [ -f "$TIMEVALIDFILE" ] || { echo "ntpd says time is valid" >$TIMEVALIDFILE /etc/init.d/dnsmasq enabled && { - pid=$(pidof dnsmasq) - [ "$(readlink /proc/$pid/exe)" = "/usr/sbin/dnsmasq" ] && kill -SIGHUP $pid \ - || /etc/init.d/dnsmasq restart + procd_send_signal dnsmasq } } diff --git a/package/network/services/dnsmasq/patches/000-fix-servfail-handling.patch b/package/network/services/dnsmasq/patches/000-fix-servfail-handling.patch new file mode 100644 index 0000000000..e311c34729 --- /dev/null +++ b/package/network/services/dnsmasq/patches/000-fix-servfail-handling.patch @@ -0,0 +1,130 @@ +From 68f6312d4bae30b78daafcd6f51dc441b8685b1e Mon Sep 17 00:00:00 2001 +From: Baptiste Jonglez +Date: Mon, 6 Feb 2017 21:09:11 +0000 +Subject: [PATCH] Stop treating SERVFAIL as a successful response from upstream + servers. + +This effectively reverts most of 51967f9807 ("SERVFAIL is an expected +error return, don't try all servers.") and 4ace25c5d6 ("Treat REFUSED (not +SERVFAIL) as an unsuccessful upstream response"). + +With the current behaviour, as soon as dnsmasq receives a SERVFAIL from an +upstream server, it stops trying to resolve the query and simply returns +SERVFAIL to the client. With this commit, dnsmasq will instead try to +query other upstream servers upon receiving a SERVFAIL response. + +According to RFC 1034 and 1035, the semantic of SERVFAIL is that of a +temporary error condition. Recursive resolvers are expected to encounter +network or resources issues from time to time, and will respond with +SERVFAIL in this case. Similarly, if a validating DNSSEC resolver [RFC +4033] encounters issues when checking signatures (unknown signing +algorithm, missing signatures, expired signatures because of a wrong +system clock, etc), it will respond with SERVFAIL. + +Note that all those behaviours are entirely different from a negative +response, which would provide a definite indication that the requested +name does not exist. In our case, if an upstream server responds with +SERVFAIL, another upstream server may well provide a positive answer for +the same query. + +Thus, this commit will increase robustness whenever some upstream servers +encounter temporary issues or are misconfigured. + +Quoting RFC 1034, Section 4.3.1. "Queries and responses": + + If recursive service is requested and available, the recursive response + to a query will be one of the following: + + - The answer to the query, possibly preface by one or more CNAME + RRs that specify aliases encountered on the way to an answer. + + - A name error indicating that the name does not exist. This + may include CNAME RRs that indicate that the original query + name was an alias for a name which does not exist. + + - A temporary error indication. + +Here is Section 5.2.3. of RFC 1034, "Temporary failures": + + In a less than perfect world, all resolvers will occasionally be unable + to resolve a particular request. This condition can be caused by a + resolver which becomes separated from the rest of the network due to a + link failure or gateway problem, or less often by coincident failure or + unavailability of all servers for a particular domain. + +And finally, RFC 1035 specifies RRCODE 2 for this usage, which is now more +widely known as SERVFAIL (RFC 1035, Section 4.1.1. "Header section format"): + + RCODE Response code - this 4 bit field is set as part of + responses. The values have the following + interpretation: + (...) + + 2 Server failure - The name server was + unable to process this query due to a + problem with the name server. + +For the DNSSEC-related usage of SERVFAIL, here is RFC 4033 +Section 5. "Scope of the DNSSEC Document Set and Last Hop Issues": + + A validating resolver can determine the following 4 states: + (...) + + Insecure: The validating resolver has a trust anchor, a chain of + trust, and, at some delegation point, signed proof of the + non-existence of a DS record. This indicates that subsequent + branches in the tree are provably insecure. A validating resolver + may have a local policy to mark parts of the domain space as + insecure. + + Bogus: The validating resolver has a trust anchor and a secure + delegation indicating that subsidiary data is signed, but the + response fails to validate for some reason: missing signatures, + expired signatures, signatures with unsupported algorithms, data + missing that the relevant NSEC RR says should be present, and so + forth. + (...) + + This specification only defines how security-aware name servers can + signal non-validating stub resolvers that data was found to be bogus + (using RCODE=2, "Server Failure"; see [RFC4035]). + +Notice the difference between a definite negative answer ("Insecure" +state), and an indefinite error condition ("Bogus" state). The second +type of error may be specific to a recursive resolver, for instance +because its system clock has been incorrectly set, or because it does not +implement newer cryptographic primitives. Another recursive resolver may +succeed for the same query. + +There are other similar situations in which the specified behaviour is +similar to the one implemented by this commit. + +For instance, RFC 2136 specifies the behaviour of a "requestor" that wants +to update a zone using the DNS UPDATE mechanism. The requestor tries to +contact all authoritative name servers for the zone, with the following +behaviour specified in RFC 2136, Section 4: + + 4.6. If a response is received whose RCODE is SERVFAIL or NOTIMP, or + if no response is received within an implementation dependent timeout + period, or if an ICMP error is received indicating that the server's + port is unreachable, then the requestor will delete the unusable + server from its internal name server list and try the next one, + repeating until the name server list is empty. If the requestor runs + out of servers to try, an appropriate error will be returned to the + requestor's caller. +--- + src/forward.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +--- a/src/forward.c ++++ b/src/forward.c +@@ -853,7 +853,8 @@ void reply_query(int fd, int family, tim + we get a good reply from another server. Kill it when we've + had replies from all to avoid filling the forwarding table when + everything is broken */ +- if (forward->forwardall == 0 || --forward->forwardall == 1 || RCODE(header) != REFUSED) ++ if (forward->forwardall == 0 || --forward->forwardall == 1 || ++ (RCODE(header) != REFUSED && RCODE(header) != SERVFAIL)) + { + int check_rebind = 0, no_cache_dnssec = 0, cache_secure = 0, bogusanswer = 0; + diff --git a/package/network/services/dropbear/Makefile b/package/network/services/dropbear/Makefile index e6bae9f21f..5e518dabd4 100644 --- a/package/network/services/dropbear/Makefile +++ b/package/network/services/dropbear/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=dropbear PKG_VERSION:=2016.74 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE_URL:= \ diff --git a/package/network/services/dropbear/patches/120-openwrt_options.patch b/package/network/services/dropbear/patches/120-openwrt_options.patch index f16aaf001e..b49a95ce93 100644 --- a/package/network/services/dropbear/patches/120-openwrt_options.patch +++ b/package/network/services/dropbear/patches/120-openwrt_options.patch @@ -44,10 +44,9 @@ * which are not the standard form. */ #define DROPBEAR_SHA1_HMAC -#define DROPBEAR_SHA1_96_HMAC --#define DROPBEAR_SHA2_256_HMAC --#define DROPBEAR_SHA2_512_HMAC +/*#define DROPBEAR_SHA1_96_HMAC*/ -+/*#define DROPBEAR_SHA2_256_HMAC*/ + #define DROPBEAR_SHA2_256_HMAC +-#define DROPBEAR_SHA2_512_HMAC +/*#define DROPBEAR_SHA2_512_HMAC*/ #define DROPBEAR_MD5_HMAC diff --git a/package/network/services/hostapd/Makefile b/package/network/services/hostapd/Makefile index 207dfecebe..f3aa94b6ea 100644 --- a/package/network/services/hostapd/Makefile +++ b/package/network/services/hostapd/Makefile @@ -7,7 +7,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=hostapd -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE_URL:=http://w1.fi/hostap.git PKG_SOURCE_PROTO:=git @@ -242,7 +242,7 @@ define Package/eapol-test SECTION:=net CATEGORY:=Network VARIANT:=supplicant-full - DEPENDS:=$(DRV_DEPENDS) + DEPENDS:=$(DRV_DEPENDS) +WPA_SUPPLICANT_OPENSSL:libopenssl endef @@ -318,19 +318,19 @@ define Build/Compile/wpad endef define Build/Compile/hostapd - $(call Build/RunMake,hostapd, \ + +$(call Build/RunMake,hostapd, \ hostapd hostapd_cli \ ) endef define Build/Compile/supplicant - $(call Build/RunMake,wpa_supplicant, \ + +$(call Build/RunMake,wpa_supplicant, \ wpa_cli wpa_supplicant \ ) endef define Build/Compile/supplicant-full - $(call Build/RunMake,wpa_supplicant, \ + +$(call Build/RunMake,wpa_supplicant, \ eapol_test \ ) endef @@ -350,7 +350,7 @@ endef define Package/hostapd-common/install $(INSTALL_DIR) $(1)/lib/netifd - $(INSTALL_DATA) ./files/netifd.sh $(1)/lib/netifd/hostapd.sh + $(INSTALL_DATA) ./files/hostapd.sh $(1)/lib/netifd/hostapd.sh endef define Package/hostapd/install diff --git a/package/network/services/hostapd/files/hostapd-full.config b/package/network/services/hostapd/files/hostapd-full.config index e388109fbb..4a2e87c2eb 100644 --- a/package/network/services/hostapd/files/hostapd-full.config +++ b/package/network/services/hostapd/files/hostapd-full.config @@ -146,6 +146,9 @@ CONFIG_IEEE80211AC=y # code is not needed. #CONFIG_NO_STDOUT_DEBUG=y +# Send debug messages to syslog instead of stdout +CONFIG_DEBUG_SYSLOG=y + # Remove support for RADIUS accounting #CONFIG_NO_ACCOUNTING=y diff --git a/package/network/services/hostapd/files/hostapd-mini.config b/package/network/services/hostapd/files/hostapd-mini.config index 8baff18fe4..2bd7d239c5 100644 --- a/package/network/services/hostapd/files/hostapd-mini.config +++ b/package/network/services/hostapd/files/hostapd-mini.config @@ -142,6 +142,9 @@ CONFIG_IEEE80211AC=y # code is not needed. #CONFIG_NO_STDOUT_DEBUG=y +# Send debug messages to syslog instead of stdout +CONFIG_DEBUG_SYSLOG=y + # Remove support for RADIUS accounting CONFIG_NO_ACCOUNTING=y diff --git a/package/network/services/hostapd/files/hostapd.sh b/package/network/services/hostapd/files/hostapd.sh new file mode 100644 index 0000000000..988ebc7757 --- /dev/null +++ b/package/network/services/hostapd/files/hostapd.sh @@ -0,0 +1,763 @@ +. /lib/functions/network.sh + +wpa_supplicant_add_rate() { + local var="$1" + local val="$(($2 / 1000))" + local sub="$((($2 / 100) % 10))" + append $var "$val" "," + [ $sub -gt 0 ] && append $var "." +} + +hostapd_add_rate() { + local var="$1" + local val="$(($2 / 100))" + append $var "$val" " " +} + +hostapd_append_wep_key() { + local var="$1" + + wep_keyidx=0 + set_default key 1 + case "$key" in + [1234]) + for idx in 1 2 3 4; do + local zidx + zidx=$(($idx - 1)) + json_get_var ckey "key${idx}" + [ -n "$ckey" ] && \ + append $var "wep_key${zidx}=$(prepare_key_wep "$ckey")" "$N$T" + done + wep_keyidx=$((key - 1)) + ;; + *) + append $var "wep_key0=$(prepare_key_wep "$key")" "$N$T" + ;; + esac +} + +hostapd_append_wpa_key_mgmt() { + local auth_type="$(echo $auth_type | tr 'a-z' 'A-Z')" + + append wpa_key_mgmt "WPA-$auth_type" + [ "${ieee80211r:-0}" -gt 0 ] && append wpa_key_mgmt "FT-${auth_type}" + [ "${ieee80211w:-0}" -gt 0 ] && append wpa_key_mgmt "WPA-${auth_type}-SHA256" +} + +hostapd_add_log_config() { + config_add_boolean \ + log_80211 \ + log_8021x \ + log_radius \ + log_wpa \ + log_driver \ + log_iapp \ + log_mlme + + config_add_int log_level +} + +hostapd_common_add_device_config() { + config_add_array basic_rate + config_add_array supported_rates + + config_add_string country + config_add_boolean country_ie doth + config_add_string require_mode + + hostapd_add_log_config +} + +hostapd_prepare_device_config() { + local config="$1" + local driver="$2" + + local base="${config%%.conf}" + local base_cfg= + + json_get_vars country country_ie beacon_int doth require_mode + + hostapd_set_log_options base_cfg + + set_default country_ie 1 + set_default doth 1 + + [ -n "$country" ] && { + append base_cfg "country_code=$country" "$N" + + [ "$country_ie" -gt 0 ] && append base_cfg "ieee80211d=1" "$N" + [ "$hwmode" = "a" -a "$doth" -gt 0 ] && append base_cfg "ieee80211h=1" "$N" + } + [ -n "$hwmode" ] && append base_cfg "hw_mode=$hwmode" "$N" + + local brlist= br + json_get_values basic_rate_list basic_rate + for br in $basic_rate_list; do + hostapd_add_rate brlist "$br" + done + case "$require_mode" in + g) brlist="60 120 240" ;; + n) append base_cfg "require_ht=1" "$N";; + ac) append base_cfg "require_vht=1" "$N";; + esac + + local rlist= r + json_get_values rate_list supported_rates + for r in $rate_list; do + hostapd_add_rate rlist "$r" + done + + [ -n "$rlist" ] && append base_cfg "supported_rates=$rlist" "$N" + [ -n "$brlist" ] && append base_cfg "basic_rates=$brlist" "$N" + [ -n "$beacon_int" ] && append base_cfg "beacon_int=$beacon_int" "$N" + + cat > "$config" <