Re: [OpenWrt-Devel] [PATCH] mac80211: Add some missing 802.11n capabilities to hostapd configuration

2015-01-25 Thread Felix Fietkau
On 2015-01-25 04:45, Robert Hancock wrote:
 Add some missing 802.11n capabilities to the hostapd ht_capab string when
 supported by the hardware: Spatial Multiplexing Power-Save,
 Delayed Block Ack, and 7935-byte AMSDUs.
 
 Signed-off-by: Robert Hancock hancock...@gmail.com
No driver actually does Delayed Block Ack, and I don't expect this to
change in the future - let's leave that out.

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


[OpenWrt-Devel] [PATCH] BB : ramips : Backport for Kingston MLWG2

2015-01-25 Thread L. D. Pinney
Backport r43990 to Barrier Breaker.

http://wiki.openwrt.org/toh/kingston/mlwg2

Signed-off-by: L. D. Pinney ldpin...@gmail.com

 target/linux/ramips/base-files/etc/diag.sh |   3 +++
 target/linux/ramips/base-files/etc/uci-defaults/01_leds|   4 +++
 target/linux/ramips/base-files/etc/uci-defaults/02_network |   4 +++
 target/linux/ramips/base-files/lib/ramips.sh   |   3 +++
 target/linux/ramips/base-files/lib/upgrade/platform.sh |   1 +
 target/linux/ramips/dts/MLWG2.dts  | 118 

 target/linux/ramips/image/Makefile |   2 ++
 7 files changed, 135 insertions(+)

diff --git a/target/linux/ramips/base-files/etc/diag.sh 
b/target/linux/ramips/base-files/etc/diag.sh
index 9ad7ccb..bd3779a 100755
--- a/target/linux/ramips/base-files/etc/diag.sh
+++ b/target/linux/ramips/base-files/etc/diag.sh
@@ -76,6 +76,9 @@ get_status_led() {
mlw221)
status_led=kingston:blue:status
;;
+   mlwg2)
+   status_led=kingston:blue:system
+   ;;
mofi3500-3gn)
status_led=mofi3500-3gn:green:status
;;
diff --git a/target/linux/ramips/base-files/etc/uci-defaults/01_leds 
b/target/linux/ramips/base-files/etc/uci-defaults/01_leds
index 2f36bed..f5b5b01 100755
--- a/target/linux/ramips/base-files/etc/uci-defaults/01_leds
+++ b/target/linux/ramips/base-files/etc/uci-defaults/01_leds
@@ -117,6 +117,10 @@ case $board in
set_wifi_led kingston:blue:wifi
ucidef_set_led_default system system kingston:blue:system 
1
;;
+   mlwg2)
+   set_wifi_led kingston:blue:wifi
+   ucidef_set_led_default system system kingston:blue:system 
1
+   ;;
mofi3500-3gn)
set_usb_led mofi3500-3gn:green:usb
;;
diff --git a/target/linux/ramips/base-files/etc/uci-defaults/02_network 
b/target/linux/ramips/base-files/etc/uci-defaults/02_network
index 6840fb6..91bedcc 100755
--- a/target/linux/ramips/base-files/etc/uci-defaults/02_network
+++ b/target/linux/ramips/base-files/etc/uci-defaults/02_network
@@ -55,6 +55,10 @@ ramips_setup_interfaces()
 ucidef_set_interface_lan eth0.2
 ;;
 
+   mlwg2)
+ucidef_set_interface_lan eth0.1
+;;
+
wl-330n | \
wmr300)
ucidef_set_interface_lan eth0.1
diff --git a/target/linux/ramips/base-files/lib/ramips.sh 
b/target/linux/ramips/base-files/lib/ramips.sh
index d7b5540..fd03423 100755
--- a/target/linux/ramips/base-files/lib/ramips.sh
+++ b/target/linux/ramips/base-files/lib/ramips.sh
@@ -163,6 +163,9 @@ ramips_board_detect() {
*Kingston MLW221)
name=mlw221
;;
+   *Kingston MLWG2)
+   name=mlwg2
+   ;;
*Planex MZK-750DHP)
name=mzk-750dhp
;;
diff --git a/target/linux/ramips/base-files/lib/upgrade/platform.sh 
b/target/linux/ramips/base-files/lib/upgrade/platform.sh
index 407c218..ba69a89 100755
--- a/target/linux/ramips/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ramips/base-files/lib/upgrade/platform.sh
@@ -56,6 +56,7 @@ platform_check_image() {
m3 | \
m4 | \
mlw221 | \
+   mlwg2 | \
mofi3500-3gn | \
mpr-a1 | \
mpr-a2 | \
diff --git a/target/linux/ramips/dts/MLWG2.dts 
b/target/linux/ramips/dts/MLWG2.dts
new file mode 100644
index 000..a2b0033
--- /dev/null
+++ b/target/linux/ramips/dts/MLWG2.dts
@@ -0,0 +1,118 @@
+/dts-v1/;
+
+/include/ mt7620n.dtsi
+
+/ {
+   compatible = mlwg2, ralink,mt7620n-soc;
+   model = Kingston MLWG2;
+
+   palmbus@1000 {
+   gpio0: gpio@600 {
+   status = okay;
+   };
+
+   gpio2: gpio@660 {
+   status = okay;
+   };
+
+   gpio3: gpio@688 {
+   status = okay;
+   };
+
+   spi@b00 {
+   status = okay;
+
+   m25p80@0 {
+   #address-cells = 1;
+   #size-cells = 1;
+   compatible = mx25l12805d;
+   reg = 0 0;
+   linux,modalias = m25p80;
+   spi-max-frequency = 1000;
+
+   partition@0 {
+   label = u-boot;
+   reg = 0x0 0x3;
+   read-only;
+   };
+
+   partition@3 {
+   label = u-boot-env;
+   reg = 0x3 0x1;
+  

Re: [OpenWrt-Devel] [PATCH 3/9] kernel: Allow ubi autoattach to run on NOR flash

2015-01-25 Thread Maxime Ripard
Hi,

On Fri, Jan 23, 2015 at 01:57:44PM +0100, Imre Kaloz wrote:
 On Thu, 22 Jan 2015 11:33:14 +0100, Maxime Ripard
 maxime.rip...@free-electrons.com wrote:
 
 Hi,
 
 On Wed, Jan 14, 2015 at 01:37:37PM +0100, Maxime Ripard wrote:
 On Wed, Jan 14, 2015 at 12:43:25PM +0100, Rafał Miłecki wrote:
  On 13 January 2015 at 16:56, Maxime Ripard
  maxime.rip...@free-electrons.com wrote:
   Some devices out there only have a NOR flash to store the rootfs on.
  
   While using UBI is arguable on this kind of NAND, this is something
 that should
   be supported.
 
  So why use UBI at all? Doesn't it make more sense to stick to the
  JFFS2? You should be even able to easily create 2 different image
  types (one for NOR, one for NAND) in one target (see bcm53xx).
 
 The Openblocks AX3 has a fairly large NOR (128MB) which would make
 JFFS2 a rather poor choice, and the UBI overhead wouldn't be that bad.
 
 Is that case good enough for you?
 
 Sure, but please implement UBI on NOR as a generic solution.

What do you mean? It already works quite well (with that patch applied
and the NOR sub-profile), so I'm not sure I have to implement
anything, be it generic or not.

 The A385-RD board has a much smaller SPI-NOR (16MB) though, so we
 could use jffs2 there, but I wasn't seeing much point at creating a
 whole new layout just for a single board.
 
 I'll switch this one to JFFS2 and the MTDSPLIT framework. Are you
 satisfied with the NAND support? Just to know if I can continue to
 model the NOR stuff on that.
 
 As I've written in the other mail, I'm mostly happy with it, but please make
 sure you don't hardcode available profiles but parse them.

If we don't plan on supporting building single sub-profiles like
ar71xx, I'm not even sure that we need to parse anything, we can just
loop over the sub-profiles list in any case.

Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com


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


[OpenWrt-Devel] [PATCH V3 1/5] brcm63xx: add basic-mmio-gpio DT support

2015-01-25 Thread Álvaro Fernández Rojas
Signed-off-by: Álvaro Fernández Rojas nolt...@gmail.com
---
diff --git 
a/target/linux/brcm63xx/patches-3.14/374-GPIO-generic-pdata-add-label-backport.patch
 
b/target/linux/brcm63xx/patches-3.14/374-GPIO-generic-pdata-add-label-backport.patch
new file mode 100644
index 000..cba5a0a
--- /dev/null
+++ 
b/target/linux/brcm63xx/patches-3.14/374-GPIO-generic-pdata-add-label-backport.patch
@@ -0,0 +1,21 @@
+--- a/drivers/gpio/gpio-generic.c
 b/drivers/gpio/gpio-generic.c
+@@ -531,6 +531,8 @@ static int bgpio_pdev_probe(struct platf
+   return err;
+ 
+   if (pdata) {
++  if (pdata-label)
++  bgc-gc.label = pdata-label;
+   bgc-gc.base = pdata-base;
+   if (pdata-ngpio  0)
+   bgc-gc.ngpio = pdata-ngpio;
+--- a/include/linux/basic_mmio_gpio.h
 b/include/linux/basic_mmio_gpio.h
+@@ -19,6 +19,7 @@
+ #include linux/spinlock_types.h
+ 
+ struct bgpio_pdata {
++  const char *label;
+   int base;
+   int ngpio;
+ };
diff --git 
a/target/linux/brcm63xx/patches-3.14/375-GPIO-generic-driver-flags-backport.patch
 
b/target/linux/brcm63xx/patches-3.14/375-GPIO-generic-driver-flags-backport.patch
new file mode 100644
index 000..3915d2c
--- /dev/null
+++ 
b/target/linux/brcm63xx/patches-3.14/375-GPIO-generic-driver-flags-backport.patch
@@ -0,0 +1,39 @@
+--- a/drivers/gpio/gpio-generic.c
 b/drivers/gpio/gpio-generic.c
+@@ -488,7 +488,7 @@ static int bgpio_pdev_probe(struct platf
+   void __iomem *dirout;
+   void __iomem *dirin;
+   unsigned long sz;
+-  unsigned long flags = 0;
++  unsigned long flags = pdev-id_entry-driver_data;
+   int err;
+   struct bgpio_chip *bgc;
+   struct bgpio_pdata *pdata = dev_get_platdata(dev);
+@@ -519,9 +519,6 @@ static int bgpio_pdev_probe(struct platf
+   if (err)
+   return err;
+ 
+-  if (!strcmp(platform_get_device_id(pdev)-name, basic-mmio-gpio-be))
+-  flags |= BGPIOF_BIG_ENDIAN;
+-
+   bgc = devm_kzalloc(pdev-dev, sizeof(*bgc), GFP_KERNEL);
+   if (!bgc)
+   return -ENOMEM;
+@@ -551,9 +548,14 @@ static int bgpio_pdev_remove(struct plat
+ }
+ 
+ static const struct platform_device_id bgpio_id_table[] = {
+-  { basic-mmio-gpio, },
+-  { basic-mmio-gpio-be, },
+-  {},
++  {
++  .name   = basic-mmio-gpio,
++  .driver_data= 0,
++  }, {
++  .name   = basic-mmio-gpio-be,
++  .driver_data= BGPIOF_BIG_ENDIAN,
++  },
++  { }
+ };
+ MODULE_DEVICE_TABLE(platform, bgpio_id_table);
+ 
diff --git a/target/linux/brcm63xx/patches-3.14/376-DT-basic-mmio-gpio.patch 
b/target/linux/brcm63xx/patches-3.14/376-DT-basic-mmio-gpio.patch
new file mode 100644
index 000..cda38b2
--- /dev/null
+++ b/target/linux/brcm63xx/patches-3.14/376-DT-basic-mmio-gpio.patch
@@ -0,0 +1,204 @@
+--- a/Documentation/devicetree/bindings/gpio/gpio.txt
 b/Documentation/devicetree/bindings/gpio/gpio.txt
+@@ -153,3 +153,75 @@ Example 2:
+ Here, three GPIO ranges are defined wrt. two pin controllers. pinctrl1 GPIO
+ ranges are defined using pin numbers whereas the GPIO ranges wrt. pinctrl2
+ are named foo and bar.
++
++3) Generic driver for memory-mapped GPIO controllers
++
++The GPIO generic library provides support for basic platform_device
++memory-mapped GPIO controllers, which can be accessed by selecting Kconfig
++symbol GPIO_GENERIC and using library functions provided by GPIO generic
++driver (see drivers/gpio/gpio-generic.c).
++The simplest form of a GPIO controller that the driver support is just a
++single data register, where GPIO state can be read and/or written.
++
++The driver supports:
++- 8/16/32/64 bits registers. The number of GPIOs is determined by the width of
++  the registers.
++- GPIO controllers with clear/set registers.
++- GPIO controllers with a single data register.
++- Big endian bits/GPIOs ordering.
++
++For setting GPIO's there are three supported configurations:
++- single input/output register resource (named dat).
++- set/clear pair (named set and clr).
++- single output register resource and single input resource (set and dat).
++
++For setting the GPIO direction, there are three supported configurations:
++- simple bidirection GPIO that requires no configuration.
++- an output direction register (named dirout) where a 1 bit indicates the
++  GPIO is an output.
++- an input direction register (named dirin) where a 1 bit indicates the GPIO
++  is an input.
++
++Required properties:
++- compatible : Should be basic-mmio-gpio.
++- reg : Address and length of the registers needed for the device.
++- reg-names : Names of the needed registers.
++- #gpio-cells : Should be two.  The first cell is the pin number and
++  the second cell is used to specify optional parameters (currently
++  unused).
++- gpio-controller : Marks the device node as a 

Re: [OpenWrt-Devel] ar8216: phy_init and bug report 18415

2015-01-25 Thread Weedy
On Wed, Dec 17, 2014 at 1:48 PM, Heiner Kallweit hkallwe...@gmail.com wrote:
 Ticket 18415 was closed as it was confirmed that as at least version =43419 
 is ok.
 (I assume 43410 fixed the issue.) Therefore current trunk should be ok.

 However if you want to check further what the actual root cause was:
 - Re-enable the additional reset by reverting 43410
 - Issue there?
 - If yes, check whether inserting a mdiobus_write(bus, i, MII_BMCR, 
 BMCR_ANENABLE);
before mdiobus_write(bus, i, MII_BMCR, BMCR_RESET | BMCR_ANENABLE); in
ar8xxx_phy_init fixes it.

 Heiner


So I'm shitty and I forgot about this.
Today I reapplied 43332 (so my checkout should be virgin), and made a image.
My WAN port broke again. Should I still go back to 43410?
I saw how many commits you have made since then which is why I flashed r44119.

# dmesg |grep Atheros
[0.00] SoC: Atheros AR9344 rev 2
[0.63] switch0: Atheros AR8327 rev. 2 switch registered on ag71xx-mdio.0
[1.30] ag71xx ag71xx.0: connected to PHY at ag71xx-mdio.0:00
[uid=004dd033, driver=Atheros AR8216/AR8236/AR8316]
[1.31] eth0: Atheros AG71xx at 0xb900, irq 4, mode:RGMII
[   11.76] ieee80211 phy0: Atheros AR9340 Rev:2 mem=0xb810, irq=47
[   11.81] ieee80211 phy1: Atheros AR9300 Rev:4 mem=0xb000, irq=40
[   24.82] Atheros AR8216/AR8236/AR8316 ag71xx-mdio.0:00: Port 2 is up
[   24.82] Atheros AR8216/AR8236/AR8316 ag71xx-mdio.0:00: Port 4 is up
[  423.90] Atheros AR8216/AR8236/AR8316 ag71xx-mdio.0:00: Port 3 is up
[  447.90] Atheros AR8216/AR8236/AR8316 ag71xx-mdio.0:00: Port 2 is down
[  453.90] Atheros AR8216/AR8236/AR8316 ag71xx-mdio.0:00: Port 1 is up


Sun Jan 25 10:49:21 2015 daemon.notice netifd: Interface 'wan' is now down
Sun Jan 25 10:49:21 2015 daemon.notice netifd: Interface 'wan' has
link connectivity loss
Sun Jan 25 10:49:21 2015 daemon.notice netifd: Interface 'modem' is now down
Sun Jan 25 10:49:21 2015 daemon.notice netifd: Interface 'modem' is disabled
Sun Jan 25 10:49:21 2015 daemon.notice netifd: Interface 'modem' is enabled
Sun Jan 25 10:49:21 2015 daemon.notice netifd: Interface 'modem' is
setting up now
Sun Jan 25 10:49:21 2015 daemon.notice netifd: Interface 'modem' is now up
Sun Jan 25 10:49:21 2015 daemon.notice netifd: Interface 'wan' is setting up now
Sun Jan 25 10:49:21 2015 daemon.notice netifd: Interface 'wan' is now up
Sun Jan 25 10:49:21 2015 daemon.notice netifd: Interface 'wan' has
link connectivity
Sun Jan 25 10:49:22 2015 user.notice firewall: Reloading firewall due
to ifup of modem (eth0.2)
Sun Jan 25 10:49:24 2015 user.err syslog: module is already loaded - cls_u32
Sun Jan 25 10:49:24 2015 user.err syslog: module is already loaded - em_u32
Sun Jan 25 10:49:24 2015 user.err syslog: module is already loaded -
act_connmark
Sun Jan 25 10:49:24 2015 user.err syslog: module is already loaded - act_mirred
Sun Jan 25 10:49:24 2015 user.err syslog: module is already loaded - sch_ingress
Sun Jan 25 10:49:24 2015 user.err syslog: module is already loaded - cls_fw
Sun Jan 25 10:49:24 2015 user.err syslog: module is already loaded - sch_hfsc
Sun Jan 25 10:49:25 2015 user.notice firewall: Reloading firewall due
to ifup of wan (eth0.2)
Sun Jan 25 10:49:28 2015 daemon.notice netifd: Interface 'wan' is now down
Sun Jan 25 10:49:30 2015 daemon.notice netifd: Interface 'wan' is setting up now
Sun Jan 25 10:49:30 2015 daemon.notice netifd: Interface 'wan' is now up
Sun Jan 25 10:49:31 2015 user.err syslog: module is already loaded - cls_u32
Sun Jan 25 10:49:31 2015 user.err syslog: module is already loaded - em_u32
Sun Jan 25 10:49:31 2015 user.err syslog: module is already loaded -
act_connmark
Sun Jan 25 10:49:31 2015 user.err syslog: module is already loaded - act_mirred
Sun Jan 25 10:49:31 2015 user.err syslog: module is already loaded - sch_ingress
Sun Jan 25 10:49:31 2015 user.err syslog: module is already loaded - cls_fw
Sun Jan 25 10:49:31 2015 user.err syslog: module is already loaded - sch_hfsc
Sun Jan 25 10:49:32 2015 user.notice firewall: Reloading firewall due
to ifup of wan (eth0.2)
Sun Jan 25 10:49:41 2015 daemon.notice netifd: Interface 'wan' is now down
Sun Jan 25 10:49:43 2015 daemon.notice netifd: Interface 'wan' is setting up now
Sun Jan 25 10:49:43 2015 daemon.notice netifd: Interface 'wan' is now up
Sun Jan 25 10:49:44 2015 user.err syslog: module is already loaded - cls_u32
Sun Jan 25 10:49:44 2015 user.err syslog: module is already loaded - em_u32
Sun Jan 25 10:49:44 2015 user.err syslog: module is already loaded -
act_connmark
Sun Jan 25 10:49:44 2015 user.err syslog: module is already loaded - act_mirred
Sun Jan 25 10:49:44 2015 user.err syslog: module is already loaded - sch_ingress
Sun Jan 25 10:49:44 2015 user.err syslog: module is already loaded - cls_fw
Sun Jan 25 10:49:44 2015 user.err syslog: module is already loaded - sch_hfsc
Sun Jan 25 10:49:44 2015 user.notice firewall: Reloading firewall due
to ifup of wan (eth0.2)
Sun Jan 25 10:49:53 2015 

[OpenWrt-Devel] [PATCH V3 5/5] brcm63xx: register GPIOs through DT

2015-01-25 Thread Álvaro Fernández Rojas
Signed-off-by: Álvaro Fernández Rojas nolt...@gmail.com
---
diff --git a/target/linux/brcm63xx/config-3.14 
b/target/linux/brcm63xx/config-3.14
index dd27f47..a5c1721 100644
--- a/target/linux/brcm63xx/config-3.14
+++ b/target/linux/brcm63xx/config-3.14
@@ -76,7 +76,10 @@ CONFIG_GENERIC_IRQ_SHOW=y
 CONFIG_GENERIC_PCI_IOMAP=y
 CONFIG_GENERIC_SMP_IDLE_THREAD=y
 CONFIG_GPIOLIB=y
+CONFIG_GPIO_74X164=y
 CONFIG_GPIO_DEVRES=y
+CONFIG_GPIO_GENERIC=y
+CONFIG_GPIO_GENERIC_PLATFORM=y
 CONFIG_GPIO_SYSFS=y
 # CONFIG_HAMRADIO is not set
 CONFIG_HAS_DMA=y
diff --git a/target/linux/brcm63xx/config-3.18 
b/target/linux/brcm63xx/config-3.18
index e3cf020..d5f9425 100644
--- a/target/linux/brcm63xx/config-3.18
+++ b/target/linux/brcm63xx/config-3.18
@@ -80,7 +80,10 @@ CONFIG_GENERIC_IRQ_SHOW=y
 CONFIG_GENERIC_PCI_IOMAP=y
 CONFIG_GENERIC_SMP_IDLE_THREAD=y
 CONFIG_GPIOLIB=y
+CONFIG_GPIO_74X164=y
 CONFIG_GPIO_DEVRES=y
+CONFIG_GPIO_GENERIC=y
+CONFIG_GPIO_GENERIC_PLATFORM=y
 CONFIG_GPIO_SYSFS=y
 # CONFIG_HAMRADIO is not set
 CONFIG_HAS_DMA=y
diff --git a/target/linux/brcm63xx/dts/a226g.dts 
b/target/linux/brcm63xx/dts/a226g.dts
index 9aff81b..1b40507 100644
--- a/target/linux/brcm63xx/dts/a226g.dts
+++ b/target/linux/brcm63xx/dts/a226g.dts
@@ -5,6 +5,83 @@
 / {
model = Pirelli A226G;
compatible = pirelli,a226g, brcm,bcm6358;
+
+   gpio-keys-polled {
+   compatible = gpio-keys-polled;
+   #address-cells = 1;
+   #size-cells = 0;
+   poll-interval = 20;
+   debounce-interval = 60;
+
+   wps {
+   label = wps;
+   gpios = gpio1 2 1;
+   linux,code = 0x211;
+   };
+   reset {
+   label = reset;
+   gpios = gpio1 5 1;
+   linux,code = 0x198;
+   };
+   };
+
+   gpio-leds {
+   compatible = gpio-leds;
+
+   voip_red {
+   label = DWV-S0:red:VoIP;
+   gpios = gpio0 0 1;
+   };
+   eth_red {
+   label = DWV-S0:red:ethernet;
+   gpios = gpio0 1 1;
+   };
+   dsl_green {
+   label = DWV-S0:green:ADSL;
+   gpios = gpio0 2 1;
+   };
+   usb_green {
+   label = DWV-S0:green:USB;
+   gpios = gpio0 3 1;
+   };
+   power_green {
+   label = DWV-S0:green:power;
+   gpios = gpio0 4 1;
+   default-state = on;
+   };
+   power_red {
+   label = DWV-S0:red:power;
+   gpios = gpio0 5 1;
+   };
+   inet_red {
+   label = DWV-S0:red:internet;
+   gpios = gpio0 6 1;
+   };
+   inet_green {
+   label = DWV-S0:green:internet;
+   gpios = gpio0 7 1;
+   };
+   eth_green {
+   label = DWV-S0:green:ethernet;
+   gpios = gpio0 8 1;
+   };
+   voip_green {
+   label = DWV-S0:green:VoIP;
+   gpios = gpio0 9 1;
+   };
+   wifi_red {
+   label = DWV-S0:red:wifi;
+   gpios = gpio0 10 1;
+   };
+   usb_red {
+   label = DWV-S0:red:USB;
+   gpios = gpio0 11 1;
+   };
+   dsl_red {
+   label = DWV-S0:red:ADSL;
+   gpios = gpio0 12 1;
+   };
+   };
 };
 
 pflash {
diff --git a/target/linux/brcm63xx/dts/a226m-fwb.dts 
b/target/linux/brcm63xx/dts/a226m-fwb.dts
index 1abf870..011f312 100644
--- a/target/linux/brcm63xx/dts/a226m-fwb.dts
+++ b/target/linux/brcm63xx/dts/a226m-fwb.dts
@@ -5,6 +5,83 @@
 / {
model = Pirelli A226M-FWB;
compatible = pirelli,a226m-fwb, brcm,bcm6358;
+
+   gpio-keys-polled {
+   compatible = gpio-keys-polled;
+   #address-cells = 1;
+   #size-cells = 0;
+   poll-interval = 20;
+   debounce-interval = 60;
+
+   wps {
+   label = wps;
+   gpios = gpio1 2 1;
+   linux,code = 0x211;
+   };
+   reset {
+   label = reset;
+   gpios = gpio1 5 1;
+   linux,code = 0x198;
+   };
+   };
+
+   gpio-leds {
+   compatible = gpio-leds;
+
+   voip_red {
+   label = DWV-S0:red:VoIP;
+   gpios = gpio0 0 1;
+   };
+   eth_red 

[OpenWrt-Devel] [PATCH V3 3/5] brcm63xx: backport DT spi-gpio no CS

2015-01-25 Thread Álvaro Fernández Rojas
Signed-off-by: Álvaro Fernández Rojas nolt...@gmail.com
---
diff --git 
a/target/linux/brcm63xx/patches-3.14/378-DT-SPI-GPIO-no-cs-backport.patch 
b/target/linux/brcm63xx/patches-3.14/378-DT-SPI-GPIO-no-cs-backport.patch
new file mode 100644
index 000..57b66eb
--- /dev/null
+++ b/target/linux/brcm63xx/patches-3.14/378-DT-SPI-GPIO-no-cs-backport.patch
@@ -0,0 +1,74 @@
+--- a/Documentation/devicetree/bindings/spi/spi-gpio.txt
 b/Documentation/devicetree/bindings/spi/spi-gpio.txt
+@@ -8,8 +8,10 @@ Required properties:
+  - gpio-sck: GPIO spec for the SCK line to use
+  - gpio-miso: GPIO spec for the MISO line to use
+  - gpio-mosi: GPIO spec for the MOSI line to use
+- - cs-gpios: GPIOs to use for chipselect lines
+- - num-chipselects: number of chipselect lines
++ - cs-gpios: GPIOs to use for chipselect lines.
++ Not needed if num-chipselects = 0.
++ - num-chipselects: Number of chipselect lines. Should be 0 if a single 
device
++with no chip select is connected.
+ 
+ Example:
+ 
+--- a/drivers/spi/spi-gpio.c
 b/drivers/spi/spi-gpio.c
+@@ -425,6 +425,7 @@ static int spi_gpio_probe(struct platfor
+   struct spi_gpio_platform_data   *pdata;
+   u16 master_flags = 0;
+   bool use_of = 0;
++  int num_devices;
+ 
+   status = spi_gpio_probe_dt(pdev);
+   if (status  0)
+@@ -434,16 +435,21 @@ static int spi_gpio_probe(struct platfor
+ 
+   pdata = dev_get_platdata(pdev-dev);
+ #ifdef GENERIC_BITBANG
+-  if (!pdata || !pdata-num_chipselect)
++  if (!pdata || (!use_of  !pdata-num_chipselect))
+   return -ENODEV;
+ #endif
+ 
++  if (use_of  !SPI_N_CHIPSEL)
++  num_devices = 1;
++  else
++  num_devices = SPI_N_CHIPSEL;
++
+   status = spi_gpio_request(pdata, dev_name(pdev-dev), master_flags);
+   if (status  0)
+   return status;
+ 
+   master = spi_alloc_master(pdev-dev, sizeof(*spi_gpio) +
+-  (sizeof(int) * SPI_N_CHIPSEL));
++  (sizeof(int) * num_devices));
+   if (!master) {
+   status = -ENOMEM;
+   goto gpio_free;
+@@ -458,7 +464,7 @@ static int spi_gpio_probe(struct platfor
+   master-bits_per_word_mask = SPI_BPW_RANGE_MASK(1, 32);
+   master-flags = master_flags;
+   master-bus_num = pdev-id;
+-  master-num_chipselect = SPI_N_CHIPSEL;
++  master-num_chipselect = num_devices;
+   master-setup = spi_gpio_setup;
+   master-cleanup = spi_gpio_cleanup;
+ #ifdef CONFIG_OF
+@@ -473,9 +479,12 @@ static int spi_gpio_probe(struct platfor
+* property of the node.
+*/
+ 
+-  for (i = 0; i  SPI_N_CHIPSEL; i++)
+-  spi_gpio-cs_gpios[i] =
+-  of_get_named_gpio(np, cs-gpios, i);
++  if (!SPI_N_CHIPSEL)
++  spi_gpio-cs_gpios[0] = SPI_GPIO_NO_CHIPSELECT;
++  else
++  for (i = 0; i  SPI_N_CHIPSEL; i++)
++  spi_gpio-cs_gpios[i] =
++  of_get_named_gpio(np, cs-gpios, i);
+   }
+ #endif
+ 
diff --git 
a/target/linux/brcm63xx/patches-3.18/376-DT-SPI-GPIO-no-cs-backport.patch 
b/target/linux/brcm63xx/patches-3.18/376-DT-SPI-GPIO-no-cs-backport.patch
new file mode 100644
index 000..da75cb5
--- /dev/null
+++ b/target/linux/brcm63xx/patches-3.18/376-DT-SPI-GPIO-no-cs-backport.patch
@@ -0,0 +1,74 @@
+--- a/Documentation/devicetree/bindings/spi/spi-gpio.txt
 b/Documentation/devicetree/bindings/spi/spi-gpio.txt
+@@ -8,8 +8,10 @@ Required properties:
+  - gpio-sck: GPIO spec for the SCK line to use
+  - gpio-miso: GPIO spec for the MISO line to use
+  - gpio-mosi: GPIO spec for the MOSI line to use
+- - cs-gpios: GPIOs to use for chipselect lines
+- - num-chipselects: number of chipselect lines
++ - cs-gpios: GPIOs to use for chipselect lines.
++ Not needed if num-chipselects = 0.
++ - num-chipselects: Number of chipselect lines. Should be 0 if a single 
device
++with no chip select is connected.
+ 
+ Example:
+ 
+--- a/drivers/spi/spi-gpio.c
 b/drivers/spi/spi-gpio.c
+@@ -424,6 +424,7 @@ static int spi_gpio_probe(struct platfor
+   struct spi_gpio_platform_data   *pdata;
+   u16 master_flags = 0;
+   bool use_of = 0;
++  int num_devices;
+ 
+   status = spi_gpio_probe_dt(pdev);
+   if (status  0)
+@@ -433,16 +434,21 @@ static int spi_gpio_probe(struct platfor
+ 
+   pdata = dev_get_platdata(pdev-dev);
+ #ifdef GENERIC_BITBANG
+-  if (!pdata || !pdata-num_chipselect)
++  if (!pdata || (!use_of  !pdata-num_chipselect))
+   return -ENODEV;
+ #endif
+ 
++  if (use_of  !SPI_N_CHIPSEL)
++  num_devices = 1;
++  else
++  num_devices = SPI_N_CHIPSEL;
++
+   status = spi_gpio_request(pdata, dev_name(pdev-dev), master_flags);
+   

[OpenWrt-Devel] [PATCH V3 4/5] brcm63xx: refresh patches

2015-01-25 Thread Álvaro Fernández Rojas
Signed-off-by: Álvaro Fernández Rojas nolt...@gmail.com
---
diff --git 
a/target/linux/brcm63xx/patches-3.14/320-irqchip-add-support-for-bcm6345-style-periphery-irq-.patch
 
b/target/linux/brcm63xx/patches-3.14/320-irqchip-add-support-for-bcm6345-style-periphery-irq-.patch
index 2fd1568..8219c98 100644
--- 
a/target/linux/brcm63xx/patches-3.14/320-irqchip-add-support-for-bcm6345-style-periphery-irq-.patch
+++ 
b/target/linux/brcm63xx/patches-3.14/320-irqchip-add-support-for-bcm6345-style-periphery-irq-.patch
@@ -94,7 +94,7 @@ Signed-off-by: Jonas Gorski j...@openwrt.org
  obj-$(CONFIG_METAG_PERFCOUNTER_IRQS)  += irq-metag.o
 --- /dev/null
 +++ b/drivers/irqchip/irq-bcm6345-periph.c
-@@ -0,0 +1,340 @@
+@@ -0,0 +1,341 @@
 +/*
 + * This file is subject to the terms and conditions of the GNU General Public
 + * License.  See the file COPYING in the main directory of this archive
@@ -246,6 +246,7 @@ Signed-off-by: Jonas Gorski j...@openwrt.org
 +  irq_hw_number_t hwirq = irqd_to_hwirq(data);
 +  struct intc_data *priv = data-domain-host_data;
 +  unsigned int i, reg, bit;
++  unsigned long flags;
 +  bool enabled;
 +  int cpu;
 +
@@ -265,7 +266,7 @@ Signed-off-by: Jonas Gorski j...@openwrt.org
 +  if (!priv-block[cpu].parent_irq)
 +  return -EINVAL;
 +
-+  raw_spin_lock(priv-lock);
++  raw_spin_lock_irqsave(priv-lock, flags);
 +  enabled = !irqd_irq_masked(data);
 +  for (i = 0; i  MAX_PARENT_IRQS; i++) {
 +  struct intc_block *block = priv-block[i];
@@ -281,7 +282,7 @@ Signed-off-by: Jonas Gorski j...@openwrt.org
 +  __bcm6345_periph_enable(block, reg, bit, false);
 +  }
 +  }
-+  raw_spin_unlock(priv-lock);
++  raw_spin_unlock_irqrestore(priv-lock, flags);
 +
 +  return 0;
 +}
@@ -454,33 +455,3 @@ Signed-off-by: Jonas Gorski j...@openwrt.org
 +int num_words);
 +
 +#endif /* __INCLUDE_LINUX_IRQCHIP_IRQ_BCM6345_PERIPH_H */
-diff --git a/drivers/irqchip/irq-bcm6345-periph.c 
b/drivers/irqchip/irq-bcm6345-periph.c
-index dfab88e..b280164 100644
 a/drivers/irqchip/irq-bcm6345-periph.c
-+++ b/drivers/irqchip/irq-bcm6345-periph.c
-@@ -149,6 +149,7 @@ static int bcm6345_periph_set_affinity(struct irq_data 
*data,
-   irq_hw_number_t hwirq = irqd_to_hwirq(data);
-   struct intc_data *priv = data-domain-host_data;
-   unsigned int i, reg, bit;
-+  unsigned long flags;
-   bool enabled;
-   int cpu;
- 
-@@ -168,7 +169,7 @@ static int bcm6345_periph_set_affinity(struct irq_data 
*data,
-   if (!priv-block[cpu].parent_irq)
-   return -EINVAL;
- 
--  raw_spin_lock(priv-lock);
-+  raw_spin_lock_irqsave(priv-lock, flags);
-   enabled = !irqd_irq_masked(data);
-   for (i = 0; i  MAX_PARENT_IRQS; i++) {
-   struct intc_block *block = priv-block[i];
-@@ -184,7 +185,7 @@ static int bcm6345_periph_set_affinity(struct irq_data 
*data,
-   __bcm6345_periph_enable(block, reg, bit, false);
-   }
-   }
--  raw_spin_unlock(priv-lock);
-+  raw_spin_unlock_irqrestore(priv-lock, flags);
- 
-   return 0;
- }
diff --git 
a/target/linux/brcm63xx/patches-3.14/413-BCM63XX-allow-providing-fixup-data-in-board-data.patch
 
b/target/linux/brcm63xx/patches-3.14/413-BCM63XX-allow-providing-fixup-data-in-board-data.patch
index bcb92a1..21f3ebe 100644
--- 
a/target/linux/brcm63xx/patches-3.14/413-BCM63XX-allow-providing-fixup-data-in-board-data.patch
+++ 
b/target/linux/brcm63xx/patches-3.14/413-BCM63XX-allow-providing-fixup-data-in-board-data.patch
@@ -26,7 +26,7 @@ Subject: [PATCH 58/72] BCM63XX: allow providing fixup data in 
board data
  
  #if CONFIG_OF
if (of_have_populated_dt()) {
-@@ -293,6 +295,10 @@ int __init board_register_devices(void)
+@@ -297,6 +299,10 @@ int __init board_register_devices(void)
platform_device_register(bcm63xx_gpio_keys_device);
}
  
diff --git 
a/target/linux/brcm63xx/patches-3.14/418-MIPS-BCM63XX-pass-caldata-info-to-flash.patch
 
b/target/linux/brcm63xx/patches-3.14/418-MIPS-BCM63XX-pass-caldata-info-to-flash.patch
index fdcfa19..d12814d 100644
--- 
a/target/linux/brcm63xx/patches-3.14/418-MIPS-BCM63XX-pass-caldata-info-to-flash.patch
+++ 
b/target/linux/brcm63xx/patches-3.14/418-MIPS-BCM63XX-pass-caldata-info-to-flash.patch
@@ -11,7 +11,7 @@ Subject: [PATCH 69/80] MIPS: BCM63XX: pass caldata info to 
flash
 
 --- a/arch/mips/bcm63xx/boards/board_common.c
 +++ b/arch/mips/bcm63xx/boards/board_common.c
-@@ -267,7 +267,7 @@ int __init board_register_devices(void)
+@@ -271,7 +271,7 @@ int __init board_register_devices(void)
if (board.num_spis)
spi_register_board_info(board.spis, board.num_spis);
  
diff --git 
a/target/linux/brcm63xx/patches-3.14/420-BCM63XX-add-endian-check-for-ath9k.patch
 
b/target/linux/brcm63xx/patches-3.14/420-BCM63XX-add-endian-check-for-ath9k.patch
index 0e01be1..9e425b7 100644

[OpenWrt-Devel] [PATCH V3 2/5] brcm63xx: prefer DT GPIOs over legacy

2015-01-25 Thread Álvaro Fernández Rojas
Signed-off-by: Álvaro Fernández Rojas nolt...@gmail.com
---
diff --git a/target/linux/brcm63xx/patches-3.14/377-DT-GPIO-over-legacy.patch 
b/target/linux/brcm63xx/patches-3.14/377-DT-GPIO-over-legacy.patch
new file mode 100644
index 000..f56c8ca
--- /dev/null
+++ b/target/linux/brcm63xx/patches-3.14/377-DT-GPIO-over-legacy.patch
@@ -0,0 +1,43 @@
+--- a/arch/mips/bcm63xx/boards/board_common.c
 b/arch/mips/bcm63xx/boards/board_common.c
+@@ -204,6 +204,10 @@ int __init board_register_devices(void)
+   }
+ #endif
+ 
++  if (!board_of_device_present(gpio0)) {
++  bcm63xx_gpio_init();
++  }
++
+   if (board.has_uart0)
+   bcm63xx_uart_register(0);
+ 
+@@ -269,7 +273,7 @@ int __init board_register_devices(void)
+   while (led_count  ARRAY_SIZE(board.leds)  board.leds[led_count].name)
+   led_count++;
+ 
+-  if (led_count) {
++  if (led_count  !board_of_device_present(gpio0)) {
+   bcm63xx_led_data.num_leds = led_count;
+   bcm63xx_led_data.leds = board.leds;
+ 
+@@ -284,7 +288,7 @@ int __init board_register_devices(void)
+   while (button_count  ARRAY_SIZE(board.buttons)  
board.buttons[button_count].desc)
+   button_count++;
+ 
+-  if (button_count) {
++  if (button_count  !board_of_device_present(gpio0)) {
+   bcm63xx_gpio_keys_data.nbuttons = button_count;
+   bcm63xx_gpio_keys_data.buttons = board.buttons;
+ 
+--- a/arch/mips/bcm63xx/prom.c
 b/arch/mips/bcm63xx/prom.c
+@@ -54,9 +54,6 @@ void __init prom_init(void)
+   reg = ~mask;
+   bcm_perf_writel(reg, PERF_CKCTL_REG);
+ 
+-  /* register gpiochip */
+-  bcm63xx_gpio_init();
+-
+   /* detect and setup flash access */
+   bcm63xx_flash_detect();
+ 
diff --git a/target/linux/brcm63xx/patches-3.18/375-DT-GPIO-over-legacy.patch 
b/target/linux/brcm63xx/patches-3.18/375-DT-GPIO-over-legacy.patch
new file mode 100644
index 000..f56c8ca
--- /dev/null
+++ b/target/linux/brcm63xx/patches-3.18/375-DT-GPIO-over-legacy.patch
@@ -0,0 +1,43 @@
+--- a/arch/mips/bcm63xx/boards/board_common.c
 b/arch/mips/bcm63xx/boards/board_common.c
+@@ -204,6 +204,10 @@ int __init board_register_devices(void)
+   }
+ #endif
+ 
++  if (!board_of_device_present(gpio0)) {
++  bcm63xx_gpio_init();
++  }
++
+   if (board.has_uart0)
+   bcm63xx_uart_register(0);
+ 
+@@ -269,7 +273,7 @@ int __init board_register_devices(void)
+   while (led_count  ARRAY_SIZE(board.leds)  board.leds[led_count].name)
+   led_count++;
+ 
+-  if (led_count) {
++  if (led_count  !board_of_device_present(gpio0)) {
+   bcm63xx_led_data.num_leds = led_count;
+   bcm63xx_led_data.leds = board.leds;
+ 
+@@ -284,7 +288,7 @@ int __init board_register_devices(void)
+   while (button_count  ARRAY_SIZE(board.buttons)  
board.buttons[button_count].desc)
+   button_count++;
+ 
+-  if (button_count) {
++  if (button_count  !board_of_device_present(gpio0)) {
+   bcm63xx_gpio_keys_data.nbuttons = button_count;
+   bcm63xx_gpio_keys_data.buttons = board.buttons;
+ 
+--- a/arch/mips/bcm63xx/prom.c
 b/arch/mips/bcm63xx/prom.c
+@@ -54,9 +54,6 @@ void __init prom_init(void)
+   reg = ~mask;
+   bcm_perf_writel(reg, PERF_CKCTL_REG);
+ 
+-  /* register gpiochip */
+-  bcm63xx_gpio_init();
+-
+   /* detect and setup flash access */
+   bcm63xx_flash_detect();
+ 
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH] kirkwood: add wpad-mini to guruplug profile

2015-01-25 Thread Luka Perkov
Hi Nathan,

On Fri, Jan 23, 2015 at 09:20:01PM -0800, Nathan Hintz wrote:
 Signed-off-by: Nathan Hintz nlhi...@hotmail.com
 ---
  target/linux/kirkwood/profiles/120-plug.mk | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

Applied in r44125. Thank you!

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


[OpenWrt-Devel] [RFC PATCH 3/3] hostapd: add 802.11r support

2015-01-25 Thread Stijn Tintel
Signed-off-by: Stijn Tintel st...@linux-ipv6.be
---
 package/network/services/hostapd/files/hostapd.sh | 29 ++
 package/network/services/hostapd/files/netifd.sh  | 37 ++-
 2 files changed, 65 insertions(+), 1 deletion(-)

diff --git a/package/network/services/hostapd/files/hostapd.sh 
b/package/network/services/hostapd/files/hostapd.sh
index a4b38d7..7aec7ad 100644
--- a/package/network/services/hostapd/files/hostapd.sh
+++ b/package/network/services/hostapd/files/hostapd.sh
@@ -219,6 +219,35 @@ hostapd_set_bss_options() {
then
config_get nasid $vif nasid
[ -n $nasid ]  append $var nas_identifier=$nasid $N
+
+   config_get_bool ieee80211r $vif ieee80211r 0
+   if [ $ieee80211r -gt 0 ]
+   then
+   config_get mobility_domain $vif mobility_domain 4f57
+   config_get r0_key_lifetime $vif r0_key_lifetime 
1
+   config_get r1_key_holder $vif r1_key_holder 
4f577274
+   config_get reassociation_deadline $vif 
reassociation_deadline 1000
+   config_get r0kh $vif r0kh
+   config_get r1kh $vif r1kh
+   config_get_bool pmk_r1_push $vif pmk_r1_push 0
+
+   append $var mobility_domain=$mobility_domain $N
+   append $var r0_key_lifetime=$r0_key_lifetime $N
+   append $var r1_key_holder=$r1_key_holder $N
+   append $var 
reassociation_deadline=$reassociation_deadline $N
+   append $var pmk_r1_push=$pmk_r1_push $N
+
+   for kh in $r0kh; do
+   $var r0kh=${kh//,/ } $N
+   done
+   for kh in $r1kh; do
+   $var r1kh=${kh//,/ } $N
+   done
+
+   [ $wpa_key_mgmt != ${wpa_key_mgmt/EAP/} ]  append 
wpa_key_mgmt FT-EAP
+   [ $wpa_key_mgmt != ${wpa_key_mgmt/PSK/} ]  append 
wpa_key_mgmt FT-PSK
+   fi
+
[ -n wpa_key_mgmt ]  append $var 
wpa_key_mgmt=$wpa_key_mgmt
fi
 
diff --git a/package/network/services/hostapd/files/netifd.sh 
b/package/network/services/hostapd/files/netifd.sh
index 666823b..525cc39 100644
--- a/package/network/services/hostapd/files/netifd.sh
+++ b/package/network/services/hostapd/files/netifd.sh
@@ -148,6 +148,11 @@ hostapd_common_add_bss_config() {
config_add_boolean wps_pushbutton wps_label ext_registrar wps_pbc_in_m1
config_add_string wps_device_type wps_device_name wps_manufacturer 
wps_pin
 
+   config_add_boolean ieee80211r pmk_r1_push
+   config_add_int r0_key_lifetime reassociation_deadline
+   config_add_string mobility_domain r1_key_holder
+   config_add_array r0kh r1kh
+
config_add_int ieee80211w_max_timeout ieee80211w_retry_timeout
 
config_add_string macfilter 'macfile:file'
@@ -337,8 +342,38 @@ hostapd_set_bss_options() {
}
 
if [ $wpa -ge 1 ]; then
-   json_get_vars nasid
+   json_get_vars nasid ieee80211r
[ -n $nasid ]  append bss_conf nas_identifier=$nasid $N
+
+   if [ $ieee80211r -gt 0 ]; then
+   json_get_vars mobility_domain r0_key_lifetime 
r1_key_holder \
+   reassociation_deadline pmk_r1_push
+   json_get_values r0kh r0kh
+   json_get_values r1kh r1kh
+
+   set_default mobility_domain 4f57
+   set_default r0_key_lifetime 1
+   set_default r1_key_holder 4f577274
+   set_default reassociation_deadline 1000
+   set_default pmk_r1_push 0
+
+   append bss_conf mobility_domain=$mobility_domain $N
+   append bss_conf r0_key_lifetime=$r0_key_lifetime $N
+   append bss_conf r1_key_holder=$r1_key_holder $N
+   append bss_conf 
reassociation_deadline=$reassociation_deadline $N
+   append bss_conf pmk_r1_push=$pmk_r1_push $N
+
+   for kh in $r0kh; do
+   append bss_conf r0kh=${kh//,/ } $N
+   done
+   for kh in $r1kh; do
+   append bss_conf r1kh=${kh//,/ } $N
+   done
+
+   [ $wpa_key_mgmt != ${wpa_key_mgmt/EAP/} ]  append 
wpa_key_mgmt FT-EAP
+   [ $wpa_key_mgmt != ${wpa_key_mgmt/PSK/} ]  append 
wpa_key_mgmt FT-PSK
+   fi
+
[ -n $wpa_key_mgmt ]  append bss_conf 
wpa_key_mgmt=$wpa_key_mgmt $N
fi
 
-- 
2.0.5
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org

[OpenWrt-Devel] [PATCH] ralink: fix USB host function for Intenso M2M

2015-01-25 Thread Christian Lamparter
The ubootloader of the M2M sets the reset bits for
both USB device and USB host during initialization
(to save a few mA of power during boot).

However, for the usb-sata bridge to be properly
detected, it is necessary to clear both reset bits
as otherwise the kernel logs will just be filled
with:

usb 1-1: device descriptor read/64, error -145
...

Signed-off-by: Christian Lamparter chunk...@googlemail.com
---
This is the least intrusive version of the patch I could come
up with. It looks like the ralink-phy.c could use some work.

i.e.: 

+// reset_control_assert(rstdev);
+// reset_control_assert(rsthost);
looks like someone tried to play with the reset signals.
but disabled it again?

+   if (OTG_STATE_B_HOST) {
The condition (OTG_STATE_B_HOST) is always true?! What about OTG?
Is it not supported?

Thing is, I only have this RT5350 device and I'm
looking for something which makes use of the USB-
OTG feature (The current code looks a bit weird,
does it even work?). So, can anybody tell me a
reliable, inexpensive and easy to open/play with
device?

Regards,
Christian
---
 .../ramips/patches-3.14/0037-USB-phy-add-ralink-SoC-driver.patch  | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git 
a/target/linux/ramips/patches-3.14/0037-USB-phy-add-ralink-SoC-driver.patch 
b/target/linux/ramips/patches-3.14/0037-USB-phy-add-ralink-SoC-driver.patch
index 9920afb..b5c199a 100644
--- a/target/linux/ramips/patches-3.14/0037-USB-phy-add-ralink-SoC-driver.patch
+++ b/target/linux/ramips/patches-3.14/0037-USB-phy-add-ralink-SoC-driver.patch
@@ -37,7 +37,7 @@ Signed-off-by: John Crispin blo...@openwrt.org
 +obj-$(CONFIG_RALINK_USBPHY)   += ralink-phy.o
 --- /dev/null
 +++ b/drivers/usb/phy/ralink-phy.c
-@@ -0,0 +1,191 @@
+@@ -0,0 +1,193 @@
 +/*
 + * Copyright (C) 2013 John Crispin blo...@openwrt.org
 + *
@@ -103,6 +103,8 @@ Signed-off-by: John Crispin blo...@openwrt.org
 +  rt_sysc_m32(0, RT_SYSCFG1_USB0_HOST_MODE, 
RT_SYSC_REG_SYSCFG1);
 +  if (!IS_ERR(rsthost))
 +  reset_control_deassert(rsthost);
++  if (!IS_ERR(rstdev))
++  reset_control_deassert(rstdev);
 +  } else {
 +  rt_sysc_m32(RT_SYSCFG1_USB0_HOST_MODE, 0, 
RT_SYSC_REG_SYSCFG1);
 +  if (!IS_ERR(rstdev))
-- 
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] kernel: add support for NFSv4

2015-01-25 Thread W. Michael Petullo
From 9dc6a27ba327a6f4ff5892c56c472d857d6ea096 Mon Sep 17 00:00:00 2001
From: W. Michael Petullo m...@flyn.org
Date: Mon, 26 Jan 2015 00:01:34 -0500
Subject: [PATCH] kernel: add support for NFSv4
To: openwrt-devel@lists.openwrt.org

This work is based on Daniel Colascione's submission to the OpenWrt
devel mailing list on January 15th, 2014. I modified his patch so that
it applied to the current OpenWrt Barrier Breaker tree.

Signed-off-by: W. Michael Petullo m...@flyn.org
---
 package/kernel/linux/modules/fs.mk | 50 --
 package/kernel/linux/modules/lib.mk| 15 +
 package/kernel/linux/modules/netsupport.mk | 14 +
 3 files changed, 62 insertions(+), 17 deletions(-)

diff --git a/package/kernel/linux/modules/fs.mk 
b/package/kernel/linux/modules/fs.mk
index c117415..9e3470b 100644
--- a/package/kernel/linux/modules/fs.mk
+++ b/package/kernel/linux/modules/fs.mk
@@ -292,12 +292,24 @@ define KernelPackage/fs-nfs/description
  Kernel module for NFS support
 endef
 
+define KernelPackage/fs-nfs/config
+  if PACKAGE_kmod-fs-nfs
+   config KERNEL_NFS_V4
+   bool Support NFSv4 in NFS client
+   depends on PACKAGE_kmod-fs-sunrpc-auth-rpcgss
+   default n
+   help
+ Select this option to support NFSv4 in the NFS server
+  endif
+endef
+
 $(eval $(call KernelPackage,fs-nfs))
 
 
 define KernelPackage/fs-nfs-common
   SUBMENU:=$(FS_MENU)
   TITLE:=Common NFS filesystem modules
+  DEPENDS:=+kmod-lib-oid-registry
   KCONFIG:= \
CONFIG_LOCKD \
CONFIG_SUNRPC
@@ -310,36 +322,40 @@ endef
 $(eval $(call KernelPackage,fs-nfs-common))
 
 
-define KernelPackage/fs-nfs-common-v4
+define KernelPackage/fs-sunrpc-auth-rpcgss
   SUBMENU:=$(FS_MENU)
-  TITLE:=Common NFS V4 filesystem modules
-  KCONFIG+=\
-   CONFIG_SUNRPC_GSS\
-   CONFIG_NFS_V4=y\
-   CONFIG_NFSD_V4=y
-  DEPENDS:= @BROKEN
-  FILES+=$(LINUX_DIR)/net/sunrpc/auth_gss/auth_rpcgss.ko
-  AUTOLOAD=$(call AutoLoad,30,auth_rpcgss)
-endef
-
-define KernelPackage/fs-nfs-common-v4/description
- Kernel modules for NFS V4  NFSD V4 kernel support
+  TITLE:=GSS authentication for SUN RPC
+  DEPENDS:=+kmod-fs-nfs-common
+  KCONFIG:=CONFIG_SUNRPC_GSS
+  FILES:= \
+   $(LINUX_DIR)/net/sunrpc/auth_gss/auth_rpcgss.ko
+  AUTOLOAD:=$(call AutoLoad,30,auth_rpcgss)
 endef
 
-$(eval $(call KernelPackage,fs-nfs-common-v4))
-
+$(eval $(call KernelPackage,fs-sunrpc-auth-rpcgss))
 
 define KernelPackage/fs-nfsd
   SUBMENU:=$(FS_MENU)
   TITLE:=NFS kernel server support
-  DEPENDS:=+kmod-fs-nfs-common +kmod-fs-exportfs
-  KCONFIG:= \
+  DEPENDS:=+kmod-fs-nfs-common +kmod-fs-exportfs +kmod-fs-sunrpc-auth-rpcgss
+  KCONFIG= \
CONFIG_NFSD \
CONFIG_NFSD_FAULT_INJECTION=n
   FILES:=$(LINUX_DIR)/fs/nfsd/nfsd.ko
   AUTOLOAD:=$(call AutoLoad,40,nfsd)
 endef
 
+define KernelPackage/fs-nfsd/config
+  if PACKAGE_kmod-fs-nfsd
+   config KERNEL_NFSD_V4
+   bool Support NFSv4 in NFS server
+   depends on PACKAGE_kmod-fs-sunrpc-auth-rpcgss
+   default n
+   help
+ Select this option to support NFSv4 in the NFS server
+  endif
+endef
+
 define KernelPackage/fs-nfsd/description
  Kernel module for NFS kernel server support
 endef
diff --git a/package/kernel/linux/modules/lib.mk 
b/package/kernel/linux/modules/lib.mk
index cd919ba..a148da3 100644
--- a/package/kernel/linux/modules/lib.mk
+++ b/package/kernel/linux/modules/lib.mk
@@ -202,3 +202,18 @@ define KernelPackage/lib-cordic/description
 endef
 
 $(eval $(call KernelPackage,lib-cordic))
+
+
+define KernelPackage/lib-oid-registry
+  SUBMENU:=$(LIB_MENU)
+  TITLE:=OID-Registry function support
+  KCONFIG:=CONFIG_OID_REGISTRY
+  FILES:=$(LINUX_DIR)/lib/oid_registry.ko
+  AUTOLOAD:=$(call AutoProbe,oid-registry)
+endef
+
+define KernelPackage/lib-oid-registry/description
+ Kernel module for OID-Registry function support
+endef
+
+$(eval $(call KernelPackage,lib-oid-registry))
diff --git a/package/kernel/linux/modules/netsupport.mk 
b/package/kernel/linux/modules/netsupport.mk
index fc85e22..bffb09c 100644
--- a/package/kernel/linux/modules/netsupport.mk
+++ b/package/kernel/linux/modules/netsupport.mk
@@ -967,3 +967,17 @@ define KernelPackage/rxrpc/description
 endef
 
 $(eval $(call KernelPackage,rxrpc))
+
+define KernelPackage/dns-resolver
+  SUBMENU:=$(NETWORK_SUPPORT_MENU)
+  TITLE:=DNS-resolver modules
+  KCONFIG:=CONFIG_DNS_RESOLVER
+  FILES:= \
+   $(LINUX_DIR)/net/dns_resolver/dns_resolver.ko
+endef
+
+define KernelPackage/dns-resolver/description
+ Kernel modules for DNS-RESOLVER support
+endef
+
+$(eval $(call KernelPackage,dns-resolver))
-- 
2.1.0
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH v2] mac80211: Add some missing 802.11n capabilities to hostapd configuration

2015-01-25 Thread Robert Hancock
Add some missing 802.11n capabilities to the hostapd ht_capab string when
supported by the hardware: Spatial Multiplexing Power-Save and 7935-byte AMSDUs.

Signed-off-by: Robert Hancock hancock...@gmail.com
---
 package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh | 11 +++
 1 file changed, 11 insertions(+)

diff --git a/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh 
b/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh
index 1a85d15..72f9936 100644
--- a/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh
+++ b/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh
@@ -42,6 +42,8 @@ drv_mac80211_init_device_config() {
greenfield \
short_gi_20 \
short_gi_40 \
+   smps \
+   max_amsdu \
dsss_cck_40
 }
 
@@ -130,8 +132,10 @@ mac80211_hostapd_setup_base() {
greenfield:0 \
short_gi_20:1 \
short_gi_40:1 \
+   smps:1 \
tx_stbc:1 \
rx_stbc:3 \
+   max_amsdu:1 \
dsss_cck_40:1
 
ht_cap_mask=0
@@ -139,6 +143,8 @@ mac80211_hostapd_setup_base() {
ht_cap_mask=$(($ht_cap_mask | $cap))
done
 
+   cap_smps=$((($ht_cap_mask  2)  3))
+
cap_rx_stbc=$((($ht_cap_mask  8)  3))
[ $rx_stbc -lt $cap_rx_stbc ]  cap_rx_stbc=$rx_stbc
ht_cap_mask=$(( ($ht_cap_mask  ~(0x300)) | ($cap_rx_stbc  
8) ))
@@ -152,8 +158,13 @@ mac80211_hostapd_setup_base() {
RX-STBC1:0x300:0x100:1 \
RX-STBC12:0x300:0x200:1 \
RX-STBC123:0x300:0x300:1 \
+   MAX-AMSDU-7935:0x800::$max_amsdu \
DSSS_CCK-40:0x1000::$dsss_cck_40
 
+   # SM Power Save: 0=static, 1=dynamic, 3=disabled
+   [ $smps = 1 -a $cap_smps = 0 ]  
ht_capab_flags=$ht_capab_flags[SMPS-STATIC]
+   [ $smps = 1 -a $cap_smps = 1 ]  
ht_capab_flags=$ht_capab_flags[SMPS-DYNAMIC]
+
ht_capab=$ht_capab$ht_capab_flags
[ -n $ht_capab ]  append base_cfg ht_capab=$ht_capab $N
}
-- 
2.1.0
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] ar8216: phy_init and bug report 18415

2015-01-25 Thread Heiner Kallweit
To me it doesn't look like an issue with the AR8216 driver. All related output 
is ok.
The hardware is quite common and in case of a driver issue I would expect much 
more
people to complain.

What looks a little strange to me is that there seem to be two interfaces 
(modem + wan)
fiddling with eth0.2

Heiner


Am 25.01.2015 um 18:17 schrieb Weedy:
 On Wed, Dec 17, 2014 at 1:48 PM, Heiner Kallweit hkallwe...@gmail.com wrote:
 Ticket 18415 was closed as it was confirmed that as at least version =43419 
 is ok.
 (I assume 43410 fixed the issue.) Therefore current trunk should be ok.

 However if you want to check further what the actual root cause was:
 - Re-enable the additional reset by reverting 43410
 - Issue there?
 - If yes, check whether inserting a mdiobus_write(bus, i, MII_BMCR, 
 BMCR_ANENABLE);
before mdiobus_write(bus, i, MII_BMCR, BMCR_RESET | BMCR_ANENABLE); in
ar8xxx_phy_init fixes it.

 Heiner

 
 So I'm shitty and I forgot about this.
 Today I reapplied 43332 (so my checkout should be virgin), and made a image.
 My WAN port broke again. Should I still go back to 43410?
 I saw how many commits you have made since then which is why I flashed r44119.
 
 # dmesg |grep Atheros
 [0.00] SoC: Atheros AR9344 rev 2
 [0.63] switch0: Atheros AR8327 rev. 2 switch registered on 
 ag71xx-mdio.0
 [1.30] ag71xx ag71xx.0: connected to PHY at ag71xx-mdio.0:00
 [uid=004dd033, driver=Atheros AR8216/AR8236/AR8316]
 [1.31] eth0: Atheros AG71xx at 0xb900, irq 4, mode:RGMII
 [   11.76] ieee80211 phy0: Atheros AR9340 Rev:2 mem=0xb810, irq=47
 [   11.81] ieee80211 phy1: Atheros AR9300 Rev:4 mem=0xb000, irq=40
 [   24.82] Atheros AR8216/AR8236/AR8316 ag71xx-mdio.0:00: Port 2 is up
 [   24.82] Atheros AR8216/AR8236/AR8316 ag71xx-mdio.0:00: Port 4 is up
 [  423.90] Atheros AR8216/AR8236/AR8316 ag71xx-mdio.0:00: Port 3 is up
 [  447.90] Atheros AR8216/AR8236/AR8316 ag71xx-mdio.0:00: Port 2 is down
 [  453.90] Atheros AR8216/AR8236/AR8316 ag71xx-mdio.0:00: Port 1 is up
 
 
 Sun Jan 25 10:49:21 2015 daemon.notice netifd: Interface 'wan' is now down
 Sun Jan 25 10:49:21 2015 daemon.notice netifd: Interface 'wan' has
 link connectivity loss
 Sun Jan 25 10:49:21 2015 daemon.notice netifd: Interface 'modem' is now down
 Sun Jan 25 10:49:21 2015 daemon.notice netifd: Interface 'modem' is disabled
 Sun Jan 25 10:49:21 2015 daemon.notice netifd: Interface 'modem' is enabled
 Sun Jan 25 10:49:21 2015 daemon.notice netifd: Interface 'modem' is
 setting up now
 Sun Jan 25 10:49:21 2015 daemon.notice netifd: Interface 'modem' is now up
 Sun Jan 25 10:49:21 2015 daemon.notice netifd: Interface 'wan' is setting up 
 now
 Sun Jan 25 10:49:21 2015 daemon.notice netifd: Interface 'wan' is now up
 Sun Jan 25 10:49:21 2015 daemon.notice netifd: Interface 'wan' has
 link connectivity
 Sun Jan 25 10:49:22 2015 user.notice firewall: Reloading firewall due
 to ifup of modem (eth0.2)
 Sun Jan 25 10:49:24 2015 user.err syslog: module is already loaded - cls_u32
 Sun Jan 25 10:49:24 2015 user.err syslog: module is already loaded - em_u32
 Sun Jan 25 10:49:24 2015 user.err syslog: module is already loaded -
 act_connmark
 Sun Jan 25 10:49:24 2015 user.err syslog: module is already loaded - 
 act_mirred
 Sun Jan 25 10:49:24 2015 user.err syslog: module is already loaded - 
 sch_ingress
 Sun Jan 25 10:49:24 2015 user.err syslog: module is already loaded - cls_fw
 Sun Jan 25 10:49:24 2015 user.err syslog: module is already loaded - sch_hfsc
 Sun Jan 25 10:49:25 2015 user.notice firewall: Reloading firewall due
 to ifup of wan (eth0.2)
 Sun Jan 25 10:49:28 2015 daemon.notice netifd: Interface 'wan' is now down
 Sun Jan 25 10:49:30 2015 daemon.notice netifd: Interface 'wan' is setting up 
 now
 Sun Jan 25 10:49:30 2015 daemon.notice netifd: Interface 'wan' is now up
 Sun Jan 25 10:49:31 2015 user.err syslog: module is already loaded - cls_u32
 Sun Jan 25 10:49:31 2015 user.err syslog: module is already loaded - em_u32
 Sun Jan 25 10:49:31 2015 user.err syslog: module is already loaded -
 act_connmark
 Sun Jan 25 10:49:31 2015 user.err syslog: module is already loaded - 
 act_mirred
 Sun Jan 25 10:49:31 2015 user.err syslog: module is already loaded - 
 sch_ingress
 Sun Jan 25 10:49:31 2015 user.err syslog: module is already loaded - cls_fw
 Sun Jan 25 10:49:31 2015 user.err syslog: module is already loaded - sch_hfsc
 Sun Jan 25 10:49:32 2015 user.notice firewall: Reloading firewall due
 to ifup of wan (eth0.2)
 Sun Jan 25 10:49:41 2015 daemon.notice netifd: Interface 'wan' is now down
 Sun Jan 25 10:49:43 2015 daemon.notice netifd: Interface 'wan' is setting up 
 now
 Sun Jan 25 10:49:43 2015 daemon.notice netifd: Interface 'wan' is now up
 Sun Jan 25 10:49:44 2015 user.err syslog: module is already loaded - cls_u32
 Sun Jan 25 10:49:44 2015 user.err syslog: module is already loaded - em_u32
 Sun Jan 25 10:49:44 2015 user.err syslog: module is already loaded -
 act_connmark

Re: [OpenWrt-Devel] [PATCH] uboot-lantiq: fix P-2812HNU-F1/3 package dependency

2015-01-25 Thread Antti Seppälä
On 25 January 2015 at 16:17, Sylwester Petela ssc...@gmail.com wrote:
 W dniu 2015-01-25 o 13:52, Antti Seppälä pisze:
 After r43987 TARGET_lantiq_xrx200_P2812HNUFX does not exist anymore.
 Fix empty menuconfig bootloader selection by making u-boot depend on
 one of the new target profiles.

 Signed-off-by: Antti Seppälä a.sepp...@gmail.com
 ---
  package/boot/uboot-lantiq/Makefile | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)

 diff --git a/package/boot/uboot-lantiq/Makefile 
 b/package/boot/uboot-lantiq/Makefile
 index d2b868f..d59aac8 100644
 --- a/package/boot/uboot-lantiq/Makefile
 +++ b/package/boot/uboot-lantiq/Makefile
 @@ -247,14 +247,14 @@ define uboot/p2812hnufx_ram
TITLE:=U-Boot for ZyXEL P-2812HNU-Fx (RAM)
SOC:=vr9
DDR_SETTINGS:=board/zyxel/p2812hnufx/ddr_settings.h
 -  DEPS:=@TARGET_lantiq_xrx200_P2812HNUFX
 +  DEPS:=@TARGET_lantiq_xrx200_P2812HNUF1||@TARGET_lantiq_xrx200_P2812HNUF3
  endef

  define uboot/p2812hnufx_nandspl
TITLE:=U-Boot for ZyXEL P-2812HNU-Fx (NAND SPL)
SOC:=vr9
IMAGE:=u-boot.ltq.lzo.nandspl
 -  DEPS:=@TARGET_lantiq_xrx200_P2812HNUFX
 +  DEPS:=@TARGET_lantiq_xrx200_P2812HNUF1||@TARGET_lantiq_xrx200_P2812HNUF3
  endef


 That patch will fix target deps but U-Boot for this boards needs fixing.
 P-2812HNU-F1 is NAND based, needs NAND_TPL image instead of SPL (needs 
 patches provided by Antonios Vamporakis  in branch 
 stable_fixes_for_daniel_20140109 on Daniel github)
 P-2812HNU-F3 is NOR/NAND based (boots from NOR), NOR needs to be added in 
 board definition .

 So ATM U-Boot for this boards is broken.

I tried and it seems the ram version
(openwrt-lantiq-p2812hnufx_ram-u-boot.asc) builds and boots properly.

The openwrt-lantiq-p2812hnufx_nandspl-u-boot.img indeed does not boot
correctly. Is anyone working on fixing it? (Apparently conversion to
TPL is needed)
For F1 board it looks to me that it is just a matter of updating
u-boot version in openwrt repository and adding a few patches on top
of that.

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


Re: [OpenWrt-Devel] [PATCH 3/3] kirkwood: enable swconfig by default on EA3500

2015-01-25 Thread Luka Perkov
Hi Claudio,

On Fri, Jan 23, 2015 at 08:27:44PM -0500, Claudio Leite wrote:
 Signed-off-by: Claudio Leite lei...@staticky.com
 ---
  target/linux/kirkwood/profiles/115-router.mk | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

Applied in r44124. Thank you!

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


Re: [OpenWrt-Devel] [PATCH 1/3] kirkwood: drop port-based VLAN setup

2015-01-25 Thread Luka Perkov
Hi Claudio,

On Fri, Jan 23, 2015 at 08:27:42PM -0500, Claudio Leite wrote:
 Using port-based VLANs depends on a non-standard
 swconfig parameter, which compilcates things like
 LuCI that don't know about it. This patch changes
 the default to use 802.1q VLANs internally in the
 switch, but without tagging packets since we have
 two Ethernet ports.
 
 iperf3 tests indicate no difference in performance
 versus port-based VLANs when the CPU port is not
 using tags.
 
 Signed-off-by: Claudio Leite lei...@staticky.com
 ---
  .../base-files/etc/uci-defaults/02_network | 25 
 ++
  1 file changed, 6 insertions(+), 19 deletions(-)

Applied in r44122. Thank you.

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


Re: [OpenWrt-Devel] [PATCH 2/3] kirkwood: fix EA3500 ubi options

2015-01-25 Thread Luka Perkov
Hi Claudio,

On Fri, Jan 23, 2015 at 08:27:43PM -0500, Claudio Leite wrote:
 Previous options resulted in a nonfunctional image.
 
 Signed-off-by: Claudio Leite lei...@staticky.com
 ---
  target/linux/kirkwood/profiles/115-router.mk | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)

Applied in r44123. Thank you!

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


Re: [OpenWrt-Devel] [PATCH] uboot-lantiq: fix P-2812HNU-F1/3 package dependency

2015-01-25 Thread Sylwester Petela
W dniu 2015-01-25 o 13:52, Antti Seppälä pisze:
 After r43987 TARGET_lantiq_xrx200_P2812HNUFX does not exist anymore.
 Fix empty menuconfig bootloader selection by making u-boot depend on 
 one of the new target profiles.

 Signed-off-by: Antti Seppälä a.sepp...@gmail.com
 ---
  package/boot/uboot-lantiq/Makefile | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)

 diff --git a/package/boot/uboot-lantiq/Makefile 
 b/package/boot/uboot-lantiq/Makefile
 index d2b868f..d59aac8 100644
 --- a/package/boot/uboot-lantiq/Makefile
 +++ b/package/boot/uboot-lantiq/Makefile
 @@ -247,14 +247,14 @@ define uboot/p2812hnufx_ram
TITLE:=U-Boot for ZyXEL P-2812HNU-Fx (RAM)
SOC:=vr9
DDR_SETTINGS:=board/zyxel/p2812hnufx/ddr_settings.h
 -  DEPS:=@TARGET_lantiq_xrx200_P2812HNUFX
 +  DEPS:=@TARGET_lantiq_xrx200_P2812HNUF1||@TARGET_lantiq_xrx200_P2812HNUF3
  endef
  
  define uboot/p2812hnufx_nandspl
TITLE:=U-Boot for ZyXEL P-2812HNU-Fx (NAND SPL)
SOC:=vr9
IMAGE:=u-boot.ltq.lzo.nandspl
 -  DEPS:=@TARGET_lantiq_xrx200_P2812HNUFX
 +  DEPS:=@TARGET_lantiq_xrx200_P2812HNUF1||@TARGET_lantiq_xrx200_P2812HNUF3
  endef
  
  
That patch will fix target deps but U-Boot for this boards needs fixing.
P-2812HNU-F1 is NAND based, needs NAND_TPL image instead of SPL (needs patches 
provided by Antonios Vamporakis  in branch stable_fixes_for_daniel_20140109 
on Daniel github)
P-2812HNU-F3 is NOR/NAND based (boots from NOR), NOR needs to be added in board 
definition .

So ATM U-Boot for this boards is broken.
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [RFC PATCH 0/3] hostapd: add 802.11r support

2015-01-25 Thread Stijn Tintel
This patch series adds support for fast BSS transition (802.11r) to hostapd.
Only tested association with ath9k client on ath9k AP with netifd. Changes to
hostapd.sh are untested.

https://dev.openwrt.org/ticket/13187

Stijn Tintel (3):
  hostapd: append nasid to config for all WPA types
  hostapd: allow multiple key management algorithms
  hostapd: add support for 802.11r

 package/network/services/hostapd/files/hostapd.sh | 43 ++--
 package/network/services/hostapd/files/netifd.sh  | 49 +--
 2 files changed, 84 insertions(+), 8 deletions(-)

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


[OpenWrt-Devel] [RFC PATCH 2/3] hostapd: allow multiple key management algorithms

2015-01-25 Thread Stijn Tintel
To enable 802.11r, wpa_key_mgmt should contain FT-EAP or FT-PSK. Allow
multiple key management algorithms to make this possible.

Signed-off-by: Stijn Tintel st...@linux-ipv6.be
---
 package/network/services/hostapd/files/hostapd.sh | 6 --
 package/network/services/hostapd/files/netifd.sh  | 6 --
 2 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/package/network/services/hostapd/files/hostapd.sh 
b/package/network/services/hostapd/files/hostapd.sh
index 2a38d16..a4b38d7 100644
--- a/package/network/services/hostapd/files/hostapd.sh
+++ b/package/network/services/hostapd/files/hostapd.sh
@@ -1,7 +1,7 @@
 hostapd_set_bss_options() {
local var=$1
local vif=$2
-   local enc wep_rekey wpa_group_rekey wpa_pair_rekey wpa_master_rekey 
wps_possible
+   local enc wep_rekey wpa_group_rekey wpa_pair_rekey wpa_master_rekey 
wps_possible wpa_key_mgmt
 
config_get enc $vif encryption none
config_get wep_rekey$vif wep_rekey# 300
@@ -92,6 +92,7 @@ hostapd_set_bss_options() {
[ -n $wpa_group_rekey  ]  append $var 
wpa_group_rekey=$wpa_group_rekey $N
[ -n $wpa_pair_rekey   ]  append $var 
wpa_ptk_rekey=$wpa_pair_rekey$N
[ -n $wpa_master_rekey ]  append $var 
wpa_gmk_rekey=$wpa_master_rekey  $N
+   append wpa_key_mgmt WPA-PSK
;;
*wpa*|*8021x*)
# required fields? formats?
@@ -133,7 +134,7 @@ hostapd_set_bss_options() {
append $var own_ip_addr=$ownip $N
append $var eapol_key_index_workaround=1 $N
append $var ieee8021x=1 $N
-   append $var wpa_key_mgmt=WPA-EAP $N
+   append wpa_key_mgmt WPA-EAP
[ -n $wpa_group_rekey  ]  append $var 
wpa_group_rekey=$wpa_group_rekey $N
[ -n $wpa_pair_rekey   ]  append $var 
wpa_ptk_rekey=$wpa_pair_rekey$N
[ -n $wpa_master_rekey ]  append $var 
wpa_gmk_rekey=$wpa_master_rekey  $N
@@ -218,6 +219,7 @@ hostapd_set_bss_options() {
then
config_get nasid $vif nasid
[ -n $nasid ]  append $var nas_identifier=$nasid $N
+   [ -n wpa_key_mgmt ]  append $var 
wpa_key_mgmt=$wpa_key_mgmt
fi
 
if [ $wpa -ge 2 ]
diff --git a/package/network/services/hostapd/files/netifd.sh 
b/package/network/services/hostapd/files/netifd.sh
index 2771c1a..666823b 100644
--- a/package/network/services/hostapd/files/netifd.sh
+++ b/package/network/services/hostapd/files/netifd.sh
@@ -166,7 +166,7 @@ hostapd_set_bss_options() {
wireless_vif_parse_encryption
 
local bss_conf
-   local wep_rekey wpa_group_rekey wpa_pair_rekey wpa_master_rekey
+   local wep_rekey wpa_group_rekey wpa_pair_rekey wpa_master_rekey 
wpa_key_mgmt
 
json_get_vars \
wep_rekey wpa_group_rekey wpa_pair_rekey wpa_master_rekey \
@@ -230,6 +230,7 @@ hostapd_set_bss_options() {
append bss_conf wpa_psk_file=$wpa_psk_file 
$N
}
wps_possible=1
+   append wpa_key_mgmt WPA-PSK
;;
eap)
json_get_vars \
@@ -273,7 +274,7 @@ hostapd_set_bss_options() {
[ -n $ownip ]  append bss_conf own_ip_addr=$ownip 
$N
append bss_conf eapol_key_index_workaround=1 $N
append bss_conf ieee8021x=1 $N
-   append bss_conf wpa_key_mgmt=WPA-EAP $N
+   append wpa_key_mgmt WPA-EAP
 
[ -n $dynamic_vlan ]  {
append bss_conf dynamic_vlan=$dynamic_vlan 
$N
@@ -338,6 +339,7 @@ hostapd_set_bss_options() {
if [ $wpa -ge 1 ]; then
json_get_vars nasid
[ -n $nasid ]  append bss_conf nas_identifier=$nasid $N
+   [ -n $wpa_key_mgmt ]  append bss_conf 
wpa_key_mgmt=$wpa_key_mgmt $N
fi
 
if [ $wpa -ge 2 ]; then
-- 
2.0.5
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [RFC PATCH 1/3] hostapd: append nasid to config for all WPA types

2015-01-25 Thread Stijn Tintel
The 802.11r implementation in hostapd uses nas_identifier as PMK-R0 Key
Holder identifier. As 802.11r can also be used with WPA Personal, nasid
should be appended to the hostapd config for all WPA types.

Signed-off-by: Stijn Tintel st...@linux-ipv6.be
---
 package/network/services/hostapd/files/hostapd.sh | 8 ++--
 package/network/services/hostapd/files/netifd.sh  | 8 ++--
 2 files changed, 12 insertions(+), 4 deletions(-)

diff --git a/package/network/services/hostapd/files/hostapd.sh 
b/package/network/services/hostapd/files/hostapd.sh
index b8ba7bd..2a38d16 100644
--- a/package/network/services/hostapd/files/hostapd.sh
+++ b/package/network/services/hostapd/files/hostapd.sh
@@ -129,9 +129,7 @@ hostapd_set_bss_options() {
append $var 
radius_das_port=${dae_port:-3799} $N
append $var radius_das_client=$dae_client 
$dae_secret $N
}
-   config_get nasid $vif nasid
config_get ownip $vif ownip
-   append $var nas_identifier=$nasid $N
append $var own_ip_addr=$ownip $N
append $var eapol_key_index_workaround=1 $N
append $var ieee8021x=1 $N
@@ -216,6 +214,12 @@ hostapd_set_bss_options() {
[ -n $ieee80211d ]  append $var ieee80211d=$ieee80211d $N
[ -n $iapp_interface ]  append $var 
iapp_interface=$(uci_get_state network $iapp_interface ifname 
$iapp_interface) $N
 
+   if [ $wpa -ge 1 ]
+   then
+   config_get nasid $vif nasid
+   [ -n $nasid ]  append $var nas_identifier=$nasid $N
+   fi
+
if [ $wpa -ge 2 ]
then
# RSN - allow preauthentication. You have two
diff --git a/package/network/services/hostapd/files/netifd.sh 
b/package/network/services/hostapd/files/netifd.sh
index 83fb129..2771c1a 100644
--- a/package/network/services/hostapd/files/netifd.sh
+++ b/package/network/services/hostapd/files/netifd.sh
@@ -236,7 +236,7 @@ hostapd_set_bss_options() {
auth_server auth_secret auth_port \
acct_server acct_secret acct_port \
dae_client dae_secret dae_port \
-   nasid ownip \
+   ownip \
eap_reauth_period dynamic_vlan \
vlan_naming vlan_tagged_interface \
vlan_bridge
@@ -270,7 +270,6 @@ hostapd_set_bss_options() {
append bss_conf radius_das_client=$dae_client 
$dae_secret $N
}
 
-   append bss_conf nas_identifier=$nasid $N
[ -n $ownip ]  append bss_conf own_ip_addr=$ownip 
$N
append bss_conf eapol_key_index_workaround=1 $N
append bss_conf ieee8021x=1 $N
@@ -336,6 +335,11 @@ hostapd_set_bss_options() {
[ -n $iapp_interface ]  append bss_conf 
iapp_interface=$iapp_interface $N
}
 
+   if [ $wpa -ge 1 ]; then
+   json_get_vars nasid
+   [ -n $nasid ]  append bss_conf nas_identifier=$nasid $N
+   fi
+
if [ $wpa -ge 2 ]; then
if [ -n $network_bridge -a $rsn_preauth = 1 ]; then
set_default auth_cache 1
-- 
2.0.5
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] ar8216: phy_init and bug report 18415

2015-01-25 Thread Weedy
On Jan 25, 2015 1:06 PM, Heiner Kallweit hkallwe...@gmail.com wrote:

 To me it doesn't look like an issue with the AR8216 driver. All related
output is ok.
 The hardware is quite common and in case of a driver issue I would expect
much more
 people to complain.

 What looks a little strange to me is that there seem to be two interfaces
(modem + wan)
 fiddling with eth0.2

 Heiner

It's an alias.

My modem is 100mbit. I can plug and old 100mbit laptop into it and also
have it not show up. It rebooted with the modem plugged in and port 1
didn't come up until I used a gigabit switch.

Auto-neg is broken. Tomorrow I'll do a new checkout just to be sure. Any
commands you want me to run (switchcfg?) to show you the port status?
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH 3/9] kernel: Allow ubi autoattach to run on NOR flash

2015-01-25 Thread Imre Kaloz

Hi,

On Sun, 25 Jan 2015 18:06:03 +0100, Maxime Ripard  
maxime.rip...@free-electrons.com wrote:



Sure, but please implement UBI on NOR as a generic solution.


What do you mean? It already works quite well (with that patch applied
and the NOR sub-profile), so I'm not sure I have to implement
anything, be it generic or not.


I've meant to make it generic, like the squashfs/ubfs/etc images so other  
targets can use it, too.



The A385-RD board has a much smaller SPI-NOR (16MB) though, so we
could use jffs2 there, but I wasn't seeing much point at creating a
whole new layout just for a single board.

I'll switch this one to JFFS2 and the MTDSPLIT framework. Are you
satisfied with the NAND support? Just to know if I can continue to
model the NOR stuff on that.

As I've written in the other mail, I'm mostly happy with it, but please  
make

sure you don't hardcode available profiles but parse them.


If we don't plan on supporting building single sub-profiles like
ar71xx, I'm not even sure that we need to parse anything, we can just
loop over the sub-profiles list in any case.


I think supporting that could be handy so users (and people at Marvell)  
can just build what they want.



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


Re: [OpenWrt-Devel] Wiki upload rights

2015-01-25 Thread valent.turko...@gmail.com
Any ideas why is this happening with my account? Can you please check user
rights for wiki account valentt

Thanks.

On Mon, Jan 19, 2015 at 8:15 PM, valent.turko...@gmail.com 
valent.turko...@gmail.com wrote:

 Well, it is strange, but check out this message:
 http://i.imgur.com/2NbQBxc.png

 On Tue, Dec 30, 2014 at 5:29 PM, Jo-Philipp Wich j...@openwrt.org wrote:

 Hi,

 upload should be possible for any registered user within the media
 namespace.


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



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


Re: [OpenWrt-Devel] How to enable EARLY_PRINTK by default on ARM target?

2015-01-25 Thread Rafał Miłecki
On 25 January 2015 at 21:08, Florian Fainelli flor...@openwrt.org wrote:
 Le 14/01/2015 22:54, Rafał Miłecki a écrit :
 I wanted bcm53xx kernels to be compiled with EARLY_PRINTK by default.
 This is safe, we enable earlyprintk using bootargs on tested devices
 only.

 So I have config option enabled in default configs:
 grep EARLY_PRINTK target/linux/bcm53xx/config-3.1*
 target/linux/bcm53xx/config-3.14:CONFIG_EARLY_PRINTK=y
 target/linux/bcm53xx/config-3.18:CONFIG_EARLY_PRINTK=y

 However it gets overwritten by KERNEL_EARLY_PRINTK defined in
 config/Config-kernel.in.

 KERNEL_EARLY_PRINTK:
 1) depends on arm - so non-ARM targets are not affected
 2) default n - which disables it by default

 Would not default y if TARGET_bcm53xx achieve what you want here?

Right, already implemented in
https://dev.openwrt.org/changeset/43980/
, thanks.

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


Re: [OpenWrt-Devel] How to enable EARLY_PRINTK by default on ARM target?

2015-01-25 Thread Florian Fainelli
Le 14/01/2015 22:54, Rafał Miłecki a écrit :
 I wanted bcm53xx kernels to be compiled with EARLY_PRINTK by default.
 This is safe, we enable earlyprintk using bootargs on tested devices
 only.
 
 So I have config option enabled in default configs:
 grep EARLY_PRINTK target/linux/bcm53xx/config-3.1*
 target/linux/bcm53xx/config-3.14:CONFIG_EARLY_PRINTK=y
 target/linux/bcm53xx/config-3.18:CONFIG_EARLY_PRINTK=y
 
 However it gets overwritten by KERNEL_EARLY_PRINTK defined in
 config/Config-kernel.in.
 
 KERNEL_EARLY_PRINTK:
 1) depends on arm - so non-ARM targets are not affected
 2) default n - which disables it by default

Would not default y if TARGET_bcm53xx achieve what you want here?
--
Florian
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] Wiki upload rights

2015-01-25 Thread valent.turko...@gmail.com
Hmm, it looks like when I'm editing wiki page then probably I'm in root
folder and there I don't have permissions to upload images, but then I
choose from my account page to upload to some other folder I can upload.

Check out screenshots:
http://i.imgur.com/RbIxKsG.png
http://i.imgur.com/tz51VHE.png

On Sun, Jan 25, 2015 at 9:56 PM, valent.turko...@gmail.com 
valent.turko...@gmail.com wrote:

 Any ideas why is this happening with my account? Can you please check user
 rights for wiki account valentt

 Thanks.

 On Mon, Jan 19, 2015 at 8:15 PM, valent.turko...@gmail.com 
 valent.turko...@gmail.com wrote:

 Well, it is strange, but check out this message:
 http://i.imgur.com/2NbQBxc.png

 On Tue, Dec 30, 2014 at 5:29 PM, Jo-Philipp Wich j...@openwrt.org wrote:

 Hi,

 upload should be possible for any registered user within the media
 namespace.


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




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


Re: [OpenWrt-Devel] Wiki upload rights

2015-01-25 Thread valent.turko...@gmail.com
Who is Mediawiki admin? Somebody was messing about media namespaces and
blocked some namespaces so that they don't have permission to accept
uploaded images.

For example toh:tplink namespace - http://i.imgur.com/quWSV4L.png

On Sun, Jan 25, 2015 at 10:00 PM, valent.turko...@gmail.com 
valent.turko...@gmail.com wrote:

 Hmm, it looks like when I'm editing wiki page then probably I'm in root
 folder and there I don't have permissions to upload images, but then I
 choose from my account page to upload to some other folder I can upload.

 Check out screenshots:
 http://i.imgur.com/RbIxKsG.png
 http://i.imgur.com/tz51VHE.png

 On Sun, Jan 25, 2015 at 9:56 PM, valent.turko...@gmail.com 
 valent.turko...@gmail.com wrote:

 Any ideas why is this happening with my account? Can you please check
 user rights for wiki account valentt

 Thanks.

 On Mon, Jan 19, 2015 at 8:15 PM, valent.turko...@gmail.com 
 valent.turko...@gmail.com wrote:

 Well, it is strange, but check out this message:
 http://i.imgur.com/2NbQBxc.png

 On Tue, Dec 30, 2014 at 5:29 PM, Jo-Philipp Wich j...@openwrt.org
 wrote:

 Hi,

 upload should be possible for any registered user within the media
 namespace.


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





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


Re: [OpenWrt-Devel] Wiki upload rights

2015-01-25 Thread Jo-Philipp Wich
Hi.

As I already wrote three weeks ago, upload into the media namespace.

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