[OpenWrt-Devel] [PATCH 1/2] lldpd: remove patch 001

2015-04-21 Thread Alexandru Ardelean
Signed-off-by: Alexandru Ardelean 
---
 ...lookup-for-_lldpd-when-privsep-is-disable.patch | 73 --
 1 file changed, 73 deletions(-)
 delete mode 100644 
package/network/services/lldpd/patches/001-priv-don-t-lookup-for-_lldpd-when-privsep-is-disable.patch

diff --git 
a/package/network/services/lldpd/patches/001-priv-don-t-lookup-for-_lldpd-when-privsep-is-disable.patch
 
b/package/network/services/lldpd/patches/001-priv-don-t-lookup-for-_lldpd-when-privsep-is-disable.patch
deleted file mode 100644
index 907c21b..000
--- 
a/package/network/services/lldpd/patches/001-priv-don-t-lookup-for-_lldpd-when-privsep-is-disable.patch
+++ /dev/null
@@ -1,73 +0,0 @@
-From 28bf40220840c277d70ed66f6d58729ebb975de8 Mon Sep 17 00:00:00 2001
-From: Vincent Bernat 
-Date: Thu, 12 Feb 2015 08:07:43 +0100
-Subject: [PATCH] priv: don't lookup for _lldpd when privsep is disabled
-
-Closes #95

- src/daemon/lldpd.c | 10 ++
- 1 file changed, 10 insertions(+)
-
-diff --git a/src/daemon/lldpd.c b/src/daemon/lldpd.c
-index f868fc7..6a3a160 100644
 a/src/daemon/lldpd.c
-+++ b/src/daemon/lldpd.c
-@@ -1335,11 +1335,13 @@ lldpd_main(int argc, char *argv[], char *envp[])
-   int receiveonly = 0;
-   int ctl;
- 
-+#ifdef ENABLE_PRIVSEP
-   /* Non privileged user */
-   struct passwd *user;
-   struct group *group;
-   uid_t uid;
-   gid_t gid;
-+#endif
- 
-   saved_argv = argv;
- 
-@@ -1493,12 +1495,14 @@ lldpd_main(int argc, char *argv[], char *envp[])
-   log_debug("main", "lldpd starting...");
- 
-   /* Grab uid and gid to use for priv sep */
-+#ifdef ENABLE_PRIVSEP
-   if ((user = getpwnam(PRIVSEP_USER)) == NULL)
-   fatal("main", "no " PRIVSEP_USER " user for privilege 
separation");
-   uid = user->pw_uid;
-   if ((group = getgrnam(PRIVSEP_GROUP)) == NULL)
-   fatal("main", "no " PRIVSEP_GROUP " group for privilege 
separation");
-   gid = group->gr_gid;
-+#endif
- 
-   /* Create and setup socket */
-   int retry = 1;
-@@ -1526,12 +1530,14 @@ lldpd_main(int argc, char *argv[], char *envp[])
-   log_warn("main", "unable to create control socket");
-   fatalx("giving up");
-   }
-+#ifdef ENABLE_PRIVSEP
-   if (chown(ctlname, uid, gid) == -1)
-   log_warn("main", "unable to chown control socket");
-   if (chmod(ctlname,
-   S_IRUSR | S_IWUSR | S_IXUSR |
-   S_IRGRP | S_IWGRP | S_IXGRP) == -1)
-   log_warn("main", "unable to chmod control socket");
-+#endif
- 
-   /* Disable SIGPIPE */
-   signal(SIGPIPE, SIG_IGN);
-@@ -1576,7 +1582,11 @@ lldpd_main(int argc, char *argv[], char *envp[])
-   }
- 
-   log_debug("main", "initialize privilege separation");
-+#ifdef ENABLE_PRIVSEP
-   priv_init(PRIVSEP_CHROOT, ctl, uid, gid);
-+#else
-+  priv_init(PRIVSEP_CHROOT, ctl, 0, 0);
-+#endif
- 
-   /* Initialization of global configuration */
-   if ((cfg = (struct lldpd *)
--- 
-2.1.2
-
-- 
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 2/2] lldpd: update to version 0.7.14

2015-04-21 Thread Alexandru Ardelean
Signed-off-by: Alexandru Ardelean 
---
 package/network/services/lldpd/Makefile | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/package/network/services/lldpd/Makefile 
b/package/network/services/lldpd/Makefile
index d80840e..c759c4f 100644
--- a/package/network/services/lldpd/Makefile
+++ b/package/network/services/lldpd/Makefile
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=lldpd
-PKG_VERSION:=0.7.13
-PKG_RELEASE:=2
+PKG_VERSION:=0.7.14
+PKG_RELEASE:=3
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=http://media.luffy.cx/files/lldpd
-PKG_MD5SUM:=13e8be761753eac9a8e12128acba40b4
+PKG_MD5SUM:=66462f85e56895256fa77ea1ab53bfbc
 
 PKG_MAINTAINER:=Jo-Philipp Wich 
 PKG_LICENSE:=ISC
-- 
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] generic/4.0: bump to version 4.0

2015-04-21 Thread Daniel Golle
Linux 4.0 was released on 2014-04-12

Signed-off-by: Daniel Golle 
---
 include/kernel-version.mk | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/kernel-version.mk b/include/kernel-version.mk
index bb43e00..de20fef 100644
--- a/include/kernel-version.mk
+++ b/include/kernel-version.mk
@@ -3,10 +3,10 @@
 LINUX_RELEASE?=1
 
 LINUX_VERSION-3.18 = .11
-LINUX_VERSION-4.0 = -rc7
+LINUX_VERSION-4.0 =
 
 LINUX_KERNEL_MD5SUM-3.18.11 = 2def91951c9cedf7896efb864e0c090c
-LINUX_KERNEL_MD5SUM-4.0-rc7 = 26db663899b1a54397b4f184ca05f213
+LINUX_KERNEL_MD5SUM-4.0 = a86916bd12798220da9eb4a1eec3616d
 
 ifdef KERNEL_PATCHVER
   LINUX_VERSION:=$(KERNEL_PATCHVER)$(strip $(LINUX_VERSION-$(KERNEL_PATCHVER)))
-- 
2.3.5
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH] generic/4.0: bump to version 4.0

2015-04-21 Thread Sedat Dilek
On Tue, Apr 21, 2015 at 9:56 AM, Daniel Golle  wrote:
> Linux 4.0 was released on 2014-04-12
>

Looking at the history of commits concerning Linux kernel-versions it
seems not to be unambiguous how such patches are labeled.
So what says "generic/4.0" to me - generic of what?
Why don't all developers/submitters use a label like "kernel:" (some
committers has used this)?

What about...?

"kernel: Bump to Linux version 4.0"

This is more meaningful to me.

- Sedat -

[1] http://git.openwrt.org/?p=openwrt.git;a=history;f=include/kernel-version.mk

> Signed-off-by: Daniel Golle 
> ---
>  include/kernel-version.mk | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/include/kernel-version.mk b/include/kernel-version.mk
> index bb43e00..de20fef 100644
> --- a/include/kernel-version.mk
> +++ b/include/kernel-version.mk
> @@ -3,10 +3,10 @@
>  LINUX_RELEASE?=1
>
>  LINUX_VERSION-3.18 = .11
> -LINUX_VERSION-4.0 = -rc7
> +LINUX_VERSION-4.0 =
>
>  LINUX_KERNEL_MD5SUM-3.18.11 = 2def91951c9cedf7896efb864e0c090c
> -LINUX_KERNEL_MD5SUM-4.0-rc7 = 26db663899b1a54397b4f184ca05f213
> +LINUX_KERNEL_MD5SUM-4.0 = a86916bd12798220da9eb4a1eec3616d
>
>  ifdef KERNEL_PATCHVER
>LINUX_VERSION:=$(KERNEL_PATCHVER)$(strip 
> $(LINUX_VERSION-$(KERNEL_PATCHVER)))
> --
> 2.3.5
> ___
> openwrt-devel mailing list
> openwrt-devel@lists.openwrt.org
> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH 2/2] lldpd: update to version 0.7.14

2015-04-21 Thread Jo-Philipp Wich
Hi Alexandru,

please reset the PKG_REVISION to 1 on version bumps.

~ Jow
___
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] ar71xx: merge ap81 patches into one

2015-04-21 Thread John Crispin


On 15/04/2015 23:37, Roman Yeryomin wrote:
> Signed-off-by: Roman Yeryomin 
> ---
>  ...ath79-make-chipselect-logic-more-flexible.patch | 21 -
>  .../patches-3.18/604-MIPS-ath79-ap81-fixes.patch   | 50 
> ++
>  ...614-MIPS-ath79-ap81-remove-mtd-partitions.patch | 49 -
>  3 files changed, 3 insertions(+), 117 deletions(-)
>  delete mode 100644
target/linux/ar71xx/patches-3.18/614-MIPS-ath79-ap81-remove-mtd-partitions.patch



looking at this diffstat i get the feeling that there is a patch missing






> 
> diff --git 
> a/target/linux/ar71xx/patches-3.18/206-spi-ath79-make-chipselect-logic-more-flexible.patch
>  
> b/target/linux/ar71xx/patches-3.18/206-spi-ath79-make-chipselect-logic-more-flexible.patch
> index 1d38986..1cf4c23 100644
> --- 
> a/target/linux/ar71xx/patches-3.18/206-spi-ath79-make-chipselect-logic-more-flexible.patch
> +++ 
> b/target/linux/ar71xx/patches-3.18/206-spi-ath79-make-chipselect-logic-more-flexible.patch
> @@ -57,27 +57,6 @@ Signed-off-by: Gabor Juhos 
>   }
>   };
>   
>  a/arch/mips/ath79/mach-ap81.c
> -+++ b/arch/mips/ath79/mach-ap81.c
> -@@ -67,12 +67,18 @@ static struct gpio_keys_button ap81_gpio
> - }
> - };
> - 
> -+static struct ath79_spi_controller_data ap81_spi0_data = {
> -+.cs_type = ATH79_SPI_CS_TYPE_INTERNAL,
> -+.cs_line = 0,
> -+};
> -+
> - static struct spi_board_info ap81_spi_info[] = {
> - {
> - .bus_num= 0,
> - .chip_select= 0,
> - .max_speed_hz   = 2500,
> - .modalias   = "m25p64",
> -+.controller_data = &ap81_spi0_data,
> - }
> - };
> - 
>  --- a/arch/mips/ath79/mach-db120.c
>  +++ b/arch/mips/ath79/mach-db120.c
>  @@ -76,12 +76,18 @@ static struct gpio_keys_button db120_gpi
> diff --git a/target/linux/ar71xx/patches-3.18/604-MIPS-ath79-ap81-fixes.patch 
> b/target/linux/ar71xx/patches-3.18/604-MIPS-ath79-ap81-fixes.patch
> index bbfdd49..2817453 100644
> --- a/target/linux/ar71xx/patches-3.18/604-MIPS-ath79-ap81-fixes.patch
> +++ b/target/linux/ar71xx/patches-3.18/604-MIPS-ath79-ap81-fixes.patch
> @@ -20,60 +20,16 @@
>   
>   #define AP81_GPIO_LED_STATUS1
>   #define AP81_GPIO_LED_AOSS  3
> -@@ -29,6 +33,37 @@
> - 
> - #define AP81_CAL_DATA_ADDR  0x1fff1000
> - 
> -+static struct mtd_partition ap81_partitions[] = {
> -+{
> -+.name   = "u-boot",
> -+.offset = 0,
> -+.size   = 0x04,
> -+.mask_flags = MTD_WRITEABLE,
> -+}, {
> -+.name   = "u-boot-env",
> -+.offset = 0x04,
> -+.size   = 0x01,
> -+}, {
> -+.name   = "rootfs",
> -+.offset = 0x05,
> -+.size   = 0x50,
> -+}, {
> -+.name   = "uImage",
> -+.offset = 0x55,
> -+.size   = 0x10,
> -+}, {
> -+.name   = "ART",
> -+.offset = 0x65,
> -+.size   = 0x1b,
> -+.mask_flags = MTD_WRITEABLE,
> -+}
> -+};
> -+
> -+static struct flash_platform_data ap81_flash_data = {
> -+.parts  = ap81_partitions,
> -+.nr_parts   = ARRAY_SIZE(ap81_partitions),
> -+};
> -+
> - static struct gpio_led ap81_leds_gpio[] __initdata = {
> - {
> - .name   = "ap81:green:status",
> -@@ -67,26 +102,6 @@ static struct gpio_keys_button ap81_gpio
> +@@ -67,20 +102,6 @@ static struct gpio_keys_button ap81_gpio
>   }
>   };
>   
> --static struct ath79_spi_controller_data ap81_spi0_data = {
> --.cs_type = ATH79_SPI_CS_TYPE_INTERNAL,
> --.cs_line = 0,
> --};
> --
>  -static struct spi_board_info ap81_spi_info[] = {
>  -{
>  -.bus_num= 0,
>  -.chip_select= 0,
>  -.max_speed_hz   = 2500,
>  -.modalias   = "m25p64",
> --.controller_data = &ap81_spi0_data,
>  -}
>  -};
>  -
> @@ -85,13 +41,13 @@
>   static void __init ap81_setup(void)
>   {
>   u8 *cal_data = (u8 *) KSEG1ADDR(AP81_CAL_DATA_ADDR);
> -@@ -96,10 +111,24 @@ static void __init ap81_setup(void)
> +@@ -90,10 +105,24 @@ static void __init ap81_setup(void)
>   ath79_register_gpio_keys_polled(-1, AP81_KEYS_POLL_INTERVAL,
>   ARRAY_SIZE(ap81_gpio_keys),
>   ap81_gpio_keys);
>  -ath79_register_spi(&ap81_spi_data, ap81_spi_info,
>  -   ARRAY_SIZE(ap81_spi_info));
> -+ath79_register_m25p80(&ap81_flash_data);
> ++ath79_register_m25p80(NULL);
>   ath79_register_wmac(cal_data, NULL);
>   ath79_register_usb();
>  +
> diff --git 
> a/target/linux/ar71xx/patches-3.18/614-MIPS-ath79-ap81-remove-mtd-partitions.patch
>  
> b/target/linux/ar71xx/patches-3.18/614-MIPS-ath79-ap81-remove-mtd-partitions.pat

Re: [OpenWrt-Devel] [PATCH 1/2] ar71xx: merge ap81 patches into one

2015-04-21 Thread John Crispin


On 21/04/2015 11:49, John Crispin wrote:
> 
> 
> On 15/04/2015 23:37, Roman Yeryomin wrote:
>> Signed-off-by: Roman Yeryomin 
>> ---
>>  ...ath79-make-chipselect-logic-more-flexible.patch | 21 -
>>  .../patches-3.18/604-MIPS-ath79-ap81-fixes.patch   | 50 
>> ++
>>  ...614-MIPS-ath79-ap81-remove-mtd-partitions.patch | 49 
>> -
>>  3 files changed, 3 insertions(+), 117 deletions(-)
>>  delete mode 100644
> target/linux/ar71xx/patches-3.18/614-MIPS-ath79-ap81-remove-mtd-partitions.patch
> 
> 
> 
> looking at this diffstat i get the feeling that there is a patch missing
> 

taking a closer look this is correct, sorry for the noise
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 2/2][RESEND] lldpd: update to version 0.7.14

2015-04-21 Thread Alexandru Ardelean
Signed-off-by: Alexandru Ardelean 
---
 package/network/services/lldpd/Makefile | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/package/network/services/lldpd/Makefile 
b/package/network/services/lldpd/Makefile
index d80840e..382d127 100644
--- a/package/network/services/lldpd/Makefile
+++ b/package/network/services/lldpd/Makefile
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=lldpd
-PKG_VERSION:=0.7.13
-PKG_RELEASE:=2
+PKG_VERSION:=0.7.14
+PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=http://media.luffy.cx/files/lldpd
-PKG_MD5SUM:=13e8be761753eac9a8e12128acba40b4
+PKG_MD5SUM:=66462f85e56895256fa77ea1ab53bfbc
 
 PKG_MAINTAINER:=Jo-Philipp Wich 
 PKG_LICENSE:=ISC
-- 
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 10/10] brcmfmac: Add support for multiple PCIE devices in nvram.

2015-04-21 Thread Rafał Miłecki
On 20 April 2015 at 22:16, Arend van Spriel  wrote:
> On 04/20/15 20:49, Rafał Miłecki wrote:
>>
>> On 20 April 2015 at 19:12, Arend van Spriel  wrote:
>>>
>>> On 04/20/15 13:26, Rafał Miłecki wrote:


 On 17 April 2015 at 10:50, Arend van Spriel   wrote:
>
> Another option is to add the parsing stuff in that nvram code and have
> an
> api to get the appropriate portion based on pcie domain and bus number
> as
> used in brcmf_fw_get_firmwares_pcie(). However, I would prefer to have
> this
> in the driver and not in arch specific code as there may be other
> platforms
> like our set-top boxes needing this.



 This is some plan for the future I was lacking from the beginning. It
 makes things more clear now, thanks.
>>>
>>>
>>> You're welcome. Do you want to see this clarification in the commit
>>> message?
>>
>>
>> I don't really need that, I'm leaving it up to you :)
>>
>> The last remaining question from me is if  about this NVRAM validation
>> function (if it exists).
>
>
> Ok. I can try to answer that one. The nvram parsing code in firmware.c
> intends to do just that. So apart from stripping comments and whitespace it
> validates each line and gives off a warning if a wrongly formatted entry is
> found.

OK, thanks. So I guess this patch is OK after all?

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


Re: [OpenWrt-Devel] [PATCH 10/10] brcmfmac: Add support for multiple PCIE devices in nvram.

2015-04-21 Thread Arend van Spriel

On 04/21/15 12:16, Rafał Miłecki wrote:

On 20 April 2015 at 22:16, Arend van Spriel  wrote:

On 04/20/15 20:49, Rafał Miłecki wrote:


On 20 April 2015 at 19:12, Arend van Spriel   wrote:


On 04/20/15 13:26, Rafał Miłecki wrote:



On 17 April 2015 at 10:50, Arend van Sprielwrote:


Another option is to add the parsing stuff in that nvram code and have
an
api to get the appropriate portion based on pcie domain and bus number
as
used in brcmf_fw_get_firmwares_pcie(). However, I would prefer to have
this
in the driver and not in arch specific code as there may be other
platforms
like our set-top boxes needing this.




This is some plan for the future I was lacking from the beginning. It
makes things more clear now, thanks.



You're welcome. Do you want to see this clarification in the commit
message?



I don't really need that, I'm leaving it up to you :)

The last remaining question from me is if  about this NVRAM validation
function (if it exists).



Ok. I can try to answer that one. The nvram parsing code in firmware.c
intends to do just that. So apart from stripping comments and whitespace it
validates each line and gives off a warning if a wrongly formatted entry is
found.


OK, thanks. So I guess this patch is OK after all?


Until proven otherwise. I tested it with a number of format violations, 
but there could be more creative people out there coming up with a 
pattern uncovering some issue.


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


[OpenWrt-Devel] AR8334 switch support

2015-04-21 Thread Christian Mehlis
I was involved in making upstream support for the compex wpj344 and came 
across the AR8334 embedded switch used on this board.


Unfortunately it seems that this switch is not jet supported by the
ar8327/ar8216 driver in openwrt.

The vendor just did this to their openwrt based sdk:

--- a/target/linux/generic/files/drivers/net/phy/ar8327.c
+++ b/target/linux/generic/files/drivers/net/phy/ar8327.c
@@ -508,8 +508,10 @@ ar8327_hw_config_pdata(struct ar8xxx_priv *priv,
data->port6_status = ar8327_get_port_init_status(&pdata->port6_cfg);

t = ar8327_get_pad_cfg(pdata->pad0_cfg);
+#if 0
if (chip_is_ar8337(priv))
t |= AR8337_PAD_MAC06_EXCHANGE_EN;
+#endif

ar8xxx_write(priv, AR8327_REG_PAD0_MODE, t);
t = ar8327_get_pad_cfg(pdata->pad5_cfg);
--

I tied to find a more generic solution but it seems that my ar8334 is 
identifying itself as "Atheros AR8337 rev. 2 switch". The identification 
read from the device is ver:0x13 rev:0x02.


If you have more information on that chip or some source code, feel free 
to reply (or send me a mail).


The board support went upstream in the mean time:

https://dev.openwrt.org/changeset/45527

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 1/2] lldpd: remove patch 001

2015-04-21 Thread Jonas Gorski
On Tue, Apr 21, 2015 at 9:30 AM, Alexandru Ardelean
 wrote:
> Signed-off-by: Alexandru Ardelean 

Please provide some explanation why it is okay to remove the patch.


Jonas
___
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] lldpd: remove patch 001

2015-04-21 Thread Alexandru Ardelean
On Tue, Apr 21, 2015 at 5:40 PM, Jonas Gorski  wrote:

> On Tue, Apr 21, 2015 at 9:30 AM, Alexandru Ardelean
>  wrote:
> > Signed-off-by: Alexandru Ardelean 
>
> Please provide some explanation why it is okay to remove the patch.
>
>
> Jonas
>

My bad for omitting the explanation.
Removed patch is included in the 0.7.14 release which is the second patch
that upgrades lldpd to 0.7.14.
___
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] lldpd: remove patch 001

2015-04-21 Thread Jonas Gorski
On Tue, Apr 21, 2015 at 4:56 PM, Alexandru Ardelean
 wrote:
> On Tue, Apr 21, 2015 at 5:40 PM, Jonas Gorski  wrote:
>>
>> On Tue, Apr 21, 2015 at 9:30 AM, Alexandru Ardelean
>>  wrote:
>> > Signed-off-by: Alexandru Ardelean 
>>
>> Please provide some explanation why it is okay to remove the patch.
>>
>>
>> Jonas
>
>
> My bad for omitting the explanation.
> Removed patch is included in the 0.7.14 release which is the second patch
> that upgrades lldpd to 0.7.14.

Then you should remove the patch at the same time as updating the
version, not before. So please merge both into one patch.


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


[OpenWrt-Devel] [PATCH][RESEND] lldpd: update to version 0.7.14

2015-04-21 Thread Alexandru Ardelean
And removing patch 001 which is now included in the 0.7.14 release.

Signed-off-by: Alexandru Ardelean 
---
 package/network/services/lldpd/Makefile|  6 +-
 ...lookup-for-_lldpd-when-privsep-is-disable.patch | 73 --
 2 files changed, 3 insertions(+), 76 deletions(-)
 delete mode 100644 
package/network/services/lldpd/patches/001-priv-don-t-lookup-for-_lldpd-when-privsep-is-disable.patch

diff --git a/package/network/services/lldpd/Makefile 
b/package/network/services/lldpd/Makefile
index d80840e..382d127 100644
--- a/package/network/services/lldpd/Makefile
+++ b/package/network/services/lldpd/Makefile
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=lldpd
-PKG_VERSION:=0.7.13
-PKG_RELEASE:=2
+PKG_VERSION:=0.7.14
+PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=http://media.luffy.cx/files/lldpd
-PKG_MD5SUM:=13e8be761753eac9a8e12128acba40b4
+PKG_MD5SUM:=66462f85e56895256fa77ea1ab53bfbc
 
 PKG_MAINTAINER:=Jo-Philipp Wich 
 PKG_LICENSE:=ISC
diff --git 
a/package/network/services/lldpd/patches/001-priv-don-t-lookup-for-_lldpd-when-privsep-is-disable.patch
 
b/package/network/services/lldpd/patches/001-priv-don-t-lookup-for-_lldpd-when-privsep-is-disable.patch
deleted file mode 100644
index 907c21b..000
--- 
a/package/network/services/lldpd/patches/001-priv-don-t-lookup-for-_lldpd-when-privsep-is-disable.patch
+++ /dev/null
@@ -1,73 +0,0 @@
-From 28bf40220840c277d70ed66f6d58729ebb975de8 Mon Sep 17 00:00:00 2001
-From: Vincent Bernat 
-Date: Thu, 12 Feb 2015 08:07:43 +0100
-Subject: [PATCH] priv: don't lookup for _lldpd when privsep is disabled
-
-Closes #95

- src/daemon/lldpd.c | 10 ++
- 1 file changed, 10 insertions(+)
-
-diff --git a/src/daemon/lldpd.c b/src/daemon/lldpd.c
-index f868fc7..6a3a160 100644
 a/src/daemon/lldpd.c
-+++ b/src/daemon/lldpd.c
-@@ -1335,11 +1335,13 @@ lldpd_main(int argc, char *argv[], char *envp[])
-   int receiveonly = 0;
-   int ctl;
- 
-+#ifdef ENABLE_PRIVSEP
-   /* Non privileged user */
-   struct passwd *user;
-   struct group *group;
-   uid_t uid;
-   gid_t gid;
-+#endif
- 
-   saved_argv = argv;
- 
-@@ -1493,12 +1495,14 @@ lldpd_main(int argc, char *argv[], char *envp[])
-   log_debug("main", "lldpd starting...");
- 
-   /* Grab uid and gid to use for priv sep */
-+#ifdef ENABLE_PRIVSEP
-   if ((user = getpwnam(PRIVSEP_USER)) == NULL)
-   fatal("main", "no " PRIVSEP_USER " user for privilege 
separation");
-   uid = user->pw_uid;
-   if ((group = getgrnam(PRIVSEP_GROUP)) == NULL)
-   fatal("main", "no " PRIVSEP_GROUP " group for privilege 
separation");
-   gid = group->gr_gid;
-+#endif
- 
-   /* Create and setup socket */
-   int retry = 1;
-@@ -1526,12 +1530,14 @@ lldpd_main(int argc, char *argv[], char *envp[])
-   log_warn("main", "unable to create control socket");
-   fatalx("giving up");
-   }
-+#ifdef ENABLE_PRIVSEP
-   if (chown(ctlname, uid, gid) == -1)
-   log_warn("main", "unable to chown control socket");
-   if (chmod(ctlname,
-   S_IRUSR | S_IWUSR | S_IXUSR |
-   S_IRGRP | S_IWGRP | S_IXGRP) == -1)
-   log_warn("main", "unable to chmod control socket");
-+#endif
- 
-   /* Disable SIGPIPE */
-   signal(SIGPIPE, SIG_IGN);
-@@ -1576,7 +1582,11 @@ lldpd_main(int argc, char *argv[], char *envp[])
-   }
- 
-   log_debug("main", "initialize privilege separation");
-+#ifdef ENABLE_PRIVSEP
-   priv_init(PRIVSEP_CHROOT, ctl, uid, gid);
-+#else
-+  priv_init(PRIVSEP_CHROOT, ctl, 0, 0);
-+#endif
- 
-   /* Initialization of global configuration */
-   if ((cfg = (struct lldpd *)
--- 
-2.1.2
-
-- 
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] AR8334 switch support

2015-04-21 Thread Heiner Kallweit
All I found regarding AR8334/QCA8334 is that it supposedly has four ports.
(There was even an AR8335 with five ports mentioned).
Considering the port / phy layout of AR8337 and the existing boards
with AR8334 I'd assume that AR8334 has just two phy's.
The 8327/8337 code of the driver at least would have to be extended to
not assume a fixed 7 port / 5 phy layout.

Apart from the fact that the driver treats AR8334 as a 7 port / 5 phy
chip it also applies the fixups for AR8327 rev. 2, what is at least
questionnable.

Is the AR8334 fully functional with this slightly modified driver or
are certain thing not working?

Rgds, Heiner


On Tue, Apr 21, 2015 at 1:51 PM, Christian Mehlis  wrote:
> I was involved in making upstream support for the compex wpj344 and came
> across the AR8334 embedded switch used on this board.
>
> Unfortunately it seems that this switch is not jet supported by the
> ar8327/ar8216 driver in openwrt.
>
> The vendor just did this to their openwrt based sdk:
>
> --- a/target/linux/generic/files/drivers/net/phy/ar8327.c
> +++ b/target/linux/generic/files/drivers/net/phy/ar8327.c
> @@ -508,8 +508,10 @@ ar8327_hw_config_pdata(struct ar8xxx_priv *priv,
> data->port6_status = ar8327_get_port_init_status(&pdata->port6_cfg);
>
> t = ar8327_get_pad_cfg(pdata->pad0_cfg);
> +#if 0
> if (chip_is_ar8337(priv))
> t |= AR8337_PAD_MAC06_EXCHANGE_EN;
> +#endif
>
> ar8xxx_write(priv, AR8327_REG_PAD0_MODE, t);
> t = ar8327_get_pad_cfg(pdata->pad5_cfg);
> --
>
> I tied to find a more generic solution but it seems that my ar8334 is
> identifying itself as "Atheros AR8337 rev. 2 switch". The identification
> read from the device is ver:0x13 rev:0x02.
>
> If you have more information on that chip or some source code, feel free to
> reply (or send me a mail).
>
> The board support went upstream in the mean time:
>
> https://dev.openwrt.org/changeset/45527
>
> Best
> Christian
> ___
> 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 1/4] [ubox] log: remove unused callbacks

2015-04-21 Thread Luka Perkov
Signed-off-by: Luka Perkov 
---
 log/logd.c| 6 --
 log/logread.c | 5 -
 2 files changed, 11 deletions(-)

diff --git a/log/logd.c b/log/logd.c
index 8cebeb8..4a7a746 100644
--- a/log/logd.c
+++ b/log/logd.c
@@ -55,11 +55,6 @@ client_close(struct ustream *s)
free(cl);
 }
 
-static void
-client_notify_write(struct ustream *s, int bytes)
-{
-}
-
 static void client_notify_state(struct ustream *s)
 {
client_close(s);
@@ -88,7 +83,6 @@ read_log(struct ubus_context *ctx, struct ubus_object *obj,
}
ubus_request_set_fd(ctx, req, fds[0]);
cl = calloc(1, sizeof(*cl));
-   cl->s.stream.notify_write = client_notify_write;
cl->s.stream.notify_state = client_notify_state;
cl->fd = fds[1];
ustream_fd_init(&cl->s, cl->fd);
diff --git a/log/logread.c b/log/logread.c
index 94b96db..6255408 100644
--- a/log/logread.c
+++ b/log/logread.c
@@ -223,10 +223,6 @@ static void logread_fd_cb(struct ubus_request *req, int fd)
ustream_fd_init(&test_fd, fd);
 }
 
-static void logread_complete_cb(struct ubus_request *req, int ret)
-{
-}
-
 int main(int argc, char **argv)
 {
static struct ubus_request req;
@@ -334,7 +330,6 @@ int main(int argc, char **argv)
 
ubus_invoke_async(ctx, id, "read", b.head, &req);
req.fd_cb = logread_fd_cb;
-   req.complete_cb = logread_complete_cb;
ubus_complete_request_async(ctx, &req);
 
uloop_run();
-- 
2.3.5
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 2/4] [ubox] log: fix whitespaces

2015-04-21 Thread Luka Perkov
Signed-off-by: Luka Perkov 
---
 log/syslog.c | 2 +-
 log/syslog.h | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/log/syslog.c b/log/syslog.c
index 4cabb43..f75fed9 100644
--- a/log/syslog.c
+++ b/log/syslog.c
@@ -203,7 +203,7 @@ syslog_open(void)
int fd;
 
unlink(log_dev);
-   fd = usock(USOCK_UNIX | USOCK_UDP |  USOCK_SERVER | USOCK_NONBLOCK, 
log_dev, NULL);
+   fd = usock(USOCK_UNIX | USOCK_UDP | USOCK_SERVER | USOCK_NONBLOCK, 
log_dev, NULL);
if (fd < 0) {
fprintf(stderr,"Failed to open %s\n", log_dev);
return -1;
diff --git a/log/syslog.h b/log/syslog.h
index b682ced..81a039f 100644
--- a/log/syslog.h
+++ b/log/syslog.h
@@ -26,7 +26,7 @@ struct log_head {
unsigned int id;
int priority;
int source;
-struct timespec ts;
+   struct timespec ts;
char data[];
 };
 
-- 
2.3.5
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 3/4] [ubox] log: make valgrind less complain by freeing allocated memory

2015-04-21 Thread Luka Perkov
Signed-off-by: Luka Perkov 
---
 log/logd.c   | 5 -
 log/syslog.c | 1 +
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/log/logd.c b/log/logd.c
index 4a7a746..a4335ea 100644
--- a/log/logd.c
+++ b/log/logd.c
@@ -70,6 +70,7 @@ read_log(struct ubus_context *ctx, struct ubus_object *obj,
struct log_head *l;
int count = 0;
int fds[2];
+   int ret;
 
if (msg) {
blobmsg_parse(&read_policy, 1, &tb, blob_data(msg), 
blob_len(msg));
@@ -96,7 +97,9 @@ read_log(struct ubus_context *ctx, struct ubus_object *obj,
blobmsg_add_u32(&b, "source", l->source);
blobmsg_add_u64(&b, "time", l->ts.tv_sec * 1000LL);
l = log_list(count, l);
-   if (ustream_write(&cl->s.stream, (void *) b.head, 
blob_len(b.head) + sizeof(struct blob_attr), false) <= 0)
+   ret = ustream_write(&cl->s.stream, (void *) b.head, 
blob_len(b.head) + sizeof(struct blob_attr), false);
+   blob_buf_free(&b);
+   if (ret < 0)
break;
}
return 0;
diff --git a/log/syslog.c b/log/syslog.c
index f75fed9..a596b48 100644
--- a/log/syslog.c
+++ b/log/syslog.c
@@ -299,4 +299,5 @@ log_shutdown(void)
ustream_free(&klog.stream);
close(slog.fd.fd);
close(klog.fd.fd);
+   free(log);
 }
-- 
2.3.5
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] AR8334 switch support

2015-04-21 Thread Christian Mehlis

Am 21.04.2015 um 17:19 schrieb Heiner Kallweit:

All I found regarding AR8334/QCA8334 is that it supposedly has four ports.
(There was even an AR8335 with five ports mentioned).
Considering the port / phy layout of AR8337 and the existing boards
with AR8334 I'd assume that AR8334 has just two phy's.
The 8327/8337 code of the driver at least would have to be extended to
not assume a fixed 7 port / 5 phy layout.


I see.


Apart from the fact that the driver treats AR8334 as a 7 port / 5 phy
chip it also applies the fixups for AR8327 rev. 2, what is at least
questionnable.

Is the AR8334 fully functional with this slightly modified driver or
are certain thing not working?


With the vendor patch, Linux is able to talk to the switch, and 
send/receive data.


Strange things I discovered:

1) on "plug out"

Atheros AR8216/AR8236/AR8316 ag71xx-mdio.0:00: Port 3 is down

is printed, but linux keeps the interface as UP.

2) # swconfig list (on this board) shows multiple switches?!
Found: switch0 - ag71xx-mdio.0
Found: switch1 - eth1

3) swconfig dev switch0 show
works as expected.

files attached:
1. boot with ports connected
2. disconnect plugs
3. dump the files

If you can supply some sort of patch for the 4 port switch, I would be 
happy to test. -> I want to have upstream support for the switch (and 
the compex wpj344).


In case you really need the actual hardware (the compex wpj344) I can 
send you a board.


Best
Christian

Global attributes:
enable_vlan: 1
enable_mirror_rx: 0
enable_mirror_tx: 0
mirror_monitor_port: 0
mirror_source_port: 0
arl_table: address resolution table
Port 0: MAC 56:61:d1:e9:13:d6

Port 0:
mib: Port 0 MIB counters
RxBroad : 19
RxPause : 0
RxMulti : 56
RxFcsErr: 0
RxAlignErr  : 0
RxRunt  : 0
RxFragment  : 0
Rx64Byte: 18
Rx128Byte   : 69
Rx256Byte   : 584
Rx512Byte   : 10
Rx1024Byte  : 0
Rx1518Byte  : 0
RxMaxByte   : 0
RxTooLong   : 0
RxGoodByte  : 127420
RxBadByte   : 0
RxOverFlow  : 0
Filtered: 58
TxBroad : 134
TxPause : 0
TxMulti : 1141
TxUnderRun  : 0
Tx64Byte: 21
Tx128Byte   : 1194
Tx256Byte   : 95
Tx512Byte   : 4
Tx1024Byte  : 4
Tx1518Byte  : 4
TxMaxByte   : 0
TxOverSize  : 0
TxByte  : 121582
TxCollision : 0
TxAbortCol  : 0
TxMultiCol  : 0
TxSingleCol : 0
TxExcDefer  : 0
TxDefer : 0
TxLateCol   : 0

enable_eee: ???
pvid: 0
link: port:0 link:up speed:1000baseT full-duplex txflow rxflow 
Port 1:
mib: Port 1 MIB counters
RxBroad : 0
RxPause : 0
RxMulti : 0
RxFcsErr: 0
RxAlignErr  : 0
RxRunt  : 0
RxFragment  : 0
Rx64Byte: 0
Rx128Byte   : 0
Rx256Byte   : 0
Rx512Byte   : 0
Rx1024Byte  : 0
Rx1518Byte  : 0
RxMaxByte   : 0
RxTooLong   : 0
RxGoodByte  : 0
RxBadByte   : 0
RxOverFlow  : 0
Filtered: 0
TxBroad : 0
TxPause : 0
TxMulti : 0
TxUnderRun  : 0
Tx64Byte: 0
Tx128Byte   : 0
Tx256Byte   : 0
Tx512Byte   : 0
Tx1024Byte  : 0
Tx1518Byte  : 0
TxMaxByte   : 0
TxOverSize  : 0
TxByte  : 0
TxCollision : 0
TxAbortCol  : 0
TxMultiCol  : 0
TxSingleCol : 0
TxExcDefer  : 0
TxDefer : 0
TxLateCol   : 0

enable_eee: 0
pvid: 0
link: port:1 link:down
Port 2:
mib: Port 2 MIB counters
RxBroad : 98
RxPause : 0
RxMulti : 326
RxFcsErr: 0
RxAlignErr  : 0
RxRunt  : 0
RxFragment  : 0
Rx64Byte: 135
Rx128Byte   : 295
Rx256Byte   : 31
Rx512Byte   : 2
Rx1024Byte  : 0
Rx1518Byte  : 0
RxMaxByte   : 0
RxTooLong   : 0
RxGoodByte  : 40127
RxBadByte   : 0
RxOverFlow  : 0
Filtered: 0
TxBroad : 2
TxPause : 0
TxMulti : 5
TxUnderRun  : 0
Tx64Byte: 3
Tx128Byte   : 37
Tx256Byte   : 5
Tx512Byte   : 2
Tx1024Byte  : 0
Tx1518Byte  : 0
TxMaxByte   : 0
TxOverSize  : 0
TxByte  : 5122
TxCollision : 0
TxAbortCol  : 0
TxMultiCol  : 0
TxSingleCol : 0
TxExcDefer  : 0
TxDefer : 0
TxLateCol   : 0

enable_eee: 0
pvid: 2
link: port:2 link:down
Port 3:
mib: Port 3 MIB counters
RxBroad : 37
RxPause : 0
RxMulti : 815
RxFcsErr: 0
RxAlignErr  : 0
RxRunt  : 0
RxFragment  : 0
Rx64Byte: 54
Rx128Byte   : 732
Rx256Byte   : 64
Rx512Byte   : 2
Rx1024Byte  : 4
Rx1518Byte  : 4
RxMaxByte   : 0
RxTooLong   : 0
RxGoodByte  : 76507
RxBadByte   : 0
RxOverFlow  : 0
Filtered: 1
TxBroad : 2
TxPause : 0
TxMulti : 15
TxUnderRun  : 0
Tx64Byte: 1
Tx128Byte   : 12
Tx256Byte   : 561
Tx512Byte   : 2
Tx1024Byte  : 0
Tx1518Byte  : 0
TxMaxByte   : 0
TxOverSize  : 0
TxByte  : 111573
TxCollision : 0
TxAbortCol  : 0
TxMultiCol  : 0
TxSingleCol : 0
TxExcDefer  : 0
TxDefer : 0
TxLateCol   : 0

enable_eee: 0
pvid: 1
link: port:3 link:down
Port 4:
mib: Port 4 MIB counters
RxBroad : 0
RxPause : 0
RxMulti : 0
RxFcsErr: 0
RxAlignErr  : 0
RxRunt  : 0
RxFragment  : 0
Rx64Byte: 0
Rx128Byte   : 0
Rx256Byte   : 0
Rx512Byte   : 0
Rx1024Byte  

[OpenWrt-Devel] [PATCH 4/4] [ubox] logd: optimize notify function

2015-04-21 Thread Luka Perkov
No need to construct every time the same blob_buf for each client in the list.

Signed-off-by: Luka Perkov 
---
 log/logd.c | 18 ++
 1 file changed, 10 insertions(+), 8 deletions(-)

diff --git a/log/logd.c b/log/logd.c
index a4335ea..27d3cac 100644
--- a/log/logd.c
+++ b/log/logd.c
@@ -147,15 +147,17 @@ ubus_notify_log(struct log_head *l)
if (list_empty(&clients))
return;
 
-   list_for_each_entry(c, &clients, list) {
-   blob_buf_init(&b, 0);
-   blobmsg_add_string(&b, "msg", l->data);
-   blobmsg_add_u32(&b, "id", l->id);
-   blobmsg_add_u32(&b, "priority", l->priority);
-   blobmsg_add_u32(&b, "source", l->source);
-   blobmsg_add_u64(&b, "time", (((__u64) l->ts.tv_sec) * 1000) + 
(l->ts.tv_nsec / 100));
+   blob_buf_init(&b, 0);
+   blobmsg_add_string(&b, "msg", l->data);
+   blobmsg_add_u32(&b, "id", l->id);
+   blobmsg_add_u32(&b, "priority", l->priority);
+   blobmsg_add_u32(&b, "source", l->source);
+   blobmsg_add_u64(&b, "time", (((__u64) l->ts.tv_sec) * 1000) + 
(l->ts.tv_nsec / 100));
+
+   list_for_each_entry(c, &clients, list)
ustream_write(&c->s.stream, (void *) b.head, blob_len(b.head) + 
sizeof(struct blob_attr), false);
-   }
+
+   blob_buf_free(&b);
 }
 
 static void
-- 
2.3.5
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel