Compare commits
195 Commits
v21.02.4
...
openwrt-21
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4a1d8ef55c | ||
|
|
c31872bad8 | ||
|
|
754dfab01c | ||
|
|
74212e7be3 | ||
|
|
ded99ab483 | ||
|
|
c5cb4287b8 | ||
|
|
66c2715a56 | ||
|
|
b3baba3854 | ||
|
|
18f12e6f69 | ||
|
|
42374bcee6 | ||
|
|
f24a029c3e | ||
|
|
ed68908f58 | ||
|
|
c5dc0e01df | ||
|
|
41d3d25142 | ||
|
|
0ab1007528 | ||
|
|
ddc361f1a6 | ||
|
|
9431f3625b | ||
|
|
ac52e2013a | ||
|
|
383ae905a2 | ||
|
|
170d9e447d | ||
|
|
4ceaf439a5 | ||
|
|
47054075e2 | ||
|
|
04ee513ede | ||
|
|
f5fbde4c11 | ||
|
|
fff279f4a7 | ||
|
|
7f06e5f7f2 | ||
|
|
64261da739 | ||
|
|
1d206bcd71 | ||
|
|
18a5301858 | ||
|
|
eb8cae5391 | ||
|
|
39c00a9bdd | ||
|
|
491b784141 | ||
|
|
6a12ecbd6d | ||
|
|
57a6d97ddf | ||
|
|
f8282da11e | ||
|
|
34d2883b9d | ||
|
|
e63b8443ab | ||
|
|
f6a41570a5 | ||
|
|
9f213a85e2 | ||
|
|
bc99ce5b22 | ||
|
|
cbe73ea33d | ||
|
|
32621086c3 | ||
|
|
2541ca616d | ||
|
|
5e69c097f7 | ||
|
|
8e12360fcf | ||
|
|
3d93d2cea5 | ||
|
|
a4f065a646 | ||
|
|
122e0c7fed | ||
|
|
c874aa40c2 | ||
|
|
13bd05efd7 | ||
|
|
23c86d44bc | ||
|
|
f67f60b809 | ||
|
|
f86f8e5684 | ||
|
|
8d995b3bd7 | ||
|
|
23ad680a34 | ||
|
|
dbbf5c2a1d | ||
|
|
e8896779da | ||
|
|
0d4a0250df | ||
|
|
4292832a6a | ||
|
|
ac7386a15d | ||
|
|
944265347a | ||
|
|
8b46a263ab | ||
|
|
1b6e9b3f64 | ||
|
|
cdd9bee370 | ||
|
|
39868a87d4 | ||
|
|
0f423804f6 | ||
|
|
66fa45ecef | ||
|
|
e6b1094b8d | ||
|
|
ab9025769b | ||
|
|
3e0faf2866 | ||
|
|
8e548ac9bd | ||
|
|
e819523f90 | ||
|
|
ee1eda7c7d | ||
|
|
f5646ae0b9 | ||
|
|
76c9c2b113 | ||
|
|
18f05da13d | ||
|
|
b119562a07 | ||
|
|
12861e01ee | ||
|
|
784565b6a0 | ||
|
|
295c612a4a | ||
|
|
50ad1e5619 | ||
|
|
50d255d4a8 | ||
|
|
88a71fbe77 | ||
|
|
1f5024aa73 | ||
|
|
067d7e9f90 | ||
|
|
202d404f74 | ||
|
|
d03c520e75 | ||
|
|
904581c59e | ||
|
|
d84d34e6e0 | ||
|
|
be3b061d7b | ||
|
|
8df40b136a | ||
|
|
d48f38c30f | ||
|
|
26f35c40b6 | ||
|
|
ee05f20e97 | ||
|
|
cbce6c6d95 | ||
|
|
12b1d2f700 | ||
|
|
006e52545d | ||
|
|
69c0c3c2f9 | ||
|
|
40536320ef | ||
|
|
5bc5df10d8 | ||
|
|
0943f4dc99 | ||
|
|
b0e6bce634 | ||
|
|
02391a5e5a | ||
|
|
43980bfbf0 | ||
|
|
6ca1d74ac1 | ||
|
|
1b34fc20cc | ||
|
|
c14030c6bf | ||
|
|
1ae19596b8 | ||
|
|
4460990610 | ||
|
|
5872b1bfd0 | ||
|
|
3e41081eff | ||
|
|
c4345c7a7d | ||
|
|
2454da3d5e | ||
|
|
305688f537 | ||
|
|
9718dffd27 | ||
|
|
c95622ac6e | ||
|
|
3ba78a839a | ||
|
|
f4db275250 | ||
|
|
ec55b1217a | ||
|
|
6f9067e9d4 | ||
|
|
01000b0cec | ||
|
|
2e29823034 | ||
|
|
3a9f927c2f | ||
|
|
8496275f83 | ||
|
|
3082e83596 | ||
|
|
8dc0a963a8 | ||
|
|
5978ab409c | ||
|
|
93d67c96a6 | ||
|
|
fde584a3ec | ||
|
|
ae63723f0a | ||
|
|
1cf24edac7 | ||
|
|
73e37f2763 | ||
|
|
e1e47d5984 | ||
|
|
cf2b72ed7f | ||
|
|
d3a8cacfcc | ||
|
|
9c4d81ec5e | ||
|
|
6d4d665147 | ||
|
|
09f4533d6d | ||
|
|
fd90eed40c | ||
|
|
462c5653e1 | ||
|
|
1f5b8a32e4 | ||
|
|
ed785589ea | ||
|
|
1e764ea7df | ||
|
|
997ab54373 | ||
|
|
fd7e8e4e75 | ||
|
|
629199f6c8 | ||
|
|
56fd8355b0 | ||
|
|
654e0242e4 | ||
|
|
360d756fbf | ||
|
|
1392bec7de | ||
|
|
88e8ca256b | ||
|
|
40c0d28e84 | ||
|
|
93ebd966fe | ||
|
|
d0748065da | ||
|
|
35e470ad0a | ||
|
|
37d535129b | ||
|
|
494b889af8 | ||
|
|
94c2ceed9e | ||
|
|
1ba74c168b | ||
|
|
8035ac0195 | ||
|
|
06bec84625 | ||
|
|
660d8f4048 | ||
|
|
7492906d13 | ||
|
|
8a11563b06 | ||
|
|
b01b9244b4 | ||
|
|
940adf4b67 | ||
|
|
01b096a64b | ||
|
|
b33090a0fa | ||
|
|
e506a0d50f | ||
|
|
794ddf5ca2 | ||
|
|
d604032c2a | ||
|
|
c58384be89 | ||
|
|
04ca5a8678 | ||
|
|
175a3cb22a | ||
|
|
778afce43e | ||
|
|
206012e252 | ||
|
|
5c85a3e607 | ||
|
|
829cc60a28 | ||
|
|
079ce0413a | ||
|
|
dec6584b22 | ||
|
|
1eda1a7946 | ||
|
|
8f459812b8 | ||
|
|
1d12cfdce2 | ||
|
|
973c18fb8c | ||
|
|
da4e3881ea | ||
|
|
ab26cddca2 | ||
|
|
3e8a713bc4 | ||
|
|
09a649ff4b | ||
|
|
b3142fff2a | ||
|
|
9cec59ca38 | ||
|
|
060aa0021f | ||
|
|
32f8c6fdf8 | ||
|
|
ea34ce11c1 | ||
|
|
fa9a932fdb | ||
|
|
e0bb4b7a78 |
13
.github/issue_template
vendored
13
.github/issue_template
vendored
@@ -1,13 +0,0 @@
|
||||
This repository is a mirror of our main repo at https://git.openwrt.org/openwrt/openwrt.git
|
||||
It is for reference only and is not active for checkins or for reporting issues.
|
||||
|
||||
All issues should be reported at: https://bugs.openwrt.org
|
||||
|
||||
Please do not open any NEW issue here - we will be closing the Github issues
|
||||
capability in the near future.
|
||||
|
||||
We will continue to accept Pull Requests here as described in the repo description.
|
||||
|
||||
Close this now and click here: https://bugs.openwrt.org
|
||||
|
||||
Thankyou for your co-operation.
|
||||
103
.github/labeler.yml
vendored
Normal file
103
.github/labeler.yml
vendored
Normal file
@@ -0,0 +1,103 @@
|
||||
# target/*
|
||||
"target/airoha":
|
||||
- "target/linux/airoha/**"
|
||||
"target/apm821xx":
|
||||
- "target/linux/apm821xx/**"
|
||||
"target/archs38":
|
||||
- "target/linux/archs38/**"
|
||||
"target/armvirt":
|
||||
- "target/linux/armvirt/**"
|
||||
"target/at91":
|
||||
- "target/linux/at91/**"
|
||||
"target/ath25":
|
||||
- "target/linux/ath25/**"
|
||||
"target/ath79":
|
||||
- "target/linux/ath79/**"
|
||||
"target/bcm27xx":
|
||||
- "target/linux/bcm27xx/**"
|
||||
"target/bcm47xx":
|
||||
- "target/linux/bcm47xx/**"
|
||||
"target/bcm4908":
|
||||
- "target/linux/bcm4908/**"
|
||||
"target/bcm53xx":
|
||||
- "target/linux/bcm53xx/**"
|
||||
"target/bcm63xx":
|
||||
- "target/linux/bcm63xx/**"
|
||||
"target/bmips":
|
||||
- "target/linux/bmips/**"
|
||||
"target/gemini":
|
||||
- "target/linux/gemini/**"
|
||||
"target/imx":
|
||||
- "target/linux/imx/**"
|
||||
"target/ipq40xx":
|
||||
- "target/linux/ipq40xx/**"
|
||||
"target/ipq806x":
|
||||
- "target/linux/ipq806x/**"
|
||||
"target/kirkwood":
|
||||
- "target/linux/kirkwood/**"
|
||||
"target/lantiq":
|
||||
- "target/linux/lantiq/**"
|
||||
"target/layerscape":
|
||||
- "target/linux/layerscape/**"
|
||||
"target/malta":
|
||||
- "target/linux/malta/**"
|
||||
"target/mediatek":
|
||||
- "target/linux/mediatek/**"
|
||||
"target/mpc85xx":
|
||||
- "target/linux/mpc85xx/**"
|
||||
"target/mvebu":
|
||||
- "target/linux/mvebu/**"
|
||||
"target/mxs":
|
||||
- "target/linux/mxs/**"
|
||||
"target/octeon":
|
||||
- "target/linux/octeon/**"
|
||||
"target/octeontx":
|
||||
- "target/linux/octeontx/**"
|
||||
"target/omap":
|
||||
- "target/linux/omap/**"
|
||||
"target/oxnas":
|
||||
- "target/linux/oxnas/**"
|
||||
"target/pistachio":
|
||||
- "target/linux/pistachio/**"
|
||||
"target/qoriq":
|
||||
- "target/linux/qoriq/**"
|
||||
"target/ramips":
|
||||
- "target/linux/ramips/**"
|
||||
"target/realtek":
|
||||
- "target/linux/realtek/**"
|
||||
"target/rockchip":
|
||||
- "target/linux/rockchip/**"
|
||||
"target/sunxi":
|
||||
- "target/linux/sunxi/**"
|
||||
"target/tegra":
|
||||
- "target/linux/tegra/**"
|
||||
"target/uml":
|
||||
- "target/linux/uml/**"
|
||||
"target/x86":
|
||||
- "target/linux/x86/**"
|
||||
"target/zynq":
|
||||
- "target/linux/zynq/**"
|
||||
# target/imagebuilder
|
||||
"target/imagebuilder":
|
||||
- "target/imagebuilder/**"
|
||||
# kernel
|
||||
"kernel":
|
||||
- "target/linux/generic/**"
|
||||
- "target/linux/**/config-*"
|
||||
- "target/linux/**/patches-*"
|
||||
- "target/linux/**/files/**"
|
||||
- "package/kernel/linux/**"
|
||||
# core packages
|
||||
"core packages":
|
||||
- "package/**"
|
||||
# build/scripts/tools
|
||||
"build/scripts/tools":
|
||||
- "include/**"
|
||||
- "scripts/**"
|
||||
- "tools/**"
|
||||
# toolchain
|
||||
"toolchain":
|
||||
- "toolchain/**"
|
||||
# GitHub/CI
|
||||
"GitHub/CI":
|
||||
- ".github/**"
|
||||
3
.github/workflows/Dockerfile.tools
vendored
Normal file
3
.github/workflows/Dockerfile.tools
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
FROM registry.gitlab.com/openwrt/buildbot/buildworker-3.4.1
|
||||
|
||||
COPY --chown=buildbot:buildbot tools.tar /tools.tar
|
||||
361
.github/workflows/build.yml
vendored
Normal file
361
.github/workflows/build.yml
vendored
Normal file
@@ -0,0 +1,361 @@
|
||||
name: Build sub target
|
||||
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
target:
|
||||
required: true
|
||||
type: string
|
||||
testing:
|
||||
type: boolean
|
||||
build_toolchain:
|
||||
type: boolean
|
||||
include_feeds:
|
||||
type: boolean
|
||||
build_full:
|
||||
type: boolean
|
||||
build_all_modules:
|
||||
type: boolean
|
||||
build_all_kmods:
|
||||
type: boolean
|
||||
build_all_boards:
|
||||
type: boolean
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
setup_build:
|
||||
name: Setup build
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
owner_lc: ${{ steps.lower_owner.outputs.owner_lc }}
|
||||
ccache_hash: ${{ steps.ccache_hash.outputs.ccache_hash }}
|
||||
container_tag: ${{ steps.determine_tools_container.outputs.container_tag }}
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Set lower case owner name
|
||||
id: lower_owner
|
||||
run: |
|
||||
OWNER_LC=$(echo "${{ github.repository_owner }}" \
|
||||
| tr '[:upper:]' '[:lower:]')
|
||||
echo "owner_lc=$OWNER_LC" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Generate ccache hash
|
||||
id: ccache_hash
|
||||
run: |
|
||||
CCACHE_HASH=$(md5sum include/kernel-* | awk '{ print $1 }' \
|
||||
| md5sum | awk '{ print $1 }')
|
||||
echo "ccache_hash=$CCACHE_HASH" >> $GITHUB_OUTPUT
|
||||
|
||||
# Per branch tools container tag
|
||||
# By default stick to latest
|
||||
# For official test targetting openwrt stable branch
|
||||
# Get the branch or parse the tag and push dedicated tools containers
|
||||
# For local test to use the correct container for stable release testing
|
||||
# you need to use for the branch name a prefix of openwrt-[0-9][0-9].[0-9][0-9]-
|
||||
- name: Determine tools container tag
|
||||
id: determine_tools_container
|
||||
run: |
|
||||
CONTAINER_TAG=latest
|
||||
if [ -n "${{ github.base_ref }}" ]; then
|
||||
if echo "${{ github.base_ref }}" | grep -q -E '^openwrt-[0-9][0-9]\.[0-9][0-9]$'; then
|
||||
CONTAINER_TAG="${{ github.base_ref }}"
|
||||
fi
|
||||
elif [ ${{ github.ref_type }} == "branch" ]; then
|
||||
if echo "${{ github.ref_name }}" | grep -q -E '^openwrt-[0-9][0-9]\.[0-9][0-9]$'; then
|
||||
CONTAINER_TAG=${{ github.ref_name }}
|
||||
elif echo "${{ github.ref_name }}" | grep -q -E '^openwrt-[0-9][0-9]\.[0-9][0-9]-'; then
|
||||
CONTAINER_TAG="$(echo ${{ github.ref_name }} | sed 's/^\(openwrt-[0-9][0-9]\.[0-9][0-9]\)-.*/\1/')"
|
||||
fi
|
||||
elif [ ${{ github.ref_type }} == "tag" ]; then
|
||||
if echo "${{ github.ref_name }}" | grep -q -E '^v[0-9][0-9]\.[0-9][0-9]\..+'; then
|
||||
CONTAINER_TAG=openwrt-"$(echo ${{ github.ref_name }} | sed 's/^v\([0-9][0-9]\.[0-9][0-9]\)\..\+/\1/')"
|
||||
fi
|
||||
fi
|
||||
echo "Tools container to use tools:$CONTAINER_TAG"
|
||||
echo "container_tag=$CONTAINER_TAG" >> $GITHUB_OUTPUT
|
||||
|
||||
build:
|
||||
name: Build with external toolchain
|
||||
needs: setup_build
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
container: ghcr.io/${{ needs.setup_build.outputs.owner_lc }}/tools:${{ needs.setup_build.outputs.container_tag }}
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
packages: read
|
||||
|
||||
steps:
|
||||
- name: Checkout master directory
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
path: openwrt
|
||||
|
||||
- name: Checkout packages feed
|
||||
if: inputs.include_feeds == true
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
repository: openwrt/packages
|
||||
path: openwrt/feeds/packages
|
||||
|
||||
- name: Checkout luci feed
|
||||
if: inputs.include_feeds == true
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
repository: openwrt/luci
|
||||
path: openwrt/feeds/luci
|
||||
|
||||
- name: Checkout routing feed
|
||||
if: inputs.include_feeds == true
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
repository: openwrt/routing
|
||||
path: openwrt/feeds/routing
|
||||
|
||||
- name: Checkout telephony feed
|
||||
if: inputs.include_feeds == true
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
repository: openwrt/telephony
|
||||
path: openwrt/feeds/telephony
|
||||
|
||||
- name: Fix permission
|
||||
run: |
|
||||
chown -R buildbot:buildbot openwrt
|
||||
|
||||
- name: Initialization environment
|
||||
run: |
|
||||
TARGET=$(echo ${{ inputs.target }} | cut -d "/" -f 1)
|
||||
SUBTARGET=$(echo ${{ inputs.target }} | cut -d "/" -f 2)
|
||||
echo "TARGET=$TARGET" >> "$GITHUB_ENV"
|
||||
echo "SUBTARGET=$SUBTARGET" >> "$GITHUB_ENV"
|
||||
|
||||
- name: Update & Install feeds
|
||||
if: inputs.include_feeds == true
|
||||
shell: su buildbot -c "sh -e {0}"
|
||||
working-directory: openwrt
|
||||
run: |
|
||||
./scripts/feeds update -a
|
||||
./scripts/feeds install -a
|
||||
|
||||
- name: Parse toolchain file
|
||||
if: inputs.build_toolchain == false
|
||||
id: parse-toolchain
|
||||
working-directory: openwrt
|
||||
run: |
|
||||
TOOLCHAIN_PATH=snapshots
|
||||
|
||||
if [ -n "${{ github.base_ref }}" ]; then
|
||||
if echo "${{ github.base_ref }}" | grep -q -E '^openwrt-[0-9][0-9]\.[0-9][0-9]$'; then
|
||||
major_ver="$(echo ${{ github.base_ref }} | sed 's/^openwrt-/v/')"
|
||||
fi
|
||||
elif [ "${{ github.ref_type }}" = "branch" ]; then
|
||||
if echo "${{ github.ref_name }}" | grep -q -E '^openwrt-[0-9][0-9]\.[0-9][0-9]$'; then
|
||||
major_ver="$(echo ${{ github.ref_name }} | sed 's/^openwrt-/v/')"
|
||||
elif echo "${{ github.ref_name }}" | grep -q -E '^openwrt-[0-9][0-9]\.[0-9][0-9]-'; then
|
||||
major_ver="$(echo ${{ github.ref_name }} | sed 's/^openwrt-\([0-9][0-9]\.[0-9][0-9]\)-.*/v\1/')"
|
||||
fi
|
||||
elif [ "${{ github.ref_type }}" = "tag" ]; then
|
||||
if echo "${{ github.ref_name }}" | grep -q -E '^v[0-9][0-9]\.[0-9][0-9]\..+'; then
|
||||
major_ver="$(echo ${{ github.ref_name }} | sed 's/^\(v[0-9][0-9]\.[0-9][0-9]\)\..\+/\1/')"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ -n "$major_ver" ]; then
|
||||
git fetch --tags -f
|
||||
latest_tag="$(git tag --sort=-creatordate -l $major_ver* | head -n1)"
|
||||
if [ -n "$latest_tag" ]; then
|
||||
TOOLCHAIN_PATH=releases/$(echo $latest_tag | sed 's/^v//')
|
||||
fi
|
||||
fi
|
||||
|
||||
SUMS_FILE="https://downloads.cdn.openwrt.org/$TOOLCHAIN_PATH/targets/${{ env.TARGET }}/${{ env.SUBTARGET }}/sha256sums"
|
||||
if curl $SUMS_FILE | grep -q ".*openwrt-toolchain.*tar.xz"; then
|
||||
TOOLCHAIN_STRING="$( curl $SUMS_FILE | grep ".*openwrt-toolchain.*tar.xz")"
|
||||
TOOLCHAIN_FILE=$(echo "$TOOLCHAIN_STRING" | sed -n -e 's/.*\(openwrt-toolchain.*\).tar.xz/\1/p')
|
||||
TOOLCHAIN_SHA256=$(echo "$TOOLCHAIN_STRING" | cut -d ' ' -f 1)
|
||||
|
||||
echo "toolchain-type=external_toolchain" >> $GITHUB_OUTPUT
|
||||
elif curl $SUMS_FILE | grep -q ".*openwrt-sdk.*tar.xz"; then
|
||||
TOOLCHAIN_STRING="$( curl $SUMS_FILE | grep ".*openwrt-sdk.*tar.xz")"
|
||||
TOOLCHAIN_FILE=$(echo "$TOOLCHAIN_STRING" | sed -n -e 's/.*\(openwrt-sdk.*\).tar.xz/\1/p')
|
||||
TOOLCHAIN_SHA256=$(echo "$TOOLCHAIN_STRING" | cut -d ' ' -f 1)
|
||||
|
||||
echo "toolchain-type=external_sdk" >> $GITHUB_OUTPUT
|
||||
fi
|
||||
|
||||
echo "TOOLCHAIN_FILE=$TOOLCHAIN_FILE" >> "$GITHUB_ENV"
|
||||
echo "TOOLCHAIN_SHA256=$TOOLCHAIN_SHA256" >> "$GITHUB_ENV"
|
||||
echo "TOOLCHAIN_PATH=$TOOLCHAIN_PATH" >> "$GITHUB_ENV"
|
||||
|
||||
- name: Cache external toolchain/sdk
|
||||
if: inputs.build_toolchain == false
|
||||
id: cache-external-toolchain
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: openwrt/${{ env.TOOLCHAIN_FILE }}
|
||||
key: ${{ env.TOOLCHAIN_FILE }}-${{ steps.parse-toolchain.outputs.toolchain-type }}-${{ env.TOOLCHAIN_SHA256 }}
|
||||
|
||||
- name: Cache ccache
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: openwrt/.ccache
|
||||
key: ccache-kernel-${{ env.TARGET }}/${{ env.SUBTARGET }}-${{ needs.setup_build.outputs.ccache_hash }}
|
||||
restore-keys: |
|
||||
ccache-kernel-${{ env.TARGET }}/${{ env.SUBTARGET }}-
|
||||
|
||||
- name: Download external toolchain/sdk
|
||||
if: inputs.build_toolchain == false && steps.cache-external-toolchain.outputs.cache-hit != 'true'
|
||||
shell: su buildbot -c "sh -e {0}"
|
||||
working-directory: openwrt
|
||||
run: |
|
||||
wget -O - https://downloads.cdn.openwrt.org/${{ env.TOOLCHAIN_PATH }}/targets/${{ env.TARGET }}/${{ env.SUBTARGET }}/${{ env.TOOLCHAIN_FILE }}.tar.xz \
|
||||
| tar --xz -xf -
|
||||
|
||||
- name: Extract prebuilt tools
|
||||
shell: su buildbot -c "sh -e {0}"
|
||||
working-directory: openwrt
|
||||
run: ./scripts/ext-tools.sh --tools /tools.tar
|
||||
|
||||
- name: Configure testing kernel
|
||||
if: inputs.testing == true
|
||||
shell: su buildbot -c "sh -e {0}"
|
||||
working-directory: openwrt
|
||||
run: |
|
||||
echo CONFIG_TESTING_KERNEL=y >> .config
|
||||
|
||||
- name: Configure all kernel modules
|
||||
if: inputs.build_all_kmods == true
|
||||
shell: su buildbot -c "sh -e {0}"
|
||||
working-directory: openwrt
|
||||
run: |
|
||||
echo CONFIG_ALL_KMODS=y >> .config
|
||||
|
||||
- name: Configure all modules
|
||||
if: inputs.build_all_modules == true
|
||||
shell: su buildbot -c "sh -e {0}"
|
||||
working-directory: openwrt
|
||||
run: |
|
||||
echo CONFIG_ALL=y >> .config
|
||||
|
||||
- name: Configure all boards
|
||||
if: inputs.build_all_boards == true
|
||||
shell: su buildbot -c "sh -e {0}"
|
||||
working-directory: openwrt
|
||||
run: |
|
||||
echo CONFIG_TARGET_MULTI_PROFILE=y >> .config
|
||||
echo CONFIG_TARGET_PER_DEVICE_ROOTFS=y >> .config
|
||||
echo CONFIG_TARGET_ALL_PROFILES=y >> .config
|
||||
|
||||
- name: Configure external toolchain
|
||||
if: inputs.build_toolchain == false && steps.parse-toolchain.outputs.toolchain-type == 'external_toolchain'
|
||||
shell: su buildbot -c "sh -e {0}"
|
||||
working-directory: openwrt
|
||||
run: |
|
||||
echo CONFIG_DEVEL=y >> .config
|
||||
echo CONFIG_AUTOREMOVE=y >> .config
|
||||
echo CONFIG_CCACHE=y >> .config
|
||||
|
||||
./scripts/ext-toolchain.sh \
|
||||
--toolchain ${{ env.TOOLCHAIN_FILE }}/toolchain-* \
|
||||
--overwrite-config \
|
||||
--config ${{ env.TARGET }}/${{ env.SUBTARGET }}
|
||||
|
||||
- name: Adapt external sdk to external toolchain format
|
||||
if: inputs.build_toolchain == false && steps.parse-toolchain.outputs.toolchain-type == 'external_sdk' && steps.cache-external-toolchain.outputs.cache-hit != 'true'
|
||||
shell: su buildbot -c "sh -e {0}"
|
||||
working-directory: openwrt
|
||||
run: |
|
||||
TOOLCHAIN_DIR=${{ env.TOOLCHAIN_FILE }}/staging_dir/$(ls ${{ env.TOOLCHAIN_FILE }}/staging_dir | grep toolchain)
|
||||
TOOLCHAIN_BIN=$TOOLCHAIN_DIR/bin
|
||||
OPENWRT_DIR=$(pwd)
|
||||
|
||||
# Find target name from toolchain info.mk
|
||||
GNU_TARGET_NAME=$(cat $TOOLCHAIN_DIR/info.mk | grep TARGET_CROSS | sed 's/^TARGET_CROSS=\(.*\)-$/\1/')
|
||||
|
||||
cd $TOOLCHAIN_BIN
|
||||
|
||||
# Revert sdk wrapper scripts applied to all the bins
|
||||
for app in $(find . -name "*.bin"); do
|
||||
TARGET_APP=$(echo $app | sed 's/\.\/\.\(.*\)\.bin/\1/')
|
||||
rm $TARGET_APP
|
||||
mv .$TARGET_APP.bin $TARGET_APP
|
||||
done
|
||||
|
||||
# Setup the wrapper script in the sdk toolchain dir simulating an external toolchain build
|
||||
cp $OPENWRT_DIR/target/toolchain/files/wrapper.sh $GNU_TARGET_NAME-wrapper.sh
|
||||
for app in cc gcc g++ c++ cpp ld as ; do
|
||||
[ -f $GNU_TARGET_NAME-$app ] && mv $GNU_TARGET_NAME-$app $GNU_TARGET_NAME-$app.bin
|
||||
ln -sf $GNU_TARGET_NAME-wrapper.sh $GNU_TARGET_NAME-$app
|
||||
done
|
||||
|
||||
- name: Configure external toolchain with sdk
|
||||
if: inputs.build_toolchain == false && steps.parse-toolchain.outputs.toolchain-type == 'external_sdk'
|
||||
shell: su buildbot -c "sh -e {0}"
|
||||
working-directory: openwrt
|
||||
run: |
|
||||
echo CONFIG_DEVEL=y >> .config
|
||||
echo CONFIG_AUTOREMOVE=y >> .config
|
||||
echo CONFIG_CCACHE=y >> .config
|
||||
|
||||
./scripts/ext-toolchain.sh \
|
||||
--toolchain ${{ env.TOOLCHAIN_FILE }}/staging_dir/toolchain-* \
|
||||
--overwrite-config \
|
||||
--config ${{ env.TARGET }}/${{ env.SUBTARGET }}
|
||||
|
||||
- name: Configure internal toolchain
|
||||
if: inputs.build_toolchain == true
|
||||
shell: su buildbot -c "sh -e {0}"
|
||||
working-directory: openwrt
|
||||
run: |
|
||||
echo CONFIG_DEVEL=y >> .config
|
||||
echo CONFIG_AUTOREMOVE=y >> .config
|
||||
echo CONFIG_CCACHE=y >> .config
|
||||
|
||||
echo "CONFIG_TARGET_${{ env.TARGET }}=y" >> .config
|
||||
echo "CONFIG_TARGET_${{ env.TARGET }}_${{ env.SUBTARGET }}=y" >> .config
|
||||
|
||||
make defconfig
|
||||
|
||||
- name: Show configuration
|
||||
shell: su buildbot -c "sh -e {0}"
|
||||
working-directory: openwrt
|
||||
run: ./scripts/diffconfig.sh
|
||||
|
||||
- name: Build tools
|
||||
shell: su buildbot -c "sh -e {0}"
|
||||
working-directory: openwrt
|
||||
run: make tools/install -j$(nproc) BUILD_LOG=1 || ret=$? .github/workflows/scripts/show_build_failures.sh
|
||||
|
||||
- name: Build toolchain
|
||||
shell: su buildbot -c "sh -e {0}"
|
||||
working-directory: openwrt
|
||||
run: make toolchain/install -j$(nproc) BUILD_LOG=1 || ret=$? .github/workflows/scripts/show_build_failures.sh
|
||||
|
||||
- name: Build Kernel
|
||||
shell: su buildbot -c "sh -e {0}"
|
||||
working-directory: openwrt
|
||||
run: make target/compile -j$(nproc) BUILD_LOG=1 || ret=$? .github/workflows/scripts/show_build_failures.sh
|
||||
|
||||
- name: Build Kernel Kmods
|
||||
shell: su buildbot -c "sh -e {0}"
|
||||
working-directory: openwrt
|
||||
run: make package/linux/compile -j$(nproc) BUILD_LOG=1 || ret=$? .github/workflows/scripts/show_build_failures.sh
|
||||
|
||||
- name: Build everything
|
||||
if: inputs.build_full == true
|
||||
shell: su buildbot -c "sh -e {0}"
|
||||
working-directory: openwrt
|
||||
run: make -j$(nproc) BUILD_LOG=1 || ret=$? .github/workflows/scripts/show_build_failures.sh
|
||||
|
||||
- name: Upload logs
|
||||
if: failure()
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: ${{ env.TARGET }}-${{ env.SUBTARGET }}-logs
|
||||
path: "openwrt/logs"
|
||||
131
.github/workflows/check-kernel-patches.yml
vendored
Normal file
131
.github/workflows/check-kernel-patches.yml
vendored
Normal file
@@ -0,0 +1,131 @@
|
||||
name: Refresh kernel for target
|
||||
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
target:
|
||||
required: true
|
||||
type: string
|
||||
testing:
|
||||
type: boolean
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
setup_build:
|
||||
name: Setup build
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
owner_lc: ${{ steps.lower_owner.outputs.owner_lc }}
|
||||
container_tag: ${{ steps.determine_tools_container.outputs.container_tag }}
|
||||
|
||||
steps:
|
||||
- name: Set lower case owner name
|
||||
id: lower_owner
|
||||
run: |
|
||||
OWNER_LC=$(echo "${{ github.repository_owner }}" \
|
||||
| tr '[:upper:]' '[:lower:]')
|
||||
echo "owner_lc=$OWNER_LC" >> $GITHUB_OUTPUT
|
||||
|
||||
# Per branch tools container tag
|
||||
# By default stick to latest
|
||||
# For official test targetting openwrt stable branch
|
||||
# Get the branch or parse the tag and push dedicated tools containers
|
||||
# For local test to use the correct container for stable release testing
|
||||
# you need to use for the branch name a prefix of openwrt-[0-9][0-9].[0-9][0-9]-
|
||||
- name: Determine tools container tag
|
||||
id: determine_tools_container
|
||||
run: |
|
||||
CONTAINER_TAG=latest
|
||||
if [ -n "${{ github.base_ref }}" ]; then
|
||||
if echo "${{ github.base_ref }}" | grep -q -E '^openwrt-[0-9][0-9]\.[0-9][0-9]$'; then
|
||||
CONTAINER_TAG="${{ github.base_ref }}"
|
||||
fi
|
||||
elif [ ${{ github.ref_type }} == "branch" ]; then
|
||||
if echo "${{ github.ref_name }}" | grep -q -E '^openwrt-[0-9][0-9]\.[0-9][0-9]$'; then
|
||||
CONTAINER_TAG=${{ github.ref_name }}
|
||||
elif echo "${{ github.ref_name }}" | grep -q -E '^openwrt-[0-9][0-9]\.[0-9][0-9]-'; then
|
||||
CONTAINER_TAG="$(echo ${{ github.ref_name }} | sed 's/^\(openwrt-[0-9][0-9]\.[0-9][0-9]\)-.*/\1/')"
|
||||
fi
|
||||
elif [ ${{ github.ref_type }} == "tag" ]; then
|
||||
if echo "${{ github.ref_name }}" | grep -q -E '^v[0-9][0-9]\.[0-9][0-9]\..+'; then
|
||||
CONTAINER_TAG=openwrt-"$(echo ${{ github.ref_name }} | sed 's/^v\([0-9][0-9]\.[0-9][0-9]\)\..\+/\1/')"
|
||||
fi
|
||||
fi
|
||||
echo "Tools container to use tools:$CONTAINER_TAG"
|
||||
echo "container_tag=$CONTAINER_TAG" >> $GITHUB_OUTPUT
|
||||
|
||||
check-patch:
|
||||
name: Check Kernel patches
|
||||
needs: setup_build
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
container: ghcr.io/${{ needs.setup_build.outputs.owner_lc }}/tools:${{ needs.setup_build.outputs.container_tag }}
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
packages: read
|
||||
|
||||
steps:
|
||||
- name: Checkout master directory
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
path: openwrt
|
||||
|
||||
- name: Fix permission
|
||||
run: |
|
||||
chown -R buildbot:buildbot openwrt
|
||||
|
||||
- name: Initialization environment
|
||||
run: |
|
||||
TARGET=$(echo ${{ inputs.target }} | cut -d "/" -f 1)
|
||||
SUBTARGET=$(echo ${{ inputs.target }} | cut -d "/" -f 2)
|
||||
echo "TARGET=$TARGET" >> "$GITHUB_ENV"
|
||||
echo "SUBTARGET=$SUBTARGET" >> "$GITHUB_ENV"
|
||||
|
||||
- name: Extract prebuilt tools
|
||||
shell: su buildbot -c "sh -e {0}"
|
||||
working-directory: openwrt
|
||||
run: ./scripts/ext-tools.sh --tools /tools.tar
|
||||
|
||||
- name: Configure testing kernel
|
||||
if: inputs.testing == true
|
||||
shell: su buildbot -c "sh -e {0}"
|
||||
working-directory: openwrt
|
||||
run: |
|
||||
echo CONFIG_TESTING_KERNEL=y >> .config
|
||||
|
||||
- name: Configure system
|
||||
shell: su buildbot -c "sh -e {0}"
|
||||
working-directory: openwrt
|
||||
run: |
|
||||
echo CONFIG_ALL_KMODS=y >> .config
|
||||
echo CONFIG_DEVEL=y >> .config
|
||||
echo CONFIG_AUTOREMOVE=y >> .config
|
||||
echo CONFIG_CCACHE=y >> .config
|
||||
|
||||
echo "CONFIG_TARGET_${{ env.TARGET }}=y" >> .config
|
||||
echo "CONFIG_TARGET_${{ env.TARGET }}_${{ env.SUBTARGET }}=y" >> .config
|
||||
|
||||
make defconfig
|
||||
|
||||
- name: Build tools
|
||||
shell: su buildbot -c "sh -e {0}"
|
||||
working-directory: openwrt
|
||||
run: make tools/quilt/compile -j$(nproc) BUILD_LOG=1 || ret=$? .github/workflows/scripts/show_build_failures.sh
|
||||
|
||||
- name: Refresh Kernel patches
|
||||
shell: su buildbot -c "sh -e {0}"
|
||||
working-directory: openwrt
|
||||
run: |
|
||||
make target/linux/refresh V=s
|
||||
|
||||
. .github/workflows/scripts/ci_helpers.sh
|
||||
|
||||
if git diff --name-only --exit-code; then
|
||||
success "Kernel patches for ${{ env.TARGET }}/${{ env.SUBTARGET }} seems ok"
|
||||
else
|
||||
err "Kernel patches for ${{ env.TARGET }}/${{ env.SUBTARGET }} require refresh. (run 'make target/linux/refresh' and force push this pr)"
|
||||
exit 1
|
||||
fi
|
||||
73
.github/workflows/formal.yml
vendored
Normal file
73
.github/workflows/formal.yml
vendored
Normal file
@@ -0,0 +1,73 @@
|
||||
name: Test Formalities
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Test Formalities
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
ref: ${{ github.event.pull_request.head.sha }}
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Determine branch name
|
||||
run: |
|
||||
BRANCH="${GITHUB_BASE_REF#refs/heads/}"
|
||||
echo "Building for $BRANCH"
|
||||
echo "BRANCH=$BRANCH" >> $GITHUB_ENV
|
||||
|
||||
- name: Test formalities
|
||||
run: |
|
||||
source .github/workflows/scripts/ci_helpers.sh
|
||||
|
||||
RET=0
|
||||
for commit in $(git rev-list HEAD ^origin/$BRANCH); do
|
||||
info "=== Checking commit '$commit'"
|
||||
if git show --format='%P' -s $commit | grep -qF ' '; then
|
||||
err "Pull request should not include merge commits"
|
||||
RET=1
|
||||
fi
|
||||
|
||||
author="$(git show -s --format=%aN $commit)"
|
||||
if echo $author | grep -q '\S\+\s\+\S\+'; then
|
||||
success "Author name ($author) seems ok"
|
||||
else
|
||||
err "Author name ($author) need to be your real name 'firstname lastname'"
|
||||
RET=1
|
||||
fi
|
||||
|
||||
subject="$(git show -s --format=%s $commit)"
|
||||
if echo "$subject" | grep -q -e '^[0-9A-Za-z,+/_\.-]\+: ' -e '^Revert '; then
|
||||
success "Commit subject line seems ok ($subject)"
|
||||
else
|
||||
err "Commit subject line MUST start with '<area>: ' ($subject)"
|
||||
RET=1
|
||||
fi
|
||||
|
||||
body="$(git show -s --format=%b $commit)"
|
||||
sob="$(git show -s --format='Signed-off-by: %aN <%aE>' $commit)"
|
||||
if echo "$body" | grep -qF "$sob"; then
|
||||
success "Signed-off-by match author"
|
||||
else
|
||||
err "Signed-off-by is missing or doesn't match author (should be '$sob')"
|
||||
RET=1
|
||||
fi
|
||||
|
||||
if echo "$body" | grep -v "Signed-off-by:"; then
|
||||
success "A commit message exists"
|
||||
else
|
||||
err "Missing commit message. Please describe your changes"
|
||||
RET=1
|
||||
fi
|
||||
done
|
||||
|
||||
exit $RET
|
||||
85
.github/workflows/kernel.yml
vendored
Normal file
85
.github/workflows/kernel.yml
vendored
Normal file
@@ -0,0 +1,85 @@
|
||||
name: Build Kernel
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
paths:
|
||||
- '.github/workflows/check-kernel-patches.yml'
|
||||
- '.github/workflows/build.yml'
|
||||
- '.github/workflows/kernel.yml'
|
||||
- 'include/kernel*'
|
||||
- 'package/kernel/**'
|
||||
- 'target/linux/generic/**'
|
||||
push:
|
||||
paths:
|
||||
- '.github/workflows/check-kernel-patches.yml'
|
||||
- '.github/workflows/build.yml'
|
||||
- '.github/workflows/kernel.yml'
|
||||
- 'include/kernel*'
|
||||
- 'package/kernel/**'
|
||||
- 'target/linux/generic/**'
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
determine_targets:
|
||||
name: Set targets
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
target: ${{ steps.find_targets.outputs.target }}
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Set targets
|
||||
id: find_targets
|
||||
run: |
|
||||
export TARGETS="$(perl ./scripts/dump-target-info.pl targets 2>/dev/null \
|
||||
| sort -u -t '/' -k1,1 \
|
||||
| awk '{ print $1 }')"
|
||||
|
||||
JSON='['
|
||||
FIRST=1
|
||||
for TARGET in $TARGETS; do
|
||||
[[ $FIRST -ne 1 ]] && JSON="$JSON"','
|
||||
JSON="$JSON"'"'"${TARGET}"'"'
|
||||
FIRST=0
|
||||
done
|
||||
JSON="$JSON"']'
|
||||
|
||||
echo -e "\n---- targets ----\n"
|
||||
echo "$JSON"
|
||||
echo -e "\n---- targets ----\n"
|
||||
|
||||
echo "target=$JSON" >> $GITHUB_OUTPUT
|
||||
|
||||
build:
|
||||
name: Build Kernel with external toolchain
|
||||
needs: determine_targets
|
||||
permissions:
|
||||
contents: read
|
||||
packages: read
|
||||
strategy:
|
||||
fail-fast: False
|
||||
matrix:
|
||||
target: ${{fromJson(needs.determine_targets.outputs.target)}}
|
||||
uses: ./.github/workflows/build.yml
|
||||
with:
|
||||
target: ${{ matrix.target }}
|
||||
build_all_kmods: true
|
||||
|
||||
check-kernel-patches:
|
||||
name: Check Kernel patches
|
||||
needs: determine_targets
|
||||
permissions:
|
||||
contents: read
|
||||
packages: read
|
||||
strategy:
|
||||
fail-fast: False
|
||||
matrix:
|
||||
target: ${{fromJson(needs.determine_targets.outputs.target)}}
|
||||
uses: ./.github/workflows/check-kernel-patches.yml
|
||||
with:
|
||||
target: ${{ matrix.target }}
|
||||
|
||||
33
.github/workflows/labeler.yml
vendored
Normal file
33
.github/workflows/labeler.yml
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
name: 'Pull Request Labeler'
|
||||
on:
|
||||
- pull_request_target
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
labeler:
|
||||
permissions:
|
||||
contents: read # to determine modified files (actions/labeler)
|
||||
pull-requests: write # to add labels to PRs (actions/labeler)
|
||||
|
||||
name: Pull Request Labeler
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/labeler@v4
|
||||
with:
|
||||
repo-token: '${{ secrets.GITHUB_TOKEN }}'
|
||||
|
||||
- name: Check Branch
|
||||
id: check-branch
|
||||
run: |
|
||||
if echo "${{ github.base_ref }}" | grep -q -E 'openwrt-[0-9][0-9]\.[0-9][0-9]'; then
|
||||
echo "release-tag=$(echo ${{ github.base_ref }} | sed 's/openwrt-/release\//')" >> $GITHUB_OUTPUT
|
||||
fi
|
||||
|
||||
- uses: buildsville/add-remove-label@v2.0.0
|
||||
if: ${{ steps.check-branch.outputs.release-tag }}
|
||||
with:
|
||||
token: ${{secrets.GITHUB_TOKEN}}
|
||||
labels: ${{ steps.check-branch.outputs.release-tag }}
|
||||
type: add
|
||||
43
.github/workflows/packages.yml
vendored
Normal file
43
.github/workflows/packages.yml
vendored
Normal file
@@ -0,0 +1,43 @@
|
||||
name: Build all core packages
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
paths:
|
||||
- '.github/workflows/build.yml'
|
||||
- '.github/workflows/packages.yml'
|
||||
- 'config/**'
|
||||
- 'include/**'
|
||||
- 'package/**'
|
||||
- 'target/linux/generic/**'
|
||||
- 'toolchain/**'
|
||||
push:
|
||||
paths:
|
||||
- '.github/workflows/build.yml'
|
||||
- '.github/workflows/packages.yml'
|
||||
- 'config/**'
|
||||
- 'include/**'
|
||||
- 'package/**'
|
||||
- 'target/linux/generic/**'
|
||||
- 'toolchain/**'
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
build:
|
||||
permissions:
|
||||
contents: read
|
||||
packages: read
|
||||
strategy:
|
||||
fail-fast: False
|
||||
matrix:
|
||||
include:
|
||||
- target: malta/be
|
||||
- target: x86/64
|
||||
uses: ./.github/workflows/build.yml
|
||||
with:
|
||||
target: ${{ matrix.target }}
|
||||
build_all_kmods: true
|
||||
build_all_modules: true
|
||||
build_full: true
|
||||
|
||||
26
.github/workflows/scripts/ci_helpers.sh
vendored
Normal file
26
.github/workflows/scripts/ci_helpers.sh
vendored
Normal file
@@ -0,0 +1,26 @@
|
||||
#!/bin/sh
|
||||
|
||||
color_out() {
|
||||
printf "\e[0;$1m%s\e[0;0m\n" "$2"
|
||||
}
|
||||
|
||||
success() {
|
||||
color_out 32 "$1"
|
||||
}
|
||||
|
||||
info() {
|
||||
color_out 36 "$1"
|
||||
}
|
||||
|
||||
err() {
|
||||
color_out 31 "$1"
|
||||
}
|
||||
|
||||
warn() {
|
||||
color_out 33 "$1"
|
||||
}
|
||||
|
||||
err_die() {
|
||||
err "$1"
|
||||
exit 1
|
||||
}
|
||||
15
.github/workflows/scripts/show_build_failures.sh
vendored
Executable file
15
.github/workflows/scripts/show_build_failures.sh
vendored
Executable file
@@ -0,0 +1,15 @@
|
||||
#!/bin/bash
|
||||
|
||||
original_exit_code="${ret:-1}"
|
||||
log_dir_path="${1:-logs}"
|
||||
context="${2:-10}"
|
||||
|
||||
show_make_build_errors() {
|
||||
grep -slr 'make\[[[:digit:]]\].*Error [[:digit:]]$' "$log_dir_path" | while IFS= read -r log_file; do
|
||||
printf "====== Make errors from %s ======\n" "$log_file";
|
||||
grep -r -C"$context" 'make\[[[:digit:]]\].*Error [[:digit:]]$' "$log_file" ;
|
||||
done
|
||||
}
|
||||
|
||||
show_make_build_errors
|
||||
exit "$original_exit_code"
|
||||
226
.github/workflows/tools.yml
vendored
Normal file
226
.github/workflows/tools.yml
vendored
Normal file
@@ -0,0 +1,226 @@
|
||||
name: Build host tools
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
paths:
|
||||
- 'tools/**'
|
||||
- '.github/workflows/tools.yml'
|
||||
push:
|
||||
paths:
|
||||
- 'tools/**'
|
||||
- '.github/workflows/tools.yml'
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
build-macos-latest:
|
||||
if: github.event_name != 'push'
|
||||
runs-on: macos-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
path: openwrt
|
||||
|
||||
- name: Setup MacOS
|
||||
run: |
|
||||
echo "WORKPATH=/Volumes/OpenWrt" >> "$GITHUB_ENV"
|
||||
hdiutil create -size 20g -type SPARSE -fs "Case-sensitive HFS+" -volname OpenWrt OpenWrt.sparseimage
|
||||
hdiutil attach OpenWrt.sparseimage
|
||||
mv "$GITHUB_WORKSPACE/openwrt" /Volumes/OpenWrt/
|
||||
|
||||
- name: Install required prereq on MacOS
|
||||
working-directory: ${{ env.WORKPATH }}/openwrt
|
||||
run: |
|
||||
brew install \
|
||||
autoconf \
|
||||
automake \
|
||||
coreutils \
|
||||
diffutils \
|
||||
findutils \
|
||||
gawk \
|
||||
gettext \
|
||||
git-extras \
|
||||
gmp \
|
||||
gnu-getopt \
|
||||
gnu-sed \
|
||||
gnu-tar \
|
||||
grep \
|
||||
libidn2 \
|
||||
libunistring \
|
||||
m4 \
|
||||
make \
|
||||
mpfr \
|
||||
ncurses \
|
||||
openssl@1.1 \
|
||||
pcre \
|
||||
pkg-config \
|
||||
quilt \
|
||||
readline \
|
||||
wget \
|
||||
zstd
|
||||
|
||||
echo "/bin" >> "$GITHUB_PATH"
|
||||
echo "/sbin/Library/Apple/usr/bin" >> "$GITHUB_PATH"
|
||||
echo "/usr/bin" >> "$GITHUB_PATH"
|
||||
echo "/usr/local/bin" >> "$GITHUB_PATH"
|
||||
echo "/usr/local/opt/coreutils/bin" >> "$GITHUB_PATH"
|
||||
echo "/usr/local/opt/findutils/libexec/gnubin" >> "$GITHUB_PATH"
|
||||
echo "/usr/local/opt/gettext/bin" >> "$GITHUB_PATH"
|
||||
echo "/usr/local/opt/gnu-getopt/bin" >> "$GITHUB_PATH"
|
||||
echo "/usr/local/opt/make/libexec/gnubin" >> "$GITHUB_PATH"
|
||||
echo "/usr/local/opt/make/libexec/gnubin" >> "$GITHUB_PATH"
|
||||
echo "/usr/sbin" >> "$GITHUB_PATH"
|
||||
|
||||
- name: Make prereq
|
||||
working-directory: ${{ env.WORKPATH }}/openwrt
|
||||
run: make defconfig
|
||||
|
||||
- name: Build tools MacOS
|
||||
working-directory: ${{ env.WORKPATH }}/openwrt
|
||||
run: make tools/install -j$(nproc) BUILD_LOG=1 || ret=$? .github/workflows/scripts/show_build_failures.sh
|
||||
|
||||
- name: Upload logs
|
||||
if: always()
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: macos-latest-logs
|
||||
path: ${{ env.WORKPATH }}/openwrt/logs
|
||||
|
||||
- name: Upload config
|
||||
if: always()
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: macos-latest-config
|
||||
path: ${{ env.WORKPATH }}/openwrt/.config
|
||||
|
||||
build-linux-buildbot:
|
||||
runs-on: ubuntu-latest
|
||||
container: registry.gitlab.com/openwrt/buildbot/buildworker-3.4.1
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
path: 'openwrt'
|
||||
|
||||
- name: Fix permission
|
||||
run: |
|
||||
chown -R buildbot:buildbot openwrt
|
||||
|
||||
- name: Set configs for tools container
|
||||
if: github.event_name == 'push'
|
||||
shell: su buildbot -c "sh -e {0}"
|
||||
working-directory: openwrt
|
||||
run: |
|
||||
touch .config
|
||||
echo CONFIG_DEVEL=y >> .config
|
||||
echo CONFIG_AUTOREMOVE=y >> .config
|
||||
echo CONFIG_CCACHE=y >> .config
|
||||
|
||||
- name: Make prereq
|
||||
shell: su buildbot -c "sh -e {0}"
|
||||
working-directory: openwrt
|
||||
run: make defconfig
|
||||
|
||||
- name: Build tools BuildBot Container
|
||||
shell: su buildbot -c "sh -e {0}"
|
||||
working-directory: openwrt
|
||||
run: make tools/install -j$(nproc) BUILD_LOG=1 || ret=$? .github/workflows/scripts/show_build_failures.sh
|
||||
|
||||
- name: Upload logs
|
||||
if: always()
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: linux-buildbot-logs
|
||||
path: openwrt/logs
|
||||
|
||||
- name: Upload config
|
||||
if: always()
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: linux-buildbot-config
|
||||
path: openwrt/.config
|
||||
|
||||
- name: Archive prebuilt tools
|
||||
if: github.event_name == 'push'
|
||||
shell: su buildbot -c "sh -e {0}"
|
||||
working-directory: openwrt
|
||||
run: tar --mtime=now -cf tools.tar staging_dir/host build_dir/host dl
|
||||
|
||||
- name: Upload prebuilt tools
|
||||
if: github.event_name == 'push'
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: linux-buildbot-prebuilt-tools
|
||||
path: openwrt/tools.tar
|
||||
retention-days: 1
|
||||
|
||||
push-tools-container:
|
||||
needs: build-linux-buildbot
|
||||
runs-on: ubuntu-latest
|
||||
if: github.event_name == 'push'
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
packages: write
|
||||
|
||||
steps:
|
||||
- name: Set lower case owner name
|
||||
env:
|
||||
OWNER: ${{ github.repository_owner }}
|
||||
run: |
|
||||
echo "OWNER_LC=${OWNER,,}" >> "$GITHUB_ENV"
|
||||
|
||||
# Per branch tools container tag
|
||||
# By default stick to latest
|
||||
# For official test targetting openwrt stable branch
|
||||
# Get the branch or parse the tag and push dedicated tools containers
|
||||
# Any branch that will match this pattern openwrt-[0-9][0-9].[0-9][0-9]
|
||||
# will refresh the tools container with the matching tag.
|
||||
# (example branch openwrt-22.03 -> tools:openwrt-22.03)
|
||||
# (example branch openwrt-22.03-test -> tools:openwrt-22.03)
|
||||
- name: Determine tools container tag
|
||||
run: |
|
||||
CONTAINER_TAG=latest
|
||||
|
||||
if [ ${{ github.ref_type }} == "branch" ]; then
|
||||
if echo "${{ github.ref_name }}" | grep -q -E 'openwrt-[0-9][0-9]\.[0-9][0-9]'; then
|
||||
CONTAINER_TAG="$(echo ${{ github.ref_name }} | sed 's/^\(openwrt-[0-9][0-9]\.[0-9][0-9]\).*/\1/')"
|
||||
fi
|
||||
elif [ ${{ github.ref_type }} == "tag" ]; then
|
||||
if echo "${{ github.ref_name }}" | grep -q -E 'v[0-9][0-9]\.[0-9][0-9]\..+'; then
|
||||
CONTAINER_TAG=openwrt-"$(echo ${{ github.ref_name }} | sed 's/v\([0-9][0-9]\.[0-9][0-9]\)\..\+/\1/')"
|
||||
fi
|
||||
fi
|
||||
|
||||
echo "Tools container to push tools:$CONTAINER_TAG"
|
||||
echo "CONTAINER_TAG=$CONTAINER_TAG" >> "$GITHUB_ENV"
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
path: 'openwrt'
|
||||
|
||||
- name: Download prebuilt tools from build job
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: linux-buildbot-prebuilt-tools
|
||||
path: openwrt
|
||||
|
||||
- name: Login to GitHub Container Registry
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Build and push
|
||||
uses: docker/build-push-action@v3
|
||||
with:
|
||||
context: openwrt
|
||||
push: true
|
||||
tags: ghcr.io/${{ env.OWNER_LC }}/tools:${{ env.CONTAINER_TAG }}
|
||||
file: openwrt/.github/workflows/Dockerfile.tools
|
||||
@@ -164,7 +164,6 @@ menu "Global build settings"
|
||||
|
||||
choice
|
||||
prompt "Binary stripping method"
|
||||
default USE_STRIP if EXTERNAL_TOOLCHAIN
|
||||
default USE_STRIP if USE_GLIBC
|
||||
default USE_SSTRIP
|
||||
help
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
src-git-full packages https://git.openwrt.org/feed/packages.git^82629531b73b21b63d0d820419c419019ef96830
|
||||
src-git-full luci https://git.openwrt.org/project/luci.git^3923199f8e0e746929a8804c43f9064283b9f785
|
||||
src-git-full routing https://git.openwrt.org/feed/routing.git^25e76489c83cfcee61e36a491896e1e9bfc3ec13
|
||||
src-git-full telephony https://git.openwrt.org/feed/telephony.git^89cc8fccf757614eac1d45a684f4971393e0d984
|
||||
src-git-full packages https://git.openwrt.org/feed/packages.git;openwrt-21.02
|
||||
src-git-full luci https://git.openwrt.org/project/luci.git;openwrt-21.02
|
||||
src-git-full routing https://git.openwrt.org/feed/routing.git;openwrt-21.02
|
||||
src-git-full telephony https://git.openwrt.org/feed/telephony.git;openwrt-21.02
|
||||
#src-link custom /usr/src/openwrt/custom-feed
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
DEP_FINDPARAMS := -x "*/.svn*" -x ".*" -x "*:*" -x "*\!*" -x "* *" -x "*\\\#*" -x "*/.*_check" -x "*/.*.swp" -x "*/.pkgdir*"
|
||||
|
||||
find_md5=find $(wildcard $(1)) -type f $(patsubst -x,-and -not -path,$(DEP_FINDPARAMS) $(2)) -printf "%p%T@\n" | sort | mkhash md5
|
||||
find_md5_reproducible=find $(wildcard $(1)) -type f $(patsubst -x,-and -not -path,$(DEP_FINDPARAMS) $(2)) -print0 | xargs -0 mkhash md5 | sort | mkhash md5
|
||||
|
||||
define rdep
|
||||
.PRECIOUS: $(2)
|
||||
|
||||
@@ -21,7 +21,7 @@ include $(INCLUDE_DIR)/depends.mk
|
||||
include $(INCLUDE_DIR)/quilt.mk
|
||||
|
||||
BUILD_TYPES += host
|
||||
HOST_STAMP_PREPARED=$(HOST_BUILD_DIR)/.prepared$(if $(HOST_QUILT)$(DUMP),,$(shell $(call find_md5,${CURDIR} $(PKG_FILE_DEPENDS),))_$(call confvar,CONFIG_AUTOREMOVE $(HOST_PREPARED_DEPENDS)))
|
||||
HOST_STAMP_PREPARED=$(HOST_BUILD_DIR)/.prepared$(if $(HOST_QUILT)$(DUMP),,$(shell $(call $(if $(CONFIG_AUTOREMOVE),find_md5_reproducible,find_md5),${CURDIR} $(PKG_FILE_DEPENDS),))_$(call confvar,CONFIG_AUTOREMOVE $(HOST_PREPARED_DEPENDS)))
|
||||
HOST_STAMP_CONFIGURED:=$(HOST_BUILD_DIR)/.configured
|
||||
HOST_STAMP_BUILT:=$(HOST_BUILD_DIR)/.built
|
||||
HOST_BUILD_PREFIX?=$(if $(IS_PACKAGE_BUILD),$(STAGING_DIR_HOSTPKG),$(STAGING_DIR_HOST))
|
||||
@@ -197,8 +197,8 @@ ifndef DUMP
|
||||
|
||||
ifneq ($(CONFIG_AUTOREMOVE),)
|
||||
host-compile:
|
||||
$(FIND) $(HOST_BUILD_DIR) -mindepth 1 -maxdepth 1 -not '(' -type f -and -name '.*' -and -size 0 ')' | \
|
||||
$(XARGS) rm -rf
|
||||
$(FIND) $(HOST_BUILD_DIR) -mindepth 1 -maxdepth 1 -not '(' -type f -and -name '.*' -and -size 0 ')' -print0 | \
|
||||
$(XARGS) -0 rm -rf
|
||||
endif
|
||||
endef
|
||||
endif
|
||||
|
||||
2
include/kernel-5.4
Normal file
2
include/kernel-5.4
Normal file
@@ -0,0 +1,2 @@
|
||||
LINUX_VERSION-5.4 = .238
|
||||
LINUX_KERNEL_HASH-5.4.238 = 70a2b2da85598eba6a73cdc0749e441cbdf3011d9babcb7028a46aa8d98aa91f
|
||||
@@ -10,7 +10,7 @@ ifneq ($(DUMP),1)
|
||||
endif
|
||||
|
||||
KERNEL_FILE_DEPENDS=$(GENERIC_BACKPORT_DIR) $(GENERIC_PATCH_DIR) $(GENERIC_HACK_DIR) $(PATCH_DIR) $(GENERIC_FILES_DIR) $(FILES_DIR)
|
||||
STAMP_PREPARED=$(LINUX_DIR)/.prepared$(if $(QUILT)$(DUMP),,_$(shell $(call find_md5,$(KERNEL_FILE_DEPENDS),)))
|
||||
STAMP_PREPARED=$(LINUX_DIR)/.prepared$(if $(QUILT)$(DUMP),,_$(shell $(call $(if $(CONFIG_AUTOREMOVE),find_md5_reproducible,find_md5),$(KERNEL_FILE_DEPENDS),)))
|
||||
STAMP_CONFIGURED:=$(LINUX_DIR)/.configured
|
||||
include $(INCLUDE_DIR)/download.mk
|
||||
include $(INCLUDE_DIR)/quilt.mk
|
||||
|
||||
@@ -6,9 +6,12 @@ ifdef CONFIG_TESTING_KERNEL
|
||||
KERNEL_PATCHVER:=$(KERNEL_TESTING_PATCHVER)
|
||||
endif
|
||||
|
||||
LINUX_VERSION-5.4 = .215
|
||||
KERNEL_DETAILS_FILE=$(INCLUDE_DIR)/kernel-$(KERNEL_PATCHVER)
|
||||
ifeq ($(wildcard $(KERNEL_DETAILS_FILE)),)
|
||||
$(error Missing kernel version/hash file for $(KERNEL_PATCHVER). Please create $(KERNEL_DETAILS_FILE))
|
||||
endif
|
||||
|
||||
LINUX_KERNEL_HASH-5.4.215 = 2d2bf7c3a25297f2b4686aa50a7cdaac68b52fc4c81b2cd3dddfe9f592b34ebd
|
||||
include $(KERNEL_DETAILS_FILE)
|
||||
|
||||
remove_uri_prefix=$(subst git://,,$(subst http://,,$(subst https://,,$(1))))
|
||||
sanitize_uri=$(call qstrip,$(subst @,_,$(subst :,_,$(subst .,_,$(subst -,_,$(subst /,_,$(1)))))))
|
||||
|
||||
@@ -64,9 +64,7 @@ $(eval $(if $(NF_KMOD),,$(call nf_add,IPT_CORE,CONFIG_NETFILTER_XT_MARK, $(P_XT)
|
||||
|
||||
# kernel only
|
||||
$(eval $(if $(NF_KMOD),$(call nf_add,NF_CONNTRACK,CONFIG_NF_CONNTRACK, $(P_XT)nf_conntrack),))
|
||||
$(eval $(if $(NF_KMOD),$(call nf_add,NF_CONNTRACK,CONFIG_NF_CONNTRACK_RTCACHE, $(P_XT)nf_conntrack_rtcache),))
|
||||
$(eval $(if $(NF_KMOD),$(call nf_add,NF_CONNTRACK,CONFIG_NF_DEFRAG_IPV4, $(P_V4)nf_defrag_ipv4),))
|
||||
$(eval $(if $(NF_KMOD),$(call nf_add,NF_CONNTRACK,CONFIG_NF_CONNTRACK_IPV4, $(P_V4)nf_conntrack_ipv4),))
|
||||
|
||||
$(eval $(call nf_add,IPT_CONNTRACK,CONFIG_NETFILTER_XT_MATCH_STATE, $(P_XT)xt_state))
|
||||
$(eval $(call nf_add,IPT_CONNTRACK,CONFIG_NETFILTER_XT_TARGET_CT, $(P_XT)xt_CT))
|
||||
@@ -119,7 +117,6 @@ $(eval $(call nf_add,IPT_IPOPT,CONFIG_NETFILTER_XT_MATCH_STATISTIC, $(P_XT)xt_st
|
||||
$(eval $(call nf_add,IPT_IPOPT,CONFIG_NETFILTER_XT_MATCH_TCPMSS, $(P_XT)xt_tcpmss))
|
||||
|
||||
$(eval $(call nf_add,IPT_IPOPT,CONFIG_NETFILTER_XT_TARGET_CLASSIFY, $(P_XT)xt_CLASSIFY))
|
||||
$(eval $(call nf_add,IPT_IPOPT,CONFIG_IP_NF_MATCH_DSCP, $(P_V4)ipt_dscp))
|
||||
$(eval $(call nf_add,IPT_IPOPT,CONFIG_IP_NF_TARGET_ECN, $(P_V4)ipt_ECN))
|
||||
|
||||
$(eval $(call nf_add,IPT_IPOPT,CONFIG_NETFILTER_XT_MATCH_ECN, $(P_XT)xt_ecn))
|
||||
@@ -155,17 +152,14 @@ $(eval $(if $(NF_KMOD),$(call nf_add,NF_REJECT6,CONFIG_NF_REJECT_IPV6, $(P_V6)nf
|
||||
$(eval $(if $(NF_KMOD),$(call nf_add,NF_IPT6,CONFIG_IP6_NF_IPTABLES, $(P_V6)ip6_tables),))
|
||||
|
||||
$(eval $(if $(NF_KMOD),$(call nf_add,NF_CONNTRACK,CONFIG_NF_DEFRAG_IPV6, $(P_V6)nf_defrag_ipv6),))
|
||||
$(eval $(if $(NF_KMOD),$(call nf_add,NF_CONNTRACK6,CONFIG_NF_CONNTRACK_IPV6, $(P_V6)nf_conntrack_ipv6),))
|
||||
|
||||
$(eval $(if $(NF_KMOD),$(call nf_add,IPT_IPV6,CONFIG_IP6_NF_FILTER, $(P_V6)ip6table_filter),))
|
||||
$(eval $(if $(NF_KMOD),$(call nf_add,IPT_IPV6,CONFIG_IP6_NF_MANGLE, $(P_V6)ip6table_mangle),))
|
||||
$(eval $(if $(NF_KMOD),$(call nf_add,IPT_IPV6,CONFIG_IP6_NF_QUEUE, $(P_V6)ip6_queue),))
|
||||
$(eval $(if $(NF_KMOD),$(call nf_add,IPT_IPV6,CONFIG_NF_LOG_IPV6, $(P_V6)nf_log_ipv6),))
|
||||
|
||||
$(eval $(if $(NF_KMOD),,$(call nf_add,IPT_IPV6,CONFIG_IP6_NF_IPTABLES, ip6t_icmp6)))
|
||||
|
||||
|
||||
$(eval $(call nf_add,IPT_IPV6,CONFIG_IP6_NF_TARGET_LOG, $(P_V6)ip6t_LOG))
|
||||
$(eval $(call nf_add,IPT_IPV6,CONFIG_IP6_NF_TARGET_REJECT, $(P_V6)ip6t_REJECT))
|
||||
|
||||
# ipv6 extra
|
||||
@@ -225,11 +219,6 @@ $(eval $(call nf_add,NF_NATHELPER_EXTRA,CONFIG_NF_CONNTRACK_IRC, $(P_XT)nf_connt
|
||||
$(eval $(call nf_add,NF_NATHELPER_EXTRA,CONFIG_NF_NAT_IRC, $(P_XT)nf_nat_irc))
|
||||
|
||||
|
||||
# ulog
|
||||
|
||||
$(eval $(call nf_add,IPT_ULOG,CONFIG_IP_NF_TARGET_ULOG, $(P_V4)ipt_ULOG))
|
||||
|
||||
|
||||
# nflog
|
||||
|
||||
$(eval $(call nf_add,IPT_NFLOG,CONFIG_NETFILTER_XT_TARGET_NFLOG, $(P_XT)xt_NFLOG))
|
||||
@@ -315,7 +304,6 @@ $(eval $(call nf_add,EBTABLES_IP4,CONFIG_BRIDGE_EBT_SNAT, $(P_EBT)ebt_snat))
|
||||
|
||||
# watchers
|
||||
$(eval $(call nf_add,EBTABLES_WATCHERS,CONFIG_BRIDGE_EBT_LOG, $(P_EBT)ebt_log))
|
||||
$(eval $(call nf_add,EBTABLES_WATCHERS,CONFIG_BRIDGE_EBT_ULOG, $(P_EBT)ebt_ulog))
|
||||
$(eval $(call nf_add,EBTABLES_WATCHERS,CONFIG_BRIDGE_EBT_NFLOG, $(P_EBT)ebt_nflog))
|
||||
$(eval $(call nf_add,EBTABLES_WATCHERS,CONFIG_BRIDGE_EBT_NFQUEUE, $(P_EBT)ebt_nfqueue))
|
||||
|
||||
@@ -378,7 +366,6 @@ IPT_BUILTIN += $(IPT_NAT6-y)
|
||||
IPT_BUILTIN += $(IPT_NAT_EXTRA-y)
|
||||
IPT_BUILTIN += $(NF_NATHELPER-y)
|
||||
IPT_BUILTIN += $(NF_NATHELPER_EXTRA-y)
|
||||
IPT_BUILTIN += $(IPT_ULOG-y)
|
||||
IPT_BUILTIN += $(IPT_TPROXY-y)
|
||||
IPT_BUILTIN += $(NFNETLINK-y)
|
||||
IPT_BUILTIN += $(NFNETLINK_LOG-y)
|
||||
|
||||
@@ -84,7 +84,7 @@ ifneq ($(PREV_STAMP_PREPARED),)
|
||||
STAMP_PREPARED:=$(PREV_STAMP_PREPARED)
|
||||
CONFIG_AUTOREBUILD:=
|
||||
else
|
||||
STAMP_PREPARED=$(PKG_BUILD_DIR)/.prepared$(if $(QUILT)$(DUMP),,_$(shell $(call find_md5,${CURDIR} $(PKG_FILE_DEPENDS),))_$(call confvar,CONFIG_AUTOREMOVE $(PKG_PREPARED_DEPENDS)))
|
||||
STAMP_PREPARED=$(PKG_BUILD_DIR)/.prepared$(if $(QUILT)$(DUMP),,_$(shell $(call $(if $(CONFIG_AUTOREMOVE),find_md5_reproducible,find_md5),${CURDIR} $(PKG_FILE_DEPENDS),))_$(call confvar,CONFIG_AUTOREMOVE $(PKG_PREPARED_DEPENDS)))
|
||||
endif
|
||||
STAMP_CONFIGURED=$(PKG_BUILD_DIR)/.configured$(if $(DUMP),,_$(call confvar,$(PKG_CONFIG_DEPENDS)))
|
||||
STAMP_CONFIGURED_WILDCARD=$(PKG_BUILD_DIR)/.configured_*
|
||||
@@ -258,8 +258,8 @@ define Build/CoreTargets
|
||||
ifneq ($(CONFIG_AUTOREMOVE),)
|
||||
compile:
|
||||
-touch -r $(PKG_BUILD_DIR)/.built $(PKG_BUILD_DIR)/.autoremove 2>/dev/null >/dev/null
|
||||
$(FIND) $(PKG_BUILD_DIR) -mindepth 1 -maxdepth 1 -not '(' -type f -and -name '.*' -and -size 0 ')' -and -not -name '.pkgdir' | \
|
||||
$(XARGS) rm -rf
|
||||
$(FIND) $(PKG_BUILD_DIR) -mindepth 1 -maxdepth 1 -not '(' -type f -and -name '.*' -and -size 0 ')' -and -not -name '.pkgdir' -print0 | \
|
||||
$(XARGS) -0 rm -rf
|
||||
endif
|
||||
endef
|
||||
|
||||
|
||||
@@ -23,13 +23,13 @@ PKG_CONFIG_DEPENDS += \
|
||||
sanitize = $(call tolower,$(subst _,-,$(subst $(space),-,$(1))))
|
||||
|
||||
VERSION_NUMBER:=$(call qstrip,$(CONFIG_VERSION_NUMBER))
|
||||
VERSION_NUMBER:=$(if $(VERSION_NUMBER),$(VERSION_NUMBER),21.02.4)
|
||||
VERSION_NUMBER:=$(if $(VERSION_NUMBER),$(VERSION_NUMBER),21.02-SNAPSHOT)
|
||||
|
||||
VERSION_CODE:=$(call qstrip,$(CONFIG_VERSION_CODE))
|
||||
VERSION_CODE:=$(if $(VERSION_CODE),$(VERSION_CODE),r16685-82ebc173b3)
|
||||
VERSION_CODE:=$(if $(VERSION_CODE),$(VERSION_CODE),$(REVISION))
|
||||
|
||||
VERSION_REPO:=$(call qstrip,$(CONFIG_VERSION_REPO))
|
||||
VERSION_REPO:=$(if $(VERSION_REPO),$(VERSION_REPO),https://downloads.openwrt.org/releases/21.02.4)
|
||||
VERSION_REPO:=$(if $(VERSION_REPO),$(VERSION_REPO),https://downloads.openwrt.org/releases/21.02-SNAPSHOT)
|
||||
|
||||
VERSION_DIST:=$(call qstrip,$(CONFIG_VERSION_DIST))
|
||||
VERSION_DIST:=$(if $(VERSION_DIST),$(VERSION_DIST),OpenWrt)
|
||||
|
||||
@@ -92,6 +92,10 @@ $(curdir)/index: FORCE
|
||||
$(call ERROR_MESSAGE,WARNING: Applying padding in $$d/Packages to workaround usign SHA-512 bug!); \
|
||||
{ echo ""; echo ""; } >> Packages;; \
|
||||
esac; \
|
||||
echo -n '{"architecture": "$(ARCH_PACKAGES)", "packages":{' > index.json; \
|
||||
sed -n -e 's/^Package: \(.*\)$$/"\1":/p' -e 's/^Version: \(.*\)$$/"\1",/p' Packages | tr '\n' ' ' >> index.json; \
|
||||
echo '}}' >> index.json; \
|
||||
sed -i 's/, }}/}}/' index.json; \
|
||||
gzip -9nc Packages > Packages.gz; \
|
||||
); done
|
||||
ifdef CONFIG_SIGNED_PACKAGES
|
||||
|
||||
@@ -96,7 +96,7 @@ generate_network() {
|
||||
|
||||
json_select network
|
||||
json_select "$1"
|
||||
json_get_vars device macaddr protocol ipaddr netmask vlan
|
||||
json_get_vars device macaddr metric protocol ipaddr netmask vlan
|
||||
json_get_values ports ports
|
||||
json_select ..
|
||||
json_select ..
|
||||
@@ -154,6 +154,7 @@ generate_network() {
|
||||
set network.$1='interface'
|
||||
set network.$1.type='$type'
|
||||
set network.$1.device='$device'
|
||||
set network.$1.metric='$metric'
|
||||
set network.$1.proto='none'
|
||||
EOF
|
||||
|
||||
|
||||
@@ -183,7 +183,7 @@ if VERSIONOPT
|
||||
config VERSION_REPO
|
||||
string
|
||||
prompt "Release repository"
|
||||
default "https://downloads.openwrt.org/releases/21.02.4"
|
||||
default "https://downloads.openwrt.org/releases/21.02-SNAPSHOT"
|
||||
help
|
||||
This is the repository address embedded in the image, it defaults
|
||||
to the trunk snapshot repo; the url may contain the following placeholders:
|
||||
@@ -259,7 +259,7 @@ if VERSIONOPT
|
||||
config VERSION_CODE_FILENAMES
|
||||
bool
|
||||
prompt "Revision code in filenames"
|
||||
default n
|
||||
default y
|
||||
help
|
||||
Enable this to include the revision identifier or the configured
|
||||
version code into the firmware image, SDK- and Image Builder archive
|
||||
|
||||
@@ -10,6 +10,7 @@ include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=at91bootstrap
|
||||
PKG_VERSION:=v3.9.3
|
||||
PKG_CPE_ID:=cpe:/a:linux4sam:at91bootstrap
|
||||
PKG_RELEASE:=2
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
|
||||
@@ -2,7 +2,7 @@ fdtaddr=0x8f000000
|
||||
loadaddr=0x81000000
|
||||
fdt_high=0x8fffffff
|
||||
initrd_high=0xffffffff
|
||||
sd_boot=ext4load mmc 0:1 $loadaddr fitImage;bootm $loadaddr
|
||||
sd_boot=ext4load mmc 0:1 ${loadaddr} fitImage;bootm ${loadaddr}
|
||||
bootargs=root=/dev/mmcblk0p2 rw rootwait rootfstype=squashfs,f2fs noinitrd earlycon=uart8250,mmio,0x21c0500 console=ttyS0,115200
|
||||
bootcmd=echo starting openwrt ...;run sd_boot
|
||||
bootdelay=3
|
||||
|
||||
@@ -0,0 +1,45 @@
|
||||
From b382eeafe01df21da3518b2f1dd7d22ee114efb0 Mon Sep 17 00:00:00 2001
|
||||
From: Pawel Dembicki <paweldembicki@gmail.com>
|
||||
Date: Mon, 24 Oct 2022 14:19:38 +0200
|
||||
Subject: [PATCH] layerscape: adjust LS1021A-IOT config for OpenWrt
|
||||
|
||||
Two configs are required:
|
||||
- FIT
|
||||
- Ext4load
|
||||
|
||||
Let's enable it. U-boot is now bigger than 512K. Let's enlarge it to
|
||||
768K. Envs start at 1M, so it will fit.
|
||||
|
||||
Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
|
||||
---
|
||||
configs/ls1021aiot_sdcard_defconfig | 3 +++
|
||||
include/configs/ls1021aiot.h | 4 ++--
|
||||
2 files changed, 5 insertions(+), 2 deletions(-)
|
||||
|
||||
--- a/configs/ls1021aiot_sdcard_defconfig
|
||||
+++ b/configs/ls1021aiot_sdcard_defconfig
|
||||
@@ -27,8 +27,11 @@ CONFIG_CMD_MII=y
|
||||
# CONFIG_CMD_MDIO is not set
|
||||
CONFIG_CMD_PING=y
|
||||
CONFIG_CMD_EXT2=y
|
||||
+CONFIG_CMD_EXT4=y
|
||||
CONFIG_CMD_FAT=y
|
||||
# CONFIG_SPL_EFI_PARTITION is not set
|
||||
+CONFIG_FIT=y
|
||||
+CONFIG_FIT_VERBOSE=y
|
||||
CONFIG_OF_CONTROL=y
|
||||
CONFIG_ENV_OVERWRITE=y
|
||||
CONFIG_ENV_IS_IN_MMC=y
|
||||
--- a/include/configs/ls1021aiot.h
|
||||
+++ b/include/configs/ls1021aiot.h
|
||||
@@ -78,8 +78,8 @@
|
||||
CONFIG_SYS_MONITOR_LEN)
|
||||
#define CONFIG_SYS_SPL_MALLOC_SIZE 0x100000
|
||||
#define CONFIG_SPL_BSS_START_ADDR 0x80100000
|
||||
-#define CONFIG_SPL_BSS_MAX_SIZE 0x80000
|
||||
-#define CONFIG_SYS_MONITOR_LEN 0x80000
|
||||
+#define CONFIG_SPL_BSS_MAX_SIZE 0xc0000
|
||||
+#define CONFIG_SYS_MONITOR_LEN 0xc0000
|
||||
#endif
|
||||
|
||||
#define CONFIG_SYS_DDR_SDRAM_BASE 0x80000000UL
|
||||
@@ -15,6 +15,7 @@ PKG_SOURCE:=intel-microcode_3.$(PKG_VERSION).1.tar.xz
|
||||
PKG_SOURCE_URL:=http://ftp.debian.org/debian/pool/non-free/i/intel-microcode/
|
||||
PKG_HASH:=4cf6c3638bb52d9d45c1916af866fd0929628a6f459daac3edfd369149e9c665
|
||||
PKG_BUILD_DIR:=$(BUILD_DIR)/intel-microcode-3.$(PKG_VERSION).1
|
||||
PKG_CPE_ID:=cpe:/a:intel:microcode
|
||||
|
||||
PKG_BUILD_DEPENDS:=iucode-tool/host
|
||||
|
||||
|
||||
@@ -41,6 +41,7 @@
|
||||
#include <linux/atm.h>
|
||||
#include <linux/clk.h>
|
||||
#include <linux/interrupt.h>
|
||||
#include <linux/version.h>
|
||||
#ifdef CONFIG_XFRM
|
||||
#include <net/xfrm.h>
|
||||
#endif
|
||||
@@ -199,7 +200,12 @@ static inline void mailbox_aal_rx_handler(void);
|
||||
static irqreturn_t mailbox_irq_handler(int, void *);
|
||||
static inline void mailbox_signal(unsigned int, int);
|
||||
static void do_ppe_tasklet(unsigned long);
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(5,9,0) && \
|
||||
!(LINUX_VERSION_CODE < KERNEL_VERSION(5,5,0) && LINUX_VERSION_CODE > KERNEL_VERSION(5,4,235))
|
||||
DECLARE_TASKLET(g_dma_tasklet, do_ppe_tasklet, 0);
|
||||
#else
|
||||
DECLARE_TASKLET_OLD(g_dma_tasklet, do_ppe_tasklet);
|
||||
#endif
|
||||
|
||||
/*
|
||||
* QSB & HTU setting functions
|
||||
|
||||
@@ -127,7 +127,11 @@ static int ptm_stop(struct net_device *);
|
||||
static int ptm_napi_poll(struct napi_struct *, int);
|
||||
static int ptm_hard_start_xmit(struct sk_buff *, struct net_device *);
|
||||
static int ptm_ioctl(struct net_device *, struct ifreq *, int);
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(5,6,0)
|
||||
static void ptm_tx_timeout(struct net_device *);
|
||||
#else
|
||||
static void ptm_tx_timeout(struct net_device *, unsigned int txqueue);
|
||||
#endif
|
||||
|
||||
/*
|
||||
* DSL Data LED
|
||||
@@ -511,7 +515,11 @@ static int ptm_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
|
||||
return 0;
|
||||
}
|
||||
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(5,6,0)
|
||||
static void ptm_tx_timeout(struct net_device *dev)
|
||||
#else
|
||||
static void ptm_tx_timeout(struct net_device *dev, unsigned int txqueue)
|
||||
#endif
|
||||
{
|
||||
int ndev;
|
||||
|
||||
|
||||
@@ -77,7 +77,11 @@ static int ptm_stop(struct net_device *);
|
||||
static int ptm_napi_poll(struct napi_struct *, int);
|
||||
static int ptm_hard_start_xmit(struct sk_buff *, struct net_device *);
|
||||
static int ptm_ioctl(struct net_device *, struct ifreq *, int);
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(5,6,0)
|
||||
static void ptm_tx_timeout(struct net_device *);
|
||||
#else
|
||||
static void ptm_tx_timeout(struct net_device *, unsigned int txqueue);
|
||||
#endif
|
||||
|
||||
static inline struct sk_buff* alloc_skb_rx(void);
|
||||
static inline struct sk_buff* alloc_skb_tx(unsigned int);
|
||||
@@ -125,7 +129,12 @@ static char *g_net_dev_name[1] = {"dsl0"};
|
||||
|
||||
static int g_ptm_prio_queue_map[8];
|
||||
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(5,9,0) && \
|
||||
!(LINUX_VERSION_CODE < KERNEL_VERSION(5,5,0) && LINUX_VERSION_CODE > KERNEL_VERSION(5,4,235))
|
||||
static DECLARE_TASKLET(g_swap_desc_tasklet, do_swap_desc_tasklet, 0);
|
||||
#else
|
||||
static DECLARE_TASKLET_OLD(g_swap_desc_tasklet, do_swap_desc_tasklet);
|
||||
#endif
|
||||
|
||||
|
||||
unsigned int ifx_ptm_dbg_enable = DBG_ENABLE_MASK_ERR;
|
||||
@@ -451,7 +460,11 @@ static int ptm_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
|
||||
return 0;
|
||||
}
|
||||
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(5,6,0)
|
||||
static void ptm_tx_timeout(struct net_device *dev)
|
||||
#else
|
||||
static void ptm_tx_timeout(struct net_device *dev, unsigned int txqueue)
|
||||
#endif
|
||||
{
|
||||
ASSERT(dev == g_net_dev[0], "incorrect device");
|
||||
|
||||
|
||||
51
package/kernel/lantiq/ltq-tapi/patches/500-linux-509.patch
Normal file
51
package/kernel/lantiq/ltq-tapi/patches/500-linux-509.patch
Normal file
@@ -0,0 +1,51 @@
|
||||
--- a/src/drv_tapi_linux.c
|
||||
+++ b/src/drv_tapi_linux.c
|
||||
@@ -3287,10 +3287,13 @@ static IFX_void_t proc_EntriesRemove(IFX
|
||||
*/
|
||||
static IFX_void_t tapi_wq_setscheduler (IFX_int32_t foo)
|
||||
{
|
||||
+#if LINUX_VERSION_CODE < KERNEL_VERSION(5,9,0)
|
||||
struct sched_param sched_params;
|
||||
-
|
||||
sched_params.sched_priority = TAPI_OS_THREAD_PRIO_HIGH;
|
||||
sched_setscheduler(current, SCHED_FIFO, &sched_params);
|
||||
+#else
|
||||
+ sched_set_fifo_low(current);
|
||||
+#endif
|
||||
}
|
||||
#endif /* LINUX_2_6 */
|
||||
|
||||
@@ -3727,6 +3730,7 @@ static IFX_int32_t TAPI_SelectCh (TAPI_F
|
||||
*/
|
||||
IFX_int32_t TAPI_OS_ThreadPriorityModify(IFX_uint32_t newPriority)
|
||||
{
|
||||
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(5,9,0))
|
||||
struct sched_param sched_params;
|
||||
IFX_int32_t ret;
|
||||
|
||||
@@ -3744,6 +3748,10 @@ IFX_int32_t TAPI_OS_ThreadPriorityModify
|
||||
}
|
||||
|
||||
return (ret < 0) ? IFX_ERROR : IFX_SUCCESS;
|
||||
+#else
|
||||
+ sched_set_fifo_low(current);
|
||||
+ return IFX_SUCCESS;
|
||||
+#endif
|
||||
}
|
||||
|
||||
|
||||
--- a/src/drv_tapi_kpi.c
|
||||
+++ b/src/drv_tapi_kpi.c
|
||||
@@ -134,7 +134,12 @@ extern IFX_int32_t block_ingre
|
||||
/* ========================================================================== */
|
||||
static IFX_void_t ifx_tapi_KPI_IngressHandler (IFX_ulong_t foo);
|
||||
#ifdef KPI_TASKLET
|
||||
+#if LINUX_VERSION_CODE < KERNEL_VERSION(5,9,0) && \
|
||||
+ !(LINUX_VERSION_CODE < KERNEL_VERSION(5,5,0) && LINUX_VERSION_CODE > KERNEL_VERSION(5,4,235))
|
||||
DECLARE_TASKLET(tl_kpi_ingress, ifx_tapi_KPI_IngressHandler, 0L);
|
||||
+#else
|
||||
+DECLARE_TASKLET_OLD(tl_kpi_ingress, ifx_tapi_KPI_IngressHandler);
|
||||
+#endif
|
||||
#endif /* KPI_TASKLET */
|
||||
static IFX_int32_t ifx_tapi_KPI_IngressThread (IFXOS_ThreadParams_t *pThread);
|
||||
static IFX_return_t ifx_tapi_KPI_GroupInit(IFX_uint32_t nKpiGroup);
|
||||
@@ -508,6 +508,29 @@ endef
|
||||
$(eval $(call KernelPackage,nbd))
|
||||
|
||||
|
||||
define KernelPackage/nvme
|
||||
SUBMENU:=$(BLOCK_MENU)
|
||||
TITLE:=NVM Express block device
|
||||
DEPENDS:=@PCI_SUPPORT
|
||||
KCONFIG:= \
|
||||
CONFIG_NVME_CORE \
|
||||
CONFIG_BLK_DEV_NVME \
|
||||
CONFIG_NVME_MULTIPATH=n \
|
||||
CONFIG_NVME_HWMON=n
|
||||
FILES:= \
|
||||
$(LINUX_DIR)/drivers/nvme/host/nvme-core.ko \
|
||||
$(LINUX_DIR)/drivers/nvme/host/nvme.ko
|
||||
AUTOLOAD:=$(call AutoLoad,30,nvme-core nvme)
|
||||
endef
|
||||
|
||||
define KernelPackage/nvme/description
|
||||
Kernel module for NVM Express solid state drives directly
|
||||
connected to the PCI or PCI Express bus.
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,nvme))
|
||||
|
||||
|
||||
define KernelPackage/scsi-core
|
||||
SUBMENU:=$(BLOCK_MENU)
|
||||
TITLE:=SCSI device support
|
||||
|
||||
@@ -601,7 +601,8 @@ define KernelPackage/crypto-md5
|
||||
DEPENDS:=+kmod-crypto-hash
|
||||
KCONFIG:= \
|
||||
CONFIG_CRYPTO_MD5 \
|
||||
CONFIG_CRYPTO_MD5_OCTEON
|
||||
CONFIG_CRYPTO_MD5_OCTEON \
|
||||
CONFIG_CRYPTO_MD5_PPC
|
||||
FILES:=$(LINUX_DIR)/crypto/md5.ko
|
||||
AUTOLOAD:=$(call AutoLoad,09,md5)
|
||||
$(call AddDepends/crypto)
|
||||
@@ -612,6 +613,11 @@ define KernelPackage/crypto-md5/octeon
|
||||
AUTOLOAD+=$(call AutoLoad,09,octeon-md5)
|
||||
endef
|
||||
|
||||
define KernelPackage/crypto-md5/mpc85xx
|
||||
FILES+=$(LINUX_DIR)/arch/powerpc/crypto/md5-ppc.ko
|
||||
AUTOLOAD+=$(call AutoLoad,09,md5-ppc)
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,crypto-md5))
|
||||
|
||||
|
||||
@@ -823,6 +829,7 @@ define KernelPackage/crypto-sha1
|
||||
CONFIG_CRYPTO_SHA1_ARM \
|
||||
CONFIG_CRYPTO_SHA1_ARM_NEON \
|
||||
CONFIG_CRYPTO_SHA1_OCTEON \
|
||||
CONFIG_CRYPTO_SHA1_PPC_SPE \
|
||||
CONFIG_CRYPTO_SHA1_SSSE3
|
||||
FILES:=$(LINUX_DIR)/crypto/sha1_generic.ko
|
||||
AUTOLOAD:=$(call AutoLoad,09,sha1_generic)
|
||||
@@ -849,7 +856,12 @@ define KernelPackage/crypto-sha1/octeon
|
||||
AUTOLOAD+=$(call AutoLoad,09,octeon-sha1)
|
||||
endef
|
||||
|
||||
KernelPackage/crypto-sha1/tegra=$(KernelPakcage/crypto-sha1/arm)
|
||||
KernelPackage/crypto-sha1/tegra=$(KernelPackage/crypto-sha1/arm)
|
||||
|
||||
define KernelPackage/crypto-sha1/mpc85xx
|
||||
FILES+=$(LINUX_DIR)/arch/powerpc/crypto/sha1-ppc-spe.ko
|
||||
AUTOLOAD+=$(call AutoLoad,09,sha1-ppc-spe)
|
||||
endef
|
||||
|
||||
define KernelPackage/crypto-sha1/x86/64
|
||||
FILES+=$(LINUX_DIR)/arch/x86/crypto/sha1-ssse3.ko
|
||||
@@ -865,6 +877,7 @@ define KernelPackage/crypto-sha256
|
||||
KCONFIG:= \
|
||||
CONFIG_CRYPTO_SHA256 \
|
||||
CONFIG_CRYPTO_SHA256_OCTEON \
|
||||
CONFIG_CRYPTO_SHA256_PPC_SPE \
|
||||
CONFIG_CRYPTO_SHA256_SSSE3
|
||||
FILES:= \
|
||||
$(LINUX_DIR)/crypto/sha256_generic.ko \
|
||||
@@ -878,6 +891,11 @@ define KernelPackage/crypto-sha256/octeon
|
||||
AUTOLOAD+=$(call AutoLoad,09,octeon-sha256)
|
||||
endef
|
||||
|
||||
define KernelPackage/crypto-sha256/mpc85xx
|
||||
FILES+=$(LINUX_DIR)/arch/powerpc/crypto/sha256-ppc-spe.ko
|
||||
AUTOLOAD+=$(call AutoLoad,09,sha256-ppc-spe)
|
||||
endef
|
||||
|
||||
define KernelPackage/crypto-sha256/x86/64
|
||||
FILES+=$(LINUX_DIR)/arch/x86/crypto/sha256-ssse3.ko
|
||||
AUTOLOAD+=$(call AutoLoad,09,sha256-ssse3)
|
||||
|
||||
@@ -462,7 +462,7 @@ $(eval $(call KernelPackage,fs-nfsd))
|
||||
|
||||
define KernelPackage/fs-ntfs
|
||||
SUBMENU:=$(FS_MENU)
|
||||
TITLE:=NTFS filesystem support
|
||||
TITLE:=NTFS filesystem read-only (old driver) support
|
||||
KCONFIG:=CONFIG_NTFS_FS
|
||||
FILES:=$(LINUX_DIR)/fs/ntfs/ntfs.ko
|
||||
AUTOLOAD:=$(call AutoLoad,30,ntfs)
|
||||
@@ -470,7 +470,8 @@ define KernelPackage/fs-ntfs
|
||||
endef
|
||||
|
||||
define KernelPackage/fs-ntfs/description
|
||||
Kernel module for NTFS filesystem support
|
||||
Kernel module for limited NTFS filesystem support. Support for writing
|
||||
is extremely limited and disabled as a result.
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,fs-ntfs))
|
||||
|
||||
@@ -563,23 +563,6 @@ endef
|
||||
$(eval $(call KernelPackage,nf-nathelper-extra))
|
||||
|
||||
|
||||
define KernelPackage/ipt-ulog
|
||||
TITLE:=Module for user-space packet logging
|
||||
KCONFIG:=$(KCONFIG_IPT_ULOG)
|
||||
FILES:=$(foreach mod,$(IPT_ULOG-m),$(LINUX_DIR)/net/$(mod).ko)
|
||||
AUTOLOAD:=$(call AutoProbe,$(notdir $(IPT_ULOG-m)))
|
||||
$(call AddDepends/ipt)
|
||||
endef
|
||||
|
||||
define KernelPackage/ipt-ulog/description
|
||||
Netfilter (IPv4) module for user-space packet logging
|
||||
Includes:
|
||||
- ULOG
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,ipt-ulog))
|
||||
|
||||
|
||||
define KernelPackage/ipt-nflog
|
||||
TITLE:=Module for user-space packet logging
|
||||
KCONFIG:=$(KCONFIG_IPT_NFLOG)
|
||||
|
||||
@@ -162,38 +162,6 @@ endef
|
||||
$(eval $(call KernelPackage,misdn))
|
||||
|
||||
|
||||
define KernelPackage/isdn4linux
|
||||
SUBMENU:=$(NETWORK_SUPPORT_MENU)
|
||||
TITLE:=Old ISDN4Linux (deprecated)
|
||||
DEPENDS:=+kmod-ppp
|
||||
KCONFIG:= \
|
||||
CONFIG_ISDN=y \
|
||||
CONFIG_ISDN_I4L \
|
||||
CONFIG_ISDN_PPP=y \
|
||||
CONFIG_ISDN_PPP_VJ=y \
|
||||
CONFIG_ISDN_MPP=y \
|
||||
CONFIG_IPPP_FILTER=y \
|
||||
CONFIG_ISDN_PPP_BSDCOMP \
|
||||
CONFIG_ISDN_CAPI_MIDDLEWARE=y \
|
||||
CONFIG_ISDN_CAPI_CAPIFS_BOOL=y \
|
||||
CONFIG_ISDN_AUDIO=y \
|
||||
CONFIG_ISDN_TTY_FAX=y \
|
||||
CONFIG_ISDN_X25=y \
|
||||
CONFIG_ISDN_DIVERSION
|
||||
FILES:= \
|
||||
$(LINUX_DIR)/drivers/isdn/divert/dss1_divert.ko \
|
||||
$(LINUX_DIR)/drivers/isdn/i4l/isdn.ko \
|
||||
$(LINUX_DIR)/drivers/isdn/i4l/isdn_bsdcomp.ko
|
||||
AUTOLOAD:=$(call AutoLoad,40,isdn isdn_bsdcomp dss1_divert)
|
||||
endef
|
||||
|
||||
define KernelPackage/isdn4linux/description
|
||||
This driver allows you to use an ISDN adapter for networking
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,isdn4linux))
|
||||
|
||||
|
||||
define KernelPackage/ipip
|
||||
SUBMENU:=$(NETWORK_SUPPORT_MENU)
|
||||
TITLE:=IP-in-IP encapsulation
|
||||
@@ -721,7 +689,7 @@ $(eval $(call KernelPackage,mppe))
|
||||
|
||||
|
||||
SCHED_MODULES = $(patsubst $(LINUX_DIR)/net/sched/%.ko,%,$(wildcard $(LINUX_DIR)/net/sched/*.ko))
|
||||
SCHED_MODULES_CORE = sch_ingress sch_fq_codel sch_hfsc sch_htb sch_tbf cls_basic cls_fw cls_route cls_flow cls_tcindex cls_u32 em_u32 act_gact act_mirred act_skbedit cls_matchall
|
||||
SCHED_MODULES_CORE = sch_ingress sch_fq_codel sch_hfsc sch_htb sch_tbf cls_basic cls_fw cls_route cls_flow cls_u32 em_u32 act_gact act_mirred act_skbedit cls_matchall
|
||||
SCHED_MODULES_FILTER = $(SCHED_MODULES_CORE) act_connmark act_ctinfo sch_cake sch_netem sch_mqprio em_ipset cls_bpf cls_flower act_bpf act_vlan
|
||||
SCHED_MODULES_EXTRA = $(filter-out $(SCHED_MODULES_FILTER),$(SCHED_MODULES))
|
||||
SCHED_FILES = $(patsubst %,$(LINUX_DIR)/net/sched/%.ko,$(filter $(SCHED_MODULES_CORE),$(SCHED_MODULES)))
|
||||
@@ -743,7 +711,6 @@ define KernelPackage/sched-core
|
||||
CONFIG_NET_CLS_FLOW \
|
||||
CONFIG_NET_CLS_FW \
|
||||
CONFIG_NET_CLS_ROUTE4 \
|
||||
CONFIG_NET_CLS_TCINDEX \
|
||||
CONFIG_NET_CLS_U32 \
|
||||
CONFIG_NET_ACT_GACT \
|
||||
CONFIG_NET_ACT_MIRRED \
|
||||
|
||||
@@ -665,22 +665,6 @@ endef
|
||||
|
||||
$(eval $(call KernelPackage,rtc-pcf2127))
|
||||
|
||||
define KernelPackage/rtc-pt7c4338
|
||||
SUBMENU:=$(OTHER_MENU)
|
||||
TITLE:=Pericom PT7C4338 RTC support
|
||||
DEFAULT:=m if ALL_KMODS && RTC_SUPPORT
|
||||
DEPENDS:=+kmod-i2c-core
|
||||
KCONFIG:=CONFIG_RTC_DRV_PT7C4338 \
|
||||
CONFIG_RTC_CLASS=y
|
||||
FILES:=$(LINUX_DIR)/drivers/rtc/rtc-pt7c4338.ko
|
||||
AUTOLOAD:=$(call AutoProbe,rtc-pt7c4338)
|
||||
endef
|
||||
|
||||
define KernelPackage/rtc-pt7c4338/description
|
||||
Kernel module for Pericom PT7C4338 i2c RTC chip
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,rtc-pt7c4338))
|
||||
|
||||
define KernelPackage/rtc-rs5c372a
|
||||
SUBMENU:=$(OTHER_MENU)
|
||||
|
||||
@@ -160,23 +160,6 @@ endef
|
||||
$(eval $(call KernelPackage,w1-slave-ds2433))
|
||||
|
||||
|
||||
define KernelPackage/w1-slave-ds2760
|
||||
TITLE:=Dallas 2760 battery monitor chip (HP iPAQ & others)
|
||||
KCONFIG:= \
|
||||
CONFIG_W1_SLAVE_DS2760 \
|
||||
CONFIG_W1_SLAVE_DS2433_CRC=n
|
||||
FILES:=$(W1_SLAVES_DIR)/w1_ds2760.ko
|
||||
AUTOLOAD:=$(call AutoProbe,w1_ds2760)
|
||||
$(call AddDepends/w1)
|
||||
endef
|
||||
|
||||
define KernelPackage/w1-slave-ds2760/description
|
||||
Kernel module for 1-wire DS2760 battery monitor chip support
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,w1-slave-ds2760))
|
||||
|
||||
|
||||
define KernelPackage/w1-slave-ds2413
|
||||
TITLE:=DS2413 2 Ch. Addressable Switch
|
||||
KCONFIG:= \
|
||||
|
||||
@@ -10,10 +10,10 @@ include $(INCLUDE_DIR)/kernel.mk
|
||||
|
||||
PKG_NAME:=mac80211
|
||||
|
||||
PKG_VERSION:=5.10.110-1
|
||||
PKG_VERSION:=5.10.168-1
|
||||
PKG_RELEASE:=1
|
||||
PKG_SOURCE_URL:=@KERNEL/linux/kernel/projects/backports/stable/v5.10.110/
|
||||
PKG_HASH:=3d958154080c059adaf26512430fd1a8888d65a2228e5e70e48d028201e148b1
|
||||
PKG_SOURCE_URL:=@KERNEL/linux/kernel/projects/backports/stable/v5.10.168/
|
||||
PKG_HASH:=ba43215e99b367febaad507c94423b156c7af9a415d978fbc630e9e8d6641d73
|
||||
|
||||
PKG_SOURCE:=backports-$(PKG_VERSION).tar.xz
|
||||
PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/backports-$(PKG_VERSION)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/wireless/reg.c
|
||||
+++ b/net/wireless/reg.c
|
||||
@@ -3252,6 +3252,8 @@ void regulatory_hint_country_ie(struct w
|
||||
@@ -3263,6 +3263,8 @@ void regulatory_hint_country_ie(struct w
|
||||
enum environment_cap env = ENVIRON_ANY;
|
||||
struct regulatory_request *request = NULL, *lr;
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
/* IE len must be evenly divisible by 2 */
|
||||
if (country_ie_len & 0x01)
|
||||
return;
|
||||
@@ -3503,6 +3505,7 @@ static bool is_wiphy_all_set_reg_flag(en
|
||||
@@ -3514,6 +3516,7 @@ static bool is_wiphy_all_set_reg_flag(en
|
||||
|
||||
void regulatory_hint_disconnect(void)
|
||||
{
|
||||
|
||||
@@ -1,47 +0,0 @@
|
||||
From 4509e523dba46f789377cfec6f20579adf743416 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Thibaut=20VAR=C3=88NE?= <hacks+kernel@slashdirt.org>
|
||||
Date: Sun, 17 Apr 2022 11:31:35 +0200
|
||||
Subject: [PATCH v2] ath9k: fix QCA9561 PA bias level
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
This patch fixes an invalid TX PA DC bias level on QCA9561, which
|
||||
results in a very low output power and very low throughput as devices
|
||||
are further away from the AP (compared to other 2.4GHz APs).
|
||||
|
||||
This patch was suggested by Felix Fietkau, who noted[1]:
|
||||
"The value written to that register is wrong, because while the mask
|
||||
definition AR_CH0_TOP2_XPABIASLVL uses a different value for 9561, the
|
||||
shift definition AR_CH0_TOP2_XPABIASLVL_S is hardcoded to 12, which is
|
||||
wrong for 9561."
|
||||
|
||||
In real life testing, without this patch the 2.4GHz throughput on
|
||||
Yuncore XD3200 is around 10Mbps sitting next to the AP, and closer to
|
||||
practical maximum with the patch applied.
|
||||
|
||||
[1] https://lore.kernel.org/all/91c58969-c60e-2f41-00ac-737786d435ae@nbd.name
|
||||
|
||||
Signed-off-by: Thibaut VARÈNE <hacks+kernel@slashdirt.org>
|
||||
---
|
||||
v2: Adjust #define per Felix's suggestion
|
||||
---
|
||||
drivers/net/wireless/ath/ath9k/ar9003_phy.h | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/drivers/net/wireless/ath/ath9k/ar9003_phy.h b/drivers/net/wireless/ath/ath9k/ar9003_phy.h
|
||||
index a171dbb29..ad949eb02 100644
|
||||
--- a/drivers/net/wireless/ath/ath9k/ar9003_phy.h
|
||||
+++ b/drivers/net/wireless/ath/ath9k/ar9003_phy.h
|
||||
@@ -720,7 +720,7 @@
|
||||
#define AR_CH0_TOP2 (AR_SREV_9300(ah) ? 0x1628c : \
|
||||
(AR_SREV_9462(ah) ? 0x16290 : 0x16284))
|
||||
#define AR_CH0_TOP2_XPABIASLVL (AR_SREV_9561(ah) ? 0x1e00 : 0xf000)
|
||||
-#define AR_CH0_TOP2_XPABIASLVL_S 12
|
||||
+#define AR_CH0_TOP2_XPABIASLVL_S (AR_SREV_9561(ah) ? 9 : 12)
|
||||
|
||||
#define AR_CH0_XTAL (AR_SREV_9300(ah) ? 0x16294 : \
|
||||
((AR_SREV_9462(ah) || AR_SREV_9565(ah)) ? 0x16298 : \
|
||||
--
|
||||
2.30.2
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/drivers/net/wireless/ath/ath10k/mac.c
|
||||
+++ b/drivers/net/wireless/ath/ath10k/mac.c
|
||||
@@ -9732,6 +9732,21 @@ static int ath10k_mac_init_rd(struct ath
|
||||
@@ -9752,6 +9752,21 @@ static int ath10k_mac_init_rd(struct ath
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
int ath10k_mac_register(struct ath10k *ar)
|
||||
{
|
||||
static const u32 cipher_suites[] = {
|
||||
@@ -10081,6 +10096,12 @@ int ath10k_mac_register(struct ath10k *a
|
||||
@@ -10101,6 +10116,12 @@ int ath10k_mac_register(struct ath10k *a
|
||||
|
||||
ar->hw->weight_multiplier = ATH10K_AIRTIME_WEIGHT_MULTIPLIER;
|
||||
|
||||
|
||||
@@ -42,7 +42,7 @@ Signed-off-by: Mathias Kresin <dev@kresin.me>
|
||||
if (ret)
|
||||
--- a/drivers/net/wireless/ath/ath10k/mac.c
|
||||
+++ b/drivers/net/wireless/ath/ath10k/mac.c
|
||||
@@ -10098,7 +10098,7 @@ int ath10k_mac_register(struct ath10k *a
|
||||
@@ -10118,7 +10118,7 @@ int ath10k_mac_register(struct ath10k *a
|
||||
ar->hw->weight_multiplier = ATH10K_AIRTIME_WEIGHT_MULTIPLIER;
|
||||
|
||||
#ifdef CPTCFG_MAC80211_LEDS
|
||||
|
||||
@@ -28,7 +28,7 @@ Forwarded: no
|
||||
|
||||
--- a/drivers/net/wireless/ath/ath10k/mac.c
|
||||
+++ b/drivers/net/wireless/ath/ath10k/mac.c
|
||||
@@ -1010,6 +1010,40 @@ static inline int ath10k_vdev_setup_sync
|
||||
@@ -1017,6 +1017,40 @@ static inline int ath10k_vdev_setup_sync
|
||||
return ar->last_wmi_vdev_start_status;
|
||||
}
|
||||
|
||||
@@ -69,7 +69,7 @@ Forwarded: no
|
||||
static int ath10k_monitor_vdev_start(struct ath10k *ar, int vdev_id)
|
||||
{
|
||||
struct cfg80211_chan_def *chandef = NULL;
|
||||
@@ -1042,7 +1076,8 @@ static int ath10k_monitor_vdev_start(str
|
||||
@@ -1049,7 +1083,8 @@ static int ath10k_monitor_vdev_start(str
|
||||
arg.channel.min_power = 0;
|
||||
arg.channel.max_power = channel->max_power * 2;
|
||||
arg.channel.max_reg_power = channel->max_reg_power * 2;
|
||||
@@ -79,7 +79,7 @@ Forwarded: no
|
||||
|
||||
reinit_completion(&ar->vdev_setup_done);
|
||||
reinit_completion(&ar->vdev_delete_done);
|
||||
@@ -1488,7 +1523,8 @@ static int ath10k_vdev_start_restart(str
|
||||
@@ -1495,7 +1530,8 @@ static int ath10k_vdev_start_restart(str
|
||||
arg.channel.min_power = 0;
|
||||
arg.channel.max_power = chandef->chan->max_power * 2;
|
||||
arg.channel.max_reg_power = chandef->chan->max_reg_power * 2;
|
||||
@@ -89,7 +89,7 @@ Forwarded: no
|
||||
|
||||
if (arvif->vdev_type == WMI_VDEV_TYPE_AP) {
|
||||
arg.ssid = arvif->u.ap.ssid;
|
||||
@@ -3259,7 +3295,8 @@ static int ath10k_update_channel_list(st
|
||||
@@ -3266,7 +3302,8 @@ static int ath10k_update_channel_list(st
|
||||
ch->min_power = 0;
|
||||
ch->max_power = channel->max_power * 2;
|
||||
ch->max_reg_power = channel->max_reg_power * 2;
|
||||
|
||||
@@ -10,7 +10,7 @@ Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
|
||||
|
||||
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
|
||||
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
|
||||
@@ -715,8 +715,36 @@ static struct wireless_dev *brcmf_cfg802
|
||||
@@ -718,8 +718,36 @@ static struct wireless_dev *brcmf_cfg802
|
||||
struct brcmf_cfg80211_info *cfg = wiphy_to_cfg(wiphy);
|
||||
struct brcmf_pub *drvr = cfg->pub;
|
||||
struct wireless_dev *wdev;
|
||||
|
||||
@@ -14,7 +14,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.org>
|
||||
|
||||
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
|
||||
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
|
||||
@@ -2961,6 +2961,10 @@ brcmf_cfg80211_set_power_mgmt(struct wip
|
||||
@@ -2964,6 +2964,10 @@ brcmf_cfg80211_set_power_mgmt(struct wip
|
||||
* preference in cfg struct to apply this to
|
||||
* FW later while initializing the dongle
|
||||
*/
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
|
||||
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
|
||||
@@ -2913,6 +2913,63 @@ done:
|
||||
@@ -2916,6 +2916,63 @@ done:
|
||||
}
|
||||
|
||||
static int
|
||||
@@ -64,7 +64,7 @@
|
||||
brcmf_cfg80211_dump_station(struct wiphy *wiphy, struct net_device *ndev,
|
||||
int idx, u8 *mac, struct station_info *sinfo)
|
||||
{
|
||||
@@ -3008,6 +3065,7 @@ static s32 brcmf_inform_single_bss(struc
|
||||
@@ -3011,6 +3068,7 @@ static s32 brcmf_inform_single_bss(struc
|
||||
struct brcmu_chan ch;
|
||||
u16 channel;
|
||||
u32 freq;
|
||||
@@ -72,7 +72,7 @@
|
||||
u16 notify_capability;
|
||||
u16 notify_interval;
|
||||
u8 *notify_ie;
|
||||
@@ -3032,6 +3090,17 @@ static s32 brcmf_inform_single_bss(struc
|
||||
@@ -3035,6 +3093,17 @@ static s32 brcmf_inform_single_bss(struc
|
||||
band = NL80211_BAND_5GHZ;
|
||||
|
||||
freq = ieee80211_channel_to_frequency(channel, band);
|
||||
@@ -90,7 +90,7 @@
|
||||
bss_data.chan = ieee80211_get_channel(wiphy, freq);
|
||||
bss_data.scan_width = NL80211_BSS_CHAN_WIDTH_20;
|
||||
bss_data.boottime_ns = ktime_to_ns(ktime_get_boottime());
|
||||
@@ -5518,6 +5587,7 @@ static struct cfg80211_ops brcmf_cfg8021
|
||||
@@ -5521,6 +5590,7 @@ static struct cfg80211_ops brcmf_cfg8021
|
||||
.leave_ibss = brcmf_cfg80211_leave_ibss,
|
||||
.get_station = brcmf_cfg80211_get_station,
|
||||
.dump_station = brcmf_cfg80211_dump_station,
|
||||
@@ -100,7 +100,7 @@
|
||||
.add_key = brcmf_cfg80211_add_key,
|
||||
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c
|
||||
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c
|
||||
@@ -1356,6 +1356,8 @@ int brcmf_attach(struct device *dev)
|
||||
@@ -1357,6 +1357,8 @@ int brcmf_attach(struct device *dev)
|
||||
|
||||
/* Link to bus module */
|
||||
drvr->hdrlen = 0;
|
||||
@@ -109,7 +109,7 @@
|
||||
|
||||
/* Attach and link in the protocol */
|
||||
ret = brcmf_proto_attach(drvr);
|
||||
@@ -1438,6 +1440,12 @@ void brcmf_detach(struct device *dev)
|
||||
@@ -1439,6 +1441,12 @@ void brcmf_detach(struct device *dev)
|
||||
if (drvr == NULL)
|
||||
return;
|
||||
|
||||
|
||||
@@ -40,7 +40,7 @@ Signed-off-by: Tomislav Požega <pozega.tomislav@gmail.com>
|
||||
|
||||
--- a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
|
||||
+++ b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
|
||||
@@ -9416,6 +9416,8 @@ static int rt2800_init_eeprom(struct rt2
|
||||
@@ -9442,6 +9442,8 @@ static int rt2800_init_eeprom(struct rt2
|
||||
rf = RF3853;
|
||||
else if (rt2x00_rt(rt2x00dev, RT5350))
|
||||
rf = RF5350;
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
#include "rt2x00.h"
|
||||
#include "rt2800lib.h"
|
||||
@@ -9530,6 +9531,17 @@ static int rt2800_init_eeprom(struct rt2
|
||||
@@ -9556,6 +9557,17 @@ static int rt2800_init_eeprom(struct rt2
|
||||
rt2800_init_led(rt2x00dev, &rt2x00dev->led_assoc, LED_TYPE_ASSOC);
|
||||
rt2800_init_led(rt2x00dev, &rt2x00dev->led_qual, LED_TYPE_QUALITY);
|
||||
|
||||
|
||||
@@ -30,8 +30,8 @@ Signed-off-by: Tomislav Po=C5=BEega <pozega.tomislav@gmail.com>
|
||||
* EEPROM LNA
|
||||
--- a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
|
||||
+++ b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
|
||||
@@ -4356,6 +4356,45 @@ static void rt2800_config_channel(struct
|
||||
rt2800_iq_calibrate(rt2x00dev, rf->channel);
|
||||
@@ -4360,6 +4360,45 @@ static void rt2800_config_channel(struct
|
||||
rt2800_iq_calibrate(rt2x00dev, rf->channel);
|
||||
}
|
||||
|
||||
+ if (rt2x00_rt(rt2x00dev, RT6352)) {
|
||||
@@ -76,7 +76,7 @@ Signed-off-by: Tomislav Po=C5=BEega <pozega.tomislav@gmail.com>
|
||||
bbp = rt2800_bbp_read(rt2x00dev, 4);
|
||||
rt2x00_set_field8(&bbp, BBP4_BANDWIDTH, 2 * conf_is_ht40(conf));
|
||||
rt2800_bbp_write(rt2x00dev, 4, bbp);
|
||||
@@ -9559,7 +9598,8 @@ static int rt2800_init_eeprom(struct rt2
|
||||
@@ -9585,7 +9624,8 @@ static int rt2800_init_eeprom(struct rt2
|
||||
*/
|
||||
eeprom = rt2800_eeprom_read(rt2x00dev, EEPROM_NIC_CONF1);
|
||||
|
||||
@@ -86,7 +86,7 @@ Signed-off-by: Tomislav Po=C5=BEega <pozega.tomislav@gmail.com>
|
||||
if (rt2x00_get_field16(eeprom,
|
||||
EEPROM_NIC_CONF1_EXTERNAL_TX0_PA_3352))
|
||||
__set_bit(CAPABILITY_EXTERNAL_PA_TX0,
|
||||
@@ -9570,6 +9610,18 @@ static int rt2800_init_eeprom(struct rt2
|
||||
@@ -9596,6 +9636,18 @@ static int rt2800_init_eeprom(struct rt2
|
||||
&rt2x00dev->cap_flags);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
|
||||
+++ b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
|
||||
@@ -8419,6 +8419,56 @@ static void rt2800_init_rfcsr_5592(struc
|
||||
@@ -8445,6 +8445,56 @@ static void rt2800_init_rfcsr_5592(struc
|
||||
rt2800_led_open_drain_enable(rt2x00dev);
|
||||
}
|
||||
|
||||
@@ -57,7 +57,7 @@
|
||||
static void rt2800_bbp_core_soft_reset(struct rt2x00_dev *rt2x00dev,
|
||||
bool set_bw, bool is_ht40)
|
||||
{
|
||||
@@ -9026,6 +9076,7 @@ static void rt2800_init_rfcsr_6352(struc
|
||||
@@ -9052,6 +9102,7 @@ static void rt2800_init_rfcsr_6352(struc
|
||||
rt2800_rfcsr_write_dccal(rt2x00dev, 5, 0x00);
|
||||
rt2800_rfcsr_write_dccal(rt2x00dev, 17, 0x7C);
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
|
||||
+++ b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
|
||||
@@ -8469,6 +8469,155 @@ static void rt2800_rf_self_txdc_cal(stru
|
||||
@@ -8495,6 +8495,155 @@ static void rt2800_rf_self_txdc_cal(stru
|
||||
rt2x00_info(rt2x00dev, "RF Tx self calibration end\n");
|
||||
}
|
||||
|
||||
@@ -156,7 +156,7 @@
|
||||
static void rt2800_bbp_core_soft_reset(struct rt2x00_dev *rt2x00dev,
|
||||
bool set_bw, bool is_ht40)
|
||||
{
|
||||
@@ -9076,6 +9225,7 @@ static void rt2800_init_rfcsr_6352(struc
|
||||
@@ -9102,6 +9251,7 @@ static void rt2800_init_rfcsr_6352(struc
|
||||
rt2800_rfcsr_write_dccal(rt2x00dev, 5, 0x00);
|
||||
rt2800_rfcsr_write_dccal(rt2x00dev, 17, 0x7C);
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
|
||||
+++ b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
|
||||
@@ -8618,6 +8618,70 @@ static void rt2800_r_calibration(struct
|
||||
@@ -8644,6 +8644,70 @@ static void rt2800_r_calibration(struct
|
||||
rt2800_register_write(rt2x00dev, PWR_PIN_CFG, MAC_PWR_PIN_CFG);
|
||||
}
|
||||
|
||||
@@ -71,7 +71,7 @@
|
||||
static void rt2800_bbp_core_soft_reset(struct rt2x00_dev *rt2x00dev,
|
||||
bool set_bw, bool is_ht40)
|
||||
{
|
||||
@@ -9227,6 +9291,7 @@ static void rt2800_init_rfcsr_6352(struc
|
||||
@@ -9253,6 +9317,7 @@ static void rt2800_init_rfcsr_6352(struc
|
||||
|
||||
rt2800_r_calibration(rt2x00dev);
|
||||
rt2800_rf_self_txdc_cal(rt2x00dev);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
|
||||
+++ b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
|
||||
@@ -8682,6 +8682,384 @@ static void rt2800_rxdcoc_calibration(st
|
||||
@@ -8708,6 +8708,384 @@ static void rt2800_rxdcoc_calibration(st
|
||||
rt2800_rfcsr_write_bank(rt2x00dev, 0, 2, saverfb0r2);
|
||||
}
|
||||
|
||||
@@ -385,7 +385,7 @@
|
||||
static void rt2800_bbp_core_soft_reset(struct rt2x00_dev *rt2x00dev,
|
||||
bool set_bw, bool is_ht40)
|
||||
{
|
||||
@@ -9294,6 +9672,7 @@ static void rt2800_init_rfcsr_6352(struc
|
||||
@@ -9320,6 +9698,7 @@ static void rt2800_init_rfcsr_6352(struc
|
||||
rt2800_rxdcoc_calibration(rt2x00dev);
|
||||
rt2800_bw_filter_calibration(rt2x00dev, true);
|
||||
rt2800_bw_filter_calibration(rt2x00dev, false);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
|
||||
+++ b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
|
||||
@@ -9060,6 +9060,943 @@ restore_value:
|
||||
@@ -9086,6 +9086,943 @@ restore_value:
|
||||
rt2800_register_write(rt2x00dev, MAC_SYS_CTRL, savemacsysctrl);
|
||||
}
|
||||
|
||||
@@ -944,7 +944,7 @@
|
||||
static void rt2800_bbp_core_soft_reset(struct rt2x00_dev *rt2x00dev,
|
||||
bool set_bw, bool is_ht40)
|
||||
{
|
||||
@@ -9672,6 +10609,7 @@ static void rt2800_init_rfcsr_6352(struc
|
||||
@@ -9698,6 +10635,7 @@ static void rt2800_init_rfcsr_6352(struc
|
||||
rt2800_rxdcoc_calibration(rt2x00dev);
|
||||
rt2800_bw_filter_calibration(rt2x00dev, true);
|
||||
rt2800_bw_filter_calibration(rt2x00dev, false);
|
||||
|
||||
@@ -121,12 +121,12 @@
|
||||
rt2800_register_write(rt2x00dev, MAC_SYS_CTRL, mac_sys_ctrl);
|
||||
|
||||
rt2800_vco_calibration(rt2x00dev);
|
||||
@@ -5887,18 +5898,33 @@ static int rt2800_init_registers(struct
|
||||
@@ -5892,18 +5903,33 @@ static int rt2800_init_registers(struct
|
||||
} else if (rt2x00_rt(rt2x00dev, RT5350)) {
|
||||
rt2800_register_write(rt2x00dev, TX_SW_CFG0, 0x00000404);
|
||||
} else if (rt2x00_rt(rt2x00dev, RT6352)) {
|
||||
- rt2800_register_write(rt2x00dev, TX_SW_CFG0, 0x00000401);
|
||||
- rt2800_register_write(rt2x00dev, TX_SW_CFG1, 0x000C0000);
|
||||
- rt2800_register_write(rt2x00dev, TX_SW_CFG1, 0x000C0001);
|
||||
- rt2800_register_write(rt2x00dev, TX_SW_CFG2, 0x00000000);
|
||||
- rt2800_register_write(rt2x00dev, TX_ALC_VGA3, 0x00000000);
|
||||
- rt2800_register_write(rt2x00dev, TX0_BB_GAIN_ATTEN, 0x0);
|
||||
@@ -150,7 +150,7 @@
|
||||
+ 0x00550055);
|
||||
+ } else {
|
||||
+ rt2800_register_write(rt2x00dev, TX_SW_CFG0, 0x00000401);
|
||||
+ rt2800_register_write(rt2x00dev, TX_SW_CFG1, 0x000C0000);
|
||||
+ rt2800_register_write(rt2x00dev, TX_SW_CFG1, 0x000C0001);
|
||||
+ rt2800_register_write(rt2x00dev, TX_SW_CFG2, 0x00000000);
|
||||
+ rt2800_register_write(rt2x00dev, TX_ALC_VGA3, 0x00000000);
|
||||
+ rt2800_register_write(rt2x00dev, TX0_BB_GAIN_ATTEN, 0x0);
|
||||
@@ -167,7 +167,7 @@
|
||||
reg = rt2800_register_read(rt2x00dev, TX_ALC_CFG_1);
|
||||
rt2x00_set_field32(®, TX_ALC_CFG_1_ROS_BUSY_EN, 0);
|
||||
rt2800_register_write(rt2x00dev, TX_ALC_CFG_1, reg);
|
||||
@@ -7042,14 +7068,16 @@ static void rt2800_init_bbp_6352(struct
|
||||
@@ -7068,14 +7094,16 @@ static void rt2800_init_bbp_6352(struct
|
||||
rt2800_bbp_write(rt2x00dev, 188, 0x00);
|
||||
rt2800_bbp_write(rt2x00dev, 189, 0x00);
|
||||
|
||||
@@ -192,7 +192,7 @@
|
||||
|
||||
/* BBP for G band GLRT function (BBP_128 ~ BBP_221) */
|
||||
rt2800_bbp_glrt_write(rt2x00dev, 0, 0x00);
|
||||
@@ -10388,31 +10416,36 @@ static void rt2800_init_rfcsr_6352(struc
|
||||
@@ -10414,31 +10442,36 @@ static void rt2800_init_rfcsr_6352(struc
|
||||
rt2800_rfcsr_write(rt2x00dev, 42, 0x5B);
|
||||
rt2800_rfcsr_write(rt2x00dev, 43, 0x00);
|
||||
|
||||
@@ -254,7 +254,7 @@
|
||||
|
||||
/* Initialize RF channel register to default value */
|
||||
rt2800_rfcsr_write_chanreg(rt2x00dev, 0, 0x03);
|
||||
@@ -10478,63 +10511,71 @@ static void rt2800_init_rfcsr_6352(struc
|
||||
@@ -10504,63 +10537,71 @@ static void rt2800_init_rfcsr_6352(struc
|
||||
|
||||
rt2800_rfcsr_write_bank(rt2x00dev, 6, 45, 0xC5);
|
||||
|
||||
@@ -383,7 +383,7 @@
|
||||
|
||||
/* Initialize RF DC calibration register to default value */
|
||||
rt2800_rfcsr_write_dccal(rt2x00dev, 0, 0x47);
|
||||
@@ -10597,12 +10638,17 @@ static void rt2800_init_rfcsr_6352(struc
|
||||
@@ -10623,12 +10664,17 @@ static void rt2800_init_rfcsr_6352(struc
|
||||
rt2800_rfcsr_write_dccal(rt2x00dev, 62, 0x00);
|
||||
rt2800_rfcsr_write_dccal(rt2x00dev, 63, 0x00);
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
static unsigned int rt2800_hw_beacon_base(struct rt2x00_dev *rt2x00dev,
|
||||
unsigned int index)
|
||||
{
|
||||
@@ -12199,26 +12213,30 @@ int rt2800_get_survey(struct ieee80211_h
|
||||
@@ -12225,26 +12239,30 @@ int rt2800_get_survey(struct ieee80211_h
|
||||
{
|
||||
struct rt2x00_dev *rt2x00dev = hw->priv;
|
||||
struct ieee80211_conf *conf = &hw->conf;
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
fail_ifa:
|
||||
#endif
|
||||
wiphy_unregister(local->hw.wiphy);
|
||||
@@ -1365,10 +1365,10 @@ void ieee80211_unregister_hw(struct ieee
|
||||
@@ -1367,10 +1367,10 @@ void ieee80211_unregister_hw(struct ieee
|
||||
tasklet_kill(&local->tx_pending_tasklet);
|
||||
tasklet_kill(&local->tasklet);
|
||||
|
||||
|
||||
@@ -42,7 +42,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
else
|
||||
cfg80211_rx_mlme_mgmt(sdata->dev, buf, len);
|
||||
|
||||
@@ -4734,7 +4734,8 @@ void ieee80211_mgd_quiesce(struct ieee80
|
||||
@@ -4745,7 +4745,8 @@ void ieee80211_mgd_quiesce(struct ieee80
|
||||
if (ifmgd->auth_data)
|
||||
ieee80211_destroy_auth_data(sdata, false);
|
||||
cfg80211_tx_mlme_mgmt(sdata->dev, frame_buf,
|
||||
@@ -144,7 +144,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
|
||||
--- a/net/wireless/nl80211.c
|
||||
+++ b/net/wireless/nl80211.c
|
||||
@@ -736,6 +736,7 @@ static const struct nla_policy nl80211_p
|
||||
@@ -741,6 +741,7 @@ static const struct nla_policy nl80211_p
|
||||
NLA_POLICY_EXACT_LEN(IEEE80211_S1G_CAPABILITY_LEN),
|
||||
[NL80211_ATTR_S1G_CAPABILITY_MASK] =
|
||||
NLA_POLICY_EXACT_LEN(IEEE80211_S1G_CAPABILITY_LEN),
|
||||
@@ -152,7 +152,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
};
|
||||
|
||||
/* policy for the key attributes */
|
||||
@@ -15914,7 +15915,7 @@ static void nl80211_send_mlme_event(stru
|
||||
@@ -15934,7 +15935,7 @@ static void nl80211_send_mlme_event(stru
|
||||
const u8 *buf, size_t len,
|
||||
enum nl80211_commands cmd, gfp_t gfp,
|
||||
int uapsd_queues, const u8 *req_ies,
|
||||
@@ -161,7 +161,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
{
|
||||
struct sk_buff *msg;
|
||||
void *hdr;
|
||||
@@ -15936,6 +15937,9 @@ static void nl80211_send_mlme_event(stru
|
||||
@@ -15956,6 +15957,9 @@ static void nl80211_send_mlme_event(stru
|
||||
nla_put(msg, NL80211_ATTR_REQ_IE, req_ies_len, req_ies)))
|
||||
goto nla_put_failure;
|
||||
|
||||
@@ -171,7 +171,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
if (uapsd_queues >= 0) {
|
||||
struct nlattr *nla_wmm =
|
||||
nla_nest_start_noflag(msg, NL80211_ATTR_STA_WME);
|
||||
@@ -15964,7 +15968,8 @@ void nl80211_send_rx_auth(struct cfg8021
|
||||
@@ -15984,7 +15988,8 @@ void nl80211_send_rx_auth(struct cfg8021
|
||||
size_t len, gfp_t gfp)
|
||||
{
|
||||
nl80211_send_mlme_event(rdev, netdev, buf, len,
|
||||
@@ -181,7 +181,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
}
|
||||
|
||||
void nl80211_send_rx_assoc(struct cfg80211_registered_device *rdev,
|
||||
@@ -15974,23 +15979,25 @@ void nl80211_send_rx_assoc(struct cfg802
|
||||
@@ -15994,23 +15999,25 @@ void nl80211_send_rx_assoc(struct cfg802
|
||||
{
|
||||
nl80211_send_mlme_event(rdev, netdev, buf, len,
|
||||
NL80211_CMD_ASSOCIATE, gfp, uapsd_queues,
|
||||
@@ -212,7 +212,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
}
|
||||
|
||||
void cfg80211_rx_unprot_mlme_mgmt(struct net_device *dev, const u8 *buf,
|
||||
@@ -16021,7 +16028,7 @@ void cfg80211_rx_unprot_mlme_mgmt(struct
|
||||
@@ -16041,7 +16048,7 @@ void cfg80211_rx_unprot_mlme_mgmt(struct
|
||||
|
||||
trace_cfg80211_rx_unprot_mlme_mgmt(dev, buf, len);
|
||||
nl80211_send_mlme_event(rdev, dev, buf, len, cmd, GFP_ATOMIC, -1,
|
||||
|
||||
@@ -136,7 +136,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
|
||||
static void ieee80211_destroy_auth_data(struct ieee80211_sub_if_data *sdata,
|
||||
bool assoc)
|
||||
@@ -3141,7 +3170,7 @@ static void ieee80211_rx_mgmt_deauth(str
|
||||
@@ -3142,7 +3171,7 @@ static void ieee80211_rx_mgmt_deauth(str
|
||||
ieee80211_set_disassoc(sdata, 0, 0, false, NULL);
|
||||
|
||||
ieee80211_report_disconnect(sdata, (u8 *)mgmt, len, false,
|
||||
@@ -145,7 +145,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -3190,7 +3219,8 @@ static void ieee80211_rx_mgmt_disassoc(s
|
||||
@@ -3191,7 +3220,8 @@ static void ieee80211_rx_mgmt_disassoc(s
|
||||
|
||||
ieee80211_set_disassoc(sdata, 0, 0, false, NULL);
|
||||
|
||||
@@ -155,17 +155,17 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
}
|
||||
|
||||
static void ieee80211_get_rates(struct ieee80211_supported_band *sband,
|
||||
@@ -4214,7 +4244,8 @@ static void ieee80211_rx_mgmt_beacon(str
|
||||
@@ -4223,7 +4253,8 @@ static void ieee80211_rx_mgmt_beacon(str
|
||||
true, deauth_buf);
|
||||
ieee80211_report_disconnect(sdata, deauth_buf,
|
||||
sizeof(deauth_buf), true,
|
||||
- WLAN_REASON_DEAUTH_LEAVING);
|
||||
+ WLAN_REASON_DEAUTH_LEAVING,
|
||||
+ false);
|
||||
return;
|
||||
goto free;
|
||||
}
|
||||
|
||||
@@ -4359,7 +4390,7 @@ static void ieee80211_sta_connection_los
|
||||
@@ -4370,7 +4401,7 @@ static void ieee80211_sta_connection_los
|
||||
tx, frame_buf);
|
||||
|
||||
ieee80211_report_disconnect(sdata, frame_buf, sizeof(frame_buf), true,
|
||||
@@ -174,7 +174,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
}
|
||||
|
||||
static int ieee80211_auth(struct ieee80211_sub_if_data *sdata)
|
||||
@@ -5449,7 +5480,8 @@ int ieee80211_mgd_auth(struct ieee80211_
|
||||
@@ -5460,7 +5491,8 @@ int ieee80211_mgd_auth(struct ieee80211_
|
||||
|
||||
ieee80211_report_disconnect(sdata, frame_buf,
|
||||
sizeof(frame_buf), true,
|
||||
@@ -184,7 +184,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
}
|
||||
|
||||
sdata_info(sdata, "authenticate with %pM\n", req->bss->bssid);
|
||||
@@ -5521,7 +5553,8 @@ int ieee80211_mgd_assoc(struct ieee80211
|
||||
@@ -5532,7 +5564,8 @@ int ieee80211_mgd_assoc(struct ieee80211
|
||||
|
||||
ieee80211_report_disconnect(sdata, frame_buf,
|
||||
sizeof(frame_buf), true,
|
||||
@@ -194,7 +194,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
}
|
||||
|
||||
if (ifmgd->auth_data && !ifmgd->auth_data->done) {
|
||||
@@ -5824,7 +5857,7 @@ int ieee80211_mgd_deauth(struct ieee8021
|
||||
@@ -5835,7 +5868,7 @@ int ieee80211_mgd_deauth(struct ieee8021
|
||||
ieee80211_destroy_auth_data(sdata, false);
|
||||
ieee80211_report_disconnect(sdata, frame_buf,
|
||||
sizeof(frame_buf), true,
|
||||
@@ -203,7 +203,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -5844,7 +5877,7 @@ int ieee80211_mgd_deauth(struct ieee8021
|
||||
@@ -5855,7 +5888,7 @@ int ieee80211_mgd_deauth(struct ieee8021
|
||||
ieee80211_destroy_assoc_data(sdata, false, true);
|
||||
ieee80211_report_disconnect(sdata, frame_buf,
|
||||
sizeof(frame_buf), true,
|
||||
@@ -212,7 +212,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -5859,7 +5892,7 @@ int ieee80211_mgd_deauth(struct ieee8021
|
||||
@@ -5870,7 +5903,7 @@ int ieee80211_mgd_deauth(struct ieee8021
|
||||
req->reason_code, tx, frame_buf);
|
||||
ieee80211_report_disconnect(sdata, frame_buf,
|
||||
sizeof(frame_buf), true,
|
||||
@@ -221,7 +221,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -5892,7 +5925,7 @@ int ieee80211_mgd_disassoc(struct ieee80
|
||||
@@ -5903,7 +5936,7 @@ int ieee80211_mgd_disassoc(struct ieee80
|
||||
frame_buf);
|
||||
|
||||
ieee80211_report_disconnect(sdata, frame_buf, sizeof(frame_buf), true,
|
||||
|
||||
@@ -49,7 +49,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
/**
|
||||
--- a/net/wireless/nl80211.c
|
||||
+++ b/net/wireless/nl80211.c
|
||||
@@ -736,6 +736,9 @@ static const struct nla_policy nl80211_p
|
||||
@@ -741,6 +741,9 @@ static const struct nla_policy nl80211_p
|
||||
NLA_POLICY_EXACT_LEN(IEEE80211_S1G_CAPABILITY_LEN),
|
||||
[NL80211_ATTR_S1G_CAPABILITY_MASK] =
|
||||
NLA_POLICY_EXACT_LEN(IEEE80211_S1G_CAPABILITY_LEN),
|
||||
@@ -59,7 +59,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
[NL80211_ATTR_RECONNECT_REQUESTED] = { .type = NLA_REJECT },
|
||||
};
|
||||
|
||||
@@ -9763,6 +9766,12 @@ static int nl80211_crypto_settings(struc
|
||||
@@ -9778,6 +9781,12 @@ static int nl80211_crypto_settings(struc
|
||||
nla_len(info->attrs[NL80211_ATTR_SAE_PASSWORD]);
|
||||
}
|
||||
|
||||
|
||||
@@ -52,7 +52,7 @@ Signed-off-by: Xing Song <xing.song@mediatek.com>
|
||||
|
||||
--- a/net/mac80211/rx.c
|
||||
+++ b/net/mac80211/rx.c
|
||||
@@ -2941,6 +2941,7 @@ ieee80211_rx_h_mesh_fwding(struct ieee80
|
||||
@@ -2942,6 +2942,7 @@ ieee80211_rx_h_mesh_fwding(struct ieee80
|
||||
if (!fwd_skb)
|
||||
goto out;
|
||||
|
||||
|
||||
@@ -183,7 +183,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
enabled = bss->vif.offload_flags & IEEE80211_OFFLOAD_ENCAP_ENABLED;
|
||||
--- a/net/mac80211/rx.c
|
||||
+++ b/net/mac80211/rx.c
|
||||
@@ -4198,7 +4198,9 @@ void ieee80211_check_fast_rx(struct sta_
|
||||
@@ -4199,7 +4199,9 @@ void ieee80211_check_fast_rx(struct sta_
|
||||
.vif_type = sdata->vif.type,
|
||||
.control_port_protocol = sdata->control_port_protocol,
|
||||
}, *old, *new = NULL;
|
||||
@@ -193,7 +193,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
|
||||
/* use sparse to check that we don't return without updating */
|
||||
__acquire(check_fast_rx);
|
||||
@@ -4311,6 +4313,17 @@ void ieee80211_check_fast_rx(struct sta_
|
||||
@@ -4312,6 +4314,17 @@ void ieee80211_check_fast_rx(struct sta_
|
||||
if (assign)
|
||||
new = kmemdup(&fastrx, sizeof(fastrx), GFP_KERNEL);
|
||||
|
||||
@@ -211,7 +211,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
spin_lock_bh(&sta->lock);
|
||||
old = rcu_dereference_protected(sta->fast_rx, true);
|
||||
rcu_assign_pointer(sta->fast_rx, new);
|
||||
@@ -4357,6 +4370,108 @@ void ieee80211_check_fast_rx_iface(struc
|
||||
@@ -4358,6 +4371,108 @@ void ieee80211_check_fast_rx_iface(struc
|
||||
mutex_unlock(&local->sta_mtx);
|
||||
}
|
||||
|
||||
@@ -320,7 +320,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
static bool ieee80211_invoke_fast_rx(struct ieee80211_rx_data *rx,
|
||||
struct ieee80211_fast_rx *fast_rx)
|
||||
{
|
||||
@@ -4377,9 +4492,6 @@ static bool ieee80211_invoke_fast_rx(str
|
||||
@@ -4378,9 +4493,6 @@ static bool ieee80211_invoke_fast_rx(str
|
||||
} addrs __aligned(2);
|
||||
struct ieee80211_sta_rx_stats *stats = &sta->rx_stats;
|
||||
|
||||
@@ -330,7 +330,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
/* for parallel-rx, we need to have DUP_VALIDATED, otherwise we write
|
||||
* to a common data structure; drivers can implement that per queue
|
||||
* but we don't have that information in mac80211
|
||||
@@ -4453,32 +4565,6 @@ static bool ieee80211_invoke_fast_rx(str
|
||||
@@ -4454,32 +4566,6 @@ static bool ieee80211_invoke_fast_rx(str
|
||||
pskb_trim(skb, skb->len - fast_rx->icv_len))
|
||||
goto drop;
|
||||
|
||||
@@ -363,7 +363,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
if (rx->key && !ieee80211_has_protected(hdr->frame_control))
|
||||
goto drop;
|
||||
|
||||
@@ -4490,12 +4576,6 @@ static bool ieee80211_invoke_fast_rx(str
|
||||
@@ -4491,12 +4577,6 @@ static bool ieee80211_invoke_fast_rx(str
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -376,7 +376,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
/* do the header conversion - first grab the addresses */
|
||||
ether_addr_copy(addrs.da, skb->data + fast_rx->da_offs);
|
||||
ether_addr_copy(addrs.sa, skb->data + fast_rx->sa_offs);
|
||||
@@ -4504,62 +4584,14 @@ static bool ieee80211_invoke_fast_rx(str
|
||||
@@ -4505,62 +4585,14 @@ static bool ieee80211_invoke_fast_rx(str
|
||||
/* push the addresses in front */
|
||||
memcpy(skb_push(skb, sizeof(addrs)), &addrs, sizeof(addrs));
|
||||
|
||||
@@ -443,7 +443,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
stats->dropped++;
|
||||
return true;
|
||||
}
|
||||
@@ -4613,6 +4645,47 @@ static bool ieee80211_prepare_and_rx_han
|
||||
@@ -4614,6 +4646,47 @@ static bool ieee80211_prepare_and_rx_han
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -491,7 +491,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
/*
|
||||
* This is the actual Rx frames handler. as it belongs to Rx path it must
|
||||
* be called with rcu_read_lock protection.
|
||||
@@ -4850,15 +4923,20 @@ void ieee80211_rx_list(struct ieee80211_
|
||||
@@ -4851,15 +4924,20 @@ void ieee80211_rx_list(struct ieee80211_
|
||||
* if it was previously present.
|
||||
* Also, frames with less than 16 bytes are dropped.
|
||||
*/
|
||||
|
||||
@@ -15,7 +15,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
|
||||
--- a/net/mac80211/ieee80211_i.h
|
||||
+++ b/net/mac80211/ieee80211_i.h
|
||||
@@ -1587,13 +1587,8 @@ ieee80211_have_rx_timestamp(struct ieee8
|
||||
@@ -1592,13 +1592,8 @@ ieee80211_have_rx_timestamp(struct ieee8
|
||||
{
|
||||
WARN_ON_ONCE(status->flag & RX_FLAG_MACTIME_START &&
|
||||
status->flag & RX_FLAG_MACTIME_END);
|
||||
@@ -33,7 +33,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
void ieee80211_vif_inc_num_mcast(struct ieee80211_sub_if_data *sdata);
|
||||
--- a/net/mac80211/util.c
|
||||
+++ b/net/mac80211/util.c
|
||||
@@ -3670,6 +3670,7 @@ u64 ieee80211_calculate_rx_timestamp(str
|
||||
@@ -3673,6 +3673,7 @@ u64 ieee80211_calculate_rx_timestamp(str
|
||||
u64 ts = status->mactime;
|
||||
struct rate_info ri;
|
||||
u16 rate;
|
||||
@@ -41,7 +41,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
|
||||
if (WARN_ON(!ieee80211_have_rx_timestamp(status)))
|
||||
return 0;
|
||||
@@ -3680,11 +3681,58 @@ u64 ieee80211_calculate_rx_timestamp(str
|
||||
@@ -3683,11 +3684,58 @@ u64 ieee80211_calculate_rx_timestamp(str
|
||||
|
||||
/* Fill cfg80211 rate info */
|
||||
switch (status->encoding) {
|
||||
@@ -100,7 +100,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
break;
|
||||
case RX_ENC_VHT:
|
||||
ri.flags |= RATE_INFO_FLAGS_VHT_MCS;
|
||||
@@ -3692,6 +3740,23 @@ u64 ieee80211_calculate_rx_timestamp(str
|
||||
@@ -3695,6 +3743,23 @@ u64 ieee80211_calculate_rx_timestamp(str
|
||||
ri.nss = status->nss;
|
||||
if (status->enc_flags & RX_ENC_FLAG_SHORT_GI)
|
||||
ri.flags |= RATE_INFO_FLAGS_SHORT_GI;
|
||||
@@ -124,7 +124,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
break;
|
||||
default:
|
||||
WARN_ON(1);
|
||||
@@ -3715,7 +3780,6 @@ u64 ieee80211_calculate_rx_timestamp(str
|
||||
@@ -3718,7 +3783,6 @@ u64 ieee80211_calculate_rx_timestamp(str
|
||||
ri.legacy = DIV_ROUND_UP(bitrate, (1 << shift));
|
||||
|
||||
if (status->flag & RX_FLAG_MACTIME_PLCP_START) {
|
||||
|
||||
@@ -79,7 +79,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
DEBUGFS_ADD_MODE(aqm, 0600);
|
||||
--- a/net/mac80211/ieee80211_i.h
|
||||
+++ b/net/mac80211/ieee80211_i.h
|
||||
@@ -1140,6 +1140,8 @@ enum mac80211_scan_state {
|
||||
@@ -1145,6 +1145,8 @@ enum mac80211_scan_state {
|
||||
SCAN_ABORT,
|
||||
};
|
||||
|
||||
|
||||
@@ -387,7 +387,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
struct work_struct csa_finalize_work;
|
||||
bool csa_block_tx; /* write-protected by sdata_lock and local->mtx */
|
||||
struct cfg80211_chan_def csa_chandef;
|
||||
@@ -1143,6 +1141,44 @@ enum mac80211_scan_state {
|
||||
@@ -1148,6 +1146,44 @@ enum mac80211_scan_state {
|
||||
SCAN_ABORT,
|
||||
};
|
||||
|
||||
@@ -432,7 +432,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
DECLARE_STATIC_KEY_FALSE(aql_disable);
|
||||
|
||||
struct ieee80211_local {
|
||||
@@ -1156,13 +1192,8 @@ struct ieee80211_local {
|
||||
@@ -1161,13 +1197,8 @@ struct ieee80211_local {
|
||||
struct codel_params cparams;
|
||||
|
||||
/* protects active_txqs and txqi->schedule_order */
|
||||
@@ -447,7 +447,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
u32 aql_threshold;
|
||||
atomic_t aql_total_pending_airtime;
|
||||
|
||||
@@ -1581,6 +1612,125 @@ static inline bool txq_has_queue(struct
|
||||
@@ -1586,6 +1617,125 @@ static inline bool txq_has_queue(struct
|
||||
return !(skb_queue_empty(&txqi->frags) && !txqi->tin.backlog_packets);
|
||||
}
|
||||
|
||||
@@ -573,7 +573,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
static inline int ieee80211_bssid_match(const u8 *raddr, const u8 *addr)
|
||||
{
|
||||
return ether_addr_equal(raddr, addr) ||
|
||||
@@ -1821,6 +1971,14 @@ int ieee80211_tx_control_port(struct wip
|
||||
@@ -1826,6 +1976,14 @@ int ieee80211_tx_control_port(struct wip
|
||||
u64 *cookie);
|
||||
int ieee80211_probe_mesh_link(struct wiphy *wiphy, struct net_device *dev,
|
||||
const u8 *buf, size_t len);
|
||||
@@ -622,7 +622,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
|
||||
--- a/net/mac80211/rx.c
|
||||
+++ b/net/mac80211/rx.c
|
||||
@@ -1573,12 +1573,8 @@ static void sta_ps_start(struct sta_info
|
||||
@@ -1572,12 +1572,8 @@ static void sta_ps_start(struct sta_info
|
||||
|
||||
for (tid = 0; tid < IEEE80211_NUM_TIDS; tid++) {
|
||||
struct ieee80211_txq *txq = sta->sta.txq[tid];
|
||||
|
||||
@@ -136,7 +136,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
static const struct nla_policy nl80211_policy[NUM_NL80211_ATTR] = {
|
||||
[0] = { .strict_start_type = NL80211_ATTR_HE_OBSS_PD },
|
||||
[NL80211_ATTR_WIPHY] = { .type = NLA_U32 },
|
||||
@@ -739,6 +751,7 @@ static const struct nla_policy nl80211_p
|
||||
@@ -744,6 +756,7 @@ static const struct nla_policy nl80211_p
|
||||
[NL80211_ATTR_SAE_PWE] =
|
||||
NLA_POLICY_RANGE(NLA_U8, NL80211_SAE_PWE_HUNT_AND_PECK,
|
||||
NL80211_SAE_PWE_BOTH),
|
||||
@@ -144,7 +144,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
[NL80211_ATTR_RECONNECT_REQUESTED] = { .type = NLA_REJECT },
|
||||
};
|
||||
|
||||
@@ -2117,6 +2130,56 @@ fail:
|
||||
@@ -2122,6 +2135,56 @@ fail:
|
||||
return -ENOBUFS;
|
||||
}
|
||||
|
||||
@@ -201,7 +201,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
struct nl80211_dump_wiphy_state {
|
||||
s64 filter_wiphy;
|
||||
long start;
|
||||
@@ -2366,6 +2429,8 @@ static int nl80211_send_wiphy(struct cfg
|
||||
@@ -2371,6 +2434,8 @@ static int nl80211_send_wiphy(struct cfg
|
||||
CMD(set_multicast_to_unicast, SET_MULTICAST_TO_UNICAST);
|
||||
CMD(update_connect_params, UPDATE_CONNECT_PARAMS);
|
||||
CMD(update_ft_ies, UPDATE_FT_IES);
|
||||
@@ -210,7 +210,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
}
|
||||
#undef CMD
|
||||
|
||||
@@ -2691,6 +2756,11 @@ static int nl80211_send_wiphy(struct cfg
|
||||
@@ -2696,6 +2761,11 @@ static int nl80211_send_wiphy(struct cfg
|
||||
|
||||
if (nl80211_put_tid_config_support(rdev, msg))
|
||||
goto nla_put_failure;
|
||||
@@ -222,7 +222,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
|
||||
/* done */
|
||||
state->split_start = 0;
|
||||
@@ -14724,6 +14794,111 @@ static void nl80211_post_doit(__genl_con
|
||||
@@ -14744,6 +14814,111 @@ static void nl80211_post_doit(__genl_con
|
||||
}
|
||||
}
|
||||
|
||||
@@ -334,7 +334,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
static __genl_const struct genl_ops nl80211_ops[] = {
|
||||
{
|
||||
.cmd = NL80211_CMD_GET_WIPHY,
|
||||
@@ -15587,6 +15762,14 @@ static const struct genl_small_ops nl802
|
||||
@@ -15607,6 +15782,14 @@ static const struct genl_small_ops nl802
|
||||
.internal_flags = NL80211_FLAG_NEED_NETDEV |
|
||||
NL80211_FLAG_NEED_RTNL,
|
||||
},
|
||||
|
||||
@@ -25,7 +25,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
struct ieee80211_sta *sta, bool enabled);
|
||||
--- a/net/mac80211/cfg.c
|
||||
+++ b/net/mac80211/cfg.c
|
||||
@@ -4136,6 +4136,17 @@ static int ieee80211_reset_tid_config(st
|
||||
@@ -4133,6 +4133,17 @@ static int ieee80211_reset_tid_config(st
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -43,7 +43,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
const struct cfg80211_ops mac80211_config_ops = {
|
||||
.add_virtual_intf = ieee80211_add_iface,
|
||||
.del_virtual_intf = ieee80211_del_iface,
|
||||
@@ -4239,4 +4250,5 @@ const struct cfg80211_ops mac80211_confi
|
||||
@@ -4236,4 +4247,5 @@ const struct cfg80211_ops mac80211_confi
|
||||
.probe_mesh_link = ieee80211_probe_mesh_link,
|
||||
.set_tid_config = ieee80211_set_tid_config,
|
||||
.reset_tid_config = ieee80211_reset_tid_config,
|
||||
|
||||
@@ -223,7 +223,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
NUM_NL80211_EXT_FEATURES,
|
||||
--- a/net/wireless/nl80211.c
|
||||
+++ b/net/wireless/nl80211.c
|
||||
@@ -753,6 +753,10 @@ static const struct nla_policy nl80211_p
|
||||
@@ -758,6 +758,10 @@ static const struct nla_policy nl80211_p
|
||||
NL80211_SAE_PWE_BOTH),
|
||||
[NL80211_ATTR_SAR_SPEC] = NLA_POLICY_NESTED(sar_policy),
|
||||
[NL80211_ATTR_RECONNECT_REQUESTED] = { .type = NLA_REJECT },
|
||||
@@ -234,7 +234,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
};
|
||||
|
||||
/* policy for the key attributes */
|
||||
@@ -14689,6 +14693,106 @@ bad_tid_conf:
|
||||
@@ -14709,6 +14713,106 @@ bad_tid_conf:
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -341,7 +341,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
#define NL80211_FLAG_NEED_WIPHY 0x01
|
||||
#define NL80211_FLAG_NEED_NETDEV 0x02
|
||||
#define NL80211_FLAG_NEED_RTNL 0x04
|
||||
@@ -15770,6 +15874,14 @@ static const struct genl_small_ops nl802
|
||||
@@ -15790,6 +15894,14 @@ static const struct genl_small_ops nl802
|
||||
.internal_flags = NL80211_FLAG_NEED_WIPHY |
|
||||
NL80211_FLAG_NEED_RTNL,
|
||||
},
|
||||
@@ -356,7 +356,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
};
|
||||
|
||||
static struct genl_family nl80211_fam __genl_ro_after_init = {
|
||||
@@ -17397,6 +17509,51 @@ void cfg80211_ch_switch_started_notify(s
|
||||
@@ -17417,6 +17529,51 @@ void cfg80211_ch_switch_started_notify(s
|
||||
}
|
||||
EXPORT_SYMBOL(cfg80211_ch_switch_started_notify);
|
||||
|
||||
|
||||
@@ -179,7 +179,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
if (err < 0) {
|
||||
kfree(sdata->u.ap.next_beacon);
|
||||
return err;
|
||||
@@ -3428,6 +3436,15 @@ static int ieee80211_set_csa_beacon(stru
|
||||
@@ -3425,6 +3433,15 @@ static int ieee80211_set_csa_beacon(stru
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -195,7 +195,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
static int
|
||||
__ieee80211_channel_switch(struct wiphy *wiphy, struct net_device *dev,
|
||||
struct cfg80211_csa_settings *params)
|
||||
@@ -3496,6 +3513,10 @@ __ieee80211_channel_switch(struct wiphy
|
||||
@@ -3493,6 +3510,10 @@ __ieee80211_channel_switch(struct wiphy
|
||||
goto out;
|
||||
}
|
||||
|
||||
@@ -206,7 +206,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
err = ieee80211_set_csa_beacon(sdata, params, &changed);
|
||||
if (err) {
|
||||
ieee80211_vif_unreserve_chanctx(sdata);
|
||||
@@ -4147,6 +4168,196 @@ static int ieee80211_set_sar_specs(struc
|
||||
@@ -4144,6 +4165,196 @@ static int ieee80211_set_sar_specs(struc
|
||||
return local->ops->set_sar_specs(&local->hw, sar);
|
||||
}
|
||||
|
||||
@@ -403,7 +403,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
const struct cfg80211_ops mac80211_config_ops = {
|
||||
.add_virtual_intf = ieee80211_add_iface,
|
||||
.del_virtual_intf = ieee80211_del_iface,
|
||||
@@ -4251,4 +4462,5 @@ const struct cfg80211_ops mac80211_confi
|
||||
@@ -4248,4 +4459,5 @@ const struct cfg80211_ops mac80211_confi
|
||||
.set_tid_config = ieee80211_set_tid_config,
|
||||
.reset_tid_config = ieee80211_reset_tid_config,
|
||||
.set_sar_specs = ieee80211_set_sar_specs,
|
||||
@@ -433,7 +433,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
struct list_head assigned_chanctx_list; /* protected by chanctx_mtx */
|
||||
struct list_head reserved_chanctx_list; /* protected by chanctx_mtx */
|
||||
|
||||
@@ -1900,6 +1908,9 @@ void ieee80211_csa_finalize_work(struct
|
||||
@@ -1905,6 +1913,9 @@ void ieee80211_csa_finalize_work(struct
|
||||
int ieee80211_channel_switch(struct wiphy *wiphy, struct net_device *dev,
|
||||
struct cfg80211_csa_settings *params);
|
||||
|
||||
|
||||
@@ -92,7 +92,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
|
||||
u8 needed_rx_chains;
|
||||
enum ieee80211_smps_mode smps_mode;
|
||||
@@ -2093,6 +2094,11 @@ ieee80211_he_op_ie_to_bss_conf(struct ie
|
||||
@@ -2098,6 +2099,11 @@ ieee80211_he_op_ie_to_bss_conf(struct ie
|
||||
|
||||
/* S1G */
|
||||
void ieee80211_s1g_sta_rate_init(struct sta_info *sta);
|
||||
@@ -187,7 +187,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
INIT_WORK(&sdata->csa_finalize_work, ieee80211_csa_finalize_work);
|
||||
--- a/net/mac80211/rx.c
|
||||
+++ b/net/mac80211/rx.c
|
||||
@@ -3210,6 +3210,68 @@ ieee80211_rx_h_mgmt_check(struct ieee802
|
||||
@@ -3211,6 +3211,68 @@ ieee80211_rx_h_mgmt_check(struct ieee802
|
||||
return RX_CONTINUE;
|
||||
}
|
||||
|
||||
@@ -256,7 +256,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
static ieee80211_rx_result debug_noinline
|
||||
ieee80211_rx_h_action(struct ieee80211_rx_data *rx)
|
||||
{
|
||||
@@ -3489,6 +3551,17 @@ ieee80211_rx_h_action(struct ieee80211_r
|
||||
@@ -3490,6 +3552,17 @@ ieee80211_rx_h_action(struct ieee80211_r
|
||||
!mesh_path_sel_is_hwmp(sdata))
|
||||
break;
|
||||
goto queue;
|
||||
|
||||
@@ -12,7 +12,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
|
||||
--- a/drivers/net/wireless/ath/ath11k/mac.c
|
||||
+++ b/drivers/net/wireless/ath/ath11k/mac.c
|
||||
@@ -3633,7 +3633,7 @@ ath11k_mac_filter_he_cap_mesh(struct iee
|
||||
@@ -3648,7 +3648,7 @@ ath11k_mac_filter_he_cap_mesh(struct iee
|
||||
IEEE80211_HE_MAC_CAP4_BQR;
|
||||
he_cap_elem->mac_cap_info[4] &= ~m;
|
||||
|
||||
@@ -21,7 +21,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
IEEE80211_HE_MAC_CAP5_UL_2x996_TONE_RU |
|
||||
IEEE80211_HE_MAC_CAP5_PUNCTURED_SOUNDING |
|
||||
IEEE80211_HE_MAC_CAP5_HT_VHT_TRIG_FRAME_RX;
|
||||
@@ -3643,7 +3643,7 @@ ath11k_mac_filter_he_cap_mesh(struct iee
|
||||
@@ -3658,7 +3658,7 @@ ath11k_mac_filter_he_cap_mesh(struct iee
|
||||
IEEE80211_HE_PHY_CAP2_UL_MU_PARTIAL_MU_MIMO;
|
||||
he_cap_elem->phy_cap_info[2] &= ~m;
|
||||
|
||||
@@ -30,7 +30,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
IEEE80211_HE_PHY_CAP3_DCM_MAX_CONST_TX_MASK |
|
||||
IEEE80211_HE_PHY_CAP3_DCM_MAX_CONST_RX_MASK;
|
||||
he_cap_elem->phy_cap_info[3] &= ~m;
|
||||
@@ -3655,13 +3655,13 @@ ath11k_mac_filter_he_cap_mesh(struct iee
|
||||
@@ -3670,13 +3670,13 @@ ath11k_mac_filter_he_cap_mesh(struct iee
|
||||
he_cap_elem->phy_cap_info[5] &= ~m;
|
||||
|
||||
m = IEEE80211_HE_PHY_CAP6_CODEBOOK_SIZE_75_MU |
|
||||
|
||||
@@ -75,7 +75,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
|
||||
--- a/drivers/net/wireless/mac80211_hwsim.c
|
||||
+++ b/drivers/net/wireless/mac80211_hwsim.c
|
||||
@@ -2757,7 +2757,7 @@ static const struct ieee80211_sband_ifty
|
||||
@@ -2764,7 +2764,7 @@ static const struct ieee80211_sband_ifty
|
||||
.mac_cap_info[3] =
|
||||
IEEE80211_HE_MAC_CAP3_OMI_CONTROL |
|
||||
IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_VHT_2,
|
||||
@@ -84,7 +84,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
.phy_cap_info[1] =
|
||||
IEEE80211_HE_PHY_CAP1_PREAMBLE_PUNC_RX_MASK |
|
||||
IEEE80211_HE_PHY_CAP1_DEVICE_CLASS_A |
|
||||
@@ -2801,7 +2801,7 @@ static const struct ieee80211_sband_ifty
|
||||
@@ -2808,7 +2808,7 @@ static const struct ieee80211_sband_ifty
|
||||
.mac_cap_info[3] =
|
||||
IEEE80211_HE_MAC_CAP3_OMI_CONTROL |
|
||||
IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_VHT_2,
|
||||
@@ -93,7 +93,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
.phy_cap_info[1] =
|
||||
IEEE80211_HE_PHY_CAP1_PREAMBLE_PUNC_RX_MASK |
|
||||
IEEE80211_HE_PHY_CAP1_DEVICE_CLASS_A |
|
||||
@@ -2847,7 +2847,7 @@ static const struct ieee80211_sband_ifty
|
||||
@@ -2854,7 +2854,7 @@ static const struct ieee80211_sband_ifty
|
||||
.mac_cap_info[3] =
|
||||
IEEE80211_HE_MAC_CAP3_OMI_CONTROL |
|
||||
IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_VHT_2,
|
||||
@@ -102,7 +102,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
.phy_cap_info[0] =
|
||||
IEEE80211_HE_PHY_CAP0_CHANNEL_WIDTH_SET_40MHZ_80MHZ_IN_5G |
|
||||
IEEE80211_HE_PHY_CAP0_CHANNEL_WIDTH_SET_160MHZ_IN_5G |
|
||||
@@ -2895,7 +2895,7 @@ static const struct ieee80211_sband_ifty
|
||||
@@ -2902,7 +2902,7 @@ static const struct ieee80211_sband_ifty
|
||||
.mac_cap_info[3] =
|
||||
IEEE80211_HE_MAC_CAP3_OMI_CONTROL |
|
||||
IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_VHT_2,
|
||||
|
||||
@@ -47,7 +47,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
.mac_cap_info[5] =
|
||||
--- a/drivers/net/wireless/mac80211_hwsim.c
|
||||
+++ b/drivers/net/wireless/mac80211_hwsim.c
|
||||
@@ -2756,7 +2756,7 @@ static const struct ieee80211_sband_ifty
|
||||
@@ -2763,7 +2763,7 @@ static const struct ieee80211_sband_ifty
|
||||
IEEE80211_HE_MAC_CAP2_ACK_EN,
|
||||
.mac_cap_info[3] =
|
||||
IEEE80211_HE_MAC_CAP3_OMI_CONTROL |
|
||||
@@ -56,7 +56,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
.mac_cap_info[4] = IEEE80211_HE_MAC_CAP4_AMSDU_IN_AMPDU,
|
||||
.phy_cap_info[1] =
|
||||
IEEE80211_HE_PHY_CAP1_PREAMBLE_PUNC_RX_MASK |
|
||||
@@ -2800,7 +2800,7 @@ static const struct ieee80211_sband_ifty
|
||||
@@ -2807,7 +2807,7 @@ static const struct ieee80211_sband_ifty
|
||||
IEEE80211_HE_MAC_CAP2_ACK_EN,
|
||||
.mac_cap_info[3] =
|
||||
IEEE80211_HE_MAC_CAP3_OMI_CONTROL |
|
||||
@@ -65,7 +65,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
.mac_cap_info[4] = IEEE80211_HE_MAC_CAP4_AMSDU_IN_AMPDU,
|
||||
.phy_cap_info[1] =
|
||||
IEEE80211_HE_PHY_CAP1_PREAMBLE_PUNC_RX_MASK |
|
||||
@@ -2846,7 +2846,7 @@ static const struct ieee80211_sband_ifty
|
||||
@@ -2853,7 +2853,7 @@ static const struct ieee80211_sband_ifty
|
||||
IEEE80211_HE_MAC_CAP2_ACK_EN,
|
||||
.mac_cap_info[3] =
|
||||
IEEE80211_HE_MAC_CAP3_OMI_CONTROL |
|
||||
@@ -74,7 +74,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
.mac_cap_info[4] = IEEE80211_HE_MAC_CAP4_AMSDU_IN_AMPDU,
|
||||
.phy_cap_info[0] =
|
||||
IEEE80211_HE_PHY_CAP0_CHANNEL_WIDTH_SET_40MHZ_80MHZ_IN_5G |
|
||||
@@ -2894,7 +2894,7 @@ static const struct ieee80211_sband_ifty
|
||||
@@ -2901,7 +2901,7 @@ static const struct ieee80211_sband_ifty
|
||||
IEEE80211_HE_MAC_CAP2_ACK_EN,
|
||||
.mac_cap_info[3] =
|
||||
IEEE80211_HE_MAC_CAP3_OMI_CONTROL |
|
||||
|
||||
@@ -0,0 +1,44 @@
|
||||
--- a/net/mac80211/util.c
|
||||
+++ b/net/mac80211/util.c
|
||||
@@ -1402,6 +1402,7 @@ static size_t ieee802_11_find_bssid_prof
|
||||
if (!bss_bssid || !transmitter_bssid)
|
||||
return profile_len;
|
||||
|
||||
+ return 0;
|
||||
for_each_element_id(elem, WLAN_EID_MULTIPLE_BSSID, start, len) {
|
||||
if (elem->datalen < 2)
|
||||
continue;
|
||||
--- a/net/wireless/scan.c
|
||||
+++ b/net/wireless/scan.c
|
||||
@@ -2013,6 +2013,7 @@ static const struct element
|
||||
const struct element *next_mbssid;
|
||||
const struct element *next_sub;
|
||||
|
||||
+ return NULL;
|
||||
next_mbssid = cfg80211_find_elem(WLAN_EID_MULTIPLE_BSSID,
|
||||
mbssid_end,
|
||||
ielen - (mbssid_end - ie));
|
||||
@@ -2094,6 +2095,7 @@ static void cfg80211_parse_mbssid_data(s
|
||||
u16 capability;
|
||||
struct cfg80211_bss *bss;
|
||||
|
||||
+ return;
|
||||
if (!non_tx_data)
|
||||
return;
|
||||
if (!cfg80211_find_ie(WLAN_EID_MULTIPLE_BSSID, ie, ielen))
|
||||
@@ -2254,6 +2256,7 @@ cfg80211_update_notlisted_nontrans(struc
|
||||
const struct cfg80211_bss_ies *old;
|
||||
size_t cpy_len;
|
||||
|
||||
+ return;
|
||||
lockdep_assert_held(&wiphy_to_rdev(wiphy)->bss_lock);
|
||||
|
||||
ie = mgmt->u.probe_resp.variable;
|
||||
@@ -2472,6 +2475,7 @@ cfg80211_inform_bss_frame_data(struct wi
|
||||
res = cfg80211_inform_single_bss_frame_data(wiphy, data, mgmt,
|
||||
len, gfp);
|
||||
|
||||
+ return res;
|
||||
/* don't do any further MBSSID handling for S1G */
|
||||
if (ieee80211_is_s1g_beacon(mgmt->frame_control))
|
||||
return res;
|
||||
@@ -0,0 +1,145 @@
|
||||
From: Johannes Berg <johannes.berg@intel.com>
|
||||
Date: Wed, 29 Mar 2023 16:46:26 +0200
|
||||
Subject: [PATCH] wifi: ieee80211: correctly mark FTM frames non-bufferable
|
||||
|
||||
The checks of whether or not a frame is bufferable were not
|
||||
taking into account that some action frames aren't, such as
|
||||
FTM. Check this, which requires some changes to the function
|
||||
ieee80211_is_bufferable_mmpdu() since we need the whole skb
|
||||
for the checks now.
|
||||
|
||||
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
Reviewed-by: Greenman, Gregory <gregory.greenman@intel.com>
|
||||
Reviewed-by: Peer, Ilan <ilan.peer@intel.com>
|
||||
---
|
||||
|
||||
--- a/drivers/net/wireless/intel/iwlwifi/mvm/tx.c
|
||||
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/tx.c
|
||||
@@ -604,8 +604,9 @@ static void iwl_mvm_skb_prepare_status(s
|
||||
|
||||
static int iwl_mvm_get_ctrl_vif_queue(struct iwl_mvm *mvm,
|
||||
struct ieee80211_tx_info *info,
|
||||
- struct ieee80211_hdr *hdr)
|
||||
+ struct sk_buff *skb)
|
||||
{
|
||||
+ struct ieee80211_hdr *hdr = (void *)skb->data;
|
||||
struct iwl_mvm_vif *mvmvif =
|
||||
iwl_mvm_vif_from_mac80211(info->control.vif);
|
||||
__le16 fc = hdr->frame_control;
|
||||
@@ -624,7 +625,7 @@ static int iwl_mvm_get_ctrl_vif_queue(st
|
||||
* reason 7 ("Class 3 frame received from nonassociated STA").
|
||||
*/
|
||||
if (ieee80211_is_mgmt(fc) &&
|
||||
- (!ieee80211_is_bufferable_mmpdu(fc) ||
|
||||
+ (!ieee80211_is_bufferable_mmpdu(skb) ||
|
||||
ieee80211_is_deauth(fc) || ieee80211_is_disassoc(fc)))
|
||||
return mvm->probe_queue;
|
||||
|
||||
@@ -742,7 +743,7 @@ int iwl_mvm_tx_skb_non_sta(struct iwl_mv
|
||||
else
|
||||
sta_id = mvmvif->mcast_sta.sta_id;
|
||||
|
||||
- queue = iwl_mvm_get_ctrl_vif_queue(mvm, &info, hdr);
|
||||
+ queue = iwl_mvm_get_ctrl_vif_queue(mvm, &info, skb);
|
||||
} else if (info.control.vif->type == NL80211_IFTYPE_MONITOR) {
|
||||
queue = mvm->snif_queue;
|
||||
sta_id = mvm->snif_sta.sta_id;
|
||||
--- a/include/linux/ieee80211.h
|
||||
+++ b/include/linux/ieee80211.h
|
||||
@@ -738,20 +738,6 @@ static inline bool ieee80211_is_any_null
|
||||
}
|
||||
|
||||
/**
|
||||
- * ieee80211_is_bufferable_mmpdu - check if frame is bufferable MMPDU
|
||||
- * @fc: frame control field in little-endian byteorder
|
||||
- */
|
||||
-static inline bool ieee80211_is_bufferable_mmpdu(__le16 fc)
|
||||
-{
|
||||
- /* IEEE 802.11-2012, definition of "bufferable management frame";
|
||||
- * note that this ignores the IBSS special case. */
|
||||
- return ieee80211_is_mgmt(fc) &&
|
||||
- (ieee80211_is_action(fc) ||
|
||||
- ieee80211_is_disassoc(fc) ||
|
||||
- ieee80211_is_deauth(fc));
|
||||
-}
|
||||
-
|
||||
-/**
|
||||
* ieee80211_is_first_frag - check if IEEE80211_SCTL_FRAG is not set
|
||||
* @seq_ctrl: frame sequence control bytes in little-endian byteorder
|
||||
*/
|
||||
@@ -3614,6 +3600,44 @@ static inline u8 *ieee80211_get_DA(struc
|
||||
}
|
||||
|
||||
/**
|
||||
+ * ieee80211_is_bufferable_mmpdu - check if frame is bufferable MMPDU
|
||||
+ * @skb: the skb to check, starting with the 802.11 header
|
||||
+ */
|
||||
+static inline bool ieee80211_is_bufferable_mmpdu(struct sk_buff *skb)
|
||||
+{
|
||||
+ struct ieee80211_mgmt *mgmt = (void *)skb->data;
|
||||
+ __le16 fc = mgmt->frame_control;
|
||||
+
|
||||
+ /*
|
||||
+ * IEEE 802.11 REVme D2.0 definition of bufferable MMPDU;
|
||||
+ * note that this ignores the IBSS special case.
|
||||
+ */
|
||||
+ if (!ieee80211_is_mgmt(fc))
|
||||
+ return false;
|
||||
+
|
||||
+ if (ieee80211_is_disassoc(fc) || ieee80211_is_deauth(fc))
|
||||
+ return true;
|
||||
+
|
||||
+ if (!ieee80211_is_action(fc))
|
||||
+ return false;
|
||||
+
|
||||
+ if (skb->len < offsetofend(typeof(*mgmt), u.action.u.ftm.action_code))
|
||||
+ return true;
|
||||
+
|
||||
+ /* action frame - additionally check for non-bufferable FTM */
|
||||
+
|
||||
+ if (mgmt->u.action.category != WLAN_CATEGORY_PUBLIC &&
|
||||
+ mgmt->u.action.category != WLAN_CATEGORY_PROTECTED_DUAL_OF_ACTION)
|
||||
+ return true;
|
||||
+
|
||||
+ if (mgmt->u.action.u.ftm.action_code == WLAN_PUB_ACTION_FTM_REQUEST ||
|
||||
+ mgmt->u.action.u.ftm.action_code == WLAN_PUB_ACTION_FTM)
|
||||
+ return false;
|
||||
+
|
||||
+ return true;
|
||||
+}
|
||||
+
|
||||
+/**
|
||||
* _ieee80211_is_robust_mgmt_frame - check if frame is a robust management frame
|
||||
* @hdr: the frame (buffer must include at least the first octet of payload)
|
||||
*/
|
||||
--- a/net/mac80211/tx.c
|
||||
+++ b/net/mac80211/tx.c
|
||||
@@ -501,7 +501,7 @@ ieee80211_tx_h_unicast_ps_buf(struct iee
|
||||
int ac = skb_get_queue_mapping(tx->skb);
|
||||
|
||||
if (ieee80211_is_mgmt(hdr->frame_control) &&
|
||||
- !ieee80211_is_bufferable_mmpdu(hdr->frame_control)) {
|
||||
+ !ieee80211_is_bufferable_mmpdu(tx->skb)) {
|
||||
info->flags |= IEEE80211_TX_CTL_NO_PS_BUFFER;
|
||||
return TX_CONTINUE;
|
||||
}
|
||||
@@ -1296,7 +1296,7 @@ static struct txq_info *ieee80211_get_tx
|
||||
if (!(info->flags & IEEE80211_TX_CTL_HW_80211_ENCAP) &&
|
||||
unlikely(!ieee80211_is_data_present(hdr->frame_control))) {
|
||||
if ((!ieee80211_is_mgmt(hdr->frame_control) ||
|
||||
- ieee80211_is_bufferable_mmpdu(hdr->frame_control) ||
|
||||
+ ieee80211_is_bufferable_mmpdu(skb) ||
|
||||
vif->type == NL80211_IFTYPE_STATION) &&
|
||||
sta && sta->uploaded) {
|
||||
/*
|
||||
--- a/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c
|
||||
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c
|
||||
@@ -814,7 +814,7 @@ static void iwl_mvm_mac_tx(struct ieee80
|
||||
if ((info->control.vif->type == NL80211_IFTYPE_AP ||
|
||||
info->control.vif->type == NL80211_IFTYPE_ADHOC) &&
|
||||
ieee80211_is_mgmt(hdr->frame_control) &&
|
||||
- !ieee80211_is_bufferable_mmpdu(hdr->frame_control))
|
||||
+ !ieee80211_is_bufferable_mmpdu(skb))
|
||||
sta = NULL;
|
||||
|
||||
/* If there is no sta, and it's not offchannel - send through AP */
|
||||
@@ -0,0 +1,36 @@
|
||||
From: Johannes Berg <johannes.berg@intel.com>
|
||||
Date: Mon, 13 Mar 2023 11:42:12 +0100
|
||||
Subject: [PATCH] wifi: mac80211: flush queues on STA removal
|
||||
|
||||
When we remove a station, we first make it unreachable,
|
||||
then we (must) remove its keys, and then remove the
|
||||
station itself. Depending on the hardware design, if
|
||||
we have hardware crypto at all, frames still sitting
|
||||
on hardware queues may then be transmitted without a
|
||||
valid key, possibly unencrypted or with a fixed key.
|
||||
|
||||
Fix this by flushing the queues when removing stations
|
||||
so this cannot happen.
|
||||
|
||||
Cc: stable@vger.kernel.org
|
||||
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
Reviewed-by: Greenman, Gregory <gregory.greenman@intel.com>
|
||||
---
|
||||
|
||||
--- a/net/mac80211/sta_info.c
|
||||
+++ b/net/mac80211/sta_info.c
|
||||
@@ -1066,6 +1066,14 @@ static void __sta_info_destroy_part2(str
|
||||
WARN_ON_ONCE(ret);
|
||||
}
|
||||
|
||||
+ /* Flush queues before removing keys, as that might remove them
|
||||
+ * from hardware, and then depending on the offload method, any
|
||||
+ * frames sitting on hardware queues might be sent out without
|
||||
+ * any encryption at all.
|
||||
+ */
|
||||
+ if (local->ops->set_key)
|
||||
+ ieee80211_flush_queues(local, sta->sdata, false);
|
||||
+
|
||||
/* now keys can no longer be reached */
|
||||
ieee80211_free_sta_keys(local, sta);
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
From: Johannes Berg <johannes.berg@intel.com>
|
||||
Date: Mon, 13 Mar 2023 12:02:58 +0100
|
||||
Subject: [PATCH] wifi: iwlwifi: mvm: support flush on AP interfaces
|
||||
|
||||
Support TX flush on AP interfaces so that we will do a
|
||||
proper flush for frames on the queue before keys are
|
||||
removed.
|
||||
|
||||
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
Reviewed-by: Greenman, Gregory <gregory.greenman@intel.com>
|
||||
---
|
||||
|
||||
--- a/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c
|
||||
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c
|
||||
@@ -4791,9 +4791,6 @@ static void iwl_mvm_mac_flush(struct iee
|
||||
return;
|
||||
}
|
||||
|
||||
- if (vif->type != NL80211_IFTYPE_STATION)
|
||||
- return;
|
||||
-
|
||||
/* Make sure we're done with the deferred traffic before flushing */
|
||||
flush_work(&mvm->add_stream_wk);
|
||||
|
||||
@@ -4811,9 +4808,6 @@ static void iwl_mvm_mac_flush(struct iee
|
||||
if (mvmsta->vif != vif)
|
||||
continue;
|
||||
|
||||
- /* make sure only TDLS peers or the AP are flushed */
|
||||
- WARN_ON(i != mvmvif->ap_sta_id && !sta->tdls);
|
||||
-
|
||||
if (drop) {
|
||||
if (iwl_mvm_flush_sta(mvm, mvmsta, false))
|
||||
IWL_ERR(mvm, "flush request fail\n");
|
||||
@@ -0,0 +1,91 @@
|
||||
From: Johannes Berg <johannes.berg@intel.com>
|
||||
Date: Mon, 13 Mar 2023 11:53:51 +0100
|
||||
Subject: [PATCH] wifi: mac80211: add flush_sta method
|
||||
|
||||
Some drivers like iwlwifi might have per-STA queues, so we
|
||||
may want to flush/drop just those queues rather than all
|
||||
when removing a station. Add a separate method for that.
|
||||
|
||||
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
Reviewed-by: Greenman, Gregory <gregory.greenman@intel.com>
|
||||
---
|
||||
|
||||
--- a/include/net/mac80211.h
|
||||
+++ b/include/net/mac80211.h
|
||||
@@ -3661,6 +3661,10 @@ enum ieee80211_reconfig_type {
|
||||
* Note that vif can be NULL.
|
||||
* The callback can sleep.
|
||||
*
|
||||
+ * @flush_sta: Flush or drop all pending frames from the hardware queue(s) for
|
||||
+ * the given station, as it's about to be removed.
|
||||
+ * The callback can sleep.
|
||||
+ *
|
||||
* @channel_switch: Drivers that need (or want) to offload the channel
|
||||
* switch operation for CSAs received from the AP may implement this
|
||||
* callback. They must then call ieee80211_chswitch_done() to indicate
|
||||
@@ -4065,6 +4069,8 @@ struct ieee80211_ops {
|
||||
#endif
|
||||
void (*flush)(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
|
||||
u32 queues, bool drop);
|
||||
+ void (*flush_sta)(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
|
||||
+ struct ieee80211_sta *sta);
|
||||
void (*channel_switch)(struct ieee80211_hw *hw,
|
||||
struct ieee80211_vif *vif,
|
||||
struct ieee80211_channel_switch *ch_switch);
|
||||
--- a/net/mac80211/driver-ops.h
|
||||
+++ b/net/mac80211/driver-ops.h
|
||||
@@ -639,6 +639,21 @@ static inline void drv_flush(struct ieee
|
||||
trace_drv_return_void(local);
|
||||
}
|
||||
|
||||
+static inline void drv_flush_sta(struct ieee80211_local *local,
|
||||
+ struct ieee80211_sub_if_data *sdata,
|
||||
+ struct sta_info *sta)
|
||||
+{
|
||||
+ might_sleep();
|
||||
+
|
||||
+ if (sdata && !check_sdata_in_driver(sdata))
|
||||
+ return;
|
||||
+
|
||||
+ trace_drv_flush_sta(local, sdata, &sta->sta);
|
||||
+ if (local->ops->flush_sta)
|
||||
+ local->ops->flush_sta(&local->hw, &sdata->vif, &sta->sta);
|
||||
+ trace_drv_return_void(local);
|
||||
+}
|
||||
+
|
||||
static inline void drv_channel_switch(struct ieee80211_local *local,
|
||||
struct ieee80211_sub_if_data *sdata,
|
||||
struct ieee80211_channel_switch *ch_switch)
|
||||
--- a/net/mac80211/sta_info.c
|
||||
+++ b/net/mac80211/sta_info.c
|
||||
@@ -1071,8 +1071,12 @@ static void __sta_info_destroy_part2(str
|
||||
* frames sitting on hardware queues might be sent out without
|
||||
* any encryption at all.
|
||||
*/
|
||||
- if (local->ops->set_key)
|
||||
- ieee80211_flush_queues(local, sta->sdata, false);
|
||||
+ if (local->ops->set_key) {
|
||||
+ if (local->ops->flush_sta)
|
||||
+ drv_flush_sta(local, sta->sdata, sta);
|
||||
+ else
|
||||
+ ieee80211_flush_queues(local, sta->sdata, false);
|
||||
+ }
|
||||
|
||||
/* now keys can no longer be reached */
|
||||
ieee80211_free_sta_keys(local, sta);
|
||||
--- a/net/mac80211/trace.h
|
||||
+++ b/net/mac80211/trace.h
|
||||
@@ -1140,6 +1140,13 @@ TRACE_EVENT(drv_flush,
|
||||
)
|
||||
);
|
||||
|
||||
+DEFINE_EVENT(sta_event, drv_flush_sta,
|
||||
+ TP_PROTO(struct ieee80211_local *local,
|
||||
+ struct ieee80211_sub_if_data *sdata,
|
||||
+ struct ieee80211_sta *sta),
|
||||
+ TP_ARGS(local, sdata, sta)
|
||||
+);
|
||||
+
|
||||
TRACE_EVENT(drv_channel_switch,
|
||||
TP_PROTO(struct ieee80211_local *local,
|
||||
struct ieee80211_sub_if_data *sdata,
|
||||
@@ -0,0 +1,53 @@
|
||||
From: Johannes Berg <johannes.berg@intel.com>
|
||||
Date: Mon, 13 Mar 2023 12:05:35 +0100
|
||||
Subject: [PATCH] wifi: iwlwifi: mvm: support new flush_sta method
|
||||
|
||||
For iwlwifi this is simple to implement, and on newer hardware
|
||||
it's an improvement since we have per-station queues.
|
||||
|
||||
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
Reviewed-by: Greenman, Gregory <gregory.greenman@intel.com>
|
||||
---
|
||||
|
||||
--- a/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c
|
||||
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c
|
||||
@@ -4827,6 +4827,31 @@ static void iwl_mvm_mac_flush(struct iee
|
||||
iwl_trans_wait_tx_queues_empty(mvm->trans, msk);
|
||||
}
|
||||
|
||||
+static void iwl_mvm_mac_flush_sta(struct ieee80211_hw *hw,
|
||||
+ struct ieee80211_vif *vif,
|
||||
+ struct ieee80211_sta *sta)
|
||||
+{
|
||||
+ struct iwl_mvm *mvm = IWL_MAC80211_GET_MVM(hw);
|
||||
+ int i;
|
||||
+
|
||||
+ mutex_lock(&mvm->mutex);
|
||||
+ for (i = 0; i < mvm->fw->ucode_capa.num_stations; i++) {
|
||||
+ struct iwl_mvm_sta *mvmsta;
|
||||
+ struct ieee80211_sta *tmp;
|
||||
+
|
||||
+ tmp = rcu_dereference_protected(mvm->fw_id_to_mac_id[i],
|
||||
+ lockdep_is_held(&mvm->mutex));
|
||||
+ if (tmp != sta)
|
||||
+ continue;
|
||||
+
|
||||
+ mvmsta = iwl_mvm_sta_from_mac80211(sta);
|
||||
+
|
||||
+ if (iwl_mvm_flush_sta(mvm, mvmsta, false))
|
||||
+ IWL_ERR(mvm, "flush request fail\n");
|
||||
+ }
|
||||
+ mutex_unlock(&mvm->mutex);
|
||||
+}
|
||||
+
|
||||
static int iwl_mvm_mac_get_survey(struct ieee80211_hw *hw, int idx,
|
||||
struct survey_info *survey)
|
||||
{
|
||||
@@ -5296,6 +5321,7 @@ const struct ieee80211_ops iwl_mvm_hw_op
|
||||
.mgd_prepare_tx = iwl_mvm_mac_mgd_prepare_tx,
|
||||
.mgd_protect_tdls_discover = iwl_mvm_mac_mgd_protect_tdls_discover,
|
||||
.flush = iwl_mvm_mac_flush,
|
||||
+ .flush_sta = iwl_mvm_mac_flush_sta,
|
||||
.sched_scan_start = iwl_mvm_mac_sched_scan_start,
|
||||
.sched_scan_stop = iwl_mvm_mac_sched_scan_stop,
|
||||
.set_key = iwl_mvm_mac_set_key,
|
||||
@@ -77,7 +77,7 @@
|
||||
static int ieee80211_set_wds_peer(struct wiphy *wiphy, struct net_device *dev,
|
||||
const u8 *addr)
|
||||
{
|
||||
@@ -4413,6 +4426,7 @@ const struct cfg80211_ops mac80211_confi
|
||||
@@ -4410,6 +4423,7 @@ const struct cfg80211_ops mac80211_confi
|
||||
.set_wiphy_params = ieee80211_set_wiphy_params,
|
||||
.set_tx_power = ieee80211_set_tx_power,
|
||||
.get_tx_power = ieee80211_get_tx_power,
|
||||
@@ -87,7 +87,7 @@
|
||||
CFG80211_TESTMODE_CMD(ieee80211_testmode_cmd)
|
||||
--- a/net/mac80211/ieee80211_i.h
|
||||
+++ b/net/mac80211/ieee80211_i.h
|
||||
@@ -1435,6 +1435,7 @@ struct ieee80211_local {
|
||||
@@ -1440,6 +1440,7 @@ struct ieee80211_local {
|
||||
int dynamic_ps_forced_timeout;
|
||||
|
||||
int user_power_level; /* in dBm, for all interfaces */
|
||||
@@ -129,7 +129,7 @@
|
||||
local->hw.max_mtu = IEEE80211_MAX_DATA_LEN;
|
||||
--- a/net/wireless/nl80211.c
|
||||
+++ b/net/wireless/nl80211.c
|
||||
@@ -757,6 +757,7 @@ static const struct nla_policy nl80211_p
|
||||
@@ -762,6 +762,7 @@ static const struct nla_policy nl80211_p
|
||||
[NL80211_ATTR_COLOR_CHANGE_COUNT] = { .type = NLA_U8 },
|
||||
[NL80211_ATTR_COLOR_CHANGE_COLOR] = { .type = NLA_U8 },
|
||||
[NL80211_ATTR_COLOR_CHANGE_ELEMS] = NLA_POLICY_NESTED(nl80211_policy),
|
||||
@@ -137,7 +137,7 @@
|
||||
};
|
||||
|
||||
/* policy for the key attributes */
|
||||
@@ -3322,6 +3323,20 @@ static int nl80211_set_wiphy(struct sk_b
|
||||
@@ -3336,6 +3337,20 @@ static int nl80211_set_wiphy(struct sk_b
|
||||
if (result)
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@ This reverts commit 4932c5d80153c336c77dbe8d7af9f8fdd879d01f.
|
||||
|
||||
--- a/eeprom.c
|
||||
+++ b/eeprom.c
|
||||
@@ -105,9 +105,15 @@ mt76_eeprom_override(struct mt76_phy *ph
|
||||
@@ -107,9 +107,15 @@ mt76_eeprom_override(struct mt76_phy *ph
|
||||
{
|
||||
struct mt76_dev *dev = phy->dev;
|
||||
|
||||
|
||||
@@ -17,11 +17,9 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
drivers/net/wireless/mediatek/mt76/mt7921/mac.c | 4 +++-
|
||||
2 files changed, 6 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/drivers/net/wireless/mediatek/mt76/mt7915/mac.c b/drivers/net/wireless/mediatek/mt76/mt7915/mac.c
|
||||
index 5f4a0e811137..e353e8c44d6c 100644
|
||||
--- a/mt7915/mac.c
|
||||
+++ b/mt7915/mac.c
|
||||
@@ -1016,6 +1016,7 @@ mt7915_mac_write_txwi_8023(struct mt7915_dev *dev, __le32 *txwi,
|
||||
@@ -977,6 +977,7 @@ mt7915_mac_write_txwi_8023(struct mt7915
|
||||
|
||||
u8 tid = skb->priority & IEEE80211_QOS_CTL_TID_MASK;
|
||||
u8 fc_type, fc_stype;
|
||||
@@ -29,7 +27,7 @@ index 5f4a0e811137..e353e8c44d6c 100644
|
||||
bool wmm = false;
|
||||
u32 val;
|
||||
|
||||
@@ -1029,7 +1030,8 @@ mt7915_mac_write_txwi_8023(struct mt7915_dev *dev, __le32 *txwi,
|
||||
@@ -990,7 +991,8 @@ mt7915_mac_write_txwi_8023(struct mt7915
|
||||
val = FIELD_PREP(MT_TXD1_HDR_FORMAT, MT_HDR_FORMAT_802_3) |
|
||||
FIELD_PREP(MT_TXD1_TID, tid);
|
||||
|
||||
@@ -39,11 +37,9 @@ index 5f4a0e811137..e353e8c44d6c 100644
|
||||
val |= MT_TXD1_ETH_802_3;
|
||||
|
||||
txwi[1] |= cpu_to_le32(val);
|
||||
diff --git a/drivers/net/wireless/mediatek/mt76/mt7921/mac.c b/drivers/net/wireless/mediatek/mt76/mt7921/mac.c
|
||||
index 368e54c53ddd..ac11e8b28f13 100644
|
||||
--- a/mt7921/mac.c
|
||||
+++ b/mt7921/mac.c
|
||||
@@ -814,6 +814,7 @@ mt7921_mac_write_txwi_8023(struct mt7921_dev *dev, __le32 *txwi,
|
||||
@@ -811,6 +811,7 @@ mt7921_mac_write_txwi_8023(struct mt7921
|
||||
{
|
||||
u8 tid = skb->priority & IEEE80211_QOS_CTL_TID_MASK;
|
||||
u8 fc_type, fc_stype;
|
||||
@@ -51,7 +47,7 @@ index 368e54c53ddd..ac11e8b28f13 100644
|
||||
bool wmm = false;
|
||||
u32 val;
|
||||
|
||||
@@ -827,7 +828,8 @@ mt7921_mac_write_txwi_8023(struct mt7921_dev *dev, __le32 *txwi,
|
||||
@@ -824,7 +825,8 @@ mt7921_mac_write_txwi_8023(struct mt7921
|
||||
val = FIELD_PREP(MT_TXD1_HDR_FORMAT, MT_HDR_FORMAT_802_3) |
|
||||
FIELD_PREP(MT_TXD1_TID, tid);
|
||||
|
||||
|
||||
11
package/kernel/mt76/patches/110-api_update.patch
Normal file
11
package/kernel/mt76/patches/110-api_update.patch
Normal file
@@ -0,0 +1,11 @@
|
||||
--- a/tx.c
|
||||
+++ b/tx.c
|
||||
@@ -326,7 +326,7 @@ mt76_tx(struct mt76_phy *phy, struct iee
|
||||
if ((dev->drv->drv_flags & MT_DRV_HW_MGMT_TXQ) &&
|
||||
!(info->flags & IEEE80211_TX_CTL_HW_80211_ENCAP) &&
|
||||
!ieee80211_is_data(hdr->frame_control) &&
|
||||
- !ieee80211_is_bufferable_mmpdu(hdr->frame_control)) {
|
||||
+ !ieee80211_is_bufferable_mmpdu(skb)) {
|
||||
qid = MT_TXQ_PSD;
|
||||
skb_set_queue_mapping(skb, qid);
|
||||
}
|
||||
@@ -0,0 +1,301 @@
|
||||
From: Felix Fietkau <nbd@nbd.name>
|
||||
Date: Wed, 22 Mar 2023 10:17:49 +0100
|
||||
Subject: [PATCH] wifi: mt76: ignore key disable commands
|
||||
|
||||
This helps avoid cleartext leakage of already queued or powersave buffered
|
||||
packets, when a reassoc triggers the key deletion.
|
||||
|
||||
Cc: stable@vger.kernel.org
|
||||
Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
---
|
||||
|
||||
--- a/mt7603/main.c
|
||||
+++ b/mt7603/main.c
|
||||
@@ -512,15 +512,15 @@ mt7603_set_key(struct ieee80211_hw *hw,
|
||||
!(key->flags & IEEE80211_KEY_FLAG_PAIRWISE))
|
||||
return -EOPNOTSUPP;
|
||||
|
||||
- if (cmd == SET_KEY) {
|
||||
- key->hw_key_idx = wcid->idx;
|
||||
- wcid->hw_key_idx = idx;
|
||||
- } else {
|
||||
+ if (cmd != SET_KEY) {
|
||||
if (idx == wcid->hw_key_idx)
|
||||
wcid->hw_key_idx = -1;
|
||||
|
||||
- key = NULL;
|
||||
+ return 0;
|
||||
}
|
||||
+
|
||||
+ key->hw_key_idx = wcid->idx;
|
||||
+ wcid->hw_key_idx = idx;
|
||||
mt76_wcid_key_setup(&dev->mt76, wcid, key);
|
||||
|
||||
return mt7603_wtbl_set_key(dev, wcid->idx, key);
|
||||
--- a/mt7615/mac.c
|
||||
+++ b/mt7615/mac.c
|
||||
@@ -1231,8 +1231,7 @@ EXPORT_SYMBOL_GPL(mt7615_mac_set_rates);
|
||||
static int
|
||||
mt7615_mac_wtbl_update_key(struct mt7615_dev *dev, struct mt76_wcid *wcid,
|
||||
struct ieee80211_key_conf *key,
|
||||
- enum mt76_cipher_type cipher, u16 cipher_mask,
|
||||
- enum set_key_cmd cmd)
|
||||
+ enum mt76_cipher_type cipher, u16 cipher_mask)
|
||||
{
|
||||
u32 addr = mt7615_mac_wtbl_addr(dev, wcid->idx) + 30 * 4;
|
||||
u8 data[32] = {};
|
||||
@@ -1241,27 +1240,18 @@ mt7615_mac_wtbl_update_key(struct mt7615
|
||||
return -EINVAL;
|
||||
|
||||
mt76_rr_copy(dev, addr, data, sizeof(data));
|
||||
- if (cmd == SET_KEY) {
|
||||
- if (cipher == MT_CIPHER_TKIP) {
|
||||
- /* Rx/Tx MIC keys are swapped */
|
||||
- memcpy(data, key->key, 16);
|
||||
- memcpy(data + 16, key->key + 24, 8);
|
||||
- memcpy(data + 24, key->key + 16, 8);
|
||||
- } else {
|
||||
- if (cipher_mask == BIT(cipher))
|
||||
- memcpy(data, key->key, key->keylen);
|
||||
- else if (cipher != MT_CIPHER_BIP_CMAC_128)
|
||||
- memcpy(data, key->key, 16);
|
||||
- if (cipher == MT_CIPHER_BIP_CMAC_128)
|
||||
- memcpy(data + 16, key->key, 16);
|
||||
- }
|
||||
+ if (cipher == MT_CIPHER_TKIP) {
|
||||
+ /* Rx/Tx MIC keys are swapped */
|
||||
+ memcpy(data, key->key, 16);
|
||||
+ memcpy(data + 16, key->key + 24, 8);
|
||||
+ memcpy(data + 24, key->key + 16, 8);
|
||||
} else {
|
||||
+ if (cipher_mask == BIT(cipher))
|
||||
+ memcpy(data, key->key, key->keylen);
|
||||
+ else if (cipher != MT_CIPHER_BIP_CMAC_128)
|
||||
+ memcpy(data, key->key, 16);
|
||||
if (cipher == MT_CIPHER_BIP_CMAC_128)
|
||||
- memset(data + 16, 0, 16);
|
||||
- else if (cipher_mask)
|
||||
- memset(data, 0, 16);
|
||||
- if (!cipher_mask)
|
||||
- memset(data, 0, sizeof(data));
|
||||
+ memcpy(data + 16, key->key, 16);
|
||||
}
|
||||
|
||||
mt76_wr_copy(dev, addr, data, sizeof(data));
|
||||
@@ -1272,7 +1262,7 @@ mt7615_mac_wtbl_update_key(struct mt7615
|
||||
static int
|
||||
mt7615_mac_wtbl_update_pk(struct mt7615_dev *dev, struct mt76_wcid *wcid,
|
||||
enum mt76_cipher_type cipher, u16 cipher_mask,
|
||||
- int keyidx, enum set_key_cmd cmd)
|
||||
+ int keyidx)
|
||||
{
|
||||
u32 addr = mt7615_mac_wtbl_addr(dev, wcid->idx), w0, w1;
|
||||
|
||||
@@ -1291,9 +1281,7 @@ mt7615_mac_wtbl_update_pk(struct mt7615_
|
||||
else
|
||||
w0 &= ~MT_WTBL_W0_RX_IK_VALID;
|
||||
|
||||
- if (cmd == SET_KEY &&
|
||||
- (cipher != MT_CIPHER_BIP_CMAC_128 ||
|
||||
- cipher_mask == BIT(cipher))) {
|
||||
+ if (cipher != MT_CIPHER_BIP_CMAC_128 || cipher_mask == BIT(cipher)) {
|
||||
w0 &= ~MT_WTBL_W0_KEY_IDX;
|
||||
w0 |= FIELD_PREP(MT_WTBL_W0_KEY_IDX, keyidx);
|
||||
}
|
||||
@@ -1310,19 +1298,10 @@ mt7615_mac_wtbl_update_pk(struct mt7615_
|
||||
|
||||
static void
|
||||
mt7615_mac_wtbl_update_cipher(struct mt7615_dev *dev, struct mt76_wcid *wcid,
|
||||
- enum mt76_cipher_type cipher, u16 cipher_mask,
|
||||
- enum set_key_cmd cmd)
|
||||
+ enum mt76_cipher_type cipher, u16 cipher_mask)
|
||||
{
|
||||
u32 addr = mt7615_mac_wtbl_addr(dev, wcid->idx);
|
||||
|
||||
- if (!cipher_mask) {
|
||||
- mt76_clear(dev, addr + 2 * 4, MT_WTBL_W2_KEY_TYPE);
|
||||
- return;
|
||||
- }
|
||||
-
|
||||
- if (cmd != SET_KEY)
|
||||
- return;
|
||||
-
|
||||
if (cipher == MT_CIPHER_BIP_CMAC_128 &&
|
||||
cipher_mask & ~BIT(MT_CIPHER_BIP_CMAC_128))
|
||||
return;
|
||||
@@ -1333,8 +1312,7 @@ mt7615_mac_wtbl_update_cipher(struct mt7
|
||||
|
||||
int __mt7615_mac_wtbl_set_key(struct mt7615_dev *dev,
|
||||
struct mt76_wcid *wcid,
|
||||
- struct ieee80211_key_conf *key,
|
||||
- enum set_key_cmd cmd)
|
||||
+ struct ieee80211_key_conf *key)
|
||||
{
|
||||
enum mt76_cipher_type cipher;
|
||||
u16 cipher_mask = wcid->cipher;
|
||||
@@ -1344,19 +1322,14 @@ int __mt7615_mac_wtbl_set_key(struct mt7
|
||||
if (cipher == MT_CIPHER_NONE)
|
||||
return -EOPNOTSUPP;
|
||||
|
||||
- if (cmd == SET_KEY)
|
||||
- cipher_mask |= BIT(cipher);
|
||||
- else
|
||||
- cipher_mask &= ~BIT(cipher);
|
||||
-
|
||||
- mt7615_mac_wtbl_update_cipher(dev, wcid, cipher, cipher_mask, cmd);
|
||||
- err = mt7615_mac_wtbl_update_key(dev, wcid, key, cipher, cipher_mask,
|
||||
- cmd);
|
||||
+ cipher_mask |= BIT(cipher);
|
||||
+ mt7615_mac_wtbl_update_cipher(dev, wcid, cipher, cipher_mask);
|
||||
+ err = mt7615_mac_wtbl_update_key(dev, wcid, key, cipher, cipher_mask);
|
||||
if (err < 0)
|
||||
return err;
|
||||
|
||||
err = mt7615_mac_wtbl_update_pk(dev, wcid, cipher, cipher_mask,
|
||||
- key->keyidx, cmd);
|
||||
+ key->keyidx);
|
||||
if (err < 0)
|
||||
return err;
|
||||
|
||||
@@ -1367,13 +1340,12 @@ int __mt7615_mac_wtbl_set_key(struct mt7
|
||||
|
||||
int mt7615_mac_wtbl_set_key(struct mt7615_dev *dev,
|
||||
struct mt76_wcid *wcid,
|
||||
- struct ieee80211_key_conf *key,
|
||||
- enum set_key_cmd cmd)
|
||||
+ struct ieee80211_key_conf *key)
|
||||
{
|
||||
int err;
|
||||
|
||||
spin_lock_bh(&dev->mt76.lock);
|
||||
- err = __mt7615_mac_wtbl_set_key(dev, wcid, key, cmd);
|
||||
+ err = __mt7615_mac_wtbl_set_key(dev, wcid, key);
|
||||
spin_unlock_bh(&dev->mt76.lock);
|
||||
|
||||
return err;
|
||||
--- a/mt7615/main.c
|
||||
+++ b/mt7615/main.c
|
||||
@@ -405,18 +405,17 @@ static int mt7615_set_key(struct ieee802
|
||||
|
||||
if (cmd == SET_KEY)
|
||||
*wcid_keyidx = idx;
|
||||
- else if (idx == *wcid_keyidx)
|
||||
- *wcid_keyidx = -1;
|
||||
- else
|
||||
+ else {
|
||||
+ if (idx == *wcid_keyidx)
|
||||
+ *wcid_keyidx = -1;
|
||||
goto out;
|
||||
+ }
|
||||
|
||||
- mt76_wcid_key_setup(&dev->mt76, wcid,
|
||||
- cmd == SET_KEY ? key : NULL);
|
||||
-
|
||||
+ mt76_wcid_key_setup(&dev->mt76, wcid, key);
|
||||
if (mt76_is_mmio(&dev->mt76))
|
||||
- err = mt7615_mac_wtbl_set_key(dev, wcid, key, cmd);
|
||||
+ err = mt7615_mac_wtbl_set_key(dev, wcid, key);
|
||||
else
|
||||
- err = __mt7615_mac_wtbl_set_key(dev, wcid, key, cmd);
|
||||
+ err = __mt7615_mac_wtbl_set_key(dev, wcid, key);
|
||||
|
||||
out:
|
||||
mt7615_mutex_release(dev);
|
||||
--- a/mt7615/mt7615.h
|
||||
+++ b/mt7615/mt7615.h
|
||||
@@ -502,11 +502,9 @@ int mt7615_mac_write_txwi(struct mt7615_
|
||||
void mt7615_mac_set_timing(struct mt7615_phy *phy);
|
||||
int __mt7615_mac_wtbl_set_key(struct mt7615_dev *dev,
|
||||
struct mt76_wcid *wcid,
|
||||
- struct ieee80211_key_conf *key,
|
||||
- enum set_key_cmd cmd);
|
||||
+ struct ieee80211_key_conf *key);
|
||||
int mt7615_mac_wtbl_set_key(struct mt7615_dev *dev, struct mt76_wcid *wcid,
|
||||
- struct ieee80211_key_conf *key,
|
||||
- enum set_key_cmd cmd);
|
||||
+ struct ieee80211_key_conf *key);
|
||||
void mt7615_mac_reset_work(struct work_struct *work);
|
||||
u32 mt7615_mac_get_sta_tid_sn(struct mt7615_dev *dev, int wcid, u8 tid);
|
||||
|
||||
--- a/mt76x02_util.c
|
||||
+++ b/mt76x02_util.c
|
||||
@@ -453,20 +453,20 @@ int mt76x02_set_key(struct ieee80211_hw
|
||||
msta = sta ? (struct mt76x02_sta *)sta->drv_priv : NULL;
|
||||
wcid = msta ? &msta->wcid : &mvif->group_wcid;
|
||||
|
||||
- if (cmd == SET_KEY) {
|
||||
- key->hw_key_idx = wcid->idx;
|
||||
- wcid->hw_key_idx = idx;
|
||||
- if (key->flags & IEEE80211_KEY_FLAG_RX_MGMT) {
|
||||
- key->flags |= IEEE80211_KEY_FLAG_SW_MGMT_TX;
|
||||
- wcid->sw_iv = true;
|
||||
- }
|
||||
- } else {
|
||||
+ if (cmd != SET_KEY) {
|
||||
if (idx == wcid->hw_key_idx) {
|
||||
wcid->hw_key_idx = -1;
|
||||
wcid->sw_iv = false;
|
||||
}
|
||||
|
||||
- key = NULL;
|
||||
+ return 0;
|
||||
+ }
|
||||
+
|
||||
+ key->hw_key_idx = wcid->idx;
|
||||
+ wcid->hw_key_idx = idx;
|
||||
+ if (key->flags & IEEE80211_KEY_FLAG_RX_MGMT) {
|
||||
+ key->flags |= IEEE80211_KEY_FLAG_SW_MGMT_TX;
|
||||
+ wcid->sw_iv = true;
|
||||
}
|
||||
mt76_wcid_key_setup(&dev->mt76, wcid, key);
|
||||
|
||||
--- a/mt7915/main.c
|
||||
+++ b/mt7915/main.c
|
||||
@@ -405,16 +405,15 @@ static int mt7915_set_key(struct ieee802
|
||||
|
||||
mutex_lock(&dev->mt76.mutex);
|
||||
|
||||
- if (cmd == SET_KEY)
|
||||
+ if (cmd == SET_KEY) {
|
||||
*wcid_keyidx = idx;
|
||||
- else if (idx == *wcid_keyidx)
|
||||
- *wcid_keyidx = -1;
|
||||
- else
|
||||
+ } else {
|
||||
+ if (idx == *wcid_keyidx)
|
||||
+ *wcid_keyidx = -1;
|
||||
goto out;
|
||||
+ }
|
||||
|
||||
- mt76_wcid_key_setup(&dev->mt76, wcid,
|
||||
- cmd == SET_KEY ? key : NULL);
|
||||
-
|
||||
+ mt76_wcid_key_setup(&dev->mt76, wcid, key);
|
||||
err = mt7915_mcu_add_key(dev, vif, msta, key, cmd);
|
||||
|
||||
out:
|
||||
--- a/mt7921/main.c
|
||||
+++ b/mt7921/main.c
|
||||
@@ -441,16 +441,15 @@ static int mt7921_set_key(struct ieee802
|
||||
|
||||
mt7921_mutex_acquire(dev);
|
||||
|
||||
- if (cmd == SET_KEY)
|
||||
+ if (cmd == SET_KEY) {
|
||||
*wcid_keyidx = idx;
|
||||
- else if (idx == *wcid_keyidx)
|
||||
- *wcid_keyidx = -1;
|
||||
- else
|
||||
+ } else {
|
||||
+ if (idx == *wcid_keyidx)
|
||||
+ *wcid_keyidx = -1;
|
||||
goto out;
|
||||
+ }
|
||||
|
||||
- mt76_wcid_key_setup(&dev->mt76, wcid,
|
||||
- cmd == SET_KEY ? key : NULL);
|
||||
-
|
||||
+ mt76_wcid_key_setup(&dev->mt76, wcid, key);
|
||||
err = mt7921_mcu_add_key(dev, vif, msta, key, cmd);
|
||||
if (err)
|
||||
goto out;
|
||||
@@ -19,6 +19,7 @@ PKG_BUILD_PARALLEL:=1
|
||||
PKG_INSTALL:=1
|
||||
PKG_FIXUP:=autoreconf
|
||||
PKG_LICENSE:=GPL-2.0-or-later
|
||||
PKG_CPE_ID:=cpe:/a:gmplib:gmp
|
||||
|
||||
PKG_USE_MIPS16:=0
|
||||
|
||||
|
||||
@@ -10,6 +10,7 @@ PKG_HASH:=34b8adc726883d0e85b3118fa13605e179a62b31ba51f676136ecb2d0bc1a887
|
||||
|
||||
PKG_LICENSE:=BSD-4-Clause
|
||||
PKG_LICENSE_FILES:=COPYING
|
||||
PKG_CPE_ID:=cpe:/a:freedesktop:libbsd
|
||||
|
||||
PKG_INSTALL:=1
|
||||
PKG_BUILD_PARALLEL:=1
|
||||
|
||||
@@ -18,6 +18,7 @@ PKG_HASH:=0cd13be008923528687af6c6b860f35392d49251c04ee0648282d36b1faec1cf
|
||||
PKG_MAINTAINER:=Jo-Philipp Wich <jo@mein.io>
|
||||
PKG_LICENSE:=GPL-2.0-or-later
|
||||
PKG_LICENSE_FILES:=COPYING
|
||||
PKG_CPE_ID:=cpe:/a:netfilter:libnetfilter_conntrack
|
||||
|
||||
PKG_INSTALL:=1
|
||||
PKG_BUILD_PARALLEL:=1
|
||||
|
||||
@@ -16,6 +16,7 @@ PKG_SOURCE_URL:=http://www.tcpdump.org/release/
|
||||
PKG_HASH:=635237637c5b619bcceba91900666b64d56ecb7be63f298f601ec786ce087094
|
||||
|
||||
PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>
|
||||
PKG_CPE_ID:=cpe:/a:tcpdump:libpcap
|
||||
|
||||
PKG_ASLR_PIE_REGULAR:=1
|
||||
PKG_BUILD_PARALLEL:=1
|
||||
|
||||
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=openssl
|
||||
PKG_BASE:=1.1.1
|
||||
PKG_BUGFIX:=q
|
||||
PKG_BUGFIX:=v
|
||||
PKG_VERSION:=$(PKG_BASE)$(PKG_BUGFIX)
|
||||
PKG_RELEASE:=1
|
||||
PKG_USE_MIPS16:=0
|
||||
@@ -26,7 +26,7 @@ PKG_SOURCE_URL:= \
|
||||
ftp://ftp.pca.dfn.de/pub/tools/net/openssl/source/ \
|
||||
ftp://ftp.pca.dfn.de/pub/tools/net/openssl/source/old/$(PKG_BASE)/
|
||||
|
||||
PKG_HASH:=d7939ce614029cdff0b6c20f0e2e5703158a489a72b2507b8bd51bf8c8fd10ca
|
||||
PKG_HASH:=d6697e2871e77238460402e9362d47d18382b15ef9f246aba6c7bd780d38a6b0
|
||||
|
||||
PKG_LICENSE:=OpenSSL
|
||||
PKG_LICENSE_FILES:=LICENSE
|
||||
|
||||
@@ -8,11 +8,9 @@ version to disable building the AFALG engine on openwrt targets.
|
||||
|
||||
Signed-off-by: Eneas U de Queiroz <cote2004-github@yahoo.com>
|
||||
|
||||
diff --git a/Configure b/Configure
|
||||
index 5a699836f3..74d057c219 100755
|
||||
--- a/Configure
|
||||
+++ b/Configure
|
||||
@@ -1548,7 +1548,9 @@ unless ($disabled{"crypto-mdebug-backtrace"})
|
||||
@@ -1548,7 +1548,9 @@ unless ($disabled{"crypto-mdebug-backtra
|
||||
|
||||
unless ($disabled{afalgeng}) {
|
||||
$config{afalgeng}="";
|
||||
|
||||
@@ -7,9 +7,6 @@ Targets are named: linux-$(CONFIG_ARCH)-openwrt
|
||||
|
||||
Signed-off-by: Eneas U de Queiroz <cote2004-github@yahoo.com>
|
||||
|
||||
diff --git a/Configurations/25-openwrt.conf b/Configurations/25-openwrt.conf
|
||||
new file mode 100644
|
||||
index 0000000000..86a86d31e4
|
||||
--- /dev/null
|
||||
+++ b/Configurations/25-openwrt.conf
|
||||
@@ -0,0 +1,48 @@
|
||||
|
||||
@@ -8,11 +8,9 @@ OpenSSL_version(OPENSSL_CFLAGS), or running openssl version -a
|
||||
|
||||
Signed-off-by: Eneas U de Queiroz <cote2004-github@yahoo.com>
|
||||
|
||||
diff --git a/crypto/build.info b/crypto/build.info
|
||||
index 2c619c62e8..893128345a 100644
|
||||
--- a/crypto/build.info
|
||||
+++ b/crypto/build.info
|
||||
@@ -10,7 +10,7 @@ EXTRA= ../ms/uplink-x86.pl ../ms/uplink.c ../ms/applink.c \
|
||||
@@ -10,7 +10,7 @@ EXTRA= ../ms/uplink-x86.pl ../ms/uplink
|
||||
ppccpuid.pl pariscid.pl alphacpuid.pl arm64cpuid.pl armv4cpuid.pl
|
||||
|
||||
DEPEND[cversion.o]=buildinf.h
|
||||
|
||||
@@ -7,11 +7,9 @@ This shortens build time.
|
||||
|
||||
Signed-off-by: Eneas U de Queiroz <cote2004-github@yahoo.com>
|
||||
|
||||
diff --git a/Configure b/Configure
|
||||
index 74d057c219..5813e9f8fe 100755
|
||||
--- a/Configure
|
||||
+++ b/Configure
|
||||
@@ -318,7 +318,7 @@ my $auto_threads=1; # enable threads automatically? true by default
|
||||
@@ -318,7 +318,7 @@ my $auto_threads=1; # enable threads
|
||||
my $default_ranlib;
|
||||
|
||||
# Top level directories to build
|
||||
|
||||
@@ -14,8 +14,6 @@ when the client has it on top of its ciphersuite preference.
|
||||
|
||||
Signed-off-by: Eneas U de Queiroz <cote2004-github@yahoo.com>
|
||||
|
||||
diff --git a/include/openssl/ssl.h b/include/openssl/ssl.h
|
||||
index 6724ccf2d2..96d959427e 100644
|
||||
--- a/include/openssl/ssl.h
|
||||
+++ b/include/openssl/ssl.h
|
||||
@@ -173,9 +173,15 @@ extern "C" {
|
||||
@@ -37,11 +35,9 @@ index 6724ccf2d2..96d959427e 100644
|
||||
# else
|
||||
# define TLS_DEFAULT_CIPHERSUITES "TLS_AES_256_GCM_SHA384:" \
|
||||
"TLS_AES_128_GCM_SHA256"
|
||||
diff --git a/ssl/ssl_ciph.c b/ssl/ssl_ciph.c
|
||||
index 27a1b2ec68..7039811323 100644
|
||||
--- a/ssl/ssl_ciph.c
|
||||
+++ b/ssl/ssl_ciph.c
|
||||
@@ -1467,11 +1467,29 @@ STACK_OF(SSL_CIPHER) *ssl_create_cipher_list(const SSL_METHOD *ssl_method,
|
||||
@@ -1465,11 +1465,29 @@ STACK_OF(SSL_CIPHER) *ssl_create_cipher_
|
||||
ssl_cipher_apply_rule(0, SSL_kECDHE, 0, 0, 0, 0, 0, CIPHER_DEL, -1, &head,
|
||||
&tail);
|
||||
|
||||
@@ -71,7 +67,7 @@ index 27a1b2ec68..7039811323 100644
|
||||
|
||||
/*
|
||||
* ...and generally, our preferred cipher is AES.
|
||||
@@ -1527,7 +1545,7 @@ STACK_OF(SSL_CIPHER) *ssl_create_cipher_list(const SSL_METHOD *ssl_method,
|
||||
@@ -1525,7 +1543,7 @@ STACK_OF(SSL_CIPHER) *ssl_create_cipher_
|
||||
* Within each group, ciphers remain sorted by strength and previous
|
||||
* preference, i.e.,
|
||||
* 1) ECDHE > DHE
|
||||
|
||||
@@ -14,8 +14,6 @@ Reviewed-by: Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com>
|
||||
Reviewed-by: Richard Levitte <levitte@openssl.org>
|
||||
(Merged from https://github.com/openssl/openssl/pull/7585)
|
||||
|
||||
diff --git a/crypto/engine/eng_devcrypto.c b/crypto/engine/eng_devcrypto.c
|
||||
index a727c6f646..a2c9a966f7 100644
|
||||
--- a/crypto/engine/eng_devcrypto.c
|
||||
+++ b/crypto/engine/eng_devcrypto.c
|
||||
@@ -461,6 +461,7 @@ struct digest_ctx {
|
||||
@@ -26,7 +24,7 @@ index a727c6f646..a2c9a966f7 100644
|
||||
};
|
||||
|
||||
static const struct digest_data_st {
|
||||
@@ -564,12 +565,15 @@ static int digest_update(EVP_MD_CTX *ctx, const void *data, size_t count)
|
||||
@@ -564,12 +565,15 @@ static int digest_update(EVP_MD_CTX *ctx
|
||||
if (digest_ctx == NULL)
|
||||
return 0;
|
||||
|
||||
@@ -46,7 +44,7 @@ index a727c6f646..a2c9a966f7 100644
|
||||
}
|
||||
|
||||
static int digest_final(EVP_MD_CTX *ctx, unsigned char *md)
|
||||
@@ -579,7 +583,10 @@ static int digest_final(EVP_MD_CTX *ctx, unsigned char *md)
|
||||
@@ -579,7 +583,10 @@ static int digest_final(EVP_MD_CTX *ctx,
|
||||
|
||||
if (md == NULL || digest_ctx == NULL)
|
||||
return 0;
|
||||
|
||||
@@ -13,7 +13,6 @@ Reviewed-by: Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com>
|
||||
Reviewed-by: Richard Levitte <levitte@openssl.org>
|
||||
(Merged from https://github.com/openssl/openssl/pull/7585)
|
||||
|
||||
diff --git a/crypto/engine/eng_devcrypto.c b/crypto/engine/eng_devcrypto.c
|
||||
--- a/crypto/engine/eng_devcrypto.c
|
||||
+++ b/crypto/engine/eng_devcrypto.c
|
||||
@@ -16,6 +16,7 @@
|
||||
@@ -79,7 +78,7 @@ diff --git a/crypto/engine/eng_devcrypto.c b/crypto/engine/eng_devcrypto.c
|
||||
|
||||
/*
|
||||
* Code further down must make sure that only NIDs in the table above
|
||||
@@ -333,19 +367,40 @@ static int cipher_cleanup(EVP_CIPHER_CTX *ctx)
|
||||
@@ -333,19 +367,40 @@ static int cipher_cleanup(EVP_CIPHER_CTX
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -185,7 +184,7 @@ diff --git a/crypto/engine/eng_devcrypto.c b/crypto/engine/eng_devcrypto.c
|
||||
static const EVP_CIPHER *get_cipher_method(int nid)
|
||||
{
|
||||
size_t i = get_cipher_data_index(nid);
|
||||
@@ -438,6 +520,36 @@ static int devcrypto_ciphers(ENGINE *e, const EVP_CIPHER **cipher,
|
||||
@@ -438,6 +520,36 @@ static int devcrypto_ciphers(ENGINE *e,
|
||||
return *cipher != NULL;
|
||||
}
|
||||
|
||||
@@ -246,7 +245,7 @@ diff --git a/crypto/engine/eng_devcrypto.c b/crypto/engine/eng_devcrypto.c
|
||||
|
||||
/*
|
||||
* Code further down must make sure that only NIDs in the table above
|
||||
@@ -516,8 +637,8 @@ static const struct digest_data_st *get_digest_data(int nid)
|
||||
@@ -516,8 +637,8 @@ static const struct digest_data_st *get_
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -257,7 +256,7 @@ diff --git a/crypto/engine/eng_devcrypto.c b/crypto/engine/eng_devcrypto.c
|
||||
*/
|
||||
|
||||
static int digest_init(EVP_MD_CTX *ctx)
|
||||
@@ -630,52 +751,94 @@ static int digest_cleanup(EVP_MD_CTX *ctx)
|
||||
@@ -630,52 +751,94 @@ static int digest_cleanup(EVP_MD_CTX *ct
|
||||
return clean_devcrypto_session(&digest_ctx->sess);
|
||||
}
|
||||
|
||||
@@ -402,7 +401,7 @@ diff --git a/crypto/engine/eng_devcrypto.c b/crypto/engine/eng_devcrypto.c
|
||||
}
|
||||
}
|
||||
|
||||
@@ -739,8 +909,154 @@ static int devcrypto_digests(ENGINE *e, const EVP_MD **digest,
|
||||
@@ -739,7 +909,153 @@ static int devcrypto_digests(ENGINE *e,
|
||||
return *digest != NULL;
|
||||
}
|
||||
|
||||
@@ -478,8 +477,8 @@ diff --git a/crypto/engine/eng_devcrypto.c b/crypto/engine/eng_devcrypto.c
|
||||
+ "DIGESTS",
|
||||
+ "either ALL, NONE, or a comma-separated list of digests to enable [default=ALL]",
|
||||
+ ENGINE_CMD_FLAG_STRING},
|
||||
#endif
|
||||
|
||||
+#endif
|
||||
+
|
||||
+ {0, NULL, NULL, 0}
|
||||
+};
|
||||
+
|
||||
@@ -503,7 +502,7 @@ diff --git a/crypto/engine/eng_devcrypto.c b/crypto/engine/eng_devcrypto.c
|
||||
+ use_softdrivers = i;
|
||||
+#ifdef IMPLEMENT_DIGEST
|
||||
+ rebuild_known_digest_nids(e);
|
||||
+#endif
|
||||
#endif
|
||||
+ rebuild_known_cipher_nids(e);
|
||||
+ return 1;
|
||||
+#endif /* CIOCGSESSINFO */
|
||||
@@ -553,10 +552,9 @@ diff --git a/crypto/engine/eng_devcrypto.c b/crypto/engine/eng_devcrypto.c
|
||||
+ }
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
|
||||
/******************************************************************************
|
||||
*
|
||||
* LOAD / UNLOAD
|
||||
@@ -806,6 +1122,8 @@ void engine_load_devcrypto_int()
|
||||
|
||||
if (!ENGINE_set_id(e, "devcrypto")
|
||||
|
||||
@@ -11,11 +11,9 @@ Reviewed-by: Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com>
|
||||
Reviewed-by: Richard Levitte <levitte@openssl.org>
|
||||
(Merged from https://github.com/openssl/openssl/pull/7585)
|
||||
|
||||
diff --git a/crypto/engine/eng_devcrypto.c b/crypto/engine/eng_devcrypto.c
|
||||
index 5ec38ca8f3..64dc6b891d 100644
|
||||
--- a/crypto/engine/eng_devcrypto.c
|
||||
+++ b/crypto/engine/eng_devcrypto.c
|
||||
@@ -50,16 +50,20 @@ static int use_softdrivers = DEVCRYPTO_DEFAULT_USE_SOFDTRIVERS;
|
||||
@@ -50,16 +50,20 @@ static int use_softdrivers = DEVCRYPTO_D
|
||||
*/
|
||||
struct driver_info_st {
|
||||
enum devcrypto_status_t {
|
||||
@@ -82,7 +80,7 @@ index 5ec38ca8f3..64dc6b891d 100644
|
||||
#endif /* CIOCGSESSINFO */
|
||||
}
|
||||
ioctl(cfd, CIOCFSESSION, &sess.ses);
|
||||
@@ -505,8 +514,11 @@ static void destroy_all_cipher_methods(void)
|
||||
@@ -505,8 +514,11 @@ static void destroy_all_cipher_methods(v
|
||||
{
|
||||
size_t i;
|
||||
|
||||
@@ -95,7 +93,7 @@ index 5ec38ca8f3..64dc6b891d 100644
|
||||
}
|
||||
|
||||
static int devcrypto_ciphers(ENGINE *e, const EVP_CIPHER **cipher,
|
||||
@@ -550,6 +562,40 @@ static int cryptodev_select_cipher_cb(const char *str, int len, void *usr)
|
||||
@@ -550,6 +562,40 @@ static int cryptodev_select_cipher_cb(co
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -190,7 +188,7 @@ index 5ec38ca8f3..64dc6b891d 100644
|
||||
EVP_MD_meth_free(known_digest_methods[i]);
|
||||
known_digest_methods[i] = NULL;
|
||||
goto finish;
|
||||
@@ -894,8 +945,11 @@ static void destroy_all_digest_methods(void)
|
||||
@@ -894,8 +945,11 @@ static void destroy_all_digest_methods(v
|
||||
{
|
||||
size_t i;
|
||||
|
||||
@@ -203,7 +201,7 @@ index 5ec38ca8f3..64dc6b891d 100644
|
||||
}
|
||||
|
||||
static int devcrypto_digests(ENGINE *e, const EVP_MD **digest,
|
||||
@@ -939,6 +993,43 @@ static int cryptodev_select_digest_cb(const char *str, int len, void *usr)
|
||||
@@ -939,6 +993,43 @@ static int cryptodev_select_digest_cb(co
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -247,7 +245,7 @@ index 5ec38ca8f3..64dc6b891d 100644
|
||||
#endif
|
||||
|
||||
/******************************************************************************
|
||||
@@ -983,6 +1074,11 @@ static const ENGINE_CMD_DEFN devcrypto_cmds[] = {
|
||||
@@ -983,6 +1074,11 @@ static const ENGINE_CMD_DEFN devcrypto_c
|
||||
ENGINE_CMD_FLAG_STRING},
|
||||
#endif
|
||||
|
||||
@@ -259,7 +257,7 @@ index 5ec38ca8f3..64dc6b891d 100644
|
||||
{0, NULL, NULL, 0}
|
||||
};
|
||||
|
||||
@@ -1051,6 +1147,13 @@ static int devcrypto_ctrl(ENGINE *e, int cmd, long i, void *p, void (*f) (void))
|
||||
@@ -1051,6 +1147,13 @@ static int devcrypto_ctrl(ENGINE *e, int
|
||||
return 1;
|
||||
#endif /* IMPLEMENT_DIGEST */
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user