Re: [OpenWrt-Devel] [RFC 0/4] Add support for Raspberry Pi 3

2016-06-17 Thread Steve Elliott
Has this branch been deleted?

Has someone else picked it up?

How can I pull the updates?

Steve
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] Mirroring OpenWRT at MIT

2016-06-17 Thread Madars Virza
Dear openwrt-devel,

I'm with MIT SIPB, the student computing club of Massachusetts Institute
of Technology (https://sipb.mit.edu/). As one of our projects, we
maintain high-speed mirrors for open source projects --
http://mirrors.mit.edu/ .

I'm writing you because we'd like to start mirroring OpenWRT.

Is there an official rsync upstream we could use for this?
downloads.openwrt.org only seems to be accessible over https. If needed
for your firewalls, we can guarantee a static IP for all of our
mirroring activity.

Thank you,

Madars Virza
MIT SIPB

P.S. We previously sent some other emails, but got no responses; please
let us know if there's a more appropriate list to contact :-)
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] Support for callable metatable for ubus-lua

2016-06-17 Thread Anton D . Kachalov
Hello.

I'm newbie in Lua and tries to expose several objects' methods to ubus. In 
current implementation only function is allowed as methods, but I need to pass 
objects to such functions. Here is the snippet:


local uci = require "uci"
local ubus = require "ubus"
local uloop = require "uloop"

local x = uci.cursor()

uloop.init()

local conn = ubus.connect()
if not conn then
error("Failed to connect to ubus")
end

local SDRs = { }

for s,e in pairs(x:get_all('SDR')) do
print(' '..s..' ')
local t = e['.type']

local klass = require ("sdr."..t)
local obj = klass:new(e, true)

SDRs['SDR.'..e['.name']] = obj:ubus_methods(conn)
end

conn:add(SDRs)

uloop.run()
=

The klass method ubus_methods returns:

=
function _M.ubus_methods(self, conn)
local _g = setmetatable({_o = self, _conn = conn}, {
__call = function(tbl, req, msg)
tbl._conn:reply(req, { rpm = tbl._o:get() })
end})

local _s = setmetatable({_o = self, _conn = conn}, {
__call = function(tbl, req, msg)
tbl._conn:reply(req, { status = tbl._o:set(tonumber(msg['duty'])) })
end})

local _f = setmetatable({_o = self, _conn = conn}, {
__call = function(tbl, req, msg)
tbl._conn:reply(req, { status=tbl._o:fanmap() })
end})

return {
get = { _g, { } },
set = { _s, { duty = ubus.INT32 } },
fanmap = { _f, { } }
}
end
=

So, I wrote a little patch to add additional check for "__call" metamethod to 
make it possible.

BTW. There is no code to check signatures (policy) of methods for Lua code.

-- 
Anton D. Kachalov--- ubus/lua/ubus.c.orig	2016-05-24 20:00:49.0 +0300
+++ ubus/lua/ubus.c	2016-06-16 17:22:31.986092619 +0300
@@ -293,7 +293,7 @@ ubus_method_handler(struct ubus_context
 	lua_remove(state, -2);
 	lua_remove(state, -2);
 
-	if (lua_isfunction(state, -1)) {
+	if (lua_isfunction(state, -1) || lua_istable(state, -1)) {
 		lua_pushlightuserdata(state, req);
 		if (!msg)
 			lua_pushnil(state);
@@ -359,13 +359,29 @@ static int ubus_lua_load_methods(lua_Sta
 	lua_gettable(L, -3);
 
 	/* check if the method table is valid */
-	if ((lua_type(L, -2) != LUA_TFUNCTION) ||
+	if (((lua_type(L, -2) != LUA_TFUNCTION) && (lua_type(L, -2) != LUA_TTABLE)) ||
 			(lua_type(L, -1) != LUA_TTABLE) ||
 			lua_objlen(L, -1)) {
 		lua_pop(L, 2);
 		return 1;
 	}
 
+	if (lua_type(L, -2) == LUA_TTABLE) {
+		/* check for metatable */
+		if (lua_getmetatable(L, -2) == 0) {
+			lua_pop(L, 2);
+			return 1;
+		}
+		lua_pushstring(L, "__call");
+		lua_rawget(L, -2);
+		lua_replace(L, -2);
+		if (lua_isnil(L, -1)) {
+			lua_pop(L, 6);
+			return 1;
+		}
+		lua_pop(L, 1);
+	}
+
 	/* store function pointer */
 	lua_pushvalue(L, -2);
 	lua_setfield(L, -6, lua_tostring(L, -5));
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] (no subject)

2016-06-17 Thread Yousong Zhou
On 14 June 2016 at 06:04, Jerome  wrote:
> To: openwrt-devel@lists.openwrt.org
> From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Poulin?= 
> Date: Mon, 13 Jun 2016 17:47:50 -0400
> Subject: [PATCH] micropython-lib: fix make install seldom fail
>
> - Since make install path was hardcoded inside the build dir, it can sometime
>   fail with cp indicating that source and destination are the same since make
>   install will copy all py file in build dir to install dir. In this case,
>   install dir is in build dir causing a loop.
> ---
>  lang/micropython-lib/Makefile | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
>

Hi, Jerome

micropython-lib is maintained in packages feed hosted in github.
Please open a pr there with a signed-off-by line in the commit message
body [2].

 [1] https://github.com/openwrt/packages
 [2] 
https://github.com/openwrt/packages/blob/master/CONTRIBUTING.md#commits-in-your-pull-requests-should

Cheers,
yousong

> diff --git a/lang/micropython-lib/Makefile b/lang/micropython-lib/Makefile
> index b8af737..aefb8f4 100644
> --- a/lang/micropython-lib/Makefile
> +++ b/lang/micropython-lib/Makefile
> @@ -22,6 +22,7 @@ PKG_SOURCE_VERSION:=bfbbf85a181d84e2494ea6f15be311734666bf67
>  PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION)
>  PKG_SOURCE:=$(PKG_SOURCE_SUBDIR).tar.gz
>  PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_SOURCE_SUBDIR)
> +PKG_INSTALL_DIR:=$(BUILD_DIR)/_install_tmp
>  PKG_BUILD_PARALLEL:=1
>
>  include $(INCLUDE_DIR)/package.mk
> @@ -43,12 +44,12 @@ endef
>
>  MAKE_FLAGS:=\
> -C $(PKG_BUILD_DIR) \
> -   PREFIX=$(PKG_BUILD_DIR)/_install_tmp \
> +   PREFIX=$(PKG_INSTALL_DIR) \
> install
>
>  define Package/micropython-lib/install
> $(INSTALL_DIR) $(1)/usr/lib/micropython
> -   $(CP) $(PKG_BUILD_DIR)/_install_tmp/* $(1)/usr/lib/micropython
> +   $(CP) $(PKG_INSTALL_DIR)/* $(1)/usr/lib/micropython
>  endef
>
>  $(eval $(call BuildPackage,micropython-lib))
> --
> 2.7.4
> ___
> openwrt-devel mailing list
> openwrt-devel@lists.openwrt.org
> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH] [ar71xx] wdr4300: Fixed default VLAN order

2016-06-17 Thread David Pinilla Caparrós
Reordered the VLANs so the LAN ports are set to VLAN 1 and the WAN
port is set to VLAN 2, as in the other routers in the config file.
Moreover, this model had this VLAN mapping in OpenWRT Chaos Calmer. It
seems that the VLAN were switched when fixing a bug in the port mapping
( OpenWRT changeset 47799 )

Signed-off-by: David Pinilla Caparrós dpini...@gmail.com



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 67adf33..04cb3be 100755
--- a/target/linux/ar71xx/base-files/etc/board.d/02_network
+++ b/target/linux/ar71xx/base-files/etc/board.d/02_network
@@ -200,7 +200,7 @@ tellstick-znet-lite)
 tl-wdr4300|\
 tl-wr1041n-v2)
ucidef_add_switch "switch0" \
-   "0@eth0" "1:wan" "2:lan:1" "3:lan:2" "4:lan:3" "5:lan:4"
+   "0@eth0" "2:lan:1" "3:lan:2" "4:lan:3" "5:lan:4" "1:wan"
;;

 tl-wr1043nd)
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH CC 13/13] ar71xx: add MR1750v2 to the MR1750 profile

2016-06-17 Thread Sven Eckelmann
Signed-off-by: Sven Eckelmann 
---
Based on following CC backports from 2016-05-19:

 * https://patchwork.ozlabs.org/patch/624172/
 * https://patchwork.ozlabs.org/patch/624173/
 * https://patchwork.ozlabs.org/patch/624174/
 * https://patchwork.ozlabs.org/patch/624175/
 * https://patchwork.ozlabs.org/patch/624176/
 * https://patchwork.ozlabs.org/patch/624177/
 * https://patchwork.ozlabs.org/patch/624178/
 * https://patchwork.ozlabs.org/patch/624179/
 * https://patchwork.ozlabs.org/patch/624180/
 * https://patchwork.ozlabs.org/patch/624181/
 * https://patchwork.ozlabs.org/patch/624182/
 * https://patchwork.ozlabs.org/patch/624183/
 * https://patchwork.ozlabs.org/patch/624184/
 * https://patchwork.ozlabs.org/patch/624185/
 * https://patchwork.ozlabs.org/patch/624186/
 * https://patchwork.ozlabs.org/patch/624187/
 * https://patchwork.ozlabs.org/patch/624188/
 * https://patchwork.ozlabs.org/patch/624189/
 * https://patchwork.ozlabs.org/patch/624190/
 * https://patchwork.ozlabs.org/patch/624191/
 * https://patchwork.ozlabs.org/patch/624192/
 * https://patchwork.ozlabs.org/patch/624193/
 * https://patchwork.ozlabs.org/patch/624194/
 * https://patchwork.ozlabs.org/patch/624195/
 * https://patchwork.ozlabs.org/patch/624196/
 * https://patchwork.ozlabs.org/patch/624197/
 * https://patchwork.ozlabs.org/patch/624198/
 * https://patchwork.ozlabs.org/patch/624199/
 * https://patchwork.ozlabs.org/patch/624200/
 * https://patchwork.ozlabs.org/patch/624201/
 * https://patchwork.ozlabs.org/patch/624202/
 * https://patchwork.ozlabs.org/patch/624203/
 * https://patchwork.ozlabs.org/patch/624200/
 * https://patchwork.ozlabs.org/patch/624205/

It is a backport of the patch for trunk from 2016-05-20 which waits to be
accepted as well:

 * https://patchwork.ozlabs.org/patch/624548/

 target/linux/ar71xx/generic/profiles/openmesh.mk | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/target/linux/ar71xx/generic/profiles/openmesh.mk 
b/target/linux/ar71xx/generic/profiles/openmesh.mk
index ddd3f8d..e245e6c 100644
--- a/target/linux/ar71xx/generic/profiles/openmesh.mk
+++ b/target/linux/ar71xx/generic/profiles/openmesh.mk
@@ -61,12 +61,12 @@ endef
 $(eval $(call Profile,MR900))
 
 define Profile/MR1750
-NAME:=OpenMesh MR1750
+NAME:=OpenMesh MR1750/MR1750v2
 PACKAGES:=kmod-ath9k kmod-ath10k ath10k-firmware-qca988x
 endef
 
 define Profile/MR1750/Description
-Package set optimized for the OpenMesh MR1750.
+Package set optimized for the OpenMesh MR1750/MR1750v2.
 endef
 
 $(eval $(call Profile,MR1750))
-- 
2.8.1
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH CC 11/13] package/uboot-envtools: add OpenMesh MR1750v2 support

2016-06-17 Thread Sven Eckelmann
Signed-off-by: Sven Eckelmann 
---
Based on following CC backports from 2016-05-19:

 * https://patchwork.ozlabs.org/patch/624172/
 * https://patchwork.ozlabs.org/patch/624173/
 * https://patchwork.ozlabs.org/patch/624174/
 * https://patchwork.ozlabs.org/patch/624175/
 * https://patchwork.ozlabs.org/patch/624176/
 * https://patchwork.ozlabs.org/patch/624177/
 * https://patchwork.ozlabs.org/patch/624178/
 * https://patchwork.ozlabs.org/patch/624179/
 * https://patchwork.ozlabs.org/patch/624180/
 * https://patchwork.ozlabs.org/patch/624181/
 * https://patchwork.ozlabs.org/patch/624182/
 * https://patchwork.ozlabs.org/patch/624183/
 * https://patchwork.ozlabs.org/patch/624184/
 * https://patchwork.ozlabs.org/patch/624185/
 * https://patchwork.ozlabs.org/patch/624186/
 * https://patchwork.ozlabs.org/patch/624187/
 * https://patchwork.ozlabs.org/patch/624188/
 * https://patchwork.ozlabs.org/patch/624189/
 * https://patchwork.ozlabs.org/patch/624190/
 * https://patchwork.ozlabs.org/patch/624191/
 * https://patchwork.ozlabs.org/patch/624192/
 * https://patchwork.ozlabs.org/patch/624193/
 * https://patchwork.ozlabs.org/patch/624194/
 * https://patchwork.ozlabs.org/patch/624195/
 * https://patchwork.ozlabs.org/patch/624196/
 * https://patchwork.ozlabs.org/patch/624197/
 * https://patchwork.ozlabs.org/patch/624198/
 * https://patchwork.ozlabs.org/patch/624199/
 * https://patchwork.ozlabs.org/patch/624200/
 * https://patchwork.ozlabs.org/patch/624201/
 * https://patchwork.ozlabs.org/patch/624202/
 * https://patchwork.ozlabs.org/patch/624203/
 * https://patchwork.ozlabs.org/patch/624200/
 * https://patchwork.ozlabs.org/patch/624205/

It is a backport of the patch for trunk from 2016-05-20 which waits to be
accepted as well:

 * https://patchwork.ozlabs.org/patch/624546/

 package/boot/uboot-envtools/files/ar71xx | 1 +
 1 file changed, 1 insertion(+)

diff --git a/package/boot/uboot-envtools/files/ar71xx 
b/package/boot/uboot-envtools/files/ar71xx
index 81c6481..459e73d 100644
--- a/package/boot/uboot-envtools/files/ar71xx
+++ b/package/boot/uboot-envtools/files/ar71xx
@@ -22,6 +22,7 @@ eap300v2 | \
 hornet-ub | \
 hornet-ub-x2 | \
 mr1750 | \
+mr1750v2 | \
 mr600 | \
 mr600v2 | \
 mr900 | \
-- 
2.8.1
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH CC 12/13] ar71xx: extract ath10k wifi board.bin for the OpenMesh MR1750v2 board

2016-06-17 Thread Sven Eckelmann
Signed-off-by: Sven Eckelmann 
---
Based on following CC backports from 2016-05-19:

 * https://patchwork.ozlabs.org/patch/624172/
 * https://patchwork.ozlabs.org/patch/624173/
 * https://patchwork.ozlabs.org/patch/624174/
 * https://patchwork.ozlabs.org/patch/624175/
 * https://patchwork.ozlabs.org/patch/624176/
 * https://patchwork.ozlabs.org/patch/624177/
 * https://patchwork.ozlabs.org/patch/624178/
 * https://patchwork.ozlabs.org/patch/624179/
 * https://patchwork.ozlabs.org/patch/624180/
 * https://patchwork.ozlabs.org/patch/624181/
 * https://patchwork.ozlabs.org/patch/624182/
 * https://patchwork.ozlabs.org/patch/624183/
 * https://patchwork.ozlabs.org/patch/624184/
 * https://patchwork.ozlabs.org/patch/624185/
 * https://patchwork.ozlabs.org/patch/624186/
 * https://patchwork.ozlabs.org/patch/624187/
 * https://patchwork.ozlabs.org/patch/624188/
 * https://patchwork.ozlabs.org/patch/624189/
 * https://patchwork.ozlabs.org/patch/624190/
 * https://patchwork.ozlabs.org/patch/624191/
 * https://patchwork.ozlabs.org/patch/624192/
 * https://patchwork.ozlabs.org/patch/624193/
 * https://patchwork.ozlabs.org/patch/624194/
 * https://patchwork.ozlabs.org/patch/624195/
 * https://patchwork.ozlabs.org/patch/624196/
 * https://patchwork.ozlabs.org/patch/624197/
 * https://patchwork.ozlabs.org/patch/624198/
 * https://patchwork.ozlabs.org/patch/624199/
 * https://patchwork.ozlabs.org/patch/624200/
 * https://patchwork.ozlabs.org/patch/624201/
 * https://patchwork.ozlabs.org/patch/624202/
 * https://patchwork.ozlabs.org/patch/624203/
 * https://patchwork.ozlabs.org/patch/624200/
 * https://patchwork.ozlabs.org/patch/624205/

It is a backport of the patch for trunk from 2016-05-20 which waits to be
accepted as well:

 * https://patchwork.ozlabs.org/patch/624547/

 target/linux/ar71xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata | 1 +
 1 file changed, 1 insertion(+)

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 8fc3ab3..f01c6d3 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
@@ -72,6 +72,7 @@ case "$FIRMWARE" in
ath10kcal_patch_mac $(macaddr_add $(cat 
/sys/class/net/eth0/address) +1)
;;
mr1750 | \
+   mr1750v2 | \
om5p-acv2)
ath10kcal_extract "ART" 20480 2116
ath10kcal_patch_mac $(macaddr_add $(cat 
/sys/class/net/eth0/address) +16)
-- 
2.8.1
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH CC 10/13] package/om-watchdog: add OpenMesh MR1750v2 support

2016-06-17 Thread Sven Eckelmann
Signed-off-by: Sven Eckelmann 
---
Based on following CC backports from 2016-05-19:

 * https://patchwork.ozlabs.org/patch/624172/
 * https://patchwork.ozlabs.org/patch/624173/
 * https://patchwork.ozlabs.org/patch/624174/
 * https://patchwork.ozlabs.org/patch/624175/
 * https://patchwork.ozlabs.org/patch/624176/
 * https://patchwork.ozlabs.org/patch/624177/
 * https://patchwork.ozlabs.org/patch/624178/
 * https://patchwork.ozlabs.org/patch/624179/
 * https://patchwork.ozlabs.org/patch/624180/
 * https://patchwork.ozlabs.org/patch/624181/
 * https://patchwork.ozlabs.org/patch/624182/
 * https://patchwork.ozlabs.org/patch/624183/
 * https://patchwork.ozlabs.org/patch/624184/
 * https://patchwork.ozlabs.org/patch/624185/
 * https://patchwork.ozlabs.org/patch/624186/
 * https://patchwork.ozlabs.org/patch/624187/
 * https://patchwork.ozlabs.org/patch/624188/
 * https://patchwork.ozlabs.org/patch/624189/
 * https://patchwork.ozlabs.org/patch/624190/
 * https://patchwork.ozlabs.org/patch/624191/
 * https://patchwork.ozlabs.org/patch/624192/
 * https://patchwork.ozlabs.org/patch/624193/
 * https://patchwork.ozlabs.org/patch/624194/
 * https://patchwork.ozlabs.org/patch/624195/
 * https://patchwork.ozlabs.org/patch/624196/
 * https://patchwork.ozlabs.org/patch/624197/
 * https://patchwork.ozlabs.org/patch/624198/
 * https://patchwork.ozlabs.org/patch/624199/
 * https://patchwork.ozlabs.org/patch/624200/
 * https://patchwork.ozlabs.org/patch/624201/
 * https://patchwork.ozlabs.org/patch/624202/
 * https://patchwork.ozlabs.org/patch/624203/
 * https://patchwork.ozlabs.org/patch/624200/
 * https://patchwork.ozlabs.org/patch/624205/

It is a backport of the patch for trunk from 2016-05-20 which waits to be
accepted as well:

 * https://patchwork.ozlabs.org/patch/624545/

 package/kernel/om-watchdog/files/om-watchdog.init | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/package/kernel/om-watchdog/files/om-watchdog.init 
b/package/kernel/om-watchdog/files/om-watchdog.init
index bf8a124..8a1b66e 100644
--- a/package/kernel/om-watchdog/files/om-watchdog.init
+++ b/package/kernel/om-watchdog/files/om-watchdog.init
@@ -28,7 +28,7 @@ boot() {
"mr600v2")
service_start /sbin/om-watchdog 15
;;
-   "mr900"|"mr900v2"|"mr1750")
+   "mr900"|"mr900v2"|"mr1750"|"mr1750v2")
service_start /sbin/om-watchdog 16
;;
esac
-- 
2.8.1
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH CC 09/13] ar71xx: enable sysupgrade for the OpenMesh MR1750v2

2016-06-17 Thread Sven Eckelmann
Signed-off-by: Sven Eckelmann 
---
Based on following CC backports from 2016-05-19:

 * https://patchwork.ozlabs.org/patch/624172/
 * https://patchwork.ozlabs.org/patch/624173/
 * https://patchwork.ozlabs.org/patch/624174/
 * https://patchwork.ozlabs.org/patch/624175/
 * https://patchwork.ozlabs.org/patch/624176/
 * https://patchwork.ozlabs.org/patch/624177/
 * https://patchwork.ozlabs.org/patch/624178/
 * https://patchwork.ozlabs.org/patch/624179/
 * https://patchwork.ozlabs.org/patch/624180/
 * https://patchwork.ozlabs.org/patch/624181/
 * https://patchwork.ozlabs.org/patch/624182/
 * https://patchwork.ozlabs.org/patch/624183/
 * https://patchwork.ozlabs.org/patch/624184/
 * https://patchwork.ozlabs.org/patch/624185/
 * https://patchwork.ozlabs.org/patch/624186/
 * https://patchwork.ozlabs.org/patch/624187/
 * https://patchwork.ozlabs.org/patch/624188/
 * https://patchwork.ozlabs.org/patch/624189/
 * https://patchwork.ozlabs.org/patch/624190/
 * https://patchwork.ozlabs.org/patch/624191/
 * https://patchwork.ozlabs.org/patch/624192/
 * https://patchwork.ozlabs.org/patch/624193/
 * https://patchwork.ozlabs.org/patch/624194/
 * https://patchwork.ozlabs.org/patch/624195/
 * https://patchwork.ozlabs.org/patch/624196/
 * https://patchwork.ozlabs.org/patch/624197/
 * https://patchwork.ozlabs.org/patch/624198/
 * https://patchwork.ozlabs.org/patch/624199/
 * https://patchwork.ozlabs.org/patch/624200/
 * https://patchwork.ozlabs.org/patch/624201/
 * https://patchwork.ozlabs.org/patch/624202/
 * https://patchwork.ozlabs.org/patch/624203/
 * https://patchwork.ozlabs.org/patch/624200/
 * https://patchwork.ozlabs.org/patch/624205/

It is a backport of the patch for trunk from 2016-05-20 which waits to be
accepted as well:

 * https://patchwork.ozlabs.org/patch/624544/

 target/linux/ar71xx/base-files/lib/upgrade/openmesh.sh | 1 +
 target/linux/ar71xx/base-files/lib/upgrade/platform.sh | 2 ++
 2 files changed, 3 insertions(+)

diff --git a/target/linux/ar71xx/base-files/lib/upgrade/openmesh.sh 
b/target/linux/ar71xx/base-files/lib/upgrade/openmesh.sh
index 0e8ea27..95d39bf 100644
--- a/target/linux/ar71xx/base-files/lib/upgrade/openmesh.sh
+++ b/target/linux/ar71xx/base-files/lib/upgrade/openmesh.sh
@@ -81,6 +81,7 @@ platform_check_image_openmesh()
;;
MR1750)
[ "$board" = "mr1750" ] && break
+   [ "$board" = "mr1750v2" ] && break
echo "Invalid image board target ($img_board_target) 
for this platform: $board. Use the correct image for this platform"
return 1
;;
diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh 
b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
index 4fb5b34..bf53169 100755
--- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
@@ -291,6 +291,7 @@ platform_check_image() {
return 0;
;;
mr1750 | \
+   mr1750v2 | \
mr600 | \
mr600v2 | \
mr900 | \
@@ -523,6 +524,7 @@ platform_do_upgrade() {
platform_do_upgrade_dir825b "$ARGV"
;;
mr1750 | \
+   mr1750v2 | \
mr600 | \
mr600v2 | \
mr900 | \
-- 
2.8.1
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH CC 08/13] ar71xx: add user-space support for the OpenMesh MR1750v2

2016-06-17 Thread Sven Eckelmann
Signed-off-by: Sven Eckelmann 
---
Based on following CC backports from 2016-05-19:

 * https://patchwork.ozlabs.org/patch/624172/
 * https://patchwork.ozlabs.org/patch/624173/
 * https://patchwork.ozlabs.org/patch/624174/
 * https://patchwork.ozlabs.org/patch/624175/
 * https://patchwork.ozlabs.org/patch/624176/
 * https://patchwork.ozlabs.org/patch/624177/
 * https://patchwork.ozlabs.org/patch/624178/
 * https://patchwork.ozlabs.org/patch/624179/
 * https://patchwork.ozlabs.org/patch/624180/
 * https://patchwork.ozlabs.org/patch/624181/
 * https://patchwork.ozlabs.org/patch/624182/
 * https://patchwork.ozlabs.org/patch/624183/
 * https://patchwork.ozlabs.org/patch/624184/
 * https://patchwork.ozlabs.org/patch/624185/
 * https://patchwork.ozlabs.org/patch/624186/
 * https://patchwork.ozlabs.org/patch/624187/
 * https://patchwork.ozlabs.org/patch/624188/
 * https://patchwork.ozlabs.org/patch/624189/
 * https://patchwork.ozlabs.org/patch/624190/
 * https://patchwork.ozlabs.org/patch/624191/
 * https://patchwork.ozlabs.org/patch/624192/
 * https://patchwork.ozlabs.org/patch/624193/
 * https://patchwork.ozlabs.org/patch/624194/
 * https://patchwork.ozlabs.org/patch/624195/
 * https://patchwork.ozlabs.org/patch/624196/
 * https://patchwork.ozlabs.org/patch/624197/
 * https://patchwork.ozlabs.org/patch/624198/
 * https://patchwork.ozlabs.org/patch/624199/
 * https://patchwork.ozlabs.org/patch/624200/
 * https://patchwork.ozlabs.org/patch/624201/
 * https://patchwork.ozlabs.org/patch/624202/
 * https://patchwork.ozlabs.org/patch/624203/
 * https://patchwork.ozlabs.org/patch/624200/
 * https://patchwork.ozlabs.org/patch/624205/

It is a backport of the patch for trunk from 2016-05-20 which waits to be
accepted as well:

 * https://patchwork.ozlabs.org/patch/624543/

 target/linux/ar71xx/base-files/etc/diag.sh | 3 ++-
 target/linux/ar71xx/base-files/etc/uci-defaults/01_leds| 3 ++-
 target/linux/ar71xx/base-files/etc/uci-defaults/02_network | 1 +
 target/linux/ar71xx/base-files/lib/ar71xx.sh   | 3 +++
 4 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/target/linux/ar71xx/base-files/etc/diag.sh 
b/target/linux/ar71xx/base-files/etc/diag.sh
index 9a6b4cf..c5e39d0 100644
--- a/target/linux/ar71xx/base-files/etc/diag.sh
+++ b/target/linux/ar71xx/base-files/etc/diag.sh
@@ -143,7 +143,8 @@ get_status_led() {
mr600v2)
status_led="mr600:blue:power"
;;
-   mr1750)
+   mr1750 | \
+   mr1750v2)
status_led="mr1750:blue:power"
;;
mr900 | \
diff --git a/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds 
b/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
index d297266..d7dc9a1 100644
--- a/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
+++ b/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
@@ -239,7 +239,8 @@ mr600)
ucidef_set_led_wlan "wlan58" "WLAN58" "mr600:green:wlan58" "phy0tpt"
;;
 
-mr1750)
+mr1750 | \
+mr1750v2)
ucidef_set_led_netdev "lan" "LAN" "mr1750:blue:wan" "eth0"
ucidef_set_led_wlan "wlan58" "WLAN58" "mr1750:blue:wlan58" "phy0tpt"
ucidef_set_led_wlan "wlan24" "WLAN24" "mr1750:blue:wlan24" "phy1tpt"
diff --git a/target/linux/ar71xx/base-files/etc/uci-defaults/02_network 
b/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
index 49e491f..b2b182e 100755
--- a/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
+++ b/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
@@ -335,6 +335,7 @@ eap7660d |\
 el-mini |\
 loco-m-xw |\
 mr1750 |\
+mr1750v2 |\
 mr600 |\
 mr600v2 |\
 mr900 |\
diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh 
b/target/linux/ar71xx/base-files/lib/ar71xx.sh
index 230df0b..2f4b112 100755
--- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
+++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh
@@ -521,6 +521,9 @@ ar71xx_board_detect() {
*MR1750)
name="mr1750"
;;
+   *MR1750v2)
+   name="mr1750v2"
+   ;;
*MR600)
name="mr600"
;;
-- 
2.8.1
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH CC 07/13] ar71xx: add kernel support for the OpenMesh MR1750v2

2016-06-17 Thread Sven Eckelmann
Signed-off-by: Sven Eckelmann 
---
Based on following CC backports from 2016-05-19:

 * https://patchwork.ozlabs.org/patch/624172/
 * https://patchwork.ozlabs.org/patch/624173/
 * https://patchwork.ozlabs.org/patch/624174/
 * https://patchwork.ozlabs.org/patch/624175/
 * https://patchwork.ozlabs.org/patch/624176/
 * https://patchwork.ozlabs.org/patch/624177/
 * https://patchwork.ozlabs.org/patch/624178/
 * https://patchwork.ozlabs.org/patch/624179/
 * https://patchwork.ozlabs.org/patch/624180/
 * https://patchwork.ozlabs.org/patch/624181/
 * https://patchwork.ozlabs.org/patch/624182/
 * https://patchwork.ozlabs.org/patch/624183/
 * https://patchwork.ozlabs.org/patch/624184/
 * https://patchwork.ozlabs.org/patch/624185/
 * https://patchwork.ozlabs.org/patch/624186/
 * https://patchwork.ozlabs.org/patch/624187/
 * https://patchwork.ozlabs.org/patch/624188/
 * https://patchwork.ozlabs.org/patch/624189/
 * https://patchwork.ozlabs.org/patch/624190/
 * https://patchwork.ozlabs.org/patch/624191/
 * https://patchwork.ozlabs.org/patch/624192/
 * https://patchwork.ozlabs.org/patch/624193/
 * https://patchwork.ozlabs.org/patch/624194/
 * https://patchwork.ozlabs.org/patch/624195/
 * https://patchwork.ozlabs.org/patch/624196/
 * https://patchwork.ozlabs.org/patch/624197/
 * https://patchwork.ozlabs.org/patch/624198/
 * https://patchwork.ozlabs.org/patch/624199/
 * https://patchwork.ozlabs.org/patch/624200/
 * https://patchwork.ozlabs.org/patch/624201/
 * https://patchwork.ozlabs.org/patch/624202/
 * https://patchwork.ozlabs.org/patch/624203/
 * https://patchwork.ozlabs.org/patch/624200/
 * https://patchwork.ozlabs.org/patch/624205/

It is a backport of the patch for trunk from 2016-05-20 which waits to be
accepted as well:

 * https://patchwork.ozlabs.org/patch/624542/

 target/linux/ar71xx/files/arch/mips/ath79/mach-mr1750.c|  1 +
 .../patches-3.18/818-MIPS-ath79-add-mr1750v2-support.patch | 10 ++
 2 files changed, 11 insertions(+)
 create mode 100644 
target/linux/ar71xx/patches-3.18/818-MIPS-ath79-add-mr1750v2-support.patch

diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-mr1750.c 
b/target/linux/ar71xx/files/arch/mips/ath79/mach-mr1750.c
index e3c04e7..18101ce 100644
--- a/target/linux/ar71xx/files/arch/mips/ath79/mach-mr1750.c
+++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-mr1750.c
@@ -168,3 +168,4 @@ static void __init mr1750_setup(void)
 }
 
 MIPS_MACHINE(ATH79_MACH_MR1750, "MR1750", "OpenMesh MR1750", mr1750_setup);
+MIPS_MACHINE(ATH79_MACH_MR1750V2, "MR1750v2", "OpenMesh MR1750v2", 
mr1750_setup);
diff --git 
a/target/linux/ar71xx/patches-3.18/818-MIPS-ath79-add-mr1750v2-support.patch 
b/target/linux/ar71xx/patches-3.18/818-MIPS-ath79-add-mr1750v2-support.patch
new file mode 100644
index 000..de732ec
--- /dev/null
+++ b/target/linux/ar71xx/patches-3.18/818-MIPS-ath79-add-mr1750v2-support.patch
@@ -0,0 +1,10 @@
+--- a/arch/mips/ath79/machtypes.h
 b/arch/mips/ath79/machtypes.h
+@@ -76,6 +76,7 @@ enum ath79_mach_type {
+   ATH79_MACH_MR12,/* Cisco Meraki MR12 */
+   ATH79_MACH_MR16,/* Cisco Meraki MR16 */
+   ATH79_MACH_MR1750,  /* OpenMesh MR1750 */
++  ATH79_MACH_MR1750V2,/* OpenMesh MR1750v2 */
+   ATH79_MACH_MR600V2, /* OpenMesh MR600v2 */
+   ATH79_MACH_MR600,   /* OpenMesh MR600 */
+   ATH79_MACH_MR900,   /* OpenMesh MR900 */
-- 
2.8.1
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH CC 06/13] ar71xx: add OM2P-HSv3 to the OM2P profile

2016-06-17 Thread Sven Eckelmann
Signed-off-by: Sven Eckelmann 
---
Based on following CC backports from 2016-05-19:

 * https://patchwork.ozlabs.org/patch/624172/
 * https://patchwork.ozlabs.org/patch/624173/
 * https://patchwork.ozlabs.org/patch/624174/
 * https://patchwork.ozlabs.org/patch/624175/
 * https://patchwork.ozlabs.org/patch/624176/
 * https://patchwork.ozlabs.org/patch/624177/
 * https://patchwork.ozlabs.org/patch/624178/
 * https://patchwork.ozlabs.org/patch/624179/
 * https://patchwork.ozlabs.org/patch/624180/
 * https://patchwork.ozlabs.org/patch/624181/
 * https://patchwork.ozlabs.org/patch/624182/
 * https://patchwork.ozlabs.org/patch/624183/
 * https://patchwork.ozlabs.org/patch/624184/
 * https://patchwork.ozlabs.org/patch/624185/
 * https://patchwork.ozlabs.org/patch/624186/
 * https://patchwork.ozlabs.org/patch/624187/
 * https://patchwork.ozlabs.org/patch/624188/
 * https://patchwork.ozlabs.org/patch/624189/
 * https://patchwork.ozlabs.org/patch/624190/
 * https://patchwork.ozlabs.org/patch/624191/
 * https://patchwork.ozlabs.org/patch/624192/
 * https://patchwork.ozlabs.org/patch/624193/
 * https://patchwork.ozlabs.org/patch/624194/
 * https://patchwork.ozlabs.org/patch/624195/
 * https://patchwork.ozlabs.org/patch/624196/
 * https://patchwork.ozlabs.org/patch/624197/
 * https://patchwork.ozlabs.org/patch/624198/
 * https://patchwork.ozlabs.org/patch/624199/
 * https://patchwork.ozlabs.org/patch/624200/
 * https://patchwork.ozlabs.org/patch/624201/
 * https://patchwork.ozlabs.org/patch/624202/
 * https://patchwork.ozlabs.org/patch/624203/
 * https://patchwork.ozlabs.org/patch/624200/
 * https://patchwork.ozlabs.org/patch/624205/

It is a backport of the patch for trunk from 2016-05-20 which waits to be
accepted as well:

 * https://patchwork.ozlabs.org/patch/624541/

 target/linux/ar71xx/generic/profiles/openmesh.mk | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/target/linux/ar71xx/generic/profiles/openmesh.mk 
b/target/linux/ar71xx/generic/profiles/openmesh.mk
index c0919ed..ddd3f8d 100644
--- a/target/linux/ar71xx/generic/profiles/openmesh.mk
+++ b/target/linux/ar71xx/generic/profiles/openmesh.mk
@@ -6,12 +6,12 @@
 #
 
 define Profile/OM2P
-   NAME:=OpenMesh OM2P/OM2Pv2/OM2P-HS/OM2P-HSv2/OM2P-LC
+   NAME:=OpenMesh OM2P/OM2Pv2/OM2P-HS/OM2P-HSv2/OM2P-HSv3/OM2P-LC
PACKAGES:=kmod-ath9k om-watchdog
 endef
 
 define Profile/OM2P/Description
-   Package set optimized for the OpenMesh 
OM2P/OM2Pv2/OM2P-HS/OM2P-HSv2/OM2P-LC.
+   Package set optimized for the OpenMesh 
OM2P/OM2Pv2/OM2P-HS/OM2P-HSv2/OM2P-HSv3/OM2P-LC.
 endef
 
 $(eval $(call Profile,OM2P))
-- 
2.8.1
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH CC 05/13] package/uboot-envtools: add OpenMesh OM2P-HSv3 support

2016-06-17 Thread Sven Eckelmann
Signed-off-by: Sven Eckelmann 
---
Based on following CC backports from 2016-05-19:

 * https://patchwork.ozlabs.org/patch/624172/
 * https://patchwork.ozlabs.org/patch/624173/
 * https://patchwork.ozlabs.org/patch/624174/
 * https://patchwork.ozlabs.org/patch/624175/
 * https://patchwork.ozlabs.org/patch/624176/
 * https://patchwork.ozlabs.org/patch/624177/
 * https://patchwork.ozlabs.org/patch/624178/
 * https://patchwork.ozlabs.org/patch/624179/
 * https://patchwork.ozlabs.org/patch/624180/
 * https://patchwork.ozlabs.org/patch/624181/
 * https://patchwork.ozlabs.org/patch/624182/
 * https://patchwork.ozlabs.org/patch/624183/
 * https://patchwork.ozlabs.org/patch/624184/
 * https://patchwork.ozlabs.org/patch/624185/
 * https://patchwork.ozlabs.org/patch/624186/
 * https://patchwork.ozlabs.org/patch/624187/
 * https://patchwork.ozlabs.org/patch/624188/
 * https://patchwork.ozlabs.org/patch/624189/
 * https://patchwork.ozlabs.org/patch/624190/
 * https://patchwork.ozlabs.org/patch/624191/
 * https://patchwork.ozlabs.org/patch/624192/
 * https://patchwork.ozlabs.org/patch/624193/
 * https://patchwork.ozlabs.org/patch/624194/
 * https://patchwork.ozlabs.org/patch/624195/
 * https://patchwork.ozlabs.org/patch/624196/
 * https://patchwork.ozlabs.org/patch/624197/
 * https://patchwork.ozlabs.org/patch/624198/
 * https://patchwork.ozlabs.org/patch/624199/
 * https://patchwork.ozlabs.org/patch/624200/
 * https://patchwork.ozlabs.org/patch/624201/
 * https://patchwork.ozlabs.org/patch/624202/
 * https://patchwork.ozlabs.org/patch/624203/
 * https://patchwork.ozlabs.org/patch/624200/
 * https://patchwork.ozlabs.org/patch/624205/

It is a backport of the patch for trunk from 2016-05-20 which waits to be
accepted as well:

 * https://patchwork.ozlabs.org/patch/624539/

 package/boot/uboot-envtools/files/ar71xx | 1 +
 1 file changed, 1 insertion(+)

diff --git a/package/boot/uboot-envtools/files/ar71xx 
b/package/boot/uboot-envtools/files/ar71xx
index 9071c11..81c6481 100644
--- a/package/boot/uboot-envtools/files/ar71xx
+++ b/package/boot/uboot-envtools/files/ar71xx
@@ -41,6 +41,7 @@ om2p | \
 om2pv2 | \
 om2p-hs | \
 om2p-hsv2 | \
+om2p-hsv3 | \
 om2p-lc)
ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x4" "0x4"
;;
-- 
2.8.1
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH CC 02/13] ar71xx: add user-space support for the OpenMesh OM2P-HSv3

2016-06-17 Thread Sven Eckelmann
Signed-off-by: Sven Eckelmann 
---
Based on following CC backports from 2016-05-19:

 * https://patchwork.ozlabs.org/patch/624172/
 * https://patchwork.ozlabs.org/patch/624173/
 * https://patchwork.ozlabs.org/patch/624174/
 * https://patchwork.ozlabs.org/patch/624175/
 * https://patchwork.ozlabs.org/patch/624176/
 * https://patchwork.ozlabs.org/patch/624177/
 * https://patchwork.ozlabs.org/patch/624178/
 * https://patchwork.ozlabs.org/patch/624179/
 * https://patchwork.ozlabs.org/patch/624180/
 * https://patchwork.ozlabs.org/patch/624181/
 * https://patchwork.ozlabs.org/patch/624182/
 * https://patchwork.ozlabs.org/patch/624183/
 * https://patchwork.ozlabs.org/patch/624184/
 * https://patchwork.ozlabs.org/patch/624185/
 * https://patchwork.ozlabs.org/patch/624186/
 * https://patchwork.ozlabs.org/patch/624187/
 * https://patchwork.ozlabs.org/patch/624188/
 * https://patchwork.ozlabs.org/patch/624189/
 * https://patchwork.ozlabs.org/patch/624190/
 * https://patchwork.ozlabs.org/patch/624191/
 * https://patchwork.ozlabs.org/patch/624192/
 * https://patchwork.ozlabs.org/patch/624193/
 * https://patchwork.ozlabs.org/patch/624194/
 * https://patchwork.ozlabs.org/patch/624195/
 * https://patchwork.ozlabs.org/patch/624196/
 * https://patchwork.ozlabs.org/patch/624197/
 * https://patchwork.ozlabs.org/patch/624198/
 * https://patchwork.ozlabs.org/patch/624199/
 * https://patchwork.ozlabs.org/patch/624200/
 * https://patchwork.ozlabs.org/patch/624201/
 * https://patchwork.ozlabs.org/patch/624202/
 * https://patchwork.ozlabs.org/patch/624203/
 * https://patchwork.ozlabs.org/patch/624200/
 * https://patchwork.ozlabs.org/patch/624205/

It is a backport of the patch for trunk from 2016-05-20 which waits to be
accepted as well:

 * https://patchwork.ozlabs.org/patch/624537/

 target/linux/ar71xx/base-files/etc/diag.sh  | 1 +
 target/linux/ar71xx/base-files/etc/uci-defaults/01_leds | 1 +
 target/linux/ar71xx/base-files/lib/ar71xx.sh| 3 +++
 3 files changed, 5 insertions(+)

diff --git a/target/linux/ar71xx/base-files/etc/diag.sh 
b/target/linux/ar71xx/base-files/etc/diag.sh
index 631459f..9a6b4cf 100644
--- a/target/linux/ar71xx/base-files/etc/diag.sh
+++ b/target/linux/ar71xx/base-files/etc/diag.sh
@@ -171,6 +171,7 @@ get_status_led() {
om2pv2 | \
om2p-hs | \
om2p-hsv2 | \
+   om2p-hsv3 | \
om2p-lc)
status_led="om2p:blue:power"
;;
diff --git a/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds 
b/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
index 9a768cd..d297266 100644
--- a/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
+++ b/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
@@ -293,6 +293,7 @@ om2p | \
 om2pv2 | \
 om2p-hs | \
 om2p-hsv2 | \
+om2p-hsv3 | \
 om2p-lc)
ucidef_set_led_netdev "port1" "port1" "om2p:blue:wan" "eth0"
ucidef_set_led_netdev "port2" "port2" "om2p:blue:lan" "eth1"
diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh 
b/target/linux/ar71xx/base-files/lib/ar71xx.sh
index 92ee56d..230df0b 100755
--- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
+++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh
@@ -563,6 +563,9 @@ ar71xx_board_detect() {
*"OM2P HSv2")
name="om2p-hsv2"
;;
+   *"OM2P HSv3")
+   name="om2p-hsv3"
+   ;;
*"OM2P LC")
name="om2p-lc"
;;
-- 
2.8.1
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH CC 03/13] ar71xx: enable sysupgrade for the OpenMesh OM2P-HSv3

2016-06-17 Thread Sven Eckelmann
Signed-off-by: Sven Eckelmann 
---
Based on following CC backports from 2016-05-19:

 * https://patchwork.ozlabs.org/patch/624172/
 * https://patchwork.ozlabs.org/patch/624173/
 * https://patchwork.ozlabs.org/patch/624174/
 * https://patchwork.ozlabs.org/patch/624175/
 * https://patchwork.ozlabs.org/patch/624176/
 * https://patchwork.ozlabs.org/patch/624177/
 * https://patchwork.ozlabs.org/patch/624178/
 * https://patchwork.ozlabs.org/patch/624179/
 * https://patchwork.ozlabs.org/patch/624180/
 * https://patchwork.ozlabs.org/patch/624181/
 * https://patchwork.ozlabs.org/patch/624182/
 * https://patchwork.ozlabs.org/patch/624183/
 * https://patchwork.ozlabs.org/patch/624184/
 * https://patchwork.ozlabs.org/patch/624185/
 * https://patchwork.ozlabs.org/patch/624186/
 * https://patchwork.ozlabs.org/patch/624187/
 * https://patchwork.ozlabs.org/patch/624188/
 * https://patchwork.ozlabs.org/patch/624189/
 * https://patchwork.ozlabs.org/patch/624190/
 * https://patchwork.ozlabs.org/patch/624191/
 * https://patchwork.ozlabs.org/patch/624192/
 * https://patchwork.ozlabs.org/patch/624193/
 * https://patchwork.ozlabs.org/patch/624194/
 * https://patchwork.ozlabs.org/patch/624195/
 * https://patchwork.ozlabs.org/patch/624196/
 * https://patchwork.ozlabs.org/patch/624197/
 * https://patchwork.ozlabs.org/patch/624198/
 * https://patchwork.ozlabs.org/patch/624199/
 * https://patchwork.ozlabs.org/patch/624200/
 * https://patchwork.ozlabs.org/patch/624201/
 * https://patchwork.ozlabs.org/patch/624202/
 * https://patchwork.ozlabs.org/patch/624203/
 * https://patchwork.ozlabs.org/patch/624200/
 * https://patchwork.ozlabs.org/patch/624205/

It is a backport of the patch for trunk from 2016-05-20 which waits to be
accepted as well:

 * https://patchwork.ozlabs.org/patch/624538/

 target/linux/ar71xx/base-files/lib/upgrade/openmesh.sh | 1 +
 target/linux/ar71xx/base-files/lib/upgrade/platform.sh | 2 ++
 2 files changed, 3 insertions(+)

diff --git a/target/linux/ar71xx/base-files/lib/upgrade/openmesh.sh 
b/target/linux/ar71xx/base-files/lib/upgrade/openmesh.sh
index 209cdaa..0e8ea27 100644
--- a/target/linux/ar71xx/base-files/lib/upgrade/openmesh.sh
+++ b/target/linux/ar71xx/base-files/lib/upgrade/openmesh.sh
@@ -63,6 +63,7 @@ platform_check_image_openmesh()
[ "$board" = "om2p-lc" ] && break
[ "$board" = "om2p-hs" ] && break
[ "$board" = "om2p-hsv2" ] && break
+   [ "$board" = "om2p-hsv3" ] && break
echo "Invalid image board target ($img_board_target) 
for this platform: $board. Use the correct image for this platform"
return 1
;;
diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh 
b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
index d3e8a79..4fb5b34 100755
--- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
@@ -299,6 +299,7 @@ platform_check_image() {
om2pv2 | \
om2p-hs | \
om2p-hsv2 | \
+   om2p-hsv3 | \
om2p-lc | \
om5p | \
om5p-an | \
@@ -530,6 +531,7 @@ platform_do_upgrade() {
om2pv2 | \
om2p-hs | \
om2p-hsv2 | \
+   om2p-hsv3 | \
om2p-lc | \
om5p | \
om5p-an | \
-- 
2.8.1
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH CC 04/13] package/om-watchdog: add OpenMesh OM2P-HSv3 support

2016-06-17 Thread Sven Eckelmann
Signed-off-by: Sven Eckelmann 
---
Based on following CC backports from 2016-05-19:

 * https://patchwork.ozlabs.org/patch/624172/
 * https://patchwork.ozlabs.org/patch/624173/
 * https://patchwork.ozlabs.org/patch/624174/
 * https://patchwork.ozlabs.org/patch/624175/
 * https://patchwork.ozlabs.org/patch/624176/
 * https://patchwork.ozlabs.org/patch/624177/
 * https://patchwork.ozlabs.org/patch/624178/
 * https://patchwork.ozlabs.org/patch/624179/
 * https://patchwork.ozlabs.org/patch/624180/
 * https://patchwork.ozlabs.org/patch/624181/
 * https://patchwork.ozlabs.org/patch/624182/
 * https://patchwork.ozlabs.org/patch/624183/
 * https://patchwork.ozlabs.org/patch/624184/
 * https://patchwork.ozlabs.org/patch/624185/
 * https://patchwork.ozlabs.org/patch/624186/
 * https://patchwork.ozlabs.org/patch/624187/
 * https://patchwork.ozlabs.org/patch/624188/
 * https://patchwork.ozlabs.org/patch/624189/
 * https://patchwork.ozlabs.org/patch/624190/
 * https://patchwork.ozlabs.org/patch/624191/
 * https://patchwork.ozlabs.org/patch/624192/
 * https://patchwork.ozlabs.org/patch/624193/
 * https://patchwork.ozlabs.org/patch/624194/
 * https://patchwork.ozlabs.org/patch/624195/
 * https://patchwork.ozlabs.org/patch/624196/
 * https://patchwork.ozlabs.org/patch/624197/
 * https://patchwork.ozlabs.org/patch/624198/
 * https://patchwork.ozlabs.org/patch/624199/
 * https://patchwork.ozlabs.org/patch/624200/
 * https://patchwork.ozlabs.org/patch/624201/
 * https://patchwork.ozlabs.org/patch/624202/
 * https://patchwork.ozlabs.org/patch/624203/
 * https://patchwork.ozlabs.org/patch/624200/
 * https://patchwork.ozlabs.org/patch/624205/

It is a backport of the patch for trunk from 2016-05-20 which waits to be
accepted as well:

 * https://patchwork.ozlabs.org/patch/624540/

 package/kernel/om-watchdog/files/om-watchdog.init | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/package/kernel/om-watchdog/files/om-watchdog.init 
b/package/kernel/om-watchdog/files/om-watchdog.init
index 6b96966..bf8a124 100644
--- a/package/kernel/om-watchdog/files/om-watchdog.init
+++ b/package/kernel/om-watchdog/files/om-watchdog.init
@@ -13,7 +13,7 @@ boot() {
local board=$(ar71xx_board_name)
 
case "$board" in
-   "om2p"|"om2p-hs"|"om2p-hsv2"|"om5p-acv2")
+   "om2p"|"om2p-hs"|"om2p-hsv2"|"om2p-hsv3"|"om5p-acv2")
service_start /sbin/om-watchdog 12
;;
"om2pv2"|"om2p-lc")
-- 
2.8.1
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH CC 01/13] ar71xx: add kernel support for the OpenMesh OM2P-HSv3

2016-06-17 Thread Sven Eckelmann
Signed-off-by: Sven Eckelmann 
---
Based on following CC backports from 2016-05-19:

 * https://patchwork.ozlabs.org/patch/624172/
 * https://patchwork.ozlabs.org/patch/624173/
 * https://patchwork.ozlabs.org/patch/624174/
 * https://patchwork.ozlabs.org/patch/624175/
 * https://patchwork.ozlabs.org/patch/624176/
 * https://patchwork.ozlabs.org/patch/624177/
 * https://patchwork.ozlabs.org/patch/624178/
 * https://patchwork.ozlabs.org/patch/624179/
 * https://patchwork.ozlabs.org/patch/624180/
 * https://patchwork.ozlabs.org/patch/624181/
 * https://patchwork.ozlabs.org/patch/624182/
 * https://patchwork.ozlabs.org/patch/624183/
 * https://patchwork.ozlabs.org/patch/624184/
 * https://patchwork.ozlabs.org/patch/624185/
 * https://patchwork.ozlabs.org/patch/624186/
 * https://patchwork.ozlabs.org/patch/624187/
 * https://patchwork.ozlabs.org/patch/624188/
 * https://patchwork.ozlabs.org/patch/624189/
 * https://patchwork.ozlabs.org/patch/624190/
 * https://patchwork.ozlabs.org/patch/624191/
 * https://patchwork.ozlabs.org/patch/624192/
 * https://patchwork.ozlabs.org/patch/624193/
 * https://patchwork.ozlabs.org/patch/624194/
 * https://patchwork.ozlabs.org/patch/624195/
 * https://patchwork.ozlabs.org/patch/624196/
 * https://patchwork.ozlabs.org/patch/624197/
 * https://patchwork.ozlabs.org/patch/624198/
 * https://patchwork.ozlabs.org/patch/624199/
 * https://patchwork.ozlabs.org/patch/624200/
 * https://patchwork.ozlabs.org/patch/624201/
 * https://patchwork.ozlabs.org/patch/624202/
 * https://patchwork.ozlabs.org/patch/624203/
 * https://patchwork.ozlabs.org/patch/624200/
 * https://patchwork.ozlabs.org/patch/624205/

It is a backport of the patch for trunk from 2016-05-20 which waits to be
accepted as well:

 * https://patchwork.ozlabs.org/patch/624536/

 target/linux/ar71xx/files/arch/mips/ath79/mach-om2p.c  |  1 +
 .../patches-3.18/817-MIPS-ath79-add-om2phsv3-support.patch | 10 ++
 2 files changed, 11 insertions(+)
 create mode 100644 
target/linux/ar71xx/patches-3.18/817-MIPS-ath79-add-om2phsv3-support.patch

diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-om2p.c 
b/target/linux/ar71xx/files/arch/mips/ath79/mach-om2p.c
index 6b0bdc3..3b282a3 100644
--- a/target/linux/ar71xx/files/arch/mips/ath79/mach-om2p.c
+++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-om2p.c
@@ -223,3 +223,4 @@ static void __init om2p_hs_setup(void)
 
 MIPS_MACHINE(ATH79_MACH_OM2P_HS, "OM2P-HS", "OpenMesh OM2P HS", om2p_hs_setup);
 MIPS_MACHINE(ATH79_MACH_OM2P_HSv2, "OM2P-HSv2", "OpenMesh OM2P HSv2", 
om2p_hs_setup);
+MIPS_MACHINE(ATH79_MACH_OM2P_HSv3, "OM2P-HSv3", "OpenMesh OM2P HSv3", 
om2p_hs_setup);
diff --git 
a/target/linux/ar71xx/patches-3.18/817-MIPS-ath79-add-om2phsv3-support.patch 
b/target/linux/ar71xx/patches-3.18/817-MIPS-ath79-add-om2phsv3-support.patch
new file mode 100644
index 000..7305b2e
--- /dev/null
+++ b/target/linux/ar71xx/patches-3.18/817-MIPS-ath79-add-om2phsv3-support.patch
@@ -0,0 +1,10 @@
+--- a/arch/mips/ath79/machtypes.h
 b/arch/mips/ath79/machtypes.h
+@@ -88,6 +88,7 @@ enum ath79_mach_type {
+   ATH79_MACH_NBG460N, /* Zyxel NBG460N/550N/550NH */
+   ATH79_MACH_NBG6716, /* Zyxel NBG6716 */
+   ATH79_MACH_OM2P_HSv2,   /* OpenMesh OM2P-HSv2 */
++  ATH79_MACH_OM2P_HSv3,   /* OpenMesh OM2P-HSv3 */
+   ATH79_MACH_OM2P_HS, /* OpenMesh OM2P-HS */
+   ATH79_MACH_OM2P_LC, /* OpenMesh OM2P-LC */
+   ATH79_MACH_OM2Pv2,  /* OpenMesh OM2Pv2 */
-- 
2.8.1
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] ujail bug/feature with file replacement with mv

2016-06-17 Thread Etienne Champetier
Hi,

Just a heads up,
ujail uses "bind mount" to include file and directories into the jail,
so if you include a file named aaa (procd_add_jail_mount(_rw) aaa),
and then replace it outside of the jail using "mv bbb aaa",
in the jail you will still have file aaa.

Workaround is to use a directory instead of a file.
This might be usefull to remember if you try to change a config file
atomically with mv and signal the process.

Regards
Etienne
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] TR-069 and OpenWrt discussion on these lists?

2016-06-17 Thread Eric Schultz
As we continue the TR-069 support discussion, I wanted to ask folks
whether they want me to continue to cross post to these list in addition
to the prplwrt list at open...@lists.prplfoundation.org. I have no
problem doing either way, but I don't want to fill people's inbox will
stuff they feel is off topic. Just wanted to get a sense of what people
would prefer.

Thanks,

Eric
-- 
Eric Schultz, Community Manager, prpl Foundation
http://www.prplfoundation.org
eschu...@prplfoundation.org
cell: 920-539-0404
skype: ericschultzwi
@EricPrpl
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] TR-069 and OpenWrt Fuze Meeting - June 17, 7AM PT

2016-06-17 Thread Eric Schultz
As mentioned at last week's meeting, I wanted to announce that we'll
have another discussion on TR-069 and OpenWrt on Fuze on Friday June 17
at 7AM PT. We'll discuss any steps that need to be taken before the
in-person meeting and, depending on time, address other topics.

I've contacted Fuze and it seems like the new connection info I have
below fixes the problems we had this week. It works on Firefox and
Chrome on both Windows and Linux. Apologies again for the problems last
week.

I'm looking forward to seeing everyone there.

Thanks,

Eric

--
To join the web meeting click or copy and paste this URL into your browser:


https://fuzemeeting.com/browser/#login and enter you name and the
meeting number: 32924366

To join the audio portion of this meeting:

Internet Audio: Simply select the internet audio option after joining.

Toll / Intl #: +12014794595

Toll free #: +18553463893

You can find international access numbers at
https://www.fuze.com/extras/symphony

If prompted, enter the meeting number: 32924366, then press #.

For the optimal experience, download Fuze:
www.fuzebox.com/products/download

Need help? You can connect to our Customer Support Team or access
self-help tools at www.fuzebox.com/support
-- 
Eric Schultz, Community Manager, prpl Foundation
http://www.prplfoundation.org
eschu...@prplfoundation.org
cell: 920-539-0404
skype: ericschultzwi
@EricPrpl
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] In-person TR-069 & OpenWrt Meeting - June 28 & 29

2016-06-17 Thread Eric Schultz
I'm happy to announce that an in-person meeting on TR-069 and OpenWrt
will occur on June 28 & June 29 at Softathome's office in Paris. We'll
further discuss the current implementations of TR-069 and other
protocols and develop a clear plan forward that meets needs of everyone
in the community as best as possible. While most of the discussion will
happen in person, I'll do what I can to keep everyone who isn't there
involved in the discussion (I'd welcome suggestions on ways to do this
on short notice!).

Since Wojtek needs a count in order to reserve a meeting room in
advance, please RSVP as soon as possible. We'll also talk about this
more at the TR-069 and OpenWrt Fuze meeting this Friday at 7AM PT
(announcement to come soon).

Thanks all,

Eric
-- 
Eric Schultz, Community Manager, prpl Foundation
http://www.prplfoundation.org
eschu...@prplfoundation.org
cell: 920-539-0404
skype: ericschultzwi
@EricPrpl
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH] [NG-57971] libnetfilter_queue: fix UDP checksum computation

2016-06-17 Thread Alin Nastac
This patch was copied from
http://www.spinics.net/lists/netfilter/msg56704.html .

Signed-off-by: Alin Nastac 
---
 .../patches/100-udp_checksum_computation.patch | 95 ++
 1 file changed, 95 insertions(+)
 create mode 100644 
package/libs/libnetfilter-queue/patches/100-udp_checksum_computation.patch

diff --git 
a/package/libs/libnetfilter-queue/patches/100-udp_checksum_computation.patch 
b/package/libs/libnetfilter-queue/patches/100-udp_checksum_computation.patch
new file mode 100644
index 000..9939b83
--- /dev/null
+++ b/package/libs/libnetfilter-queue/patches/100-udp_checksum_computation.patch
@@ -0,0 +1,95 @@
+--- libnetfilter_queue-1.0.2.orig/src/extra/checksum.c
 libnetfilter_queue-1.0.2/src/extra/checksum.c
+@@ -35,7 +35,7 @@ uint16_t checksum(uint32_t sum, uint16_t
+   return (uint16_t)(~sum);
+ }
+ 
+-uint16_t checksum_tcpudp_ipv4(struct iphdr *iph)
++uint16_t checksum_tcpudp_ipv4(struct iphdr *iph, uint16_t protocol_id)
+ {
+   uint32_t sum = 0;
+   uint32_t iph_len = iph->ihl*4;
+@@ -46,13 +46,13 @@ uint16_t checksum_tcpudp_ipv4(struct iph
+   sum += (iph->saddr) & 0x;
+   sum += (iph->daddr >> 16) & 0x;
+   sum += (iph->daddr) & 0x;
+-  sum += htons(IPPROTO_TCP);
++  sum += htons(protocol_id);
+   sum += htons(len);
+ 
+   return checksum(sum, (uint16_t *)payload, len);
+ }
+ 
+-uint16_t checksum_tcpudp_ipv6(struct ip6_hdr *ip6h, void *transport_hdr)
++uint16_t checksum_tcpudp_ipv6(struct ip6_hdr *ip6h, void *transport_hdr, 
uint16_t protocol_id)
+ {
+   uint32_t sum = 0;
+   uint32_t hdr_len = (uint32_t *)transport_hdr - (uint32_t *)ip6h;
+@@ -68,7 +68,7 @@ uint16_t checksum_tcpudp_ipv6(struct ip6
+   sum += (ip6h->ip6_dst.s6_addr16[i] >> 16) & 0x;
+   sum += (ip6h->ip6_dst.s6_addr16[i]) & 0x;
+   }
+-  sum += htons(IPPROTO_TCP);
++  sum += htons(protocol_id);
+   sum += htons(ip6h->ip6_plen);
+ 
+   return checksum(sum, (uint16_t *)payload, len);
+Index: libnetfilter_queue-1.0.2/src/extra/tcp.c
+===
+--- libnetfilter_queue-1.0.2.orig/src/extra/tcp.c
 libnetfilter_queue-1.0.2/src/extra/tcp.c
+@@ -91,7 +91,7 @@ nfq_tcp_compute_checksum_ipv4(struct tcp
+ {
+   /* checksum field in header needs to be zero for calculation. */
+   tcph->check = 0;
+-  tcph->check = checksum_tcpudp_ipv4(iph);
++  tcph->check = checksum_tcpudp_ipv4(iph, IPPROTO_TCP);
+ }
+ EXPORT_SYMBOL(nfq_tcp_compute_checksum_ipv4);
+ 
+@@ -105,7 +105,7 @@ nfq_tcp_compute_checksum_ipv6(struct tcp
+ {
+   /* checksum field in header needs to be zero for calculation. */
+   tcph->check = 0;
+-  tcph->check = checksum_tcpudp_ipv6(ip6h, tcph);
++  tcph->check = checksum_tcpudp_ipv6(ip6h, tcph, IPPROTO_TCP);
+ }
+ EXPORT_SYMBOL(nfq_tcp_compute_checksum_ipv6);
+ 
+Index: libnetfilter_queue-1.0.2/src/extra/udp.c
+===
+--- libnetfilter_queue-1.0.2.orig/src/extra/udp.c
 libnetfilter_queue-1.0.2/src/extra/udp.c
+@@ -91,7 +91,7 @@ nfq_udp_compute_checksum_ipv4(struct udp
+ {
+   /* checksum field in header needs to be zero for calculation. */
+   udph->check = 0;
+-  udph->check = checksum_tcpudp_ipv4(iph);
++  udph->check = checksum_tcpudp_ipv4(iph, IPPROTO_UDP);
+ }
+ EXPORT_SYMBOL(nfq_udp_compute_checksum_ipv4);
+ 
+@@ -110,7 +110,7 @@ nfq_udp_compute_checksum_ipv6(struct udp
+ {
+   /* checksum field in header needs to be zero for calculation. */
+   udph->check = 0;
+-  udph->check = checksum_tcpudp_ipv6(ip6h, udph);
++  udph->check = checksum_tcpudp_ipv6(ip6h, udph, IPPROTO_UDP);
+ }
+ EXPORT_SYMBOL(nfq_udp_compute_checksum_ipv6);
+ 
+Index: libnetfilter_queue-1.0.2/src/internal.h
+===
+--- libnetfilter_queue-1.0.2.orig/src/internal.h
 libnetfilter_queue-1.0.2/src/internal.h
+@@ -13,8 +13,8 @@ struct iphdr;
+ struct ip6_hdr;
+ 
+ uint16_t checksum(uint32_t sum, uint16_t *buf, int size);
+-uint16_t checksum_tcpudp_ipv4(struct iphdr *iph);
+-uint16_t checksum_tcpudp_ipv6(struct ip6_hdr *ip6h, void *transport_hdr);
++uint16_t checksum_tcpudp_ipv4(struct iphdr *iph, uint16_t protocol_id);
++uint16_t checksum_tcpudp_ipv6(struct ip6_hdr *ip6h, void *transport_hdr, 
uint16_t protocol_id);
+ 
+ struct pkt_buff {
+   uint8_t *mac_header;
-- 
1.7.12.4
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH] libnetfilter_queue: fix UDP checksum computation

2016-06-17 Thread Alin Nastac
This patch was copied from
http://www.spinics.net/lists/netfilter/msg56704.html .
---
 .../patches/100-udp_checksum_computation.patch | 95 ++
 1 file changed, 95 insertions(+)
 create mode 100644 
package/libs/libnetfilter-queue/patches/100-udp_checksum_computation.patch

diff --git 
a/package/libs/libnetfilter-queue/patches/100-udp_checksum_computation.patch 
b/package/libs/libnetfilter-queue/patches/100-udp_checksum_computation.patch
new file mode 100644
index 000..9939b83
--- /dev/null
+++ b/package/libs/libnetfilter-queue/patches/100-udp_checksum_computation.patch
@@ -0,0 +1,95 @@
+--- libnetfilter_queue-1.0.2.orig/src/extra/checksum.c
 libnetfilter_queue-1.0.2/src/extra/checksum.c
+@@ -35,7 +35,7 @@ uint16_t checksum(uint32_t sum, uint16_t
+   return (uint16_t)(~sum);
+ }
+ 
+-uint16_t checksum_tcpudp_ipv4(struct iphdr *iph)
++uint16_t checksum_tcpudp_ipv4(struct iphdr *iph, uint16_t protocol_id)
+ {
+   uint32_t sum = 0;
+   uint32_t iph_len = iph->ihl*4;
+@@ -46,13 +46,13 @@ uint16_t checksum_tcpudp_ipv4(struct iph
+   sum += (iph->saddr) & 0x;
+   sum += (iph->daddr >> 16) & 0x;
+   sum += (iph->daddr) & 0x;
+-  sum += htons(IPPROTO_TCP);
++  sum += htons(protocol_id);
+   sum += htons(len);
+ 
+   return checksum(sum, (uint16_t *)payload, len);
+ }
+ 
+-uint16_t checksum_tcpudp_ipv6(struct ip6_hdr *ip6h, void *transport_hdr)
++uint16_t checksum_tcpudp_ipv6(struct ip6_hdr *ip6h, void *transport_hdr, 
uint16_t protocol_id)
+ {
+   uint32_t sum = 0;
+   uint32_t hdr_len = (uint32_t *)transport_hdr - (uint32_t *)ip6h;
+@@ -68,7 +68,7 @@ uint16_t checksum_tcpudp_ipv6(struct ip6
+   sum += (ip6h->ip6_dst.s6_addr16[i] >> 16) & 0x;
+   sum += (ip6h->ip6_dst.s6_addr16[i]) & 0x;
+   }
+-  sum += htons(IPPROTO_TCP);
++  sum += htons(protocol_id);
+   sum += htons(ip6h->ip6_plen);
+ 
+   return checksum(sum, (uint16_t *)payload, len);
+Index: libnetfilter_queue-1.0.2/src/extra/tcp.c
+===
+--- libnetfilter_queue-1.0.2.orig/src/extra/tcp.c
 libnetfilter_queue-1.0.2/src/extra/tcp.c
+@@ -91,7 +91,7 @@ nfq_tcp_compute_checksum_ipv4(struct tcp
+ {
+   /* checksum field in header needs to be zero for calculation. */
+   tcph->check = 0;
+-  tcph->check = checksum_tcpudp_ipv4(iph);
++  tcph->check = checksum_tcpudp_ipv4(iph, IPPROTO_TCP);
+ }
+ EXPORT_SYMBOL(nfq_tcp_compute_checksum_ipv4);
+ 
+@@ -105,7 +105,7 @@ nfq_tcp_compute_checksum_ipv6(struct tcp
+ {
+   /* checksum field in header needs to be zero for calculation. */
+   tcph->check = 0;
+-  tcph->check = checksum_tcpudp_ipv6(ip6h, tcph);
++  tcph->check = checksum_tcpudp_ipv6(ip6h, tcph, IPPROTO_TCP);
+ }
+ EXPORT_SYMBOL(nfq_tcp_compute_checksum_ipv6);
+ 
+Index: libnetfilter_queue-1.0.2/src/extra/udp.c
+===
+--- libnetfilter_queue-1.0.2.orig/src/extra/udp.c
 libnetfilter_queue-1.0.2/src/extra/udp.c
+@@ -91,7 +91,7 @@ nfq_udp_compute_checksum_ipv4(struct udp
+ {
+   /* checksum field in header needs to be zero for calculation. */
+   udph->check = 0;
+-  udph->check = checksum_tcpudp_ipv4(iph);
++  udph->check = checksum_tcpudp_ipv4(iph, IPPROTO_UDP);
+ }
+ EXPORT_SYMBOL(nfq_udp_compute_checksum_ipv4);
+ 
+@@ -110,7 +110,7 @@ nfq_udp_compute_checksum_ipv6(struct udp
+ {
+   /* checksum field in header needs to be zero for calculation. */
+   udph->check = 0;
+-  udph->check = checksum_tcpudp_ipv6(ip6h, udph);
++  udph->check = checksum_tcpudp_ipv6(ip6h, udph, IPPROTO_UDP);
+ }
+ EXPORT_SYMBOL(nfq_udp_compute_checksum_ipv6);
+ 
+Index: libnetfilter_queue-1.0.2/src/internal.h
+===
+--- libnetfilter_queue-1.0.2.orig/src/internal.h
 libnetfilter_queue-1.0.2/src/internal.h
+@@ -13,8 +13,8 @@ struct iphdr;
+ struct ip6_hdr;
+ 
+ uint16_t checksum(uint32_t sum, uint16_t *buf, int size);
+-uint16_t checksum_tcpudp_ipv4(struct iphdr *iph);
+-uint16_t checksum_tcpudp_ipv6(struct ip6_hdr *ip6h, void *transport_hdr);
++uint16_t checksum_tcpudp_ipv4(struct iphdr *iph, uint16_t protocol_id);
++uint16_t checksum_tcpudp_ipv6(struct ip6_hdr *ip6h, void *transport_hdr, 
uint16_t protocol_id);
+ 
+ struct pkt_buff {
+   uint8_t *mac_header;
-- 
1.7.12.4
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH mountd 4/4] filesystem mount options in uci as optional parameter

2016-06-17 Thread olivier . hardouin
Possibility to overwrite the default hardcoded settings by adding 'options' 
and 'fstype' in the uci configuration. The fs names are changed in lowercase 
to comply with UCI general naming.

Signed-off-by: Olivier Hardouin 
---
replaces patch "filesystem mount options in uci config" according to review 
comments
obsoletes patch "uci config for mountd fileystem options"

 mount.c | 63 +--
 1 file changed, 41 insertions(+), 22 deletions(-)

diff --git a/mount.c b/mount.c
index 36b99f5..aaddb70 100644
--- a/mount.c
+++ b/mount.c
@@ -51,16 +51,16 @@ struct mount {
 char *fs_names[] = {
"",
"",
-   "MBR",
-   "EXT2",
-   "EXT3",
-   "FAT",
-   "HFSPLUS",
+   "mbr",
+   "ext2",
+   "ext3",
+   "fat",
+   "hfsplus",
"",
-   "NTFS",
+   "ntfs",
"",
-   "EXFAT",
-   "EXT4"
+   "exfat",
+   "ext4"
 };
 
 #define MAX_MOUNTED32
@@ -228,40 +228,59 @@ int mount_new(char *path, char *dev)
pid = autofs_safe_fork();
if(!pid)
{
+   char *options, *fstype;
if(mount->fs == EXFAT)
{
-   log_printf("mount -t exfat -o rw,uid=1000,gid=1000 
/dev/%s %s", mount->dev, tmp);
-   ret = system_printf("mount -t exfat -o 
rw,uid=1000,gid=1000 /dev/%s %s", mount->dev, tmp);
+   options = "rw,uid=1000,gid=1000";
+   fstype = "exfat";
}
if(mount->fs == FAT)
{
-   log_printf("mount -t vfat -o rw,uid=1000,gid=1000 
/dev/%s %s", mount->dev, tmp);
-   ret = system_printf("mount -t vfat -o 
rw,uid=1000,gid=1000 /dev/%s %s", mount->dev, tmp);
+   options = "rw,uid=1000,gid=1000";
+   fstype = "vfat";
}
if(mount->fs == EXT4)
{
-   log_printf("mount -t ext4 -o rw,defaults /dev/%s %s", 
mount->dev, tmp);
-   ret = system_printf("mount -t ext4 -o rw,defaults 
/dev/%s %s", mount->dev, tmp);
+   options = "rw,defaults";
+   fstype = "ext4";
}
if(mount->fs == EXT3)
{
-   log_printf("mount -t ext3 -o rw,defaults /dev/%s %s", 
mount->dev, tmp);
-   ret = system_printf("mount -t ext3 -o rw,defaults 
/dev/%s %s", mount->dev, tmp);
+   options = "rw,defaults";
+   fstype = "ext3";
}
if(mount->fs == EXT2)
{
-   log_printf("mount -t ext2 -o rw,defaults /dev/%s %s", 
mount->dev, tmp);
-   ret = system_printf("mount -t ext2 -o rw,defaults 
/dev/%s %s", mount->dev, tmp);
+   options = "rw,defaults";
+   fstype = "ext2";
}
if(mount->fs == HFSPLUS)
{
-   log_printf("mount -t hfsplus -o 
rw,defaults,uid=1000,gid=1000 /dev/%s %s", mount->dev, tmp);
-   ret = system_printf("mount -t hfsplus -o 
rw,defaults,uid=1000,gid=1000 /dev/%s %s", mount->dev, tmp);
+   options = "rw,defaults,uid=1000,gid=1000";
+   fstype = "hfsplus";
}
if(mount->fs == NTFS)
{
-   log_printf("ntfs-3g /dev/%s %s -o force", mount->dev, 
tmp);
-   ret = system_printf("ntfs-3g /dev/%s %s -o force", 
mount->dev, tmp);
+   options = "force";
+   fstype = "ntfs-3g";
+   }
+   if(mount->fs > MBR && mount->fs <= EXT4)
+   {
+   struct uci_context *ctx;
+   char *uci_options, *uci_fstype;
+   ctx = ucix_init("mountd");
+   if(fs_names[mount->fs])
+   {
+   uci_options = ucix_get_option(ctx, "mountd", 
fs_names[mount->fs], "options");
+   uci_fstype = ucix_get_option(ctx, "mountd", 
fs_names[mount->fs], "fstype");
+   if(uci_options)
+   options = uci_options;
+   if(uci_fstype)
+   fstype = uci_fstype;
+   log_printf("mount -t %s -o %s /dev/%s %s", 
fstype, options, mount->dev, tmp);
+   ret = system_printf("mount -t %s -o %s /dev/%s 
%s", fstype, options, mount->dev, tmp);
+   }
+   ucix_cleanup(ctx);
}
exit(WEXITSTATUS(ret));
}
-- 
1.9.1

[OpenWrt-Devel] [PATCH mountd 3/4] add hotplug events

2016-06-17 Thread olivier . hardouin
add hotplug events (add, remove) to inform other subsystems
remove obsolete /etc/mountd/event call

Signed-off-by: Olivier Hardouin 
---
 mount.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/mount.c b/mount.c
index aaddb70..219146b 100644
--- a/mount.c
+++ b/mount.c
@@ -161,6 +161,7 @@ static void mount_add_list(char *name, char *dev, char 
*serial,
snprintf(tmp2, 64, "/tmp/run/mountd/%s", dev);
symlink(tmp2, tmp);
mount_new("/tmp/run/mountd/", dev);
+   system_printf("ACTION=add DEVICE=%s NAME=%s /sbin/hotplug-call 
mount", dev, name);
}
 }
 
@@ -734,7 +735,7 @@ static void mount_enum_drives(void)
log_printf("removing %s\n", q->dev);
snprintf(tmp, 64, "%s%s", uci_path, q->name);
unlink(tmp);
-   system_printf("/etc/mountd/event remove %s %s", q->dev, 
q->name);
+   system_printf("ACTION=remove DEVICE=%s NAME=%s 
/sbin/hotplug-call mount", q->dev, q->name);
free(q);
mount_dump_uci_state();
system_printf("/etc/fonstated/ReloadSamba");
-- 
1.9.1
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH mountd 1/4] align fs_names table to indexes defined in include/fs.h

2016-06-17 Thread olivier . hardouin
Signed-off-by: Olivier Hardouin 
---
 mount.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/mount.c b/mount.c
index 8892040..36b99f5 100644
--- a/mount.c
+++ b/mount.c
@@ -59,6 +59,7 @@ char *fs_names[] = {
"",
"NTFS",
"",
+   "EXFAT",
"EXT4"
 };
 
-- 
1.9.1
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH mountd 2/4] fix crash if no uci config file present

2016-06-17 Thread olivier . hardouin
fix also possible null dereferenced pointers 

Signed-off-by: Olivier Hardouin 
---
 uci.c  | 6 ++
 ucix.c | 9 -
 2 files changed, 14 insertions(+), 1 deletion(-)

diff --git a/uci.c b/uci.c
index f5aad02..46c3922 100644
--- a/uci.c
+++ b/uci.c
@@ -54,6 +54,9 @@ char* uci_get_option(struct uci_context *ctx, char *section, 
char *option)
char *value = NULL;
struct uci_ptr ptr;
 
+   if (!p)
+   return NULL;
+
memset(, 0, sizeof(ptr));
ptr.package = p->e.name;
ptr.section = section;
@@ -101,6 +104,9 @@ void uci_for_each_section_type(char *type, void 
(*cb)(char*, void*), void *priv)
 {
struct uci_element *e;
 
+   if (!p)
+   return;
+
uci_foreach_element(>sections, e)
if (!strcmp(type, uci_to_section(e)->type))
cb(e->name, priv);
diff --git a/ucix.c b/ucix.c
index e2a6780..1e4d1e6 100644
--- a/ucix.c
+++ b/ucix.c
@@ -18,6 +18,8 @@ static inline int ucix_get_ptr(struct uci_context *ctx, const 
char *p, const cha
 struct uci_context* ucix_init(const char *config_file)
 {
struct uci_context *ctx = uci_alloc_context();
+   if(!ctx)
+   return NULL;
uci_add_delta_path(ctx, "/var/state");
if(uci_load(ctx, config_file, NULL) != UCI_OK)
{
@@ -30,6 +32,8 @@ struct uci_context* ucix_init(const char *config_file)
 struct uci_context* ucix_init_path(const char *path, const char *config_file)
 {
struct uci_context *ctx = uci_alloc_context();
+   if(!ctx)
+   return NULL;
if(path)
{
uci_set_savedir(ctx, path);
@@ -44,7 +48,10 @@ struct uci_context* ucix_init_path(const char *path, const 
char *config_file)
 
 void ucix_cleanup(struct uci_context *ctx)
 {
-   uci_free_context(ctx);
+   if(ctx)
+   {
+   uci_free_context(ctx);
+   }
 }
 
 int ucix_save(struct uci_context *ctx, const char *p)
-- 
1.9.1
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [OpenWrt] #20982: jffs2-error / nanostation M5 xw / r47658

2016-06-17 Thread Gareth Parker
I can confirm this patch fixes the problem atleast on CC I haven’t tested any 
others.

https://raw.githubusercontent.com/freifunk-gluon/gluon/1f400189cfbae697b50180bccf876784a3c03423/patches/openwrt/0026-kernel-backport-spi-nor-driver-from-4.4.9.patch
https://raw.githubusercontent.com/freifunk-gluon/gluon/1f400189cfbae697b50180bccf876784a3c03423/patches/openwrt/0027-kernel-mtd-spi-nor-wait-until-status-register-writes-are-ready.patch
https://raw.githubusercontent.com/freifunk-gluon/gluon/1f400189cfbae697b50180bccf876784a3c03423/patches/openwrt/0028-kernel-mtd-spi-nor-unlock-Winbond-flashs.patch

All seem to apply cleanly to CC, compiled and tested on a Picostation running 
AirOS XM 5.6.2 with new uboot and no problems.

-Original Message-
From: OpenWrt [mailto:openwrt-devel@lists.openwrt.org] 
Sent: Wednesday, 15 June 2016 6:32 a.m.
Cc: openwrt-tick...@lists.openwrt.org
Subject: Re: [OpenWrt] #20982: jffs2-error / nanostation M5 xw / r47658

#20982: jffs2-error / nanostation M5 xw / r47658
+
  Reporter:  bittorf@…  |  Owner:  developers
  Type:  defect | Status:  new
  Priority:  normal |  Milestone:
 Component:  packages   |Version:  Trunk
Resolution: |   Keywords:
+

Comment (by johnv):

 Here is a link to the commit, but this is not directly for CC.

 https://github.com/freifunk-gluon/gluon/issues/687#ref-commit-dd0535c

--
Ticket URL: 
OpenWrt 
Opensource Wireless Router Technology
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH] micropython-lib: fix make install seldom fail

2016-06-17 Thread Jérôme Poulin
Since make install path was hardcoded inside the build dir, it can sometime
fail with cp indicating that source and destination are the same since make
install will copy all py file in build dir to install dir. In this case,
install dir is in build dir causing a loop.
---
 lang/micropython-lib/Makefile | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/lang/micropython-lib/Makefile b/lang/micropython-lib/Makefile
index b8af737..aefb8f4 100644
--- a/lang/micropython-lib/Makefile
+++ b/lang/micropython-lib/Makefile
@@ -22,6 +22,7 @@ PKG_SOURCE_VERSION:=bfbbf85a181d84e2494ea6f15be311734666bf67
 PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION)
 PKG_SOURCE:=$(PKG_SOURCE_SUBDIR).tar.gz
 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_SOURCE_SUBDIR)
+PKG_INSTALL_DIR:=$(BUILD_DIR)/_install_tmp
 PKG_BUILD_PARALLEL:=1
 
 include $(INCLUDE_DIR)/package.mk
@@ -43,12 +44,12 @@ endef
 
 MAKE_FLAGS:=\
-C $(PKG_BUILD_DIR) \
-   PREFIX=$(PKG_BUILD_DIR)/_install_tmp \
+   PREFIX=$(PKG_INSTALL_DIR) \
install
 
 define Package/micropython-lib/install
$(INSTALL_DIR) $(1)/usr/lib/micropython
-   $(CP) $(PKG_BUILD_DIR)/_install_tmp/* $(1)/usr/lib/micropython
+   $(CP) $(PKG_INSTALL_DIR)/* $(1)/usr/lib/micropython
 endef
 
 $(eval $(call BuildPackage,micropython-lib))
-- 
2.7.4
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] (no subject)

2016-06-17 Thread Jerome
To: openwrt-devel@lists.openwrt.org
From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Poulin?= 
Date: Mon, 13 Jun 2016 17:47:50 -0400
Subject: [PATCH] micropython-lib: fix make install seldom fail

- Since make install path was hardcoded inside the build dir, it can sometime
  fail with cp indicating that source and destination are the same since make
  install will copy all py file in build dir to install dir. In this case,
  install dir is in build dir causing a loop.
---
 lang/micropython-lib/Makefile | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/lang/micropython-lib/Makefile b/lang/micropython-lib/Makefile
index b8af737..aefb8f4 100644
--- a/lang/micropython-lib/Makefile
+++ b/lang/micropython-lib/Makefile
@@ -22,6 +22,7 @@ PKG_SOURCE_VERSION:=bfbbf85a181d84e2494ea6f15be311734666bf67
 PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION)
 PKG_SOURCE:=$(PKG_SOURCE_SUBDIR).tar.gz
 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_SOURCE_SUBDIR)
+PKG_INSTALL_DIR:=$(BUILD_DIR)/_install_tmp
 PKG_BUILD_PARALLEL:=1
 
 include $(INCLUDE_DIR)/package.mk
@@ -43,12 +44,12 @@ endef
 
 MAKE_FLAGS:=\
-C $(PKG_BUILD_DIR) \
-   PREFIX=$(PKG_BUILD_DIR)/_install_tmp \
+   PREFIX=$(PKG_INSTALL_DIR) \
install
 
 define Package/micropython-lib/install
$(INSTALL_DIR) $(1)/usr/lib/micropython
-   $(CP) $(PKG_BUILD_DIR)/_install_tmp/* $(1)/usr/lib/micropython
+   $(CP) $(PKG_INSTALL_DIR)/* $(1)/usr/lib/micropython
 endef
 
 $(eval $(call BuildPackage,micropython-lib))
-- 
2.7.4
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel