[OpenWrt-Devel] [PATCH] wireguard: bump to 20180519

2018-05-18 Thread Jason A. Donenfeld
* chacha20poly1305: add mips32 implementation

"The OpenWRT Commit" - this significantly speeds up performance on cheap
plastic MIPS routers, and presumably the remaining MIPS32r2 super computers
out there.

* timers: reinitialize state on init
* timers: round up instead of down in slack_time
* timers: remove slack_time
* timers: clear send_keepalive timer on sending handshake response
* timers: no need to clear keepalive in persistent keepalive

Andrew He and I have helped simplify the timers and remove some old warts,
making the whole system a bit easier to analyze.

* tools: fix errno propagation and messages

Error messages are now more coherent.

* device: remove allowedips before individual peers

This avoids an O(n^2) traversal in favor of an O(n) one. Before systems with
many peers would grind when deleting the interface.

Signed-off-by: Jason A. Donenfeld 
---
 package/network/services/wireguard/Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/package/network/services/wireguard/Makefile 
b/package/network/services/wireguard/Makefile
index 770efe4948..c9ade769a6 100644
--- a/package/network/services/wireguard/Makefile
+++ b/package/network/services/wireguard/Makefile
@@ -11,12 +11,12 @@ include $(INCLUDE_DIR)/kernel.mk
 
 PKG_NAME:=wireguard
 
-PKG_VERSION:=0.0.20180514
+PKG_VERSION:=0.0.20180519
 PKG_RELEASE:=1
 
 PKG_SOURCE:=WireGuard-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=https://git.zx2c4.com/WireGuard/snapshot/
-PKG_HASH:=e895b65e06e85429403be3d1987577a6967476b069f0ff53caead6f682f466da
+PKG_HASH:=8846b3006c3f7e079bb38a4c985ccc2981e259f56c927b4cf47cbc1420e1c462
 
 PKG_LICENSE:=GPL-2.0 Apache-2.0
 PKG_LICENSE_FILES:=COPYING
-- 
2.17.0


___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
http://lists.infradead.org/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH] ar71xx: add support for GL.iNet GL-AR750S

2018-05-18 Thread Luochongjun
This patch adds supports for GL-AR750S.

Specification:
- SOC: QCA9563 (775MHz)
- Flash: 16 MiB (W25Q128FVSG)
- RAM: 128 MiB DDR2
- Ethernet: 2x 1Gbps LAN + 1x 1Gbps WAN
- Wireless: 2.4GHz (bgn) and 5GHz (ac)
- USB: 1x USB 2.0 port
- Button: 1x switch button, 1x reset button
- LED: 3x LEDS (green)

Flash instruction:
Apply factory image via web-gui.

Signed-off-by: Luo chongjun 
---
 target/linux/ar71xx/base-files/etc/board.d/01_leds |   4 +
 .../linux/ar71xx/base-files/etc/board.d/02_network |   4 +
 .../etc/hotplug.d/firmware/11-ath10k-caldata   |   1 +
 target/linux/ar71xx/base-files/lib/ar71xx.sh   |   3 +
 .../ar71xx/base-files/lib/upgrade/platform.sh  |   1 +
 target/linux/ar71xx/config-4.9 |   1 +
 .../ar71xx/files/arch/mips/ath79/Kconfig.openwrt   |  11 ++
 target/linux/ar71xx/files/arch/mips/ath79/Makefile |   1 +
 .../ar71xx/files/arch/mips/ath79/mach-gl-ar750s.c  | 195 +
 .../linux/ar71xx/files/arch/mips/ath79/machtypes.h |   1 +
 target/linux/ar71xx/generic/config-default |   1 +
 target/linux/ar71xx/image/generic.mk   |  13 ++
 12 files changed, 236 insertions(+)
 create mode 100755 target/linux/ar71xx/files/arch/mips/ath79/mach-gl-ar750s.c

diff --git a/target/linux/ar71xx/base-files/etc/board.d/01_leds 
b/target/linux/ar71xx/base-files/etc/board.d/01_leds
index 52f1ac3..f436854 100755
--- a/target/linux/ar71xx/base-files/etc/board.d/01_leds
+++ b/target/linux/ar71xx/base-files/etc/board.d/01_leds
@@ -385,6 +385,10 @@ gl-ar750)
ucidef_set_led_wlan "wlan2g" "WLAN2G" "$board:white:wlan2g" "phy1tpt"
ucidef_set_led_wlan "wlan5g" "WLAN5G" "$board:white:wlan5g" "phy0tpt"
;;
+gl-ar750s)
+   ucidef_set_led_wlan "wlan2g" "WLAN2G" "$board:green:wlan2g" "phy1tpt"
+   ucidef_set_led_wlan "wlan5g" "WLAN5G" "$board:green:wlan5g" "phy0tpt"
+   ;;
 gl-mifi)
ucidef_set_led_wlan "wlan" "WLAN" "$board:green:wlan" "phy0tpt"
ucidef_set_led_netdev "wan" "WAN" "$board:green:wan" "eth0"
diff --git a/target/linux/ar71xx/base-files/etc/board.d/02_network 
b/target/linux/ar71xx/base-files/etc/board.d/02_network
index 5898261..5f87ab1 100755
--- a/target/linux/ar71xx/base-files/etc/board.d/02_network
+++ b/target/linux/ar71xx/base-files/etc/board.d/02_network
@@ -432,6 +432,10 @@ ar71xx_setup_interfaces()
ucidef_add_switch "switch0" \
"0@eth1" "1:lan" "2:lan"
;;
+   gl-ar750s)
+   ucidef_add_switch "switch0" \
+   "0@eth0" "2:lan:2" "3:lan:1" "1:wan"
+   ;;
jwap230)
ucidef_set_interfaces_lan_wan "eth0.1" "eth1.2"
ucidef_add_switch "switch0" \
diff --git 
a/target/linux/ar71xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata 
b/target/linux/ar71xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
index 5d01701..f82026c 100644
--- a/target/linux/ar71xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
+++ b/target/linux/ar71xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
@@ -99,6 +99,7 @@ case "$FIRMWARE" in
ath10kcal_extract "caldata" 20480 2116
ath10kcal_patch_mac $(macaddr_add $(cat 
/sys/class/net/eth0/address) +1)
;;
+   gl-ar750s|\
gl-ar750|\
tl-wpa8630)
ath10kcal_extract "art" 20480 2116
diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh 
b/target/linux/ar71xx/base-files/lib/ar71xx.sh
index 42bd80d..74aa21b 100755
--- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
+++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh
@@ -727,6 +727,9 @@ ar71xx_board_detect() {
*"GL-AR750")
name="gl-ar750"
;;
+   *"GL-AR750S")
+   name="gl-ar750s"
+   ;;
*"GL-CONNECT INET v1")
name="gl-inet"
 
diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh 
b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
index 284582f..d0a3f30 100755
--- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
@@ -260,6 +260,7 @@ platform_check_image() {
gl-ar300m|\
gl-ar300|\
gl-ar750|\
+   gl-ar750s|\
gl-domino|\
gl-mifi|\
gl-usb150|\
diff --git a/target/linux/ar71xx/config-4.9 b/target/linux/ar71xx/config-4.9
index 35efd17..a453e10 100644
--- a/target/linux/ar71xx/config-4.9
+++ b/target/linux/ar71xx/config-4.9
@@ -120,6 +120,7 @@ CONFIG_ATH79=y
 # CONFIG_ATH79_MACH_GL_AR300 is not set
 # CONFIG_ATH79_MACH_GL_AR300M is not set
 # CONFIG_ATH79_MACH_GL_AR750 is not set
+# CONFIG_ATH79_MACH_GL_AR750S is not set
 # CONFIG_ATH79_MACH_GL_DOMINO is not set
 # CONFIG_ATH79_MACH_GL_INET is not set
 # CONFIG_ATH79_MACH_GL_MIFI is not set
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt 

[OpenWrt-Devel] [PATCH] libevent2: update to version 2.1.8

2018-05-18 Thread Eneas U de Queiroz via openwrt-devel
The sender domain has a DMARC Reject/Quarantine policy which disallows
sending mailing list messages using the original "From" header.

To mitigate this problem, the original message has been wrapped
automatically by the mailing list software.--- Begin Message ---
This version is compatible with openssl-1.1.0.

Signed-off-by: Eneas U de Queiroz 
---
 package/libs/libevent2/Makefile | 35 ---
 1 file changed, 20 insertions(+), 15 deletions(-)

diff --git a/package/libs/libevent2/Makefile b/package/libs/libevent2/Makefile
index 5d56f37c51..12295f657c 100644
--- a/package/libs/libevent2/Makefile
+++ b/package/libs/libevent2/Makefile
@@ -8,12 +8,16 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=libevent2
-PKG_VERSION:=2.0.22
+PKG_VERSION:=2.1.8
 PKG_RELEASE:=1
 
-PKG_BUILD_DIR:=$(BUILD_DIR)/libevent-$(PKG_VERSION)-stable
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
+PKG_SOURCE_PROTO:=git
+PKG_SOURCE_URL:=https://github.com/libevent/libevent
+PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
+PKG_SOURCE_VERSION:=release-2.1.8-stable
+
 PKG_SOURCE:=libevent-$(PKG_VERSION)-stable.tar.gz
-PKG_SOURCE_URL:=@SF/levent
 PKG_HASH:=71c2c49f0adadacfdbe6332a372c38cf9c8b7895bb73dabeaa53cdcc1d4e1fa3
 PKG_MAINTAINER:=Jo-Philipp Wich 
 PKG_LICENSE:=BSD-3-Clause
@@ -46,7 +50,7 @@ endef
 
 define Package/libevent2
   $(call Package/libevent2/Default)
-  TITLE+= library (version 2.0)
+  TITLE+= library (version 2.1)
 endef
 
 define Package/libevent2/description
@@ -58,7 +62,7 @@ endef
 
 define Package/libevent2-core
   $(call Package/libevent2/Default)
-  TITLE+= core library (version 2.0)
+  TITLE+= core library (version 2.1)
 endef
 
 define Package/libevent2-core/description
@@ -70,7 +74,7 @@ endef
 
 define Package/libevent2-extra
   $(call Package/libevent2/Default)
-  TITLE+= extra library (version 2.0)
+  TITLE+= extra library (version 2.1)
 endef
 
 define Package/libevent2-extra/description
@@ -82,7 +86,7 @@ endef
 
 define Package/libevent2-openssl
   $(call Package/libevent2/Default)
-  TITLE+= OpenSSL library (version 2.0)
+  TITLE+= OpenSSL library (version 2.1)
   DEPENDS+=+libopenssl
 endef
 
@@ -95,7 +99,7 @@ endef
 
 define Package/libevent2-pthreads
   $(call Package/libevent2/Default)
-  TITLE+= Pthreads library (version 2.0)
+  TITLE+= Pthreads library (version 2.1)
   DEPENDS+=+libpthread
 endef
 
@@ -112,7 +116,8 @@ CONFIGURE_ARGS += \
--enable-shared \
--enable-static \
--disable-debug-mode
-
+CONFIGURE_VARS += \
+   ac_cv_search_ERR_remove_thread_state=no
 MAKE_FLAGS += \
CFLAGS="$(TARGET_CFLAGS)"
 
@@ -121,34 +126,34 @@ define Build/InstallDev
$(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libevent*.{la,a,so} $(1)/usr/lib/
-   $(CP) $(PKG_INSTALL_DIR)/usr/lib/libevent*-2.0.so* $(1)/usr/lib/
+   $(CP) $(PKG_INSTALL_DIR)/usr/lib/libevent*-2.1.so* $(1)/usr/lib/
$(INSTALL_DIR) $(1)/usr/lib/pkgconfig
$(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libevent*.pc 
$(1)/usr/lib/pkgconfig/
 endef
 
 define Package/libevent2/install
$(INSTALL_DIR) $(1)/usr/lib
-   $(CP) $(PKG_INSTALL_DIR)/usr/lib/libevent-2.0.so.* $(1)/usr/lib/
+   $(CP) $(PKG_INSTALL_DIR)/usr/lib/libevent-2.1.so.* $(1)/usr/lib/
 endef
 
 define Package/libevent2-core/install
$(INSTALL_DIR) $(1)/usr/lib
-   $(CP) $(PKG_INSTALL_DIR)/usr/lib/libevent_core-2.0.so.* $(1)/usr/lib/
+   $(CP) $(PKG_INSTALL_DIR)/usr/lib/libevent_core-2.1.so.* $(1)/usr/lib/
 endef
 
 define Package/libevent2-extra/install
$(INSTALL_DIR) $(1)/usr/lib
-   $(CP) $(PKG_INSTALL_DIR)/usr/lib/libevent_extra-2.0.so.* $(1)/usr/lib/
+   $(CP) $(PKG_INSTALL_DIR)/usr/lib/libevent_extra-2.1.so.* $(1)/usr/lib/
 endef
 
 define Package/libevent2-openssl/install
$(INSTALL_DIR) $(1)/usr/lib
-   $(CP) $(PKG_INSTALL_DIR)/usr/lib/libevent_openssl-2.0.so.* $(1)/usr/lib/
+   $(CP) $(PKG_INSTALL_DIR)/usr/lib/libevent_openssl-2.1.so.* $(1)/usr/lib/
 endef
 
 define Package/libevent2-pthreads/install
$(INSTALL_DIR) $(1)/usr/lib
-   $(CP) $(PKG_INSTALL_DIR)/usr/lib/libevent_pthreads-2.0.so.* 
$(1)/usr/lib/
+   $(CP) $(PKG_INSTALL_DIR)/usr/lib/libevent_pthreads-2.1.so.* 
$(1)/usr/lib/
 endef
 
 $(eval $(call BuildPackage,libevent2))
-- 
2.16.1


--- End Message ---
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
http://lists.infradead.org/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH] openssl: Upgrade to 1.1.0h

2018-05-18 Thread Eneas U de Queiroz via openwrt-devel
The sender domain has a DMARC Reject/Quarantine policy which disallows
sending mailing list messages using the original "From" header.

To mitigate this problem, the original message has been wrapped
automatically by the mailing list software.--- Begin Message ---
This version brings major changes to the API, so many packages will need
adjustments or version bumps.

Signed-off-by: Eneas U de Queiroz 
---
 package/libs/openssl/Config.in |  10 --
 package/libs/openssl/Makefile  |  51 ++
 .../libs/openssl/patches/110-openwrt_targets.patch |  26 +++
 .../openssl/patches/110-optimize-for-size.patch|  16 --
 package/libs/openssl/patches/130-perl-path.patch   |  64 ---
 .../libs/openssl/patches/140-makefile-dirs.patch   |  11 --
 package/libs/openssl/patches/150-no_engines.patch  |  81 -
 .../openssl/patches/160-disable_doc_tests.patch|  58 ---
 package/libs/openssl/patches/170-bash_path.patch   |   8 -
 .../openssl/patches/180-fix_link_segfault.patch|  16 +-
 .../patches/190-remove_timestamp_check.patch   |  23 ---
 .../libs/openssl/patches/200-parallel_build.patch  | 184 -
 12 files changed, 50 insertions(+), 498 deletions(-)
 create mode 100644 package/libs/openssl/patches/110-openwrt_targets.patch
 delete mode 100644 package/libs/openssl/patches/110-optimize-for-size.patch
 delete mode 100644 package/libs/openssl/patches/130-perl-path.patch
 delete mode 100644 package/libs/openssl/patches/140-makefile-dirs.patch
 delete mode 100644 package/libs/openssl/patches/150-no_engines.patch
 delete mode 100644 package/libs/openssl/patches/160-disable_doc_tests.patch
 delete mode 100644 package/libs/openssl/patches/170-bash_path.patch
 delete mode 100644 
package/libs/openssl/patches/190-remove_timestamp_check.patch
 delete mode 100644 package/libs/openssl/patches/200-parallel_build.patch

diff --git a/package/libs/openssl/Config.in b/package/libs/openssl/Config.in
index 96d3ba3e9d..fdad98fdf6 100644
--- a/package/libs/openssl/Config.in
+++ b/package/libs/openssl/Config.in
@@ -10,11 +10,6 @@ config OPENSSL_WITH_EC2M
 depends on OPENSSL_WITH_EC
 prompt "Enable ec2m support"
 
-config OPENSSL_WITH_SSL3
-   bool
-   default n
-   prompt "Enable sslv3 support"
-
 config OPENSSL_WITH_DEPRECATED
bool
default y
@@ -30,11 +25,6 @@ config OPENSSL_WITH_COMPRESSION
default n
prompt "Enable compression support"
 
-config OPENSSL_WITH_NPN
-   bool
-   default y
-   prompt "Enable NPN support"
-
 config OPENSSL_WITH_PSK
bool
default y
diff --git a/package/libs/openssl/Makefile b/package/libs/openssl/Makefile
index 8409730d70..ba6577d915 100644
--- a/package/libs/openssl/Makefile
+++ b/package/libs/openssl/Makefile
@@ -8,8 +8,8 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=openssl
-PKG_BASE:=1.0.2
-PKG_BUGFIX:=o
+PKG_BASE:=1.1.0
+PKG_BUGFIX:=h
 PKG_VERSION:=$(PKG_BASE)$(PKG_BUGFIX)
 PKG_RELEASE:=1
 PKG_USE_MIPS16:=0
@@ -24,7 +24,7 @@ PKG_SOURCE_URL:= \
http://gd.tuwien.ac.at/infosys/security/openssl/source/ \
http://www.openssl.org/source/ \
http://www.openssl.org/source/old/$(PKG_BASE)/
-PKG_HASH:=ec3f5c9714ba0fd45cb4e087301eb1336c317e0d20b575a125050470e8089e4d
+PKG_HASH:=5835626cde9e99656585fc7aaa2302a73a7e1340bf8c14fd635a62c66802a517
 
 PKG_LICENSE:=OpenSSL
 PKG_LICENSE_FILES:=LICENSE
@@ -34,12 +34,10 @@ PKG_CONFIG_DEPENDS:= \
CONFIG_OPENSSL_ENGINE_DIGEST \
CONFIG_OPENSSL_WITH_EC \
CONFIG_OPENSSL_WITH_EC2M \
-   CONFIG_OPENSSL_WITH_SSL3 \
CONFIG_OPENSSL_HARDWARE_SUPPORT \
CONFIG_OPENSSL_WITH_DEPRECATED \
CONFIG_OPENSSL_WITH_DTLS \
CONFIG_OPENSSL_WITH_COMPRESSION \
-   CONFIG_OPENSSL_WITH_NPN \
CONFIG_OPENSSL_WITH_PSK \
CONFIG_OPENSSL_WITH_SRP \
CONFIG_OPENSSL_OPTIMIZE_SPEED
@@ -101,9 +99,8 @@ This package contains the OpenSSL command-line utility.
 endef
 
 
-OPENSSL_NO_CIPHERS:= no-idea no-md2 no-mdc2 no-rc5 no-sha0 no-camellia no-krb5 
\
- no-whrlpool no-whirlpool no-seed no-jpake
-OPENSSL_OPTIONS:= shared no-err no-sse2 no-ssl2 no-ssl2-method no-heartbeats
+OPENSSL_NO_CIPHERS:= no-idea no-mdc2 no-camellia no-whirlpool no-seed
+OPENSSL_OPTIONS:= shared no-err no-heartbeats
 
 ifdef CONFIG_OPENSSL_ENGINE_CRYPTO
   OPENSSL_OPTIONS += -DHAVE_CRYPTODEV
@@ -111,7 +108,7 @@ ifdef CONFIG_OPENSSL_ENGINE_CRYPTO
 OPENSSL_OPTIONS += -DUSE_CRYPTODEV_DIGESTS
   endif
 else
-  OPENSSL_OPTIONS += no-engines
+  OPENSSL_OPTIONS += no-engine
 endif
 
 ifndef CONFIG_OPENSSL_WITH_EC
@@ -122,10 +119,6 @@ ifndef CONFIG_OPENSSL_WITH_EC2M
   OPENSSL_OPTIONS += no-ec2m
 endif
 
-ifndef CONFIG_OPENSSL_WITH_SSL3
-  OPENSSL_OPTIONS += no-ssl3 no-ssl3-method
-endif
-
 ifndef CONFIG_OPENSSL_HARDWARE_SUPPORT
   OPENSSL_OPTIONS += no-hw
 endif
@@ -144,10 +137,6 @@ else
   OPENSSL_OPTIONS += no-comp
 endif
 
-ifndef CONFIG_OPENSSL_WITH_NPN
-  

Re: [OpenWrt-Devel] Build failure ath10k-CT without mac80211 debug

2018-05-18 Thread Ben Greear

On 05/18/2018 02:34 AM, Koen Vandeputte wrote:

Hi Ben,

I'm trying to build todays OpenWrt master with following options:
- ath10k-ct
- qca988x-ct-htt


When disabling this option (CONFIG_PACKAGE_MAC80211_DEBUGFS),  I'm getting the 
build errors below.

Is it *really* required to have this enabled for the driver to function 
properly?
Is there a possibility to disable the status counters updates below using an 
#ifdef or so when above option is disabled?

I want to disable all the internal mac80211 debug stuff in order to save 
precious cpu cycles (hardware: rb911G-5HPacD,  single core arm 600Mhz,  [1])


I'd like to keep that #warning there, but certainly the build should be fixed 
to not fail.

If you have time and interest and ability, you could patch my ath10k-ct tree to 
#ifdef those failing
stats out when DEBUG is not enabled...  I don't have time to do it super quick, 
but will fix
it next time I update OpenWRT if no one has done it first.

Thanks,
Ben




Thanks again,

Koen

[1] : https://mikrotik.com/product/RB911G-5HPacD



make[4]: Entering directory 
'/mnt/ramdisk/koen/firmware/builds/generic_rb912/build_dir/target-mips_24kc_musl/linux-ar71xx_mikrotik/linux-4.9.100'
  CC [M] 
/mnt/ramdisk/koen/firmware/builds/generic_rb912/build_dir/target-mips_24kc_musl/linux-ar71xx_mikrotik/ath10k-ct-2018-03-16-30827f7d/ath10k-4.13/htt_rx.o
In file included from
/mnt/ramdisk/koen/firmware/builds/generic_rb912/build_dir/target-mips_24kc_musl/linux-ar71xx_mikrotik/ath10k-ct-2018-03-16-30827f7d/ath10k-4.13/core.h:32:0,
 from
/mnt/ramdisk/koen/firmware/builds/generic_rb912/build_dir/target-mips_24kc_musl/linux-ar71xx_mikrotik/ath10k-ct-2018-03-16-30827f7d/ath10k-4.13/htt_rx.c:18:
/mnt/ramdisk/koen/firmware/builds/generic_rb912/build_dir/target-mips_24kc_musl/linux-ar71xx_mikrotik/ath10k-ct-2018-03-16-30827f7d/ath10k-4.13/wmi.h:7081:2:
warning: #warning Please enable ATH10K-DEBUGFS kernel option for optimal 
support for CT firmware. [-Wcpp]
 #warning Please enable ATH10K-DEBUGFS kernel option for optimal support for CT 
firmware.
  ^~~
/mnt/ramdisk/koen/firmware/builds/generic_rb912/build_dir/target-mips_24kc_musl/linux-ar71xx_mikrotik/ath10k-ct-2018-03-16-30827f7d/ath10k-4.13/htt_rx.c:
 In
function 'ath10k_unchain_msdu':
/mnt/ramdisk/koen/firmware/builds/generic_rb912/build_dir/target-mips_24kc_musl/linux-ar71xx_mikrotik/ath10k-ct-2018-03-16-30827f7d/ath10k-4.13/htt_rx.c:1561:5:
error: 'struct ath10k' has no member named 'debug'
   ar->debug.rx_drop_unchain_oom++;
 ^~
/mnt/ramdisk/koen/firmware/builds/generic_rb912/build_dir/target-mips_24kc_musl/linux-ar71xx_mikrotik/ath10k-ct-2018-03-16-30827f7d/ath10k-4.13/htt_rx.c:
 In
function 'ath10k_htt_rx_h_unchain':
/mnt/ramdisk/koen/firmware/builds/generic_rb912/build_dir/target-mips_24kc_musl/linux-ar71xx_mikrotik/ath10k-ct-2018-03-16-30827f7d/ath10k-4.13/htt_rx.c:1598:5:
error: 'struct ath10k' has no member named 'debug'
   ar->debug.rx_drop_decap_non_raw_chained++;
 ^~
/mnt/ramdisk/koen/firmware/builds/generic_rb912/build_dir/target-mips_24kc_musl/linux-ar71xx_mikrotik/ath10k-ct-2018-03-16-30827f7d/ath10k-4.13/htt_rx.c:
 In
function 'ath10k_htt_rx_amsdu_allowed':
/mnt/ramdisk/koen/firmware/builds/generic_rb912/build_dir/target-mips_24kc_musl/linux-ar71xx_mikrotik/ath10k-ct-2018-03-16-30827f7d/ath10k-4.13/htt_rx.c:1616:5:
error: 'struct ath10k' has no member named 'debug'
   ar->debug.rx_drop_no_freq++;
 ^~
/mnt/ramdisk/koen/firmware/builds/generic_rb912/build_dir/target-mips_24kc_musl/linux-ar71xx_mikrotik/ath10k-ct-2018-03-16-30827f7d/ath10k-4.13/htt_rx.c:1622:5:
error: 'struct ath10k' has no member named 'debug'
   ar->debug.rx_drop_cac_running++;
 ^~
scripts/Makefile.build:293: recipe for target
'/mnt/ramdisk/koen/firmware/builds/generic_rb912/build_dir/target-mips_24kc_musl/linux-ar71xx_mikrotik/ath10k-ct-2018-03-16-30827f7d/ath10k-4.13/htt_rx.o'
 failed
make[5]: ***
[/mnt/ramdisk/koen/firmware/builds/generic_rb912/build_dir/target-mips_24kc_musl/linux-ar71xx_mikrotik/ath10k-ct-2018-03-16-30827f7d/ath10k-4.13/htt_rx.o]
 Error 1
Makefile:1506: recipe for target
'_module_/mnt/ramdisk/koen/firmware/builds/generic_rb912/build_dir/target-mips_24kc_musl/linux-ar71xx_mikrotik/ath10k-ct-2018-03-16-30827f7d/ath10k-4.13'
 failed
make[4]: ***
[_module_/mnt/ramdisk/koen/firmware/builds/generic_rb912/build_dir/target-mips_24kc_musl/linux-ar71xx_mikrotik/ath10k-ct-2018-03-16-30827f7d/ath10k-4.13]
 Error 2
make[4]: Leaving directory 
'/mnt/ramdisk/koen/firmware/builds/generic_rb912/build_dir/target-mips_24kc_musl/linux-ar71xx_mikrotik/linux-4.9.100'
Makefile:96: recipe for target
'/mnt/ramdisk/koen/firmware/builds/generic_rb912/build_dir/target-mips_24kc_musl/linux-ar71xx_mikrotik/ath10k-ct-2018-03-16-30827f7d/.built'
 failed
make[3]: *** 
[/mnt/ramdisk/koen/firmware/builds/generic_rb912/build_dir/target-mips_24kc_musl/linux-ar71xx_mikrotik/ath10k-ct-2018-03-16-30827f7d/.built]
 Error 2
make[3]: Leaving directory 

[OpenWrt-Devel] [PATCH] mtd: skip bad blocks when writing

2018-05-18 Thread Lev
---
 package/system/mtd/src/jffs2.c | 10 ++
 1 file changed, 10 insertions(+)

diff --git a/package/system/mtd/src/jffs2.c b/package/system/mtd/src/jffs2.c
index b432f64ac0..5bf3eec328 100644
--- a/package/system/mtd/src/jffs2.c
+++ b/package/system/mtd/src/jffs2.c
@@ -308,6 +308,16 @@ int mtd_write_jffs2(const char *mtd, const char *filename, 
const char *dir)
for(;;) {
struct jffs2_unknown_node *node = (struct jffs2_unknown_node *) 
buf;
 
+   while (mtd_block_is_bad(outfd, mtdofs) && (mtdofs < mtdsize)) {
+   if (!quiet)
+   fprintf(stderr, "\nSkipping bad block at 0x%08x 
  ", mtdofs);
+
+   mtdofs += erasesize;
+
+   /* Move the file pointer along over the bad block. */
+   lseek(outfd, erasesize, SEEK_CUR);
+   }
+
if (read(outfd, buf, erasesize) != erasesize) {
fdeof = 1;
break;
-- 
2.11.0


___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
http://lists.infradead.org/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH] fstools: Add the new options available in the menuconfig

2018-05-18 Thread Pierre Lebleu
The mounting flags and the extra mounting options are available
in the menuconfig.

Signed-off-by: Pierre Lebleu 
---
 package/system/fstools/Makefile | 16 
 1 file changed, 16 insertions(+)

diff --git a/package/system/fstools/Makefile b/package/system/fstools/Makefile
index 494f90d..d85ad81 100644
--- a/package/system/fstools/Makefile
+++ b/package/system/fstools/Makefile
@@ -33,6 +33,8 @@ include $(INCLUDE_DIR)/cmake.mk
 
 TARGET_LDFLAGS += $(if $(CONFIG_USE_GLIBC),-lrt)
 CMAKE_OPTIONS += $(if $(CONFIG_FSTOOLS_UBIFS_EXTROOT),-DCMAKE_UBIFS_EXTROOT=y)
+CMAKE_OPTIONS += $(if 
$(CONFIG_FSTOOLS_OVL_MOUNT_OPTION),-DCMAKE_OVL_MOUNT_OPTION=$(CONFIG_FSTOOLS_OVL_MOUNT_OPTION))
+CMAKE_OPTIONS += $(if 
$(CONFIG_FSTOOLS_OVL_MOUNT_FLAGS),-DCMAKE_OVL_MOUNT_FLAGS=$(CONFIG_FSTOOLS_OVL_MOUNT_FLAGS))
 
 define Package/fstools
   SECTION:=base
@@ -50,6 +52,20 @@ define Package/fstools/config
default y
help
This option makes it possible to use extroot 
functionality if the root filesystem resides on an UBIFS partition
+
+   config FSTOOLS_OVL_MOUNT_FLAGS
+   depends on PACKAGE_fstools
+   string "Mounting flag option for the overlay filesystem"
+   default MS_NOATIME
+   help
+   This option makes it possible to set the option flags 
when the overlay system is mounted.
+
+   config FSTOOLS_OVL_MOUNT_OPTION
+   depends on PACKAGE_fstools
+   string "Extra mounting option for the overlay filesystem"
+   default NULL
+   help
+   This option makes it possible to give extra option when 
the overlay system is mounted.
 endef
 
 define Package/snapshot-tool
-- 
1.9.1


___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
http://lists.infradead.org/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 1/2] fstools: allow to customize the mount option for the overlay

2018-05-18 Thread Pierre Lebleu
In order to give some extra options (specific to the filesystem used),
a new CMake option (eg: CMAKE_OVL_MOUNT_OPTION) has been added.

Example: cmake -DCMAKE_OVL_MOUNT_OPTION="compr=zlib"

Signed-off-by: Pierre Lebleu 
---
 CMakeLists.txt   | 6 ++
 libfstools/overlay.c | 2 +-
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 9e855bd..484d716 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -52,6 +52,12 @@ INSTALL(FILES libubi/libubi-tiny.h libubi/libubi.h 
libubi/ubi-media.h
DESTINATION include
 )
 
+IF(DEFINED CMAKE_OVL_MOUNT_OPTION)
+   ADD_DEFINITIONS(-DOVL_MOUNT_OPTION=${CMAKE_OVL_MOUNT_OPTION})
+ELSE(DEFINED CMAKE_OVL_MOUNT_OPTION)
+   ADD_DEFINITIONS(-DOVL_MOUNT_OPTION=NULL)
+ENDIF(DEFINED CMAKE_OVL_MOUNT_OPTION)
+
 ADD_EXECUTABLE(mount_root mount_root.c)
 TARGET_LINK_LIBRARIES(mount_root fstools)
 INSTALL(TARGETS mount_root RUNTIME DESTINATION sbin)
diff --git a/libfstools/overlay.c b/libfstools/overlay.c
index ebc43f7..5d5a985 100644
--- a/libfstools/overlay.c
+++ b/libfstools/overlay.c
@@ -341,7 +341,7 @@ static int overlay_mount_fs(struct volume *v)
return -1;
}
 
-   if (mount(v->blk, "/tmp/overlay", fstype, MS_NOATIME, NULL)) {
+   if (mount(v->blk, "/tmp/overlay", fstype, MS_NOATIME, 
OVL_MOUNT_OPTION)) {
ULOG_ERR("failed to mount -t %s %s /tmp/overlay: %m\n",
 fstype, v->blk);
return -1;
-- 
1.9.1


___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
http://lists.infradead.org/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 2/2] fstools: allow to customize the mount flags for the overlay

2018-05-18 Thread Pierre Lebleu
In order to customize the mount flags, a new CMake option
(eg: CMAKE_OVL_MOUNT_FLAGS) has been added.

Example: cmake -DCMAKE_OVL_MOUNT_FLAGS="MS_RELATIME"

Signed-off-by: Pierre Lebleu 
---
 CMakeLists.txt   | 6 ++
 libfstools/overlay.c | 2 +-
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 484d716..4e8b502 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -58,6 +58,12 @@ ELSE(DEFINED CMAKE_OVL_MOUNT_OPTION)
ADD_DEFINITIONS(-DOVL_MOUNT_OPTION=NULL)
 ENDIF(DEFINED CMAKE_OVL_MOUNT_OPTION)
 
+IF(DEFINED CMAKE_OVL_MOUNT_FLAGS)
+   ADD_DEFINITIONS(-DOVL_MOUNT_FLAGS=${CMAKE_OVL_MOUNT_FLAGS})
+ELSE(DEFINED CMAKE_OVL_MOUNT_FLAGS)
+   ADD_DEFINITIONS(-DOVL_MOUNT_FLAGS=MS_NOATIME)
+ENDIF(DEFINED CMAKE_OVL_MOUNT_FLAGS)
+
 ADD_EXECUTABLE(mount_root mount_root.c)
 TARGET_LINK_LIBRARIES(mount_root fstools)
 INSTALL(TARGETS mount_root RUNTIME DESTINATION sbin)
diff --git a/libfstools/overlay.c b/libfstools/overlay.c
index 5d5a985..b201679 100644
--- a/libfstools/overlay.c
+++ b/libfstools/overlay.c
@@ -341,7 +341,7 @@ static int overlay_mount_fs(struct volume *v)
return -1;
}
 
-   if (mount(v->blk, "/tmp/overlay", fstype, MS_NOATIME, 
OVL_MOUNT_OPTION)) {
+   if (mount(v->blk, "/tmp/overlay", fstype, OVL_MOUNT_FLAGS, 
OVL_MOUNT_OPTION)) {
ULOG_ERR("failed to mount -t %s %s /tmp/overlay: %m\n",
 fstype, v->blk);
return -1;
-- 
1.9.1


___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
http://lists.infradead.org/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH] ar71xx: add support for GL.iNet GL-AR750S

2018-05-18 Thread Luochongjun
This patch adds supports for GL-AR750S.

Specification:
- SOC: QCA9563 (775MHz)
- Flash: 16 MiB (W25Q128FVSG)
- RAM: 128 MiB DDR2
- Ethernet: 2x 1Gbps LAN + 1x 1Gbps WAN
- Wireless: 2.4GHz (bgn) and 5GHz (ac)
- USB: 1x USB 2.0 port
- Button: 1x switch button, 1x reset button
- LED: 3x LEDS (green)

Flash instruction:
Apply factory image via web-gui.

Signed-off-by: Luo chongjun 
---
 target/linux/ar71xx/base-files/etc/board.d/01_leds |   4 +
 .../linux/ar71xx/base-files/etc/board.d/02_network |   4 +
 .../etc/hotplug.d/firmware/11-ath10k-caldata   |   1 +
 target/linux/ar71xx/base-files/lib/ar71xx.sh   |   3 +
 .../ar71xx/base-files/lib/upgrade/platform.sh  |   1 +
 target/linux/ar71xx/config-4.9 |   1 +
 .../ar71xx/files/arch/mips/ath79/Kconfig.openwrt   |  11 ++
 target/linux/ar71xx/files/arch/mips/ath79/Makefile |   1 +
 .../ar71xx/files/arch/mips/ath79/mach-gl-ar750s.c  | 195 +
 .../linux/ar71xx/files/arch/mips/ath79/machtypes.h |   1 +
 target/linux/ar71xx/generic/config-default |   1 +
 target/linux/ar71xx/image/generic.mk   |  13 ++
 12 files changed, 236 insertions(+)
 create mode 100755 target/linux/ar71xx/files/arch/mips/ath79/mach-gl-ar750s.c

diff --git a/target/linux/ar71xx/base-files/etc/board.d/01_leds 
b/target/linux/ar71xx/base-files/etc/board.d/01_leds
index 52f1ac3..f436854 100755
--- a/target/linux/ar71xx/base-files/etc/board.d/01_leds
+++ b/target/linux/ar71xx/base-files/etc/board.d/01_leds
@@ -385,6 +385,10 @@ gl-ar750)
ucidef_set_led_wlan "wlan2g" "WLAN2G" "$board:white:wlan2g" "phy1tpt"
ucidef_set_led_wlan "wlan5g" "WLAN5G" "$board:white:wlan5g" "phy0tpt"
;;
+gl-ar750s)
+   ucidef_set_led_wlan "wlan2g" "WLAN2G" "$board:green:wlan2g" "phy1tpt"
+   ucidef_set_led_wlan "wlan5g" "WLAN5G" "$board:green:wlan5g" "phy0tpt"
+   ;;
 gl-mifi)
ucidef_set_led_wlan "wlan" "WLAN" "$board:green:wlan" "phy0tpt"
ucidef_set_led_netdev "wan" "WAN" "$board:green:wan" "eth0"
diff --git a/target/linux/ar71xx/base-files/etc/board.d/02_network 
b/target/linux/ar71xx/base-files/etc/board.d/02_network
index 5898261..5f87ab1 100755
--- a/target/linux/ar71xx/base-files/etc/board.d/02_network
+++ b/target/linux/ar71xx/base-files/etc/board.d/02_network
@@ -432,6 +432,10 @@ ar71xx_setup_interfaces()
ucidef_add_switch "switch0" \
"0@eth1" "1:lan" "2:lan"
;;
+   gl-ar750s)
+   ucidef_add_switch "switch0" \
+   "0@eth0" "2:lan:2" "3:lan:1" "1:wan"
+   ;;
jwap230)
ucidef_set_interfaces_lan_wan "eth0.1" "eth1.2"
ucidef_add_switch "switch0" \
diff --git 
a/target/linux/ar71xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata 
b/target/linux/ar71xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
index 5d01701..f82026c 100644
--- a/target/linux/ar71xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
+++ b/target/linux/ar71xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
@@ -99,6 +99,7 @@ case "$FIRMWARE" in
ath10kcal_extract "caldata" 20480 2116
ath10kcal_patch_mac $(macaddr_add $(cat 
/sys/class/net/eth0/address) +1)
;;
+   gl-ar750s|\
gl-ar750|\
tl-wpa8630)
ath10kcal_extract "art" 20480 2116
diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh 
b/target/linux/ar71xx/base-files/lib/ar71xx.sh
index 42bd80d..74aa21b 100755
--- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
+++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh
@@ -727,6 +727,9 @@ ar71xx_board_detect() {
*"GL-AR750")
name="gl-ar750"
;;
+   *"GL-AR750S")
+   name="gl-ar750s"
+   ;;
*"GL-CONNECT INET v1")
name="gl-inet"
 
diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh 
b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
index 284582f..d0a3f30 100755
--- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
@@ -260,6 +260,7 @@ platform_check_image() {
gl-ar300m|\
gl-ar300|\
gl-ar750|\
+   gl-ar750s|\
gl-domino|\
gl-mifi|\
gl-usb150|\
diff --git a/target/linux/ar71xx/config-4.9 b/target/linux/ar71xx/config-4.9
index 35efd17..a453e10 100644
--- a/target/linux/ar71xx/config-4.9
+++ b/target/linux/ar71xx/config-4.9
@@ -120,6 +120,7 @@ CONFIG_ATH79=y
 # CONFIG_ATH79_MACH_GL_AR300 is not set
 # CONFIG_ATH79_MACH_GL_AR300M is not set
 # CONFIG_ATH79_MACH_GL_AR750 is not set
+# CONFIG_ATH79_MACH_GL_AR750S is not set
 # CONFIG_ATH79_MACH_GL_DOMINO is not set
 # CONFIG_ATH79_MACH_GL_INET is not set
 # CONFIG_ATH79_MACH_GL_MIFI is not set
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt 

Re: [OpenWrt-Devel] OpenWRT mtd tooling vs mtd-utils

2018-05-18 Thread David Oberhollenzer
Thanks for the clarification!

Just out of curiosity, is there a specific reason why OpenWRT uses its
own formatting utility here instead of using the tools from mtd-utils?


- Original Message -
From: "Jo-Philipp Wich" 
To: "David Oberhollenzer" , "Levente" 
, openwrt-devel@lists.openwrt.org
Cc: "richard" , "linux-mtd" 

Sent: Friday, May 18, 2018 12:26:48 PM
Subject: Re: [OpenWrt-Devel] OpenWRT mtd tooling vs mtd-utils

Hello David,

this was actually my fault. I didn't pay close attention and assumed the
code to be related to the kernel MTD subsystem. Only now after your mail
I realized that it affects the OpenWrt specific formatting utility.

I am very sorry for the confusion caused.


Kind regards,
Jo

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
http://lists.infradead.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH 2/2] wpad-mini: Enable 802.11r

2018-05-18 Thread David Woodhouse


On Fri, 2018-05-18 at 09:39 +0100, David Woodhouse wrote:
> With so many devices having dual 2.4GHz + 5GHz radios, this isn't a
> particularly esoteric use case any more. Luci offers it by default too,
> with no check for whether wpad is actually going to do it or not AFAICT.

I was wrong about luci; it *does* check, but the launch script still
puts the options in the wpad config file if they're in the uci config,
even when luci wasn't displaying them.

It's still a much more common thing than it used to be though, and
relatively small:

> On my test build the size increase is relatively modest:
>    text    data bss dec hex filename
>  425067    2704 356  428127   6885f wpad-mini
>  452003    2684 372  455059   6f193 wpad-mini+11r
>  717339    2796 588  720723   aff53 wpad-full
> 
> Let's just enable it by default.

I can get that down even further by turning on lto:

 437615    2496 372  440483   6b8a3 
wpad-mini-11r-lto

smime.p7s
Description: S/MIME cryptographic signature
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
http://lists.infradead.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] OpenWRT mtd tooling vs mtd-utils

2018-05-18 Thread Jo-Philipp Wich
Hello David,

this was actually my fault. I didn't pay close attention and assumed the
code to be related to the kernel MTD subsystem. Only now after your mail
I realized that it affects the OpenWrt specific formatting utility.

I am very sorry for the confusion caused.


Kind regards,
Jo

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
http://lists.infradead.org/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] OpenWRT mtd tooling vs mtd-utils

2018-05-18 Thread David Oberhollenzer
Hi all,

I'm the current maintainer of upstream mtd-utils. Earlier today, Levente tried 
to
submit a patch for a "package/system/mtd/src/jffs2.c" on the mtd mailing list:

http://lists.infradead.org/pipermail/linux-mtd/2018-May/081087.html


I took a brief look a the OpenWRT source tree and to me, this appears to be a 
home
grown utility of the OpenWRT project but then I came across this thread on the
OpenWRT mailing list, that explicitly asked to submit the patch to the mtd 
mailing
list:

http://lists.infradead.org/pipermail/openwrt-devel/2018-May/012314.html


Can somebody help clarifying the situation here? Does the OpenWRT actually have 
its
own mtd/ubi tooling? Was this extracted from the mkfs.jffs2 source code at some 
point
in the past (which would *maybe* make the patch relevant to mtd-utils)?


Thanks,

David

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
http://lists.infradead.org/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] Build failure ath10k-CT without mac80211 debug

2018-05-18 Thread Koen Vandeputte

Hi Ben,

I'm trying to build todays OpenWrt master with following options:
- ath10k-ct
- qca988x-ct-htt


When disabling this option (CONFIG_PACKAGE_MAC80211_DEBUGFS),  I'm 
getting the build errors below.


Is it *really* required to have this enabled for the driver to function 
properly?
Is there a possibility to disable the status counters updates below 
using an #ifdef or so when above option is disabled?


I want to disable all the internal mac80211 debug stuff in order to save 
precious cpu cycles (hardware: rb911G-5HPacD,  single core arm 600Mhz,  [1])



Thanks again,

Koen

[1] : https://mikrotik.com/product/RB911G-5HPacD



make[4]: Entering directory 
'/mnt/ramdisk/koen/firmware/builds/generic_rb912/build_dir/target-mips_24kc_musl/linux-ar71xx_mikrotik/linux-4.9.100'
  CC [M] 
/mnt/ramdisk/koen/firmware/builds/generic_rb912/build_dir/target-mips_24kc_musl/linux-ar71xx_mikrotik/ath10k-ct-2018-03-16-30827f7d/ath10k-4.13/htt_rx.o
In file included from 
/mnt/ramdisk/koen/firmware/builds/generic_rb912/build_dir/target-mips_24kc_musl/linux-ar71xx_mikrotik/ath10k-ct-2018-03-16-30827f7d/ath10k-4.13/core.h:32:0,
 from 
/mnt/ramdisk/koen/firmware/builds/generic_rb912/build_dir/target-mips_24kc_musl/linux-ar71xx_mikrotik/ath10k-ct-2018-03-16-30827f7d/ath10k-4.13/htt_rx.c:18:
/mnt/ramdisk/koen/firmware/builds/generic_rb912/build_dir/target-mips_24kc_musl/linux-ar71xx_mikrotik/ath10k-ct-2018-03-16-30827f7d/ath10k-4.13/wmi.h:7081:2: 
warning: #warning Please enable ATH10K-DEBUGFS kernel option for optimal 
support for CT firmware. [-Wcpp]
 #warning Please enable ATH10K-DEBUGFS kernel option for optimal 
support for CT firmware.

  ^~~
/mnt/ramdisk/koen/firmware/builds/generic_rb912/build_dir/target-mips_24kc_musl/linux-ar71xx_mikrotik/ath10k-ct-2018-03-16-30827f7d/ath10k-4.13/htt_rx.c: 
In function 'ath10k_unchain_msdu':
/mnt/ramdisk/koen/firmware/builds/generic_rb912/build_dir/target-mips_24kc_musl/linux-ar71xx_mikrotik/ath10k-ct-2018-03-16-30827f7d/ath10k-4.13/htt_rx.c:1561:5: 
error: 'struct ath10k' has no member named 'debug'

   ar->debug.rx_drop_unchain_oom++;
 ^~
/mnt/ramdisk/koen/firmware/builds/generic_rb912/build_dir/target-mips_24kc_musl/linux-ar71xx_mikrotik/ath10k-ct-2018-03-16-30827f7d/ath10k-4.13/htt_rx.c: 
In function 'ath10k_htt_rx_h_unchain':
/mnt/ramdisk/koen/firmware/builds/generic_rb912/build_dir/target-mips_24kc_musl/linux-ar71xx_mikrotik/ath10k-ct-2018-03-16-30827f7d/ath10k-4.13/htt_rx.c:1598:5: 
error: 'struct ath10k' has no member named 'debug'

   ar->debug.rx_drop_decap_non_raw_chained++;
 ^~
/mnt/ramdisk/koen/firmware/builds/generic_rb912/build_dir/target-mips_24kc_musl/linux-ar71xx_mikrotik/ath10k-ct-2018-03-16-30827f7d/ath10k-4.13/htt_rx.c: 
In function 'ath10k_htt_rx_amsdu_allowed':
/mnt/ramdisk/koen/firmware/builds/generic_rb912/build_dir/target-mips_24kc_musl/linux-ar71xx_mikrotik/ath10k-ct-2018-03-16-30827f7d/ath10k-4.13/htt_rx.c:1616:5: 
error: 'struct ath10k' has no member named 'debug'

   ar->debug.rx_drop_no_freq++;
 ^~
/mnt/ramdisk/koen/firmware/builds/generic_rb912/build_dir/target-mips_24kc_musl/linux-ar71xx_mikrotik/ath10k-ct-2018-03-16-30827f7d/ath10k-4.13/htt_rx.c:1622:5: 
error: 'struct ath10k' has no member named 'debug'

   ar->debug.rx_drop_cac_running++;
 ^~
scripts/Makefile.build:293: recipe for target 
'/mnt/ramdisk/koen/firmware/builds/generic_rb912/build_dir/target-mips_24kc_musl/linux-ar71xx_mikrotik/ath10k-ct-2018-03-16-30827f7d/ath10k-4.13/htt_rx.o' 
failed
make[5]: *** 
[/mnt/ramdisk/koen/firmware/builds/generic_rb912/build_dir/target-mips_24kc_musl/linux-ar71xx_mikrotik/ath10k-ct-2018-03-16-30827f7d/ath10k-4.13/htt_rx.o] 
Error 1
Makefile:1506: recipe for target 
'_module_/mnt/ramdisk/koen/firmware/builds/generic_rb912/build_dir/target-mips_24kc_musl/linux-ar71xx_mikrotik/ath10k-ct-2018-03-16-30827f7d/ath10k-4.13' 
failed
make[4]: *** 
[_module_/mnt/ramdisk/koen/firmware/builds/generic_rb912/build_dir/target-mips_24kc_musl/linux-ar71xx_mikrotik/ath10k-ct-2018-03-16-30827f7d/ath10k-4.13] 
Error 2
make[4]: Leaving directory 
'/mnt/ramdisk/koen/firmware/builds/generic_rb912/build_dir/target-mips_24kc_musl/linux-ar71xx_mikrotik/linux-4.9.100'
Makefile:96: recipe for target 
'/mnt/ramdisk/koen/firmware/builds/generic_rb912/build_dir/target-mips_24kc_musl/linux-ar71xx_mikrotik/ath10k-ct-2018-03-16-30827f7d/.built' 
failed
make[3]: *** 
[/mnt/ramdisk/koen/firmware/builds/generic_rb912/build_dir/target-mips_24kc_musl/linux-ar71xx_mikrotik/ath10k-ct-2018-03-16-30827f7d/.built] 
Error 2
make[3]: Leaving directory 
'/mnt/ramdisk/koen/firmware/builds/generic_rb912/package/kernel/ath10k-ct'

Command exited with non-zero status 2
time: package/kernel/ath10k-ct/compile#0.73#0.24#1.55
package/Makefile:107: recipe for target 
'package/kernel/ath10k-ct/compile' failed

make[2]: *** [package/kernel/ath10k-ct/compile] Error 2
make[2]: Leaving directory '/mnt/ramdisk/koen/firmware/builds/generic_rb912'
package/Makefile:103: recipe for 

[OpenWrt-Devel] [PATCH 2/2] wpad-mini: Enable 802.11r

2018-05-18 Thread David Woodhouse
With so many devices having dual 2.4GHz + 5GHz radios, this isn't a
particularly esoteric use case any more. Luci offers it by default too,
with no check for whether wpad is actually going to do it or not AFAICT.

On my test build the size increase is relatively modest:
   textdata bss dec hex filename
 4250672704 356  428127   6885f wpad-mini
 4520032684 372  455059   6f193 wpad-mini+11r
 7173392796 588  720723   aff53 wpad-full

Let's just enable it by default.

Signed-off-by: David Woodhouse 
---
 package/network/services/hostapd/files/hostapd-mini.config | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/package/network/services/hostapd/files/hostapd-mini.config 
b/package/network/services/hostapd/files/hostapd-mini.config
index 661983a94b..b15116fbbe 100644
--- a/package/network/services/hostapd/files/hostapd-mini.config
+++ b/package/network/services/hostapd/files/hostapd-mini.config
@@ -142,7 +142,7 @@ CONFIG_PEERKEY=y
 #CONFIG_IPV6=y
 
 # IEEE Std 802.11r-2008 (Fast BSS Transition)
-#CONFIG_IEEE80211R=y
+CONFIG_IEEE80211R=y
 
 # Use the hostapd's IEEE 802.11 authentication (ACL), but without
 # the IEEE 802.11 Management capability (e.g., FreeBSD/net80211)
-- 
2.17.0


___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
http://lists.infradead.org/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 1/2] hostapd: fix IEEE 802.11r (fast roaming) defaults

2018-05-18 Thread David Woodhouse
From: devianceluka 

Use ft_psk_generate_local=1 by default, as it makes everything else fairly
trivial. All of the r0kh/r1kh and key management stuff goes away and hostapd
fairly much does it all for us.

We do need to provide nas_identifier, which can be derived from the BSSID,
and we need to generate a mobility_domain, for which we default to the first
four chars of the md5sum of the SSID.

The complex manual setup should also still work, but the defaults also
now work easily out of the box. Verified by manually running hostapd
(with the autogenerated config) and watching the debug output:

wlan2: STA ac:37:43:a0:a6:ae WPA: FT authentication already completed - do not 
start 4-way handshake

 This was previous submitted to LEDE in
 https://github.com/lede-project/source/pull/1382

[dwmw2: Rewrote commit message]
Signed-off-by: Gospod Nassa 
Signed-off-by: David Woodhouse 
---
 .../network/services/hostapd/files/hostapd.sh | 48 +++
 1 file changed, 27 insertions(+), 21 deletions(-)

diff --git a/package/network/services/hostapd/files/hostapd.sh 
b/package/network/services/hostapd/files/hostapd.sh
index 520da5b159..4deb0b97ae 100644
--- a/package/network/services/hostapd/files/hostapd.sh
+++ b/package/network/services/hostapd/files/hostapd.sh
@@ -422,32 +422,38 @@ hostapd_set_bss_options() {
set_default ieee80211r 0
 
if [ "$ieee80211r" -gt "0" ]; then
-   json_get_vars mobility_domain r0_key_lifetime 
r1_key_holder \
-   reassociation_deadline pmk_r1_push 
ft_psk_generate_local ft_over_ds
-   json_get_values r0kh r0kh
-   json_get_values r1kh r1kh
-
-   set_default mobility_domain "4f57"
-   set_default r0_key_lifetime 1
-   set_default reassociation_deadline 1000
-   set_default pmk_r1_push 0
-   set_default ft_psk_generate_local 0
+   json_get_vars mobility_domain ft_psk_generate_local 
ft_over_ds reassociation_deadline
+   
+   set_default mobility_domain "$(echo "$ssid" | md5sum | 
head -c 4)"
+   set_default ft_psk_generate_local 1
set_default ft_over_ds 1
+   set_default reassociation_deadline 1000
 
append bss_conf "mobility_domain=$mobility_domain" "$N"
-   append bss_conf "r0_key_lifetime=$r0_key_lifetime" "$N"
-   [ -n "$r1_key_holder" ] && append bss_conf 
"r1_key_holder=$r1_key_holder" "$N"
-   append bss_conf 
"reassociation_deadline=$reassociation_deadline" "$N"
-   append bss_conf "pmk_r1_push=$pmk_r1_push" "$N"
append bss_conf 
"ft_psk_generate_local=$ft_psk_generate_local" "$N"
append bss_conf "ft_over_ds=$ft_over_ds" "$N"
-
-   for kh in $r0kh; do
-   append bss_conf "r0kh=${kh//,/ }" "$N"
-   done
-   for kh in $r1kh; do
-   append bss_conf "r1kh=${kh//,/ }" "$N"
-   done
+   append bss_conf 
"reassociation_deadline=$reassociation_deadline" "$N"
+   [ -n "$nasid" ] || append bss_conf 
"nas_identifier=${macaddr//\:}" "$N"
+
+   if [ "$ft_psk_generate_local" -eq "0" ]; then
+   json_get_vars r0_key_lifetime r1_key_holder 
pmk_r1_push
+   json_get_values r0kh r0kh
+   json_get_values r1kh r1kh
+
+   set_default r0_key_lifetime 1
+   set_default pmk_r1_push 0
+
+   [ -n "$r1_key_holder" ] && append bss_conf 
"r1_key_holder=$r1_key_holder" "$N"
+   append bss_conf 
"r0_key_lifetime=$r0_key_lifetime" "$N"
+   append bss_conf "pmk_r1_push=$pmk_r1_push" "$N"
+
+   for kh in $r0kh; do
+   append bss_conf "r0kh=${kh//,/ }" "$N"
+   done
+   for kh in $r1kh; do
+   append bss_conf "r1kh=${kh//,/ }" "$N"
+   done
+   fi
fi
 
append bss_conf 
"wpa_disable_eapol_key_retries=$wpa_disable_eapol_key_retries" "$N"
-- 
2.17.0


___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
http://lists.infradead.org/mailman/listinfo/openwrt-devel