Fix memory leak on nvram_open() and nvram_open_rdonly().
For nvram_open(), the 'fd' should be closed on error, and
mmap_area should be unmap when nvram magic can not be found.
For nvram_open_rdonly(), the 'file' variable should free before
return. Once nvram_find_mtd() return successfully, it will allocate
memory to save mtd device string.
Signed-off-by: BangLang Huang <banglang.huang@foxmail.com>
get platform_data from gpio_keys_button_dev.pdata, and fix a illegal pointer
dereference like this:
[ 51.143776] gpio-keys-polled gpio-keys-polled: missing poll_interval value
[ 51.150852] gpio-keys-polled: probe of gpio-keys-polled failed with error -22
[ 828.159993] gpio-keys-polled gpio-keys-polled: no memory for button data
[ 828.166821] gpio-keys-polled: probe of gpio-keys-polled failed with error -12
Signed-off-by: Furong Xu <xfr@outlook.com>
Backing up the current firmware from U-Boot over serial can take hours.
Booting a working Linux image for backup purposes is not always an option.
Using the tftpput command in U-Boot is the fastest and easiest way.
tftpput will upload the contents of a memory region to the TFTP server.
The IP address of the server is stored in the serverip variable.
Usage:
tftpput <memaddr> <length> <filename>
Example for a complete flash backup of an o2 Box 6431 (VGV7510KW22):
VGV7510KW22 # tftpput 0xB0000000 0x1000000 o2boxbackup.bin
Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
The Gateworks System Controller (GSC) mimics a standard AD7418 device on
I2C bus 0 at slave 0x29.
Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
Refresh patches.
Adapt 704-phy-no-genphy-soft-reset.patch.
Remove brcm2708/950-0005-mm-Remove-the-PFN-busy-warning.patch.
Compile-tested on brcm2708/bcm2708 and x86/64.
Runtime-tested on brcm2708/bcm2708 and x86/64.
Fixes the following vulnerabilities:
- CVE-2017-7533
- CVE-2017-1000111
- CVE-2017-1000112
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
94e65ee ndp: use IPv4 address list when comparing IPv4 addresses
ff5020d dhcpv6-ia: rework reconfigure accept logic
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
The VoCore2 Lite uses the same PCB as the Vocore2.
This patch moves the common VoCore2 parts into dtsi.
Removed memory node in the device tree source file.
Memory is detected automatically.
http://vocore.io/http://vonger.net/http://vonger.cn/
Specifications:
- SoC: MediaTek MT7688AN
- RAM: 64MB DDR2 EtronTech EM68B16CWQH-25H
- Flash: 8MB NOR SPI Flash GigaDevice GD25Q64CWIG
- Wireless: Built into MT7688AN with onboard IPEX connector
Firmware installation:
- VoCore2-Lite ships with firmware forked from OpenWrt.
- Installation from the bootloader is recommended.
- If using luci/sysupgrade use the -n option (do not keep settings)
original firmware uses a modified proprietary MediaTek wireless driver.
- The wireless is disabled by default in LEDE.
- If reverting to factory firmware using the bootloader is recommended.
Signed-off-by: L. D. Pinney <ldpinney@gmail.com>
Tested by: Noble Pepper <noblepepper@gmail.com>
By adding the ICPlus IP1001 phy driver an already set RGMII delay mode
is reset during driver load.
Set the rgmii rx delay to fix corrupt/no packages in case the WAN port
negotiates to 1000MBit.
Fixes: FS#670
Signed-off-by: Mathias Kresin <dev@kresin.me>
While debugging an issue with a client device, wpa_supplicant did not
seem to log anything at all. Make wpa_supplicant log to syslog instead
of stdout, to make debugging easier and to be consistent with hostapd.
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
Update (lib)expat to 2.2.3
Remove poor entropy hack, 2.2.3 uses /dev/urandom in worst case
Signed-off-by: Daniel Engberg <daniel.engberg.lists@pyret.net>
USB doesn't work in some danube boards because otg_cap
is missing since previous changes made on the USB-dwc2
lantiq driver. Fix it.
Tested on the ARV7518PW router.
Signed-off-by: Daniel Gonzalez Cabanelas <dgcbueu@gmail.com>
With failsafe disabled there is no point in early network setup. We
don't send announcement over UDP and there is no way to ssh to the
device.
A side effect of this is avoiding a possibly incorrect network config
(only with failsafe disabled). This problem is related to possible
changes made by user in /etc/config/network.
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
By default the wlan eprom contains the generic ralink MAC which is not
the vendor (TP-Link) one. Based on OFW bootlog, it appears that addresses
are decremented from the ethernet MAC.
This patch fixes the MAC address for wlan2g in line with OFW.
Signed-off-by: Thibaut VARENE <hacks@slashdirt.org>
If xfer_mode is set to auto the vdsl_cpe_control daemon assumes that
ATM should be used for ADSL and PTM for VDSL.
Signed-off-by: Martin Schiller <ms@dev.tdt.de>
If xfer_mode is set to auto the vdsl_cpe_control daemon assumes that
ATM should be used for ADSL and PTM for VDSL.
xfer_mode and line_mode can be set to fixed value independantly from
each other.
The syntax for the tc_layer argument of vdsl_cpe_control is as follow:
-T<TcADSL>:<TcCfgUsADSL>:<TcCfgDsADSL>_<TcVDSL>:<TcCfgUsVDSL>:<TcCfgDsVDSL>
where TcADSL and TcVDSL can be: 1=ATM, 2=PTM/EFM, 4=Auto TC-Layer
and TcCfgUsADSL, TcCfgUsVDSL, TcCfgDsADSL, TcCfgDsVDSL can be:
1=64/65-octet encapsulation supported
2=64/65-octet encapsulation with pre-emption
3=64/65-octet encapsulation with short packets
Default: In case of no '-T' option is given, ADSL will be configured
in ATM and VDSL in PTM/EFM: -T1:0x1:0x1_2:0x1:0x1
The '-M' argument of dsl_cpe_control defines the initial DSL mode
(NextMode) for ADSL/VDSL multimode handling.
Possible Values: 0=API-default, 1=ADSL, 2=VDSL
Default: In case of no '-M' option is given, '0' (API-default) will
be selected.
Signed-off-by: Martin Schiller <ms@dev.tdt.de>
This is needed to be able to load the ltq-atm/ltq-ptm driver
from a notify script during synchronization, because the line can
reach showtime state before the driver is fully loaded.
Signed-off-by: Martin Schiller <ms@dev.tdt.de>
This makes it possible to simply add additional notification handlers
by putting new scripts in the /etc/hotplug.d/dsl directory.
the following Environment Variables are used:
(values marked with an * are only available when bonding support is
compiled in)
DSL_NOTIFICATION_TYPE with one of these values:
- DSL_STATUS
- DSL_INTERFACE_STATUS
- DSL_DATARATE_STATUS_US
- DSL_DATARATE_STATUS_DS
DSL_LINE_NUMBER=<0|1> *
If DSL_NOTIFICATION_TYPE == DSL_STATUS, these variables are set:
- DSL_XTU_STATUS=<ADSL|VDSL>
- DSL_TC_LAYER_STATUS=<ATM|EFM>
- DSL_EFM_TC_CONFIG_US=<NORMAL|PRE_EMPTION>
- DSL_EFM_TC_CONFIG_DS=<NORMAL>
If DSL_NOTIFICATION_TYPE == DSL_INTERFACE_STATUS, these variables are
set:
- DSL_INTERFACE_STATUS=<DOWN|READY|HANDSHAKE|TRAINING|UP>
- DSL_BONDING_STATUS=<INACTIVE|ACTIVE> *
If DSL_NOTIFICATION_TYPE == DSL_DATARATE_STATUS_US, these variables are
set:
- DSL_DATARATE_US_BC0=<Upstream data rate in bit/s for Channel 0>
- DSL_DATARATE_US_BC1=<Upstream data rate in bit/s for Channel 1> *
If DSL_NOTIFICATION_TYPE == DSL_DATARATE_STATUS_DS, these variables are
set:
- DSL_DATARATE_DS_BC0=<Downstream data rate in bit/s for Channel 0>
- DSL_DATARATE_DS_BC1=<Downstream data rate in bit/s for Channel 1> *
Signed-off-by: Martin Schiller <ms@dev.tdt.de>
The esi call was added to workaround a race condition between applying
a configured mac address to the wan interface and starting the protocol
(handler) as it was observed in a DHCP over ATM bridge configuration.
Martin Schiller, TDT GmbH was so kind to test with their local
infrastructure if the race condition still exists. The provided package
dumps captured behind the DSLAM shows that it doesn't. It was most
likely fixed with adding carrier support to the lantiq ptm/atm driver.
Signed-off-by: Mathias Kresin <dev@kresin.me>
Fix when add 'mediatek,cd-poll' to dts cause the sd card be removed randomly.
Special for the device without card-detect pin.
Signed-off-by: Qin Wie <me@vonger.cn>
296b4a0 dhcpv6: assign all viable DHCPv6 addresses by default (FS#402, FS#524)
f4d38e0 treewide: reflect managed mode is related to RA
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
Use the GPIO dt-bindings macros and add compatible strings in the
ramips device tree source files.
Signed-off-by: L. D. Pinney <ldpinney@gmail.com>
Signed-off-by: Mathias Kresin <dev@kresin.me>