[OpenWrt-Devel] Patch for new package systemd-udev needed for compilation modemmanager daemon

2013-02-23 Thread Rusink Rusinkoff
Hi!

I've tried to compile new package modemmanager placed  by Aleksander
Morado (http://patchwork.openwrt.org/patch/3287/),
and faced to this problem

lsudev.c:20:25: fatal error: gudev/gudev.h: No such file or directory
compilation terminated.
make[5]: *** [lsudev-lsudev.o] Error 1

Modemmanager depends on another new package systemd-udev  placed by
Aleksander Morado (http://patchwork.openwrt.org/patch/3285/
http://patchwork.openwrt.org/patch/3286/ ). So here is my patch for
systemd-udev/Makefile, solving problem with modemmanager compilation:

diff -ru a/utils/systemd-udev/Makefile b/utils/systemd-udev/Makefile
--- a/packages/utils/systemd-udev/Makefile  2013-02-13 22:04:00.0 
+0400
+++ b/packages/utils/systemd-udev/Makefile  2013-02-22 12:47:25.783069741 
+0400
@@ -115,6 +115,9 @@

 define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/include
+   $(CP) \
+   $(PKG_INSTALL_DIR)/usr/include/gudev-1.0/gudev \
+   $(1)/usr/include/
$(CP) $(PKG_INSTALL_DIR)/usr/include/libudev.h $(1)/usr/include
$(INSTALL_DIR) $(1)/usr/share/pkgconfig
$(CP) $(PKG_INSTALL_DIR)/usr/share/pkgconfig/udev.pc 
$(1)/usr/share/pkgconfig


Best Regards

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


[OpenWrt-Devel] Patch for new package systemd-udev needed for compilation modemmanager daemon (Corrected)

2013-02-23 Thread Rusink Rusinkoff
Hi!

I've tried to compile new package modemmanager placed  by Aleksander
Morgado (http://patchwork.openwrt.org/patch/3287/),
and faced to this problem

lsudev.c:20:25: fatal error: gudev/gudev.h: No such file or directory
compilation terminated.
make[5]: *** [lsudev-lsudev.o] Error 1

Modemmanager depends on another new package systemd-udev  placed by
Aleksander Morgado (http://patchwork.openwrt.org/patch/3285/
http://patchwork.openwrt.org/patch/3286/ ). So here is my patch for
systemd-udev/Makefile, solving problem with modemmanager compilation:

diff -ru a/utils/systemd-udev/Makefile b/utils/systemd-udev/Makefile
--- a/packages/utils/systemd-udev/Makefile  2013-02-13 22:04:00.0 
+0400
+++ b/packages/utils/systemd-udev/Makefile  2013-02-22 12:47:25.783069741 
+0400
@@ -115,6 +115,9 @@

 define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/include
+   $(CP) \
+   $(PKG_INSTALL_DIR)/usr/include/gudev-1.0/gudev \
+   $(1)/usr/include/
$(CP) $(PKG_INSTALL_DIR)/usr/include/libudev.h $(1)/usr/include
$(INSTALL_DIR) $(1)/usr/share/pkgconfig
$(CP) $(PKG_INSTALL_DIR)/usr/share/pkgconfig/udev.pc 
$(1)/usr/share/pkgconfig



I've made mistacke in previous letter ( in surname Aleksander Morgado)
that's correct version

Best Regards

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


[OpenWrt-Devel] [Patch] [packages] broadcom-diag : Detection of WNDR3400v1

2013-02-23 Thread Dirk Neukirchen

Hi,

first time commit.

 nvram variable boardtype is unique for now.
- button gpio were taken from nvram.
- led information was taken from dd-wrt
( http://svn.dd-wrt.com/browser/src/router/libutils/utils.c )
I hope that I changed the values correctly.


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

diff --git a/package/broadcom-diag/src/diag.c 
b/package/broadcom-diag/src/diag.c

index 997fbe8..74091fc 100644
--- a/package/broadcom-diag/src/diag.c
+++ b/package/broadcom-diag/src/diag.c
@@ -120,6 +120,7 @@ enum {
 WGT634U,
 WNR834BV1,
 WNR834BV2,
+WNDR3400V1,

 /* Trendware */
 TEW411BRPP,
@@ -896,6 +897,21 @@ static struct platform_t __initdata platforms[] = {
 { .name = connected,.gpio = 1  7, .polarity = 
NORMAL },

 },
 },
+[WNDR3400V1] = {
+.name = Netgear WNDR3400 V1,
+.buttons= {
+/* nvram get gpio5=robo_reset */
+{ .name = reset,.gpio = 1  4 },
+{ .name = ses,.gpio = 1  6 },
+},
+.leds= {
+{ .name = wlan,   .gpio = 0  0, .polarity = 
NORMAL },
+{ .name = connected,  .gpio = 1  0, .polarity = 
NORMAL },
+{ .name = power,  .gpio = 1  3, .polarity = 
NORMAL },
+{ .name = diag,   .gpio = 1  7, .polarity = 
NORMAL },
+{ .name = usb,.gpio = 1  2, .polarity = 
REVERSE },

+},
+},
 /* Trendware */
 [TEW411BRPP] = {
 .name   = Trendware TEW411BRP+,
@@ -1095,6 +,12 @@ static struct platform_t __init 
*platform_detect(void)

 return platforms[WE800G];
 }

+if ((buf = nvram_get(boardtype))) {
+if (!strcmp(buf, 0xb4cf)) { /* Netgear WNDR3400 V1 */
+return platforms[WNDR3400V1];
+}
+}
+
 /* Buffalo */
 if ((buf = (nvram_get(melco_id) ?: nvram_get(buffalo_id {
 /* Buffalo hardware, check id for specific hardware matches */
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] Add support for TL-LINK TL-MR3420-v2

2013-02-23 Thread Dmytro
-If the mountain will not come to Mahomet, Mahomet must go to the mountain

Quite a long time is not embedded in the support MR3420v2 in Trunk.
Enough reviews of the stability the device with the openwrt
firmware+this patch.

Forum:
https://forum.openwrt.org/viewtopic.php?id=41326
Ticket:
https://dev.openwrt.org/ticket/12748
The formatted html version of diff:
https://dev.openwrt.org/attachment/ticket/12748/mr3420v2_trunk.patch

---
Index: target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wr841n-v8.c
===
--- target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wr841n-v8.c(revision 35287)
+++ target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wr841n-v8.c(working copy)
@@ -1,5 +1,5 @@
 /*
- *  TP-LINK TL-WR841N/ND v8 board support
+ *  TP-LINK TL-WR841N/ND v8/TL-MR3420 v2 board support
  *
  *  Copyright (C) 2012 Gabor Juhos juh...@openwrt.org
  *
@@ -8,6 +8,7 @@
  *  by the Free Software Foundation.
  */
 
+#include linux/gpio.h
 #include linux/platform_device.h
 
 #include asm/mach-ath79/ath79.h
@@ -18,6 +19,7 @@
 #include dev-gpio-buttons.h
 #include dev-leds-gpio.h
 #include dev-m25p80.h
+#include dev-usb.h
 #include dev-wmac.h
 #include machtypes.h
 
@@ -31,7 +33,10 @@
 #define TL_WR841NV8_GPIO_LED_SYSTEM	14
 
 #define TL_WR841NV8_GPIO_BTN_RESET	17
-#define TL_WR841NV8_GPIO_SW_RFKILL	16
+#define TL_WR841NV8_GPIO_BTN_WPS	16
+
+#define TL_MR3420V2_GPIO_LED_3G	11
+#define TL_MR3420V2_GPIO_USB_POWER	4
 
 #define TL_WR841NV8_KEYS_POLL_INTERVAL	20	/* msecs */
 #define TL_WR841NV8_KEYS_DEBOUNCE_INTERVAL (3 * TL_WR841NV8_KEYS_POLL_INTERVAL)
@@ -78,44 +83,44 @@
 		.name		= tp-link:green:wlan,
 		.gpio		= TL_WR841NV8_GPIO_LED_WLAN,
 		.active_low	= 1,
+	}, {
+		/* the 3G LED is only present on the MR3420 v2 */
+		.name		= tp-link:green:3g,
+		.gpio		= TL_MR3420V2_GPIO_LED_3G,
+		.active_low	= 1,
 	},
 };
 
 static struct gpio_keys_button tl_wr841n_v8_gpio_keys[] __initdata = {
 	{
-		.desc		= Reset button,
+		.desc		= reset,
 		.type		= EV_KEY,
 		.code		= KEY_RESTART,
 		.debounce_interval = TL_WR841NV8_KEYS_DEBOUNCE_INTERVAL,
 		.gpio		= TL_WR841NV8_GPIO_BTN_RESET,
 		.active_low	= 1,
 	}, {
-		.desc		= RFKILL switch,
-		.type		= EV_SW,
-		.code		= KEY_RFKILL,
+		/* the WPS button is only present on the MR3420 v2 */
+		.desc		= WPS,
+		.type		= EV_KEY,
+		.code		= KEY_WPS_BUTTON,
 		.debounce_interval = TL_WR841NV8_KEYS_DEBOUNCE_INTERVAL,
-		.gpio		= TL_WR841NV8_GPIO_SW_RFKILL,
+		.gpio		= TL_WR841NV8_GPIO_BTN_WPS,
 		.active_low	= 0,
 	}
 };
 
-static void __init tl_wr841n_v8_setup(void)
+static void __init tl_ap123_setup(void)
 {
 	u8 *mac = (u8 *) KSEG1ADDR(0x1f01fc00);
 	u8 *ee = (u8 *) KSEG1ADDR(0x1fff1000);
 
-	ath79_register_leds_gpio(-1, ARRAY_SIZE(tl_wr841n_v8_leds_gpio),
- tl_wr841n_v8_leds_gpio);
-
-	ath79_register_gpio_keys_polled(1, TL_WR841NV8_KEYS_POLL_INTERVAL,
-	ARRAY_SIZE(tl_wr841n_v8_gpio_keys),
-	tl_wr841n_v8_gpio_keys);
-
 	ath79_register_m25p80(tl_wr841n_v8_flash_data);
 
 	ath79_setup_ar934x_eth_cfg(AR934X_ETH_CFG_SW_PHY_SWAP);
 
 	ath79_register_mdio(1, 0x0);
+	ath79_register_mdio(0, 0x0);
 
 	ath79_init_mac(ath79_eth0_data.mac_addr, mac, -1);
 	ath79_init_mac(ath79_eth1_data.mac_addr, mac, 0);
@@ -135,5 +140,37 @@
 	ath79_register_wmac(ee, mac);
 }
 
-MIPS_MACHINE(ATH79_MACH_TL_WR841N_V8, TL-WR841N-v8, TP-LINK TL-WR841N/ND v8,
-	 tl_wr841n_v8_setup);
+static void __init tl_wr841n_v8_setup(void)
+{
+	tl_ap123_setup();
+
+	ath79_register_leds_gpio(-1, ARRAY_SIZE(tl_wr841n_v8_leds_gpio) - 1,
+tl_wr841n_v8_leds_gpio);
+	ath79_register_gpio_keys_polled(1, TL_WR841NV8_KEYS_POLL_INTERVAL,
+ARRAY_SIZE(tl_wr841n_v8_gpio_keys),
+tl_wr841n_v8_gpio_keys);
+}
+
+MIPS_MACHINE(ATH79_MACH_TL_WR841N_V8, TL-WR841N-v8, 
+	TP-LINK TL-WR841N/ND v8, tl_wr841n_v8_setup);
+
+static void __init tl_mr3420v2_setup(void)
+{
+	tl_ap123_setup();
+
+	/* enable power for the USB port */
+	gpio_request(TL_MR3420V2_GPIO_USB_POWER, USB power);
+	gpio_direction_input(TL_MR3420V2_GPIO_USB_POWER);
+
+	ath79_register_usb();
+	/* END for the USB port */
+
+	ath79_register_leds_gpio(-1, ARRAY_SIZE(tl_wr841n_v8_leds_gpio),
+tl_wr841n_v8_leds_gpio);
+	ath79_register_gpio_keys_polled(1, TL_WR841NV8_KEYS_POLL_INTERVAL,
+ARRAY_SIZE(tl_wr841n_v8_gpio_keys) - 1,
+tl_wr841n_v8_gpio_keys);
+}
+
+MIPS_MACHINE(ATH79_MACH_TL_MR3420_V2, TL-MR3420-v2,
+	TP-LINK TL-MR3420 v2, tl_mr3420v2_setup);
Index: target/linux/ar71xx/patches-3.7/610-MIPS-ath79-openwrt-machines.patch
===
--- target/linux/ar71xx/patches-3.7/610-MIPS-ath79-openwrt-machines.patch	(revision 35287)
+++ target/linux/ar71xx/patches-3.7/610-MIPS-ath79-openwrt-machines.patch	(working copy)
@@ -1,6 +1,6 @@
 --- a/arch/mips/ath79/machtypes.h
 +++ b/arch/mips/ath79/machtypes.h
-@@ -16,22 +16,112 @@
+@@ -16,22 +16,113 @@
  
  enum ath79_mach_type {
  	ATH79_MACH_GENERIC = 0,
@@ -67,6 +67,7 @@
 +	

[OpenWrt-Devel] Enabling software control LAN1-LAN4, WAN leds on TL-MR3220-v1, TL-MR3420-v1, TL-WR841N-v7

2013-02-23 Thread Dmytro
This patch was written by the example of similar platforms TP-LINK
Applying this patch, will unload the module leds_gpio, in order to use
additional GPIOs (13-17) for other purposes.

Ticket:
https://dev.openwrt.org/ticket/12732
The formatted html version of diff:
https://dev.openwrt.org/attachment/ticket/12732/enable-lan0-lan4-led.patch

---
Index: target/linux/ar71xx/files/arch/mips/ath79/mach-tl-mr3x20.c
===
--- target/linux/ar71xx/files/arch/mips/ath79/mach-tl-mr3x20.c	(revision 34914)
+++ target/linux/ar71xx/files/arch/mips/ath79/mach-tl-mr3x20.c	(working copy)
@@ -11,7 +11,9 @@
 #include linux/gpio.h
 
 #include asm/mach-ath79/ath79.h
+#include asm/mach-ath79/ar71xx_regs.h
 
+#include common.h
 #include dev-eth.h
 #include dev-ap9x-pci.h
 #include dev-gpio-buttons.h
@@ -23,6 +25,11 @@
 #define TL_MR3X20_GPIO_LED_QSS		0
 #define TL_MR3X20_GPIO_LED_SYSTEM	1
 #define TL_MR3X20_GPIO_LED_3G		8
+#define TL_MR3X20_GPIO_LED_LAN1		13
+#define TL_MR3X20_GPIO_LED_LAN2		14
+#define TL_MR3X20_GPIO_LED_LAN3		15
+#define TL_MR3X20_GPIO_LED_LAN4		16
+#define TL_MR3X20_GPIO_LED_WAN		17
 
 #define TL_MR3X20_GPIO_BTN_RESET	11
 #define TL_MR3X20_GPIO_BTN_QSS		12
@@ -51,6 +58,26 @@
 		.gpio		= TL_MR3X20_GPIO_LED_QSS,
 		.active_low	= 1,
 	}, {
+		.name		= tp-link:green:lan1,
+		.gpio		= TL_MR3X20_GPIO_LED_LAN1,
+		.active_low	= 1,
+	}, {
+		.name		= tp-link:green:lan2,
+		.gpio		= TL_MR3X20_GPIO_LED_LAN2,
+		.active_low	= 1,
+	}, {
+		.name		= tp-link:green:lan3,
+		.gpio		= TL_MR3X20_GPIO_LED_LAN3,
+		.active_low	= 1,
+	}, {
+		.name		= tp-link:green:lan4,
+		.gpio		= TL_MR3X20_GPIO_LED_LAN4,
+		.active_low	= 1,
+	}, {
+		.name		= tp-link:green:wan,
+		.gpio		= TL_MR3X20_GPIO_LED_WAN,
+		.active_low	= 1,
+	}, {
 		.name		= tp-link:green:3g,
 		.gpio		= TL_MR3X20_GPIO_LED_3G,
 		.active_low	= 1,
@@ -97,6 +124,12 @@
 	ath79_register_eth(0);
 
 	ap91_pci_init(ee, mac);
+
+	ath79_gpio_function_disable(AR724X_GPIO_FUNC_ETH_SWITCH_LED0_EN |
+AR724X_GPIO_FUNC_ETH_SWITCH_LED1_EN |
+AR724X_GPIO_FUNC_ETH_SWITCH_LED2_EN |
+AR724X_GPIO_FUNC_ETH_SWITCH_LED3_EN |
+AR724X_GPIO_FUNC_ETH_SWITCH_LED4_EN);
 }
 
 static void __init tl_mr3x20_usb_setup(void)
Index: target/linux/ar71xx/base-files/etc/uci-defaults/leds
===
--- target/linux/ar71xx/base-files/etc/uci-defaults/leds	(revision 34914)
+++ target/linux/ar71xx/base-files/etc/uci-defaults/leds	(working copy)
@@ -115,6 +115,11 @@
 
 tl-mr3220 | \
 tl-mr3420 )
+	ucidef_set_led_netdev wan WAN tp-link:green:wan eth1
+	ucidef_set_led_switch lan1 LAN1 tp-link:green:lan1 switch0 0x02
+	ucidef_set_led_switch lan2 LAN2 tp-link:green:lan2 switch0 0x04
+	ucidef_set_led_switch lan3 LAN3 tp-link:green:lan3 switch0 0x08
+	ucidef_set_led_switch lan4 LAN4 tp-link:green:lan4 switch0 0x10
 	ucidef_set_led_usbdev usb USB tp-link:green:3g 1-1
 	;;
 
@@ -142,6 +147,7 @@
 	ucidef_set_led_wlan wlan2g WLAN2G tp-link:blue:wlan2g phy0tpt
 	;;
 
+tl-wr841n-v7 | \
 tl-wr741nd)
 	ucidef_set_led_netdev wan WAN tp-link:green:wan eth1
 	ucidef_set_led_switch lan1 LAN1 tp-link:green:lan1 switch0 0x02
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCHv2][orion] Add support for 3.7

2013-02-23 Thread Maarten Bezemer
Hello,

It seems that Imre Kaloz (the target maintainer) is not available?
Is it possible that the patch gets reviewed/committed by someone else?

Regards,
  Maarten

On Friday 01 February 2013 22:26:40 Maarten Bezemer wrote:
 orion: Add support for 3.7
 
 Signed-off-by: Maarten Bezemer maarten.beze...@gmail.com

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


[OpenWrt-Devel] About IGMP snooping support

2013-02-23 Thread hayate
My router hardware has a AR8327 switch which is supposed to support
hardware IGMP snooping, but it seems it doesn't work on my OpenWrt of trunk.

I noted that in target/linux/generic/files/drivers/net/phy/ar8216.h there
is a AR8327_FWD_CTRL1_IGMP defined but not used anywhere.

And there is a config option CONFIG_BRIDGE_IGMP_SNOOPING in kernel config.

Does these two affect this feature? How can I enable IGMP snooping in
OpenWrt on my router

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