diff --git a/.github/ISSUE_TEMPLATE/enhancement.md b/.github/ISSUE_TEMPLATE/enhancement.md new file mode 100644 index 00000000..c49f9c4c --- /dev/null +++ b/.github/ISSUE_TEMPLATE/enhancement.md @@ -0,0 +1,17 @@ +--- +name: Enhancement +about: Suggest enhancements +labels: enhancement +--- + +**Is your enhancement proposal related to a problem? Please describe.** + + +**Describe the solution you'd like** + + +**Describe alternatives you've considered** + + +**Additional context** + diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 00000000..d8dca141 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,20 @@ +--- +name: Feature request +about: Suggest an idea for this project +title: '' +labels: feature request +assignees: '' + +--- + +**Is your feature request related to a problem? Please describe.** + + +**Describe the solution you'd like** + + +**Describe alternatives you've considered** + + +**Additional context** + diff --git a/.github/ISSUE_TEMPLATE/hardware_support.md b/.github/ISSUE_TEMPLATE/hardware_support.md new file mode 100644 index 00000000..a83d685f --- /dev/null +++ b/.github/ISSUE_TEMPLATE/hardware_support.md @@ -0,0 +1,17 @@ +--- +name: Hardware Support +about: Suggest adding hardware support +title: '' +labels: hardware support +assignees: '' + +--- + +**Is this request related to a missing driver support for a particular hardware platform, SoC or board? Please describe.** + + +**Describe why you are asking for this support?** + + +**Additional context** + diff --git a/.github/ISSUE_TEMPLATE/help.md b/.github/ISSUE_TEMPLATE/help.md new file mode 100644 index 00000000..bf7391fe --- /dev/null +++ b/.github/ISSUE_TEMPLATE/help.md @@ -0,0 +1,22 @@ +--- +name: Help wanted +about: Help needed for configuration/installation of OpenMPTCProuter +labels: help wanted +--- + + +## Expected Behavior + + + +## Current Behavior + + + +## Specifications + + - OpenMPTCProuter version: + - OpenMPTCProuter VPS version: + - OpenMPTCProuter platform: + + \ No newline at end of file diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE/issue.md similarity index 80% rename from .github/ISSUE_TEMPLATE.md rename to .github/ISSUE_TEMPLATE/issue.md index 2c2952c1..f2903e8e 100644 --- a/.github/ISSUE_TEMPLATE.md +++ b/.github/ISSUE_TEMPLATE/issue.md @@ -1,3 +1,10 @@ +--- +name: Bug report +about: Create a report to help us improve OpenMPTCProuter +labels: bug +--- + + ## Expected Behavior diff --git a/.github/ISSUE_TEMPLATE/question.md b/.github/ISSUE_TEMPLATE/question.md new file mode 100644 index 00000000..3f48b699 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/question.md @@ -0,0 +1,5 @@ +--- +name: Create a question +about: Ask a question +labels: question +--- diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml new file mode 100644 index 00000000..0df84802 --- /dev/null +++ b/.github/workflows/stale.yml @@ -0,0 +1,20 @@ +name: Mark stale issues and pull requests + +on: + push: + schedule: + - cron: "0 19 * * *" + +jobs: + stale: + runs-on: ubuntu-latest + steps: + - uses: actions/stale@v3.0.10 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + stale-issue-message: "This issue is stale because it has been open 120 days with no activity. Remove stale label or comment or this will be closed in 5 days" + stale-pr-message: 'It has been open 120 days with no activity. Remove stale label or comment or this will be closed in 5 days' + days-before-stale: 120 + days-before-close: 5 + exempt-issue-labels: 'work-in-progress,enhancement' + exempt-pr-labels: 'work-in-progress,enhancement' diff --git a/README.md b/README.md index c8f4068d..a332c0a9 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -[![CircleCI](https://circleci.com/gh/Ysurac/openmptcprouter-feeds.svg?style=svg)](https://circleci.com/gh/Ysurac/openmptcprouter-feeds) +![openmptcprouter](https://github.com/Ysurac/openmptcprouter-feeds/workflows/openmptcprouter/badge.svg) ![Latest tag](https://img.shields.io/github/tag/ysurac/openmptcprouter-feeds.svg) [![Paypal](https://www.openmptcprouter.com/img/donate-PayPal-green.svg)](https://www.paypal.me/ycarus) [![Flattr](https://www.openmptcprouter.com/img/donate-flattr-yellow.svg)](https://flattr.com/@ycarus) @@ -38,39 +38,8 @@ dd bs=4M if=omr-*.img of=/dev/sdX conv=fsync ## Install from source -### Dependencies +[Create image](https://github.com/Ysurac/openmptcprouter/wiki/Create-image-for-unsupported-platform) -You need a classical build environment like `build-essential` on Debian and `git`. -Some feeds might not available over `git` but only via `subversion` or `mercurial`. - -On Debian you'll need to install the following: - -```sh -sudo apt install build-essential git unzip ncurses-dev libz-dev libssl-dev openssl-1.0-dev - python python3-dev python3.5 libelf-dev subversion gettext gawk wget curl rsync perl -``` - -### Prepare and build - -```sh -git clone https://github.com/ysurac/openmptcprouter.git -cd openmptcprouter -./build.sh -``` - -The script `build.sh` accepts all `make` arguments (like `-j`). -When finished, files are located in the directory `source/bin`. - -### Custom arch build - -By default the build script will create the packages for the `x86_64` architecture. -You can specify a custom build target by adding a `OMR_TARGET` environment variable to the build and the corresponding `config-$OMR_TARGET` file. - -To build the project for the raspberry pi 3: - -```sh -OMR_TARGET="rpi3" ./build.sh -``` ## Credits diff --git a/build.sh b/build.sh index 12cc2927..39f4437c 100755 --- a/build.sh +++ b/build.sh @@ -1,4 +1,11 @@ #!/bin/sh +# +# Copyright (C) 2017 OVH OverTheBox +# Copyright (C) 2017-2020 Ycarus (Yannick Chabanois) for OpenMPTCProuter project +# +# This is free software, licensed under the GNU General Public License v3. +# See /LICENSE for more information. +# set -e @@ -21,7 +28,7 @@ _get_repo() ( OMR_DIST=${OMR_DIST:-openmptcprouter} OMR_HOST=${OMR_HOST:-$(curl -sS ifconfig.co)} -OMR_PORT=${OMR_PORT:-8000} +OMR_PORT=${OMR_PORT:-80} OMR_KEEPBIN=${OMR_KEEPBIN:-no} OMR_IMG=${OMR_IMG:-yes} #OMR_UEFI=${OMR_UEFI:-yes} @@ -31,7 +38,8 @@ OMR_TARGET=${OMR_TARGET:-x86_64} OMR_TARGET_CONFIG="config-$OMR_TARGET" OMR_KERNEL=${OMR_KERNEL:-5.4} #OMR_RELEASE=${OMR_RELEASE:-$(git describe --tags `git rev-list --tags --max-count=1` | sed 's/^\([0-9.]*\).*/\1/')} -OMR_RELEASE=${OMR_RELEASE:-$(git tag --sort=committerdate | tail -1)} +#OMR_RELEASE=${OMR_RELEASE:-$(git tag --sort=committerdate | tail -1)} +OMR_RELEASE=${OMR_RELEASE:-$(git describe --tags `git rev-list --tags --max-count=1` | tail -1)} OMR_REPO=${OMR_REPO:-http://$OMR_HOST:$OMR_PORT/release/$OMR_RELEASE/$OMR_TARGET} OMR_FEED_URL="${OMR_FEED_URL:-https://github.com/ysurac/openmptcprouter-feeds}" @@ -70,9 +78,9 @@ fi #_get_repo source https://github.com/ysurac/openmptcprouter-source "master" if [ "$OMR_OPENWRT" = "default" ]; then - _get_repo "$OMR_TARGET/source" https://github.com/openwrt/openwrt "18b7d87a8f76b4cf36e943d9211bd26d79f55ec6" - _get_repo feeds/packages https://github.com/openwrt/packages "1c67444c33d85cd74d3a68d1a251626342554f03" - _get_repo feeds/luci https://github.com/openwrt/luci "b2e00f23a7862f47b8bd975207ba8242b55e6cf0" + _get_repo "$OMR_TARGET/source" https://github.com/openwrt/openwrt "a439f1bb478b4b8b4134dbed76266c0032625b6b" + _get_repo feeds/packages https://github.com/openwrt/packages "05769970213a5f9ffb81506b18da288890c05949" + _get_repo feeds/luci https://github.com/openwrt/luci "a805a3178f902fe609d3d4a6c7b6b5b1dad88838" elif [ "$OMR_OPENWRT" = "master" ]; then _get_repo "$OMR_TARGET/source" https://github.com/openwrt/openwrt "master" _get_repo feeds/packages https://github.com/openwrt/packages "master" @@ -88,7 +96,7 @@ if [ -z "$OMR_FEED" ]; then _get_repo "$OMR_FEED" "$OMR_FEED_URL" "$OMR_FEED_SRC" fi -if [ -n "$CUSTOM_FEED_URL" ]; then +if [ -n "$CUSTOM_FEED_URL" ] && [ -z "$CUSTOM_FEED" ]; then CUSTOM_FEED=feeds/${OMR_DIST} _get_repo "$CUSTOM_FEED" "$CUSTOM_FEED_URL" "master" fi @@ -133,6 +141,14 @@ if [ "$OMR_DIST" = "openmptcprouter" ]; then src/gz openwrt_routing http://packages.openmptcprouter.com/${OMR_RELEASE}/${OMR_REAL_TARGET}/routing src/gz openwrt_telephony http://packages.openmptcprouter.com/${OMR_RELEASE}/${OMR_REAL_TARGET}/telephony EOF +elif [ -n "$OMR_PACKAGES_URL" ]; then + cat > "$OMR_TARGET/source/package/system/opkg/files/customfeeds.conf" <<-EOF + src/gz openwrt_luci ${OMR_PACKAGES_URL}/${OMR_RELEASE}/${OMR_REAL_TARGET}/luci + src/gz openwrt_packages ${OMR_PACKAGES_URL}/${OMR_RELEASE}/${OMR_REAL_TARGET}/packages + src/gz openwrt_base ${OMR_PACKAGES_URL}/${OMR_RELEASE}/${OMR_REAL_TARGET}/base + src/gz openwrt_routing ${OMR_PACKAGES_URL}/${OMR_RELEASE}/${OMR_REAL_TARGET}/routing + src/gz openwrt_telephony ${OMR_PACKAGES_URL}/${OMR_RELEASE}/${OMR_REAL_TARGET}/telephony + EOF else cat > "$OMR_TARGET/source/package/system/opkg/files/customfeeds.conf" <<-EOF src/gz openwrt_luci http://downloads.openwrt.org/snapshots/packages/${OMR_REAL_TARGET}/luci @@ -156,7 +172,7 @@ if [ -f "$OMR_TARGET_CONFIG" ]; then CONFIG_VERSIONOPT=y CONFIG_VERSION_DIST="$OMR_DIST" CONFIG_VERSION_REPO="$OMR_REPO" - CONFIG_VERSION_NUMBER="$(git -C "$OMR_FEED" describe --tag --always)" + CONFIG_VERSION_NUMBER="$(git -C "$OMR_FEED" tag --sort=committerdate | tail -1)-$(git -C "$OMR_FEED" rev-parse --short HEAD)" EOF else cat config -> "$OMR_TARGET/source/.config" <<-EOF @@ -164,7 +180,7 @@ else CONFIG_VERSIONOPT=y CONFIG_VERSION_DIST="$OMR_DIST" CONFIG_VERSION_REPO="$OMR_REPO" - CONFIG_VERSION_NUMBER="$(git -C "$OMR_FEED" describe --tag --always)" + CONFIG_VERSION_NUMBER="$(git -C "$OMR_FEED" tag --sort=committerdate | tail -1)-$(git -C "$OMR_FEED" rev-parse --short HEAD)" EOF fi if [ "$OMR_ALL_PACKAGES" = "yes" ]; then @@ -258,6 +274,10 @@ if [ -f target/linux/mediatek/patches-5.4/0999-hnat.patch ]; then rm -f target/linux/mediatek/patches-5.4/0999-hnat.patch fi +if [ -f target/linux/ipq40xx/patches-5.4/100-GPIO-add-named-gpio-exports.patch ]; then + rm -f target/linux/ipq40xx/patches-5.4/100-GPIO-add-named-gpio-exports.patch +fi + #echo "Patch protobuf wrong hash" #patch -N -R -p1 -s < ../../patches/protobuf_hash.patch #echo "Done" @@ -284,10 +304,21 @@ if [ "$OMR_KERNEL" = "5.4" ]; then fi #rm -rf feeds/packages/libs/libwebp - -echo "Update feeds index" +cd "../.." rm -rf feeds/luci/modules/luci-mod-network +[ -d feeds/${OMR_DIST}/luci-mod-status ] && rm -rf feeds/luci/modules/luci-mod-status +[ -d feeds/${OMR_DIST}/luci-app-statistics ] && rm -rf feeds/luci/applications/luci-app-statistics +echo "Add Occitan translation support" +if ! patch -Rf -N -p1 -s --dry-run < patches/luci-occitan.patch; then + patch -N -p1 -s < patches/luci-occitan.patch + #sh feeds/luci/build/i18n-add-language.sh oc +fi +[ -d $OMR_FEED/luci-base/po/oc ] && cp -rf $OMR_FEED/luci-base/po/oc feeds/luci/modules/luci-base/po/ +echo "Done" + +cd "$OMR_TARGET/source" +echo "Update feeds index" cp .config .config.keep scripts/feeds clean scripts/feeds update -a diff --git a/config b/config index ae512ee1..b45b6c96 100644 --- a/config +++ b/config @@ -7,6 +7,7 @@ CONFIG_BUSYBOX_CONFIG_ARP=y CONFIG_BUSYBOX_CONFIG_ARPING=y CONFIG_BUSYBOX_CONFIG_ASH_RANDOM_SUPPORT=y CONFIG_BUSYBOX_CONFIG_BASE64=y +CONFIG_BUSYBOX_CONFIG_BC=y CONFIG_BUSYBOX_CONFIG_CHPASSWD=y CONFIG_BUSYBOX_CONFIG_DELUSER=y CONFIG_BUSYBOX_CONFIG_DIFF=y @@ -244,3 +245,8 @@ CONFIG_TARGET_ROOTFS_PARTSIZE=512 CONFIG_TARGET_KERNEL_PARTSIZE=64 CONFIG_OPENSSL_WITH_CHACHA_POLY1305=y # CONFIG_LUCI_CSSTIDY is not set +# CONFIG_LIBCURL_WOLFSSL is not set +# CONFIG_PACKAGE_libustream-wolfssl is not set +CONFIG_KERNEL_DEVMEM=y +CONFIG_KERNEL_DEVKMEM=y +CONFIG_AUTOREMOVE=y diff --git a/config-bpi-r2 b/config-bpi-r2 index 4022b63d..1ff4480e 100644 --- a/config-bpi-r2 +++ b/config-bpi-r2 @@ -17,3 +17,4 @@ CONFIG_PACKAGE_mkf2fs=y # CONFIG_PACKAGE_kmod-rtl8812au-ct is not set # CONFIG_PACKAGE_kmod-mt6625l-bt is not set # CONFIG_PACKAGE_kmod-mt6625l-wlan-gen-2 is not set +CONFIG_KERNEL_ARM_MODULE_PLTS=y diff --git a/config-bpi-r64 b/config-bpi-r64 new file mode 100644 index 00000000..dbbb6649 --- /dev/null +++ b/config-bpi-r64 @@ -0,0 +1,9 @@ +CONFIG_TARGET_mediatek=y +CONFIG_TARGET_mediatek_mt7622=y +CONFIG_TARGET_mediatek_mt7622_DEVICE_bpi_bananapi-r64=y +# CONFIG_PACKAGE_kmod-mt6625l-bt is not set +# CONFIG_PACKAGE_kmod-mt6625l-wlan-gen-2 is not set +CONFIG_PACKAGE_uboot-mediatek=y +CONFIG_PACKAGE_uboot-envtools=y +CONFIG_PACKAGE_mt7622-preloader=y +CONFIG_KERNEL_ARM_MODULE_PLTS=y diff --git a/config-espressobin b/config-espressobin index b11d9a82..6e43d5d0 100644 --- a/config-espressobin +++ b/config-espressobin @@ -5,3 +5,4 @@ CONFIG_PACKAGE_kmod-6lowpan=y CONFIG_PACKAGE_luci-app-advanced-reboot=y # CONFIG_KERNEL_CC_OPTIMIZE_FOR_PERFORMANCE is not set CONFIG_KERNEL_CC_OPTIMIZE_FOR_SIZE=y +CONFIG_KERNEL_ARM_MODULE_PLTS=y diff --git a/config-p2w_r619ac b/config-p2w_r619ac new file mode 100644 index 00000000..f4d50da2 --- /dev/null +++ b/config-p2w_r619ac @@ -0,0 +1,6 @@ +CONFIG_TARGET_ipq40xx=y +CONFIG_TARGET_ipq40xx_generic=y +CONFIG_TARGET_ipq40xx_generic_DEVICE_p2w_r619ac-128m=y +CONFIG_PACKAGE_kmod-6lowpan=y +# CONFIG_KERNEL_CC_OPTIMIZE_FOR_PERFORMANCE is not set +CONFIG_KERNEL_CC_OPTIMIZE_FOR_SIZE=y diff --git a/config-r2s b/config-r2s new file mode 100644 index 00000000..af12d580 --- /dev/null +++ b/config-r2s @@ -0,0 +1,5 @@ +CONFIG_TARGET_rockchip=y +CONFIG_TARGET_rockchip_armv8=y +CONFIG_TARGET_rockchip_armv8_DEVICE_friendlyarm_nanopi-r2s=y +CONFIG_PACKAGE_kmod-6lowpan=y +CONFIG_KERNEL_ARM_MODULE_PLTS=y diff --git a/config-rpi2 b/config-rpi2 index e79e72d2..aa976b33 100644 --- a/config-rpi2 +++ b/config-rpi2 @@ -5,3 +5,4 @@ CONFIG_PACKAGE_kmod-ath10k-ct=n CONFIG_PACKAGE_kmod-ath9k=y CONFIG_PACKAGE_bcm27xx-eeprom=y CONFIG_PACKAGE_bcm27xx-userland=y +CONFIG_KERNEL_ARM_MODULE_PLTS=y diff --git a/config-rpi3 b/config-rpi3 index e5370b2d..da6c42db 100644 --- a/config-rpi3 +++ b/config-rpi3 @@ -3,3 +3,4 @@ CONFIG_TARGET_bcm27xx_bcm2710=y CONFIG_TARGET_bcm27xx_bcm2710_DEVICE_rpi-3=y CONFIG_PACKAGE_kmod-ath10k-ct=n CONFIG_PACKAGE_kmod-ath9k=y +CONFIG_KERNEL_ARM_MODULE_PLTS=y diff --git a/config-rpi4 b/config-rpi4 index 7fb408aa..39fb7fb7 100644 --- a/config-rpi4 +++ b/config-rpi4 @@ -5,3 +5,4 @@ CONFIG_PACKAGE_kmod-ath10k-ct=n CONFIG_PACKAGE_kmod-ath9k=y CONFIG_PACKAGE_bcm27xx-eeprom=y CONFIG_PACKAGE_bcm27xx-userland=y +CONFIG_KERNEL_ARM_MODULE_PLTS=y diff --git a/config-wrt3200acm b/config-wrt3200acm index 79bae0ff..1b146609 100644 --- a/config-wrt3200acm +++ b/config-wrt3200acm @@ -3,3 +3,6 @@ CONFIG_TARGET_mvebu_cortexa9=y CONFIG_TARGET_mvebu_cortexa9_DEVICE_linksys_wrt3200acm=y CONFIG_PACKAGE_kmod-6lowpan=y CONFIG_PACKAGE_luci-app-advanced-reboot=y +# CONFIG_KERNEL_CC_OPTIMIZE_FOR_PERFORMANCE is not set +CONFIG_KERNEL_CC_OPTIMIZE_FOR_SIZE=y +CONFIG_KERNEL_ARM_MODULE_PLTS=y diff --git a/config-wrt32x b/config-wrt32x index eba5cbec..f362f397 100644 --- a/config-wrt32x +++ b/config-wrt32x @@ -5,3 +5,4 @@ CONFIG_PACKAGE_kmod-6lowpan=y CONFIG_PACKAGE_luci-app-advanced-reboot=y # CONFIG_KERNEL_CC_OPTIMIZE_FOR_PERFORMANCE is not set CONFIG_KERNEL_CC_OPTIMIZE_FOR_SIZE=y +CONFIG_KERNEL_ARM_MODULE_PLTS=y diff --git a/patches/luci-occitan.patch b/patches/luci-occitan.patch new file mode 100644 index 00000000..4aba6102 --- /dev/null +++ b/patches/luci-occitan.patch @@ -0,0 +1,10 @@ +--- a/feeds/luci/luci.mk 2020-10-13 09:58:19.887513368 +0200 ++++ b/feeds/luci/luci.mk 2020-10-13 09:04:51.724277184 +0200 +@@ -34,6 +34,7 @@ + LUCI_LANG.mr=Marāṭhī (Marathi) + LUCI_LANG.ms=Bahasa Melayu (Malay) + LUCI_LANG.nb_NO=Norsk (Norwegian) ++LUCI_LANG.oc=Occitan + LUCI_LANG.pl=Polski (Polish) + LUCI_LANG.pt_BR=Português do Brasil (Brazilian Portuguese) + LUCI_LANG.pt=Português (Portuguese) diff --git a/root/package/firmware/ipq-wifi/Makefile b/root/package/firmware/ipq-wifi/Makefile new file mode 100644 index 00000000..8bf3b414 --- /dev/null +++ b/root/package/firmware/ipq-wifi/Makefile @@ -0,0 +1,119 @@ +include $(TOPDIR)/rules.mk +include $(INCLUDE_DIR)/version.mk + +PKG_NAME:=ipq-wifi +PKG_RELEASE:=1 +PKG_FLAGS:=nonshared + +include $(INCLUDE_DIR)/package.mk + +define Build/Prepare + mkdir -p $(PKG_BUILD_DIR) +endef + +define Build/Compile +endef + +# Use ath10k-bdencoder from https://github.com/qca/qca-swiss-army-knife.git +# to generate the board-* files here. +# +# This is intended to be used on an interim basis until device-specific +# board data for new devices is available through the upstream compilation +# +# Please send a mail with your device-specific board files upstream. +# You can find instructions and examples on the linux-wireless wiki: +# + +ALLWIFIBOARDS:= \ + 8dev_habanero-dvk \ + aruba_ap-303 \ + avm_fritzrepeater-1200 \ + buffalo_wtr-m2133hp \ + cellc_rtl30vw \ + dlink_dap2610 \ + engenius_eap2200 \ + engenius_emd1 \ + engenius_emr3500 \ + ezviz_cs-w3-wd1200g-eup \ + glinet_gl-s1300 \ + linksys_ea8300 \ + p2w_r619ac \ + mobipromo_cm520-79f \ + qxwlan_e2600ac + +ALLWIFIPACKAGES:=$(foreach BOARD,$(ALLWIFIBOARDS),ipq-wifi-$(BOARD)) + +define Package/ipq-wifi-default + SUBMENU:=ath10k Board-Specific Overrides + SECTION:=firmware + CATEGORY:=Firmware + DEPENDS:=@TARGET_ipq40xx + TITLE:=Custom Board +endef + +define ipq-wifi-install-one-to + $(INSTALL_DIR) $(2)/lib/firmware/ath10k/$(3)/ + $(INSTALL_DATA) $(1) $(2)/lib/firmware/ath10k/$(3)/board-2.bin +endef + +define ipq-wifi-install-one + $(if $(filter $(suffix $(1)),.QCA4019 .qca4019),\ + $(call ipq-wifi-install-one-to,$(1),$(2),QCA4019/hw1.0),\ + $(if $(filter $(suffix $(1)),.QCA9888 .qca9888),\ + $(call ipq-wifi-install-one-to,$(1),$(2),QCA9888/hw2.0),\ + $(if $(filter $(suffix $(1)),.QCA9984 .qca9984),\ + $(call ipq-wifi-install-one-to,$(1),$(2),QCA9984/hw1.0),\ + $(error Unrecognized board-file suffix '$(suffix $(1))' for '$(1)')\ + ))) + +endef +# Blank line required at end of above define due to foreach context + +define generate-ipq-wifi-package + define Package/ipq-wifi-$(1) + $(call Package/ipq-wifi-default) + TITLE:=board-2.bin Overrides for $(2) + CONFLICTS:=$(PREV_BOARD) + endef + + define Package/ipq-wifi-$(1)/description +The $(2) requires board-specific, reference ("cal") data +that is not yet present in the upstream wireless firmware distribution. + +This package supplies board-2.bin file(s) that, in the interim, +overwrite those supplied by the ath10k-firmware-* packages. + +This is package is only necessary for the $(2). + +Do not install it for any other device! + endef + + define Package/ipq-wifi-$(1)/install-overlay + $$$$(foreach IPQ_WIFI_BOARD_FILE,$$$$(wildcard board-$(1).*),\ + $$$$(call ipq-wifi-install-one,$$$$(IPQ_WIFI_BOARD_FILE),$$(1))) + endef + + PREV_BOARD+=ipq-wifi-$(1) +endef + +# Add board name to ALLWIFIBOARDS +# Place files in this directory as board-. +# Add $(eval $(call generate-ipq-wifi-package,,)) + +$(eval $(call generate-ipq-wifi-package,8dev_habanero-dvk,8devices Habanero DVK)) +$(eval $(call generate-ipq-wifi-package,aruba_ap-303,Aruba AP-303)) +$(eval $(call generate-ipq-wifi-package,avm_fritzrepeater-1200,AVM FRITZRepeater 1200)) +$(eval $(call generate-ipq-wifi-package,buffalo_wtr-m2133hp,Buffalo WTR-M2133HP)) +$(eval $(call generate-ipq-wifi-package,cellc_rtl30vw, Cell C RTL30VW)) +$(eval $(call generate-ipq-wifi-package,dlink_dap2610,D-Link DAP-2610)) +$(eval $(call generate-ipq-wifi-package,engenius_eap2200,EnGenius EAP2200)) +$(eval $(call generate-ipq-wifi-package,engenius_emd1,EnGenius EMD1)) +$(eval $(call generate-ipq-wifi-package,engenius_emr3500,EnGenius EMR3500)) +$(eval $(call generate-ipq-wifi-package,ezviz_cs-w3-wd1200g-eup,EZVIZ CS-W3-WD1200G EUP)) +$(eval $(call generate-ipq-wifi-package,glinet_gl-s1300,GL.iNet GL-S1300)) +$(eval $(call generate-ipq-wifi-package,linksys_ea8300,Linksys EA8300)) +$(eval $(call generate-ipq-wifi-package,mobipromo_cm520-79f,MobiPromo CM520-79F)) +$(eval $(call generate-ipq-wifi-package,qxwlan_e2600ac,Qxwlan E2600AC)) +$(eval $(call generate-ipq-wifi-package,p2w_r619ac,P&W R619AC)) + +$(foreach PACKAGE,$(ALLWIFIPACKAGES),$(eval $(call BuildPackage,$(PACKAGE)))) diff --git a/root/package/firmware/ipq-wifi/board-p2w_r619ac.qca4019 b/root/package/firmware/ipq-wifi/board-p2w_r619ac.qca4019 new file mode 100644 index 00000000..a1b1166f Binary files /dev/null and b/root/package/firmware/ipq-wifi/board-p2w_r619ac.qca4019 differ diff --git a/root/target/linux/generic/hack-5.4/690-mptcp_trunk.patch b/root/target/linux/generic/hack-5.4/690-mptcp_trunk.patch index 7457f75d..dfb008e1 100644 --- a/root/target/linux/generic/hack-5.4/690-mptcp_trunk.patch +++ b/root/target/linux/generic/hack-5.4/690-mptcp_trunk.patch @@ -1,7 +1,7 @@ -diff -aurN linux-5.4/Documentation/admin-guide/kernel-parameters.txt mptcp-mptcp_trunk/Documentation/admin-guide/kernel-parameters.txt ---- linux-5.4/Documentation/admin-guide/kernel-parameters.txt 2019-11-25 01:32:01.000000000 +0100 -+++ mptcp-mptcp_trunk/Documentation/admin-guide/kernel-parameters.txt 2020-07-14 19:34:59.000000000 +0200 -@@ -2724,6 +2724,10 @@ +diff -aurN linux-5.4.64/Documentation/admin-guide/kernel-parameters.txt linux-5.4.64.mptcp/Documentation/admin-guide/kernel-parameters.txt +--- linux-5.4.64/Documentation/admin-guide/kernel-parameters.txt 2020-09-09 19:12:37.000000000 +0200 ++++ linux-5.4.64.mptcp/Documentation/admin-guide/kernel-parameters.txt 2020-09-10 19:25:10.375223065 +0200 +@@ -2734,6 +2734,10 @@ allocations which rules out almost all kernel allocations. Use with caution! @@ -12,9 +12,9 @@ diff -aurN linux-5.4/Documentation/admin-guide/kernel-parameters.txt mptcp-mptcp MTD_Partition= [MTD] Format: ,,, -diff -aurN linux-5.4/Documentation/networking/ip-sysctl.txt mptcp-mptcp_trunk/Documentation/networking/ip-sysctl.txt ---- linux-5.4/Documentation/networking/ip-sysctl.txt 2019-11-25 01:32:01.000000000 +0100 -+++ mptcp-mptcp_trunk/Documentation/networking/ip-sysctl.txt 2020-07-14 19:34:59.000000000 +0200 +diff -aurN linux-5.4.64/Documentation/networking/ip-sysctl.txt linux-5.4.64.mptcp/Documentation/networking/ip-sysctl.txt +--- linux-5.4.64/Documentation/networking/ip-sysctl.txt 2020-09-09 19:12:37.000000000 +0200 ++++ linux-5.4.64.mptcp/Documentation/networking/ip-sysctl.txt 2020-09-10 19:25:10.375223065 +0200 @@ -818,6 +818,18 @@ Default: 0 (disabled) @@ -34,10 +34,10 @@ diff -aurN linux-5.4/Documentation/networking/ip-sysctl.txt mptcp-mptcp_trunk/Do UDP variables: udp_l3mdev_accept - BOOLEAN -diff -aurN linux-5.4/drivers/infiniband/hw/cxgb4/cm.c mptcp-mptcp_trunk/drivers/infiniband/hw/cxgb4/cm.c ---- linux-5.4/drivers/infiniband/hw/cxgb4/cm.c 2019-11-25 01:32:01.000000000 +0100 -+++ mptcp-mptcp_trunk/drivers/infiniband/hw/cxgb4/cm.c 2020-07-14 19:34:59.000000000 +0200 -@@ -3946,7 +3946,7 @@ +diff -aurN linux-5.4.64/drivers/infiniband/hw/cxgb4/cm.c linux-5.4.64.mptcp/drivers/infiniband/hw/cxgb4/cm.c +--- linux-5.4.64/drivers/infiniband/hw/cxgb4/cm.c 2020-09-09 19:12:37.000000000 +0200 ++++ linux-5.4.64.mptcp/drivers/infiniband/hw/cxgb4/cm.c 2020-09-10 19:25:10.439222000 +0200 +@@ -3949,7 +3949,7 @@ */ memset(&tmp_opt, 0, sizeof(tmp_opt)); tcp_clear_options(&tmp_opt); @@ -46,9 +46,9 @@ diff -aurN linux-5.4/drivers/infiniband/hw/cxgb4/cm.c mptcp-mptcp_trunk/drivers/ req = __skb_push(skb, sizeof(*req)); memset(req, 0, sizeof(*req)); -diff -aurN linux-5.4/include/linux/skbuff.h mptcp-mptcp_trunk/include/linux/skbuff.h ---- linux-5.4/include/linux/skbuff.h 2019-11-25 01:32:01.000000000 +0100 -+++ mptcp-mptcp_trunk/include/linux/skbuff.h 2020-07-14 19:34:59.000000000 +0200 +diff -aurN linux-5.4.64/include/linux/skbuff.h linux-5.4.64.mptcp/include/linux/skbuff.h +--- linux-5.4.64/include/linux/skbuff.h 2020-09-09 19:12:37.000000000 +0200 ++++ linux-5.4.64.mptcp/include/linux/skbuff.h 2020-09-10 19:25:10.439222000 +0200 @@ -717,7 +717,7 @@ * want to keep them across layers you have to do a skb_clone() * first. This is owned by whoever has the skb queued ATM. @@ -58,9 +58,9 @@ diff -aurN linux-5.4/include/linux/skbuff.h mptcp-mptcp_trunk/include/linux/skbu union { struct { -diff -aurN linux-5.4/include/linux/tcp.h mptcp-mptcp_trunk/include/linux/tcp.h ---- linux-5.4/include/linux/tcp.h 2019-11-25 01:32:01.000000000 +0100 -+++ mptcp-mptcp_trunk/include/linux/tcp.h 2020-07-14 19:34:59.000000000 +0200 +diff -aurN linux-5.4.64/include/linux/tcp.h linux-5.4.64.mptcp/include/linux/tcp.h +--- linux-5.4.64/include/linux/tcp.h 2020-09-09 19:12:37.000000000 +0200 ++++ linux-5.4.64.mptcp/include/linux/tcp.h 2020-09-10 19:25:10.499221003 +0200 @@ -54,7 +54,7 @@ /* TCP Fast Open */ #define TCP_FASTOPEN_COOKIE_MIN 4 /* Min Fast Open Cookie size in bytes */ @@ -146,7 +146,7 @@ diff -aurN linux-5.4/include/linux/tcp.h mptcp-mptcp_trunk/include/linux/tcp.h struct tcp_sock { /* inet_connection_sock has to be the first member of tcp_sock */ struct inet_connection_sock inet_conn; -@@ -395,6 +450,44 @@ +@@ -397,6 +452,44 @@ */ struct request_sock __rcu *fastopen_rsk; u32 *saved_syn; @@ -191,7 +191,7 @@ diff -aurN linux-5.4/include/linux/tcp.h mptcp-mptcp_trunk/include/linux/tcp.h }; enum tsq_enum { -@@ -406,6 +499,8 @@ +@@ -408,6 +501,8 @@ TCP_MTU_REDUCED_DEFERRED, /* tcp_v{4|6}_err() could not call * tcp_v{4|6}_mtu_reduced() */ @@ -200,7 +200,7 @@ diff -aurN linux-5.4/include/linux/tcp.h mptcp-mptcp_trunk/include/linux/tcp.h }; enum tsq_flags { -@@ -415,6 +510,8 @@ +@@ -417,6 +512,8 @@ TCPF_WRITE_TIMER_DEFERRED = (1UL << TCP_WRITE_TIMER_DEFERRED), TCPF_DELACK_TIMER_DEFERRED = (1UL << TCP_DELACK_TIMER_DEFERRED), TCPF_MTU_REDUCED_DEFERRED = (1UL << TCP_MTU_REDUCED_DEFERRED), @@ -209,7 +209,7 @@ diff -aurN linux-5.4/include/linux/tcp.h mptcp-mptcp_trunk/include/linux/tcp.h }; static inline struct tcp_sock *tcp_sk(const struct sock *sk) -@@ -438,6 +535,7 @@ +@@ -440,6 +537,7 @@ #ifdef CONFIG_TCP_MD5SIG struct tcp_md5sig_key *tw_md5_key; #endif @@ -217,9 +217,9 @@ diff -aurN linux-5.4/include/linux/tcp.h mptcp-mptcp_trunk/include/linux/tcp.h }; static inline struct tcp_timewait_sock *tcp_twsk(const struct sock *sk) -diff -aurN linux-5.4/include/net/inet_common.h mptcp-mptcp_trunk/include/net/inet_common.h ---- linux-5.4/include/net/inet_common.h 2019-11-25 01:32:01.000000000 +0100 -+++ mptcp-mptcp_trunk/include/net/inet_common.h 2020-07-14 19:34:59.000000000 +0200 +diff -aurN linux-5.4.64/include/net/inet_common.h linux-5.4.64.mptcp/include/net/inet_common.h +--- linux-5.4.64/include/net/inet_common.h 2020-09-09 19:12:37.000000000 +0200 ++++ linux-5.4.64.mptcp/include/net/inet_common.h 2020-09-10 19:25:10.499221003 +0200 @@ -2,6 +2,7 @@ #ifndef _INET_COMMON_H #define _INET_COMMON_H @@ -237,9 +237,9 @@ diff -aurN linux-5.4/include/net/inet_common.h mptcp-mptcp_trunk/include/net/ine int inet_release(struct socket *sock); int inet_stream_connect(struct socket *sock, struct sockaddr *uaddr, int addr_len, int flags); -diff -aurN linux-5.4/include/net/inet_connection_sock.h mptcp-mptcp_trunk/include/net/inet_connection_sock.h ---- linux-5.4/include/net/inet_connection_sock.h 2019-11-25 01:32:01.000000000 +0100 -+++ mptcp-mptcp_trunk/include/net/inet_connection_sock.h 2020-07-14 19:34:59.000000000 +0200 +diff -aurN linux-5.4.64/include/net/inet_connection_sock.h linux-5.4.64.mptcp/include/net/inet_connection_sock.h +--- linux-5.4.64/include/net/inet_connection_sock.h 2020-09-09 19:12:37.000000000 +0200 ++++ linux-5.4.64.mptcp/include/net/inet_connection_sock.h 2020-09-10 19:25:10.499221003 +0200 @@ -25,6 +25,7 @@ struct inet_bind_bucket; @@ -248,9 +248,9 @@ diff -aurN linux-5.4/include/net/inet_connection_sock.h mptcp-mptcp_trunk/includ /* * Pointers to address related TCP functions -diff -aurN linux-5.4/include/net/inet_sock.h mptcp-mptcp_trunk/include/net/inet_sock.h ---- linux-5.4/include/net/inet_sock.h 2019-11-25 01:32:01.000000000 +0100 -+++ mptcp-mptcp_trunk/include/net/inet_sock.h 2020-07-14 19:34:59.000000000 +0200 +diff -aurN linux-5.4.64/include/net/inet_sock.h linux-5.4.64.mptcp/include/net/inet_sock.h +--- linux-5.4.64/include/net/inet_sock.h 2020-09-09 19:12:37.000000000 +0200 ++++ linux-5.4.64.mptcp/include/net/inet_sock.h 2020-09-10 19:25:10.499221003 +0200 @@ -79,7 +79,7 @@ #define ireq_state req.__req_common.skc_state #define ireq_family req.__req_common.skc_family @@ -269,9 +269,9 @@ diff -aurN linux-5.4/include/net/inet_sock.h mptcp-mptcp_trunk/include/net/inet_ smc_ok : 1; u32 ir_mark; union { -diff -aurN linux-5.4/include/net/mptcp.h mptcp-mptcp_trunk/include/net/mptcp.h ---- linux-5.4/include/net/mptcp.h 1970-01-01 01:00:00.000000000 +0100 -+++ mptcp-mptcp_trunk/include/net/mptcp.h 2020-07-14 19:34:59.000000000 +0200 +diff -aurN linux-5.4.64/include/net/mptcp.h linux-5.4.64.mptcp/include/net/mptcp.h +--- linux-5.4.64/include/net/mptcp.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-5.4.64.mptcp/include/net/mptcp.h 2020-09-10 19:25:10.499221003 +0200 @@ -0,0 +1,1571 @@ +/* + * MPTCP implementation @@ -1844,9 +1844,9 @@ diff -aurN linux-5.4/include/net/mptcp.h mptcp-mptcp_trunk/include/net/mptcp.h +#endif /* CONFIG_MPTCP */ + +#endif /* _MPTCP_H */ -diff -aurN linux-5.4/include/net/mptcp_v4.h mptcp-mptcp_trunk/include/net/mptcp_v4.h ---- linux-5.4/include/net/mptcp_v4.h 1970-01-01 01:00:00.000000000 +0100 -+++ mptcp-mptcp_trunk/include/net/mptcp_v4.h 2020-07-14 19:34:59.000000000 +0200 +diff -aurN linux-5.4.64/include/net/mptcp_v4.h linux-5.4.64.mptcp/include/net/mptcp_v4.h +--- linux-5.4.64/include/net/mptcp_v4.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-5.4.64.mptcp/include/net/mptcp_v4.h 2020-09-10 19:25:10.499221003 +0200 @@ -0,0 +1,76 @@ +/* + * MPTCP implementation @@ -1924,9 +1924,9 @@ diff -aurN linux-5.4/include/net/mptcp_v4.h mptcp-mptcp_trunk/include/net/mptcp_ +#endif /* CONFIG_MPTCP */ + +#endif /* MPTCP_V4_H_ */ -diff -aurN linux-5.4/include/net/mptcp_v6.h mptcp-mptcp_trunk/include/net/mptcp_v6.h ---- linux-5.4/include/net/mptcp_v6.h 1970-01-01 01:00:00.000000000 +0100 -+++ mptcp-mptcp_trunk/include/net/mptcp_v6.h 2020-07-14 19:34:59.000000000 +0200 +diff -aurN linux-5.4.64/include/net/mptcp_v6.h linux-5.4.64.mptcp/include/net/mptcp_v6.h +--- linux-5.4.64/include/net/mptcp_v6.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-5.4.64.mptcp/include/net/mptcp_v6.h 2020-09-10 19:25:10.499221003 +0200 @@ -0,0 +1,77 @@ +/* + * MPTCP implementation @@ -2005,9 +2005,9 @@ diff -aurN linux-5.4/include/net/mptcp_v6.h mptcp-mptcp_trunk/include/net/mptcp_ +#endif /* CONFIG_MPTCP */ + +#endif /* _MPTCP_V6_H */ -diff -aurN linux-5.4/include/net/net_namespace.h mptcp-mptcp_trunk/include/net/net_namespace.h ---- linux-5.4/include/net/net_namespace.h 2019-11-25 01:32:01.000000000 +0100 -+++ mptcp-mptcp_trunk/include/net/net_namespace.h 2020-07-14 19:34:59.000000000 +0200 +diff -aurN linux-5.4.64/include/net/net_namespace.h linux-5.4.64.mptcp/include/net/net_namespace.h +--- linux-5.4.64/include/net/net_namespace.h 2020-09-09 19:12:37.000000000 +0200 ++++ linux-5.4.64.mptcp/include/net/net_namespace.h 2020-09-10 19:25:10.499221003 +0200 @@ -19,6 +19,7 @@ #include #include @@ -2026,9 +2026,9 @@ diff -aurN linux-5.4/include/net/net_namespace.h mptcp-mptcp_trunk/include/net/n #if IS_ENABLED(CONFIG_IEEE802154_6LOWPAN) struct netns_ieee802154_lowpan ieee802154_lowpan; #endif -diff -aurN linux-5.4/include/net/netns/mptcp.h mptcp-mptcp_trunk/include/net/netns/mptcp.h ---- linux-5.4/include/net/netns/mptcp.h 1970-01-01 01:00:00.000000000 +0100 -+++ mptcp-mptcp_trunk/include/net/netns/mptcp.h 2020-07-14 19:34:59.000000000 +0200 +diff -aurN linux-5.4.64/include/net/netns/mptcp.h linux-5.4.64.mptcp/include/net/netns/mptcp.h +--- linux-5.4.64/include/net/netns/mptcp.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-5.4.64.mptcp/include/net/netns/mptcp.h 2020-09-10 19:25:10.499221003 +0200 @@ -0,0 +1,52 @@ +/* + * MPTCP implementation - MPTCP namespace @@ -2082,9 +2082,9 @@ diff -aurN linux-5.4/include/net/netns/mptcp.h mptcp-mptcp_trunk/include/net/net +}; + +#endif /* __NETNS_MPTCP_H__ */ -diff -aurN linux-5.4/include/net/snmp.h mptcp-mptcp_trunk/include/net/snmp.h ---- linux-5.4/include/net/snmp.h 2019-11-25 01:32:01.000000000 +0100 -+++ mptcp-mptcp_trunk/include/net/snmp.h 2020-07-14 19:34:59.000000000 +0200 +diff -aurN linux-5.4.64/include/net/snmp.h linux-5.4.64.mptcp/include/net/snmp.h +--- linux-5.4.64/include/net/snmp.h 2020-09-09 19:12:37.000000000 +0200 ++++ linux-5.4.64.mptcp/include/net/snmp.h 2020-09-10 19:25:10.499221003 +0200 @@ -86,7 +86,6 @@ atomic_long_t mibs[ICMP6MSG_MIB_MAX]; }; @@ -2093,10 +2093,10 @@ diff -aurN linux-5.4/include/net/snmp.h mptcp-mptcp_trunk/include/net/snmp.h /* TCP */ #define TCP_MIB_MAX __TCP_MIB_MAX struct tcp_mib { -diff -aurN linux-5.4/include/net/sock.h mptcp-mptcp_trunk/include/net/sock.h ---- linux-5.4/include/net/sock.h 2019-11-25 01:32:01.000000000 +0100 -+++ mptcp-mptcp_trunk/include/net/sock.h 2020-07-14 19:34:59.000000000 +0200 -@@ -814,6 +814,7 @@ +diff -aurN linux-5.4.64/include/net/sock.h linux-5.4.64.mptcp/include/net/sock.h +--- linux-5.4.64/include/net/sock.h 2020-09-09 19:12:37.000000000 +0200 ++++ linux-5.4.64.mptcp/include/net/sock.h 2020-09-10 19:25:10.499221003 +0200 +@@ -819,6 +819,7 @@ SOCK_TXTIME, SOCK_XDP, /* XDP is attached */ SOCK_TSTAMP_NEW, /* Indicates 64 bit timestamps always */ @@ -2104,7 +2104,7 @@ diff -aurN linux-5.4/include/net/sock.h mptcp-mptcp_trunk/include/net/sock.h }; #define SK_FLAGS_TIMESTAMP ((1UL << SOCK_TIMESTAMP) | (1UL << SOCK_TIMESTAMPING_RX_SOFTWARE)) -@@ -1122,6 +1123,7 @@ +@@ -1131,6 +1132,7 @@ void (*unhash)(struct sock *sk); void (*rehash)(struct sock *sk); int (*get_port)(struct sock *sk, unsigned short snum); @@ -2112,9 +2112,9 @@ diff -aurN linux-5.4/include/net/sock.h mptcp-mptcp_trunk/include/net/sock.h /* Keeping track of sockets in use */ #ifdef CONFIG_PROC_FS -diff -aurN linux-5.4/include/net/tcp.h mptcp-mptcp_trunk/include/net/tcp.h ---- linux-5.4/include/net/tcp.h 2019-11-25 01:32:01.000000000 +0100 -+++ mptcp-mptcp_trunk/include/net/tcp.h 2020-07-14 19:34:59.000000000 +0200 +diff -aurN linux-5.4.64/include/net/tcp.h linux-5.4.64.mptcp/include/net/tcp.h +--- linux-5.4.64/include/net/tcp.h 2020-09-09 19:12:37.000000000 +0200 ++++ linux-5.4.64.mptcp/include/net/tcp.h 2020-09-10 19:25:10.499221003 +0200 @@ -182,6 +182,7 @@ #define TCPOPT_SACK 5 /* SACK Block */ #define TCPOPT_TIMESTAMP 8 /* Better RTT estimations/PAWS */ @@ -2288,7 +2288,7 @@ diff -aurN linux-5.4/include/net/tcp.h mptcp-mptcp_trunk/include/net/tcp.h struct dst_entry *dst, u32 tsoff); int __cookie_v4_check(const struct iphdr *iph, const struct tcphdr *th, u32 cookie); -@@ -536,7 +658,8 @@ +@@ -547,7 +669,8 @@ u32 __cookie_v4_init_sequence(const struct iphdr *iph, const struct tcphdr *th, u16 *mssp); @@ -2298,7 +2298,7 @@ diff -aurN linux-5.4/include/net/tcp.h mptcp-mptcp_trunk/include/net/tcp.h u64 cookie_init_timestamp(struct request_sock *req); bool cookie_timestamp_decode(const struct net *net, struct tcp_options_received *opt); -@@ -550,7 +673,8 @@ +@@ -561,7 +684,8 @@ u32 __cookie_v6_init_sequence(const struct ipv6hdr *iph, const struct tcphdr *th, u16 *mssp); @@ -2308,7 +2308,7 @@ diff -aurN linux-5.4/include/net/tcp.h mptcp-mptcp_trunk/include/net/tcp.h #endif /* tcp_output.c */ -@@ -586,10 +710,16 @@ +@@ -597,10 +721,16 @@ void tcp_skb_collapse_tstamp(struct sk_buff *skb, const struct sk_buff *next_skb); @@ -2325,7 +2325,7 @@ diff -aurN linux-5.4/include/net/tcp.h mptcp-mptcp_trunk/include/net/tcp.h void tcp_skb_mark_lost_uncond_verify(struct tcp_sock *tp, struct sk_buff *skb); void tcp_fin(struct sock *sk); -@@ -633,7 +763,7 @@ +@@ -644,7 +774,7 @@ } /* tcp.c */ @@ -2334,7 +2334,7 @@ diff -aurN linux-5.4/include/net/tcp.h mptcp-mptcp_trunk/include/net/tcp.h /* Read 'sendfile()'-style from a TCP socket */ int tcp_read_sock(struct sock *sk, read_descriptor_t *desc, -@@ -817,6 +947,12 @@ +@@ -828,6 +958,12 @@ u16 tcp_gso_size; }; }; @@ -2347,7 +2347,7 @@ diff -aurN linux-5.4/include/net/tcp.h mptcp-mptcp_trunk/include/net/tcp.h __u8 tcp_flags; /* TCP header flags. (tcp[13]) */ __u8 sacked; /* State flags for SACK. */ -@@ -835,6 +971,14 @@ +@@ -846,6 +982,14 @@ has_rxtstamp:1, /* SKB has a RX timestamp */ unused:5; __u32 ack_seq; /* Sequence number ACK'd */ @@ -2362,7 +2362,7 @@ diff -aurN linux-5.4/include/net/tcp.h mptcp-mptcp_trunk/include/net/tcp.h union { struct { /* There is space for up to 24 bytes */ -@@ -1076,6 +1220,8 @@ +@@ -1087,6 +1231,8 @@ int tcp_set_allowed_congestion_control(char *allowed); int tcp_set_congestion_control(struct sock *sk, const char *name, bool load, bool reinit, bool cap_net_admin); @@ -2371,7 +2371,7 @@ diff -aurN linux-5.4/include/net/tcp.h mptcp-mptcp_trunk/include/net/tcp.h u32 tcp_slow_start(struct tcp_sock *tp, u32 acked); void tcp_cong_avoid_ai(struct tcp_sock *tp, u32 w, u32 acked); -@@ -1377,6 +1523,19 @@ +@@ -1388,6 +1534,19 @@ space - (space>>tcp_adv_win_scale); } @@ -2391,7 +2391,7 @@ diff -aurN linux-5.4/include/net/tcp.h mptcp-mptcp_trunk/include/net/tcp.h /* Note: caller must be prepared to deal with negative returns */ static inline int tcp_space(const struct sock *sk) { -@@ -1949,6 +2108,30 @@ +@@ -1975,6 +2134,30 @@ #endif }; @@ -2422,7 +2422,7 @@ diff -aurN linux-5.4/include/net/tcp.h mptcp-mptcp_trunk/include/net/tcp.h struct tcp_request_sock_ops { u16 mss_clamp; #ifdef CONFIG_TCP_MD5SIG -@@ -1959,12 +2142,13 @@ +@@ -1985,12 +2168,13 @@ const struct sock *sk, const struct sk_buff *skb); #endif @@ -2441,7 +2441,7 @@ diff -aurN linux-5.4/include/net/tcp.h mptcp-mptcp_trunk/include/net/tcp.h #endif struct dst_entry *(*route_req)(const struct sock *sk, struct flowi *fl, const struct request_sock *req); -@@ -1978,15 +2162,17 @@ +@@ -2004,15 +2188,17 @@ #ifdef CONFIG_SYN_COOKIES static inline __u32 cookie_init_sequence(const struct tcp_request_sock_ops *ops, @@ -2460,9 +2460,9 @@ diff -aurN linux-5.4/include/net/tcp.h mptcp-mptcp_trunk/include/net/tcp.h const struct sock *sk, struct sk_buff *skb, __u16 *mss) { -diff -aurN linux-5.4/include/net/tcp_states.h mptcp-mptcp_trunk/include/net/tcp_states.h ---- linux-5.4/include/net/tcp_states.h 2019-11-25 01:32:01.000000000 +0100 -+++ mptcp-mptcp_trunk/include/net/tcp_states.h 2020-07-14 19:34:59.000000000 +0200 +diff -aurN linux-5.4.64/include/net/tcp_states.h linux-5.4.64.mptcp/include/net/tcp_states.h +--- linux-5.4.64/include/net/tcp_states.h 2020-09-09 19:12:37.000000000 +0200 ++++ linux-5.4.64.mptcp/include/net/tcp_states.h 2020-09-10 19:25:10.499221003 +0200 @@ -22,6 +22,7 @@ TCP_LISTEN, TCP_CLOSING, /* Now a valid state */ @@ -2479,9 +2479,9 @@ diff -aurN linux-5.4/include/net/tcp_states.h mptcp-mptcp_trunk/include/net/tcp_ }; #endif /* _LINUX_TCP_STATES_H */ -diff -aurN linux-5.4/include/net/transp_v6.h mptcp-mptcp_trunk/include/net/transp_v6.h ---- linux-5.4/include/net/transp_v6.h 2019-11-25 01:32:01.000000000 +0100 -+++ mptcp-mptcp_trunk/include/net/transp_v6.h 2020-07-14 19:34:59.000000000 +0200 +diff -aurN linux-5.4.64/include/net/transp_v6.h linux-5.4.64.mptcp/include/net/transp_v6.h +--- linux-5.4.64/include/net/transp_v6.h 2020-09-09 19:12:37.000000000 +0200 ++++ linux-5.4.64.mptcp/include/net/transp_v6.h 2020-09-10 19:25:10.499221003 +0200 @@ -58,6 +58,8 @@ /* address family specific functions */ @@ -2491,9 +2491,9 @@ diff -aurN linux-5.4/include/net/transp_v6.h mptcp-mptcp_trunk/include/net/trans void inet6_destroy_sock(struct sock *sk); -diff -aurN linux-5.4/include/trace/events/tcp.h mptcp-mptcp_trunk/include/trace/events/tcp.h ---- linux-5.4/include/trace/events/tcp.h 2019-11-25 01:32:01.000000000 +0100 -+++ mptcp-mptcp_trunk/include/trace/events/tcp.h 2020-07-14 19:34:59.000000000 +0200 +diff -aurN linux-5.4.64/include/trace/events/tcp.h linux-5.4.64.mptcp/include/trace/events/tcp.h +--- linux-5.4.64/include/trace/events/tcp.h 2020-09-09 19:12:37.000000000 +0200 ++++ linux-5.4.64.mptcp/include/trace/events/tcp.h 2020-09-10 19:25:10.499221003 +0200 @@ -10,6 +10,7 @@ #include #include @@ -2542,9 +2542,9 @@ diff -aurN linux-5.4/include/trace/events/tcp.h mptcp-mptcp_trunk/include/trace/ ); #endif /* _TRACE_TCP_H */ -diff -aurN linux-5.4/include/uapi/linux/bpf.h mptcp-mptcp_trunk/include/uapi/linux/bpf.h ---- linux-5.4/include/uapi/linux/bpf.h 2019-11-25 01:32:01.000000000 +0100 -+++ mptcp-mptcp_trunk/include/uapi/linux/bpf.h 2020-07-14 19:34:59.000000000 +0200 +diff -aurN linux-5.4.64/include/uapi/linux/bpf.h linux-5.4.64.mptcp/include/uapi/linux/bpf.h +--- linux-5.4.64/include/uapi/linux/bpf.h 2020-09-09 19:12:37.000000000 +0200 ++++ linux-5.4.64.mptcp/include/uapi/linux/bpf.h 2020-09-10 19:25:10.499221003 +0200 @@ -3438,6 +3438,7 @@ BPF_TCP_LISTEN, BPF_TCP_CLOSING, /* Now a valid state */ @@ -2553,9 +2553,9 @@ diff -aurN linux-5.4/include/uapi/linux/bpf.h mptcp-mptcp_trunk/include/uapi/lin BPF_TCP_MAX_STATES /* Leave at the end! */ }; -diff -aurN linux-5.4/include/uapi/linux/if.h mptcp-mptcp_trunk/include/uapi/linux/if.h ---- linux-5.4/include/uapi/linux/if.h 2019-11-25 01:32:01.000000000 +0100 -+++ mptcp-mptcp_trunk/include/uapi/linux/if.h 2020-07-14 19:34:59.000000000 +0200 +diff -aurN linux-5.4.64/include/uapi/linux/if.h linux-5.4.64.mptcp/include/uapi/linux/if.h +--- linux-5.4.64/include/uapi/linux/if.h 2020-09-09 19:12:37.000000000 +0200 ++++ linux-5.4.64.mptcp/include/uapi/linux/if.h 2020-09-10 19:25:10.499221003 +0200 @@ -132,6 +132,9 @@ #define IFF_ECHO IFF_ECHO #endif /* __UAPI_DEF_IF_NET_DEVICE_FLAGS_LOWER_UP_DORMANT_ECHO */ @@ -2566,9 +2566,9 @@ diff -aurN linux-5.4/include/uapi/linux/if.h mptcp-mptcp_trunk/include/uapi/linu #define IFF_VOLATILE (IFF_LOOPBACK|IFF_POINTOPOINT|IFF_BROADCAST|IFF_ECHO|\ IFF_MASTER|IFF_SLAVE|IFF_RUNNING|IFF_LOWER_UP|IFF_DORMANT) -diff -aurN linux-5.4/include/uapi/linux/in.h mptcp-mptcp_trunk/include/uapi/linux/in.h ---- linux-5.4/include/uapi/linux/in.h 2019-11-25 01:32:01.000000000 +0100 -+++ mptcp-mptcp_trunk/include/uapi/linux/in.h 2020-07-14 19:34:59.000000000 +0200 +diff -aurN linux-5.4.64/include/uapi/linux/in.h linux-5.4.64.mptcp/include/uapi/linux/in.h +--- linux-5.4.64/include/uapi/linux/in.h 2020-09-09 19:12:37.000000000 +0200 ++++ linux-5.4.64.mptcp/include/uapi/linux/in.h 2020-09-10 19:25:10.499221003 +0200 @@ -76,6 +76,8 @@ #define IPPROTO_MPLS IPPROTO_MPLS IPPROTO_RAW = 255, /* Raw IP packets */ @@ -2578,9 +2578,9 @@ diff -aurN linux-5.4/include/uapi/linux/in.h mptcp-mptcp_trunk/include/uapi/linu IPPROTO_MAX }; #endif -diff -aurN linux-5.4/include/uapi/linux/mptcp.h mptcp-mptcp_trunk/include/uapi/linux/mptcp.h ---- linux-5.4/include/uapi/linux/mptcp.h 1970-01-01 01:00:00.000000000 +0100 -+++ mptcp-mptcp_trunk/include/uapi/linux/mptcp.h 2020-07-14 19:34:59.000000000 +0200 +diff -aurN linux-5.4.64/include/uapi/linux/mptcp.h linux-5.4.64.mptcp/include/uapi/linux/mptcp.h +--- linux-5.4.64/include/uapi/linux/mptcp.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-5.4.64.mptcp/include/uapi/linux/mptcp.h 2020-09-10 19:25:10.499221003 +0200 @@ -0,0 +1,149 @@ +/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ +/* @@ -2731,9 +2731,9 @@ diff -aurN linux-5.4/include/uapi/linux/mptcp.h mptcp-mptcp_trunk/include/uapi/l +}; + +#endif /* _LINUX_MPTCP_H */ -diff -aurN linux-5.4/include/uapi/linux/tcp.h mptcp-mptcp_trunk/include/uapi/linux/tcp.h ---- linux-5.4/include/uapi/linux/tcp.h 2019-11-25 01:32:01.000000000 +0100 -+++ mptcp-mptcp_trunk/include/uapi/linux/tcp.h 2020-07-14 19:34:59.000000000 +0200 +diff -aurN linux-5.4.64/include/uapi/linux/tcp.h linux-5.4.64.mptcp/include/uapi/linux/tcp.h +--- linux-5.4.64/include/uapi/linux/tcp.h 2020-09-09 19:12:37.000000000 +0200 ++++ linux-5.4.64.mptcp/include/uapi/linux/tcp.h 2020-09-10 19:25:10.499221003 +0200 @@ -18,9 +18,15 @@ #ifndef _UAPI_LINUX_TCP_H #define _UAPI_LINUX_TCP_H @@ -2819,10 +2819,10 @@ diff -aurN linux-5.4/include/uapi/linux/tcp.h mptcp-mptcp_trunk/include/uapi/lin /* for TCP_MD5SIG socket option */ #define TCP_MD5SIG_MAXKEYLEN 80 -diff -aurN linux-5.4/net/core/dev.c mptcp-mptcp_trunk/net/core/dev.c ---- linux-5.4/net/core/dev.c 2019-11-25 01:32:01.000000000 +0100 -+++ mptcp-mptcp_trunk/net/core/dev.c 2020-07-14 19:34:59.000000000 +0200 -@@ -7855,7 +7855,7 @@ +diff -aurN linux-5.4.64/net/core/dev.c linux-5.4.64.mptcp/net/core/dev.c +--- linux-5.4.64/net/core/dev.c 2020-09-09 19:12:37.000000000 +0200 ++++ linux-5.4.64.mptcp/net/core/dev.c 2020-09-10 19:25:10.503220935 +0200 +@@ -7851,7 +7851,7 @@ dev->flags = (flags & (IFF_DEBUG | IFF_NOTRAILERS | IFF_NOARP | IFF_DYNAMIC | IFF_MULTICAST | IFF_PORTSEL | @@ -2831,18 +2831,18 @@ diff -aurN linux-5.4/net/core/dev.c mptcp-mptcp_trunk/net/core/dev.c (dev->flags & (IFF_UP | IFF_VOLATILE | IFF_PROMISC | IFF_ALLMULTI)); -diff -aurN linux-5.4/net/core/net-traces.c mptcp-mptcp_trunk/net/core/net-traces.c ---- linux-5.4/net/core/net-traces.c 2019-11-25 01:32:01.000000000 +0100 -+++ mptcp-mptcp_trunk/net/core/net-traces.c 2020-07-14 19:34:59.000000000 +0200 +diff -aurN linux-5.4.64/net/core/net-traces.c linux-5.4.64.mptcp/net/core/net-traces.c +--- linux-5.4.64/net/core/net-traces.c 2020-09-09 19:12:37.000000000 +0200 ++++ linux-5.4.64.mptcp/net/core/net-traces.c 2020-09-10 19:25:10.503220935 +0200 @@ -60,3 +60,5 @@ EXPORT_TRACEPOINT_SYMBOL_GPL(napi_poll); EXPORT_TRACEPOINT_SYMBOL_GPL(tcp_send_reset); + +EXPORT_TRACEPOINT_SYMBOL_GPL(mptcp_retransmit); -diff -aurN linux-5.4/net/core/skbuff.c mptcp-mptcp_trunk/net/core/skbuff.c ---- linux-5.4/net/core/skbuff.c 2019-11-25 01:32:01.000000000 +0100 -+++ mptcp-mptcp_trunk/net/core/skbuff.c 2020-07-14 19:34:59.000000000 +0200 +diff -aurN linux-5.4.64/net/core/skbuff.c linux-5.4.64.mptcp/net/core/skbuff.c +--- linux-5.4.64/net/core/skbuff.c 2020-09-09 19:12:37.000000000 +0200 ++++ linux-5.4.64.mptcp/net/core/skbuff.c 2020-09-10 19:25:10.503220935 +0200 @@ -573,7 +573,7 @@ skb_drop_list(&skb_shinfo(skb)->frag_list); } @@ -2852,9 +2852,9 @@ diff -aurN linux-5.4/net/core/skbuff.c mptcp-mptcp_trunk/net/core/skbuff.c { struct sk_buff *list; -diff -aurN linux-5.4/net/core/sock.c mptcp-mptcp_trunk/net/core/sock.c ---- linux-5.4/net/core/sock.c 2019-11-25 01:32:01.000000000 +0100 -+++ mptcp-mptcp_trunk/net/core/sock.c 2020-07-14 19:34:59.000000000 +0200 +diff -aurN linux-5.4.64/net/core/sock.c linux-5.4.64.mptcp/net/core/sock.c +--- linux-5.4.64/net/core/sock.c 2020-09-09 19:12:37.000000000 +0200 ++++ linux-5.4.64.mptcp/net/core/sock.c 2020-09-10 19:26:53.689504155 +0200 @@ -135,6 +135,11 @@ #include @@ -2906,15 +2906,18 @@ diff -aurN linux-5.4/net/core/sock.c mptcp-mptcp_trunk/net/core/sock.c } else sk = kmalloc(prot->obj_size, priority); -@@ -1832,4 +1858,5 @@ +@@ -1832,7 +1858,7 @@ + newsk->sk_userlocks = sk->sk_userlocks & ~SOCK_BINDPORT_LOCK; atomic_set(&newsk->sk_zckey, 0); - sock_reset_flag(newsk, SOCK_DONE); +- sock_reset_flag(newsk, SOCK_DONE); + sock_reset_flag(newsk, SOCK_MPTCP); -diff -aurN linux-5.4/net/ipv4/af_inet.c mptcp-mptcp_trunk/net/ipv4/af_inet.c ---- linux-5.4/net/ipv4/af_inet.c 2019-11-25 01:32:01.000000000 +0100 -+++ mptcp-mptcp_trunk/net/ipv4/af_inet.c 2020-07-14 19:34:59.000000000 +0200 + /* sk->sk_memcg will be populated at accept() time */ + newsk->sk_memcg = NULL; +diff -aurN linux-5.4.64/net/ipv4/af_inet.c linux-5.4.64.mptcp/net/ipv4/af_inet.c +--- linux-5.4.64/net/ipv4/af_inet.c 2020-09-09 19:12:37.000000000 +0200 ++++ linux-5.4.64.mptcp/net/ipv4/af_inet.c 2020-09-10 19:25:10.503220935 +0200 @@ -100,6 +100,7 @@ #include #include @@ -2987,9 +2990,9 @@ diff -aurN linux-5.4/net/ipv4/af_inet.c mptcp-mptcp_trunk/net/ipv4/af_inet.c /* Setup TCP slab cache for open requests. */ tcp_init(); -diff -aurN linux-5.4/net/ipv4/inet_connection_sock.c mptcp-mptcp_trunk/net/ipv4/inet_connection_sock.c ---- linux-5.4/net/ipv4/inet_connection_sock.c 2019-11-25 01:32:01.000000000 +0100 -+++ mptcp-mptcp_trunk/net/ipv4/inet_connection_sock.c 2020-07-14 19:34:59.000000000 +0200 +diff -aurN linux-5.4.64/net/ipv4/inet_connection_sock.c linux-5.4.64.mptcp/net/ipv4/inet_connection_sock.c +--- linux-5.4.64/net/ipv4/inet_connection_sock.c 2020-09-09 19:12:37.000000000 +0200 ++++ linux-5.4.64.mptcp/net/ipv4/inet_connection_sock.c 2020-09-10 19:25:10.503220935 +0200 @@ -19,6 +19,7 @@ #include #include @@ -2998,7 +3001,7 @@ diff -aurN linux-5.4/net/ipv4/inet_connection_sock.c mptcp-mptcp_trunk/net/ipv4/ #include #include #include -@@ -693,7 +694,10 @@ +@@ -727,7 +728,10 @@ int max_retries, thresh; u8 defer_accept; @@ -3010,7 +3013,7 @@ diff -aurN linux-5.4/net/ipv4/inet_connection_sock.c mptcp-mptcp_trunk/net/ipv4/ goto drop; max_retries = icsk->icsk_syn_retries ? : net->ipv4.sysctl_tcp_synack_retries; -@@ -782,7 +786,9 @@ +@@ -816,7 +820,9 @@ const struct request_sock *req, const gfp_t priority) { @@ -3021,7 +3024,7 @@ diff -aurN linux-5.4/net/ipv4/inet_connection_sock.c mptcp-mptcp_trunk/net/ipv4/ if (newsk) { struct inet_connection_sock *newicsk = inet_csk(newsk); -@@ -981,7 +987,14 @@ +@@ -1015,7 +1021,14 @@ */ while ((req = reqsk_queue_remove(queue, sk)) != NULL) { struct sock *child = req->sk; @@ -3036,7 +3039,7 @@ diff -aurN linux-5.4/net/ipv4/inet_connection_sock.c mptcp-mptcp_trunk/net/ipv4/ local_bh_disable(); bh_lock_sock(child); WARN_ON(sock_owned_by_user(child)); -@@ -991,6 +1004,10 @@ +@@ -1025,6 +1038,10 @@ reqsk_put(req); bh_unlock_sock(child); local_bh_enable(); @@ -3047,9 +3050,9 @@ diff -aurN linux-5.4/net/ipv4/inet_connection_sock.c mptcp-mptcp_trunk/net/ipv4/ sock_put(child); cond_resched(); -diff -aurN linux-5.4/net/ipv4/ip_sockglue.c mptcp-mptcp_trunk/net/ipv4/ip_sockglue.c ---- linux-5.4/net/ipv4/ip_sockglue.c 2019-11-25 01:32:01.000000000 +0100 -+++ mptcp-mptcp_trunk/net/ipv4/ip_sockglue.c 2020-07-14 19:34:59.000000000 +0200 +diff -aurN linux-5.4.64/net/ipv4/ip_sockglue.c linux-5.4.64.mptcp/net/ipv4/ip_sockglue.c +--- linux-5.4.64/net/ipv4/ip_sockglue.c 2020-09-09 19:12:37.000000000 +0200 ++++ linux-5.4.64.mptcp/net/ipv4/ip_sockglue.c 2020-09-10 19:25:10.503220935 +0200 @@ -44,6 +44,8 @@ #endif #include @@ -3089,10 +3092,10 @@ diff -aurN linux-5.4/net/ipv4/ip_sockglue.c mptcp-mptcp_trunk/net/ipv4/ip_sockgl } break; case IP_TTL: -diff -aurN linux-5.4/net/ipv4/Kconfig mptcp-mptcp_trunk/net/ipv4/Kconfig ---- linux-5.4/net/ipv4/Kconfig 2019-11-25 01:32:01.000000000 +0100 -+++ mptcp-mptcp_trunk/net/ipv4/Kconfig 2020-07-14 19:34:59.000000000 +0200 -@@ -654,6 +654,51 @@ +diff -aurN linux-5.4.64/net/ipv4/Kconfig linux-5.4.64.mptcp/net/ipv4/Kconfig +--- linux-5.4.64/net/ipv4/Kconfig 2020-09-09 19:12:37.000000000 +0200 ++++ linux-5.4.64.mptcp/net/ipv4/Kconfig 2020-09-10 19:25:10.503220935 +0200 +@@ -655,6 +655,51 @@ bufferbloat, policers, or AQM schemes that do not provide a delay signal. It requires the fq ("Fair Queue") pacing packet scheduler. @@ -3144,7 +3147,7 @@ diff -aurN linux-5.4/net/ipv4/Kconfig mptcp-mptcp_trunk/net/ipv4/Kconfig choice prompt "Default TCP congestion control" default DEFAULT_CUBIC -@@ -691,6 +736,21 @@ +@@ -692,6 +737,21 @@ config DEFAULT_BBR bool "BBR" if TCP_CONG_BBR=y @@ -3166,7 +3169,7 @@ diff -aurN linux-5.4/net/ipv4/Kconfig mptcp-mptcp_trunk/net/ipv4/Kconfig config DEFAULT_RENO bool "Reno" endchoice -@@ -711,6 +771,10 @@ +@@ -712,6 +772,10 @@ default "vegas" if DEFAULT_VEGAS default "westwood" if DEFAULT_WESTWOOD default "veno" if DEFAULT_VENO @@ -3177,9 +3180,9 @@ diff -aurN linux-5.4/net/ipv4/Kconfig mptcp-mptcp_trunk/net/ipv4/Kconfig default "reno" if DEFAULT_RENO default "dctcp" if DEFAULT_DCTCP default "cdg" if DEFAULT_CDG -diff -aurN linux-5.4/net/ipv4/syncookies.c mptcp-mptcp_trunk/net/ipv4/syncookies.c ---- linux-5.4/net/ipv4/syncookies.c 2019-11-25 01:32:01.000000000 +0100 -+++ mptcp-mptcp_trunk/net/ipv4/syncookies.c 2020-07-14 19:34:59.000000000 +0200 +diff -aurN linux-5.4.64/net/ipv4/syncookies.c linux-5.4.64.mptcp/net/ipv4/syncookies.c +--- linux-5.4.64/net/ipv4/syncookies.c 2020-09-09 19:12:37.000000000 +0200 ++++ linux-5.4.64.mptcp/net/ipv4/syncookies.c 2020-09-10 19:25:10.503220935 +0200 @@ -12,6 +12,8 @@ #include #include @@ -3305,9 +3308,9 @@ diff -aurN linux-5.4/net/ipv4/syncookies.c mptcp-mptcp_trunk/net/ipv4/syncookies /* ip_queue_xmit() depends on our flow being setup * Normal sockets get it right from inet_csk_route_child_sock() */ -diff -aurN linux-5.4/net/ipv4/tcp.c mptcp-mptcp_trunk/net/ipv4/tcp.c ---- linux-5.4/net/ipv4/tcp.c 2019-11-25 01:32:01.000000000 +0100 -+++ mptcp-mptcp_trunk/net/ipv4/tcp.c 2020-07-14 19:34:59.000000000 +0200 +diff -aurN linux-5.4.64/net/ipv4/tcp.c linux-5.4.64.mptcp/net/ipv4/tcp.c +--- linux-5.4.64/net/ipv4/tcp.c 2020-09-09 19:12:37.000000000 +0200 ++++ linux-5.4.64.mptcp/net/ipv4/tcp.c 2020-09-10 19:44:12.204220735 +0200 @@ -270,6 +270,7 @@ #include @@ -3352,7 +3355,7 @@ diff -aurN linux-5.4/net/ipv4/tcp.c mptcp-mptcp_trunk/net/ipv4/tcp.c sk_sockets_allocated_inc(sk); sk->sk_route_forced_caps = NETIF_F_GSO; } -@@ -777,6 +800,7 @@ +@@ -785,6 +808,7 @@ int ret; sock_rps_record_flow(sk); @@ -3360,7 +3363,7 @@ diff -aurN linux-5.4/net/ipv4/tcp.c mptcp-mptcp_trunk/net/ipv4/tcp.c /* * We can't seek on a socket input */ -@@ -787,6 +811,16 @@ +@@ -795,6 +819,16 @@ lock_sock(sk); @@ -3377,7 +3380,7 @@ diff -aurN linux-5.4/net/ipv4/tcp.c mptcp-mptcp_trunk/net/ipv4/tcp.c timeo = sock_rcvtimeo(sk, sock->file->f_flags & O_NONBLOCK); while (tss.len) { ret = __tcp_splice_read(sk, &tss); -@@ -902,8 +936,7 @@ +@@ -910,8 +944,7 @@ return NULL; } @@ -3387,7 +3390,7 @@ diff -aurN linux-5.4/net/ipv4/tcp.c mptcp-mptcp_trunk/net/ipv4/tcp.c { struct tcp_sock *tp = tcp_sk(sk); u32 new_size_goal, size_goal; -@@ -931,8 +964,13 @@ +@@ -939,8 +972,13 @@ { int mss_now; @@ -3403,7 +3406,7 @@ diff -aurN linux-5.4/net/ipv4/tcp.c mptcp-mptcp_trunk/net/ipv4/tcp.c return mss_now; } -@@ -971,12 +1009,34 @@ +@@ -979,12 +1017,34 @@ * is fully established. */ if (((1 << sk->sk_state) & ~(TCPF_ESTABLISHED | TCPF_CLOSE_WAIT)) && @@ -3439,7 +3442,7 @@ diff -aurN linux-5.4/net/ipv4/tcp.c mptcp-mptcp_trunk/net/ipv4/tcp.c sk_clear_bit(SOCKWQ_ASYNC_NOSPACE, sk); mss_now = tcp_send_mss(sk, &size_goal, flags); -@@ -1099,7 +1159,8 @@ +@@ -1106,7 +1166,8 @@ int tcp_sendpage_locked(struct sock *sk, struct page *page, int offset, size_t size, int flags) { @@ -3449,7 +3452,7 @@ diff -aurN linux-5.4/net/ipv4/tcp.c mptcp-mptcp_trunk/net/ipv4/tcp.c return sock_no_sendpage_locked(sk, page, offset, size, flags); tcp_rate_check_app_limited(sk); /* is sending application-limited? */ -@@ -1221,12 +1282,21 @@ +@@ -1228,12 +1289,21 @@ * is fully established. */ if (((1 << sk->sk_state) & ~(TCPF_ESTABLISHED | TCPF_CLOSE_WAIT)) && @@ -3472,7 +3475,7 @@ diff -aurN linux-5.4/net/ipv4/tcp.c mptcp-mptcp_trunk/net/ipv4/tcp.c if (unlikely(tp->repair)) { if (tp->repair_queue == TCP_RECV_QUEUE) { copied = tcp_send_rcvq(sk, msg, size); -@@ -1520,7 +1590,7 @@ +@@ -1526,7 +1596,7 @@ * calculation of whether or not we must ACK for the sake of * a window update. */ @@ -3481,7 +3484,7 @@ diff -aurN linux-5.4/net/ipv4/tcp.c mptcp-mptcp_trunk/net/ipv4/tcp.c { struct tcp_sock *tp = tcp_sk(sk); bool time_to_ack = false; -@@ -1563,7 +1633,7 @@ +@@ -1569,7 +1639,7 @@ /* Optimize, __tcp_select_window() is not cheap. */ if (2*rcv_window_now <= tp->window_clamp) { @@ -3490,7 +3493,7 @@ diff -aurN linux-5.4/net/ipv4/tcp.c mptcp-mptcp_trunk/net/ipv4/tcp.c /* Send ACK now, if this read freed lots of space * in our buffer. Certainly, new_window is new window. -@@ -1679,7 +1749,7 @@ +@@ -1685,7 +1755,7 @@ /* Clean up data we have read: This will do ACK frames. */ if (copied > 0) { tcp_recv_skb(sk, seq, &offset); @@ -3499,7 +3502,7 @@ diff -aurN linux-5.4/net/ipv4/tcp.c mptcp-mptcp_trunk/net/ipv4/tcp.c } return copied; } -@@ -1970,6 +2040,16 @@ +@@ -1976,6 +2046,16 @@ lock_sock(sk); @@ -3516,7 +3519,7 @@ diff -aurN linux-5.4/net/ipv4/tcp.c mptcp-mptcp_trunk/net/ipv4/tcp.c err = -ENOTCONN; if (sk->sk_state == TCP_LISTEN) goto out; -@@ -2088,7 +2168,7 @@ +@@ -2094,7 +2174,7 @@ } } @@ -3525,7 +3528,7 @@ diff -aurN linux-5.4/net/ipv4/tcp.c mptcp-mptcp_trunk/net/ipv4/tcp.c if (copied >= target) { /* Do not sleep, just process backlog. */ -@@ -2179,7 +2259,7 @@ +@@ -2186,7 +2266,7 @@ */ /* Clean up data we have read: This will do ACK frames. */ @@ -3534,7 +3537,7 @@ diff -aurN linux-5.4/net/ipv4/tcp.c mptcp-mptcp_trunk/net/ipv4/tcp.c release_sock(sk); -@@ -2238,8 +2318,11 @@ +@@ -2245,8 +2325,11 @@ switch (state) { case TCP_ESTABLISHED: @@ -3547,7 +3550,7 @@ diff -aurN linux-5.4/net/ipv4/tcp.c mptcp-mptcp_trunk/net/ipv4/tcp.c break; case TCP_CLOSE: -@@ -2252,8 +2335,11 @@ +@@ -2259,8 +2342,11 @@ inet_put_port(sk); /* fall through */ default: @@ -3560,7 +3563,7 @@ diff -aurN linux-5.4/net/ipv4/tcp.c mptcp-mptcp_trunk/net/ipv4/tcp.c } /* Change state AFTER socket is unhashed to avoid closed -@@ -2287,7 +2373,7 @@ +@@ -2294,7 +2380,7 @@ [TCP_NEW_SYN_RECV] = TCP_CLOSE, /* should not happen ! */ }; @@ -3569,7 +3572,7 @@ diff -aurN linux-5.4/net/ipv4/tcp.c mptcp-mptcp_trunk/net/ipv4/tcp.c { int next = (int)new_state[sk->sk_state]; int ns = next & TCP_STATE_MASK; -@@ -2317,7 +2403,7 @@ +@@ -2324,7 +2410,7 @@ TCPF_SYN_RECV | TCPF_CLOSE_WAIT)) { /* Clear out any half completed packets. FIN if needed. */ if (tcp_close_state(sk)) @@ -3578,7 +3581,7 @@ diff -aurN linux-5.4/net/ipv4/tcp.c mptcp-mptcp_trunk/net/ipv4/tcp.c } } EXPORT_SYMBOL(tcp_shutdown); -@@ -2342,6 +2428,17 @@ +@@ -2349,6 +2435,17 @@ int data_was_unread = 0; int state; @@ -3596,7 +3599,7 @@ diff -aurN linux-5.4/net/ipv4/tcp.c mptcp-mptcp_trunk/net/ipv4/tcp.c lock_sock(sk); sk->sk_shutdown = SHUTDOWN_MASK; -@@ -2386,7 +2483,7 @@ +@@ -2393,7 +2490,7 @@ /* Unread data was tossed, zap the connection. */ NET_INC_STATS(sock_net(sk), LINUX_MIB_TCPABORTONCLOSE); tcp_set_state(sk, TCP_CLOSE); @@ -3605,7 +3608,7 @@ diff -aurN linux-5.4/net/ipv4/tcp.c mptcp-mptcp_trunk/net/ipv4/tcp.c } else if (sock_flag(sk, SOCK_LINGER) && !sk->sk_lingertime) { /* Check zero linger _after_ checking for unread data. */ sk->sk_prot->disconnect(sk, 0); -@@ -2460,7 +2557,7 @@ +@@ -2467,7 +2564,7 @@ struct tcp_sock *tp = tcp_sk(sk); if (tp->linger2 < 0) { tcp_set_state(sk, TCP_CLOSE); @@ -3614,7 +3617,7 @@ diff -aurN linux-5.4/net/ipv4/tcp.c mptcp-mptcp_trunk/net/ipv4/tcp.c __NET_INC_STATS(sock_net(sk), LINUX_MIB_TCPABORTONLINGER); } else { -@@ -2470,7 +2567,8 @@ +@@ -2477,7 +2574,8 @@ inet_csk_reset_keepalive_timer(sk, tmo - TCP_TIMEWAIT_LEN); } else { @@ -3624,7 +3627,7 @@ diff -aurN linux-5.4/net/ipv4/tcp.c mptcp-mptcp_trunk/net/ipv4/tcp.c goto out; } } -@@ -2479,7 +2577,7 @@ +@@ -2486,7 +2584,7 @@ sk_mem_reclaim(sk); if (tcp_check_oom(sk, 0)) { tcp_set_state(sk, TCP_CLOSE); @@ -3633,7 +3636,7 @@ diff -aurN linux-5.4/net/ipv4/tcp.c mptcp-mptcp_trunk/net/ipv4/tcp.c __NET_INC_STATS(sock_net(sk), LINUX_MIB_TCPABORTONMEMORY); } else if (!check_net(sock_net(sk))) { -@@ -2511,15 +2609,6 @@ +@@ -2518,15 +2616,6 @@ } EXPORT_SYMBOL(tcp_close); @@ -3649,7 +3652,7 @@ diff -aurN linux-5.4/net/ipv4/tcp.c mptcp-mptcp_trunk/net/ipv4/tcp.c static void tcp_rtx_queue_purge(struct sock *sk) { struct rb_node *p = rb_first(&sk->tcp_rtx_queue); -@@ -2540,6 +2629,10 @@ +@@ -2548,6 +2637,10 @@ { struct sk_buff *skb; @@ -3660,7 +3663,7 @@ diff -aurN linux-5.4/net/ipv4/tcp.c mptcp-mptcp_trunk/net/ipv4/tcp.c tcp_chrono_stop(sk, TCP_CHRONO_BUSY); while ((skb = __skb_dequeue(&sk->sk_write_queue)) != NULL) { tcp_skb_tsorted_anchor_cleanup(skb); -@@ -2558,6 +2651,29 @@ +@@ -2566,6 +2659,35 @@ inet_csk(sk)->icsk_backoff = 0; } @@ -3676,6 +3679,7 @@ diff -aurN linux-5.4/net/ipv4/tcp.c mptcp-mptcp_trunk/net/ipv4/tcp.c + tp->snd_ssthresh = TCP_INFINITE_SSTHRESH; + tp->snd_cwnd = TCP_INIT_CWND; + tp->snd_cwnd_cnt = 0; ++ tp->delivered = 0; + tp->delivered_ce = 0; + tp->is_sack_reneg = 0; + tcp_clear_retrans(tp); @@ -3683,6 +3687,11 @@ diff -aurN linux-5.4/net/ipv4/tcp.c mptcp-mptcp_trunk/net/ipv4/tcp.c + tp->bytes_acked = 0; + tp->bytes_received = 0; + tp->bytes_retrans = 0; ++ tp->total_retrans = 0; ++ tp->segs_in = 0; ++ tp->segs_out = 0; ++ tp->data_segs_in = 0; ++ tp->data_segs_out = 0; + /* There's a bubble in the pipe until at least the first ACK. */ + tp->app_limited = ~0U; +} @@ -3690,7 +3699,7 @@ diff -aurN linux-5.4/net/ipv4/tcp.c mptcp-mptcp_trunk/net/ipv4/tcp.c int tcp_disconnect(struct sock *sk, int flags) { struct inet_sock *inet = inet_sk(sk); -@@ -2580,7 +2696,7 @@ +@@ -2588,7 +2710,7 @@ /* The last check adjusts for discrepancy of Linux wrt. RFC * states */ @@ -3699,7 +3708,7 @@ diff -aurN linux-5.4/net/ipv4/tcp.c mptcp-mptcp_trunk/net/ipv4/tcp.c sk->sk_err = ECONNRESET; } else if (old_state == TCP_SYN_SENT) sk->sk_err = ECONNRESET; -@@ -2602,11 +2718,15 @@ +@@ -2610,11 +2732,15 @@ if (!(sk->sk_userlocks & SOCK_BINDADDR_LOCK)) inet_reset_saddr(sk); @@ -3718,7 +3727,7 @@ diff -aurN linux-5.4/net/ipv4/tcp.c mptcp-mptcp_trunk/net/ipv4/tcp.c seq = tp->write_seq + tp->max_window + 2; if (!seq) -@@ -2616,17 +2736,11 @@ +@@ -2624,20 +2750,14 @@ icsk->icsk_backoff = 0; tp->snd_cwnd = 2; icsk->icsk_probes_out = 0; @@ -3732,6 +3741,9 @@ diff -aurN linux-5.4/net/ipv4/tcp.c mptcp-mptcp_trunk/net/ipv4/tcp.c + + tcp_reset_vars(sk); + + if (icsk->icsk_ca_ops->release) + icsk->icsk_ca_ops->release(sk); + memset(icsk->icsk_ca_priv, 0, sizeof(icsk->icsk_ca_priv)); tcp_set_ca_state(sk, TCP_CA_Open); - tp->is_sack_reneg = 0; - tcp_clear_retrans(tp); @@ -3739,22 +3751,22 @@ diff -aurN linux-5.4/net/ipv4/tcp.c mptcp-mptcp_trunk/net/ipv4/tcp.c inet_csk_delack_init(sk); /* Initialize rcv_mss to TCP_MIN_MSS to avoid division by 0 * issue in __tcp_select_window() -@@ -2636,14 +2752,10 @@ +@@ -2649,14 +2769,6 @@ sk->sk_rx_dst = NULL; tcp_saved_syn_free(tp); tp->compressed_ack = 0; - tp->segs_in = 0; - tp->segs_out = 0; +- tp->segs_in = 0; +- tp->segs_out = 0; - tp->bytes_sent = 0; - tp->bytes_acked = 0; - tp->bytes_received = 0; - tp->bytes_retrans = 0; - tp->data_segs_in = 0; - tp->data_segs_out = 0; +- tp->data_segs_in = 0; +- tp->data_segs_out = 0; tp->duplicate_sack[0].start_seq = 0; tp->duplicate_sack[0].end_seq = 0; tp->dsack_dups = 0; -@@ -2648,8 +2760,6 @@ +@@ -2665,8 +2777,6 @@ tp->sacked_out = 0; tp->tlp_high_seq = 0; tp->last_oow_ack_time = 0; @@ -3763,7 +3775,7 @@ diff -aurN linux-5.4/net/ipv4/tcp.c mptcp-mptcp_trunk/net/ipv4/tcp.c tp->rack.mstamp = 0; tp->rack.advanced = 0; tp->rack.reo_wnd_steps = 1; -@@ -2683,7 +2793,7 @@ +@@ -2700,7 +2810,7 @@ static inline bool tcp_can_repair_sock(const struct sock *sk) { return ns_capable(sock_net(sk)->user_ns, CAP_NET_ADMIN) && @@ -3772,7 +3784,7 @@ diff -aurN linux-5.4/net/ipv4/tcp.c mptcp-mptcp_trunk/net/ipv4/tcp.c } static int tcp_repair_set_window(struct tcp_sock *tp, char __user *optbuf, int len) -@@ -2852,6 +2962,61 @@ +@@ -2869,6 +2979,61 @@ return tcp_fastopen_reset_cipher(net, sk, key, backup_key); } @@ -3834,7 +3846,7 @@ diff -aurN linux-5.4/net/ipv4/tcp.c mptcp-mptcp_trunk/net/ipv4/tcp.c default: /* fallthru */ break; -@@ -3032,6 +3197,12 @@ +@@ -3051,6 +3216,12 @@ break; case TCP_DEFER_ACCEPT: @@ -3847,7 +3859,7 @@ diff -aurN linux-5.4/net/ipv4/tcp.c mptcp-mptcp_trunk/net/ipv4/tcp.c /* Translate value in seconds to number of retransmits */ icsk->icsk_accept_queue.rskq_defer_accept = secs_to_retrans(val, TCP_TIMEOUT_INIT / HZ, -@@ -3059,7 +3230,7 @@ +@@ -3078,7 +3249,7 @@ (TCPF_ESTABLISHED | TCPF_CLOSE_WAIT) && inet_csk_ack_scheduled(sk)) { icsk->icsk_ack.pending |= ICSK_ACK_PUSHED; @@ -3856,16 +3868,7 @@ diff -aurN linux-5.4/net/ipv4/tcp.c mptcp-mptcp_trunk/net/ipv4/tcp.c if (!(val & 1)) inet_csk_enter_pingpong_mode(sk); } -@@ -3069,7 +3240,7 @@ - #ifdef CONFIG_TCP_MD5SIG - case TCP_MD5SIG: - case TCP_MD5SIG_EXT: -- if ((1 << sk->sk_state) & (TCPF_CLOSE | TCPF_LISTEN)) -+ if ((1 << sk->sk_state) & (TCPF_CLOSE | TCPF_LISTEN) && !sock_flag(sk, SOCK_MPTCP)) - err = tp->af_specific->md5_parse(sk, optname, optval, optlen); - else - err = -EINVAL; -@@ -3128,6 +3299,32 @@ +@@ -3144,6 +3315,32 @@ tp->notsent_lowat = val; sk->sk_write_space(sk); break; @@ -3898,7 +3901,7 @@ diff -aurN linux-5.4/net/ipv4/tcp.c mptcp-mptcp_trunk/net/ipv4/tcp.c case TCP_INQ: if (val > 1 || val < 0) err = -EINVAL; -@@ -3192,7 +3389,7 @@ +@@ -3208,7 +3405,7 @@ } /* Return information about state of tcp endpoint in API format. */ @@ -3907,7 +3910,7 @@ diff -aurN linux-5.4/net/ipv4/tcp.c mptcp-mptcp_trunk/net/ipv4/tcp.c { const struct tcp_sock *tp = tcp_sk(sk); /* iff sk_type == SOCK_STREAM */ const struct inet_connection_sock *icsk = inet_csk(sk); -@@ -3229,7 +3426,8 @@ +@@ -3245,7 +3442,8 @@ return; } @@ -3917,7 +3920,7 @@ diff -aurN linux-5.4/net/ipv4/tcp.c mptcp-mptcp_trunk/net/ipv4/tcp.c info->tcpi_ca_state = icsk->icsk_ca_state; info->tcpi_retransmits = icsk->icsk_retransmits; -@@ -3305,7 +3503,9 @@ +@@ -3321,7 +3519,9 @@ info->tcpi_reord_seen = tp->reord_seen; info->tcpi_rcv_ooopack = tp->rcv_ooopack; info->tcpi_snd_wnd = tp->snd_wnd; @@ -3928,7 +3931,7 @@ diff -aurN linux-5.4/net/ipv4/tcp.c mptcp-mptcp_trunk/net/ipv4/tcp.c } EXPORT_SYMBOL_GPL(tcp_get_info); -@@ -3452,7 +3652,7 @@ +@@ -3468,7 +3668,7 @@ if (get_user(len, optlen)) return -EFAULT; @@ -3937,7 +3940,7 @@ diff -aurN linux-5.4/net/ipv4/tcp.c mptcp-mptcp_trunk/net/ipv4/tcp.c len = min_t(unsigned int, len, sizeof(info)); if (put_user(len, optlen)) -@@ -3649,6 +3849,87 @@ +@@ -3657,6 +3857,87 @@ } return 0; } @@ -4025,7 +4028,7 @@ diff -aurN linux-5.4/net/ipv4/tcp.c mptcp-mptcp_trunk/net/ipv4/tcp.c #ifdef CONFIG_MMU case TCP_ZEROCOPY_RECEIVE: { struct tcp_zerocopy_receive zc; -@@ -3851,7 +4132,9 @@ +@@ -3862,7 +4143,9 @@ if (sk->sk_state == TCP_SYN_SENT || sk->sk_state == TCP_SYN_RECV) TCP_INC_STATS(sock_net(sk), TCP_MIB_ATTEMPTFAILS); @@ -4035,7 +4038,7 @@ diff -aurN linux-5.4/net/ipv4/tcp.c mptcp-mptcp_trunk/net/ipv4/tcp.c tcp_clear_xmit_timers(sk); if (req) reqsk_fastopen_remove(sk, req, false); -@@ -3867,6 +4150,8 @@ +@@ -3878,6 +4161,8 @@ int tcp_abort(struct sock *sk, int err) { @@ -4044,7 +4047,7 @@ diff -aurN linux-5.4/net/ipv4/tcp.c mptcp-mptcp_trunk/net/ipv4/tcp.c if (!sk_fullsock(sk)) { if (sk->sk_state == TCP_NEW_SYN_RECV) { struct request_sock *req = inet_reqsk(sk); -@@ -3880,7 +4165,7 @@ +@@ -3891,7 +4176,7 @@ } /* Don't race with userspace socket closes such as tcp_close. */ @@ -4053,7 +4056,7 @@ diff -aurN linux-5.4/net/ipv4/tcp.c mptcp-mptcp_trunk/net/ipv4/tcp.c if (sk->sk_state == TCP_LISTEN) { tcp_set_state(sk, TCP_CLOSE); -@@ -3889,7 +4174,7 @@ +@@ -3900,7 +4185,7 @@ /* Don't race with BH socket closes such as inet_csk_listen_stop. */ local_bh_disable(); @@ -4062,7 +4065,7 @@ diff -aurN linux-5.4/net/ipv4/tcp.c mptcp-mptcp_trunk/net/ipv4/tcp.c if (!sock_flag(sk, SOCK_DEAD)) { sk->sk_err = err; -@@ -3897,14 +4182,14 @@ +@@ -3908,14 +4193,14 @@ smp_wmb(); sk->sk_error_report(sk); if (tcp_need_reset(sk->sk_state)) @@ -4080,9 +4083,9 @@ diff -aurN linux-5.4/net/ipv4/tcp.c mptcp-mptcp_trunk/net/ipv4/tcp.c return 0; } EXPORT_SYMBOL_GPL(tcp_abort); -diff -aurN linux-5.4/net/ipv4/tcp_cong.c mptcp-mptcp_trunk/net/ipv4/tcp_cong.c ---- linux-5.4/net/ipv4/tcp_cong.c 2019-11-25 01:32:01.000000000 +0100 -+++ mptcp-mptcp_trunk/net/ipv4/tcp_cong.c 2020-07-14 19:34:59.000000000 +0200 +diff -aurN linux-5.4.64/net/ipv4/tcp_cong.c linux-5.4.64.mptcp/net/ipv4/tcp_cong.c +--- linux-5.4.64/net/ipv4/tcp_cong.c 2020-09-09 19:12:37.000000000 +0200 ++++ linux-5.4.64.mptcp/net/ipv4/tcp_cong.c 2020-09-10 19:25:10.503220935 +0200 @@ -328,13 +328,19 @@ return ret; } @@ -4105,9 +4108,9 @@ diff -aurN linux-5.4/net/ipv4/tcp_cong.c mptcp-mptcp_trunk/net/ipv4/tcp_cong.c { struct inet_connection_sock *icsk = inet_csk(sk); const struct tcp_congestion_ops *ca; -diff -aurN linux-5.4/net/ipv4/tcp_diag.c mptcp-mptcp_trunk/net/ipv4/tcp_diag.c ---- linux-5.4/net/ipv4/tcp_diag.c 2019-11-25 01:32:01.000000000 +0100 -+++ mptcp-mptcp_trunk/net/ipv4/tcp_diag.c 2020-07-14 19:34:59.000000000 +0200 +diff -aurN linux-5.4.64/net/ipv4/tcp_diag.c linux-5.4.64.mptcp/net/ipv4/tcp_diag.c +--- linux-5.4.64/net/ipv4/tcp_diag.c 2020-09-09 19:12:37.000000000 +0200 ++++ linux-5.4.64.mptcp/net/ipv4/tcp_diag.c 2020-09-10 19:25:10.503220935 +0200 @@ -31,7 +31,7 @@ r->idiag_wqueue = READ_ONCE(tp->write_seq) - tp->snd_una; } @@ -4117,9 +4120,9 @@ diff -aurN linux-5.4/net/ipv4/tcp_diag.c mptcp-mptcp_trunk/net/ipv4/tcp_diag.c } #ifdef CONFIG_TCP_MD5SIG -diff -aurN linux-5.4/net/ipv4/tcp_fastopen.c mptcp-mptcp_trunk/net/ipv4/tcp_fastopen.c ---- linux-5.4/net/ipv4/tcp_fastopen.c 2019-11-25 01:32:01.000000000 +0100 -+++ mptcp-mptcp_trunk/net/ipv4/tcp_fastopen.c 2020-07-14 19:34:59.000000000 +0200 +diff -aurN linux-5.4.64/net/ipv4/tcp_fastopen.c linux-5.4.64.mptcp/net/ipv4/tcp_fastopen.c +--- linux-5.4.64/net/ipv4/tcp_fastopen.c 2020-09-09 19:12:37.000000000 +0200 ++++ linux-5.4.64.mptcp/net/ipv4/tcp_fastopen.c 2020-09-10 19:25:10.503220935 +0200 @@ -9,6 +9,7 @@ #include #include @@ -4128,7 +4131,7 @@ diff -aurN linux-5.4/net/ipv4/tcp_fastopen.c mptcp-mptcp_trunk/net/ipv4/tcp_fast void tcp_fastopen_init_key_once(struct net *net) { -@@ -113,8 +114,6 @@ +@@ -136,8 +137,6 @@ const siphash_key_t *key, struct tcp_fastopen_cookie *foc) { @@ -4137,7 +4140,7 @@ diff -aurN linux-5.4/net/ipv4/tcp_fastopen.c mptcp-mptcp_trunk/net/ipv4/tcp_fast if (req->rsk_ops->family == AF_INET) { const struct iphdr *iph = ip_hdr(syn); -@@ -235,8 +234,9 @@ +@@ -258,8 +257,9 @@ { struct tcp_sock *tp; struct request_sock_queue *queue = &inet_csk(sk)->icsk_accept_queue; @@ -4148,7 +4151,7 @@ diff -aurN linux-5.4/net/ipv4/tcp_fastopen.c mptcp-mptcp_trunk/net/ipv4/tcp_fast child = inet_csk(sk)->icsk_af_ops->syn_recv_sock(sk, skb, req, NULL, NULL, &own_req); -@@ -271,15 +271,26 @@ +@@ -294,15 +294,26 @@ refcount_set(&req->rsk_refcnt, 2); @@ -4178,9 +4181,9 @@ diff -aurN linux-5.4/net/ipv4/tcp_fastopen.c mptcp-mptcp_trunk/net/ipv4/tcp_fast /* tcp_conn_request() is sending the SYNACK, * and queues the child into listener accept queue. */ -diff -aurN linux-5.4/net/ipv4/tcp_input.c mptcp-mptcp_trunk/net/ipv4/tcp_input.c ---- linux-5.4/net/ipv4/tcp_input.c 2019-11-25 01:32:01.000000000 +0100 -+++ mptcp-mptcp_trunk/net/ipv4/tcp_input.c 2020-07-14 19:34:59.000000000 +0200 +diff -aurN linux-5.4.64/net/ipv4/tcp_input.c linux-5.4.64.mptcp/net/ipv4/tcp_input.c +--- linux-5.4.64/net/ipv4/tcp_input.c 2020-09-09 19:12:37.000000000 +0200 ++++ linux-5.4.64.mptcp/net/ipv4/tcp_input.c 2020-09-10 19:32:43.267687285 +0200 @@ -76,35 +76,15 @@ #include #include @@ -4220,7 +4223,7 @@ diff -aurN linux-5.4/net/ipv4/tcp_input.c mptcp-mptcp_trunk/net/ipv4/tcp_input.c #define TCP_REMNANT (TCP_FLAG_FIN|TCP_FLAG_URG|TCP_FLAG_SYN|TCP_FLAG_PSH) #define TCP_HP_BITS (~(TCP_RESERVED_BITS|TCP_FLAG_PSH)) -@@ -348,8 +328,12 @@ +@@ -349,8 +329,12 @@ per_mss = roundup_pow_of_two(per_mss) + SKB_DATA_ALIGN(sizeof(struct sk_buff)); @@ -4235,7 +4238,7 @@ diff -aurN linux-5.4/net/ipv4/tcp_input.c mptcp-mptcp_trunk/net/ipv4/tcp_input.c /* Fast Recovery (RFC 5681 3.2) : * Cubic needs 1.7 factor, rounded to 2 to include -@@ -358,9 +342,17 @@ +@@ -359,9 +343,17 @@ sndmem = ca_ops->sndbuf_expand ? ca_ops->sndbuf_expand(sk) : 2; sndmem *= nr_segs * per_mss; @@ -4254,7 +4257,7 @@ diff -aurN linux-5.4/net/ipv4/tcp_input.c mptcp-mptcp_trunk/net/ipv4/tcp_input.c } /* 2. Tuning advertised window (window_clamp, rcv_ssthresh) -@@ -409,9 +401,14 @@ +@@ -410,9 +402,14 @@ static void tcp_grow_window(struct sock *sk, const struct sk_buff *skb) { struct tcp_sock *tp = tcp_sk(sk); @@ -4270,7 +4273,7 @@ diff -aurN linux-5.4/net/ipv4/tcp_input.c mptcp-mptcp_trunk/net/ipv4/tcp_input.c /* Check #1 */ if (room > 0 && !tcp_under_memory_pressure(sk)) { -@@ -421,13 +418,13 @@ +@@ -422,13 +419,13 @@ * will fit to rcvbuf in future. */ if (tcp_win_from_space(sk, skb->truesize) <= skb->len) @@ -4287,7 +4290,7 @@ diff -aurN linux-5.4/net/ipv4/tcp_input.c mptcp-mptcp_trunk/net/ipv4/tcp_input.c inet_csk(sk)->icsk_ack.quick |= 1; } } -@@ -610,7 +607,10 @@ +@@ -611,7 +608,10 @@ tcp_mstamp_refresh(tp); time = tcp_stamp_us_delta(tp->tcp_mstamp, tp->rcvq_space.time); @@ -4299,7 +4302,7 @@ diff -aurN linux-5.4/net/ipv4/tcp_input.c mptcp-mptcp_trunk/net/ipv4/tcp_input.c return; /* Number of bytes copied to user in last RTT */ -@@ -833,7 +833,7 @@ +@@ -834,7 +834,7 @@ /* Calculate rto without backoff. This is the second half of Van Jacobson's * routine referred to above. */ @@ -4308,7 +4311,7 @@ diff -aurN linux-5.4/net/ipv4/tcp_input.c mptcp-mptcp_trunk/net/ipv4/tcp_input.c { const struct tcp_sock *tp = tcp_sk(sk); /* Old crap is replaced with new one. 8) -@@ -1404,6 +1404,13 @@ +@@ -1406,6 +1406,13 @@ int len; int in_sack; @@ -4322,7 +4325,7 @@ diff -aurN linux-5.4/net/ipv4/tcp_input.c mptcp-mptcp_trunk/net/ipv4/tcp_input.c /* Normally R but no L won't result in plain S */ if (!dup_sack && (TCP_SKB_CB(skb)->sacked & (TCPCB_LOST|TCPCB_SACKED_RETRANS)) == TCPCB_SACKED_RETRANS) -@@ -2953,7 +2960,7 @@ +@@ -2960,7 +2967,7 @@ */ tcp_update_rtt_min(sk, ca_rtt_us, flag); tcp_rtt_estimator(sk, seq_rtt_us); @@ -4331,7 +4334,7 @@ diff -aurN linux-5.4/net/ipv4/tcp_input.c mptcp-mptcp_trunk/net/ipv4/tcp_input.c /* RFC6298: only reset backoff on valid RTT measurement. */ inet_csk(sk)->icsk_backoff = 0; -@@ -3021,7 +3028,7 @@ +@@ -3028,7 +3035,7 @@ } /* If we get here, the whole TSO packet has not been acked. */ @@ -4340,7 +4343,7 @@ diff -aurN linux-5.4/net/ipv4/tcp_input.c mptcp-mptcp_trunk/net/ipv4/tcp_input.c { struct tcp_sock *tp = tcp_sk(sk); u32 packets_acked; -@@ -3041,8 +3048,7 @@ +@@ -3048,8 +3055,7 @@ return packets_acked; } @@ -4350,7 +4353,7 @@ diff -aurN linux-5.4/net/ipv4/tcp_input.c mptcp-mptcp_trunk/net/ipv4/tcp_input.c { const struct skb_shared_info *shinfo; -@@ -3147,6 +3153,8 @@ +@@ -3154,6 +3160,8 @@ */ if (likely(!(scb->tcp_flags & TCPHDR_SYN))) { flag |= FLAG_DATA_ACKED; @@ -4359,7 +4362,7 @@ diff -aurN linux-5.4/net/ipv4/tcp_input.c mptcp-mptcp_trunk/net/ipv4/tcp_input.c } else { flag |= FLAG_SYN_ACKED; tp->retrans_stamp = 0; -@@ -3266,7 +3274,7 @@ +@@ -3274,7 +3282,7 @@ return flag; } @@ -4368,7 +4371,7 @@ diff -aurN linux-5.4/net/ipv4/tcp_input.c mptcp-mptcp_trunk/net/ipv4/tcp_input.c { struct inet_connection_sock *icsk = inet_csk(sk); struct sk_buff *head = tcp_send_head(sk); -@@ -3338,9 +3346,8 @@ +@@ -3346,9 +3354,8 @@ /* Check that window update is acceptable. * The function assumes that snd_una<=ack<=snd_next. */ @@ -4380,7 +4383,7 @@ diff -aurN linux-5.4/net/ipv4/tcp_input.c mptcp-mptcp_trunk/net/ipv4/tcp_input.c { return after(ack, tp->snd_una) || after(ack_seq, tp->snd_wl1) || -@@ -3577,7 +3584,7 @@ +@@ -3586,7 +3593,7 @@ } /* This routine deals with incoming acks, but not outgoing ones. */ @@ -4389,7 +4392,7 @@ diff -aurN linux-5.4/net/ipv4/tcp_input.c mptcp-mptcp_trunk/net/ipv4/tcp_input.c { struct inet_connection_sock *icsk = inet_csk(sk); struct tcp_sock *tp = tcp_sk(sk); -@@ -3691,6 +3698,16 @@ +@@ -3709,6 +3716,16 @@ tcp_rack_update_reo_wnd(sk, &rs); @@ -4406,7 +4409,7 @@ diff -aurN linux-5.4/net/ipv4/tcp_input.c mptcp-mptcp_trunk/net/ipv4/tcp_input.c if (tp->tlp_high_seq) tcp_process_tlp_ack(sk, ack, flag); /* If needed, reset TLP/RTO timer; RACK may later override this. */ -@@ -3833,8 +3850,10 @@ +@@ -3851,8 +3868,10 @@ */ void tcp_parse_options(const struct net *net, const struct sk_buff *skb, @@ -4419,7 +4422,7 @@ diff -aurN linux-5.4/net/ipv4/tcp_input.c mptcp-mptcp_trunk/net/ipv4/tcp_input.c { const unsigned char *ptr; const struct tcphdr *th = tcp_hdr(skb); -@@ -3920,6 +3939,10 @@ +@@ -3938,6 +3957,10 @@ */ break; #endif @@ -4430,7 +4433,7 @@ diff -aurN linux-5.4/net/ipv4/tcp_input.c mptcp-mptcp_trunk/net/ipv4/tcp_input.c case TCPOPT_FASTOPEN: tcp_parse_fastopen_option( opsize - TCPOLEN_FASTOPEN_BASE, -@@ -3987,7 +4010,9 @@ +@@ -4005,7 +4028,9 @@ return true; } @@ -4441,7 +4444,7 @@ diff -aurN linux-5.4/net/ipv4/tcp_input.c mptcp-mptcp_trunk/net/ipv4/tcp_input.c if (tp->rx_opt.saw_tstamp && tp->rx_opt.rcv_tsecr) tp->rx_opt.rcv_tsecr -= tp->tsoffset; -@@ -4146,6 +4171,11 @@ +@@ -4164,6 +4189,11 @@ { struct tcp_sock *tp = tcp_sk(sk); @@ -4453,7 +4456,7 @@ diff -aurN linux-5.4/net/ipv4/tcp_input.c mptcp-mptcp_trunk/net/ipv4/tcp_input.c inet_csk_schedule_ack(sk); sk->sk_shutdown |= RCV_SHUTDOWN; -@@ -4156,6 +4186,10 @@ +@@ -4174,6 +4204,10 @@ case TCP_ESTABLISHED: /* Move to CLOSE_WAIT */ tcp_set_state(sk, TCP_CLOSE_WAIT); @@ -4464,7 +4467,7 @@ diff -aurN linux-5.4/net/ipv4/tcp_input.c mptcp-mptcp_trunk/net/ipv4/tcp_input.c inet_csk_enter_pingpong_mode(sk); break; -@@ -4178,9 +4212,16 @@ +@@ -4196,9 +4230,16 @@ tcp_set_state(sk, TCP_CLOSING); break; case TCP_FIN_WAIT2: @@ -4482,7 +4485,7 @@ diff -aurN linux-5.4/net/ipv4/tcp_input.c mptcp-mptcp_trunk/net/ipv4/tcp_input.c break; default: /* Only TCP_LISTEN and TCP_CLOSE are left, in these -@@ -4202,6 +4243,10 @@ +@@ -4220,6 +4261,10 @@ if (!sock_flag(sk, SOCK_DEAD)) { sk->sk_state_change(sk); @@ -4493,7 +4496,7 @@ diff -aurN linux-5.4/net/ipv4/tcp_input.c mptcp-mptcp_trunk/net/ipv4/tcp_input.c /* Do not send POLL_HUP for half duplex close. */ if (sk->sk_shutdown == SHUTDOWN_MASK || sk->sk_state == TCP_CLOSE) -@@ -4416,6 +4461,9 @@ +@@ -4434,6 +4479,9 @@ *fragstolen = false; @@ -4503,7 +4506,7 @@ diff -aurN linux-5.4/net/ipv4/tcp_input.c mptcp-mptcp_trunk/net/ipv4/tcp_input.c /* Its possible this segment overlaps with prior segment in queue */ if (TCP_SKB_CB(from)->seq != TCP_SKB_CB(to)->end_seq) return false; -@@ -4470,7 +4518,7 @@ +@@ -4488,7 +4536,7 @@ /* This one checks to see if we can put data from the * out_of_order queue into the receive_queue. */ @@ -4512,7 +4515,7 @@ diff -aurN linux-5.4/net/ipv4/tcp_input.c mptcp-mptcp_trunk/net/ipv4/tcp_input.c { struct tcp_sock *tp = tcp_sk(sk); __u32 dsack_high = tp->rcv_nxt; -@@ -4493,7 +4541,14 @@ +@@ -4511,7 +4559,14 @@ p = rb_next(p); rb_erase(&skb->rbnode, &tp->out_of_order_queue); @@ -4528,7 +4531,7 @@ diff -aurN linux-5.4/net/ipv4/tcp_input.c mptcp-mptcp_trunk/net/ipv4/tcp_input.c tcp_drop(sk, skb); continue; } -@@ -4523,6 +4578,9 @@ +@@ -4541,6 +4596,9 @@ static int tcp_try_rmem_schedule(struct sock *sk, struct sk_buff *skb, unsigned int size) { @@ -4538,7 +4541,7 @@ diff -aurN linux-5.4/net/ipv4/tcp_input.c mptcp-mptcp_trunk/net/ipv4/tcp_input.c if (atomic_read(&sk->sk_rmem_alloc) > sk->sk_rcvbuf || !sk_rmem_schedule(sk, skb, size)) { -@@ -4537,7 +4595,7 @@ +@@ -4555,7 +4613,7 @@ return 0; } @@ -4547,7 +4550,7 @@ diff -aurN linux-5.4/net/ipv4/tcp_input.c mptcp-mptcp_trunk/net/ipv4/tcp_input.c { struct tcp_sock *tp = tcp_sk(sk); struct rb_node **p, *parent; -@@ -4604,7 +4662,8 @@ +@@ -4627,7 +4685,8 @@ continue; } if (before(seq, TCP_SKB_CB(skb1)->end_seq)) { @@ -4557,7 +4560,7 @@ diff -aurN linux-5.4/net/ipv4/tcp_input.c mptcp-mptcp_trunk/net/ipv4/tcp_input.c /* All the bits are present. Drop. */ NET_INC_STATS(sock_net(sk), LINUX_MIB_TCPOFOMERGE); -@@ -4651,6 +4710,11 @@ +@@ -4674,6 +4733,11 @@ end_seq); break; } @@ -4569,7 +4572,7 @@ diff -aurN linux-5.4/net/ipv4/tcp_input.c mptcp-mptcp_trunk/net/ipv4/tcp_input.c rb_erase(&skb1->rbnode, &tp->out_of_order_queue); tcp_dsack_extend(sk, TCP_SKB_CB(skb1)->seq, TCP_SKB_CB(skb1)->end_seq); -@@ -4662,7 +4726,7 @@ +@@ -4685,7 +4749,7 @@ tp->ooo_last_skb = skb; add_sack: @@ -4578,7 +4581,7 @@ diff -aurN linux-5.4/net/ipv4/tcp_input.c mptcp-mptcp_trunk/net/ipv4/tcp_input.c tcp_sack_new_ofo_skb(sk, seq, end_seq); end: if (skb) { -@@ -4672,8 +4736,8 @@ +@@ -4699,8 +4763,8 @@ } } @@ -4589,17 +4592,16 @@ diff -aurN linux-5.4/net/ipv4/tcp_input.c mptcp-mptcp_trunk/net/ipv4/tcp_input.c { int eaten; struct sk_buff *tail = skb_peek_tail(&sk->sk_receive_queue); -@@ -4746,8 +4810,7 @@ - const struct tcp_sock *tp = tcp_sk(sk); +@@ -4774,7 +4838,7 @@ int avail = tp->rcv_nxt - tp->copied_seq; -- if (avail < sk->sk_rcvlowat && !tcp_rmem_pressure(sk) && + if (avail < sk->sk_rcvlowat && !tcp_rmem_pressure(sk) && - !sock_flag(sk, SOCK_DONE)) -+ if (avail < sk->sk_rcvlowat && !tcp_rmem_pressure(sk) && !sock_flag(sk, SOCK_DONE) && !mptcp(tp)) ++ !sock_flag(sk, SOCK_DONE) && !mptcp(tp)) return; sk->sk_data_ready(sk); -@@ -4758,10 +4822,14 @@ +@@ -4786,10 +4850,14 @@ bool fragstolen; int eaten; @@ -4615,7 +4617,7 @@ diff -aurN linux-5.4/net/ipv4/tcp_input.c mptcp-mptcp_trunk/net/ipv4/tcp_input.c skb_dst_drop(skb); __skb_pull(skb, tcp_hdr(skb)->doff * 4); -@@ -4789,7 +4857,7 @@ +@@ -4816,7 +4884,7 @@ } eaten = tcp_queue_rcv(sk, skb, &fragstolen); @@ -4624,7 +4626,7 @@ diff -aurN linux-5.4/net/ipv4/tcp_input.c mptcp-mptcp_trunk/net/ipv4/tcp_input.c tcp_event_data_recv(sk, skb); if (TCP_SKB_CB(skb)->tcp_flags & TCPHDR_FIN) tcp_fin(sk); -@@ -4811,7 +4879,11 @@ +@@ -4838,7 +4906,11 @@ if (eaten > 0) kfree_skb_partial(skb, fragstolen); @@ -4637,7 +4639,7 @@ diff -aurN linux-5.4/net/ipv4/tcp_input.c mptcp-mptcp_trunk/net/ipv4/tcp_input.c tcp_data_ready(sk); return; } -@@ -5154,7 +5226,7 @@ +@@ -5181,7 +5253,7 @@ return -1; } @@ -4646,7 +4648,7 @@ diff -aurN linux-5.4/net/ipv4/tcp_input.c mptcp-mptcp_trunk/net/ipv4/tcp_input.c { const struct tcp_sock *tp = tcp_sk(sk); -@@ -5189,7 +5261,7 @@ +@@ -5216,7 +5288,7 @@ { struct tcp_sock *tp = tcp_sk(sk); @@ -4655,7 +4657,7 @@ diff -aurN linux-5.4/net/ipv4/tcp_input.c mptcp-mptcp_trunk/net/ipv4/tcp_input.c tcp_sndbuf_expand(sk); tp->snd_cwnd_stamp = tcp_jiffies32; } -@@ -5203,10 +5275,11 @@ +@@ -5230,10 +5302,11 @@ sock_reset_flag(sk, SOCK_QUEUE_SHRUNK); /* pairs with tcp_poll() */ smp_mb(); @@ -4670,7 +4672,7 @@ diff -aurN linux-5.4/net/ipv4/tcp_input.c mptcp-mptcp_trunk/net/ipv4/tcp_input.c tcp_chrono_stop(sk, TCP_CHRONO_SNDBUF_LIMITED); } } -@@ -5225,6 +5298,8 @@ +@@ -5252,6 +5325,8 @@ { struct tcp_sock *tp = tcp_sk(sk); unsigned long rtt, delay; @@ -4679,7 +4681,7 @@ diff -aurN linux-5.4/net/ipv4/tcp_input.c mptcp-mptcp_trunk/net/ipv4/tcp_input.c /* More than one full frame received... */ if (((tp->rcv_nxt - tp->rcv_wup) > inet_csk(sk)->icsk_ack.rcv_mss && -@@ -5233,8 +5308,8 @@ +@@ -5260,8 +5335,8 @@ * If application uses SO_RCVLOWAT, we want send ack now if * we have not received enough bytes to satisfy the condition. */ @@ -4690,7 +4692,7 @@ diff -aurN linux-5.4/net/ipv4/tcp_input.c mptcp-mptcp_trunk/net/ipv4/tcp_input.c /* We ACK each frame or... */ tcp_in_quickack_mode(sk) || /* Protocol state mandates a one-time immediate ACK */ -@@ -5369,6 +5444,10 @@ +@@ -5396,6 +5471,10 @@ { struct tcp_sock *tp = tcp_sk(sk); @@ -4701,7 +4703,7 @@ diff -aurN linux-5.4/net/ipv4/tcp_input.c mptcp-mptcp_trunk/net/ipv4/tcp_input.c /* Check if we get a new urgent pointer - normally not. */ if (th->urg) tcp_check_urg(sk, th); -@@ -5511,9 +5590,15 @@ +@@ -5538,9 +5617,15 @@ goto discard; } @@ -4717,7 +4719,7 @@ diff -aurN linux-5.4/net/ipv4/tcp_input.c mptcp-mptcp_trunk/net/ipv4/tcp_input.c tcp_drop(sk, skb); return false; } -@@ -5570,6 +5655,10 @@ +@@ -5597,6 +5682,10 @@ tp->rx_opt.saw_tstamp = 0; @@ -4728,7 +4730,7 @@ diff -aurN linux-5.4/net/ipv4/tcp_input.c mptcp-mptcp_trunk/net/ipv4/tcp_input.c /* pred_flags is 0xS?10 << 16 + snd_wnd * if header_prediction is to be made * 'S' will always be tp->tcp_header_len >> 2 -@@ -5742,7 +5831,7 @@ +@@ -5769,7 +5858,7 @@ tcp_call_bpf(sk, bpf_op, 0, NULL); tcp_init_congestion_control(sk); @@ -4737,7 +4739,7 @@ diff -aurN linux-5.4/net/ipv4/tcp_input.c mptcp-mptcp_trunk/net/ipv4/tcp_input.c } void tcp_finish_connect(struct sock *sk, struct sk_buff *skb) -@@ -5779,17 +5868,24 @@ +@@ -5806,17 +5895,24 @@ struct tcp_fastopen_cookie *cookie) { struct tcp_sock *tp = tcp_sk(sk); @@ -4764,7 +4766,7 @@ diff -aurN linux-5.4/net/ipv4/tcp_input.c mptcp-mptcp_trunk/net/ipv4/tcp_input.c mss = opt.mss_clamp; } -@@ -5813,7 +5909,11 @@ +@@ -5840,7 +5936,11 @@ tcp_fastopen_cache_set(sk, mss, cookie, syn_drop, try_exp); @@ -4777,7 +4779,7 @@ diff -aurN linux-5.4/net/ipv4/tcp_input.c mptcp-mptcp_trunk/net/ipv4/tcp_input.c skb_rbtree_walk_from(data) { if (__tcp_retransmit_skb(sk, data, 1)) break; -@@ -5868,9 +5968,13 @@ +@@ -5895,9 +5995,13 @@ struct tcp_sock *tp = tcp_sk(sk); struct tcp_fastopen_cookie foc = { .len = -1 }; int saved_clamp = tp->rx_opt.mss_clamp; @@ -4792,7 +4794,7 @@ diff -aurN linux-5.4/net/ipv4/tcp_input.c mptcp-mptcp_trunk/net/ipv4/tcp_input.c if (tp->rx_opt.saw_tstamp && tp->rx_opt.rcv_tsecr) tp->rx_opt.rcv_tsecr -= tp->tsoffset; -@@ -5931,6 +6035,35 @@ +@@ -5958,6 +6062,35 @@ tcp_try_undo_spurious_syn(sk); tcp_ack(sk, skb, FLAG_SLOWPATH); @@ -4828,7 +4830,7 @@ diff -aurN linux-5.4/net/ipv4/tcp_input.c mptcp-mptcp_trunk/net/ipv4/tcp_input.c /* Ok.. it's good. Set up sequence numbers and * move to established. */ -@@ -5957,6 +6090,11 @@ +@@ -5984,6 +6117,11 @@ tp->tcp_header_len = sizeof(struct tcphdr); } @@ -4840,7 +4842,7 @@ diff -aurN linux-5.4/net/ipv4/tcp_input.c mptcp-mptcp_trunk/net/ipv4/tcp_input.c tcp_sync_mss(sk, icsk->icsk_pmtu_cookie); tcp_initialize_rcv_mss(sk); -@@ -5980,9 +6118,12 @@ +@@ -6007,9 +6145,12 @@ } if (fastopen_fail) return -1; @@ -4855,7 +4857,7 @@ diff -aurN linux-5.4/net/ipv4/tcp_input.c mptcp-mptcp_trunk/net/ipv4/tcp_input.c /* Save one ACK. Data will be ready after * several ticks, if write_pending is set. * -@@ -6021,6 +6162,7 @@ +@@ -6048,6 +6189,7 @@ tcp_paws_reject(&tp->rx_opt, 0)) goto discard_and_undo; @@ -4863,7 +4865,7 @@ diff -aurN linux-5.4/net/ipv4/tcp_input.c mptcp-mptcp_trunk/net/ipv4/tcp_input.c if (th->syn) { /* We see SYN without ACK. It is attempt of * simultaneous connect with crossed SYNs. -@@ -6037,6 +6179,11 @@ +@@ -6064,6 +6206,11 @@ tp->tcp_header_len = sizeof(struct tcphdr); } @@ -4875,7 +4877,7 @@ diff -aurN linux-5.4/net/ipv4/tcp_input.c mptcp-mptcp_trunk/net/ipv4/tcp_input.c WRITE_ONCE(tp->rcv_nxt, TCP_SKB_CB(skb)->seq + 1); WRITE_ONCE(tp->copied_seq, tp->rcv_nxt); tp->rcv_wup = TCP_SKB_CB(skb)->seq + 1; -@@ -6123,6 +6270,7 @@ +@@ -6154,6 +6301,7 @@ */ int tcp_rcv_state_process(struct sock *sk, struct sk_buff *skb) @@ -4883,7 +4885,7 @@ diff -aurN linux-5.4/net/ipv4/tcp_input.c mptcp-mptcp_trunk/net/ipv4/tcp_input.c { struct tcp_sock *tp = tcp_sk(sk); struct inet_connection_sock *icsk = inet_csk(sk); -@@ -6165,6 +6313,16 @@ +@@ -6196,6 +6344,16 @@ tp->rx_opt.saw_tstamp = 0; tcp_mstamp_refresh(tp); queued = tcp_rcv_synsent_state_process(sk, skb, th); @@ -4900,7 +4902,7 @@ diff -aurN linux-5.4/net/ipv4/tcp_input.c mptcp-mptcp_trunk/net/ipv4/tcp_input.c if (queued >= 0) return queued; -@@ -6237,6 +6395,8 @@ +@@ -6268,6 +6426,8 @@ if (tp->rx_opt.tstamp_ok) tp->advmss -= TCPOLEN_TSTAMP_ALIGNED; @@ -4909,7 +4911,7 @@ diff -aurN linux-5.4/net/ipv4/tcp_input.c mptcp-mptcp_trunk/net/ipv4/tcp_input.c if (!inet_csk(sk)->icsk_ca_ops->cong_control) tcp_update_pacing_rate(sk); -@@ -6246,6 +6406,30 @@ +@@ -6277,6 +6437,30 @@ tcp_initialize_rcv_mss(sk); tcp_fast_path_on(tp); @@ -4940,7 +4942,7 @@ diff -aurN linux-5.4/net/ipv4/tcp_input.c mptcp-mptcp_trunk/net/ipv4/tcp_input.c break; case TCP_FIN_WAIT1: { -@@ -6286,7 +6470,8 @@ +@@ -6317,7 +6501,8 @@ tmo = tcp_fin_time(sk); if (tmo > TCP_TIMEWAIT_LEN) { inet_csk_reset_keepalive_timer(sk, tmo - TCP_TIMEWAIT_LEN); @@ -4950,7 +4952,7 @@ diff -aurN linux-5.4/net/ipv4/tcp_input.c mptcp-mptcp_trunk/net/ipv4/tcp_input.c /* Bad case. We could lose such FIN otherwise. * It is not a big problem, but it looks confusing * and not so rare event. We still can lose it now, -@@ -6295,7 +6480,7 @@ +@@ -6326,7 +6511,7 @@ */ inet_csk_reset_keepalive_timer(sk, tmo); } else { @@ -4959,7 +4961,7 @@ diff -aurN linux-5.4/net/ipv4/tcp_input.c mptcp-mptcp_trunk/net/ipv4/tcp_input.c goto discard; } break; -@@ -6303,7 +6488,7 @@ +@@ -6334,7 +6519,7 @@ case TCP_CLOSING: if (tp->snd_una == tp->write_seq) { @@ -4968,7 +4970,7 @@ diff -aurN linux-5.4/net/ipv4/tcp_input.c mptcp-mptcp_trunk/net/ipv4/tcp_input.c goto discard; } break; -@@ -6315,6 +6500,9 @@ +@@ -6346,6 +6531,9 @@ goto discard; } break; @@ -4978,7 +4980,7 @@ diff -aurN linux-5.4/net/ipv4/tcp_input.c mptcp-mptcp_trunk/net/ipv4/tcp_input.c } /* step 6: check the URG bit */ -@@ -6336,7 +6524,8 @@ +@@ -6367,7 +6555,8 @@ */ if (sk->sk_shutdown & RCV_SHUTDOWN) { if (TCP_SKB_CB(skb)->end_seq != TCP_SKB_CB(skb)->seq && @@ -4988,7 +4990,7 @@ diff -aurN linux-5.4/net/ipv4/tcp_input.c mptcp-mptcp_trunk/net/ipv4/tcp_input.c NET_INC_STATS(sock_net(sk), LINUX_MIB_TCPABORTONDATA); tcp_reset(sk); return 1; -@@ -6438,6 +6627,8 @@ +@@ -6469,6 +6658,8 @@ ireq->wscale_ok = rx_opt->wscale_ok; ireq->acked = 0; ireq->ecn_ok = 0; @@ -4997,7 +4999,7 @@ diff -aurN linux-5.4/net/ipv4/tcp_input.c mptcp-mptcp_trunk/net/ipv4/tcp_input.c ireq->ir_rmt_port = tcp_hdr(skb)->source; ireq->ir_num = ntohs(tcp_hdr(skb)->dest); ireq->ir_mark = inet_request_mark(sk, skb); -@@ -6563,12 +6754,17 @@ +@@ -6594,12 +6785,17 @@ /* TW buckets are converted to open requests without * limitations, they conserve resources and peer is * evidently real one. @@ -5016,7 +5018,7 @@ diff -aurN linux-5.4/net/ipv4/tcp_input.c mptcp-mptcp_trunk/net/ipv4/tcp_input.c } if (sk_acceptq_is_full(sk)) { -@@ -6586,8 +6782,8 @@ +@@ -6617,8 +6813,8 @@ tcp_clear_options(&tmp_opt); tmp_opt.mss_clamp = af_ops->mss_clamp; tmp_opt.user_mss = tp->rx_opt.user_mss; @@ -5027,7 +5029,7 @@ diff -aurN linux-5.4/net/ipv4/tcp_input.c mptcp-mptcp_trunk/net/ipv4/tcp_input.c if (want_cookie && !tmp_opt.saw_tstamp) tcp_clear_options(&tmp_opt); -@@ -6602,7 +6798,8 @@ +@@ -6633,7 +6829,8 @@ /* Note: tcp_v6_init_req() might override ir_iif for link locals */ inet_rsk(req)->ir_iif = inet_request_bound_dev_if(sk, skb); @@ -5037,7 +5039,7 @@ diff -aurN linux-5.4/net/ipv4/tcp_input.c mptcp-mptcp_trunk/net/ipv4/tcp_input.c if (security_inet_conn_request(sk, skb, req)) goto drop_and_free; -@@ -6638,7 +6835,7 @@ +@@ -6669,7 +6866,7 @@ tcp_ecn_create_request(req, skb, sk, dst); if (want_cookie) { @@ -5046,7 +5048,7 @@ diff -aurN linux-5.4/net/ipv4/tcp_input.c mptcp-mptcp_trunk/net/ipv4/tcp_input.c req->cookie_ts = tmp_opt.tstamp_ok; if (!tmp_opt.tstamp_ok) inet_rsk(req)->ecn_ok = 0; -@@ -6653,17 +6850,25 @@ +@@ -6684,17 +6881,25 @@ fastopen_sk = tcp_try_fastopen(sk, skb, req, &foc, dst); } if (fastopen_sk) { @@ -5073,9 +5075,9 @@ diff -aurN linux-5.4/net/ipv4/tcp_input.c mptcp-mptcp_trunk/net/ipv4/tcp_input.c sock_put(fastopen_sk); } else { tcp_rsk(req)->tfo_listener = false; -diff -aurN linux-5.4/net/ipv4/tcp_ipv4.c mptcp-mptcp_trunk/net/ipv4/tcp_ipv4.c ---- linux-5.4/net/ipv4/tcp_ipv4.c 2019-11-25 01:32:01.000000000 +0100 -+++ mptcp-mptcp_trunk/net/ipv4/tcp_ipv4.c 2020-07-14 19:34:59.000000000 +0200 +diff -aurN linux-5.4.64/net/ipv4/tcp_ipv4.c linux-5.4.64.mptcp/net/ipv4/tcp_ipv4.c +--- linux-5.4.64/net/ipv4/tcp_ipv4.c 2020-09-09 19:12:37.000000000 +0200 ++++ linux-5.4.64.mptcp/net/ipv4/tcp_ipv4.c 2020-09-10 19:25:10.503220935 +0200 @@ -62,6 +62,8 @@ #include #include @@ -5334,7 +5336,7 @@ diff -aurN linux-5.4/net/ipv4/tcp_ipv4.c mptcp-mptcp_trunk/net/ipv4/tcp_ipv4.c { kfree(rcu_dereference_protected(inet_rsk(req)->ireq_opt, 1)); } -@@ -1345,9 +1383,10 @@ +@@ -1354,9 +1392,10 @@ return false; } @@ -5348,7 +5350,7 @@ diff -aurN linux-5.4/net/ipv4/tcp_ipv4.c mptcp-mptcp_trunk/net/ipv4/tcp_ipv4.c { struct inet_request_sock *ireq = inet_rsk(req); struct net *net = sock_net(sk_listener); -@@ -1355,6 +1394,8 @@ +@@ -1364,6 +1403,8 @@ sk_rcv_saddr_set(req_to_sk(req), ip_hdr(skb)->daddr); sk_daddr_set(req_to_sk(req), ip_hdr(skb)->saddr); RCU_INIT_POINTER(ireq->ireq_opt, tcp_v4_save_options(net, skb)); @@ -5357,7 +5359,7 @@ diff -aurN linux-5.4/net/ipv4/tcp_ipv4.c mptcp-mptcp_trunk/net/ipv4/tcp_ipv4.c } static struct dst_entry *tcp_v4_route_req(const struct sock *sk, -@@ -1374,7 +1415,7 @@ +@@ -1383,7 +1424,7 @@ .syn_ack_timeout = tcp_syn_ack_timeout, }; @@ -5366,7 +5368,7 @@ diff -aurN linux-5.4/net/ipv4/tcp_ipv4.c mptcp-mptcp_trunk/net/ipv4/tcp_ipv4.c .mss_clamp = TCP_MSS_DEFAULT, #ifdef CONFIG_TCP_MD5SIG .req_md5_lookup = tcp_v4_md5_lookup, -@@ -1511,7 +1552,7 @@ +@@ -1520,7 +1561,7 @@ } EXPORT_SYMBOL(tcp_v4_syn_recv_sock); @@ -5375,7 +5377,7 @@ diff -aurN linux-5.4/net/ipv4/tcp_ipv4.c mptcp-mptcp_trunk/net/ipv4/tcp_ipv4.c { #ifdef CONFIG_SYN_COOKIES const struct tcphdr *th = tcp_hdr(skb); -@@ -1549,6 +1590,9 @@ +@@ -1558,6 +1599,9 @@ { struct sock *rsk; @@ -5385,7 +5387,7 @@ diff -aurN linux-5.4/net/ipv4/tcp_ipv4.c mptcp-mptcp_trunk/net/ipv4/tcp_ipv4.c if (sk->sk_state == TCP_ESTABLISHED) { /* Fast path */ struct dst_entry *dst = sk->sk_rx_dst; -@@ -1793,6 +1837,10 @@ +@@ -1802,6 +1846,10 @@ TCP_SKB_CB(skb)->end_seq = (TCP_SKB_CB(skb)->seq + th->syn + th->fin + skb->len - th->doff * 4); TCP_SKB_CB(skb)->ack_seq = ntohl(th->ack_seq); @@ -5396,7 +5398,7 @@ diff -aurN linux-5.4/net/ipv4/tcp_ipv4.c mptcp-mptcp_trunk/net/ipv4/tcp_ipv4.c TCP_SKB_CB(skb)->tcp_flags = tcp_flag_byte(th); TCP_SKB_CB(skb)->tcp_tw_isn = 0; TCP_SKB_CB(skb)->ip_dsfield = ipv4_get_dsfield(iph); -@@ -1812,8 +1860,8 @@ +@@ -1821,8 +1869,8 @@ int sdif = inet_sdif(skb); const struct iphdr *iph; const struct tcphdr *th; @@ -5406,7 +5408,7 @@ diff -aurN linux-5.4/net/ipv4/tcp_ipv4.c mptcp-mptcp_trunk/net/ipv4/tcp_ipv4.c int ret; if (skb->pkt_type != PACKET_HOST) -@@ -1867,7 +1915,11 @@ +@@ -1876,7 +1924,11 @@ reqsk_put(req); goto csum_error; } @@ -5419,7 +5421,7 @@ diff -aurN linux-5.4/net/ipv4/tcp_ipv4.c mptcp-mptcp_trunk/net/ipv4/tcp_ipv4.c inet_csk_reqsk_queue_drop_and_put(sk, req); goto lookup; } -@@ -1876,6 +1928,7 @@ +@@ -1885,6 +1937,7 @@ */ sock_hold(sk); refcounted = true; @@ -5427,7 +5429,7 @@ diff -aurN linux-5.4/net/ipv4/tcp_ipv4.c mptcp-mptcp_trunk/net/ipv4/tcp_ipv4.c nsk = NULL; if (!tcp_filter(sk, skb)) { th = (const struct tcphdr *)skb->data; -@@ -1936,19 +1989,28 @@ +@@ -1945,19 +1998,28 @@ sk_incoming_cpu_update(sk); @@ -5460,7 +5462,7 @@ diff -aurN linux-5.4/net/ipv4/tcp_ipv4.c mptcp-mptcp_trunk/net/ipv4/tcp_ipv4.c if (skb_to_free) __kfree_skb(skb_to_free); -@@ -1964,6 +2026,19 @@ +@@ -1973,6 +2035,19 @@ tcp_v4_fill_cb(skb, iph, th); @@ -5480,7 +5482,7 @@ diff -aurN linux-5.4/net/ipv4/tcp_ipv4.c mptcp-mptcp_trunk/net/ipv4/tcp_ipv4.c if (tcp_checksum_complete(skb)) { csum_error: __TCP_INC_STATS(net, TCP_MIB_CSUMERRORS); -@@ -2012,6 +2087,18 @@ +@@ -2021,6 +2096,18 @@ refcounted = false; goto process; } @@ -5499,7 +5501,7 @@ diff -aurN linux-5.4/net/ipv4/tcp_ipv4.c mptcp-mptcp_trunk/net/ipv4/tcp_ipv4.c } /* to ACK */ /* fall through */ -@@ -2081,7 +2168,12 @@ +@@ -2090,7 +2177,12 @@ tcp_init_sock(sk); @@ -5513,7 +5515,7 @@ diff -aurN linux-5.4/net/ipv4/tcp_ipv4.c mptcp-mptcp_trunk/net/ipv4/tcp_ipv4.c #ifdef CONFIG_TCP_MD5SIG tcp_sk(sk)->af_specific = &tcp_sock_ipv4_specific; -@@ -2100,6 +2192,11 @@ +@@ -2109,6 +2201,11 @@ tcp_cleanup_congestion_control(sk); @@ -5525,7 +5527,7 @@ diff -aurN linux-5.4/net/ipv4/tcp_ipv4.c mptcp-mptcp_trunk/net/ipv4/tcp_ipv4.c tcp_cleanup_ulp(sk); /* Cleanup up the write buffer. */ -@@ -2603,6 +2700,11 @@ +@@ -2613,6 +2710,11 @@ .sysctl_rmem_offset = offsetof(struct net, ipv4.sysctl_tcp_rmem), .max_header = MAX_TCP_HEADER, .obj_size = sizeof(struct tcp_sock), @@ -5537,7 +5539,7 @@ diff -aurN linux-5.4/net/ipv4/tcp_ipv4.c mptcp-mptcp_trunk/net/ipv4/tcp_ipv4.c .slab_flags = SLAB_TYPESAFE_BY_RCU, .twsk_prot = &tcp_timewait_sock_ops, .rsk_prot = &tcp_request_sock_ops, -@@ -2613,6 +2715,9 @@ +@@ -2623,6 +2725,9 @@ .compat_getsockopt = compat_tcp_getsockopt, #endif .diag_destroy = tcp_abort, @@ -5547,9 +5549,9 @@ diff -aurN linux-5.4/net/ipv4/tcp_ipv4.c mptcp-mptcp_trunk/net/ipv4/tcp_ipv4.c }; EXPORT_SYMBOL(tcp_prot); -diff -aurN linux-5.4/net/ipv4/tcp_minisocks.c mptcp-mptcp_trunk/net/ipv4/tcp_minisocks.c ---- linux-5.4/net/ipv4/tcp_minisocks.c 2019-11-25 01:32:01.000000000 +0100 -+++ mptcp-mptcp_trunk/net/ipv4/tcp_minisocks.c 2020-07-14 19:34:59.000000000 +0200 +diff -aurN linux-5.4.64/net/ipv4/tcp_minisocks.c linux-5.4.64.mptcp/net/ipv4/tcp_minisocks.c +--- linux-5.4.64/net/ipv4/tcp_minisocks.c 2020-09-09 19:12:37.000000000 +0200 ++++ linux-5.4.64.mptcp/net/ipv4/tcp_minisocks.c 2020-09-10 19:25:10.503220935 +0200 @@ -19,11 +19,13 @@ * Jorge Cwik, */ @@ -5793,9 +5795,9 @@ diff -aurN linux-5.4/net/ipv4/tcp_minisocks.c mptcp-mptcp_trunk/net/ipv4/tcp_min sock_put(child); return ret; } -diff -aurN linux-5.4/net/ipv4/tcp_output.c mptcp-mptcp_trunk/net/ipv4/tcp_output.c ---- linux-5.4/net/ipv4/tcp_output.c 2019-11-25 01:32:01.000000000 +0100 -+++ mptcp-mptcp_trunk/net/ipv4/tcp_output.c 2020-07-14 19:34:59.000000000 +0200 +diff -aurN linux-5.4.64/net/ipv4/tcp_output.c linux-5.4.64.mptcp/net/ipv4/tcp_output.c +--- linux-5.4.64/net/ipv4/tcp_output.c 2020-09-09 19:12:37.000000000 +0200 ++++ linux-5.4.64.mptcp/net/ipv4/tcp_output.c 2020-09-10 19:34:56.261474044 +0200 @@ -37,6 +37,12 @@ #define pr_fmt(fmt) "TCP: " fmt @@ -5822,7 +5824,7 @@ diff -aurN linux-5.4/net/ipv4/tcp_output.c mptcp-mptcp_trunk/net/ipv4/tcp_output { struct inet_connection_sock *icsk = inet_csk(sk); struct tcp_sock *tp = tcp_sk(sk); -@@ -252,12 +255,16 @@ +@@ -255,12 +258,16 @@ * value can be stuffed directly into th->window for an outgoing * frame. */ @@ -5842,7 +5844,7 @@ diff -aurN linux-5.4/net/ipv4/tcp_output.c mptcp-mptcp_trunk/net/ipv4/tcp_output /* Never shrink the offered window */ if (new_win < cur_win) { -@@ -273,6 +280,7 @@ +@@ -276,6 +283,7 @@ LINUX_MIB_TCPWANTZEROWINDOWADV); new_win = ALIGN(cur_win, 1 << tp->rx_opt.rcv_wscale); } @@ -5850,7 +5852,7 @@ diff -aurN linux-5.4/net/ipv4/tcp_output.c mptcp-mptcp_trunk/net/ipv4/tcp_output tp->rcv_wnd = new_win; tp->rcv_wup = tp->rcv_nxt; -@@ -385,7 +393,7 @@ +@@ -388,7 +396,7 @@ /* Constructs common control bits of non-data skb. If SYN/FIN is present, * auto increment end seqno. */ @@ -5859,7 +5861,7 @@ diff -aurN linux-5.4/net/ipv4/tcp_output.c mptcp-mptcp_trunk/net/ipv4/tcp_output { skb->ip_summed = CHECKSUM_PARTIAL; -@@ -400,7 +408,7 @@ +@@ -403,7 +411,7 @@ TCP_SKB_CB(skb)->end_seq = seq; } @@ -5868,7 +5870,7 @@ diff -aurN linux-5.4/net/ipv4/tcp_output.c mptcp-mptcp_trunk/net/ipv4/tcp_output { return tp->snd_una != tp->snd_up; } -@@ -411,6 +419,7 @@ +@@ -414,6 +422,7 @@ #define OPTION_WSCALE (1 << 3) #define OPTION_FAST_OPEN_COOKIE (1 << 8) #define OPTION_SMC (1 << 9) @@ -5876,7 +5878,7 @@ diff -aurN linux-5.4/net/ipv4/tcp_output.c mptcp-mptcp_trunk/net/ipv4/tcp_output static void smc_options_write(__be32 *ptr, u16 *options) { -@@ -427,17 +436,6 @@ +@@ -430,17 +439,6 @@ #endif } @@ -5894,7 +5896,7 @@ diff -aurN linux-5.4/net/ipv4/tcp_output.c mptcp-mptcp_trunk/net/ipv4/tcp_output /* Write previously computed TCP options to the packet. * * Beware: Something in the Internet is very sensitive to the ordering of -@@ -452,7 +450,7 @@ +@@ -455,7 +453,7 @@ * (but it may well be that other scenarios fail similarly). */ static void tcp_options_write(__be32 *ptr, struct tcp_sock *tp, @@ -5903,7 +5905,7 @@ diff -aurN linux-5.4/net/ipv4/tcp_output.c mptcp-mptcp_trunk/net/ipv4/tcp_output { u16 options = opts->options; /* mungable copy */ -@@ -546,6 +544,9 @@ +@@ -549,6 +547,9 @@ } smc_options_write(ptr, &options); @@ -5913,7 +5915,7 @@ diff -aurN linux-5.4/net/ipv4/tcp_output.c mptcp-mptcp_trunk/net/ipv4/tcp_output } static void smc_set_option(const struct tcp_sock *tp, -@@ -632,6 +633,8 @@ +@@ -635,6 +636,8 @@ if (unlikely(!(OPTION_TS & opts->options))) remaining -= TCPOLEN_SACKPERM_ALIGNED; } @@ -5922,7 +5924,7 @@ diff -aurN linux-5.4/net/ipv4/tcp_output.c mptcp-mptcp_trunk/net/ipv4/tcp_output if (fastopen && fastopen->cookie.len >= 0) { u32 need = fastopen->cookie.len; -@@ -713,6 +716,9 @@ +@@ -718,6 +721,9 @@ smc_set_option_cond(tcp_sk(sk), ireq, opts, &remaining); @@ -5932,7 +5934,7 @@ diff -aurN linux-5.4/net/ipv4/tcp_output.c mptcp-mptcp_trunk/net/ipv4/tcp_output return MAX_TCP_OPTION_SPACE - remaining; } -@@ -747,17 +753,22 @@ +@@ -752,14 +758,19 @@ opts->tsecr = tp->rx_opt.ts_recent; size += TCPOLEN_TSTAMP_ALIGNED; } @@ -5941,29 +5943,22 @@ diff -aurN linux-5.4/net/ipv4/tcp_output.c mptcp-mptcp_trunk/net/ipv4/tcp_output eff_sacks = tp->rx_opt.num_sacks + tp->rx_opt.dsack; if (unlikely(eff_sacks)) { -- const unsigned int remaining = MAX_TCP_OPTION_SPACE - size; + const unsigned int remaining = MAX_TCP_OPTION_SPACE - size; - opts->num_sack_blocks = - min_t(unsigned int, eff_sacks, - (remaining - TCPOLEN_SACK_BASE_ALIGNED) / - TCPOLEN_SACK_PERBLOCK); -- if (likely(opts->num_sack_blocks)) -- size += TCPOLEN_SACK_BASE_ALIGNED + -- opts->num_sack_blocks * TCPOLEN_SACK_PERBLOCK; -+ const unsigned remaining = MAX_TCP_OPTION_SPACE - size; + if (remaining < TCPOLEN_SACK_BASE_ALIGNED) + opts->num_sack_blocks = 0; + else + opts->num_sack_blocks = -+ min_t(unsigned int, eff_sacks, -+ (remaining - TCPOLEN_SACK_BASE_ALIGNED) / -+ TCPOLEN_SACK_PERBLOCK); -+ if (likely(opts->num_sack_blocks)) -+ size += TCPOLEN_SACK_BASE_ALIGNED + -+ opts->num_sack_blocks * TCPOLEN_SACK_PERBLOCK; - } - - return size; -@@ -796,19 +808,31 @@ ++ min_t(unsigned int, eff_sacks, ++ (remaining - TCPOLEN_SACK_BASE_ALIGNED) / ++ TCPOLEN_SACK_PERBLOCK); + if (likely(opts->num_sack_blocks)) + size += TCPOLEN_SACK_BASE_ALIGNED + + opts->num_sack_blocks * TCPOLEN_SACK_PERBLOCK; +@@ -802,19 +813,31 @@ tcp_xmit_retransmit_queue(sk); } @@ -6002,7 +5997,7 @@ diff -aurN linux-5.4/net/ipv4/tcp_output.c mptcp-mptcp_trunk/net/ipv4/tcp_output } /* * One tasklet per cpu tries to send more skbs. -@@ -845,7 +869,9 @@ +@@ -851,7 +874,9 @@ #define TCP_DEFERRED_ALL (TCPF_TSQ_DEFERRED | \ TCPF_WRITE_TIMER_DEFERRED | \ TCPF_DELACK_TIMER_DEFERRED | \ @@ -6013,7 +6008,7 @@ diff -aurN linux-5.4/net/ipv4/tcp_output.c mptcp-mptcp_trunk/net/ipv4/tcp_output /** * tcp_release_cb - tcp release_sock() callback * @sk: socket -@@ -868,6 +894,9 @@ +@@ -874,6 +899,9 @@ if (flags & TCPF_TSQ_DEFERRED) { tcp_tsq_write(sk); __sock_put(sk); @@ -6023,7 +6018,7 @@ diff -aurN linux-5.4/net/ipv4/tcp_output.c mptcp-mptcp_trunk/net/ipv4/tcp_output } /* Here begins the tricky part : * We are called from release_sock() with : -@@ -892,6 +921,13 @@ +@@ -898,6 +926,13 @@ inet_csk(sk)->icsk_af_ops->mtu_reduced(sk); __sock_put(sk); } @@ -6037,7 +6032,7 @@ diff -aurN linux-5.4/net/ipv4/tcp_output.c mptcp-mptcp_trunk/net/ipv4/tcp_output } EXPORT_SYMBOL(tcp_release_cb); -@@ -975,8 +1011,8 @@ +@@ -981,8 +1016,8 @@ return HRTIMER_NORESTART; } @@ -6048,7 +6043,7 @@ diff -aurN linux-5.4/net/ipv4/tcp_output.c mptcp-mptcp_trunk/net/ipv4/tcp_output { struct tcp_sock *tp = tcp_sk(sk); -@@ -1118,10 +1154,10 @@ +@@ -1128,10 +1163,10 @@ } } @@ -6061,7 +6056,7 @@ diff -aurN linux-5.4/net/ipv4/tcp_output.c mptcp-mptcp_trunk/net/ipv4/tcp_output tcp_ecn_send(sk, skb, th, tcp_header_size); } else { /* RFC1323: The window in SYN & SYN/ACK segments -@@ -1179,8 +1215,8 @@ +@@ -1189,8 +1224,8 @@ return err; } @@ -6072,7 +6067,7 @@ diff -aurN linux-5.4/net/ipv4/tcp_output.c mptcp-mptcp_trunk/net/ipv4/tcp_output { return __tcp_transmit_skb(sk, skb, clone_it, gfp_mask, tcp_sk(sk)->rcv_nxt); -@@ -1191,7 +1227,7 @@ +@@ -1201,7 +1236,7 @@ * NOTE: probe0 timer is not checked, do not forget tcp_push_pending_frames, * otherwise socket can stall. */ @@ -6081,7 +6076,7 @@ diff -aurN linux-5.4/net/ipv4/tcp_output.c mptcp-mptcp_trunk/net/ipv4/tcp_output { struct tcp_sock *tp = tcp_sk(sk); -@@ -1204,7 +1240,7 @@ +@@ -1214,7 +1249,7 @@ } /* Initialize TSO segments for a packet. */ @@ -6090,7 +6085,7 @@ diff -aurN linux-5.4/net/ipv4/tcp_output.c mptcp-mptcp_trunk/net/ipv4/tcp_output { if (skb->len <= mss_now) { /* Avoid the costly divide in the normal -@@ -1221,7 +1257,7 @@ +@@ -1231,7 +1266,7 @@ /* Pcount in the middle of the write queue got changed, we need to do various * tweaks to fix counters */ @@ -6099,7 +6094,7 @@ diff -aurN linux-5.4/net/ipv4/tcp_output.c mptcp-mptcp_trunk/net/ipv4/tcp_output { struct tcp_sock *tp = tcp_sk(sk); -@@ -1390,7 +1426,7 @@ +@@ -1400,7 +1435,7 @@ /* This is similar to __pskb_pull_tail(). The difference is that pulled * data is not copied, but immediately discarded. */ @@ -6108,7 +6103,7 @@ diff -aurN linux-5.4/net/ipv4/tcp_output.c mptcp-mptcp_trunk/net/ipv4/tcp_output { struct skb_shared_info *shinfo; int i, k, eat; -@@ -1612,6 +1648,7 @@ +@@ -1622,6 +1657,7 @@ return mss_now; } @@ -6116,7 +6111,7 @@ diff -aurN linux-5.4/net/ipv4/tcp_output.c mptcp-mptcp_trunk/net/ipv4/tcp_output /* RFC2861, slow part. Adjust cwnd, after it was not full during one rto. * As additional protections, we do not touch cwnd in retransmission phases, -@@ -1693,8 +1730,8 @@ +@@ -1703,8 +1739,8 @@ * But we can avoid doing the divide again given we already have * skb_pcount = skb->len / mss_now */ @@ -6127,7 +6122,7 @@ diff -aurN linux-5.4/net/ipv4/tcp_output.c mptcp-mptcp_trunk/net/ipv4/tcp_output { if (skb->len < tcp_skb_pcount(skb) * mss_now) tp->snd_sml = TCP_SKB_CB(skb)->end_seq; -@@ -1754,11 +1791,11 @@ +@@ -1764,11 +1800,11 @@ } /* Returns the portion of skb which can be sent right away */ @@ -6144,7 +6139,7 @@ diff -aurN linux-5.4/net/ipv4/tcp_output.c mptcp-mptcp_trunk/net/ipv4/tcp_output { const struct tcp_sock *tp = tcp_sk(sk); u32 partial, needed, window, max_len; -@@ -1788,13 +1825,14 @@ +@@ -1798,13 +1834,14 @@ /* Can at least one segment of SKB be sent right now, according to the * congestion window rules? If so, return how many segments are allowed. */ @@ -6162,7 +6157,7 @@ diff -aurN linux-5.4/net/ipv4/tcp_output.c mptcp-mptcp_trunk/net/ipv4/tcp_output tcp_skb_pcount(skb) == 1) return 1; -@@ -1809,12 +1847,13 @@ +@@ -1819,12 +1856,13 @@ halfcwnd = max(cwnd >> 1, 1U); return min(halfcwnd, cwnd - in_flight); } @@ -6177,7 +6172,7 @@ diff -aurN linux-5.4/net/ipv4/tcp_output.c mptcp-mptcp_trunk/net/ipv4/tcp_output { int tso_segs = tcp_skb_pcount(skb); -@@ -1829,8 +1868,8 @@ +@@ -1839,8 +1877,8 @@ /* Return true if the Nagle test allows this packet to be * sent now. */ @@ -6188,7 +6183,7 @@ diff -aurN linux-5.4/net/ipv4/tcp_output.c mptcp-mptcp_trunk/net/ipv4/tcp_output { /* Nagle rule does not apply to frames, which sit in the middle of the * write_queue (they have no chances to get new data). -@@ -1842,7 +1881,8 @@ +@@ -1852,7 +1890,8 @@ return true; /* Don't use the nagle rule for urgent data (or for the final FIN). */ @@ -6198,7 +6193,7 @@ diff -aurN linux-5.4/net/ipv4/tcp_output.c mptcp-mptcp_trunk/net/ipv4/tcp_output return true; if (!tcp_nagle_check(skb->len < cur_mss, tp, nonagle)) -@@ -1852,9 +1892,8 @@ +@@ -1862,9 +1901,8 @@ } /* Does at least the first segment of SKB fit into the send window? */ @@ -6210,7 +6205,7 @@ diff -aurN linux-5.4/net/ipv4/tcp_output.c mptcp-mptcp_trunk/net/ipv4/tcp_output { u32 end_seq = TCP_SKB_CB(skb)->end_seq; -@@ -1863,6 +1902,7 @@ +@@ -1873,6 +1911,7 @@ return !after(end_seq, tcp_wnd_end(tp)); } @@ -6218,7 +6213,7 @@ diff -aurN linux-5.4/net/ipv4/tcp_output.c mptcp-mptcp_trunk/net/ipv4/tcp_output /* Trim TSO SKB to LEN bytes, put the remaining data into a new packet * which is put after SKB on the list. It is very much like -@@ -2021,7 +2061,8 @@ +@@ -2031,7 +2070,8 @@ /* If this packet won't get more data, do not wait. */ if ((TCP_SKB_CB(skb)->tcp_flags & TCPHDR_FIN) || @@ -6228,7 +6223,7 @@ diff -aurN linux-5.4/net/ipv4/tcp_output.c mptcp-mptcp_trunk/net/ipv4/tcp_output goto send_now; return true; -@@ -2354,7 +2395,7 @@ +@@ -2364,7 +2404,7 @@ * Returns true, if no segments are in flight and we have queued segments, * but cannot send anything now because of SWS or another problem. */ @@ -6237,7 +6232,7 @@ diff -aurN linux-5.4/net/ipv4/tcp_output.c mptcp-mptcp_trunk/net/ipv4/tcp_output int push_one, gfp_t gfp) { struct tcp_sock *tp = tcp_sk(sk); -@@ -2368,7 +2409,12 @@ +@@ -2378,7 +2418,12 @@ sent_pkts = 0; tcp_mstamp_refresh(tp); @@ -6251,7 +6246,7 @@ diff -aurN linux-5.4/net/ipv4/tcp_output.c mptcp-mptcp_trunk/net/ipv4/tcp_output /* Do MTU probing. */ result = tcp_mtu_probe(sk); if (!result) { -@@ -2549,7 +2595,7 @@ +@@ -2572,7 +2617,7 @@ skb = tcp_send_head(sk); if (skb && tcp_snd_wnd_test(tp, skb, mss)) { pcount = tp->packets_out; @@ -6260,7 +6255,7 @@ diff -aurN linux-5.4/net/ipv4/tcp_output.c mptcp-mptcp_trunk/net/ipv4/tcp_output if (tp->packets_out > pcount) goto probe_sent; goto rearm_timer; -@@ -2613,8 +2659,8 @@ +@@ -2634,8 +2679,8 @@ if (unlikely(sk->sk_state == TCP_CLOSE)) return; @@ -6271,7 +6266,7 @@ diff -aurN linux-5.4/net/ipv4/tcp_output.c mptcp-mptcp_trunk/net/ipv4/tcp_output tcp_check_probe_timer(sk); } -@@ -2627,7 +2673,8 @@ +@@ -2648,7 +2693,8 @@ BUG_ON(!skb || skb->len < mss_now); @@ -6281,7 +6276,7 @@ diff -aurN linux-5.4/net/ipv4/tcp_output.c mptcp-mptcp_trunk/net/ipv4/tcp_output } /* This function returns the amount that we can raise the -@@ -2849,6 +2896,10 @@ +@@ -2870,6 +2916,10 @@ if (TCP_SKB_CB(skb)->tcp_flags & TCPHDR_SYN) return; @@ -6292,7 +6287,7 @@ diff -aurN linux-5.4/net/ipv4/tcp_output.c mptcp-mptcp_trunk/net/ipv4/tcp_output skb_rbtree_walk_from_safe(skb, tmp) { if (!tcp_can_collapse(sk, skb)) break; -@@ -3325,7 +3376,7 @@ +@@ -3351,7 +3401,7 @@ /* RFC1323: The window in SYN & SYN/ACK segments is never scaled. */ th->window = htons(min(req->rsk_rcv_wnd, 65535U)); @@ -6301,7 +6296,7 @@ diff -aurN linux-5.4/net/ipv4/tcp_output.c mptcp-mptcp_trunk/net/ipv4/tcp_output th->doff = (tcp_header_size >> 2); __TCP_INC_STATS(sock_net(sk), TCP_MIB_OUTSEGS); -@@ -3407,13 +3458,13 @@ +@@ -3433,13 +3483,13 @@ if (rcv_wnd == 0) rcv_wnd = dst_metric(dst, RTAX_INITRWND); @@ -6322,7 +6317,7 @@ diff -aurN linux-5.4/net/ipv4/tcp_output.c mptcp-mptcp_trunk/net/ipv4/tcp_output tp->rx_opt.rcv_wscale = rcv_wscale; tp->rcv_ssthresh = tp->rcv_wnd; -@@ -3438,6 +3489,36 @@ +@@ -3464,6 +3514,36 @@ inet_csk(sk)->icsk_rto = tcp_timeout_init(sk); inet_csk(sk)->icsk_retransmits = 0; tcp_clear_retrans(tp); @@ -6359,7 +6354,7 @@ diff -aurN linux-5.4/net/ipv4/tcp_output.c mptcp-mptcp_trunk/net/ipv4/tcp_output } static void tcp_connect_queue_skb(struct sock *sk, struct sk_buff *skb) -@@ -3701,6 +3782,7 @@ +@@ -3727,6 +3807,7 @@ { __tcp_send_ack(sk, tcp_sk(sk)->rcv_nxt); } @@ -6367,7 +6362,7 @@ diff -aurN linux-5.4/net/ipv4/tcp_output.c mptcp-mptcp_trunk/net/ipv4/tcp_output /* This routine sends a packet with an out of date sequence * number. It assumes the other end will try to ack it. -@@ -3713,7 +3795,7 @@ +@@ -3739,7 +3820,7 @@ * one is with SEG.SEQ=SND.UNA to deliver urgent pointer, another is * out-of-date with SND.UNA-1 to probe window. */ @@ -6376,7 +6371,7 @@ diff -aurN linux-5.4/net/ipv4/tcp_output.c mptcp-mptcp_trunk/net/ipv4/tcp_output { struct tcp_sock *tp = tcp_sk(sk); struct sk_buff *skb; -@@ -3800,7 +3882,7 @@ +@@ -3826,7 +3907,7 @@ unsigned long timeout; int err; @@ -6385,9 +6380,9 @@ diff -aurN linux-5.4/net/ipv4/tcp_output.c mptcp-mptcp_trunk/net/ipv4/tcp_output if (tp->packets_out || tcp_write_queue_empty(sk)) { /* Cancel probe timer, if it is not required. */ -diff -aurN linux-5.4/net/ipv4/tcp_timer.c mptcp-mptcp_trunk/net/ipv4/tcp_timer.c ---- linux-5.4/net/ipv4/tcp_timer.c 2019-11-25 01:32:01.000000000 +0100 -+++ mptcp-mptcp_trunk/net/ipv4/tcp_timer.c 2020-07-14 19:34:59.000000000 +0200 +diff -aurN linux-5.4.64/net/ipv4/tcp_timer.c linux-5.4.64.mptcp/net/ipv4/tcp_timer.c +--- linux-5.4.64/net/ipv4/tcp_timer.c 2020-09-09 19:12:37.000000000 +0200 ++++ linux-5.4.64.mptcp/net/ipv4/tcp_timer.c 2020-09-10 19:25:10.507220869 +0200 @@ -21,6 +21,7 @@ #include @@ -6599,9 +6594,9 @@ diff -aurN linux-5.4/net/ipv4/tcp_timer.c mptcp-mptcp_trunk/net/ipv4/tcp_timer.c sock_put(sk); } -diff -aurN linux-5.4/net/ipv6/addrconf.c mptcp-mptcp_trunk/net/ipv6/addrconf.c ---- linux-5.4/net/ipv6/addrconf.c 2019-11-25 01:32:01.000000000 +0100 -+++ mptcp-mptcp_trunk/net/ipv6/addrconf.c 2020-07-14 19:34:59.000000000 +0200 +diff -aurN linux-5.4.64/net/ipv6/addrconf.c linux-5.4.64.mptcp/net/ipv6/addrconf.c +--- linux-5.4.64/net/ipv6/addrconf.c 2020-09-09 19:12:37.000000000 +0200 ++++ linux-5.4.64.mptcp/net/ipv6/addrconf.c 2020-09-10 19:25:10.507220869 +0200 @@ -967,6 +967,7 @@ kfree_rcu(ifp, rcu); @@ -6610,9 +6605,9 @@ diff -aurN linux-5.4/net/ipv6/addrconf.c mptcp-mptcp_trunk/net/ipv6/addrconf.c static void ipv6_link_dev_addr(struct inet6_dev *idev, struct inet6_ifaddr *ifp) -diff -aurN linux-5.4/net/ipv6/af_inet6.c mptcp-mptcp_trunk/net/ipv6/af_inet6.c ---- linux-5.4/net/ipv6/af_inet6.c 2019-11-25 01:32:01.000000000 +0100 -+++ mptcp-mptcp_trunk/net/ipv6/af_inet6.c 2020-07-14 19:34:59.000000000 +0200 +diff -aurN linux-5.4.64/net/ipv6/af_inet6.c linux-5.4.64.mptcp/net/ipv6/af_inet6.c +--- linux-5.4.64/net/ipv6/af_inet6.c 2020-09-09 19:12:37.000000000 +0200 ++++ linux-5.4.64.mptcp/net/ipv6/af_inet6.c 2020-09-10 19:25:10.507220869 +0200 @@ -104,8 +104,7 @@ return (struct ipv6_pinfo *)(((u8 *)sk) + offset); } @@ -6623,9 +6618,9 @@ diff -aurN linux-5.4/net/ipv6/af_inet6.c mptcp-mptcp_trunk/net/ipv6/af_inet6.c { struct inet_sock *inet; struct ipv6_pinfo *np; -diff -aurN linux-5.4/net/ipv6/ipv6_sockglue.c mptcp-mptcp_trunk/net/ipv6/ipv6_sockglue.c ---- linux-5.4/net/ipv6/ipv6_sockglue.c 2019-11-25 01:32:01.000000000 +0100 -+++ mptcp-mptcp_trunk/net/ipv6/ipv6_sockglue.c 2020-07-14 19:34:59.000000000 +0200 +diff -aurN linux-5.4.64/net/ipv6/ipv6_sockglue.c linux-5.4.64.mptcp/net/ipv6/ipv6_sockglue.c +--- linux-5.4.64/net/ipv6/ipv6_sockglue.c 2020-09-09 19:12:37.000000000 +0200 ++++ linux-5.4.64.mptcp/net/ipv6/ipv6_sockglue.c 2020-09-10 19:25:10.507220869 +0200 @@ -44,6 +44,8 @@ #include #include @@ -6635,7 +6630,7 @@ diff -aurN linux-5.4/net/ipv6/ipv6_sockglue.c mptcp-mptcp_trunk/net/ipv6/ipv6_so #include #include #include -@@ -214,7 +216,12 @@ +@@ -221,7 +223,12 @@ sock_prot_inuse_add(net, &tcp_prot, 1); local_bh_enable(); sk->sk_prot = &tcp_prot; @@ -6649,9 +6644,9 @@ diff -aurN linux-5.4/net/ipv6/ipv6_sockglue.c mptcp-mptcp_trunk/net/ipv6/ipv6_so sk->sk_socket->ops = &inet_stream_ops; sk->sk_family = PF_INET; tcp_sync_mss(sk, icsk->icsk_pmtu_cookie); -diff -aurN linux-5.4/net/ipv6/syncookies.c mptcp-mptcp_trunk/net/ipv6/syncookies.c ---- linux-5.4/net/ipv6/syncookies.c 2019-11-25 01:32:01.000000000 +0100 -+++ mptcp-mptcp_trunk/net/ipv6/syncookies.c 2020-07-14 19:34:59.000000000 +0200 +diff -aurN linux-5.4.64/net/ipv6/syncookies.c linux-5.4.64.mptcp/net/ipv6/syncookies.c +--- linux-5.4.64/net/ipv6/syncookies.c 2020-09-09 19:12:37.000000000 +0200 ++++ linux-5.4.64.mptcp/net/ipv6/syncookies.c 2020-09-10 19:25:10.507220869 +0200 @@ -15,6 +15,8 @@ #include #include @@ -6739,9 +6734,9 @@ diff -aurN linux-5.4/net/ipv6/syncookies.c mptcp-mptcp_trunk/net/ipv6/syncookies out: return ret; out_free: -diff -aurN linux-5.4/net/ipv6/tcp_ipv6.c mptcp-mptcp_trunk/net/ipv6/tcp_ipv6.c ---- linux-5.4/net/ipv6/tcp_ipv6.c 2019-11-25 01:32:01.000000000 +0100 -+++ mptcp-mptcp_trunk/net/ipv6/tcp_ipv6.c 2020-07-14 19:34:59.000000000 +0200 +diff -aurN linux-5.4.64/net/ipv6/tcp_ipv6.c linux-5.4.64.mptcp/net/ipv6/tcp_ipv6.c +--- linux-5.4.64/net/ipv6/tcp_ipv6.c 2020-09-09 19:12:37.000000000 +0200 ++++ linux-5.4.64.mptcp/net/ipv6/tcp_ipv6.c 2020-09-10 19:25:10.507220869 +0200 @@ -58,6 +58,8 @@ #include #include @@ -7342,10 +7337,10 @@ diff -aurN linux-5.4/net/ipv6/tcp_ipv6.c mptcp-mptcp_trunk/net/ipv6/tcp_ipv6.c }; /* thinking of making this const? Don't. -diff -aurN linux-5.4/net/Kconfig mptcp-mptcp_trunk/net/Kconfig ---- linux-5.4/net/Kconfig 2019-11-25 01:32:01.000000000 +0100 -+++ mptcp-mptcp_trunk/net/Kconfig 2020-07-14 19:34:59.000000000 +0200 -@@ -91,6 +91,7 @@ +diff -aurN linux-5.4.64/net/Kconfig linux-5.4.64.mptcp/net/Kconfig +--- linux-5.4.64/net/Kconfig 2020-09-09 19:12:37.000000000 +0200 ++++ linux-5.4.64.mptcp/net/Kconfig 2020-09-10 19:25:10.507220869 +0200 +@@ -94,6 +94,7 @@ source "net/ipv4/Kconfig" source "net/ipv6/Kconfig" source "net/netlabel/Kconfig" @@ -7353,9 +7348,9 @@ diff -aurN linux-5.4/net/Kconfig mptcp-mptcp_trunk/net/Kconfig endif # if INET -diff -aurN linux-5.4/net/Makefile mptcp-mptcp_trunk/net/Makefile ---- linux-5.4/net/Makefile 2019-11-25 01:32:01.000000000 +0100 -+++ mptcp-mptcp_trunk/net/Makefile 2020-07-14 19:34:59.000000000 +0200 +diff -aurN linux-5.4.64/net/Makefile linux-5.4.64.mptcp/net/Makefile +--- linux-5.4.64/net/Makefile 2020-09-09 19:12:37.000000000 +0200 ++++ linux-5.4.64.mptcp/net/Makefile 2020-09-10 19:25:10.507220869 +0200 @@ -20,6 +20,7 @@ obj-$(CONFIG_XFRM) += xfrm/ obj-$(CONFIG_UNIX_SCM) += unix/ @@ -7364,9 +7359,9 @@ diff -aurN linux-5.4/net/Makefile mptcp-mptcp_trunk/net/Makefile obj-$(CONFIG_BPFILTER) += bpfilter/ obj-$(CONFIG_PACKET) += packet/ obj-$(CONFIG_NET_KEY) += key/ -diff -aurN linux-5.4/net/mptcp/Kconfig mptcp-mptcp_trunk/net/mptcp/Kconfig ---- linux-5.4/net/mptcp/Kconfig 1970-01-01 01:00:00.000000000 +0100 -+++ mptcp-mptcp_trunk/net/mptcp/Kconfig 2020-07-14 19:34:59.000000000 +0200 +diff -aurN linux-5.4.64/net/mptcp/Kconfig linux-5.4.64.mptcp/net/mptcp/Kconfig +--- linux-5.4.64/net/mptcp/Kconfig 1970-01-01 01:00:00.000000000 +0100 ++++ linux-5.4.64.mptcp/net/mptcp/Kconfig 2020-09-10 19:25:10.507220869 +0200 @@ -0,0 +1,154 @@ +# +# MPTCP configuration @@ -7522,9 +7517,9 @@ diff -aurN linux-5.4/net/mptcp/Kconfig mptcp-mptcp_trunk/net/mptcp/Kconfig + default "redundant" if DEFAULT_REDUNDANT + default "default" + -diff -aurN linux-5.4/net/mptcp/Makefile mptcp-mptcp_trunk/net/mptcp/Makefile ---- linux-5.4/net/mptcp/Makefile 1970-01-01 01:00:00.000000000 +0100 -+++ mptcp-mptcp_trunk/net/mptcp/Makefile 2020-07-14 19:34:59.000000000 +0200 +diff -aurN linux-5.4.64/net/mptcp/Makefile linux-5.4.64.mptcp/net/mptcp/Makefile +--- linux-5.4.64/net/mptcp/Makefile 1970-01-01 01:00:00.000000000 +0100 ++++ linux-5.4.64.mptcp/net/mptcp/Makefile 2020-09-10 19:25:10.507220869 +0200 @@ -0,0 +1,25 @@ +# +## Makefile for MultiPath TCP support code. @@ -7551,9 +7546,9 @@ diff -aurN linux-5.4/net/mptcp/Makefile mptcp-mptcp_trunk/net/mptcp/Makefile +obj-$(CONFIG_MPTCP_ECF) += mptcp_ecf.o + +mptcp-$(subst m,y,$(CONFIG_IPV6)) += mptcp_ipv6.o -diff -aurN linux-5.4/net/mptcp/mctcp_desync.c mptcp-mptcp_trunk/net/mptcp/mctcp_desync.c ---- linux-5.4/net/mptcp/mctcp_desync.c 1970-01-01 01:00:00.000000000 +0100 -+++ mptcp-mptcp_trunk/net/mptcp/mctcp_desync.c 2020-07-14 19:34:59.000000000 +0200 +diff -aurN linux-5.4.64/net/mptcp/mctcp_desync.c linux-5.4.64.mptcp/net/mptcp/mctcp_desync.c +--- linux-5.4.64/net/mptcp/mctcp_desync.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-5.4.64.mptcp/net/mptcp/mctcp_desync.c 2020-09-10 19:25:10.507220869 +0200 @@ -0,0 +1,193 @@ +/* + * Desynchronized Multi-Channel TCP Congestion Control Algorithm @@ -7748,9 +7743,9 @@ diff -aurN linux-5.4/net/mptcp/mctcp_desync.c mptcp-mptcp_trunk/net/mptcp/mctcp_ +MODULE_LICENSE("GPL"); +MODULE_DESCRIPTION("MCTCP: DESYNCHRONIZED MULTICHANNEL TCP CONGESTION CONTROL"); +MODULE_VERSION("1.0"); -diff -aurN linux-5.4/net/mptcp/mptcp_balia.c mptcp-mptcp_trunk/net/mptcp/mptcp_balia.c ---- linux-5.4/net/mptcp/mptcp_balia.c 1970-01-01 01:00:00.000000000 +0100 -+++ mptcp-mptcp_trunk/net/mptcp/mptcp_balia.c 2020-07-14 19:34:59.000000000 +0200 +diff -aurN linux-5.4.64/net/mptcp/mptcp_balia.c linux-5.4.64.mptcp/net/mptcp/mptcp_balia.c +--- linux-5.4.64/net/mptcp/mptcp_balia.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-5.4.64.mptcp/net/mptcp/mptcp_balia.c 2020-09-10 19:25:10.507220869 +0200 @@ -0,0 +1,261 @@ +/* + * MPTCP implementation - Balia Congestion Control @@ -8013,9 +8008,9 @@ diff -aurN linux-5.4/net/mptcp/mptcp_balia.c mptcp-mptcp_trunk/net/mptcp/mptcp_b +MODULE_LICENSE("GPL"); +MODULE_DESCRIPTION("MPTCP BALIA CONGESTION CONTROL ALGORITHM"); +MODULE_VERSION("0.1"); -diff -aurN linux-5.4/net/mptcp/mptcp_binder.c mptcp-mptcp_trunk/net/mptcp/mptcp_binder.c ---- linux-5.4/net/mptcp/mptcp_binder.c 1970-01-01 01:00:00.000000000 +0100 -+++ mptcp-mptcp_trunk/net/mptcp/mptcp_binder.c 2020-07-14 19:34:59.000000000 +0200 +diff -aurN linux-5.4.64/net/mptcp/mptcp_binder.c linux-5.4.64.mptcp/net/mptcp/mptcp_binder.c +--- linux-5.4.64/net/mptcp/mptcp_binder.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-5.4.64.mptcp/net/mptcp/mptcp_binder.c 2020-09-10 19:25:10.507220869 +0200 @@ -0,0 +1,494 @@ +#include + @@ -8511,9 +8506,9 @@ diff -aurN linux-5.4/net/mptcp/mptcp_binder.c mptcp-mptcp_trunk/net/mptcp/mptcp_ +MODULE_LICENSE("GPL"); +MODULE_DESCRIPTION("BINDER MPTCP"); +MODULE_VERSION("0.1"); -diff -aurN linux-5.4/net/mptcp/mptcp_blest.c mptcp-mptcp_trunk/net/mptcp/mptcp_blest.c ---- linux-5.4/net/mptcp/mptcp_blest.c 1970-01-01 01:00:00.000000000 +0100 -+++ mptcp-mptcp_trunk/net/mptcp/mptcp_blest.c 2020-07-14 19:34:59.000000000 +0200 +diff -aurN linux-5.4.64/net/mptcp/mptcp_blest.c linux-5.4.64.mptcp/net/mptcp/mptcp_blest.c +--- linux-5.4.64/net/mptcp/mptcp_blest.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-5.4.64.mptcp/net/mptcp/mptcp_blest.c 2020-09-10 19:25:10.507220869 +0200 @@ -0,0 +1,285 @@ +// SPDX-License-Identifier: GPL-2.0 +/* MPTCP Scheduler to reduce HoL-blocking and spurious retransmissions. @@ -8800,9 +8795,9 @@ diff -aurN linux-5.4/net/mptcp/mptcp_blest.c mptcp-mptcp_trunk/net/mptcp/mptcp_b +MODULE_LICENSE("GPL"); +MODULE_DESCRIPTION("BLEST scheduler for MPTCP, based on default minimum RTT scheduler"); +MODULE_VERSION("0.95"); -diff -aurN linux-5.4/net/mptcp/mptcp_coupled.c mptcp-mptcp_trunk/net/mptcp/mptcp_coupled.c ---- linux-5.4/net/mptcp/mptcp_coupled.c 1970-01-01 01:00:00.000000000 +0100 -+++ mptcp-mptcp_trunk/net/mptcp/mptcp_coupled.c 2020-07-14 19:34:59.000000000 +0200 +diff -aurN linux-5.4.64/net/mptcp/mptcp_coupled.c linux-5.4.64.mptcp/net/mptcp/mptcp_coupled.c +--- linux-5.4.64/net/mptcp/mptcp_coupled.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-5.4.64.mptcp/net/mptcp/mptcp_coupled.c 2020-09-10 19:25:10.507220869 +0200 @@ -0,0 +1,262 @@ +/* + * MPTCP implementation - Linked Increase congestion control Algorithm (LIA) @@ -9066,9 +9061,9 @@ diff -aurN linux-5.4/net/mptcp/mptcp_coupled.c mptcp-mptcp_trunk/net/mptcp/mptcp +MODULE_LICENSE("GPL"); +MODULE_DESCRIPTION("MPTCP LINKED INCREASE CONGESTION CONTROL ALGORITHM"); +MODULE_VERSION("0.1"); -diff -aurN linux-5.4/net/mptcp/mptcp_ctrl.c mptcp-mptcp_trunk/net/mptcp/mptcp_ctrl.c ---- linux-5.4/net/mptcp/mptcp_ctrl.c 1970-01-01 01:00:00.000000000 +0100 -+++ mptcp-mptcp_trunk/net/mptcp/mptcp_ctrl.c 2020-07-14 19:34:59.000000000 +0200 +diff -aurN linux-5.4.64/net/mptcp/mptcp_ctrl.c linux-5.4.64.mptcp/net/mptcp/mptcp_ctrl.c +--- linux-5.4.64/net/mptcp/mptcp_ctrl.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-5.4.64.mptcp/net/mptcp/mptcp_ctrl.c 2020-09-10 19:25:10.507220869 +0200 @@ -0,0 +1,3309 @@ +/* + * MPTCP implementation - MPTCP-control @@ -12379,9 +12374,9 @@ diff -aurN linux-5.4/net/mptcp/mptcp_ctrl.c mptcp-mptcp_trunk/net/mptcp/mptcp_ct +mptcp_sock_cache_failed: + mptcp_init_failed = true; +} -diff -aurN linux-5.4/net/mptcp/mptcp_ecf.c mptcp-mptcp_trunk/net/mptcp/mptcp_ecf.c ---- linux-5.4/net/mptcp/mptcp_ecf.c 1970-01-01 01:00:00.000000000 +0100 -+++ mptcp-mptcp_trunk/net/mptcp/mptcp_ecf.c 2020-07-14 19:34:59.000000000 +0200 +diff -aurN linux-5.4.64/net/mptcp/mptcp_ecf.c linux-5.4.64.mptcp/net/mptcp/mptcp_ecf.c +--- linux-5.4.64/net/mptcp/mptcp_ecf.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-5.4.64.mptcp/net/mptcp/mptcp_ecf.c 2020-09-10 19:25:10.507220869 +0200 @@ -0,0 +1,195 @@ +// SPDX-License-Identifier: GPL-2.0 +/* MPTCP ECF Scheduler @@ -12578,9 +12573,9 @@ diff -aurN linux-5.4/net/mptcp/mptcp_ecf.c mptcp-mptcp_trunk/net/mptcp/mptcp_ecf +MODULE_LICENSE("GPL"); +MODULE_DESCRIPTION("ECF (Earliest Completion First) scheduler for MPTCP, based on default minimum RTT scheduler"); +MODULE_VERSION("0.95"); -diff -aurN linux-5.4/net/mptcp/mptcp_fullmesh.c mptcp-mptcp_trunk/net/mptcp/mptcp_fullmesh.c ---- linux-5.4/net/mptcp/mptcp_fullmesh.c 1970-01-01 01:00:00.000000000 +0100 -+++ mptcp-mptcp_trunk/net/mptcp/mptcp_fullmesh.c 2020-07-14 19:34:59.000000000 +0200 +diff -aurN linux-5.4.64/net/mptcp/mptcp_fullmesh.c linux-5.4.64.mptcp/net/mptcp/mptcp_fullmesh.c +--- linux-5.4.64/net/mptcp/mptcp_fullmesh.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-5.4.64.mptcp/net/mptcp/mptcp_fullmesh.c 2020-09-10 19:25:10.507220869 +0200 @@ -0,0 +1,1938 @@ +#include +#include @@ -14520,9 +14515,9 @@ diff -aurN linux-5.4/net/mptcp/mptcp_fullmesh.c mptcp-mptcp_trunk/net/mptcp/mptc +MODULE_LICENSE("GPL"); +MODULE_DESCRIPTION("Full-Mesh MPTCP"); +MODULE_VERSION("0.88"); -diff -aurN linux-5.4/net/mptcp/mptcp_input.c mptcp-mptcp_trunk/net/mptcp/mptcp_input.c ---- linux-5.4/net/mptcp/mptcp_input.c 1970-01-01 01:00:00.000000000 +0100 -+++ mptcp-mptcp_trunk/net/mptcp/mptcp_input.c 2020-07-14 19:34:59.000000000 +0200 +diff -aurN linux-5.4.64/net/mptcp/mptcp_input.c linux-5.4.64.mptcp/net/mptcp/mptcp_input.c +--- linux-5.4.64/net/mptcp/mptcp_input.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-5.4.64.mptcp/net/mptcp/mptcp_input.c 2020-09-10 19:25:10.507220869 +0200 @@ -0,0 +1,2531 @@ +/* + * MPTCP implementation - Sending side @@ -17055,9 +17050,9 @@ diff -aurN linux-5.4/net/mptcp/mptcp_input.c mptcp-mptcp_trunk/net/mptcp/mptcp_i + tcp_set_rto(sk); + mptcp_set_rto(sk); +} -diff -aurN linux-5.4/net/mptcp/mptcp_ipv4.c mptcp-mptcp_trunk/net/mptcp/mptcp_ipv4.c ---- linux-5.4/net/mptcp/mptcp_ipv4.c 1970-01-01 01:00:00.000000000 +0100 -+++ mptcp-mptcp_trunk/net/mptcp/mptcp_ipv4.c 2020-07-14 19:34:59.000000000 +0200 +diff -aurN linux-5.4.64/net/mptcp/mptcp_ipv4.c linux-5.4.64.mptcp/net/mptcp/mptcp_ipv4.c +--- linux-5.4.64/net/mptcp/mptcp_ipv4.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-5.4.64.mptcp/net/mptcp/mptcp_ipv4.c 2020-09-10 19:25:10.507220869 +0200 @@ -0,0 +1,431 @@ +/* + * MPTCP implementation - IPv4-specific functions @@ -17490,9 +17485,9 @@ diff -aurN linux-5.4/net/mptcp/mptcp_ipv4.c mptcp-mptcp_trunk/net/mptcp/mptcp_ip + kmem_cache_destroy(mptcp_request_sock_ops.slab); + kfree(mptcp_request_sock_ops.slab_name); +} -diff -aurN linux-5.4/net/mptcp/mptcp_ipv6.c mptcp-mptcp_trunk/net/mptcp/mptcp_ipv6.c ---- linux-5.4/net/mptcp/mptcp_ipv6.c 1970-01-01 01:00:00.000000000 +0100 -+++ mptcp-mptcp_trunk/net/mptcp/mptcp_ipv6.c 2020-07-14 19:34:59.000000000 +0200 +diff -aurN linux-5.4.64/net/mptcp/mptcp_ipv6.c linux-5.4.64.mptcp/net/mptcp/mptcp_ipv6.c +--- linux-5.4.64/net/mptcp/mptcp_ipv6.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-5.4.64.mptcp/net/mptcp/mptcp_ipv6.c 2020-09-10 19:25:10.507220869 +0200 @@ -0,0 +1,479 @@ +/* + * MPTCP implementation - IPv6-specific functions @@ -17973,9 +17968,9 @@ diff -aurN linux-5.4/net/mptcp/mptcp_ipv6.c mptcp-mptcp_trunk/net/mptcp/mptcp_ip + kmem_cache_destroy(mptcp6_request_sock_ops.slab); + kfree(mptcp6_request_sock_ops.slab_name); +} -diff -aurN linux-5.4/net/mptcp/mptcp_ndiffports.c mptcp-mptcp_trunk/net/mptcp/mptcp_ndiffports.c ---- linux-5.4/net/mptcp/mptcp_ndiffports.c 1970-01-01 01:00:00.000000000 +0100 -+++ mptcp-mptcp_trunk/net/mptcp/mptcp_ndiffports.c 2020-07-14 19:34:59.000000000 +0200 +diff -aurN linux-5.4.64/net/mptcp/mptcp_ndiffports.c linux-5.4.64.mptcp/net/mptcp/mptcp_ndiffports.c +--- linux-5.4.64/net/mptcp/mptcp_ndiffports.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-5.4.64.mptcp/net/mptcp/mptcp_ndiffports.c 2020-09-10 19:25:10.507220869 +0200 @@ -0,0 +1,174 @@ +#include + @@ -18151,9 +18146,9 @@ diff -aurN linux-5.4/net/mptcp/mptcp_ndiffports.c mptcp-mptcp_trunk/net/mptcp/mp +MODULE_LICENSE("GPL"); +MODULE_DESCRIPTION("NDIFF-PORTS MPTCP"); +MODULE_VERSION("0.88"); -diff -aurN linux-5.4/net/mptcp/mptcp_netlink.c mptcp-mptcp_trunk/net/mptcp/mptcp_netlink.c ---- linux-5.4/net/mptcp/mptcp_netlink.c 1970-01-01 01:00:00.000000000 +0100 -+++ mptcp-mptcp_trunk/net/mptcp/mptcp_netlink.c 2020-07-14 19:34:59.000000000 +0200 +diff -aurN linux-5.4.64/net/mptcp/mptcp_netlink.c linux-5.4.64.mptcp/net/mptcp/mptcp_netlink.c +--- linux-5.4.64/net/mptcp/mptcp_netlink.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-5.4.64.mptcp/net/mptcp/mptcp_netlink.c 2020-09-10 19:25:10.507220869 +0200 @@ -0,0 +1,1271 @@ +// SPDX-License-Identifier: GPL-2.0 +/* MPTCP implementation - Netlink Path Manager @@ -19426,9 +19421,9 @@ diff -aurN linux-5.4/net/mptcp/mptcp_netlink.c mptcp-mptcp_trunk/net/mptcp/mptcp +MODULE_LICENSE("GPL"); +MODULE_DESCRIPTION("MPTCP netlink-based path manager"); +MODULE_ALIAS_GENL_FAMILY(MPTCP_GENL_NAME); -diff -aurN linux-5.4/net/mptcp/mptcp_olia.c mptcp-mptcp_trunk/net/mptcp/mptcp_olia.c ---- linux-5.4/net/mptcp/mptcp_olia.c 1970-01-01 01:00:00.000000000 +0100 -+++ mptcp-mptcp_trunk/net/mptcp/mptcp_olia.c 2020-07-14 19:34:59.000000000 +0200 +diff -aurN linux-5.4.64/net/mptcp/mptcp_olia.c linux-5.4.64.mptcp/net/mptcp/mptcp_olia.c +--- linux-5.4.64/net/mptcp/mptcp_olia.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-5.4.64.mptcp/net/mptcp/mptcp_olia.c 2020-09-10 19:25:10.507220869 +0200 @@ -0,0 +1,318 @@ +/* + * MPTCP implementation - OPPORTUNISTIC LINKED INCREASES CONGESTION CONTROL: @@ -19748,9 +19743,9 @@ diff -aurN linux-5.4/net/mptcp/mptcp_olia.c mptcp-mptcp_trunk/net/mptcp/mptcp_ol +MODULE_LICENSE("GPL"); +MODULE_DESCRIPTION("MPTCP COUPLED CONGESTION CONTROL"); +MODULE_VERSION("0.1"); -diff -aurN linux-5.4/net/mptcp/mptcp_output.c mptcp-mptcp_trunk/net/mptcp/mptcp_output.c ---- linux-5.4/net/mptcp/mptcp_output.c 1970-01-01 01:00:00.000000000 +0100 -+++ mptcp-mptcp_trunk/net/mptcp/mptcp_output.c 2020-07-14 19:34:59.000000000 +0200 +diff -aurN linux-5.4.64/net/mptcp/mptcp_output.c linux-5.4.64.mptcp/net/mptcp/mptcp_output.c +--- linux-5.4.64/net/mptcp/mptcp_output.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-5.4.64.mptcp/net/mptcp/mptcp_output.c 2020-09-10 19:25:10.507220869 +0200 @@ -0,0 +1,1997 @@ +/* + * MPTCP implementation - Sending side @@ -21749,9 +21744,9 @@ diff -aurN linux-5.4/net/mptcp/mptcp_output.c mptcp-mptcp_trunk/net/mptcp/mptcp_ + return max(xmit_size_goal, mss_now); +} + -diff -aurN linux-5.4/net/mptcp/mptcp_pm.c mptcp-mptcp_trunk/net/mptcp/mptcp_pm.c ---- linux-5.4/net/mptcp/mptcp_pm.c 1970-01-01 01:00:00.000000000 +0100 -+++ mptcp-mptcp_trunk/net/mptcp/mptcp_pm.c 2020-07-14 19:34:59.000000000 +0200 +diff -aurN linux-5.4.64/net/mptcp/mptcp_pm.c linux-5.4.64.mptcp/net/mptcp/mptcp_pm.c +--- linux-5.4.64/net/mptcp/mptcp_pm.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-5.4.64.mptcp/net/mptcp/mptcp_pm.c 2020-09-10 19:25:10.507220869 +0200 @@ -0,0 +1,226 @@ +/* + * MPTCP implementation - MPTCP-subflow-management @@ -21979,9 +21974,9 @@ diff -aurN linux-5.4/net/mptcp/mptcp_pm.c mptcp-mptcp_trunk/net/mptcp/mptcp_pm.c + return mptcp_set_default_path_manager(CONFIG_DEFAULT_MPTCP_PM); +} +late_initcall(mptcp_path_manager_default); -diff -aurN linux-5.4/net/mptcp/mptcp_redundant.c mptcp-mptcp_trunk/net/mptcp/mptcp_redundant.c ---- linux-5.4/net/mptcp/mptcp_redundant.c 1970-01-01 01:00:00.000000000 +0100 -+++ mptcp-mptcp_trunk/net/mptcp/mptcp_redundant.c 2020-07-14 19:34:59.000000000 +0200 +diff -aurN linux-5.4.64/net/mptcp/mptcp_redundant.c linux-5.4.64.mptcp/net/mptcp/mptcp_redundant.c +--- linux-5.4.64/net/mptcp/mptcp_redundant.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-5.4.64.mptcp/net/mptcp/mptcp_redundant.c 2020-09-10 19:25:10.507220869 +0200 @@ -0,0 +1,392 @@ +/* + * MPTCP Scheduler to reduce latency and jitter. @@ -22375,9 +22370,9 @@ diff -aurN linux-5.4/net/mptcp/mptcp_redundant.c mptcp-mptcp_trunk/net/mptcp/mpt +MODULE_LICENSE("GPL"); +MODULE_DESCRIPTION("REDUNDANT MPTCP"); +MODULE_VERSION("0.90"); -diff -aurN linux-5.4/net/mptcp/mptcp_rr.c mptcp-mptcp_trunk/net/mptcp/mptcp_rr.c ---- linux-5.4/net/mptcp/mptcp_rr.c 1970-01-01 01:00:00.000000000 +0100 -+++ mptcp-mptcp_trunk/net/mptcp/mptcp_rr.c 2020-07-14 19:34:59.000000000 +0200 +diff -aurN linux-5.4.64/net/mptcp/mptcp_rr.c linux-5.4.64.mptcp/net/mptcp/mptcp_rr.c +--- linux-5.4.64/net/mptcp/mptcp_rr.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-5.4.64.mptcp/net/mptcp/mptcp_rr.c 2020-09-10 19:25:10.507220869 +0200 @@ -0,0 +1,309 @@ +/* MPTCP Scheduler module selector. Highly inspired by tcp_cong.c */ + @@ -22688,9 +22683,9 @@ diff -aurN linux-5.4/net/mptcp/mptcp_rr.c mptcp-mptcp_trunk/net/mptcp/mptcp_rr.c +MODULE_LICENSE("GPL"); +MODULE_DESCRIPTION("ROUNDROBIN MPTCP"); +MODULE_VERSION("0.89"); -diff -aurN linux-5.4/net/mptcp/mptcp_sched.c mptcp-mptcp_trunk/net/mptcp/mptcp_sched.c ---- linux-5.4/net/mptcp/mptcp_sched.c 1970-01-01 01:00:00.000000000 +0100 -+++ mptcp-mptcp_trunk/net/mptcp/mptcp_sched.c 2020-07-14 19:34:59.000000000 +0200 +diff -aurN linux-5.4.64/net/mptcp/mptcp_sched.c linux-5.4.64.mptcp/net/mptcp/mptcp_sched.c +--- linux-5.4.64/net/mptcp/mptcp_sched.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-5.4.64.mptcp/net/mptcp/mptcp_sched.c 2020-09-10 19:25:10.511220802 +0200 @@ -0,0 +1,647 @@ +/* MPTCP Scheduler module selector. Highly inspired by tcp_cong.c */ + @@ -22765,10 +22760,12 @@ diff -aurN linux-5.4/net/mptcp/mptcp_sched.c mptcp-mptcp_trunk/net/mptcp/mptcp_s + if (in_flight >= tp->snd_cwnd) + return true; + ++ mss_now = tcp_current_mss(sk); ++ + /* Now, check if what is queued in the subflow's send-queue + * already fills the cwnd. + */ -+ space = (tp->snd_cwnd - in_flight) * tp->mss_cache; ++ space = (tp->snd_cwnd - in_flight) * mss_now; + + if (tp->write_seq - tp->snd_nxt >= space) + return true; @@ -22776,8 +22773,6 @@ diff -aurN linux-5.4/net/mptcp/mptcp_sched.c mptcp-mptcp_trunk/net/mptcp/mptcp_s + if (zero_wnd_test && !before(tp->write_seq, tcp_wnd_end(tp))) + return true; + -+ mss_now = tcp_current_mss(sk); -+ + /* Don't send on this subflow if we bypass the allowed send-window at + * the per-subflow level. Similar to tcp_snd_wnd_test, but manually + * calculated end_seq (because here at this point end_seq is still at @@ -23339,9 +23334,9 @@ diff -aurN linux-5.4/net/mptcp/mptcp_sched.c mptcp-mptcp_trunk/net/mptcp/mptcp_s + return mptcp_set_default_scheduler(CONFIG_DEFAULT_MPTCP_SCHED); +} +late_initcall(mptcp_scheduler_default); -diff -aurN linux-5.4/net/mptcp/mptcp_wvegas.c mptcp-mptcp_trunk/net/mptcp/mptcp_wvegas.c ---- linux-5.4/net/mptcp/mptcp_wvegas.c 1970-01-01 01:00:00.000000000 +0100 -+++ mptcp-mptcp_trunk/net/mptcp/mptcp_wvegas.c 2020-07-14 19:34:59.000000000 +0200 +diff -aurN linux-5.4.64/net/mptcp/mptcp_wvegas.c linux-5.4.64.mptcp/net/mptcp/mptcp_wvegas.c +--- linux-5.4.64/net/mptcp/mptcp_wvegas.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-5.4.64.mptcp/net/mptcp/mptcp_wvegas.c 2020-09-10 19:25:10.511220802 +0200 @@ -0,0 +1,271 @@ +/* + * MPTCP implementation - WEIGHTED VEGAS @@ -23614,9 +23609,9 @@ diff -aurN linux-5.4/net/mptcp/mptcp_wvegas.c mptcp-mptcp_trunk/net/mptcp/mptcp_ +MODULE_LICENSE("GPL"); +MODULE_DESCRIPTION("MPTCP wVegas"); +MODULE_VERSION("0.1"); -diff -aurN linux-5.4/net/socket.c mptcp-mptcp_trunk/net/socket.c ---- linux-5.4/net/socket.c 2019-11-25 01:32:01.000000000 +0100 -+++ mptcp-mptcp_trunk/net/socket.c 2020-07-14 19:34:59.000000000 +0200 +diff -aurN linux-5.4.64/net/socket.c linux-5.4.64.mptcp/net/socket.c +--- linux-5.4.64/net/socket.c 2020-09-09 19:12:37.000000000 +0200 ++++ linux-5.4.64.mptcp/net/socket.c 2020-09-10 19:25:10.511220802 +0200 @@ -91,6 +91,7 @@ #include @@ -23654,9 +23649,9 @@ diff -aurN linux-5.4/net/socket.c mptcp-mptcp_trunk/net/socket.c /* * Now to bump the refcnt of the [loadable] module that owns this * socket at sock_release time we decrement its refcnt. -diff -aurN linux-5.4/tools/include/uapi/linux/bpf.h mptcp-mptcp_trunk/tools/include/uapi/linux/bpf.h ---- linux-5.4/tools/include/uapi/linux/bpf.h 2019-11-25 01:32:01.000000000 +0100 -+++ mptcp-mptcp_trunk/tools/include/uapi/linux/bpf.h 2020-07-14 19:34:59.000000000 +0200 +diff -aurN linux-5.4.64/tools/include/uapi/linux/bpf.h linux-5.4.64.mptcp/tools/include/uapi/linux/bpf.h +--- linux-5.4.64/tools/include/uapi/linux/bpf.h 2020-09-09 19:12:37.000000000 +0200 ++++ linux-5.4.64.mptcp/tools/include/uapi/linux/bpf.h 2020-09-10 19:25:10.511220802 +0200 @@ -3438,6 +3438,7 @@ BPF_TCP_LISTEN, BPF_TCP_CLOSING, /* Now a valid state */ diff --git a/root/target/linux/generic/hack-5.4/999-stop-promiscuous-info.patch b/root/target/linux/generic/hack-5.4/999-stop-promiscuous-info.patch index 2dc06ee6..850613b5 100644 --- a/root/target/linux/generic/hack-5.4/999-stop-promiscuous-info.patch +++ b/root/target/linux/generic/hack-5.4/999-stop-promiscuous-info.patch @@ -12,3 +12,36 @@ if (audit_enabled) { current_uid_gid(&uid, &gid); audit_log(current->audit_context, GFP_ATOMIC, +--- a/drivers/net/usb/r8152.c 2020-08-13 13:11:25.866435255 +0200 ++++ b/drivers/net/usb/r8152.c 2020-08-13 13:11:51.973994306 +0200 +@@ -2353,7 +2353,7 @@ + + if (netdev->flags & IFF_PROMISC) { + /* Unconditionally log net taps. */ +- netif_notice(tp, link, netdev, "Promiscuous mode enabled\n"); ++ //netif_notice(tp, link, netdev, "Promiscuous mode enabled\n"); + ocp_data |= RCR_AM | RCR_AAP; + mc_filter[1] = 0xffffffff; + mc_filter[0] = 0xffffffff; +--- a/drivers/net/usb/pegasus.c 2020-08-13 13:14:15.519570376 +0200 ++++ b/drivers/net/usb/pegasus.c 2020-08-13 13:14:26.795380006 +0200 +@@ -1031,7 +1031,7 @@ + + if (net->flags & IFF_PROMISC) { + pegasus->eth_regs[EthCtrl2] |= RX_PROMISCUOUS; +- netif_info(pegasus, link, net, "Promiscuous mode enabled\n"); ++ //netif_info(pegasus, link, net, "Promiscuous mode enabled\n"); + } else if (!netdev_mc_empty(net) || (net->flags & IFF_ALLMULTI)) { + pegasus->eth_regs[EthCtrl0] |= RX_MULTICAST; + pegasus->eth_regs[EthCtrl2] &= ~RX_PROMISCUOUS; +--- a/drivers/net/ethernet/realtek/r8169_main.c 2020-08-13 13:15:44.478068638 +0200 ++++ b/drivers/net/ethernet/realtek/r8169_main.c 2020-08-13 13:15:59.181820450 +0200 +@@ -4313,7 +4313,7 @@ + + if (dev->flags & IFF_PROMISC) { + /* Unconditionally log net taps. */ +- netif_notice(tp, link, dev, "Promiscuous mode enabled\n"); ++ //netif_notice(tp, link, dev, "Promiscuous mode enabled\n"); + rx_mode |= AcceptAllPhys; + } else if (netdev_mc_count(dev) > MC_FILTER_LIMIT || + dev->flags & IFF_ALLMULTI || diff --git a/root/target/linux/ipq40xx/base-files/etc/board.d/02_network b/root/target/linux/ipq40xx/base-files/etc/board.d/02_network new file mode 100755 index 00000000..0ac8b59a --- /dev/null +++ b/root/target/linux/ipq40xx/base-files/etc/board.d/02_network @@ -0,0 +1,173 @@ +#!/bin/sh +# +# Copyright (c) 2015 The Linux Foundation. All rights reserved. +# Copyright (c) 2011-2015 OpenWrt.org +# + +. /lib/functions/uci-defaults.sh +. /lib/functions/system.sh + +ipq40xx_setup_interfaces() +{ + local board="$1" + + case "$board" in + 8dev,habanero-dvk|\ + 8dev,jalapeno|\ + alfa-network,ap120c-ac|\ + engenius,emr3500|\ + engenius,ens620ext) + ucidef_set_interfaces_lan_wan "eth0" "eth1" + ;; + aruba,ap-303|\ + aruba,ap-365|\ + avm,fritzrepeater-1200|\ + dlink,dap-2610 |\ + engenius,eap1300|\ + engenius,emd1|\ + meraki,mr33|\ + netgear,ex6100v2|\ + netgear,ex6150v2|\ + zyxel,wre6606) + ucidef_set_interface_lan "eth0" + ;; + aruba,ap-303h) + ucidef_set_interfaces_lan_wan "eth0" "eth1" + ucidef_add_switch "switch0" \ + "0u@eth0" "2:lan:1" "3:lan:2" "4:lan:3" "0u@eth1" "5:wan" + ;; + asus,map-ac2200|\ + cilab,meshpoint-one|\ + openmesh,a42|\ + openmesh,a62) + ucidef_set_interfaces_lan_wan "eth1" "eth0" + ;; + asus,rt-ac58u|\ + p2w,r619ac-128m|\ + p2w,r619ac|\ + zyxel,nbg6617) + ucidef_set_interfaces_lan_wan "eth0" "eth1" + ucidef_add_switch "switch0" \ + "0u@eth0" "1:lan:4" "2:lan:3" "3:lan:2" "4:lan:1" + ;; + avm,fritzbox-4040|\ + linksys,ea6350v3|\ + linksys,ea8300) + ucidef_set_interfaces_lan_wan "eth0" "eth1" + ucidef_add_switch "switch0" \ + "0u@eth0" "1:lan" "2:lan" "3:lan" "4:lan" + ;; + avm,fritzbox-7530) + ucidef_add_switch "switch0" \ + "0u@eth0" "1:lan" "2:lan" "3:lan" "4:lan" + ;; + avm,fritzrepeater-3000|\ + compex,wpj419|\ + compex,wpj428|\ + engenius,eap2200) + ucidef_set_interface_lan "eth0 eth1" + ;; + buffalo,wtr-m2133hp) + ucidef_set_interfaces_lan_wan "eth0" "eth1" + ucidef_add_switch "switch0" \ + "0u@eth0" "2:lan:3" "3:lan:2" "4:lan:1" + ;; + cellc,rtl30vw) + ucidef_set_interface_lan "eth0" + ucidef_add_switch "switch0" \ + "0u@eth0" "3:lan" "4:lan" + ;; + ezviz,cs-w3-wd1200g-eup) + ucidef_set_interfaces_lan_wan "eth0" "eth1" + ucidef_add_switch "switch0" \ + "0u@eth0" "2:lan:3" "3:lan:2" "4:lan:1" "0u@eth1" "5:wan" + ;; + glinet,gl-b1300 |\ + glinet,gl-s1300) + ucidef_set_interfaces_lan_wan "eth0" "eth1" + ucidef_add_switch "switch0" \ + "0u@eth0" "3:lan" "4:lan" + ;; + mobipromo,cm520-79f) + ucidef_add_switch "switch0" \ + "0u@eth0" "3:lan:2" "4:lan:1" + ucidef_set_interface_wan "eth1" + ;; + qxwlan,e2600ac-c1 |\ + qxwlan,e2600ac-c2) + ucidef_set_interfaces_lan_wan "eth0" "eth1" + ucidef_add_switch "switch0" \ + "0u@eth0" "3:lan" "4:lan" "0u@eth1" "5:wan" + ;; + unielec,u4019-32m) + ucidef_set_interfaces_lan_wan "eth0" "eth1" + ucidef_add_switch "switch0" \ + "0u@eth0" "1:lan" "2:lan" "3:lan" "4:lan" "0u@eth1" "5:wan" + ;; + *) + echo "Unsupported hardware. Network interfaces not initialized" + ;; + esac +} + +ipq40xx_setup_macs() +{ + local board="$1" + local lan_mac="" + local wan_mac="" + local label_mac="" + + case "$board" in + 8dev,habanero-dvk) + label_mac=$(mtd_get_mac_binary "ART" 0x1006) + ;; + asus,rt-ac58u|\ + p2w,r619ac-128m|\ + p2w,r619ac) + CI_UBIPART=UBI_DEV + wan_mac=$(mtd_get_mac_binary_ubi Factory 0x1006) + lan_mac=$(mtd_get_mac_binary_ubi Factory 0x5006) + label_mac=$wan_mac + ;; + cilab,meshpoint-one) + label_mac=$(mtd_get_mac_binary "ART" 0x1006) + ;; + dlink,dap-2610) + lan_mac=$(mtd_get_mac_ascii bdcfg lanmac) + label_mac=$lan_mac + ;; + engenius,eap2200|\ + engenius,emd1) + lan_mac=$(mtd_get_mac_ascii 0:APPSBLENV ethaddr) + label_mac=$lan_mac + ;; + engenius,emr3500) + wan_mac=$(mtd_get_mac_ascii 0:APPSBLENV wanaddr) + lan_mac=$(mtd_get_mac_ascii 0:APPSBLENV ethaddr) + label_mac=$wan_mac + ;; + engenius,ens620ext) + wan_mac=$(mtd_get_mac_ascii u-boot-env ethaddr) + lan_mac=$(macaddr_add "$wan_mac" 1) + ;; + ezviz,cs-w3-wd1200g-eup) + label_mac=$(mtd_get_mac_binary "ART" 0x6) + ;; + linksys,ea6350v3) + wan_mac=$(mtd_get_mac_ascii devinfo hw_mac_addr) + lan_mac=$(macaddr_add "$wan_mac" 1) + ;; + esac + + [ -n "$lan_mac" ] && ucidef_set_interface_macaddr "lan" $lan_mac + [ -n "$wan_mac" ] && ucidef_set_interface_macaddr "wan" $wan_mac + [ -n "$label_mac" ] && ucidef_set_label_macaddr $label_mac +} + +board_config_update +board=$(board_name) +ipq40xx_setup_interfaces $board +ipq40xx_setup_macs $board +board_config_flush + +exit 0 diff --git a/root/target/linux/ipq40xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata b/root/target/linux/ipq40xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata new file mode 100644 index 00000000..4b69c79f --- /dev/null +++ b/root/target/linux/ipq40xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata @@ -0,0 +1,242 @@ +#!/bin/sh + +[ -e /lib/firmware/$FIRMWARE ] && exit 0 + +. /lib/functions/caldata.sh + +board=$(board_name) + +case "$FIRMWARE" in +"ath10k/cal-pci-0000:01:00.0.bin") + case "$board" in + meraki,mr33) + caldata_extract_ubi "ART" 0x9000 0x844 + caldata_valid "4408" || caldata_extract "ART" 0x9000 0x844 + ath10k_patch_mac $(macaddr_add $(get_mac_binary "/sys/bus/i2c/devices/0-0050/eeprom" 0x66) +1) + ;; + esac + ;; +"ath10k/pre-cal-pci-0000:01:00.0.bin") + case "$board" in + asus,map-ac2200) + caldata_extract_ubi "Factory" 0x9000 0x2f20 + ln -sf /lib/firmware/ath10k/pre-cal-pci-0000\:00\:00.0.bin \ + /lib/firmware/ath10k/QCA9888/hw2.0/board.bin + ;; + avm,fritzrepeater-3000) + /usr/bin/fritz_cal_extract -i 1 -s 0x3D000 -e 0x212 -l 12064 -o /lib/firmware/$FIRMWARE $(find_mtd_chardev "urlader0") || \ + /usr/bin/fritz_cal_extract -i 1 -s 0x3C800 -e 0x212 -l 12064 -o /lib/firmware/$FIRMWARE $(find_mtd_chardev "urlader0") || \ + /usr/bin/fritz_cal_extract -i 1 -s 0x3C000 -e 0x212 -l 12064 -o /lib/firmware/$FIRMWARE $(find_mtd_chardev "urlader0") || \ + /usr/bin/fritz_cal_extract -i 1 -s 0x3D000 -e 0x212 -l 12064 -o /lib/firmware/$FIRMWARE $(find_mtd_chardev "urlader1") || \ + /usr/bin/fritz_cal_extract -i 1 -s 0x3C800 -e 0x212 -l 12064 -o /lib/firmware/$FIRMWARE $(find_mtd_chardev "urlader1") || \ + /usr/bin/fritz_cal_extract -i 1 -s 0x3C000 -e 0x212 -l 12064 -o /lib/firmware/$FIRMWARE $(find_mtd_chardev "urlader1") + ;; + buffalo,wtr-m2133hp) + caldata_extract "ART" 0x9000 0x2f20 + ath10k_patch_mac $(mtd_get_mac_binary ORGDATA 0x32) + ;; + engenius,eap2200 |\ + openmesh,a62) + caldata_extract "0:ART" 0x9000 0x2f20 + ;; + linksys,ea8300) + caldata_extract "ART" 0x9000 0x2f20 + # OEM assigns 4 sequential MACs + ath10k_patch_mac $(macaddr_setbit_la $(macaddr_add "$(cat /sys/class/net/eth0/address)" 4)) + ;; + esac + ;; +"ath10k/pre-cal-ahb-a000000.wifi.bin") + case "$board" in + 8dev,habanero-dvk |\ + 8dev,jalapeno |\ + alfa-network,ap120c-ac |\ + cilab,meshpoint-one |\ + ezviz,cs-w3-wd1200g-eup |\ + glinet,gl-b1300 |\ + glinet,gl-s1300 |\ + linksys,ea6350v3 |\ + mobipromo,cm520-79f |\ + p2w,r619ac-128m |\ + p2w,r619ac |\ + qcom,ap-dk01.1-c1) + caldata_extract "ART" 0x1000 0x2f20 + ;; + aruba,ap-303 |\ + aruba,ap-303h |\ + aruba,ap-365) + caldata_extract "ART" 0x1000 0x2f20 + ath10k_patch_mac $(mtd_get_mac_binary mfginfo 0x1D) + ;; + asus,map-ac2200) + caldata_extract_ubi "Factory" 0x1000 0x2f20 + ;; + asus,rt-ac58u) + CI_UBIPART=UBI_DEV + caldata_extract_ubi "Factory" 0x1000 0x2f20 + ;; + avm,fritzbox-4040) + /usr/bin/fritz_cal_extract -i 1 -s 0x400 -e 0x207 -l 12064 -o /lib/firmware/$FIRMWARE $(find_mtd_chardev "urlader_config") + ;; + avm,fritzbox-7530 |\ + avm,fritzrepeater-1200 |\ + avm,fritzrepeater-3000) + /usr/bin/fritz_cal_extract -i 1 -s 0x3C000 -e 0x207 -l 12064 -o /lib/firmware/$FIRMWARE $(find_mtd_chardev "urlader0") || \ + /usr/bin/fritz_cal_extract -i 1 -s 0x3C800 -e 0x207 -l 12064 -o /lib/firmware/$FIRMWARE $(find_mtd_chardev "urlader0") || \ + /usr/bin/fritz_cal_extract -i 1 -s 0x3D000 -e 0x207 -l 12064 -o /lib/firmware/$FIRMWARE $(find_mtd_chardev "urlader0") || \ + /usr/bin/fritz_cal_extract -i 1 -s 0x3C000 -e 0x207 -l 12064 -o /lib/firmware/$FIRMWARE $(find_mtd_chardev "urlader1") || \ + /usr/bin/fritz_cal_extract -i 1 -s 0x3C800 -e 0x207 -l 12064 -o /lib/firmware/$FIRMWARE $(find_mtd_chardev "urlader1") || \ + /usr/bin/fritz_cal_extract -i 1 -s 0x3D000 -e 0x207 -l 12064 -o /lib/firmware/$FIRMWARE $(find_mtd_chardev "urlader1") + ;; + buffalo,wtr-m2133hp) + caldata_extract "ART" 0x1000 0x2f20 + ath10k_patch_mac $(mtd_get_mac_binary ORGDATA 0x26) + ;; + cellc,rtl30vw |\ + compex,wpj419 |\ + compex,wpj428 |\ + engenius,eap1300 |\ + engenius,eap2200 |\ + openmesh,a42 |\ + openmesh,a62 |\ + qxwlan,e2600ac-c1 |\ + qxwlan,e2600ac-c2 |\ + unielec,u4019-32m) + caldata_extract "0:ART" 0x1000 0x2f20 + ;; + dlink,dap-2610) + caldata_extract "ART" 0x1000 0x2f20 + ath10k_patch_mac $(mtd_get_mac_ascii bdcfg wlanmac) + ;; + engenius,emd1) + caldata_extract "0:ART" 0x1000 0x2f20 + ath10k_patch_mac $(mtd_get_mac_ascii 0:APPSBLENV wlanaddr) + ;; + engenius,emr3500) + caldata_extract "0:ART" 0x1000 0x2f20 + ath10k_patch_mac $(mtd_get_mac_ascii 0:APPSBLENV ethaddr) + ;; + engenius,ens620ext) + caldata_extract "ART" 0x1000 0x2f20 + ath10k_patch_mac $(macaddr_add $(mtd_get_mac_ascii u-boot-env ethaddr) +2) + ;; + linksys,ea8300) + caldata_extract "ART" 0x1000 0x2f20 + ath10k_patch_mac $(macaddr_add "$(cat /sys/class/net/eth0/address)" 2) + ;; + meraki,mr33) + caldata_extract_ubi "ART" 0x1000 0x2f20 + caldata_valid "202f" || caldata_extract "ART" 0x1000 0x2f20 + ath10k_patch_mac $(macaddr_add $(get_mac_binary "/sys/bus/i2c/devices/0-0050/eeprom" 0x66) +2) + ;; + netgear,ex6100v2 |\ + netgear,ex6150v2) + caldata_extract "ART" 0x1000 0x2f20 + ath10k_patch_mac $(mtd_get_mac_binary dnidata 0x0) + ;; + zyxel,nbg6617 |\ + zyxel,wre6606) + caldata_extract "ART" 0x1000 0x2f20 + ath10k_patch_mac $(macaddr_add $(cat /sys/class/net/eth0/address) -2) + ;; + esac + ;; +"ath10k/pre-cal-ahb-a800000.wifi.bin") + case "$board" in + 8dev,habanero-dvk |\ + 8dev,jalapeno |\ + alfa-network,ap120c-ac |\ + cilab,meshpoint-one |\ + ezviz,cs-w3-wd1200g-eup |\ + glinet,gl-b1300 |\ + glinet,gl-s1300 |\ + linksys,ea6350v3 |\ + mobipromo,cm520-79f |\ + p2w,r619ac-128m |\ + p2w,r619ac |\ + qcom,ap-dk01.1-c1) + caldata_extract "ART" 0x5000 0x2f20 + ;; + aruba,ap-303 |\ + aruba,ap-303h |\ + aruba,ap-365) + caldata_extract "ART" 0x5000 0x2f20 + ath10k_patch_mac $(macaddr_add $(mtd_get_mac_binary mfginfo 0x1D) +1) + ;; + asus,map-ac2200) + caldata_extract_ubi "Factory" 0x5000 0x2f20 + ;; + asus,rt-ac58u) + CI_UBIPART=UBI_DEV + caldata_extract_ubi "Factory" 0x5000 0x2f20 + ;; + avm,fritzbox-4040) + /usr/bin/fritz_cal_extract -i 1 -s 0x400 -e 0x208 -l 12064 -o /lib/firmware/$FIRMWARE $(find_mtd_chardev "urlader_config") + ;; + avm,fritzbox-7530 |\ + avm,fritzrepeater-1200 |\ + avm,fritzrepeater-3000) + /usr/bin/fritz_cal_extract -i 1 -s 0x3C800 -e 0x208 -l 12064 -o /lib/firmware/$FIRMWARE $(find_mtd_chardev "urlader0") || \ + /usr/bin/fritz_cal_extract -i 1 -s 0x3D000 -e 0x208 -l 12064 -o /lib/firmware/$FIRMWARE $(find_mtd_chardev "urlader0") || \ + /usr/bin/fritz_cal_extract -i 1 -s 0x3C000 -e 0x208 -l 12064 -o /lib/firmware/$FIRMWARE $(find_mtd_chardev "urlader0") || \ + /usr/bin/fritz_cal_extract -i 1 -s 0x3C800 -e 0x208 -l 12064 -o /lib/firmware/$FIRMWARE $(find_mtd_chardev "urlader1") || \ + /usr/bin/fritz_cal_extract -i 1 -s 0x3D000 -e 0x208 -l 12064 -o /lib/firmware/$FIRMWARE $(find_mtd_chardev "urlader1") || \ + /usr/bin/fritz_cal_extract -i 1 -s 0x3C000 -e 0x208 -l 12064 -o /lib/firmware/$FIRMWARE $(find_mtd_chardev "urlader1") + ;; + buffalo,wtr-m2133hp) + caldata_extract "ART" 0x5000 0x2f20 + ath10k_patch_mac $(mtd_get_mac_binary ORGDATA 0x2c) + ;; + cellc,rtl30vw |\ + compex,wpj419 |\ + compex,wpj428 |\ + engenius,eap1300 |\ + engenius,eap2200 |\ + openmesh,a42 |\ + openmesh,a62 |\ + qxwlan,e2600ac-c1 |\ + qxwlan,e2600ac-c2 |\ + unielec,u4019-32m) + caldata_extract "0:ART" 0x5000 0x2f20 + ;; + dlink,dap-2610) + caldata_extract "ART" 0x5000 0x2f20 + ath10k_patch_mac $(mtd_get_mac_ascii bdcfg wlanmac_a) + ;; + engenius,emd1) + caldata_extract "0:ART" 0x5000 0x2f20 + ath10k_patch_mac $(macaddr_add $(mtd_get_mac_ascii 0:APPSBLENV wlanaddr) +1) + ;; + engenius,emr3500) + caldata_extract "0:ART" 0x5000 0x2f20 + ath10k_patch_mac $(macaddr_add $(mtd_get_mac_ascii 0:APPSBLENV ethaddr) +1) + ;; + engenius,ens620ext) + caldata_extract "ART" 0x5000 0x2f20 + ath10k_patch_mac $(macaddr_add $(mtd_get_mac_ascii u-boot-env ethaddr) +3) + ;; + linksys,ea8300) + caldata_extract "ART" 0x5000 0x2f20 + ath10k_patch_mac $(macaddr_add "$(cat /sys/class/net/eth0/address)" 3) + ;; + meraki,mr33) + caldata_extract_ubi "ART" 0x5000 0x2f20 + caldata_valid "202f" || caldata_extract "ART" 0x5000 0x2f20 + ath10k_patch_mac $(macaddr_add $(get_mac_binary "/sys/bus/i2c/devices/0-0050/eeprom" 0x66) +3) + ;; + netgear,ex6100v2 |\ + netgear,ex6150v2) + caldata_extract "ART" 0x5000 0x2f20 + ath10k_patch_mac $(mtd_get_mac_binary dnidata 0xc) + ;; + zyxel,nbg6617 |\ + zyxel,wre6606) + caldata_extract "ART" 0x5000 0x2f20 + ath10k_patch_mac $(macaddr_add $(cat /sys/class/net/eth0/address) -1) + ;; + esac + ;; +*) + exit 1 + ;; +esac diff --git a/root/target/linux/ipq40xx/base-files/lib/upgrade/platform.sh b/root/target/linux/ipq40xx/base-files/lib/upgrade/platform.sh new file mode 100644 index 00000000..f874aa4b --- /dev/null +++ b/root/target/linux/ipq40xx/base-files/lib/upgrade/platform.sh @@ -0,0 +1,123 @@ +PART_NAME=firmware +REQUIRE_IMAGE_METADATA=1 + +RAMFS_COPY_BIN='fw_printenv fw_setenv' +RAMFS_COPY_DATA='/etc/fw_env.config /var/lock/fw_printenv.lock' + +platform_check_image() { + case "$(board_name)" in + asus,rt-ac58u) + CI_UBIPART="UBI_DEV" + local ubidev=$(nand_find_ubi $CI_UBIPART) + local asus_root=$(nand_find_volume $ubidev jffs2) + + [ -n "$asus_root" ] || return 0 + + cat << EOF +jffs2 partition is still present. +There's probably no space left +to install the filesystem. + +You need to delete the jffs2 partition first: +# ubirmvol /dev/ubi0 --name=jffs2 + +Once this is done. Retry. +EOF + return 1 + ;; + esac + return 0; +} + +askey_do_upgrade() { + local tar_file="$1" + + local board_dir=$(tar tf $tar_file | grep -m 1 '^sysupgrade-.*/$') + board_dir=${board_dir%/} + + tar Oxf $tar_file ${board_dir}/root | mtd write - rootfs + + nand_do_upgrade "$1" +} + +zyxel_do_upgrade() { + local tar_file="$1" + + local board_dir=$(tar tf $tar_file | grep -m 1 '^sysupgrade-.*/$') + board_dir=${board_dir%/} + + tar Oxf $tar_file ${board_dir}/kernel | mtd write - kernel + + if [ -n "$UPGRADE_BACKUP" ]; then + tar Oxf $tar_file ${board_dir}/root | mtd -j "$UPGRADE_BACKUP" write - rootfs + else + tar Oxf $tar_file ${board_dir}/root | mtd write - rootfs + fi +} + +platform_do_upgrade() { + case "$(board_name)" in + 8dev,jalapeno |\ + aruba,ap-303 |\ + aruba,ap-303h |\ + aruba,ap-365 |\ + avm,fritzbox-7530 |\ + avm,fritzrepeater-1200 |\ + avm,fritzrepeater-3000 |\ + buffalo,wtr-m2133hp |\ + cilab,meshpoint-one |\ + engenius,eap2200 |\ + mobipromo,cm520-79f |\ + qxwlan,e2600ac-c2) + nand_do_upgrade "$1" + ;; + alfa-network,ap120c-ac) + part="$(awk -F 'ubi.mtd=' '{printf $2}' /proc/cmdline | sed -e 's/ .*$//')" + if [ "$part" = "rootfs1" ]; then + fw_setenv active 2 || exit 1 + CI_UBIPART="rootfs2" + else + fw_setenv active 1 || exit 1 + CI_UBIPART="rootfs1" + fi + nand_do_upgrade "$1" + ;; + asus,map-ac2200) + CI_KERNPART="linux" + nand_do_upgrade "$1" + ;; + asus,rt-ac58u) + CI_UBIPART="UBI_DEV" + CI_KERNPART="linux" + nand_do_upgrade "$1" + ;; + cellc,rtl30vw) + CI_UBIPART="ubifs" + askey_do_upgrade "$1" + ;; + compex,wpj419|\ + p2w,r619ac-128m|\ + p2w,r619ac) + nand_do_upgrade "$1" + ;; + linksys,ea6350v3 |\ + linksys,ea8300) + platform_do_upgrade_linksys "$1" + ;; + meraki,mr33) + CI_KERNPART="part.safe" + nand_do_upgrade "$1" + ;; + openmesh,a42 |\ + openmesh,a62) + PART_NAME="inactive" + platform_do_upgrade_openmesh "$1" + ;; + zyxel,nbg6617) + zyxel_do_upgrade "$1" + ;; + *) + default_do_upgrade "$1" + ;; + esac +} diff --git a/root/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-r619ac-128m.dts b/root/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-r619ac-128m.dts new file mode 100644 index 00000000..b51378a7 --- /dev/null +++ b/root/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-r619ac-128m.dts @@ -0,0 +1,18 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT + +#include "qcom-ipq4019-r619ac.dtsi" + +/ { + model = "P&W R619AC 128M"; + compatible = "p2w,r619ac-128m"; + + chosen { + bootargs-append = " root=/dev/ubiblock0_1 rootfstype=squashfs"; + }; +}; + +&rootfs_part1 { + reg = <0x0 0x8000000>; +}; + +/delete-node/ &rootfs_part2; diff --git a/root/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-r619ac.dts b/root/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-r619ac.dts new file mode 100644 index 00000000..31010dd1 --- /dev/null +++ b/root/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-r619ac.dts @@ -0,0 +1,12 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT + +#include "qcom-ipq4019-r619ac.dtsi" + +/ { + model = "P&W R619AC"; + compatible = "p2w,r619ac"; + + chosen { + bootargs-append = " root=/dev/ubiblock0_1 rootfstype=squashfs"; + }; +}; diff --git a/root/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-r619ac.dtsi b/root/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-r619ac.dtsi new file mode 100644 index 00000000..81018dd0 --- /dev/null +++ b/root/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-r619ac.dtsi @@ -0,0 +1,322 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT + +#include "qcom-ipq4019.dtsi" +#include +#include +#include + +/ { + aliases { + led-boot = &led_sys; + led-failsafe = &led_sys; + led-running = &led_sys; + led-upgrade = &led_sys; + label-mac-device = &gmac0; + }; + + soc { + rng@22000 { + status = "okay"; + }; + + mdio@90000 { + status = "okay"; + pinctrl-0 = <&mdio_pins>; + pinctrl-names = "default"; + }; + + ess-psgmii@98000 { + status = "okay"; + }; + + tcsr@1949000 { + compatible = "qcom,tcsr"; + reg = <0x1949000 0x100>; + qcom,wifi_glb_cfg = ; + }; + + tcsr@194b000 { + compatible = "qcom,tcsr"; + reg = <0x194b000 0x100>; + qcom,usb-hsphy-mode-select = ; + }; + + ess_tcsr@1953000 { + compatible = "qcom,tcsr"; + reg = <0x1953000 0x1000>; + qcom,ess-interface-select = ; + }; + + tcsr@1957000 { + compatible = "qcom,tcsr"; + reg = <0x1957000 0x100>; + qcom,wifi_noc_memtype_m0_m2 = ; + }; + + usb2@60f8800 { + status = "okay"; + }; + + usb3@8af8800 { + status = "okay"; + }; + + crypto@8e3a000 { + status = "okay"; + }; + + watchdog@b017000 { + status = "okay"; + }; + + ess-switch@c000000 { + status = "okay"; + }; + + edma@c080000 { + status = "okay"; + }; + }; + + leds { + compatible = "gpio-leds"; + pinctrl-0 = <&led_pins>; + pinctrl-names = "default"; + + led_sys: sys { + label = "r619ac:blue:sys"; + gpios = <&tlmm 39 GPIO_ACTIVE_HIGH>; + }; + + wlan2g { + label = "r619ac:blue:wlan2g"; + gpios = <&tlmm 32 GPIO_ACTIVE_HIGH>; + linux,default-trigger = "phy0tpt"; + }; + + wlan5g { + label = "r619ac:blue:wlan5g"; + gpios = <&tlmm 50 GPIO_ACTIVE_HIGH>; + linux,default-trigger = "phy1tpt"; + }; + }; + + keys { + compatible = "gpio-keys"; + + reset { + label = "reset"; + gpios = <&tlmm 18 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + }; +}; + +&blsp_dma { + status = "okay"; +}; + +&blsp1_spi1 { + status = "okay"; + + flash@0 { + reg = <0>; + compatible = "jedec,spi-nor"; + spi-max-frequency = <24000000>; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "SBL1"; + reg = <0x0 0x40000>; + read-only; + }; + + partition@40000 { + label = "MIBIB"; + reg = <0x40000 0x20000>; + read-only; + }; + + partition@60000 { + label = "QSEE"; + reg = <0x60000 0x60000>; + read-only; + }; + + partition@c0000 { + label = "CDT"; + reg = <0xc0000 0x10000>; + read-only; + }; + + partition@d0000 { + label = "DDRPARAMS"; + reg = <0xd0000 0x10000>; + read-only; + }; + + partition@e0000 { + label = "APPSBLENV"; + reg = <0xe0000 0x10000>; + read-only; + }; + + partition@f0000 { + label = "APPSBL"; + reg = <0xf0000 0x80000>; + read-only; + }; + + partition@1 { + label = "Bootloader"; + reg = <0x0 0x170000>; + read-only; + }; + + partition@170000 { + label = "ART"; + reg = <0x170000 0x10000>; + read-only; + }; + + partition@180000 { + label = "unused"; + reg = <0x180000 0xe80000>; + }; + }; + }; +}; + +&blsp1_uart1 { + pinctrl-0 = <&serial_0_pins>; + pinctrl-names = "default"; + status = "okay"; +}; + +&cryptobam { + status = "okay"; +}; + +&nand { + status = "okay"; + + nand@0 { + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + rootfs_part1: partition@0 { + label = "rootfs"; + reg = <0x0 0x4000000>; + }; + + rootfs_part2: partition@4000000 { + label = "unused1"; + reg = <0x4000000 0x4000000>; + }; + }; + }; +}; + +&qpic_bam { + status = "okay"; +}; + +&sdhci { + pinctrl-0 = <&sd_0_pins>; + pinctrl-names = "default"; + vqmmc-supply = <&vqmmc>; + status = "okay"; +}; + +&tlmm { + mdio_pins: mdio_pinmux { + mux_1 { + pins = "gpio6"; + function = "mdio"; + bias-pull-up; + }; + + mux_2 { + pins = "gpio7"; + function = "mdc"; + bias-pull-up; + }; + }; + + sd_0_pins: sd_0_pinmux { + mux_1 { + pins = "gpio23", "gpio24", "gpio25", "gpio26", "gpio28"; + function = "sdio"; + drive-strength = <10>; + }; + + mux_2 { + pins = "gpio27"; + function = "sdio"; + drive-strength = <16>; + }; + }; + + serial_0_pins: serial0-pinmux { + mux { + pins = "gpio16", "gpio17"; + function = "blsp_uart0"; + bias-disable; + }; + }; + + led_pins: led_pinmux { + mux { + pins = "gpio32", "gpio39", "gpio50"; + function = "gpio"; + bias-pull-up; + output-low; + }; + + mux_1 { + pins = "gpio52"; + function = "gpio"; + bias-pull-up; + output-high; + }; + + mux_2 { + pins = "gpio61"; + function = "gpio"; + bias-pull-down; + output-high; + }; + }; +}; + +&usb3_ss_phy { + status = "okay"; +}; + +&usb3_hs_phy { + status = "okay"; +}; + +&usb2_hs_phy { + status = "okay"; +}; + +&vqmmc { + status = "okay"; +}; + +&wifi0 { + status = "okay"; + qcom,ath10k-calibration-variant = "R619AC"; +}; + +&wifi1 { + status = "okay"; + qcom,ath10k-calibration-variant = "R619AC"; +}; diff --git a/root/target/linux/ipq40xx/image/Makefile b/root/target/linux/ipq40xx/image/Makefile new file mode 100644 index 00000000..44b6da6d --- /dev/null +++ b/root/target/linux/ipq40xx/image/Makefile @@ -0,0 +1,734 @@ +include $(TOPDIR)/rules.mk +include $(INCLUDE_DIR)/image.mk + +DEVICE_VARS += NETGEAR_BOARD_ID NETGEAR_HW_ID +DEVICE_VARS += RAS_BOARD RAS_ROOTFS_SIZE RAS_VERSION +DEVICE_VARS += WRGG_DEVNAME WRGG_SIGNATURE + +define Device/Default + PROFILES := Default + KERNEL_DEPENDS = $$(wildcard $(DTS_DIR)/$$(DEVICE_DTS).dts) + KERNEL_INITRAMFS_PREFIX := $$(IMG_PREFIX)-$(1)-initramfs + KERNEL_PREFIX := $$(IMAGE_PREFIX) + KERNEL_LOADADDR := 0x80208000 + DEVICE_DTS = $$(SOC)-$(lastword $(subst _, ,$(1))) + SUPPORTED_DEVICES := $(subst _,$(comma),$(1)) + IMAGES := sysupgrade.bin + IMAGE/sysupgrade.bin = sysupgrade-tar | append-metadata + IMAGE/sysupgrade.bin/squashfs := +endef + +define Device/FitImage + KERNEL_SUFFIX := -fit-uImage.itb + KERNEL = kernel-bin | gzip | fit gzip $$(DTS_DIR)/$$(DEVICE_DTS).dtb + KERNEL_NAME := Image +endef + +define Device/FitImageLzma + KERNEL_SUFFIX := -fit-uImage.itb + KERNEL = kernel-bin | lzma | fit lzma $$(DTS_DIR)/$$(DEVICE_DTS).dtb + KERNEL_NAME := Image +endef + +define Device/FitzImage + KERNEL_SUFFIX := -fit-zImage.itb + KERNEL = kernel-bin | fit none $$(DTS_DIR)/$$(DEVICE_DTS).dtb + KERNEL_NAME := zImage +endef + +define Device/UbiFit + KERNEL_IN_UBI := 1 + IMAGES := nand-factory.ubi nand-sysupgrade.bin + IMAGE/nand-factory.ubi := append-ubi + IMAGE/nand-sysupgrade.bin := sysupgrade-tar | append-metadata +endef + +define Device/DniImage + $(call Device/FitzImage) + NETGEAR_BOARD_ID := + NETGEAR_HW_ID := + IMAGES += factory.img + IMAGE/factory.img := append-kernel | pad-offset 64k 64 | append-uImage-fakehdr filesystem | append-rootfs | pad-rootfs | netgear-dni + IMAGE/sysupgrade.bin := append-kernel | pad-offset 64k 64 | append-uImage-fakehdr filesystem | \ + append-rootfs | pad-rootfs | append-metadata | check-size +endef + +define Build/append-rootfshdr + mkimage -A $(LINUX_KARCH) \ + -O linux -T filesystem \ + -C lzma -a $(KERNEL_LOADADDR) -e $(if $(KERNEL_ENTRY),$(KERNEL_ENTRY),$(KERNEL_LOADADDR)) \ + -n root.squashfs -d $(IMAGE_ROOTFS) $@.new + dd if=$@.new bs=64 count=1 >> $(IMAGE_KERNEL) +endef + +define Build/mkmylofw_32m + $(eval device_id=$(word 1,$(1))) + $(eval revision=$(word 2,$(1))) + + let \ + size="$$(stat -c%s $@)" \ + pad="$(subst k,* 1024,$(BLOCKSIZE))" \ + pad="(pad - (size % pad)) % pad" \ + newsize='size + pad'; \ + $(STAGING_DIR_HOST)/bin/mkmylofw \ + -B WPE72 -i 0x11f6:$(device_id):0x11f6:$(device_id) -r $(revision) \ + -s 0x2000000 -p0x180000:$$newsize:al:0x80208000:"OpenWrt":$@ \ + $@.new + @mv $@.new $@ +endef + +define Build/qsdk-ipq-factory-nand-askey + $(TOPDIR)/scripts/mkits-qsdk-ipq-image.sh $@.its\ + askey_kernel $(IMAGE_KERNEL) \ + askey_fs $(IMAGE_ROOTFS) \ + ubifs $@ + PATH=$(LINUX_DIR)/scripts/dtc:$(PATH) mkimage -f $@.its $@.new + @mv $@.new $@ +endef + +define Build/SenaoFW + -$(STAGING_DIR_HOST)/bin/mksenaofw \ + -n $(BOARD_NAME) -r $(VENDOR_ID) -p $(1) \ + -c $(DATECODE) -w $(2) -x $(CW_VER) -t 0 \ + -e $@ \ + -o $@.new + @cp $@.new $@ +endef + +define Build/wrgg-image + mkwrggimg -i $@ \ + -o $@.new \ + -d "$(WRGG_DEVNAME)" \ + -s "$(WRGG_SIGNATURE)" \ + -v "" -m "" -B "" + mv $@.new $@ +endef + +define Device/8dev_habanero-dvk + $(call Device/FitImageLzma) + DEVICE_VENDOR := 8devices + DEVICE_MODEL := Habanero DVK + IMAGE_SIZE := 30976k + SOC := qcom-ipq4019 + DEVICE_PACKAGES := ipq-wifi-8dev_habanero-dvk + IMAGE/sysupgrade.bin := append-kernel | pad-to 64k | append-rootfs | pad-rootfs | append-metadata | check-size +endef +TARGET_DEVICES += 8dev_habanero-dvk + +define Device/8dev_jalapeno-common + $(call Device/FitImage) + $(call Device/UbiFit) + BLOCKSIZE := 128k + PAGESIZE := 2048 + SOC := qcom-ipq4018 +endef + +define Device/8dev_jalapeno + $(call Device/8dev_jalapeno-common) + DEVICE_VENDOR := 8devices + DEVICE_MODEL := Jalapeno +endef +TARGET_DEVICES += 8dev_jalapeno + +define Device/alfa-network_ap120c-ac + $(call Device/FitImage) + $(call Device/UbiFit) + DEVICE_VENDOR := ALFA Network + DEVICE_MODEL := AP120C-AC + SOC := qcom-ipq4018 + DEVICE_PACKAGES := kmod-usb-acm \ + kmod-tpm-i2c-atmel uboot-envtools + BLOCKSIZE := 128k + PAGESIZE := 2048 + IMAGE_SIZE := 65536k + IMAGES := nand-factory.bin nand-sysupgrade.bin + IMAGE/nand-factory.bin := append-ubi | qsdk-ipq-factory-nand +endef +TARGET_DEVICES += alfa-network_ap120c-ac + +define Device/aruba_glenmorangie + $(call Device/FitImageLzma) + DEVICE_VENDOR := Aruba + SOC := qcom-ipq4029 + DEVICE_PACKAGES := ipq-wifi-aruba_ap-303 +endef + +define Device/aruba_ap-303 + $(call Device/aruba_glenmorangie) + DEVICE_MODEL := AP-303 +endef +TARGET_DEVICES += aruba_ap-303 + +define Device/aruba_ap-303h + $(call Device/aruba_glenmorangie) + DEVICE_MODEL := AP-303H +endef +TARGET_DEVICES += aruba_ap-303h + +define Device/aruba_ap-365 + $(call Device/aruba_glenmorangie) + DEVICE_MODEL := AP-365 + DEVICE_PACKAGES += kmod-hwmon-ad7418 +endef +TARGET_DEVICES += aruba_ap-365 + +define Device/asus_map-ac2200 + $(call Device/FitImageLzma) + DEVICE_VENDOR := ASUS + DEVICE_MODEL := Lyra (MAP-AC2200) + SOC := qcom-ipq4019 + DEVICE_PACKAGES := ath10k-firmware-qca9888-ct kmod-ath3k +endef +TARGET_DEVICES += asus_map-ac2200 + +define Device/asus_rt-ac58u + $(call Device/FitImageLzma) + DEVICE_VENDOR := ASUS + DEVICE_MODEL := RT-AC58U + SOC := qcom-ipq4018 + BLOCKSIZE := 128k + PAGESIZE := 2048 + DTB_SIZE := 65536 + IMAGE_SIZE := 20439364 + FILESYSTEMS := squashfs +# Someone - in their infinite wisdom - decided to put the firmware +# version in front of the image name \03\00\00\04 => Version 3.0.0.4 +# Since u-boot works with strings we either need another fixup step +# to add a version... or we are very careful not to add '\0' into that +# string and call it a day.... Yeah, we do the latter! + UIMAGE_NAME:=$(shell echo -e '\03\01\01\01RT-AC58U') + DEVICE_PACKAGES := -kmod-ath10k-ct kmod-ath10k-ct-smallbuffers \ + kmod-usb-ledtrig-usbport +endef +TARGET_DEVICES += asus_rt-ac58u + +define Device/avm_fritzbox-4040 + $(call Device/FitImageLzma) + DEVICE_VENDOR := AVM + DEVICE_MODEL := FRITZ!Box 4040 + SOC := qcom-ipq4018 + BOARD_NAME := fritz4040 + IMAGE_SIZE := 29056k + UBOOT_PATH := $(STAGING_DIR_IMAGE)/uboot-fritz4040.bin + UBOOT_PARTITION_SIZE := 524288 + IMAGES += eva.bin + IMAGE/eva.bin := append-uboot | pad-to $$$$(UBOOT_PARTITION_SIZE) | append-kernel | append-rootfs | pad-rootfs + IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | append-metadata | check-size + DEVICE_PACKAGES := fritz-tffs fritz-caldata +endef +TARGET_DEVICES += avm_fritzbox-4040 + +define Device/avm_fritzbox-7530 + $(call Device/FitImageLzma) + DEVICE_VENDOR := AVM + DEVICE_MODEL := FRITZ!Box 7530 + SOC := qcom-ipq4019 + DEVICE_PACKAGES := fritz-caldata fritz-tffs-nand +endef +TARGET_DEVICES += avm_fritzbox-7530 + +define Device/avm_fritzrepeater-1200 + $(call Device/FitImageLzma) + DEVICE_VENDOR := AVM + DEVICE_MODEL := FRITZ!Repeater 1200 + SOC := qcom-ipq4019 + DEVICE_PACKAGES := fritz-caldata fritz-tffs-nand ipq-wifi-avm_fritzrepeater-1200 +endef +TARGET_DEVICES += avm_fritzrepeater-1200 + +define Device/avm_fritzrepeater-3000 + $(call Device/FitImageLzma) + DEVICE_VENDOR := AVM + DEVICE_MODEL := FRITZ!Repeater 3000 + SOC := qcom-ipq4019 + DEVICE_PACKAGES := ath10k-firmware-qca9984-ct fritz-caldata fritz-tffs-nand +endef +TARGET_DEVICES += avm_fritzrepeater-3000 + +define Device/buffalo_wtr-m2133hp + $(call Device/FitImage) + $(call Device/UbiFit) + DEVICE_VENDOR := Buffalo + DEVICE_MODEL := WTR-M2133HP + SOC := qcom-ipq4019 + DEVICE_PACKAGES := uboot-envtools ath10k-firmware-qca9984-ct ipq-wifi-buffalo_wtr-m2133hp + BLOCKSIZE := 128k + PAGESIZE := 2048 +endef +TARGET_DEVICES += buffalo_wtr-m2133hp + +define Device/cellc_rtl30vw + KERNEL_SUFFIX := -fit-uImage.itb + KERNEL_INITRAMFS = kernel-bin | gzip | fit gzip $$(DTS_DIR)/$$(DEVICE_DTS).dtb + KERNEL = kernel-bin | gzip | fit gzip $$(DTS_DIR)/$$(DEVICE_DTS).dtb | uImage lzma | pad-to 2048 + KERNEL_NAME := Image + KERNEL_IN_UBI := + IMAGES := nand-factory.bin nand-sysupgrade.bin + IMAGE/nand-factory.bin := append-rootfshdr | append-ubi | qsdk-ipq-factory-nand-askey + IMAGE/nand-sysupgrade.bin := append-rootfshdr | sysupgrade-tar | append-metadata + DEVICE_VENDOR := Cell C + DEVICE_MODEL := RTL30VW + SOC := qcom-ipq4019 + DEVICE_DTS_CONFIG := config@5 + KERNEL_INSTALL := 1 + KERNEL_SIZE := 4096k + IMAGE_SIZE := 57344k + BLOCKSIZE := 128k + PAGESIZE := 2048 + DEVICE_PACKAGES := kmod-usb-net-qmi-wwan kmod-usb-serial-option uqmi ipq-wifi-cellc_rtl30vw +endef +TARGET_DEVICES += cellc_rtl30vw + +define Device/cilab_meshpoint-one + $(call Device/8dev_jalapeno-common) + DEVICE_VENDOR := Crisis Innovation Lab + DEVICE_MODEL := MeshPoint.One + DEVICE_PACKAGES := kmod-i2c-gpio kmod-iio-bmp280-i2c kmod-hwmon-ina2xx kmod-rtc-pcf2127 +endef +TARGET_DEVICES += cilab_meshpoint-one + +define Device/compex_wpj419 + $(call Device/FitImage) + $(call Device/UbiFit) + DEVICE_VENDOR := Compex + DEVICE_MODEL := WPJ419 + SOC := qcom-ipq4019 + DEVICE_DTS_CONFIG := config@12 + KERNEL_INSTALL := 1 + BLOCKSIZE := 128k + PAGESIZE := 2048 + FILESYSTEMS := squashfs +endef +TARGET_DEVICES += compex_wpj419 + +define Device/compex_wpj428 + $(call Device/FitImage) + DEVICE_VENDOR := Compex + DEVICE_MODEL := WPJ428 + SOC := qcom-ipq4028 + DEVICE_DTS_CONFIG := config@4 + BLOCKSIZE := 64k + IMAGE_SIZE := 31232k + KERNEL_SIZE := 4096k + IMAGES += cpximg-6a04.bin + IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | append-metadata + IMAGE/cpximg-6a04.bin := append-kernel | append-rootfs | pad-rootfs | mkmylofw_32m 0x8A2 3 + DEVICE_PACKAGES := kmod-gpio-beeper +endef +TARGET_DEVICES += compex_wpj428 + +define Device/dlink_dap-2610 + $(call Device/FitImageLzma) + DEVICE_VENDOR := D-Link + DEVICE_MODEL := DAP-2610 + SOC := qcom-ipq4018 + DEVICE_DTS_CONFIG := config@ap.dk01.1-c1 + BLOCKSIZE := 64k + WRGG_DEVNAME := /dev/mtdblock/8 + WRGG_SIGNATURE := wapac30_dkbs_dap2610 + IMAGE_SIZE := 14080k + IMAGES += factory.bin + # Bootloader expects a special 160 byte header which is added by + # wrgg-image. + # Factory image size must be larger than 6MB, and size in wrgg header must + # match actual factory image size to be flashable from D-Link http server. + # Bootloader verifies checksum of wrgg image before booting, thus jffs2 + # cannot be part of the wrgg image. This is solved in the factory image by + # having the rootfs at the end of the image (without pad-rootfs). And in + # the sysupgrade image only the kernel is included in the wrgg checksum, + # but this is not flashable from the D-link http server. + # append-rootfs must start on an erase block boundary. + IMAGE/factory.bin := append-kernel | pad-offset 6144k 160 | append-rootfs | wrgg-image | check-size + IMAGE/sysupgrade.bin := append-kernel | wrgg-image | pad-to $$$$(BLOCKSIZE) | append-rootfs | pad-rootfs | check-size | append-metadata + DEVICE_PACKAGES := ipq-wifi-dlink_dap2610 +endef +TARGET_DEVICES += dlink_dap-2610 + +define Device/engenius_eap1300 + $(call Device/FitImage) + DEVICE_VENDOR := EnGenius + DEVICE_MODEL := EAP1300 + DEVICE_DTS_CONFIG := config@4 + BOARD_NAME := eap1300 + SOC := qcom-ipq4018 + KERNEL_SIZE := 5120k + IMAGE_SIZE := 25344k + IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | append-metadata +endef +TARGET_DEVICES += engenius_eap1300 + +define Device/engenius_eap2200 + $(call Device/FitImage) + $(call Device/UbiFit) + DEVICE_VENDOR := EnGenius + DEVICE_MODEL := EAP2200 + SOC := qcom-ipq4019 + BLOCKSIZE := 128k + PAGESIZE := 2048 + DEVICE_PACKAGES := ath10k-firmware-qca9888-ct ipq-wifi-engenius_eap2200 -kmod-ath10k-ct kmod-ath10k-ct-smallbuffers +endef +TARGET_DEVICES += engenius_eap2200 + +define Device/engenius_emd1 + $(call Device/FitImage) + DEVICE_VENDOR := EnGenius + DEVICE_MODEL := EMD1 + DEVICE_DTS_CONFIG := config@4 + SOC := qcom-ipq4018 + IMAGE_SIZE := 30720k + IMAGES += factory.bin + IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | append-metadata + IMAGE/factory.bin := qsdk-ipq-factory-nor | check-size +endef +TARGET_DEVICES += engenius_emd1 + +define Device/engenius_emr3500 + $(call Device/FitImage) + DEVICE_VENDOR := EnGenius + DEVICE_MODEL := EMR3500 + DEVICE_DTS_CONFIG := config@4 + SOC := qcom-ipq4018 + KERNEL_SIZE := 4096k + IMAGE_SIZE := 30720k + IMAGES += factory.bin + IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | append-metadata + IMAGE/factory.bin := qsdk-ipq-factory-nor | check-size +endef +TARGET_DEVICES += engenius_emr3500 + +define Device/engenius_ens620ext + $(call Device/FitImage) + DEVICE_VENDOR := EnGenius + DEVICE_MODEL := ENS620EXT + SOC := qcom-ipq4018 + DEVICE_DTS_CONFIG := config@4 + BLOCKSIZE := 64k + PAGESIZE := 256 + BOARD_NAME := ENS620EXT + VENDOR_ID := 0x0101 + PRODUCT_ID := 0x79 + PRODUCT_ID_NEW := 0xA4 + DATECODE := 190507 + FW_VER := 3.1.2 + FW_VER_NEW := 3.5.6 + CW_VER := 1.8.99 + IMAGE_SIZE := 21312k + KERNEL_SIZE := 5120k + FILESYSTEMS := squashfs + IMAGES += factory_30.bin factory_35.bin + IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | check-size | append-metadata + IMAGE/factory_30.bin := append-kernel | pad-to $$$$(KERNEL_SIZE) | append-rootfs | pad-rootfs | check-size | SenaoFW $$$$(PRODUCT_ID) $$$$(FW_VER) + IMAGE/factory_35.bin := qsdk-ipq-factory-nor | check-size | SenaoFW $$$$(PRODUCT_ID_NEW) $$$$(FW_VER_NEW) +endef +TARGET_DEVICES += engenius_ens620ext + +define Device/ezviz_cs-w3-wd1200g-eup + $(call Device/FitImage) + DEVICE_VENDOR := EZVIZ + DEVICE_MODEL := CS-W3-WD1200G + DEVICE_VARIANT := EUP + DEVICE_DTS_CONFIG := config@4 + IMAGE_SIZE := 14848k + SOC := qcom-ipq4018 + IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | \ + append-metadata + DEVICE_PACKAGES := -kmod-ath10k-ct kmod-ath10k-ct-smallbuffers \ + ipq-wifi-ezviz_cs-w3-wd1200g-eup +endef +TARGET_DEVICES += ezviz_cs-w3-wd1200g-eup + +define Device/glinet_gl-b1300 + $(call Device/FitImage) + DEVICE_VENDOR := GL.iNet + DEVICE_MODEL := GL-B1300 + BOARD_NAME := gl-b1300 + SOC := qcom-ipq4029 + KERNEL_SIZE := 4096k + IMAGE_SIZE := 26624k + IMAGE/sysupgrade.bin := append-kernel |append-rootfs | pad-rootfs | append-metadata +endef +TARGET_DEVICES += glinet_gl-b1300 + +define Device/glinet_gl-s1300 + $(call Device/FitImage) + DEVICE_VENDOR := GL.iNet + DEVICE_MODEL := GL-S1300 + SOC := qcom-ipq4029 + KERNEL_SIZE := 4096k + IMAGE_SIZE := 26624k + IMAGES := sysupgrade.bin + IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | append-metadata + DEVICE_PACKAGES := ipq-wifi-glinet_gl-s1300 kmod-fs-ext4 kmod-mmc kmod-spi-dev +endef +TARGET_DEVICES += glinet_gl-s1300 + +define Device/linksys_ea6350v3 + # The Linksys EA6350v3 has a uboot bootloader that does not + # support either booting lzma kernel images nor booting UBI + # partitions. This uboot, however, supports raw kernel images and + # gzipped images. + # + # As for the time of writing this, the device will boot the kernel + # from a fixed address with a fixed length of 3MiB. Also, the + # device has a hard-coded kernel command line that requieres the + # rootfs and alt_rootfs to be in mtd11 and mtd13 respectively. + # Oh... and the kernel partition overlaps with the rootfs + # partition (the same for alt_kernel and alt_rootfs). + # + # If you are planing re-partitioning the device, you may want to + # keep those details in mind: + # 1. The kernel adresses you should honor are 0x00000000 and + # 0x02800000 respectively. + # 2. The kernel size (plus the dtb) cannot exceed 3.00MiB in size. + # 3. You can use 'zImage', but not a raw 'Image' packed with lzma. + # 4. The kernel command line from uboot is harcoded to boot with + # rootfs either in mtd11 or mtd13. + $(call Device/FitzImage) + DEVICE_VENDOR := Linksys + DEVICE_MODEL := EA6350 + DEVICE_VARIANT := v3 + SOC := qcom-ipq4018 + BLOCKSIZE := 128k + PAGESIZE := 2048 + KERNEL_SIZE := 3072k + IMAGE_SIZE := 37888k + UBINIZE_OPTS := -E 5 + IMAGES += factory.bin + IMAGE/factory.bin := append-kernel | append-uImage-fakehdr filesystem | pad-to $$$$(KERNEL_SIZE) | append-ubi | linksys-image type=EA6350v3 + DEVICE_PACKAGES := uboot-envtools +endef +TARGET_DEVICES += linksys_ea6350v3 + +define Device/linksys_ea8300 + $(call Device/FitzImage) + DEVICE_VENDOR := Linksys + DEVICE_MODEL := EA8300 + SOC := qcom-ipq4019 + KERNEL_SIZE := 3072k + IMAGE_SIZE := 87040k + BLOCKSIZE := 128k + PAGESIZE := 2048 + UBINIZE_OPTS := -E 5 # EOD marks to "hide" factory sig at EOF + IMAGES += factory.bin + IMAGE/factory.bin := append-kernel | pad-to $$$$(KERNEL_SIZE) | append-ubi | linksys-image type=EA8300 + DEVICE_PACKAGES := uboot-envtools ath10k-firmware-qca9888-ct ipq-wifi-linksys_ea8300 kmod-usb-ledtrig-usbport +endef +TARGET_DEVICES += linksys_ea8300 + +define Device/meraki_mr33 + $(call Device/FitImage) + DEVICE_VENDOR := Cisco Meraki + DEVICE_MODEL := MR33 + SOC := qcom-ipq4029 + BLOCKSIZE := 128k + PAGESIZE := 2048 + DEVICE_PACKAGES := -swconfig ath10k-firmware-qca9887-ct +endef +TARGET_DEVICES += meraki_mr33 + +define Device/mobipromo_cm520-79f + $(call Device/FitzImage) + $(call Device/UbiFit) + DEVICE_VENDOR := MobiPromo + DEVICE_MODEL := CM520-79F + SOC := qcom-ipq4019 + BLOCKSIZE := 128k + PAGESIZE := 2048 + DEVICE_PACKAGES := ipq-wifi-mobipromo_cm520-79f kmod-usb-ledtrig-usbport +endef +TARGET_DEVICES += mobipromo_cm520-79f + +define Device/netgear_ex61x0v2 + $(call Device/DniImage) + DEVICE_DTS_CONFIG := config@4 + NETGEAR_BOARD_ID := EX6150v2series + NETGEAR_HW_ID := 29765285+16+0+128+2x2 + IMAGE_SIZE := 14400k + SOC := qcom-ipq4018 +endef + +define Device/netgear_ex6100v2 + $(call Device/netgear_ex61x0v2) + DEVICE_VENDOR := Netgear + DEVICE_MODEL := EX6100 + DEVICE_VARIANT := v2 +endef +TARGET_DEVICES += netgear_ex6100v2 + +define Device/netgear_ex6150v2 + $(call Device/netgear_ex61x0v2) + DEVICE_VENDOR := Netgear + DEVICE_MODEL := EX6150 + DEVICE_VARIANT := v2 +endef +TARGET_DEVICES += netgear_ex6150v2 + +define Device/openmesh_a42 + $(call Device/FitImageLzma) + DEVICE_VENDOR := OpenMesh + DEVICE_MODEL := A42 + SOC := qcom-ipq4018 + DEVICE_DTS_CONFIG := config@om.a42 + BLOCKSIZE := 64k + KERNEL = kernel-bin | lzma | fit lzma $$(DTS_DIR)/$$(DEVICE_DTS).dtb | pad-to $$(BLOCKSIZE) + IMAGE_SIZE := 15616k + IMAGES += factory.bin + IMAGE/factory.bin := append-rootfs | pad-rootfs | openmesh-image ce_type=A42 + IMAGE/sysupgrade.bin/squashfs := append-rootfs | pad-rootfs | sysupgrade-tar rootfs=$$$$@ | append-metadata + DEVICE_PACKAGES := uboot-envtools +endef +TARGET_DEVICES += openmesh_a42 + +define Device/openmesh_a62 + $(call Device/FitImageLzma) + DEVICE_VENDOR := OpenMesh + DEVICE_MODEL := A62 + SOC := qcom-ipq4019 + DEVICE_DTS_CONFIG := config@om.a62 + BLOCKSIZE := 64k + KERNEL = kernel-bin | lzma | fit lzma $$(DTS_DIR)/$$(DEVICE_DTS).dtb | pad-to $$(BLOCKSIZE) + IMAGE_SIZE := 15552k + IMAGES += factory.bin + IMAGE/factory.bin := append-rootfs | pad-rootfs | openmesh-image ce_type=A62 + IMAGE/sysupgrade.bin/squashfs := append-rootfs | pad-rootfs | sysupgrade-tar rootfs=$$$$@ | append-metadata + DEVICE_PACKAGES := ath10k-firmware-qca9888-ct uboot-envtools +endef + +TARGET_DEVICES += openmesh_a62 + +define Device/qcom_ap-dk01.1-c1 + DEVICE_VENDOR := Qualcomm Atheros + DEVICE_MODEL := AP-DK01.1 + DEVICE_VARIANT := C1 + BOARD_NAME := ap-dk01.1-c1 + SOC := qcom-ipq4019 + DEVICE_DTS := qcom-ipq4019-ap.dk01.1-c1 + KERNEL_INSTALL := 1 + KERNEL_SIZE := 4096k + IMAGE_SIZE := 26624k + $(call Device/FitImage) + IMAGE/sysupgrade.bin := append-kernel | pad-to $$$$(KERNEL_SIZE) | append-rootfs | pad-rootfs | append-metadata +endef +TARGET_DEVICES += qcom_ap-dk01.1-c1 + +define Device/qcom_ap-dk04.1-c1 + $(call Device/FitImage) + $(call Device/UbiFit) + DEVICE_VENDOR := Qualcomm Atheros + DEVICE_MODEL := AP-DK04.1 + DEVICE_VARIANT := C1 + SOC := qcom-ipq4019 + DEVICE_DTS := qcom-ipq4019-ap.dk04.1-c1 + KERNEL_INSTALL := 1 + KERNEL_SIZE := 4048k + BLOCKSIZE := 128k + PAGESIZE := 2048 + BOARD_NAME := ap-dk04.1-c1 +endef +TARGET_DEVICES += qcom_ap-dk04.1-c1 + +define Device/p2w_r619ac + $(call Device/FitzImage) + $(call Device/UbiFit) + DEVICE_VENDOR := P&W + DEVICE_MODEL := R619AC + SOC := qcom-ipq4019 + DEVICE_DTS_CONFIG := config@10 + BLOCKSIZE := 128k + PAGESIZE := 2048 + IMAGES += nand-factory.bin + IMAGE/nand-factory.bin := append-ubi | qsdk-ipq-factory-nand + DEVICE_PACKAGES := ipq-wifi-p2w_r619ac +endef +TARGET_DEVICES += p2w_r619ac + +define Device/p2w_r619ac-128m + $(call Device/FitzImage) + $(call Device/UbiFit) + DEVICE_VENDOR := P&W + DEVICE_MODEL := R619AC + DEVICE_VARIANT := 128M + SOC := qcom-ipq4019 + DEVICE_DTS_CONFIG := config@10 + BLOCKSIZE := 128k + PAGESIZE := 2048 + DEVICE_PACKAGES := ipq-wifi-p2w_r619ac +endef +TARGET_DEVICES += p2w_r619ac-128m + +define Device/qxwlan_e2600ac-c1 + $(call Device/FitImage) + DEVICE_VENDOR := Qxwlan + DEVICE_MODEL := E2600AC + DEVICE_VARIANT := C1 + BOARD_NAME := e2600ac-c1 + SOC := qcom-ipq4019 + KERNEL_SIZE := 4096k + IMAGE_SIZE := 31232k + IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | append-metadata + DEVICE_PACKAGES := ipq-wifi-qxwlan_e2600ac +endef +TARGET_DEVICES += qxwlan_e2600ac-c1 + +define Device/qxwlan_e2600ac-c2 + $(call Device/FitImage) + $(call Device/UbiFit) + DEVICE_VENDOR := Qxwlan + DEVICE_MODEL := E2600AC + DEVICE_VARIANT := C2 + SOC := qcom-ipq4019 + KERNEL_INSTALL := 1 + BLOCKSIZE := 128k + PAGESIZE := 2048 + DEVICE_PACKAGES := ipq-wifi-qxwlan_e2600ac +endef +TARGET_DEVICES += qxwlan_e2600ac-c2 + +define Device/unielec_u4019-32m + $(call Device/FitImage) + DEVICE_VENDOR := Unielec + DEVICE_MODEL := U4019 + DEVICE_VARIANT := 32M + BOARD_NAME := u4019-32m + SOC := qcom-ipq4019 + KERNEL_SIZE := 4096k + IMAGE_SIZE := 31232k + IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | append-metadata +endef +TARGET_DEVICES += unielec_u4019-32m + +define Device/zyxel_nbg6617 + $(call Device/FitImageLzma) + DEVICE_VENDOR := ZyXEL + DEVICE_MODEL := NBG6617 + SOC := qcom-ipq4018 + KERNEL_SIZE := 4096k + ROOTFS_SIZE := 24960k + RAS_BOARD := NBG6617 + RAS_ROOTFS_SIZE := 19840k + RAS_VERSION := "$(VERSION_DIST) $(REVISION)" + IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | append-metadata + IMAGES += factory.bin +# The ZyXEL firmware allows flashing thru the web-gui only when the rootfs is +# at least as large as the one of the initial firmware image (not the current +# one on the device). This only applies to the Web-UI, the bootlaoder ignores +# this minimum-size. However, the larger image can be flashed both ways. + IMAGE/factory.bin := append-rootfs | pad-rootfs | pad-to 64k | check-size $$$$(ROOTFS_SIZE) | zyxel-ras-image separate-kernel + IMAGE/sysupgrade.bin/squashfs := append-rootfs | pad-rootfs | check-size $$$$(ROOTFS_SIZE) | sysupgrade-tar rootfs=$$$$@ | append-metadata + DEVICE_PACKAGES := uboot-envtools kmod-usb-ledtrig-usbport +endef +TARGET_DEVICES += zyxel_nbg6617 + +define Device/zyxel_wre6606 + $(call Device/FitImage) + DEVICE_VENDOR := ZyXEL + DEVICE_MODEL := WRE6606 + DEVICE_DTS_CONFIG := config@4 + SOC := qcom-ipq4018 + IMAGE_SIZE := 13184k + IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | append-metadata | check-size + DEVICE_PACKAGES := -kmod-ath10k-ct kmod-ath10k-ct-smallbuffers +endef +TARGET_DEVICES += zyxel_wre6606 + +$(eval $(call BuildImage)) diff --git a/root/target/linux/ipq40xx/patches-5.4/901-arm-boot-add-dts-files.patch b/root/target/linux/ipq40xx/patches-5.4/901-arm-boot-add-dts-files.patch new file mode 100644 index 00000000..ade7a675 --- /dev/null +++ b/root/target/linux/ipq40xx/patches-5.4/901-arm-boot-add-dts-files.patch @@ -0,0 +1,65 @@ +From a10fab12a927e60b7141a602e740d70cb4d09e4a Mon Sep 17 00:00:00 2001 +From: John Crispin +Date: Thu, 9 Mar 2017 11:03:18 +0100 +Subject: [PATCH] arm: boot: add dts files + +Signed-off-by: John Crispin +--- + arch/arm/boot/dts/Makefile | 23 +++++++++++++++++++++++ + 1 file changed, 23 insertions(+) + +--- a/arch/arm/boot/dts/Makefile ++++ b/arch/arm/boot/dts/Makefile +@@ -837,11 +837,52 @@ dtb-$(CONFIG_ARCH_QCOM) += \ + qcom-apq8074-dragonboard.dtb \ + qcom-apq8084-ifc6540.dtb \ + qcom-apq8084-mtp.dtb \ ++ qcom-ipq4018-a42.dtb \ ++ qcom-ipq4018-ap120c-ac.dtb \ ++ qcom-ipq4018-dap-2610.dtb \ ++ qcom-ipq4018-cs-w3-wd1200g-eup.dtb \ ++ qcom-ipq4018-ea6350v3.dtb \ ++ qcom-ipq4018-eap1300.dtb \ ++ qcom-ipq4018-emd1.dtb \ ++ qcom-ipq4018-emr3500.dtb \ ++ qcom-ipq4018-ens620ext.dtb \ ++ qcom-ipq4018-ex6100v2.dtb \ ++ qcom-ipq4018-ex6150v2.dtb \ ++ qcom-ipq4018-fritzbox-4040.dtb \ ++ qcom-ipq4018-jalapeno.dtb \ ++ qcom-ipq4018-meshpoint-one.dtb \ ++ qcom-ipq4018-nbg6617.dtb \ ++ qcom-ipq4018-rt-ac58u.dtb \ ++ qcom-ipq4018-wre6606.dtb \ + qcom-ipq4019-ap.dk01.1-c1.dtb \ + qcom-ipq4019-ap.dk04.1-c1.dtb \ + qcom-ipq4019-ap.dk04.1-c3.dtb \ + qcom-ipq4019-ap.dk07.1-c1.dtb \ + qcom-ipq4019-ap.dk07.1-c2.dtb \ ++ qcom-ipq4019-a62.dtb \ ++ qcom-ipq4019-cm520-79f.dtb \ ++ qcom-ipq4019-ea8300.dtb \ ++ qcom-ipq4019-eap2200.dtb \ ++ qcom-ipq4019-fritzbox-7530.dtb \ ++ qcom-ipq4019-fritzrepeater-1200.dtb \ ++ qcom-ipq4019-fritzrepeater-3000.dtb \ ++ qcom-ipq4019-r619ac.dtb \ ++ qcom-ipq4019-r619ac-128m.dtb \ ++ qcom-ipq4019-map-ac2200.dtb \ ++ qcom-ipq4019-e2600ac-c1.dtb \ ++ qcom-ipq4019-e2600ac-c2.dtb \ ++ qcom-ipq4019-habanero-dvk.dtb \ ++ qcom-ipq4019-rtl30vw.dtb \ ++ qcom-ipq4019-u4019-32m.dtb \ ++ qcom-ipq4019-wpj419.dtb \ ++ qcom-ipq4019-wtr-m2133hp.dtb \ ++ qcom-ipq4028-wpj428.dtb \ ++ qcom-ipq4029-ap-303.dtb \ ++ qcom-ipq4029-ap-303h.dtb \ ++ qcom-ipq4029-ap-365.dtb \ ++ qcom-ipq4029-gl-b1300.dtb \ ++ qcom-ipq4029-gl-s1300.dtb \ ++ qcom-ipq4029-mr33.dtb \ + qcom-ipq8064-ap148.dtb \ + qcom-msm8660-surf.dtb \ + qcom-msm8960-cdp.dtb \ diff --git a/root/target/linux/mediatek/patches-5.4/0104-dts-add-pause-to-port6.patch b/root/target/linux/mediatek/patches-5.4/0104-dts-add-pause-to-port6.patch deleted file mode 100644 index a8bc7979..00000000 --- a/root/target/linux/mediatek/patches-5.4/0104-dts-add-pause-to-port6.patch +++ /dev/null @@ -1,22 +0,0 @@ -From 3a466fd3d5b921c085fd3c863cab3f1afdb90c9c Mon Sep 17 00:00:00 2001 -From: Frank Wunderlich -Date: Sun, 12 Jan 2020 16:46:33 +0100 -Subject: [PATCH] arm: dts: add pause to port6 of switch - -to be same as gmac0 ---- - arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts b/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts -index 52343bd76fe5..7b8383af87e0 100644 ---- a/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts -+++ b/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts -@@ -253,6 +253,7 @@ - fixed-link { - speed = <1000>; - full-duplex; -+ pause; - }; - }; - };