Re: [OpenWrt-Devel] [PATCH 1/3] ralink: add ethernet macaddr to dts for FireWRT

2015-01-30 Thread Yousong Zhou
Hi,

On 30 January 2015 at 15:19, wengbj  wrote:
> ---
>  .../linux/ramips/base-files/etc/board.d/02_network |7 +++
>  target/linux/ramips/dts/FIREWRT.dts|5 +
>  2 files changed, 12 insertions(+)
>
> diff --git a/target/linux/ramips/base-files/etc/board.d/02_network 
> b/target/linux/ramips/base-files/etc/board.d/02_network
> index 7724c3e..dcb497a 100755
> --- a/target/linux/ramips/base-files/etc/board.d/02_network
> +++ b/target/linux/ramips/base-files/etc/board.d/02_network
> @@ -340,6 +340,13 @@ ramips_setup_macs()
> wan_mac=$(mtd_get_mac_binary factory 46)
> ;;
>
> +   firewrt)
> +   wan_mac=$(mtd_get_mac_binary factory 57350)
> +   lan_mac=$(mtd_get_mac_binary factory 57344)
> +   [ "${lan_mac}x" = "ff:ff:ff:ff:ff:ffx" ] && lan_mac=$(cat 
> /sys/class/net/eth0/address)
> +   [ "${wan_mac}x" = "ff:ff:ff:ff:ff:ffx" ] && 
> wan_mac=$(macaddr_add "$lan_mac" 1)
> +   ;;
> +

This hunk should be unnecessary.  You can try remove this and see if
it can still get MAC address from offset 0xe000 of factory partition.

yousong

> *)
> lan_mac=$(cat /sys/class/net/eth0/address)
> wan_mac=$(macaddr_add "$lan_mac" 1)
> diff --git a/target/linux/ramips/dts/FIREWRT.dts 
> b/target/linux/ramips/dts/FIREWRT.dts
> index 2e5d26b..4e9e28b 100644
> --- a/target/linux/ramips/dts/FIREWRT.dts
> +++ b/target/linux/ramips/dts/FIREWRT.dts
> @@ -78,4 +78,9 @@
> };
> };
> };
> +
> +   ethernet@1e10 {
> +   mtd-mac-address = <&factory 0xe000>;
> +   };
> +
>  };
> --
> 1.7.9.5
> ___
> 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] [PATCH 2/3] ralink: add FireWRT led detail

2015-01-30 Thread Yousong Zhou
On 30 January 2015 at 15:19, wengbj  wrote:
> ---
>  target/linux/ramips/dts/FIREWRT.dts |9 +
>  1 file changed, 9 insertions(+)
>
> diff --git a/target/linux/ramips/dts/FIREWRT.dts 
> b/target/linux/ramips/dts/FIREWRT.dts
> index 4e9e28b..ddad8bf 100644
> --- a/target/linux/ramips/dts/FIREWRT.dts
> +++ b/target/linux/ramips/dts/FIREWRT.dts
> @@ -83,4 +83,13 @@
> mtd-mac-address = <&factory 0xe000>;
> };
>
> +   gpio-leds {
> +   compatible = "gpio-leds";
> +
> +   power {
> +   label = "buffalo:green:power";

Label should be named properly.

> +   gpios = <&gpio0 22 1>;
> +   };
> +   };
> +
>  };
> --
> 1.7.9.5
> ___
> 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] [PATCH 1/3] ralink: add ethernet macaddr to dts for FireWRT

2015-01-30 Thread John Crispin


On 30/01/2015 08:59, Yousong Zhou wrote:
> Hi,
> 
> On 30 January 2015 at 15:19, wengbj  wrote:
>> ---
>>  .../linux/ramips/base-files/etc/board.d/02_network |7 +++
>>  target/linux/ramips/dts/FIREWRT.dts|5 +
>>  2 files changed, 12 insertions(+)
>>
>> diff --git a/target/linux/ramips/base-files/etc/board.d/02_network 
>> b/target/linux/ramips/base-files/etc/board.d/02_network
>> index 7724c3e..dcb497a 100755
>> --- a/target/linux/ramips/base-files/etc/board.d/02_network
>> +++ b/target/linux/ramips/base-files/etc/board.d/02_network
>> @@ -340,6 +340,13 @@ ramips_setup_macs()
>> wan_mac=$(mtd_get_mac_binary factory 46)
>> ;;
>>
>> +   firewrt)
>> +   wan_mac=$(mtd_get_mac_binary factory 57350)
>> +   lan_mac=$(mtd_get_mac_binary factory 57344)
>> +   [ "${lan_mac}x" = "ff:ff:ff:ff:ff:ffx" ] && lan_mac=$(cat 
>> /sys/class/net/eth0/address)
>> +   [ "${wan_mac}x" = "ff:ff:ff:ff:ff:ffx" ] && 
>> wan_mac=$(macaddr_add "$lan_mac" 1)
>> +   ;;
>> +
> 
> This hunk should be unnecessary.  You can try remove this and see if
> it can still get MAC address from offset 0xe000 of factory partition.
> 
> yousong
> 

i agree, this is a work around for boards that have not passed the mfg
process yet.







>> *)
>> lan_mac=$(cat /sys/class/net/eth0/address)
>> wan_mac=$(macaddr_add "$lan_mac" 1)
>> diff --git a/target/linux/ramips/dts/FIREWRT.dts 
>> b/target/linux/ramips/dts/FIREWRT.dts
>> index 2e5d26b..4e9e28b 100644
>> --- a/target/linux/ramips/dts/FIREWRT.dts
>> +++ b/target/linux/ramips/dts/FIREWRT.dts
>> @@ -78,4 +78,9 @@
>> };
>> };
>> };
>> +
>> +   ethernet@1e10 {
>> +   mtd-mac-address = <&factory 0xe000>;
>> +   };
>> +
>>  };
>> --
>> 1.7.9.5
>> ___
>> 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] [PATCH 1/3] ralink: add ethernet macaddr to dts for FireWRT

2015-01-30 Thread John Crispin
also the Signed-off-by line is missing from all 3 patches



On 30/01/2015 08:19, wengbj wrote:
> --- .../linux/ramips/base-files/etc/board.d/02_network |7
> +++ target/linux/ramips/dts/FIREWRT.dts|5
> + 2 files changed, 12 insertions(+)
> 
> diff --git a/target/linux/ramips/base-files/etc/board.d/02_network
> b/target/linux/ramips/base-files/etc/board.d/02_network index
> 7724c3e..dcb497a 100755 ---
> a/target/linux/ramips/base-files/etc/board.d/02_network +++
> b/target/linux/ramips/base-files/etc/board.d/02_network @@ -340,6
> +340,13 @@ ramips_setup_macs() wan_mac=$(mtd_get_mac_binary factory
> 46) ;;
> 
> + firewrt) +  wan_mac=$(mtd_get_mac_binary factory 57350) +
> lan_mac=$(mtd_get_mac_binary factory 57344) + [ "${lan_mac}x" =
> "ff:ff:ff:ff:ff:ffx" ] && lan_mac=$(cat
> /sys/class/net/eth0/address) +[ "${wan_mac}x" =
> "ff:ff:ff:ff:ff:ffx" ] && wan_mac=$(macaddr_add "$lan_mac" 1) +
> ;; + *) lan_mac=$(cat /sys/class/net/eth0/address) 
> wan_mac=$(macaddr_add "$lan_mac" 1) diff --git
> a/target/linux/ramips/dts/FIREWRT.dts
> b/target/linux/ramips/dts/FIREWRT.dts index 2e5d26b..4e9e28b
> 100644 --- a/target/linux/ramips/dts/FIREWRT.dts +++
> b/target/linux/ramips/dts/FIREWRT.dts @@ -78,4 +78,9 @@ }; }; }; + 
> + ethernet@1e10 { +   mtd-mac-address = <&factory 0xe000>; +  
> }; 
> + };
> 
___
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] ralink: add ethernet macaddr to dts for FireWRT

2015-01-30 Thread fl.serv...@t-firefly.com
Dear sir:
i know remove those follow line still can get MAC address form offset 
0xe000 .
  But according to MTK original SDK . The lan port mac address should write 
at 0xe000 and the wan port MAC address should be write at 0xe006.And i dont 
konw how to define in the dts file.

This two line is exactly what i want :
wan_mac=$(mtd_get_mac_binary factory 57350)
  lan_mac=$(mtd_get_mac_binary factory 57344)

Do i need to remove this ?



Best Regards.
Jay Weng

Website:  www.t-firefly.com
E-mail:  fl.serv...@t-firefly.com
 
From: Yousong Zhou
Date: 2015-01-30 15:59
To: wengbj
CC: John Crispin; zxf; linux.c; dxj; wbj; OpenWrt Development List
Subject: Re: [OpenWrt-Devel] [PATCH 1/3] ralink: add ethernet macaddr to dts 
for FireWRT
Hi,
 
On 30 January 2015 at 15:19, wengbj  wrote:
> ---
>  .../linux/ramips/base-files/etc/board.d/02_network |7 +++
>  target/linux/ramips/dts/FIREWRT.dts|5 +
>  2 files changed, 12 insertions(+)
>
> diff --git a/target/linux/ramips/base-files/etc/board.d/02_network 
> b/target/linux/ramips/base-files/etc/board.d/02_network
> index 7724c3e..dcb497a 100755
> --- a/target/linux/ramips/base-files/etc/board.d/02_network
> +++ b/target/linux/ramips/base-files/etc/board.d/02_network
> @@ -340,6 +340,13 @@ ramips_setup_macs()
> wan_mac=$(mtd_get_mac_binary factory 46)
> ;;
>
> +   firewrt)
> +   wan_mac=$(mtd_get_mac_binary factory 57350)
> +   lan_mac=$(mtd_get_mac_binary factory 57344)
> +   [ "${lan_mac}x" = "ff:ff:ff:ff:ff:ffx" ] && lan_mac=$(cat 
> /sys/class/net/eth0/address)
> +   [ "${wan_mac}x" = "ff:ff:ff:ff:ff:ffx" ] && 
> wan_mac=$(macaddr_add "$lan_mac" 1)
> +   ;;
> +
 
This hunk should be unnecessary.  You can try remove this and see if
it can still get MAC address from offset 0xe000 of factory partition.
 
yousong
 
> *)
> lan_mac=$(cat /sys/class/net/eth0/address)
> wan_mac=$(macaddr_add "$lan_mac" 1)
> diff --git a/target/linux/ramips/dts/FIREWRT.dts 
> b/target/linux/ramips/dts/FIREWRT.dts
> index 2e5d26b..4e9e28b 100644
> --- a/target/linux/ramips/dts/FIREWRT.dts
> +++ b/target/linux/ramips/dts/FIREWRT.dts
> @@ -78,4 +78,9 @@
> };
> };
> };
> +
> +   ethernet@1e10 {
> +   mtd-mac-address = <&factory 0xe000>;
> +   };
> +
>  };
> --
> 1.7.9.5
> ___
> 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] [PATCH 7/8] sunxi: add support for Lamobo R1

2015-01-30 Thread Zoltan HERPAI

Hi Daniel,

Daniel Golle wrote:

Partially based on patchset form Wang Yi  published
on https://github.com/Lamobo/Lamobo-R1-OpenWrt as well as on Bananapi DTS.

Signed-off-by: Daniel Golle 
---
  
I've added the missing patches in r44211-44216, with one small change in 
the network script to fix the network on the A13 Olinuxino Micros 
(olinuxino-micro), leaving the rest of the Olimex boards 
(olinuxino-lime) to use eth0 as default.


Thanks for the series.

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


[OpenWrt-Devel] [PATCH 3/3] ralink: add FireWRT button detail

2015-01-30 Thread wengbj
---
 target/linux/ramips/dts/FIREWRT.dts|   12 
 target/linux/ramips/mt7621/profiles/firefly.mk |2 +-
 2 files changed, 13 insertions(+), 1 deletion(-)

diff --git a/target/linux/ramips/dts/FIREWRT.dts 
b/target/linux/ramips/dts/FIREWRT.dts
index faebe2f..f22c885 100644
--- a/target/linux/ramips/dts/FIREWRT.dts
+++ b/target/linux/ramips/dts/FIREWRT.dts
@@ -92,4 +92,16 @@
};
};
 
+   gpio-keys-polled {
+   compatible = "gpio-keys-polled";
+   #address-cells = <1>;
+   #size-cells = <0>;
+   poll-interval = <20>;
+   wps {
+   label = "wps";
+   gpios = <&gpio0 18 1>;
+   linux,code = <0x211>;
+   };
+   };
+
 };
diff --git a/target/linux/ramips/mt7621/profiles/firefly.mk 
b/target/linux/ramips/mt7621/profiles/firefly.mk
index c8292b0..b095979 100644
--- a/target/linux/ramips/mt7621/profiles/firefly.mk
+++ b/target/linux/ramips/mt7621/profiles/firefly.mk
@@ -8,7 +8,7 @@
 define Profile/Firefly
NAME:=Firefly Device
PACKAGES:=\
-   kmod-usb-core kmod-usb3 kmod-usb-hid  kmod-usb-storage 
mount-utils usbutils \
+   kmod-usb-core kmod-usb3 kmod-usb-hid  kmod-usb-storage 
mount-utils usbutils hostapd-utils \
 kmod-sdhci-mt7620 \
kmod-fs-ext3 kmod-fs-vfat kmod-fs-ntfs \
kmod-nls-cp437 kmod-nls-iso8859-1 kmod-nls-utf8 \
-- 
1.7.9.5
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 1/3] ralink: add ethernet macaddr to dts for FireWRT

2015-01-30 Thread wengbj
---
 target/linux/ramips/dts/FIREWRT.dts |5 +
 1 file changed, 5 insertions(+)

diff --git a/target/linux/ramips/dts/FIREWRT.dts 
b/target/linux/ramips/dts/FIREWRT.dts
index 2e5d26b..4e9e28b 100644
--- a/target/linux/ramips/dts/FIREWRT.dts
+++ b/target/linux/ramips/dts/FIREWRT.dts
@@ -78,4 +78,9 @@
};
};
};
+
+   ethernet@1e10 {
+   mtd-mac-address = <&factory 0xe000>;
+   };
+
 };
-- 
1.7.9.5
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 2/3] ralink: add FireWRT led detail

2015-01-30 Thread wengbj
---
 target/linux/ramips/dts/FIREWRT.dts |9 +
 1 file changed, 9 insertions(+)

diff --git a/target/linux/ramips/dts/FIREWRT.dts 
b/target/linux/ramips/dts/FIREWRT.dts
index 4e9e28b..faebe2f 100644
--- a/target/linux/ramips/dts/FIREWRT.dts
+++ b/target/linux/ramips/dts/FIREWRT.dts
@@ -83,4 +83,13 @@
mtd-mac-address = <&factory 0xe000>;
};
 
+   gpio-leds {
+   compatible = "gpio-leds";
+
+   power {
+   label = "firewrt:green:power";
+   gpios = <&gpio0 22 1>;
+   };
+   };
+
 };
-- 
1.7.9.5
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] UDAP-Protocol Broadcast-Handling with Relayd

2015-01-30 Thread Dierk Modrow









I try to implement an UDAP
configuration server (legacy protocol to replace an old embedded
wireless client bridge) for a wireless client bridge based on a
Gateworks Ventana board running OpenWrt trunk with ATH9K WLAN nic.
The Openwrt solution uses relayd for
pseudo bridging between WLAN and LAN because true transparent
bridging between WLAN (in infrastructure mode) and ethernet interface
is only possible with 4 address mode of MAC80211 which is not
standardized in IEEE802.11 (can only be used with certain access
points)



Problem is now emulating a real
bridging behaviour for incoming broadcasts with destination port of
UDAP protocol. The server should respond with bridge's own source IP
to global broadcast address on both interfaces LAN & WLAN. For
the relayd solution this should be the WLAN interface's IP.



IP settings: Wlan0 has
192.168.2.100/24, eth0 has 192.168.254.254/24



Short description:
The UDAP protocol uses UDP frames
with server destination port 17784.
The UDAP client can send frames to
IP address of the server. Reply is done with unicast frame
The UDAP client can send frames to
general broadcast address (255.255.255.255). The server should also
reply to the general broadcast address. So UDAP protocol can also be
used to scan a client bridge or change it's IP configuration if it's
IP resides in another subnet then the UDAP client.
UDAP client (a Windows PC, PLC,
etc.) may reside either on the LAN or the WLAN side of the bridge.
On both sides only one Wlan0-IP should be visible.




Results of my test implementation of
UDAP on OpenWRT using a simple AFINET UDP socket:



Using the IP unicast destination
address of the server IP-Wlan0 works fine for both UDAP client
locations (LAN / WLAN)
Sending to general broadcast
server address from WLAN side ->request is received but reply to
global broadcast address by calling sendto is denied with
ENETUNREACH.
Reply to the broadcast address 192.168.2.255 worked
fine but violates requirement 3.
Next trial was using setsockopt
with option SOL_SOCKET,SO_BINDTODEVICE to temporarily bind to wlan0
interface before sendto to general broadcast address → This worked
fine
Sending to general broadcast
server address from LAN side ->request is received but reply to
global broadcast address by calling sendto is denied with
ENETUNREACH.
Reply to the broadcast address 192.168.254.255
worked fine but violates requirement 3.
Next trial was using
setsockopt with option SOL_SOCKET,SO_BINDTODEVICE to temporarily
bind to eth0 interface before sendto to general broadcast address →
This worked but the source address of the response frame is
192.168.254.254 (eth0's IP). Therefore the UDAP client on LAN side
sees another IP address than a UDAP client on WLAN side.
Next I
tried to source NAT with iptables to transform the source address to
wlan0's IP:

iptables -t nat -A POSTROUTING -p udp –sport
17784 -o eth0 -s 192.168.254.254 -j SNAT –to-source 192.168.2.100 





The source address is changed but
unfortunately the source port of the frame was changed to 1024, then
I changed the switch –to-source 192.168.2.100:17784 → No source
natting occurred!  Is there any chance to configure iptables to only
change the source IP and keeping the UDP source port?



So I have no idea howto achieve the
desired behaviour. Any help is appreciated!!
Regards,Dierk


  ___
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] ralink: add ethernet macaddr to dts for FireWRT

2015-01-30 Thread Yousong Zhou
Hi, wengbj

It's just that OpenWrt requires a Signed-off-by line for patches to be
accepted [1].  That line can be generated by option -s in command `git
format-patch -s ...'

 [1] https://dev.openwrt.org/wiki/SubmittingPatches

Regards

yousong

On 30 January 2015 at 17:04, wengbj  wrote:
> ---
>  target/linux/ramips/dts/FIREWRT.dts |5 +
>  1 file changed, 5 insertions(+)
>
> diff --git a/target/linux/ramips/dts/FIREWRT.dts 
> b/target/linux/ramips/dts/FIREWRT.dts
> index 2e5d26b..4e9e28b 100644
> --- a/target/linux/ramips/dts/FIREWRT.dts
> +++ b/target/linux/ramips/dts/FIREWRT.dts
> @@ -78,4 +78,9 @@
> };
> };
> };
> +
> +   ethernet@1e10 {
> +   mtd-mac-address = <&factory 0xe000>;
> +   };
> +
>  };
> --
> 1.7.9.5
> ___
> 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] [PATCH 1/3] ralink: add ethernet macaddr to dts for FireWRT

2015-01-30 Thread John Crispin


On 30/01/2015 12:10, Yousong Zhou wrote:
> Hi, wengbj
> 
> It's just that OpenWrt requires a Signed-off-by line for patches to
> be accepted [1].  That line can be generated by option -s in
> command `git format-patch -s ...'
> 
> [1] https://dev.openwrt.org/wiki/SubmittingPatches
> 
> Regards
> 
> yousong
> 

"git commit -s" will add it to the comit directl

John


> On 30 January 2015 at 17:04, wengbj 
> wrote:
>> --- target/linux/ramips/dts/FIREWRT.dts |5 + 1 file
>> changed, 5 insertions(+)
>> 
>> diff --git a/target/linux/ramips/dts/FIREWRT.dts
>> b/target/linux/ramips/dts/FIREWRT.dts index 2e5d26b..4e9e28b
>> 100644 --- a/target/linux/ramips/dts/FIREWRT.dts +++
>> b/target/linux/ramips/dts/FIREWRT.dts @@ -78,4 +78,9 @@ }; }; }; 
>> + +   ethernet@1e10 { +   mtd-mac-address =
>> <&factory 0xe000>; +   }; + }; -- 1.7.9.5 
>> ___ openwrt-devel
>> mailing list openwrt-devel@lists.openwrt.org 
>> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
> ___ openwrt-devel
> mailing list openwrt-devel@lists.openwrt.org 
> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
> 
___
openwrt-devel 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-30 Thread Ben Mulvihill

> 
> the NAND boot does not work yet. I was not able to make it work with a
> SPL only because the BootROM only reads the first page. The Lantiq UGW
> U-Boot uses a very small pre-loader which loads another pre-loader and
> fits in the first page. Thus we need to convert to SPL/TPL support
> from mainline U-Boot. But I hadn't enough time yet to work on it.

I see. But is that the case with all lantiq nand boards? Do they all 
have the same bootrom? By the looks of it they don't all have the same
page size (HH3A has 512 byte, P-2812HNU has 2K).

Having read your explanation, I guess that I was in fact replacing just
the actual uboot part. I left the pre-boot partition intact, and I
suppose that contains the pre-pre-loader and the pre-loader. However
my uboot image was trying to do all the low-level initialisation, which
had already been done. So maybe I could forget about spl, and simply use
the factory preloaders to boot a uboot image which skips the low level
stuff. What do you think?
 
> >
> > Then the ebu configuration word needs to be set in the nandspl
> > image, as it is for norspl. Once again, the following fixed that
> > for arx100, and I think something similar will be required for danube
> > and vrx200.
> 
> actually the BootROM should correctly configure the EBU to be able to
> read at least the first page from NAND flash. The XWAY_EBU_BOOTCFG is
> only used for parallel NOR to setup various command timings and
> delays.

I did a hex dump of the factory uboot on the HH3A, and it does have
XWAY_EBU_BOOTCFG at location 0x10. I tried my own builds with this and
without. Without it the board reboots immediately, with it it hangs.

Thanks,

Ben
___
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-30 Thread Daniel Schwierzeck


Am 30.01.2015 um 13:42 schrieb Ben Mulvihill:
> 
>>
>> the NAND boot does not work yet. I was not able to make it work with a
>> SPL only because the BootROM only reads the first page. The Lantiq UGW
>> U-Boot uses a very small pre-loader which loads another pre-loader and
>> fits in the first page. Thus we need to convert to SPL/TPL support
>> from mainline U-Boot. But I hadn't enough time yet to work on it.
> 
> I see. But is that the case with all lantiq nand boards? Do they all 
> have the same bootrom? By the looks of it they don't all have the same
> page size (HH3A has 512 byte, P-2812HNU has 2K).
> 
> Having read your explanation, I guess that I was in fact replacing just
> the actual uboot part. I left the pre-boot partition intact, and I
> suppose that contains the pre-pre-loader and the pre-loader. However
> my uboot image was trying to do all the low-level initialisation, which
> had already been done. So maybe I could forget about spl, and simply use
> the factory preloaders to boot a uboot image which skips the low level
> stuff. What do you think?

yes, It's the best you can do atm. Some Arcadyan boards also do this.
Just look for the *_brn configs. The relevant U-Boot config option is
CONFIG_SKIP_LOWLEVEL_INIT.

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


[OpenWrt-Devel] hardened openwrt & luci

2015-01-30 Thread Etienne Champetier
Hi

I've tested yesterday Openwrt CC (r44203) with all hardening options on
PKG_CC_STACKPROTECTOR_STRONG
KERNEL_CC_STACKPROTECTOR_STRONG
PKG_FORTIFY_SOURCE_2
PKG_RELRO_FULL

i've only done basic testing but it seems to work,
except luci which send me bad gatway.

I've seen some relro patches by jow, and was wondering what's the status of
this?
(i'm running openwrt on an ubnt rspro/ar71xx)

side note, doing an strace of uhttpd
open("/tmp/openwrt-cc/build_dir/target-mips_34kc_uClibc-0.9.33.2/ubus-2015-01-22/lua/../libubus.so",
O_RDONLY) = -1 ENOENT (No such file or directory)
open("/tmp/openwrt-cc/build_dir/target-mips_34kc_uClibc-0.9.33.2/ubus-2015-01-22/libubus.so",
O_RDONLY) = -1 ENOENT (No such file or directory)
open("./libubus.so", O_RDONLY)= -1 ENOENT (No such file or directory)
open("/lib/libubus.so", O_RDONLY) = 3
it's looking for the lib in the buildroot path

Thanks in advance
Etienne


strace-uhttpd
Description: Binary data
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] Compex WPJ558 board support

2015-01-30 Thread Christian Mehlis

Hi,

I did a port for the Compex WPJ558 and it's almost working completely.
It's booting up, ethernet, wifi and pci is working.

But I got some problems with the image structure.

This board seems to need a uImage instead of bin.lzma ?!

I found two ways of creating an image for this board:

1) create 2 partitions with the compex image format: Linux is 
booting and rootfs is found, but sysupgrade won't work (because the 
compex sysupgrade handler writes on partition and the upgraded system 
lands in case 2)


2) use the same way as the other compex boards and cat together the 
uImage and the rootfs.
   use one partition in the compex image with myloader: in this 
case the rootfs is not mountable.


[0.75] m25p80 spi0.0: found mx25l12805d, expected m25p80
[0.75] m25p80 spi0.0: mx25l12805d (16384 Kbytes)
[0.76] 7 cmdlinepart partitions found on MTD device spi0.0
[0.76] Creating 7 MTD partitions on "spi0.0":
[0.77] 0x-0x0004 : "u-boot"
[0.78] 0x0004-0x0005 : "u-boot-env"
[0.78] 0x0005-0x0068 : "rootfs"
[0.79] mtd: device 2 (rootfs) set to be root filesystem
[0.79] mtdsplit: no squashfs found in "rootfs"
[0.80] mtdsplit: no squashfs found in "spi0.0"
[0.80] 0x0068-0x007e : "kernel"
[0.81] 0x007e-0x007f : "nvram"
[0.82] 0x007f-0x0080 : "art"
[0.82] 0x0005-0x007e : "firmware"
[0.84] switch0: Atheros AR8327 rev. 4 switch registered on 
ag71xx-mdio.0

[0.93] libphy: ag71xx_mdio: probed
[1.53] ag71xx ag71xx.0: connected to PHY at ag71xx-mdio.0:00 
[uid=004dd034, driver=Atheros AR8216/AR8236/AR8316]

[1.54] eth0: Atheros AG71xx at 0xb900, irq 4, mode:RGMII
[2.13] eth1: Atheros AG71xx at 0xba00, irq 5, mode:SGMII
[2.14] TCP: cubic registered
[2.14] NET: Registered protocol family 17
[2.14] 8021q: 802.1Q VLAN Support v1.8
[2.15] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not 
found at 0x: 0x96da instead
[2.16] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not 
found at 0x0004: 0x0ca1 instead


So my questions:

0) what's the difference between bin.lzma and uImage?
1) how does a linux kernel determine the beginning of the rootfs?
2) why is it working with two partitions in the compex loader?
3) do you think that the best solution is to make 1) or 2) work?
4) please review my port, I'll collect the comments and reset the 
patches!


I'll send my changes to openwrt in some minutes.

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


[OpenWrt-Devel] [PATCH 1/2] added board support for compex wpj558

2015-01-30 Thread Christian Mehlis
Signed-off-by: Christian Mehlis 
---
 target/linux/ar71xx/base-files/etc/diag.sh |   3 +
 .../ar71xx/base-files/etc/uci-defaults/02_network  |   7 +
 target/linux/ar71xx/base-files/lib/ar71xx.sh   |   3 +
 .../ar71xx/base-files/lib/upgrade/platform.sh  |   2 +
 target/linux/ar71xx/config-3.14|   1 +
 .../ar71xx/files/arch/mips/ath79/mach-wpj558.c | 187 +
 target/linux/ar71xx/generic/profiles/compex.mk |  13 ++
 target/linux/ar71xx/image/Makefile |  11 +-
 .../507-MIPS-ath79-prom-add-myloader-support.patch |   5 +-
 .../610-MIPS-ath79-openwrt-machines.patch  |  25 ++-
 .../linux/generic/files/include/linux/myloader.h   |   1 +
 tools/firmware-utils/src/mkmylofw.c|   3 +
 tools/firmware-utils/src/myloader.h|   2 +
 13 files changed, 254 insertions(+), 9 deletions(-)
 create mode 100644 target/linux/ar71xx/files/arch/mips/ath79/mach-wpj558.c

diff --git a/target/linux/ar71xx/base-files/etc/diag.sh 
b/target/linux/ar71xx/base-files/etc/diag.sh
index af6107b..af53afd 100755
--- a/target/linux/ar71xx/base-files/etc/diag.sh
+++ b/target/linux/ar71xx/base-files/etc/diag.sh
@@ -288,6 +288,9 @@ get_status_led() {
wp543)
status_led="wp543:green:diag"
;;
+   wpj558)
+   status_led="wpj558:green:sig3"
+   ;;
wrt400n)
status_led="wrt400n:blue:wps"
;;
diff --git a/target/linux/ar71xx/base-files/etc/uci-defaults/02_network 
b/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
index a223ae8..1d186de 100755
--- a/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
+++ b/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
@@ -359,6 +359,13 @@ wpe72)
ucidef_set_interfaces_lan_wan "eth1" "eth0"
;;
 
+wpj558)
+   ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2"
+   ucidef_add_switch "switch0" "1" "1"
+   ucidef_add_switch_vlan "switch0" "1" "5 6t"
+   ucidef_add_switch_vlan "switch0" "2" "1 6t"
+   ;;
+
 ap121 |\
 ap121-mini |\
 ap96 |\
diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh 
b/target/linux/ar71xx/base-files/lib/ar71xx.sh
index 02872de..4c6594f 100755
--- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
+++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh
@@ -747,6 +747,9 @@ ar71xx_board_detect() {
*WP543)
name="wp543"
;;
+   *WPJ558)
+   name="wpj558"
+   ;;
*WPE72)
name="wpe72"
;;
diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh 
b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
index bc6866d..0db1625 100755
--- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
@@ -408,6 +408,7 @@ platform_check_image() {
ja76pf | \
ja76pf2 | \
jwap003 | \
+   wpj558 | \
wp543 | \
wpe72)
[ "$magic" != "4349" ] && {
@@ -456,6 +457,7 @@ platform_do_upgrade() {
jwap003)
platform_do_upgrade_combined "$ARGV"
;;
+   wpj558|\
wp543|\
wpe72)
platform_do_upgrade_compex "$ARGV"
diff --git a/target/linux/ar71xx/config-3.14 b/target/linux/ar71xx/config-3.14
index 82b2d13..2d9873c 100644
--- a/target/linux/ar71xx/config-3.14
+++ b/target/linux/ar71xx/config-3.14
@@ -130,6 +130,7 @@ CONFIG_ATH79_MACH_WNR2000_V4=y
 CONFIG_ATH79_MACH_WNR2200=y
 CONFIG_ATH79_MACH_WP543=y
 CONFIG_ATH79_MACH_WPE72=y
+CONFIG_ATH79_MACH_WPJ558=y
 CONFIG_ATH79_MACH_WRT160NL=y
 CONFIG_ATH79_MACH_WRT400N=y
 CONFIG_ATH79_MACH_WZR_450HP2=y
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-wpj558.c 
b/target/linux/ar71xx/files/arch/mips/ath79/mach-wpj558.c
new file mode 100644
index 000..a8310a7
--- /dev/null
+++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-wpj558.c
@@ -0,0 +1,187 @@
+/*
+ * Compex WPJ558 board support
+ *
+ * Copyright (c) 2012 Qualcomm Atheros
+ * Copyright (c) 2012 Gabor Juhos 
+ *
+ * Permission to use, copy, modify, and/or distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ */
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#include 
+
+#include "common.h"
+#in

[OpenWrt-Devel] [PATCH 2/2] wpj558: use own partition for rootfs

2015-01-30 Thread Christian Mehlis
this change breaks rootfs detection

Signed-off-by: Christian Mehlis 
---
 target/linux/ar71xx/image/Makefile | 5 +
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/target/linux/ar71xx/image/Makefile 
b/target/linux/ar71xx/image/Makefile
index ecaa126..9956a01 100644
--- a/target/linux/ar71xx/image/Makefile
+++ b/target/linux/ar71xx/image/Makefile
@@ -690,10 +690,7 @@ define Image/Build/MyLoader
$(call 
CatFiles,$(KDIR_TMP)/vmlinux-$(2).uImage,65536,$(KDIR)/root.$(1),$(fwsize),$(fwimage))
if [ -e "$(fwimage)" ]; then \
$(STAGING_DIR_HOST)/bin/mkmylofw -B $(2) -s $(4) -v \
-   
-p0x68:0x16:al:0x8006:firmware:$(KDIR_TMP)/vmlinux-$(2).uImage \
-   -p0x05:0x63:::rootfs:$(KDIR)/root.$(1) \
-   -p0x7e:0x01 \
-   -p0x7f:0x01 \
+   -p0x0003:0:al:0x8006:firmware:$(fwimage) \
$(call imgname,$(1),$(2))-$(5)-factory.img; \
echo -n "" > $(KDIR_TMP)/empty.bin; \
sh $(TOPDIR)/scripts/combined-image.sh \
-- 
2.3.0.rc2
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] Compex WPJ558 board support

2015-01-30 Thread SGT. Garcia
On Jan 30  18:44 +0100, Christian Mehlis wrote:
> Hi,
> 
> I did a port for the Compex WPJ558 and it's almost working completely.

hi,
could you tell me where you got this board from? this is the only place
i've found it: http://tinyurl.com/ovb766y

i'm in Canada, btw.
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] Compex WPJ558 board support

2015-01-30 Thread Christian Mehlis

Am 30.01.2015 um 19:04 schrieb SGT. Garcia:

On Jan 30  18:44 +0100, Christian Mehlis wrote:

Hi,

I did a port for the Compex WPJ558 and it's almost working completely.


hi,
could you tell me where you got this board from? this is the only place
i've found it: http://tinyurl.com/ovb766y


Hi,

I did not order it, but you can contact them directly:

http://www.compex.com.sg/index.php/contactus/

or use the "webshop":

http://www.compexshop.com/product_info.php?currency=USD&products_id=466

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


[OpenWrt-Devel] [PATCH 2/3] ralink: add FireWRT led detail

2015-01-30 Thread wengbj
Signed-off-by: wengbj 
---
 target/linux/ramips/dts/FIREWRT.dts |9 +
 1 file changed, 9 insertions(+)

diff --git a/target/linux/ramips/dts/FIREWRT.dts 
b/target/linux/ramips/dts/FIREWRT.dts
index 4e9e28b..faebe2f 100644
--- a/target/linux/ramips/dts/FIREWRT.dts
+++ b/target/linux/ramips/dts/FIREWRT.dts
@@ -83,4 +83,13 @@
mtd-mac-address = <&factory 0xe000>;
};
 
+   gpio-leds {
+   compatible = "gpio-leds";
+
+   power {
+   label = "firewrt:green:power";
+   gpios = <&gpio0 22 1>;
+   };
+   };
+
 };
-- 
1.7.9.5
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 1/3] ralink: add ethernet macaddr to dts for FireWRT

2015-01-30 Thread wengbj
Signed-off-by: wengbj 
---
 target/linux/ramips/dts/FIREWRT.dts |5 +
 1 file changed, 5 insertions(+)

diff --git a/target/linux/ramips/dts/FIREWRT.dts 
b/target/linux/ramips/dts/FIREWRT.dts
index 2e5d26b..4e9e28b 100644
--- a/target/linux/ramips/dts/FIREWRT.dts
+++ b/target/linux/ramips/dts/FIREWRT.dts
@@ -78,4 +78,9 @@
};
};
};
+
+   ethernet@1e10 {
+   mtd-mac-address = <&factory 0xe000>;
+   };
+
 };
-- 
1.7.9.5
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 3/3] ralink: add FireWRT button detail

2015-01-30 Thread wengbj
Signed-off-by: wengbj 
---
 target/linux/ramips/dts/FIREWRT.dts|   12 
 target/linux/ramips/mt7621/profiles/firefly.mk |2 +-
 2 files changed, 13 insertions(+), 1 deletion(-)

diff --git a/target/linux/ramips/dts/FIREWRT.dts 
b/target/linux/ramips/dts/FIREWRT.dts
index faebe2f..f22c885 100644
--- a/target/linux/ramips/dts/FIREWRT.dts
+++ b/target/linux/ramips/dts/FIREWRT.dts
@@ -92,4 +92,16 @@
};
};
 
+   gpio-keys-polled {
+   compatible = "gpio-keys-polled";
+   #address-cells = <1>;
+   #size-cells = <0>;
+   poll-interval = <20>;
+   wps {
+   label = "wps";
+   gpios = <&gpio0 18 1>;
+   linux,code = <0x211>;
+   };
+   };
+
 };
diff --git a/target/linux/ramips/mt7621/profiles/firefly.mk 
b/target/linux/ramips/mt7621/profiles/firefly.mk
index c8292b0..b095979 100644
--- a/target/linux/ramips/mt7621/profiles/firefly.mk
+++ b/target/linux/ramips/mt7621/profiles/firefly.mk
@@ -8,7 +8,7 @@
 define Profile/Firefly
NAME:=Firefly Device
PACKAGES:=\
-   kmod-usb-core kmod-usb3 kmod-usb-hid  kmod-usb-storage 
mount-utils usbutils \
+   kmod-usb-core kmod-usb3 kmod-usb-hid  kmod-usb-storage 
mount-utils usbutils hostapd-utils \
 kmod-sdhci-mt7620 \
kmod-fs-ext3 kmod-fs-vfat kmod-fs-ntfs \
kmod-nls-cp437 kmod-nls-iso8859-1 kmod-nls-utf8 \
-- 
1.7.9.5
___
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] ralink: add ethernet macaddr to dts for FireWRT

2015-01-30 Thread fl.serv...@t-firefly.com
Dear Mr zhou:
I have generated new patchs .
Please check again . 
Thank you .



Best Regards.
Jay Weng

Website:  www.t-firefly.com
E-mail:  fl.serv...@t-firefly.com
 
From: Yousong Zhou
Date: 2015-01-30 19:10
To: wengbj
CC: John Crispin; zxf; weng jay; dxj; wbj; OpenWrt Development List
Subject: Re: [OpenWrt-Devel] [PATCH 1/3] ralink: add ethernet macaddr to dts 
for FireWRT
Hi, wengbj
 
It's just that OpenWrt requires a Signed-off-by line for patches to be
accepted [1].  That line can be generated by option -s in command `git
format-patch -s ...'
 
[1] https://dev.openwrt.org/wiki/SubmittingPatches
 
Regards
 
yousong
 
On 30 January 2015 at 17:04, wengbj  wrote:
> ---
>  target/linux/ramips/dts/FIREWRT.dts |5 +
>  1 file changed, 5 insertions(+)
>
> diff --git a/target/linux/ramips/dts/FIREWRT.dts 
> b/target/linux/ramips/dts/FIREWRT.dts
> index 2e5d26b..4e9e28b 100644
> --- a/target/linux/ramips/dts/FIREWRT.dts
> +++ b/target/linux/ramips/dts/FIREWRT.dts
> @@ -78,4 +78,9 @@
> };
> };
> };
> +
> +   ethernet@1e10 {
> +   mtd-mac-address = <&factory 0xe000>;
> +   };
> +
>  };
> --
> 1.7.9.5
> ___
> openwrt-devel mailing list
> openwrt-devel@lists.openwrt.org
> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
 
 
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH] mac80211: Revert adding SM Power Save capability to hostapd configuration

2015-01-30 Thread Robert Hancock
Part of rev 44173 added setting the SM Power Save capability in the hostapd.conf
file if the driver indicated that it was supported. It appears this was
incorrect, because the field in the actual HT Capabilities field in the AP
configuration is really a state indication. Just copying the state from the
capability resulted in the AP indicating that it had SMPS enabled all the time
if it supported SMPS. This effectively just disables all clients from sending
packets to the AP with more than one spatial stream, for no good reason.
So remove this part of the change.

Signed-off-by: Robert Hancock 
---
 package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh | 8 
 1 file changed, 8 deletions(-)

diff --git a/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh 
b/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh
index 72f9936..9526300 100644
--- a/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh
+++ b/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh
@@ -42,7 +42,6 @@ drv_mac80211_init_device_config() {
greenfield \
short_gi_20 \
short_gi_40 \
-   smps \
max_amsdu \
dsss_cck_40
 }
@@ -132,7 +131,6 @@ 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 \
@@ -143,8 +141,6 @@ 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) ))"
@@ -161,10 +157,6 @@ mac80211_hostapd_setup_base() {
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