Skip to content
Snippets Groups Projects
  1. Mar 29, 2017
  2. Mar 28, 2017
    • Yousong Zhou's avatar
      firewall: document rules for IPSec ESP/ISAKMP with 'name' option · 8fb39f16
      Yousong Zhou authored
      
      These are recommended practices by REC-22 and REC-24 of RFC6092:
      "Recommended Simple Security Capabilities in Customer Premises Equipment
      (CPE) for Providing Residential IPv6 Internet Service"
      
      Fixes FS#640
      
      Signed-off-by: default avatarYousong Zhou <yszhou4tech@gmail.com>
      8fb39f16
    • Thomas Reifferscheid's avatar
      ipq8064: fix dwc3-of-simple module unloading · 17f60b1c
      Thomas Reifferscheid authored
      Without patch unloading the dwc3-of-simple module went stuck after
      successfully removing hcd.1 during the hcd.0 removal:
      
      root@LEDE:/# rmmod dwc3-of-simple
      [   21.391846] xhci-hcd xhci-hcd.1.auto: remove, state 1
      [   21.391931] usb usb4: USB disconnect, device number 1
      [   21.397038] xhci-hcd xhci-hcd.1.auto: USB bus 4 deregistered
      [   21.401111] xhci-hcd xhci-hcd.1.auto: remove, state 1
      [   21.406685] usb usb3: USB disconnect, device number 1
      [   21.412848] xhci-hcd xhci-hcd.1.auto: USB bus 3 deregistered
      [   21.417248] xhci-hcd xhci-hcd.0.auto: remove, state 1
      [   21.422521] usb usb2: USB disconnect, device number 1
      followed by nothing.
      
      Sometimes a stall CPU was detected, or a kernel panic,
      or a reboot occurred after a couple of minutes.
      
      At the same time unloading the dwc3 module followed by dwc3-of-simple
      module was working repeatedly.
      
      root@LEDE:/# rmmod dwc3
      [   53.827328] xhci-hcd xhci-hcd.1.auto: remove, state 1
      [   53.827412] usb usb4: USB disconnect, device number 1
      [   53.832630] xhci-hcd xhci-hcd.1.auto: USB bus 4 deregistered
      [   53.836452] xhci-hcd xhci-hcd.1.auto: remove, state 1
      [   53.842314] usb usb3: USB disconnect, device number 1
      [   53.848412] xhci-hcd xhci-hcd.1.auto: USB bus 3 deregistered
      [   53.852542] xhci-hcd xhci-hcd.0.auto: remove, state 1
      [   53.857882] usb usb2: USB disconnect, device number 1
      [   53.863956] xhci-hcd xhci-hcd.0.auto: USB bus 2 deregistered
      [   53.867875] xhci-hcd xhci-hcd.0.auto: remove, state 1
      [   53.873696] usb usb1: USB disconnect, device number 1
      [   53.879742] xhci-hcd xhci-hcd.0.auto: USB bus 1 deregistered
      root@LEDE:/# rmmod dwc3-of-simple
      root@LEDE:/#
      
      For the non-working case, the code was stuck in a readl() in
      http://lxr.free-electrons.com/source/drivers/usb/host/xhci.c#L91
      because
      http://lxr.free-electrons.com/source/drivers/usb/dwc3/dwc3-of-simple.c#L126
      was disabling the wrong clocks when removing hcd.1 (it was disabling
      the clock of hcd.0). That's why the readl() went stuck when removing
      hcd.0
      
      The patch however addresses the clock assignment from the .dtsi
      file. Most probably it went into openwrt here:
      https://dev.openwrt.org/browser/trunk/target/linux/ipq806x/patches-3.18/101-ARM-qcom-add-USB-nodes-to-ipq806x-ap148.patch?rev=45261
      copied from Qualcomms attempt here: https://lkml.org/lkml/2015/11/20/116
      
      
      
      Now unloading and repeated module loading is working just fine,
      no matter if you'd remove dwc3-of-simple or dwc3.
      
      root@LEDE:/# rmmod dwc3-of-simple
      [   24.089679] xhci-hcd xhci-hcd.1.auto: remove, state 1
      [   24.089765] usb usb4: USB disconnect, device number 1
      [   24.094856] xhci-hcd xhci-hcd.1.auto: USB bus 4 deregistered
      [   24.098963] xhci-hcd xhci-hcd.1.auto: remove, state 1
      [   24.104522] usb usb3: USB disconnect, device number 1
      [   24.111194] xhci-hcd xhci-hcd.1.auto: USB bus 3 deregistered
      [   24.115086] xhci-hcd xhci-hcd.0.auto: remove, state 1
      [   24.120396] usb usb2: USB disconnect, device number 1
      [   24.126503] xhci-hcd xhci-hcd.0.auto: USB bus 2 deregistered
      [   24.130347] xhci-hcd xhci-hcd.0.auto: remove, state 1
      [   24.135948] usb usb1: USB disconnect, device number 1
      [   24.142085] xhci-hcd xhci-hcd.0.auto: USB bus 1 deregistered
      root@LEDE:/#
      
      Fixes: dwc3-of-simple module unloading
      
      Signed-off-by: default avatarThomas Reifferscheid <thomas@reifferscheid.org>
      17f60b1c
    • Thomas Reifferscheid's avatar
      ipq8064: Fix dwc3 module unloading · c75f059b
      Thomas Reifferscheid authored
      
      Allow module unloading by fixing a mistake.
      qcom_dwc3_phy_write_readback() is expecting (phy, offset, mask, value)
      while the mistake was calling it with       (phy, offset, value, mask)
      
      The patch is swapping value and mask.
      
      Without the patch unloading the dwc3 module was showing a
      write to QSCRATCH failed and repeated module loading was
      failing:
      
      root@LEDE:/# rmmod dwc3
      [   19.167998] xhci-hcd xhci-hcd.1.auto: remove, state 1
      [   19.168084] usb usb4: USB disconnect, device number 1
      [   19.173371] xhci-hcd xhci-hcd.1.auto: USB bus 4 deregistered
      [   19.177134] xhci-hcd xhci-hcd.1.auto: remove, state 1
      [   19.182960] usb usb3: USB disconnect, device number 1
      [   19.189023] xhci-hcd xhci-hcd.1.auto: USB bus 3 deregistered
      [   19.192989] qcom-dwc3-usb-phy 110f8830.phy: write: 8000000 to QSCRATCH: 0 FAILED
      [   19.199064] xhci-hcd xhci-hcd.0.auto: remove, state 1
      [   19.205912] usb usb2: USB disconnect, device number 1
      [   19.211611] xhci-hcd xhci-hcd.0.auto: USB bus 2 deregistered
      [   19.215905] xhci-hcd xhci-hcd.0.auto: remove, state 1
      [   19.221751] usb usb1: USB disconnect, device number 1
      [   19.227307] xhci-hcd xhci-hcd.0.auto: USB bus 1 deregistered
      [   19.231795] qcom-dwc3-usb-phy 100f8830.phy: write: 8000000 to QSCRATCH: 0 FAILED
      root@LEDE:/# modprobe dwc3
      [   29.583343] phy phy-100f8830.phy.4: phy init failed --> -110
      [   29.583399] dwc3 10000000.dwc3: failed to initialize core
      [   29.588169] dwc3: probe of 10000000.dwc3 failed with error -110
      [   29.652943] phy phy-110f8830.phy.2: phy init failed --> -110
      [   29.652988] dwc3 11000000.dwc3: failed to initialize core
      [   29.657735] dwc3: probe of 11000000.dwc3 failed with error -110
      root@LEDE:/#
      
      With patch repeated module unloading and loading is working good:
      root@LEDE:/# rmmod dwc3
      [   22.622214] xhci-hcd xhci-hcd.1.auto: remove, state 1
      [   22.622298] usb usb4: USB disconnect, device number 1
      [   22.627401] xhci-hcd xhci-hcd.1.auto: USB bus 4 deregistered
      [   22.631492] xhci-hcd xhci-hcd.1.auto: remove, state 1
      [   22.637054] usb usb3: USB disconnect, device number 1
      [   22.643721] xhci-hcd xhci-hcd.1.auto: USB bus 3 deregistered
      [   22.647421] xhci-hcd xhci-hcd.0.auto: remove, state 1
      [   22.652910] usb usb2: USB disconnect, device number 1
      [   22.659219] xhci-hcd xhci-hcd.0.auto: USB bus 2 deregistered
      [   22.662768] xhci-hcd xhci-hcd.0.auto: remove, state 1
      [   22.668604] usb usb1: USB disconnect, device number 1
      [   22.674803] xhci-hcd xhci-hcd.0.auto: USB bus 1 deregistered
      root@LEDE:/# modprobe dwc3
      [   25.404592] xhci-hcd xhci-hcd.0.auto: xHCI Host Controller
      [   25.404694] xhci-hcd xhci-hcd.0.auto: new USB bus registered, assigned bus number 1
      [   25.409444] xhci-hcd xhci-hcd.0.auto: hcc params 0x0228f065 hci version 0x100 quirks 0x00010010
      [   25.416589] xhci-hcd xhci-hcd.0.auto: irq 168, io mem 0x10000000
      [   25.426509] hub 1-0:1.0: USB hub found
      [   25.431626] hub 1-0:1.0: 1 port detected
      [   25.435472] xhci-hcd xhci-hcd.0.auto: xHCI Host Controller
      [   25.439206] xhci-hcd xhci-hcd.0.auto: new USB bus registered, assigned bus number 2
      [   25.444573] usb usb2: We don't know the algorithms for LPM for this host, disabling LPM.
      [   25.452926] hub 2-0:1.0: USB hub found
      [   25.460420] hub 2-0:1.0: 1 port detected
      [   25.525037] xhci-hcd xhci-hcd.1.auto: xHCI Host Controller
      [   25.525099] xhci-hcd xhci-hcd.1.auto: new USB bus registered, assigned bus number 3
      [   25.529750] xhci-hcd xhci-hcd.1.auto: hcc params 0x0228f065 hci version 0x100 quirks 0x00010010
      [   25.537002] xhci-hcd xhci-hcd.1.auto: irq 169, io mem 0x11000000
      [   25.546583] hub 3-0:1.0: USB hub found
      [   25.551997] hub 3-0:1.0: 1 port detected
      [   25.555734] xhci-hcd xhci-hcd.1.auto: xHCI Host Controller
      [   25.559621] xhci-hcd xhci-hcd.1.auto: new USB bus registered, assigned bus number 4
      [   25.564942] usb usb4: We don't know the algorithms for LPM for this host, disabling LPM.
      [   25.573063] hub 4-0:1.0: USB hub found
      [   25.580842] hub 4-0:1.0: 1 port detected
      root@LEDE:/#
      
      Fixes: dwc3 module unloading
      
      Signed-off-by: default avatarThomas Reifferscheid <thomas@reifferscheid.org>
      c75f059b
    • Hannu Nyman's avatar
      mac80211: ath10k: allow failure getting board id via otp · c69a89fe
      Hannu Nyman authored
      
      ath10k tries to fetch board id via otp, but that fails for many chips
      like QCA988x, QCA9984 etc. Recent commit cc189c0b removed the earlier
      hack that had allowed QCA radios to work, as that hack was incompatible
      with the new wifi chips being introduced to the source tree.
      
      Restore functionality for the existing wifi chips by modifying the
      return value of the 'board id via otp' function to a value that is recognised
      as a harmless error, so that name evaluation continues by using the board file.
      
      Patch originally suggested by Christian Lamparter in forum discussion.
      
      Signed-off-by: default avatarHannu Nyman <hannu.nyman@iki.fi>
      c69a89fe
    • John Crispin's avatar
      0f4600c2
  3. Mar 27, 2017
  4. Mar 26, 2017
  5. Mar 25, 2017
  6. Mar 24, 2017
  7. Mar 23, 2017
    • Piotr Dymacz's avatar
      ar71xx: image: fix indentation · 597c9f0b
      Piotr Dymacz authored
      
      Signed-off-by: default avatarPiotr Dymacz <pepe2k@gmail.com>
      597c9f0b
    • Piotr Dymacz's avatar
      ar71xx: add support for P&W R602N and CPE505N · 4436979c
      Piotr Dymacz authored
      
      P&W (full name: Shenzhen Progress&Win Technologies) R602N (could be also
      labeled as R602F, R602, etc.) is a simple N300 router with 5-port
      10/100 Mbps switch, non-detachable antennas and USB.
      
      CPE505 is an outdoor CPE with PoE support and detachable antennas.
      
      Both devices are based on Qualcomm/Atheros QCA9531 v2.
      
      Common specification:
      
      - 650/597/216 MHz (CPU/DDR/AHB)
      - 64 MB of RAM (DDR2)
      - 16 MB of FLASH
      - UART (J2) header on PCB
      
      R602N specification:
      
      - 5x 10/100 Mbps Ethernet
      - 1x USB 2.0
      - 2T2R 2.4 GHz with external LNA and PA (SE2576L), up to 28 dBm
      - 2x external, non-detachable antennas
      - 7x LED, 1x button
      
      CPE505N specification:
      
      - 2x 10/100 Mbps Ethernet (both ports support passive PoE 12-24 V)
      - 2T2R 2.4 GHz with external LNA and PA (SKY65174-21), up to 30 dBm
      - 2x external, detachable antennas (RP-SMA connectors)
      - 1x RGB LED, 2x LEDs (in RJ45 sockets), 1x button
      
      Flash instructions:
      
      It seems that there are many different versions of the firmware which
      these devices are shipped with. The generic/standard one is based on
      some modified OpenWrt and LEDE firmware can be flashed directly from
      vendor's webgui or with sysupgrade (root password is "admin123").
      
      Before flashing, make sure (use "fw_printenv") that the kernel load
      address in your device is set to "0x9f050000" (bootcmd variable is
      "bootm 0x9f050000"). If your device uses different load address, you
      should first change it, under vendor's firmware, with command:
      
      fw_setenv bootcmd "bootm 0x9f050000 || bootm OLD_ADDRESS"
      
      Where OLD_ADDRESS is previous kernel load address (in CPE505 version
      I got access to, it was "0x9fe80000"). This will allow you to use
      both the vendor's and LEDE firmware.
      
      If version of your device contains empty U-Boot environment (you will
      get information about this after issuing "fw_printenv"), you should
      use U-Boot, serial line access and TFTP to perform firmware upgrade:
      
      1. tftp 0x80060000 lede-ar71xx-generic-...-squashfs-sysupgrade.bin
      2. erase 0x9f050000 +$filesize
      3. cp.b $fileaddr 0x9f050000 $filesize
      4. setenv bootcmd "bootm 0x9f050000 || bootm OLD_ADDRESS"
      5. saveenv && reset
      
      These devices contain also web recovery mode inside U-Boot. It can be
      started with pressing the reset button for around 3 seconds just after
      the device powerup. Web recovery panel is available on "192.168.10.9"
      and to be able to use it, IP on your PC must be set to "192.168.10.10".
      
      Make sure to change kernel load address before using recovery mode or
      the U-Boot will not be able to load LEDE firmware.
      
      Signed-off-by: default avatarPiotr Dymacz <pepe2k@gmail.com>
      4436979c
    • Vaclav Svoboda's avatar
      ar71xx: add support for TP-LINK TL-WR840N v2 and v3 · 0d9adb48
      Vaclav Svoboda authored
      
      This patch adds support for the TP-LINK TL-WR840N v2 and v3.
      
      - SoC: Qualcomm QCA9533-BL3A (650 MHz)
      - RAM: 32 MiB (Zentel A3S56D40GTP)
      - Flash: 4 MiB
         (v2: Macronix MX 25L323F)
         (v3: Winbond 25Q32FVSIG)
      - LAN: 4x 100M
      - WAN: 1x 100M
      
      Signed-off-by: default avatarVaclav Svoboda <svoboda@neng.cz>
      0d9adb48
    • Ryan Mounce's avatar
      ar71xx: add support for MikroTik hAP ac · 97899862
      Ryan Mounce authored
      
      This patch adds initial support for the MikroTik RouterBOARD hAP ac
      (RB962UiGS-5HacT2HnT).
      
      All functions are supported except:
      -SFP cage (eth1) is not working
      -WLAN LEDs are not working
      
      Signed-off-by: default avatarRyan Mounce <ryan@mounce.com.au>
      97899862
    • Ryan Mounce's avatar
      ar71xx: add support for MikroTik hAP ac lite · 540edf70
      Ryan Mounce authored
      
      This patch adds support for the MikroTik RouterBOARD hAP ac lite
      (RB952Ui-5ac2nD).
      
      The hAP ac lite is nearly identical to the hAP, with an added QCA9887
      5GHz radio. The 2.4GHz radio ID is also changed in the hAP ac lite.
      
      Signed-off-by: default avatarRyan Mounce <ryan@mounce.com.au>
      540edf70
Loading