Skip to content

Commit

Permalink
Merge commit 'lede-17.01' into release
Browse files Browse the repository at this point in the history
  • Loading branch information
dsteinmetzer committed Aug 9, 2018
2 parents e1b9444 + 28d4e55 commit b58ea02
Show file tree
Hide file tree
Showing 59 changed files with 229 additions and 134 deletions.
4 changes: 2 additions & 2 deletions include/kernel-version.mk
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
LINUX_RELEASE?=1

LINUX_VERSION-3.18 = .43
LINUX_VERSION-4.4 = .135
LINUX_VERSION-4.4 = .140

LINUX_KERNEL_HASH-3.18.43 = 1236e8123a6ce537d5029232560966feed054ae31776fe8481dd7d18cdd5492c
LINUX_KERNEL_HASH-4.4.135 = 03ccb008824e363d9f83245676b9e0602f604c880dd10577653f3328c37781dc
LINUX_KERNEL_HASH-4.4.140 = 184c8f3cde0caca0d2a15ee2b6ce47e3a5b57038bc15a65e631d6b340886c7bb

ifdef KERNEL_PATCHVER
LINUX_VERSION:=$(KERNEL_PATCHVER)$(strip $(LINUX_VERSION-$(KERNEL_PATCHVER)))
Expand Down
2 changes: 1 addition & 1 deletion include/package-ipkg.mk
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ $(_endef)
fi; \
done; $(Package/$(1)/extra_provides) \
) | sort -u > $(PKG_INFO_DIR)/$(1).provides
$(if $(PROVIDES),@for pkg in $(PROVIDES); do cp $(PKG_INFO_DIR)/$(1).provides $(PKG_INFO_DIR)/$$$$pkg.provides; done)
$(if $(PROVIDES),@for pkg in $(filter-out $(1),$(PROVIDES)); do cp $(PKG_INFO_DIR)/$(1).provides $(PKG_INFO_DIR)/$$$$pkg.provides; done)
$(CheckDependencies)

$(RSTRIP) $$(IDIR_$(1))
Expand Down
2 changes: 1 addition & 1 deletion package/base-files/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ include $(INCLUDE_DIR)/kernel.mk
include $(INCLUDE_DIR)/version.mk

PKG_NAME:=base-files
PKG_RELEASE:=173.7
PKG_RELEASE:=173.6
PKG_FLAGS:=nonshared

PKG_FILE_DEPENDS:=$(PLATFORM_DIR)/ $(GENERIC_PLATFORM_DIR)/base-files/
Expand Down
4 changes: 3 additions & 1 deletion package/base-files/files/etc/banner.failsafe
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ after mount_root:
* /etc/config directory with config files

for more help see:
http://wiki.openwrt.org/doc/howto/generic.failsafe
https://openwrt.org/docs/guide-user/troubleshooting/
- failsafe_and_factory_reset
- root_password_reset
=======================================================

13 changes: 8 additions & 5 deletions package/base-files/files/lib/functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -57,16 +57,16 @@ config () {
export ${NO_EXPORT:+-n} CONFIG_NUM_SECTIONS=$(($CONFIG_NUM_SECTIONS + 1))
name="${name:-cfg$CONFIG_NUM_SECTIONS}"
append CONFIG_SECTIONS "$name"
export ${NO_EXPORT:+-n} CONFIG_SECTION="$name"
config_set "$CONFIG_SECTION" "TYPE" "${cfgtype}"
[ -n "$NO_CALLBACK" ] || config_cb "$cfgtype" "$name"
export ${NO_EXPORT:+-n} CONFIG_SECTION="$name"
export ${NO_EXPORT:+-n} "CONFIG_${CONFIG_SECTION}_TYPE=$cfgtype"
}

option () {
local varname="$1"; shift
local value="$*"

config_set "$CONFIG_SECTION" "${varname}" "${value}"
export ${NO_EXPORT:+-n} "CONFIG_${CONFIG_SECTION}_${varname}=$value"
[ -n "$NO_CALLBACK" ] || option_cb "$varname" "$*"
}

Expand All @@ -81,7 +81,7 @@ list() {
config_set "$CONFIG_SECTION" "${varname}_ITEM$len" "$value"
config_set "$CONFIG_SECTION" "${varname}_LENGTH" "$len"
append "CONFIG_${CONFIG_SECTION}_${varname}" "$value" "$LIST_SEP"
[ -n "$NO_CALLBACK" ] || list_cb "$varname" "$*"
list_cb "$varname" "$*"
}

config_unset() {
Expand Down Expand Up @@ -113,8 +113,11 @@ config_set() {
local section="$1"
local option="$2"
local value="$3"
local old_section="$CONFIG_SECTION"

export ${NO_EXPORT:+-n} "CONFIG_${section}_${option}=${value}"
CONFIG_SECTION="$section"
option "$option" "$value"
CONFIG_SECTION="$old_section"
}

config_foreach() {
Expand Down
2 changes: 1 addition & 1 deletion package/kernel/mac80211/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=mac80211

PKG_VERSION:=2017-01-31
PKG_RELEASE:=4
PKG_RELEASE:=5
PKG_SOURCE_URL:=http://mirror2.openwrt.org/sources
PKG_BACKPORT_VERSION:=
PKG_HASH:=75e6d39e34cf156212a2509172a4a62b673b69eb4a1d9aaa565f7fa719fa2317
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
From 52a192362932f333a7ebafd581c4d9b81da2fec8 Mon Sep 17 00:00:00 2001
From: Stanislaw Gruszka <[email protected]>
Date: Mon, 28 May 2018 13:25:06 +0200
Subject: [PATCH] Revert "rt2800: use TXOP_BACKOFF for probe frames"

This reverts commit fb47ada8dc3c30c8e7b415da155742b49536c61e.

In some situations when we set TXOP_BACKOFF, the probe frame is
not sent at all. What it worse then sending probe frame as part
of AMPDU and can degrade 11n performance to 11g rates.

Cc: [email protected]
Signed-off-by: Stanislaw Gruszka <[email protected]>
Signed-off-by: Kalle Valo <[email protected]>
---
drivers/net/wireless/ralink/rt2x00/rt2x00queue.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/drivers/net/wireless/ralink/rt2x00/rt2x00queue.c b/drivers/net/wireless/ralink/rt2x00/rt2x00queue.c
index a6884e73d2ab..7ddee980048b 100644
--- a/drivers/net/wireless/ralink/rt2x00/rt2x00queue.c
+++ b/drivers/net/wireless/ralink/rt2x00/rt2x00queue.c
@@ -372,16 +372,15 @@ static void rt2x00queue_create_tx_descriptor_ht(struct rt2x00_dev *rt2x00dev,

/*
* Determine IFS values
- * - Use TXOP_BACKOFF for probe and management frames except beacons
+ * - Use TXOP_BACKOFF for management frames except beacons
* - Use TXOP_SIFS for fragment bursts
* - Use TXOP_HTTXOP for everything else
*
* Note: rt2800 devices won't use CTS protection (if used)
* for frames not transmitted with TXOP_HTTXOP
*/
- if ((ieee80211_is_mgmt(hdr->frame_control) &&
- !ieee80211_is_beacon(hdr->frame_control)) ||
- (tx_info->flags & IEEE80211_TX_CTL_RATE_CTRL_PROBE))
+ if (ieee80211_is_mgmt(hdr->frame_control) &&
+ !ieee80211_is_beacon(hdr->frame_control))
txdesc->u.ht.txop = TXOP_BACKOFF;
else if (!(tx_info->flags & IEEE80211_TX_CTL_FIRST_FRAGMENT))
txdesc->u.ht.txop = TXOP_SIFS;
--
2.17.1

2 changes: 1 addition & 1 deletion package/system/mtd/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/kernel.mk

PKG_NAME:=mtd
PKG_RELEASE:=21$(if $(SDK),,.1)
PKG_RELEASE:=23$(if $(SDK),,.1)

PKG_BUILD_DIR := $(KERNEL_BUILD_DIR)/$(PKG_NAME)
STAMP_PREPARED := $(STAMP_PREPARED)_$(call confvar,CONFIG_MTD_REDBOOT_PARTS)
Expand Down
49 changes: 36 additions & 13 deletions package/system/mtd/src/trx.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,12 @@ struct trx_header {
uint32_t offsets[3]; /* Offsets of partitions from start of header */
};

#define min(x,y) ({ \
typeof(x) _x = (x); \
typeof(y) _y = (y); \
(void) (&_x == &_y); \
_x < _y ? _x : _y; })

#if __BYTE_ORDER == __BIG_ENDIAN
#define STORE32_LE(X) ((((X) & 0x000000FF) << 24) | (((X) & 0x0000FF00) << 8) | (((X) & 0x00FF0000) >> 8) | (((X) & 0xFF000000) >> 24))
#elif __BYTE_ORDER == __LITTLE_ENDIAN
Expand Down Expand Up @@ -156,7 +162,7 @@ mtd_fixtrx(const char *mtd, size_t offset, size_t data_size)
int fd;
struct trx_header *trx;
char *first_block;
char *buf;
char *buf, *to;
ssize_t res;
size_t block_offset;

Expand Down Expand Up @@ -201,23 +207,41 @@ mtd_fixtrx(const char *mtd, size_t offset, size_t data_size)
exit(1);
}

if (trx->len == STORE32_LE(data_size + TRX_CRC32_DATA_OFFSET)) {
if (quiet < 2)
fprintf(stderr, "Header already fixed, exiting\n");
close(fd);
return 0;
}

buf = malloc(data_size);
if (!buf) {
perror("malloc");
exit(1);
}

res = pread(fd, buf, data_size, data_offset);
if (res != data_size) {
perror("pread");
exit(1);
to = buf;
while (data_size) {
size_t read_block_offset = data_offset & ~(erasesize - 1);
size_t read_chunk;

read_chunk = erasesize - (data_offset & (erasesize - 1));
read_chunk = min(read_chunk, data_size);

/* Read from good blocks only to match CFE behavior */
if (!mtd_block_is_bad(fd, read_block_offset)) {
res = pread(fd, to, read_chunk, data_offset);
if (res != read_chunk) {
perror("pread");
exit(1);
}
to += read_chunk;
}

data_offset += read_chunk;
data_size -= read_chunk;
}
data_size = to - buf;

if (trx->len == STORE32_LE(data_size + TRX_CRC32_DATA_OFFSET) &&
trx->crc32 == STORE32_LE(crc32buf(buf, data_size))) {
if (quiet < 2)
fprintf(stderr, "Header already fixed, exiting\n");
close(fd);
return 0;
}

trx->len = STORE32_LE(data_size + offsetof(struct trx_header, flag_version));
Expand All @@ -244,4 +268,3 @@ mtd_fixtrx(const char *mtd, size_t offset, size_t data_size)
return 0;

}

5 changes: 3 additions & 2 deletions package/system/uci/files/lib/config/uci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -118,9 +118,10 @@ uci_add() {
uci_rename() {
local PACKAGE="$1"
local CONFIG="$2"
local VALUE="$3"
local OPTION="$3"
local VALUE="$4"

/sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} rename "$PACKAGE.$CONFIG=$VALUE"
/sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} rename "$PACKAGE.$CONFIG${VALUE:+.$OPTION}=${VALUE:-$OPTION}"
}

uci_remove() {
Expand Down
17 changes: 17 additions & 0 deletions scripts/bundle-libraries.sh
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,11 @@ _runas_so() {
return 0;
}
#ifdef __APPLE__
__attribute__((section("__DATA,__mod_init_func")))
#else
__attribute__((section(".init_array")))
#endif
static void *mangle_arg0_constructor = &mangle_arg0;
EOT

Expand All @@ -97,6 +101,18 @@ _runas_so() {
}
}

_patch_ldso() {
_cp "$1" "$1.patched"
sed -i -e 's,/\(usr\|lib\|etc\)/,/###/,g' "$1.patched"

if "$1.patched" 2>&1 | grep -q -- --library-path; then
_mv "$1.patched" "$1"
else
echo "binary patched ${1##*/} not executable, using original" >&2
rm -f "$1.patched"
fi
}

for LDD in ${PATH//://ldd }/ldd; do
"$LDD" --version >/dev/null 2>/dev/null && break
LDD=""
Expand Down Expand Up @@ -135,6 +151,7 @@ for BIN in "$@"; do
[ -f "$token" -a ! -f "$dest" ] && {
_md "$ddir"
_cp "$token" "$dest"
[ -n "$LDSO" ] && _patch_ldso "$dest"
}
;; esac
done
Expand Down
1 change: 1 addition & 0 deletions target/linux/apm821xx/config-4.4
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ CONFIG_BOOKE_WDT=y
CONFIG_BOUNCE=y
# CONFIG_CANYONLANDS is not set
# CONFIG_IKAREM is not set
# CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE is not set
CONFIG_CC_OPTIMIZE_FOR_SIZE=y
CONFIG_CLONE_BACKWARDS=y
CONFIG_CMDLINE="rootfstype=squashfs noinitrd"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ Signed-off-by: Jacek Anaszewski <[email protected]>
#include <linux/pm_runtime.h>
#include <linux/platform_device.h>

@@ -4945,6 +4946,9 @@ void ata_qc_complete(struct ata_queued_c
@@ -4942,6 +4943,9 @@ void ata_qc_complete(struct ata_queued_c
{
struct ata_port *ap = qc->ap;

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
--- a/drivers/dma/dw/core.c
+++ b/drivers/dma/dw/core.c
@@ -150,6 +150,8 @@ static void dwc_initialize(struct dw_dma
cfghi |= DWC_CFGH_DST_PER(dwc->dst_id);
cfghi |= DWC_CFGH_SRC_PER(dwc->src_id);

+ cfghi |= DWC_CFGH_PROTCTL(3); /* bufferable + privileged access */
+
channel_writel(dwc, CFG_LO, cfglo);
channel_writel(dwc, CFG_HI, cfghi);

@@ -1539,11 +1541,8 @@ int dw_dma_probe(struct dw_dma_chip *chi
else
list_add(&dwc->chan.device_node, &dw->dma.channels);

- /* 7 is highest priority & 0 is lowest. */
- if (pdata->chan_priority == CHAN_PRIORITY_ASCENDING)
- dwc->priority = pdata->nr_channels - i - 1;
- else
- dwc->priority = i;
+ /* set all channels to the same priority */
+ dwc->priority = pdata->nr_channels - 1;

dwc->ch_regs = &__dw_regs(dw)->CHAN[i];
spin_lock_init(&dwc->lock);
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,18 @@ ath10kcal_extract() {
local part=$1
local offset=$2
local count=$3
local mtd
local mtd cal_size

mtd=$(find_mtd_chardev $part)
[ -n "$mtd" ] || \
ath10kcal_die "no mtd device found for partition $part"

# Check that the calibration data size in header equals the desired size
cal_size=$(dd if=$mtd bs=2 count=1 skip=$(( $offset / 2 )) conv=swab 2>/dev/null | hexdump -ve '1/2 "%d"')

[ "$count" = "$cal_size" ] || \
ath10kcal_die "no calibration data found in $part"

dd if=$mtd of=/lib/firmware/$FIRMWARE bs=1 skip=$offset count=$count 2>/dev/null || \
ath10kcal_die "failed to extract calibration data from $mtd"
}
Expand Down
1 change: 1 addition & 0 deletions target/linux/ar71xx/config-4.4
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,7 @@ CONFIG_ATH79_NVRAM=y
CONFIG_ATH79_PCI_ATH9K_FIXUP=y
# CONFIG_ATH79_ROUTERBOOT is not set
CONFIG_ATH79_WDT=y
# CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE is not set
CONFIG_CC_OPTIMIZE_FOR_SIZE=y
CONFIG_CEVT_R4K=y
CONFIG_CLKDEV_LOOKUP=y
Expand Down
Loading

0 comments on commit b58ea02

Please sign in to comment.