[OpenWrt-Devel] [PATCH 3/3] mvebu: Add Armada 388 General Purpose Development Board support

2015-08-23 Thread Jonas Gorski
The A388-GP is a board produced by Marvell that holds

- 1 PCIe slot
- 2 mini PCIe slot (one of them is multiplexed with the PCIe slot,
  muxing is selected through the GPIO expander)
- 1 16MB SPI-NOR
- 2 Gigabit Ethernet ports
- 4 SATA ports (2 of them are multiplexed with the mini PCIe slots,
  muxing is selected through the GPIO expander)
- 1 SDIO slot
- 1 USB3 port
- 2 USB2 port
- 2 GPIO/interrupts expander on I2C

Cherry pick the approriate patches from 4.0 that add the dts file and
its dependencies, add partitions to the spi flash and add a profile.

As a side effect the 385-rd dts file gets renamed to 388-rd for 3.18
as well; matching what it was named in 4.0 already.

Signed-off-by: Jonas Gorski j...@openwrt.org
---
 .../mvebu/base-files/etc/uci-defaults/02_network   |   3 +
 target/linux/mvebu/base-files/lib/mvebu.sh |   3 +
 target/linux/mvebu/image/Makefile  |   3 +-
 ...emove-clock-frequency-from-Armada-38x-SDH.patch |  32 ++
 ...nable-no-1-8-v-flag-for-Armada-385-DB-SDH.patch |  35 ++
 ...ARM-mvebu-a38x-Add-more-pinctrl-functions.patch |  84 +++
 ...dd-Device-Tree-description-of-the-Armada-.patch | 632 +
 ...dd-Armada-388-General-Purpose-Development.patch | 329 +++
 .../patches-3.18/099-build_linksys_a385_dts.patch  |  10 +-
 .../207-armada-385-rd-mtd-partitions.patch |   6 +-
 .../209-armada-385-gp-mtd-partitions.patch |  19 +
 .../patches-3.18/300-add_missing_labels.patch  |   2 +-
 .../mvebu/patches-3.18/600-armada_38x_rtc.patch|   2 +-
 .../209-armada-385-gp-mtd-partitions.patch |  19 +
 target/linux/mvebu/profiles/marvell.mk |  24 +-
 15 files changed, 1188 insertions(+), 15 deletions(-)
 create mode 100644 
target/linux/mvebu/patches-3.18/071-ARM-mvebu-remove-clock-frequency-from-Armada-38x-SDH.patch
 create mode 100644 
target/linux/mvebu/patches-3.18/072-ARM-mvebu-enable-no-1-8-v-flag-for-Armada-385-DB-SDH.patch
 create mode 100644 
target/linux/mvebu/patches-3.18/073-ARM-mvebu-a38x-Add-more-pinctrl-functions.patch
 create mode 100644 
target/linux/mvebu/patches-3.18/074-ARM-mvebu-Add-Device-Tree-description-of-the-Armada-.patch
 create mode 100644 
target/linux/mvebu/patches-3.18/075-ARM-mvebu-Add-Armada-388-General-Purpose-Development.patch
 create mode 100644 
target/linux/mvebu/patches-3.18/209-armada-385-gp-mtd-partitions.patch
 create mode 100644 
target/linux/mvebu/patches-4.0/209-armada-385-gp-mtd-partitions.patch

diff --git a/target/linux/mvebu/base-files/etc/uci-defaults/02_network 
b/target/linux/mvebu/base-files/etc/uci-defaults/02_network
index d1ead03..002457b 100644
--- a/target/linux/mvebu/base-files/etc/uci-defaults/02_network
+++ b/target/linux/mvebu/base-files/etc/uci-defaults/02_network
@@ -30,6 +30,9 @@ armada-xp-linksys-mamba)
 armada-385-db-ap)
ucidef_set_interfaces_lan_wan eth0 eth1 eth2
;;
+armada-388-gp)
+   ucidef_set_interface_lan eth0 eth1
+   ;;
 armada-xp-gp)
ucidef_set_interface_lan eth0 eth1 eth2 eth3
;;
diff --git a/target/linux/mvebu/base-files/lib/mvebu.sh 
b/target/linux/mvebu/base-files/lib/mvebu.sh
index 3edfa6b..0a99209 100755
--- a/target/linux/mvebu/base-files/lib/mvebu.sh
+++ b/target/linux/mvebu/base-files/lib/mvebu.sh
@@ -43,6 +43,9 @@ mvebu_board_detect() {
*Marvell Armada 385 Access Point Development Board)
name=armada-385-db-ap
;;
+   *Marvell Armada 385 GP)
+   name=armada-388-gp
+   ;;
*Marvell Armada XP Development Board DB-MV784MP-GP)
name=armada-xp-gp
;;
diff --git a/target/linux/mvebu/image/Makefile 
b/target/linux/mvebu/image/Makefile
index 255f1a4..b9a66a3 100644
--- a/target/linux/mvebu/image/Makefile
+++ b/target/linux/mvebu/image/Makefile
@@ -140,7 +140,8 @@ $(eval $(call 
NANDProfile,Cobra,armada-385-linksys-cobra,128KiB,2048,512,2048))
 $(eval $(call 
UBINORProfile,OpenBlocks-AX-3-4,armada-xp-openblocks-ax3-4,128KiB))
 
 # Boards with small NOR, where UBI doesn't make sense
-$(eval $(call NORProfile,385-RD,armada-385-rd,256KiB))
+$(eval $(call NORProfile,388-GP,armada-388-gp,256KiB))
+$(eval $(call NORProfile,388-RD,armada-388-rd,256KiB))
 
 ###
 ### Linksys
diff --git 
a/target/linux/mvebu/patches-3.18/071-ARM-mvebu-remove-clock-frequency-from-Armada-38x-SDH.patch
 
b/target/linux/mvebu/patches-3.18/071-ARM-mvebu-remove-clock-frequency-from-Armada-38x-SDH.patch
new file mode 100644
index 000..7adb2ad
--- /dev/null
+++ 
b/target/linux/mvebu/patches-3.18/071-ARM-mvebu-remove-clock-frequency-from-Armada-38x-SDH.patch
@@ -0,0 +1,32 @@
+From ebf50c9651ff28341b76e78c531592d7d3489bc6 Mon Sep 17 00:00:00 2001
+From: Marcin Wojtas m...@semihalf.com
+Date: Fri, 14 Nov 2014 16:57:30 +0100
+Subject: [PATCH] ARM: mvebu: remove clock-frequency from Armada 38x SDHCI
+ Device Tree node
+
+For proper operation of Armada 38x SDHCI controller proper 'clocks' property
+is sufficient. Therefore it is 

[OpenWrt-Devel] [PATCH 0/7] mac80211 experimental extensions and cleanup

2015-08-23 Thread Dirk Neukirchen
*Disclaimer: compile tested only*

This series first adds features that were requested by some users
but might be broken or does not support OpenWrt intended usage
- experimental hardware (rt2800-usb)
- new Intel Hardware (iwlmvm) according to web reports
  does not support AP mode in 5GHz on some cards
  so it can be regarded as broken.
  This seems to be badly documented.
see: http://www.spinics.net/lists/linux-wireless/msg137906.html
or: http://www.spinics.net/lists/linux-wireless/msg137861.html
as example

Intel has published updated firmware that is only working
with newer Kernels (since we use backports that shouldnt matter anyway)
but there might be new bugs so keep the old versions too

Last two patches are trying to clean up the Makefile.

Dirk Neukirchen (7):
  mac80211: iwlagn: enable iwlmvm
  mac80211: rt2800-usb: enable unknown USB IDs
  mac80211: update linux-firmware to 2014-07-14
  mac80211: refresh Intel firmware
  mac80211: add iwlagn debug options
  mac80211: cosmetic changes
  mac80211: rename iwlagn to iwlwifi

 package/kernel/mac80211/Makefile | 2707 --
 1 file changed, 1425 insertions(+), 1282 deletions(-)

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


[OpenWrt-Devel] [PATCH 2/7] mac80211: rt2800-usb: enable unknown USB IDs

2015-08-23 Thread Dirk Neukirchen
- should fix issue: https://forum.openwrt.org/viewtopic.php?id=57315
- enable support of more USB stick with rt28xx chipsets
- experimental: USB-IDs not in vendor linux driver
- experimental: exact chipset is unknown
- experimental: enabling these devices may or may not work

only compile tested

Signed-off-by: Dirk Neukirchen dirkneukirc...@web.de
---
 package/kernel/mac80211/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/package/kernel/mac80211/Makefile b/package/kernel/mac80211/Makefile
index 1cebf92..3037d79 100644
--- a/package/kernel/mac80211/Makefile
+++ b/package/kernel/mac80211/Makefile
@@ -1638,7 +1638,7 @@ config-$(call config_package,rt2800-pci) += RT2800PCI
 config-y += RT2800PCI_RT33XX RT2800PCI_RT35XX RT2800PCI_RT53XX RT2800PCI_RT3290
 
 config-$(call config_package,rt2800-usb) += RT2800USB
-config-y += RT2800USB_RT33XX RT2800USB_RT35XX RT2800USB_RT3573 
RT2800USB_RT53XX RT2800USB_RT55XX
+config-y += RT2800USB_RT33XX RT2800USB_RT35XX RT2800USB_RT3573 
RT2800USB_RT53XX RT2800USB_RT55XX RT2800USB_UNKNOWN
 
 config-$(call config_package,iwl-legacy) += IWLEGACY
 config-$(call config_package,iwl3945) += IWL3945
-- 
2.5.0
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 3/7] mac80211: update linux-firmware to 2014-07-14

2015-08-23 Thread Dirk Neukirchen
Signed-off-by: Dirk Neukirchen dirkneukirc...@web.de
---
 package/kernel/mac80211/Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/package/kernel/mac80211/Makefile b/package/kernel/mac80211/Makefile
index 3037d79..a3ecb5b 100644
--- a/package/kernel/mac80211/Makefile
+++ b/package/kernel/mac80211/Makefile
@@ -108,8 +108,8 @@ Generic IEEE 802.11 Networking Stack (mac80211)
 endef
 
 PKG_LINUX_FIRMWARE_NAME:=linux-firmware
-PKG_LINUX_FIRMWARE_VERSION:=f404336ba808cbd57547196e13367079a23b822c
-PKG_LINUX_FIRMWARE_SOURCE:=$(PKG_LINUX_FIRMWARE_NAME)-2015-03-20-$(PKG_LINUX_FIRMWARE_VERSION).tar.bz2
+PKG_LINUX_FIRMWARE_VERSION:=696403047a940c425c93cb8da1efcec6ffda0b6e
+PKG_LINUX_FIRMWARE_SOURCE:=$(PKG_LINUX_FIRMWARE_NAME)-2015-07-14-$(PKG_LINUX_FIRMWARE_VERSION).tar.bz2
 PKG_LINUX_FIRMWARE_PROTO:=git
 
PKG_LINUX_FIRMWARE_SOURCE_URL:=https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git
 
PKG_LINUX_FIRMWARE_SUBDIR:=$(PKG_LINUX_FIRMWARE_NAME)-$(PKG_LINUX_FIRMWARE_VERSION)
-- 
2.5.0
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH 6/7] mac80211: cosmetic changes

2015-08-23 Thread Jonas Gorski
Hi,

On Sun, Aug 23, 2015 at 1:02 PM, Dirk Neukirchen dirkneukirc...@web.de wrote:

 - remove net prefix from some modules
 - try to sort alphabetically

 Signed-off-by: Dirk Neukirchen dirkneukirc...@web.de

please split this into two (first remove the net prefix, then reorder
them), this should make it a bit less unreadable.


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


[OpenWrt-Devel] [PATCH] kernel: arm64: psci: move psci firmware calls out of line

2015-08-23 Thread Dirk Neukirchen
- fixes build error on arm64 with FTRACE enabled
- upstream ticket says gcc5 but both linaro gcc variants
OpenWrt is using seem to be affected

backport upstream change f5e0a12ca2d939e47995f73428d9bf1ad372b289
for Kernel 3.18

Signed-off-by: Dirk Neukirchen dirkneukirc...@web.de
---
found this in my local tree, diffconfig to replicate:

CONFIG_TARGET_arm64=y
CONFIG_TARGET_arm64_Default=y
CONFIG_TARGET_BOARD=arm64
CONFIG_DEVEL=y
CONFIG_BUILD_LOG=y
CONFIG_KERNEL_DYNAMIC_FTRACE=y
CONFIG_KERNEL_ENABLE_DEFAULT_TRACERS=y
CONFIG_KERNEL_FTRACE=y
CONFIG_KERNEL_FTRACE_SYSCALLS=y
CONFIG_KERNEL_FUNCTION_GRAPH_TRACER=y
CONFIG_KERNEL_FUNCTION_PROFILER=y
CONFIG_KERNEL_FUNCTION_TRACER=y


 ...psci_move_psci_firmware_calls_out_of_line.patch | 124 +
 1 file changed, 124 insertions(+)
 create mode 100644 
target/linux/generic/patches-3.18/090-from_4.0_arm64_psci_move_psci_firmware_calls_out_of_line.patch

diff --git 
a/target/linux/generic/patches-3.18/090-from_4.0_arm64_psci_move_psci_firmware_calls_out_of_line.patch
 
b/target/linux/generic/patches-3.18/090-from_4.0_arm64_psci_move_psci_firmware_calls_out_of_line.patch
new file mode 100644
index 000..1db9d5f
--- /dev/null
+++ 
b/target/linux/generic/patches-3.18/090-from_4.0_arm64_psci_move_psci_firmware_calls_out_of_line.patch
@@ -0,0 +1,124 @@
+From f5e0a12ca2d939e47995f73428d9bf1ad372b289 Mon Sep 17 00:00:00 2001
+From: Will Deacon will.dea...@arm.com
+Date: Wed, 25 Feb 2015 12:10:35 +
+Subject: arm64: psci: move psci firmware calls out of line
+
+An arm64 allmodconfig fails to build with GCC 5 due to __asmeq
+assertions in the PSCI firmware calling code firing due to mcount
+preambles breaking our assumptions about register allocation of function
+arguments:
+
+  /tmp/ccDqJsJ6.s: Assembler messages:
+  /tmp/ccDqJsJ6.s:60: Error: .err encountered
+  /tmp/ccDqJsJ6.s:61: Error: .err encountered
+  /tmp/ccDqJsJ6.s:62: Error: .err encountered
+  /tmp/ccDqJsJ6.s:99: Error: .err encountered
+  /tmp/ccDqJsJ6.s:100: Error: .err encountered
+  /tmp/ccDqJsJ6.s:101: Error: .err encountered
+
+This patch fixes the issue by moving the PSCI calls out-of-line into
+their own assembly files, which are safe from the compiler's meddling
+fingers.
+
+Reported-by: Andy Whitcroft a...@canonical.com
+Signed-off-by: Will Deacon will.dea...@arm.com
+Signed-off-by: Catalin Marinas catalin.mari...@arm.com
+
+--- /dev/null
 b/arch/arm64/kernel/psci-call.S
+@@ -0,0 +1,28 @@
++/*
++ * This program is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License version 2 as
++ * published by the Free Software Foundation.
++ *
++ * This program is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
++ * GNU General Public License for more details.
++ *
++ * Copyright (C) 2015 ARM Limited
++ *
++ * Author: Will Deacon will.dea...@arm.com
++ */
++
++#include linux/linkage.h
++
++/* int __invoke_psci_fn_hvc(u64 function_id, u64 arg0, u64 arg1, u64 arg2) */
++ENTRY(__invoke_psci_fn_hvc)
++  hvc #0
++  ret
++ENDPROC(__invoke_psci_fn_hvc)
++
++/* int __invoke_psci_fn_smc(u64 function_id, u64 arg0, u64 arg1, u64 arg2) */
++ENTRY(__invoke_psci_fn_smc)
++  smc #0
++  ret
++ENDPROC(__invoke_psci_fn_smc)
+--- a/arch/arm64/kernel/psci.c
 b/arch/arm64/kernel/psci.c
+@@ -57,6 +57,9 @@ static struct psci_operations psci_ops;
+ static int (*invoke_psci_fn)(u64, u64, u64, u64);
+ typedef int (*psci_initcall_t)(const struct device_node *);
+ 
++asmlinkage int __invoke_psci_fn_hvc(u64, u64, u64, u64);
++asmlinkage int __invoke_psci_fn_smc(u64, u64, u64, u64);
++
+ enum psci_function {
+   PSCI_FN_CPU_SUSPEND,
+   PSCI_FN_CPU_ON,
+@@ -109,40 +112,6 @@ static void psci_power_state_unpack(u32
+   PSCI_0_2_POWER_STATE_AFFL_SHIFT;
+ }
+ 
+-/*
+- * The following two functions are invoked via the invoke_psci_fn pointer
+- * and will not be inlined, allowing us to piggyback on the AAPCS.
+- */
+-static noinline int __invoke_psci_fn_hvc(u64 function_id, u64 arg0, u64 arg1,
+-   u64 arg2)
+-{
+-  asm volatile(
+-  __asmeq(%0, x0)
+-  __asmeq(%1, x1)
+-  __asmeq(%2, x2)
+-  __asmeq(%3, x3)
+-  hvc#0\n
+-  : +r (function_id)
+-  : r (arg0), r (arg1), r (arg2));
+-
+-  return function_id;
+-}
+-
+-static noinline int __invoke_psci_fn_smc(u64 function_id, u64 arg0, u64 arg1,
+-   u64 arg2)
+-{
+-  asm volatile(
+-  __asmeq(%0, x0)
+-  __asmeq(%1, x1)
+-  __asmeq(%2, x2)
+-  __asmeq(%3, x3)
+-  smc#0\n
+-  : +r (function_id)
+-  : r 

[OpenWrt-Devel] [PATCHv3 openwrt 2/2] kernel: bridge, multicast-to-unicast: assign src after pskb_may_pull()

2015-08-23 Thread Linus Lüssing
A call to pskb_may_pull() might reallocate skb-data. Therefore we
should only assign the src-pointer after any potential reallocations.

Signed-off-by: Linus Lüssing linus.luess...@c0d3.blue
---
 .../645-bridge_multicast_to_unicast.patch  |   45 +++-
 1 file changed, 26 insertions(+), 19 deletions(-)

diff --git 
a/target/linux/generic/patches-3.18/645-bridge_multicast_to_unicast.patch 
b/target/linux/generic/patches-3.18/645-bridge_multicast_to_unicast.patch
index e8be1fd..83f2475 100644
--- a/target/linux/generic/patches-3.18/645-bridge_multicast_to_unicast.patch
+++ b/target/linux/generic/patches-3.18/645-bridge_multicast_to_unicast.patch
@@ -100,37 +100,40 @@
 struct sk_buff *skb,
 u16 vid)
  {
-+  const unsigned char *src = eth_hdr(skb)-h_source;
++  unsigned char *src;
struct igmpv3_report *ih;
struct igmpv3_grec *grec;
int i;
-@@ -1008,7 +1031,7 @@ static int br_ip4_multicast_igmp3_report
+@@ -1008,7 +1031,8 @@ static int br_ip4_multicast_igmp3_report
continue;
}
  
 -  err = br_ip4_multicast_add_group(br, port, group, vid);
++  src = eth_hdr(skb)-h_source;
 +  err = br_ip4_multicast_add_group(br, port, group, vid, src);
if (err)
break;
}
-@@ -1022,6 +1045,7 @@ static int br_ip6_multicast_mld2_report(
+@@ -1022,6 +1046,7 @@ static int br_ip6_multicast_mld2_report(
struct sk_buff *skb,
u16 vid)
  {
-+  const unsigned char *src = eth_hdr(skb)-h_source;
++  unsigned char *src;
struct icmp6hdr *icmp6h;
struct mld2_grec *grec;
int i;
-@@ -1070,7 +1094,7 @@ static int br_ip6_multicast_mld2_report(
+@@ -1069,8 +1094,9 @@ static int br_ip6_multicast_mld2_report(
+   continue;
}
  
++  src = eth_hdr(skb)-h_source;
err = br_ip6_multicast_add_group(br, port, grec-grec_mca,
 -   vid);
 +   vid, src);
if (err)
break;
}
-@@ -1407,7 +1431,8 @@ br_multicast_leave_group(struct net_brid
+@@ -1407,7 +1433,8 @@ br_multicast_leave_group(struct net_brid
 struct net_bridge_port *port,
 struct br_ip *group,
 struct bridge_mcast_other_query *other_query,
@@ -140,7 +143,7 @@
  {
struct net_bridge_mdb_htable *mdb;
struct net_bridge_mdb_entry *mp;
-@@ -1457,7 +1482,7 @@ br_multicast_leave_group(struct net_brid
+@@ -1457,7 +1484,7 @@ br_multicast_leave_group(struct net_brid
for (pp = mp-ports;
 (p = mlock_dereference(*pp, br)) != NULL;
 pp = p-next) {
@@ -149,7 +152,7 @@
continue;
  
rcu_assign_pointer(*pp, p-next);
-@@ -1491,7 +1516,7 @@ br_multicast_leave_group(struct net_brid
+@@ -1491,7 +1518,7 @@ br_multicast_leave_group(struct net_brid
for (p = mlock_dereference(mp-ports, br);
 p != NULL;
 p = mlock_dereference(p-next, br)) {
@@ -158,7 +161,7 @@
continue;
  
if (!hlist_unhashed(p-mglist) 
-@@ -1509,8 +1534,8 @@ out:
+@@ -1509,8 +1536,8 @@ out:
  
  static void br_ip4_multicast_leave_group(struct net_bridge *br,
 struct net_bridge_port *port,
@@ -169,7 +172,7 @@
  {
struct br_ip br_group;
struct bridge_mcast_own_query *own_query;
-@@ -1525,14 +1550,14 @@ static void br_ip4_multicast_leave_group
+@@ -1525,14 +1552,14 @@ static void br_ip4_multicast_leave_group
br_group.vid = vid;
  
br_multicast_leave_group(br, port, br_group, br-ip4_other_query,
@@ -186,7 +189,7 @@
  {
struct br_ip br_group;
struct bridge_mcast_own_query *own_query;
-@@ -1547,7 +1572,7 @@ static void br_ip6_multicast_leave_group
+@@ -1547,7 +1574,7 @@ static void br_ip6_multicast_leave_group
br_group.vid = vid;
  
br_multicast_leave_group(br, port, br_group, br-ip6_other_query,
@@ -195,55 +198,59 @@
  }
  #endif
  
-@@ -1556,6 +1581,7 @@ static int br_multicast_ipv4_rcv(struct
+@@ -1556,6 +1583,7 @@ static int br_multicast_ipv4_rcv(struct
 struct sk_buff *skb,
 u16 vid)
  {
-+  const unsigned char *src = eth_hdr(skb)-h_source;
++  unsigned char *src;
struct sk_buff *skb2 = skb;
const struct iphdr *iph;
struct igmphdr *ih;
-@@ -1629,7 +1655,7 @@ static int br_multicast_ipv4_rcv(struct
+@@ -1629,7 +1657,8 @@ static int br_multicast_ipv4_rcv(struct
case IGMP_HOST_MEMBERSHIP_REPORT:
case IGMPV2_HOST_MEMBERSHIP_REPORT:
  

[OpenWrt-Devel] [PATCH] brcm63xx: add Comtrend VR-3026e support

2015-08-23 Thread Martin Tesar
Signed-off-by: Martin Tesar tesar...@gmail.com
---
 target/linux/brcm63xx/base-files/etc/diag.sh   |  3 +
 .../base-files/etc/uci-defaults/02_network |  3 +-
 .../base-files/etc/uci-defaults/09_fix_crc |  1 +
 target/linux/brcm63xx/base-files/lib/brcm63xx.sh   |  3 +
 .../lib/preinit/05_init_interfaces_brcm63xx|  1 +
 target/linux/brcm63xx/dts/vr-3026e.dts | 84 ++
 target/linux/brcm63xx/image/Makefile   |  2 +
 .../brcm63xx/patches-4.1/805-board_VR-3026e.patch  | 81 +
 target/linux/brcm63xx/profiles/comtrend.mk |  9 +++
 9 files changed, 186 insertions(+), 1 deletion(-)
 create mode 100644 target/linux/brcm63xx/dts/vr-3026e.dts
 create mode 100644 target/linux/brcm63xx/patches-4.1/805-board_VR-3026e.patch

diff --git a/target/linux/brcm63xx/base-files/etc/diag.sh 
b/target/linux/brcm63xx/base-files/etc/diag.sh
index 7916ac2..792df01 100644
--- a/target/linux/brcm63xx/base-files/etc/diag.sh
+++ b/target/linux/brcm63xx/base-files/etc/diag.sh
@@ -39,6 +39,9 @@ set_state() {
vr-3025u)
status_led=VR-3025u:green:power
;;
+vr-3026e)
+status_led=VR-3026e:green:power
+;;
wap-5813n)
status_led=WAP-5813n:green:power
;;
diff --git a/target/linux/brcm63xx/base-files/etc/uci-defaults/02_network 
b/target/linux/brcm63xx/base-files/etc/uci-defaults/02_network
index 2ff9e45..70df711 100644
--- a/target/linux/brcm63xx/base-files/etc/uci-defaults/02_network
+++ b/target/linux/brcm63xx/base-files/etc/uci-defaults/02_network
@@ -95,7 +95,8 @@ fast2704v2 |\
 hg655b |\
 p870hw-51a_v2 |\
 vr-3025un |\
-vr-3025u)
+vr-3025u |\
+vr-3026e)
ucidef_set_interface_lan eth0.1
ucidef_add_switch eth0 1 1
ucidef_add_switch_vlan eth0 1 0 1 2 3 8t
diff --git a/target/linux/brcm63xx/base-files/etc/uci-defaults/09_fix_crc 
b/target/linux/brcm63xx/base-files/etc/uci-defaults/09_fix_crc
index 4a167dc..901050d 100644
--- a/target/linux/brcm63xx/base-files/etc/uci-defaults/09_fix_crc
+++ b/target/linux/brcm63xx/base-files/etc/uci-defaults/09_fix_crc
@@ -30,6 +30,7 @@ case $(brcm63xx_board_name) in
v2500v_bb |\
vr-3025u |\
vr-3025un |\
+vr-3026e |\
wap-5813n)
do_fixcrc
;;
diff --git a/target/linux/brcm63xx/base-files/lib/brcm63xx.sh 
b/target/linux/brcm63xx/base-files/lib/brcm63xx.sh
index 92fa5f2..5c0a968 100755
--- a/target/linux/brcm63xx/base-files/lib/brcm63xx.sh
+++ b/target/linux/brcm63xx/base-files/lib/brcm63xx.sh
@@ -102,6 +102,9 @@ brcm63xx_dt_detect() {
Comtrend VR-3025un)
board_name=vr-3025un
;;
+Comtrend VR-3026e)
+board_name=vr-3026e
+;;
Comtrend WAP-5813n)
board_name=wap-5813n
;;
diff --git 
a/target/linux/brcm63xx/base-files/lib/preinit/05_init_interfaces_brcm63xx 
b/target/linux/brcm63xx/base-files/lib/preinit/05_init_interfaces_brcm63xx
index d6ec537..fef671b 100644
--- a/target/linux/brcm63xx/base-files/lib/preinit/05_init_interfaces_brcm63xx
+++ b/target/linux/brcm63xx/base-files/lib/preinit/05_init_interfaces_brcm63xx
@@ -32,6 +32,7 @@ set_preinit_iface() {
v2110 |\
vr-3025un |\
vr-3025u |\
+vr-3026e |\
wap-5813n)
ifname=eth0
;;
diff --git a/target/linux/brcm63xx/dts/vr-3026e.dts 
b/target/linux/brcm63xx/dts/vr-3026e.dts
new file mode 100644
index 000..7a00ed4
--- /dev/null
+++ b/target/linux/brcm63xx/dts/vr-3026e.dts
@@ -0,0 +1,84 @@
+/dts-v1/;
+
+#include bcm6368.dtsi
+
+#include dt-bindings/input/input.h
+
+/ {
+   model = Comtrend VR-3026e;
+   compatible = comtrend,vr-3026e, brcm,bcm6368;
+
+   gpio-keys-polled {
+   compatible = gpio-keys-polled;
+   #address-cells = 1;
+   #size-cells = 0;
+   poll-interval = 20;
+   debounce-interval = 60;
+
+   reset {
+   label = reset;
+   gpios = gpio1 2 1;
+   linux,code = KEY_RESTART;
+   };
+   };
+
+   gpio-leds {
+   compatible = gpio-leds;
+
+   dsl_green {
+   label = VR-3026e:green:dsl;
+   gpios = gpio0 2 1;
+   };
+   inet_green {
+   label = VR-3026e:green:inet;
+   gpios = gpio0 5 0;
+   };
+   lan1_green {
+   label = VR-3026e:green:lan1;
+   gpios = gpio0 6 1;
+   };
+   lan2_green {
+   label = VR-3026e:green:lan2;
+   gpios = gpio0 7 1;
+   };
+   lan3_green {
+   label = VR-3026e:green:lan3;
+   

[OpenWrt-Devel] [PATCHv3 netifd 1/3] bridge: Fix multicast_to_unicast feature by hairpin+isolate

2015-08-23 Thread Linus Lüssing
All IGMP and MLD versions suffer from a specific limitation (from a
snooping switch perspective): Report suppression.

Once a listener hears an IGMPv2/3 or MLDv1 report for the same group
itself participates in then it might (if this listener is an IGMPv3 or
MLDv2 listener) or will (if this is an IGMPv1/2 or MLDv1 listener)
refrain from sending its own report.

Therefore we might currently miss such surpressing listeners as they
won't receive the multicast packet with the mangled, unicasted
destination.

Fixing this by first isolating the STAs and giving the bridge more
control over traffic forwarding. E.g. refraining to forward listener
reports to other STAs.

For broadcast and unicast traffic to an STA on the same AP, the hairpin
feature of the bridge will reflect such traffic back to the AP
interface. However, if the AP interface is actually configured to
isolate STAs, then hairpin is kept disabled.

Signed-off-by: Linus Lüssing linus.luess...@c0d3.blue
---
 device.h   |1 +
 scripts/netifd-wireless.sh |   15 +++
 system-linux.c |   26 --
 wireless.c |   12 +++-
 wireless.h |1 +
 5 files changed, 48 insertions(+), 7 deletions(-)

diff --git a/device.h b/device.h
index ce135ba..373445c 100644
--- a/device.h
+++ b/device.h
@@ -173,6 +173,7 @@ struct device {
bool iface_config;
bool default_config;
bool wireless;
+   bool wireless_isolate;
 
struct interface *config_iface;
 
diff --git a/scripts/netifd-wireless.sh b/scripts/netifd-wireless.sh
index c5d8a96..f981f1b 100644
--- a/scripts/netifd-wireless.sh
+++ b/scripts/netifd-wireless.sh
@@ -248,12 +248,26 @@ wireless_vif_parse_encryption() {
esac
 }
 
+_wireless_set_brsnoop_isolation() {
+   local multicast_to_unicast=$1
+   local isolate
+
+   json_get_var isolate isolate
+
+   [ $isolate -gt 0 -o -z $network_bridge ]  return
+
+   [ -z $multicast_to_unicast ]  multicast_to_unicast=1
+   [ $multicast_to_unicast -gt 0 ]  json_add_boolean isolate 1
+}
+
 for_each_interface() {
local _w_types=$1; shift
local _w_ifaces _w_iface
local _w_type
local _w_found
 
+   local multicast_to_unicast
+
json_get_keys _w_ifaces interfaces
json_select interfaces
for _w_iface in $_w_ifaces; do
@@ -261,6 +275,7 @@ for_each_interface() {
if [ -n $_w_types ]; then
json_get_var network_bridge bridge
json_select config
+   _wireless_set_brsnoop_isolation $multicast_to_unicast
json_get_var _w_type mode
json_select ..
_w_types= $_w_types 
diff --git a/system-linux.c b/system-linux.c
index 9ba13fd..9c4bea6 100644
--- a/system-linux.c
+++ b/system-linux.c
@@ -315,6 +315,16 @@ static void system_set_dadtransmits(struct device *dev, 
const char *val)
system_set_dev_sysctl(/proc/sys/net/ipv6/conf/%s/dad_transmits, 
dev-ifname, val);
 }
 
+static void system_bridge_set_multicast_to_unicast(struct device *dev, const 
char *val)
+{
+   system_set_dev_sysctl(/sys/class/net/%s/brport/multicast_to_unicast, 
dev-ifname, val);
+}
+
+static void system_bridge_set_hairpin_mode(struct device *dev, const char *val)
+{
+   system_set_dev_sysctl(/sys/class/net/%s/brport/hairpin_mode, 
dev-ifname, val);
+}
+
 static int system_get_sysctl(const char *path, char *buf, const size_t buf_sz)
 {
int fd = -1, ret = -1;
@@ -556,12 +566,16 @@ static char *system_get_bridge(const char *name, char 
*buf, int buflen)
return path + 1;
 }
 
-static void system_bridge_set_wireless(const char *bridge, const char *dev)
+static void
+system_bridge_set_wireless(struct device *dev)
 {
-   snprintf(dev_buf, sizeof(dev_buf),
-/sys/devices/virtual/net/%s/brif/%s/multicast_to_unicast,
-bridge, dev);
-   system_set_sysctl(dev_buf, 1);
+   bool hairpin = true;
+
+   if (dev-wireless_isolate)
+   hairpin = false;
+
+   system_bridge_set_multicast_to_unicast(dev, 1);
+   system_bridge_set_hairpin_mode(dev, hairpin ? 1 : 0);
 }
 
 int system_bridge_addif(struct device *bridge, struct device *dev)
@@ -574,7 +588,7 @@ int system_bridge_addif(struct device *bridge, struct 
device *dev)
ret = system_bridge_if(bridge-ifname, dev, SIOCBRADDIF, NULL);
 
if (dev-wireless)
-   system_bridge_set_wireless(bridge-ifname, dev-ifname);
+   system_bridge_set_wireless(dev);
 
return ret;
 }
diff --git a/wireless.c b/wireless.c
index fbd6191..337f563 100644
--- a/wireless.c
+++ b/wireless.c
@@ -35,12 +35,14 @@ static const struct uci_blob_param_list wdev_param = {
 enum {
VIF_ATTR_DISABLED,
VIF_ATTR_NETWORK,
+   VIF_ATTR_ISOLATE,
__VIF_ATTR_MAX,
 };
 
 static const struct 

[OpenWrt-Devel] [PATCHv3 netifd 2/3] bridge: Allow setting multicast_to_unicast option

2015-08-23 Thread Linus Lüssing
With this patch the multicast_to_unicast feature can be disabled for all
wireless interfaces via an according option on the uci bridge interface.

This patch also exports the setting information to wireless handler
scripts. The hostapd script will need that information to determine
whether to enable or disable ap-isolation, for instance.

Signed-off-by: Linus Lüssing linus.luess...@c0d3.blue
---
 device.c   |9 +
 device.h   |3 +++
 scripts/netifd-wireless.sh |1 +
 system-linux.c |   13 +
 wireless.c |4 
 5 files changed, 26 insertions(+), 4 deletions(-)

diff --git a/device.c b/device.c
index b5bee11..b44ccb8 100644
--- a/device.c
+++ b/device.c
@@ -48,6 +48,7 @@ static const struct blobmsg_policy dev_attrs[__DEV_ATTR_MAX] 
= {
[DEV_ATTR_RPS] = { .name = rps, .type = BLOBMSG_TYPE_BOOL },
[DEV_ATTR_XPS] = { .name = xps, .type = BLOBMSG_TYPE_BOOL },
[DEV_ATTR_DADTRANSMITS] = { .name = dadtransmits, .type = 
BLOBMSG_TYPE_INT32 },
+   [DEV_ATTR_MULTICAST_TO_UNICAST] = { .name = multicast_to_unicast, 
.type = BLOBMSG_TYPE_BOOL },
 };
 
 const struct uci_blob_param_list device_attr_list = {
@@ -174,6 +175,7 @@ device_merge_settings(struct device *dev, struct 
device_settings *n)
s-neigh6reachabletime : os-neigh6reachabletime;
n-dadtransmits = s-flags  DEV_OPT_DADTRANSMITS ?
s-dadtransmits : os-dadtransmits;
+   n-multicast_to_unicast = s-multicast_to_unicast;
n-flags = s-flags | os-flags;
 }
 
@@ -274,6 +276,11 @@ device_init_settings(struct device *dev, struct blob_attr 
**tb)
s-flags |= DEV_OPT_DADTRANSMITS;
}
 
+   if ((cur = tb[DEV_ATTR_MULTICAST_TO_UNICAST])) {
+   s-multicast_to_unicast = blobmsg_get_bool(cur);
+   s-flags |= DEV_OPT_MULTICAST_TO_UNICAST;
+   }
+
device_set_disabled(dev, disabled);
 }
 
@@ -884,6 +891,8 @@ device_dump_status(struct blob_buf *b, struct device *dev)
}
if (st.flags  DEV_OPT_DADTRANSMITS)
blobmsg_add_u32(b, dadtransmits, st.dadtransmits);
+   if (st.flags  DEV_OPT_MULTICAST_TO_UNICAST)
+   blobmsg_add_u8(b, multicast_to_unicast, 
st.multicast_to_unicast);
}
 
s = blobmsg_open_table(b, statistics);
diff --git a/device.h b/device.h
index 373445c..4344d8a 100644
--- a/device.h
+++ b/device.h
@@ -42,6 +42,7 @@ enum {
DEV_ATTR_RPS,
DEV_ATTR_XPS,
DEV_ATTR_DADTRANSMITS,
+   DEV_ATTR_MULTICAST_TO_UNICAST,
__DEV_ATTR_MAX,
 };
 
@@ -84,6 +85,7 @@ enum {
DEV_OPT_XPS = (1  11),
DEV_OPT_MTU6= (1  12),
DEV_OPT_DADTRANSMITS= (1  13),
+   DEV_OPT_MULTICAST_TO_UNICAST= (1  14),
 };
 
 /* events broadcasted to all users of a device */
@@ -141,6 +143,7 @@ struct device_settings {
bool rps;
bool xps;
unsigned int dadtransmits;
+   bool multicast_to_unicast;
 };
 
 /*
diff --git a/scripts/netifd-wireless.sh b/scripts/netifd-wireless.sh
index f981f1b..83a8223 100644
--- a/scripts/netifd-wireless.sh
+++ b/scripts/netifd-wireless.sh
@@ -274,6 +274,7 @@ for_each_interface() {
json_select $_w_iface
if [ -n $_w_types ]; then
json_get_var network_bridge bridge
+   json_get_var multicast_to_unicast multicast_to_unicast
json_select config
_wireless_set_brsnoop_isolation $multicast_to_unicast
json_get_var _w_type mode
diff --git a/system-linux.c b/system-linux.c
index 9c4bea6..944245c 100644
--- a/system-linux.c
+++ b/system-linux.c
@@ -567,14 +567,19 @@ static char *system_get_bridge(const char *name, char 
*buf, int buflen)
 }
 
 static void
-system_bridge_set_wireless(struct device *dev)
+system_bridge_set_wireless(struct device *bridge, struct device *dev)
 {
+   bool mcast_to_ucast = true;
bool hairpin = true;
 
-   if (dev-wireless_isolate)
+   if (bridge-settings.flags  DEV_OPT_MULTICAST_TO_UNICAST 
+   !bridge-settings.multicast_to_unicast)
+   mcast_to_ucast = false;
+
+   if (!mcast_to_ucast || dev-wireless_isolate)
hairpin = false;
 
-   system_bridge_set_multicast_to_unicast(dev, 1);
+   system_bridge_set_multicast_to_unicast(dev, mcast_to_ucast ? 1 : 0);
system_bridge_set_hairpin_mode(dev, hairpin ? 1 : 0);
 }
 
@@ -588,7 +593,7 @@ int system_bridge_addif(struct device *bridge, struct 
device *dev)
ret = system_bridge_if(bridge-ifname, dev, SIOCBRADDIF, NULL);
 
if (dev-wireless)
-   system_bridge_set_wireless(dev);
+   system_bridge_set_wireless(bridge, dev);
 
return ret;
 }
diff --git a/wireless.c b/wireless.c
index 

[OpenWrt-Devel] [PATCH 6/7] mac80211: cosmetic changes

2015-08-23 Thread Dirk Neukirchen

- remove net prefix from some modules
- try to sort alphabetically

Signed-off-by: Dirk Neukirchen dirkneukirc...@web.de
---
 package/kernel/mac80211/Makefile | 2494 +++---
 1 file changed, 1266 insertions(+), 1228 deletions(-)

diff --git a/package/kernel/mac80211/Makefile b/package/kernel/mac80211/Makefile
index b9042db..061f117 100644
--- a/package/kernel/mac80211/Makefile
+++ b/package/kernel/mac80211/Makefile
@@ -23,15 +23,28 @@ PKG_BUILD_PARALLEL:=1
 PKG_MAINTAINER:=Felix Fietkau n...@openwrt.org
 
 PKG_DRIVERS = \
-   adm8211 ath5k libertas-usb libertas-sdio p54-common p54-pci p54-usb 
p54-spi \
-   rt2x00-lib rt2x00-pci rt2x00-usb rt2800-lib rt2400-pci rt2500-pci \
-   rt2500-usb rt61-pci rt73-usb rt2800-mmio rt2800-pci rt2800-usb 
rt2800-soc \
-   rtl8180 rtl8187 zd1211rw mac80211-hwsim carl9170 b43 b43legacy \
-   ath9k-common ath9k ath9k-htc ath10k ath net-libipw net-ipw2100 
net-ipw2200 \
-   mwl8k mwifiex-pcie net-hermes net-hermes-pci net-hermes-plx 
net-hermes-pcmcia \
-   iwl-legacy iwl3945 iwl4965 iwlagn wlcore wl12xx wl18xx lib80211 \
+   adm8211 \
+   ath ath5k ath9k ath9k-common ath9k-htc ath10k \
+   b43 b43legacy \
+   carl9170 \
+   hermes hermes-pci hermes-pcmcia hermes-plx \
+   iwl-legacy iwl3945 iwl4965 iwlagn \
+   libipw ipw2100 ipw2200 \
+   libertas-usb libertas-sdio \
+   lib80211 \
+   mac80211-hwsim \
+   mt7601u \
+   mwl8k mwifiex-pcie \
+   p54-common p54-pci p54-usb p54-spi \
+   rt2x00-lib rt2x00-pci rt2x00-usb \
+   rt2400-pci rt2500-pci rt2500-usb \
+   rt2800-lib rt2800-mmio rt2800-pci rt2800-usb rt2800-soc \
+   rt61-pci rt73-usb \
+   rtl8180 rtl8187 \
rtlwifi rtlwifi-pci rtlwifi-usb rtl8192c-common rtl8192ce rtl8192se \
-   rtl8192de rtl8192cu mt7601u
+   rtl8192de rtl8192cu \
+   wlcore wl12xx wl18xx \
+   zd1211rw
 
 PKG_CONFIG_DEPENDS:= \
CONFIG_PACKAGE_kmod-mac80211 \
@@ -126,513 +139,652 @@ define Download/linux-firmware
 endef
 $(eval $(call Download,linux-firmware))
 
-PKG_ATH10K_LINUX_FIRMWARE_NAME:=ath10k-firmware
-PKG_ATH10K_LINUX_FIRMWARE_VERSION:=b46f3e01a6c1f9150fb4612ef53611d714565842
-PKG_ATH10K_LINUX_FIRMWARE_SOURCE:=$(PKG_ATH10K_LINUX_FIRMWARE_NAME)-$(PKG_ATH10K_LINUX_FIRMWARE_VERSION).tar.bz2
-PKG_ATH10K_LINUX_FIRMWARE_PROTO:=git
-PKG_ATH10K_LINUX_FIRMWARE_SOURCE_URL:=https://github.com/kvalo/ath10k-firmware.git
-PKG_ATH10K_LINUX_FIRMWARE_SUBDIR:=$(PKG_ATH10K_LINUX_FIRMWARE_NAME)-$(PKG_ATH10K_LINUX_FIRMWARE_VERSION)
-#PKG_ATH10K_LINUX_FIRMWARE_MIRROR_MD5SUM:=?
 
-define Download/ath10k-firmware
-  FILE:=$(PKG_ATH10K_LINUX_FIRMWARE_SOURCE)
-  URL:=$(PKG_ATH10K_LINUX_FIRMWARE_SOURCE_URL)
-  PROTO:=$(PKG_ATH10K_LINUX_FIRMWARE_PROTO)
-  VERSION:=$(PKG_ATH10K_LINUX_FIRMWARE_VERSION)
-  SUBDIR:=$(PKG_ATH10K_LINUX_FIRMWARE_SUBDIR)
-  #MIRROR_MD5SUM:=$(PKG_ATH10K_LINUX_FIRMWARE_MIRROR_MD5SUM)
+define KernelPackage/adm8211
+  $(call KernelPackage/mac80211/Default)
+  TITLE:=ADMTek 8211 support
+  DEPENDS+=@PCI_SUPPORT +kmod-mac80211 +kmod-eeprom-93cx6
+  FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/adm8211.ko
+  AUTOLOAD:=$(call AutoProbe,adm8211)
 endef
-$(eval $(call Download,ath10k-firmware))
 
-# Prism54 drivers
-P54PCIFW:=2.13.12.0.arm
-P54USBFW:=2.13.24.0.lm87.arm
-P54SPIFW:=2.13.0.0.a.13.14.arm
 
-define Download/p54usb
-  FILE:=$(P54USBFW)
-  URL:=http://daemonizer.de/prism54/prism54-fw/fw-usb
-  MD5SUM:=8e8ab005a4f8f0123bcdc51bc25b47f6
-endef
-$(eval $(call Download,p54usb))
+define KernelPackage/ath/config
+  if PACKAGE_kmod-ath
+   config ATH_USER_REGD
+   bool Force Atheros drivers to respect the user's regdomain 
settings
+   help
+ Atheros' idea of regulatory handling is that the EEPROM of 
the card defines
+ the regulatory limits and the user is only allowed to 
restrict the settings
+ even further, even if the country allows frequencies or power 
levels that
+ are forbidden by the EEPROM settings.
 
-define Download/p54pci
-  FILE:=$(P54PCIFW)
-  URL:=http://daemonizer.de/prism54/prism54-fw/fw-softmac
-  MD5SUM:=ff7536af2092b1c4b21315bd103ef4c4
-endef
-$(eval $(call Download,p54pci))
+ Select this option if you want the driver to respect the 
user's decision about
+ regulatory settings.
 
-define Download/p54spi
-  FILE:=$(P54SPIFW)
-  URL:=http://daemonizer.de/prism54/prism54-fw/stlc4560
-  MD5SUM:=42661f8ecbadd88012807493f596081d
-endef
-$(eval $(call Download,p54spi))
+   config PACKAGE_ATH_DEBUG
+   bool Atheros wireless debugging
+   help
+ Say Y, if you want to debug atheros wireless drivers.
+ Only ath9k  ath10k make use of this.
 
-define KernelPackage/p54/Default
-  $(call KernelPackage/mac80211/Default)
-  TITLE:=Prism54 Drivers
-endef
+   config PACKAGE_ATH_DFS
+   

[OpenWrt-Devel] [PATCH 7/7] mac80211: rename iwlagn to iwlwifi

2015-08-23 Thread Dirk Neukirchen
follow upstream module rename
commit 3c607d27c818cf4a5d28f2c73b18a88f8fbdfa33

Signed-off-by: Dirk Neukirchen dirkneukirc...@web.de
---
 package/kernel/mac80211/Makefile | 20 ++--
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/package/kernel/mac80211/Makefile b/package/kernel/mac80211/Makefile
index 061f117..cb38ab0 100644
--- a/package/kernel/mac80211/Makefile
+++ b/package/kernel/mac80211/Makefile
@@ -28,7 +28,7 @@ PKG_DRIVERS = \
b43 b43legacy \
carl9170 \
hermes hermes-pci hermes-pcmcia hermes-plx \
-   iwl-legacy iwl3945 iwl4965 iwlagn \
+   iwl-legacy iwl3945 iwl4965 iwlwifi \
libipw ipw2100 ipw2200 \
libertas-usb libertas-sdio \
lib80211 \
@@ -904,7 +904,7 @@ define KernelPackage/ipw2200/description
 endef
 
 
-define KernelPackage/iwlagn
+define KernelPackage/iwlwifi
   $(call KernelPackage/mac80211/Default)
   DEPENDS:= +kmod-mac80211 @PCI_SUPPORT +@DRIVER_11N_SUPPORT
   TITLE:=Intel AGN Wireless support
@@ -916,8 +916,8 @@ define KernelPackage/iwlagn
   MENU:=1
 endef
 
-define KernelPackage/iwlagn/description
- iwlagn kernel module for
+define KernelPackage/iwlwifi/description
+ iwlwifi kernel module for
  Intel Wireless WiFi Link 6250AGN Adapter
  Intel 6000 Series Wi-Fi Adapters (6200AGN and 6300AGN)
  Intel WiFi Link 1000BGN
@@ -935,11 +935,11 @@ define KernelPackage/iwlagn/description
  Intel 3165 Wi-Fi Adapter
 endef
 
-define KernelPackage/iwlagn/config
-  if PACKAGE_kmod-iwlagn
+define KernelPackage/iwlwifi/config
+  if PACKAGE_kmod-iwlwifi
 
config PACKAGE_IWLWIFI_DEBUG
-   bool Enable full debugging output in the iwlagn driver
+   bool Enable full debugging output in the iwlwif driver
default n
help
  This option will enable debug tracing output for the iwlwifi 
drivers
@@ -1747,7 +1747,7 @@ config-$(call config_package,ipw2200) += IPW2200
 config-$(call config_package,iwl-legacy) += IWLEGACY
 config-$(call config_package,iwl3945) += IWL3945
 config-$(call config_package,iwl4965) += IWL4965
-config-$(call config_package,iwlagn) += IWLWIFI IWLDVM IWLMVM
+config-$(call config_package,iwlwifi) += IWLWIFI IWLDVM IWLMVM
 config-$(CONFIG_PACKAGE_IWLWIFI_DEBUG)+= IWLWIFI_DEBUG
 config-$(CONFIG_PACKAGE_IWLWIFI_DEBUGFS)+= IWLWIFI_DEBUGFS
 
@@ -2001,7 +2001,7 @@ define KernelPackage/ipw2200/install
$(INSTALL_DATA) 
$(PKG_BUILD_DIR)/$(IPW2200_NAME)-$(IPW2200_VERSION)/ipw2200*.fw 
$(1)/lib/firmware
 endef
 
-define KernelPackage/iwlagn/install
+define KernelPackage/iwlwifi/install
$(INSTALL_DIR) $(1)/lib/firmware
 ifneq ($(CONFIG_IWL100_FW),)
$(INSTALL_DATA) 
$(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/iwlwifi-100-5.ucode 
$(1)/lib/firmware
@@ -2205,7 +2205,7 @@ $(eval $(call KernelPackage,carl9170))
 $(eval $(call KernelPackage,cfg80211))
 $(eval $(call KernelPackage,iwl3945))
 $(eval $(call KernelPackage,iwl4965))
-$(eval $(call KernelPackage,iwlagn))
+$(eval $(call KernelPackage,iwlwifi))
 $(eval $(call KernelPackage,iwl-legacy))
 $(eval $(call KernelPackage,lib80211))
 $(eval $(call KernelPackage,libertas-sdio))
-- 
2.5.0
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCHv3 netifd 3/3] bridge: Allow setting multicast_router option

2015-08-23 Thread Linus Lüssing
The multicast_router option of a bridge allows to control the forwarding
behaviour of multicast packets independant of the listener state:

* 0: Only forward if specific listener is present
* 1 (default): Forward if specific listener or a multicast router
  was detected (currently only learned via query messages, no MRD
  support yet)
* 2: Always forward any multicast traffic on this port

Since MRD is not mandated you might end up with silent multicast routers
(e.g. if your link has more than one multicast router; only one can
become the selected, noisy querier). Here you might need a manual
configuration option like the multicast_router option.

Other scenarios where this can be useful are for instance:
* Segmentation of IGMP/MLD domains together with ebtables
* Dedicated bridge port for monitoring/debugging purposes

Signed-off-by: Linus Lüssing linus.luess...@c0d3.blue
---
 device.c   |   12 
 device.h   |3 +++
 system-linux.c |   18 ++
 3 files changed, 33 insertions(+)

diff --git a/device.c b/device.c
index b44ccb8..d6e288c 100644
--- a/device.c
+++ b/device.c
@@ -49,6 +49,7 @@ static const struct blobmsg_policy dev_attrs[__DEV_ATTR_MAX] 
= {
[DEV_ATTR_XPS] = { .name = xps, .type = BLOBMSG_TYPE_BOOL },
[DEV_ATTR_DADTRANSMITS] = { .name = dadtransmits, .type = 
BLOBMSG_TYPE_INT32 },
[DEV_ATTR_MULTICAST_TO_UNICAST] = { .name = multicast_to_unicast, 
.type = BLOBMSG_TYPE_BOOL },
+   [DEV_ATTR_MULTICAST_ROUTER] = { .name = multicast_router, .type = 
BLOBMSG_TYPE_INT32 },
 };
 
 const struct uci_blob_param_list device_attr_list = {
@@ -176,6 +177,7 @@ device_merge_settings(struct device *dev, struct 
device_settings *n)
n-dadtransmits = s-flags  DEV_OPT_DADTRANSMITS ?
s-dadtransmits : os-dadtransmits;
n-multicast_to_unicast = s-multicast_to_unicast;
+   n-multicast_router = s-multicast_router;
n-flags = s-flags | os-flags;
 }
 
@@ -281,6 +283,14 @@ device_init_settings(struct device *dev, struct blob_attr 
**tb)
s-flags |= DEV_OPT_MULTICAST_TO_UNICAST;
}
 
+   if ((cur = tb[DEV_ATTR_MULTICAST_ROUTER])) {
+   s-multicast_router = blobmsg_get_u32(cur);
+   if (s-multicast_router = 0  s-multicast_router = 2)
+   s-flags |= DEV_OPT_MULTICAST_ROUTER;
+   else
+   DPRINTF(Invalid value: %d - (Use 0: never, 1: learn, 
2: always)\n, blobmsg_get_u32(cur));
+   }
+
device_set_disabled(dev, disabled);
 }
 
@@ -893,6 +903,8 @@ device_dump_status(struct blob_buf *b, struct device *dev)
blobmsg_add_u32(b, dadtransmits, st.dadtransmits);
if (st.flags  DEV_OPT_MULTICAST_TO_UNICAST)
blobmsg_add_u8(b, multicast_to_unicast, 
st.multicast_to_unicast);
+   if (st.flags  DEV_OPT_MULTICAST_ROUTER)
+   blobmsg_add_u32(b, multicast_router, 
st.multicast_router);
}
 
s = blobmsg_open_table(b, statistics);
diff --git a/device.h b/device.h
index 4344d8a..86a1628 100644
--- a/device.h
+++ b/device.h
@@ -43,6 +43,7 @@ enum {
DEV_ATTR_XPS,
DEV_ATTR_DADTRANSMITS,
DEV_ATTR_MULTICAST_TO_UNICAST,
+   DEV_ATTR_MULTICAST_ROUTER,
__DEV_ATTR_MAX,
 };
 
@@ -86,6 +87,7 @@ enum {
DEV_OPT_MTU6= (1  12),
DEV_OPT_DADTRANSMITS= (1  13),
DEV_OPT_MULTICAST_TO_UNICAST= (1  14),
+   DEV_OPT_MULTICAST_ROUTER= (1  15),
 };
 
 /* events broadcasted to all users of a device */
@@ -144,6 +146,7 @@ struct device_settings {
bool xps;
unsigned int dadtransmits;
bool multicast_to_unicast;
+   unsigned int multicast_router;
 };
 
 /*
diff --git a/system-linux.c b/system-linux.c
index 944245c..01500a5 100644
--- a/system-linux.c
+++ b/system-linux.c
@@ -325,6 +325,13 @@ static void system_bridge_set_hairpin_mode(struct device 
*dev, const char *val)
system_set_dev_sysctl(/sys/class/net/%s/brport/hairpin_mode, 
dev-ifname, val);
 }
 
+static void system_bridge_set_multicast_router(struct device *dev, const char 
*val, bool bridge)
+{
+   system_set_dev_sysctl(bridge ? 
/sys/class/net/%s/bridge/multicast_router :
+  
/sys/class/net/%s/brport/multicast_router,
+ dev-ifname, val);
+}
+
 static int system_get_sysctl(const char *path, char *buf, const size_t buf_sz)
 {
int fd = -1, ret = -1;
@@ -585,6 +592,7 @@ system_bridge_set_wireless(struct device *bridge, struct 
device *dev)
 
 int system_bridge_addif(struct device *bridge, struct device *dev)
 {
+   char buf[64];
char *oldbr;
int ret = 0;
 
@@ -595,6 +603,11 @@ int system_bridge_addif(struct device *bridge, struct 
device *dev)
if (dev-wireless)
system_bridge_set_wireless(bridge, dev);
 
+   if (dev-settings.flags  

[OpenWrt-Devel] [PATCHv3 openwrt 1/2] Revert kernel: disable multicast-to-unicast translation for ipv6 neighbor solicitation (#17625)

2015-08-23 Thread Linus Lüssing
This reverts commit a080e8e1943156168913d0353a2e99d1151102aa.

It did not fix the problem but just hid some symptom. The real issue was
that IGMP/MLD report suppression was not considered for the
multicast-to-unicast feature. A recent netifd which isolates IGMP/MLD
reports between STAs by utilizing AP-isolation and bridge-hairpinning
should have fixed this.

It is perfectly fine to apply multicast-to-unicast to IPv6 Neighbor
Solicitations, too (once that feature is configured correctly).

Signed-off-by: Linus Lüssing linus.luess...@c0d3.blue
---
 .../645-bridge_multicast_to_unicast.patch  |   37 +---
 1 file changed, 17 insertions(+), 20 deletions(-)

diff --git 
a/target/linux/generic/patches-3.18/645-bridge_multicast_to_unicast.patch 
b/target/linux/generic/patches-3.18/645-bridge_multicast_to_unicast.patch
index 00ad14f..e8be1fd 100644
--- a/target/linux/generic/patches-3.18/645-bridge_multicast_to_unicast.patch
+++ b/target/linux/generic/patches-3.18/645-bridge_multicast_to_unicast.patch
@@ -87,19 +87,16 @@
  {
struct br_ip br_group;
  
-@@ -736,7 +758,10 @@ static int br_ip6_multicast_add_group(st
+@@ -736,7 +758,7 @@ static int br_ip6_multicast_add_group(st
br_group.proto = htons(ETH_P_IPV6);
br_group.vid = vid;
  
 -  return br_multicast_add_group(br, port, br_group);
-+  if (ipv6_addr_is_solict_mult(group))
-+  src = NULL;
-+
 +  return br_multicast_add_group(br, port, br_group, src);
  }
  #endif
  
-@@ -965,6 +990,7 @@ static int br_ip4_multicast_igmp3_report
+@@ -965,6 +987,7 @@ static int br_ip4_multicast_igmp3_report
 struct sk_buff *skb,
 u16 vid)
  {
@@ -107,7 +104,7 @@
struct igmpv3_report *ih;
struct igmpv3_grec *grec;
int i;
-@@ -1008,7 +1034,7 @@ static int br_ip4_multicast_igmp3_report
+@@ -1008,7 +1031,7 @@ static int br_ip4_multicast_igmp3_report
continue;
}
  
@@ -116,7 +113,7 @@
if (err)
break;
}
-@@ -1022,6 +1048,7 @@ static int br_ip6_multicast_mld2_report(
+@@ -1022,6 +1045,7 @@ static int br_ip6_multicast_mld2_report(
struct sk_buff *skb,
u16 vid)
  {
@@ -124,7 +121,7 @@
struct icmp6hdr *icmp6h;
struct mld2_grec *grec;
int i;
-@@ -1070,7 +1097,7 @@ static int br_ip6_multicast_mld2_report(
+@@ -1070,7 +1094,7 @@ static int br_ip6_multicast_mld2_report(
}
  
err = br_ip6_multicast_add_group(br, port, grec-grec_mca,
@@ -133,7 +130,7 @@
if (err)
break;
}
-@@ -1406,7 +1433,8 @@ br_multicast_leave_group(struct net_brid
+@@ -1407,7 +1431,8 @@ br_multicast_leave_group(struct net_brid
 struct net_bridge_port *port,
 struct br_ip *group,
 struct bridge_mcast_other_query *other_query,
@@ -143,7 +140,7 @@
  {
struct net_bridge_mdb_htable *mdb;
struct net_bridge_mdb_entry *mp;
-@@ -1456,7 +1484,7 @@ br_multicast_leave_group(struct net_brid
+@@ -1457,7 +1482,7 @@ br_multicast_leave_group(struct net_brid
for (pp = mp-ports;
 (p = mlock_dereference(*pp, br)) != NULL;
 pp = p-next) {
@@ -152,7 +149,7 @@
continue;
  
rcu_assign_pointer(*pp, p-next);
-@@ -1490,7 +1518,7 @@ br_multicast_leave_group(struct net_brid
+@@ -1491,7 +1516,7 @@ br_multicast_leave_group(struct net_brid
for (p = mlock_dereference(mp-ports, br);
 p != NULL;
 p = mlock_dereference(p-next, br)) {
@@ -161,7 +158,7 @@
continue;
  
if (!hlist_unhashed(p-mglist) 
-@@ -1508,8 +1536,8 @@ out:
+@@ -1509,8 +1534,8 @@ out:
  
  static void br_ip4_multicast_leave_group(struct net_bridge *br,
 struct net_bridge_port *port,
@@ -172,7 +169,7 @@
  {
struct br_ip br_group;
struct bridge_mcast_own_query *own_query;
-@@ -1524,14 +1552,14 @@ static void br_ip4_multicast_leave_group
+@@ -1525,14 +1550,14 @@ static void br_ip4_multicast_leave_group
br_group.vid = vid;
  
br_multicast_leave_group(br, port, br_group, br-ip4_other_query,
@@ -189,7 +186,7 @@
  {
struct br_ip br_group;
struct bridge_mcast_own_query *own_query;
-@@ -1546,7 +1574,7 @@ static void br_ip6_multicast_leave_group
+@@ -1547,7 +1572,7 @@ static void br_ip6_multicast_leave_group
br_group.vid = vid;
  
br_multicast_leave_group(br, port, br_group, br-ip6_other_query,
@@ -198,7 +195,7 @@
  }
  #endif
  
-@@ -1555,6 +1583,7 @@ static int br_multicast_ipv4_rcv(struct
+@@ -1556,6 +1581,7 @@ static int br_multicast_ipv4_rcv(struct
 struct 

[OpenWrt-Devel] [PATCH 5/7] mac80211: add iwlagn debug options

2015-08-23 Thread Dirk Neukirchen
Signed-off-by: Dirk Neukirchen dirkneukirc...@web.de
---
 package/kernel/mac80211/Makefile | 36 
 1 file changed, 36 insertions(+)

diff --git a/package/kernel/mac80211/Makefile b/package/kernel/mac80211/Makefile
index f2ea123..b9042db 100644
--- a/package/kernel/mac80211/Makefile
+++ b/package/kernel/mac80211/Makefile
@@ -859,6 +859,40 @@ endef
 define KernelPackage/iwlagn/config
   if PACKAGE_kmod-iwlagn
 
+   config PACKAGE_IWLWIFI_DEBUG
+   bool Enable full debugging output in the iwlagn driver
+   default n
+   help
+ This option will enable debug tracing output for the iwlwifi 
drivers
+
+ This will result in the kernel module being ~100k larger.  
You can
+ control which debug output is sent to the kernel log by 
setting the
+ value in
+
+   /sys/module/iwlwifi/parameters/debug
+
+ This entry will only exist if this option is enabled.
+
+ To set a value, simply echo an 8-byte hex value to the same 
file:
+
+ % echo 0x43fff  /sys/module/iwlwifi/parameters/debug
+
+ You can find the list of debug mask values in:
+ drivers/net/wireless/iwlwifi/iwl-debug.h
+
+ If this is your first time using this driver, you should say 
Y here
+ as the debug information can assist others in helping you 
resolve
+ any problems you may encounter.
+
+   config PACKAGE_IWLWIFI_DEBUGFS
+   bool iwlwifi debugfs support
+   depends on PACKAGE_MAC80211_DEBUGFS
+   default n
+   help
+ Enable creation of debugfs files for the iwlwifi drivers. This
+ is a low-impact option that allows getting insight into the
+ driver's state at runtime.
+
config IWL100_FW
bool Intel 100 Firmware
default y
@@ -1699,6 +1733,8 @@ config-$(call config_package,iwl-legacy) += IWLEGACY
 config-$(call config_package,iwl3945) += IWL3945
 config-$(call config_package,iwl4965) += IWL4965
 config-$(call config_package,iwlagn) += IWLWIFI IWLDVM IWLMVM
+config-$(CONFIG_PACKAGE_IWLWIFI_DEBUG)+= IWLWIFI_DEBUG
+config-$(CONFIG_PACKAGE_IWLWIFI_DEBUGFS)+= IWLWIFI_DEBUGFS
 
 config-$(call config_package,net-libipw) += LIBIPW
 config-$(call config_package,net-ipw2100) += IPW2100
-- 
2.5.0
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 2/3] kernel: package up sdhci-pxav3

2015-08-23 Thread Jonas Gorski
Package the sdhci controller driver found on armada 38x boards and add
backported fixes to allow them to be selected / not break the boot.

Signed-off-by: Jonas Gorski j...@openwrt.org
---
 package/kernel/linux/modules/other.mk  | 12 
 ...Fix-hardware-dependencies-for-sdhci-pxav3.patch | 33 ++
 2 files changed, 45 insertions(+)
 create mode 100644 
target/linux/mvebu/patches-4.0/060-mmc-Fix-hardware-dependencies-for-sdhci-pxav3.patch

diff --git a/package/kernel/linux/modules/other.mk 
b/package/kernel/linux/modules/other.mk
index 4a65a03..0da9a33 100644
--- a/package/kernel/linux/modules/other.mk
+++ b/package/kernel/linux/modules/other.mk
@@ -362,6 +362,18 @@ endef
 $(eval $(call KernelPackage,sdhci))
 
 
+define KernelPackage/sdhci-pxav3
+  SUBMENU:=$(OTHER_MENU)
+  TITLE:=Marvell MMP2 SD Host Controller support (PXAV3)
+  DEPENDS:=+kmod-sdhci @TARGET_mvebu
+  KCONFIG:=CONFIG_MMC_SDHCI_PXAV3
+  FILES:=$(LINUX_DIR)/drivers/mmc/host/sdhci-pxav3.ko
+  AUTOLOAD:=$(call AutoProbe,sdhci-pxav3,1)
+endef
+
+$(eval $(call KernelPackage,sdhci-pxav3))
+
+
 define KernelPackage/oprofile
   SUBMENU:=$(OTHER_MENU)
   TITLE:=OProfile profiling support
diff --git 
a/target/linux/mvebu/patches-4.0/060-mmc-Fix-hardware-dependencies-for-sdhci-pxav3.patch
 
b/target/linux/mvebu/patches-4.0/060-mmc-Fix-hardware-dependencies-for-sdhci-pxav3.patch
new file mode 100644
index 000..5cc08b5
--- /dev/null
+++ 
b/target/linux/mvebu/patches-4.0/060-mmc-Fix-hardware-dependencies-for-sdhci-pxav3.patch
@@ -0,0 +1,33 @@
+From daa3054f5772b14dd073a2b95fd0353faec0fcc5 Mon Sep 17 00:00:00 2001
+From: Jean Delvare jdelv...@suse.de
+Date: Mon, 23 Feb 2015 11:30:40 +0100
+Subject: [PATCH] mmc: Fix hardware dependencies for sdhci-pxav3
+
+It was brought to my attention that the sdhci-pxav3 driver is needed
+on a few more ARM machines than I initially thought. Add the missing
+architectures to the dependency list.
+
+Credits to Peter Robinson for noticing my mistake and reporting.
+
+Reported-by: Peter Robinson pbrobin...@gmail.com
+Signed-off-by: Jean Delvare jdelv...@suse.de
+Cc: Chris Ball ch...@printf.net
+Cc: Ulf Hansson ulf.hans...@linaro.org
+Cc: Eric Miao eric.y.m...@gmail.com
+Cc: Haojian Zhuang haojian.zhu...@gmail.com
+Signed-off-by: Ulf Hansson ulf.hans...@linaro.org
+---
+ drivers/mmc/host/Kconfig |2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/mmc/host/Kconfig
 b/drivers/mmc/host/Kconfig
+@@ -230,7 +230,7 @@ config MMC_SDHCI_PXAV3
+   tristate Marvell MMP2 SD Host Controller support (PXAV3)
+   depends on CLKDEV_LOOKUP
+   depends on MMC_SDHCI_PLTFM
+-  depends on ARCH_MMP || COMPILE_TEST
++  depends on ARCH_BERLIN || ARCH_MMP || ARCH_MVEBU || COMPILE_TEST
+   default CPU_MMP2
+   help
+ This selects the Marvell(R) PXAV3 SD Host Controller.
-- 
2.1.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] mvebu: also copy nor initramfs kernels to bin

2015-08-23 Thread Jonas Gorski
r45421 added copying initramfs kernels for NAND profiles, but missed
both NOR profiles.

Signed-off-by: Jonas Gorski j...@openwrt.org
---
 target/linux/mvebu/image/Makefile | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/target/linux/mvebu/image/Makefile 
b/target/linux/mvebu/image/Makefile
index 7f270dd..255f1a4 100644
--- a/target/linux/mvebu/image/Makefile
+++ b/target/linux/mvebu/image/Makefile
@@ -63,6 +63,7 @@ define UBINORProfile
 
   define Image/Build/Profile/$(1)/Initramfs
$(call Image/Build/DTB,$(2),-initramfs)
+   cp $(KDIR)/uImage-initramfs-$(2) $(BIN_DIR)/$(IMG_PREFIX)-$(2)-initramfs
   endef
 
   define Image/Build/Profile/$(1)/squashfs
@@ -85,6 +86,7 @@ define NORProfile
 
   define Image/Build/Profile/$(1)/Initramfs
$(call Image/Build/DTB,$(2),-initramfs)
+   cp $(KDIR)/uImage-initramfs-$(2) $(BIN_DIR)/$(IMG_PREFIX)-$(2)-initramfs
   endef
 
   define Image/Build/Profile/$(1)/squashfs
-- 
2.1.4
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCHv3] Fixes regarding bridge multicast-to-unicast feature

2015-08-23 Thread Linus Lüssing
Hi,

Here are a few patches to fix the issues the multicast-to-unicast
feature of the bridge has: IGMP/MLD report suppression could lead
to multicast packet loss. Also see ticket #17625 [0].

As previously discussed on this mailing list, AP-isolation together
with bridge-hairpinning is a way to make the multicast-to-unicast
feature usable even if listeners potentially suppressing reports
are present: That way the bridge will get all reports and will have
full control on where to forward them. For instance *not* to other
STAs (unless there is a multicast router).

Furthermore [PATCH netifd 2/3] introduces a netifd option to disable
the multicast-to-unicast feature.

[PATCH netifd 3/3] is not related to this issue but introduces a
handy option (which I would like to make use of for IGMP/MLD domain
segmentation).


The OpenWRT specific patches should be applied after the netifd
patches arrived in OpenWRT.

Cheers, Linus

[0]: https://dev.openwrt.org/ticket/17625

~~~

Changelog v3:
* Removed [PATCH openwrt 1/3]:
  Now included in [PATCH netifd 1/3] through netifd-wireless.sh

Changelog v2:
* Separated introduction of multicast_to_unicast configuration option
  in separate patch
* passing multicast_to_unicast to netifd scripts via json from netifd
  instead of external uci command calls
* Moved multicast_to_unicast uci option to be a bridge instead of
  bridge member option
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH 4/7] mac80211: refresh Intel firmware

2015-08-23 Thread Hauke Mehrtens


On 08/23/2015 12:56 PM, Dirk Neukirchen wrote:
 - sort firmware
 - add newer firmware for Intel chipsets
 - newer Intel MVM require firmware
 - ucode 13 requires Kernel 4.1+
 
 only compile tested

Have you looked if this would close any open feature requests / issues
in OpenWrt trac?

 Signed-off-by: Dirk Neukirchen dirkneukirc...@web.de
 ---
  package/kernel/mac80211/Makefile | 198 
 ++-
  1 file changed, 133 insertions(+), 65 deletions(-)
 
 +
 + config IWL3160_FW
 + bool Intel 3160 Firmware
 + default y
 + help
 +   Download and install firmware for:
 + Intel Wireless WiFi 3160
 +
 + config IWL3160_13_FW
 + bool Intel 3160 Firmware ucode 13 (4.1+)
 + default y
 + depends on LINUX_4_1
 + help
 +   Download and install firmware for:
 + Intel Wireless WiFi 3160

Does this really depend on the kernel version and not on the iwl driver
version? OpenWrt uses the driver from a very recent wireless tree, so it
should be equivalent to something between 4.2 and 4.3 now.

I would suggest just using the most recent firmware files for the Intel
wifi devices.

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


[OpenWrt-Devel] [PATCH v3] busybox: lock: implement -n Fail rather than wait

2015-08-23 Thread Alexander Couzens
lock -n is similiar to flock -n. If the lock was already taken,
fail with exit code = 1 and write error message to stderr.

example:
if ! lock -n /tmp/foo ; then
echo lock exits.
else
echo lock was free. But is locked now.
fi
 lock was free. But is locked now.
 lock exists.

Signed-off-by: Alexander Couzens lyn...@fe80.eu
---
v1: implement feature
v2: rename variable failinsteadwait into try_lock
extend description of -n
run make package/utils/busybox/refresh
v3: drop changelog from commit message
remove ret variable

 package/utils/busybox/patches/220-add_lock_util.patch | 15 ---
 1 file changed, 12 insertions(+), 3 deletions(-)

diff --git a/package/utils/busybox/patches/220-add_lock_util.patch 
b/package/utils/busybox/patches/220-add_lock_util.patch
index f42edcb..9cac9e6 100644
--- a/package/utils/busybox/patches/220-add_lock_util.patch
+++ b/package/utils/busybox/patches/220-add_lock_util.patch
@@ -1,6 +1,6 @@
 --- a/include/applets.src.h
 +++ b/include/applets.src.h
-@@ -211,6 +211,7 @@ IF_LN(APPLET_NOEXEC(ln, ln, BB_DIR_BIN, 
+@@ -211,6 +211,7 @@ IF_LN(APPLET_NOEXEC(ln, ln, BB_DIR_BIN,
  IF_LOAD_POLICY(APPLET(load_policy, BB_DIR_USR_SBIN, BB_SUID_DROP))
  IF_LOADFONT(APPLET(loadfont, BB_DIR_USR_SBIN, BB_SUID_DROP))
  IF_LOADKMAP(APPLET(loadkmap, BB_DIR_SBIN, BB_SUID_DROP))
@@ -35,7 +35,7 @@
  lib-$(CONFIG_MICROCOM)+= microcom.o
 --- /dev/null
 +++ b/miscutils/lock.c
-@@ -0,0 +1,135 @@
+@@ -0,0 +1,144 @@
 +/*
 + * Copyright (C) 2006 Felix Fietkau n...@openwrt.org
 + *
@@ -56,6 +56,7 @@
 +static int unlock = 0;
 +static int shared = 0;
 +static int waitonly = 0;
++static int try_lock = 0;
 +static int fd;
 +static char *file;
 +
@@ -65,6 +66,7 @@
 + -s  Use shared locking\n
 + -u  Unlock\n
 + -w  Wait for the lock to become free, don't 
acquire lock\n
++ -n  Don't wait for the lock to become free. 
Fail with exit code\n
 +  \n, name);
 +  exit(1);
 +}
@@ -95,6 +97,7 @@
 +static int do_lock(void)
 +{
 +  int pid;
++  int flags;
 +  char pidstr[8];
 +
 +  if ((fd = open(file, O_RDWR | O_CREAT | O_EXCL, 0700))  0) {
@@ -104,7 +107,10 @@
 +  }
 +  }
 +
-+  if (flock(fd, (shared ? LOCK_SH : LOCK_EX))  0) {
++  flags = shared ? LOCK_SH : LOCK_EX;
++  flags |= try_lock ? LOCK_NB : 0;
++
++  if (flock(fd, flags)  0) {
 +  fprintf(stderr, Can't lock %s\n, file);
 +  return 1;
 +  }
@@ -156,6 +162,9 @@
 +  case 'u':
 +  unlock = 1;
 +  break;
++  case 'n':
++  try_lock = 1;
++  break;
 +  }
 +  }
 +  c--;
-- 
2.5.0
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH] wpan-tools: bump to wpan-tools-0.5

2015-08-23 Thread Varka Bhadram
Signed-off-by: Varka Bhadram varkabhad...@gmail.com
---
 package/network/utils/wpan-tools/Makefile |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/package/network/utils/wpan-tools/Makefile 
b/package/network/utils/wpan-tools/Makefile
index 87a5fb1..6c2559d 100644
--- a/package/network/utils/wpan-tools/Makefile
+++ b/package/network/utils/wpan-tools/Makefile
@@ -8,11 +8,11 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=wpan-tools
-PKG_VERSION:=0.4
+PKG_VERSION:=0.5
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=http://wpan.cakelab.org/releases/
-PKG_MD5SUM:=37575523d1543e06b11295f03a891fa7
+PKG_MD5SUM:=6226df405a98c13ec41bf4d1f0777d6b
 
 include $(INCLUDE_DIR)/package.mk
 
-- 
1.7.9.5
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel