[OpenWrt-Devel] [PATCH][uclient][V2] fetch: fix segfault after destination was not reached

2014-07-07 Thread Luka Perkov
Signed-off-by: Luka Perkov 
---
v1->v2:
* don't change connecting to connected

 uclient-fetch.c | 34 --
 1 file changed, 28 insertions(+), 6 deletions(-)

diff --git a/uclient-fetch.c b/uclient-fetch.c
index 881b4ea..22f15c6 100644
--- a/uclient-fetch.c
+++ b/uclient-fetch.c
@@ -149,13 +149,27 @@ static void msg_connecting(struct uclient *cl)
fprintf(stderr, "Connecting to %s:%d\n", addr, port);
 }
 
-static void init_request(struct uclient *cl)
+static int init_request(struct uclient *cl)
 {
+   int rc;
+
out_bytes = 0;
-   uclient_connect(cl);
+
+   rc = uclient_connect(cl);
+   if (rc)
+   return rc;
+
msg_connecting(cl);
-   uclient_http_set_request_type(cl, "GET");
-   uclient_request(cl);
+
+   rc = uclient_http_set_request_type(cl, "GET");
+   if (rc)
+   return rc;
+
+   rc = uclient_request(cl);
+   if (rc)
+   return rc;
+
+   return 0;
 }
 
 static void eof_cb(struct uclient *cl)
@@ -269,6 +283,7 @@ int main(int argc, char **argv)
struct uclient *cl;
int ch;
int longopt_idx = 0;
+   int rc;
 
init_ustream_ssl();
 
@@ -340,8 +355,15 @@ int main(int argc, char **argv)
if (ssl_ctx)
uclient_http_set_ssl_ctx(cl, ssl_ops, ssl_ctx, verify);
 
-   init_request(cl);
-   uloop_run();
+   rc = init_request(cl);
+   if (!rc) {
+   /* no error received, we can enter main loop */
+   uloop_run();
+   } else {
+   fprintf(stderr, "Failed to establish connection\n");
+   error_ret = 4;
+   }
+
uloop_done();
 
uclient_free(cl);
-- 
2.0.1
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH][uclient] http: implement data_sent write callback

2014-07-07 Thread Luka Perkov
Signed-off-by: Luka Perkov 
---
 uclient-http.c | 22 ++
 1 file changed, 22 insertions(+)

diff --git a/uclient-http.c b/uclient-http.c
index 9652fb8..b9de3a7 100644
--- a/uclient-http.c
+++ b/uclient-http.c
@@ -653,6 +653,12 @@ static void __uclient_notify_read(struct uclient_http *uh)
uc->cb->data_read(uc);
 }
 
+static void __uclient_notify_write(struct uclient_http *uh)
+{
+   struct uclient *uc = &uh->uc;
+   uc->cb->data_sent(uc);
+}
+
 static void uclient_notify_read(struct ustream *us, int bytes)
 {
struct uclient_http *uh = container_of(us, struct uclient_http, 
ufd.stream);
@@ -660,6 +666,13 @@ static void uclient_notify_read(struct ustream *us, int 
bytes)
__uclient_notify_read(uh);
 }
 
+static void uclient_notify_write(struct ustream *us, int bytes)
+{
+   struct uclient_http *uh = container_of(us, struct uclient_http, 
ufd.stream);
+
+   __uclient_notify_write(uh);
+}
+
 static void uclient_notify_state(struct ustream *us)
 {
struct uclient_http *uh = container_of(us, struct uclient_http, 
ufd.stream);
@@ -678,6 +691,7 @@ static int uclient_setup_http(struct uclient_http *uh)
us->string_data = true;
us->notify_state = uclient_notify_state;
us->notify_read = uclient_notify_read;
+   us->notify_write = uclient_notify_write;
 
ret = uclient_do_connect(uh, "80");
if (ret)
@@ -693,6 +707,13 @@ static void uclient_ssl_notify_read(struct ustream *us, 
int bytes)
__uclient_notify_read(uh);
 }
 
+static void uclient_ssl_notify_write(struct ustream *us, int bytes)
+{
+   struct uclient_http *uh = container_of(us, struct uclient_http, 
ussl.stream);
+
+   __uclient_notify_write(uh);
+}
+
 static void uclient_ssl_notify_state(struct ustream *us)
 {
struct uclient_http *uh = container_of(us, struct uclient_http, 
ussl.stream);
@@ -746,6 +767,7 @@ static int uclient_setup_https(struct uclient_http *uh)
us->string_data = true;
us->notify_state = uclient_ssl_notify_state;
us->notify_read = uclient_ssl_notify_read;
+   us->notify_write = uclient_ssl_notify_write;
uh->ussl.notify_error = uclient_ssl_notify_error;
uh->ussl.notify_verify_error = uclient_ssl_notify_verify_error;
uh->ussl.notify_connected = uclient_ssl_notify_connected;
-- 
2.0.1
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH 0/4] fix rb532 support

2014-07-07 Thread Felix Fietkau
On 2014-07-07 00:47, Roman Yeryomin wrote:
> On 6 July 2014 18:08, Felix Fietkau  wrote:
>> On 2014-07-06 13:17, Roman Yeryomin wrote:
>>> On 6 July 2014 01:20, Roman Yeryomin  wrote:
 On 5 July 2014 18:03, Felix Fietkau  wrote:
> On 2014-07-05 00:35, Roman Yeryomin wrote:
>> This patch set fully fixes rb532 support and removes broken mark.
>>
>> Roman Yeryomin (4):
>>   [rb532] fix jffs2 images
>>   [rb532] change default package set
>>   [rb532] add wan interface
>>   [rb532] remove broken mark
> What about squashfs images? It looks to me like one of your patches
> which was applied in r40717 tried to fix them but actually left them in
> a broken state - the cmdline mounts squashfs directly on sda2 instead of
> going through block2mtd.

 Yes, that's sounds weird to me also now but they work like that for me.
 I will check that again tomorrow.
>>>
>>> So, squashfs works both ways. But the older squashfs cmdline was
>>> broken anyway as it was using mtdblock0 (like jffs2).
>>> I can add a patch to change squashfs to using block2mtd again, if you
>>> want, but I don't see any reasons to do that.
>> Are you sure that it actually mounts the jffs2 overlay? I'd expect it to
>> come up with tmpfs the way it's implemented right now.
> 
> You, were right, I didn't look at that before (I just used ext4 images).
> Please see the patch attached. I don't know if this hack is acceptable
> but I don't see any other way to fix it.
> The key point is that we have to rename the onboard flash partition to
> make splitting work (without introducing other split methods?). This,
> potentially, can break something elsewhere but I don't see where right
> now.
Yes, I'll take this one and apply the other ones after it.

Thanks,

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


Re: [OpenWrt-Devel] [PATCH 2/4] [rb532] change default package set

2014-07-07 Thread Felix Fietkau
On 2014-07-05 00:36, Roman Yeryomin wrote:
> There could be no wireless interfaces but ethernets are on board.
> 
> Signed-off-by: Roman Yeryomin 
Not taking this one. Adding kmod-via-rhine is unnecessary, since the
driver is already built into the kernel.

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


Re: [OpenWrt-Devel] [PATCH 1/4] [rb532] fix jffs2 images

2014-07-07 Thread Felix Fietkau
On 2014-07-05 00:36, Roman Yeryomin wrote:
> Signed-off-by: Roman Yeryomin 
Next time, please use "rb532: ..." instead of "[rb532] ...", because git
am strips the [] parts.

Thanks,

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


[OpenWrt-Devel] [PATCH 1/3][ESR1750][V2] ar71xx: allow ath79_nvram_parse_mac_addr parsing mac with quotes

2014-07-07 Thread Jon Suphammer
Signed-off-by: Jon Suphammer 
---
 target/linux/ar71xx/files/arch/mips/ath79/nvram.c | 6 ++
 1 file changed, 6 insertions(+)

diff --git a/target/linux/ar71xx/files/arch/mips/ath79/nvram.c 
b/target/linux/ar71xx/files/arch/mips/ath79/nvram.c
index 43911b8..3119778 100644
--- a/target/linux/ar71xx/files/arch/mips/ath79/nvram.c
+++ b/target/linux/ar71xx/files/arch/mips/ath79/nvram.c
@@ -59,6 +59,12 @@ int ath79_nvram_parse_mac_addr(const char *nvram, unsigned 
nvram_len,
goto free;
}
 
+   if( strlen(mac_str) == 19 && strchr(mac_str, '"'))
+   {
+   mac_str[18] = 0;
+   mac_str++;
+   }
+
t = sscanf(mac_str, "%02hhx:%02hhx:%02hhx:%02hhx:%02hhx:%02hhx",
   &mac[0], &mac[1], &mac[2], &mac[3], &mac[4], &mac[5]);
 
-- 
2.0.1
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 2/3][ESR1750][V2] ar71xx: add a helper function for setting up ETH_CFG register on QCA955x

2014-07-07 Thread Jon Suphammer
Signed-off-by: Jon Suphammer 
---
 target/linux/ar71xx/files/arch/mips/ath79/dev-eth.c | 19 +++
 target/linux/ar71xx/files/arch/mips/ath79/dev-eth.h |  1 +
 2 files changed, 20 insertions(+)

diff --git a/target/linux/ar71xx/files/arch/mips/ath79/dev-eth.c 
b/target/linux/ar71xx/files/arch/mips/ath79/dev-eth.c
index d9c40e9..4c503ad 100644
--- a/target/linux/ar71xx/files/arch/mips/ath79/dev-eth.c
+++ b/target/linux/ar71xx/files/arch/mips/ath79/dev-eth.c
@@ -769,6 +769,25 @@ void __init ath79_setup_ar934x_eth_cfg(u32 mask)
iounmap(base);
 }
 
+void __init ath79_setup_qca955x_eth_cfg(u32 mask)
+{
+   void __iomem *base;
+   u32 t;
+
+   base = ioremap(QCA955X_GMAC_BASE, QCA955X_GMAC_SIZE);
+
+   t = __raw_readl(base + QCA955X_GMAC_REG_ETH_CFG);
+
+   t &= ~(QCA955X_ETH_CFG_RGMII_EN |
+   QCA955X_ETH_CFG_GE0_SGMII);
+
+   t |= mask;
+
+   __raw_writel(t, base + QCA955X_GMAC_REG_ETH_CFG);
+
+   iounmap(base);
+}
+
 static int ath79_eth_instance __initdata;
 void __init ath79_register_eth(unsigned int id)
 {
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/dev-eth.h 
b/target/linux/ar71xx/files/arch/mips/ath79/dev-eth.h
index ff26ec4..e1517b7 100644
--- a/target/linux/ar71xx/files/arch/mips/ath79/dev-eth.h
+++ b/target/linux/ar71xx/files/arch/mips/ath79/dev-eth.h
@@ -47,5 +47,6 @@ void ath79_register_mdio(unsigned int id, u32 phy_mask);
 
 void ath79_setup_ar933x_phy4_switch(bool mac, bool mdio);
 void ath79_setup_ar934x_eth_cfg(u32 mask);
+void ath79_setup_qca955x_eth_cfg(u32 mask);
 
 #endif /* _ATH79_DEV_ETH_H */
-- 
2.0.1
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 3/3][ESR1750][V2] ar71xx: add support for EnGenius ESR1750

2014-07-07 Thread Jon Suphammer
Signed-off-by: Jon Suphammer 
---
 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  |   1 +
 target/linux/ar71xx/config-3.10|   3 +-
 .../ar71xx/files/arch/mips/ath79/mach-esr1750.c| 176 +
 target/linux/ar71xx/generic/profiles/engenius.mk   |  16 ++
 target/linux/ar71xx/image/Makefile |   2 +
 .../713-MIPS-ath79-add-ESR1750-support.patch   |  45 ++
 9 files changed, 255 insertions(+), 1 deletion(-)
 create mode 100644 target/linux/ar71xx/files/arch/mips/ath79/mach-esr1750.c
 create mode 100644 target/linux/ar71xx/generic/profiles/engenius.mk
 create mode 100644 
target/linux/ar71xx/patches-3.10/713-MIPS-ath79-add-ESR1750-support.patch

diff --git a/target/linux/ar71xx/base-files/etc/diag.sh 
b/target/linux/ar71xx/base-files/etc/diag.sh
index ef172b4..144459b 100755
--- a/target/linux/ar71xx/base-files/etc/diag.sh
+++ b/target/linux/ar71xx/base-files/etc/diag.sh
@@ -69,6 +69,9 @@ get_status_led() {
el-m150)
status_led="EasyLink:green:system"
;;
+   esr1750)
+   status_led="esr1750:amber:power"
+   ;;
hiwifi-hc6361)
status_led="hiwifi:blue:system"
;;
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 646425c..17a72ff 100755
--- a/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
+++ b/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
@@ -30,6 +30,13 @@ wlr8100)
ucidef_add_switch_vlan "switch0" "2" "0t 1"
;;
 
+esr1750)
+   ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2"
+   ucidef_add_switch "switch0" "1" "1"
+   ucidef_add_switch_vlan "switch0" "1" "0t 2 3 4 5"
+   ucidef_add_switch_vlan "switch0" "2" "0t 1"
+   ;;
+
 ap136-010)
ucidef_set_interfaces_lan_wan "eth0" "eth1"
ucidef_add_switch "switch0" "1" "1"
diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh 
b/target/linux/ar71xx/base-files/lib/ar71xx.sh
index bd277ab..e37c56d 100755
--- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
+++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh
@@ -319,6 +319,9 @@ ar71xx_board_detect() {
*EL-MINI)
name="el-mini"
;;
+   *"EnGenius ESR1750")
+   name="esr1750"
+   ;;
*JA76PF)
name="ja76pf"
;;
diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh 
b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
index 8af9580..70f7fc2 100755
--- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
@@ -151,6 +151,7 @@ platform_check_image() {
dir-825-c1 | \
dir-835-a1 | \
dragino2 | \
+   esr1750 | \
ew-dorin | \
ew-dorin-router | \
hiwifi-hc6361 | \
diff --git a/target/linux/ar71xx/config-3.10 b/target/linux/ar71xx/config-3.10
index 4e30a44..9bc6ecc 100644
--- a/target/linux/ar71xx/config-3.10
+++ b/target/linux/ar71xx/config-3.10
@@ -49,10 +49,11 @@ CONFIG_ATH79_MACH_DRAGINO2=y
 CONFIG_ATH79_MACH_EAP7660D=y
 CONFIG_ATH79_MACH_EL_M150=y
 CONFIG_ATH79_MACH_EL_MINI=y
+CONFIG_ATH79_MACH_ESR1750=y
 CONFIG_ATH79_MACH_EW_DORIN=y
 CONFIG_ATH79_MACH_GS_OOLITE=y
-CONFIG_ATH79_MACH_HORNET_UB=y
 CONFIG_ATH79_MACH_HIWIFI_HC6361=y
+CONFIG_ATH79_MACH_HORNET_UB=y
 CONFIG_ATH79_MACH_JA76PF=y
 CONFIG_ATH79_MACH_JWAP003=y
 CONFIG_ATH79_MACH_MR600=y
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-esr1750.c 
b/target/linux/ar71xx/files/arch/mips/ath79/mach-esr1750.c
new file mode 100644
index 000..86c0135
--- /dev/null
+++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-esr1750.c
@@ -0,0 +1,176 @@
+/*
+ *  EnGenius ESR1750 board support
+ *
+ *  Copyright (c) 2014 Jon Suphammer 
+ *
+ *  This program is free software; you can redistribute it and/or modify it
+ *  under the terms of the GNU General Public License version 2 as published
+ *  by the Free Software Foundation.
+ */
+
+#include 
+#include 
+
+#include 
+
+#include "common.h"
+#include "pci.h"
+#include "dev-ap9x-pci.h"
+#include "dev-gpio-buttons.h"
+#include "dev-eth.h"
+#include "dev-leds-gpio.h"
+#include "dev-m25p80.h"
+#include "dev-usb.h"
+#include "dev-wmac.h"
+#include "machtypes.h"
+#include "nvram.h"
+
+#define ESR1750_GPIO_LED_WLAN_5G   23
+#define ESR1750_GPIO_LED_WLAN_2G   13
+#define ESR1750_GPIO_LED_POWER_AMBER   2
+#define ESR1750_GPIO_LED_WPS_AMBER 22
+#define ESR1750_GPIO_LED_WPS_BLUE  19
+
+#define ESR1750_GPIO_BTN_WPS   16
+#define ESR1750_GPIO_BTN_RESET 17
+
+#define ESR1750_KEYS_POLL_INTERVAL 20  /* msecs */
+#define ESR1750_KEYS_DEBOUNCE_INTERVAL (3 * ESR1750_KE

[OpenWrt-Devel] [PATCH v3] ar71xx: Support for Mikrotik RB2011UiAS

2014-07-07 Thread stharward
The RB2011UiAS is almost exactly the same as the RB2011UAS, which is
already supported. Hardware-wise, it adds a passive power injector on
Eth10. Software-wise, Routerboot passes a different board name on the
kernel command line. Hence the need for a patch.

Not yet working:

* touchscreen: doesn't work on RB2011UAS either. The touchscreen itself
  seems to be driven by an ADS7843-compatible IC, but figuring out which
  GPIO pins it's connected to is work for the future.
* control of power injector: remains off. Probably also GPIO-controlled.

Signed-off-by: Soren Harward 
---
 .../ar71xx/base-files/etc/uci-defaults/01_leds |  1 +
 .../ar71xx/base-files/etc/uci-defaults/02_network  |  3 ++-
 target/linux/ar71xx/base-files/lib/ar71xx.sh   |  3 +++
 .../715-MIPS-ath79-add_mikrotik_rb2011uias.patch   | 26 ++
 4 files changed, 32 insertions(+), 1 deletion(-)
 create mode 100644 
target/linux/ar71xx/patches-3.10/715-MIPS-ath79-add_mikrotik_rb2011uias.patch

diff --git a/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds 
b/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
index fe5ff93..ef38fe9 100755
--- a/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
+++ b/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
@@ -72,6 +72,7 @@ rb-750)
 
 rb-2011l|\
 rb-2011uas|\
+rb-2011uias|\
 rb-2011uas-2hnd)
ucidef_set_led_switch "eth6" "ETH6" "rb:green:eth6" "switch1" "0x20"
ucidef_set_led_switch "eth7" "ETH7" "rb:green:eth7" "switch1" "0x10"
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 646425c..1d42ae6 100755
--- a/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
+++ b/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
@@ -57,6 +57,7 @@ tl-wdr4900-v2)
 db120 |\
 rb-2011l | \
 rb-2011uas |\
+rb-2011uias |\
 rb-2011uas-2hnd)
ucidef_set_interfaces_lan_wan "eth0.1 eth1" "eth0.2"
ucidef_add_switch "switch0" "1" "1"
@@ -66,7 +67,7 @@ rb-2011uas-2hnd)
ucidef_add_switch_vlan "switch1" "1" "0 1 2 3 4 5"
 
case "$board" in
-   rb-2011uas*)
+   rb-2011uas* | rb-2011uias)
ucidef_set_interface_raw "sfp" "eth0.3"
ucidef_add_switch_vlan "switch0" "3" "0t 6"
;;
diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh 
b/target/linux/ar71xx/base-files/lib/ar71xx.sh
index bd277ab..4768ba4 100755
--- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
+++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh
@@ -463,6 +463,9 @@ ar71xx_board_detect() {
*"RouterBOARD 2011UAS")
name="rb-2011uas"
;;
+   *"RouterBOARD 2011UiAS")
+   name="rb-2011uias"
+   ;;
*"RouterBOARD 2011UAS-2HnD")
name="rb-2011uas-2hnd"
;;
diff --git 
a/target/linux/ar71xx/patches-3.10/715-MIPS-ath79-add_mikrotik_rb2011uias.patch 
b/target/linux/ar71xx/patches-3.10/715-MIPS-ath79-add_mikrotik_rb2011uias.patch
new file mode 100644
index 000..50546b4
--- /dev/null
+++ 
b/target/linux/ar71xx/patches-3.10/715-MIPS-ath79-add_mikrotik_rb2011uias.patch
@@ -0,0 +1,26 @@
+--- a/arch/mips/ath79/mach-rb2011.c
 b/arch/mips/ath79/mach-rb2011.c
+@@ -321,6 +321,13 @@ static void __init rb2011us_setup(void)
+ 
+ MIPS_MACHINE_NONAME(ATH79_MACH_RB_2011US, "2011US", rb2011us_setup);
+ 
++static void __init rb2011r5_setup(void)
++{
++  rb2011_setup(RB2011_FLAG_SFP | RB2011_FLAG_USB);
++}
++
++MIPS_MACHINE_NONAME(ATH79_MACH_RB_2011R5, "2011r5", rb2011r5_setup);
++
+ static void __init rb2011g_setup(void)
+ {
+   rb2011_setup(RB2011_FLAG_SFP |
+--- a/arch/mips/ath79/machtypes.h
 b/arch/mips/ath79/machtypes.h
+@@ -93,6 +93,7 @@ enum ath79_mach_type {
+   ATH79_MACH_RB_2011G,/* Mikrotik RouterBOARD 2011UAS-2HnD */
+   ATH79_MACH_RB_2011L,/* Mikrotik RouterBOARD 2011L */
+   ATH79_MACH_RB_2011US,   /* Mikrotik RouterBOARD 2011UAS */
++  ATH79_MACH_RB_2011R5,   /* Mikrotik RouterBOARD 2011UiAS */
+   ATH79_MACH_RB_SXTLITE2ND,   /* Mikrotik RouterBOARD SXT Lite 2nD */
+   ATH79_MACH_RB_SXTLITE5ND,   /* Mikrotik RouterBOARD SXT Lite 5nD */
+   ATH79_MACH_RW2458N, /* Redwave RW2458N */
-- 
1.8.5.5
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH] brcm47xx: add buttons support for Netgear WNR3500L

2014-07-07 Thread Rafał Miłecki
https://dev.openwrt.org/ticket/14406

Signed-off-by: Rafał Miłecki 
---
 ...-BCM47XX-Devices-database-update-for-3.17.patch | 25 ++
 ...-BCM47XX-Devices-database-update-for-3.17.patch | 25 ++
 2 files changed, 50 insertions(+)

diff --git 
a/target/linux/brcm47xx/patches-3.10/146-MIPS-BCM47XX-Devices-database-update-for-3.17.patch
 
b/target/linux/brcm47xx/patches-3.10/146-MIPS-BCM47XX-Devices-database-update-for-3.17.patch
index 047e659..aa3e7ac 100644
--- 
a/target/linux/brcm47xx/patches-3.10/146-MIPS-BCM47XX-Devices-database-update-for-3.17.patch
+++ 
b/target/linux/brcm47xx/patches-3.10/146-MIPS-BCM47XX-Devices-database-update-for-3.17.patch
@@ -90,3 +90,28 @@
case BCM47XX_BOARD_NETGEAR_WNR834BV2:
bcm47xx_set_pdata(bcm47xx_leds_netgear_wnr834bv2);
break;
+--- a/arch/mips/bcm47xx/buttons.c
 b/arch/mips/bcm47xx/buttons.c
+@@ -329,6 +329,12 @@ bcm47xx_buttons_netgear_wndr4500v1[] __i
+ };
+ 
+ static const struct gpio_keys_button
++bcm47xx_buttons_netgear_wnr3500lv1[] __initconst = {
++  BCM47XX_GPIO_KEY(4, KEY_RESTART),
++  BCM47XX_GPIO_KEY(6, KEY_WPS_BUTTON),
++};
++
++static const struct gpio_keys_button
+ bcm47xx_buttons_netgear_wnr834bv2[] __initconst = {
+   BCM47XX_GPIO_KEY(6, KEY_RESTART),
+ };
+@@ -538,6 +544,9 @@ int __init bcm47xx_buttons_register(void
+   case BCM47XX_BOARD_NETGEAR_WNDR4500V1:
+   err = bcm47xx_copy_bdata(bcm47xx_buttons_netgear_wndr4500v1);
+   break;
++  case BCM47XX_BOARD_NETGEAR_WNR3500L:
++  err = bcm47xx_copy_bdata(bcm47xx_buttons_netgear_wnr3500lv1);
++  break;
+   case BCM47XX_BOARD_NETGEAR_WNR834BV2:
+   err = bcm47xx_copy_bdata(bcm47xx_buttons_netgear_wnr834bv2);
+   break;
diff --git 
a/target/linux/brcm47xx/patches-3.14/146-MIPS-BCM47XX-Devices-database-update-for-3.17.patch
 
b/target/linux/brcm47xx/patches-3.14/146-MIPS-BCM47XX-Devices-database-update-for-3.17.patch
index 047e659..aa3e7ac 100644
--- 
a/target/linux/brcm47xx/patches-3.14/146-MIPS-BCM47XX-Devices-database-update-for-3.17.patch
+++ 
b/target/linux/brcm47xx/patches-3.14/146-MIPS-BCM47XX-Devices-database-update-for-3.17.patch
@@ -90,3 +90,28 @@
case BCM47XX_BOARD_NETGEAR_WNR834BV2:
bcm47xx_set_pdata(bcm47xx_leds_netgear_wnr834bv2);
break;
+--- a/arch/mips/bcm47xx/buttons.c
 b/arch/mips/bcm47xx/buttons.c
+@@ -329,6 +329,12 @@ bcm47xx_buttons_netgear_wndr4500v1[] __i
+ };
+ 
+ static const struct gpio_keys_button
++bcm47xx_buttons_netgear_wnr3500lv1[] __initconst = {
++  BCM47XX_GPIO_KEY(4, KEY_RESTART),
++  BCM47XX_GPIO_KEY(6, KEY_WPS_BUTTON),
++};
++
++static const struct gpio_keys_button
+ bcm47xx_buttons_netgear_wnr834bv2[] __initconst = {
+   BCM47XX_GPIO_KEY(6, KEY_RESTART),
+ };
+@@ -538,6 +544,9 @@ int __init bcm47xx_buttons_register(void
+   case BCM47XX_BOARD_NETGEAR_WNDR4500V1:
+   err = bcm47xx_copy_bdata(bcm47xx_buttons_netgear_wndr4500v1);
+   break;
++  case BCM47XX_BOARD_NETGEAR_WNR3500L:
++  err = bcm47xx_copy_bdata(bcm47xx_buttons_netgear_wnr3500lv1);
++  break;
+   case BCM47XX_BOARD_NETGEAR_WNR834BV2:
+   err = bcm47xx_copy_bdata(bcm47xx_buttons_netgear_wnr834bv2);
+   break;
-- 
1.8.4.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/4] [rb532] fix jffs2 images

2014-07-07 Thread Roman Yeryomin
On 7 July 2014 11:52, Felix Fietkau  wrote:
> On 2014-07-05 00:36, Roman Yeryomin wrote:
>> Signed-off-by: Roman Yeryomin 
> Next time, please use "rb532: ..." instead of "[rb532] ...", because git
> am strips the [] parts.

Ok, no problem!

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


Re: [OpenWrt-Devel] [PATCH 2/4] [rb532] change default package set

2014-07-07 Thread Roman Yeryomin
On 7 July 2014 11:52, Felix Fietkau  wrote:
> On 2014-07-05 00:36, Roman Yeryomin wrote:
>> There could be no wireless interfaces but ethernets are on board.
>>
>> Signed-off-by: Roman Yeryomin 
> Not taking this one. Adding kmod-via-rhine is unnecessary, since the
> driver is already built into the kernel.

Ok, true... though I don't see the point in keeping wpad and madwifi there.

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


[OpenWrt-Devel] [PATCH RfC] Fix wifi on ZyXEL NBG 6716

2014-07-07 Thread André Valentin
Hi!

I noticed that the driver does not load the correct firmware. For full
use a board.bin fitting to the device is needed. This extracts it
and overwrites the default one. Is the position in the preinit sequence
correct ?

The driver has still issues with otp.bin (now included in firmware-2!), but
tells its incorrect and does not load it. I patched the driver successfully
so it ignores the error. Results are good. I do currently not know
how to handle this ugly stuff upstream? What do you think?

André Valentin (1):
  ar71xx: nbg6716: extract ath10k wifi board.bin

 .../lib/preinit/81_load_ath10k_board_bin   |   23 
 1 file changed, 23 insertions(+)
 create mode 100644 
target/linux/ar71xx/base-files/lib/preinit/81_load_ath10k_board_bin

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


[OpenWrt-Devel] [PATCH] ar71xx: nbg6716: extract ath10k wifi board.bin

2014-07-07 Thread André Valentin
With help of this script the ath10k board.bin settings are loaded from
flash and saved to the ath10k firmware directory. The driver reads it
later in the boot process.

Signed-off-by: André Valentin 
---
 .../lib/preinit/81_load_ath10k_board_bin   |   23 
 1 file changed, 23 insertions(+)
 create mode 100644 
target/linux/ar71xx/base-files/lib/preinit/81_load_ath10k_board_bin

diff --git 
a/target/linux/ar71xx/base-files/lib/preinit/81_load_ath10k_board_bin 
b/target/linux/ar71xx/base-files/lib/preinit/81_load_ath10k_board_bin
new file mode 100644
index 000..1e1466c
--- /dev/null
+++ b/target/linux/ar71xx/base-files/lib/preinit/81_load_ath10k_board_bin
@@ -0,0 +1,23 @@
+#!/bin/sh
+
+. /lib/ar71xx.sh
+
+do_load_ath10k_board_bin() {
+   # load board.bin
+   case $(ar71xx_board_name) in
+   nbg6716)
+   dd if=/dev/mtdblock2 \
+   bs=1 skip=20480 count=2116 \
+   of=/tmp/ath10k-board.bin
+   ;;
+   esac
+   [ -f /tmp/ath10k-board.bin ] || {
+   return
+   }
+   cmp -s /tmp/ath10k-board.bin 
/lib/firmware/ath10k/QCA988X/hw2.0/board.bin || {
+   cp /tmp/ath10k-board.bin 
/lib/firmware/ath10k/QCA988X/hw2.0/board.bin
+   rm /tmp/ath10k-board.bin
+   }
+}
+
+boot_hook_add preinit_main do_load_ath10k_board_bin
-- 
1.7.10.4
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] Status of DFS in OpenWrt -> ath9k

2014-07-07 Thread Andre Valentin

Hi!

this should also be in your .config
# CONFIG_ATH_USER_REGD is not set
See http://wireless.kernel.org/en/users/Drivers/ath10k -> Limitations 3/3

Kind regards,

André



On 04.07.2014 16:29, Jacek Kikiewicz wrote:

Hello,

I have CONFIG_PACKAGE_ATH_DFS=y and still cannot use this... any idea how / 
what should be debugged?

..

   CONFIG_PACKAGE_ATH_DFS=y

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


[OpenWrt-Devel] [PATCH] kernel: ledtrig-netdev: use netdev_notifier_info

2014-07-07 Thread Claudio Leite
Since kernel 3.11, the third parameter passed to notifier_call()
is of type struct netdev_notifier_info. This patch fixes an oops
when setting a netdev LED trigger.

Signed-off-by: Claudio Leite 
---
 .../patches-3.12/833-ledtrig_netdev-use-notifier-info.patch | 13 +
 .../patches-3.13/833-ledtrig_netdev-use-notifier-info.patch | 13 +
 .../patches-3.14/833-ledtrig_netdev-use-notifier-info.patch | 13 +
 3 files changed, 39 insertions(+)
 create mode 100644 
target/linux/generic/patches-3.12/833-ledtrig_netdev-use-notifier-info.patch
 create mode 100644 
target/linux/generic/patches-3.13/833-ledtrig_netdev-use-notifier-info.patch
 create mode 100644 
target/linux/generic/patches-3.14/833-ledtrig_netdev-use-notifier-info.patch

diff --git 
a/target/linux/generic/patches-3.12/833-ledtrig_netdev-use-notifier-info.patch 
b/target/linux/generic/patches-3.12/833-ledtrig_netdev-use-notifier-info.patch
new file mode 100644
index 000..bdaca82
--- /dev/null
+++ 
b/target/linux/generic/patches-3.12/833-ledtrig_netdev-use-notifier-info.patch
@@ -0,0 +1,13 @@
+Index: linux-3.14.10/drivers/leds/ledtrig-netdev.c
+===
+--- linux-3.14.10.orig/drivers/leds/ledtrig-netdev.c
 linux-3.14.10/drivers/leds/ledtrig-netdev.c
+@@ -253,7 +253,7 @@ static int netdev_trig_notify(struct not
+ unsigned long evt,
+ void *dv)
+ {
+-  struct net_device *dev = dv;
++  struct net_device *dev = netdev_notifier_info_to_dev((struct 
netdev_notifier_info *)dv);
+   struct led_netdev_data *trigger_data = container_of(nb, struct 
led_netdev_data, notifier);
+ 
+   if (evt != NETDEV_UP && evt != NETDEV_DOWN && evt != NETDEV_CHANGE && 
evt != NETDEV_REGISTER && evt != NETDEV_UNREGISTER)
diff --git 
a/target/linux/generic/patches-3.13/833-ledtrig_netdev-use-notifier-info.patch 
b/target/linux/generic/patches-3.13/833-ledtrig_netdev-use-notifier-info.patch
new file mode 100644
index 000..bdaca82
--- /dev/null
+++ 
b/target/linux/generic/patches-3.13/833-ledtrig_netdev-use-notifier-info.patch
@@ -0,0 +1,13 @@
+Index: linux-3.14.10/drivers/leds/ledtrig-netdev.c
+===
+--- linux-3.14.10.orig/drivers/leds/ledtrig-netdev.c
 linux-3.14.10/drivers/leds/ledtrig-netdev.c
+@@ -253,7 +253,7 @@ static int netdev_trig_notify(struct not
+ unsigned long evt,
+ void *dv)
+ {
+-  struct net_device *dev = dv;
++  struct net_device *dev = netdev_notifier_info_to_dev((struct 
netdev_notifier_info *)dv);
+   struct led_netdev_data *trigger_data = container_of(nb, struct 
led_netdev_data, notifier);
+ 
+   if (evt != NETDEV_UP && evt != NETDEV_DOWN && evt != NETDEV_CHANGE && 
evt != NETDEV_REGISTER && evt != NETDEV_UNREGISTER)
diff --git 
a/target/linux/generic/patches-3.14/833-ledtrig_netdev-use-notifier-info.patch 
b/target/linux/generic/patches-3.14/833-ledtrig_netdev-use-notifier-info.patch
new file mode 100644
index 000..bdaca82
--- /dev/null
+++ 
b/target/linux/generic/patches-3.14/833-ledtrig_netdev-use-notifier-info.patch
@@ -0,0 +1,13 @@
+Index: linux-3.14.10/drivers/leds/ledtrig-netdev.c
+===
+--- linux-3.14.10.orig/drivers/leds/ledtrig-netdev.c
 linux-3.14.10/drivers/leds/ledtrig-netdev.c
+@@ -253,7 +253,7 @@ static int netdev_trig_notify(struct not
+ unsigned long evt,
+ void *dv)
+ {
+-  struct net_device *dev = dv;
++  struct net_device *dev = netdev_notifier_info_to_dev((struct 
netdev_notifier_info *)dv);
+   struct led_netdev_data *trigger_data = container_of(nb, struct 
led_netdev_data, notifier);
+ 
+   if (evt != NETDEV_UP && evt != NETDEV_DOWN && evt != NETDEV_CHANGE && 
evt != NETDEV_REGISTER && evt != NETDEV_UNREGISTER)
-- 
2.0.1
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH 2/4] [rb532] change default package set

2014-07-07 Thread Florian Fainelli
2014-07-07 13:57 GMT-07:00 Roman Yeryomin :
> On 7 July 2014 11:52, Felix Fietkau  wrote:
>> On 2014-07-05 00:36, Roman Yeryomin wrote:
>>> There could be no wireless interfaces but ethernets are on board.
>>>
>>> Signed-off-by: Roman Yeryomin 
>> Not taking this one. Adding kmod-via-rhine is unnecessary, since the
>> driver is already built into the kernel.
>
> Ok, true... though I don't see the point in keeping wpad and madwifi there.

Could you resubmit with a more recent package set such as wpad-mini
and kmod-ath5k for instance?
-- 
Florian
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel