Re: [OpenWrt-Devel] [PATCH] base-files: Use the same LED timing as before for preinit_regular.

2014-12-29 Thread Vittorio G (VittGam)

Il 29.12.2014 09:04 Rafał Miłecki ha scritto:
1) I think that most OpenWrt users, like me, are accustomed to see a 
led
pattern of 200ms. I thought it was a bad flash or something else bad 
when

I've seen that 500ms blinking...


Is there any reason for that? Was 200ms ever used or documented by 
OpenWrt?


It has always been 200ms... The thing is that preinit_regular has been 
introduced some revisions ago.


Original:
Preinit, failsafe is possible: 200ms
Preinit, failsafe not possible anymore, booting normally: 200ms
Failsafe entered: 50ms

Now (after preinit_regular has been introduced):
Preinit, failsafe is possible: 200ms
Preinit, failsafe not possible anymore, booting normally: 500ms *here 
is the offending change*

Failsafe entered: 50ms

With my proposed patch:
Preinit, failsafe is possible: 100ms *indicate this condition with a 
new timing, that prompts the user to press the key if they want to start 
failsafe*
Preinit, failsafe not possible anymore, booting normally: 200ms *keep 
this as before*

Failsafe entered: 50ms

2) As before means that when failsafe is possible, it is indicated 
by a

new pattern of 100ms. When it is not possible anymore, the
classic/previous 200ms pattern is used.


As before and new pattern seem to be in conflict ;)


As before is referred to 200ms for the normal boot after the 2-second 
failsafe-is-possible condition.


Same question (as above) about the 200ms. What makes it classic or 
previous?


See above.



500ms looks OK for me, just calm booting, not sure about other people
opinion. But I don't like using 50ms / 100ms / 200ms for 3 different
states because I find them too close/similar. Also if preinit was
always using 200ms (am I wrong? can you prove different interval?) I
don't think we should change it to 100ms.


Calm booting is not good, 200ms makes it look like it's booting, 500ms 
seems that there is a problem... IMHO at least ;) (Also please try the 
led patterns on the hardware, the numbers alone might mislead. I thought 
the same of you too before testing...)

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


[OpenWrt-Devel] Please test ep93xx with kernel 3.14

2014-12-29 Thread Hauke Mehrtens
I added support for kernel 3.14 for the ep93xx target [0] in trunk, but
I do not have any hardware to test this, the commit was only compile tested.

If you have some hardware that is supported by the ep93xx target please
build an image with kernel 3.14 and test it on your device. If this
image boots and basically works on your device please report back, if it
does not work please also report back. If anything else which worked
with the old kernel does not work any more please also inform us.

To build the ep93xx target with kernel 3.14 replace
KERNEL_PATCHVER:=3.8 with KERNEL_PATCHVER:=3.14 in the file
target/linux/ep93xx/Makefile and build the ep93xx target.


Hauke

[0]: https://dev.openwrt.org/changeset/43795
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH] base-files: led input trigger error message if kernel module is not loaded

2014-12-29 Thread Lars Kruse
Hi,

I use a custom made image (for our local wifi community) with a TL-WDR4300.
Recently I disabled the config line CONFIG_PACKAGE_kmod-ledtrig-usbdev.
The absence of this module causes a bootup error message:

  root@AP-1-203:/etc/rc.d# /etc/init.d/led start setting up led USB1
  sh: write error: Invalid argument
  /etc/rc.common: eval: line 1: can't create 
/sys/class/leds/tp-link:green:usb1/device_name: nonexistent directory
  /etc/rc.common: eval: line 1: can't create 
/sys/class/leds/tp-link:green:usb1/activity_interval: nonexistent directory
  setting up led USB2
  sh: write error: Invalid argument
  /etc/rc.common: eval: line 1: can't create 
/sys/class/leds/tp-link:green:usb2/device_name: nonexistent directory
  /etc/rc.common: eval: line 1: can't create 
/sys/class/leds/tp-link:green:usb2/activity_interval: nonexistent directory
  setting up led WLAN2G

After installing and loading the ledtrig-usbdev module the above runs fine
without error messages.

Attached you find a patch that checks the result of the trigger attempt and
emits a graceful error message with an explanation regarding the missing kernel
module instead of the rather mysterious error messages above.

Cheers,
Lars


Verify the support of the led trigger input source and complain in a helpful
way if modules are missing during bootup.

Signed-off-by: Lars Kruse de...@sumpfralle.de
---
diff -ruN a/openwrt/package/base-files/files/etc/init.d/led 
b/openwrt/package/base-files/files/etc/init.d/led
--- a/openwrt/package/base-files/files/etc/init.d/led
+++ b/openwrt/package/base-files/files/etc/init.d/led
@@ -40,7 +40,11 @@
[ $default -eq 1 ] ||
echo 0 /sys/class/leds/${sysfs}/brightness
}
-   echo $trigger  /sys/class/leds/${sysfs}/trigger
+   # this may fail if the module is not loaded
+   if ! echo $trigger  /sys/class/leds/${sysfs}/trigger 
2/dev/null; then
+   echo 2 Skipping trigger '$trigger' for led '$name' 
due to missing kernel module
+   return 0
+   fi
case $trigger in
netdev)
[ -n $dev ]  {
--
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH] Comgt: Add option to ignore ioctl errors

2014-12-29 Thread Matti Laakso
Some Huawei mobile broadband sticks utilizing the NCM protocol expose
the control channel as a cdc-wdm device node instead of a virtual serial
port. This device node does not support the serial port ioctls. Add command
line option to not check whether ioctls are successful so that AT commands
can also be sent to these devices.

Signed-off-by: Matti Laakso malaa...@elisanet.fi
---
 .../utils/comgt/patches/004-add_force_option.patch | 66 ++
 1 file changed, 66 insertions(+)
 create mode 100644 
package/network/utils/comgt/patches/004-add_force_option.patch

diff --git a/package/network/utils/comgt/patches/004-add_force_option.patch 
b/package/network/utils/comgt/patches/004-add_force_option.patch
new file mode 100644
index 000..1690e5c
--- /dev/null
+++ b/package/network/utils/comgt/patches/004-add_force_option.patch
@@ -0,0 +1,66 @@
+--- a/comgt.c
 b/comgt.c
+@@ -91,6 +91,7 @@ unsigned long hstart,hset;
+ char NullString[]={  };
+ BOOL lastcharnl=1; /* Indicate that last char printed from getonebyte
+was a nl, so no new one is needed */
++BOOL force=0;
+ 
+ 
+ //open com \/dev/modem\\nset com 38400n81\nset senddelay 0.05\nsend 
\ATi^m\\nget 2 \ ^m\ $s\nprint \Response : \,$s,\\\n\\nget 2 \ ^m\ 
$s\nprint \Response :\,$s,\\\n\\nget 2 \ ^m\ $s\nprint \Response : 
\,$s,\\\n\\n\n;
+@@ -920,7 +921,7 @@ BOOL getonoroff(void) {
+ void setcom(void) {
+   stbuf.c_cflag = ~(CBAUD | CSIZE | CSTOPB | CLOCAL | PARENB);
+   stbuf.c_cflag |= (speed | bits | CREAD | clocal | parity | stopbits );
+-  if (ioctl(comfd, TCSETA, stbuf)  0) {
++  if (ioctl(comfd, TCSETA, stbuf)  0  !force) {
+ serror(Can't ioctl set device,1);
+   }
+ }
+@@ -1224,7 +1225,7 @@ void doclose(void) {
+   if(strcmp(token,hardcom)==0) {
+ if(comfd== -1) serror(Com device not open,1);
+ vmsg(Closing device);
+-if (ioctl(comfd, TCSETA, svbuf)  0) {
++if (ioctl(comfd, TCSETA, svbuf)  0  !force) {
+   sprintf(msg,Can't ioctl set device %s.\n,device);
+   serror(msg,1);
+ }
+@@ -1266,7 +1267,7 @@ void opengt(void) {
+   ext(1);
+ }
+   }
+-  if (ioctl (comfd, TCGETA, svbuf)  0) {
++  if (ioctl (comfd, TCGETA, svbuf)  0  !force) {
+ sprintf(msg,Can't control %s, please try again.\n,device);
+ serror(msg,1);
+   }
+@@ -1303,7 +1304,7 @@ void opendevice(void) {
+   }
+   else comfd=0;
+ 
+-  if (ioctl (comfd, TCGETA, svbuf)  0) {
++  if (ioctl (comfd, TCGETA, svbuf)  0  !force) {
+ sprintf(msg,Can't ioctl get device %s.\n,device);
+ serror(msg,1);
+   }
+@@ -1567,7 +1568,7 @@ int main(int argc,char **argv) {
+   for(a=0;astrlen(argv[0]);a++) {
+ if(argv[0][a]=='/') b=a+1;
+   }
+-  while((aa=getopt(argc,argv,xheVvd:t:sb:))!= -1) {
++  while((aa=getopt(argc,argv,xheVvd:t:sb:f))!= -1) {
+ switch(aa) {
+   case 0:
+ ext(0);
+@@ -1605,6 +1606,10 @@ int main(int argc,char **argv) {
+ printf(High speed overide (115200 is now 57600).\n);
+ high_speed =1;
+ break;
++  case 'f':
++force=1;
++vmsg(Ignoring ioctl errors);
++break;
+   default:
+ ext(1);
+ }
-- 
2.1.0
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] Please test mpc52xx with kernel 3.14

2014-12-29 Thread Hauke Mehrtens
I added support for kernel 3.14 for the mpc52xx target [0] in trunk, but
I do not have any hardware to test this, the commit was only compile tested.

If you have some hardware that is supported by the mpc52xx target please
build an image with kernel 3.14 and test it on your device. If this
image boots and basically works on your device please report back, if it
does not work please also report back. If anything else which worked
with the old kernel does not work any more please also inform us.

To build the mpc52xx target with kernel 3.14 replace
KERNEL_PATCHVER:=3.8 with KERNEL_PATCHVER:=3.14 in the file
target/linux/mpc52xx/Makefile and build the mpc52xx target.


Hauke

[0]: https://dev.openwrt.org/changeset/43796
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] Please test mpc83xx with kernel 3.14

2014-12-29 Thread Hauke Mehrtens
I added support for kernel 3.14 for the mpc83xx target [0] in trunk, but
I do not have any hardware to test this, the commit was only compile tested.

If you have some hardware that is supported by the mpc83xx target please
build an image with kernel 3.14 and test it on your device. If this
image boots and basically works on your device please report back, if it
does not work please also report back. If anything else which worked
with the old kernel does not work any more please also inform us.

To build the mpc83xx target with kernel 3.14 replace
KERNEL_PATCHVER:=3.8 with KERNEL_PATCHVER:=3.14 in the file
target/linux/mpc83xx/Makefile and build the mpc83xx target.


Hauke

[0]: https://dev.openwrt.org/changeset/43797
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 2/3] e2fsprogs: package dumpe2fs, e2freefrag, filefrag, debugfs

2014-12-29 Thread Maxim Storchak
Signed-off-by: Maxim Storchak m.storc...@gmail.com

diff --git a/package/utils/e2fsprogs/Makefile b/package/utils/e2fsprogs/Makefile
index 09c4833..969f0d6 100644
--- a/package/utils/e2fsprogs/Makefile
+++ b/package/utils/e2fsprogs/Makefile
@@ -67,6 +67,30 @@ $(call Package/e2fsprogs)
   DEPENDS:= +e2fsprogs
 endef
 
+define Package/dumpe2fs
+$(call Package/e2fsprogs)
+  TITLE:=Ext2 Filesystem information dumping utility
+  DEPENDS:= +e2fsprogs
+endef
+
+define Package/e2freefrag
+$(call Package/e2fsprogs)
+  TITLE:=Ext2 Filesystem free space fragmentation information utility
+  DEPENDS:= +e2fsprogs
+endef
+
+define Package/filefrag
+$(call Package/e2fsprogs)
+  TITLE:=Ext2 Filesystem file fragmentation report utility
+  DEPENDS:= +e2fsprogs
+endef
+
+define Package/debugfs
+$(call Package/e2fsprogs)
+  TITLE:=Ext2 Filesystem debugger
+  DEPENDS:= +e2fsprogs
+endef
+
 TARGET_CFLAGS += $(FPIC) -ffunction-sections -fdata-sections
 
 CONFIGURE_VARS += \
@@ -163,8 +187,34 @@ define Package/badblocks/install
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/badblocks $(1)/usr/sbin/
 endef
 
+define Package/dumpe2fs/install
+   $(INSTALL_DIR) $(1)/usr/sbin
+   $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/dumpe2fs $(1)/usr/sbin/
+endef
+
+define Package/e2freefrag/install
+   $(INSTALL_DIR) $(1)/usr/sbin
+   $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/e2freefrag $(1)/usr/sbin/
+endef
+
+define Package/filefrag/install
+   $(INSTALL_DIR) $(1)/usr/sbin
+   $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/filefrag $(1)/usr/sbin/
+endef
+
+define Package/debugfs/install
+   $(INSTALL_DIR) $(1)/usr/sbin
+   $(INSTALL_DIR) $(1)/usr/lib
+   $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/debugfs $(1)/usr/sbin/
+   $(CP) $(PKG_INSTALL_DIR)/usr/lib/libss.so.* $(1)/usr/lib/
+endef
+
 $(eval $(call BuildPackage,e2fsprogs))
 $(eval $(call BuildPackage,libext2fs))
 $(eval $(call BuildPackage,tune2fs))
 $(eval $(call BuildPackage,resize2fs))
 $(eval $(call BuildPackage,badblocks))
+$(eval $(call BuildPackage,dumpe2fs))
+$(eval $(call BuildPackage,e2freefrag))
+$(eval $(call BuildPackage,filefrag))
+$(eval $(call BuildPackage,debugfs))
-- 
1.7.10.4
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 1/3] e2fsprogs: bump release

2014-12-29 Thread Maxim Storchak
Signed-off-by: Maxim Storchak m.storc...@gmail.com

diff --git a/package/utils/e2fsprogs/Makefile b/package/utils/e2fsprogs/Makefile
index b91c957..09c4833 100644
--- a/package/utils/e2fsprogs/Makefile
+++ b/package/utils/e2fsprogs/Makefile
@@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk
 PKG_NAME:=e2fsprogs
 PKG_VERSION:=1.42.4
 PKG_MD5SUM:=b6e296f210d642361b7394437ff0f318
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=@SF/e2fsprogs
-- 
1.7.10.4
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 3/3] e2fsprogs: symlink e2fsck to fsck.ext{2, 3, 4}, and tune2fs to findfs

2014-12-29 Thread Maxim Storchak
Signed-off-by: Maxim Storchak m.storc...@gmail.com

diff --git a/package/utils/e2fsprogs/Makefile b/package/utils/e2fsprogs/Makefile
index 969f0d6..a2ce999 100644
--- a/package/utils/e2fsprogs/Makefile
+++ b/package/utils/e2fsprogs/Makefile
@@ -148,6 +148,9 @@ define Package/e2fsprogs/install
$(LN) mke2fs $(1)/usr/sbin/mkfs.ext2
$(LN) mke2fs $(1)/usr/sbin/mkfs.ext3
$(LN) mke2fs $(1)/usr/sbin/mkfs.ext4
+   $(LN) e2fsck $(1)/usr/sbin/fsck.ext2
+   $(LN) e2fsck $(1)/usr/sbin/fsck.ext3
+   $(LN) e2fsck $(1)/usr/sbin/fsck.ext4
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libe2p.so.* $(1)/usr/lib/
$(INSTALL_DIR) $(1)/etc/init.d
@@ -175,6 +178,7 @@ endef
 define Package/tune2fs/install
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/tune2fs $(1)/usr/sbin/
+   $(LN) tune2fs $(1)/usr/sbin/findfs
 endef
 
 define Package/resize2fs/install
-- 
1.7.10.4
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH] feeds.conf.default: add dlan feed

2014-12-29 Thread Michael Heimpold
Since mcs814x/dLAN-USB-Extender profile refers to some packages in this
feed, we should list it here.

Signed-off-by: Michael Heimpold m...@heimpold.de
---
 feeds.conf.default |1 +
 1 file changed, 1 insertion(+)

diff --git a/feeds.conf.default b/feeds.conf.default
index 208342c..16f07d0 100644
--- a/feeds.conf.default
+++ b/feeds.conf.default
@@ -3,6 +3,7 @@ src-git luci https://github.com/openwrt/luci.git
 src-git routing https://github.com/openwrt-routing/packages.git
 src-git telephony https://github.com/openwrt/telephony.git
 src-git management https://github.com/openwrt-management/packages.git
+src-git dlan https://github.com/ffainelli/dlan-usb-extender-3rd-party.git
 #src-git oldpackages http://git.openwrt.org/packages.git
 #src-svn xwrt http://x-wrt.googlecode.com/svn/trunk/package
 #src-svn phone svn://svn.openwrt.org/openwrt/feeds/phone
-- 
1.7.10.4
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH] ar71xx: add support for the UniFi AP Outdoor Plus

2014-12-29 Thread Matthias Schiffer
Signed-off-by: Matthias Schiffer mschif...@universe-factory.net
---
 target/linux/ar71xx/base-files/etc/diag.sh |  3 ++
 target/linux/ar71xx/base-files/lib/ar71xx.sh   |  3 ++
 .../ar71xx/base-files/lib/upgrade/platform.sh  |  2 +
 target/linux/ar71xx/image/Makefile |  3 +-
 .../610-MIPS-ath79-openwrt-machines.patch  |  3 +-
 .../patches-3.14/616-MIPS-ath79-ubnt-xw.patch  | 61 +-
 6 files changed, 72 insertions(+), 3 deletions(-)

diff --git a/target/linux/ar71xx/base-files/etc/diag.sh 
b/target/linux/ar71xx/base-files/etc/diag.sh
index 06b96a3..30e4aeb 100755
--- a/target/linux/ar71xx/base-files/etc/diag.sh
+++ b/target/linux/ar71xx/base-files/etc/diag.sh
@@ -254,6 +254,9 @@ get_status_led() {
uap-pro)
status_led=ubnt:white:dome
;;
+   unifi-outdoor-plus)
+   status_led=ubnt:white:front
+   ;;
airgateway)
status_led=ubnt:white:status
;;
diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh 
b/target/linux/ar71xx/base-files/lib/ar71xx.sh
index 9b056e9..a12101a 100755
--- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
+++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh
@@ -732,6 +732,9 @@ ar71xx_board_detect() {
*UniFiAP Outdoor)
name=unifi-outdoor
;;
+   *UniFiAP Outdoor+)
+   name=unifi-outdoor-plus
+   ;;
*WP543)
name=wp543
;;
diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh 
b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
index 6dabf4e..2752729 100755
--- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
@@ -368,6 +368,7 @@ platform_check_image() {
return 1
;;
 
+   unifi-outdoor-plus | \
uap-pro)
[ $magic_long != 19852003 ]  {
echo Invalid image type.
@@ -483,6 +484,7 @@ platform_do_upgrade() {
om5p)
platform_do_upgrade_openmesh $ARGV
;;
+   unifi-outdoor-plus | \
uap-pro)
MTD_CONFIG_ARGS=-s 0x18
default_do_upgrade $ARGV
diff --git a/target/linux/ar71xx/image/Makefile 
b/target/linux/ar71xx/image/Makefile
index 18c9637..3eb2f07 100644
--- a/target/linux/ar71xx/image/Makefile
+++ b/target/linux/ar71xx/image/Makefile
@@ -1333,6 +1333,7 @@ $(eval $(call 
SingleProfile,TPLINK-LZMA,64kraw,SMART-300,smart-300,SMART-300,tty
 $(eval $(call 
SingleProfile,TPLINK-LZMA,64kraw,OOLITE,oolite,GS-OOLITE,ttyATH0,115200,0x3C000101,1,16Mlzma))
 
 $(eval $(call 
SingleProfile,UAPPRO,64k,UAPPRO,ubnt-uap-pro,UAP-PRO,ttyS0,115200,BZ,BZ,ar934x))
+$(eval $(call 
SingleProfile,UAPPRO,64k,UBNTUNIFIOUTDOORPLUS,ubnt-unifi-outdoor-plus,UBNT-UOP,ttyS0,115200,BZ,BZ,ar7240))
 
 $(eval $(call 
SingleProfile,UBDEV,64kraw,UBDEV01,ubdev01,UBNT-UF,ttyS0,115200,XM,XM,ar7240))
 
@@ -1396,7 +1397,7 @@ $(eval $(call MultiProfile,TLWR941,TLWR941NV2 TLWR941NV3 
TLWR941NV4 TLWR941NV6))
 $(eval $(call MultiProfile,TLWR1043,TLWR1043V1 TLWR1043V2))
 $(eval $(call MultiProfile,TLWDR4300,TLWDR3500V1 TLWDR3600V1 TLWDR4300V1 
TLWDR4300V1IL TLWDR4310V1 MW4530RV1))
 $(eval $(call MultiProfile,TUBE2H,TUBE2H8M TUBE2H16M))
-$(eval $(call MultiProfile,UBNT,UBNTAIRROUTER UBNTRS UBNTRSPRO UBNTLSSR71 
UBNTBULLETM UBNTROCKETM UBNTNANOM UBNTNANOMXW UBNTLOCOXW UBNTUNIFI 
UBNTUNIFIOUTDOOR UAPPRO UBNTAIRGW))
+$(eval $(call MultiProfile,UBNT,UBNTAIRROUTER UBNTRS UBNTRSPRO UBNTLSSR71 
UBNTBULLETM UBNTROCKETM UBNTNANOM UBNTNANOMXW UBNTLOCOXW UBNTUNIFI 
UBNTUNIFIOUTDOOR UBNTUNIFIOUTDOORPLUS UAPPRO UBNTAIRGW))
 $(eval $(call MultiProfile,WNDR3700,WNDR3700V1 WNDR3700V2 WNDR3800 WNDR3800CH 
WNDRMAC WNDRMACV2))
 $(eval $(call MultiProfile,WNR612V2,REALWNR612V2 N150R))
 $(eval $(call MultiProfile,WP543,WP543_2M WP543_4M WP543_8M WP543_16M))
diff --git 
a/target/linux/ar71xx/patches-3.14/610-MIPS-ath79-openwrt-machines.patch 
b/target/linux/ar71xx/patches-3.14/610-MIPS-ath79-openwrt-machines.patch
index 4ce9268..b01c5de 100644
--- a/target/linux/ar71xx/patches-3.14/610-MIPS-ath79-openwrt-machines.patch
+++ b/target/linux/ar71xx/patches-3.14/610-MIPS-ath79-openwrt-machines.patch
@@ -1,6 +1,6 @@
 --- a/arch/mips/ath79/machtypes.h
 +++ b/arch/mips/ath79/machtypes.h
-@@ -16,22 +16,145 @@
+@@ -16,22 +16,146 @@
  
  enum ath79_mach_type {
ATH79_MACH_GENERIC = 0,
@@ -119,6 +119,7 @@
ATH79_MACH_UBNT_UAP_PRO,/* Ubiquiti UniFi AP Pro */
ATH79_MACH_UBNT_UNIFI,  /* Ubiquiti Unifi */
ATH79_MACH_UBNT_UNIFI_OUTDOOR,  /* Ubiquiti UnifiAP Outdoor */
++  ATH79_MACH_UBNT_UNIFI_OUTDOOR_PLUS, /* Ubiquiti UnifiAP Outdoor+ */
ATH79_MACH_UBNT_XM, /* Ubiquiti Networks XM board rev 1.0 */
 +  ATH79_MACH_WHR_G301N,   /* Buffalo WHR-G301N */
 +  ATH79_MACH_WHR_HP_G300N,   

[OpenWrt-Devel] [PATCH] kernel: bridge: multicast: backport a few more fixes for 3.10

2014-12-29 Thread Linus Lüssing
The following patches unfortunately didn't hit the kernel stable
branches yet, therefore cherrypicking them for OpenWRT here:

* bridge: fix netfilter/NF_BR_LOCAL_OUT for own, locally generated queries
* bridge: multicast: enable snooping on general queries only
* bridge: multicast: add sanity check for general query destination

Signed-off-by: Linus Lüssing linus.luess...@c0d3.blue
---
 .../patches-3.10/070-net_bridge_backports.patch|  193 
 .../644-bridge_optimize_netfilter_hooks.patch  |6 +-
 2 files changed, 162 insertions(+), 37 deletions(-)

diff --git a/target/linux/generic/patches-3.10/070-net_bridge_backports.patch 
b/target/linux/generic/patches-3.10/070-net_bridge_backports.patch
index f303c3a..48d6eda 100644
--- a/target/linux/generic/patches-3.10/070-net_bridge_backports.patch
+++ b/target/linux/generic/patches-3.10/070-net_bridge_backports.patch
@@ -1,3 +1,88 @@
+commit f0b4eeced518c632210ef2aea44fc92cc9e86cce
+Author: Linus Lüssing linus.luess...@web.de
+Date:   Mon Nov 17 12:20:28 2014 +0100
+
+bridge: fix netfilter/NF_BR_LOCAL_OUT for own, locally generated queries
+
+Ebtables on the OUTPUT chain (NF_BR_LOCAL_OUT) would not work as expected
+for both locally generated IGMP and MLD queries. The IP header specific
+filter options are off by 14 Bytes for netfilter (actual output on
+interfaces is fine).
+
+NF_HOOK() expects the skb-data to point to the IP header, not the
+ethernet one (while dev_queue_xmit() does not). Luckily there is an
+br_dev_queue_push_xmit() helper function already - let's just use that.
+
+Introduced by eb1d16414339a6e113d89e2cca2556005d7ce919
+(bridge: Add core IGMP snooping support)
+
+Ebtables example:
+
+$ ebtables -I OUTPUT -p IPv6 -o eth1 --logical-out br0 \
+--log --log-level 6 --log-ip6 --log-prefix=~EBT:  -j DROP
+
+before (broken):
+
+~EBT:  IN= OUT=eth1 MAC source = 02:04:64:a4:39:c2 \
+MAC dest = 33:33:00:00:00:01 proto = 0x86dd IPv6 \
+SRC=64a4:39c2:86dd:6000::0020:0001:fe80 IPv6 \
+DST=:::0004:64ff:fea4:39c2:ff02, \
+IPv6 priority=0x3, Next Header=2
+
+after (working):
+
+~EBT:  IN= OUT=eth1 MAC source = 02:04:64:a4:39:c2 \
+   MAC dest = 33:33:00:00:00:01 proto = 0x86dd IPv6 \
+SRC=fe80::::0004:64ff:fea4:39c2 IPv6 \
+DST=ff02:::::::0001, \
+IPv6 priority=0x0, Next Header=0
+
+Signed-off-by: Linus Lüssing linus.luess...@web.de
+Acked-by: Herbert Xu herb...@gondor.apana.org.au
+Signed-off-by: Pablo Neira Ayuso pa...@netfilter.org
+
+commit 20a599bec95a52fa72432b2376a2ce47c5bb68fb
+Author: Linus Lüssing linus.luess...@web.de
+Date:   Mon Mar 10 22:25:25 2014 +0100
+
+bridge: multicast: enable snooping on general queries only
+
+Without this check someone could easily create a denial of service
+by injecting multicast-specific queries to enable the bridge
+snooping part if no real querier issuing periodic general queries
+is present on the link which would result in the bridge wrongly
+shutting down ports for multicast traffic as the bridge did not learn
+about these listeners.
+
+With this patch the snooping code is enabled upon receiving valid,
+general queries only.
+
+Signed-off-by: Linus Lüssing linus.luess...@web.de
+Signed-off-by: David S. Miller da...@davemloft.net
+
+commit 9ed973cc40c588abeaa58aea0683ea665132d11d
+Author: Linus Lüssing linus.luess...@web.de
+Date:   Mon Mar 10 22:25:24 2014 +0100
+
+bridge: multicast: add sanity check for general query destination
+
+General IGMP and MLD queries are supposed to have the multicast
+link-local all-nodes address as their destination according to RFC2236
+section 9, RFC3376 section 4.1.12/9.1, RFC2710 section 8 and RFC3810
+section 5.1.15.
+
+Without this check, such malformed IGMP/MLD queries can result in a
+denial of service: The queries are ignored by most IGMP/MLD listeners
+therefore they will not respond with an IGMP/MLD report. However,
+without this patch these malformed MLD queries would enable the
+snooping part in the bridge code, potentially shutting down the
+according ports towards these hosts for multicast traffic as the
+bridge did not learn about these listeners.
+
+Reported-by: Jan Stancek jstan...@redhat.com
+Signed-off-by: Linus Lüssing linus.luess...@web.de
+Signed-off-by: David S. Miller da...@davemloft.net
+
 commit 3c3769e63301fd92fcaf51870c371583dd0282ce
 Author: Linus Lüssing linus.luess...@web.de
 Date:   Wed Sep 4 02:13:39 2013 +0200
@@ -229,7 +314,17 @@ Date:   Tue May 21 21:52:54 2013 +
  static void __br_multicast_send_query(struct net_bridge *br,
  struct net_bridge_port *port,
  struct br_ip *ip)
-@@ -790,37 +809,45 @@ static void __br_multicast_send_query(st
+@@ 

Re: [OpenWrt-Devel] [PATCH] ar71xx: add support for the UniFi AP Outdoor Plus

2014-12-29 Thread David Hutchison
Does the new kernel / ath9k address the RF Filter on this board? I
came up with an old patch for this board, but whenever I changed the
channel inside OpenWRT the signal would just disappear. The RF Filter
has to be toggled somehow ( I assume it's a GPIO of some sort ). I am
just curious on how it was fixed, or if it's still an issue.

-- Davey

On Mon, Dec 29, 2014 at 8:01 PM, Matthias Schiffer
mschif...@universe-factory.net wrote:
 Signed-off-by: Matthias Schiffer mschif...@universe-factory.net
 ---
  target/linux/ar71xx/base-files/etc/diag.sh |  3 ++
  target/linux/ar71xx/base-files/lib/ar71xx.sh   |  3 ++
  .../ar71xx/base-files/lib/upgrade/platform.sh  |  2 +
  target/linux/ar71xx/image/Makefile |  3 +-
  .../610-MIPS-ath79-openwrt-machines.patch  |  3 +-
  .../patches-3.14/616-MIPS-ath79-ubnt-xw.patch  | 61 
 +-
  6 files changed, 72 insertions(+), 3 deletions(-)

 diff --git a/target/linux/ar71xx/base-files/etc/diag.sh 
 b/target/linux/ar71xx/base-files/etc/diag.sh
 index 06b96a3..30e4aeb 100755
 --- a/target/linux/ar71xx/base-files/etc/diag.sh
 +++ b/target/linux/ar71xx/base-files/etc/diag.sh
 @@ -254,6 +254,9 @@ get_status_led() {
 uap-pro)
 status_led=ubnt:white:dome
 ;;
 +   unifi-outdoor-plus)
 +   status_led=ubnt:white:front
 +   ;;
 airgateway)
 status_led=ubnt:white:status
 ;;
 diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh 
 b/target/linux/ar71xx/base-files/lib/ar71xx.sh
 index 9b056e9..a12101a 100755
 --- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
 +++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh
 @@ -732,6 +732,9 @@ ar71xx_board_detect() {
 *UniFiAP Outdoor)
 name=unifi-outdoor
 ;;
 +   *UniFiAP Outdoor+)
 +   name=unifi-outdoor-plus
 +   ;;
 *WP543)
 name=wp543
 ;;
 diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh 
 b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
 index 6dabf4e..2752729 100755
 --- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
 +++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
 @@ -368,6 +368,7 @@ platform_check_image() {
 return 1
 ;;

 +   unifi-outdoor-plus | \
 uap-pro)
 [ $magic_long != 19852003 ]  {
 echo Invalid image type.
 @@ -483,6 +484,7 @@ platform_do_upgrade() {
 om5p)
 platform_do_upgrade_openmesh $ARGV
 ;;
 +   unifi-outdoor-plus | \
 uap-pro)
 MTD_CONFIG_ARGS=-s 0x18
 default_do_upgrade $ARGV
 diff --git a/target/linux/ar71xx/image/Makefile 
 b/target/linux/ar71xx/image/Makefile
 index 18c9637..3eb2f07 100644
 --- a/target/linux/ar71xx/image/Makefile
 +++ b/target/linux/ar71xx/image/Makefile
 @@ -1333,6 +1333,7 @@ $(eval $(call 
 SingleProfile,TPLINK-LZMA,64kraw,SMART-300,smart-300,SMART-300,tty
  $(eval $(call 
 SingleProfile,TPLINK-LZMA,64kraw,OOLITE,oolite,GS-OOLITE,ttyATH0,115200,0x3C000101,1,16Mlzma))

  $(eval $(call 
 SingleProfile,UAPPRO,64k,UAPPRO,ubnt-uap-pro,UAP-PRO,ttyS0,115200,BZ,BZ,ar934x))
 +$(eval $(call 
 SingleProfile,UAPPRO,64k,UBNTUNIFIOUTDOORPLUS,ubnt-unifi-outdoor-plus,UBNT-UOP,ttyS0,115200,BZ,BZ,ar7240))

  $(eval $(call 
 SingleProfile,UBDEV,64kraw,UBDEV01,ubdev01,UBNT-UF,ttyS0,115200,XM,XM,ar7240))

 @@ -1396,7 +1397,7 @@ $(eval $(call MultiProfile,TLWR941,TLWR941NV2 
 TLWR941NV3 TLWR941NV4 TLWR941NV6))
  $(eval $(call MultiProfile,TLWR1043,TLWR1043V1 TLWR1043V2))
  $(eval $(call MultiProfile,TLWDR4300,TLWDR3500V1 TLWDR3600V1 TLWDR4300V1 
 TLWDR4300V1IL TLWDR4310V1 MW4530RV1))
  $(eval $(call MultiProfile,TUBE2H,TUBE2H8M TUBE2H16M))
 -$(eval $(call MultiProfile,UBNT,UBNTAIRROUTER UBNTRS UBNTRSPRO UBNTLSSR71 
 UBNTBULLETM UBNTROCKETM UBNTNANOM UBNTNANOMXW UBNTLOCOXW UBNTUNIFI 
 UBNTUNIFIOUTDOOR UAPPRO UBNTAIRGW))
 +$(eval $(call MultiProfile,UBNT,UBNTAIRROUTER UBNTRS UBNTRSPRO UBNTLSSR71 
 UBNTBULLETM UBNTROCKETM UBNTNANOM UBNTNANOMXW UBNTLOCOXW UBNTUNIFI 
 UBNTUNIFIOUTDOOR UBNTUNIFIOUTDOORPLUS UAPPRO UBNTAIRGW))
  $(eval $(call MultiProfile,WNDR3700,WNDR3700V1 WNDR3700V2 WNDR3800 
 WNDR3800CH WNDRMAC WNDRMACV2))
  $(eval $(call MultiProfile,WNR612V2,REALWNR612V2 N150R))
  $(eval $(call MultiProfile,WP543,WP543_2M WP543_4M WP543_8M WP543_16M))
 diff --git 
 a/target/linux/ar71xx/patches-3.14/610-MIPS-ath79-openwrt-machines.patch 
 b/target/linux/ar71xx/patches-3.14/610-MIPS-ath79-openwrt-machines.patch
 index 4ce9268..b01c5de 100644
 --- a/target/linux/ar71xx/patches-3.14/610-MIPS-ath79-openwrt-machines.patch
 +++ b/target/linux/ar71xx/patches-3.14/610-MIPS-ath79-openwrt-machines.patch
 @@ -1,6 +1,6 @@
  --- a/arch/mips/ath79/machtypes.h
  +++ b/arch/mips/ath79/machtypes.h
 -@@ -16,22 +16,145 @@
 +@@ -16,22 +16,146 @@

   

Re: [OpenWrt-Devel] [PATCH] ar71xx: add support for the UniFi AP Outdoor Plus

2014-12-29 Thread Matthias Schiffer
I had read the mails regarding the issue and I've asked about it in
#openwrt-devel (but didn't get an answer yet). I didn't try changing the
channel though as I'm in a very noisy environment (WLAN-wise) at the
moment, so I can't really do any proper testing.

If it's only a GPIO issue, I could look at it, but I don't know enough
about ath9k to do more complex fixes. Unfortunately, I don't have the
device anymore, so I can't perform further tests myself.


On 12/30/2014 05:42 AM, David Hutchison wrote:
 Does the new kernel / ath9k address the RF Filter on this board? I
 came up with an old patch for this board, but whenever I changed the
 channel inside OpenWRT the signal would just disappear. The RF Filter
 has to be toggled somehow ( I assume it's a GPIO of some sort ). I am
 just curious on how it was fixed, or if it's still an issue.
 
 -- Davey
 
 On Mon, Dec 29, 2014 at 8:01 PM, Matthias Schiffer
 mschif...@universe-factory.net wrote:
 Signed-off-by: Matthias Schiffer mschif...@universe-factory.net
 ---
  target/linux/ar71xx/base-files/etc/diag.sh |  3 ++
  target/linux/ar71xx/base-files/lib/ar71xx.sh   |  3 ++
  .../ar71xx/base-files/lib/upgrade/platform.sh  |  2 +
  target/linux/ar71xx/image/Makefile |  3 +-
  .../610-MIPS-ath79-openwrt-machines.patch  |  3 +-
  .../patches-3.14/616-MIPS-ath79-ubnt-xw.patch  | 61 
 +-
  6 files changed, 72 insertions(+), 3 deletions(-)

 diff --git a/target/linux/ar71xx/base-files/etc/diag.sh 
 b/target/linux/ar71xx/base-files/etc/diag.sh
 index 06b96a3..30e4aeb 100755
 --- a/target/linux/ar71xx/base-files/etc/diag.sh
 +++ b/target/linux/ar71xx/base-files/etc/diag.sh
 @@ -254,6 +254,9 @@ get_status_led() {
 uap-pro)
 status_led=ubnt:white:dome
 ;;
 +   unifi-outdoor-plus)
 +   status_led=ubnt:white:front
 +   ;;
 airgateway)
 status_led=ubnt:white:status
 ;;
 diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh 
 b/target/linux/ar71xx/base-files/lib/ar71xx.sh
 index 9b056e9..a12101a 100755
 --- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
 +++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh
 @@ -732,6 +732,9 @@ ar71xx_board_detect() {
 *UniFiAP Outdoor)
 name=unifi-outdoor
 ;;
 +   *UniFiAP Outdoor+)
 +   name=unifi-outdoor-plus
 +   ;;
 *WP543)
 name=wp543
 ;;
 diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh 
 b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
 index 6dabf4e..2752729 100755
 --- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
 +++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
 @@ -368,6 +368,7 @@ platform_check_image() {
 return 1
 ;;

 +   unifi-outdoor-plus | \
 uap-pro)
 [ $magic_long != 19852003 ]  {
 echo Invalid image type.
 @@ -483,6 +484,7 @@ platform_do_upgrade() {
 om5p)
 platform_do_upgrade_openmesh $ARGV
 ;;
 +   unifi-outdoor-plus | \
 uap-pro)
 MTD_CONFIG_ARGS=-s 0x18
 default_do_upgrade $ARGV
 diff --git a/target/linux/ar71xx/image/Makefile 
 b/target/linux/ar71xx/image/Makefile
 index 18c9637..3eb2f07 100644
 --- a/target/linux/ar71xx/image/Makefile
 +++ b/target/linux/ar71xx/image/Makefile
 @@ -1333,6 +1333,7 @@ $(eval $(call 
 SingleProfile,TPLINK-LZMA,64kraw,SMART-300,smart-300,SMART-300,tty
  $(eval $(call 
 SingleProfile,TPLINK-LZMA,64kraw,OOLITE,oolite,GS-OOLITE,ttyATH0,115200,0x3C000101,1,16Mlzma))

  $(eval $(call 
 SingleProfile,UAPPRO,64k,UAPPRO,ubnt-uap-pro,UAP-PRO,ttyS0,115200,BZ,BZ,ar934x))
 +$(eval $(call 
 SingleProfile,UAPPRO,64k,UBNTUNIFIOUTDOORPLUS,ubnt-unifi-outdoor-plus,UBNT-UOP,ttyS0,115200,BZ,BZ,ar7240))

  $(eval $(call 
 SingleProfile,UBDEV,64kraw,UBDEV01,ubdev01,UBNT-UF,ttyS0,115200,XM,XM,ar7240))

 @@ -1396,7 +1397,7 @@ $(eval $(call MultiProfile,TLWR941,TLWR941NV2 
 TLWR941NV3 TLWR941NV4 TLWR941NV6))
  $(eval $(call MultiProfile,TLWR1043,TLWR1043V1 TLWR1043V2))
  $(eval $(call MultiProfile,TLWDR4300,TLWDR3500V1 TLWDR3600V1 TLWDR4300V1 
 TLWDR4300V1IL TLWDR4310V1 MW4530RV1))
  $(eval $(call MultiProfile,TUBE2H,TUBE2H8M TUBE2H16M))
 -$(eval $(call MultiProfile,UBNT,UBNTAIRROUTER UBNTRS UBNTRSPRO UBNTLSSR71 
 UBNTBULLETM UBNTROCKETM UBNTNANOM UBNTNANOMXW UBNTLOCOXW UBNTUNIFI 
 UBNTUNIFIOUTDOOR UAPPRO UBNTAIRGW))
 +$(eval $(call MultiProfile,UBNT,UBNTAIRROUTER UBNTRS UBNTRSPRO UBNTLSSR71 
 UBNTBULLETM UBNTROCKETM UBNTNANOM UBNTNANOMXW UBNTLOCOXW UBNTUNIFI 
 UBNTUNIFIOUTDOOR UBNTUNIFIOUTDOORPLUS UAPPRO UBNTAIRGW))
  $(eval $(call MultiProfile,WNDR3700,WNDR3700V1 WNDR3700V2 WNDR3800 
 WNDR3800CH WNDRMAC WNDRMACV2))
  $(eval $(call MultiProfile,WNR612V2,REALWNR612V2 N150R))
  $(eval $(call MultiProfile,WP543,WP543_2M 

[OpenWrt-Devel] netifd: network reload ignores country change

2014-12-29 Thread Rafał Miłecki
I got wrong country set and couldn't use channels 12/13. So I set:
wireless.radio1.country=pl
however calling
/etc/init.d/network reload
didn't do anything. It seems netifd doesn't notice country change.

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