Re: [OpenWrt-Devel] [PATCH] package/config/netifd: Replace ifconfig/route with ip command

2016-01-30 Thread Daniel Dickinson

On 30/01/16 02:39 AM, Felix Fietkau wrote:

On 2016-01-30 05:55, Daniel Dickinson wrote:

It worked with a /24 subnet but that might be because of defaults.  I do
not currently have test bed for testing other configurations.

I plan on setting that up once I'm back from travelling.


Please avoid top posting, it is a rather inconvenient quoting style.


Sorry, I am forced to use Outlook for work and haven't figured out how 
to get it to do sane inline conversations, and have bad habits now 
because of that, even when using my personal Mozilla mail.



The broken line is this:

ip address add $ip/${CIDR} ${broadcast:-+} dev $interface"


It seems to me that you simply kept pieces of ifconfig syntax (the
broadcast +) without testing if they can be used with ip. Please be more
careful with that sort of stuff


Oh, that explains it.  I actually looked at the required command but had 
a brain fart and thought ${broadcast:-+} meant that I had the word 
broadcast on the command line (i.e. the required parameter of broadcast 
x.x.x.x for ip command), instead of reading it correctly and realizing 
it was just the variable name.


Regards,

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


[OpenWrt-Devel] [PATCH] Patches to fix kernel panic in Yuncore XD3200 initial commit.

2016-01-30 Thread Jeff Wischkaemper
Signed-off-by: Jeff Wischkaemper 
---
 .../ar71xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata |2 +-
 target/linux/ar71xx/base-files/lib/ar71xx.sh   |2 +-
 target/linux/ar71xx/base-files/lib/upgrade/platform.sh |2 +-
 target/linux/ar71xx/files/arch/mips/ath79/mach-xd3200.c|8 +++-
 4 files changed, 6 insertions(+), 8 deletions(-)

diff --git 
a/target/linux/ar71xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata 
b/target/linux/ar71xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
index bec21eb..2414d34 100644
--- a/target/linux/ar71xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
+++ b/target/linux/ar71xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
@@ -58,7 +58,7 @@ case "$FIRMWARE" in
ath10kcal_extract "art" 20480 2116
ath10kcal_patch_mac $(macaddr_add $(cat 
/sys/class/net/eth1/address) -2)
;;
-   xd3200)
+   XD3200)
ath10kcal_extract "art" 20480 2116
ath10kcal_patch_mac $(macaddr_add $(cat 
/sys/class/net/eth1/address) )
;;
diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh 
b/target/linux/ar71xx/base-files/lib/ar71xx.sh
index 883c163..479a68d 100755
--- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
+++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh
@@ -397,7 +397,7 @@ ar71xx_board_detect() {
name="ap152"
;;
*"Yuncore XD3200")
-   name="xd3200"
+   name="XD3200"
;;
*AP81)
name="ap81"
diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh 
b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
index 563f34b..5489140 100755
--- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
@@ -185,7 +185,7 @@ platform_check_image() {
ap135-020 | \
ap147-010 | \
ap152 | \
-   xd3200 | \
+   XD3200 | \
ap96 | \
bxu2000n-2-a1 | \
db120 | \
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-xd3200.c 
b/target/linux/ar71xx/files/arch/mips/ath79/mach-xd3200.c
index 5c5a074..62f9284 100644
--- a/target/linux/ar71xx/files/arch/mips/ath79/mach-xd3200.c
+++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-xd3200.c
@@ -1,9 +1,7 @@
-
 /*
 
-This file modified to support the Yuncore XD3200, which is based on
-the reference implementation of the Atheros AP152. 
-
+ * This file modified to support the Yuncore XD3200, which is based on
+ * the reference implementation of the Atheros AP152.
  * Qualcomm Atheros AP152 reference board support
  *
  * Copyright (c) 2015 Qualcomm Atheros
@@ -140,5 +138,5 @@ static void __init XD3200_setup(void)
ath79_register_eth(0);
 }
 
-MIPS_MACHINE(ATH79_MACH_XD3200, "xd3200", "Yuncore XD3200",
+MIPS_MACHINE(ATH79_MACH_XD3200, "XD3200", "Yuncore XD3200",
 XD3200_setup);
-- 
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] Add support for Yuncore XD3200 AP

2016-01-30 Thread Jeff Wischkaemper
From: Jeff 

Signed-off-by: Jeff 
---
 .../etc/hotplug.d/firmware/11-ath10k-caldata   |4 +
 target/linux/ar71xx/base-files/lib/ar71xx.sh   |3 +
 .../ar71xx/base-files/lib/upgrade/platform.sh  |1 +
 target/linux/ar71xx/config-4.1 |   33 -
 .../ar71xx/files/arch/mips/ath79/Kconfig.openwrt   |9 ++
 target/linux/ar71xx/files/arch/mips/ath79/Makefile |1 +
 .../ar71xx/files/arch/mips/ath79/mach-xd3200.c |  144 
 .../linux/ar71xx/files/arch/mips/ath79/machtypes.h |1 +
 target/linux/ar71xx/generic/profiles/yuncore.mk|   19 +++
 target/linux/ar71xx/image/Makefile |4 +-
 10 files changed, 217 insertions(+), 2 deletions(-)
 create mode 100644 target/linux/ar71xx/files/arch/mips/ath79/mach-xd3200.c
 create mode 100644 target/linux/ar71xx/generic/profiles/yuncore.mk

diff --git 
a/target/linux/ar71xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata 
b/target/linux/ar71xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
index 74c3417..bec21eb 100644
--- a/target/linux/ar71xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
+++ b/target/linux/ar71xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
@@ -58,6 +58,10 @@ case "$FIRMWARE" in
ath10kcal_extract "art" 20480 2116
ath10kcal_patch_mac $(macaddr_add $(cat 
/sys/class/net/eth1/address) -2)
;;
+   xd3200)
+   ath10kcal_extract "art" 20480 2116
+   ath10kcal_patch_mac $(macaddr_add $(cat 
/sys/class/net/eth1/address) )
+   ;;
r6100)
ath10kcal_extract "caldata" 20480 2116
ath10kcal_patch_mac $(macaddr_add $(cat 
/sys/class/net/eth1/address) +2)
diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh 
b/target/linux/ar71xx/base-files/lib/ar71xx.sh
index 34d5741..883c163 100755
--- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
+++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh
@@ -396,6 +396,9 @@ ar71xx_board_detect() {
*"AP152 reference board")
name="ap152"
;;
+   *"Yuncore XD3200")
+   name="xd3200"
+   ;;
*AP81)
name="ap81"
;;
diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh 
b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
index 0276a69..563f34b 100755
--- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
@@ -185,6 +185,7 @@ platform_check_image() {
ap135-020 | \
ap147-010 | \
ap152 | \
+   xd3200 | \
ap96 | \
bxu2000n-2-a1 | \
db120 | \
diff --git a/target/linux/ar71xx/config-4.1 b/target/linux/ar71xx/config-4.1
index fe1dd68..25eb0be 100644
--- a/target/linux/ar71xx/config-4.1
+++ b/target/linux/ar71xx/config-4.1
@@ -43,6 +43,7 @@ CONFIG_ATH79_MACH_AP136=y
 CONFIG_ATH79_MACH_AP143=y
 CONFIG_ATH79_MACH_AP147=y
 CONFIG_ATH79_MACH_AP152=y
+CONFIG_ATH79_MACH_XD3200=y
 CONFIG_ATH79_MACH_AP81=y
 CONFIG_ATH79_MACH_AP83=y
 CONFIG_ATH79_MACH_AP96=y
@@ -72,7 +73,6 @@ CONFIG_ATH79_MACH_DLAN_HOTSPOT=y
 CONFIG_ATH79_MACH_DLAN_PRO_1200_AC=y
 CONFIG_ATH79_MACH_DLAN_PRO_500_WP=y
 CONFIG_ATH79_MACH_DR344=y
-CONFIG_ATH79_MACH_GL_DOMINO=y
 CONFIG_ATH79_MACH_DRAGINO2=y
 CONFIG_ATH79_MACH_EAP300V2=y
 CONFIG_ATH79_MACH_EAP7660D=y
@@ -85,6 +85,7 @@ CONFIG_ATH79_MACH_EW_DORIN=y
 CONFIG_ATH79_MACH_F9K1115V2=y
 CONFIG_ATH79_MACH_GL_AR150=y
 CONFIG_ATH79_MACH_GL_AR300=y
+CONFIG_ATH79_MACH_GL_DOMINO=y
 CONFIG_ATH79_MACH_GL_INET=y
 CONFIG_ATH79_MACH_GS_MINIBOX_V1=y
 CONFIG_ATH79_MACH_GS_OOLITE=y
@@ -212,11 +213,13 @@ CONFIG_CSRC_R4K=y
 CONFIG_DMA_NONCOHERENT=y
 CONFIG_EARLY_PRINTK=y
 CONFIG_ETHERNET_PACKET_MANGLE=y
+CONFIG_FIRMWARE_MEMMAP=y
 CONFIG_GENERIC_ATOMIC64=y
 CONFIG_GENERIC_CLOCKEVENTS=y
 CONFIG_GENERIC_CMOS_UPDATE=y
 CONFIG_GENERIC_IO=y
 CONFIG_GENERIC_IRQ_SHOW=y
+CONFIG_GENERIC_MSI_IRQ=y
 CONFIG_GENERIC_PCI_IOMAP=y
 CONFIG_GENERIC_SCHED_CLOCK=y
 CONFIG_GENERIC_SMP_IDLE_THREAD=y
@@ -264,6 +267,10 @@ CONFIG_HAVE_OPROFILE=y
 CONFIG_HAVE_PERF_EVENTS=y
 CONFIG_HAVE_SYSCALL_TRACEPOINTS=y
 CONFIG_HAVE_VIRT_CPU_ACCOUNTING_GEN=y
+CONFIG_HOTPLUG_PCI=y
+# CONFIG_HOTPLUG_PCI_CPCI is not set
+CONFIG_HOTPLUG_PCI_PCIE=y
+# CONFIG_HOTPLUG_PCI_SHPC is not set
 CONFIG_HW_HAS_PCI=y
 CONFIG_HZ_PERIODIC=y
 CONFIG_I2C=y
@@ -280,6 +287,7 @@ CONFIG_IRQ_DOMAIN=y
 CONFIG_IRQ_FORCED_THREADING=y
 CONFIG_IRQ_WORK=y
 CONFIG_LEDS_GPIO=y
+CONFIG_LEDS_NU801=y
 # CONFIG_LEDS_WNDR3700_USB is not set
 CONFIG_MARVELL_PHY=y
 CONFIG_MDIO_BOARDINFO=y
@@ -321,13 +329,36 @@ CONFIG_NO_GENERIC_PCI_IOPORT_MAP=y
 # CONFIG_NO_IOPORT_MAP is not set
 CONFIG_PAGEFLAGS_EXTENDED=y
 CONFIG_PCI=y
+CONFIG_PCIEAER=y
+CONFIG_PCIEPORTBUS=y
 CONFIG_PCI_AR724X=y
+CONFIG_PCI_ATS=y
+CONFIG_PCI_DEBUG=y
 CONFIG_PCI_DISABLE_COMMON_QUIRKS=y
 CONFIG_PCI_DOMAINS=y
+CONFIG_PCI_IOV=y
+CONFIG_PCI_MSI=y
+CONFIG_PCI_PASID=y
+CONFIG_PCI_PRI=y
+CONFIG_PCI_REALLO

Re: [OpenWrt-Devel] [PATCH RFC 2/2] modules/netsupport: Add MPLS support / size

2016-01-30 Thread Felix Fietkau
On 2016-01-31 01:14, Andre Valentin wrote:
> Hi!
> 
> Am 30.01.2016 um 23:20 schrieb Felix Fietkau:
>> On 2016-01-30 23:14, André Valentin wrote:
>>> Add needed modules for MPLS support.
>>>
>>> Signed-off-by: André Valentin 
>>> ---
>>>  package/kernel/linux/modules/netsupport.mk | 23 +++
>>>  1 file changed, 23 insertions(+)
>>>
>>> diff --git a/package/kernel/linux/modules/netsupport.mk 
>>> b/package/kernel/linux/modules/netsupport.mk
>>> index 446996e..0215722 100644
>>> --- a/package/kernel/linux/modules/netsupport.mk
>>> +++ b/package/kernel/linux/modules/netsupport.mk
>>> @@ -1029,3 +1029,26 @@ define KernelPackage/rxrpc/description
>>>  endef
>>>  
>>>  $(eval $(call KernelPackage,rxrpc))
>>> +
>>> +define KernelPackage/mpls
>>> +  SUBMENU:=$(NETWORK_SUPPORT_MENU)
>>> +  TITLE:=MPLS support
>>> +  KCONFIG:= \
>>> +   CONFIG_MPLS \
>>> +   CONFIG_NET_MPLS_GSO=m \
>>> +   CONFIG_MPLS_ROUTING=m \
>>> +   CONFIG_MPLS_IPTUNNEL=m
>>> +  FILES:= \
>>> +   $(LINUX_DIR)/net/mpls/mpls_gso.ko \
>>> +   $(LINUX_DIR)/net/mpls/mpls_iptunnel.ko \
>>> +   $(LINUX_DIR)/net/mpls/mpls_router.ko
>>> +  AUTOLOAD:=$(call AutoLoad,30,mpls_router mpls_iptunnel mpls_gso)
>>> +  DEPENDS:=+@KERNEL_MPLS +@KERNEL_LWTUNNEL 
>>> +endef
>> Since this is causing some code to be built into the kernel image,
>> please do a measurement of how much it adds.
> 
> Sorry, forgot this. Here are the numbers:
> 
> Size of the modules:
> mpls_gso.ko:3101 Bytes
> mpls_iptunnel:  4367 Bytes
> mpls_router:   17451 Bytes
> ---
> modules total: 24.3 KiB
I mean the kernel image size increase (before and after selecting MPLS
support), I don't care much about the modules size.

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] vlandev: Add support for setting a unique MAC on a VLAN interface

2016-01-30 Thread Andre Valentin
Hi Felix,

Am 29.01.2016 um 13:33 schrieb Felix Fietkau:
> On 2016-01-29 13:15, André Valentin wrote:
>> Hi Felix,
>>
>> thanks for the hint. Did you configure the MAC in the interface section?
>> I suggest I had a wrongly created MAC on my first tries which resulted in 
>> kernel not accepting it.
> I configured it in the device section - in fact I simply copy&pasted
> your exact example config text ;)

It works.. Argh. Stupid MAC generator that gave me bad MACs... That made me 
extend the code...

Kind regards,

André

P.S.: Don't ever use this one:
http://www.miniwebtool.com/mac-address-generator/
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH RFC 1/2] config: add MPLS and LWTunnel support

2016-01-30 Thread Andre Valentin
Hi!

Am 31.01.2016 um 00:42 schrieb Andre Valentin:
> Hi Felix,
> 
> thanks for taking a look. I had the problem that without this selection the
> iproute2 "ip route" does not support the new route "encap" parameter. It seems
> to detect the support in the kernel. Same is with GRE, also available for 
> LWTUNNEL,
> but it is now missing in iproute2. GRE is build as a module.
> I'm pretty sure I cleaned everything by removing every stuff in 
> build_dir/target*
> Do you have an idea how to solve this?

I will do a full clean and test the newly build iproute2 tomorrow again.

Kind regards,

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


Re: [OpenWrt-Devel] [PATCH RFC 2/2] modules/netsupport: Add MPLS support / size

2016-01-30 Thread Andre Valentin
Hi!

Am 30.01.2016 um 23:20 schrieb Felix Fietkau:
> On 2016-01-30 23:14, André Valentin wrote:
>> Add needed modules for MPLS support.
>>
>> Signed-off-by: André Valentin 
>> ---
>>  package/kernel/linux/modules/netsupport.mk | 23 +++
>>  1 file changed, 23 insertions(+)
>>
>> diff --git a/package/kernel/linux/modules/netsupport.mk 
>> b/package/kernel/linux/modules/netsupport.mk
>> index 446996e..0215722 100644
>> --- a/package/kernel/linux/modules/netsupport.mk
>> +++ b/package/kernel/linux/modules/netsupport.mk
>> @@ -1029,3 +1029,26 @@ define KernelPackage/rxrpc/description
>>  endef
>>  
>>  $(eval $(call KernelPackage,rxrpc))
>> +
>> +define KernelPackage/mpls
>> +  SUBMENU:=$(NETWORK_SUPPORT_MENU)
>> +  TITLE:=MPLS support
>> +  KCONFIG:= \
>> +CONFIG_MPLS \
>> +CONFIG_NET_MPLS_GSO=m \
>> +CONFIG_MPLS_ROUTING=m \
>> +CONFIG_MPLS_IPTUNNEL=m
>> +  FILES:= \
>> +$(LINUX_DIR)/net/mpls/mpls_gso.ko \
>> +$(LINUX_DIR)/net/mpls/mpls_iptunnel.ko \
>> +$(LINUX_DIR)/net/mpls/mpls_router.ko
>> +  AUTOLOAD:=$(call AutoLoad,30,mpls_router mpls_iptunnel mpls_gso)
>> +  DEPENDS:=+@KERNEL_MPLS +@KERNEL_LWTUNNEL 
>> +endef
> Since this is causing some code to be built into the kernel image,
> please do a measurement of how much it adds.

Sorry, forgot this. Here are the numbers:

Size of the modules:
mpls_gso.ko:3101 Bytes
mpls_iptunnel:  4367 Bytes
mpls_router:   17451 Bytes
---
modules total: 24.3 KiB

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


Re: [OpenWrt-Devel] [PATCH 1/2] linux/crypto: Add echainiv module provided by 4.4 kernels

2016-01-30 Thread Andre Valentin
Hi!

This module add 4526 Bytes uncompressed.

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


[OpenWrt-Devel] ar71xx with kernel 4.4 on WZR-HP-AG300H

2016-01-30 Thread Andre Valentin
Hi!

I've got some problems with new 4.4 kernel on ar711 with my WZR-HP-AG300H. 
Please just take this as a notice, I know it's testing ;-)
If you need more testing, I'm available.

André

Here's the log:

console=ttyS0,115200 root=31:03 rootfstype=jffs2 init=/sbin/init
mtdparts=ar7100-nor0:256k(u-boot),64k(u-boot-env),1152k@384k(uImage),6592k@1536k(rootfs),64k@320k(ART),64k@8128k(properties),8192k@8192k(flash1),M
## Booting image at bf06 ...
   Image Name:   MIPS OpenWrt Linux-4.4
   Created:  2016-01-30  21:45:43 UTC
   Image Type:   MIPS Linux Kernel Image (lzma compressed)
   Data Size:1402157 Bytes =  1.3 MB
   Load Address: 8006
   Entry Point:  8006
   Verifying Checksum ... crc32_fw: bf060040 - bf1b656c (len:0015652d) calc...
crc32_fw: range1 bf060040 - bf1b656c
OK
   Uncompressing Kernel Image ... OK
No initrd
## Transferring control to Linux (at address 8006) ...
## Giving linux memsize in bytes, 134217728

Starting kernel ...

[0.00] Linux version 4.4.0 (avalen...@nixdevel.ad.ddimension.net) (gcc 
version 5.2.0 (OpenWrt GCC 5.2.0 r48531) ) #1 Sat Jan 30 21:45:32 UTC 2016
[0.00] bootconsole [early0] enabled
[0.00] CPU0 revision is: 00019374 (MIPS 24Kc)
[0.00] SoC: Atheros AR7161 rev 2
[0.00] Determined physical RAM map:
[0.00]  memory: 0800 @  (usable)
[0.00] Initrd not found or empty - disabling initrd
[0.00] No valid device tree found, continuing without
[0.00] Zone ranges:
[0.00]   Normal   [mem 0x-0x07ff]
[0.00] Movable zone start for each node
[0.00] Early memory node ranges
[0.00]   node   0: [mem 0x-0x07ff]
[0.00] Initmem setup node 0 [mem 0x-0x07ff]
[0.00] Reserving 0MB of memory at 0MB for crashkernel
[0.00] Primary instruction cache 64kB, VIPT, 4-way, linesize 32 bytes.
[0.00] Primary data cache 32kB, 4-way, VIPT, cache aliases, linesize 32 
bytes
[0.00] Built 1 zonelists in Zone order, mobility grouping on.  Total 
pages: 32512
[0.00] Kernel command line:  board=WZR-HP-AG300H console=ttyS0,115200 
rootfstype=squashfs,jffs2 noinitrd
[0.00] PID hash table entries: 512 (order: -1, 2048 bytes)
[0.00] Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
[0.00] Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
[0.00] Writing ErrCtl register=
[0.00] Readback ErrCtl register=
[0.00] Memory: 125064K/131072K available (3127K kernel code, 156K 
rwdata, 648K rodata, 284K init, 213K bss, 6008K reserved, 0K cma-reserved)
[0.00] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[0.00] NR_IRQS:51
[0.00] Clocks: CPU:680.000MHz, DDR:340.000MHz, AHB:170.000MHz, 
Ref:40.000MHz
[0.00] clocksource: MIPS: mask: 0x max_cycles: 0x, 
max_idle_ns: 5621354254 ns
[0.08] sched_clock: 32 bits at 340MHz, resolution 2ns, wraps every 
6316128254ns
[0.007737] Calibrating delay loop... 452.19 BogoMIPS (lpj=2260992)
[0.070375] pid_max: default: 32768 minimum: 301
[0.075074] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[0.081595] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[0.089325] Initializing cgroup subsys io
[0.093284] Initializing cgroup subsys devices
[0.097666] Initializing cgroup subsys freezer
[0.102081] Initializing cgroup subsys net_cls
[0.106505] Initializing cgroup subsys pids
[0.111981] devtmpfs: initialized
[0.115925] clocksource: jiffies: mask: 0x max_cycles: 0x, 
max_idle_ns: 1911260446275 ns
[0.126352] NET: Registered protocol family 16
[0.131647] MIPS: machine is Buffalo WZR-HP-AG300H/WZR-600DHP
[2.777559] registering PCI controller with io_map_base unset
[2.790904] PCI host bridge to bus :00
[2.794968] pci_bus :00: root bus resource [mem 0x1000-0x16ff]
[2.801754] pci_bus :00: root bus resource [io  0x]
[2.807306] pci_bus :00: root bus resource [??? 0x flags 0x0]
[2.814050] pci_bus :00: No busn resource found for root bus, will use 
[bus 00-ff]
[2.822006] pci :00:11.0: fixup device configuration
[2.828688] pci :00:12.0: fixup device configuration
[2.835385] pci :00:11.0: BAR 0: assigned [mem 0x1000-0x1000]
[2.842075] pci :00:12.0: BAR 0: assigned [mem 0x1001-0x1001]
[2.848856] pci :00:11.0: using irq 40 for pin 1
[2.853756] pci :00:12.0: using irq 41 for pin 1
[2.859447] clocksource: Switched to clocksource MIPS
[2.868345] NET: Registered protocol family 2
[2.873464] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[2.880397] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[2.886667] TCP: Hash tables configured (es

Re: [OpenWrt-Devel] [PATCH RFC 1/2] config: add MPLS and LWTunnel support

2016-01-30 Thread Andre Valentin
Hi Felix,

thanks for taking a look. I had the problem that without this selection the
iproute2 "ip route" does not support the new route "encap" parameter. It seems
to detect the support in the kernel. Same is with GRE, also available for 
LWTUNNEL,
but it is now missing in iproute2. GRE is build as a module.
I'm pretty sure I cleaned everything by removing every stuff in 
build_dir/target*
Do you have an idea how to solve this?

Kind regards,

André


Am 30.01.2016 um 23:19 schrieb Felix Fietkau:
> On 2016-01-30 23:14, André Valentin wrote:
>> Add support for MPLS and Lighweight tunnel to openwrt kernel config.
>>
>> Signed-off-by: André Valentin 
>> ---
>>  config/Config-kernel.in | 8 
>>  1 file changed, 8 insertions(+)
>>
>> diff --git a/config/Config-kernel.in b/config/Config-kernel.in
>> index c93bbde..0bc1687 100644
>> --- a/config/Config-kernel.in
>> +++ b/config/Config-kernel.in
>> @@ -184,6 +184,14 @@ config KERNEL_MAGIC_SYSRQ
>>  bool "Compile the kernel with SysRq support"
>>  default y
>>  
>> +config KERNEL_LWTUNNEL
>> +bool "Compile the kernel with LWTUNNEL support"
>> +default n
>> +
>> +config KERNEL_MPLS
>> +bool "Compile the kernel with MPLS support"
>> +default n
>> +
> Putting these here and selecting them from your kmod-* package doesn't
> make any sense. Please stick to using KCONFIG.
> 
> - Felix
> 


-- 
Mit freundlichen Grüßen
André Valentin

Systemadministration - Projektkoordination


--
MarcanT GmbH, Herforder Straße 163a, D - 33609 Bielefeld
Fon: +49 (521) 95945-0 | Fax: +49 (521) 95945-18
URL: http://www.marcant.net  | 
http://www.global-m2m.com 

Internet * Netzwerk * Mobile Daten
Citrix Silver Solution Advisor

Geschäftsführer: Thorsten Hojas
Handelsregister: AG Bielefeld, HRB 35827 USt-ID Nr.: DE 190203238



___
Ausserhalb unserer Geschäftszeiten (Montag bis Freitag von 8:30 Uhr bis
17:30 Uhr, ausgenommen gesetzliche Feiertage in NRW) stehen wir Ihnen
gemäß Ihrer jeweiligen Service-Level-Agreements unter der Ihnen
mitgeteilten Telefonnummer für Störungen und Notfälle zur Verfügung.
Sie können natürlich auch gerne jederzeit unter supp...@marcant.net ein
Ticket eröffnen, welches am nächsten Arbeitstag bearbeitet wird.
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH RFC 2/2] modules/netsupport: Add MPLS support

2016-01-30 Thread Felix Fietkau
On 2016-01-30 23:14, André Valentin wrote:
> Add needed modules for MPLS support.
> 
> Signed-off-by: André Valentin 
> ---
>  package/kernel/linux/modules/netsupport.mk | 23 +++
>  1 file changed, 23 insertions(+)
> 
> diff --git a/package/kernel/linux/modules/netsupport.mk 
> b/package/kernel/linux/modules/netsupport.mk
> index 446996e..0215722 100644
> --- a/package/kernel/linux/modules/netsupport.mk
> +++ b/package/kernel/linux/modules/netsupport.mk
> @@ -1029,3 +1029,26 @@ define KernelPackage/rxrpc/description
>  endef
>  
>  $(eval $(call KernelPackage,rxrpc))
> +
> +define KernelPackage/mpls
> +  SUBMENU:=$(NETWORK_SUPPORT_MENU)
> +  TITLE:=MPLS support
> +  KCONFIG:= \
> + CONFIG_MPLS \
> + CONFIG_NET_MPLS_GSO=m \
> + CONFIG_MPLS_ROUTING=m \
> + CONFIG_MPLS_IPTUNNEL=m
> +  FILES:= \
> + $(LINUX_DIR)/net/mpls/mpls_gso.ko \
> + $(LINUX_DIR)/net/mpls/mpls_iptunnel.ko \
> + $(LINUX_DIR)/net/mpls/mpls_router.ko
> +  AUTOLOAD:=$(call AutoLoad,30,mpls_router mpls_iptunnel mpls_gso)
> +  DEPENDS:=+@KERNEL_MPLS +@KERNEL_LWTUNNEL 
> +endef
Since this is causing some code to be built into the kernel image,
please do a measurement of how much it adds.

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 RFC 1/2] config: add MPLS and LWTunnel support

2016-01-30 Thread Felix Fietkau
On 2016-01-30 23:14, André Valentin wrote:
> Add support for MPLS and Lighweight tunnel to openwrt kernel config.
> 
> Signed-off-by: André Valentin 
> ---
>  config/Config-kernel.in | 8 
>  1 file changed, 8 insertions(+)
> 
> diff --git a/config/Config-kernel.in b/config/Config-kernel.in
> index c93bbde..0bc1687 100644
> --- a/config/Config-kernel.in
> +++ b/config/Config-kernel.in
> @@ -184,6 +184,14 @@ config KERNEL_MAGIC_SYSRQ
>   bool "Compile the kernel with SysRq support"
>   default y
>  
> +config KERNEL_LWTUNNEL
> + bool "Compile the kernel with LWTUNNEL support"
> + default n
> +
> +config KERNEL_MPLS
> + bool "Compile the kernel with MPLS support"
> + default n
> +
Putting these here and selecting them from your kmod-* package doesn't
make any sense. Please stick to using KCONFIG.

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


[OpenWrt-Devel] [PATCH 2/2] linux/net: Add dependency for crypto echainiv module on 4.4

2016-01-30 Thread André Valentin
This dependency is needed to be able to create ipsec xfrm states.

Signed-off-by: André Valentin 
---
 package/kernel/linux/modules/netsupport.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/package/kernel/linux/modules/netsupport.mk 
b/package/kernel/linux/modules/netsupport.mk
index 0215722..39491aa 100644
--- a/package/kernel/linux/modules/netsupport.mk
+++ b/package/kernel/linux/modules/netsupport.mk
@@ -286,7 +286,7 @@ IPSEC-m:= \
 define KernelPackage/ipsec
   SUBMENU:=$(NETWORK_SUPPORT_MENU)
   TITLE:=IPsec related modules (IPv4 and IPv6)
-  DEPENDS:=+kmod-crypto-authenc +kmod-crypto-iv +kmod-crypto-des 
+kmod-crypto-hmac +kmod-crypto-md5 +kmod-crypto-sha1 +kmod-crypto-deflate 
+kmod-crypto-cbc
+  DEPENDS:=+kmod-crypto-authenc +kmod-crypto-iv +kmod-crypto-des 
+kmod-crypto-hmac +kmod-crypto-md5 +kmod-crypto-sha1 +kmod-crypto-deflate 
+kmod-crypto-cbc +LINUX_4_4:kmod-crypto-echainiv
   KCONFIG:= \
CONFIG_NET_KEY \
CONFIG_XFRM_USER \
-- 
2.1.4
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 1/2] linux/crypto: Add echainiv module provided by 4.4 kernels

2016-01-30 Thread André Valentin
This module is needed for IPsec ESP support, i.e..

Signed-off-by: André Valentin 
---
 package/kernel/linux/modules/crypto.mk | 12 
 1 file changed, 12 insertions(+)

diff --git a/package/kernel/linux/modules/crypto.mk 
b/package/kernel/linux/modules/crypto.mk
index 1522da0..e8e6902 100644
--- a/package/kernel/linux/modules/crypto.mk
+++ b/package/kernel/linux/modules/crypto.mk
@@ -133,6 +133,18 @@ endef
 
 $(eval $(call KernelPackage,crypto-iv))
 
+
+define KernelPackage/crypto-echainiv
+  TITLE:=Encrypted Chain IV Generator
+  KCONFIG:=CONFIG_CRYPTO_ECHAINIV
+  FILES:=$(LINUX_DIR)/crypto/echainiv.ko
+  AUTOLOAD:=$(call AutoLoad,09,echainiv)
+  $(call AddDepends/crypto)
+endef
+
+$(eval $(call KernelPackage,crypto-echainiv))
+
+
 define KernelPackage/crypto-seqiv
   TITLE:=CryptoAPI Sequence Number IV Generator
   DEPENDS:=+kmod-crypto-aead +kmod-crypto-rng
-- 
2.1.4
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH RFC 2/2] modules/netsupport: Add MPLS support

2016-01-30 Thread André Valentin
Add needed modules for MPLS support.

Signed-off-by: André Valentin 
---
 package/kernel/linux/modules/netsupport.mk | 23 +++
 1 file changed, 23 insertions(+)

diff --git a/package/kernel/linux/modules/netsupport.mk 
b/package/kernel/linux/modules/netsupport.mk
index 446996e..0215722 100644
--- a/package/kernel/linux/modules/netsupport.mk
+++ b/package/kernel/linux/modules/netsupport.mk
@@ -1029,3 +1029,26 @@ define KernelPackage/rxrpc/description
 endef
 
 $(eval $(call KernelPackage,rxrpc))
+
+define KernelPackage/mpls
+  SUBMENU:=$(NETWORK_SUPPORT_MENU)
+  TITLE:=MPLS support
+  KCONFIG:= \
+   CONFIG_MPLS \
+   CONFIG_NET_MPLS_GSO=m \
+   CONFIG_MPLS_ROUTING=m \
+   CONFIG_MPLS_IPTUNNEL=m
+  FILES:= \
+   $(LINUX_DIR)/net/mpls/mpls_gso.ko \
+   $(LINUX_DIR)/net/mpls/mpls_iptunnel.ko \
+   $(LINUX_DIR)/net/mpls/mpls_router.ko
+  AUTOLOAD:=$(call AutoLoad,30,mpls_router mpls_iptunnel mpls_gso)
+  DEPENDS:=+@KERNEL_MPLS +@KERNEL_LWTUNNEL 
+endef
+
+define KernelPackage/mpls/description
+  Kernel support for MPLS
+endef
+
+$(eval $(call KernelPackage,mpls))
+
-- 
2.1.4
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH RFC 1/2] config: add MPLS and LWTunnel support

2016-01-30 Thread André Valentin
Add support for MPLS and Lighweight tunnel to openwrt kernel config.

Signed-off-by: André Valentin 
---
 config/Config-kernel.in | 8 
 1 file changed, 8 insertions(+)

diff --git a/config/Config-kernel.in b/config/Config-kernel.in
index c93bbde..0bc1687 100644
--- a/config/Config-kernel.in
+++ b/config/Config-kernel.in
@@ -184,6 +184,14 @@ config KERNEL_MAGIC_SYSRQ
bool "Compile the kernel with SysRq support"
default y
 
+config KERNEL_LWTUNNEL
+   bool "Compile the kernel with LWTUNNEL support"
+   default n
+
+config KERNEL_MPLS
+   bool "Compile the kernel with MPLS support"
+   default n
+
 config KERNEL_COREDUMP
bool
 
-- 
2.1.4
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH] iproute2: Update to version 4.4

2016-01-30 Thread André Valentin
Update iproute2 to latest version 4.4 with full MPLS support.

Signed-off-by: André Valentin 
---
 package/network/utils/iproute2/Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/package/network/utils/iproute2/Makefile 
b/package/network/utils/iproute2/Makefile
index 0fa4018..05b0d66 100644
--- a/package/network/utils/iproute2/Makefile
+++ b/package/network/utils/iproute2/Makefile
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=iproute2
-PKG_VERSION:=4.3.0
+PKG_VERSION:=4.4.0
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=http://kernel.org/pub/linux/utils/net/iproute2/
-PKG_MD5SUM:=1a2bbb80cfc7ab3f3e987e18b3207c2f
+PKG_MD5SUM:=d762653ec3e1ab0d4a9689e169ca184f
 PKG_BUILD_PARALLEL:=1
 PKG_LICENSE:=GPL-2.0
 
-- 
2.1.4
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH 3/8] ath9k: show platform MAC address in kernel log if set

2016-01-30 Thread Hartmut Knaack
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Michal schrieb am 27.01.2016 um 01:36:
> From: Michal Cieslakiewicz 
> 
> Add information in kernel log during module startup if MAC address
> of WLAN device is overridden by platform-supplied one.
> 
> Signed-off-by: Michal Cieslakiewicz 
Acked-by: Hartmut Knaack 
> ---
>  .../mac80211/patches/548-ath9k_platform_mac_info.patch   | 16 
> 
>  1 file changed, 16 insertions(+)
>  create mode 100644 
> package/kernel/mac80211/patches/548-ath9k_platform_mac_info.patch
> 
> diff --git 
> a/package/kernel/mac80211/patches/548-ath9k_platform_mac_info.patch 
> b/package/kernel/mac80211/patches/548-ath9k_platform_mac_info.patch
> new file mode 100644
> index 000..76115e1
> --- /dev/null
> +++ b/package/kernel/mac80211/patches/548-ath9k_platform_mac_info.patch
> @@ -0,0 +1,16 @@
> +--- a/drivers/net/wireless/ath/ath9k/init.c
>  b/drivers/net/wireless/ath/ath9k/init.c
> +@@ -640,8 +640,12 @@ static int ath9k_init_softc(u16 devid, s
> + if (ret)
> + goto err_hw;
> + 
> +-if (pdata && pdata->macaddr)
> ++if (pdata && pdata->macaddr) {
> + memcpy(common->macaddr, pdata->macaddr, ETH_ALEN);
> ++ath_info(common,
> ++ "platform MAC address will be used: %pM\n",
> ++ common->macaddr);
> ++}
> + 
> + ret = ath9k_init_queues(sc);
> + if (ret)
> 

-BEGIN PGP SIGNATURE-
Version: GnuPG v2

iQIcBAEBCAAGBQJWrPvUAAoJEANoShj6yJFINx4QAJDwxgt9uc+k0d/zeaUXBcn4
EGA9dMvLjSlrAUx9zMwjTtkZDco24qBIub28RUPhuAdO4qecJHjuFJNIoaqlE+GJ
RrvAh/tsRi9LJ7WZnDzg5S9XvV+9tfgJxac3ib3ZJKD+5DsX+pVj+WX3JqEC7XaG
NLW3QqST00eVNIv7xk/3WbB6erd9ju1abFi0KrUgLOhUhfO3NuWYC/05hJTC2dQ1
7SVTCjoVjU3m+G+qEqJXC0qtdomqj/u4gdJpLLjtsk0wsDMNGEANGf6KctSJhupu
bEA3hU/xtUEXpGAT+rkL76afGkfSfAF7myKhOJeCiD0/qQhQQGOhd7OSxqMUni1x
Rc0DM9L5RA4LwPGx5H4hXGaT+7zCFEtAOV9uOfbAIRuzz4wBOROvWKwQKSUxr87H
jb1dslCJqA0tSIK4WEcQn3AoW5WpUKjAfGkhGngn7R87Fs5Llzch+BuTGJGrJ4in
aSBUztddz4+aA4dnMQXSTRsKNr1FSZF6K/ol8FIADW/3utk/7YFCpIDPj9A2acRa
ht4etrIQ09k6xO1Z2LWHue4D0Uu1TyoRKnn7j+EKxhsl+EjxeOi7q3cMhGQO78NW
/LTOsOcTx4xE2wUfbbemT1+ffhSm5pQdZTlpAzXDgj4bkhDB6pcFPoRIPRv+B0UV
j1QBvJOvhYXQJyQjrhpU
=9beH
-END PGP SIGNATURE-


0xFAC89148.asc
Description: application/pgp-keys
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH 2/8] ath9k: set default state for platform LEDs

2016-01-30 Thread Hartmut Knaack
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Michal schrieb am 27.01.2016 um 01:34:
> From: Michal Cieslakiewicz 
> 
> Support default state for platform LEDs connected to ath9k device.
> Now LEDs are correctly set on or off at ath9k module initialization.
> 
> Signed-off-by: Michal Cieslakiewicz 
Acked-by: Hartmut Knaack 
> ---
>  .../mac80211/patches/547-ath9k_led_defstate_fix.patch| 16 
> 
>  1 file changed, 16 insertions(+)
>  create mode 100644 
> package/kernel/mac80211/patches/547-ath9k_led_defstate_fix.patch
> 
> diff --git a/package/kernel/mac80211/patches/547-ath9k_led_defstate_fix.patch 
> b/package/kernel/mac80211/patches/547-ath9k_led_defstate_fix.patch
> new file mode 100644
> index 000..3ecffb8
> --- /dev/null
> +++ b/package/kernel/mac80211/patches/547-ath9k_led_defstate_fix.patch
> @@ -0,0 +1,16 @@
> +--- a/drivers/net/wireless/ath/ath9k/gpio.c
>  b/drivers/net/wireless/ath/ath9k/gpio.c
> +@@ -54,8 +54,11 @@ static int ath_add_led(struct ath_softc
> + ath9k_hw_cfg_output(sc->sc_ah, gpio->gpio,
> + AR_GPIO_OUTPUT_MUX_AS_OUTPUT);
> + 
> +-/* LED off */
> +-ath9k_hw_set_gpio(sc->sc_ah, gpio->gpio, gpio->active_low);
> ++/* Set default LED state */
> ++if (gpio->default_state == LEDS_GPIO_DEFSTATE_ON)
> ++ath9k_hw_set_gpio(sc->sc_ah, gpio->gpio, !gpio->active_low);
> ++else
> ++ath9k_hw_set_gpio(sc->sc_ah, gpio->gpio, gpio->active_low);
> + 
> + return 0;
> + }
> 

-BEGIN PGP SIGNATURE-
Version: GnuPG v2

iQIcBAEBCAAGBQJWrPuiAAoJEANoShj6yJFIK2gP/iAEP0nwLoWCUOde/vtM6x5M
ezrunVtDDu2ikHghVhjpKrbJdFYGcmrfqa/loXHJDdqAw2to2nQwOT5JB/+hMHQ2
EyNDNMYWN4r7/VJdxeaqOJV63VgPS6uHzw+owxQATHn1TQGhyQfOLjICUzfi5zkg
WVD8oBBzCBib2zaSuxfTFcW2TPb8cmXD31MvgQm/1/0wlKVyrgYXqk15T+QU4Qcr
qfGpCmGuJwI7F1TTLStvuKYp78+Qyxc1NV0mSDYK5rmfavIEYjCsT3ld90wb5mSn
CH6c9LrCgZzugwapzSWHgRaOE7O4Z9dra91XVlEF7DRq/10pYSqt4gXXbOHphkpj
0j7vI68TPsBnD3ACKtSnfnUVC8TQc+xuhNJzDTtv+zWdRVa0hzv39K3BXRPLiBHP
J9At3UodhjSZV1+3hbNe5wRdiKgAa2MhOQlbjhGbr+XIsQj7XwWS+uIq5afGrKrx
/ULeja+iwbuIU0C+rfZHipUTPE0x9RZgUC/qRpIN4AX2dr5W5jm2zXQA6eQfCF3C
qraih8L8b5KRwzfkbKE6uPql8wZ0Py0NEGs7GWn4SyutZf4/tl3htaWWGUGcb/ZO
zIiKLLeJamQregDkOvBehxPPVuNNvtjUYoqPs1d3/FTcUCJuvAKhVW7a+GQ8gnhp
hJvr04kUBwk0zFa9E1XB
=5S+V
-END PGP SIGNATURE-


0xFAC89148.asc
Description: application/pgp-keys
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH 8/8] ath79: all LEDs and buttons for Netgear WNR2000v3

2016-01-30 Thread Hartmut Knaack
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Michal schrieb am 27.01.2016 um 01:44:
> From: Michal Cieslakiewicz 
> 
> This patch provides full GPIO support for WNR2000v3 (LEDs and buttons).
> It exposes all LEDs to operating system, including Ethernet ones.
> 
> Signed-off-by: Michal Cieslakiewicz 
Acked-by: Hartmut Knaack 
> ---

The patch subject should also be prefixed with ar71xx:WNR2000v3: ...
I would recommend to additionally use the following parameters with
git format-patch: --cover-letter -v4

>  target/linux/ar71xx/base-files/etc/board.d/01_leds |  14 +++
>  target/linux/ar71xx/base-files/etc/diag.sh |   1 +
>  .../ar71xx/files/arch/mips/ath79/mach-wnr2000-v3.c | 137 
> +++--
>  3 files changed, 142 insertions(+), 10 deletions(-)
> 
> diff --git a/target/linux/ar71xx/base-files/etc/board.d/01_leds 
> b/target/linux/ar71xx/base-files/etc/board.d/01_leds
> index 151eac2..7374422 100755
> --- a/target/linux/ar71xx/base-files/etc/board.d/01_leds
> +++ b/target/linux/ar71xx/base-files/etc/board.d/01_leds
> @@ -676,6 +676,20 @@ wlae-ag300n)
>   ucidef_set_led_netdev "wireless" "WIRELESS" "buffalo:green:wireless" 
> "wlan0"
>   ;;
>  
> +wnr2000-v3)
> + ucidef_set_led_netdev "wan-amber" "WAN (amber)" "netgear:amber:wan" 
> "eth0"
> + ucidef_set_led_default "wan-green" "WAN (green)" "netgear:green:wan" "0"
> + ucidef_set_led_netdev "wlan" "WLAN" "netgear:blue:wlan" "wlan0"
> + ucidef_set_led_switch "lan1green" "LAN1 (green)" "netgear:green:lan1" 
> "switch0" "0x02"
> + ucidef_set_led_switch "lan2green" "LAN2 (green)" "netgear:green:lan2" 
> "switch0" "0x04"
> + ucidef_set_led_switch "lan3green" "LAN3 (green)" "netgear:green:lan3" 
> "switch0" "0x08"
> + ucidef_set_led_switch "lan4green" "LAN4 (green)" "netgear:green:lan4" 
> "switch0" "0x10"
> + ucidef_set_led_default "lan1amber" "LAN1 (amber)" "netgear:amber:lan1" 
> "0"
> + ucidef_set_led_default "lan2amber" "LAN2 (amber)" "netgear:amber:lan2" 
> "0"
> + ucidef_set_led_default "lan3amber" "LAN3 (amber)" "netgear:amber:lan3" 
> "0"
> + ucidef_set_led_default "lan4amber" "LAN4 (amber)" "netgear:amber:lan4" 
> "0"
> + ;;
> +
>  wnr2000-v4)
>   ucidef_set_led_netdev "wan" "WAN" "netgear:green:wan" "eth0"
>   ucidef_set_led_netdev "wlan" "WLAN" "netgear:blue:wlan" "wlan0"
> diff --git a/target/linux/ar71xx/base-files/etc/diag.sh 
> b/target/linux/ar71xx/base-files/etc/diag.sh
> index c0e73ad..4ee40f7 100644
> --- a/target/linux/ar71xx/base-files/etc/diag.sh
> +++ b/target/linux/ar71xx/base-files/etc/diag.sh
> @@ -368,6 +368,7 @@ get_status_led() {
>   wndr3700v4 | \
>   wndr4300 | \
>   wnr2000 | \
> + wnr2000-v3 |\
>   wnr2200 |\
>   wnr612-v2 |\
>   wnr1000-v2 |\
> diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-wnr2000-v3.c 
> b/target/linux/ar71xx/files/arch/mips/ath79/mach-wnr2000-v3.c
> index ee6b449..b4ca9b1 100644
> --- a/target/linux/ar71xx/files/arch/mips/ath79/mach-wnr2000-v3.c
> +++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-wnr2000-v3.c
> @@ -14,6 +14,7 @@
>  
>  #include 
>  #include 
> +#include  /* PLATFORM_DEVID_AUTO is defined here */
>  
>  #include 
>  #include  /* needed to disable switch LEDs */
> @@ -26,11 +27,25 @@
>  #include "dev-m25p80.h"
>  #include "machtypes.h"
>  
> +/* ar7241 GPIOs */
>  #define WNR2000V3_GPIO_LED_WAN_GREEN 0
>  #define WNR2000V3_GPIO_LED_LAN1_AMBER1
> -#define WNR2000V3_GPIO_LED_LAN4_AMBER12
> -#define WNR2000V3_GPIO_LED_PWR_GREEN 14
> +#define WNR2000V3_GPIO_LED_LAN2_AMBER6
> +#define WNR2000V3_GPIO_LED_WPS_GREEN 7
> +#define WNR2000V3_GPIO_LED_LAN3_AMBER8
>  #define WNR2000V3_GPIO_BTN_WPS   11
> +#define WNR2000V3_GPIO_LED_LAN4_AMBER12
> +#define WNR2000V3_GPIO_LED_LAN1_GREEN13
> +#define WNR2000V3_GPIO_LED_LAN2_GREEN14
> +#define WNR2000V3_GPIO_LED_LAN3_GREEN15
> +#define WNR2000V3_GPIO_LED_LAN4_GREEN16
> +#define WNR2000V3_GPIO_LED_WAN_AMBER 17
> +/* ar9287 GPIOs */
> +#define WNR2000V3_GPIO_WMAC_LED_WLAN_BLUE1
> +#define WNR2000V3_GPIO_WMAC_LED_TEST_AMBER   2
> +#define WNR2000V3_GPIO_WMAC_LED_POWER_GREEN  3
> +#define WNR2000V3_GPIO_WMAC_BTN_RESET8
> +#define WNR2000V3_GPIO_WMAC_BTN_RFKILL   9
>  
>  #define WNR612V2_GPIO_LED_PWR_GREEN  11
>  
> @@ -69,16 +84,67 @@
>  
>  static struct gpio_led wnr2000v3_leds_gpio[] __initdata = {
>   {
> - .name   = "wnr2000v3:green:power",
> - .gpio   = WNR2000V3_GPIO_LED_PWR_GREEN,
> + .name   = "netgear:green:wan",
> + .gpio   = WNR2000V3_GPIO_LED_WAN_GREEN,
>   .active_low = 1,
>   }, {
> - .name   = "wnr2000v3:green:wan",
> - .gpio   = WNR2000V3_GPIO_LED_WAN_GREEN,
> + .name   = "netgear:amber:lan1",
> + .gpio   = WNR2000V3_GPIO_LED

Re: [OpenWrt-Devel] [PATCH 7/8] ath79: fix for random WLAN MAC for WNR2000v3

2016-01-30 Thread Hartmut Knaack
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Michal schrieb am 27.01.2016 um 01:41:
> From: Michal Cieslakiewicz 
> 
> Fix for invalid/random WLAN MAC address in WNR2000v3. Permanent platform MAC
> is calculated and assigned during system startup. WLAN MAC follows wired
> Ethernet interface addresses.
> 
> Signed-off-by: Michal Cieslakiewicz 
Acked-by: Hartmut Knaack 
> ---

I've put some comments inline.
The subject should also be more like: ar71xx: WNR2000v3: fix for random WLAN 
MAC.

>  .../ar71xx/files/arch/mips/ath79/mach-wnr2000-v3.c | 30 
> +-
>  1 file changed, 24 insertions(+), 6 deletions(-)
> 
> diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-wnr2000-v3.c 
> b/target/linux/ar71xx/files/arch/mips/ath79/mach-wnr2000-v3.c
> index 205c2e7..ee6b449 100644
> --- a/target/linux/ar71xx/files/arch/mips/ath79/mach-wnr2000-v3.c
> +++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-wnr2000-v3.c
> @@ -181,7 +181,7 @@ static struct gpio_keys_button wnr2000v3_gpio_keys[] 
> __initdata = {
>   }
>  };
>  
> -static void __init wnr_common_setup(void)
> +static void __init wnr_common_setup(u8 *wmac_addr)
>  {
>   u8 *art = (u8 *) KSEG1ADDR(0x1fff);
>  
> @@ -200,12 +200,30 @@ static void __init wnr_common_setup(void)
>   ath79_register_eth(1);
>  
>   ath79_register_m25p80(NULL);
> - ap91_pci_init(art + WNR2000V3_PCIE_CALDATA_OFFSET, NULL);
> + ap91_pci_init(art + WNR2000V3_PCIE_CALDATA_OFFSET, wmac_addr);
>  }
>  
>  static void __init wnr2000v3_setup(void)
>  {
> - wnr_common_setup();
> + u8 *art = (u8 *) KSEG1ADDR(0x1fff);
> + u8 wlan_mac_addr[6];
> + u8 *eth0_mac_addr = (u8 *) (art + WNR2000V3_MAC0_OFFSET);
> + u8 *eth1_mac_addr = (u8 *) (art + WNR2000V3_MAC1_OFFSET);
> +
> + /*
> +  * For WNR2000v3 ART flash area used for wlan MAC is usually empty 
> (0xff)
> +  * so ath9k driver uses random MAC instead each time module is loaded.
> +  * To fix that, assign permanent wlan MAC equal to ethN's MAC plus 1,
> +  * so network interfaces get sequential addresses.
> +  */
> + memcpy(wlan_mac_addr, eth0_mac_addr, sizeof(wlan_mac_addr));
> + wlan_mac_addr[5] = (eth0_mac_addr[5] > eth1_mac_addr[5] ?
> +eth0_mac_addr[5] : eth1_mac_addr[5]) + 1;

This could benefit from the max macro
http://lxr.free-electrons.com/source/include/linux/kernel.h#L727

> +
> + /* Avoid potential conflict in case: max(0xff,0x00)+1==0x00 */
> + if (!wlan_mac_addr[5]) wlan_mac_addr[5] = 1;

Please put the second part in a new line.

> +
> + wnr_common_setup(wlan_mac_addr);
>  
>   ath79_register_leds_gpio(-1, ARRAY_SIZE(wnr2000v3_leds_gpio),
>wnr2000v3_leds_gpio);
> @@ -219,7 +237,7 @@ MIPS_MACHINE(ATH79_MACH_WNR2000_V3, "WNR2000V3", "NETGEAR 
> WNR2000 V3", wnr2000v3
>  
>  static void __init wnr612v2_setup(void)
>  {
> - wnr_common_setup();
> + wnr_common_setup(NULL);
>  
>   ath79_register_leds_gpio(-1, ARRAY_SIZE(wnr612v2_leds_gpio),
>wnr612v2_leds_gpio);
> @@ -229,7 +247,7 @@ MIPS_MACHINE(ATH79_MACH_WNR612_V2, "WNR612V2", "NETGEAR 
> WNR612 V2", wnr612v2_set
>  
>  static void __init wnr1000v2_setup(void)
>  {
> - wnr_common_setup();
> + wnr_common_setup(NULL);
>  
>   ath79_register_leds_gpio(-1, ARRAY_SIZE(wnr1000v2_leds_gpio),
>wnr1000v2_leds_gpio);
> @@ -247,7 +265,7 @@ static void __init wpn824n_setup(void)
> AR724X_GPIO_FUNC_ETH_SWITCH_LED4_EN |
> AR724X_GPIO_FUNC_CLK_OBS3_EN);
>  
> - wnr_common_setup();
> + wnr_common_setup(NULL);
>  
>   ath79_register_leds_gpio(-1, ARRAY_SIZE(wpn824n_leds_gpio),
>wpn824n_leds_gpio);
> 

-BEGIN PGP SIGNATURE-
Version: GnuPG v2

iQIcBAEBCAAGBQJWrQNRAAoJEANoShj6yJFIZYkP+gKbiHX8jozsojxWzmhFyjiQ
v1Tzr64/QABNtAOnHbMgYaVNdqdDGKKdHAOZG9PYQmiBxKGXe4Rk3ESyRvljFgDJ
g9ntn/ZwL8thxSZmYz2IDw6+tD5N9qOIhzDwekhmT6v3Z50fI6yxbkpNeaad1iu+
+zEyrM9rR6P3bH9JAUGHEWqqRp47WDR9E/AaisRymNJm00os0/69+MXi7Ky4DGHo
uXBckLgsA7ynyrFwwoK8q932byPSl6F5aA5ATBARBEbNfn5mvzVXspzbDMOvydva
NvItIKd4qM295dkRGI+dFZRJTjbIAQBPomOzb7K8imSoa+Xwxz0tcHNMUJB3WnX6
YxgWg1Fy3TSmHQbfUUgvf1TgLqYZriz1bW21tO2s5rBPV++NAb6+5VzSaxI4LK6w
wPBHaPbhV8QlppYnET5OWYJsblVnYpoXYzjfcXizNtqMPdVxmsOKg4O8YFfgnYqj
10+Q8WbgBRaMbQHTqTbn7FKHTt5yDG8tSG2dGRu6wYTRc3iGlsjXtslFPs2ToFJD
xabvr7T8VSbW7yABVyg6xIawzUen8Gns9xXL25bVMsHKJsPL4Y07f4t69/XwzqaW
3XBGya0VPd34FPolXu8P3MxRaGS98MTgJjjG485KopZLlh7HyF3f9kIc6w+1YvCj
oI6VOu1YOGj4z09wWjYU
=ALoI
-END PGP SIGNATURE-


0xFAC89148.asc
Description: application/pgp-keys
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH 6/8] package: exclude USB modules from WNR2000v3 image

2016-01-30 Thread Hartmut Knaack
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Michal schrieb am 27.01.2016 um 01:40:
> From: Michal Cieslakiewicz 
> 
> Netgear WNR2000v3 has no USB port yet default system image
> includes USB kernel modules. This patch fixes that.
> 
> Signed-off-by: Michal Cieslakiewicz 
Acked-by: Hartmut Knaack 
> ---

Better subject of this patch would be ar71xx: WNR2000v3: exclude USB modules 
form image.

>  target/linux/ar71xx/generic/profiles/netgear.mk | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/target/linux/ar71xx/generic/profiles/netgear.mk 
> b/target/linux/ar71xx/generic/profiles/netgear.mk
> index ca22a18..0b05adf 100644
> --- a/target/linux/ar71xx/generic/profiles/netgear.mk
> +++ b/target/linux/ar71xx/generic/profiles/netgear.mk
> @@ -30,6 +30,7 @@ $(eval $(call Profile,WNDR3700))
>  
>  define Profile/WNR2000V3
>   NAME:=NETGEAR WNR2000V3
> + PACKAGES:=
>  endef
>  
>  define Profile/WNR2000V3/Description
> 

-BEGIN PGP SIGNATURE-
Version: GnuPG v2

iQIcBAEBCAAGBQJWrQGNAAoJEANoShj6yJFIhacP/21YH27mixs3INbjYTISQys+
Sxp/l9uIWzEaVDfvMmGoirmwzt7DUuUGEDhQziWCT+Q1/ce/moL+Yu8lkz2zRwuR
1XmikhNnwP11B0Xbw3KJNNitjUe/SYtqkmhrmrIO2B+eANk05fK4zZYQigVFHxFK
X/vGjnG0ivZY+ofDEhlFn36mfTQi1LRxOlCderMSLRdrclNX/3n7Q7eMOxWQKG2m
XQ9LPQ7IM67QiWQIk9iHY/FH37HrLf+iim1/kjdHv0zVz6LK5p80ch/b+EWmNR3c
bjwGeJQTLdmu6kXgebWuUlygwFJIp/bDU0qGeJAondgzefz8ugi60v87rpPXtIyj
R3/mb9kn11D8tD5hpBJJMIYM/thZrxgw1TPmN/pQ2pSGx/mv1+wwcNUDpw5xh3Jb
wyN6Wp+zO38i+PfBPS+5X8FfJA12G04IvtJfAOIYWMNo3VMw09KHm26aPYrK1NeO
K/iSs47x0YI07ug8qiATTzr545Opk9M35Fwhxv3Px28hk8P6Jh+VglyDlIgJf5i5
YPa7YXDZvb1bm+QOH0m4gPhgt6LdAbPCDnbjVC0LMnqpQJ8XiceVmGk09HPsWWfi
1TLzXutNaf3rd3WzfO+f9kVTX0t5KwcFowdvRRvZ28C+BJrOxipJx+TO4JgFu15H
lx95qx0NVw6hGK4P3W1a
=We1d
-END PGP SIGNATURE-


0xFAC89148.asc
Description: application/pgp-keys
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCHv3 5/8] ath9k: enable GPIO buttons

2016-01-30 Thread Hartmut Knaack
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Michal schrieb am 28.01.2016 um 23:32:
> From: Michal Cieslakiewicz 
> 
> Enable platform-defined GPIO button support for ath9k device. Key poller
> is activated for attached platform buttons. Requires ath9k GPIO chip access.
> 
> Signed-off-by: Michal Cieslakiewicz 
Acked-by: Hartmut Knaack 
> ---
> 

A few minor comments inline.

> (Minor code cleanup - dummy init/deinit functions changed to static inline)
> 
>  .../patches/550-ath9k_enable_gpio_buttons.patch| 164 
> +
>  .../ar71xx/files/arch/mips/ath79/dev-ap9x-pci.c|  18 +++
>  .../ar71xx/files/arch/mips/ath79/dev-ap9x-pci.h|   7 +
>  .../generic/files/include/linux/ath9k_platform.h   |   4 +
>  4 files changed, 193 insertions(+)
>  create mode 100644 
> package/kernel/mac80211/patches/550-ath9k_enable_gpio_buttons.patch
> 
> diff --git 
> a/package/kernel/mac80211/patches/550-ath9k_enable_gpio_buttons.patch 
> b/package/kernel/mac80211/patches/550-ath9k_enable_gpio_buttons.patch
> new file mode 100644
> index 000..01d0ade
> --- /dev/null
> +++ b/package/kernel/mac80211/patches/550-ath9k_enable_gpio_buttons.patch
> @@ -0,0 +1,164 @@
> +--- a/drivers/net/wireless/ath/ath9k/ath9k.h
>  b/drivers/net/wireless/ath/ath9k/ath9k.h
> +@@ -825,6 +825,13 @@ int ath_create_gpio_led(struct ath_softc
> + void ath9k_register_gpio_chip(struct ath_softc *sc);
> + void ath9k_unregister_gpio_chip(struct ath_softc *sc);
> + 
> ++/**/
> ++/*  GPIO Buttons  */
> ++/**/
> ++
> ++void ath9k_init_buttons(struct ath_softc *sc);
> ++void ath9k_deinit_buttons(struct ath_softc *sc);
> ++
> + #else
> + static inline void ath_init_leds(struct ath_softc *sc)
> + {
> +@@ -843,6 +850,13 @@ static inline void ath9k_register_gpio_c
> + static inline void ath9k_unregister_gpio_chip(struct ath_softc *sc)
> + {
> + }
> ++
> ++static inline void ath9k_init_buttons(struct ath_softc *sc)
> ++{
> ++}

I would leave an empty line here, too.

> ++static inline void ath9k_deinit_buttons(struct ath_softc *sc)
> ++{
> ++}
> + #endif
> + 
> + //
> +@@ -1039,6 +1053,7 @@ struct ath_softc {
> + const char *led_default_trigger;
> + struct list_head leds;
> + struct ath9k_gpio_chip *gpiochip;
> ++struct platform_device *btnpdev;/* gpio-keys-polled */
> + #endif
> + 
> + #ifdef CPTCFG_ATH9K_DEBUGFS
> +--- a/drivers/net/wireless/ath/ath9k/gpio.c
>  b/drivers/net/wireless/ath/ath9k/gpio.c
> +@@ -24,6 +24,8 @@
> + #ifdef CPTCFG_MAC80211_LEDS
> + 
> + #include 
> ++#include 
> ++#include 
> + 
> + static void ath_led_brightness(struct led_classdev *led_cdev,
> +enum led_brightness brightness)
> +@@ -308,6 +310,83 @@ void ath9k_unregister_gpio_chip(struct a
> + sc->gpiochip = NULL;
> + }
> + 
> ++/**/
> ++/*  GPIO Buttons  */
> ++/**/
> ++
> ++/* add GPIO buttons */
> ++void ath9k_init_buttons(struct ath_softc *sc)
> ++{
> ++struct ath9k_platform_data *pdata = sc->dev->platform_data;
> ++struct platform_device *pdev;
> ++struct gpio_keys_platform_data gkpdata;
> ++struct gpio_keys_button *bt;
> ++int i;
> ++
> ++if (!sc->gpiochip)
> ++return;
> ++
> ++bt = kmemdup(pdata->btns,
> ++ pdata->num_btns * sizeof(struct gpio_keys_button),
> ++ GFP_KERNEL);
> ++

I would drop this empty line.

> ++if (!bt)
> ++return;
> ++
> ++pdev = platform_device_alloc("gpio-keys-polled", PLATFORM_DEVID_AUTO);
> ++

And this one, too.

> ++if (!pdev)
> ++goto err_bt_free;
> ++
> ++for (i = 0; i < pdata->num_btns; i++) {
> ++ath9k_hw_cfg_gpio_input(sc->sc_ah, pdata->btns[i].gpio);
> ++bt[i].gpio = sc->gpiochip->gchip.base + pdata->btns[i].gpio;
> ++}
> ++
> ++memset(&gkpdata, 0, sizeof(struct gpio_keys_platform_data));
> ++gkpdata.buttons = bt;
> ++gkpdata.nbuttons = pdata->num_btns;
> ++gkpdata.poll_interval = pdata->btn_poll_interval;
> ++
> ++if (platform_device_add_data(pdev, &gkpdata, sizeof(gkpdata)))
> ++goto err_pdev_put;
> ++
> ++if (platform_device_add(pdev))
> ++goto err_pdev_put;
> ++
> ++sc->btnpdev = pdev;
> ++
> ++return;
> ++
> ++err_pdev_put:
> ++platform_device_put(pdev);
> ++
> ++err_bt_free:
> ++kfree(bt);
> ++}
> ++
> ++/* remove GPIO buttons */
> ++void ath9k_deinit_buttons(struct ath_softc *sc)
> ++{
> ++struct gpio_keys_platform_data *gkpdata;
> ++struct gpio_keys_button *bt = NULL;
> ++
> ++if (!sc->gpiochip || !sc->btnpdev)
> ++return;
> ++
> ++gkpdata = sc->btnpdev->dev.platform_data;
> ++if (gkpdata)
> ++bt = gkpdata->buttons;
> ++
> ++platform_device_del(sc->btnpdev);
> ++platform_device_put(sc->btnpdev);
> ++
> ++sc->btnpdev = NULL;
> ++
> ++if (bt)
> ++kfree(bt);
> ++}
> ++
> + #endif
> + 
> + /***

Re: [OpenWrt-Devel] [PATCHv2 4/8] ath9k: enable access to GPIO

2016-01-30 Thread Hartmut Knaack
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Michal schrieb am 27.01.2016 um 20:29:
> From: Michal Cieslakiewicz 
> 
> Enable access to GPIO chip and its pins for Atheros AR92xx
> wireless devices. For now AR9285 and AR9287 are supported.
> 
> Signed-off-by: Michal Cieslakiewicz 
Acked-by: Hartmut Knaack 
> ---
> 
> (Removed unneeded pdata pointer check in ath9k_register_gpio_chip() function)
> 

I've put some suggestions about where to have empty lines and where not inline.

>  .../patches/549-ath9k_enable_gpio_chip.patch   | 229 
> +
>  1 file changed, 229 insertions(+)
>  create mode 100644 
> package/kernel/mac80211/patches/549-ath9k_enable_gpio_chip.patch
> 
> diff --git a/package/kernel/mac80211/patches/549-ath9k_enable_gpio_chip.patch 
> b/package/kernel/mac80211/patches/549-ath9k_enable_gpio_chip.patch
> new file mode 100644
> index 000..d49c80f
> --- /dev/null
> +++ b/package/kernel/mac80211/patches/549-ath9k_enable_gpio_chip.patch
> @@ -0,0 +1,229 @@
> +--- a/drivers/net/wireless/ath/ath9k/ath9k.h
>  b/drivers/net/wireless/ath/ath9k/ath9k.h
> +@@ -24,6 +24,7 @@
> + #include 
> + #include 
> + #include 
> ++#include 
> + 
> + #include "common.h"
> + #include "debug.h"
> +@@ -817,6 +818,13 @@ void ath_fill_led_pin(struct ath_softc *
> + int ath_create_gpio_led(struct ath_softc *sc, int gpio, const char *name,
> + const char *trigger, bool active_low);
> + 
> ++/***/
> ++/*  GPIO Chip  */
> ++/***/
> ++
> ++void ath9k_register_gpio_chip(struct ath_softc *sc);
> ++void ath9k_unregister_gpio_chip(struct ath_softc *sc);
> ++
> + #else
> + static inline void ath_init_leds(struct ath_softc *sc)
> + {
> +@@ -828,6 +836,13 @@ static inline void ath_deinit_leds(struc
> + static inline void ath_fill_led_pin(struct ath_softc *sc)
> + {
> + }
> ++
> ++static inline void ath9k_register_gpio_chip(struct ath_softc *sc)
> ++{
> ++}

I would leave an empty line here.

> ++static inline void ath9k_unregister_gpio_chip(struct ath_softc *sc)
> ++{
> ++}
> + #endif
> + 
> + //
> +@@ -963,6 +978,12 @@ struct ath_led {
> + struct led_classdev cdev;
> + };
> + 
> ++struct ath9k_gpio_chip {
> ++struct ath_softc *sc;
> ++char label[32];
> ++struct gpio_chip gchip;
> ++};
> ++
> + struct ath_softc {
> + struct ieee80211_hw *hw;
> + struct device *dev;
> +@@ -1017,6 +1038,7 @@ struct ath_softc {
> + #ifdef CPTCFG_MAC80211_LEDS
> + const char *led_default_trigger;
> + struct list_head leds;
> ++struct ath9k_gpio_chip *gpiochip;
> + #endif
> + 
> + #ifdef CPTCFG_ATH9K_DEBUGFS
> +--- a/drivers/net/wireless/ath/ath9k/gpio.c
>  b/drivers/net/wireless/ath/ath9k/gpio.c
> +@@ -22,6 +22,9 @@
> + //
> + 
> + #ifdef CPTCFG_MAC80211_LEDS
> ++
> ++#include 
> ++
> + static void ath_led_brightness(struct led_classdev *led_cdev,
> +enum led_brightness brightness)
> + {
> +@@ -60,6 +63,10 @@ static int ath_add_led(struct ath_softc
> + else
> + ath9k_hw_set_gpio(sc->sc_ah, gpio->gpio, gpio->active_low);
> + 
> ++/* If there is GPIO chip configured, reserve LED pin */
> ++if (sc->gpiochip)
> ++gpio_request(sc->gpiochip->gchip.base + gpio->gpio, gpio->name);
> ++
> + return 0;
> + }
> + 
> +@@ -116,6 +123,9 @@ void ath_deinit_leds(struct ath_softc *s
> + 
> + while (!list_empty(&sc->leds)) {
> + led = list_first_entry(&sc->leds, struct ath_led, list);
> ++/* If there is GPIO chip configured, free LED pin */
> ++if (sc->gpiochip)
> ++gpio_free(sc->gpiochip->gchip.base + led->gpio->gpio);
> + list_del(&led->list);
> + ath_led_brightness(&led->cdev, LED_OFF);
> + led_classdev_unregister(&led->cdev);
> +@@ -186,6 +196,118 @@ void ath_fill_led_pin(struct ath_softc *
> + /* LED off, active low */
> + ath9k_hw_set_gpio(ah, ah->led_pin, (ah->config.led_active_high) ? 0 : 
> 1);
> + }
> ++
> ++/***/
> ++/*  GPIO Chip  */
> ++/***/
> ++
> ++/* gpio_chip handler : set GPIO to input */
> ++static int ath9k_gpio_pin_cfg_input(struct gpio_chip *chip, unsigned offset)
> ++{
> ++struct ath9k_gpio_chip *gc = container_of(chip, struct ath9k_gpio_chip,
> ++  gchip);
> ++
> ++ath9k_hw_cfg_gpio_input(gc->sc->sc_ah, offset);
> ++
> ++return 0;
> ++}
> ++
> ++/* gpio_chip handler : set GPIO to output */
> ++static int ath9k_gpio_pin_cfg_output(struct gpio_chip *chip, unsigned 
> offset,
> ++ int value)
> ++{
> ++struct ath9k_gpio_chip *gc = container_of(chip, struct ath9k_gpio_chip,
> ++  gchip);
> ++
> ++ath9k_hw_cfg_output(gc->sc->sc_ah, offset,
> ++AR_GPIO_OUTPUT_MUX_AS_OUTPUT);
> ++ath9k_hw_set_gpio(gc->sc->sc_ah, offset, value);

Re: [OpenWrt-Devel] [PATCH 1/8] ath9k: enable platform WLAN LED name

2016-01-30 Thread Hartmut Knaack
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Michal schrieb am 27.01.2016 um 01:33:
> From: Michal Cieslakiewicz 
> 
> Enable platform-supplied WLAN LED name for ath9k device.
> 
> Signed-off-by: Michal Cieslakiewicz 
Acked-by: Hartmut Knaack 
> ---

Looking good overall. I also used this patch series to build
images for the WPN824N to test button support, connected via
the AR9285 GPIOs - no complains.
One very minor detail about the patch subject: it would be
good to prefix even with mac80211: ath9k: enable platform...
It is also good practice to add a description and your
Signed-off-by to the package patches. Many people don't seem
to have done this, as well, but it makes life easier for the
one who will eventually send these patches upstream.

>  .../patches/546-ath9k_platform_led_name.patch  | 35 
> ++
>  .../ar71xx/files/arch/mips/ath79/dev-ap9x-pci.c| 12 
>  .../ar71xx/files/arch/mips/ath79/dev-ap9x-pci.h|  3 ++
>  .../generic/files/include/linux/ath9k_platform.h   |  1 +
>  4 files changed, 51 insertions(+)
>  create mode 100644 
> package/kernel/mac80211/patches/546-ath9k_platform_led_name.patch
> 
> diff --git 
> a/package/kernel/mac80211/patches/546-ath9k_platform_led_name.patch 
> b/package/kernel/mac80211/patches/546-ath9k_platform_led_name.patch
> new file mode 100644
> index 000..04e312d
> --- /dev/null
> +++ b/package/kernel/mac80211/patches/546-ath9k_platform_led_name.patch
> @@ -0,0 +1,35 @@
> +--- a/drivers/net/wireless/ath/ath9k/gpio.c
>  b/drivers/net/wireless/ath/ath9k/gpio.c
> +@@ -132,15 +132,19 @@ void ath_init_leds(struct ath_softc *sc)
> + if (AR_SREV_9100(sc->sc_ah))
> + return;
> + 
> +-snprintf(led_name, sizeof(led_name), "ath9k-%s",
> +- wiphy_name(sc->hw->wiphy));
> ++if (pdata && pdata->led_name)
> ++strncpy(led_name, pdata->led_name, sizeof(led_name));
> ++else
> ++snprintf(led_name, sizeof(led_name), "ath9k-%s",
> ++ wiphy_name(sc->hw->wiphy));
> + 
> + if (ath9k_led_blink)
> + trigger = sc->led_default_trigger;
> + else
> + trigger = ieee80211_get_radio_led_name(sc->hw);
> + 
> +-ath_create_gpio_led(sc, sc->sc_ah->led_pin, led_name, trigger, 
> !sc->sc_ah->config.led_active_high);
> ++ath_create_gpio_led(sc, sc->sc_ah->led_pin, led_name, trigger,
> ++!sc->sc_ah->config.led_active_high);
> + 
> + if (!pdata)
> + return;
> +--- a/include/linux/ath9k_platform.h
>  b/include/linux/ath9k_platform.h
> +@@ -45,6 +45,7 @@ struct ath9k_platform_data {
> + 
> + int num_leds;
> + const struct gpio_led *leds;
> ++const char *led_name;
> + };
> + 
> + #endif /* _LINUX_ATH9K_PLATFORM_H */
> diff --git a/target/linux/ar71xx/files/arch/mips/ath79/dev-ap9x-pci.c 
> b/target/linux/ar71xx/files/arch/mips/ath79/dev-ap9x-pci.c
> index d382453..bf80d4d 100644
> --- a/target/linux/ar71xx/files/arch/mips/ath79/dev-ap9x-pci.c
> +++ b/target/linux/ar71xx/files/arch/mips/ath79/dev-ap9x-pci.c
> @@ -39,6 +39,18 @@ __init void ap9x_pci_setup_wmac_led_pin(unsigned wmac, int 
> pin)
>   }
>  }
>  
> +__init void ap9x_pci_setup_wmac_led_name(unsigned wmac, const char *led_name)
> +{
> + switch (wmac) {
> + case 0:
> + ap9x_wmac0_data.led_name = led_name;
> + break;
> + case 1:
> + ap9x_wmac1_data.led_name = led_name;
> + break;
> + }
> +}
> +
>  __init struct ath9k_platform_data *ap9x_pci_get_wmac_data(unsigned wmac)
>  {
>   switch (wmac) {
> diff --git a/target/linux/ar71xx/files/arch/mips/ath79/dev-ap9x-pci.h 
> b/target/linux/ar71xx/files/arch/mips/ath79/dev-ap9x-pci.h
> index ad288cb..dcfe541 100644
> --- a/target/linux/ar71xx/files/arch/mips/ath79/dev-ap9x-pci.h
> +++ b/target/linux/ar71xx/files/arch/mips/ath79/dev-ap9x-pci.h
> @@ -19,6 +19,7 @@ void ap9x_pci_setup_wmac_led_pin(unsigned wmac, int pin);
>  void ap9x_pci_setup_wmac_gpio(unsigned wmac, u32 mask, u32 val);
>  void ap9x_pci_setup_wmac_leds(unsigned wmac, struct gpio_led *leds,
> int num_leds);
> +void ap9x_pci_setup_wmac_led_name(unsigned wmac, const char *led_name);
>  struct ath9k_platform_data *ap9x_pci_get_wmac_data(unsigned wmac);
>  
>  void ap91_pci_init(u8 *cal_data, u8 *mac_addr);
> @@ -33,6 +34,8 @@ static inline void ap9x_pci_setup_wmac_gpio(unsigned wmac,
>  static inline void ap9x_pci_setup_wmac_leds(unsigned wmac,
>   struct gpio_led *leds,
>   int num_leds) {}
> +static inline void ap9x_pci_setup_wmac_led_name(unsigned wmac,
> + const char *led_name) {}
>  static inline struct ath9k_platform_data *ap9x_pci_get_wmac_data(unsigned 
> wmac)
>  {
>   return NULL;
> diff --git a/target/linux/generic/files/include/linux/ath9k_platform.h 
> b/target/linux/generic/files/include/

[OpenWrt-Devel] [CC 15.05] [PATCH] malta: add harddisk support

2016-01-30 Thread Vincent Fortier
Is it possible to backport commit r46269 (3c298f89-4303-0410-b956-a3cf2f4a3e73) 
to CC 15.05 in order to provide harddisk support.

Backporting tested (info available at: 
https://forum.openwrt.org/viewtopic.php?id=62389).

Thnx in advance!

Here is the original patch from trunk:
>From 76bfcd46bd55263947461e40bd02047922755c72 Mon Sep 17 00:00:00 2001
From: blogic 
Date: Wed, 8 Jul 2015 14:25:36 +
Subject: [PATCH] malta: add harddisk support

works with:
qemu-system-mipsel -M malta \
-hda openwrt-malta-le-root.ext4 \
-kernel openwrt-malta-le-vmlinux.elf \
-nographic -append "root=/dev/sda console=ttyS0"

Signed-off-by: Dirk Neukirchen 

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@46269 
3c298f89-4303-0410-b956-a3cf2f4a3e73
---
 target/linux/malta/config-3.18 | 4 
 1 file changed, 4 insertions(+)

diff --git a/target/linux/malta/config-3.18 b/target/linux/malta/config-3.18
index d9757de..daf3b25 100644
--- a/target/linux/malta/config-3.18
+++ b/target/linux/malta/config-3.18
@@ -7,6 +7,8 @@ CONFIG_ARCH_MIGHT_HAVE_PC_PARPORT=y
 CONFIG_ARCH_MIGHT_HAVE_PC_SERIO=y
 CONFIG_ARCH_WANT_IPC_PARSE_VERSION=y
 # CONFIG_AX88796_93CX6 is not set
+CONFIG_ATA=y
+CONFIG_ATA_PIIX=y
 CONFIG_BLK_DEV_BSG=y
 CONFIG_BLK_DEV_BSGLIB=y
 # CONFIG_BLK_DEV_DM is not set
@@ -15,6 +17,7 @@ CONFIG_BLK_DEV_BSGLIB=y
 CONFIG_BLK_DEV_RAM=y
 CONFIG_BLK_DEV_RAM_COUNT=16
 CONFIG_BLK_DEV_RAM_SIZE=4096
+CONFIG_BLK_DEV_SD=y
 CONFIG_BOARD_SCACHE=y
 CONFIG_BOOT_ELF32=y
 CONFIG_BOUNCE=y
@@ -52,6 +55,7 @@ CONFIG_DNOTIFY=y
 CONFIG_DUMMY_CONSOLE=y
 CONFIG_EARLY_PRINTK=y
 CONFIG_ENABLE_MUST_CHECK=y
+CONFIG_EXT4_FS=y
 CONFIG_FIRMWARE_IN_KERNEL=y
 CONFIG_FS_POSIX_ACL=y
 CONFIG_GENERIC_ATOMIC64=y
-- 
2.7.0.rc3
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [CC 15.05] [PATCH] Backport - malta: add harddisk support

2016-01-30 Thread Vincent Fortier
Is it possible to backport commit r46269 (3c298f89-4303-0410-b956-a3cf2f4a3e73) 
to CC 15.05 in order to provide harddisk support.

Backporting tested (info available at: 
https://forum.openwrt.org/viewtopic.php?id=62389).

Thnx in advance!

Here is the original patch from trunk:
>From 76bfcd46bd55263947461e40bd02047922755c72 Mon Sep 17 00:00:00 2001
From: blogic 
Date: Wed, 8 Jul 2015 14:25:36 +
Subject: [PATCH] malta: add harddisk support

works with:
qemu-system-mipsel -M malta \
-hda openwrt-malta-le-root.ext4 \
-kernel openwrt-malta-le-vmlinux.elf \
-nographic -append "root=/dev/sda console=ttyS0"

Signed-off-by: Dirk Neukirchen 

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@46269 
3c298f89-4303-0410-b956-a3cf2f4a3e73
---
 target/linux/malta/config-3.18 | 4 
 1 file changed, 4 insertions(+)

diff --git a/target/linux/malta/config-3.18 b/target/linux/malta/config-3.18
index d9757de..daf3b25 100644
--- a/target/linux/malta/config-3.18
+++ b/target/linux/malta/config-3.18
@@ -7,6 +7,8 @@ CONFIG_ARCH_MIGHT_HAVE_PC_PARPORT=y
 CONFIG_ARCH_MIGHT_HAVE_PC_SERIO=y
 CONFIG_ARCH_WANT_IPC_PARSE_VERSION=y
 # CONFIG_AX88796_93CX6 is not set
+CONFIG_ATA=y
+CONFIG_ATA_PIIX=y
 CONFIG_BLK_DEV_BSG=y
 CONFIG_BLK_DEV_BSGLIB=y
 # CONFIG_BLK_DEV_DM is not set
@@ -15,6 +17,7 @@ CONFIG_BLK_DEV_BSGLIB=y
 CONFIG_BLK_DEV_RAM=y
 CONFIG_BLK_DEV_RAM_COUNT=16
 CONFIG_BLK_DEV_RAM_SIZE=4096
+CONFIG_BLK_DEV_SD=y
 CONFIG_BOARD_SCACHE=y
 CONFIG_BOOT_ELF32=y
 CONFIG_BOUNCE=y
@@ -52,6 +55,7 @@ CONFIG_DNOTIFY=y
 CONFIG_DUMMY_CONSOLE=y
 CONFIG_EARLY_PRINTK=y
 CONFIG_ENABLE_MUST_CHECK=y
+CONFIG_EXT4_FS=y
 CONFIG_FIRMWARE_IN_KERNEL=y
 CONFIG_FS_POSIX_ACL=y
 CONFIG_GENERIC_ATOMIC64=y
-- 
2.7.0.rc3
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH] Added support for TL-WA801NDv3

2016-01-30 Thread Tiziano Bacocco
Signed-off-by: Tiziano Bacocco 
---
 .../linux/ar71xx/base-files/etc/board.d/02_network |   3 +-
 target/linux/ar71xx/base-files/lib/ar71xx.sh   |   3 +
 target/linux/ar71xx/config-4.1 |   1 +
 .../ar71xx/files/arch/mips/ath79/Kconfig.openwrt   |   9 +-
 target/linux/ar71xx/files/arch/mips/ath79/Makefile |   1 +
 .../files/arch/mips/ath79/mach-tl-wa801nd-v3.c | 136 +
 .../linux/ar71xx/files/arch/mips/ath79/machtypes.h |   3 +-
 target/linux/ar71xx/image/Makefile |   9 +-
 tools/firmware-utils/src/mktplinkfw.c  |   7 +-
 9 files changed, 167 insertions(+), 5 deletions(-)
 create mode 100644 
target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wa801nd-v3.c

diff --git a/target/linux/ar71xx/base-files/etc/board.d/02_network 
b/target/linux/ar71xx/base-files/etc/board.d/02_network
index 51a1b64..e12367c 100755
--- a/target/linux/ar71xx/base-files/etc/board.d/02_network
+++ b/target/linux/ar71xx/base-files/etc/board.d/02_network
@@ -370,7 +370,8 @@ cap324)
ucidef_set_interface_lan "eth0" "dhcp"
;;
 
-arduino-yun | \
+arduino-yun |\
+tl-wa801nd-v3 |\
 dir-505-a1)
ucidef_set_interface_lan "eth1"
;;
diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh 
b/target/linux/ar71xx/base-files/lib/ar71xx.sh
index 34d5741..e5b7fec 100755
--- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
+++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh
@@ -824,6 +824,9 @@ ar71xx_board_detect() {
*"TL-WA801ND v2")
name="tl-wa801nd-v2"
;;
+   *"TL-WA801ND v3")
+   name="tl-wa801nd-v3"
+   ;;
*TL-WA901ND)
name="tl-wa901nd"
;;
diff --git a/target/linux/ar71xx/config-4.1 b/target/linux/ar71xx/config-4.1
index fe1dd68..627ae5d 100644
--- a/target/linux/ar71xx/config-4.1
+++ b/target/linux/ar71xx/config-4.1
@@ -134,6 +134,7 @@ CONFIG_ATH79_MACH_TL_MR3020=y
 CONFIG_ATH79_MACH_TL_MR3X20=y
 CONFIG_ATH79_MACH_TL_WA701ND_V2=y
 CONFIG_ATH79_MACH_TL_WA7210N_V2=y
+CONFIG_ATH79_MACH_TL_WA801ND_V3=y
 CONFIG_ATH79_MACH_TL_WA830RE_V2=y
 CONFIG_ATH79_MACH_TL_WA901ND=y
 CONFIG_ATH79_MACH_TL_WA901ND_V2=y
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt 
b/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt
index da26414..069d338 100644
--- a/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt
+++ b/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt
@@ -1090,7 +1090,14 @@ config ATH79_MACH_TL_WA7210N_V2
select ATH79_DEV_GPIO_BUTTONS
select ATH79_DEV_M25P80
select ATH79_DEV_WMAC
-
+config ATH79_MACH_TL_WA801ND_V3
+   bool "TP-LINK TL-WA801ND v3 support"
+   select SOC_QCA953X
+   select ATH79_DEV_ETH
+   select ATH79_DEV_GPIO_BUTTONS
+   select ATH79_DEV_LEDS_GPIO
+   select ATH79_DEV_M25P80
+   select ATH79_DEV_WMAC
 config ATH79_MACH_TL_WA830RE_V2
bool "TP-LINK TL-WA830RE v2 support"
select SOC_AR934X
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/Makefile 
b/target/linux/ar71xx/files/arch/mips/ath79/Makefile
index 991f6f2..ac82a63 100644
--- a/target/linux/ar71xx/files/arch/mips/ath79/Makefile
+++ b/target/linux/ar71xx/files/arch/mips/ath79/Makefile
@@ -143,6 +143,7 @@ obj-$(CONFIG_ATH79_MACH_TL_WAX50RE) += mach-tl-wax50re.o
 obj-$(CONFIG_ATH79_MACH_TL_WA701ND_V2) += mach-tl-wa701nd-v2.o
 obj-$(CONFIG_ATH79_MACH_TL_WA7210N_V2) += mach-tl-wa7210n-v2.o
 obj-$(CONFIG_ATH79_MACH_TL_WA830RE_V2) += mach-tl-wa830re-v2.o
+obj-$(CONFIG_ATH79_MACH_TL_WA801ND_V3)  += mach-tl-wa801nd-v3.o
 obj-$(CONFIG_ATH79_MACH_TL_WA901ND)+= mach-tl-wa901nd.o
 obj-$(CONFIG_ATH79_MACH_TL_WA901ND_V2) += mach-tl-wa901nd-v2.o
 obj-$(CONFIG_ATH79_MACH_TL_WDR3320_V2)  += mach-tl-wdr3320-v2.o
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wa801nd-v3.c 
b/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wa801nd-v3.c
new file mode 100644
index 000..39cdb10
--- /dev/null
+++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wa801nd-v3.c
@@ -0,0 +1,136 @@
+/*
+ *  TP-LINK TL-WA801ND v3 adapted from TP-LINK TL-WR841N/ND v9
+ *
+ *  Copyright (C) 2014 Matthias Schiffer 
+ *  Copyright (C) 2016 Tiziano Bacocco 
+ *
+ *  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 
+
+#include "common.h"
+#include "dev-eth.h"
+#include "dev-gpio-buttons.h"
+#include "dev-leds-gpio.h"
+#include "dev-m25p80.h"
+#include "dev-wmac.h"
+#include "machtypes.h"
+
+#define TL_WA801NDV3_GPIO_LED_WLAN 12
+#define TL_WA801NDV3_GPIO_LED_QSS  13
+#define TL_WA801NDV3_GPIO_LED_SECURITY_RED 11
+#define TL_WA801NDV3_GPIO_LED_SECURITY_GREEN 15
+#define TL_WA801NDV3_GPIO_LED_LAN 3
+
+#define TL_WA801NDV3_GPIO_BTN_RESET2
+#define TL_WA801NDV3_GPIO_BTN_WIFI 1
+
+#defin

Re: [OpenWrt-Devel] [PATCH] package/config/netifd: Replace ifconfig/route with ip command

2016-01-30 Thread Felix Fietkau
On 2016-01-30 05:55, Daniel Dickinson wrote:
> It worked with a /24 subnet but that might be because of defaults.  I do 
> not currently have test bed for testing other configurations.
> 
> I plan on setting that up once I'm back from travelling.

Please avoid top posting, it is a rather inconvenient quoting style.
The broken line is this:
> ip address add $ip/${CIDR} ${broadcast:-+} dev $interface"

It seems to me that you simply kept pieces of ifconfig syntax (the
broadcast +) without testing if they can be used with ip. Please be more
careful with that sort of stuff

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