Re: [OpenWrt-Devel] [PATCH uclient] allow sending requests with DELETE method
On 2015-01-22 11:45, Rafał Miłecki wrote: Signed-off-by: Rafał Miłecki zaj...@gmail.com Applied, thanks. - Felix ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH v2] build: allow openwrt.git packages to be replaced by feeds
On 22/01/2015 03:55, Mathieu Olivari wrote: Currently, replacing a package available in openwrt.git requires modifications in openwrt.git, or requires duplicating the package in a feed but with a different name, which causes all kind of problems related to dependencies (all packages selecting it would have to be modified accordingly to select the new package). With this change, if a package with the same name is present both in feeds/ and package/ folders, the one in feeds/ can override the one in package/, both in the menuconfig and during the build, by passing the -f option to ./scripts/feeds install This mechanism is particularly useful for vendor tree, or in general for application which needs to replace one particular package which exists within openwrt.git by a custom/newer version. Hi, ./scripts/feeds install -p -a alljoyn Use of uninitialized value $override in numeric eq (==) at ./scripts/feeds line 400. Installing package 'alljoyn' i will revert the patch now and await a fixed version John Signed-off-by: Mathieu Olivari math...@qca.qualcomm.com --- v2: *fix an issue when trying to override packages which include a dependency in the core packages. (ex: lua depends on liblua, which exists in the core, which ended-up in the package not being overridden properly). *address John's concerns about core OpenWrt packages being overriden without notice and control. Override is now disable by default, and -f needs to be passed to ./scripts/feeds install to allow it. --- include/scan.awk | 17 + include/scan.mk |2 +- scripts/feeds| 25 ++--- 3 files changed, 36 insertions(+), 8 deletions(-) create mode 100644 include/scan.awk diff --git a/include/scan.awk b/include/scan.awk new file mode 100644 index 000..39b2977 --- /dev/null +++ b/include/scan.awk @@ -0,0 +1,17 @@ +BEGIN { FS=/ } +$1 ~ /^feeds/ { FEEDS[$NF]=$0 } +$1 !~ /^feeds/ { PKGS[$NF]=$0 } +END { + # Filter-out OpenWrt packages which have a feeds equivalent + for (pkg in PKGS) + if (pkg in FEEDS) + delete PKGS[pkg] + n = asort(PKGS) + for (i=1; i = n; i++) { + print PKGS[i] + } + n = asort(FEEDS) + for (i=1; i = n; i++){ + print FEEDS[i] + } +} diff --git a/include/scan.mk b/include/scan.mk index 0998333..138707d 100644 --- a/include/scan.mk +++ b/include/scan.mk @@ -43,7 +43,7 @@ endef $(FILELIST): rm -f $(TMP_DIR)/info/.files-$(SCAN_TARGET)-* - $(call FIND_L, $(SCAN_DIR)) $(SCAN_EXTRA) -mindepth 1 $(if $(SCAN_DEPTH),-maxdepth $(SCAN_DEPTH)) -name Makefile | xargs grep -HE 'call (Build/DefaultTargets|Build(Package|Target)|.+Package)' | sed -e 's#^$(SCAN_DIR)/##' -e 's#/Makefile:.*##' | uniq $@ + $(call FIND_L, $(SCAN_DIR)) $(SCAN_EXTRA) -mindepth 1 $(if $(SCAN_DEPTH),-maxdepth $(SCAN_DEPTH)) -name Makefile | xargs grep -HE 'call (Build/DefaultTargets|Build(Package|Target)|.+Package)' | sed -e 's#^$(SCAN_DIR)/##' -e 's#/Makefile:.*##' | uniq | awk -f include/scan.awk $@ $(TMP_DIR)/info/.files-$(SCAN_TARGET).mk: $(FILELIST) ( \ diff --git a/scripts/feeds b/scripts/feeds index 31ad544..6c03375 100755 --- a/scripts/feeds +++ b/scripts/feeds @@ -358,6 +358,7 @@ sub is_core_package($) { sub install_package { my $feed = shift; my $name = shift; + my $force = shift; my $ret = 0; $feed = lookup_package($feed, $name); @@ -383,13 +384,22 @@ sub install_package { $src or $src = $name; # previously installed packages set the runtime package - # newly installed packages set the source package - $installed{$src} and return 0; + # newly installed packages set the source package to 1 + $installed{$src} and $installed{$src} == 1 and return 0; + + # we'll trigger the override only with the 3 conditions below: + # - override is allowed by command line (-f) + # - a package with the same src exists in the core packages list + # - the package previously installed is not from a feed + my $override = 1 if ($force and is_core_package($src) and !$installed{$src}-{feed}); # check previously installed packages - $installed{$name} and return 0; + $installed{$name} and !$override and return 0; $installed{$src} = 1; - warn Installing package '$src'\n; + + $override == 1 + and warn Overriding package '$src'\n + or warn Installing package '$src'\n; $install_method{$type} or do { warn Unknown installation method: '$type'\n; @@ -436,7 +446,7 @@ sub install { my $feed; my $ret = 0; - getopts('ap:d:h', \%opts); + getopts('ap:d:fh', \%opts); if ($opts{h}) { usage(); @@ -462,7 +472,7 @@ sub install { my $p =
Re: [OpenWrt-Devel] [PATCH uclient] use const for char buffer in uclient_write
On 2015-01-21 22:48, Rafał Miłecki wrote: We are not supposed to modify it and ustream accepts const already. Signed-off-by: Rafał Miłecki zaj...@gmail.com Applied, thanks. - Felix ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH 1/5] uloop: fix out-of-bound loop index.
On 22 January 2015 at 02:58, Felix Fietkau n...@openwrt.org wrote: On 2015-01-21 14:21, Yousong Zhou wrote: Signed-off-by: Yousong Zhou yszhou4t...@gmail.com --- uloop.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/uloop.c b/uloop.c index 9a77ce4..3224f4b 100644 --- a/uloop.c +++ b/uloop.c @@ -394,11 +394,11 @@ int uloop_fd_delete(struct uloop_fd *fd) { int i; - for (i = 0; i cur_nfds; i++) { - if (cur_fds[cur_fd + i].fd != fd) + for (i = cur_fd; i cur_nfds; i++) { + if (cur_fds[i].fd != fd) This patch (aside from the fact that it's completely missing an explanation) seems wrong to me. cur_nfds really means the number of file descriptors in the struct, not the array size starting at 0. Take a look at uloop_run_events - when it increments cur_fd, it also decrements cur_nfds. Yes, I got the point now. Thanks for the clarification. - Felix ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH] fix typo in netifd.sh
On 20/01/2015 18:44, Cezary Jackiewicz wrote: $ht variable is not passed. $htmode is. With this, wpa_supplicant-phy0.conf contains htmode line if htmode is set in config. Signed-off-by: Cezary Jackiewicz cezary.jackiew...@gmail.com --- diff --git a/package/network/services/hostapd/files/netifd.sh b/package/network/services/hostapd/files/netifd.sh index d625709..436eee3 100644 --- a/package/network/services/hostapd/files/netifd.sh +++ b/package/network/services/hostapd/files/netifd.sh @@ -595,8 +595,7 @@ wpa_supplicant_add_network() { append network_data mcast_rate=$mc_rate $N$T } - local ht_str - [ -n $ht ] append network_data htmode=$ht $N$T + [ -n $htmode ] append network_data htmode=$htmode $N$T this patch is wrong for the following reasons * the htmode values inside netifd-wireless.sh are not the same values that wpa_supplicant expects * wpa_supplicant should automagically detect the channel (and the HT40 ext chan) this leads me to wonder why you need this and an option would be 2 adhoc clients. can you explain your wifi setup so that we can figure out how to properly fix this ? cat $_config EOF network={ ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH] iptables: IPv6 addresses with some mask values cause memory corruption
This patch fixes a bug in iptables that is causing memory corruption when a rule contains IPv6 address with mask divisible by 8 or equal to /128. After some debugging, we found out that this bug was already reported and applied in commit a76a5c997a235f822d49799c25fce8e311d473c7 in iptables. The bug occured on PowerPC platform (mpc85xx), resulting in segfault. It's possible that it'd not surface on other platforms or with some compiler options, as the overflown byte wouldn't rewrite any vital address. This patch would probably be no longer necessasy after release of iptables 1.4.22, however it's not sure when a new version is going to be released and this bug can make using IPv6 rules in iptables impossible. Also, can you please backport this patch to BB? Signed-off-by: Jan Cermak jan.cer...@nic.cz Link to original commit in iptables repository: https://git.netfilter.org/iptables/commit/?id=a76a5c997a235f822d49799c25fce8e311d473c7 diff --git a/package/network/utils/iptables/patches/600-libxtables-fix-two-off-by-one-memory-corruption-bugs.patch b/package/network/utils/iptables/patches/600-libxtables-fix-two-off-by-one-memory-corruption-bugs.patch new file mode 100644 index 000..3f7364b --- /dev/null +++ b/package/network/utils/iptables/patches/600-libxtables-fix-two-off-by-one-memory-corruption-bugs.patch @@ -0,0 +1,14 @@ +--- a/libxtables/xtables.c b/libxtables/xtables.c +@@ -1704,8 +1704,9 @@ static struct in6_addr *parse_ip6mask(char *mask) + if (bits != 0) { + char *p = (void *)maskaddr; + memset(p, 0xff, bits / 8); +- memset(p + (bits / 8) + 1, 0, (128 - bits) / 8); +- p[bits/8] = 0xff (8 - (bits 7)); ++ memset(p + ((bits + 7) / 8), 0, (128 - bits) / 8); ++ if (bits 128) ++ p[bits/8] = 0xff (8 - (bits 7)); + return maskaddr; + } + ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH] Adding support for 6LoWPAN over Bluetooth Low Energy in kernel 3.18.
On 21/01/2015 13:53, Duda, Lukasz wrote: + DEPENDS:=+kmod-bluetooth @!LINUX_3_3 @!LINUX_3_8 @!LINUX_3_10 +@!LINUX_3_13 @!LINUX_3_14 this is also wrong, @!(LINUX_3_3||LINUX_3_8||..)) is the correct syntax. please resend a fixed version ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH v2] Adding support for 6LoWPAN over Bluetooth Low Energy in kernel 3.18.
Adding support 6LoWPAN over Bluetooth Low Energy in kernel 3.18. Creating new bluetooth_6lowpan group with CONFIG_6LOWPAN and CONFIG_BT_6LOWPAN. Adding kernel object dependencies for 6LoWPAN over Bluetooth Low Energy. Signed-off-by: Lukasz Duda lukasz.duda...@nordicsemi.commailto:lukasz.duda...@nordicsemi.com --- v2: *fix an issue with the mail formatting as mail client removed line breaks. --- Index: package/kernel/linux/modules/other.mk === --- package/kernel/linux/modules/other.mk (revision 44059) +++ package/kernel/linux/modules/other.mk (working copy) @@ -70,6 +70,26 @@ $(eval $(call KernelPackage,bluetooth)) +define KernelPackage/bluetooth_6lowpan + SUBMENU:=$(OTHER_MENU) + TITLE:=Bluetooth 6LoWPAN support + DEPENDS:=+kmod-bluetooth @!(LINUX_3_3||LINUX_3_8||LINUX_3_10||LINUX_3_13||LINUX_3_14) + KCONFIG:= \ + CONFIG_6LOWPAN=m \ + CONFIG_BT_6LOWPAN=m + FILES:= \ + $(LINUX_DIR)/net/bluetooth/bluetooth_6lowpan.ko \ + $(LINUX_DIR)/net/6lowpan/6lowpan.ko + AUTOLOAD:=$(call AutoProbe,bluetooth) +endef + +define KernelPackage/bluetooth_6lowpan/description + Kernel support for 6LoWPAN over Bluetooth Low Energy devices +endef + +$(eval $(call KernelPackage,bluetooth_6lowpan)) + + define KernelPackage/bluetooth-hci-h4p SUBMENU:=$(OTHER_MENU) TITLE:=HCI driver with H4 Nokia extensions --- ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH] [packages_extra] snort: add missing libuuid dependency
On 21/01/2015 23:13, daniel wrote: The current version of snort fails to build because the libuuid pkg dependency is missing. This little patch fixes the issue, please apply. Signed-off-by: Daniel Danzberger dan...@dd-wrt.com please send a pull request via github for packages inside the feed. the mailing list is for trunk related patches ___ 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] Adding support for 6LoWPAN over Bluetooth Low Energy in kernel 3.18.
This patch was not tested prior to sending it ... see inline On 21/01/2015 13:53, Duda, Lukasz wrote: Adding support 6LoWPAN over Bluetooth Low Energy in kernel 3.18. Creating new bluetooth_6lowpan group with COFNIG_6LOWPAN and CONFIG_BT_6LOWPAN. Adding kernel object dependencies for 6LoWPAN over Bluetooth Low Energy. Signed-off-by: Lukasz Duda lukasz.duda at nordicsemi.no --- Index: package/kernel/linux/modules/other.mk === --- package/kernel/linux/modules/other.mk (revision 44059) +++ package/kernel/linux/modules/other.mk (working copy) @@ -70,6 +70,26 @@ $(eval $(call KernelPackage,bluetooth)) +define KernelPackage/bluetooth_6lowpan + SUBMENU:=$(OTHER_MENU) + TITLE:=Bluetooth 6LoWPAN support + DEPENDS:=+kmod-bluetooth @!LINUX_3_3 @!LINUX_3_8 @!LINUX_3_10 +@!LINUX_3_13 @!LINUX_3_14 + KCONFIG:= \ + CONFIG_6LOWPAN=m \ + CONFIG_BT_6LOWPAN=m + FILES:= \ + $(LINUX_DIR)/net/bluetooth/bluetooth_6lowpan.ko \ + $(LINUX_DIR)/net/6lowpan/6lowpan.ko + AUTOLOAD:=$(call AutoProbe,bluetooth) +endef + +define KernelPackage/bluetooth_6lowpan/description + Kernel support for 6LoWPAN over Bluetooth Low Energy devices endef + endef is missing, please test the patches that you send +$(eval $(call KernelPackage,bluetooth_6lowpan)) + + define KernelPackage/bluetooth-hci-h4p SUBMENU:=$(OTHER_MENU) TITLE:=HCI driver with H4 Nokia extensions --- ___ 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, v2] feeds: search packages by license
On 20/01/2015 23:20, Eric Schultz wrote: Currently, the feeds scripts provides no way to filter by packages by license or no license. This patch adds a search feature to feeds which can be used to search packages by license or by no license. Calls to script/feeds which do not use the new -l or -n options should work the same as before. Signed-off-by: Eric Schultz eschu...@prplfoundation.org --- [...] @@ -642,6 +704,8 @@ Commands: search [options] substring: Search for a package Options: -r feedname: Only search in this feed + -l license: Only include packages with this license + -n:Only include packages without a license tag i think there parameters are still sub optimal How about these 2 -l Only include packages with a license -n List all packages that have no license (developer use) additionally your text editor seems to be wonky and uses leading spaces instead of tabs. please make sure you use tabs. I also spotted 2-3 whitespace fixes, these should be in a seperate patch and not intermingled with the actual feature patch uninstall -a|package: Uninstall a package Options: ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH v2] build: allow openwrt.git packages to be replaced by feeds
On 22/01/2015 03:55, Mathieu Olivari wrote: Currently, replacing a package available in openwrt.git requires modifications in openwrt.git, or requires duplicating the package in a feed but with a different name, which causes all kind of problems related to dependencies (all packages selecting it would have to be modified accordingly to select the new package). With this change, if a package with the same name is present both in feeds/ and package/ folders, the one in feeds/ can override the one in package/, both in the menuconfig and during the build, by passing the -f option to ./scripts/feeds install This mechanism is particularly useful for vendor tree, or in general for application which needs to replace one particular package which exists within openwrt.git by a custom/newer version. Signed-off-by: Mathieu Olivari math...@qca.qualcomm.com Hi Mathieu, this looks much better. i think we should also add some info in /etc/openwrt_release in the field DISTRIB_TAINTS='no-all' indicating that the build uses out of tree vendor packages. i will merge this patch as is, but could you put the openwrt_release patch onto your todo list and send it in the nearish future please John --- v2: *fix an issue when trying to override packages which include a dependency in the core packages. (ex: lua depends on liblua, which exists in the core, which ended-up in the package not being overridden properly). *address John's concerns about core OpenWrt packages being overriden without notice and control. Override is now disable by default, and -f needs to be passed to ./scripts/feeds install to allow it. --- include/scan.awk | 17 + include/scan.mk |2 +- scripts/feeds| 25 ++--- 3 files changed, 36 insertions(+), 8 deletions(-) create mode 100644 include/scan.awk diff --git a/include/scan.awk b/include/scan.awk new file mode 100644 index 000..39b2977 --- /dev/null +++ b/include/scan.awk @@ -0,0 +1,17 @@ +BEGIN { FS=/ } +$1 ~ /^feeds/ { FEEDS[$NF]=$0 } +$1 !~ /^feeds/ { PKGS[$NF]=$0 } +END { + # Filter-out OpenWrt packages which have a feeds equivalent + for (pkg in PKGS) + if (pkg in FEEDS) + delete PKGS[pkg] + n = asort(PKGS) + for (i=1; i = n; i++) { +print PKGS[i] + } + n = asort(FEEDS) + for (i=1; i = n; i++){ + print FEEDS[i] +} +} diff --git a/include/scan.mk b/include/scan.mk index 0998333..138707d 100644 --- a/include/scan.mk +++ b/include/scan.mk @@ -43,7 +43,7 @@ endef $(FILELIST): rm -f $(TMP_DIR)/info/.files-$(SCAN_TARGET)-* - $(call FIND_L, $(SCAN_DIR)) $(SCAN_EXTRA) -mindepth 1 $(if $(SCAN_DEPTH),-maxdepth $(SCAN_DEPTH)) -name Makefile | xargs grep -HE 'call (Build/DefaultTargets|Build(Package|Target)|.+Package)' | sed -e 's#^$(SCAN_DIR)/##' -e 's#/Makefile:.*##' | uniq $@ + $(call FIND_L, $(SCAN_DIR)) $(SCAN_EXTRA) -mindepth 1 $(if $(SCAN_DEPTH),-maxdepth $(SCAN_DEPTH)) -name Makefile | xargs grep -HE 'call (Build/DefaultTargets|Build(Package|Target)|.+Package)' | sed -e 's#^$(SCAN_DIR)/##' -e 's#/Makefile:.*##' | uniq | awk -f include/scan.awk $@ $(TMP_DIR)/info/.files-$(SCAN_TARGET).mk: $(FILELIST) ( \ diff --git a/scripts/feeds b/scripts/feeds index 31ad544..6c03375 100755 --- a/scripts/feeds +++ b/scripts/feeds @@ -358,6 +358,7 @@ sub is_core_package($) { sub install_package { my $feed = shift; my $name = shift; + my $force = shift; my $ret = 0; $feed = lookup_package($feed, $name); @@ -383,13 +384,22 @@ sub install_package { $src or $src = $name; # previously installed packages set the runtime package - # newly installed packages set the source package - $installed{$src} and return 0; + # newly installed packages set the source package to 1 + $installed{$src} and $installed{$src} == 1 and return 0; + +# we'll trigger the override only with the 3 conditions below: +# - override is allowed by command line (-f) +# - a package with the same src exists in the core packages list + # - the package previously installed is not from a feed + my $override = 1 if ($force and is_core_package($src) and !$installed{$src}-{feed}); # check previously installed packages - $installed{$name} and return 0; + $installed{$name} and !$override and return 0; $installed{$src} = 1; - warn Installing package '$src'\n; + + $override == 1 + and warn Overriding package '$src'\n + or warn Installing package '$src'\n; $install_method{$type} or do { warn Unknown installation method: '$type'\n; @@ -436,7 +446,7 @@ sub install { my $feed; my $ret = 0; - getopts('ap:d:h', \%opts); +getopts('ap:d:fh', \%opts); if ($opts{h}) { usage(); @@ -462,7 +472,7 @@ sub install { my $p = $feed_package-{$name}; next if $p-{vdepends}; if( $p-{name} ) { -
Re: [OpenWrt-Devel] [PATCH v2] Adding support for 6LoWPAN over Bluetooth Low Energy in kernel 3.18.
On 22/01/2015 09:48, Duda, Lukasz wrote: Adding support 6LoWPAN over Bluetooth Low Energy in kernel 3.18. Creating new bluetooth_6lowpan group with CONFIG_6LOWPAN and CONFIG_BT_6LOWPAN. Adding kernel object dependencies for 6LoWPAN over Bluetooth Low Energy. the mail contains a html version of the patch and a whitespace broken text version please resend using the method you use for v1. i assume you used copypaste and a mail client for v2 Signed-off-by: Lukasz Duda lukasz.duda...@nordicsemi.com mailto:lukasz.duda...@nordicsemi.com --- v2: *fix an issue with the mail formatting as mail client removed line breaks. --- Index: package/kernel/linux/modules/other.mk === --- package/kernel/linux/modules/other.mk (revision 44059) +++ package/kernel/linux/modules/other.mk (working copy) @@ -70,6 +70,26 @@ $(eval $(call KernelPackage,bluetooth)) +define KernelPackage/bluetooth_6lowpan + SUBMENU:=$(OTHER_MENU) + TITLE:=Bluetooth 6LoWPAN support + DEPENDS:=+kmod-bluetooth @!(LINUX_3_3||LINUX_3_8||LINUX_3_10||LINUX_3_13||LINUX_3_14) + KCONFIG:= \ + CONFIG_6LOWPAN=m \ + CONFIG_BT_6LOWPAN=m + FILES:= \ + $(LINUX_DIR)/net/bluetooth/bluetooth_6lowpan.ko \ + $(LINUX_DIR)/net/6lowpan/6lowpan.ko + AUTOLOAD:=$(call AutoProbe,bluetooth) +endef + +define KernelPackage/bluetooth_6lowpan/description + Kernel support for 6LoWPAN over Bluetooth Low Energy devices +endef + +$(eval $(call KernelPackage,bluetooth_6lowpan)) + + define KernelPackage/bluetooth-hci-h4p SUBMENU:=$(OTHER_MENU) TITLE:=HCI driver with H4 Nokia extensions --- ___ 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] uboot-lantiq cgu settings for ramboot image
is this patch correct and should be merged or is it a RFC ? http://patchwork.ozlabs.org/patch/431024/ ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH] lantiq: correct value for fpi clock on ar9
On Thu, 2015-01-22 at 08:34 +0100, John Crispin wrote: On 21/01/2015 10:35, Ben Mulvihill wrote: Hello, This is a patch to go in target/linux/lantiq/patches-3.14/ please send a patch that adds the file instead of just sending the file Sure, will do. I would have done, but I remembered you replying to someone else a little while ago that you preferred to roll your own. Ben ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH v3] Adding support for 6LoWPAN over Bluetooth Low Energy in kernel 3.18.
Adding support 6LoWPAN over Bluetooth Low Energy in kernel 3.18. Creating new bluetooth_6lowpan group with CONFIG_6LOWPAN and CONFIG_BT_6LOWPAN. Adding kernel object dependencies for 6LoWPAN over Bluetooth Low Energy. Signed-off-by: Lukasz Duda lukasz.duda...@nordicsemi.com --- v2: *fix an issue with the mail formatting as mail client removed line breaks. v3: *fix an issue with html format. --- Index: package/kernel/linux/modules/other.mk === --- package/kernel/linux/modules/other.mk (revision 44059) +++ package/kernel/linux/modules/other.mk (working copy) @@ -70,6 +70,26 @@ $(eval $(call KernelPackage,bluetooth)) +define KernelPackage/bluetooth_6lowpan + SUBMENU:=$(OTHER_MENU) + TITLE:=Bluetooth 6LoWPAN support + DEPENDS:=+kmod-bluetooth @!(LINUX_3_3||LINUX_3_8||LINUX_3_10||LINUX_3_13||LINUX_3_14) + KCONFIG:= \ + CONFIG_6LOWPAN=m \ + CONFIG_BT_6LOWPAN=m + FILES:= \ + $(LINUX_DIR)/net/bluetooth/bluetooth_6lowpan.ko \ + $(LINUX_DIR)/net/6lowpan/6lowpan.ko + AUTOLOAD:=$(call AutoProbe,bluetooth) +endef + +define KernelPackage/bluetooth_6lowpan/description + Kernel support for 6LoWPAN over Bluetooth Low Energy devices +endef + +$(eval $(call KernelPackage,bluetooth_6lowpan)) + + define KernelPackage/bluetooth-hci-h4p SUBMENU:=$(OTHER_MENU) TITLE:=HCI driver with H4 Nokia extensions --- ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH] lantiq: correct value for fpi clock on ar9
On 22/01/2015 10:11, Ben Mulvihill wrote: On Thu, 2015-01-22 at 08:34 +0100, John Crispin wrote: On 21/01/2015 10:35, Ben Mulvihill wrote: Hello, This is a patch to go in target/linux/lantiq/patches-3.14/ please send a patch that adds the file instead of just sending the file Sure, will do. I would have done, but I remembered you replying to someone else a little while ago that you preferred to roll your own. Ben not sure which mail you mean but i guess it was related to the time when we moved some of the code from patches/ to files/ ___ 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 v4] Adding support for 6LoWPAN over Bluetooth Low Energy in kernel 3.18.
Adding support 6LoWPAN over Bluetooth Low Energy in kernel 3.18. Creating new bluetooth_6lowpan group with CONFIG_6LOWPAN and CONFIG_BT_6LOWPAN. Adding kernel object dependencies for 6LoWPAN over Bluetooth Low Energy. Signed-off-by: Lukasz Duda lukasz.d...@nordicsemi.no --- v2: *fix an issue with the mail formatting as mail client removed line breaks. v3: *fix an issue with html format. v4: *fix an issue with e-mail typo. --- Index: package/kernel/linux/modules/other.mk === --- package/kernel/linux/modules/other.mk (revision 44059) +++ package/kernel/linux/modules/other.mk (working copy) @@ -70,6 +70,26 @@ $(eval $(call KernelPackage,bluetooth)) +define KernelPackage/bluetooth_6lowpan + SUBMENU:=$(OTHER_MENU) + TITLE:=Bluetooth 6LoWPAN support + DEPENDS:=+kmod-bluetooth @!(LINUX_3_3||LINUX_3_8||LINUX_3_10||LINUX_3_13||LINUX_3_14) + KCONFIG:= \ + CONFIG_6LOWPAN=m \ + CONFIG_BT_6LOWPAN=m + FILES:= \ + $(LINUX_DIR)/net/bluetooth/bluetooth_6lowpan.ko \ + $(LINUX_DIR)/net/6lowpan/6lowpan.ko + AUTOLOAD:=$(call AutoProbe,bluetooth) +endef + +define KernelPackage/bluetooth_6lowpan/description + Kernel support for 6LoWPAN over Bluetooth Low Energy devices +endef + +$(eval $(call KernelPackage,bluetooth_6lowpan)) + + define KernelPackage/bluetooth-hci-h4p SUBMENU:=$(OTHER_MENU) TITLE:=HCI driver with H4 Nokia extensions --- ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH v3] Adding support for 6LoWPAN over Bluetooth Low Energy in kernel 3.18.
On 22/01/2015 10:16, Duda, Lukasz wrote: Signed-off-by: Lukasz Duda lukasz.duda...@nordicsemi.com is this email addr valid ? it is not the one you used for sending the patch ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH 3/9] kernel: Allow ubi autoattach to run on NOR flash
Hi, On Wed, Jan 14, 2015 at 01:37:37PM +0100, Maxime Ripard wrote: On Wed, Jan 14, 2015 at 12:43:25PM +0100, Rafał Miłecki wrote: On 13 January 2015 at 16:56, Maxime Ripard maxime.rip...@free-electrons.com wrote: Some devices out there only have a NOR flash to store the rootfs on. While using UBI is arguable on this kind of NAND, this is something that should be supported. So why use UBI at all? Doesn't it make more sense to stick to the JFFS2? You should be even able to easily create 2 different image types (one for NOR, one for NAND) in one target (see bcm53xx). The Openblocks AX3 has a fairly large NOR (128MB) which would make JFFS2 a rather poor choice, and the UBI overhead wouldn't be that bad. Is that case good enough for you? The A385-RD board has a much smaller SPI-NOR (16MB) though, so we could use jffs2 there, but I wasn't seeing much point at creating a whole new layout just for a single board. I'll switch this one to JFFS2 and the MTDSPLIT framework. Are you satisfied with the NAND support? Just to know if I can continue to model the NOR stuff on that. Thanks, Maxime -- Maxime Ripard, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com signature.asc Description: Digital signature ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH uclient] allow sending requests with DELETE method
Signed-off-by: Rafał Miłecki zaj...@gmail.com --- uclient-http.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/uclient-http.c b/uclient-http.c index 9f9fac9..eb69702 100644 --- a/uclient-http.c +++ b/uclient-http.c @@ -41,6 +41,7 @@ enum request_type { REQ_HEAD, REQ_POST, REQ_PUT, + REQ_DELETE, __REQ_MAX }; @@ -58,6 +59,7 @@ static const char * const request_types[__REQ_MAX] = { [REQ_HEAD] = HEAD, [REQ_POST] = POST, [REQ_PUT] = PUT, + [REQ_DELETE] = DELETE, }; struct uclient_http { -- 1.8.4.5 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] How to handle multiple providers?
Hi, I'm struggling with a problem and I can't really get it to work as I want. Say you have 3 packages, A1, A2 and A3, that all provide the include file f.h. I also have package B that build-time depends on f.h. I will enable either A1, A2 or A3 in the .config for a build but how do I make OpenWRT understand that it cannot build B until either of Ax is built? I'd be ever so greatfull for some good hints on how to solve this. (and oh, I'm on Attitude-Adjustment) Best regards, Mats ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH 2/5] ar8216: add link change detection for switch ports
Check for switch port link changes and - flush ATU in case of a change - report link change via syslog Signed-off-by: Heiner Kallweit hkallwe...@gmail.com --- .../linux/generic/files/drivers/net/phy/ar8216.c | 35 ++ .../linux/generic/files/drivers/net/phy/ar8216.h | 1 + 2 files changed, 36 insertions(+) diff --git a/target/linux/generic/files/drivers/net/phy/ar8216.c b/target/linux/generic/files/drivers/net/phy/ar8216.c index 370f1ac..130ebf7 100644 --- a/target/linux/generic/files/drivers/net/phy/ar8216.c +++ b/target/linux/generic/files/drivers/net/phy/ar8216.c @@ -1707,12 +1707,47 @@ ar8xxx_phy_config_init(struct phy_device *phydev) return 0; } +static bool +ar8xxx_check_link_states(struct ar8xxx_priv *priv) +{ + bool link_new, changed = false; + u32 status; + int i; + + mutex_lock(priv-reg_mutex); + + for (i = 0; i priv-dev.ports; i++) { + status = priv-chip-read_port_status(priv, i); + link_new = !!(status AR8216_PORT_STATUS_LINK_UP); + if (link_new == priv-link_up[i]) + continue; + + priv-link_up[i] = link_new; + changed = true; + dev_info(priv-phy-dev, Port %d is %s\n, +i, link_new ? up : down); + } + + if (changed) + priv-chip-atu_flush(priv); + + mutex_unlock(priv-reg_mutex); + + return changed; +} + static int ar8xxx_phy_read_status(struct phy_device *phydev) { struct ar8xxx_priv *priv = phydev-priv; struct switch_port_link link; + /* check for link changes and flush ATU +* if a change was detected +*/ + if (phydev-state == PHY_CHANGELINK) + ar8xxx_check_link_states(priv); + if (phydev-addr != 0) return genphy_read_status(phydev); diff --git a/target/linux/generic/files/drivers/net/phy/ar8216.h b/target/linux/generic/files/drivers/net/phy/ar8216.h index 8487c3e..2d025ae 100644 --- a/target/linux/generic/files/drivers/net/phy/ar8216.h +++ b/target/linux/generic/files/drivers/net/phy/ar8216.h @@ -396,6 +396,7 @@ struct ar8xxx_priv { bool initialized; bool port4_phy; char buf[2048]; + bool link_up[AR8X16_MAX_PORTS]; bool init; -- 2.2.2 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH 4/5] ar8216: add swconfig attribute to display ARL table on AR8327/AR8337
Add global read-only swconfig attribute arl_table to display the address resolution table. So far the chip-specific part is implemented for AR8327/AR8337 only as I don't have the datasheets for the other AR8XXX chips. Successfully tested on TL-WDR4300 (AR8327rev2) and TL-WDR4900 (AR8327rev4). Signed-off-by: Heiner Kallweit hkallwe...@gmail.com --- .../linux/generic/files/drivers/net/phy/ar8216.c | 96 ++ .../linux/generic/files/drivers/net/phy/ar8216.h | 37 + .../linux/generic/files/drivers/net/phy/ar8327.c | 81 ++ .../linux/generic/files/drivers/net/phy/ar8327.h | 21 + 4 files changed, 220 insertions(+), 15 deletions(-) diff --git a/target/linux/generic/files/drivers/net/phy/ar8216.c b/target/linux/generic/files/drivers/net/phy/ar8216.c index 8a40a32..9272e75 100644 --- a/target/linux/generic/files/drivers/net/phy/ar8216.c +++ b/target/linux/generic/files/drivers/net/phy/ar8216.c @@ -134,19 +134,6 @@ const struct ar8xxx_mib_desc ar8236_mibs[39] = { static DEFINE_MUTEX(ar8xxx_dev_list_lock); static LIST_HEAD(ar8xxx_dev_list); -static inline void -split_addr(u32 regaddr, u16 *r1, u16 *r2, u16 *page) -{ - regaddr = 1; - *r1 = regaddr 0x1e; - - regaddr = 5; - *r2 = regaddr 0x7; - - regaddr = 3; - *page = regaddr 0x1ff; -} - /* inspired by phy_poll_reset in drivers/net/phy/phy_device.c */ static int ar8xxx_phy_poll_reset(struct mii_bus *bus) @@ -217,7 +204,7 @@ ar8xxx_phy_init(struct ar8xxx_priv *priv) ar8xxx_phy_poll_reset(bus); } -static u32 +u32 mii_read32(struct ar8xxx_priv *priv, int phy_id, int regnum) { struct mii_bus *bus = priv-mii_bus; @@ -229,7 +216,7 @@ mii_read32(struct ar8xxx_priv *priv, int phy_id, int regnum) return (hi 16) | lo; } -static void +void mii_write32(struct ar8xxx_priv *priv, int phy_id, int regnum, u32 val) { struct mii_bus *bus = priv-mii_bus; @@ -1291,6 +1278,78 @@ unlock: return ret; } +int +ar8xxx_sw_get_arl_table(struct switch_dev *dev, + const struct switch_attr *attr, + struct switch_val *val) +{ + struct ar8xxx_priv *priv = swdev_to_ar8xxx(dev); + struct mii_bus *bus = priv-mii_bus; + const struct ar8xxx_chip *chip = priv-chip; + char *buf = priv-arl_buf; + int i, j, k, len = 0; + struct arl_entry *a, *a1; + u32 status; + + if (!chip-get_arl_entry) + return -EOPNOTSUPP; + + mutex_lock(priv-reg_mutex); + mutex_lock(bus-mdio_lock); + + chip-get_arl_entry(priv, NULL, NULL, AR8XXX_ARL_INITIALIZE); + + for(i = 0; i AR8XXX_NUM_ARL_RECORDS; ++i) { + a = priv-arl_table[i]; + duplicate: + chip-get_arl_entry(priv, a, status, AR8XXX_ARL_GET_NEXT); + + if (!status) + break; + + /* avoid duplicates +* ARL table can include multiple valid entries +* per MAC, just with differing status codes +*/ + for (j = 0; j i; ++j) { + a1 = priv-arl_table[j]; + if (a-port == a1-port !memcmp(a-mac, a1-mac, sizeof(a-mac))) + goto duplicate; + } + } + + mutex_unlock(bus-mdio_lock); + + len += snprintf(buf + len, sizeof(priv-arl_buf) - len, +address resolution table\n); + + if (i == AR8XXX_NUM_ARL_RECORDS) + len += snprintf(buf + len, sizeof(priv-arl_buf) - len, + Too many entries found, displaying the first %d only!\n, + AR8XXX_NUM_ARL_RECORDS); + + for (j = 0; j priv-dev.ports; ++j) { + for (k = 0; k i; ++k) { + a = priv-arl_table[k]; + if (a-port != j) + continue; + len += snprintf(buf + len, sizeof(priv-arl_buf) - len, + Port %d: MAC %02x:%02x:%02x:%02x:%02x:%02x\n, + j, + a-mac[5], a-mac[4], a-mac[3], + a-mac[2], a-mac[1], a-mac[0]); + } + } + + val-value.s = buf; + val-len = len; + + mutex_unlock(priv-reg_mutex); + + return 0; +} + + static const struct switch_attr ar8xxx_sw_attr_globals[] = { { .type = SWITCH_TYPE_INT, @@ -1338,6 +1397,13 @@ static const struct switch_attr ar8xxx_sw_attr_globals[] = { .get = ar8xxx_sw_get_mirror_source_port, .max = AR8216_NUM_PORTS - 1 }, + { + .type = SWITCH_TYPE_STRING, + .name = arl_table, + .description = Get ARL table, + .set = NULL, + .get =
[OpenWrt-Devel] [PATCH 5/5] ar8216: prefix mii_xxx functions to avoid kernel namespace pollution
Prefix the exported mii_xxx32 functions with ar8xxx_ to avoid kernel namespace pollution. Signed-off-by: Heiner Kallweit hkallwe...@gmail.com --- target/linux/generic/files/drivers/net/phy/ar8216.c | 12 ++-- target/linux/generic/files/drivers/net/phy/ar8216.h | 4 ++-- target/linux/generic/files/drivers/net/phy/ar8327.c | 20 ++-- 3 files changed, 18 insertions(+), 18 deletions(-) diff --git a/target/linux/generic/files/drivers/net/phy/ar8216.c b/target/linux/generic/files/drivers/net/phy/ar8216.c index 9272e75..b359876 100644 --- a/target/linux/generic/files/drivers/net/phy/ar8216.c +++ b/target/linux/generic/files/drivers/net/phy/ar8216.c @@ -205,7 +205,7 @@ ar8xxx_phy_init(struct ar8xxx_priv *priv) } u32 -mii_read32(struct ar8xxx_priv *priv, int phy_id, int regnum) +ar8xxx_mii_read32(struct ar8xxx_priv *priv, int phy_id, int regnum) { struct mii_bus *bus = priv-mii_bus; u16 lo, hi; @@ -217,7 +217,7 @@ mii_read32(struct ar8xxx_priv *priv, int phy_id, int regnum) } void -mii_write32(struct ar8xxx_priv *priv, int phy_id, int regnum, u32 val) +ar8xxx_mii_write32(struct ar8xxx_priv *priv, int phy_id, int regnum, u32 val) { struct mii_bus *bus = priv-mii_bus; u16 lo, hi; @@ -248,7 +248,7 @@ ar8xxx_read(struct ar8xxx_priv *priv, int reg) bus-write(bus, 0x18, 0, page); wait_for_page_switch(); - val = mii_read32(priv, 0x10 | r2, r1); + val = ar8xxx_mii_read32(priv, 0x10 | r2, r1); mutex_unlock(bus-mdio_lock); @@ -267,7 +267,7 @@ ar8xxx_write(struct ar8xxx_priv *priv, int reg, u32 val) bus-write(bus, 0x18, 0, page); wait_for_page_switch(); - mii_write32(priv, 0x10 | r2, r1, val); + ar8xxx_mii_write32(priv, 0x10 | r2, r1, val); mutex_unlock(bus-mdio_lock); } @@ -286,10 +286,10 @@ ar8xxx_rmw(struct ar8xxx_priv *priv, int reg, u32 mask, u32 val) bus-write(bus, 0x18, 0, page); wait_for_page_switch(); - ret = mii_read32(priv, 0x10 | r2, r1); + ret = ar8xxx_mii_read32(priv, 0x10 | r2, r1); ret = ~mask; ret |= val; - mii_write32(priv, 0x10 | r2, r1, ret); + ar8xxx_mii_write32(priv, 0x10 | r2, r1, ret); mutex_unlock(bus-mdio_lock); diff --git a/target/linux/generic/files/drivers/net/phy/ar8216.h b/target/linux/generic/files/drivers/net/phy/ar8216.h index ec640dd..3c53764 100644 --- a/target/linux/generic/files/drivers/net/phy/ar8216.h +++ b/target/linux/generic/files/drivers/net/phy/ar8216.h @@ -439,9 +439,9 @@ struct ar8xxx_priv { }; u32 -mii_read32(struct ar8xxx_priv *priv, int phy_id, int regnum); +ar8xxx_mii_read32(struct ar8xxx_priv *priv, int phy_id, int regnum); void -mii_write32(struct ar8xxx_priv *priv, int phy_id, int regnum, u32 val); +ar8xxx_mii_write32(struct ar8xxx_priv *priv, int phy_id, int regnum, u32 val); u32 ar8xxx_read(struct ar8xxx_priv *priv, int reg); void diff --git a/target/linux/generic/files/drivers/net/phy/ar8327.c b/target/linux/generic/files/drivers/net/phy/ar8327.c index 6444c39..07e837e 100644 --- a/target/linux/generic/files/drivers/net/phy/ar8327.c +++ b/target/linux/generic/files/drivers/net/phy/ar8327.c @@ -976,7 +976,7 @@ ar8327_wait_atu_ready(struct ar8xxx_priv *priv, u16 r2, u16 r1) { int timeout = 20; - while (mii_read32(priv, r2, r1) AR8327_ATU_FUNC_BUSY --timeout) + while (ar8xxx_mii_read32(priv, r2, r1) AR8327_ATU_FUNC_BUSY --timeout) udelay(10); if (!timeout) @@ -1009,19 +1009,19 @@ static void ar8327_get_arl_entry(struct ar8xxx_priv *priv, ar8327_wait_atu_ready(priv, r2, r1_func); - mii_write32(priv, r2, r1_data0, 0); - mii_write32(priv, r2, r1_data1, 0); - mii_write32(priv, r2, r1_data2, 0); + ar8xxx_mii_write32(priv, r2, r1_data0, 0); + ar8xxx_mii_write32(priv, r2, r1_data1, 0); + ar8xxx_mii_write32(priv, r2, r1_data2, 0); break; case AR8XXX_ARL_GET_NEXT: - mii_write32(priv, r2, r1_func, - AR8327_ATU_FUNC_OP_GET_NEXT | - AR8327_ATU_FUNC_BUSY); + ar8xxx_mii_write32(priv, r2, r1_func, + AR8327_ATU_FUNC_OP_GET_NEXT | + AR8327_ATU_FUNC_BUSY); ar8327_wait_atu_ready(priv, r2, r1_func); - val0 = mii_read32(priv, r2, r1_data0); - val1 = mii_read32(priv, r2, r1_data1); - val2 = mii_read32(priv, r2, r1_data2); + val0 = ar8xxx_mii_read32(priv, r2, r1_data0); + val1 = ar8xxx_mii_read32(priv, r2, r1_data1); + val2 = ar8xxx_mii_read32(priv, r2, r1_data2); *status = val2 AR8327_ATU_STATUS; if (!*status) -- 2.2.2 ___ openwrt-devel mailing list
[OpenWrt-Devel] [PATCH 1/5] ar8216: fix ATU flushing
The functionality to flush the address translation table contains two bugs which luckily compensate each other. 1. Just setting the operation is not sufficient to perform the flushing. The active bit needs to be set to actually trigger an action. For the vtu operations this is implemented correctly. 2. ar8xxx_phy_read_status is called every 2s by the phy state machine to check for link changes. This would have caused an ATU flush every 2s. Fix the chip-specific ATU flush functions and remove the ATU flush call from ar8xxx_phy_read_status. Signed-off-by: Heiner Kallweit hkallwe...@gmail.com --- target/linux/generic/files/drivers/net/phy/ar8216.c | 11 +++ target/linux/generic/files/drivers/net/phy/ar8327.c | 3 ++- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/target/linux/generic/files/drivers/net/phy/ar8216.c b/target/linux/generic/files/drivers/net/phy/ar8216.c index 90484d6..370f1ac 100644 --- a/target/linux/generic/files/drivers/net/phy/ar8216.c +++ b/target/linux/generic/files/drivers/net/phy/ar8216.c @@ -613,7 +613,8 @@ ar8216_atu_flush(struct ar8xxx_priv *priv) ret = ar8216_wait_bit(priv, AR8216_REG_ATU, AR8216_ATU_ACTIVE, 0); if (!ret) - ar8xxx_write(priv, AR8216_REG_ATU, AR8216_ATU_OP_FLUSH); + ar8xxx_write(priv, AR8216_REG_ATU, AR8216_ATU_OP_FLUSH | + AR8216_ATU_ACTIVE); return ret; } @@ -1711,7 +1712,6 @@ ar8xxx_phy_read_status(struct phy_device *phydev) { struct ar8xxx_priv *priv = phydev-priv; struct switch_port_link link; - int ret; if (phydev-addr != 0) return genphy_read_status(phydev); @@ -1736,16 +1736,11 @@ ar8xxx_phy_read_status(struct phy_device *phydev) } phydev-duplex = link.duplex ? DUPLEX_FULL : DUPLEX_HALF; - /* flush the address translation unit */ - mutex_lock(priv-reg_mutex); - ret = priv-chip-atu_flush(priv); - mutex_unlock(priv-reg_mutex); - phydev-state = PHY_RUNNING; netif_carrier_on(phydev-attached_dev); phydev-adjust_link(phydev-attached_dev); - return ret; + return 0; } static int diff --git a/target/linux/generic/files/drivers/net/phy/ar8327.c b/target/linux/generic/files/drivers/net/phy/ar8327.c index ea880bc..fd5bcdc 100644 --- a/target/linux/generic/files/drivers/net/phy/ar8327.c +++ b/target/linux/generic/files/drivers/net/phy/ar8327.c @@ -759,7 +759,8 @@ ar8327_atu_flush(struct ar8xxx_priv *priv) AR8327_ATU_FUNC_BUSY, 0); if (!ret) ar8xxx_write(priv, AR8327_REG_ATU_FUNC, - AR8327_ATU_FUNC_OP_FLUSH); +AR8327_ATU_FUNC_OP_FLUSH | +AR8327_ATU_FUNC_BUSY); return ret; } -- 2.2.2 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH 0/5] ar8216: Patch series with further improvements and new functionality
Heiner Kallweit (5): ar8216: fix ATU flushing ar8216: add link change detection for switch ports ar8216: decrease page switch wait time ar8216: add swconfig attribute to display ARL table on AR8327/AR8337 ar8216: prefix mii_xxx functions to avoid kernel namespace pollution .../linux/generic/files/drivers/net/phy/ar8216.c | 160 - .../linux/generic/files/drivers/net/phy/ar8216.h | 44 ++ .../linux/generic/files/drivers/net/phy/ar8327.c | 84 ++- .../linux/generic/files/drivers/net/phy/ar8327.h | 21 +++ 4 files changed, 276 insertions(+), 33 deletions(-) -- 2.2.2 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH 3/5] ar8216: decrease page switch wait time
Until a few years ago the page switch wait time was set to msleep(1) what was changed to usleep_range(1000, 2000) later. I can not imagine that a low-level operation like switching page on register level takes so much time. Most likely the value of 1ms was initially set to check whether it fixes an issue and then remained w/o further checking whether also a smaller value would be sufficient. Now the wait time is set to 5us and I successfully tested this on AR8327. IMHO 5us should be plenty of time for all supported chips. However I couldn't test this due to missing hardware. If other chips should need a longer wait time we can add the wait time as a parameter to the ar8xxx_chip struct. Signed-off-by: Heiner Kallweit hkallwe...@gmail.com --- target/linux/generic/files/drivers/net/phy/ar8216.c | 6 +++--- target/linux/generic/files/drivers/net/phy/ar8216.h | 6 ++ 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/target/linux/generic/files/drivers/net/phy/ar8216.c b/target/linux/generic/files/drivers/net/phy/ar8216.c index 130ebf7..8a40a32 100644 --- a/target/linux/generic/files/drivers/net/phy/ar8216.c +++ b/target/linux/generic/files/drivers/net/phy/ar8216.c @@ -260,7 +260,7 @@ ar8xxx_read(struct ar8xxx_priv *priv, int reg) mutex_lock(bus-mdio_lock); bus-write(bus, 0x18, 0, page); - usleep_range(1000, 2000); /* wait for the page switch to propagate */ + wait_for_page_switch(); val = mii_read32(priv, 0x10 | r2, r1); mutex_unlock(bus-mdio_lock); @@ -279,7 +279,7 @@ ar8xxx_write(struct ar8xxx_priv *priv, int reg, u32 val) mutex_lock(bus-mdio_lock); bus-write(bus, 0x18, 0, page); - usleep_range(1000, 2000); /* wait for the page switch to propagate */ + wait_for_page_switch(); mii_write32(priv, 0x10 | r2, r1, val); mutex_unlock(bus-mdio_lock); @@ -297,7 +297,7 @@ ar8xxx_rmw(struct ar8xxx_priv *priv, int reg, u32 mask, u32 val) mutex_lock(bus-mdio_lock); bus-write(bus, 0x18, 0, page); - usleep_range(1000, 2000); /* wait for the page switch to propagate */ + wait_for_page_switch(); ret = mii_read32(priv, 0x10 | r2, r1); ret = ~mask; diff --git a/target/linux/generic/files/drivers/net/phy/ar8216.h b/target/linux/generic/files/drivers/net/phy/ar8216.h index 2d025ae..77df506 100644 --- a/target/linux/generic/files/drivers/net/phy/ar8216.h +++ b/target/linux/generic/files/drivers/net/phy/ar8216.h @@ -555,4 +555,10 @@ ar8xxx_reg_clear(struct ar8xxx_priv *priv, int reg, u32 val) ar8xxx_rmw(priv, reg, val, 0); } +static inline void +wait_for_page_switch(void) +{ + udelay(5); +} + #endif -- 2.2.2 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] issue: usb1.x not detected in CC
Further information: It was indeed the USB_OHCI_HCD_PCI option. ohci-pci was split from ohci_hcd with: http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=c1117afb85890adf4073c7ff18ebcb4d0495e6af In BB, the usb controller was detected by ohci_hcd. At some point after the BB kernel version, the USB controller started to be detected only by ohci-pci and not ohci_hcd. In BB:root@OpenWrt:/# dmesg | grep ohci [0.543001] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver [0.544195] ohci_hcd :00:06.0: setting latency timer to 64 [0.544203] ohci_hcd :00:06.0: OHCI Host Controller [0.544910] ohci_hcd :00:06.0: new USB bus registered, assigned bus number 2 [0.545964] ohci_hcd :00:06.0: irq 11, io mem 0xf0804000 [1.040235] usb 2-1: new full-speed USB device number 2 using ohci_hcd In CC (without USB_OHCI_HCD_PCI): root@OpenWrt:/# dmesg |grep ohci [0.884995] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver [0.890242] ohci-platform: OHCI generic platform driver In CC (with USB_OHCI_HCD_PCI): [0.884343] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver [0.885535] ohci-pci: OHCI PCI platform driver [0.892110] ohci-pci :00:06.0: OHCI PCI host controller [0.893716] ohci-pci :00:06.0: new USB bus registered, assigned bus number 2 [0.895858] ohci-pci :00:06.0: irq 11, io mem 0xf0804000 [0.965726] ohci-platform: OHCI generic platform driver [1.400359] usb 2-1: new full-speed USB device number 2 using ohci-pci I fixed my problem creating a new kmod-ohci-pci that includes ohci-pci.ko. Probably, it should also be added to be built-in on every target that is pci-based and already include CONFIG_USB_OHCI_HCD build-in, like target/linux/x86/generic/config-default and others (which one?). However, it loads nicely as a module. I can submit the patch for the new kmod but I'm not sure about kernel dependencies like LINUX_3_x as ohci-pci.ko seems to be present only after 3.10. Looking the kernel commit log, it seems that ohci-pci wasn't the only one driver that was split from ohci. It was an effort for multi-plataform kernels on ARM. I guess every other one might need a kmod-ohci-xxx as well. So, the problem might affect every OHCI controller that where split. http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/log/drivers/usb/host/ohci-hcd.c In summary, no OHCI controller for CC on any target (except by some drivers that still lives inside ohci-hcd like octeon and other exotic platforms). BTW, CONFIG_USB_OHCI_ATH79, used for kmod-usb-ohci is deprecated at 3.14.x. This option is deprecated now and the driver was removed, use USB_OHCI_HCD_PLATFORM instead. Regards, Em Thu Jan 22 2015 at 02:19:48, Luiz Angelo Daros de Luca luizl...@gmail.com escreveu: Hello, I'm running OpenWRT in Virtualbox. I have no problem with BB. However, when testing trunk, I noticed that usb1.x functions simply does not work. For BB, in a clean install (+usbutils), I get: https://downloads.openwrt.org/barrier_breaker/14.07/x86/ generic/openwrt-x86-generic-combined-ext4.img.gz root@OpenWrt:/# lsusb *Bus 002 Device 002: ID 80ee:0021 VirtualBox USB Tablet* Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub *Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub* root@OpenWrt:/# dmesg | egrep -i '(usb|hci)' [0.063968] ACPI: bus type USB registered [0.064573] usbcore: registered new interface driver usbfs [0.065292] usbcore: registered new interface driver hub [0.065990] usbcore: registered new device driver usb [0.511884] ahci :00:0d.0: version 3.0 [0.513388] ahci: SSS flag set, parallel bus scan disabled [0.514182] ahci :00:0d.0: AHCI 0001.0100 32 slots 1 ports 3 Gbps 0x1 impl SATA mode [0.515223] ahci :00:0d.0: flags: 64bit ncq stag only ccc [0.515945] ahci :00:0d.0: setting latency timer to 64 [0.516085] scsi0 : ahci [0.521108] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver [0.522068] ehci-pci: EHCI PCI platform driver [0.523007] ehci-pci :00:0b.0: setting latency timer to 64 [0.523015] ehci-pci :00:0b.0: EHCI Host Controller [0.523673] ehci-pci :00:0b.0: new USB bus registered, assigned bus number 1 [0.524738] ehci-pci :00:0b.0: irq 10, io mem 0xf084 [0.540886] ehci-pci :00:0b.0: USB 2.0 started, EHCI 1.00 *[0.541668] hub 1-0:1.0: USB hub found* [0.542882] ehci-platform: EHCI generic platform driver [0.543609] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver [0.544824] ohci_hcd :00:06.0: setting latency timer to 64 [0.544831] ohci_hcd :00:06.0: OHCI Host Controller [0.545495] ohci_hcd :00:06.0: new USB bus registered, assigned bus number 2 [0.546662] ohci_hcd :00:06.0: irq 11, io mem 0xf0804000 *[0.600350] hub 2-0:1.0: USB hub found* [0.602055] uhci_hcd: USB Universal Host
[OpenWrt-Devel] [PATCH] lantiq: correct value for fpi clock on ar9
This adds a patch to target/linux/lantiq/patches-3.14 fixing a bug clock code on ar9. The current version returns the wrong value for the fpi clock frequency in some cases. See discussion for further details: https://lists.openwrt.org/pipermail/openwrt-devel/2015-January/030688.html I'm not sure about the patch naming and numbering convention. Do please let me know it this is not OK. Many thanks, Ben Mulvihill Signed-off-by: Ben Mulvihill ben.mulvih...@gmail.com --- diff -uprN a/target/linux/lantiq/patches-3.14/0038-MIPS-lantiq-fpi-on-ar9.patch b/target/linux/lantiq/patches-3.14/0038-MIPS-lantiq-fpi-on-ar9.patch --- a/target/linux/lantiq/patches-3.14/0038-MIPS-lantiq-fpi-on-ar9.patch 1970-01-01 01:00:00.0 +0100 +++ b/target/linux/lantiq/patches-3.14/0038-MIPS-lantiq-fpi-on-ar9.patch 2015-01-22 12:57:11.112761851 +0100 @@ -0,0 +1,21 @@ +Return correct value for fpi clock on ar9. + +Signed-off-by: Ben Mulvihill ben.mulvih...@gmail.com +--- + arch/mips/lantiq/xway/clk.c |5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +--- a/arch/mips/lantiq/xway/clk.c 2015-01-21 10:15:44.0 +0100 b/arch/mips/lantiq/xway/clk.c 2015-01-21 10:17:29.0 +0100 +@@ -104,8 +104,9 @@ unsigned long ltq_ar9_fpi_hz(void) + unsigned long sys = ltq_ar9_sys_hz(); + + if (ltq_cgu_r32(CGU_SYS) BIT(0)) +- return sys; +- return sys 1; ++ return sys / 3; ++ else ++ return sys / 2; + } + + unsigned long ltq_ar9_cpu_hz(void) ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH] ar71xx: add support for TP-LINK TL-WR843ND v1
TP-LINK TL-WR843ND v1 is the same model like wr41, but with Power over Ethernet on wan port. Signed-off-by: Cezary Jackiewicz cezary.jackiew...@gmail.com --- diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh b/target/linux/ar71xx/base-files/lib/ar71xx.sh index a870396..14ee68b 100755 --- a/target/linux/ar71xx/base-files/lib/ar71xx.sh +++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh @@ -142,6 +142,9 @@ tplink_board_detect() { 084200*) model=TP-Link TL-WR842N/ND ;; + 084300*) + model=TP-Link TL-WR843N/ND + ;; 085000*) model=TP-Link TL-WA850RE ;; diff --git a/target/linux/ar71xx/generic/profiles/tp-link.mk b/target/linux/ar71xx/generic/profiles/tp-link.mk index a9d170c..c7a65e4 100644 --- a/target/linux/ar71xx/generic/profiles/tp-link.mk +++ b/target/linux/ar71xx/generic/profiles/tp-link.mk @@ -312,6 +312,17 @@ endef $(eval $(call Profile,TLWR842)) +define Profile/TLWR843 + NAME:=TP-LINK TL-WR843N/ND + PACKAGES:= +endef + +define Profile/TLWR843/Description + Package set optimized for the TP-LINK TL-WR843N/ND. +endef +$(eval $(call Profile,TLWR843)) + + define Profile/TLWR941 NAME:=TP-LINK TL-WR941N/ND PACKAGES:= diff --git a/target/linux/ar71xx/image/Makefile b/target/linux/ar71xx/image/Makefile index d905bd0..ec6330f 100644 --- a/target/linux/ar71xx/image/Makefile +++ b/target/linux/ar71xx/image/Makefile @@ -1402,6 +1402,7 @@ $(eval $(call SingleProfile,TPLINK-LZMA,64kraw,TLWA830RV2,tl-wa830re-v2,TL-WA830 $(eval $(call SingleProfile,TPLINK-LZMA,64kraw,TLWR841NV9,tl-wr841n-v9,TL-WR841N-v9,ttyS0,115200,0x08410009,1,4Mlzma)) $(eval $(call SingleProfile,TPLINK-LZMA,64kraw,TLWR847NV8,tl-wr847n-v8,TL-WR841N-v8,ttyS0,115200,0x08470008,1,4Mlzma)) $(eval $(call SingleProfile,TPLINK-LZMA,64kraw,TLWR842V2,tl-wr842n-v2,TL-WR842N-v2,ttyS0,115200,0x8420002,1,8Mlzma)) +$(eval $(call SingleProfile,TPLINK-LZMA,64kraw,TLWR843NV1,tl-wr843nd-v1,TL-WR841N-v8,ttyS0,115200,0x08430001,1,4Mlzma)) $(eval $(call SingleProfile,TPLINK-LZMA,64kraw,TLWA801NV2,tl-wa801nd-v2,TL-WA801ND-v2,ttyS0,115200,0x08010002,1,4Mlzma)) $(eval $(call SingleProfile,TPLINK-LZMA,64kraw,TLWA850,tl-wa850re-v1,TL-WA850RE,ttyS0,115200,0x0851,1,4Mlzma)) $(eval $(call SingleProfile,TPLINK-LZMA,64kraw,TLWA860,tl-wa860re-v1,TL-WA860RE,ttyS0,115200,0x0861,1,4Mlzma)) @@ -1486,6 +1487,7 @@ $(eval $(call MultiProfile,TLWR741,TLWR741NV1 TLWR741NV2 TLWR741NV4)) $(eval $(call MultiProfile,TLWR743,TLWR743NV1 TLWR743NV2)) $(eval $(call MultiProfile,TLWR841,TLWR841NV15 TLWR841NV3 TLWR841NV5 TLWR841NV7 TLWR841NV8 TLWR841NV9 TLWR847NV8)) $(eval $(call MultiProfile,TLWR842,TLWR842V1 TLWR842V2)) +$(eval $(call MultiProfile,TLWR843,TLWR843NV1)) $(eval $(call MultiProfile,TLWR941,TLWR941NV2 TLWR941NV3 TLWR941NV4 TLWR941NV6)) $(eval $(call MultiProfile,TLWR1043,TLWR1043V1 TLWR1043V2)) $(eval $(call MultiProfile,TLWDR4300,TLWDR3500V1 TLWDR3600V1 TLWDR4300V1 TLWDR4300V1IL TLWDR4310V1 MW4530RV1)) -- Pozdrawiam, Cezary Jackiewicz ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH] feeds.conf.default: add dlan feed
Hi Florian, thank you for adding the instructions. I also agree that this binary-only packages should not be added to main openwrt for legal reasons and so on. My original intension was to make this device more user-friendly, and if we do not want to enable this feed by default, we could add this line commented out? However, we should pre-select the packages which are required to get the PLC part running, shouldn't we? What do you think about the following stuff? Regards, mhei feeds.conf.default |1 + target/linux/mcs814x/profiles/100-dLAN-USB-Extender.mk |6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/feeds.conf.default b/feeds.conf.default index 208342c..14f2e37 100644 --- a/feeds.conf.default +++ b/feeds.conf.default @@ -3,6 +3,7 @@ src-git luci https://github.com/openwrt/luci.git src-git routing https://github.com/openwrt-routing/packages.git src-git telephony https://github.com/openwrt/telephony.git src-git management https://github.com/openwrt-management/packages.git +#src-git dlan https://github.com/ffainelli/dlan-usb-extender-3rd-party.git #src-git oldpackages http://git.openwrt.org/packages.git #src-svn xwrt http://x-wrt.googlecode.com/svn/trunk/package #src-svn phone svn://svn.openwrt.org/openwrt/feeds/phone diff --git a/target/linux/mcs814x/profiles/100-dLAN-USB-Extender.mk b/target/linux/mcs814x/profiles/100-dLAN-USB-Extender.mk index 168bfa1..6f13121 100644 --- a/target/linux/mcs814x/profiles/100-dLAN-USB-Extender.mk +++ b/target/linux/mcs814x/profiles/100-dLAN-USB-Extender.mk @@ -1,5 +1,5 @@ # -# Copyright (C) 2012 OpenWrt.org +# Copyright (C) 2012-2015 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -7,7 +7,7 @@ define Profile/dLAN_USB_Extender NAME:=Devolo dLAN USB Extender - PACKAGES:=kmod-usb-serial kmod-usb-serial-ftdi + PACKAGES:=kmod-usb-serial kmod-usb-serial-ftdi foot endef define Profile/dLAN_USB_Extender/Description @@ -21,5 +21,5 @@ define Profile/dLAN_USB_Extender/Description Instructions are available here: http://ffainelli.github.io/dlan-usb-extender-3rd-party/ endef -$(eval $(call Profile,dLAN_USB_Extender)) +$(eval $(call Profile,dLAN_USB_Extender)) -- 1.7.10.4 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] uboot-lantiq cgu settings for ramboot image
On Thu, 2015-01-22 at 10:07 +0100, John Crispin wrote: is this patch correct and should be merged or is it a RFC ? http://patchwork.ozlabs.org/patch/431024/ Daniel found a mistake in the current code. I found another. This fixes both, so I guess it is a patch rather than an RFC. I understand it to be correct, but the authoritative answer as to whether it is indeed correct should really come from Daniel ;-) In any case Daniel has already committed it to uboot-lantiq github. Hope this is some help. Daniel? ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] How to handle multiple providers?
Well, you need to specifiy Ax in the DEPENDS section of B. Since there are 3 Ax, you can do it 2 ways: 1) Create Bx (x = 1-3) packages; B1 depends on A1, B2 depends on A2, B3 depends on A3; so, if you select the correct Bx, the correct Ax will also get built. You can also use build variants to keep Bx in a single Makefile; you can check the package/ncurses/Makefile for hints. The build variants does not seem too popular, but you can try it. 2) In the Makefile of B you can do a dynamic DEPENDS. Before the package definition (i.e. define Package/B ) you can add a A_DEPENDS variable. You can do something like: ifeq ($(A_DEPENDS),) ifeq ($(CONFIG_A1),y) A_DEPENDS := A1 endif endif ifeq ($(A_DEPENDS),) ifeq ($(CONFIG_A2),y) A_DEPENDS := A2 endif endif ifeq ($(A_DEPENDS),) ifeq ($(CONFIG_A3),y) A_DEPENDS := A3 endif endif A_DEPENDS should equal to either A1, A2 or A3, if either is selected. Note that CONFIG_Ax is as defined in the .config file. Then define Package/B DEPENDS:= $(A_DEPENDS) endef If I look at this approach, it does what you asked for. But all in all, I would say there would be a cleaner approach if Ax and B are known. If the assumption would be that Ax are similar packages (or variants of a base A), then I'd make a single package A, and define some options to it. Based on those options A would be a variation of type Ax (x = 1 - 3). Then define Package/B DEPENDS:= A endef And you can configure A with whatever options you need. On Thu, Jan 22, 2015 at 8:34 PM, Mats Karrman mats.dev.l...@gmail.com wrote: Hi, I'm struggling with a problem and I can't really get it to work as I want. Say you have 3 packages, A1, A2 and A3, that all provide the include file f.h. I also have package B that build-time depends on f.h. I will enable either A1, A2 or A3 in the .config for a build but how do I make OpenWRT understand that it cannot build B until either of Ax is built? I'd be ever so greatfull for some good hints on how to solve this. (and oh, I'm on Attitude-Adjustment) Best regards, Mats ___ 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