Re: [OpenWrt-Devel] [PATCH 1/3] net: dsa: Add DT bindings for Vitesse VSC73xx switches
Thu, Jun 14, 2018 at 02:35:32PM CEST, linus.wall...@linaro.org wrote: >This adds the device tree bindings for the Vitesse VSC73xx >switches. We also add the vendor name for Vitesse. > >Cc: devicet...@vger.kernel.org >Signed-off-by: Linus Walleij >--- > .../bindings/net/dsa/vitesse,vsc73xx.txt | 81 +++ > .../devicetree/bindings/vendor-prefixes.txt | 1 + > 2 files changed, 82 insertions(+) > create mode 100644 > Documentation/devicetree/bindings/net/dsa/vitesse,vsc73xx.txt > >diff --git a/Documentation/devicetree/bindings/net/dsa/vitesse,vsc73xx.txt >b/Documentation/devicetree/bindings/net/dsa/vitesse,vsc73xx.txt >new file mode 100644 >index ..474cdba5fa37 >--- /dev/null >+++ b/Documentation/devicetree/bindings/net/dsa/vitesse,vsc73xx.txt >@@ -0,0 +1,81 @@ >+Vitess VSC73xx Switches s/Vitess/Vitesse/ [...] ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [LEDE-DEV] Ubnt power beam board - back to defaults after reboot
Thu, Oct 20, 2016 at 09:48:48AM CEST, garet...@orcon.net.nz wrote: >Hi Jiri >This is a common problem on XM devices due to new uboot on AirOS >= 5.6.x, >although I haven't got any XW devices to test but its possibly the same? >Try downgrading back to AirOS v5.5.11 or less or apply the following patches >which I can confirm fix the problem on my XM devices. > >https://raw.githubusercontent.com/freifunk-gluon/gluon/1f400189cfbae697b5018 >0bccf876784a3c03423/patches/openwrt/0026-kernel-backport-spi-nor-driver-from >-4.4.9.patch >https://raw.githubusercontent.com/freifunk-gluon/gluon/1f400189cfbae697b5018 >0bccf876784a3c03423/patches/openwrt/0027-kernel-mtd-spi-nor-wait-until-statu >s-register-writes-are-ready.patch >https://raw.githubusercontent.com/freifunk-gluon/gluon/1f400189cfbae697b5018 >0bccf876784a3c03423/patches/openwrt/0028-kernel-mtd-spi-nor-unlock-Winbond-f >lashs.patch Ok, will try, thanks. But why these patches are not merged to openwrt master? Also, it be would be nice to mention this on the wiki. > >Cheers, > >Gareth > >-Original Message- >From: Lede-dev [mailto:lede-dev-boun...@lists.infradead.org] On Behalf Of >Jiri Pirko >Sent: Thursday, 20 October 2016 8:29 p.m. >To: openwrt-devel@lists.openwrt.org; lede-...@lists.infradead.org >Subject: [LEDE-DEV] Ubnt power beam board - back to defaults after reboot > >Hi. > >Trying Ubiquity power beam M5. According to the instructions on openwrt >wiki, I'm using loco m5 firmware. All looks fine, only configuration is lost >after every reboot. > >Tried: >openwrt-15.05.1-ar71xx-generic-ubnt-loco-m-xw-squashfs-sysupgrade.bin >openwrt-15.05-ar71xx-generic-ubnt-loco-m-xw-squashfs-sysupgrade.bin >openwrt-ar71xx-generic-ubnt-loco-m-xw-squashfs-sysupgrade.bin >lede-ar71xx-generic-ubnt-loco-m-xw-squashfs-sysupgrade.bin > >All with the same result. > >I remember I had some similar problem in past on a different board, and I >believe that there was and issue on definition of nand size. Not really >sure. > >Any ideas? > >Jiri > >___ >Lede-dev mailing list >lede-...@lists.infradead.org >http://lists.infradead.org/mailman/listinfo/lede-dev > ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] Ubnt power beam board - back to defaults after reboot
Hi. Trying Ubiquity power beam M5. According to the instructions on openwrt wiki, I'm using loco m5 firmware. All looks fine, only configuration is lost after every reboot. Tried: openwrt-15.05.1-ar71xx-generic-ubnt-loco-m-xw-squashfs-sysupgrade.bin openwrt-15.05-ar71xx-generic-ubnt-loco-m-xw-squashfs-sysupgrade.bin openwrt-ar71xx-generic-ubnt-loco-m-xw-squashfs-sysupgrade.bin lede-ar71xx-generic-ubnt-loco-m-xw-squashfs-sysupgrade.bin All with the same result. I remember I had some similar problem in past on a different board, and I believe that there was and issue on definition of nand size. Not really sure. Any ideas? Jiri ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] VXLAN support
Sun, Mar 06, 2016 at 08:42:53AM CET, st...@linux-ipv6.be wrote: >On 01-09-14 08:55, Jiri Pirko wrote: >> Mon, Sep 01, 2014 at 03:57:19AM CEST, ka...@stratosphere.co.jp wrote: >>> Hi, >>> >>> There's a vxlan kernel module in Linux source tree, >>> and `ip` command can create vxlan netdev. >>> Are you talking about netifd support for it? >> Yes, I am. See below... >Have you started working on this yet? If so, do you have any code to test? No :( No time. > >Thanks, >Stijn >___ >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] mac80211: Force Atheros drivers to respect the user's regdomain settings by default
Fri, Apr 03, 2015 at 06:56:15PM CEST, n...@openwrt.org wrote: On 2015-04-03 12:09, Jiri Pirko wrote: User's regdomain should know the correct setting. So change default for ath drivers to respect those. Signed-off-by: Jiri Pirko j...@resnulli.us As of r45252 this should no longer be necessary. Will try that. Thanks Felix for taking care of this! - Felix ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [patch] mac80211: Force Atheros drivers to respect the user's regdomain settings by default
User's regdomain should know the correct setting. So change default for ath drivers to respect those. Signed-off-by: Jiri Pirko j...@resnulli.us --- package/kernel/mac80211/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/package/kernel/mac80211/Makefile b/package/kernel/mac80211/Makefile index 11c8bcf..ab79330 100644 --- a/package/kernel/mac80211/Makefile +++ b/package/kernel/mac80211/Makefile @@ -503,6 +503,7 @@ define KernelPackage/ath/config if PACKAGE_kmod-ath config ATH_USER_REGD bool Force Atheros drivers to respect the user's regdomain settings + default y help Atheros' idea of regulatory handling is that the EEPROM of the card defines the regulatory limits and the user is only allowed to restrict the settings -- 1.9.3 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH] mac80211: Force Atheros drivers to respect the user's regdomain settings by default
User's regdomain should know the correct setting. So change default for ath drivers to respect those. Signed-off-by: Jiri Pirko j...@resnulli.us --- package/kernel/mac80211/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/package/kernel/mac80211/Makefile b/package/kernel/mac80211/Makefile index f3fe6c7..e145109 100644 --- a/package/kernel/mac80211/Makefile +++ b/package/kernel/mac80211/Makefile @@ -504,6 +504,7 @@ define KernelPackage/ath/config if PACKAGE_kmod-ath config ATH_USER_REGD bool Force Atheros drivers to respect the user's regdomain settings + default y help Atheros' idea of regulatory handling is that the EEPROM of the card defines the regulatory limits and the user is only allowed to restrict the settings -- 1.9.3 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] Announcement of mac80211 driver support for Marvell 88W8864 chip
Wed, Dec 24, 2014 at 05:04:29PM CET, d...@marvell.com wrote: Hi all, Marvell is pleased to announce this open source driver for the 88W8864 chip as a joint effort with Linksys. The 88W8864 features 4x4 MIMO 3-spatial Stream Dual-band 802.11ac enabling 1.3Gbps WLAN PHY rate and support for 80/40/20 MHz channel bandwidths. The 88W8864 is used in the Linksys WRT1900AC and other products. Please note that this is an initial release and we plan to send the driver upstream after cleanup. We do appreciate your feedback and look forward to serving the community with exciting new offerings in the future! Hi. I took a very quick peek at the sources you sent. First I would like to thank you for taking the upstream way with this. Much appreciated. I would suggest you to develop your driver inside net-next git: http://git.kernel.org/cgit/linux/kernel/git/davem/net-next.git/ That would save you time during potential forward port need. Also, if you use scripts/checkpatch.pl script to check your patches, it will reveal many problems to you. The obvious one is lines longer than 80 chars. It is always nice to include all needed headers in all .c files. For example when you use skb_queue_head_init please include linux/skbuff.h Spotted a comment typo in mwl_fwdl.c: This file implements frimware downloa related functions Drop comments like: /* PRIVATE FUNCTION DEFINITION */ Not needed. MODULE_ macros are usually placed by the end of file. Module parameters should be always avoided if possible. I suggest you make patch against net-next and send it on linux-wirel...@vger.kernel.org and net...@vger.kernel.org mailing lists. You will get much more reviewers there. Please do not hesitate to email me in case I can be of any more help. Thanks! Jiri Thanks, David ___ 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] [RFC] Fix VLAN on Atheros AR8327N
Tue, Sep 23, 2014 at 12:22:02PM CEST, n...@openwrt.org wrote: On 2014-09-17 20:25, Valentin Spreckels wrote: I'm interested in this feature. I tried to understand what the revoked patch changes and rewrote it. I submitted my changes two months ago: http://patchwork.openwrt.org/patch/5957/ http://patchwork.openwrt.org/patch/5958/ My patches attempt to minimize changes in non-ar8327-specific code. Neither the revert commit nor ticket #12181 describe the issues. So I'm not sure, if my patches have them too. Does anyone know details about the issues? Hi Valentin, I finally got around to properly reviewing your changes, and they look correct to me. I committed them in r42652, r42653 - let's see if any new issues show up. Just curious, are these 2 patches going to be backported to BB? How that can happen? Thanks. Thanks, - Felix ___ 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] [RFC] Fix VLAN on Atheros AR8327N
Wed, Sep 17, 2014 at 08:25:22PM CEST, valentin.spreck...@informatik.uni-oldenburg.de wrote: Hi, Am 17.09.2014 19:50, schrieb John Crispin: On 17/09/2014 19:47, Florian Fainelli wrote: On 08/31/2014 10:42 AM, Jiri Pirko wrote: Sat, Jul 19, 2014 at 09:49:38PM CEST, nolt...@gmail.com wrote: Commit 40842 reverted the fix for tagged+untagged VLANs on AR8327: https://dev.openwrt.org/changeset/40777 https://dev.openwrt.org/changeset/40842 According to jow, some people experienced some issues on older devices. Can anyone tell me what were those issues? Anyway, that patch modified some parts of the ar8216/ar8236, so I suppose any device with those switches were affected. However, I've modified the patch keeping the ar8216/ar8236 as much untouched as possible. Could anyone test it on those devices? BTW, this works for me on a TP-Link WDR4300 (ar8327). I tested the patch on TL-WR1043ND v2 with Atheros AR8327 rev. 4. Vlans are working as expected. Please include this into BB (might need repost) Thanks! Tested-by: Jiri Pirko j...@resnulli.us Unless there are further objections, we should probably just go ahead and apply this patch since it affects a bunch of users. and then the other bunch complains, as we had before. we keep applying and reversing this i think. maybe we should just see what the real bug is ? John I'm interested in this feature. I tried to understand what the revoked patch changes and rewrote it. I submitted my changes two months ago: http://patchwork.openwrt.org/patch/5957/ http://patchwork.openwrt.org/patch/5958/ I like this patches. Look very clean. Will test them on wr1043v2. Thanks. My patches attempt to minimize changes in non-ar8327-specific code. Neither the revert commit nor ticket #12181 describe the issues. So I'm not sure, if my patches have them too. Does anyone know details about the issues? - Valentin Spreckels Signed-off-by: Saverio Proto ziopr...@gmail.com Signed-off-by: Álvaro Fernández nolt...@gmail.com --- diff --git a/target/linux/generic/files/drivers/net/phy/ar8216.c b/target/linux/generic/files/drivers/net/phy/ar8216.c index 3846159..9eae624 100644 --- a/target/linux/generic/files/drivers/net/phy/ar8216.c +++ b/target/linux/generic/files/drivers/net/phy/ar8216.c @@ -78,7 +78,7 @@ struct ar8xxx_chip { u32 (*read_port_status)(struct ar8xxx_priv *priv, int port); int (*atu_flush)(struct ar8xxx_priv *priv); void (*vtu_flush)(struct ar8xxx_priv *priv); - void (*vtu_load_vlan)(struct ar8xxx_priv *priv, u32 vid, u32 port_mask); +void (*vtu_load_vlan)(struct ar8xxx_priv *priv, u32 vlan); const struct ar8xxx_mib_desc *mib_decs; unsigned num_mibs; @@ -112,7 +112,12 @@ struct ar8327_led { enum ar8327_led_pattern pattern; }; +struct ar8216_data { + u8 vlan_tagged; +}; + struct ar8327_data { + u8 vlan_tagged[AR8X16_MAX_VLANS]; u32 port0_status; u32 port6_status; @@ -138,6 +143,7 @@ struct ar8xxx_priv { u8 chip_rev; const struct ar8xxx_chip *chip; union { + struct ar8216_data ar8216; struct ar8327_data ar8327; } chip_data; bool initialized; @@ -159,7 +165,6 @@ struct ar8xxx_priv { bool vlan; u16 vlan_id[AR8X16_MAX_VLANS]; u8 vlan_table[AR8X16_MAX_VLANS]; - u8 vlan_tagged; u16 pvid[AR8X16_MAX_PORTS]; /* mirroring */ @@ -641,7 +646,7 @@ ar8216_mangle_rx(struct net_device *dev, struct sk_buff *skb) port = buf[0] 0xf; /* no need to fix up packets coming from a tagged source */ - if (priv-vlan_tagged (1 port)) +if (priv-chip_data.ar8216.vlan_tagged BIT(port)) return; /* lookup port vid from local table, the switch passes an invalid vlan id */ @@ -695,10 +700,13 @@ ar8216_vtu_flush(struct ar8xxx_priv *priv) } static void -ar8216_vtu_load_vlan(struct ar8xxx_priv *priv, u32 vid, u32 port_mask) +ar8216_vtu_load_vlan(struct ar8xxx_priv *priv, u32 vlan) { u32 op; + u32 vid = priv-vlan_id[vlan]; +u32 port_mask = priv-vlan_table[vlan]; + op = AR8216_VTU_OP_LOAD | (vid AR8216_VTU_VID_S); ar8216_vtu_op(priv, op, port_mask); } @@ -1705,12 +1713,16 @@ ar8327_vtu_flush(struct ar8xxx_priv *priv) } static void -ar8327_vtu_load_vlan(struct ar8xxx_priv *priv, u32 vid, u32 port_mask) +ar8327_vtu_load_vlan(struct ar8xxx_priv *priv, u32 vlan) { u32 op; u32 val; int i; + u32 vid = priv-vlan_id[vlan]; +u32 port_mask = priv-vlan_table[vlan]; + u32 tagged = priv-chip_data.ar8327.vlan_tagged[vlan]; + op = AR8327_VTU_FUNC1_OP_LOAD | (vid AR8327_VTU_FUNC1_VID_S); val = AR8327_VTU_FUNC0_VALID | AR8327_VTU_FUNC0_IVL; for (i = 0; i AR8327_NUM_PORTS; i++) { @@ -1720,7 +1732,7 @@ ar8327_vtu_load_vlan(struct ar8xxx_priv *priv, u32 vid, u32 port_mask) mode = AR8327_VTU_FUNC0_EG_MODE_NOT; else if (priv-vlan == 0) mode = AR8327_VTU_FUNC0_EG_MODE_KEEP; - else if (priv-vlan_tagged BIT(i)) + else if (tagged BIT(i)) mode = AR8327_VTU_FUNC0_EG_MODE_TAG; else mode = AR8327_VTU_FUNC0_EG_MODE_UNTAG; @@ -1734,26 +1746,22 @@ static void
[OpenWrt-Devel] [patch BB] Fix VLAN on Atheros AR8327N
From: Álvaro Fernández Rojas nolt...@gmail.com Commit 40842 reverted the fix for tagged+untagged VLANs on AR8327: https://dev.openwrt.org/changeset/40777 https://dev.openwrt.org/changeset/40842 According to jow, some people experienced some issues on older devices. Can anyone tell me what were those issues? Anyway, that patch modified some parts of the ar8216/ar8236, so I suppose any device with those switches were affected. However, I've modified the patch keeping the ar8216/ar8236 as much untouched as possible. Could anyone test it on those devices? BTW, this works for me on a TP-Link WDR4300 (ar8327). Jpirko: I tested this successfully on TP-Link WR1043NDv2. Signed-off-by: Saverio Proto ziopr...@gmail.com Signed-off-by: Álvaro Fernández Rojas nolt...@gmail.com Tested-by: Jiri Pirko j...@resnulli.us --- .../linux/generic/files/drivers/net/phy/ar8216.c | 155 +++-- 1 file changed, 111 insertions(+), 44 deletions(-) diff --git a/target/linux/generic/files/drivers/net/phy/ar8216.c b/target/linux/generic/files/drivers/net/phy/ar8216.c index 3846159..9eae624 100644 --- a/target/linux/generic/files/drivers/net/phy/ar8216.c +++ b/target/linux/generic/files/drivers/net/phy/ar8216.c @@ -78,7 +78,7 @@ struct ar8xxx_chip { u32 (*read_port_status)(struct ar8xxx_priv *priv, int port); int (*atu_flush)(struct ar8xxx_priv *priv); void (*vtu_flush)(struct ar8xxx_priv *priv); - void (*vtu_load_vlan)(struct ar8xxx_priv *priv, u32 vid, u32 port_mask); + void (*vtu_load_vlan)(struct ar8xxx_priv *priv, u32 vlan); const struct ar8xxx_mib_desc *mib_decs; unsigned num_mibs; @@ -112,7 +112,12 @@ struct ar8327_led { enum ar8327_led_pattern pattern; }; +struct ar8216_data { + u8 vlan_tagged; +}; + struct ar8327_data { + u8 vlan_tagged[AR8X16_MAX_VLANS]; u32 port0_status; u32 port6_status; @@ -138,6 +143,7 @@ struct ar8xxx_priv { u8 chip_rev; const struct ar8xxx_chip *chip; union { + struct ar8216_data ar8216; struct ar8327_data ar8327; } chip_data; bool initialized; @@ -159,7 +165,6 @@ struct ar8xxx_priv { bool vlan; u16 vlan_id[AR8X16_MAX_VLANS]; u8 vlan_table[AR8X16_MAX_VLANS]; - u8 vlan_tagged; u16 pvid[AR8X16_MAX_PORTS]; /* mirroring */ @@ -641,7 +646,7 @@ ar8216_mangle_rx(struct net_device *dev, struct sk_buff *skb) port = buf[0] 0xf; /* no need to fix up packets coming from a tagged source */ - if (priv-vlan_tagged (1 port)) + if (priv-chip_data.ar8216.vlan_tagged BIT(port)) return; /* lookup port vid from local table, the switch passes an invalid vlan id */ @@ -695,10 +700,13 @@ ar8216_vtu_flush(struct ar8xxx_priv *priv) } static void -ar8216_vtu_load_vlan(struct ar8xxx_priv *priv, u32 vid, u32 port_mask) +ar8216_vtu_load_vlan(struct ar8xxx_priv *priv, u32 vlan) { u32 op; + u32 vid = priv-vlan_id[vlan]; + u32 port_mask = priv-vlan_table[vlan]; + op = AR8216_VTU_OP_LOAD | (vid AR8216_VTU_VID_S); ar8216_vtu_op(priv, op, port_mask); } @@ -1705,12 +1713,16 @@ ar8327_vtu_flush(struct ar8xxx_priv *priv) } static void -ar8327_vtu_load_vlan(struct ar8xxx_priv *priv, u32 vid, u32 port_mask) +ar8327_vtu_load_vlan(struct ar8xxx_priv *priv, u32 vlan) { u32 op; u32 val; int i; + u32 vid = priv-vlan_id[vlan]; + u32 port_mask = priv-vlan_table[vlan]; + u32 tagged = priv-chip_data.ar8327.vlan_tagged[vlan]; + op = AR8327_VTU_FUNC1_OP_LOAD | (vid AR8327_VTU_FUNC1_VID_S); val = AR8327_VTU_FUNC0_VALID | AR8327_VTU_FUNC0_IVL; for (i = 0; i AR8327_NUM_PORTS; i++) { @@ -1720,7 +1732,7 @@ ar8327_vtu_load_vlan(struct ar8xxx_priv *priv, u32 vid, u32 port_mask) mode = AR8327_VTU_FUNC0_EG_MODE_NOT; else if (priv-vlan == 0) mode = AR8327_VTU_FUNC0_EG_MODE_KEEP; - else if (priv-vlan_tagged BIT(i)) + else if (tagged BIT(i)) mode = AR8327_VTU_FUNC0_EG_MODE_TAG; else mode = AR8327_VTU_FUNC0_EG_MODE_UNTAG; @@ -1734,26 +1746,22 @@ static void ar8327_setup_port(struct ar8xxx_priv *priv, int port, u32 egress, u32 ingress, u32 members, u32 pvid) { - u32 t; - u32 mode; + u32 mode, t; + + if (priv-vlan) { + pvid = priv-vlan_id[priv-pvid[port]]; + mode = AR8327_PORT_VLAN1_OUT_MODE_UNMOD; + ingress = AR8216_IN_SECURE; + } else { + pvid = port; + mode = AR8327_PORT_VLAN1_OUT_MODE_UNTOUCH; + ingress = AR8216_IN_PORT_ONLY; + } t = pvid AR8327_PORT_VLAN0_DEF_SVID_S; t |= pvid AR8327_PORT_VLAN0_DEF_CVID_S; priv-write(priv
Re: [OpenWrt-Devel] [RFC] Fix VLAN on Atheros AR8327N
Sat, Jul 19, 2014 at 09:49:38PM CEST, nolt...@gmail.com wrote: Commit 40842 reverted the fix for tagged+untagged VLANs on AR8327: https://dev.openwrt.org/changeset/40777 https://dev.openwrt.org/changeset/40842 According to jow, some people experienced some issues on older devices. Can anyone tell me what were those issues? Anyway, that patch modified some parts of the ar8216/ar8236, so I suppose any device with those switches were affected. However, I've modified the patch keeping the ar8216/ar8236 as much untouched as possible. Could anyone test it on those devices? BTW, this works for me on a TP-Link WDR4300 (ar8327). I tested the patch on TL-WR1043ND v2 with Atheros AR8327 rev. 4. Vlans are working as expected. Please include this into BB (might need repost) Thanks! Tested-by: Jiri Pirko j...@resnulli.us Signed-off-by: Saverio Proto ziopr...@gmail.com Signed-off-by: Álvaro Fernández nolt...@gmail.com --- diff --git a/target/linux/generic/files/drivers/net/phy/ar8216.c b/target/linux/generic/files/drivers/net/phy/ar8216.c index 3846159..9eae624 100644 --- a/target/linux/generic/files/drivers/net/phy/ar8216.c +++ b/target/linux/generic/files/drivers/net/phy/ar8216.c @@ -78,7 +78,7 @@ struct ar8xxx_chip { u32 (*read_port_status)(struct ar8xxx_priv *priv, int port); int (*atu_flush)(struct ar8xxx_priv *priv); void (*vtu_flush)(struct ar8xxx_priv *priv); - void (*vtu_load_vlan)(struct ar8xxx_priv *priv, u32 vid, u32 port_mask); + void (*vtu_load_vlan)(struct ar8xxx_priv *priv, u32 vlan); const struct ar8xxx_mib_desc *mib_decs; unsigned num_mibs; @@ -112,7 +112,12 @@ struct ar8327_led { enum ar8327_led_pattern pattern; }; +struct ar8216_data { + u8 vlan_tagged; +}; + struct ar8327_data { + u8 vlan_tagged[AR8X16_MAX_VLANS]; u32 port0_status; u32 port6_status; @@ -138,6 +143,7 @@ struct ar8xxx_priv { u8 chip_rev; const struct ar8xxx_chip *chip; union { + struct ar8216_data ar8216; struct ar8327_data ar8327; } chip_data; bool initialized; @@ -159,7 +165,6 @@ struct ar8xxx_priv { bool vlan; u16 vlan_id[AR8X16_MAX_VLANS]; u8 vlan_table[AR8X16_MAX_VLANS]; - u8 vlan_tagged; u16 pvid[AR8X16_MAX_PORTS]; /* mirroring */ @@ -641,7 +646,7 @@ ar8216_mangle_rx(struct net_device *dev, struct sk_buff *skb) port = buf[0] 0xf; /* no need to fix up packets coming from a tagged source */ - if (priv-vlan_tagged (1 port)) + if (priv-chip_data.ar8216.vlan_tagged BIT(port)) return; /* lookup port vid from local table, the switch passes an invalid vlan id */ @@ -695,10 +700,13 @@ ar8216_vtu_flush(struct ar8xxx_priv *priv) } static void -ar8216_vtu_load_vlan(struct ar8xxx_priv *priv, u32 vid, u32 port_mask) +ar8216_vtu_load_vlan(struct ar8xxx_priv *priv, u32 vlan) { u32 op; + u32 vid = priv-vlan_id[vlan]; + u32 port_mask = priv-vlan_table[vlan]; + op = AR8216_VTU_OP_LOAD | (vid AR8216_VTU_VID_S); ar8216_vtu_op(priv, op, port_mask); } @@ -1705,12 +1713,16 @@ ar8327_vtu_flush(struct ar8xxx_priv *priv) } static void -ar8327_vtu_load_vlan(struct ar8xxx_priv *priv, u32 vid, u32 port_mask) +ar8327_vtu_load_vlan(struct ar8xxx_priv *priv, u32 vlan) { u32 op; u32 val; int i; + u32 vid = priv-vlan_id[vlan]; + u32 port_mask = priv-vlan_table[vlan]; + u32 tagged = priv-chip_data.ar8327.vlan_tagged[vlan]; + op = AR8327_VTU_FUNC1_OP_LOAD | (vid AR8327_VTU_FUNC1_VID_S); val = AR8327_VTU_FUNC0_VALID | AR8327_VTU_FUNC0_IVL; for (i = 0; i AR8327_NUM_PORTS; i++) { @@ -1720,7 +1732,7 @@ ar8327_vtu_load_vlan(struct ar8xxx_priv *priv, u32 vid, u32 port_mask) mode = AR8327_VTU_FUNC0_EG_MODE_NOT; else if (priv-vlan == 0) mode = AR8327_VTU_FUNC0_EG_MODE_KEEP; - else if (priv-vlan_tagged BIT(i)) + else if (tagged BIT(i)) mode = AR8327_VTU_FUNC0_EG_MODE_TAG; else mode = AR8327_VTU_FUNC0_EG_MODE_UNTAG; @@ -1734,26 +1746,22 @@ static void ar8327_setup_port(struct ar8xxx_priv *priv, int port, u32 egress, u32 ingress, u32 members, u32 pvid) { - u32 t; - u32 mode; + u32 mode, t; + + if (priv-vlan) { + pvid = priv-vlan_id[priv-pvid[port]]; + mode = AR8327_PORT_VLAN1_OUT_MODE_UNMOD; + ingress = AR8216_IN_SECURE; + } else { + pvid = port; + mode = AR8327_PORT_VLAN1_OUT_MODE_UNTOUCH; + ingress = AR8216_IN_PORT_ONLY; + } t = pvid AR8327_PORT_VLAN0_DEF_SVID_S; t |= pvid AR8327_PORT_VLAN0_DEF_CVID_S; priv-write(priv, AR8327_REG_PORT_VLAN0(port), t); - mode = AR8327_PORT_VLAN1_OUT_MODE_UNMOD; - switch
[OpenWrt-Devel] VXLAN support
Hi all. I did not find any movement in support of VXLAN. Are there any plans to support it? Or is anyone working on that? I can try to add VXLAN support to netifd. Any comments, ideas, hints appreciated. Thanks. Jiri ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] Moving all feeds to OpenWrt GitHub organisation
Sun, Aug 10, 2014 at 09:08:08PM CEST, champetier.etie...@gmail.com wrote: 2014-08-10 20:14 GMT+03:00 Florian Fainelli flor...@openwrt.org: Hello, Le 10 août 2014 09:44, Etienne Champetier champetier.etie...@gmail.com a écrit : Le 10 août 2014 18:18, Stefan Monnier monn...@iro.umontreal.ca a écrit : It would be great to have all feeds in one place, on GitHub. I think making oneself dependent upon a commercial company without paying it (i.e. without leverage) would be a mistake. Stefan We use git, the day github closes, or asks for money, or ..., we move. We dont depend on github, we use it while it's there (and free). In the mean time it helps getting the job done Also paying is no leverage, a contract can be but there are always half million clauses, and in the worst case scenario they pay you one month back We already have an infrastructure deployed which is much wider than the services offered by github. Surely we had our own administrative issues with those machines but they have been sorted now and the process is much stronger. At this point, I don't think we would be getting any advantage of using a 3rd party service, but that's just me. Etienne You are talking about openwrt.org, that's down right now :) I'm only talking about the feeds here, the core should stay where it is, and nobody can offer you buildbot. My point is github is way more user friendly, and i think it's good to have more people involved on the feed part. The only must have feature of github is the pull request, but that really helps people contribute, and good luck to offer PR like on openwrt server. Well, I believe that there are many people that don't use the github PR and in fact, they hate to work with that. Me included. Unfortunatelly it cannot be disabled on github. I know it's cool but I prefer working with patches the old fashion way, by emails. About openwrt trac, you should: -disable anonymous posting (useless, counterproductive, ...) -grant more write access (packages maintainer, ...) -allow the author of an issue to close his issue Etienne ___ 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] TL-WA7210N v2 support
Hi. Anyone working on support for this device? I'm thinking about buying one and looking into it. So far, I found only that it suppose to be very similar to MR3020 (ar9331 cpu). Any info anyone? Thanks. Jiri ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] trunk: firstboot forever on tp-link tl-wr740n v4.21
Hi. I just made a squashfs trunk image for tl-wr740n v4.21. Whatever changes I make, they are done after reboot and all looks like it was firstboot again. Any idea what might be wrong? note that AA oficial build works correctly. Thanks. Jiri ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] trunk: firstboot forever on tp-link tl-wr740n v4.21
Sat, Jan 25, 2014 at 09:28:16PM CET, bitt...@bluebottle.com wrote: * Jiri Pirko j...@resnulli.us [25.01.2014 20:32]: Any idea what might be wrong? thanks to Gabor Juhos - since r39397 there is a mechanism for ar71xx, which actively prevents such situations during buildtime. Great! Thank you and Gabor. bye, bastian ___ 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 openwrt 0/4] Add support for TL-WA801ND v2 board
Hello. I'm not sure what needs to be done more to get the patchset applied. If anything needs to be changed, please tell me so and I will fix that. Thanks, Jiri Tue, Dec 03, 2013 at 03:33:37PM CET, j...@resnulli.us wrote: Jiri Pirko (4): ar71xx: add kernel support for the TL-WA801ND v2 board ar71xx: add user space support for the TL-WA801ND v2 ar71xx: add profile for the WA801ND v2 firmware-utils/mkplinkfw: add TL-WA801ND v2 support target/linux/ar71xx/base-files/etc/diag.sh | 1 + .../ar71xx/base-files/etc/uci-defaults/01_leds | 5 ++ .../ar71xx/base-files/etc/uci-defaults/02_network | 1 + target/linux/ar71xx/base-files/lib/ar71xx.sh | 3 ++ .../ar71xx/base-files/lib/upgrade/platform.sh | 1 + .../files/arch/mips/ath79/mach-tl-wr841n-v8.c | 54 ++ target/linux/ar71xx/image/Makefile | 3 +- .../612-MIPS-ath79-add-TL-WA801NDv2-suport.patch | 10 tools/firmware-utils/src/mktplinkfw.c | 6 +++ 9 files changed, 75 insertions(+), 9 deletions(-) create mode 100644 target/linux/ar71xx/patches-3.10/612-MIPS-ath79-add-TL-WA801NDv2-suport.patch -- 1.8.3.1 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [patch openwrt 1/4] ar71xx: add kernel support for the TL-WA801ND v2 board
Patch to add kernel support for the TP-LINK WA801ND v2 Signed-off-by: Jiri Pirko j...@resnulli.us --- .../files/arch/mips/ath79/mach-tl-wr841n-v8.c | 54 ++ .../612-MIPS-ath79-add-TL-WA801NDv2-suport.patch | 10 2 files changed, 56 insertions(+), 8 deletions(-) create mode 100644 target/linux/ar71xx/patches-3.10/612-MIPS-ath79-add-TL-WA801NDv2-suport.patch diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wr841n-v8.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wr841n-v8.c index 0099b15..3672741 100644 --- a/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wr841n-v8.c +++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wr841n-v8.c @@ -1,7 +1,8 @@ /* - * TP-LINK TL-WR841N/ND v8/TL-MR3420 v2 board support + * TP-LINK TL-WR841N/ND v8/TL-MR3420 v2/TL-WA801ND v2 board support * * Copyright (C) 2012 Gabor Juhos juh...@openwrt.org + * Copyright (C) 2013 Jiri Pirko j...@resnulli.us * * 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 @@ -91,6 +92,26 @@ static struct gpio_led tl_wr841n_v8_leds_gpio[] __initdata = { }, }; +static struct gpio_led tl_wa801nd_v2_leds_gpio[] __initdata = { + { + .name = tp-link:green:qss, + .gpio = TL_WR841NV8_GPIO_LED_QSS, + .active_low = 1, + }, { + .name = tp-link:green:system, + .gpio = TL_WR841NV8_GPIO_LED_SYSTEM, + .active_low = 1, + }, { + .name = tp-link:green:lan, + .gpio = TL_WR841NV8_GPIO_LED_WAN, /* LAN for wa801nd_v2 */ + .active_low = 1, + }, { + .name = tp-link:green:wlan, + .gpio = TL_WR841NV8_GPIO_LED_WLAN, + .active_low = 1, + }, +}; + static struct gpio_keys_button tl_wr841n_v8_gpio_keys[] __initdata = { { .desc = Reset button, @@ -127,7 +148,7 @@ static struct gpio_keys_button tl_mr3420v2_gpio_keys[] __initdata = { } }; -static void __init tl_ap123_setup(void) +static void __init tl_ap123_setup(bool setup_gmac1) { u8 *mac = (u8 *) KSEG1ADDR(0x1f01fc00); u8 *ee = (u8 *) KSEG1ADDR(0x1fff1000); @@ -158,16 +179,18 @@ static void __init tl_ap123_setup(void) ath79_eth0_data.mii_bus_dev = ath79_mdio1_device.dev; ath79_register_eth(0); - /* GMAC1 is connected to the internal switch */ - ath79_eth1_data.phy_if_mode = PHY_INTERFACE_MODE_GMII; - ath79_register_eth(1); + if (setup_gmac1) { + /* GMAC1 is connected to the internal switch */ + ath79_eth1_data.phy_if_mode = PHY_INTERFACE_MODE_GMII; + ath79_register_eth(1); + } ath79_register_wmac(ee, mac); } static void __init tl_wr841n_v8_setup(void) { - tl_ap123_setup(); + tl_ap123_setup(true); ath79_register_leds_gpio(-1, ARRAY_SIZE(tl_wr841n_v8_leds_gpio) - 1, tl_wr841n_v8_leds_gpio); @@ -183,7 +206,7 @@ MIPS_MACHINE(ATH79_MACH_TL_WR841N_V8, TL-WR841N-v8, TP-LINK TL-WR841N/ND v8, static void __init tl_wr842n_v2_setup(void) { - tl_ap123_setup(); + tl_ap123_setup(true); ath79_register_leds_gpio(-1, ARRAY_SIZE(tl_wr841n_v8_leds_gpio), tl_wr841n_v8_leds_gpio); @@ -204,7 +227,7 @@ MIPS_MACHINE(ATH79_MACH_TL_WR842N_V2, TL-WR842N-v2, TP-LINK TL-WR842N/ND v2, static void __init tl_mr3420v2_setup(void) { - tl_ap123_setup(); + tl_ap123_setup(true); ath79_register_leds_gpio(-1, ARRAY_SIZE(tl_wr841n_v8_leds_gpio), tl_wr841n_v8_leds_gpio); @@ -223,3 +246,18 @@ static void __init tl_mr3420v2_setup(void) MIPS_MACHINE(ATH79_MACH_TL_MR3420_V2, TL-MR3420-v2, TP-LINK TL-MR3420 v2, tl_mr3420v2_setup); + +static void __init tl_wa801nd_v2_setup(void) +{ + tl_ap123_setup(false); + + ath79_register_leds_gpio(-1, ARRAY_SIZE(tl_wa801nd_v2_leds_gpio), +tl_wa801nd_v2_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_WA801ND_V2, TL-WA801ND-v2, TP-LINK TL-WA801ND v2, +tl_wa801nd_v2_setup); diff --git a/target/linux/ar71xx/patches-3.10/612-MIPS-ath79-add-TL-WA801NDv2-suport.patch b/target/linux/ar71xx/patches-3.10/612-MIPS-ath79-add-TL-WA801NDv2-suport.patch new file mode 100644 index 000..88dc922 --- /dev/null +++ b/target/linux/ar71xx/patches-3.10/612-MIPS-ath79-add-TL-WA801NDv2-suport.patch @@ -0,0 +1,10 @@ +--- a/arch/mips/ath79/machtypes.h b/arch
[OpenWrt-Devel] [patch openwrt 4/4] firmware-utils/mkplinkfw: add TL-WA801ND v2 support
Signed-off-by: Jiri Pirko j...@resnulli.us --- tools/firmware-utils/src/mktplinkfw.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/tools/firmware-utils/src/mktplinkfw.c b/tools/firmware-utils/src/mktplinkfw.c index 195d169..1c3f49d 100644 --- a/tools/firmware-utils/src/mktplinkfw.c +++ b/tools/firmware-utils/src/mktplinkfw.c @@ -42,6 +42,7 @@ #define HWID_TL_WA801ND_V1 0x08010001 #define HWID_TL_WA830RE_V1 0x08300010 #define HWID_TL_WA830RE_V2 0x0832 +#define HWID_TL_WA801ND_V2 0x08010002 #define HWID_TL_WA901ND_V1 0x09010001 #define HWID_TL_WA901ND_V2 0x09010002 #define HWID_TL_WDR4900_V1 0x4901 @@ -256,6 +257,11 @@ static struct board_info boards[] = { .hw_rev = 1, .layout_id = 4M, }, { + .id = TL-WA801NDv2, + .hw_id = HWID_TL_WA801ND_V2, + .hw_rev = 1, + .layout_id = 4Mlzma, + }, { .id = TL-WA901NDv1, .hw_id = HWID_TL_WA901ND_V1, .hw_rev = 1, -- 1.8.3.1 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [patch openwrt RFC 0/4] Add support for TL-WA801ND v2 boar
Jiri Pirko (4): ar71xx: add kernel support for the TL-WA801ND v2 board ar71xx: add user space support for the TL-WA801ND v2 ar71xx: add profile for the WA801ND v2 firmware-utils/mkplinkfw: add TL-WA801ND v2 support target/linux/ar71xx/base-files/etc/diag.sh | 1 + .../ar71xx/base-files/etc/uci-defaults/01_leds | 5 ++ .../ar71xx/base-files/etc/uci-defaults/02_network | 1 + target/linux/ar71xx/base-files/lib/ar71xx.sh | 3 ++ .../ar71xx/base-files/lib/upgrade/platform.sh | 1 + .../files/arch/mips/ath79/mach-tl-wr841n-v8.c | 54 ++ target/linux/ar71xx/image/Makefile | 3 +- .../636-MIPS-ath79-add-TL-WA801NDv2-suport.patch | 10 tools/firmware-utils/src/mktplinkfw.c | 6 +++ 9 files changed, 75 insertions(+), 9 deletions(-) create mode 100644 target/linux/ar71xx/patches-3.10/636-MIPS-ath79-add-TL-WA801NDv2-suport.patch -- 1.8.3.1 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [patch openwrt RFC 2/4] ar71xx: add user space support for the TL-WA801ND v2
Patch to add the user space support for the TL-WA801ND v2 Signed-off-by: Jiri Pirko j...@resnulli.us --- target/linux/ar71xx/base-files/etc/diag.sh | 1 + target/linux/ar71xx/base-files/etc/uci-defaults/01_leds| 5 + target/linux/ar71xx/base-files/etc/uci-defaults/02_network | 1 + target/linux/ar71xx/base-files/lib/ar71xx.sh | 3 +++ target/linux/ar71xx/base-files/lib/upgrade/platform.sh | 1 + 5 files changed, 11 insertions(+) diff --git a/target/linux/ar71xx/base-files/etc/diag.sh b/target/linux/ar71xx/base-files/etc/diag.sh index 216100b..d5d6755 100755 --- a/target/linux/ar71xx/base-files/etc/diag.sh +++ b/target/linux/ar71xx/base-files/etc/diag.sh @@ -136,6 +136,7 @@ get_status_led() { tl-mr3220-v2 | \ tl-mr3420 | \ tl-mr3420-v2 | \ + tl-wa801nd-v2 | \ tl-wa901nd | \ tl-wa901nd-v2 | \ tl-wdr3500 | \ 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 e20c121..589a062 100755 --- a/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds +++ b/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds @@ -248,6 +248,11 @@ tl-wr842n-v2) ucidef_set_led_usbdev usb USB tp-link:green:3g 1-1 ;; +tl-wa801nd-v2) + ucidef_set_led_netdev lan LAN tp-link:green:lan eth0 + ucidef_set_led_wlan wlan WLAN tp-link:green:wlan phy0tpt + ;; + tl-wr941nd | \ tl-wr1041n-v2) ucidef_set_led_wlan wlan WLAN tp-link:green:wlan phy0tpt 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 5ef4938..1294591 100755 --- a/target/linux/ar71xx/base-files/etc/uci-defaults/02_network +++ b/target/linux/ar71xx/base-files/etc/uci-defaults/02_network @@ -235,6 +235,7 @@ tl-mr3040 |\ tl-mr3040-v2 |\ tl-wa750re |\ tl-wa850re |\ +tl-wa801nd-v2 |\ tl-wa901nd |\ tl-wa901nd-v2 |\ tl-wr703n |\ diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh b/target/linux/ar71xx/base-files/lib/ar71xx.sh index e0b8830..e01ffc7 100755 --- a/target/linux/ar71xx/base-files/lib/ar71xx.sh +++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh @@ -462,6 +462,9 @@ ar71xx_board_detect() { *TL-WA850RE) name=tl-wa850re ;; + *TL-WA801ND v2) + name=tl-wa801nd-v2 + ;; *TL-WA901ND) name=tl-wa901nd ;; diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh index 839ba4e..782cf8e 100755 --- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh +++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh @@ -192,6 +192,7 @@ platform_check_image() { tl-wa7510n | \ tl-wa750re | \ tl-wa850re | \ + tl-wa801nd-v2 | \ tl-wa901nd | \ tl-wa901nd-v2 | \ tl-wdr3500 | \ -- 1.8.3.1 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [patch openwrt RFC 1/4] ar71xx: add kernel support for the TL-WA801ND v2 board
Patch to add kernel support for the TP-LINK WA801ND v2 Signed-off-by: Jiri Pirko j...@resnulli.us --- .../files/arch/mips/ath79/mach-tl-wr841n-v8.c | 54 ++ .../636-MIPS-ath79-add-TL-WA801NDv2-suport.patch | 10 2 files changed, 56 insertions(+), 8 deletions(-) create mode 100644 target/linux/ar71xx/patches-3.10/636-MIPS-ath79-add-TL-WA801NDv2-suport.patch diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wr841n-v8.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wr841n-v8.c index 0099b15..3672741 100644 --- a/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wr841n-v8.c +++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wr841n-v8.c @@ -1,7 +1,8 @@ /* - * TP-LINK TL-WR841N/ND v8/TL-MR3420 v2 board support + * TP-LINK TL-WR841N/ND v8/TL-MR3420 v2/TL-WA801ND v2 board support * * Copyright (C) 2012 Gabor Juhos juh...@openwrt.org + * Copyright (C) 2013 Jiri Pirko j...@resnulli.us * * 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 @@ -91,6 +92,26 @@ static struct gpio_led tl_wr841n_v8_leds_gpio[] __initdata = { }, }; +static struct gpio_led tl_wa801nd_v2_leds_gpio[] __initdata = { + { + .name = tp-link:green:qss, + .gpio = TL_WR841NV8_GPIO_LED_QSS, + .active_low = 1, + }, { + .name = tp-link:green:system, + .gpio = TL_WR841NV8_GPIO_LED_SYSTEM, + .active_low = 1, + }, { + .name = tp-link:green:lan, + .gpio = TL_WR841NV8_GPIO_LED_WAN, /* LAN for wa801nd_v2 */ + .active_low = 1, + }, { + .name = tp-link:green:wlan, + .gpio = TL_WR841NV8_GPIO_LED_WLAN, + .active_low = 1, + }, +}; + static struct gpio_keys_button tl_wr841n_v8_gpio_keys[] __initdata = { { .desc = Reset button, @@ -127,7 +148,7 @@ static struct gpio_keys_button tl_mr3420v2_gpio_keys[] __initdata = { } }; -static void __init tl_ap123_setup(void) +static void __init tl_ap123_setup(bool setup_gmac1) { u8 *mac = (u8 *) KSEG1ADDR(0x1f01fc00); u8 *ee = (u8 *) KSEG1ADDR(0x1fff1000); @@ -158,16 +179,18 @@ static void __init tl_ap123_setup(void) ath79_eth0_data.mii_bus_dev = ath79_mdio1_device.dev; ath79_register_eth(0); - /* GMAC1 is connected to the internal switch */ - ath79_eth1_data.phy_if_mode = PHY_INTERFACE_MODE_GMII; - ath79_register_eth(1); + if (setup_gmac1) { + /* GMAC1 is connected to the internal switch */ + ath79_eth1_data.phy_if_mode = PHY_INTERFACE_MODE_GMII; + ath79_register_eth(1); + } ath79_register_wmac(ee, mac); } static void __init tl_wr841n_v8_setup(void) { - tl_ap123_setup(); + tl_ap123_setup(true); ath79_register_leds_gpio(-1, ARRAY_SIZE(tl_wr841n_v8_leds_gpio) - 1, tl_wr841n_v8_leds_gpio); @@ -183,7 +206,7 @@ MIPS_MACHINE(ATH79_MACH_TL_WR841N_V8, TL-WR841N-v8, TP-LINK TL-WR841N/ND v8, static void __init tl_wr842n_v2_setup(void) { - tl_ap123_setup(); + tl_ap123_setup(true); ath79_register_leds_gpio(-1, ARRAY_SIZE(tl_wr841n_v8_leds_gpio), tl_wr841n_v8_leds_gpio); @@ -204,7 +227,7 @@ MIPS_MACHINE(ATH79_MACH_TL_WR842N_V2, TL-WR842N-v2, TP-LINK TL-WR842N/ND v2, static void __init tl_mr3420v2_setup(void) { - tl_ap123_setup(); + tl_ap123_setup(true); ath79_register_leds_gpio(-1, ARRAY_SIZE(tl_wr841n_v8_leds_gpio), tl_wr841n_v8_leds_gpio); @@ -223,3 +246,18 @@ static void __init tl_mr3420v2_setup(void) MIPS_MACHINE(ATH79_MACH_TL_MR3420_V2, TL-MR3420-v2, TP-LINK TL-MR3420 v2, tl_mr3420v2_setup); + +static void __init tl_wa801nd_v2_setup(void) +{ + tl_ap123_setup(false); + + ath79_register_leds_gpio(-1, ARRAY_SIZE(tl_wa801nd_v2_leds_gpio), +tl_wa801nd_v2_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_WA801ND_V2, TL-WA801ND-v2, TP-LINK TL-WA801ND v2, +tl_wa801nd_v2_setup); diff --git a/target/linux/ar71xx/patches-3.10/636-MIPS-ath79-add-TL-WA801NDv2-suport.patch b/target/linux/ar71xx/patches-3.10/636-MIPS-ath79-add-TL-WA801NDv2-suport.patch new file mode 100644 index 000..88dc922 --- /dev/null +++ b/target/linux/ar71xx/patches-3.10/636-MIPS-ath79-add-TL-WA801NDv2-suport.patch @@ -0,0 +1,10 @@ +--- a/arch/mips/ath79/machtypes.h b/arch
[OpenWrt-Devel] [patch openwrt RFC 3/4] ar71xx: add profile for the WA801ND v2
Patch to add the profile for the TP-LINK WA801ND v2 Signed-off-by: Jiri Pirko j...@resnulli.us --- target/linux/ar71xx/image/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/target/linux/ar71xx/image/Makefile b/target/linux/ar71xx/image/Makefile index 8511bba..2c470b4 100644 --- a/target/linux/ar71xx/image/Makefile +++ b/target/linux/ar71xx/image/Makefile @@ -1001,6 +1001,7 @@ $(eval $(call SingleProfile,TPLINK-LZMA,64kraw,TLWR743NV2,tl-wr743nd-v2,TL-WR741 $(eval $(call SingleProfile,TPLINK-LZMA,64kraw,TLWA750,tl-wa750re-v1,TL-WA750RE,ttyS0,115200,0x0751,1,4Mlzma)) $(eval $(call SingleProfile,TPLINK-LZMA,64kraw,TLWR841NV8,tl-wr841n-v8,TL-WR841N-v8,ttyS0,115200,0x08410008,1,4Mlzma)) $(eval $(call SingleProfile,TPLINK-LZMA,64kraw,TLWR842V2,tl-wr842n-v2,TL-WR842N-v2,ttyS0,115200,0x8420002,1,8Mlzma)) +$(eval $(call SingleProfile,TPLINK-LZMA,64kraw,TLWA801NV2,tl-wa801nd-v2,TL-WA801ND-v2,ttyS0,115200,0x08010002,1,4Mlzma)) $(eval $(call SingleProfile,TPLINK-LZMA,64kraw,TLWA850,tl-wa850re-v1,TL-WA850RE,ttyS0,115200,0x0851,1,4Mlzma)) $(eval $(call SingleProfile,TPLINK-LZMA,64kraw,TLWR941NV6,tl-wr941nd-v6,TL-WDR3500,ttyS0,115200,0x09410006,1,4Mlzma)) $(eval $(call SingleProfile,TPLINK-LZMA,64kraw,TLWR1041,tl-wr1041n-v2,TL-WR1041N-v2,ttyS0,115200,0x10410002,1,4Mlzma)) @@ -1055,7 +1056,7 @@ $(eval $(call MultiProfile,TLMR11U,TLMR11UV1 TLMR11UV2)) $(eval $(call MultiProfile,TLMR3040,TLMR3040V1 TLMR3040V2)) $(eval $(call MultiProfile,TLMR3220,TLMR3220V1 TLMR3220V2)) $(eval $(call MultiProfile,TLMR3420,TLMR3420V1 TLMR3420V2)) -$(eval $(call MultiProfile,TLWA801,TLWA801NV1)) +$(eval $(call MultiProfile,TLWA801,TLWA801NV1 TLWA801NV2)) $(eval $(call MultiProfile,TLWA830,TLWA830RV1)) $(eval $(call MultiProfile,TLWA901,TLWA901NV1 TLWA901NV2)) $(eval $(call MultiProfile,TLWA7510,TLWA7510NV1)) -- 1.8.3.1 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [patch openwrt RFC 4/4] firmware-utils/mkplinkfw: add TL-WA801ND v2 support
Signed-off-by: Jiri Pirko j...@resnulli.us --- tools/firmware-utils/src/mktplinkfw.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/tools/firmware-utils/src/mktplinkfw.c b/tools/firmware-utils/src/mktplinkfw.c index 195d169..1c3f49d 100644 --- a/tools/firmware-utils/src/mktplinkfw.c +++ b/tools/firmware-utils/src/mktplinkfw.c @@ -42,6 +42,7 @@ #define HWID_TL_WA801ND_V1 0x08010001 #define HWID_TL_WA830RE_V1 0x08300010 #define HWID_TL_WA830RE_V2 0x0832 +#define HWID_TL_WA801ND_V2 0x08010002 #define HWID_TL_WA901ND_V1 0x09010001 #define HWID_TL_WA901ND_V2 0x09010002 #define HWID_TL_WDR4900_V1 0x4901 @@ -256,6 +257,11 @@ static struct board_info boards[] = { .hw_rev = 1, .layout_id = 4M, }, { + .id = TL-WA801NDv2, + .hw_id = HWID_TL_WA801ND_V2, + .hw_rev = 1, + .layout_id = 4Mlzma, + }, { .id = TL-WA901NDv1, .hw_id = HWID_TL_WA901ND_V1, .hw_rev = 1, -- 1.8.3.1 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] ipv6 Neighbor Discovery library
Hi. I think this might be interesting for your project. If not please ignore. I'm working on libndp (Neighbour discovery library): https://github.com/jpirko/libndp The purpose is to provide application (for example Network Manager) an API for NDP packets parsing and composing. The lib is 5 days old and currently it supports only receiving RAs. The infrastructure is prepared to be easily extended to handle other NDP packet types on for both receiving and sending. There is an application called ndptool bundled with the lib which would provide direct command-line interface to NDP. Thanks Jiri ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel