[OpenWrt-Devel] [PATCH v4 5/5] ar71xx: add support for the devolo dLAN pro 1200+ WiFi ac

2015-07-09 Thread Günther Kelleter
Signed-off-by: Günther Kelleter guenther.kelle...@devolo.de
---
 target/linux/ar71xx/base-files/etc/diag.sh |   3 +
 .../etc/hotplug.d/firmware/11-ath10k-caldata   |   3 +
 .../ar71xx/base-files/etc/uci-defaults/01_leds |   6 +
 .../ar71xx/base-files/etc/uci-defaults/02_network  |   6 +
 target/linux/ar71xx/base-files/lib/ar71xx.sh   |   3 +
 .../ar71xx/base-files/lib/upgrade/platform.sh  |   1 +
 target/linux/ar71xx/config-3.18|   1 +
 .../files/arch/mips/ath79/mach-dlan-pro-1200-ac.c  | 189 +
 .../linux/ar71xx/generic/profiles/devolo-dlan.mk   |  14 ++
 target/linux/ar71xx/image/Makefile |   2 +
 .../610-MIPS-ath79-openwrt-machines.patch  |  27 ++-
 11 files changed, 249 insertions(+), 6 deletions(-)
 create mode 100644 
target/linux/ar71xx/files/arch/mips/ath79/mach-dlan-pro-1200-ac.c

diff --git a/target/linux/ar71xx/base-files/etc/diag.sh 
b/target/linux/ar71xx/base-files/etc/diag.sh
index cb5d963..f3bd142 100644
--- a/target/linux/ar71xx/base-files/etc/diag.sh
+++ b/target/linux/ar71xx/base-files/etc/diag.sh
@@ -78,6 +78,9 @@ get_status_led() {
dlan-pro-500-wp)
status_led=devolo:green:wlan-2g
;;
+   dlan-pro-1200-ac)
+   status_led=devolo:status:wlan
+   ;;
dragino2)
status_led=dragino2:red:system
;;
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 50f7425..fbbfbd7 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
@@ -47,6 +47,9 @@ board=$(ar71xx_board_name)
 case $FIRMWARE in
 ath10k/cal-pci-:00:00.0.bin)
case $board in
+   dlan-pro-1200-ac)
+   ath10kcal_extract art 20480 2116
+   ;;
mc-mac1200r)
ath10kcal_extract art 20480 2116
ath10kcal_patch_mac $(macaddr_add $(cat 
/sys/class/net/eth1/address) -1)
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 cf5c735..d6f7d1a 100644
--- a/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
+++ b/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
@@ -180,6 +180,12 @@ dlan-pro-500-wp)
ucidef_set_led_wlan wlan5g WLAN 5 GHz devolo:blue:wlan-5g none
;;
 
+dlan-pro-1200-ac)
+   ucidef_set_led_wlan wlan WLAN devolo:status:wlan phy0radio
+   ucidef_set_led_trigger_gpio plcw dLAN devolo:status:dlan 17 0
+   ucidef_set_led_trigger_gpio plcr dLAN devolo:error:dlan 16 0
+   ;;
+
 gl-inet)
ucidef_set_led_netdev lan LAN gl-connect:green:lan eth1
ucidef_set_led_wlan wlan WLAN gl-connect:red: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 615dbc4..9a0d0a3 100755
--- a/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
+++ b/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
@@ -305,6 +305,12 @@ dlan-pro-500-wp)
ucidef_set_interface_lan eth0 eth1
;;
 
+dlan-pro-1200-ac)
+   ucidef_set_interface_lan eth0
+   ucidef_add_switch switch0 1 0
+   ucidef_add_switch_vlan switch0 0 0 2 3 4
+   ;;
+
 all0305 |\
 aw-nr580 |\
 bullet-m |\
diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh 
b/target/linux/ar71xx/base-files/lib/ar71xx.sh
index f323ec3..9d3d2cb 100755
--- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
+++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh
@@ -426,6 +426,9 @@ ar71xx_board_detect() {
*dLAN pro 500 Wireless+)
name=dlan-pro-500-wp
;;
+   *dLAN pro 1200+ WiFi ac)
+   name=dlan-pro-1200-ac
+   ;;
*Dragino v2)
name=dragino2
;;
diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh 
b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
index 8b27b6d..41e344c 100755
--- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
@@ -209,6 +209,7 @@ platform_check_image() {
dir-825-c1 | \
dir-835-a1 | \
dlan-pro-500-wp | \
+   dlan-pro-1200-ac | \
dragino2 | \
epg5000 | \
esr1750 | \
diff --git a/target/linux/ar71xx/config-3.18 b/target/linux/ar71xx/config-3.18
index 353c10a..0de176e 100644
--- a/target/linux/ar71xx/config-3.18
+++ b/target/linux/ar71xx/config-3.18
@@ -56,6 +56,7 @@ CONFIG_ATH79_MACH_DIR_615_C1=y
 CONFIG_ATH79_MACH_DIR_615_I1=y
 CONFIG_ATH79_MACH_DIR_825_B1=y
 CONFIG_ATH79_MACH_DIR_825_C1=y
+CONFIG_ATH79_MACH_DLAN_PRO_1200_AC=y
 CONFIG_ATH79_MACH_DLAN_PRO_500_WP=y
 CONFIG_ATH79_MACH_DRAGINO2=y
 CONFIG_ATH79_MACH_EAP300V2=y
diff 

[OpenWrt-Devel] [PATCH v4 1/5] ar71xx: add support for the devolo dLAN pro 500 Wireless+

2015-07-09 Thread Günther Kelleter
Signed-off-by: Günther Kelleter guenther.kelle...@devolo.de
---
 target/linux/ar71xx/base-files/etc/diag.sh |   3 +
 .../ar71xx/base-files/etc/uci-defaults/01_leds |   7 +
 .../ar71xx/base-files/etc/uci-defaults/02_network  |   4 +
 target/linux/ar71xx/base-files/lib/ar71xx.sh   |   3 +
 .../ar71xx/base-files/lib/upgrade/platform.sh  |   1 +
 target/linux/ar71xx/config-3.18|   1 +
 .../files/arch/mips/ath79/mach-dlan-pro-500-wp.c   | 203 +
 .../linux/ar71xx/generic/profiles/devolo-dlan.mk   |  19 ++
 target/linux/ar71xx/image/Makefile |  19 ++
 .../610-MIPS-ath79-openwrt-machines.patch  |  25 ++-
 10 files changed, 279 insertions(+), 6 deletions(-)
 create mode 100644 
target/linux/ar71xx/files/arch/mips/ath79/mach-dlan-pro-500-wp.c
 create mode 100644 target/linux/ar71xx/generic/profiles/devolo-dlan.mk

diff --git a/target/linux/ar71xx/base-files/etc/diag.sh 
b/target/linux/ar71xx/base-files/etc/diag.sh
index ce2b9ba..cb5d963 100644
--- a/target/linux/ar71xx/base-files/etc/diag.sh
+++ b/target/linux/ar71xx/base-files/etc/diag.sh
@@ -75,6 +75,9 @@ get_status_led() {
dir-835-a1)
status_led=d-link:amber:power
;;
+   dlan-pro-500-wp)
+   status_led=devolo:green:wlan-2g
+   ;;
dragino2)
status_led=dragino2:red:system
;;
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 a361b77..cf5c735 100644
--- a/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
+++ b/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
@@ -173,6 +173,13 @@ dir-825-c1)
ucidef_set_led_wlan wlan2g WLAN 2.4 GHz d-link:blue:wlan2g 
phy0tpt
;;
 
+dlan-pro-500-wp)
+   ucidef_set_led_default power System Power devolo:green:status 1
+   ucidef_set_led_netdev lan Ethernet Activity devolo:green:eth 
br-lan
+   ucidef_set_led_wlan wlan2g WLAN 2.4 GHz devolo:green:wlan-2g 
phy0tpt
+   ucidef_set_led_wlan wlan5g WLAN 5 GHz devolo:blue:wlan-5g none
+   ;;
+
 gl-inet)
ucidef_set_led_netdev lan LAN gl-connect:green:lan eth1
ucidef_set_led_wlan wlan WLAN gl-connect:red: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 ec709a0..615dbc4 100755
--- a/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
+++ b/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
@@ -301,6 +301,10 @@ esr900)
[ -n $mac ]  ucidef_set_interface_macaddr wan $mac
;;
 
+dlan-pro-500-wp)
+   ucidef_set_interface_lan eth0 eth1
+   ;;
+
 all0305 |\
 aw-nr580 |\
 bullet-m |\
diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh 
b/target/linux/ar71xx/base-files/lib/ar71xx.sh
index dd13948..f323ec3 100755
--- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
+++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh
@@ -423,6 +423,9 @@ ar71xx_board_detect() {
*DIR-835 rev. A1)
name=dir-835-a1
;;
+   *dLAN pro 500 Wireless+)
+   name=dlan-pro-500-wp
+   ;;
*Dragino v2)
name=dragino2
;;
diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh 
b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
index 73d8b0d..8b27b6d 100755
--- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
@@ -208,6 +208,7 @@ platform_check_image() {
dir-615-i1 | \
dir-825-c1 | \
dir-835-a1 | \
+   dlan-pro-500-wp | \
dragino2 | \
epg5000 | \
esr1750 | \
diff --git a/target/linux/ar71xx/config-3.18 b/target/linux/ar71xx/config-3.18
index 02857d5..353c10a 100644
--- a/target/linux/ar71xx/config-3.18
+++ b/target/linux/ar71xx/config-3.18
@@ -56,6 +56,7 @@ CONFIG_ATH79_MACH_DIR_615_C1=y
 CONFIG_ATH79_MACH_DIR_615_I1=y
 CONFIG_ATH79_MACH_DIR_825_B1=y
 CONFIG_ATH79_MACH_DIR_825_C1=y
+CONFIG_ATH79_MACH_DLAN_PRO_500_WP=y
 CONFIG_ATH79_MACH_DRAGINO2=y
 CONFIG_ATH79_MACH_EAP300V2=y
 CONFIG_ATH79_MACH_EAP7660D=y
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-dlan-pro-500-wp.c 
b/target/linux/ar71xx/files/arch/mips/ath79/mach-dlan-pro-500-wp.c
new file mode 100644
index 000..ae6f443
--- /dev/null
+++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-dlan-pro-500-wp.c
@@ -0,0 +1,203 @@
+/*
+ * devolo dLAN pro 500 Wireless+ support
+ *
+ * Copyright (c) 2013-2015 devolo AG
+ * Copyright (c) 2011-2012 Gabor Juhos juh...@openwrt.org
+ *
+ * Permission to use, copy, modify, and/or distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED AS IS AND THE AUTHOR DISCLAIMS ALL 

[OpenWrt-Devel] [PATCH v4 0/5] ar71xx: Add support for devolo dLAN devices

2015-07-09 Thread Günther Kelleter
This patch set adds support for two devolo dLAN devices:
  dLAN pro 500 Wireless+
  dLAN pro 1200+ Wifi ac

It supports the wireless and ethernet interfaces.
PLC support must be implemented in user space and will follow later when basic
support is finally accepted.

Changes since PATCH v3:
ucidef_set_led_gpio: name changed
removed patch ar71xx: ag71xx: add pdata field supported
removed patch ath79: dev-eth: initialize clock for id 0 on AR934X
gpio irq loop uses for_each_bit_set
get rid of inc_mac_addr function
fixed pro 500 Wireless+ machine setup

Günther Kelleter (5):
  ar71xx: add support for the devolo dLAN pro 500 Wireless+
  ar71xx: add support to use gpio irqs
  mac80211: make ath10k firmware v2 selectable
  base-files: added option to configure the gpio led trigger in
uci-defaults
  ar71xx: add support for the devolo dLAN pro 1200+ WiFi ac

 package/base-files/files/etc/init.d/led|   7 +
 .../base-files/files/lib/functions/uci-defaults.sh |  20 ++
 package/kernel/mac80211/Makefile   |  19 ++
 target/linux/ar71xx/base-files/etc/diag.sh |   6 +
 .../etc/hotplug.d/firmware/11-ath10k-caldata   |   3 +
 .../ar71xx/base-files/etc/uci-defaults/01_leds |  13 ++
 .../ar71xx/base-files/etc/uci-defaults/02_network  |  10 +
 target/linux/ar71xx/base-files/lib/ar71xx.sh   |   6 +
 .../ar71xx/base-files/lib/upgrade/platform.sh  |   2 +
 target/linux/ar71xx/config-3.18|   2 +
 .../files/arch/mips/ath79/mach-dlan-pro-1200-ac.c  | 189 +
 .../files/arch/mips/ath79/mach-dlan-pro-500-wp.c   | 203 +++
 .../linux/ar71xx/generic/profiles/devolo-dlan.mk   |  33 +++
 target/linux/ar71xx/image/Makefile |  21 ++
 .../610-MIPS-ath79-openwrt-machines.patch  |  40 +++-
 .../739-MIPS-ath79-add-gpio-irq-support.patch  | 224 +
 16 files changed, 792 insertions(+), 6 deletions(-)
 create mode 100644 
target/linux/ar71xx/files/arch/mips/ath79/mach-dlan-pro-1200-ac.c
 create mode 100644 
target/linux/ar71xx/files/arch/mips/ath79/mach-dlan-pro-500-wp.c
 create mode 100644 target/linux/ar71xx/generic/profiles/devolo-dlan.mk
 create mode 100644 
target/linux/ar71xx/patches-3.18/739-MIPS-ath79-add-gpio-irq-support.patch

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


[OpenWrt-Devel] [PATCH v4 2/5] ar71xx: add support to use gpio irqs

2015-07-09 Thread Günther Kelleter
Signed-off-by: Günther Kelleter guenther.kelle...@devolo.de
---
 .../739-MIPS-ath79-add-gpio-irq-support.patch  | 224 +
 1 file changed, 224 insertions(+)
 create mode 100644 
target/linux/ar71xx/patches-3.18/739-MIPS-ath79-add-gpio-irq-support.patch

diff --git 
a/target/linux/ar71xx/patches-3.18/739-MIPS-ath79-add-gpio-irq-support.patch 
b/target/linux/ar71xx/patches-3.18/739-MIPS-ath79-add-gpio-irq-support.patch
new file mode 100644
index 000..90bc963
--- /dev/null
+++ b/target/linux/ar71xx/patches-3.18/739-MIPS-ath79-add-gpio-irq-support.patch
@@ -0,0 +1,224 @@
+--- a/arch/mips/ath79/gpio.c
 b/arch/mips/ath79/gpio.c
+@@ -20,9 +20,14 @@
+ #include linux/io.h
+ #include linux/ioport.h
+ #include linux/gpio.h
++#include linux/irq.h
++#include linux/interrupt.h
++
++#include linux/of.h
+ 
+ #include asm/mach-ath79/ar71xx_regs.h
+ #include asm/mach-ath79/ath79.h
++#include asm/mach-ath79/irq.h
+ #include common.h
+ 
+ void __iomem *ath79_gpio_base;
+@@ -31,6 +36,13 @@ EXPORT_SYMBOL_GPL(ath79_gpio_base);
+ static unsigned long ath79_gpio_count;
+ static DEFINE_SPINLOCK(ath79_gpio_lock);
+ 
++/*
++ * gpio_both_edge is a bitmask of which gpio pins need to have
++ * the detect priority flipped from the interrupt handler to
++ * emulate IRQ_TYPE_EDGE_BOTH.
++ */
++static unsigned long gpio_both_edge = 0;
++
+ static void __ath79_gpio_set_value(unsigned gpio, int value)
+ {
+   void __iomem *base = ath79_gpio_base;
+@@ -209,6 +221,132 @@ void __init ath79_gpio_output_select(uns
+   spin_unlock_irqrestore(ath79_gpio_lock, flags);
+ }
+ 
++static int ath79_gpio_irq_type(struct irq_data *d, unsigned type)
++{
++  int offset = d-irq - ATH79_GPIO_IRQ_BASE;
++  void __iomem *base = ath79_gpio_base;
++  unsigned long flags;
++  unsigned long int_type;
++  unsigned long int_polarity;
++  unsigned long bit = (1  offset);
++
++  spin_lock_irqsave(ath79_gpio_lock, flags);
++
++  int_type = __raw_readl(base + AR71XX_GPIO_REG_INT_TYPE);
++  int_polarity = __raw_readl(base + AR71XX_GPIO_REG_INT_POLARITY);
++
++  gpio_both_edge = ~bit;
++
++  switch (type) {
++  case IRQ_TYPE_EDGE_RISING:
++  int_type = ~bit;
++  int_polarity |= bit;
++  break;
++
++  case IRQ_TYPE_EDGE_FALLING:
++  int_type = ~bit;
++  int_polarity = ~bit;
++  break;
++
++  case IRQ_TYPE_LEVEL_HIGH:
++  int_type |= bit;
++  int_polarity |= bit;
++  break;
++
++  case IRQ_TYPE_LEVEL_LOW:
++  int_type |= bit;
++  int_polarity = ~bit;
++  break;
++
++  case IRQ_TYPE_EDGE_BOTH:
++  int_type |= bit;
++  /* set polarity based on current value */
++  if (gpio_get_value(offset)) {
++  int_polarity = ~bit;
++  } else {
++  int_polarity |= bit;
++  }
++  /* flip this gpio in the interrupt handler */
++  gpio_both_edge |= bit;
++  break;
++
++  default:
++  spin_unlock_irqrestore(ath79_gpio_lock, flags);
++  return -EINVAL;
++  }
++
++  __raw_writel(int_type, base + AR71XX_GPIO_REG_INT_TYPE);
++  __raw_writel(int_polarity, base + AR71XX_GPIO_REG_INT_POLARITY);
++
++  __raw_writel(__raw_readl(base + AR71XX_GPIO_REG_INT_MODE) | (1  
offset),
++   base + AR71XX_GPIO_REG_INT_MODE);
++
++  __raw_writel(__raw_readl(base + AR71XX_GPIO_REG_INT_ENABLE)  ~(1  
offset),
++   base + AR71XX_GPIO_REG_INT_ENABLE);
++
++  spin_unlock_irqrestore(ath79_gpio_lock, flags);
++  return 0;
++}
++
++static void ath79_gpio_irq_enable(struct irq_data *d)
++{
++  int offset = d-irq - ATH79_GPIO_IRQ_BASE;
++  void __iomem *base = ath79_gpio_base;
++
++  __raw_writel(__raw_readl(base + AR71XX_GPIO_REG_INT_ENABLE) | (1  
offset),
++   base + AR71XX_GPIO_REG_INT_ENABLE);
++}
++
++static void ath79_gpio_irq_disable(struct irq_data *d)
++{
++  int offset = d-irq - ATH79_GPIO_IRQ_BASE;
++  void __iomem *base = ath79_gpio_base;
++
++  __raw_writel(__raw_readl(base + AR71XX_GPIO_REG_INT_ENABLE)  ~(1  
offset),
++   base + AR71XX_GPIO_REG_INT_ENABLE);
++}
++
++static struct irq_chip ath79_gpio_irqchip = {
++  .name = GPIO,
++  .irq_enable = ath79_gpio_irq_enable,
++  .irq_disable = ath79_gpio_irq_disable,
++  .irq_set_type = ath79_gpio_irq_type,
++};
++
++static irqreturn_t ath79_gpio_irq(int irq, void *dev)
++{
++  void __iomem *base = ath79_gpio_base;
++  unsigned long stat = __raw_readl(base + AR71XX_GPIO_REG_INT_PENDING);
++  int bit_num;
++
++  for_each_set_bit(bit_num, stat, sizeof(stat) * BITS_PER_BYTE) {
++  unsigned long bit = BIT(bit_num);
++
++  if (bit  gpio_both_edge) {
++  

[OpenWrt-Devel] [PATCH v4 3/5] mac80211: make ath10k firmware v2 selectable

2015-07-09 Thread Günther Kelleter
Added option for old firmware version (10.1 API v2). It seems that recent
firmware versions are constantly crashing (at least on a QCA9880-BR4A-R) and
this provides the option to select an older version instead.

Signed-off-by: Günther Kelleter guenther.kelle...@devolo.de
---
 package/kernel/mac80211/Makefile | 19 +++
 1 file changed, 19 insertions(+)

diff --git a/package/kernel/mac80211/Makefile b/package/kernel/mac80211/Makefile
index 7f698f0..cc98fb7 100644
--- a/package/kernel/mac80211/Makefile
+++ b/package/kernel/mac80211/Makefile
@@ -620,6 +620,19 @@ Atheros IEEE 802.11ac family of chipsets. For now only
 PCI is supported.
 endef
 
+define KernelPackage/ath10k/config
+  if PACKAGE_kmod-ath10k
+
+   config ATH10K_API2_FW
+   bool Firmware optimized for AP operation (v10.1 / API v2)
+   default n
+   help
+ Use the ath10k firmware from the 10.1 SDK using API v2 
optimized
+ for access point operation if the default firmware keeps 
crashing.
+
+  endif
+endef
+
 define KernelPackage/carl9170
   $(call KernelPackage/mac80211/Default)
   TITLE:=Driver for Atheros AR9170 USB sticks
@@ -1844,9 +1857,15 @@ define KernelPackage/ath10k/install
$(INSTALL_DATA) \

$(PKG_BUILD_DIR)/$(PKG_ATH10K_LINUX_FIRMWARE_SUBDIR)/ath10k/QCA988X/hw2.0/board.bin
 \
$(1)/lib/firmware/ath10k/QCA988X/hw2.0/
+ifeq ($(CONFIG_ATH10K_API2_FW),y)
+   $(INSTALL_DATA) \
+   
$(PKG_BUILD_DIR)/$(PKG_ATH10K_LINUX_FIRMWARE_SUBDIR)/10.1/firmware-2.bin_10.1.467.2-1
 \
+   $(1)/lib/firmware/ath10k/QCA988X/hw2.0/firmware-2.bin
+else
$(INSTALL_DATA) \

$(PKG_BUILD_DIR)/$(PKG_ATH10K_LINUX_FIRMWARE_SUBDIR)/10.2.4/untested/firmware-5.bin_10.2.4.70-2
 \
$(1)/lib/firmware/ath10k/QCA988X/hw2.0/firmware-5.bin
+endif
 endef
 
 define KernelPackage/mwl8k/install
-- 
2.4.4.88.gac2ab0d
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] How to add 6LoWPAN to OpenWRT

2015-07-09 Thread Hauke Mehrtens
On 07/09/2015 04:51 PM, Firas wrote:
 When I tried to compile the kernel and configure it I found only 6LoWPAN
 over Bluetooth support, and I need to add 6LoWPAN to work over RF module
 like Jenic JN51xx.
 
  
 
 I’m using OpenWRT Kernel 3.18!
 
 So how can I implement that please can you guide me please !
 

Currently 6lowpan over ieee802.15.4 links is only available for kernel
version = 4.0, I do not know why it is not available on older kernel
versions. You could try to remove the version check and fix the problems
that will probably occur. I am currently looking into 6lowpan, but on
bluetooth because these are the cheapest radios. ;-)

Which Linux driver do you want to use for your radio?

The ieee802.15.4 modules are in this file:
package/kernel/linux/modules/wpan.mk

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


Re: [OpenWrt-Devel] [PATCH] ramips: mt7620 ArcherC20i USB support

2015-07-09 Thread Gunnar Thorburn
USB port of TP-Link Archer C20i does not work with trunk and CC.
This patch adds two nodes (ehci and ohci) to the device tree enabling USB.

Signed-off-by: Gunnar Thorburn gun...@thorburn.se

---
 target/linux/ramips/dts/ArcherC20i.dts | 8 
 1 file changed, 8 insertions(+)

diff --git a/target/linux/ramips/dts/ArcherC20i.dts 
b/target/linux/ramips/dts/ArcherC20i.dts
index a5037c9..cc3d5c1 100644
--- a/target/linux/ramips/dts/ArcherC20i.dts
+++ b/target/linux/ramips/dts/ArcherC20i.dts
@@ -77,6 +77,14 @@
ralink,port-map = w;
};
 
+   ehci@101c {
+   status = okay;
+   };
+
+   ohci@101c1000 {
+   status = okay;
+   };
+
gsw@1011 {
ralink,port4 = ephy;
};
-- 
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] How to get higher version (2.0) of radvd package

2015-07-09 Thread Hauke Mehrtens
On 07/09/2015 02:32 PM, Pratik Prajapati wrote:
 Hi,
 
 I want to build radvd (2.0 version) on OpenWrt but it supports radvd
 1.9 version.
 
 I have two options:
 
 1) either configure OpenWrt to download radvd's 2.0 version instead of 1.9
 or
 2) disable radvd in oldpackages and create a new package for 2.0 version
 under /openwrt/package/ (like this
 https://forum.openwrt.org/viewtopic.php?id=6809)
 
 I want to know is option 1 possible ? If yes then how ?
 If No then, is it possible to disable radvd of oldpackages ?
 
 Thanks,
 Pratik

The packages in oldpackages are not maintained any more.
see: https://lists.openwrt.org/pipermail/openwrt-devel/2014-June/025810.html

You can take over maintainership of that package and send a pull request
to our github repo with the new version of the package, then it will be
removed from oldpackages:
https://github.com/openwrt/packages/blob/master/CONTRIBUTING.md

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


[OpenWrt-Devel] [PATCH] ramips: adding support for OY-0001 Wireless Router

2015-07-09 Thread LiWeijian
From: Tom Deng 2579131...@qq.com

Adding support for OY-0001 Wireless Router.
OY-0001 is a wireless router made by oyewifi.com. Below is the details:
MT7620A, 128MB DDR2, 16MB FLASH, SD Slot, USB 2.0, 4 x LAN + 1 x WAN.
Signed-off-by: Tom Deng 2579131...@qq.com
---
diff --git a/target/linux/ramips/base-files/etc/board.d/01_leds 
b/target/linux/ramips/base-files/etc/board.d/01_leds
index 545bd70..fe3a79d 100755
--- a/target/linux/ramips/base-files/etc/board.d/01_leds
+++ b/target/linux/ramips/base-files/etc/board.d/01_leds
@@ -238,6 +238,10 @@ case $board in
set_wifi_led zbtlink:blue:air
set_usb_led zbtlink:blue:usb
;;
+   oy-0001)
+   ucidef_set_led_default power power oy:green:power 1
+   set_wifi_led oy:green:wifi
+   ;;
wr8305rt)
ucidef_set_led_default power power wr8305rt:sys 1
set_usb_led wr8305rt:usb
diff --git a/target/linux/ramips/base-files/etc/board.d/02_network 
b/target/linux/ramips/base-files/etc/board.d/02_network
index bc1fc01..9fb3535 100755
--- a/target/linux/ramips/base-files/etc/board.d/02_network
+++ b/target/linux/ramips/base-files/etc/board.d/02_network
@@ -139,6 +139,7 @@ ramips_setup_interfaces()
mzk-750dhp | \
whr-300hp2 | \
whr-600d | \
+   oy-0001 | \
wsr-600 | \
wsr-1166 | \
wt1520 | \
@@ -283,6 +284,11 @@ ramips_setup_macs()
wan_mac=$(mtd_get_mac_binary devdata 7)
;;
 
+   oy-0001)
+   lan_mac=$(mtd_get_mac_binary factory 40)
+   wan_mac=$(mtd_get_mac_binary factory 46)
+   ;;
+
w306r-v20)
lan_mac=$(cat /sys/class/net/eth0/address)
wan_mac=$(macaddr_add $lan_mac 5)
diff --git a/target/linux/ramips/base-files/lib/ramips.sh 
b/target/linux/ramips/base-files/lib/ramips.sh
index d2a1856..3d40ab9 100755
--- a/target/linux/ramips/base-files/lib/ramips.sh
+++ b/target/linux/ramips/base-files/lib/ramips.sh
@@ -400,6 +400,9 @@ ramips_board_detect() {
*Zbtlink ZBT-WA05)
name=zbt-wa05
;;
+   *OY-0001)
+   name=oy-0001
+   ;;
*ZBT WR8305RT)
name=wr8305rt
;;
diff --git a/target/linux/ramips/base-files/lib/upgrade/platform.sh 
b/target/linux/ramips/base-files/lib/upgrade/platform.sh
index cedd62b..8f45a84 100755
--- a/target/linux/ramips/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ramips/base-files/lib/upgrade/platform.sh
@@ -116,6 +116,7 @@ platform_check_image() {
wr6202 |\
wr8305rt |\
wrtnode |\
+   oy-0001 |\
wt1520 |\
wt3020 |\
x5 |\
diff --git a/target/linux/ramips/dts/OY-0001.dts 
b/target/linux/ramips/dts/OY-0001.dts
new file mode 100644
index 000..48b7099
--- /dev/null
+++ b/target/linux/ramips/dts/OY-0001.dts
@@ -0,0 +1,123 @@
+/dts-v1/;
+
+/include/ mt7620a.dtsi
+
+/ {
+   compatible = ralink,mt7620a-soc;
+   model = OY-0001;
+
+chosen {
+bootargs = console=ttyS0,115200;
+};
+
+   palmbus@1000 {
+   gpio2: gpio@660 {
+   status = okay;
+   };
+
+   gpio3: gpio@688 {
+   status = okay;
+   };
+
+   spi@b00 {
+   status = okay;
+
+   m25p80@0 {
+   #address-cells = 1;
+   #size-cells = 1;
+   compatible = w25q128;
+   reg = 0 0;
+   linux,modalias = m25p80, w25q128;
+   spi-max-frequency = 1000;
+
+   partition@0 {
+   label = u-boot;
+   reg = 0x0 0x3;
+   read-only;
+   };
+
+   partition@3 {
+   label = u-boot-env;
+   reg = 0x3 0x1;
+   read-only;
+   };
+
+   factory: partition@4 {
+   label = factory;
+   reg = 0x4 0x1;
+   read-only;
+   };
+
+   partition@5 {
+   label = firmware;
+   reg = 0x5 0xfb;
+   };
+
+   };
+   };
+   };
+
+   pinctrl {
+   state_default: pinctrl0 {
+   gpio {
+   ralink,group = i2c, uartf, 

Re: [OpenWrt-Devel] 6LoWPAN with OpenWRT

2015-07-09 Thread Varka Bhadram

Hi Firas,

On 07/09/2015 05:52 PM, Firas wrote:


I'm using OpenWRT Kernel 3.18, and I haven't found separate support for
6LoWPAN. In this kernel there is only 6LoWPAN over Bluetooth !


6LoWPAN over IEEE-802.15.4 support available in OpenWRT from the kernel version 
4.0 [1]


I want to use it with RF Module !


Right now kernel provides the support for the following 802.15.4 devices [2].
Also you can find the details at [3]

o AT86RF230
o cc2520
o mrf24j40
o ATUSB module

--
Varka Bhadram.

[1]: 
http://git.openwrt.org/?p=openwrt.git;a=blob;f=package/kernel/linux/modules/wpan.mk;h=d4173ca4b1d7d9e51b1b3051d05aa3fe347086dc;hb=HEAD
[2]: 
http://git.kernel.org/cgit/linux/kernel/git/bluetooth/bluetooth-next.git/tree/drivers/net/ieee802154
[3]:http://wpan.cakelab.org  http://wpan.cakelab.org/releases/

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


[OpenWrt-Devel] IPTables/NAT

2015-07-09 Thread John kerry
Hi,

I have to enable NAT with a MASQUERADING target,
and to block the GUI from WAN have to server bind only the bridge address.
Could anyone tell me how i can do it in the GUI itself.

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


Re: [OpenWrt-Devel] Archer C7 CC 15.05-rc1 Ath9K phy1: Failed to stop TX DMA, queues=0x002!

2015-07-09 Thread camden lindsay
I'm sorry, i said ath9k in the subject but the above seems more likely
to be ath10k.

On Thu, Jul 9, 2015 at 7:03 PM, camden lindsay
camden.lindsay+open...@gmail.com wrote:
 Hello-

 Thought I should report this, since there was so much discussion and
 confusion on tracker https://dev.openwrt.org/ticket/11862  causing a
 lot of work for some folks here.


 root@HACKEDBOXII.'':~# cat /etc/banner
   ___ __
  |   |.-.-.-.|  |  |  |..|  |_
  |   -   ||  _  |  -__| ||  |  |  ||   _||   _|
  |___||   __|_|__|__||||__|  ||
   |__| W I R E L E S S   F R E E D O M
  -
  CHAOS CALMER (15.05-rc1, r45695)
  -
   * 1 1/2 oz GinShake with a glassful
   * 1/4 oz Triple Sec   of broken ice and pour
   * 3/4 oz Lime Juice   unstrained into a goblet.
   * 1 1/2 oz Orange Juice
   * 1 tsp. Grenadine Syrup
  -
 root@HACKEDBOXII.'':~#




 root@HACKEDBOXII.'':~# iw phy phy1 info
 Wiphy phy1
 max # scan SSIDs: 4
 max scan IEs length: 2257 bytes
 Retry short limit: 7
 Retry long limit: 4
 Coverage class: 0 (up to 0m)
 Device supports AP-side u-APSD.
 Device supports T-DLS.
 Available Antennas: TX 0x7 RX 0x7
 Configured Antennas: TX 0x7 RX 0x7
 Supported interface modes:
 * IBSS
 * managed
 * AP
 * AP/VLAN
 * WDS
 * monitor
 * mesh point
 * P2P-client
 * P2P-GO
 Band 1:
 Capabilities: 0x11ef
 RX LDPC
 HT20/HT40
 SM Power Save disabled
 RX HT20 SGI
 RX HT40 SGI
 TX STBC
 RX STBC 1-stream
 Max AMSDU length: 3839 bytes
 DSSS/CCK HT40
 Maximum RX AMPDU length 65535 bytes (exponent: 0x003)
 Minimum RX AMPDU time spacing: 8 usec (0x06)
 HT TX/RX MCS rate indexes supported: 0-23
 Frequencies:
 * 2412 MHz [1] (23.0 dBm)
 * 2417 MHz [2] (25.0 dBm)
 * 2422 MHz [3] (25.0 dBm)
 * 2427 MHz [4] (25.0 dBm)
 * 2432 MHz [5] (25.0 dBm)
 * 2437 MHz [6] (25.0 dBm)
 * 2442 MHz [7] (25.0 dBm)
 * 2447 MHz [8] (25.0 dBm)
 * 2452 MHz [9] (25.0 dBm)
 * 2457 MHz [10] (25.0 dBm)
 * 2462 MHz [11] (24.0 dBm)
 * 2467 MHz [12] (disabled)
 * 2472 MHz [13] (disabled)
 * 2484 MHz [14] (disabled)
 valid interface combinations:
 * #{ managed } = 2048, #{ AP, mesh point } = 8, #{ P2P-client,
 P2P-GO } = 1, #{ IBSS } = 1,
   total = 2048, #channels = 1, STA/AP BI must match
 * #{ WDS } = 2048,
   total = 2048, #channels = 1, STA/AP BI must match
 * #{ IBSS, AP, mesh point } = 1,
   total = 1, #channels = 1, STA/AP BI must match, radar detect
 widths: { 20 MHz (no HT), 20 MHz, 40 MHz }

 HT Capability overrides:
 * MCS: ff ff ff ff ff ff ff ff ff ff
 * maximum A-MSDU length
 * supported channel width
 * short GI for 40 MHz
 * max A-MPDU length exponent
 * min MPDU start spacing
 root@HACKEDBOXII.'':~#


 ...snip...
 ...
 [2060235.46] ath: phy1: Failed to stop TX DMA, queues=0x002!
 [2060265.46] ath: phy1: Failed to stop TX DMA, queues=0x002!
 [2061047.18] ath: phy1: Failed to stop TX DMA, queues=0x002!
 [2104015.84] ath: phy1: Unable to reset channel, reset status -5
 [2145012.92] ath10k_pci :01:00.0: SWBA overrun on vdev 0,
 skipped old beacon
 [2145013.03] ath10k_pci :01:00.0: SWBA overrun on vdev 0,
 skipped old beacon
 [2145013.13] ath10k_pci :01:00.0: SWBA overrun on vdev 0,
 skipped old beacon
 [2145013.23] ath10k_pci :01:00.0: SWBA overrun on vdev 0,
 skipped old beacon
 [2145013.33] ath10k_pci :01:00.0: SWBA overrun on vdev 0,
 skipped old beacon
 [2145013.43] ath10k_pci :01:00.0: SWBA overrun on vdev 0,
 skipped old beacon
 [2145013.54] ath10k_pci :01:00.0: SWBA overrun on vdev 0,
 skipped old beacon
 [2145013.64] ath10k_pci :01:00.0: SWBA overrun on vdev 0,
 skipped old beacon
 [2145013.74] ath10k_pci :01:00.0: SWBA overrun on vdev 0,
 skipped old beacon
 [2158242.79] ath10k_warn: 18 callbacks suppressed
 [2158242.80] ath10k_pci :01:00.0: SWBA overrun on vdev 0,
 skipped old beacon
 [2158242.89] ath10k_pci :01:00.0: SWBA overrun on vdev 0,
 skipped old beacon
 [2158243.00] ath10k_pci :01:00.0: SWBA overrun on vdev 0,
 skipped old beacon
 [2158243.10] ath10k_pci :01:00.0: SWBA overrun on vdev 0,
 skipped old beacon
 [2158243.20] ath10k_pci :01:00.0: SWBA overrun on vdev 0,
 skipped old beacon
 [2158243.30] ath10k_pci :01:00.0: SWBA overrun on vdev 0,
 skipped old beacon
 [2158243.41] ath10k_pci :01:00.0: SWBA overrun on vdev 0,
 skipped old beacon
 [2158243.51] ath10k_pci :01:00.0: SWBA overrun on vdev 0,
 skipped old beacon
 [2158243.61] ath10k_pci :01:00.0: SWBA overrun on vdev 0,
 skipped old beacon
 [2158243.71] ath10k_pci :01:00.0: SWBA overrun on vdev 0,
 skipped old beacon
 [2158245.62] [ cut here ]
 [2158245.62] WARNING: CPU: 0 PID: 1302 at
 

[OpenWrt-Devel] Archer C7 CC 15.05-rc1 Ath9K phy1: Failed to stop TX DMA, queues=0x002!

2015-07-09 Thread camden lindsay
Hello-

Thought I should report this, since there was so much discussion and
confusion on tracker https://dev.openwrt.org/ticket/11862  causing a
lot of work for some folks here.


root@HACKEDBOXII.'':~# cat /etc/banner
  ___ __
 |   |.-.-.-.|  |  |  |..|  |_
 |   -   ||  _  |  -__| ||  |  |  ||   _||   _|
 |___||   __|_|__|__||||__|  ||
  |__| W I R E L E S S   F R E E D O M
 -
 CHAOS CALMER (15.05-rc1, r45695)
 -
  * 1 1/2 oz GinShake with a glassful
  * 1/4 oz Triple Sec   of broken ice and pour
  * 3/4 oz Lime Juice   unstrained into a goblet.
  * 1 1/2 oz Orange Juice
  * 1 tsp. Grenadine Syrup
 -
root@HACKEDBOXII.'':~#




root@HACKEDBOXII.'':~# iw phy phy1 info
Wiphy phy1
max # scan SSIDs: 4
max scan IEs length: 2257 bytes
Retry short limit: 7
Retry long limit: 4
Coverage class: 0 (up to 0m)
Device supports AP-side u-APSD.
Device supports T-DLS.
Available Antennas: TX 0x7 RX 0x7
Configured Antennas: TX 0x7 RX 0x7
Supported interface modes:
* IBSS
* managed
* AP
* AP/VLAN
* WDS
* monitor
* mesh point
* P2P-client
* P2P-GO
Band 1:
Capabilities: 0x11ef
RX LDPC
HT20/HT40
SM Power Save disabled
RX HT20 SGI
RX HT40 SGI
TX STBC
RX STBC 1-stream
Max AMSDU length: 3839 bytes
DSSS/CCK HT40
Maximum RX AMPDU length 65535 bytes (exponent: 0x003)
Minimum RX AMPDU time spacing: 8 usec (0x06)
HT TX/RX MCS rate indexes supported: 0-23
Frequencies:
* 2412 MHz [1] (23.0 dBm)
* 2417 MHz [2] (25.0 dBm)
* 2422 MHz [3] (25.0 dBm)
* 2427 MHz [4] (25.0 dBm)
* 2432 MHz [5] (25.0 dBm)
* 2437 MHz [6] (25.0 dBm)
* 2442 MHz [7] (25.0 dBm)
* 2447 MHz [8] (25.0 dBm)
* 2452 MHz [9] (25.0 dBm)
* 2457 MHz [10] (25.0 dBm)
* 2462 MHz [11] (24.0 dBm)
* 2467 MHz [12] (disabled)
* 2472 MHz [13] (disabled)
* 2484 MHz [14] (disabled)
valid interface combinations:
* #{ managed } = 2048, #{ AP, mesh point } = 8, #{ P2P-client,
P2P-GO } = 1, #{ IBSS } = 1,
  total = 2048, #channels = 1, STA/AP BI must match
* #{ WDS } = 2048,
  total = 2048, #channels = 1, STA/AP BI must match
* #{ IBSS, AP, mesh point } = 1,
  total = 1, #channels = 1, STA/AP BI must match, radar detect
widths: { 20 MHz (no HT), 20 MHz, 40 MHz }

HT Capability overrides:
* MCS: ff ff ff ff ff ff ff ff ff ff
* maximum A-MSDU length
* supported channel width
* short GI for 40 MHz
* max A-MPDU length exponent
* min MPDU start spacing
root@HACKEDBOXII.'':~#


...snip...
...
[2060235.46] ath: phy1: Failed to stop TX DMA, queues=0x002!
[2060265.46] ath: phy1: Failed to stop TX DMA, queues=0x002!
[2061047.18] ath: phy1: Failed to stop TX DMA, queues=0x002!
[2104015.84] ath: phy1: Unable to reset channel, reset status -5
[2145012.92] ath10k_pci :01:00.0: SWBA overrun on vdev 0,
skipped old beacon
[2145013.03] ath10k_pci :01:00.0: SWBA overrun on vdev 0,
skipped old beacon
[2145013.13] ath10k_pci :01:00.0: SWBA overrun on vdev 0,
skipped old beacon
[2145013.23] ath10k_pci :01:00.0: SWBA overrun on vdev 0,
skipped old beacon
[2145013.33] ath10k_pci :01:00.0: SWBA overrun on vdev 0,
skipped old beacon
[2145013.43] ath10k_pci :01:00.0: SWBA overrun on vdev 0,
skipped old beacon
[2145013.54] ath10k_pci :01:00.0: SWBA overrun on vdev 0,
skipped old beacon
[2145013.64] ath10k_pci :01:00.0: SWBA overrun on vdev 0,
skipped old beacon
[2145013.74] ath10k_pci :01:00.0: SWBA overrun on vdev 0,
skipped old beacon
[2158242.79] ath10k_warn: 18 callbacks suppressed
[2158242.80] ath10k_pci :01:00.0: SWBA overrun on vdev 0,
skipped old beacon
[2158242.89] ath10k_pci :01:00.0: SWBA overrun on vdev 0,
skipped old beacon
[2158243.00] ath10k_pci :01:00.0: SWBA overrun on vdev 0,
skipped old beacon
[2158243.10] ath10k_pci :01:00.0: SWBA overrun on vdev 0,
skipped old beacon
[2158243.20] ath10k_pci :01:00.0: SWBA overrun on vdev 0,
skipped old beacon
[2158243.30] ath10k_pci :01:00.0: SWBA overrun on vdev 0,
skipped old beacon
[2158243.41] ath10k_pci :01:00.0: SWBA overrun on vdev 0,
skipped old beacon
[2158243.51] ath10k_pci :01:00.0: SWBA overrun on vdev 0,
skipped old beacon
[2158243.61] ath10k_pci :01:00.0: SWBA overrun on vdev 0,
skipped old beacon
[2158243.71] ath10k_pci :01:00.0: SWBA overrun on vdev 0,
skipped old beacon
[2158245.62] [ cut here ]
[2158245.62] WARNING: CPU: 0 PID: 1302 at
/home/buildbot/slave-local/ar71xx_generic/build/build_dir/target-mips_34kc_uClibc-0.9.33.2/linux-ar71xx_generic/compat-wireless-2015-03-09/net/mac80211/sta_info.c:909
sta_set_sinfo+0x7f4/0x88c [mac80211]()
[2158245.64] Modules linked in: pppoe ppp_async iptable_nat ath9k
pppox ppp_generic nf_nat_ipv4 nf_conntrack_ipv6 

Re: [OpenWrt-Devel] Does anyone have used Ralink i2s under openwrt?

2015-07-09 Thread Sergio
Hi guys,
 
  
 Hi,
  
 once i fixed the codec problem on my unit i will look at the bug. can
 you help me get one of the rt5350 boards that you have ? can you tell
 me a link the the board ?
  
   John

I'm using toplinkst top-ap01-38 with RT5350 and trying to setup a dac codec 
using i2s. Please, have you got any progress with i2s and alsa soc?


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


Re: [OpenWrt-Devel] Does anyone have used Ralink i2s under openwrt?

2015-07-09 Thread John Crispin


On 09/07/2015 09:59, Sergio wrote:
 Hi guys,
  
  
 Hi,
  
 once i fixed the codec problem on my unit i will look at the bug. can
 you help me get one of the rt5350 boards that you have ? can you tell
 me a link the the board ?
  
  John
 
 I'm using toplinkst top-ap01-38 with RT5350 and trying to setup a dac codec 
 using i2s. Please, have you got any progress with i2s and alsa soc?
 
 

sorry, been too busy and i doubt i will have time in the near future to
look at it :(
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH v3 4/7] ar71xx: add support to use gpio irqs

2015-07-09 Thread John Crispin
Hi,

minor nitpick inline

On 07/07/2015 14:58, Günther Kelleter wrote:
 Signed-off-by: Günther Kelleter guenther.kelle...@devolo.de
 ---
  .../739-MIPS-ath79-add-gpio-irq-support.patch  | 225 
 +
  1 file changed, 225 insertions(+)
  create mode 100644 
 target/linux/ar71xx/patches-3.18/739-MIPS-ath79-add-gpio-irq-support.patch
 
 diff --git 
 a/target/linux/ar71xx/patches-3.18/739-MIPS-ath79-add-gpio-irq-support.patch 
 b/target/linux/ar71xx/patches-3.18/739-MIPS-ath79-add-gpio-irq-support.patch
 new file mode 100644
 index 000..2b90df0
 --- /dev/null
 +++ 
 b/target/linux/ar71xx/patches-3.18/739-MIPS-ath79-add-gpio-irq-support.patch
 @@ -0,0 +1,225 @@
 +--- a/arch/mips/ath79/gpio.c
  b/arch/mips/ath79/gpio.c
 +@@ -20,9 +20,14 @@
 + #include linux/io.h
 + #include linux/ioport.h
 + #include linux/gpio.h
 ++#include linux/irq.h
 ++#include linux/interrupt.h
 ++
 ++#include linux/of.h
 + 
 + #include asm/mach-ath79/ar71xx_regs.h
 + #include asm/mach-ath79/ath79.h
 ++#include asm/mach-ath79/irq.h
 + #include common.h
 + 
 + void __iomem *ath79_gpio_base;
 +@@ -31,6 +36,13 @@ EXPORT_SYMBOL_GPL(ath79_gpio_base);
 + static unsigned long ath79_gpio_count;
 + static DEFINE_SPINLOCK(ath79_gpio_lock);
 + 
 ++/*
 ++ * gpio_both_edge is a bitmask of which gpio pins need to have
 ++ * the detect priority flipped from the interrupt handler to
 ++ * emulate IRQ_TYPE_EDGE_BOTH.
 ++ */
 ++static unsigned long gpio_both_edge = 0;
 ++
 + static void __ath79_gpio_set_value(unsigned gpio, int value)
 + {
 + void __iomem *base = ath79_gpio_base;
 +@@ -209,6 +221,133 @@ void __init ath79_gpio_output_select(uns
 + spin_unlock_irqrestore(ath79_gpio_lock, flags);
 + }
 + 
 ++static int ath79_gpio_irq_type(struct irq_data *d, unsigned type)
 ++{
 ++int offset = d-irq - ATH79_GPIO_IRQ_BASE;
 ++void __iomem *base = ath79_gpio_base;
 ++unsigned long flags;
 ++unsigned long int_type;
 ++unsigned long int_polarity;
 ++unsigned long bit = (1  offset);
 ++
 ++spin_lock_irqsave(ath79_gpio_lock, flags);
 ++
 ++int_type = __raw_readl(base + AR71XX_GPIO_REG_INT_TYPE);
 ++int_polarity = __raw_readl(base + AR71XX_GPIO_REG_INT_POLARITY);
 ++
 ++gpio_both_edge = ~bit;
 ++
 ++switch (type) {
 ++case IRQ_TYPE_EDGE_RISING:
 ++int_type = ~bit;
 ++int_polarity |= bit;
 ++break;
 ++
 ++case IRQ_TYPE_EDGE_FALLING:
 ++int_type = ~bit;
 ++int_polarity = ~bit;
 ++break;
 ++
 ++case IRQ_TYPE_LEVEL_HIGH:
 ++int_type |= bit;
 ++int_polarity |= bit;
 ++break;
 ++
 ++case IRQ_TYPE_LEVEL_LOW:
 ++int_type |= bit;
 ++int_polarity = ~bit;
 ++break;
 ++
 ++case IRQ_TYPE_EDGE_BOTH:
 ++int_type |= bit;
 ++/* set polarity based on current value */
 ++if (gpio_get_value(offset)) {
 ++int_polarity = ~bit;
 ++} else {
 ++int_polarity |= bit;
 ++}
 ++/* flip this gpio in the interrupt handler */
 ++gpio_both_edge |= bit;
 ++break;
 ++
 ++default:
 ++spin_unlock_irqrestore(ath79_gpio_lock, flags);
 ++return -EINVAL;
 ++}
 ++
 ++__raw_writel(int_type, base + AR71XX_GPIO_REG_INT_TYPE);
 ++__raw_writel(int_polarity, base + AR71XX_GPIO_REG_INT_POLARITY);
 ++
 ++__raw_writel(__raw_readl(base + AR71XX_GPIO_REG_INT_MODE) | (1  
 offset),
 ++ base + AR71XX_GPIO_REG_INT_MODE);
 ++
 ++__raw_writel(__raw_readl(base + AR71XX_GPIO_REG_INT_ENABLE)  ~(1  
 offset),
 ++ base + AR71XX_GPIO_REG_INT_ENABLE);
 ++
 ++spin_unlock_irqrestore(ath79_gpio_lock, flags);
 ++return 0;
 ++}
 ++
 ++static void ath79_gpio_irq_enable(struct irq_data *d)
 ++{
 ++int offset = d-irq - ATH79_GPIO_IRQ_BASE;
 ++void __iomem *base = ath79_gpio_base;
 ++
 ++__raw_writel(__raw_readl(base + AR71XX_GPIO_REG_INT_ENABLE) | (1  
 offset),
 ++ base + AR71XX_GPIO_REG_INT_ENABLE);
 ++}
 ++
 ++static void ath79_gpio_irq_disable(struct irq_data *d)
 ++{
 ++int offset = d-irq - ATH79_GPIO_IRQ_BASE;
 ++void __iomem *base = ath79_gpio_base;
 ++
 ++__raw_writel(__raw_readl(base + AR71XX_GPIO_REG_INT_ENABLE)  ~(1  
 offset),
 ++ base + AR71XX_GPIO_REG_INT_ENABLE);
 ++}
 ++
 ++static struct irq_chip ath79_gpio_irqchip = {
 ++.name = GPIO,
 ++.irq_enable = ath79_gpio_irq_enable,
 ++.irq_disable = ath79_gpio_irq_disable,
 ++.irq_set_type = ath79_gpio_irq_type,
 ++};
 ++
 ++static irqreturn_t ath79_gpio_irq(int irq, void *dev)
 ++{
 ++void __iomem *base = ath79_gpio_base;
 ++unsigned int stat = __raw_readl(base + AR71XX_GPIO_REG_INT_PENDING);
 ++
 ++while (stat) {

make use of the for_each_set_bit() macro please


John





 ++int bit_num = __ffs(stat);
 ++   

Re: [OpenWrt-Devel] [PATCH v3 7/7] ar71xx: add support for the devolo dLAN pro 1200+ WiFi ac

2015-07-09 Thread John Crispin
Hi,

this function seem to be overly complicated. do you really need this ?

John

On 07/07/2015 14:58, Günther Kelleter wrote:
 +static void inc_mac_addr(u8 *base_mac, u8 *dst_mac, u8 inc)
 +{
 + u32  tmp = 0;
 + char index = 6;
 +
 + tmp = base_mac[5] + inc;
 + while ((tmp  255)  (index  0)) {
 + dst_mac[index-1] = tmp - 256;
 + index--;
 + tmp = base_mac[index-1] + 1;
 + }
 +
 + dst_mac[index-1] = tmp;
 + index--;
 +
 + while (index  0) {
 + dst_mac[index-1] = base_mac[index-1];
 + index--;
 + }
 +}
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH 3/5] ar71xx: compex wpj531 remove unnecessary switch initialization

2015-07-09 Thread Christian Mehlis

Am 09.07.2015 um 08:14 schrieb John Crispin:

why is this unnecessary ? do we now rely on the bootloader to have
already made the setup ?


Hi John,

I see, I couldn't find any difference in calling this function or not 
from a perspective within the system (swconfig, ethtool).


Perhaps I'm just lucky and uboot did everything right...let's keep this 
line!


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


Re: [OpenWrt-Devel] [PATCH v3 5/7] mac80211: make ath10k firmware v2 selectable

2015-07-09 Thread John Crispin
Hi,

dont know at10k very well so pardon my uneducated question...

how does at10k know/choose which of the 2 to use ?

John

On 07/07/2015 14:58, Günther Kelleter wrote:
 Added option for old firmware version (10.1 API v2). It seems that recent
 firmware versions are constantly crashing (at least on a QCA9880-BR4A-R) and
 this provides the option to select an older version instead.
 
 Signed-off-by: Günther Kelleter guenther.kelle...@devolo.de
 ---
  package/kernel/mac80211/Makefile | 19 +++
  1 file changed, 19 insertions(+)
 
 diff --git a/package/kernel/mac80211/Makefile 
 b/package/kernel/mac80211/Makefile
 index 7f698f0..cc98fb7 100644
 --- a/package/kernel/mac80211/Makefile
 +++ b/package/kernel/mac80211/Makefile
 @@ -620,6 +620,19 @@ Atheros IEEE 802.11ac family of chipsets. For now only
  PCI is supported.
  endef
  
 +define KernelPackage/ath10k/config
 +  if PACKAGE_kmod-ath10k
 +
 + config ATH10K_API2_FW
 + bool Firmware optimized for AP operation (v10.1 / API v2)
 + default n
 + help
 +   Use the ath10k firmware from the 10.1 SDK using API v2 
 optimized
 +   for access point operation if the default firmware keeps 
 crashing.
 +
 +  endif
 +endef
 +
  define KernelPackage/carl9170
$(call KernelPackage/mac80211/Default)
TITLE:=Driver for Atheros AR9170 USB sticks
 @@ -1844,9 +1857,15 @@ define KernelPackage/ath10k/install
   $(INSTALL_DATA) \
   
 $(PKG_BUILD_DIR)/$(PKG_ATH10K_LINUX_FIRMWARE_SUBDIR)/ath10k/QCA988X/hw2.0/board.bin
  \
   $(1)/lib/firmware/ath10k/QCA988X/hw2.0/
 +ifeq ($(CONFIG_ATH10K_API2_FW),y)
 + $(INSTALL_DATA) \
 + 
 $(PKG_BUILD_DIR)/$(PKG_ATH10K_LINUX_FIRMWARE_SUBDIR)/10.1/firmware-2.bin_10.1.467.2-1
  \
 + $(1)/lib/firmware/ath10k/QCA988X/hw2.0/firmware-2.bin
 +else
   $(INSTALL_DATA) \
   
 $(PKG_BUILD_DIR)/$(PKG_ATH10K_LINUX_FIRMWARE_SUBDIR)/10.2.4/untested/firmware-5.bin_10.2.4.70-2
  \
   $(1)/lib/firmware/ath10k/QCA988X/hw2.0/firmware-5.bin
 +endif
  endef
  
  define KernelPackage/mwl8k/install
 
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH v3 1/7] ar71xx: ag71xx: add pdata field supported

2015-07-09 Thread Guenther Kelleter
Hi

 -Original Message-
 From: John Crispin [mailto:blo...@openwrt.org]
 Sent: Thursday, July 09, 2015 8:24 AM
 To: Guenther Kelleter; openwrt-devel@lists.openwrt.org
 Subject: Re: [OpenWrt-Devel] [PATCH v3 1/7] ar71xx: ag71xx: add pdata field
 supported
 
 Hi,
 
 On 07/07/2015 14:58, Günther Kelleter wrote:
  to allow target specific override of phydev-supported.
 
 
 why do you need to do this ? do you want to force a specific link type ?
 if so, then using a fixed link would be preferable to faking phy caps


It simply doesn't work with autoneg on. The plc chip on the other end of eth0 
doesn't sync. How can I force no autoneg 1000 full duplex on eth0 without this 
patch?
I'm setting (see patch 3/7, 
target/linux/ar71xx/files/arch/mips/ath79/mach-dlan-pro-500-wp.c)
+   ath79_eth0_data.speed = SPEED_1000;
+   ath79_eth0_data.duplex = DUPLEX_FULL;
But this has no effect.


 
   John
 
 
  Signed-off-by: Günther Kelleter guenther.kelle...@devolo.de
  ---
   .../ar71xx/files/arch/mips/include/asm/mach-ath79/ag71xx_platform.h  | 1 +
   .../ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_phy.c| 5
 +
   2 files changed, 6 insertions(+)
 
  diff --git a/target/linux/ar71xx/files/arch/mips/include/asm/mach-
 ath79/ag71xx_platform.h
 b/target/linux/ar71xx/files/arch/mips/include/asm/mach-ath79/ag71xx_platform.h
  index d46dc4e..aa7663b 100644
  --- a/target/linux/ar71xx/files/arch/mips/include/asm/mach-
 ath79/ag71xx_platform.h
  +++ b/target/linux/ar71xx/files/arch/mips/include/asm/mach-
 ath79/ag71xx_platform.h
  @@ -30,6 +30,7 @@ struct ag71xx_platform_data {
  u32 reset_bit;
  u8  mac_addr[ETH_ALEN];
  struct device   *mii_bus_dev;
  +   u32 supported;
 
  u8  has_gbit:1;
  u8  is_ar91xx:1;
  diff --git
 a/target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_phy.c
 b/target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_phy.c
  index 9de77e9..0f5ec9c 100644
  ---
 a/target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_phy.c
  +++
 b/target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_phy.c
  @@ -146,6 +146,11 @@ static int ag71xx_phy_connect_multi(struct ag71xx *ag)
  else
  phydev-supported = PHY_BASIC_FEATURES;
 
  +   if (pdata-supported) {
  +   dev_info(dev, overriding phydev-supported (%08x)\n, pdata-
 supported);
  +   phydev-supported = pdata-supported;
  +   }
  +
  phydev-advertising = phydev-supported;
 
  dev_info(dev, connected to PHY at %s [uid=%08x, driver=%s]\n,
 
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH v3 1/7] ar71xx: ag71xx: add pdata field supported

2015-07-09 Thread John Crispin
Hi,

On 07/07/2015 14:58, Günther Kelleter wrote:
 to allow target specific override of phydev-supported.
 

why do you need to do this ? do you want to force a specific link type ?
if so, then using a fixed link would be preferable to faking phy caps

John


 Signed-off-by: Günther Kelleter guenther.kelle...@devolo.de
 ---
  .../ar71xx/files/arch/mips/include/asm/mach-ath79/ag71xx_platform.h  | 1 +
  .../ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_phy.c| 5 
 +
  2 files changed, 6 insertions(+)
 
 diff --git 
 a/target/linux/ar71xx/files/arch/mips/include/asm/mach-ath79/ag71xx_platform.h
  
 b/target/linux/ar71xx/files/arch/mips/include/asm/mach-ath79/ag71xx_platform.h
 index d46dc4e..aa7663b 100644
 --- 
 a/target/linux/ar71xx/files/arch/mips/include/asm/mach-ath79/ag71xx_platform.h
 +++ 
 b/target/linux/ar71xx/files/arch/mips/include/asm/mach-ath79/ag71xx_platform.h
 @@ -30,6 +30,7 @@ struct ag71xx_platform_data {
   u32 reset_bit;
   u8  mac_addr[ETH_ALEN];
   struct device   *mii_bus_dev;
 + u32 supported;
  
   u8  has_gbit:1;
   u8  is_ar91xx:1;
 diff --git 
 a/target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_phy.c 
 b/target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_phy.c
 index 9de77e9..0f5ec9c 100644
 --- 
 a/target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_phy.c
 +++ 
 b/target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_phy.c
 @@ -146,6 +146,11 @@ static int ag71xx_phy_connect_multi(struct ag71xx *ag)
   else
   phydev-supported = PHY_BASIC_FEATURES;
  
 + if (pdata-supported) {
 + dev_info(dev, overriding phydev-supported (%08x)\n, 
 pdata-supported);
 + phydev-supported = pdata-supported;
 + }
 +
   phydev-advertising = phydev-supported;
  
   dev_info(dev, connected to PHY at %s [uid=%08x, driver=%s]\n,
 
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH v3 6/7] base-files: added option to configure the gpio led trigger in uci-defaults

2015-07-09 Thread John Crispin
Hi,

see inline

On 07/07/2015 14:58, Günther Kelleter wrote:
 Signed-off-by: Günther Kelleter guenther.kelle...@devolo.de
 ---
  package/base-files/files/etc/init.d/led  |  7 +++
  .../base-files/files/lib/functions/uci-defaults.sh   | 20 
 
  2 files changed, 27 insertions(+)
 
 diff --git a/package/base-files/files/etc/init.d/led 
 b/package/base-files/files/etc/init.d/led
 index 1a57e8a..3f45732 100755
 --- a/package/base-files/files/etc/init.d/led
 +++ b/package/base-files/files/etc/init.d/led
 @@ -26,6 +26,8 @@ load_led() {
   config_get port_state $1 port_state
   config_get delay $1 delay 150
   config_get message $1 message 
 + config_get gpio $1 gpio 0
 + config_get inverted $1 inverted 0
  
   if [ $trigger = rssi ]; then
   # handled by rssileds userspace process
 @@ -80,6 +82,11 @@ load_led() {
   echo $delay  /sys/class/leds/${sysfs}/delay
   ;;
  
 + gpio)
 + echo $gpio  /sys/class/leds/${sysfs}/gpio
 + echo $inverted  /sys/class/leds/${sysfs}/inverted
 + ;;
 +
   switch[0-9]*)
   local port_mask
  
 diff --git a/package/base-files/files/lib/functions/uci-defaults.sh 
 b/package/base-files/files/lib/functions/uci-defaults.sh
 index 5a8809d..93997b2 100644
 --- a/package/base-files/files/lib/functions/uci-defaults.sh
 +++ b/package/base-files/files/lib/functions/uci-defaults.sh
 @@ -157,6 +157,26 @@ EOF
   UCIDEF_LEDS_CHANGED=1
  }
  
 +ucidef_set_led_gpio() {

the name is a bit misleading. could you change it to
ucidef_set_led_trigger_gpio or similar ?

John


 + local cfg=led_$1
 + local name=$2
 + local sysfs=$3
 + local gpio=$4
 + local inverted=$5
 +
 + uci -q get system.$cfg  return 0
 +
 + uci batch EOF
 +set system.$cfg='led'
 +set system.$cfg.name='$name'
 +set system.$cfg.sysfs='$sysfs'
 +set system.$cfg.trigger='gpio'
 +set system.$cfg.gpio='$gpio'
 +set system.$cfg.inverted='$inverted'
 +EOF
 + UCIDEF_LEDS_CHANGED=1
 +}
 +
  ucidef_set_rssimon() {
   local dev=$1
   local refresh=$2
 
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] Rebooting boards with 16M SPI flash

2015-07-09 Thread Arjen de Korte

Citeren Paul Fertser fercer...@gmail.com:


Hi John,

John Crispin blo...@openwrt.org writes:

looks good to me but i will run this past linux-mtd and ask them for an
opinion before merging it.


This patch was meant as a quick hack rather than a complete solution,
that's why I didn't bother adding proper commit message, S-o-b etc. But
since I'm the author, I can do that promptly, whenever that's needed.

The main limitation is that I checked only a single datasheet (likely
Winbond) so other models might require different treatment.


The way to exit 4-byte addressing mode, can be determined by looking  
at the SFDP (JEDEC Standard JESD216B). As you already suspected, there  
are many possibilities. The method required, can be derived from the  
16th DWORD from the JEDEC Basic Flash Parameter Table (page 28).



Another is
that such a patch is mostly a bad substitute for proper hardware design.


Not really. There may not be a hardware reset line if the flash is  
running in x4 data mode.


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


Re: [OpenWrt-Devel] [PATCH v3 1/7] ar71xx: ag71xx: add pdata field supported

2015-07-09 Thread John Crispin


On 09/07/2015 09:42, Guenther Kelleter wrote:
 Hi
 
 -Original Message-
 From: John Crispin [mailto:blo...@openwrt.org]
 Sent: Thursday, July 09, 2015 8:24 AM
 To: Guenther Kelleter; openwrt-devel@lists.openwrt.org
 Subject: Re: [OpenWrt-Devel] [PATCH v3 1/7] ar71xx: ag71xx: add pdata field
 supported

 Hi,

 On 07/07/2015 14:58, Günther Kelleter wrote:
 to allow target specific override of phydev-supported.


 why do you need to do this ? do you want to force a specific link type ?
 if so, then using a fixed link would be preferable to faking phy caps
 
 
 It simply doesn't work with autoneg on. The plc chip on the other end of eth0 
 doesn't sync. How can I force no autoneg 1000 full duplex on eth0 without 
 this patch?
 I'm setting (see patch 3/7, 
 target/linux/ar71xx/files/arch/mips/ath79/mach-dlan-pro-500-wp.c)
 + ath79_eth0_data.speed = SPEED_1000;
 + ath79_eth0_data.duplex = DUPLEX_FULL;
 But this has no effect.
 
 

ok, it looked something like this. gimme a day to figure out why
explicitly setting up the speed does not work.
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] Rebooting boards with 16M SPI flash

2015-07-09 Thread Paul Fertser
Arjen de Korte arjen+open...@de-korte.org writes:
 Citeren Paul Fertser fercer...@gmail.com:
 Another is
 that such a patch is mostly a bad substitute for proper hardware design.

 Not really. There may not be a hardware reset line if the flash is
 running in x4 data mode.

Imagine there's a bug in the kernel that made it hang for real. Then
you're counting on the watchdog (usually SoCs come with one integrated)
to cleanly reboot the whole system. If the flash is used in QSPI or
whatever other mode that doesn't allow a dedicated reset line then it
needs to be powercycled on hardware level to ensure reliable operation,
I think.

-- 
Be free, use free (http://www.gnu.org/philosophy/free-sw.html) software!
mailto:fercer...@gmail.com
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH v3 2/7] ath79: dev-eth: initialize clock for id 0 on AR934X

2015-07-09 Thread John Crispin
Hi,

looking closer at the code i noticed that you need to do this as
ath79_mdio1_data is not initialized to 0 properly. the reason being that
it is not static and that in turn is because the header file declares it
as extern yet there are no users.

i would suggest you drop this patch and instead make ath79_mdio1_data
static and remove the prototype from the header file. that should have
the same effect and will make sure ath79_mdio1_data is properly initialized.

please also fix ath79_mdio0_data while at it.

John

On 07/07/2015 14:58, Günther Kelleter wrote:
 Signed-off-by: Günther Kelleter guenther.kelle...@devolo.de
 ---
  target/linux/ar71xx/files/arch/mips/ath79/dev-eth.c | 6 --
  1 file changed, 4 insertions(+), 2 deletions(-)
 
 diff --git a/target/linux/ar71xx/files/arch/mips/ath79/dev-eth.c 
 b/target/linux/ar71xx/files/arch/mips/ath79/dev-eth.c
 index ff94e2e..c7524be 100644
 --- a/target/linux/ar71xx/files/arch/mips/ath79/dev-eth.c
 +++ b/target/linux/ar71xx/files/arch/mips/ath79/dev-eth.c
 @@ -251,9 +251,11 @@ void __init ath79_register_mdio(unsigned int id, u32 
 phy_mask)
   case ATH79_SOC_AR9344:
   if (id == 1) {
   mdio_data-builtin_switch = 1;
 - mdio_data-ref_clock = ar934x_get_mdio_ref_clock();
 - mdio_data-mdio_clock = 625;
 + } else {
 + mdio_data-builtin_switch = 0;
   }
 + mdio_data-ref_clock = ar934x_get_mdio_ref_clock();
 + mdio_data-mdio_clock = 625;
   mdio_data-is_ar934x = 1;
   break;
  
 
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] 6LoWPAN with OpenWRT

2015-07-09 Thread Firas
I'm using OpenWRT Kernel 3.18, and I haven't found separate support for
6LoWPAN. In this kernel there is only 6LoWPAN over Bluetooth !

I want to use it with RF Module !

So how can I implement that please can you guide me please !

 

 

Firas Al Omary

RD (Software , Elctronics) Engineer

Linkedin

 

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


Re: [OpenWrt-Devel] Does anyone have used Ralink i2s under openwrt?

2015-07-09 Thread Sergio
John Crispin blogic at openwrt.org writes:

 
 sorry, been too busy and i doubt i will have time in the near future to
 look at it :(
 

Oooh! Too bad :))


John, could you teld me some tips on how to progress with it and RT5350 cpu 
instead MT7620? I've defined a new section in 
...target/linux/ramips/modules.mk = in order to create the new module

define KernelPackage/sound-rt5350
  TITLE:=rt5350 PCM/I2S Alsa Driver
  DEPENDS:=@TARGET_ramips_rt305x +kmod-sound-soc-core +kmod-regmap
  KCONFIG:= \
  ...

Also modified ...linux-3.10.49/sound/soc/ralink/Kconfig

config SND_MT7620_SOC_I2S
depends on (SOC_MT7620 || SOC_RT305X)  SND_SOC
select SND_SOC_GENERIC_DMAENGINE_PCM
...

So I'm getting bin/ramips/packages/base/kmod-sound-rt5350_3.10.49-
1_ramips_24kec.ipk package, but now I wonder how to add a new card using this 
modules. Maybe I've to deal with DT?
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH v3 2/7] ath79: dev-eth: initialize clock for id 0 on AR934X

2015-07-09 Thread Guenther Kelleter
Hi

 -Original Message-
 From: John Crispin [mailto:blo...@openwrt.org]
 Sent: Thursday, July 09, 2015 8:32 AM
 To: Guenther Kelleter; openwrt-devel@lists.openwrt.org
 Subject: Re: [OpenWrt-Devel] [PATCH v3 2/7] ath79: dev-eth: initialize clock
 for id 0 on AR934X
 
 Hi,
 
 looking closer at the code i noticed that you need to do this as
 ath79_mdio1_data is not initialized to 0 properly. the reason being that it is
 not static and that in turn is because the header file declares it as extern
 yet there are no users.
 
 i would suggest you drop this patch and instead make ath79_mdio1_data static
 and remove the prototype from the header file. that should have the same
 effect and will make sure ath79_mdio1_data is properly initialized.


Static or not doesn't change initialization here. ath79_mdio1_data will be in 
BSS and initialized to 0. And arch/mips/ath79/mach-mynet-n750.c uses 
ath79_mdio0_data so this cannot be changed to static.
I can remove mdio_data-builtin_switch = 0 though since that's implicit.

The important part of the patch is initializing the *_clock members (that's 
what I thought before).
But I checked it again without this patch, and now it looks as if it's working.

Günther

 
 please also fix ath79_mdio0_data while at it.
 
   John
 
 On 07/07/2015 14:58, Günther Kelleter wrote:
  Signed-off-by: Günther Kelleter guenther.kelle...@devolo.de
  ---
   target/linux/ar71xx/files/arch/mips/ath79/dev-eth.c | 6 --
   1 file changed, 4 insertions(+), 2 deletions(-)
 
  diff --git a/target/linux/ar71xx/files/arch/mips/ath79/dev-eth.c
  b/target/linux/ar71xx/files/arch/mips/ath79/dev-eth.c
  index ff94e2e..c7524be 100644
  --- a/target/linux/ar71xx/files/arch/mips/ath79/dev-eth.c
  +++ b/target/linux/ar71xx/files/arch/mips/ath79/dev-eth.c
  @@ -251,9 +251,11 @@ void __init ath79_register_mdio(unsigned int id, u32
 phy_mask)
  case ATH79_SOC_AR9344:
  if (id == 1) {
  mdio_data-builtin_switch = 1;
  -   mdio_data-ref_clock = ar934x_get_mdio_ref_clock();
  -   mdio_data-mdio_clock = 625;
  +   } else {
  +   mdio_data-builtin_switch = 0;
  }   
  +   mdio_data-ref_clock = ar934x_get_mdio_ref_clock();
  +   mdio_data-mdio_clock = 625;
  mdio_data-is_ar934x = 1;
  break;
 
 
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH 2/4] gemini: add NAS packages to Raidsonic profile

2015-07-09 Thread Roman Yeryomin
On 9 July 2015 at 08:31, John Crispin blo...@openwrt.org wrote:


 On 08/07/2015 23:00, Roman Yeryomin wrote:
 Signed-off-by: Roman Yeryomin ro...@advem.lv
 ---
  target/linux/gemini/raidsonic/target.mk | 7 +++
  1 file changed, 7 insertions(+)

 diff --git a/target/linux/gemini/raidsonic/target.mk 
 b/target/linux/gemini/raidsonic/target.mk
 index 56eda4e..d158090 100644
 --- a/target/linux/gemini/raidsonic/target.mk
 +++ b/target/linux/gemini/raidsonic/target.mk
 @@ -4,6 +4,13 @@

  SUBTARGET:=raidsonic
  BOARDNAME:=Raidsonic NAS42x0
 +FEATURES+=usb
 +DEFAULT_PACKAGES+=kmod-usb2 kmod-md-mod kmod-md-linear kmod-md-multipath \
 + kmod-md-raid0 kmod-md-raid1 kmod-md-raid10 kmod-md-raid456 \
 + kmod-fs-btrfs kmod-fs-cifs kmod-fs-ext4 kmod-fs-nfs \
 + kmod-fs-nfsd kmod-fs-ntfs kmod-fs-reiserfs kmod-fs-vfat \
 + kmod-nls-utf8 kmod-usb-storage-extras \
 + samba36-server mdadm cfdisk fdisk e2fsprogs badblocks

 some of these are not part of trunk. i think there was a policy that
 DEFAULT_PACKAGES should only point at stuff in trunk. i guess madm and
 badblocks need to be dropped or moved to trunk


OK, will reconsider the list
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH 1/4] gemini: copy kernel image to BIN_DIR

2015-07-09 Thread Roman Yeryomin
On 9 July 2015 at 08:26, John Crispin blo...@openwrt.org wrote:


 On 08/07/2015 23:00, Roman Yeryomin wrote:
 Signed-off-by: Roman Yeryomin ro...@advem.lv
 ---
  target/linux/gemini/image/Makefile | 3 ++-
  1 file changed, 2 insertions(+), 1 deletion(-)

 diff --git a/target/linux/gemini/image/Makefile 
 b/target/linux/gemini/image/Makefile
 index 7ed1d61..1c51b62 100644
 --- a/target/linux/gemini/image/Makefile
 +++ b/target/linux/gemini/image/Makefile
 @@ -74,7 +74,8 @@ define Image/Build
   dd if=$(BIN_DIR)/$(IMG_PREFIX)-$(1).img of=$(BIN_DIR)/rd.gz bs=6144k 
 count=1
  #dd if=/dev/zero of=$(BIN_DIR)/hddapp.tgz bs=6144k count=1
   dd if=$(BIN_DIR)/$(IMG_PREFIX)-$(1).img of=$(BIN_DIR)/hddapp.tgz 
 bs=6144k count=1 seek=1
 - cp $(KDIR)/$(IMG_PREFIX)-nas4220-zImage $(BIN_DIR)/zImage
 + cp $(KDIR)/$(IMG_PREFIX)-nas4220-zImage $(BIN_DIR)/
 + cp $(BIN_DIR)/$(IMG_PREFIX)-nas4220-zImage $(BIN_DIR)/zImage

 this will lead to the same file being int the bin/ folder twice with
 different names. is that intentional ?


zImage is packed into sysupgrade image and removed later...
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] How to get higher version (2.0) of radvd package

2015-07-09 Thread Pratik Prajapati
Hi,

I want to build radvd (2.0 version) on OpenWrt but it supports radvd 1.9
version.

I have two options:

1) either configure OpenWrt to download radvd's 2.0 version instead of 1.9
or
2) disable radvd in oldpackages and create a new package for 2.0 version
under /openwrt/package/ (like this
https://forum.openwrt.org/viewtopic.php?id=6809)

I want to know is option 1 possible ? If yes then how ?
If No then, is it possible to disable radvd of oldpackages ?

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


Re: [OpenWrt-Devel] Rebooting boards with 16M SPI flash (was: Re: help)

2015-07-09 Thread Jonas Gorski
On Wed, Jul 8, 2015 at 2:00 PM, Paul Fertser fercer...@gmail.com wrote:
 Hi,

 ldy647 ldy...@163.com writes:
 recently, when we install our wireless router, we found when we run
 the reboot command, the board couldn't restart. We hope you could lend
 us a hand to solve this problem. We'll be quite grateful for what you
 do for us.

 Apparently MT7620 can't handle 4 byte addressing mode of the flash
 memory on hardware (probably ROM bootloader) level so it needs to be
 reset somehow prior to resetting the SoC. Some SoCs have a special
 output from the watchdog to reset all the on-board peripherals, it
 should be connected to the !RESET pin of the flash as well. And the
 kernel should then use the watchdog driver to cause a reboot.

According to the datasheet you can set the default to 4addr through
boostrapping pins. This should fix your particular issue.


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


[OpenWrt-Devel] [PATCH V3] cdc_ncm: Add support for moving NDP to end of NCM frame

2015-07-09 Thread chrono

Ahoy everyone,

more on the Telekom Speedstick LTE V (Huawei 3372s) from here:

http://www.amazon.de/dp/B00NLJE3O6

I've tested Enricos latest patch on MIPS (3.18.17) and x86_64 (3.18.11)
and had a little bit of trouble applying it to latest trunk, so here's
the latest tested patch from a diff against 3.18.17 (openwrt-trunk).

With that patch applied, a simple AT^NDISDUP=1,1,your.apn.here and
udhcpc -i wwan0 is online and routing immediately.

The following config snippet is also working directly with openwrt:

config interface '4g'
option proto 'ncm'
option ifname 'wwan0'
option device '/dev/ttyUSB1'
option apn 'internet.eplus.de'

Again, big thanks go to Enrico for fixing NDP/SKB issues, much obliged.

---
--- fix-huawei-3372s-ncm.patch ---

diff -u a/drivers/net/usb/cdc_mbim.c b/drivers/net/usb/cdc_mbim.c
--- a/drivers/net/usb/cdc_mbim.c2015-06-28 17:40:40.0 +
+++ b/drivers/net/usb/cdc_mbim.c2015-07-04 15:05:14.546901702 +
@@ -158,7 +158,7 @@
if (!cdc_ncm_comm_intf_is_mbim(intf-cur_altsetting))
goto err;

-   ret = cdc_ncm_bind_common(dev, intf, data_altsetting);
+   ret = cdc_ncm_bind_common(dev, intf, data_altsetting, 0);
if (ret)
goto err;

diff -u a/drivers/net/usb/cdc_ncm.c b/drivers/net/usb/cdc_ncm.c
--- a/drivers/net/usb/cdc_ncm.c 2015-06-28 17:40:40.0 +
+++ b/drivers/net/usb/cdc_ncm.c 2015-07-09 08:43:01.658770535 +
@@ -684,10 +684,11 @@
ctx-tx_curr_skb = NULL;
}

+   kfree(ctx-delayed_ndp16);
kfree(ctx);
 }

-int cdc_ncm_bind_common(struct usbnet *dev, struct usb_interface *intf, 
u8 data_altsetting)
+int cdc_ncm_bind_common(struct usbnet *dev, struct usb_interface *intf, 
u8 data_altsetting, int drvflags)

 {
const struct usb_cdc_union_desc *union_desc = NULL;
struct cdc_ncm_ctx *ctx;
@@ -855,6 +856,17 @@
/* finish setting up the device specific data */
cdc_ncm_setup(dev);

+   /* Device-specific flags */
+   ctx-drvflags = drvflags;
+
+   /* Allocate the delayed NDP if needed. */
+   if (ctx-drvflags  CDC_NCM_FLAG_NDP_TO_END) {
+   ctx-delayed_ndp16 = kzalloc(ctx-max_ndp_size, GFP_KERNEL);
+   if (!ctx-delayed_ndp16)
+   goto error2;
+		dev_info(intf-dev, NDP will be placed at end of frame for this 
device.);

+   }
+
/* override ethtool_ops */
dev-net-ethtool_ops = cdc_ncm_ethtool_ops;

@@ -954,8 +966,11 @@
if (cdc_ncm_select_altsetting(intf) != CDC_NCM_COMM_ALTSETTING_NCM)
return -ENODEV;

-   /* The NCM data altsetting is fixed */
-   ret = cdc_ncm_bind_common(dev, intf, CDC_NCM_DATA_ALTSETTING_NCM);
+   /* The NCM data altsetting is fixed, so we hard-coded it.
+* Additionally, generic NCM devices are assumed to accept arbitrarily
+* placed NDP.
+*/
+   ret = cdc_ncm_bind_common(dev, intf, CDC_NCM_DATA_ALTSETTING_NCM, 0);

/*
 * We should get an event when network connection is connected or
@@ -986,6 +1001,14 @@
struct usb_cdc_ncm_nth16 *nth16 = (void *)skb-data;
size_t ndpoffset = le16_to_cpu(nth16-wNdpIndex);

+	/* If NDP should be moved to the end of the NCM package, we can't 
follow the
+	* NTH16 header as we would normally do. NDP isn't written to the SKB 
yet, and
+	* the wNdpIndex field in the header is actually not consistent with 
reality. It will be later.

+   */
+   if (ctx-drvflags  CDC_NCM_FLAG_NDP_TO_END)
+   if (ctx-delayed_ndp16-dwSignature == sign)
+   return ctx-delayed_ndp16;
+
/* follow the chain of NDPs, looking for a match */
while (ndpoffset) {
ndp16 = (struct usb_cdc_ncm_ndp16 *)(skb-data + ndpoffset);
@@ -995,7 +1018,8 @@
}

/* align new NDP */
-   cdc_ncm_align_tail(skb, ctx-tx_ndp_modulus, 0, ctx-tx_max);
+   if (!(ctx-drvflags  CDC_NCM_FLAG_NDP_TO_END))
+   cdc_ncm_align_tail(skb, ctx-tx_ndp_modulus, 0, ctx-tx_max);

/* verify that there is room for the NDP and the datagram (reserve) */
if ((ctx-tx_max - skb-len - reserve)  ctx-max_ndp_size)
@@ -1008,7 +1032,11 @@
nth16-wNdpIndex = cpu_to_le16(skb-len);

/* push a new empty NDP */
-	ndp16 = (struct usb_cdc_ncm_ndp16 *)memset(skb_put(skb, 
ctx-max_ndp_size), 0, ctx-max_ndp_size);

+   if (!(ctx-drvflags  CDC_NCM_FLAG_NDP_TO_END))
+		ndp16 = (struct usb_cdc_ncm_ndp16 *)memset(skb_put(skb, 
ctx-max_ndp_size), 0, ctx-max_ndp_size);

+   else
+   ndp16 = ctx-delayed_ndp16;
+
ndp16-dwSignature = sign;
 	ndp16-wLength = cpu_to_le16(sizeof(struct usb_cdc_ncm_ndp16) + 
sizeof(struct usb_cdc_ncm_dpe16));

return ndp16;
@@ -1023,6 +1051,15 @@
struct sk_buff *skb_out;
u16 n = 

Re: [OpenWrt-Devel] [PATCH v3 1/7] ar71xx: ag71xx: add pdata field supported

2015-07-09 Thread Guenther Kelleter
Hi

 -Original Message-
 From: John Crispin [mailto:blo...@openwrt.org]
 Sent: Thursday, July 09, 2015 9:56 AM
 To: Guenther Kelleter; openwrt-devel@lists.openwrt.org
 Subject: Re: [OpenWrt-Devel] [PATCH v3 1/7] ar71xx: ag71xx: add pdata field
 supported
 
 
 
 On 09/07/2015 09:42, Guenther Kelleter wrote:
  Hi
 
  -Original Message-
  From: John Crispin [mailto:blo...@openwrt.org]
  Sent: Thursday, July 09, 2015 8:24 AM
  To: Guenther Kelleter; openwrt-devel@lists.openwrt.org
  Subject: Re: [OpenWrt-Devel] [PATCH v3 1/7] ar71xx: ag71xx: add pdata
  field supported
 
  Hi,
 
  On 07/07/2015 14:58, Günther Kelleter wrote:
  to allow target specific override of phydev-supported.
 
 
  why do you need to do this ? do you want to force a specific link type ?
  if so, then using a fixed link would be preferable to faking phy caps
 
 
  It simply doesn't work with autoneg on. The plc chip on the other end of
 eth0 doesn't sync. How can I force no autoneg 1000 full duplex on eth0 without
 this patch?
  I'm setting (see patch 3/7,
  target/linux/ar71xx/files/arch/mips/ath79/mach-dlan-pro-500-wp.c)
  +   ath79_eth0_data.speed = SPEED_1000;
  +   ath79_eth0_data.duplex = DUPLEX_FULL;
  But this has no effect.
 
 
 
 ok, it looked something like this. gimme a day to figure out why explicitly
 setting up the speed does not work.


You may stop searching because I've found the wrong setting.
I have to keep ath79_eth0_data.phy_mask unset (=0) to get the fixed speed 
settings applied.

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


Re: [OpenWrt-Devel] [PATCH v3 7/7] ar71xx: add support for the devolo dLAN pro 1200+ WiFi ac

2015-07-09 Thread Guenther Kelleter

 -Original Message-
 From: John Crispin [mailto:blo...@openwrt.org]
 Sent: Thursday, July 09, 2015 8:42 AM
 To: Guenther Kelleter; openwrt-devel@lists.openwrt.org
 Subject: Re: [OpenWrt-Devel] [PATCH v3 7/7] ar71xx: add support for the devolo
 dLAN pro 1200+ WiFi ac
 
 Hi,
 
 this function seem to be overly complicated. do you really need this ?

No not really. Now I see that I can use ath79_init_mac instead.

Günther

 
   John
 
 On 07/07/2015 14:58, Günther Kelleter wrote:
  +static void inc_mac_addr(u8 *base_mac, u8 *dst_mac, u8 inc) {
  +   u32  tmp = 0;
  +   char index = 6;
  +
  +   tmp = base_mac[5] + inc;
  +   while ((tmp  255)  (index  0)) {
  +   dst_mac[index-1] = tmp - 256;
  +   index--;
  +   tmp = base_mac[index-1] + 1;
  +   }
  +
  +   dst_mac[index-1] = tmp;
  +   index--;
  +
  +   while (index  0) {
  +   dst_mac[index-1] = base_mac[index-1];
  +   index--;
  +   }
  +}
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH v3 5/7] mac80211: make ath10k firmware v2 selectable

2015-07-09 Thread Guenther Kelleter
Hi

 -Original Message-
 From: openwrt-devel [mailto:openwrt-devel-boun...@lists.openwrt.org] On Behalf
 Of John Crispin
 Sent: Thursday, July 09, 2015 8:38 AM
 To: openwrt-devel@lists.openwrt.org
 Subject: Re: [OpenWrt-Devel] [PATCH v3 5/7] mac80211: make ath10k firmware v2
 selectable
 
 Hi,
 
 dont know at10k very well so pardon my uneducated question...
 
 how does at10k know/choose which of the 2 to use ?

Driver tries all possible fw-version files it knows in sequence until the only 
one that's installed could be loaded.

Günther

 
   John
 
 On 07/07/2015 14:58, Günther Kelleter wrote:
  Added option for old firmware version (10.1 API v2). It seems that
  recent firmware versions are constantly crashing (at least on a
  QCA9880-BR4A-R) and this provides the option to select an older version
 instead.
 
  Signed-off-by: Günther Kelleter guenther.kelle...@devolo.de
  ---
   package/kernel/mac80211/Makefile | 19 +++
   1 file changed, 19 insertions(+)
 
  diff --git a/package/kernel/mac80211/Makefile
  b/package/kernel/mac80211/Makefile
  index 7f698f0..cc98fb7 100644
  --- a/package/kernel/mac80211/Makefile
  +++ b/package/kernel/mac80211/Makefile
  @@ -620,6 +620,19 @@ Atheros IEEE 802.11ac family of chipsets. For now
  only  PCI is supported.
   endef
 
  +define KernelPackage/ath10k/config
  +  if PACKAGE_kmod-ath10k
  +
  +   config ATH10K_API2_FW
  +   bool Firmware optimized for AP operation (v10.1 / API v2)
  +   default n
  +   help
  + Use the ath10k firmware from the 10.1 SDK using API v2
 optimized
  + for access point operation if the default firmware keeps
 crashing.
  +
  +  endif
  +endef
  +
   define KernelPackage/carl9170
 $(call KernelPackage/mac80211/Default)
 TITLE:=Driver for Atheros AR9170 USB sticks @@ -1844,9 +1857,15 @@
  define KernelPackage/ath10k/install
  $(INSTALL_DATA) \
 
   $(PKG_BUILD_DIR)/$(PKG_ATH10K_LINUX_FIRMWARE_SUBDIR)/ath10k/QCA988X/hw2.
 0/board.bin \
  $(1)/lib/firmware/ath10k/QCA988X/hw2.0/
  +ifeq ($(CONFIG_ATH10K_API2_FW),y)
  +   $(INSTALL_DATA) \
  +
   $(PKG_BUILD_DIR)/$(PKG_ATH10K_LINUX_FIRMWARE_SUBDIR)/10.1/firmware-
 2.bin_10.1.467.2-1 \
  +   $(1)/lib/firmware/ath10k/QCA988X/hw2.0/firmware-2.bin
  +else
  $(INSTALL_DATA) \
 
   $(PKG_BUILD_DIR)/$(PKG_ATH10K_LINUX_FIRMWARE_SUBDIR)/10.2.4/untested/fir
 mware-5.bin_10.2.4.70-2 \
  $(1)/lib/firmware/ath10k/QCA988X/hw2.0/firmware-5.bin
  +endif
   endef
 
   define KernelPackage/mwl8k/install
 
 ___
 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] [PATCH] ebtables: fix miscompilation on 64bit targets

2015-07-09 Thread Matthias Schiffer
The musl build fix introduced in r45108 removed all netinet/ether.h
includes, which made the prototypes of ether_aton and ether_ntoa
unavailable. As a result, the compiler assumed they return int instead
of a pointer. This currupted the pointer on 64bit targets, causing ebtables
to segfault in commands containing MAC addresses.

Since r46161 made it possible to include both the kernel and the libc
if_ether.h as long as the libc version is included first, this patch
changes the fix to remove the linux/if_ether.h from the ebtables source
(so the fixed version from the kernel is used) and ensures netinet/ether.h
is included early.

Signed-off-by: Matthias Schiffer mschif...@universe-factory.net
---

A similar fix is necessary in the 15.05 tree, but as r46161 has not been
backported, this patch won't work without changes. Of course, one option
would be to remove musl and all musl-related patches from 15.05, as it is
broken anyways without the musl fixes committed to trunk in the last few
weeks...

Regards,
Matthias


 package/network/utils/ebtables/Makefile|   2 +-
 .../utils/ebtables/patches/100-musl_fix.patch  | 132 -
 2 files changed, 132 insertions(+), 2 deletions(-)

diff --git a/package/network/utils/ebtables/Makefile 
b/package/network/utils/ebtables/Makefile
index 4f6d7f5..30bf426 100644
--- a/package/network/utils/ebtables/Makefile
+++ b/package/network/utils/ebtables/Makefile
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=ebtables
 PKG_VERSION:=2.0.10-4
-PKG_RELEASE:=3
+PKG_RELEASE:=4
 
 PKG_SOURCE:=$(PKG_NAME)-v$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=@SF/ebtables
diff --git a/package/network/utils/ebtables/patches/100-musl_fix.patch 
b/package/network/utils/ebtables/patches/100-musl_fix.patch
index 462fea6..84aeb39 100644
--- a/package/network/utils/ebtables/patches/100-musl_fix.patch
+++ b/package/network/utils/ebtables/patches/100-musl_fix.patch
@@ -40,11 +40,141 @@
  #include getopt.h
 --- a/include/ebtables_u.h
 +++ b/include/ebtables_u.h
-@@ -23,6 +23,7 @@
+@@ -23,6 +23,8 @@
  
  #ifndef EBTABLES_U_H
  #define EBTABLES_U_H
 +#include sys/types.h
++#include netinet/ether.h
  #include netinet/in.h
  #include linux/netfilter_bridge/ebtables.h
  #include linux/netfilter/x_tables.h
+--- a/include/linux/if_ether.h
 /dev/null
+@@ -1,126 +0,0 @@
+-/*
+- * INET   An implementation of the TCP/IP protocol suite for the 
LINUX
+- *operating system.  INET is implemented using the  BSD Socket
+- *interface as the means of communication with the user level.
+- *
+- *Global definitions for the Ethernet IEEE 802.3 interface.
+- *
+- * Version:   @(#)if_ether.h  1.0.1a  02/08/94
+- *
+- * Author:Fred N. van Kempen, wal...@uwalt.nl.mugnet.org
+- *Donald Becker, bec...@super.org
+- *Alan Cox, a...@lxorguk.ukuu.org.uk
+- *Steve Whitehouse, gw7...@eeshack3.swan.ac.uk
+- *
+- *This program is free software; you can redistribute it and/or
+- *modify it under the terms of the GNU General Public License
+- *as published by the Free Software Foundation; either version
+- *2 of the License, or (at your option) any later version.
+- */
+-
+-#ifndef _LINUX_IF_ETHER_H
+-#define _LINUX_IF_ETHER_H
+-
+-#include linux/types.h
+-
+-/*
+- *IEEE 802.3 Ethernet magic constants.  The frame sizes omit the preamble
+- *and FCS/CRC (frame check sequence).
+- */
+-
+-#define ETH_ALEN  6   /* Octets in one ethernet addr   */
+-#define ETH_HLEN  14  /* Total octets in header.   */
+-#define ETH_ZLEN  60  /* Min. octets in frame sans FCS */
+-#define ETH_DATA_LEN  1500/* Max. octets in payload*/
+-#define ETH_FRAME_LEN 1514/* Max. octets in frame sans FCS */
+-#define ETH_FCS_LEN   4   /* Octets in the FCS */
+-
+-/*
+- *These are the defined Ethernet Protocol ID's.
+- */
+-
+-#define ETH_P_LOOP0x0060  /* Ethernet Loopback packet */
+-#define ETH_P_PUP 0x0200  /* Xerox PUP packet */
+-#define ETH_P_PUPAT   0x0201  /* Xerox PUP Addr Trans packet  */
+-#define ETH_P_IP  0x0800  /* Internet Protocol packet */
+-#define ETH_P_X25 0x0805  /* CCITT X.25   */
+-#define ETH_P_ARP 0x0806  /* Address Resolution packet*/
+-#define   ETH_P_BPQ   0x08FF  /* G8BPQ AX.25 Ethernet Packet  
[ NOT AN OFFICIALLY REGISTERED ID ] */
+-#define ETH_P_IEEEPUP 0x0a00  /* Xerox IEEE802.3 PUP packet */
+-#define ETH_P_IEEEPUPAT   0x0a01  /* Xerox IEEE802.3 PUP Addr 
Trans packet */
+-#define ETH_P_DEC   0x6000  /* DEC Assigned proto   */
+-#define ETH_P_DNA_DL0x6001  /* DEC DNA Dump/Load*/
+-#define ETH_P_DNA_RC0x6002  /* DEC DNA Remote Console   */
+-#define 

Re: [OpenWrt-Devel] How to add 6LoWPAN to OpenWRT

2015-07-09 Thread Firas
I'm using RF module JN5148 from Jennic .. and modules from this company are
also not expensive !

Can you please provide me with the download page of the new version 4.0 of
OpenWrt !

I'm now checking on how to add Jennic drivers to OpenWRT if you know how to
please let me know !

 

 

 

Firas Al Omary

RD (Software , Elctronics) Engineer

Linkedin

 

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


[OpenWrt-Devel] [PATCH v4 4/5] base-files: added option to configure the gpio led trigger in uci-defaults

2015-07-09 Thread Günther Kelleter
Signed-off-by: Günther Kelleter guenther.kelle...@devolo.de
---
 package/base-files/files/etc/init.d/led  |  7 +++
 .../base-files/files/lib/functions/uci-defaults.sh   | 20 
 2 files changed, 27 insertions(+)

diff --git a/package/base-files/files/etc/init.d/led 
b/package/base-files/files/etc/init.d/led
index 1a57e8a..3f45732 100755
--- a/package/base-files/files/etc/init.d/led
+++ b/package/base-files/files/etc/init.d/led
@@ -26,6 +26,8 @@ load_led() {
config_get port_state $1 port_state
config_get delay $1 delay 150
config_get message $1 message 
+   config_get gpio $1 gpio 0
+   config_get inverted $1 inverted 0
 
if [ $trigger = rssi ]; then
# handled by rssileds userspace process
@@ -80,6 +82,11 @@ load_led() {
echo $delay  /sys/class/leds/${sysfs}/delay
;;
 
+   gpio)
+   echo $gpio  /sys/class/leds/${sysfs}/gpio
+   echo $inverted  /sys/class/leds/${sysfs}/inverted
+   ;;
+
switch[0-9]*)
local port_mask
 
diff --git a/package/base-files/files/lib/functions/uci-defaults.sh 
b/package/base-files/files/lib/functions/uci-defaults.sh
index 6577ecd..8ba95a2 100644
--- a/package/base-files/files/lib/functions/uci-defaults.sh
+++ b/package/base-files/files/lib/functions/uci-defaults.sh
@@ -158,6 +158,26 @@ EOF
UCIDEF_LEDS_CHANGED=1
 }
 
+ucidef_set_led_trigger_gpio() {
+   local cfg=led_$1
+   local name=$2
+   local sysfs=$3
+   local gpio=$4
+   local inverted=$5
+
+   uci -q get system.$cfg  return 0
+
+   uci batch EOF
+set system.$cfg='led'
+set system.$cfg.name='$name'
+set system.$cfg.sysfs='$sysfs'
+set system.$cfg.trigger='gpio'
+set system.$cfg.gpio='$gpio'
+set system.$cfg.inverted='$inverted'
+EOF
+   UCIDEF_LEDS_CHANGED=1
+}
+
 ucidef_set_rssimon() {
local dev=$1
local refresh=$2
-- 
2.4.4.88.gac2ab0d
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH] [ar71xx] Add support for Onion Omega

2015-07-09 Thread Karl Palsson
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Boken Lin b...@onion.io wrote:
 The firmware won't be dock-specific. The same firmware will be used
 regardless of which dock the Omega is plugged into. And all docks have
 similar configuration, i.e. every dock has a USB port.
 

And when I build a board and put the button and the gpio power for usb
somewhere else?  maybe all of your docks will?  Just something I wanted
you to think about at least :)  Carambola2 unfortunately did the same
thing, so Carambola2 in the build menu actually means, this
particular dev board not any board with a carambola2 on it

Just hoping to avoid that here if possible :)

Cheers,
Karl P

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.11 (GNU/Linux)

iQIcBAEBAgAGBQJVnqeVAAoJEBmotQ/U1cr26UwP/j4lb1se2MFkwbkJxhzSNDUH
rny2n5nHieVac2jKtpR20eH3MOdnS+FqFHmG44X8g9IJjUiz7piIkY+3ZxiE2wOX
aTuGAyknVeKLSk8I6H9nbRrjsBlJqAta09HHvDjBVNI/DAc+HAISI59Q3soryCKa
lGGV7mmb/nYb+okuXo5DDaMSFvnGKXSVJ8BZ19zDsF4KlN9pm944urHp9LsnqXYk
JQ4tkJ5t3YW0PTS0BNtCdEsjH2hffz+otrbHDcLDkYrd+XcMon7duLC+bmkqpVdV
zerzkEJPR2LI8DYn9X/He96d6HMDtCuur1heqSvSEGhy+2X2xikQqzpiN8Cnm8yY
tVZX6lPKSTIaXCW2hVJicffXJMErPoVT5N+vxANS9Hnc1zSy84mSaqZXjWvyEo+3
UCy80UaJruT7JYMYQQjMR3aNdAY6w0zsll0GVB9rtSq79f9NAlPqYWRTFQqkfsF/
ej02yK1pqGehmSZU8pQXNMHaLNQuM3j6F9iaJf0syVfGpbU8+QEQH+Nv7T3LtXwV
QRlHEW/85mNUul1C2se10iKoVTGlEEsQ2jZMIMVfOGyB4RzalBCwk4cMOAESsDo8
aEnbRnN/cSXjzLF1dATJYqNrHMPr3JllF/EIzBDOq/JJTi4Pj3KyMXlF9KtxC9FA
owN8yVClmJDCOo+N8Dnp
=wYLO
-END PGP SIGNATURE-
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH] [ar71xx] Add support for Onion Omega

2015-07-09 Thread Karl Palsson
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Please consider renaming your board.  If I understand your website
properly, the module is the Omega, and this boardfile is for the omega
_with_ one of it's docks

This Omega boardfile would not be usable for someone with a different
dock, with leds/pins in different places.

Further, you've included things like all the usb modules, when the
Omega Onion itself doesn't have a usb port, your dock does.

Minor: Also, you've got oolite/onion in the wrong order.

Cheers,
Karl P



Boken Lin b...@onion.io wrote:
 From: Boken Lin b...@onion.io
 
 Add support for Onion Omega.
 Signed-off-by: Boken Lin b...@onion.io

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.11 (GNU/Linux)

iQIcBAEBAgAGBQJVnnxaAAoJEBmotQ/U1cr2OpoQAJow5szL482WILaBiy1DwoXr
gs8T74Q78hmA7Q4hsWZEw3JWsE2W+jbiXXsNhtTqPqDpK+OkvnOfvjK8+BnR+ofu
1oXJvMRuvKg3htpn0+uuTDBxE1ei60MzbOTC7J4cTDw/Hx8TD7jxdiYRlE1l78Tk
yX1GthWCUmzQa5J+QdMQjWWaAQPlHClpDJGUxIHVl5g4Kol9dC6+rb/fkJ1l5qkO
8GKfh3ALuHyDYRhOHz/IOyj1l2bLEriEis343VfA9rl1Xlw6mKfp5gCpa+KcxAlU
89wsf/xKHAgAipE34p0YlvmOAWPVWrRMvWjOi/mJh9tGjuEicyKY5HYQHToxY7J3
y+ZXBgTSvm/64PRIKY2u/0yzDflqUi/N6zU+DQ6/kQ0HLAKfAsNPwOg/sPuf7bFH
C2kUz98LJ0nrbCk+wlb8CywLoMH7MFbzKziwsimPLITfyavw1LFmfFCqQ/uICIpL
C4g14loo828uo/60RtHxBxL14kDn07GCihXUF+hhbooEkE6KxVAApjnrM1zuOkBb
p0YakVT5QT3kl5WCBxBADY1N8PZmNq2nscoYj96oN2nZEHS4TrfbK+K0KjZJGqTT
ilucYTP1ZBqSjASojpbYbcu9EO+MPKODF2GFlXdwIMUiwb0PJA5gSmrABLIId/XD
Ek+9skaJ09Qt0afD7GxM
=VY1p
-END PGP SIGNATURE-
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] How to add 6LoWPAN to OpenWRT

2015-07-09 Thread Firas
When I tried to compile the kernel and configure it I found only 6LoWPAN
over Bluetooth support, and I need to add 6LoWPAN to work over RF module
like Jenic JN51xx.

 

I'm using OpenWRT Kernel 3.18!

So how can I implement that please can you guide me please !

 

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