Re: [OpenWrt-Devel] om2p-hs: System lockup with 'ath: phy0: PLL4 meaurement not done' error

2013-03-12 Thread Petr Štetiar
Gabor Juhos juh...@openwrt.org [2013-03-11 21:06:09]:

 BTW, I have fixed the OM2P-HS setup code to use the correct bitmast a few
 minutes ago:
 
 https://dev.openwrt.org/changeset/35965
 https://dev.openwrt.org/changeset/35966

Thanks!

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


Re: [OpenWrt-Devel] OpenVPN in Backfire not start

2013-03-12 Thread Bastian Bittorf
* Nguyễn Hồng Quân quanngu...@mbm.vn [12.03.2013 08:47]:
 option 'management' '127.0.0.1 31194'   

maybe '127.0.0.1:31194' ?

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


Re: [OpenWrt-Devel] OpenVPN in Backfire not start

2013-03-12 Thread Nguyễn Hồng Quân
Thank you all,
I can start OpenVPN server now.
Changing to  '127.0.0.1:31194' doesn't work, but removing the line does.

On Tue 12 Mar 2013 02:56:33 PM ICT, Bastian Bittorf wrote:
 * Nguyễn Hồng Quân quanngu...@mbm.vn [12.03.2013 08:47]:
 option 'management' '127.0.0.1 31194'

 maybe '127.0.0.1:31194' ?

 bye, bastian
--
Regards,
Quân

Y!IM: ng_hquan_vn
GTalk: ng.hong.quan
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH] kmod-switch : Fix led control register - adjust IMP port status

2013-03-12 Thread Tijs Van Buggenhout
On Wednesday 27 February 2013 14:49:58 Tijs Van Buggenhout wrote:
 On Monday 25 February 2013 21:30:07 Tijs Van Buggenhout wrote:
  On Monday 25 February 2013 21:07:09 Hauke Mehrtens wrote:
   On 02/25/2013 03:08 PM, Tijs Van Buggenhout wrote:
On Monday 25 February 2013 14:06:13 Jonas Gorski wrote:
On 21 February 2013 15:53, Hauke Mehrtens ha...@hauke-m.de wrote:
On 02/21/2013 02:57 PM, Tijs Van Buggenhout wrote:
From linksys firmware :

# et -i eth0 robord 0x0 0x0e
0x008b
# et -i eth0 robord 0x0 0x12
0x020b

root@OpenWrt:/# robocfg robord 0x0e
Page 0x00, Reg 0x0e: 00bb
root@OpenWrt:/# robocfg robord 0x12
Page 0x00, Reg 0x12: 0321

1. Fix led control register:

On normal ports only one led was used for both link and activity
(green),
internet port additionally had orange led on all the time.

I compared the value of registry 0x12 on linksys firmware vs
openwrt,
and
it showed a different value (0x20b for linksys vs 0x321 on
openwrt).

Now the green led is always used to signal link, the orange led
(only)
blinks on link activity.

2. Adjust IMP port status

As I was comparing register values/bcmrobo.c source code, I noticed
a
difference for the IMP port status register (0x0e), linksys
firmware
showed
0x8b vs 0xbb for openwrt.

From bcmrobo.c - int bcm_robo_enable_switch:
if ((robo-devid == DEVID53115) || (robo-devid ==
DEVID53125))
{

/* Over ride IMP port status to make it link by
default
*/
val8 = 0;
robo-ops-read_reg(robo, PAGE_CTRL,
REG_CTRL_MIIPO,
val8,

sizeof(val8));

val8 |= 0x81;   /* Make Link pass and override it.
*/
robo-ops-write_reg(robo, PAGE_CTRL,
REG_CTRL_MIIPO,
val8,

sizeof(val8));

}

Hauke, did you use '0xb1' intentionally instead of '0x81'? Or do we
want
this to be the same?

I used the Asus ac66u source code as a reference as this contains
the
most recent source code I know of. There val8 |= 0xb1; is used.

Bits 5 and 6 enable rx/tx flow control - not sure if this is
potentially harmfull or not.

Does chaining this to 0x81 changes the behavior of your device?

Signed-off-by: Tijs Van Buggenhout t...@able.be

diff --git a/package/switch/src/switch-robo.c
b/package/switch/src/switch-
robo.c
index f715972..ac4855a 100644
--- a/package/switch/src/switch-robo.c
+++ b/package/switch/src/switch-robo.c
@@ -252,8 +252,13 @@ static int robo_switch_enable(void)

if (robo.devid == ROBO_DEVICE_ID_53125) {

/* Make IM port status link by default */

-   val = robo_read16(ROBO_CTRL_PAGE,
ROBO_PORT_OVERRIDE_CTRL) | 0xb1;
+   val = robo_read16(ROBO_CTRL_PAGE,
ROBO_PORT_OVERRIDE_CTRL) | 0x81;

robo_write16(ROBO_CTRL_PAGE,
ROBO_PORT_OVERRIDE_CTRL,
val);

+
+   /* Write LED control register */
+   val = 0x020b;
+   robo_write16(ROBO_CTRL_PAGE, 0x12, val);
+

With this change my Asus n66u does not blink on activity any more.

Maybe there is some nvram value for it? the led configuration is
likely device specific, not chip specific.


Jonas

'et_swleds' nvram variable seems to be intended for this purpose, but
doesn't (seem to) exist by default for the e3200.. is it for the asus?
   
   No, et_swleds is not set on any of my devices.
   This code change is probably the device specific configuration.
   
   I found the following code in the switch driver and it is missing in
   kmod-switch. You could try to implement that, si_pmu_chipcontrol() is
   the same as bcma_chipco_chipctl_maskset() expect that you have to
   inverse the mask parameter.
   
   /* Enable switch leds */
   if (sih-chip == BCM5356_CHIP_ID) {
   
 si_pmu_chipcontrol(sih, 2, (1  25), (1  25));
 /* also enable fast MII clocks */
 si_pmu_chipcontrol(sih, 0, (1  1), (1  1));
   
   } else if ((sih-chip == BCM5357_CHIP_ID) || (sih-chip ==
   BCM53572_CHIP_ID)) {
   
 uint32 led_gpios = 0;
 const char *var;
 
 if (((sih-chip == BCM5357_CHIP_ID)  (sih-chippkg !=
   
   BCM47186_PKG_ID)) ||
   
 ((sih-chip == BCM53572_CHIP_ID)  (sih-chippkg !=
 BCM47188_PKG_ID)))
   
   led_gpios = 0x1f;
   
 var = getvar(vars, et_swleds);
 if (var)
 
 led_gpios = bcm_strtoul(var, NULL, 0);
 
 if (led_gpios)
 
 si_pmu_chipcontrol(sih, 2, 

[OpenWrt-Devel] UCI and script action

2013-03-12 Thread Pietro Paolini
Hello all,

I am studying the OpenWRT configuration manager (UCI) and I am wondering if 
there is a way in order to accomplish the reload automatically, because if I 
understand correctly:

root@OpenWrt:~# uci add firewall rule
root@OpenWrt:~# uci set firewall.@rule[-1].src=wan
root@OpenWrt:~# uci set firewall.@rule[-1].target=ACCEPT
root@OpenWrt:~# uci set firewall.@rule[-1].proto=tcp
root@OpenWrt:~# uci set firewall.@rule[-1].dest_port=22
root@OpenWrt:~# uci commit firewall

Then to make effective the new settings I need to run :

root@OpenWrt:~# /etc/init.d/firewall restart

There is a way to do that automatically ??!

Thanks,

Pietro.

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


Re: [OpenWrt-Devel] UCI and script action

2013-03-12 Thread Jo-Philipp Wich

There is a way to do that automatically ??!


Not at the moment.

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


[OpenWrt-Devel] Trac: SPAM and no captch-shown?

2013-03-12 Thread Bastian Bittorf
often i see the message:
Trac wertet Ihre Übertragung als Spam. Um das Gegenteil zu beweisen,
geben Sie bitte Antwort auf folgendes.

but, there is nothing i can enter to proove, that i'am not a bot.

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


[OpenWrt-Devel] [PATCH] ar71xx: add TL-LINK TL-MR11U v2

2013-03-12 Thread Guilhem Lettron
Signed-off-by: Guilhem Lettron guil...@lettron.fr
---

Index: target/linux/ar71xx/image/Makefile
===
--- target/linux/ar71xx/image/Makefile (revision 35977)
+++ target/linux/ar71xx/image/Makefile (working copy)
@@ -923,6 +923,7 @@
 $(eval $(call 
SingleProfile,TPLINK,$(fs_64kraw),TLWR1043,tl-wr1043nd-v1,TL-WR1043ND,ttyS0,115200,0x10430001,1,8M))

 $(eval $(call 
SingleProfile,TPLINK-LZMA,$(fs_64kraw),TLMR11U,tl-mr11u-v1,TL-MR11U,ttyATH0,115200,0x00110101,1,4Mlzma))
+$(eval $(call 
SingleProfile,TPLINK-LZMA,$(fs_64kraw),TLMR11U,tl-mr11u-v2,TL-MR11U,ttyATH0,115200,0x00110102,1,4Mlzma))
 $(eval $(call 
SingleProfile,TPLINK-LZMA,$(fs_64kraw),TLMR3020,tl-mr3020-v1,TL-MR3020,ttyATH0,115200,0x3021,1,4Mlzma))
 $(eval $(call 
SingleProfile,TPLINK-LZMA,$(fs_64kraw),TLMR3040,tl-mr3040-v1,TL-MR3040,ttyATH0,115200,0x3041,1,4Mlzma))
 $(eval $(call 
SingleProfile,TPLINK-LZMA,$(fs_64kraw),TLMR3220V2,tl-mr3220-v2,TL-MR3220-v2,ttyATH0,115200,0x3222,1,4Mlzma))
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH] Cygwin fixes patch

2013-03-12 Thread Waldemar Brodkorb
Hi,

is is just a proof of concept patch other Cygwin users might
need to get a little bit further in the process of using OpenWrt 
on Windows. I'll send it as reference and for comments.

The tar pipe Bug in Cygwin is really annoying. The pipe fails 
differently each time I configure gcc. Better suggestions are
welcome.

Any Cygwin users there?

Signed-off-by: Waldemar Brodkorb m...@waldemar-brodkorb.de

Index: include/prereq-build.mk
===
--- include/prereq-build.mk (Revision 35158)
+++ include/prereq-build.mk (Arbeitskopie)
@@ -94,7 +94,7 @@
 
 define Require/ncurses
echo 'int main(int argc, char **argv) { initscr(); return 0; }' | \
-   gcc -include ncurses.h -x c -o $(TMP_DIR)/a.out - -lncurses
+   gcc -include ncurses.h -x c -o $(TMP_DIR)/a.out - -lncurses 
-I/usr/include/ncurses
 endef
 
 $(eval $(call Require,ncurses, \
Index: scripts/patch-specs.sh
===
--- scripts/patch-specs.sh  (Revision 35158)
+++ scripts/patch-specs.sh  (Arbeitskopie)
@@ -11,7 +11,7 @@
 
 echo -n Locating cpp ... 
 for bin in bin usr/bin usr/local/bin; do
-   for cmd in $DIR/$bin/*-cpp; do
+   for cmd in $DIR/$bin/*-cpp*; do
if [ -x $cmd ]; then
echo $cmd
CPP=$cmd
Index: toolchain/gcc/patches/4.6-linaro/110-cygwin-broken-tar.patch
===
--- toolchain/gcc/patches/4.6-linaro/110-cygwin-broken-tar.patch
(Revision 0)
+++ toolchain/gcc/patches/4.6-linaro/110-cygwin-broken-tar.patch
(Arbeitskopie)
@@ -0,0 +1,14 @@
+diff -Nur gcc-linaro-4.6-2012.12.orig/configure 
gcc-linaro-4.6-2012.12/configure
+--- gcc-linaro-4.6-2012.12.orig/configure  2012-12-12 18:05:23.0 
+0100
 gcc-linaro-4.6-2012.12/configure   2013-03-11 17:03:09.325599100 +0100
+@@ -6851,7 +6851,9 @@
+ 
+ # Copy the directory, assuming we have tar.
+ # FIXME: Should we use B in the second tar?  Not all systems support it.
+-(cd $1; tar -cf - .) | (cd $2; tar -xpf -)
++# Cygwin fails here silently
++# (cd $1; tar -cf - .) | (cd $2; tar -xpf -)
++cp -Rp $1 $2
+ 
+ # It is the responsibility of the user to correctly adjust all
+ # symlinks.  If somebody can figure out how to handle them correctly
Index: tools/e2fsprogs/Makefile
===
--- tools/e2fsprogs/Makefile(Revision 35158)
+++ tools/e2fsprogs/Makefile(Arbeitskopie)
@@ -8,8 +8,8 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=e2fsprogs
-PKG_VERSION:=1.42.4
-PKG_MD5SUM:=b6e296f210d642361b7394437ff0f318
+PKG_VERSION:=1.42.7
+PKG_MD5SUM:=a1ec22ef003688dae9f76c74881b22b9
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
Index: tools/e2fsprogs/patches/003-cygwin-fixes.patch
===
--- tools/e2fsprogs/patches/003-cygwin-fixes.patch  (Revision 0)
+++ tools/e2fsprogs/patches/003-cygwin-fixes.patch  (Arbeitskopie)
@@ -0,0 +1,26 @@
+diff -Nur e2fsprogs-1.42.7.orig/lib/ext2fs/getsize.c 
e2fsprogs-1.42.7/lib/ext2fs/getsize.c
+--- e2fsprogs-1.42.7.orig/lib/ext2fs/getsize.c 2012-11-30 03:40:18.0 
+0100
 e2fsprogs-1.42.7/lib/ext2fs/getsize.c  2013-03-06 10:26:57.902747800 
+0100
+@@ -70,8 +70,8 @@
+ #define HAVE_GET_FILE_SIZE_EX 1
+ #endif
+ 
+-errcode_t ext2fs_get_device_size(const char *file, int blocksize,
+-   blk_t *retblocks)
++errcode_t ext2fs_get_device_size2(const char *file, int blocksize,
++   blk64_t *retblocks)
+ {
+   HANDLE dev;
+   PARTITION_INFORMATION pi;
+diff -Nur e2fsprogs-1.42.7.orig/misc/Makefile.in 
e2fsprogs-1.42.7/misc/Makefile.in
+--- e2fsprogs-1.42.7.orig/misc/Makefile.in 2013-01-16 20:16:50.0 
+0100
 e2fsprogs-1.42.7/misc/Makefile.in  2013-03-06 10:27:36.824622800 +0100
+@@ -429,7 +429,7 @@
+   $(DESTDIR)$(root_sbindir) $(DESTDIR)$(bindir) \
+   $(DESTDIR)$(man1dir) $(DESTDIR)$(man8dir) \
+   $(DESTDIR)$(man1dir) $(DESTDIR)$(man5dir) \
+-  $(DESTDIR)$(libdir) $(DESTDIR)/$(root_sysconfdir)
++  $(DESTDIR)$(libdir) $(DESTDIR)$(root_sysconfdir)
+ 
+ install: all $(SMANPAGES) $(UMANPAGES) installdirs
+   $(Q) for i in $(SPROGS); do \
Index: tools/include/getline.h
===
--- tools/include/getline.h (Revision 35158)
+++ tools/include/getline.h (Arbeitskopie)
@@ -32,7 +32,7 @@
 #include stdlib.h
 #include string.h
 
-#if !defined(__linux__)  !(defined(__APPLE__)  __DARWIN_C_LEVEL = 200809L)
+#if !defined(__linux__)  !defined(__CYGWIN__)  !(defined(__APPLE__)  
__DARWIN_C_LEVEL = 200809L)
 /*
  * Emulate glibc getline() via BSD fgetln().
  * Note that outsize is not changed 

[OpenWrt-Devel] [PATCH] [lantiq] fix USB-enable GPIO and use default PCI configuration for now

2013-03-12 Thread Daniel Golle
EEPROM is an actial serial EEPROM on the WiFi module, therefore we can remove
ralink_eep from the dts.
USB power-enable GPIO turned out to be GPIO #3 (found via probing/brute-force).
PCI works with default settings as long as the vendor bootloader is used.

Signed-off-by: Daniel Golle dgo...@allnet.de

diff --git a/target/linux/lantiq/image/ACMP252.dts 
b/target/linux/lantiq/image/ACMP252.dts
index 174ae2e..31cb9de 100644
--- a/target/linux/lantiq/image/ACMP252.dts
+++ b/target/linux/lantiq/image/ACMP252.dts
@@ -82,7 +82,7 @@
 
ifxhcd@E101000 {
status = okay;
-   gpios = gpio 28 0;
+   gpios = gpio 3 0;
};
 
etop@E18 {
@@ -91,13 +91,6 @@
 
pci@E105400 {
status = okay;
-   interrupt-map = 0x7000 0 0 1 icu0 135 1;
-   req-mask = 0x1;
};
};
-
-   ralink_eep {
-   compatible = ralink,eeprom;
-   ralink,eeprom = RT2860.eeprom;
-   };
 };
-- 
1.8.1.4

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


Re: [OpenWrt-Devel] firewall3: source address used for NAT reflection

2013-03-12 Thread Mark Mentovai
reflection_src_dip? That matches src_dip as used for SNAT rules, but makes
it clear that it’s for reflection. (src_dip has a matching function instead
of a rewriting function for DNAT rules.)

I’ve got a strong preference to allow an interface name argument (“lan”)
instead of requiring an IP address, which would make it another place to
have to write the same LAN IP address configured elsewhere.
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [packages] olsrd: init: patchset for download

2013-03-12 Thread Saverio Proto
Hello Bastian,

I successfully imported the patches in my tree.
Give me a little time for testing.

ciao,

Saverio


2013/3/11 Bastian Bittorf bitt...@bluebottle.com:
 these inline patches are also here for download them:
 https://github.com/bittorf/kalua/blob/master/openwrt-patches/0001-packages-olsrd-init-for-better-reuse-make-a-function.patch
 https://github.com/bittorf/kalua/blob/master/openwrt-patches/0002-packages-olsrd-init-parse-new-var-speed-which-transl.patch
 https://github.com/bittorf/kalua/blob/master/openwrt-patches/0003-packages-olsrd-init-reduce-code-duplication-by-reusi.patch

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


Re: [OpenWrt-Devel] firewall3: source address used for NAT reflection

2013-03-12 Thread Jo-Philipp Wich
What about turning the reflection parameter from a bool into a string 
value which is either src or dest.


If set to src it would reflect to the ip of the network referenced by 
option src (i.e. the external/wan one) and if set to dest it would 
use the ip of the network referenced by option dest (i.e. the 
internal/lan one).


Additionally the bool values (on/1/yes) are still allowed and treated as 
dest to retain the old behaviour.


Would this work for you?

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


Re: [OpenWrt-Devel] firewall3: source address used for NAT reflection

2013-03-12 Thread Mark Mentovai
This would work just fine for me, although configuration’s meaning wouldn’t
be nearly as evident without consulting some reference documentation.
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH] ar71xx/ag71xx: Make the hardware link state drop when the interface is down

2013-03-12 Thread Mark Mentovai
This is based on juhosg's patch to fully suspend an ag71xx device on phy_stop
and resume it on phy_start [1], along with my addition to set the initial state
to suspended, corresponding to the initial down state of the interface [2].
This makes the hardware link state on an ag71xx device track the up/down state
of its interface.

[1] https://lists.openwrt.org/pipermail/openwrt-devel/2012-August/016540.html
[2] https://lists.openwrt.org/pipermail/openwrt-devel/2012-October/016996.html

Signed-off-by: Mark Mentovai m...@moxienet.com

---

Index: 
target/linux/ar71xx/patches-3.8/910-phy-add-phy_suspend-resume-helpers.patch
===
--- 
target/linux/ar71xx/patches-3.8/910-phy-add-phy_suspend-resume-helpers.patch
(revision 0)
+++ 
target/linux/ar71xx/patches-3.8/910-phy-add-phy_suspend-resume-helpers.patch
(working copy)
@@ -0,0 +1,21 @@
+--- a/include/linux/phy.h
 b/include/linux/phy.h
+@@ -510,6 +510,18 @@ static inline int phy_read_status(struct
+   return phydev-drv-read_status(phydev);
+ }
+ 
++static inline void phy_suspend(struct phy_device *phydev)
++{
++  if (phydev-drv-suspend)
++  phydev-drv-suspend(phydev);
++}
++
++static inline void phy_resume(struct phy_device *phydev)
++{
++  if (phydev-drv-resume)
++  phydev-drv-resume(phydev);
++}
++
+ int genphy_restart_aneg(struct phy_device *phydev);
+ int genphy_config_aneg(struct phy_device *phydev);
+ int genphy_update_link(struct phy_device *phydev);
Index: 
target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_phy.c
===
--- target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_phy.c  
(revision 35844)
+++ target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_phy.c  
(working copy)
@@ -47,6 +47,7 @@
struct ag71xx_platform_data *pdata = ag71xx_get_pdata(ag);
 
if (ag-phy_dev) {
+   phy_resume(ag-phy_dev);
phy_start(ag-phy_dev);
} else if (pdata-mii_bus_dev  pdata-switch_data) {
ag71xx_ar7240_start(ag);
@@ -61,10 +62,12 @@
struct ag71xx_platform_data *pdata = ag71xx_get_pdata(ag);
unsigned long flags;
 
-   if (ag-phy_dev)
+   if (ag-phy_dev) {
phy_stop(ag-phy_dev);
-   else if (pdata-mii_bus_dev  pdata-switch_data)
+   } else if (pdata-mii_bus_dev  pdata-switch_data) {
+   phy_suspend(ag-phy_dev);
ag71xx_ar7240_stop(ag);
+   }
 
spin_lock_irqsave(ag-lock, flags);
if (ag-link) {
@@ -218,10 +221,16 @@
if (pdata-switch_data)
return ag71xx_ar7240_init(ag);
 
+   int ret;
if (pdata-phy_mask)
-   return ag71xx_phy_connect_multi(ag);
+   ret = ag71xx_phy_connect_multi(ag);
+   else
+   ret = ag71xx_phy_connect_fixed(ag);
 
-   return ag71xx_phy_connect_fixed(ag);
+   if (ag-phy_dev)
+   phy_suspend(ag-phy_dev);
+
+   return ret;
 }
 
 void ag71xx_phy_disconnect(struct ag71xx *ag)
@@ -230,6 +239,8 @@
 
if (pdata-switch_data)
ag71xx_ar7240_cleanup(ag);
-   else if (ag-phy_dev)
+   else if (ag-phy_dev) {
phy_disconnect(ag-phy_dev);
+   phy_suspend(ag-phy_dev);
+   }
 }
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH] ar71xx: rw2458n - Use eeprom (art) from wifi card

2013-03-12 Thread Cezary Jackiewicz
Use eeprom (art) from included wifi card, not hard coded in flash.

Signed-off-by: Cezary Jackiewicz cezary.jackiew...@gmail.com
---

Index: target/linux/ar71xx/files/arch/mips/ath79/mach-rw2458n.c
===
--- target/linux/ar71xx/files/arch/mips/ath79/mach-rw2458n.c(wersja 35992)
+++ target/linux/ar71xx/files/arch/mips/ath79/mach-rw2458n.c(kopia robocza)
@@ -1,7 +1,7 @@
 /*
  *  Redwave RW2458N support
  *
- *  Copyright (C) 2011-2012 Cezary Jackiewicz cez...@eko.one.pl
+ *  Copyright (C) 2011-2013 Cezary Jackiewicz cez...@eko.one.pl
  *
  *  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
@@ -17,6 +17,7 @@
 #include dev-m25p80.h
 #include dev-usb.h
 #include machtypes.h
+#include pci.h
 
 #define RW2458N_GPIO_LED_D31
 #define RW2458N_GPIO_LED_D40
@@ -64,7 +65,6 @@
 {
u8 *mac1 = (u8 *) KSEG1ADDR(0x1fff);
u8 *mac2 = (u8 *) KSEG1ADDR(0x1fff + ETH_ALEN);
-   u8 *ee = (u8 *) KSEG1ADDR(0x1fff1000);
 
ath79_register_m25p80(NULL);
 
@@ -76,8 +76,6 @@
ath79_register_eth(0);
ath79_register_eth(1);
 
-   ap91_pci_init(ee, NULL);
-
ath79_register_leds_gpio(-1, ARRAY_SIZE(rw2458n_leds_gpio),
 rw2458n_leds_gpio);
 
@@ -85,6 +83,8 @@
ARRAY_SIZE(rw2458n_gpio_keys),
rw2458n_gpio_keys);
ath79_register_usb();
+
+   ath79_register_pci();
 }
 
 MIPS_MACHINE(ATH79_MACH_RW2458N, RW2458N, Redwave RW2458N,


-- 
Pozdrawiam,
 Cezary Jackiewicz
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] firewall3: source address used for NAT reflection

2013-03-12 Thread Sami Olmari

AFAIK NAT reflection in openwrt was originally meant to stay "inside" LAN, and then one could use for example Split-DNS in order to make a DNS name "just the same" for a client, no matter in or outside the LAN...Sami OlmariOn Sun, 10 Mar 2013 23:17:36 +0200, Mark Mentovai m...@moxienet.com wrote:Has the source address used for NAT reflection changed with firewall3?At r35938, I’m seeing that when I attempt to connect from a host on my LAN to a redirected port on my main router’s WAN address, the router reflects the request back in to my LAN using its own WAN address as the source address. I noticed this because some of my internal hosts don’t have a route to this WAN address and can’t respond to requests reflected in this way.
Previously, I was running r35844, which didn’t have this problem. It used the router’s LAN address as the source address for these reflected packets.Looking through “iptables -t nat -L” confirms that there’s been a change. Previously I’d see innat_reflection_out
SNATtcp -- 192.168.1.0/24192.168.1.2 tcp dpt:443 /* wan */ to:192.168.69.1and now I see inzone_lan_postrouting (w.x.y.z is my WAN IP address)
SNATtcp -- 192.168.1.0/24192.168.1.2 tcp dpt:443 to:w.x.y.zIs it possible to configure the source address used for these reflected packets? I’d prefer to use the LAN address for this because all of my hosts have a route to it by virtue of being connected to this network, and because the LAN address is much less likely to change than the WAN address.

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


Re: [OpenWrt-Devel] [packages] olsrd: init: patchset for download

2013-03-12 Thread Bastian Bittorf
* Saverio Proto ziopr...@gmail.com [12.03.2013 20:08]:
 I successfully imported the patches in my tree.
 Give me a little time for testing.

a simple test is to make such a configuration:

config olsrd
option MainIp   .
...

config Interface
list interface 'lan wan'
option Ip4Broadcast '255.255.255.255'
option Mode 'ether'
option speed 5

config Interface
list interface 'wifi'
option Ip4Broadcast '255.255.255.255'
option Mode 'mesh'
option speed 7

then restart olsrd and look into the generated
/var/etc/olsrd.conf - you must see, that all emission
interval elements (e.g. MidInterval) must have
different values for each interface section and
the best: they are explicitely set 8-) without
headache...

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


[OpenWrt-Devel] [PATCH 02/02][ar71xx] User-space changes for Enabling software control WAN, LAN1-4 LEDs on MR3220-v1/MR3420-v1/WR841N-v7

2013-03-12 Thread Dmytro
Index: target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
===
--- target/linux/ar71xx/base-files/etc/uci-defaults/01_leds (revision 35995)
+++ target/linux/ar71xx/base-files/etc/uci-defaults/01_leds (working copy)
@@ -114,6 +114,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
;;

@@ -151,6 +156,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] hostapd hang - cannot associate but existing connections ok

2013-03-12 Thread Justin Vallon

On 1/21/13 12:39 PM, Felix Fietkau wrote:

On 2013-01-21 6:22 PM, Justin Vallon wrote:

The symptom is that I cannot connect to my wireless network, but
existing connections are ok.  Once I try to reconnect from the client
(wifi off  wifi on), that device is then unable to connect.  In the
past, restarting hostapd has fixed the problem.

What OpenWrt version are you using?


Attitude adjustment (I believe beta2).

--
-Justin
justinval...@gmail.com

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


[OpenWrt-Devel] [PATCH] samba: don't start nmbd if 'disable netbios = yes'.

2013-03-12 Thread Catalin Patulea
nmbd is not needed when name resolution is handled externally eg. by DNS. 
'disable netbios' is supported by eg. Debian to disable nmbd in init scripts:
http://bazaar.launchpad.net/~ubuntu-branches/ubuntu/raring/samba/raring/view/head:/debian/samba.nmbd.upstart#L14

Signed-off-by: Catalin Patulea c...@vv.carleton.ca
---
 package/network/services/samba36/files/samba.init |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/package/network/services/samba36/files/samba.init 
b/package/network/services/samba36/files/samba.init
index 61398d8..2aefb3c 100755
--- a/package/network/services/samba36/files/samba.init
+++ b/package/network/services/samba36/files/samba.init
@@ -88,7 +88,7 @@ start() {
config_foreach smb_header samba
config_foreach smb_add_share sambashare
service_start /usr/sbin/smbd -D
-   service_start /usr/sbin/nmbd -D
+   egrep -q 'disable.+netbios.*=.*(true|yes|1)' /var/etc/smb.conf || 
service_start /usr/sbin/nmbd -D
 }
 
 stop() {
-- 
1.7.9.5

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