Re: [OpenWrt-Devel] "3-address Wi-Fi bridging" (was: Multiple Wi-Fi client/AP interfaces on one radio)
You cannot use both radios on the same channel, or even the same band. One radio will only work on channels 1-11 and the other will only work on channels 36+ pick which band you are going to use to connect to the remote AP and which you are going to use to have your clients connect to it. David Lang On Fri, 7 Aug 2015, John kerry wrote: Hi, I have one and i configured as below: config wifi-device 'wifi0' option type 'qcawifi' option channel 'auto' option macaddr '00:26:75:bd:37:24' option hwmode '11ng' option txpower '16' option htmode 'HT20' config wifi-iface option device 'wifi0' option network 'lan' option mode 'ap' option ssid 'Test_Ap' option encryption 'psk2' option key 'Test_AP' We can configure one radio only to work like that. Something like below: config wifi-device 'radio0' option type 'mac80211' option channel '11' option hwmode '11g' option path 'platform/ar933x_wmac' option htmode 'HT20' option country 'US' option txpower '20' config wifi-iface 'ap1' option device 'radio0' option mode 'ap' option wds '1' option ssid 'my AP' option network 'lan' config wifi-iface 'mesh1' option device 'radio0' option mode 'mesh' option mesh_id 'my mesh' option network 'lan' On Fri, Aug 7, 2015 at 11:31 AM, Weedy wrote: On 6 Aug 2015 23:15, "John kerry" wrote: Hi, Could anyone please help me on this to configure the wireless in such a way that when we connect to wireless WAN the LAN SSID should not change. Thanks, You need 2 physical radios. ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] "3-address Wi-Fi bridging" (was: Multiple Wi-Fi client/AP interfaces on one radio)
Hi, I have configured wireless file as below: config wifi-device 'wifi0' option type 'qcawifi' option channel 'auto' option macaddr '00:26:75:bd:37:24' option hwmode '11ng' option txpower '16' option htmode 'HT20' config wifi-iface option device 'wifi0' option network 'lan' option mode 'ap' option ssid 'Test_AP' option encryption 'psk2' option key 'Test_AP' config wifi-iface 'mesh1' option device 'wifi0' option mode 'mesh' option mesh_id 'my mesh' option network 'lan' [image: Inline image 1] [image: Inline image 4] Its created one more but still facing same problem. Could anyone guide how i can do that. Thanks, ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] "3-address Wi-Fi bridging" (was: Multiple Wi-Fi client/AP interfaces on one radio)
Hi, I have one and i configured as below: config wifi-device 'wifi0' option type 'qcawifi' option channel 'auto' option macaddr '00:26:75:bd:37:24' option hwmode '11ng' option txpower '16' option htmode 'HT20' config wifi-iface option device 'wifi0' option network 'lan' option mode 'ap' option ssid 'Test_Ap' option encryption 'psk2' option key 'Test_AP' We can configure one radio only to work like that. Something like below: config wifi-device 'radio0' >> option type 'mac80211' >> option channel '11' >> option hwmode '11g' >> option path 'platform/ar933x_wmac' >> option htmode 'HT20' >> option country 'US' >> option txpower '20' >> >> config wifi-iface 'ap1' >> option device 'radio0' >> option mode 'ap' >> option wds '1' >> option ssid 'my AP' >> option network 'lan' >> >> config wifi-iface 'mesh1' >> option device 'radio0' >> option mode 'mesh' >> option mesh_id 'my mesh' >> option network 'lan' On Fri, Aug 7, 2015 at 11:31 AM, Weedy wrote: > On 6 Aug 2015 23:15, "John kerry" wrote: > > > > Hi, > > > > > > Could anyone please help me on this to configure the wireless in such a > way that when we connect to wireless WAN the LAN SSID should not change. > > > > > > Thanks, > > You need 2 physical radios. > ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] "3-address Wi-Fi bridging" (was: Multiple Wi-Fi client/AP interfaces on one radio)
On 6 Aug 2015 23:15, "John kerry" wrote: > > Hi, > > > Could anyone please help me on this to configure the wireless in such a way that when we connect to wireless WAN the LAN SSID should not change. > > > Thanks, You need 2 physical radios. ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] "3-address Wi-Fi bridging" (was: Multiple Wi-Fi client/AP interfaces on one radio)
Hi, Could anyone please help me on this to configure the wireless in such a way that when we connect to wireless WAN the LAN SSID should not change. Thanks, On Thu, Aug 6, 2015 at 9:24 PM, John kerry wrote: > Hi, > > I have configured wireless as below: > > > > > > > > > > > > > > > > *config wifi-device 'wifi0'option type 'qcawifi'option > channel 'auto'option macaddr '00:03:7f:42:06:61'option > hwmode '11ng'option txpower '19'option htmode 'HT20'config > wifi-ifaceoption device 'wifi0'option network 'lan' > option mode 'ap'option encryption 'psk2'option ssid > 'Test_ap_1'option key **'Test_ap_1'* > > > > *It works fine with WPA2 key but when i try to connect another router this > will become as client and SSID will change to that router SSID as i > mentioned before also.* > > > *As i understand we can create one more to avoid this problem as explained > in previous mail.* > > *Basically i need that when i connect to wireless WAN, the LAN SSID should > not change. I am using AR9344. Can i use below script for my requirement.* > > config wifi-device 'radio0' > >> option type 'mac80211' > >> option channel '11' > >> option hwmode '11g' > >> option path 'platform/ar933x_wmac' > >> option htmode 'HT20' > >> option country 'US' > >> option txpower '20' > >> > >> config wifi-iface 'ap1' > >> option device 'radio0' > >> option mode 'ap' > >> option wds '1' > >> option ssid 'my AP' > >> option network 'lan' > >> > >> config wifi-iface 'mesh1' > >> option device 'radio0' > >> option mode 'mesh' > >> option mesh_id 'my mesh' > >> option network 'lan' > > > Thanks & Regards, > > On Wed, Aug 5, 2015 at 7:00 AM, Roman Yeryomin > wrote: > >> On 4 August 2015 at 23:24, Joshua Judson Rosen >> wrote: >> > On 2015-08-04 14:14, Roman Yeryomin wrote: >> >> On 4 August 2015 at 17:58, Joshua Judson Rosen >> wrote: >> >>> On 2015-08-04 02:26, David Lang wrote: >> A given radio can be either an AP or a client, but not both at once. >> >> so if you use a radio to connect to another AP, you are making it a >> client, and >> in client mode all it can do is connect to that other AP as shows up >> as the SSID >> of that other AP. >> >> you can do this with one radio, while using the other radio >> (assuming you have >> two) to act as an AP for local clients. >> >>> >> >>> >> >>> This is not necessarily true: with at least some hardware/drivers, >> it's >> >>> possible to create multiple virtual interfaces on top of a single >> radio-- >> >>> and separate virtual interfaces can in fact operate in different modes >> >>> (e.g.: one in STA mode, two in AP mode, one in mesh mode...). >> >>> >> >>> Assuming that your hardware/driver is capable of supporting multiple >> >>> virtual interfaces on top of the single physical radio, >> >>> you can create these interfaces by adding "wifi-iface" stanzas >> >>> in /etc/config/wireless, e.g: >> >>> >> >>> config wifi-device 'radio0' >> >>> option type 'mac80211' >> >>> option channel '11' >> >>> option hwmode '11g' >> >>> option path 'platform/ar933x_wmac' >> >>> option htmode 'HT20' >> >>> option country 'US' >> >>> option txpower '20' >> >>> >> >>> config wifi-iface 'ap1' >> >>> option device 'radio0' >> >>> option mode 'ap' >> >>> option wds '1' >> >>> option ssid 'my AP' >> >>> option network 'lan' >> >>> >> >>> config wifi-iface 'mesh1' >> >>> option device 'radio0' >> >>> option mode 'mesh' >> >>> option mesh_id 'my mesh' >> >>> option network 'lan' >> >>> >> >>> >> >>> That creates two virtual interfaces using the same physical radio, >> >>> and bridges them together onto the OpenWrt "lan network" >> >>> (which is itself defined in /etc/config/network). >> >>> >> >>> >> >>> I believe you could also have an interface with "mode 'sta'", but note >> >>> that it would also need to use the same channel as the other >> interfaces-- >> >>> which means that the external AP to which you connect it would also >> >>> need to use that same channel (11, in the example above). >> >>> That's where having multiple *radios* helps: you can run them on >> >>> different frequencies (either completely different bands [2.4 GHz vs. >> 5 GHz], >> >>> or on different channels within the same band [e.g. 2.427 GHz = >> channel 4 >> >>> vs. 2.472 GHz = channel 13]) to increase efficiency by multiplexing >> >>> less data over a single radio,
[OpenWrt-Devel] [PATCH 2/3] ipq806x: add NAND flash controller support
These patches add support for ipq806x NAND flash controller. Most of these are cherry-picked & backported from LKML: *https://lkml.org/lkml/2015/8/3/16 This patch just modifies the kernel code, but doesn't change the config. It should be harmless. Signed-off-by: Mathieu Olivari --- .../160-clk-qcom-Add-EBI2-clocks-for-IPQ806x.patch | 74 + ...g-to-access-bad-block-markers-in-raw-mode.patch | 84 + ...-mtd-nand-Qualcomm-NAND-controller-driver.patch | 2024 ...63-dt-bindings-qcom_nandc-Add-DT-bindings.patch | 82 + ...-dts-Add-NAND-controller-node-for-ipq806x.patch | 50 + ...nable-NAND-node-on-IPQ8064-AP148-platform.patch | 79 + ...dd-support-for-NSS-GMAC-clocks-and-resets.patch | 20 +- ...RM-dts-qcom-add-mdio-nodes-to-ap148-db149.patch | 11 +- ...-qcom-add-gmac-nodes-to-ipq806x-platforms.patch |7 +- ...g-to-access-bad-block-markers-in-raw-mode.patch | 84 + ...-mtd-nand-Qualcomm-NAND-controller-driver.patch | 2024 ...63-dt-bindings-qcom_nandc-Add-DT-bindings.patch | 82 + ...-dts-Add-NAND-controller-node-for-ipq806x.patch | 50 + ...nable-NAND-node-on-IPQ8064-AP148-platform.patch | 76 + ...RM-dts-qcom-add-mdio-nodes-to-ap148-db149.patch | 11 +- ...-qcom-add-gmac-nodes-to-ipq806x-platforms.patch |7 +- 16 files changed, 4739 insertions(+), 26 deletions(-) create mode 100644 target/linux/ipq806x/patches-3.18/160-clk-qcom-Add-EBI2-clocks-for-IPQ806x.patch create mode 100644 target/linux/ipq806x/patches-3.18/161-mtd-nand-Create-a-BBT-flag-to-access-bad-block-markers-in-raw-mode.patch create mode 100644 target/linux/ipq806x/patches-3.18/162-mtd-nand-Qualcomm-NAND-controller-driver.patch create mode 100644 target/linux/ipq806x/patches-3.18/163-dt-bindings-qcom_nandc-Add-DT-bindings.patch create mode 100644 target/linux/ipq806x/patches-3.18/164-arm-qcom-dts-Add-NAND-controller-node-for-ipq806x.patch create mode 100644 target/linux/ipq806x/patches-3.18/165-arm-qcom-dts-Enable-NAND-node-on-IPQ8064-AP148-platform.patch create mode 100644 target/linux/ipq806x/patches-4.1/161-mtd-nand-Create-a-BBT-flag-to-access-bad-block-markers-in-raw-mode.patch create mode 100644 target/linux/ipq806x/patches-4.1/162-mtd-nand-Qualcomm-NAND-controller-driver.patch create mode 100644 target/linux/ipq806x/patches-4.1/163-dt-bindings-qcom_nandc-Add-DT-bindings.patch create mode 100644 target/linux/ipq806x/patches-4.1/164-arm-qcom-dts-Add-NAND-controller-node-for-ipq806x.patch create mode 100644 target/linux/ipq806x/patches-4.1/165-arm-qcom-dts-Enable-NAND-node-on-IPQ8064-AP148-platform.patch diff --git a/target/linux/ipq806x/patches-3.18/160-clk-qcom-Add-EBI2-clocks-for-IPQ806x.patch b/target/linux/ipq806x/patches-3.18/160-clk-qcom-Add-EBI2-clocks-for-IPQ806x.patch new file mode 100644 index 000..77d29d8 --- /dev/null +++ b/target/linux/ipq806x/patches-3.18/160-clk-qcom-Add-EBI2-clocks-for-IPQ806x.patch @@ -0,0 +1,74 @@ +From 4c385b25fab119144bffb255ad77712fe586ac10 Mon Sep 17 00:00:00 2001 +From: Archit Taneja +Date: Thu, 2 Apr 2015 11:20:41 +0530 +Subject: [PATCH] clk: qcom: Add EBI2 clocks for IPQ806x + +The NAND controller within EBI2 requires EBI2_CLK and +EBI2_ALWAYS_ON_CLK clocks. Create structs for these clocks so +that they can be used by the NAND controller driver. Add an entry +for EBI2_AON_CLK in the gcc-ipq806x DT binding document. + +Signed-off-by: Archit Taneja +Signed-off-by: Stephen Boyd +--- + drivers/clk/qcom/gcc-ipq806x.c | 32 + include/dt-bindings/clock/qcom,gcc-ipq806x.h | 1 + + 2 files changed, 33 insertions(+) + +--- a/drivers/clk/qcom/gcc-ipq806x.c b/drivers/clk/qcom/gcc-ipq806x.c +@@ -2239,6 +2239,36 @@ static struct clk_branch usb_fs1_h_clk = + }, + }; + ++static struct clk_branch ebi2_clk = { ++ .hwcg_reg = 0x3b00, ++ .hwcg_bit = 6, ++ .halt_reg = 0x2fcc, ++ .halt_bit = 1, ++ .clkr = { ++ .enable_reg = 0x3b00, ++ .enable_mask = BIT(4), ++ .hw.init = &(struct clk_init_data){ ++ .name = "ebi2_clk", ++ .ops = &clk_branch_ops, ++ .flags = CLK_IS_ROOT, ++ }, ++ }, ++}; ++ ++static struct clk_branch ebi2_aon_clk = { ++ .halt_reg = 0x2fcc, ++ .halt_bit = 0, ++ .clkr = { ++ .enable_reg = 0x3b00, ++ .enable_mask = BIT(8), ++ .hw.init = &(struct clk_init_data){ ++ .name = "ebi2_always_on_clk", ++ .ops = &clk_branch_ops, ++ .flags = CLK_IS_ROOT, ++ }, ++ }, ++}; ++ + static struct clk_regmap *gcc_ipq806x_clks[] = { + [PLL0] = &pll0.clkr, + [PLL0_VOTE] = &pll0_vote, +@@ -2341,6 +2371,8 @@ static struct clk_regmap *gcc_ipq806x_cl + [USB_FS1_XCVR_SRC] = &usb_fs1_xcvr_clk_src.clkr, + [USB_FS1_XCVR_CLK] = &usb_fs1_xcvr_clk.clkr, + [USB_FS1_SYSTEM_C
[OpenWrt-Devel] [PATCH 1/3] ipq806x: Add ADM support
These are cherry-picked & backported from LKML: *https://lkml.org/lkml/2015/3/17/19 They are enabled on both 3.18 and 4.1 kernel. Patches 150 to 154 are applying changes merged since 3.18; they enable mechanisms used by the ADM driver. ADM engine is used by the NAND controller, so it is necessary to bring-up NAND flash support. Signed-off-by: Mathieu Olivari --- target/linux/ipq806x/config-3.18 | 1 + target/linux/ipq806x/config-4.1| 1 + ...1-ARM-qcom-add-USB-nodes-to-ipq806x-ap148.patch | 2 +- .../150-dmaengine-Rework-dma_chan_get.patch| 70 ++ ...Remove-the-need-to-declare-device_control.patch | 27 + ...ake-channel-allocation-callbacks-optional.patch | 62 ++ ...engine-Introduce-a-device_config-callback.patch | 51 ++ ...aengine-Add-device_terminate_all-callback.patch | 47 + ...-bindings-qcom_adm-Fix-channel-specifiers.patch | 76 ++ .../156-dmaengine-Add-ADM-driver.patch | 958 .../157-ARM-DT-ipq8064-Add-ADM-device-node.patch | 54 ++ ...RM-dts-qcom-add-mdio-nodes-to-ap148-db149.patch | 2 +- ...-qcom-add-gmac-nodes-to-ipq806x-platforms.patch | 7 +- ...-bindings-qcom_adm-Fix-channel-specifiers.patch | 76 ++ .../patches-4.1/156-dmaengine-Add-ADM-driver.patch | 962 + .../157-ARM-DT-ipq8064-Add-ADM-device-node.patch | 54 ++ ...RM-dts-qcom-add-mdio-nodes-to-ap148-db149.patch | 2 +- ...-qcom-add-gmac-nodes-to-ipq806x-platforms.patch | 4 +- 18 files changed, 2448 insertions(+), 8 deletions(-) create mode 100644 target/linux/ipq806x/patches-3.18/150-dmaengine-Rework-dma_chan_get.patch create mode 100644 target/linux/ipq806x/patches-3.18/151-dmaengine-Remove-the-need-to-declare-device_control.patch create mode 100644 target/linux/ipq806x/patches-3.18/152-dmaengine-Make-channel-allocation-callbacks-optional.patch create mode 100644 target/linux/ipq806x/patches-3.18/153-dmaengine-Introduce-a-device_config-callback.patch create mode 100644 target/linux/ipq806x/patches-3.18/154-dmaengine-Add-device_terminate_all-callback.patch create mode 100644 target/linux/ipq806x/patches-3.18/155-dt-bindings-qcom_adm-Fix-channel-specifiers.patch create mode 100644 target/linux/ipq806x/patches-3.18/156-dmaengine-Add-ADM-driver.patch create mode 100644 target/linux/ipq806x/patches-3.18/157-ARM-DT-ipq8064-Add-ADM-device-node.patch create mode 100644 target/linux/ipq806x/patches-4.1/155-dt-bindings-qcom_adm-Fix-channel-specifiers.patch create mode 100644 target/linux/ipq806x/patches-4.1/156-dmaengine-Add-ADM-driver.patch create mode 100644 target/linux/ipq806x/patches-4.1/157-ARM-DT-ipq8064-Add-ADM-device-node.patch diff --git a/target/linux/ipq806x/config-3.18 b/target/linux/ipq806x/config-3.18 index f5bd58e..feedfd9 100644 --- a/target/linux/ipq806x/config-3.18 +++ b/target/linux/ipq806x/config-3.18 @@ -327,6 +327,7 @@ CONFIG_PREEMPT_RCU=y CONFIG_PRINTK_TIME=y CONFIG_PROC_PAGE_MONITOR=y CONFIG_PTP_1588_CLOCK=y +# CONFIG_QCOM_ADM is not set CONFIG_QCOM_BAM_DMA=y CONFIG_QCOM_GSBI=y CONFIG_QCOM_HFPLL=y diff --git a/target/linux/ipq806x/config-4.1 b/target/linux/ipq806x/config-4.1 index e3cff2f..0262e7a 100644 --- a/target/linux/ipq806x/config-4.1 +++ b/target/linux/ipq806x/config-4.1 @@ -341,6 +341,7 @@ CONFIG_PREEMPT_RCU=y CONFIG_PRINTK_TIME=y CONFIG_PROC_PAGE_MONITOR=y CONFIG_PTP_1588_CLOCK=y +# CONFIG_QCOM_ADM is not set CONFIG_QCOM_BAM_DMA=y CONFIG_QCOM_GSBI=y CONFIG_QCOM_HFPLL=y diff --git a/target/linux/ipq806x/patches-3.18/101-ARM-qcom-add-USB-nodes-to-ipq806x-ap148.patch b/target/linux/ipq806x/patches-3.18/101-ARM-qcom-add-USB-nodes-to-ipq806x-ap148.patch index 8f17397..5fee6ad 100644 --- a/target/linux/ipq806x/patches-3.18/101-ARM-qcom-add-USB-nodes-to-ipq806x-ap148.patch +++ b/target/linux/ipq806x/patches-3.18/101-ARM-qcom-add-USB-nodes-to-ipq806x-ap148.patch @@ -1,6 +1,6 @@ --- a/arch/arm/boot/dts/qcom-ipq8064-ap148.dts +++ b/arch/arm/boot/dts/qcom-ipq8064-ap148.dts -@@ -109,5 +109,29 @@ +@@ -114,5 +114,29 @@ sata@2900 { status = "ok"; }; diff --git a/target/linux/ipq806x/patches-3.18/150-dmaengine-Rework-dma_chan_get.patch b/target/linux/ipq806x/patches-3.18/150-dmaengine-Rework-dma_chan_get.patch new file mode 100644 index 000..880e67c --- /dev/null +++ b/target/linux/ipq806x/patches-3.18/150-dmaengine-Rework-dma_chan_get.patch @@ -0,0 +1,70 @@ +From d2f4f99db3e9ec8b063cf2e45704e2bb95428317 Mon Sep 17 00:00:00 2001 +From: Maxime Ripard +Date: Mon, 17 Nov 2014 14:41:58 +0100 +Subject: [PATCH] dmaengine: Rework dma_chan_get + +dma_chan_get uses a rather interesting error handling and code path. + +Change it to something more usual in the kernel. + +Signed-off-by: Maxime Ripard +Acked-by: Laurent Pinchart +Signed-off-by: Vinod Koul +--- + drivers/dma/dmaengine.c | 36 +++- + 1 file changed, 19 insertions(+), 17 deletions(-) + +--- a/drivers/dma/
[OpenWrt-Devel] [PATCH 3/3] ipq806x: enable NAND flash support in the kernel
Previous patch set backported the recently posted NAND flash driver to 3.18 and 4.1 kernel. This patch now enables it in the kernel config. There is no change to the partition layout and init yet. But the NAND flash can be seen in the mtd list on an AP148: root@OpenWrt:/# cat /proc/mtd dev:size erasesize name mtd0: 1000 0002 "qcom-nandc" ... Signed-off-by: Mathieu Olivari --- target/linux/ipq806x/Makefile| 2 +- target/linux/ipq806x/config-3.18 | 21 - target/linux/ipq806x/config-4.1 | 19 ++- 3 files changed, 39 insertions(+), 3 deletions(-) diff --git a/target/linux/ipq806x/Makefile b/target/linux/ipq806x/Makefile index b6ddfe2..45f83dd 100644 --- a/target/linux/ipq806x/Makefile +++ b/target/linux/ipq806x/Makefile @@ -5,7 +5,7 @@ include $(TOPDIR)/rules.mk ARCH:=arm BOARD:=ipq806x BOARDNAME:=Qualcomm Atheros IPQ806X -FEATURES:=squashfs +FEATURES:=squashfs nand ubifs CPU_TYPE:=cortex-a7 MAINTAINER:=John Crispin diff --git a/target/linux/ipq806x/config-3.18 b/target/linux/ipq806x/config-3.18 index feedfd9..2a837f5 100644 --- a/target/linux/ipq806x/config-3.18 +++ b/target/linux/ipq806x/config-3.18 @@ -104,6 +104,8 @@ CONFIG_CRC16=y # CONFIG_CRC32_SARWATE is not set CONFIG_CRC32_SLICEBY8=y CONFIG_CROSS_MEMORY_ATTACH=y +CONFIG_CRYPTO_DEFLATE=y +CONFIG_CRYPTO_LZO=y # CONFIG_CRYPTO_SHA1_ARM_NEON is not set # CONFIG_CRYPTO_SHA512_ARM_NEON is not set CONFIG_CRYPTO_XZ=y @@ -251,10 +253,21 @@ CONFIG_MSM_IOMMU=y CONFIG_MSM_MMCC_8960=y CONFIG_MSM_MMCC_8974=y CONFIG_MTD_CMDLINE_PARTS=y +# CONFIG_MTD_IMPA7 is not set +CONFIG_MTD_JEDECPROBE=y CONFIG_MTD_M25P80=y +CONFIG_MTD_NAND=y +CONFIG_MTD_NAND_ECC=y +CONFIG_MTD_NAND_QCOM=y CONFIG_MTD_SPI_NOR=y CONFIG_MTD_SPLIT_FIRMWARE=y CONFIG_MTD_SPLIT_FIT_FW=y +CONFIG_MTD_UBI=y +CONFIG_MTD_UBI_BEB_LIMIT=20 +# CONFIG_MTD_UBI_BLOCK is not set +# CONFIG_MTD_UBI_FASTMAP is not set +# CONFIG_MTD_UBI_GLUEBI is not set +CONFIG_MTD_UBI_WL_THRESHOLD=4096 CONFIG_MULTI_IRQ_HANDLER=y CONFIG_MUTEX_SPIN_ON_OWNER=y CONFIG_NEED_DMA_MAP_STATE=y @@ -327,7 +340,7 @@ CONFIG_PREEMPT_RCU=y CONFIG_PRINTK_TIME=y CONFIG_PROC_PAGE_MONITOR=y CONFIG_PTP_1588_CLOCK=y -# CONFIG_QCOM_ADM is not set +CONFIG_QCOM_ADM=y CONFIG_QCOM_BAM_DMA=y CONFIG_QCOM_GSBI=y CONFIG_QCOM_HFPLL=y @@ -395,6 +408,11 @@ CONFIG_THERMAL_OF=y CONFIG_TICK_CPU_ACCOUNTING=y CONFIG_TIMER_STATS=y CONFIG_TREE_PREEMPT_RCU=y +CONFIG_UBIFS_FS=y +# CONFIG_UBIFS_FS_ADVANCED_COMPR is not set +CONFIG_UBIFS_FS_LZO=y +CONFIG_UBIFS_FS_XZ=y +CONFIG_UBIFS_FS_ZLIB=y CONFIG_UEVENT_HELPER_PATH="" CONFIG_UID16=y CONFIG_UNCOMPRESS_INCLUDE="debug/uncompress.h" @@ -416,5 +434,6 @@ CONFIG_XZ_DEC_ARM=y CONFIG_XZ_DEC_BCJ=y CONFIG_ZBOOT_ROM_BSS=0 CONFIG_ZBOOT_ROM_TEXT=0 +CONFIG_ZLIB_DEFLATE=y CONFIG_ZLIB_INFLATE=y CONFIG_ZONE_DMA_FLAG=0 diff --git a/target/linux/ipq806x/config-4.1 b/target/linux/ipq806x/config-4.1 index 0262e7a..f711dd5 100644 --- a/target/linux/ipq806x/config-4.1 +++ b/target/linux/ipq806x/config-4.1 @@ -111,6 +111,8 @@ CONFIG_CRC16=y # CONFIG_CRC32_SARWATE is not set CONFIG_CRC32_SLICEBY8=y CONFIG_CROSS_MEMORY_ATTACH=y +CONFIG_CRYPTO_DEFLATE=y +CONFIG_CRYPTO_LZO=y CONFIG_CRYPTO_XZ=y CONFIG_DCACHE_WORD_ACCESS=y CONFIG_DEBUG_BUGVERBOSE=y @@ -263,9 +265,18 @@ CONFIG_MSM_MMCC_8960=y CONFIG_MSM_MMCC_8974=y CONFIG_MTD_CMDLINE_PARTS=y CONFIG_MTD_M25P80=y +CONFIG_MTD_NAND=y +CONFIG_MTD_NAND_ECC=y +CONFIG_MTD_NAND_QCOM=y CONFIG_MTD_SPI_NOR=y CONFIG_MTD_SPLIT_FIRMWARE=y CONFIG_MTD_SPLIT_FIT_FW=y +CONFIG_MTD_UBI=y +CONFIG_MTD_UBI_BEB_LIMIT=20 +# CONFIG_MTD_UBI_BLOCK is not set +# CONFIG_MTD_UBI_FASTMAP is not set +# CONFIG_MTD_UBI_GLUEBI is not set +CONFIG_MTD_UBI_WL_THRESHOLD=4096 CONFIG_MULTI_IRQ_HANDLER=y CONFIG_MUTEX_SPIN_ON_OWNER=y CONFIG_NEED_DMA_MAP_STATE=y @@ -341,7 +352,7 @@ CONFIG_PREEMPT_RCU=y CONFIG_PRINTK_TIME=y CONFIG_PROC_PAGE_MONITOR=y CONFIG_PTP_1588_CLOCK=y -# CONFIG_QCOM_ADM is not set +CONFIG_QCOM_ADM=y CONFIG_QCOM_BAM_DMA=y CONFIG_QCOM_GSBI=y CONFIG_QCOM_HFPLL=y @@ -406,6 +417,11 @@ CONFIG_THERMAL_OF=y # CONFIG_THUMB2_KERNEL is not set CONFIG_TICK_CPU_ACCOUNTING=y CONFIG_TIMER_STATS=y +CONFIG_UBIFS_FS=y +# CONFIG_UBIFS_FS_ADVANCED_COMPR is not set +CONFIG_UBIFS_FS_LZO=y +CONFIG_UBIFS_FS_XZ=y +CONFIG_UBIFS_FS_ZLIB=y CONFIG_UEVENT_HELPER_PATH="" CONFIG_UID16=y CONFIG_UNCOMPRESS_INCLUDE="debug/uncompress.h" @@ -427,5 +443,6 @@ CONFIG_XZ_DEC_ARM=y CONFIG_XZ_DEC_BCJ=y CONFIG_ZBOOT_ROM_BSS=0 CONFIG_ZBOOT_ROM_TEXT=0 +CONFIG_ZLIB_DEFLATE=y CONFIG_ZLIB_INFLATE=y CONFIG_ZONE_DMA_FLAG=0 -- 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 0/3] ipq806x: add NAND flash support
This patch serie adds support for the integrated NAND flash controller available on AP148. Most of the patches are backported from LKML, with minor modifications. This is kernel level support & enablement for now. Support for proper MTD partitioning will come later and will be necessary to boot from it. Mathieu Olivari (3): ipq806x: Add ADM support ipq806x: add NAND flash controller support ipq806x: enable NAND flash support in the kernel target/linux/ipq806x/Makefile |2 +- target/linux/ipq806x/config-3.18 | 20 + target/linux/ipq806x/config-4.1| 18 + ...1-ARM-qcom-add-USB-nodes-to-ipq806x-ap148.patch |2 +- .../150-dmaengine-Rework-dma_chan_get.patch| 70 + ...Remove-the-need-to-declare-device_control.patch | 27 + ...ake-channel-allocation-callbacks-optional.patch | 62 + ...engine-Introduce-a-device_config-callback.patch | 51 + ...aengine-Add-device_terminate_all-callback.patch | 47 + ...-bindings-qcom_adm-Fix-channel-specifiers.patch | 76 + .../156-dmaengine-Add-ADM-driver.patch | 958 + .../157-ARM-DT-ipq8064-Add-ADM-device-node.patch | 54 + .../160-clk-qcom-Add-EBI2-clocks-for-IPQ806x.patch | 74 + ...g-to-access-bad-block-markers-in-raw-mode.patch | 84 + ...-mtd-nand-Qualcomm-NAND-controller-driver.patch | 2024 ...63-dt-bindings-qcom_nandc-Add-DT-bindings.patch | 82 + ...-dts-Add-NAND-controller-node-for-ipq806x.patch | 50 + ...nable-NAND-node-on-IPQ8064-AP148-platform.patch | 79 + ...dd-support-for-NSS-GMAC-clocks-and-resets.patch | 20 +- ...RM-dts-qcom-add-mdio-nodes-to-ap148-db149.patch | 11 +- ...-qcom-add-gmac-nodes-to-ipq806x-platforms.patch | 10 +- ...-bindings-qcom_adm-Fix-channel-specifiers.patch | 76 + .../patches-4.1/156-dmaengine-Add-ADM-driver.patch | 962 ++ .../157-ARM-DT-ipq8064-Add-ADM-device-node.patch | 54 + ...g-to-access-bad-block-markers-in-raw-mode.patch | 84 + ...-mtd-nand-Qualcomm-NAND-controller-driver.patch | 2024 ...63-dt-bindings-qcom_nandc-Add-DT-bindings.patch | 82 + ...-dts-Add-NAND-controller-node-for-ipq806x.patch | 50 + ...nable-NAND-node-on-IPQ8064-AP148-platform.patch | 76 + ...RM-dts-qcom-add-mdio-nodes-to-ap148-db149.patch | 11 +- ...-qcom-add-gmac-nodes-to-ipq806x-platforms.patch |7 +- 31 files changed, 7218 insertions(+), 29 deletions(-) create mode 100644 target/linux/ipq806x/patches-3.18/150-dmaengine-Rework-dma_chan_get.patch create mode 100644 target/linux/ipq806x/patches-3.18/151-dmaengine-Remove-the-need-to-declare-device_control.patch create mode 100644 target/linux/ipq806x/patches-3.18/152-dmaengine-Make-channel-allocation-callbacks-optional.patch create mode 100644 target/linux/ipq806x/patches-3.18/153-dmaengine-Introduce-a-device_config-callback.patch create mode 100644 target/linux/ipq806x/patches-3.18/154-dmaengine-Add-device_terminate_all-callback.patch create mode 100644 target/linux/ipq806x/patches-3.18/155-dt-bindings-qcom_adm-Fix-channel-specifiers.patch create mode 100644 target/linux/ipq806x/patches-3.18/156-dmaengine-Add-ADM-driver.patch create mode 100644 target/linux/ipq806x/patches-3.18/157-ARM-DT-ipq8064-Add-ADM-device-node.patch create mode 100644 target/linux/ipq806x/patches-3.18/160-clk-qcom-Add-EBI2-clocks-for-IPQ806x.patch create mode 100644 target/linux/ipq806x/patches-3.18/161-mtd-nand-Create-a-BBT-flag-to-access-bad-block-markers-in-raw-mode.patch create mode 100644 target/linux/ipq806x/patches-3.18/162-mtd-nand-Qualcomm-NAND-controller-driver.patch create mode 100644 target/linux/ipq806x/patches-3.18/163-dt-bindings-qcom_nandc-Add-DT-bindings.patch create mode 100644 target/linux/ipq806x/patches-3.18/164-arm-qcom-dts-Add-NAND-controller-node-for-ipq806x.patch create mode 100644 target/linux/ipq806x/patches-3.18/165-arm-qcom-dts-Enable-NAND-node-on-IPQ8064-AP148-platform.patch create mode 100644 target/linux/ipq806x/patches-4.1/155-dt-bindings-qcom_adm-Fix-channel-specifiers.patch create mode 100644 target/linux/ipq806x/patches-4.1/156-dmaengine-Add-ADM-driver.patch create mode 100644 target/linux/ipq806x/patches-4.1/157-ARM-DT-ipq8064-Add-ADM-device-node.patch create mode 100644 target/linux/ipq806x/patches-4.1/161-mtd-nand-Create-a-BBT-flag-to-access-bad-block-markers-in-raw-mode.patch create mode 100644 target/linux/ipq806x/patches-4.1/162-mtd-nand-Qualcomm-NAND-controller-driver.patch create mode 100644 target/linux/ipq806x/patches-4.1/163-dt-bindings-qcom_nandc-Add-DT-bindings.patch create mode 100644 target/linux/ipq806x/patches-4.1/164-arm-qcom-dts-Add-NAND-controller-node-for-ipq806x.patch create mode 100644 target/linux/ipq806x/patches-4.1/165-arm-qcom-dts-Enable-NAND-node-on-IPQ8064-AP148-platform.patch -- 2.1.4 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.or
Re: [OpenWrt-Devel] [PATCHv2 netifd 2/3] bridge: Allow setting multicast_to_unicast option
On 2015-08-06 22:10, Linus Lüssing wrote: > On Wed, Aug 05, 2015 at 01:38:28PM +0200, Felix Fietkau wrote: >> On 2015-08-05 01:00, Linus Lüssing wrote: >> > With this patch the multicast_to_unicast feature can be disabled for all >> > wireless interfaces via an according option on the uci bridge interface. >> > >> > This patch also exports the setting information to wireless handler >> > scripts. The hostapd script will need that information to determine >> > whether to enable or disable ap-isolation, for instance. >> > >> > Signed-off-by: Linus Lüssing >> I think it would be better to store these flags in the bridge config >> instead of the generic device config, and either add a blob_buf argument >> in struct device_hotplug_ops -> prepare, or add a new callback get_info, >> which adds the bridge info for use in the wireless json. > > These would then be options per bridge, but not per bridge port, > wouldn't they? Right. > For the multicast_to_unicast feature, okay (currently this patch > only allows setting it "globally" for a bridge but not on a bridge > port basis - though I was thinking about maybe making it bridge > port specific once someone needs that). For the multicast_router > option I'd need that on a bridge port basis. OK, then leave it as device options for now until we have a better way of specifiying bridge port settings. Same for multicast_to_unicast. >> I would like to avoid polluting the generic device options with bridge >> specific stuff. >> >> This patch should probably be merged with the previous one afterwards, >> since the first one without any other changes will cause regressions. > > Regressions, where/why? If this patch were ommitted from this > patchset then no harm should be done (unless I'm missing > something?). The regression is: patch 1 enables hairpin mode for wireless interfaces, with the assumption that the wireless script enables isolate mode for multicast-to-unicast enable configurations. The wireless script can only do that if patch 2 is applies, because that one passes the required options. The regression disappears after you rework patch 1 as discussed. - Felix ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH] busybox: lock: implement -n "Fail rather than wait"
On 2015-08-06 17:28, Alexander Couzens wrote: > lock -n is similiar to flock -n. If the lock was already taken, > fail with exit code = 1 and write error message to stderr. > > example: > if ! lock -n /tmp/foo ; then > echo lock exits. > else > echo lock was free. But is locked now. > fi >> lock was free. But is locked now. >> lock exists. > > Signed-off-by: Alexander Couzens > --- > package/utils/busybox/patches/220-add_lock_util.patch | 18 +++--- > 1 file changed, 15 insertions(+), 3 deletions(-) > > diff --git a/package/utils/busybox/patches/220-add_lock_util.patch > b/package/utils/busybox/patches/220-add_lock_util.patch > index f42edcb..08f489a 100644 > --- a/package/utils/busybox/patches/220-add_lock_util.patch > +++ b/package/utils/busybox/patches/220-add_lock_util.patch > @@ -33,9 +33,11 @@ > lib-$(CONFIG_MAKEDEVS)+= makedevs.o > lib-$(CONFIG_MAN) += man.o > lib-$(CONFIG_MICROCOM)+= microcom.o > +Index: busybox-1.23.2/miscutils/lock.c > +=== > --- /dev/null > -+++ b/miscutils/lock.c > -@@ -0,0 +1,135 @@ > busybox-1.23.2/miscutils/lock.c > +@@ -0,0 +1,145 @@ Please use the right refresh method or run make package/busybox/refresh. > @@ -65,6 +68,7 @@ > +" -s Use shared locking\n" > +" -u Unlock\n" > +" -w Wait for the lock to become free, don't > acquire lock\n" > ++" -n Fail rather than wait\n" > +"\n", name); > +exit(1); > +} > @@ -104,7 +110,10 @@ > +} > +} > + > -+if (flock(fd, (shared ? LOCK_SH : LOCK_EX)) < 0) { > ++flags = shared ? LOCK_SH : LOCK_EX; > ++flags |= failinsteadwait ? LOCK_NB : 0; > ++ > ++if ((ret = flock(fd, flags)) < 0) { > +fprintf(stderr, "Can't lock %s\n", file); > +return 1; > +} "failinsteadwait" sounds a bit quirky, how about something like "try_lock" instead. Same applies for the description. - Felix ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCHv2 netifd 2/3] bridge: Allow setting multicast_to_unicast option
On Wed, Aug 05, 2015 at 01:38:28PM +0200, Felix Fietkau wrote: > On 2015-08-05 01:00, Linus Lüssing wrote: > > With this patch the multicast_to_unicast feature can be disabled for all > > wireless interfaces via an according option on the uci bridge interface. > > > > This patch also exports the setting information to wireless handler > > scripts. The hostapd script will need that information to determine > > whether to enable or disable ap-isolation, for instance. > > > > Signed-off-by: Linus Lüssing > I think it would be better to store these flags in the bridge config > instead of the generic device config, and either add a blob_buf argument > in struct device_hotplug_ops -> prepare, or add a new callback get_info, > which adds the bridge info for use in the wireless json. These would then be options per bridge, but not per bridge port, wouldn't they? For the multicast_to_unicast feature, okay (currently this patch only allows setting it "globally" for a bridge but not on a bridge port basis - though I was thinking about maybe making it bridge port specific once someone needs that). For the multicast_router option I'd need that on a bridge port basis. > > I would like to avoid polluting the generic device options with bridge > specific stuff. > > This patch should probably be merged with the previous one afterwards, > since the first one without any other changes will cause regressions. Regressions, where/why? If this patch were ommitted from this patchset then no harm should be done (unless I'm missing something?). Cheers, Linus ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH v3] lantiq: get more status information from xDSL
Am 06.08.2015 4:01 nachm. schrieb "Sylwek ScApi" : > > I don't know that You done something wrong, You misunderstood me, as example We will use this part of patch: > : > @@ -226,16 +609,21 @@ line_state() { > fi > else > if [ "$ls" = "0x801" ]; then > - echo "Line State: UP [$ls: $s]" > + echo "Line State: UP [$ls: $s]" > else > - echo "Line State: DOWN [$ls: $s]" > + echo "Line State: DOWN [$ls: $s]" > fi > fi > } > > Why You replace tab separated "words" with space separated "words" ? I replaced this with space so i get a well formated output for "dsl_control status", If i use 3 tabs the out put will get too fare left on screen i think. I could change it If you want. > > Patch is send correctly but why replace "tabs" ? > > My thunderbird is white space broken so You need to look in Your source patch for reference. > > Best Regards > > 2015-08-06 11:52 GMT+02:00 Florian Eckert : >> >> Hello Petela >> >> sorry but i dont understand your question! >> >> I checked out openwrt with git and edited the file. After that i made >> "git format-patch -1" and then "git send-email --to >> openwrt-devel@lists.openwrt.org >> 0001-lantiq-get-more-status-information-from-xDSL.patch". I used the >> same whitespaces in this file as in the other functions of this file >> -> in this case it was an tab. What did i made wrong? >> >> Kind Regards Flo >> >> 2015-08-06 9:15 GMT+02:00 Sylwester Petela : >> > W dniu 2015-08-06 o 07:41, feckert pisze: >> > >> >> Signed-off-by: Florian Eckert >> >> Signed-off-by: Helge Mader >> >> Tested-by: Martin Blumenstingl >> >> Tested-by: Andre Heider >> >> --- >> >> >> >> v2 fix annex and line mode comma >> >> v2 fix latency to ms >> >> v3 fix latency syntax quotation error "x ms" >> >> v3 fix echo "" separation removed from status function >> >> >> >> .../lantiq/base-files/lib/functions/lantiq_dsl.sh | 412 >> >> +++- >> >> 1 file changed, 400 insertions(+), 12 deletions(-) >> >> mode change 100644 => 100755 >> >> target/linux/lantiq/base-files/lib/functions/lantiq_dsl.sh >> >> >> >> diff --git a/target/linux/lantiq/base-files/lib/functions/lantiq_dsl.sh >> >> b/target/linux/lantiq/base-files/lib/functions/lantiq_dsl.sh >> >> old mode 100644 >> >> new mode 100755 >> >> index 56b8652..7809d01 >> >> --- a/target/linux/lantiq/base-files/lib/functions/lantiq_dsl.sh >> >> +++ b/target/linux/lantiq/base-files/lib/functions/lantiq_dsl.sh >> >> @@ -19,6 +19,9 @@ dsl_cmd() { >> >> dsl_val() { >> >> echo $(expr "$1" : '.*'$2'=\([-\.[:alnum:]]*\).*') >> >> } >> >> +dsl_string() { >> >> + echo $(expr "$1" : '.*'$2'=(\([A-Z0-9,]*\))') >> >> +} >> >> # >> >> # Simple divide by 10 routine to cope with one decimal place >> >> @@ -49,6 +52,16 @@ scale() { >> >> fi >> >> } >> >> +scale_latency() { >> >> + local val=$1 >> >> + local a >> >> + local b >> >> + >> >> + a=$(expr $val / 100) >> >> + b=$(expr $val % 100) >> >> + printf "%d.%d ms" ${a} ${b} >> >> +} >> >> + >> >> # >> >> # Read the data rates for both directions >> >> # >> >> @@ -77,7 +90,7 @@ data_rates() { >> >> echo "dsl.data_rate_down_s=\"$sdrd\"" >> >> echo "dsl.data_rate_up_s=\"$sdru\"" >> >> else >> >> - echo "Data Rate:${sdrd}/s / ${sdru}/s" >> >> + echo "Data Rate:Down: >> >> ${sdrd}/s / Up: ${sdru}/s" >> >> fi >> >> } >> >> @@ -92,11 +105,340 @@ chipset() { >> >> vig=$(dsl_cmd vig) >> >> cs=$(dsl_val "$vig" DSL_ChipSetType) >> >> csv=$(dsl_val "$vig" DSL_ChipSetHWVersion) >> >> + csfw=$(dsl_val "$vig" DSL_ChipSetFWVersion) >> >> + csapi=$(dsl_val "$vig" DSL_DriverVersionApi) >> >> if [ "$action" = "lucistat" ]; then >> >> echo "dsl.chipset=\"${cs} ${csv}\"" >> >> + echo "dsl.firmware_version=\"${csfw}\"" >> >> + echo "dsl.api_version=\"${csapi}\"" >> >> else >> >> - echo "Chipset: ${cs} ${csv}" >> >> + echo "Chipset: ${cs} >> >> ${csv}" >> >> + echo "Firmware Version: ${csfw}" >> >> + echo "API Version: ${csapi}" >> >> + fi >> >> +} >> >> + >> >> +# >> >> +# Vendor information >> >> +# >> >> +vendor() { >> >> + local lig >> >> + local vid >> >> + local svid >> >> + >> >> + lig=$(dsl_cmd g997lig 1) >> >> + vid=$(dsl_string "$lig" G994VendorID) >> >> + svid=$(dsl_string "$lig" SystemVendorID) >> >> + >> >> + if [ "$action" = "lucistat" ]; then >> >> + echo "dsl.atuc_vendor_id=\"${vid}\"" >> >> + echo "dsl.atuc_system_vendor_id=\"${svid}\"" >> >> +
[OpenWrt-Devel] Unable to get TP9343/QCA9561 WLAN working with ath9k (was: ar71xx: fix TP-LINK TL-WR941ND v6 support)
Hi, as I've already written on the OpenWrt ML, I'm currently porting OpenWrt to the TP-LINK TL-WR941ND v6, which uses a TP9343 SoC (which is confusingly part of the QCA956x series). The WMAC identifies as QCA9561 (0x600 rev 0). I'm unable to get the WLAN working at all. The TX seems to work fine (at least I can see the beacons when I put the card into AP mode), but RX is completely dead (iw scan is empty, etc...). As I'm not familar with ath9k, I need some help debugging this. I'm using the OpenWrt trunk, which contains a recent version of mac80211 based on wireless-testing, it already contains the patches "ath9k_hw: fix device ID check for AR956x" and "ath9k: Fix register definitions for QCA956x". I've attached a dump of all debugfs information ath9k provides while the WLAN is configured in IBSS mode in a cell that should be quite active. Thanks in advance, Matthias phy0.tar Description: Unix tar archive signature.asc Description: OpenPGP digital signature ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] RB2011UiAS-RM Mikrotik/Routerboard
Hello all, Could someone please assist? I'm still getting a lot of packet loss: 306 packets transmitted, 176 packets received, 42% packet loss round-trip min/avg/max = 0.717/0.835/5.253 ms Thanks, Marcelo 2015-07-28 16:23 GMT-03:00 Marcelo Feitoza Parisi : > I have this device, and I am getting in trouble getting the gigabit > ethernet ports to work. > I've tried the patches described here: > https://lists.openwrt.org/pipermail/openwrt-devel/2014-December/029949.html > > I've tried with values: 0x3e00, 0x0600 and 0x6f00. > > On 0x3e00, I can get the device to ping, but it looses a lot of > packages, sometimes almost 80% packet loss. On the other values the device > doesn't even ping. > > Can anyone assist? > > Thanks, > Marcelo Parisi > ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] Separate Default SSID for 2.4GHz and 5GHz
Hi Everyone, I am working on AR93XX openWrt project. I have to configure the wifi0 as 2.4GHz and 5Ghz as per the selection of user. Mainly I have to add selection in the GUI to switch between 2.4GHz and 5GHz. I have to keep two separate default SSID for 2.4GHz and 5GHz. Could anyone can help me that how I can keep two separate configuration and how I can handle this in software. I mean to say how I can thin into GUI and can handle backend. Thanks. ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH] busybox: lock: implement -n "Fail rather than wait"
lock -n is similiar to flock -n. If the lock was already taken, fail with exit code = 1 and write error message to stderr. example: if ! lock -n /tmp/foo ; then echo lock exits. else echo lock was free. But is locked now. fi > lock was free. But is locked now. > lock exists. Signed-off-by: Alexander Couzens --- package/utils/busybox/patches/220-add_lock_util.patch | 18 +++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/package/utils/busybox/patches/220-add_lock_util.patch b/package/utils/busybox/patches/220-add_lock_util.patch index f42edcb..08f489a 100644 --- a/package/utils/busybox/patches/220-add_lock_util.patch +++ b/package/utils/busybox/patches/220-add_lock_util.patch @@ -33,9 +33,11 @@ lib-$(CONFIG_MAKEDEVS)+= makedevs.o lib-$(CONFIG_MAN) += man.o lib-$(CONFIG_MICROCOM)+= microcom.o +Index: busybox-1.23.2/miscutils/lock.c +=== --- /dev/null -+++ b/miscutils/lock.c -@@ -0,0 +1,135 @@ busybox-1.23.2/miscutils/lock.c +@@ -0,0 +1,145 @@ +/* + * Copyright (C) 2006 Felix Fietkau + * @@ -56,6 +58,7 @@ +static int unlock = 0; +static int shared = 0; +static int waitonly = 0; ++static int failinsteadwait = 0; +static int fd; +static char *file; + @@ -65,6 +68,7 @@ + " -s Use shared locking\n" + " -u Unlock\n" + " -w Wait for the lock to become free, don't acquire lock\n" ++ " -n Fail rather than wait\n" + "\n", name); + exit(1); +} @@ -95,6 +99,8 @@ +static int do_lock(void) +{ + int pid; ++ int ret; ++ int flags; + char pidstr[8]; + + if ((fd = open(file, O_RDWR | O_CREAT | O_EXCL, 0700)) < 0) { @@ -104,7 +110,10 @@ + } + } + -+ if (flock(fd, (shared ? LOCK_SH : LOCK_EX)) < 0) { ++ flags = shared ? LOCK_SH : LOCK_EX; ++ flags |= failinsteadwait ? LOCK_NB : 0; ++ ++ if ((ret = flock(fd, flags)) < 0) { + fprintf(stderr, "Can't lock %s\n", file); + return 1; + } @@ -156,6 +165,9 @@ + case 'u': + unlock = 1; + break; ++ case 'n': ++ failinsteadwait = 1; ++ break; + } + } + c--; -- 2.5.0 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCHv2 netifd 1/3] bridge: Fix multicast_to_unicast feature by hairpin+isolate
On Wed, Aug 05, 2015 at 01:28:23PM +0200, Felix Fietkau wrote: > This patch turns on hairpin mode and assumes that the driver script > checks the multicast_to_unicast flag. > This is somewhat broken, since you only consider the hostapd.sh script, > but there are other driver implementations out there (including some > out-of-tree ones). > I think a better approach would be to check the conditions that are used > to enable hairpin mode and use them to alter the vif isolate options in > the json data. > You could do this from within netifd-wireless.sh, and drop the hostapd > change entirely. Okay, sounds good, will do that! ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH v3] lantiq: get more status information from xDSL
I don't know that You done something wrong, You misunderstood me, as example We will use this part of patch: : @@ -226,16 +609,21 @@ line_state() { fi else if [ "$ls" = "0x801" ]; then - echo "Line State: UP [$ls: $s]" + echo "Line State: UP [$ls: $s]" else - echo "Line State: DOWN [$ls: $s]" + echo "Line State: DOWN [$ls: $s]" fi fi } Why You replace tab separated "words" with space separated "words" ? Patch is send correctly but why replace "tabs" ? My thunderbird is white space broken so You need to look in Your source patch for reference. Best Regards 2015-08-06 11:52 GMT+02:00 Florian Eckert : > Hello Petela > > sorry but i dont understand your question! > > I checked out openwrt with git and edited the file. After that i made > "git format-patch -1" and then "git send-email --to > openwrt-devel@lists.openwrt.org > 0001-lantiq-get-more-status-information-from-xDSL.patch". I used the > same whitespaces in this file as in the other functions of this file > -> in this case it was an tab. What did i made wrong? > > Kind Regards Flo > > 2015-08-06 9:15 GMT+02:00 Sylwester Petela : > > W dniu 2015-08-06 o 07:41, feckert pisze: > > > >> Signed-off-by: Florian Eckert > >> Signed-off-by: Helge Mader > >> Tested-by: Martin Blumenstingl > >> Tested-by: Andre Heider > >> --- > >> > >> v2 fix annex and line mode comma > >> v2 fix latency to ms > >> v3 fix latency syntax quotation error "x ms" > >> v3 fix echo "" separation removed from status function > >> > >> .../lantiq/base-files/lib/functions/lantiq_dsl.sh | 412 > >> +++- > >> 1 file changed, 400 insertions(+), 12 deletions(-) > >> mode change 100644 => 100755 > >> target/linux/lantiq/base-files/lib/functions/lantiq_dsl.sh > >> > >> diff --git a/target/linux/lantiq/base-files/lib/functions/lantiq_dsl.sh > >> b/target/linux/lantiq/base-files/lib/functions/lantiq_dsl.sh > >> old mode 100644 > >> new mode 100755 > >> index 56b8652..7809d01 > >> --- a/target/linux/lantiq/base-files/lib/functions/lantiq_dsl.sh > >> +++ b/target/linux/lantiq/base-files/lib/functions/lantiq_dsl.sh > >> @@ -19,6 +19,9 @@ dsl_cmd() { > >> dsl_val() { > >> echo $(expr "$1" : '.*'$2'=\([-\.[:alnum:]]*\).*') > >> } > >> +dsl_string() { > >> + echo $(expr "$1" : '.*'$2'=(\([A-Z0-9,]*\))') > >> +} > >> # > >> # Simple divide by 10 routine to cope with one decimal place > >> @@ -49,6 +52,16 @@ scale() { > >> fi > >> } > >> +scale_latency() { > >> + local val=$1 > >> + local a > >> + local b > >> + > >> + a=$(expr $val / 100) > >> + b=$(expr $val % 100) > >> + printf "%d.%d ms" ${a} ${b} > >> +} > >> + > >> # > >> # Read the data rates for both directions > >> # > >> @@ -77,7 +90,7 @@ data_rates() { > >> echo "dsl.data_rate_down_s=\"$sdrd\"" > >> echo "dsl.data_rate_up_s=\"$sdru\"" > >> else > >> - echo "Data Rate:${sdrd}/s / ${sdru}/s" > >> + echo "Data Rate:Down: > >> ${sdrd}/s / Up: ${sdru}/s" > >> fi > >> } > >> @@ -92,11 +105,340 @@ chipset() { > >> vig=$(dsl_cmd vig) > >> cs=$(dsl_val "$vig" DSL_ChipSetType) > >> csv=$(dsl_val "$vig" DSL_ChipSetHWVersion) > >> + csfw=$(dsl_val "$vig" DSL_ChipSetFWVersion) > >> + csapi=$(dsl_val "$vig" DSL_DriverVersionApi) > >> if [ "$action" = "lucistat" ]; then > >> echo "dsl.chipset=\"${cs} ${csv}\"" > >> + echo "dsl.firmware_version=\"${csfw}\"" > >> + echo "dsl.api_version=\"${csapi}\"" > >> else > >> - echo "Chipset: ${cs} ${csv}" > >> + echo "Chipset: ${cs} > >> ${csv}" > >> + echo "Firmware Version: ${csfw}" > >> + echo "API Version: > ${csapi}" > >> + fi > >> +} > >> + > >> +# > >> +# Vendor information > >> +# > >> +vendor() { > >> + local lig > >> + local vid > >> + local svid > >> + > >> + lig=$(dsl_cmd g997lig 1) > >> + vid=$(dsl_string "$lig" G994VendorID) > >> + svid=$(dsl_string "$lig" SystemVendorID) > >> + > >> + if [ "$action" = "lucistat" ]; then > >> + echo "dsl.atuc_vendor_id=\"${vid}\"" > >> + echo "dsl.atuc_system_vendor_id=\"${svid}\"" > >> + else > >> + echo "ATU-C Vendor ID: ${vid}" > >> + echo "ATU-C System Vendor ID: ${svid}" > >> + fi > >> +} > >> + > >> +# > >> +# XTSE capabilities > >> +# > >> +xtse() { > >> + local xtusesg > >> + local xtse1 > >> + local xtse2 > >> +
[OpenWrt-Devel] Fwd: "3-address Wi-Fi bridging" (was: Multiple Wi-Fi client/AP interfaces on one radio)
Hi, I have configured wireless as below: *config wifi-device 'wifi0'option type 'qcawifi'option channel 'auto'option macaddr '00:03:7f:42:06:61'option hwmode '11ng'option txpower '19'option htmode 'HT20'config wifi-ifaceoption device 'wifi0'option network 'lan' option mode 'ap'option encryption 'psk2'option ssid 'Test_ap_1'option key **'Test_ap_1'* *It works fine with WPA2 key but when i try to connect another router this will become as client and SSID will change to that router SSID as i mentioned before also.* *As i understand we can create one more to avoid this problem as explained in previous mail.* *Basically i need that when i connect to wireless WAN, the LAN SSID should not change. I am using AR9344. Can i use below script for my requirement.* config wifi-device 'radio0' >> option type 'mac80211' >> option channel '11' >> option hwmode '11g' >> option path 'platform/ar933x_wmac' >> option htmode 'HT20' >> option country 'US' >> option txpower '20' >> >> config wifi-iface 'ap1' >> option device 'radio0' >> option mode 'ap' >> option wds '1' >> option ssid 'my AP' >> option network 'lan' >> >> config wifi-iface 'mesh1' >> option device 'radio0' >> option mode 'mesh' >> option mesh_id 'my mesh' >> option network 'lan' Thanks & Regards, On Wed, Aug 5, 2015 at 7:00 AM, Roman Yeryomin wrote: > On 4 August 2015 at 23:24, Joshua Judson Rosen > wrote: > > On 2015-08-04 14:14, Roman Yeryomin wrote: > >> On 4 August 2015 at 17:58, Joshua Judson Rosen > wrote: > >>> On 2015-08-04 02:26, David Lang wrote: > A given radio can be either an AP or a client, but not both at once. > > so if you use a radio to connect to another AP, you are making it a > client, and > in client mode all it can do is connect to that other AP as shows up > as the SSID > of that other AP. > > you can do this with one radio, while using the other radio (assuming > you have > two) to act as an AP for local clients. > >>> > >>> > >>> This is not necessarily true: with at least some hardware/drivers, it's > >>> possible to create multiple virtual interfaces on top of a single > radio-- > >>> and separate virtual interfaces can in fact operate in different modes > >>> (e.g.: one in STA mode, two in AP mode, one in mesh mode...). > >>> > >>> Assuming that your hardware/driver is capable of supporting multiple > >>> virtual interfaces on top of the single physical radio, > >>> you can create these interfaces by adding "wifi-iface" stanzas > >>> in /etc/config/wireless, e.g: > >>> > >>> config wifi-device 'radio0' > >>> option type 'mac80211' > >>> option channel '11' > >>> option hwmode '11g' > >>> option path 'platform/ar933x_wmac' > >>> option htmode 'HT20' > >>> option country 'US' > >>> option txpower '20' > >>> > >>> config wifi-iface 'ap1' > >>> option device 'radio0' > >>> option mode 'ap' > >>> option wds '1' > >>> option ssid 'my AP' > >>> option network 'lan' > >>> > >>> config wifi-iface 'mesh1' > >>> option device 'radio0' > >>> option mode 'mesh' > >>> option mesh_id 'my mesh' > >>> option network 'lan' > >>> > >>> > >>> That creates two virtual interfaces using the same physical radio, > >>> and bridges them together onto the OpenWrt "lan network" > >>> (which is itself defined in /etc/config/network). > >>> > >>> > >>> I believe you could also have an interface with "mode 'sta'", but note > >>> that it would also need to use the same channel as the other > interfaces-- > >>> which means that the external AP to which you connect it would also > >>> need to use that same channel (11, in the example above). > >>> That's where having multiple *radios* helps: you can run them on > >>> different frequencies (either completely different bands [2.4 GHz vs. > 5 GHz], > >>> or on different channels within the same band [e.g. 2.427 GHz = > channel 4 > >>> vs. 2.472 GHz = channel 13]) to increase efficiency by multiplexing > >>> less data over a single radio, or to increase compatibility with other > >>> APs outside of your control that you might want to connect to. > >>> > >>> Also note that, if you want to bridge a STA interface onto anything > else, > >>> it'll need to be in "WDS" mode _and_ the the AP to which it's > connecting > >>> will also need to be in "WDS" mode (note the "option wds '1'", > >>> in my example above), because the standa
[OpenWrt-Devel] [PATCH] uclient-fetch: set server_name of the ssl context to support SNI
Signed-off-by: Alexander Couzens --- uclient-http.c | 1 + 1 file changed, 1 insertion(+) diff --git a/uclient-http.c b/uclient-http.c index d96094d..4300d05 100644 --- a/uclient-http.c +++ b/uclient-http.c @@ -826,6 +826,7 @@ static int uclient_setup_https(struct uclient_http *uh) uh->ussl.notify_error = uclient_ssl_notify_error; uh->ussl.notify_verify_error = uclient_ssl_notify_verify_error; uh->ussl.notify_connected = uclient_ssl_notify_connected; + uh->ussl.server_name = uh->uc.url->host; uh->ssl_ops->init(&uh->ussl, &uh->ufd.stream, uh->ssl_ctx, false); uh->ssl_ops->set_peer_cn(&uh->ussl, uh->uc.url->host); -- 2.5.0 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH] ustream-ssl: make ustream_ssl.server_name const
Signed-off-by: Alexander Couzens --- ustream-ssl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Hi Felix, can you please update CC too? BB would be also nice, if it still maintained. Follow-up patch for uclient-fetch will fix SNI. Best, lynxis diff --git a/ustream-ssl.h b/ustream-ssl.h index 0c55344..7787788 100644 --- a/ustream-ssl.h +++ b/ustream-ssl.h @@ -34,7 +34,7 @@ struct ustream_ssl { void *ssl; char *peer_cn; - char *server_name; + const char *server_name; int error; bool connected; -- 2.5.0 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] getaddrinfo breaks with IPV6 and IPV4
2015-08-06 12:02 GMT+02:00 Cristian Morales Vega : > On 6 August 2015 at 10:52, Baptiste Clenet wrote: >> Hi, >> >> I try to use getaddrinfo() function and I send as parameters: >> >> static char addrstr[256] = "::1"; >> struct addrinfo *res, *ainfo; >> struct addrinfo hints; >> memset ((char *)&hints, 0, sizeof(hints)); >> hints.ai_socktype = SOCK_DGRAM; >> hints.ai_family = AF_UNSPEC; >> >> int error = getaddrinfo(addrstr, "", &hints, &res); >> >> if (error != 0) { >> fprintf(stderr, "getaddrinfo: %s\n", gai_strerror(error)); >> return error; >> } >> >> >> And it gives me: >> getaddrinfo: Unrecognized service >> >> I tried with an IPV4 address, same problem. Do you know which >> implementation of getaddrinfo OpenWRT use? > > Why should it recognize the "" service? Give it the service you want > to use, or NULL. Yes, I've just found it as well, it was the reason, thanks anyway. -- Baptiste ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] getaddrinfo breaks with IPV6 and IPV4
2015-08-06 11:52 GMT+02:00 Baptiste Clenet : > Hi, > > I try to use getaddrinfo() function and I send as parameters: > > static char addrstr[256] = "::1"; > struct addrinfo *res, *ainfo; > struct addrinfo hints; > memset ((char *)&hints, 0, sizeof(hints)); > hints.ai_socktype = SOCK_DGRAM; > hints.ai_family = AF_UNSPEC; > > int error = getaddrinfo(addrstr, "", &hints, &res); Found my error, change "" to NULL make the deal! getaadrinfo can't read "" service. > > if (error != 0) { > fprintf(stderr, "getaddrinfo: %s\n", gai_strerror(error)); > return error; > } > > > And it gives me: > getaddrinfo: Unrecognized service > > I tried with an IPV4 address, same problem. Do you know which > implementation of getaddrinfo OpenWRT use? > > Regards, > > -- > Baptiste -- Baptiste ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] getaddrinfo breaks with IPV6 and IPV4
On 6 August 2015 at 10:52, Baptiste Clenet wrote: > Hi, > > I try to use getaddrinfo() function and I send as parameters: > > static char addrstr[256] = "::1"; > struct addrinfo *res, *ainfo; > struct addrinfo hints; > memset ((char *)&hints, 0, sizeof(hints)); > hints.ai_socktype = SOCK_DGRAM; > hints.ai_family = AF_UNSPEC; > > int error = getaddrinfo(addrstr, "", &hints, &res); > > if (error != 0) { > fprintf(stderr, "getaddrinfo: %s\n", gai_strerror(error)); > return error; > } > > > And it gives me: > getaddrinfo: Unrecognized service > > I tried with an IPV4 address, same problem. Do you know which > implementation of getaddrinfo OpenWRT use? Why should it recognize the "" service? Give it the service you want to use, or NULL. ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] getaddrinfo breaks with IPV6 and IPV4
Hi, I try to use getaddrinfo() function and I send as parameters: static char addrstr[256] = "::1"; struct addrinfo *res, *ainfo; struct addrinfo hints; memset ((char *)&hints, 0, sizeof(hints)); hints.ai_socktype = SOCK_DGRAM; hints.ai_family = AF_UNSPEC; int error = getaddrinfo(addrstr, "", &hints, &res); if (error != 0) { fprintf(stderr, "getaddrinfo: %s\n", gai_strerror(error)); return error; } And it gives me: getaddrinfo: Unrecognized service I tried with an IPV4 address, same problem. Do you know which implementation of getaddrinfo OpenWRT use? Regards, -- Baptiste ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] Fwd: [PATCH v3] lantiq: get more status information from xDSL
Sorry i dont understand your question. This is the third version of the patch. I edit this in v2 and v3 In v2 i have added the conversation of latency to ms (mentioned by Martin Blumenstingl). I have forgotten the quotation around the ms output. The lucistat output was broken so i fixed this in v3 (mentioned by Andre Heider) In v2 i also fixed the line mode comma separation (mentioned by Martin Blumenstingl) In v3 i deleted the echo "" output because this will also be printed during lucistat output (mentioned by Andre Heider) 2015-08-06 9:15 GMT+02:00 Sylwester Petela : > W dniu 2015-08-06 o 07:41, feckert pisze: > >> Signed-off-by: Florian Eckert >> Signed-off-by: Helge Mader >> Tested-by: Martin Blumenstingl >> Tested-by: Andre Heider >> --- >> >> v2 fix annex and line mode comma >> v2 fix latency to ms >> v3 fix latency syntax quotation error "x ms" >> v3 fix echo "" separation removed from status function >> >> .../lantiq/base-files/lib/functions/lantiq_dsl.sh | 412 >> +++- >> 1 file changed, 400 insertions(+), 12 deletions(-) >> mode change 100644 => 100755 >> target/linux/lantiq/base-files/lib/functions/lantiq_dsl.sh >> >> diff --git a/target/linux/lantiq/base-files/lib/functions/lantiq_dsl.sh >> b/target/linux/lantiq/base-files/lib/functions/lantiq_dsl.sh >> old mode 100644 >> new mode 100755 >> index 56b8652..7809d01 >> --- a/target/linux/lantiq/base-files/lib/functions/lantiq_dsl.sh >> +++ b/target/linux/lantiq/base-files/lib/functions/lantiq_dsl.sh >> @@ -19,6 +19,9 @@ dsl_cmd() { >> dsl_val() { >> echo $(expr "$1" : '.*'$2'=\([-\.[:alnum:]]*\).*') >> } >> +dsl_string() { >> + echo $(expr "$1" : '.*'$2'=(\([A-Z0-9,]*\))') >> +} >> # >> # Simple divide by 10 routine to cope with one decimal place >> @@ -49,6 +52,16 @@ scale() { >> fi >> } >> +scale_latency() { >> + local val=$1 >> + local a >> + local b >> + >> + a=$(expr $val / 100) >> + b=$(expr $val % 100) >> + printf "%d.%d ms" ${a} ${b} >> +} >> + >> # >> # Read the data rates for both directions >> # >> @@ -77,7 +90,7 @@ data_rates() { >> echo "dsl.data_rate_down_s=\"$sdrd\"" >> echo "dsl.data_rate_up_s=\"$sdru\"" >> else >> - echo "Data Rate:${sdrd}/s / ${sdru}/s" >> + echo "Data Rate:Down: >> ${sdrd}/s / Up: ${sdru}/s" >> fi >> } >> @@ -92,11 +105,340 @@ chipset() { >> vig=$(dsl_cmd vig) >> cs=$(dsl_val "$vig" DSL_ChipSetType) >> csv=$(dsl_val "$vig" DSL_ChipSetHWVersion) >> + csfw=$(dsl_val "$vig" DSL_ChipSetFWVersion) >> + csapi=$(dsl_val "$vig" DSL_DriverVersionApi) >> if [ "$action" = "lucistat" ]; then >> echo "dsl.chipset=\"${cs} ${csv}\"" >> + echo "dsl.firmware_version=\"${csfw}\"" >> + echo "dsl.api_version=\"${csapi}\"" >> else >> - echo "Chipset: ${cs} ${csv}" >> + echo "Chipset: ${cs} >> ${csv}" >> + echo "Firmware Version: ${csfw}" >> + echo "API Version: ${csapi}" >> + fi >> +} >> + >> +# >> +# Vendor information >> +# >> +vendor() { >> + local lig >> + local vid >> + local svid >> + >> + lig=$(dsl_cmd g997lig 1) >> + vid=$(dsl_string "$lig" G994VendorID) >> + svid=$(dsl_string "$lig" SystemVendorID) >> + >> + if [ "$action" = "lucistat" ]; then >> + echo "dsl.atuc_vendor_id=\"${vid}\"" >> + echo "dsl.atuc_system_vendor_id=\"${svid}\"" >> + else >> + echo "ATU-C Vendor ID: ${vid}" >> + echo "ATU-C System Vendor ID: ${svid}" >> + fi >> +} >> + >> +# >> +# XTSE capabilities >> +# >> +xtse() { >> + local xtusesg >> + local xtse1 >> + local xtse2 >> + local xtse3 >> + local xtse4 >> + local xtse5 >> + local xtse6 >> + local xtse7 >> + local xtse8 >> + >> + local xtse_s="" >> + >> + local annex_s="" >> + local line_mode_s="" >> + local cmd="" >> + >> + xtusesg=$(dsl_cmd g997xtusesg) >> + xtse1=$(dsl_val "$xtusesg" XTSE1) >> + xtse2=$(dsl_val "$xtusesg" XTSE2) >> + xtse3=$(dsl_val "$xtusesg" XTSE3) >> + xtse4=$(dsl_val "$xtusesg" XTSE4) >> + xtse5=$(dsl_val "$xtusesg" XTSE5) >> + xtse6=$(dsl_val "$xtusesg" XTSE6) >> + xtse7=$(dsl_val "$xtusesg" XTSE7) >> + xtse8=$(dsl_val "$xtusesg" XTSE8) >> + >> + # Evaluate Annex (according to G.997.1, 7.3.1.1.1) >> + if [ $((xtse1 & 13)) != 0 \ >> + -o $((xtse2 & 1)) != 0 \ >> + -o $((xtse3 & 12)) != 0 \ >> + -o $((xtse4 & 3)) != 0 \ >> + -o $((xtse6 & 3)) != 0 \ >> + -o $((xtse8 & 1)
Re: [OpenWrt-Devel] [PATCH v3] lantiq: get more status information from xDSL
W dniu 2015-08-06 o 07:41, feckert pisze: Signed-off-by: Florian Eckert Signed-off-by: Helge Mader Tested-by: Martin Blumenstingl Tested-by: Andre Heider --- v2 fix annex and line mode comma v2 fix latency to ms v3 fix latency syntax quotation error "x ms" v3 fix echo "" separation removed from status function .../lantiq/base-files/lib/functions/lantiq_dsl.sh | 412 +++- 1 file changed, 400 insertions(+), 12 deletions(-) mode change 100644 => 100755 target/linux/lantiq/base-files/lib/functions/lantiq_dsl.sh diff --git a/target/linux/lantiq/base-files/lib/functions/lantiq_dsl.sh b/target/linux/lantiq/base-files/lib/functions/lantiq_dsl.sh old mode 100644 new mode 100755 index 56b8652..7809d01 --- a/target/linux/lantiq/base-files/lib/functions/lantiq_dsl.sh +++ b/target/linux/lantiq/base-files/lib/functions/lantiq_dsl.sh @@ -19,6 +19,9 @@ dsl_cmd() { dsl_val() { echo $(expr "$1" : '.*'$2'=\([-\.[:alnum:]]*\).*') } +dsl_string() { + echo $(expr "$1" : '.*'$2'=(\([A-Z0-9,]*\))') +} # # Simple divide by 10 routine to cope with one decimal place @@ -49,6 +52,16 @@ scale() { fi } +scale_latency() { + local val=$1 + local a + local b + + a=$(expr $val / 100) + b=$(expr $val % 100) + printf "%d.%d ms" ${a} ${b} +} + # # Read the data rates for both directions # @@ -77,7 +90,7 @@ data_rates() { echo "dsl.data_rate_down_s=\"$sdrd\"" echo "dsl.data_rate_up_s=\"$sdru\"" else - echo "Data Rate: ${sdrd}/s / ${sdru}/s" + echo "Data Rate:Down: ${sdrd}/s / Up: ${sdru}/s" fi } @@ -92,11 +105,340 @@ chipset() { vig=$(dsl_cmd vig) cs=$(dsl_val "$vig" DSL_ChipSetType) csv=$(dsl_val "$vig" DSL_ChipSetHWVersion) + csfw=$(dsl_val "$vig" DSL_ChipSetFWVersion) + csapi=$(dsl_val "$vig" DSL_DriverVersionApi) if [ "$action" = "lucistat" ]; then echo "dsl.chipset=\"${cs} ${csv}\"" + echo "dsl.firmware_version=\"${csfw}\"" + echo "dsl.api_version=\"${csapi}\"" else - echo "Chipset: ${cs} ${csv}" + echo "Chipset: ${cs} ${csv}" + echo "Firmware Version: ${csfw}" + echo "API Version: ${csapi}" + fi +} + +# +# Vendor information +# +vendor() { + local lig + local vid + local svid + + lig=$(dsl_cmd g997lig 1) + vid=$(dsl_string "$lig" G994VendorID) + svid=$(dsl_string "$lig" SystemVendorID) + + if [ "$action" = "lucistat" ]; then + echo "dsl.atuc_vendor_id=\"${vid}\"" + echo "dsl.atuc_system_vendor_id=\"${svid}\"" + else + echo "ATU-C Vendor ID: ${vid}" + echo "ATU-C System Vendor ID: ${svid}" + fi +} + +# +# XTSE capabilities +# +xtse() { + local xtusesg + local xtse1 + local xtse2 + local xtse3 + local xtse4 + local xtse5 + local xtse6 + local xtse7 + local xtse8 + + local xtse_s="" + + local annex_s="" + local line_mode_s="" + local cmd="" + + xtusesg=$(dsl_cmd g997xtusesg) + xtse1=$(dsl_val "$xtusesg" XTSE1) + xtse2=$(dsl_val "$xtusesg" XTSE2) + xtse3=$(dsl_val "$xtusesg" XTSE3) + xtse4=$(dsl_val "$xtusesg" XTSE4) + xtse5=$(dsl_val "$xtusesg" XTSE5) + xtse6=$(dsl_val "$xtusesg" XTSE6) + xtse7=$(dsl_val "$xtusesg" XTSE7) + xtse8=$(dsl_val "$xtusesg" XTSE8) + + # Evaluate Annex (according to G.997.1, 7.3.1.1.1) + if [ $((xtse1 & 13)) != 0 \ + -o $((xtse2 & 1)) != 0 \ + -o $((xtse3 & 12)) != 0 \ + -o $((xtse4 & 3)) != 0 \ + -o $((xtse6 & 3)) != 0 \ + -o $((xtse8 & 1)) != 0 ]; then + annex_s=" A," + fi + + if [ $((xtse1 & 48)) != 0 \ + -o $((xtse2 & 2)) != 0 \ + -o $((xtse3 & 48)) != 0 \ + -o $((xtse6 & 12)) != 0 \ + -o $((xtse8 & 2)) != 0 ]; then + annex_s="$annex_s B," + fi + + if [ $((xtse1 & 194)) != 0 \ + -o $((xtse2 & 12)) != 0 \ + -o $((xtse8 & 4)) != 0 ]; then + annex_s="$annex_s C," + fi + + if [ $((xtse4 & 48)) != 0 \ + -o $((xtse5 & 3)) != 0 \ + -o $((xtse6 & 192)) != 0 ]; then + annex_s="$annex_s I," + fi + + if [ $((xtse4 & 192)) != 0 \ + -o $((xtse7 & 3)) != 0 ]; then + annex_s="$annex_s J," + fi + + if [ $((xtse5 & 60)) != 0 ]; then + annex_s="$annex_s L," + fi + + if [ $((xtse5 & 192)) != 0 \ + -o $((xtse7 & 12)) != 0 ]; then + annex_s="$annex_s M," + fi + + annex_s=`echo ${anne