Compare commits

...

149 Commits

Author SHA1 Message Date
Hauke Mehrtens
d03dc49943 OpenWrt v19.07.10: adjust config defaults
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2022-04-17 19:35:25 +02:00
Eneas U de Queiroz
9ce6aa9d8d wolfssl: bump to 5.2.0
Fixes two high-severity vulnerabilities:

- CVE-2022-25640: A TLS v1.3 server who requires mutual authentication
  can be bypassed.  If a malicious client does not send the
  certificate_verify message a client can connect without presenting a
  certificate even if the server requires one.

- CVE-2022-25638: A TLS v1.3 client attempting to authenticate a TLS
  v1.3 server can have its certificate heck bypassed. If the sig_algo in
  the certificate_verify message is different than the certificate
  message checking may be bypassed.

Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
Signed-off-by: Petr Štetiar <ynezz@true.cz> [ABI version change]
(cherry picked from commit e89f3e85eb)
(cherry picked from commit 2393b09b59)
2022-04-16 15:13:32 +02:00
Hauke Mehrtens
698cdf0202 mac80211: Update to version 4.19.237-1
This updates mac80211 to version 4.19.237-1 which is based on kernel
4.19.237.

This new release contains many fixes which were merged into the upstream
Linux kernel.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2022-04-11 23:25:53 +02:00
Petr Štetiar
26a8be9c98 kernel: generic: add missing symbol for arm64 spectre mitigation
Upstream in commit 3e3904125fcc ("arm64: Mitigate spectre style branch
history side channels") introduced new config symbol
MITIGATE_SPECTRE_BRANCH_HISTORY which I missed in commit d39a6c67dc
("kernel: bump 4.14 to 4.14.275") and buildworkers for arm64 targets
started complaining:

 Mitigate Spectre style attacks against branch history (MITIGATE_SPECTRE_BRANCH_HISTORY) [Y/n/?] (NEW) aborted!

Fixes: d39a6c67dc ("kernel: bump 4.14 to 4.14.275")
Signed-off-by: Petr Štetiar <ynezz@true.cz>
2022-04-06 19:58:56 +02:00
Petr Štetiar
ae2af91edd kernel: generic: reorder kernel config options
So it's sorted and tidy.

Signed-off-by: Petr Štetiar <ynezz@true.cz>
2022-04-06 19:56:07 +02:00
Petr Štetiar
058c2347c5 imagebuilder: fix broken image generation with external targets
When using external targets there is a symlink being created for the
target under target/linux which then becomes dangling under Image
Builder. Fix it by dereferencing the possible symlink.

Tested on IB with external target, ipq40xx and mvebu.

Signed-off-by: Petr Štetiar <ynezz@true.cz>
(cherry picked from commit 621f39d1f4)
(cherry picked from commit ec9af870f3)
(cherry picked from commit 3008f1f441)
2022-04-05 22:09:35 +02:00
Petr Štetiar
d39a6c67dc kernel: bump 4.14 to 4.14.275
All patches refreshed automagically without conflicts.

Run tested on ipq40xx/glinet-b1300 and mvebu/turris-omnia.

Signed-off-by: Petr Štetiar <ynezz@true.cz>
2022-04-05 14:20:05 +02:00
Petr Štetiar
9aa35fada6 patchelf: backport fix for rpath endianness
This is backport of upstream fix introduced in commit e88d83c8b4e4
("patchelf: Check ELF endianness before writing new runpath") which
fixes broken rpath handling on big endian systems:

 $ patchelf --set-rpath '/opt/foo/bar' lxc4-start
 $ readelf -d lxc4-start
 ...
  0x1d000000 (<unknown>: 1d000000)        0x72f
 ...

Expected output, having following patch applied is:

 $ readelf -d lxc4-start
 ...
  0x0000001d (RUNPATH)                    Library runpath: [/opt/foo/bar]
 ...

Build and runtime tested on mvebu/turris-omnia, ipq40xx/glinet-b1300
and external target xrx500/nec-wx3000hp (MIPS BE).

Signed-off-by: Matthias Van Gestel <matthias.vangestel_ext@softathome.com>
Signed-off-by: Petr Štetiar <ynezz@true.cz>
2022-03-31 10:22:33 +02:00
Petr Štetiar
b24905c38a kernel: bump 4.14 to 4.14.274
All patches refreshed automagically without conflicts.

Run tested on ipq40xx/glinet-b1300 and mvebu/turris-omnia.

Signed-off-by: Petr Štetiar <ynezz@true.cz>
2022-03-28 11:39:18 +02:00
David Bauer
a518a4f786 ath79: fix link for long cables with OCEDO Raccoon
The OCEDO Raccoon had significant packet-loss with cables longer than 50
meter. Disabling EEE restores normal operation.

Also change the ethernet config to reduce loss on sub-1G links.

Signed-off-by: David Bauer <mail@david-bauer.net>
(cherry picked from commit 4551bfd91f)
2022-03-27 23:43:27 +02:00
Petr Štetiar
ea0e521d37 kernel: bump 4.14 to 4.14.273
All patches refreshed automagically without conflicts.

Run tested on ipq40xx/glinet-b1300 and mvebu/turris-omnia.

Signed-off-by: Petr Štetiar <ynezz@true.cz>
2022-03-24 10:48:59 +01:00
Petr Štetiar
0af411f49d zlib: backport security fix for a reproducible crash in compressor
Tavis has just reported, that he was recently trying to track down a
reproducible crash in a compressor. Believe it or not, it really was a
bug in zlib-1.2.11 when compressing (not decompressing!) certain inputs.

Tavis has reported it upstream, but it turns out the issue has been
public since 2018, but the patch never made it into a release. As far as
he knows, nobody ever assigned it a CVE.

Runtime tested on ipq40xx/glinet-b1300 and mvebu/turris-omnia.

Suggested-by: Tavis Ormandy <taviso@gmail.com>
References: https://www.openwall.com/lists/oss-security/2022/03/24/1
Signed-off-by: Petr Štetiar <ynezz@true.cz>
(cherry picked from commit b3aa2909a7)
(cherry picked from commit 3965dda0fa)
(cherry picked from commit f65edc9b99)
2022-03-24 10:02:01 +01:00
Petr Štetiar
565159db57 kernel: bump 4.14 to 4.14.272
Added new config symbol `HARDEN_BRANCH_HISTORY` in order to harden
Spectre style attacks against branch history and fixed rejects in
following patches:

 * generic/hack-4.14/220-gc_sections.patch
 * generic/backport-4.14/306-v4.16-netfilter-remove-saveroute-indirection-in-struct-nf_.patch

Other patches refreshed automagically.

Run tested on ipq40xx/glinet-b1300 and mvebu/turris-omnia.

Signed-off-by: Petr Štetiar <ynezz@true.cz>
2022-03-17 08:47:54 +01:00
Martin Schiller
c5c047f19b openssl: bump to 1.1.1n
This is a bugfix release. Changelog:

  *) Fixed a bug in the BN_mod_sqrt() function that can cause it to loop
     forever for non-prime moduli. (CVE-2022-0778)

  *) Add ciphersuites based on DHE_PSK (RFC 4279) and ECDHE_PSK
     (RFC 5489) to the list of ciphersuites providing Perfect Forward
     Secrecy as required by SECLEVEL >= 3.

Signed-off-by: Martin Schiller <ms@dev.tdt.de>
(cherry picked from commit e17c6ee627)
2022-03-16 16:34:26 +01:00
Rafał Miłecki
6b8407c6da base-files: call "sync" after initial setup
OpenWrt uses a lot of (b)ash scripts for initial setup. This isn't the
best solution as they almost never consider syncing files / data. Still
this is what we have and we need to try living with it.

Without proper syncing OpenWrt can easily get into an inconsistent state
on power cut. It's because:
1. Actual (flash) inode and data writes are not synchronized
2. Data writeback can take up to 30 seconds (dirty_expire_centisecs)
3. ubifs adds extra 5 seconds (dirty_writeback_centisecs) "delay"

Some possible cases (examples) for new files:
1. Power cut during 5 seconds after write() can result in all data loss
2. Power cut happening between 5 and 35 seconds after write() can result
   in empty file (inode flushed after 5 seconds, data flush queued)

Above affects e.g. uci-defaults. After executing some migration script
it may get deleted (whited out) without generated data getting actually
written. Power cut will result in missing data and deleted file.

There are three ways of dealing with that:
1. Rewriting all user-space init to proper C with syncs
2. Trying bash hacks (like creating tmp files & moving them)
3. Adding sync and hoping for no power cut during critical section

This change introduces the last solution that is the simplest. It
reduces time during which things may go wrong from ~35 seconds to
probably less than a second. Of course it applies only to IO operations
performed before /etc/init.d/boot . It's probably the stage when the
most new files get created.

All later changes are usually done using smarter C apps (e.g. busybox or
uci) that creates tmp files and uses rename() that is expected to be
atomic.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Acked-by: Hauke Mehrtens <hauke@hauke-m.de>
Acked-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>
(cherry picked from commit 9851d4b6ce)
2022-03-15 10:15:39 +01:00
Hauke Mehrtens
9ced994057 kernel: bump 4.14 to 4.14.269
All patches refreshed automagically without conflicts.

Compile-tested: lantiq/xrx200, armvirt/64
Run-tested: lantiq/xrx200, armvirt/64

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2022-03-06 20:37:47 +01:00
Matthew Gyurgyik
5ecc7ead48 imagebuilder: fix partition signature
When building images with the imagebuilder, the partition signature
never changes. The signature is generated by hashing SOURCE_DATE_EPOCH
and LINUX_VERMAGIC which are undefined. Prepopulate these variables, as
done by the SDK.

Signed-off-by: Matthew Gyurgyik <matthew@gyurgyik.io>
(cherry picked from commit aab36200e7)
2022-02-27 14:02:27 +01:00
Petr Štetiar
f49eec6335 wolfssl: fix API breakage of SSL_get_verify_result
Backport fix for API breakage of SSL_get_verify_result() introduced in
v5.1.1-stable.  In v4.8.1-stable SSL_get_verify_result() used to return
X509_V_OK when used on LE powered sites or other sites utilizing
relaxed/alternative cert chain validation feature. After an update to
v5.1.1-stable that API calls started returning X509_V_ERR_INVALID_CA
error and thus rendered all such connection attempts imposible:

 $ docker run -it openwrt/rootfs:x86_64-21.02.2 sh -c "wget https://letsencrypt.org"
 Downloading 'https://letsencrypt.org'
 Connecting to 18.159.128.50:443
 Connection error: Invalid SSL certificate

Fixes: #9283
References: https://github.com/wolfSSL/wolfssl/issues/4879
Signed-off-by: Petr Štetiar <ynezz@true.cz>
(cherry picked from commit b9251e3b40)
(cherry picked from commit b99d7aecc8)
2022-02-22 20:32:11 +01:00
Petr Štetiar
cc344f1513 ubus: backport fixes for UAF and other issues
Backporting following fixes:

 a72457b61df0 libubus: increase stack depth for processing obj msgs
 ef038488edc3 libubus: process pending messages in data handler if stack depth is 0
 2099bb3ad997 libubus: use list_empty/list_first_entry in ubus_process_pending_msg

where at least commit 2099bb3ad997 ("libubus: use
list_empty/list_first_entry in ubus_process_pending_msg") fixes UAF
issue I've introduced in commit c5f2053dfcfd ("workaround possibly false
positive uses of memory after it is freed") while fixing another false
positive UAF reported[1] by clang's static analyzer.

Those fixes are being used in master/21.02 for about 6 months, so should
be tested enough and considered for backporting. I've runtested those
fixes on mvebu/turris-omnia and ipq40xx/glinet-b1300 devices.

1. https://openwrt.gitlab.io/-/project/ubus/-/jobs/2096090992/artifacts/build/scan/2022-02-15-150310-70-1/index.html

Signed-off-by: Petr Štetiar <ynezz@true.cz>
2022-02-21 07:41:05 +01:00
Petr Štetiar
31bb27f35b wolfssl: bump to 5.1.1-stable
This is amalgamation of backported changes since 4.7.0-stable release:

 Sergey V. Lobanov (2):

  5b13b0b02c wolfssl: update to 5.1.1-stable
  7d376e6e52 libs/wolfssl: add SAN (Subject Alternative Name) support

 Andre Heider (3):

  3f8adcb215 wolfssl: remove --enable-sha512 configure switch
  249478ec48 wolfssl: always build with --enable-reproducible-build
  4b212b1306 wolfssl: build with WOLFSSL_ALT_CERT_CHAINS

 Ivan Pavlov (1):

  16414718f9 wolfssl: update to 4.8.1-stable

 David Bauer (1):

  f6d8c0cf2b wolfssl: always export wc_ecc_set_rng

 Christian Lamparter (1):

  86801bd3d8 wolfssl: fix Ed25519 typo in config prompt

The diff of security related changes we would need to backport would be
so huge, that there would be a high probability of introducing new
vulnerabilities, so it was decided, that bumping to latest stable
release is the prefered way for fixing following security issues:

 * OCSP request/response verification issue. (fixed in 4.8.0)
 * Incorrectly skips OCSP verification in certain situations CVE-2021-38597 (fixed in 4.8.1)
 * Issue with incorrectly validating a certificate (fixed in 5.0.0)
 * Hang with DSA signature creation when a specific q value is used (fixed in 5.0.0)
 * Client side session resumption issue (fixed in 5.1.0)
 * Potential for DoS attack on a wolfSSL client CVE-2021-44718 (fixed in 5.1.0)
 * Non-random IV values in certain situations CVE-2022-23408 (fixed in 5.1.1)

Cc: Hauke Mehrtens <hauke@hauke-m.de>
Cc: Eneas U de Queiroz <cotequeiroz@gmail.com>
Signed-off-by: Petr Štetiar <ynezz@true.cz>
Acked-by: Hauke Mehrtens <hauke@hauke-m.de>
Acked-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
2022-02-21 07:37:57 +01:00
Thibaut VARÈNE
572a1f9abe ar71xx: fix MikroTik wAP detection
MikroTik released a 3rd revision of that board, virtually identical
to the previous one as far as software is concerned.

Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
Signed-off-by: Petr Štetiar <ynezz@true.cz> [wixed typo]
2022-02-19 20:38:46 +01:00
Hauke Mehrtens
a2482fc3a5 OpenWrt v19.07.9: revert to branch defaults
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2022-02-17 19:43:38 +01:00
Hauke Mehrtens
106382c27c OpenWrt v19.07.9: adjust config defaults
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2022-02-17 19:43:34 +01:00
Petr Štetiar
2a3558b0de kernel: bump 4.14 to 4.14.267
All patches refreshed automagically without conflicts, but test builds
choked on new BPF_UNPRIV_DEFAULT_OFF kernel config symbol introduced in
upstream commit e69f08ba23a3 ("bpf: Add kconfig knob for disabling
unpriv bpf by default").

Run tested on ipq40xx/glinet-b1300 and mvebu/turris-omnia.

Signed-off-by: Petr Štetiar <ynezz@true.cz>
2022-02-16 21:47:59 +01:00
Hauke Mehrtens
3b6ce4f634 kernel: bump 4.14 to 4.14.266
All patches refreshed automagically without conflicts.

Compile-tested: lantiq/xrx200
Run-tested: lantiq/xrx200

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2022-02-13 19:15:45 +01:00
Hauke Mehrtens
e7596ce0b0 hostapd: Apply SAE/EAP-pwd side-channel attack update 2
This fixes some recent security problems in hostapd.
See here for details: https://w1.fi/security/2022-1
* CVE-2022-23303
* CVE-2022-23304

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2022-02-13 19:14:38 +01:00
Hauke Mehrtens
1691c1168d mbedtls: Update to version 2.16.12
This fixes the following security problems:
* Zeroize several intermediate variables used to calculate the expected
  value when verifying a MAC or AEAD tag. This hardens the library in
  case the value leaks through a memory disclosure vulnerability. For
  example, a memory disclosure vulnerability could have allowed a
  man-in-the-middle to inject fake ciphertext into a DTLS connection.
* Fix a double-free that happened after mbedtls_ssl_set_session() or
  mbedtls_ssl_get_session() failed with MBEDTLS_ERR_SSL_ALLOC_FAILED
  (out of memory). After that, calling mbedtls_ssl_session_free()
  and mbedtls_ssl_free() would cause an internal session buffer to
  be free()'d twice. CVE-2021-44732

The sizes of the ipk changed on MIPS 24Kc like this:
182454 libmbedtls12_2.16.11-2_mips_24kc.ipk
182742 libmbedtls12_2.16.12-1_mips_24kc.ipk

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(cherry picked from commit 57f38e2c82)
2022-02-13 18:27:18 +01:00
Rosen Penev
419b9f4c45 mbedtls: update to 2.16.11
Switched to AUTORELEASE to avoid manual increments.

Release notes:
https://github.com/ARMmbed/mbedtls/releases/tag/v2.16.11

Signed-off-by: Rosen Penev <rosenp@gmail.com>
(cherry picked from commit fcfd741eb8)
2022-02-13 18:26:55 +01:00
Hauke Mehrtens
bfa4cccd46 tcpdump: libpcap: Remove http://www.us.tcpdump.org mirror
The http://www.us.tcpdump.org mirror will go offline soon, only use the
normal download URL.

Reported-by: Denis Ovsienko <denis@ovsienko.info>
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(cherry picked from commit 18bdfc803b)
Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com>
[rebased for OpenWrt 21.02 branch]
(cherry picked from commit 4dddb7ca36)
2022-02-13 10:51:47 +01:00
Hauke Mehrtens
e92a4e5458 tcpdump: Fix CVE-2018-16301
This fixes the following security problem:
The command-line argument parser in tcpdump before 4.99.0 has a buffer
overflow in tcpdump.c:read_infile(). To trigger this vulnerability the
attacker needs to create a 4GB file on the local filesystem and to
specify the file name as the value of the -F command-line argument of
tcpdump.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(cherry picked from commit 8f5875c4e2)
(cherry picked from commit 59e7ae8d65)
2022-02-13 08:55:02 +01:00
Petr Štetiar
606106fb29 kernel: bump 4.14 to 4.14.265
All patches refreshed automagically without conflicts.

Run tested on ipq40xx/glinet-b1300 and mvebu/turris-omnia.

Signed-off-by: Petr Štetiar <ynezz@true.cz>
2022-02-10 13:27:06 +01:00
Paul Spooren
524cbcf6f5 build: store SOURCE_DATE_EPOCH in JSON info files
The source date epoch is the only reproducible date close to the actual
build date. It can be used for tooling like the firmware wizard to show
the image age.

Signed-off-by: Paul Spooren <mail@aparcar.org>
(cherry picked from commit 165f0b00cd)
[store source_date_epoch as integer]
Signed-off-by: Paul Spooren <mail@aparcar.org>
2022-02-01 12:52:20 +01:00
Petr Štetiar
57293f51c4 kernel: bump 4.14 to 4.14.264
All patches refreshed automagically without conflicts.

Run tested on ipq40xx/glinet-b1300 and mvebu/turris-omnia.

Signed-off-by: Petr Štetiar <ynezz@true.cz>
2022-01-31 11:52:40 +01:00
Petr Štetiar
974161d7f8 kernel: bump 4.14 to 4.14.262
All patches refreshed automagically without conflicts.

Run tested on ipq40xx/glinet-b1300 and mvebu/turris-omnia.

Signed-off-by: Petr Štetiar <ynezz@true.cz>
2022-01-18 14:50:02 +01:00
Eneas U de Queiroz
b50eb70e01 openssl: bump to 1.1.1m
This is a bugfix release.  Changelog:

  *) Avoid loading of a dynamic engine twice.
  *) Fixed building on Debian with kfreebsd kernels
  *) Prioritise DANE TLSA issuer certs over peer certs
  *) Fixed random API for MacOS prior to 10.12

Patches were refreshed.

Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
(cherry picked from commit 5beaa75d94)
2022-01-16 18:52:58 +01:00
Petr Štetiar
5369ceb787 kernel: bump 4.14 to 4.14.261
All patches refreshed automagically without conflicts.

Run tested on ipq40xx/glinet-b1300 and mvebu/turris-omnia.

Signed-off-by: Petr Štetiar <ynezz@true.cz>
2022-01-06 15:31:19 +01:00
Petr Štetiar
81d0b4a9f4 kernel: bump 4.14 to 4.14.259
All patches refreshed automagically without conflicts, but upstream in
commit 48c2461f28fe ("ARM: 8800/1: use choice for kernel unwinders")
added new config options UNWINDER_ARM and UNWINDER_FRAME_POINTER so we
need to adjust default configs as well.

Run tested on ipq40xx/glinet-b1300 and mvebu/turris-omnia.

Signed-off-by: Petr Štetiar <ynezz@true.cz>
Acked-by: Hauke Mehrtens <hauke@hauke-m.de>
2021-12-29 08:52:36 +01:00
Petr Štetiar
1d94f72439 kernel: bump 4.14 to 4.14.258
Rebased patches:

 * generic: 273-batman-adv-Convert-packet.h-to-uapi-header.patch
 * ipq806x: 0065-arm-override-compiler-flags.patch
 * mvebu: 513-arm64-dts-marvell-armada37xx-Add-emmc-sdio-pinctrl-d.patch

Removed patches:

 Fixed upstream:

   * ar71xx: 821-serial-core-add-support-for-boot-console-with-arbitr.patch
   * ath79: 921-serial-core-add-support-for-boot-console-with-arbitr.patch
     - in 4.14.256 via 9112e7ef87149b3d8093e7446d784117f6e18d69

   * mvebu: 527-PCI-aardvark-allow-to-specify-link-capability.patch
     - in 4.14.257 via 62a3dc9b65a2b24800fc4267b8cf590fad135034

   * mvebu: 524-PCI-aardvark-set-host-and-device-to-the-same-MAX-payload-size.patch
     - should be hopefully fixed by the bunch of changes in .256 and .257

Run tested on ipq40xx/glinet-b1300 and mvebu/turris-omnia.

Fixes: CVE-2021-3640
Signed-off-by: Petr Štetiar <ynezz@true.cz>
2021-12-19 08:23:23 +01:00
Hauke Mehrtens
cc8c1be438 mac80211: Update to version 4.19.221
The following patch was backported from upstream before and is not
needed any more:
  package/kernel/mac80211/patches/ath/980-ath10k-fix-max-antenna-gain-unit.patch

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2021-12-14 23:38:30 +01:00
Roman Yeryomin
554f1b89aa iproute2: m_xt.so depends on dynsyms.list
When doing parallel build on a fast machine with bottleneck in i/o,
m_xt.so may start linking faster than dynsyms.list gets populated,
resulting in error:

ld:dynsyms.list:0: syntax error in dynamic list

Fix this by adding dynsyms.list as make dependency to m_xt.so
Described also here:
https://bugs.openwrt.org/index.php?do=details&task_id=3353

Change from v1:
- add dynsysms.list dependancy only when shared libs are enabled

Signed-off-by: Roman Yeryomin <roman@advem.lv>
Fixes: FS#3353
(cherry-picked from commit edd53df168)
2021-12-14 23:38:30 +01:00
Mathias Kresin
f14bc5cf56 uboot-lantiq: danube: fix hanging lzma kernel uncompression #2
Follow up to commit 8fb714edd6. Managed to
hit the very same issue again while playing with the NOR SPL builds.

Signed-off-by: Mathias Kresin <dev@kresin.me>
2021-11-27 22:55:25 +01:00
Mathias Kresin
8fb714edd6 uboot-lantiq: danube: fix hanging lzma kernel uncompression
At least since gcc 7.3.0 (OpenWrt 18.06) lwr/lwl are used in the
assembly of LzmaProps_Decode. While the decission made by the compiler
looks perfect fine, it triggers some obscure hang on lantiq danube-s
v1.5 with MX29LV640EB NOR flash chips.

Only if the offset 1 is used, the hang can be observed. Using any other
offset works fine:

  lwl s0,0(a1) - s0 == 0x6d000080
  lwl s0,1(a1) - hangs
  lwl s0,2(a1) - s0 == 0x0080xxxx
  lwl s0,3(a1) - s0 == 0x80xxxxxx

It isn't clear whether it is a limitation of the flash chip, the EBU or
something else.

Force 8bit reads to prevent gcc optimizing the read with lwr/lwl
instructions.

Signed-off-by: Mathias Kresin <dev@kresin.me>
2021-11-14 21:36:15 +01:00
Christian Lamparter
b5b526285a wireless-regdb: update to version 2021.08.28
e983a25 Update regulatory rules for Ecuador (EC)
a0bcb88 wireless-regdb: Update regulatory rules for Norway (NO) on 6 and 60 GHz
cdf854d wireless-regdb: Update regulatory rules for Germany (DE) on 6GHz
86cba52 wireless-regdb: reduce bandwidth for 5730-5850 and 5850-5895 MHz in US
6fa2384 wireless-regdb: remove PTMP-ONLY from 5850-5895 MHz for US
9839e1e wireless-regdb: recent FCC report and order allows 5850-5895 immediately
42dfaf4 wireless-regdb: update 5725-5850 MHz rule for GB

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
(cherry picked from commit dbb4c47798)
2021-11-07 19:49:57 +01:00
Felix Fietkau
a5c479a200 wireless-regdb: update to version 2021.04.21
Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry picked from commit d76535c45e)
2021-11-07 19:49:57 +01:00
Rosen Penev
b9f866825f tools/m4: update to 1.4.19
Remove upstreamed patches.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
(cherry picked from commit fc9682ed39)
2021-11-07 19:49:57 +01:00
Hauke Mehrtens
662fe6a6ee kernel: bump 4.14 to 4.14.254
All updated automatically.

Compile-tested on: malta/le, lantiq/xrx200
Runtime-tested on: malta/le, lantiq/xrx200

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2021-11-07 19:49:50 +01:00
Koen Vandeputte
5e8b9624f1 ar71xx: mikrotik: rb91x: fix 10M ethernet link speed
Extensive testing on the board showed that ethernet does
not work when forced to 10Mbps.

Trial-and-error revealed that the correct PLL value
should be altered to 0x00001313 (iso 0x00001616)

The change is done for this specific board only as I do not have
other boards using this specific SoC.

The board now works correctly in 1000, 100 and 10 Mode

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
2021-10-12 11:03:02 +02:00
Alan Swanson
c72ea2a6c7 uboot-lantiq: fix sha1.h header clash when system libmd installed
Backport of u-boot commit "includes: move openssl headers to include/u-boot"
2b9912e6a7

Fixes: FS#3955
Signed-off-by: Alan Swanson <reiver@improbability.net>
(cherry picked from commit 8db6410492)
2021-10-02 17:41:26 +02:00
Hauke Mehrtens
93a48cb1a0 kernel: bump 4.14 to 4.14.248
All updated automatically.

Compile-tested on: lantiq/xrx200, armvirt/64
Runtime-tested on: lantiq/xrx200, armvirt/64

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2021-10-02 16:11:47 +02:00
Hauke Mehrtens
123d12eada mac80211: Update to backports-4.19.207-1
Refresh all patches.

This contains fixes for CVE-2020-3702

1. These patches (ath, ath9k, mac80211)  were included in kernel
versions since 4.14.245 and 4.19.205. They fix security vulnerability
CVE-2020-3702 [1] similar to KrØØk, which was found by ESET [2].

Thank you Josef Schlehofer for reporting this problem.

[1] https://nvd.nist.gov/vuln/detail/CVE-2020-3702
[2] https://www.welivesecurity.com/2020/08/06/beyond-kr00k-even-more-wifi-chips-vulnerable-eavesdropping/

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2021-09-22 23:23:57 +02:00
Petr Štetiar
31a2d41d64 sdk: fix missing include directories
It's not possible to compile some applications which are using
`-Werror=missing-include-dirs` compiler flags with the SDK as some
target directories are missing in the SDK tarball:

 cc1: error: staging_dir/target/usr/include: No such file or directory [-Werror=missing-include-dirs]
 cc1: error: staging_dir/target/include: No such file or directory [-Werror=missing-include-dirs]

Fix this by adding the missing directories in the SDK.

Signed-off-by: Petr Štetiar <ynezz@true.cz>
(cherry picked from commit ec0ec0428e)
2021-09-22 10:41:24 +02:00
Luis Araneda
556d165dda uboot-zynq: fix dtc compilation on host gcc 10
gcc 10 defaults to -fno-common, which causes an error
when linking.

Back-port the following Linux kernel commit to fix it:
e33a814e772c (scripts/dtc: Remove redundant YYLOC global declaration)

Tested on an Arch Linux host with gcc 10.1.0

Signed-off-by: Luis Araneda <luaraneda@gmail.com>
(cherry picked from commit 8b870418f1)
2021-09-13 13:06:02 +02:00
Sven Eckelmann
f33dc315cb uboot-tegra: Fix build with GCC-10 as host compiler
The package uses the host compiler to build the dtc binary. With gcc-10,
the option -fno-common is now the default behavior. Thus multiple
definitions of the same variable are now forbidden and results in following
error during linking:

  HOSTLD  scripts/dtc/dtc
  /usr/bin/ld: scripts/dtc/dtc-parser.tab.o:(.bss+0x10): multiple definition of `yylloc'; scripts/dtc/dtc-lexer.lex.o:(.bss+0x0): first defined here
  collect2: error: ld returned 1 exit status

The easiest workaround is to add the upstream commit 018921ee79d3 ("Remove
redundant YYLOC global declaration").

Signed-off-by: Sven Eckelmann <sven@narfation.org>
2021-09-13 13:06:02 +02:00
Sven Eckelmann
f31bb35b63 uboot-mvebu: Fix build with GCC-10 as host compiler
The package uses the host compiler to build the dtc binary. With gcc-10,
the option -fno-common is now the default behavior. Thus multiple
definitions of the same variable are now forbidden and results in following
error during linking:

  HOSTLD  scripts/dtc/dtc
  /usr/bin/ld: scripts/dtc/dtc-parser.tab.o:(.bss+0x10): multiple definition of `yylloc'; scripts/dtc/dtc-lexer.lex.o:(.bss+0x0): first defined here
  collect2: error: ld returned 1 exit status

The easiest workaround is to add the upstream commit 018921ee79d3 ("Remove
redundant YYLOC global declaration").

Signed-off-by: Sven Eckelmann <sven@narfation.org>
2021-09-13 13:06:02 +02:00
Hauke Mehrtens
e8cf46ebba uboot-layerscape: fix dtc compilation on host gcc 10
Backport a patch from upstream U-Boot to fix the compile with host GCC 10.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(cherry picked from commit 8d143784cb)
2021-09-13 13:06:02 +02:00
Sven Eckelmann
d059ce28f5 uboot-kirkwood: Fix build with GCC-10 as host compiler
The package uses the host compiler to build the dtc binary. With gcc-10,
the option -fno-common is now the default behavior. Thus multiple
definitions of the same variable are now forbidden and results in following
error during linking:

  HOSTLD  scripts/dtc/dtc
  /usr/bin/ld: scripts/dtc/dtc-parser.tab.o:(.bss+0x10): multiple definition of `yylloc'; scripts/dtc/dtc-lexer.lex.o:(.bss+0x0): first defined here
  collect2: error: ld returned 1 exit status

The easiest workaround is to add the upstream commit 018921ee79d3 ("Remove
redundant YYLOC global declaration").

Signed-off-by: Sven Eckelmann <sven@narfation.org>
2021-09-13 13:06:02 +02:00
Sven Eckelmann
af5c8856f8 uboot-sunxi: Fix build with GCC-10 as host compiler
The package uses the host compiler to build the dtc binary. With gcc-10,
the option -fno-common is now the default behavior. Thus multiple
definitions of the same variable are now forbidden and results in following
error during linking:

  HOSTLD  scripts/dtc/dtc
  /usr/bin/ld: scripts/dtc/dtc-parser.tab.o:(.bss+0x10): multiple definition of `yylloc'; scripts/dtc/dtc-lexer.lex.o:(.bss+0x0): first defined here
  collect2: error: ld returned 1 exit status

The easiest workaround is to add the upstream commit 018921ee79d3 ("Remove
redundant YYLOC global declaration").

Signed-off-by: Sven Eckelmann <sven@narfation.org>
2021-09-13 13:06:02 +02:00
David Bauer
9882a54c48 kernel: bump 4.14 to 4.14.245
Compile-tested: ath79-generic
Run-tested: ath79-generic

Signed-off-by: David Bauer <mail@david-bauer.net>
2021-09-02 22:30:34 +02:00
Eneas U de Queiroz
fdea0036a2 openssl: bump to 1.1.1l
This version fixes two vulnerabilities:
  - SM2 Decryption Buffer Overflow (CVE-2021-3711)
    Severity: High

  - Read buffer overruns processing ASN.1 strings (CVE-2021-3712)
    Severity: Medium

Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
2021-08-30 17:15:37 +02:00
Eneas U de Queiroz
40c03b101c openssl: use --cross-compile-prefix in Configure
This sets the --cross-compile-prefix option when running Configure, so
that that it will not use the host gcc to figure out, among other
things, compiler defines.  It avoids errors, if the host 'gcc' is
handled by clang:

mips-openwrt-linux-musl-gcc: error: unrecognized command-line option
'-Qunused-arguments'

Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
Tested-by: Rosen Penev <rosenp@gmail.com>
(cherry picked from commit 2f75348923)
2021-08-30 17:15:37 +02:00
David Bauer
9d082556fe kernel: bump to 4.14.244
Compile-tested: ath79-generic ipq40xx-generic
Run-tested: ipq40xx-generic

Signed-off-by: David Bauer <mail@david-bauer.net>
2021-08-20 01:01:13 +02:00
David Bauer
7378c94927 kernel: bump to 4.14.243
Compile-tested: x86-64
Run-tested: x86-64

Signed-off-by: David Bauer <mail@david-bauer.net>
2021-08-14 14:49:18 +02:00
Hauke Mehrtens
cfc1602a1e OpenWrt v19.07.8: revert to branch defaults
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2021-08-01 18:46:20 +02:00
Hauke Mehrtens
31f2f76cd5 OpenWrt v19.07.8: adjust config defaults
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2021-08-01 18:45:59 +02:00
Petr Štetiar
ef56c85848 ubus: update to version 2021-07-01
This update cherry picks following fix:

 * ubusd: fix tx_queue linked list usage

Signed-off-by: Petr Štetiar <ynezz@true.cz>
2021-07-29 21:50:28 +02:00
Petr Štetiar
796bf50e8e ubus: update to version 2021-06-03
This update cherry picks following changes:

 * cmake: add a possibility to set library version
 * ubusd: protect against too-short messages
 * ubusd: add per-client tx queue limit
 * ubusd: convert tx_queue to linked list
 * lua: avoid truncation of large numeric values

Fixes: FS#1525
Signed-off-by: Petr Štetiar <ynezz@true.cz>
2021-07-29 21:50:28 +02:00
Petr Štetiar
92e341d632 ubus: backport SOVERSION support
Add a support for setting of new `ABIVERSION` CMake define which allows
to control the SOVERSION used for the built shared library. This is
needed for downstream packaging to properly track breaking ABI changes
when updating to newer versions of the library.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
Signed-off-by: Petr Štetiar <ynezz@true.cz>
(backported from commit 8edb1797d5)
2021-07-29 21:50:28 +02:00
David Bauer
e902d11de9 kernel: bump 4.14 to 4.14.241
Refreshed all patches

Compile-tested: ath79-generic brcm2708-bcm2708
Run-tested: ath79-generic brcm2708-bcm2708

Signed-off-by: David Bauer <mail@david-bauer.net>
2021-07-28 17:23:36 +02:00
Michael Yartys
ceb8821a3d ath10k-ct: add security fixes
This rebases -ct changes on top of upstream stable kernel's latest code.
Including the wifi security fixes that recently went in.

Removed upstreamed 203-ath10k-Limit-available-channels-via-DT-ieee80211-fre.patch
and refreshed patches.

Signed-off-by: Michael Yartys <michael.yartys@protonmail.com>
Signed-off-by: Petr Štetiar <ynezz@true.cz> [backport]
(backported from commit 2e10ed925e)
2021-07-02 17:15:44 +02:00
Paul Spooren
71fa524e1b base-files: fix /tmp/TZ when zoneinfo not installed
The zoneinfo packages are not installed per default so neither
/tmp/localtime nor /tmp/TZ is generated.

This patch mostly reverts the previous fix and instead incooperates a
solution suggested by Jo.

Fixes "base-files: fix zoneinfo support " 8af62ed

Signed-off-by: Paul Spooren <mail@aparcar.org>
(cherry picked from commit 56bdb6bb97)
2021-06-25 14:56:48 -10:00
Rosen Penev
c88bdb8294 base-files: fix zoneinfo support
The system init script currently sets /tmp/localinfo when zoneinfo is
populated. However, zoneinfo has spaces in it whereas the actual files
have _ instead of spaces. This made the if condition never return true.

Example failure when removing the if condition:

/tmp/localtime -> /usr/share/zoneinfo/America/Los Angeles

This file does not exist. America/Los_Angeles does.

Ran through shfmt -w -ci -bn -sr -s

Signed-off-by: Rosen Penev <rosenp@gmail.com>
(cherry picked from commit 8af62ede18)
2021-06-23 15:44:30 -10:00
Ali MJ Al-Nasrawy
15612706c9 mac80211: distance config: allow "auto" as a value
The user can now enable the ACK timeout estimation algorithm (dynack)
for drivers that support it.
It is also expected that the distance config accepts the same values as:
$ iw phyX set distance XXX

Signed-off-by: Ali MJ Al-Nasrawy <alimjalnasrawy@gmail.com>
(cherry picked from commit a8a1ef8568)
2021-06-23 12:10:41 -10:00
Koen Vandeputte
ec76c365c1 gitignore: add .ccache folder
Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
2021-06-14 11:52:25 +02:00
Koen Vandeputte
bdd7faca8d kernel: bump 4.14 to 4.14.236
Refreshed all patches.

Fixes:
- CVE-2021-3564

Compile-tested on: ar71xx, cns3xxx, imx6, x86_64
Runtime-tested on: ar71xx, cns3xxx, imx6

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
2021-06-14 11:52:25 +02:00
Hauke Mehrtens
ffd4452f8b mac80211: Update to backports version 4.19.193-test1
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2021-06-06 17:57:56 +02:00
Hauke Mehrtens
ccc505502e kernel: bump 4.14 to 4.14.235
Manually rebased
  ramips/patches-5.4/0048-asoc-add-mt7620-support.patch

All others updated automatically.

Compile-tested on: ath79/generic, ramips/mt7621
Runtime-tested on: ath79/generic

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2021-06-06 17:57:39 +02:00
Jo-Philipp Wich
1153773c78 ubox: fix init script validation of log_ip option
The underlying logread process uses usock() to handle remote connections
which is able to handle both hostnames and IP addresses.

Ref: https://github.com/openwrt/luci/issues/5077
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(backported from commit ec83fb9ced)
2021-05-28 15:26:31 +02:00
Hauke Mehrtens
a1ee0ebbd8 tools/mklibs: Fix compile with GCC 11
GCC 11 defaults to C++17, but mklibs does not compile when using the
C++17 standard. This patch switches back to the gnu++98 version like
done in master commit 9437012b9e ("tools/mklibs: update to 0.1.44 and
convert to Python 3")

This fixes the following compile error message:
elf.hpp:52:56: error: ISO C++17 does not allow dynamic exception specifications
   52 |       const section &get_section(unsigned int i) const throw (std::out_of_range) { return *sections.at(i); };

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2021-05-16 23:55:26 +02:00
Hauke Mehrtens
84c5dbcf2a openwrt-keyring: Only copy sign key for 19.07 and 21.02
Instead of adding all public signature keys from the openwrt-keyring
repository only add the key which is used to sign the OpenWrt 19.07
feeds and the 21.02 feeds to allow checking the next release.

If one of the other keys would be compromised this would not affect
users of 19.07 release builds.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2021-05-16 15:34:49 +02:00
Petr Štetiar
c07c98d28e openwrt-keyring: add OpenWrt 21.02 GPG/usign keys
49283916005d usign: add 21.02 release build pubkey
bc4d80f064f2 gpg: add OpenWrt 21.02 signing key

Signed-off-by: Petr Štetiar <ynezz@true.cz>
(cherry picked from commit 1bf6d70e60)
2021-05-16 15:34:20 +02:00
Koen Vandeputte
e10830193c generic: platform/mikrotik: release mtd device after use
The code uses get_mtd_device_nm() which must be followed by a call to
put_mtd_device() once the handle is no longer used.

This fixes spurious shutdown console messages such as:
[   83.099037] Removing MTD device #1 (hard_config) with use count 1

Reported-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
Tested-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
[Backported from master]
Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
2021-05-12 11:42:31 +02:00
Koen Vandeputte
f342de468b kernel: bump 4.14 to 4.14.232
Refreshed all patches.

Fixes:
- CVE-2021-23133

Compile-tested on: ar71xx, cns3xxx, imx6, x86_64
Runtime-tested on: ar71xx, cns3xxx, imx6

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
2021-05-10 14:51:57 +02:00
Bas Mevissen
ded3ad3c2f Extend checks on build prerequisites for building OpenWRT core
OpenWRT requires a number of Perl modules to be installed. It wasn't checking on all of them.
This patch adds checks for Perl FindBin, File::Copy, File::Compare and Thread::Queue modules.

Failing to install these, will have the build break at some point. By adding these to the
prereq-build.mk script, they are checked on forehand.

Tested on a Fedora 33 and 34 (beta) that was freshly installed. Fedora appears to
break up Perl modules into small packages that need to be installed for the build to succeed.

Signed-off-by: Bas Mevissen <abuse@basmevissen.nl>
(cherry picked from commit f68c9474ac)
2021-05-08 12:51:54 +02:00
Rosen Penev
5bec393fcb prereq-build: test for perl's Data::Dumper
Required for installation of autoconf:

make[5]: Entering directory `/openwrt/build_dir/host/autoconf-2.69'
Making all in bin
make[6]: Entering directory `/openwrt/build_dir/host/autoconf-2.69/bin'
autom4te_perllibdir='..'/lib AUTOM4TE_CFG='../lib/autom4te.cfg'
../bin/autom4te -B '..'/lib -B '..'/lib         --language M4sh --cache
 '' --melt ./autoconf.as -o autoconf.in

Can't locate Data/Dumper.pm in @INC (@INC contains: ../lib
/usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl
/usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at
../lib/Autom4te/C4che.pm line 33.
BEGIN failed--compilation aborted at ../lib/Autom4te/C4che.pm line 33.
Compilation failed in require at ../bin/autom4te line 40.
BEGIN failed--compilation aborted at ../bin/autom4te line 40.
make[6]: *** [autoconf.in] Error 2

Signed-off-by: Rosen Penev <rosenp@gmail.com>
(cherry picked from commit dc467eac38)
2021-05-08 12:50:49 +02:00
Petr Štetiar
a2728a806a tplink-safeloader: fix C7v5 factory flashing from vendor fw > v1.1.x
Currently it's not possible to flash factory images on devices shipped
with vendor firmware versions 1.1.0 Build 20201120 rel. 50406 (published
2020-12-22):

 (curFw_ver, newFw_ver) == (1.1, 1.0) [NM_Error](nm_checkSoftVer) 00848: Firmwave not supports, check failed.
 [NM_Error](nm_checkUpdateContent) 01084: software version dismatched
 [NM_Error](nm_buildUpgradeStruct) 01188: checkUpdateContent failed.

They've even following note in release notes:

 Note: You will be unable to downgrade to the previous firmware version
       after updating this firmware.

This version check in vendor firmware is implemented in
/usr/bin/nvrammanager binary likely as following C code[1]:

 sscanf(buf, "%d.%d.%*s",&upd_fw_major, &upd_fw_minor);
 ...
 if (((int)upd_fw_major < (int)cur_fw_major) ||
     ((ret = 1, cur_fw_major == upd_fw_major && (upd_fw_minor < (int)cur_fw_minor)))) {
       ret = 0;
       printf("[NM_Error](%s) %05d: Firmwave not supports, check failed.\r\n\r\n","nm_checkSoftVer" ,0x350);
 }
 ...
 return ret;

So in order to fix this and make it future proof it should be enough to
ship our factory firmware images with major version 7 (lucky number).

Tested on latest firmware version 1.1.2 Build 20210125 rel.37999:

 Firmwave supports, check OK.
  (curFw_ver, newFw_ver) == (1.1, 7.0) check firmware ok!

Flashing back to vendor firmware
c7v5_us-up-ver1-1-2-P1[20210125-rel37999]_2021-01-25_10.33.55.bin works
as well:

 U-Boot 1.1.4-gbec22107-dirty (Nov 18 2020 - 18:19:12)
 ...
 Firmware downloaded... filesize = 0xeeae77 fileaddr = 0x80060000.
 Firmware Recovery file length : 15642231
 Firmware process id 2.
 handle_fw_cloud 146
 Image verify OK!
 Firmware file Verify ok!
 product-info:product_name:Archer C7
 product_ver:5.0.0
 special_id:55530000
 [Error]sysmgr_cfg_checkSupportList(): 1023 @ specialId 45550000 NOT Match.
 Firmware supports, check OK.
 Firmware Recovery check ok!

1. https://gist.github.com/ynezz/2e0583647d863386a66c3d231541b6d1

Signed-off-by: Petr Štetiar <ynezz@true.cz>
(cherry picked from commit e6d66375cb)
Signed-off-by: Petr Štetiar <ynezz@true.cz>
2021-05-06 09:55:07 +02:00
Hauke Mehrtens
1b5a45a4a7 mac80211: Update to backports version 4.19.189-1
The removed patches were applied upstream.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2021-05-04 01:07:17 +02:00
Hauke Mehrtens
a883e3af38 dropbear: Fix CVE-2020-36254
This backports a fix from dropbear 2020.81.
CVE-2020-36254 description:
scp.c in Dropbear before 2020.79 mishandles the filename of . or an empty filename, a related issue to CVE-2018-20685.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2021-05-03 20:08:53 +02:00
David Bauer
08ef2073d4 ramips: backport unlocked mdiobus accessors
Commit 718e97c5c8 ("ramips: mt7530 swconfig: fix race condition in
register access") backports a fix which depends on unlocked MMD
accessors, however these were not yet included in Kernel 4.14 and they
were not backported yet.

Fixes commit 718e97c5c8 ("ramips: mt7530 swconfig: fix race condition in register access")

Signed-off-by: David Bauer <mail@david-bauer.net>
2021-05-03 00:43:20 +02:00
Magnus Kroken
7198ae4cf3 openvpn: update to 2.4.11
Fixes two related security vulnerabilities (CVE-2020-15078) which under
very specific circumstances allow tricking a server using delayed
authentication (plugin or management) into returning a PUSH_REPLY before
the AUTH_FAILED message, which can possibly be used to gather
information about a VPN setup.

This release also includes other bug fixes and improvements.

Signed-off-by: Magnus Kroken <mkroken@gmail.com>
2021-05-02 14:43:52 +02:00
Magnus Kroken
a8beddcd34 openvpn: update to 2.4.9
This is primarily a maintenance release with bugfixes and improvements.
This release also fixes a security issue (CVE-2020-11810) which allows
disrupting service of a freshly connected client that has not yet
negotiated session keys. The vulnerability cannot be used to
inject or steal VPN traffic.

Release announcement:
https://openvpn.net/community-downloads/#heading-13812
Full list of changes:
https://community.openvpn.net/openvpn/wiki/ChangesInOpenvpn24#OpenVPN2.4.9

Signed-off-by: Magnus Kroken <mkroken@gmail.com>
(cherry-picked from commit d7e98bd7c5)
2021-05-02 14:43:52 +02:00
Magnus Kroken
f82ddf9024 openvpn: update to 2.4.8
Backport two upstream commits that allow building
openvpn-openssl without OpenSSLs deprecated APIs.

Full changelog:
https://community.openvpn.net/openvpn/wiki/ChangesInOpenvpn24#OpenVPN2.4.8

Signed-off-by: Magnus Kroken <mkroken@gmail.com>
(cherry-picked from commit bf43e5bbf9)
2021-05-02 14:43:52 +02:00
DENG Qingfang
718e97c5c8 ramips: mt7530 swconfig: fix race condition in register access
[ Upstream commit f99c9cd9c4 ]

The mt7530_{r,w}32 operation over MDIO uses 3 mdiobus operations and
does not hold a lock, which causes a race condition when multiple
threads try to access a register, they may get unexpected results.

To avoid this, handle the MDIO lock manually, and use the unlocked
__mdiobus_{read,write} in the critical section.

This fixes the "Ghost VLAN" artifact[1] in MT7530/7621 when the VLAN
operation and the swconfig LED link status poll race between each other.

[1] https://forum.openwrt.org/t/mysterious-vlan-ids-on-mt7621-device/64495

Signed-off-by: DENG Qingfang <dqfext@gmail.com>
(cherry picked from commit f99c9cd9c4)
2021-05-02 14:43:09 +02:00
Martin Schiller
8788e86245 ppp/pppoe-discovery: fix -W option
This patch is already included in ppp-2.4.9 which is used in openwrt
master.

Backport this patch to openwrt-19.07.

Signed-off-by: Martin Schiller <ms@dev.tdt.de>
2021-05-02 14:43:09 +02:00
Koen Vandeputte
4398a35067 kernel: bump 4.14 to 4.14.231
Refreshed all patches.

Fixes:
- CVE-2020-25672
- CVE-2020-25671
- CVE-2020-25670

Compile-tested on: ar71xx, cns3xxx, imx6, x86_64
Runtime-tested on: ar71xx, cns3xxx, imx6

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
2021-04-30 10:56:39 +02:00
Koen Vandeputte
906f560e79 kernel: bump 4.14 to 4.14.230
Refreshed all patches.

Remove upstreamed:
- 840-can-flexcan-flexcan_chip_freeze-fix-chip-freeze-for-.patch

Compile-tested on: ar71xx, cns3xxx, imx6, x86_64
Runtime-tested on: ar71xx, cns3xxx, imx6

Signed-off-by: Koen Vandeputte <koen.vandeputte@citymesh.com>
2021-04-30 10:56:39 +02:00
Koen Vandeputte
cc0b70467d mac80211: backport upstream fixes
Refreshed all patches.
Includes all fixes up to 4.19.184

Signed-off-by: Koen Vandeputte <koen.vandeputte@citymesh.com>
2021-04-09 15:43:38 +02:00
Koen Vandeputte
2c46ba4356 kernel: backport fix for flexcan bug
This patch fixes a DIV/0 error which was introduced in 4.14.225
This patch was forgotten in upstream <= 4.14 and is now queued for
future release.

Signed-off-by: Koen Vandeputte <koen.vandeputte@citymesh.com>
2021-04-09 15:43:38 +02:00
Koen Vandeputte
7f3ec4ce39 kernel: bump 4.14 to 4.14.229
Refreshed all patches.

Compile-tested on: ar71xx, cns3xxx, imx6, x86_64
Runtime-tested on: ar71xx, cns3xxx, imx6

Signed-off-by: Koen Vandeputte <koen.vandeputte@citymesh.com>
2021-04-09 15:43:38 +02:00
Koen Vandeputte
273ded68b8 kernel: bump 4.14 to 4.14.228
Refreshed all patches.

Compile-tested on: ar71xx, cns3xxx, imx6, x86_64
Runtime-tested on: ar71xx, cns3xxx, imx6

Signed-off-by: Koen Vandeputte <koen.vandeputte@citymesh.com>
2021-04-09 15:43:38 +02:00
Koen Vandeputte
c43c434b58 kernel: bump 4.14 to 4.14.227
Refreshed all patches.

Altered patches:
- 809-flexcan-support-layerscape.patch

Compile-tested on: ar71xx, cns3xxx, imx6, layerscape, x86_64
Runtime-tested on: ar71xx, cns3xxx, imx6

Signed-off-by: Koen Vandeputte <koen.vandeputte@citymesh.com>
2021-04-09 15:43:38 +02:00
Eneas U de Queiroz
81266d9001 openssl: bump to 1.1.1k
This version fixes 2 security vulnerabilities, among other changes:

 - CVE-2021-3450: problem with verifying a certificate chain when using
   the X509_V_FLAG_X509_STRICT flag.

 - CVE-2021-3449: OpenSSL TLS server may crash if sent a maliciously
   crafted renegotiation ClientHello message from a client.

Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
(cherry picked from commit 0bd0de7d43)
2021-03-27 07:44:43 +01:00
Petr Štetiar
6165bb0d60 openssl: sync package download URLs with master
Apparently it fixes some broken URLs and as a bonus it makes
cherry-picking of fixes easier.

Signed-off-by: Petr Štetiar <ynezz@true.cz>
2021-03-27 07:42:14 +01:00
Magnus Kroken
c336db7a78 mbedtls: update to 2.16.10
This release of Mbed TLS provides bug fixes and minor enhancements. This
release includes fixes for security issues.

Security fixes:
* Fix a buffer overflow in mbedtls_mpi_sub_abs()
* Fix an errorneous estimation for an internal buffer in
mbedtls_pk_write_key_pem()
* Fix a stack buffer overflow with mbedtls_net_poll() and
mbedtls_net_recv_timeout()
* Guard against strong local side channel attack against base64 tables
by making access aceess to them use constant flow code

Full release announcement:
https://github.com/ARMmbed/mbedtls/releases/tag/v2.16.10

Signed-off-by: Magnus Kroken <mkroken@gmail.com>
(cherry picked from commit dbde2bcf60)
2021-03-27 07:35:25 +01:00
Daniel Golle
616fff2a94 mwlwifi: add PKG_FLAGS:=nonshared
This should fix the problem of mwlwifi-firmware-* not being found
when using the ImageBuilder.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
(cherry picked from commit 9b3aaf1cdb)
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2021-03-24 20:56:30 +00:00
Petr Štetiar
dce6b118eb scripts: bundle-libraries.sh: fix broken SDK compiler
Recent versions (> 5.33) of `file` report liblto_plugin.so as
executable:

 $ file liblto_plugin.so
 liblto_plugin.so.0.0.0: ELF 64-bit LSB pie executable ...

Which then leads to improper packaging of the plugin, resulting in the
broken compiler:

 configure: checking whether the C compiler works
 mips-openwrt-linux-musl/bin/ld: liblto_plugin.so: error loading plugin: liblto_plugin.so: invalid ELF header

As the LTO compiler plugin library is incorrectly packaged as SDK
executable:

 $ head -1 ~/staging_dir/toolchain...libexec/gcc/.../liblto_plugin.so
 #!/usr/bin/env bash

Fix this by filtering out shared libraries from the patching.

Ref: https://bugzilla.redhat.com/show_bug.cgi?id=1296868
Acked-by: Jo-Philipp Wich <jo@mein.io>
Signed-off-by: Petr Štetiar <ynezz@true.cz>
(cherry picked from commit 4b7165722c)
2021-03-20 13:44:44 +01:00
Eneas U de Queiroz
afdd5dcd0d build: reduce number of files passed to ipk-remove
Instead of using xargs to pass a huge number of files to
script/ipkg-remove, which will usually pick only one, use a more
restrictive wildcard so that, currently, at the most 325 files are
examined, instead of up to over 2,300.  The 325-file package is python,
which is picking up python3* ipks.  It is about to be removed.
Runner-up is ddns-scripts with 7 files.

This makes a second run of make package/luci/compile go from
real 16.40s; user 17.42s; sys 2.73s
to
real 10.71s; user 9.51s; sys 1.27s

There is a caveat though: if one were to remove the ABI_VERSION of a
package that ends in a digit [0-9], then the old package ipk will not be
removed from the bin directory by make package/abc2/clean.

Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
(cherry picked from commit 11192484fa)
2021-03-19 11:48:34 +01:00
Eneas U de Queiroz
1fcd833c9a build: call ipkg-remove using xargs if #args>=512
The wildcard call to clean up luci package (luci*) can pick up over
2,300 files when the full tree is built. Running make package/luci/clean
or a second run of make package/luci/compile would fail with an
'Argument list too long' error.

To avoid that, a maybe_use_xargs function was created that runs the
command straight as usual if the number of arguments is < 512, or saves
the list in a temporary file and feeds it to xargs otherwise.

Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
(cherry picked from commit 78d1f3ac61)
2021-03-19 11:48:31 +01:00
Eneas U de Queiroz
33df82be36 build: package-ipkg: avoid calling wildcard twice
Instead of calling $(wildcard) to check if the removal list is empty,
then calling it again to actually remove the files, define a function so
that the arguments are expanded only once when it gets called.

Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
(cherry picked from commit 40acc13ca7)
2021-03-19 11:48:28 +01:00
Koen Vandeputte
3402334413 kernel: bump 4.14 to 4.14.224
Refreshed all patches.

Compile-tested on: ar71xx, cns3xxx, imx6, x86_64
Compile-tested on: ar71xx, cns3xxx, imx6

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
2021-03-10 13:55:56 +01:00
Koen Vandeputte
55e9d87754 kernel: bump 4.14 to 4.14.223
Refreshed all patches.

Compile-tested on: ar71xx, cns3xxx, imx6, x86_64
Runtime-tested on: ar71xx, cns3xxx, imx6

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
2021-03-10 13:55:56 +01:00
Eneas U de Queiroz
c64742a96e wolfssl: bump to v4.7.0-stable
Biggest fix for this version is CVE-2021-3336, which has already been
applied here.  There are a couple of low severity security bug fixes as
well.

Three patches are no longer needed, and were removed; the one remaining
was refreshed.

This tool shows no ABI changes:
https://abi-laboratory.pro/index.php?view=objects_report&l=wolfssl&v1=4.6.0&v2=4.7.0

Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
(cherry picked from commit d1dfb577f1)
2021-03-06 15:48:43 +01:00
Stefan Lippers-Hollmann
4b19b2db78 hostapd: P2P: Fix a corner case in peer addition based on PD Request
p2p_add_device() may remove the oldest entry if there is no room in the
peer table for a new peer. This would result in any pointer to that
removed entry becoming stale. A corner case with an invalid PD Request
frame could result in such a case ending up using (read+write) freed
memory. This could only by triggered when the peer table has reached its
maximum size and the PD Request frame is received from the P2P Device
Address of the oldest remaining entry and the frame has incorrect P2P
Device Address in the payload.

Fix this by fetching the dev pointer again after having called
p2p_add_device() so that the stale pointer cannot be used.

This fixes the following security vulnerabilities/bugs:

- CVE-2021-27803 - A vulnerability was discovered in how p2p/p2p_pd.c
  in wpa_supplicant before 2.10 processes P2P (Wi-Fi Direct) provision
  discovery requests. It could result in denial of service or other
  impact (potentially execution of arbitrary code), for an attacker
  within radio range.

Fixes: 17bef1e97a50 ("P2P: Add peer entry based on Provision Discovery Request")
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
Signed-off-by: Stefan Lippers-Hollmann <s.l-h@gmx.de>
(cherry picked from commit 1ca5de13a1)
2021-03-06 15:48:43 +01:00
Petr Štetiar
0a08a9a2b4 build: fix checks for GCC11
Fedora 34 already uses GCC11.

Reported-by: Marcin Juszkiewicz <marcin-openwrt@juszkiewicz.com.pl>
Signed-off-by: Petr Štetiar <ynezz@true.cz>
(cherry picked from commit cae69d5581)
2021-03-06 15:48:03 +01:00
Adrian Schmutzler
a5672f6b96 Revert "base-files: source functions.sh in /lib/functions/system.sh"
This reverts commit 86aeac4fc9.

The reverted commit introduced a cyclic dependency between
/lib/functions.sh and /lib/functions/system.sh. Further details
are found in 282e817350 ("base-files: do not source system.sh
in functions.sh"), which was applied to master some time ago and
is included in 21.02.

With the current age of 19.07 branch, it seems safer to revert this
mostly cosmetic feature than investing further time into disentangling
the dependencies.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2021-03-01 22:33:20 +01:00
Koen Vandeputte
b4a4d04b91 kernel: bump 4.14 to 4.14.222
Refreshed all patches.

Compile-tested on: ar71xx, cns3xxx, imx6, x86_64
Runtime-tested on: ar71xx, cns3xxx, imx6

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
2021-02-26 10:11:21 +01:00
Adrian Schmutzler
86aeac4fc9 base-files: source functions.sh in /lib/functions/system.sh
The file /lib/functions/system.sh depends on find_mtd_index() and
find_mtd_part() located in /lib/function.sh, so let's source that
file.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
(backported from commit ae636effd2)
2021-02-24 18:05:02 +01:00
Raphaël Mélotte
e9c0c5021c hostapd: backport ignoring 4addr mode enabling error
This is a backport of the upstream commit 58bbbb598144 ("nl80211: Ignore
4addr mode enabling error if it was already enabled").

 nl80211_set_4addr_mode() could fail when trying to enable 4addr mode on
 an interface that is in a bridge and has 4addr mode already enabled.
 This operation would not have been necessary in the first place and this
 failure results in disconnecting, e.g., when roaming from one backhaul
 BSS to another BSS with Multi AP.

 Avoid this issue by ignoring the nl80211 command failure in the case
 where 4addr mode is being enabled while it has already been enabled.

Signed-off-by: Raphaël Mélotte <raphael.melotte@mind.be>
[bump PKG_RELEASE, more verbose commit description]
Signed-off-by: Petr Štetiar <ynezz@true.cz>
(cherry picked from commit fb860b4e41)
2021-02-20 10:57:43 +01:00
Stijn Segers
a36d2ee310 ramips: remove factory image for TP-Link Archer C20 v1
Similarly to the Archer C2 v1, the Archer C20 v1 will brick when one
tries to flash an OpenWrt factory image through the TP-Link web UI.
The wiki page contains an explicit warning about this [1].

Disable the factory image altogether since it serves no purpose.

[1] https://openwrt.org/toh/tp-link/tp-link_archer_c20_v1#installation

Signed-off-by: Stijn Segers <foss@volatilesystems.org>
(backported from commit 0265cba40a)
2021-02-19 20:13:26 +01:00
Mathias Kresin
6aef4bc7c3 lantiq: fritz7320: enable USB power supply
The USB ports if a FRIZZ!Box 7320 do not supply power to connected
devices.

Add the GPIOs enabling USB power as regulator, to enable USB power
supply as soon as the USB driver is loaded.

Fixes FS#3624

Signed-off-by: Mathias Kresin <dev@kresin.me>
(cherry picked from commit 6e4e97b2256327bb380ee2a83da9a1ddf657e395)
2021-02-18 00:21:30 +01:00
Eneas U de Queiroz
6bf5bfc19f openssl: bump to 1.1.1j
This fixes 4 security vulnerabilities/bugs:

- CVE-2021-2839 - SSLv2 vulnerability. Openssl 1.1.1 does not support
  SSLv2, but the affected functions still exist. Considered just a bug.

- CVE-2021-2840 - calls EVP_CipherUpdate, EVP_EncryptUpdate and
  EVP_DecryptUpdate may overflow the output length argument in some
  cases where the input length is close to the maximum permissable
  length for an integer on the platform. In such cases the return value
  from the function call will be 1 (indicating success), but the output
  length value will be negative.

- CVE-2021-2841 - The X509_issuer_and_serial_hash() function attempts to
  create a unique hash value based on the issuer and serial number data
  contained within an X509 certificate. However it was failing to
  correctly handle any errors that may occur while parsing the issuer
  field (which might occur if the issuer field is maliciously
  constructed). This may subsequently result in a NULL pointer deref and
  a crash leading to a potential denial of service attack.

- Fixed SRP_Calc_client_key so that it runs in constant time. This could
  be exploited in a side channel attack to recover the password.

The 3 CVEs above are currently awaiting analysis.

Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
(cherry picked from commit 482c9ff289)
2021-02-17 09:28:22 +01:00
Hauke Mehrtens
f44153038e OpenWrt v19.07.7: revert to branch defaults
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2021-02-16 23:30:33 +01:00
Hauke Mehrtens
d5ae565873 OpenWrt v19.07.7: adjust config defaults
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2021-02-16 23:30:28 +01:00
Koen Vandeputte
c4a6851c72 kernel: bump 4.14 to 4.14.221
Refreshed all patches.

Remove upstreamed hunk in:
- 302-dts-support-layerscape.patch

Compile-tested on: ar71xx, cns3xxx, imx6, x86_64
Runtime-tested on: ar71xx, cns3xxx, imx6

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
2021-02-15 16:22:37 +01:00
Baptiste Jonglez
f8b849103d ramips: ethernet: Disable TSO support to improve stability
Stability of this Ethernet driver has been a long-standing issue, with
many people reporting frequent "transmit queue timeouts" and even
occasional crashes.

Disabling TSO in the driver helps with stability, although it is likely a
workaround and might not fix the issue completely.

There is a slight slowdown in forwarding performance for TCP packets
(75 kpps vs. 80 kpps with comparable CPU utilization), but this is still
enough to forward close to 1 Gbit/s of full-sized packets across multiple
flows.

Master is using a different ethernet driver, so this is not a backport.
Because of this different driver, the upcoming 21.02 release does not seem
to be affected by these stability issues.

Thanks to mrakotiq for the initial patch.

Fixes: FS#2628
Signed-off-by: Baptiste Jonglez <git@bitsofnetworks.org>
2021-02-15 10:12:59 +01:00
David Bauer
fec1aa6dfb mt76: update to the latest version
5c768de mt76: mt76x0: disable GTK offloading

Signed-off-by: David Bauer <mail@david-bauer.net>
2021-02-15 01:21:54 +01:00
Kurt Roeckx
224fa47bf9 ramips: mark toggle input on EX6150 as a switch
The Netgear EX6150 has an Access Point/Extender switch. Set it as
an EV_SW. Otherwise when it's set to Access Point, it will trigger
failsafe mode during boot.

Fixes: FS#3590
Signed-off-by: Kurt Roeckx <kurt@roeckx.be>
(cherry picked from commit 539966554d)
2021-02-15 00:02:23 +01:00
Hauke Mehrtens
3a05aa17db mac80211: Remove 357-mac80211-optimize-skb-resizing.patch
This patch was adapted to apply on top of some stable changes, but we
are not sure if this is working correctly. Felix suggested to remove
this patch for now.

Fixes: 0a59e2a76e ("mac80211: Update to version 4.19.161-1")
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2021-02-14 20:27:50 +01:00
Stijn Segers
171d8bce0c ramips: remove factory image for TP-Link Archer C2 v1
Initial commit 8375623a06 ("ramips: add support for TP-Link Archer
C2") contains detailed installation instructions, which do not mention
a factory image. From what I can see, no support to install OpenWrt
through the vendor web interface has been added since. The factory
image is also conspicuously absent from the device page in the wiki.
Yet, it is available for download.

I bricked my Archer C2 loading the factory image through the web UI.
Serial showed this error during bootloop:

  Uncompressing Kernel Image ... LZMA ERROR 1 - must RESET board to recover

This patch disables the undocumented factory image so users won't get
tricked into thinking easy web UI flashing actually works.

Signed-off-by: Stijn Segers <foss@volatilesystems.org>
(backported from commit ad5e29d38a)
2021-02-14 18:56:05 +01:00
Adrian Schmutzler
2eb8444363 ath79: fix USB power GPIO for TP-Link TL-WR810N v1
The TP-Link TL-WR810N v1 is known to cause soft-brick on ath79 and
work fine for ar71xx [1]. On closer inspection, the only apparent
difference is the GPIO used for the USB regulator, which deviates
between the two targets.

This applies the value from ar71xx to ath79.

Tested successfully by a forum user.

[1] https://forum.openwrt.org/t/tp-link-tl-wr810n-v1-ath79/48267

Fixes: cdbf2de777 ("ath79: Add support for TP-Link WR810N")
Fixes: FS#3522

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
(cherry picked from commit 6934d30cf8)
2021-02-12 00:02:05 +01:00
Hauke Mehrtens
d5a8e85878 wolfssl: Backport fix for CVE-2021-3336
This should fix CVE-2021-3336:
DoTls13CertificateVerify in tls13.c in wolfSSL through 4.6.0 does not
cease processing for certain anomalous peer behavior (sending an
ED22519, ED448, ECC, or RSA signature without the corresponding
certificate).

The patch is backported from the upstream wolfssl development branch.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(cherry picked from commit 1f559cafe5)
2021-02-10 00:23:45 +01:00
Daniel González Cabanelas
cf5e5204d9 bcm63xx: sprom: override the PCI device ID
The PCI device ID detected by the wifi drivers on devices using a fallback
SPROM is wrong. Currently the chipnum is used for this parameter.

Most SSB based Broadcom wifi chips are 2.4 and 5GHz capable. But on
devices without a physical SPROM, the only one way to detect if the device
suports both bands or only the 5GHz band, is by reading the device ID from
the fallback SPROM.

In some devices, this may lead to a non working wifi on a 5GHz-only card,
or in the best case a working 2.4GHz-only in a dual band wifi card.

The offset for the deviceid in SSB SPROMs is 0x0008, whereas in BCMA is
0x0060. This is true for any SPROM version.

Override the PCI device ID with the one defined at the fallback SPROM, to
detect the correct wifi card model and allow using the 5GHz band if
supported.

The patch has been tested with the following wifi radios:

BCM43222: b43: both 2.4/5GHz working
          brcm-wl: both 2.4/5GHz working

BCM43225: b43: 2.4GHz, working
	 brcmsmac: working
	 brcm-wl: it lacks support

BCM43217: b43: 2.4GHz, working
	 brcmsmac: it lacks support
	 brcm-wl: it lacks support

Signed-off-by: Daniel González Cabanelas <dgcbueu@gmail.com>
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>

Backported from a0e0e621ca
2021-02-07 19:08:08 +01:00
Koen Vandeputte
4465b44fc1 kernel: bump 4.14 to 4.14.219
Refreshed all patches.

Compile-tested on: ar71xx, cns3xxx, imx6, x86_64
Runtime-tested on: ar71xx, cns3xxx, imx6

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
2021-02-05 09:30:47 +01:00
Daniel González Cabanelas
4b9ade65ec bcm63xx: R5010UNv2: fix flash partitions for 16MB flash
The router Nucom R5010UN v2 has the partitions defined for a 8MB flash,
but the flash chip is 16MB size. We are wasting half of the flash.

Fix it and use generic names for partitions.

Fixes: 474cde6123 ("brcm63xx: probe SPI flash through DT")

Signed-off-by: Daniel González Cabanelas <dgcbueu@gmail.com>
(cherry picked from commit cef9e5a49f)
2021-02-04 22:19:13 +01:00
Daniel Golle
ab9cb390be hostapd: fix P2P group information processing vulnerability
A vulnerability was discovered in how wpa_supplicant processing P2P
(Wi-Fi Direct) group information from active group owners.
This issue was discovered by fuzz testing of wpa_supplicant by Google's
OSS-Fuzz.

https://w1.fi/security/2020-2/wpa_supplicant-p2p-group-info-processing-vulnerability.txt

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
[added the missing patch]
Signed-off-by: Petr Štetiar <ynezz@true.cz>
(cherry-picked from commit 7c8c4f1be6)
2021-02-04 09:19:29 +01:00
Baptiste Jonglez
1e90091c5d opkg: update to latest git HEAD of branch openwrt-19.07
c5dccea libopkg: fix md5sum calculation
7cad0c0 opkg_verify_integrity: better logging and error conditions
14d6480 download: purge cached packages that have incorrect checksum
456efac download: factor out the logic for building cache filenames
b145030 libopkg: factor out checksum and size verification
74bac7a download: remove compatibility with old cache naming scheme

Fixes: FS#2690

Signed-off-by: Baptiste Jonglez <git@bitsofnetworks.org>
2021-02-03 22:37:31 +01:00
Koen Vandeputte
312c05611b kernel: bump 4.14 to 4.14.218
Refreshed all patches.

Compile-tested on: ar71xx, cns3xxx, imx6, x86_64
Runtime-tested on: ar71xx, cns3xxx, imx6

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
2021-02-02 11:52:31 +01:00
Felix Fietkau
3100649458 wolfssl: enable HAVE_SECRET_CALLBACK
Fixes wpad-wolfssl build

Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry picked from commit 55e23f2c02)
2021-02-02 10:09:37 +01:00
Hauke Mehrtens
e9d2aa9dc6 wolfssl: Fix hostapd build with wolfssl 4.6.0
This fixes the following build problem in hostapd:
mipsel-openwrt-linux-musl/bin/ld: /builder/shared-workdir/build/tmp/ccN4Wwer.ltrans7.ltrans.o: in function `crypto_ec_point_add':
<artificial>:(.text.crypto_ec_point_add+0x170): undefined reference to `ecc_projective_add_point'
mipsel-openwrt-linux-musl/bin/ld: <artificial>:(.text.crypto_ec_point_add+0x18c): undefined reference to `ecc_map'
mipsel-openwrt-linux-musl/bin/ld: /builder/shared-workdir/build/tmp/ccN4Wwer.ltrans7.ltrans.o: in function `crypto_ec_point_to_bin':
<artificial>:(.text.crypto_ec_point_to_bin+0x40): undefined reference to `ecc_map'

Fixes: ba40da9045 ("wolfssl: Update to v4.6.0-stable")
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(cherry picked from commit e7d0d2e9dc)
2021-02-02 10:09:19 +01:00
Eneas U de Queiroz
2044c01de8 wolfssl: Update to v4.6.0-stable
This version fixes a large number of bugs and fixes CVE-2020-36177.

Full changelog at:
https://www.wolfssl.com/docs/wolfssl-changelog/
or, as part of the version's README.md:
https://github.com/wolfSSL/wolfssl/blob/v4.6.0-stable/README.md

Due a number of API additions, size increases from 374.7K to 408.8K for
arm_cortex_a9_vfpv3-d16.  The ABI does not change from previous version.

Backported patches were removed; remaining patch was refreshed.

Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
[added reference to CVE]
Signed-off-by: Petr Štetiar <ynezz@true.cz>
(cherry picked from commit ba40da9045)
2021-02-02 10:08:11 +01:00
Petr Štetiar
5ac0b2b431 mvebu: omnia: make initramfs image usable out of the box
Currently it's not possible to boot the device with just initramfs image
without additional effort as the initramfs image doesn't contain device
tree.  Fix it by producing FIT based image which could be booted with
following commands:

 setenv bootargs earlyprintk console=ttyS0,115200
 tftpboot ${kernel_addr_r} openwrt-mvebu-cortexa9-cznic_turris-omnia-initramfs-kernel.bin
 bootm ${kernel_addr_r}

Acked-by: Klaus Kudielka <klaus.kudielka@gmail.com>
Reviewed-by: Tomasz Maciej Nowak <tmn505@gmail.com>
Signed-off-by: Petr Štetiar <ynezz@true.cz>
(cherry-picked from commit 337ff74894)
2021-02-02 10:06:04 +01:00
David Bauer
a7a207e18b mt76: update to the latest version
4ba1709 mt76: mt7603: add additional EEPROM chip ID

Signed-off-by: David Bauer <mail@david-bauer.net>
2021-02-01 13:09:37 +01:00
Hauke Mehrtens
1ce5008597 wireguard: Fix compile with kernel 4.14.217
Backport a patch from wireguard to fix a compile problem with kernel
4.14.217.

Fixes: 2ecb22dc51 ("kernel: bump 4.14 to 4.14.217")
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2021-01-29 21:12:43 +01:00
Hauke Mehrtens
2ecb22dc51 kernel: bump 4.14 to 4.14.217
Refreshed all patches.

Compile-tested on: ipq40xx, lantiq/xrx200, x86/64, ipq806x
Runtime-tested on: ipq40xx, lantiq/xrx200, x86/64

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2021-01-25 23:18:42 +01:00
Hauke Mehrtens
11f4918ebb dnsmasq: backport fixes
This should fix some error messages shown in the log like this one:
dnsmasq[16020]: failed to send packet: Network unreachable
dnsmasq[16020]: failed to send packet: Address family not supported by protocol

Fixes: e87c0d934c ("dnsmasq: Update to version 2.83")
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2021-01-24 17:42:53 +01:00
Hans Dedecker
9999c87d3a netifd: fix IPv6 routing loop on point-to-point links
753c351 interface-ip: add unreachable route if address is offlink

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
2021-01-21 21:06:20 +01:00
Hans Dedecker
250dbb3a60 odhcp6c: fix IPv6 routing loop on point-to-point links
64e1b4e ra: fix routing loop on point to point links
f16afb7 ra: align ifindex resolving

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
2021-01-21 21:06:20 +01:00
Koen Vandeputte
d816c6cd31 kernel: bump 4.14 to 4.14.216
Refreshed all patches.

Compile-tested on: ar71xx, cns3xxx, imx6, x86_64
Runtime-tested on: ar71xx, cns3xxx, imx6

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
2021-01-21 15:36:18 +01:00
Paul Spooren
c21d59dc11 imagebuilder: pass IB=1 on checking requirements
The patch 4a1a58a3  build, imagebuilder: Do not require libncurses-dev
was supposed to remove libncurses as a requirement for the ImageBuilder.
However as the IB=1 is only exported during building, not for checking
requirements, it did never actually work.

This commit export IB=1 to the requirement check.

Signed-off-by: Paul Spooren <mail@aparcar.org>
(cherry picked from commit 4f38063640)
2021-01-19 12:59:49 -10:00
Hauke Mehrtens
6fc02f2a45 OpenWrt v19.07.6: revert to branch defaults
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2021-01-19 15:12:28 +01:00
421 changed files with 4156 additions and 2134 deletions

1
.gitignore vendored
View File

@@ -28,3 +28,4 @@ TAGS*~
git-src
.project
.cproject
.ccache

View File

@@ -1,5 +1,5 @@
src-git packages https://git.openwrt.org/feed/packages.git^ce5a4eaea218111350e05ea86de8171344a70ce4
src-git luci https://git.openwrt.org/project/luci.git^6ba9740b61a3ca89355ae1b08f0456617e0ce3c0
src-git routing https://git.openwrt.org/feed/routing.git^02b4dbfcb7b8f8b566940847d22d5a6f229d2e66
src-git telephony https://git.openwrt.org/feed/telephony.git^6e019c94d0fa7162548d528bf4ba060a61f8cb59
src-git freifunk https://github.com/freifunk/openwrt-packages.git^73454e6fe1bdc902c69ca0079d979fdb94d6fb1f
src-git packages https://git.openwrt.org/feed/packages.git^1c5e4c80f49bfddaee1998636fd8efe915fee7fc
src-git luci https://git.openwrt.org/project/luci.git^786ebc9c014efed4df0d67b140b2348a58d99f5b
src-git routing https://git.openwrt.org/feed/routing.git^33254957df8d148631a98c49a5b623f996d8d6fc
src-git telephony https://git.openwrt.org/feed/telephony.git^c6bff940c0d3e73eac0d8ec62bf1e86f1c3cbefe
src-git freifunk https://github.com/freifunk/openwrt-packages.git^944ff29d953a0de7e7fcca7b0907f7d7486b7b4c

View File

@@ -532,6 +532,7 @@ define Device/Build/image
@mkdir -p $$(shell dirname $$@)
DEVICE_ID="$(DEVICE_NAME)" \
BIN_DIR="$(BIN_DIR)" \
SOURCE_DATE_EPOCH=$(SOURCE_DATE_EPOCH) \
IMAGE_NAME="$(IMAGE_NAME)" \
IMAGE_TYPE=$(word 1,$(subst ., ,$(2))) \
IMAGE_FILESYSTEM="$(1)" \

View File

@@ -6,9 +6,9 @@ ifdef CONFIG_TESTING_KERNEL
KERNEL_PATCHVER:=$(KERNEL_TESTING_PATCHVER)
endif
LINUX_VERSION-4.14 = .215
LINUX_VERSION-4.14 = .275
LINUX_KERNEL_HASH-4.14.215 = 9a844e290c61b39dd23df507ba1d9c2b2b4365e5993a978b19f1eb5610b926da
LINUX_KERNEL_HASH-4.14.275 = 100a9960fb2d8e079c9feeef640715a7fb749ed728a57e427f9e2443212e58f9
remove_uri_prefix=$(subst git://,,$(subst http://,,$(subst https://,,$(1))))
sanitize_uri=$(call qstrip,$(subst @,_,$(subst :,_,$(subst .,_,$(subst -,_,$(subst /,_,$(1)))))))

View File

@@ -18,6 +18,18 @@ IPKG_REMOVE:= \
IPKG_STATE_DIR:=$(TARGET_DIR)/usr/lib/opkg
# Generates a make statement to return a wildcard for candidate ipkg files
# 1: package name
define gen_ipkg_wildcard
$(1)$$(if $$(filter -%,$$(ABIV_$(1))),,[^a-z-])*
endef
# 1: package name
# 2: candidate ipk files
define remove_ipkg_files
$(if $(strip $(2)),$(IPKG_REMOVE) $(1) $(2))
endef
# 1: package name
# 2: variable name
# 3: variable suffix
@@ -184,7 +196,8 @@ $(_endef)
$$(IPKG_$(1)) : export DESCRIPTION=$$(Package/$(1)/description)
$$(IPKG_$(1)) : export PATH=$$(TARGET_PATH_PKG)
$(PKG_INFO_DIR)/$(1).provides $$(IPKG_$(1)): $(STAMP_BUILT) $(INCLUDE_DIR)/package-ipkg.mk
@rm -rf $$(IDIR_$(1)) $$(if $$(call opkg_package_files,$(1)*),; $$(IPKG_REMOVE) $(1) $$(call opkg_package_files,$(1)*))
@rm -rf $$(IDIR_$(1)); \
$$(call remove_ipkg_files,$(1),$$(call opkg_package_files,$(call gen_ipkg_wildcard,$(1))))
mkdir -p $(PACKAGE_DIR) $$(IDIR_$(1))/CONTROL $(PKG_INFO_DIR)
$(call Package/$(1)/install,$$(IDIR_$(1)))
$(if $(Package/$(1)/install-overlay),mkdir -p $(PACKAGE_DIR) $$(IDIR_$(1))/rootfs-overlay)
@@ -252,7 +265,7 @@ $(_endef)
@[ -f $$(IPKG_$(1)) ]
$(1)-clean:
$$(if $$(call opkg_package_files,$(1)*),$$(IPKG_REMOVE) $(1) $$(call opkg_package_files,$(1)*))
$$(call remove_ipkg_files,$(1),$$(call opkg_package_files,$(call gen_ipkg_wildcard,$(1))))
clean: $(1)-clean

View File

@@ -29,8 +29,8 @@ $(eval $(call TestHostCommand,proper-umask, \
ifndef IB
$(eval $(call SetupHostCommand,gcc, \
Please install the GNU C Compiler (gcc) 4.8 or later, \
$(CC) -dumpversion | grep -E '^(4\.[8-9]|[5-9]\.?|10\.?)', \
gcc -dumpversion | grep -E '^(4\.[8-9]|[5-9]\.?|10\.?)', \
$(CC) -dumpversion | grep -E '^(4\.[8-9]|[5-9]\.?|1[0-9]\.?)', \
gcc -dumpversion | grep -E '^(4\.[8-9]|[5-9]\.?|1[0-9]\.?)', \
gcc --version | grep -E 'Apple.(LLVM|clang)' ))
$(eval $(call TestHostCommand,working-gcc, \
@@ -41,8 +41,8 @@ $(eval $(call TestHostCommand,working-gcc, \
$(eval $(call SetupHostCommand,g++, \
Please install the GNU C++ Compiler (g++) 4.8 or later, \
$(CXX) -dumpversion | grep -E '^(4\.[8-9]|[5-9]\.?|10\.?)', \
g++ -dumpversion | grep -E '^(4\.[8-9]|[5-9]\.?|10\.?)', \
$(CXX) -dumpversion | grep -E '^(4\.[8-9]|[5-9]\.?|1[0-9]\.?)', \
g++ -dumpversion | grep -E '^(4\.[8-9]|[5-9]\.?|1[0-9]\.?)', \
g++ --version | grep -E 'Apple.(LLVM|clang)' ))
$(eval $(call TestHostCommand,working-g++, \
@@ -64,11 +64,26 @@ else
zlib_link_flags := -lz
endif
$(eval $(call TestHostCommand,perl-data-dumper, \
Please install the Perl Data::Dumper module, \
perl -MData::Dumper -e 1))
$(eval $(call TestHostCommand,perl-findbin, \
Please install the Perl FindBin module, \
perl -MFindBin -e 1))
$(eval $(call TestHostCommand,perl-file-copy, \
Please install the Perl File::Copy module, \
perl -MFile::Copy -e 1))
$(eval $(call TestHostCommand,perl-file-compare, \
Please install the Perl File::Compare module, \
perl -MFile::Compare -e 1))
$(eval $(call TestHostCommand,perl-thread-queue, \
Please install the Perl Thread::Queue module, \
perl -MThread::Queue -e 1))
$(eval $(call SetupHostCommand,tar,Please install GNU 'tar', \
gtar --version 2>&1 | grep GNU, \
gnutar --version 2>&1 | grep GNU, \

View File

@@ -26,13 +26,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),19.07.6)
VERSION_NUMBER:=$(if $(VERSION_NUMBER),$(VERSION_NUMBER),19.07.10)
VERSION_CODE:=$(call qstrip,$(CONFIG_VERSION_CODE))
VERSION_CODE:=$(if $(VERSION_CODE),$(VERSION_CODE),r11278-8055e38794)
VERSION_CODE:=$(if $(VERSION_CODE),$(VERSION_CODE),r11427-9ce6aa9d8d)
VERSION_REPO:=$(call qstrip,$(CONFIG_VERSION_REPO))
VERSION_REPO:=$(if $(VERSION_REPO),$(VERSION_REPO),http://downloads.openwrt.org/releases/19.07.6)
VERSION_REPO:=$(if $(VERSION_REPO),$(VERSION_REPO),http://downloads.openwrt.org/releases/19.07.10)
VERSION_DIST:=$(call qstrip,$(CONFIG_VERSION_DIST))
VERSION_DIST:=$(if $(VERSION_DIST),$(VERSION_DIST),OpenWrt)

View File

@@ -12,7 +12,7 @@ include $(INCLUDE_DIR)/version.mk
include $(INCLUDE_DIR)/feeds.mk
PKG_NAME:=base-files
PKG_RELEASE:=204.2
PKG_RELEASE:=204.4
PKG_FLAGS:=nonshared
PKG_FILE_DEPENDS:=$(PLATFORM_DIR)/ $(GENERIC_PLATFORM_DIR)/base-files/

View File

@@ -45,6 +45,7 @@ boot() {
/bin/config_generate
uci_apply_defaults
sync
# temporary hack until configd exists
/sbin/reload_config

View File

@@ -4,8 +4,7 @@
START=10
USE_PROCD=1
validate_system_section()
{
validate_system_section() {
uci_load_validate system system "$1" "$2" \
'hostname:string:OpenWrt' \
'conloglevel:uinteger' \
@@ -23,8 +22,9 @@ system_config() {
echo "$hostname" > /proc/sys/kernel/hostname
[ -z "$conloglevel" -a -z "$buffersize" ] || dmesg ${conloglevel:+-n $conloglevel} ${buffersize:+-s $buffersize}
echo "$timezone" > /tmp/TZ
[ -n "$zonename" ] && [ -f "/usr/share/zoneinfo/$zonename" ] && \
ln -sf "/usr/share/zoneinfo/$zonename" /tmp/localtime && rm -f /tmp/TZ
[ -n "$zonename" ] && [ -f "/usr/share/zoneinfo/${zonename// /_}" ] \
&& ln -sf "/usr/share/zoneinfo/${zonename// /_}" /tmp/localtime \
&& rm -f /tmp/TZ
# apply timezone to kernel
date -k
@@ -35,8 +35,7 @@ reload_service() {
config_foreach validate_system_section system system_config
}
service_triggers()
{
service_triggers() {
procd_add_reload_trigger "system"
procd_add_validation validate_system_section
}

View File

@@ -183,7 +183,7 @@ if VERSIONOPT
config VERSION_REPO
string
prompt "Release repository"
default "http://downloads.openwrt.org/releases/19.07.6"
default "http://downloads.openwrt.org/releases/19.07.10"
help
This is the repository address embedded in the image, it defaults
to the trunk snapshot repo; the url may contain the following placeholders:

View File

@@ -0,0 +1,23 @@
From 018921ee79d3f30893614b3b2b63b588d8544f73 Mon Sep 17 00:00:00 2001
From: Peter Robinson <pbrobinson@gmail.com>
Date: Thu, 30 Jan 2020 09:37:15 +0000
Subject: [PATCH] Remove redundant YYLOC global declaration
Same as the upstream fix for building dtc with gcc 10.
Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
Origin: upstream, https://github.com/u-boot/u-boot/commit/018921ee79d3f30893614b3b2b63b588d8544f73
---
scripts/dtc/dtc-lexer.l | 1 -
1 file changed, 1 deletion(-)
--- a/scripts/dtc/dtc-lexer.l
+++ b/scripts/dtc/dtc-lexer.l
@@ -38,7 +38,6 @@ LINECOMMENT "//".*\n
#include "srcpos.h"
#include "dtc-parser.tab.h"
-YYLTYPE yylloc;
extern bool treesource_error;
/* CAUTION: this will stop working if we ever use yyless() or yyunput() */

View File

@@ -0,0 +1,57 @@
From a40a6e16ed76e5e26a0f60226b64c311d4a62c9f Mon Sep 17 00:00:00 2001
From: Mathias Kresin <dev@kresin.me>
Date: Sun, 31 Oct 2021 23:04:54 +0100
Subject: [PATCH] lzma: force 8bit reads
At least since gcc 7.3.0 (OpenWrt 18.06) lwr/lwl are used in the
assembly of LzmaProps_Decode. While the decission made by the compiler
looks perfect fine, it triggers some obscure hang on lantiq danube-s
v1.5 with MX29LV640EB NOR flash chips.
Only if the offset 1 is used, the hang can be observed. Using any other
offset works fine:
lwl s0,0(a1) - s0 == 0x6d000080
lwl s0,1(a1) - hangs
lwl s0,2(a1) - s0 == 0x0080xxxx
lwl s0,3(a1) - s0 == 0x80xxxxxx
It isn't clear whether it is a limitation of the flash chip, the EBU or
something else.
Force 8bit reads to prevent gcc optimizing the read with lwr/lwl
instructions.
Signed-off-by: Mathias Kresin <dev@kresin.me>
---
lib/lzma/LzmaDec.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
--- a/lib/lzma/LzmaDec.c
+++ b/lib/lzma/LzmaDec.c
@@ -7,6 +7,7 @@
#include "LzmaDec.h"
#include <linux/string.h>
+#include <asm/io.h>
#define kNumTopBits 24
#define kTopValue ((UInt32)1 << kNumTopBits)
@@ -703,7 +704,7 @@ static ELzmaDummy LzmaDec_TryDummy(const
static void LzmaDec_InitRc(CLzmaDec *p, const Byte *data)
{
- p->code = ((UInt32)data[1] << 24) | ((UInt32)data[2] << 16) | ((UInt32)data[3] << 8) | ((UInt32)data[4]);
+ p->code = ((UInt32)readb(&data[1]) << 24) | ((UInt32)readb(&data[2]) << 16) | ((UInt32)readb(&data[3]) << 8) | ((UInt32)readb(&data[4]));
p->range = 0xFFFFFFFF;
p->needFlush = 0;
}
@@ -929,7 +930,7 @@ SRes LzmaProps_Decode(CLzmaProps *p, con
if (size < LZMA_PROPS_SIZE)
return SZ_ERROR_UNSUPPORTED;
else
- dicSize = data[1] | ((UInt32)data[2] << 8) | ((UInt32)data[3] << 16) | ((UInt32)data[4] << 24);
+ dicSize = readb(&data[1]) | ((UInt32)readb(&data[2]) << 8) | ((UInt32)readb(&data[3]) << 16) | ((UInt32)readb(&data[4]) << 24);
if (dicSize < LZMA_DIC_MIN)
dicSize = LZMA_DIC_MIN;

View File

@@ -0,0 +1,172 @@
Fix header clash with system /usr/include/sha1.h and sha256.h when libmd
is installed.
Backport of u-boot commit "includes: move openssl headers to include/u-boot"
https://github.com/u-boot/u-boot/commit/2b9912e6a7df7b1f60beb7942bd0e6fa5f9d0167
--- a/board/gdsys/p1022/controlcenterd-id.c
+++ b/board/gdsys/p1022/controlcenterd-id.c
@@ -30,7 +30,7 @@
#include <i2c.h>
#include <mmc.h>
#include <tpm.h>
-#include <sha1.h>
+#include <u-boot/sha1.h>
#include <asm/byteorder.h>
#include <asm/unaligned.h>
#include <pca9698.h>
--- a/board/pcs440ep/pcs440ep.c
+++ b/board/pcs440ep/pcs440ep.c
@@ -13,7 +13,7 @@
#include <asm/processor.h>
#include <spd_sdram.h>
#include <status_led.h>
-#include <sha1.h>
+#include <u-boot/sha1.h>
#include <asm/io.h>
#include <net.h>
#include <ata.h>
--- a/common/cmd_sha1sum.c
+++ b/common/cmd_sha1sum.c
@@ -11,7 +11,7 @@
#include <common.h>
#include <command.h>
#include <hash.h>
-#include <sha1.h>
+#include <u-boot/sha1.h>
int do_sha1sum(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
--- a/common/hash.c
+++ b/common/hash.c
@@ -14,8 +14,8 @@
#include <command.h>
#include <hw_sha.h>
#include <hash.h>
-#include <sha1.h>
-#include <sha256.h>
+#include <u-boot/sha1.h>
+#include <u-boot/sha256.h>
#include <asm/io.h>
#include <asm/errno.h>
--- a/common/image-fit.c
+++ b/common/image-fit.c
@@ -21,7 +21,7 @@ DECLARE_GLOBAL_DATA_PTR;
#endif /* !USE_HOSTCC*/
#include <bootstage.h>
-#include <sha1.h>
+#include <u-boot/sha1.h>
#include <u-boot/crc.h>
#include <u-boot/md5.h>
--- a/common/image.c
+++ b/common/image.c
@@ -34,7 +34,7 @@
#endif
#include <u-boot/md5.h>
-#include <sha1.h>
+#include <u-boot/sha1.h>
#include <asm/errno.h>
#include <asm/io.h>
--- a/drivers/crypto/ace_sha.c
+++ b/drivers/crypto/ace_sha.c
@@ -5,8 +5,8 @@
* SPDX-License-Identifier: GPL-2.0+
*/
#include <common.h>
-#include <sha256.h>
-#include <sha1.h>
+#include <u-boot/sha256.h>
+#include <u-boot/sha1.h>
#include <asm/errno.h>
#include "ace_sha.h"
--- /dev/null
+++ b/include/u-boot/sha1.h
@@ -0,0 +1 @@
+#include "../sha1.h"
--- /dev/null
+++ b/include/u-boot/sha256.h
@@ -0,0 +1 @@
+#include "../sha256.h"
--- a/lib/rsa/rsa-verify.c
+++ b/lib/rsa/rsa-verify.c
@@ -7,7 +7,7 @@
#include <common.h>
#include <fdtdec.h>
#include <rsa.h>
-#include <sha1.h>
+#include <u-boot/sha1.h>
#include <asm/byteorder.h>
#include <asm/errno.h>
#include <asm/unaligned.h>
--- a/lib/sha1.c
+++ b/lib/sha1.c
@@ -36,7 +36,7 @@
#include <string.h>
#endif /* USE_HOSTCC */
#include <watchdog.h>
-#include "sha1.h"
+#include <u-boot/sha1.h>
/*
* 32-bit integer manipulation macros (big endian)
--- a/lib/sha256.c
+++ b/lib/sha256.c
@@ -11,7 +11,7 @@
#endif /* USE_HOSTCC */
#include <watchdog.h>
#include <linux/string.h>
-#include <sha256.h>
+#include <u-boot/sha256.h>
/*
* 32-bit integer manipulation macros (big endian)
--- a/lib/tpm.c
+++ b/lib/tpm.c
@@ -7,7 +7,7 @@
#include <common.h>
#include <stdarg.h>
-#include <sha1.h>
+#include <u-boot/sha1.h>
#include <tpm.h>
#include <asm/unaligned.h>
--- a/tools/imls/imls.c
+++ b/tools/imls/imls.c
@@ -24,7 +24,7 @@
#include <mtd/mtd-user.h>
#endif
-#include <sha1.h>
+#include <u-boot/sha1.h>
#include <libfdt.h>
#include <fdt_support.h>
#include <image.h>
--- a/tools/mkimage.h
+++ b/tools/mkimage.h
@@ -18,7 +18,7 @@
#include <sys/stat.h>
#include <time.h>
#include <unistd.h>
-#include <sha1.h>
+#include <u-boot/sha1.h>
#include "fdt_host.h"
#undef MKIMAGE_DEBUG
--- a/tools/ubsha1.c
+++ b/tools/ubsha1.c
@@ -13,7 +13,7 @@
#include <errno.h>
#include <string.h>
#include <sys/stat.h>
-#include "sha1.h"
+#include <u-boot/sha1.h>
int main (int argc, char **argv)
{

View File

@@ -0,0 +1,46 @@
From e33a814e772cdc36436c8c188d8c42d019fda639 Mon Sep 17 00:00:00 2001
From: Dirk Mueller <dmueller@suse.com>
Date: Tue, 14 Jan 2020 18:53:41 +0100
Subject: [PATCH] scripts/dtc: Remove redundant YYLOC global declaration
gcc 10 will default to -fno-common, which causes this error at link
time:
(.text+0x0): multiple definition of `yylloc'; dtc-lexer.lex.o (symbol from plugin):(.text+0x0): first defined here
This is because both dtc-lexer as well as dtc-parser define the same
global symbol yyloc. Before with -fcommon those were merged into one
defintion. The proper solution would be to to mark this as "extern",
however that leads to:
dtc-lexer.l:26:16: error: redundant redeclaration of 'yylloc' [-Werror=redundant-decls]
26 | extern YYLTYPE yylloc;
| ^~~~~~
In file included from dtc-lexer.l:24:
dtc-parser.tab.h:127:16: note: previous declaration of 'yylloc' was here
127 | extern YYLTYPE yylloc;
| ^~~~~~
cc1: all warnings being treated as errors
which means the declaration is completely redundant and can just be
dropped.
Signed-off-by: Dirk Mueller <dmueller@suse.com>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
[robh: cherry-pick from upstream]
Cc: stable@vger.kernel.org
Signed-off-by: Rob Herring <robh@kernel.org>
---
scripts/dtc/dtc-lexer.l | 1 -
1 file changed, 1 deletion(-)
--- a/scripts/dtc/dtc-lexer.l
+++ b/scripts/dtc/dtc-lexer.l
@@ -38,7 +38,6 @@ LINECOMMENT "//".*\n
#include "srcpos.h"
#include "dtc-parser.tab.h"
-YYLTYPE yylloc;
extern bool treesource_error;
/* CAUTION: this will stop working if we ever use yyless() or yyunput() */

View File

@@ -0,0 +1,33 @@
From 018921ee79d3f30893614b3b2b63b588d8544f73 Mon Sep 17 00:00:00 2001
From: Peter Robinson <pbrobinson@gmail.com>
Date: Thu, 30 Jan 2020 09:37:15 +0000
Subject: [PATCH] Remove redundant YYLOC global declaration
Same as the upstream fix for building dtc with gcc 10.
Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
Origin: backport, https://github.com/u-boot/u-boot/commit/018921ee79d3f30893614b3b2b63b588d8544f73
---
scripts/dtc/dtc-lexer.l | 1 -
1 file changed, 1 deletion(-)
--- a/scripts/dtc/dtc-lexer.l
+++ b/scripts/dtc/dtc-lexer.l
@@ -38,7 +38,6 @@ LINECOMMENT "//".*\n
#include "srcpos.h"
#include "dtc-parser.tab.h"
-YYLTYPE yylloc;
extern bool treesource_error;
/* CAUTION: this will stop working if we ever use yyless() or yyunput() */
--- a/scripts/dtc/dtc-lexer.lex.c_shipped
+++ b/scripts/dtc/dtc-lexer.lex.c_shipped
@@ -631,7 +631,6 @@ char *yytext;
#include "srcpos.h"
#include "dtc-parser.tab.h"
-YYLTYPE yylloc;
extern bool treesource_error;
/* CAUTION: this will stop working if we ever use yyless() or yyunput() */

View File

@@ -0,0 +1,23 @@
From 018921ee79d3f30893614b3b2b63b588d8544f73 Mon Sep 17 00:00:00 2001
From: Peter Robinson <pbrobinson@gmail.com>
Date: Thu, 30 Jan 2020 09:37:15 +0000
Subject: [PATCH] Remove redundant YYLOC global declaration
Same as the upstream fix for building dtc with gcc 10.
Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
Origin: upstream, https://github.com/u-boot/u-boot/commit/018921ee79d3f30893614b3b2b63b588d8544f73
---
scripts/dtc/dtc-lexer.l | 1 -
1 file changed, 1 deletion(-)
--- a/scripts/dtc/dtc-lexer.l
+++ b/scripts/dtc/dtc-lexer.l
@@ -38,7 +38,6 @@ LINECOMMENT "//".*\n
#include "srcpos.h"
#include "dtc-parser.tab.h"
-YYLTYPE yylloc;
extern bool treesource_error;
/* CAUTION: this will stop working if we ever use yyless() or yyunput() */

View File

@@ -0,0 +1,23 @@
From 018921ee79d3f30893614b3b2b63b588d8544f73 Mon Sep 17 00:00:00 2001
From: Peter Robinson <pbrobinson@gmail.com>
Date: Thu, 30 Jan 2020 09:37:15 +0000
Subject: [PATCH] Remove redundant YYLOC global declaration
Same as the upstream fix for building dtc with gcc 10.
Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
Origin: upstream, https://github.com/u-boot/u-boot/commit/018921ee79d3f30893614b3b2b63b588d8544f73
---
scripts/dtc/dtc-lexer.l | 1 -
1 file changed, 1 deletion(-)
--- a/scripts/dtc/dtc-lexer.l
+++ b/scripts/dtc/dtc-lexer.l
@@ -38,7 +38,6 @@ LINECOMMENT "//".*\n
#include "srcpos.h"
#include "dtc-parser.tab.h"
-YYLTYPE yylloc;
extern bool treesource_error;
/* CAUTION: this will stop working if we ever use yyless() or yyunput() */

View File

@@ -0,0 +1,46 @@
From e33a814e772cdc36436c8c188d8c42d019fda639 Mon Sep 17 00:00:00 2001
From: Dirk Mueller <dmueller@suse.com>
Date: Tue, 14 Jan 2020 18:53:41 +0100
Subject: [PATCH] scripts/dtc: Remove redundant YYLOC global declaration
gcc 10 will default to -fno-common, which causes this error at link
time:
(.text+0x0): multiple definition of `yylloc'; dtc-lexer.lex.o (symbol from plugin):(.text+0x0): first defined here
This is because both dtc-lexer as well as dtc-parser define the same
global symbol yyloc. Before with -fcommon those were merged into one
defintion. The proper solution would be to to mark this as "extern",
however that leads to:
dtc-lexer.l:26:16: error: redundant redeclaration of 'yylloc' [-Werror=redundant-decls]
26 | extern YYLTYPE yylloc;
| ^~~~~~
In file included from dtc-lexer.l:24:
dtc-parser.tab.h:127:16: note: previous declaration of 'yylloc' was here
127 | extern YYLTYPE yylloc;
| ^~~~~~
cc1: all warnings being treated as errors
which means the declaration is completely redundant and can just be
dropped.
Signed-off-by: Dirk Mueller <dmueller@suse.com>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
[robh: cherry-pick from upstream]
Cc: stable@vger.kernel.org
Signed-off-by: Rob Herring <robh@kernel.org>
---
scripts/dtc/dtc-lexer.l | 1 -
1 file changed, 1 deletion(-)
--- a/scripts/dtc/dtc-lexer.l
+++ b/scripts/dtc/dtc-lexer.l
@@ -38,7 +38,6 @@ LINECOMMENT "//".*\n
#include "srcpos.h"
#include "dtc-parser.tab.h"
-YYLTYPE yylloc;
extern bool treesource_error;
/* CAUTION: this will stop working if we ever use yyless() or yyunput() */

View File

@@ -1,12 +1,12 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=wireless-regdb
PKG_VERSION:=2020.11.20
PKG_VERSION:=2021.08.28
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=@KERNEL/software/network/wireless-regdb/
PKG_HASH:=b4164490d82ff7b0086e812ac42ab27baf57be24324d4c0ee1c5dd6ba27f2a52
PKG_HASH:=cff370c410d1e6d316ae0a7fa8ac6278fdf1efca5d3d664aca7cfd2aafa54446
PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>

View File

@@ -8,9 +8,9 @@ PKG_LICENSE_FILES:=
PKG_SOURCE_URL:=https://github.com/greearb/ath10k-ct.git
PKG_SOURCE_PROTO:=git
PKG_SOURCE_DATE:=2019-09-09
PKG_SOURCE_VERSION:=5e8cd86f90dac966d12df6ece84ac41458d0e95f
PKG_MIRROR_HASH:=dc1097f3a7b4b7e346918f206746d00a0b7df07ae3be9b89be55dfaef3cbbe45
PKG_SOURCE_DATE:=2021-06-03
PKG_SOURCE_VERSION:=b44cd7b2e7b0df5995ece18f358d4dfc40834ba1
PKG_MIRROR_HASH:=59f961ad425eb1a48fa9c391a325cc0f23845daec9d12673445d3077f9756cf0
# Build the 4.19 ath10k-ct driver version. Other options are "-4.16", or
# leave un-defined for 4.7 kernel. Probably this should match as closely as

View File

@@ -20,7 +20,7 @@ Origin: backport, https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux
---
--- a/ath10k-4.19/mac.c
+++ b/ath10k-4.19/mac.c
@@ -157,6 +157,22 @@ u8 ath10k_mac_bitrate_to_idx(const struc
@@ -158,6 +158,22 @@ u8 ath10k_mac_bitrate_to_idx(const struc
return 0;
}
@@ -43,7 +43,7 @@ Origin: backport, https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux
static int ath10k_mac_get_max_vht_mcs_map(u16 mcs_map, int nss)
{
switch ((mcs_map >> (2 * nss)) & 0x3) {
@@ -6405,9 +6421,10 @@ static void ath10k_bss_info_changed(stru
@@ -6423,9 +6439,10 @@ static void ath10k_bss_info_changed(stru
struct cfg80211_chan_def def;
u32 vdev_param, pdev_param, slottime, preamble;
u16 bitrate, hw_value;
@@ -56,7 +56,7 @@ Origin: backport, https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux
mutex_lock(&ar->conf_mutex);
@@ -6613,6 +6630,30 @@ static void ath10k_bss_info_changed(stru
@@ -6631,6 +6648,30 @@ static void ath10k_bss_info_changed(stru
arvif->vdev_id, ret);
}

View File

@@ -17,7 +17,7 @@ Origin: backport, https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux
---
--- a/ath10k-4.19/mac.c
+++ b/ath10k-4.19/mac.c
@@ -165,7 +165,7 @@ static int ath10k_mac_get_rate_hw_value(
@@ -166,7 +166,7 @@ static int ath10k_mac_get_rate_hw_value(
if (ath10k_mac_bitrate_is_cck(bitrate))
hw_value_prefix = WMI_RATE_PREAMBLE_CCK << 6;
@@ -26,7 +26,7 @@ Origin: backport, https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux
if (ath10k_rates[i].bitrate == bitrate)
return hw_value_prefix | ath10k_rates[i].hw_value;
}
@@ -6636,22 +6636,22 @@ static void ath10k_bss_info_changed(stru
@@ -6654,22 +6654,22 @@ static void ath10k_bss_info_changed(stru
return;
}

View File

@@ -17,7 +17,7 @@ Origin: other, https://patchwork.kernel.org/patch/10723033/
--- a/ath10k-4.19/mac.c
+++ b/ath10k-4.19/mac.c
@@ -6421,8 +6421,8 @@ static void ath10k_bss_info_changed(stru
@@ -6439,8 +6439,8 @@ static void ath10k_bss_info_changed(stru
struct cfg80211_chan_def def;
u32 vdev_param, pdev_param, slottime, preamble;
u16 bitrate, hw_value;
@@ -28,9 +28,9 @@ Origin: other, https://patchwork.kernel.org/patch/10723033/
enum nl80211_band band;
const struct ieee80211_supported_band *sband;
@@ -6595,7 +6595,11 @@ static void ath10k_bss_info_changed(stru
@@ -6613,7 +6613,11 @@ static void ath10k_bss_info_changed(stru
if (changed & BSS_CHANGED_MCAST_RATE &&
!WARN_ON(ath10k_mac_vif_chan(arvif->vif, &def))) {
!ath10k_mac_vif_chan(arvif->vif, &def)) {
band = def.chan->band;
- rateidx = vif->bss_conf.mcast_rate[band] - 1;
+ mcast_rate = vif->bss_conf.mcast_rate[band];

View File

@@ -11,7 +11,7 @@ Signed-off-by: Sven Eckelmann <sven@narfation.org>
--- a/ath10k-4.19/mac.c
+++ b/ath10k-4.19/mac.c
@@ -6617,6 +6617,7 @@ static void ath10k_bss_info_changed(stru
@@ -6635,6 +6635,7 @@ static void ath10k_bss_info_changed(stru
"mac vdev %d mcast_rate %x\n",
arvif->vdev_id, rate);
@@ -19,7 +19,7 @@ Signed-off-by: Sven Eckelmann <sven@narfation.org>
vdev_param = ar->wmi.vdev_param->mcast_data_rate;
ret = ath10k_wmi_vdev_set_param(ar, arvif->vdev_id,
vdev_param, rate);
@@ -6625,6 +6626,7 @@ static void ath10k_bss_info_changed(stru
@@ -6643,6 +6644,7 @@ static void ath10k_bss_info_changed(stru
"failed to set mcast rate on vdev %i: %d\n",
arvif->vdev_id, ret);
@@ -27,7 +27,7 @@ Signed-off-by: Sven Eckelmann <sven@narfation.org>
vdev_param = ar->wmi.vdev_param->bcast_data_rate;
ret = ath10k_wmi_vdev_set_param(ar, arvif->vdev_id,
vdev_param, rate);
@@ -6651,6 +6653,7 @@ static void ath10k_bss_info_changed(stru
@@ -6669,6 +6671,7 @@ static void ath10k_bss_info_changed(stru
return;
}

View File

@@ -129,7 +129,7 @@ v13:
.patch_load_addr = QCA988X_HW_2_0_PATCH_LOAD_ADDR,
.uart_pin = 7,
.cc_wraparound_type = ATH10K_HW_CC_WRAP_SHIFTED_ALL,
@@ -137,6 +139,7 @@ static const struct ath10k_hw_params ath
@@ -139,6 +141,7 @@ static const struct ath10k_hw_params ath
.id = QCA9887_HW_1_0_VERSION,
.dev_id = QCA9887_1_0_DEVICE_ID,
.name = "qca9887 hw1.0",
@@ -137,7 +137,7 @@ v13:
.patch_load_addr = QCA9887_HW_1_0_PATCH_LOAD_ADDR,
.uart_pin = 7,
.cc_wraparound_type = ATH10K_HW_CC_WRAP_SHIFTED_ALL,
@@ -301,6 +304,7 @@ static const struct ath10k_hw_params ath
@@ -308,6 +311,7 @@ static const struct ath10k_hw_params ath
.id = QCA99X0_HW_2_0_DEV_VERSION,
.dev_id = QCA99X0_2_0_DEVICE_ID,
.name = "qca99x0 hw2.0",
@@ -145,7 +145,7 @@ v13:
.patch_load_addr = QCA99X0_HW_2_0_PATCH_LOAD_ADDR,
.uart_pin = 7,
.otp_exe_param = 0x00000700,
@@ -339,6 +343,7 @@ static const struct ath10k_hw_params ath
@@ -347,6 +351,7 @@ static const struct ath10k_hw_params ath
.id = QCA9984_HW_1_0_DEV_VERSION,
.dev_id = QCA9984_1_0_DEVICE_ID,
.name = "qca9984/qca9994 hw1.0",
@@ -153,7 +153,7 @@ v13:
.patch_load_addr = QCA9984_HW_1_0_PATCH_LOAD_ADDR,
.uart_pin = 7,
.cc_wraparound_type = ATH10K_HW_CC_WRAP_SHIFTED_EACH,
@@ -382,6 +387,7 @@ static const struct ath10k_hw_params ath
@@ -391,6 +396,7 @@ static const struct ath10k_hw_params ath
.id = QCA9888_HW_2_0_DEV_VERSION,
.dev_id = QCA9888_2_0_DEVICE_ID,
.name = "qca9888 hw2.0",
@@ -161,7 +161,7 @@ v13:
.patch_load_addr = QCA9888_HW_2_0_PATCH_LOAD_ADDR,
.uart_pin = 7,
.cc_wraparound_type = ATH10K_HW_CC_WRAP_SHIFTED_EACH,
@@ -3167,6 +3173,10 @@ int ath10k_core_start(struct ath10k *ar,
@@ -3238,6 +3244,10 @@ int ath10k_core_start(struct ath10k *ar,
ath10k_wmi_check_apply_board_power_ctl_table(ar);
}
@@ -172,7 +172,7 @@ v13:
return 0;
err_hif_stop:
@@ -3421,9 +3431,18 @@ static void ath10k_core_register_work(st
@@ -3492,9 +3502,18 @@ static void ath10k_core_register_work(st
goto err_spectral_destroy;
}
@@ -191,7 +191,7 @@ v13:
err_spectral_destroy:
ath10k_spectral_destroy(ar);
err_debug_destroy:
@@ -3481,6 +3500,8 @@ void ath10k_core_unregister(struct ath10
@@ -3552,6 +3571,8 @@ void ath10k_core_unregister(struct ath10
if (!test_bit(ATH10K_FLAG_CORE_REGISTERED, &ar->dev_flags))
return;
@@ -210,7 +210,7 @@ v13:
#include "htt.h"
#include "htc.h"
@@ -1138,7 +1139,6 @@ struct ath10k {
@@ -1141,7 +1142,6 @@ struct ath10k {
u32 low_5ghz_chan;
u32 high_5ghz_chan;
bool ani_enabled;
@@ -218,7 +218,7 @@ v13:
bool p2p;
bool ct_all_pkts_htt; /* CT firmware only: native-wifi for all pkts */
@@ -1389,6 +1389,13 @@ struct ath10k {
@@ -1400,6 +1400,13 @@ struct ath10k {
} testmode;
struct {
@@ -394,7 +394,7 @@ v13:
+#endif /* _LEDS_H_ */
--- a/ath10k-4.19/mac.c
+++ b/ath10k-4.19/mac.c
@@ -34,6 +34,7 @@
@@ -35,6 +35,7 @@
#include "wmi-tlv.h"
#include "wmi-ops.h"
#include "wow.h"
@@ -404,7 +404,7 @@ v13:
/* Rates */
--- a/ath10k-4.19/wmi-ops.h
+++ b/ath10k-4.19/wmi-ops.h
@@ -218,7 +218,10 @@ struct wmi_ops {
@@ -219,7 +219,10 @@ struct wmi_ops {
struct sk_buff *(*gen_echo)(struct ath10k *ar, u32 value);
struct sk_buff *(*gen_pdev_get_tpc_table_cmdid)(struct ath10k *ar,
u32 param);
@@ -415,7 +415,7 @@ v13:
};
int ath10k_wmi_cmd_send(struct ath10k *ar, struct sk_buff *skb, u32 cmd_id);
@@ -1079,6 +1082,35 @@ ath10k_wmi_force_fw_hang(struct ath10k *
@@ -1089,6 +1092,35 @@ ath10k_wmi_force_fw_hang(struct ath10k *
return ath10k_wmi_cmd_send(ar, skb, ar->wmi.cmd->force_fw_hang_cmdid);
}
@@ -453,7 +453,7 @@ v13:
{
--- a/ath10k-4.19/wmi-tlv.c
+++ b/ath10k-4.19/wmi-tlv.c
@@ -3976,6 +3976,8 @@ static const struct wmi_ops wmi_tlv_ops
@@ -3999,6 +3999,8 @@ static const struct wmi_ops wmi_tlv_ops
.gen_echo = ath10k_wmi_tlv_op_gen_echo,
.gen_vdev_spectral_conf = ath10k_wmi_tlv_op_gen_vdev_spectral_conf,
.gen_vdev_spectral_enable = ath10k_wmi_tlv_op_gen_vdev_spectral_enable,
@@ -464,7 +464,7 @@ v13:
static const struct wmi_peer_flags_map wmi_tlv_peer_flags_map = {
--- a/ath10k-4.19/wmi.c
+++ b/ath10k-4.19/wmi.c
@@ -8070,6 +8070,49 @@ ath10k_wmi_op_gen_peer_set_param(struct
@@ -8112,6 +8112,49 @@ ath10k_wmi_op_gen_peer_set_param(struct
return skb;
}
@@ -514,7 +514,7 @@ v13:
static struct sk_buff *
ath10k_wmi_op_gen_set_psmode(struct ath10k *ar, u32 vdev_id,
enum wmi_sta_ps_mode psmode)
@@ -9821,6 +9864,9 @@ static const struct wmi_ops wmi_ops = {
@@ -9865,6 +9908,9 @@ static const struct wmi_ops wmi_ops = {
.fw_stats_fill = ath10k_wmi_main_op_fw_stats_fill,
.get_vdev_subtype = ath10k_wmi_op_get_vdev_subtype,
.gen_echo = ath10k_wmi_op_gen_echo,
@@ -524,7 +524,7 @@ v13:
/* .gen_bcn_tmpl not implemented */
/* .gen_prb_tmpl not implemented */
/* .gen_p2p_go_bcn_ie not implemented */
@@ -9891,6 +9937,8 @@ static const struct wmi_ops wmi_10_1_ops
@@ -9935,6 +9981,8 @@ static const struct wmi_ops wmi_10_1_ops
.fw_stats_fill = ath10k_wmi_10x_op_fw_stats_fill,
.get_vdev_subtype = ath10k_wmi_op_get_vdev_subtype,
.gen_echo = ath10k_wmi_op_gen_echo,
@@ -533,7 +533,7 @@ v13:
/* .gen_bcn_tmpl not implemented */
/* .gen_prb_tmpl not implemented */
/* .gen_p2p_go_bcn_ie not implemented */
@@ -9969,6 +10017,8 @@ static const struct wmi_ops wmi_10_2_ops
@@ -10013,6 +10061,8 @@ static const struct wmi_ops wmi_10_2_ops
.gen_delba_send = ath10k_wmi_op_gen_delba_send,
.fw_stats_fill = ath10k_wmi_10x_op_fw_stats_fill,
.get_vdev_subtype = ath10k_wmi_op_get_vdev_subtype,
@@ -542,7 +542,7 @@ v13:
/* .gen_pdev_enable_adaptive_cca not implemented */
};
@@ -10039,6 +10089,8 @@ static const struct wmi_ops wmi_10_2_4_o
@@ -10083,6 +10133,8 @@ static const struct wmi_ops wmi_10_2_4_o
.gen_pdev_enable_adaptive_cca =
ath10k_wmi_op_gen_pdev_enable_adaptive_cca,
.get_vdev_subtype = ath10k_wmi_10_2_4_op_get_vdev_subtype,
@@ -551,7 +551,7 @@ v13:
/* .gen_bcn_tmpl not implemented */
/* .gen_prb_tmpl not implemented */
/* .gen_p2p_go_bcn_ie not implemented */
@@ -10119,6 +10171,8 @@ static const struct wmi_ops wmi_10_4_ops
@@ -10163,6 +10215,8 @@ static const struct wmi_ops wmi_10_4_ops
.gen_pdev_bss_chan_info_req = ath10k_wmi_10_2_op_gen_pdev_bss_chan_info,
.gen_echo = ath10k_wmi_op_gen_echo,
.gen_pdev_get_tpc_config = ath10k_wmi_10_2_4_op_gen_pdev_get_tpc_config,

View File

@@ -16,7 +16,7 @@ Signed-off-by: Mathias Kresin <dev@kresin.me>
--- a/ath10k-4.19/core.h
+++ b/ath10k-4.19/core.h
@@ -1488,6 +1488,10 @@ struct ath10k {
@@ -1500,6 +1500,10 @@ struct ath10k {
u8 csi_data[4096];
u16 csi_data_len;
@@ -42,7 +42,7 @@ Signed-off-by: Mathias Kresin <dev@kresin.me>
if (ret)
--- a/ath10k-4.19/mac.c
+++ b/ath10k-4.19/mac.c
@@ -9982,7 +9982,7 @@ int ath10k_mac_register(struct ath10k *a
@@ -9998,7 +9998,7 @@ int ath10k_mac_register(struct ath10k *a
wiphy_ext_feature_set(ar->hw->wiphy, NL80211_EXT_FEATURE_CQM_RSSI_LIST);
#ifdef CPTCFG_MAC80211_LEDS

View File

@@ -1,39 +0,0 @@
From bbf0a8af2261bc7ae39b227ff6a1e9f45a008c27 Mon Sep 17 00:00:00 2001
From: Sven Eckelmann <sven.eckelmann@openmesh.com>
Date: Mon, 30 Jul 2018 17:31:41 +0200
Subject: [PATCH] ath10k: Limit available channels via DT ieee80211-freq-limit
Tri-band devices (1x 2.4GHz + 2x 5GHz) often incorporate special filters in
the RX and TX path. These filtered channel can in theory still be used by
the hardware but the signal strength is reduced so much that it makes no
sense.
There is already a DT property to limit the available channels but ath10k
has to manually call this functionality to limit the currrently set wiphy
channels further.
Signed-off-by: Sven Eckelmann <sven.eckelmann@openmesh.com>
Forwarded: https://patchwork.kernel.org/patch/10549245/
---
drivers/net/wireless/ath/ath10k/mac.c | 2 ++
1 file changed, 2 insertions(+)
--- a/ath10k-4.19/mac.c
+++ b/ath10k-4.19/mac.c
@@ -18,6 +18,7 @@
#include "mac.h"
+#include <net/cfg80211.h>
#include <net/mac80211.h>
#include <linux/etherdevice.h>
#include <linux/acpi.h>
@@ -9706,6 +9707,7 @@ int ath10k_mac_register(struct ath10k *a
ar->hw->wiphy->bands[NL80211_BAND_5GHZ] = band;
}
+ wiphy_read_of_freq_limits(ar->hw->wiphy);
ath10k_mac_setup_ht_vht_cap(ar);
ar->hw->wiphy->interface_modes =

View File

@@ -10,10 +10,10 @@ include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=mac80211
PKG_VERSION:=4.19.161-1
PKG_VERSION:=4.19.237-1
PKG_RELEASE:=1
PKG_SOURCE_URL:=@KERNEL/linux/kernel/projects/backports/stable/v4.19.161/
PKG_HASH:=01a4173ba180eb8ca67c898239d5accb49a3ea9aea51510e17d5c937d6e93f9a
PKG_SOURCE_URL:=@KERNEL/linux/kernel/projects/backports/stable/v4.19.237/
PKG_HASH:=e40ce1f4b707d5b1b5da3f4470f1ccf4f565602323424c89d956069df701bffd
PKG_SOURCE:=backports-$(PKG_VERSION).tar.xz
PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/backports-$(PKG_VERSION)

View File

@@ -24,8 +24,9 @@ drv_mac80211_init_device_config() {
config_add_string path phy 'macaddr:macaddr'
config_add_string hwmode
config_add_string tx_burst
config_add_string distance
config_add_int beacon_int chanbw frag rts
config_add_int rxantenna txantenna antenna_gain txpower distance
config_add_int rxantenna txantenna antenna_gain txpower
config_add_boolean noscan ht_coex
config_add_array ht_capab
config_add_array channels

View File

@@ -8,7 +8,7 @@ This reverts commit 71f5137bf010c6faffab50c0ec15374c59c4a411.
--- a/drivers/net/wireless/ath/ath9k/hw.c
+++ b/drivers/net/wireless/ath/ath9k/hw.c
@@ -2976,7 +2976,8 @@ void ath9k_hw_apply_txpower(struct ath_h
@@ -2978,7 +2978,8 @@ void ath9k_hw_apply_txpower(struct ath_h
{
struct ath_regulatory *reg = ath9k_hw_regulatory(ah);
struct ieee80211_channel *channel;
@@ -18,7 +18,7 @@ This reverts commit 71f5137bf010c6faffab50c0ec15374c59c4a411.
u16 ctl = NO_CTL;
if (!chan)
@@ -2988,9 +2989,14 @@ void ath9k_hw_apply_txpower(struct ath_h
@@ -2990,9 +2991,14 @@ void ath9k_hw_apply_txpower(struct ath_h
channel = chan->chan;
chan_pwr = min_t(int, channel->max_power * 2, MAX_RATE_POWER);
new_pwr = min_t(int, chan_pwr, reg->power_limit);

View File

@@ -11,7 +11,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
--- a/drivers/net/wireless/ath/ath9k/hw.c
+++ b/drivers/net/wireless/ath/ath9k/hw.c
@@ -2995,6 +2995,10 @@ void ath9k_hw_apply_txpower(struct ath_h
@@ -2997,6 +2997,10 @@ void ath9k_hw_apply_txpower(struct ath_h
if (ant_gain > max_gain)
ant_reduction = ant_gain - max_gain;

View File

@@ -14,7 +14,7 @@
CFLAGS_trace.o := -I$(src)
--- a/drivers/net/wireless/ath/ath.h
+++ b/drivers/net/wireless/ath/ath.h
@@ -316,14 +316,7 @@ void _ath_dbg(struct ath_common *common,
@@ -317,14 +317,7 @@ void _ath_dbg(struct ath_common *common,
#endif /* CPTCFG_ATH_DEBUG */
/** Returns string describing opmode, or NULL if unknown mode. */

View File

@@ -1,6 +1,6 @@
--- a/drivers/net/wireless/ath/ath9k/debug.c
+++ b/drivers/net/wireless/ath/ath9k/debug.c
@@ -1374,6 +1374,53 @@ void ath9k_deinit_debug(struct ath_softc
@@ -1377,6 +1377,53 @@ void ath9k_deinit_debug(struct ath_softc
ath9k_cmn_spectral_deinit_debug(&sc->spec_priv);
}
@@ -54,7 +54,7 @@
int ath9k_init_debug(struct ath_hw *ah)
{
struct ath_common *common = ath9k_hw_common(ah);
@@ -1393,6 +1440,8 @@ int ath9k_init_debug(struct ath_hw *ah)
@@ -1396,6 +1443,8 @@ int ath9k_init_debug(struct ath_hw *ah)
ath9k_tx99_init_debug(sc);
ath9k_cmn_spectral_init_debug(&sc->spec_priv, sc->debug.debugfs_phy);

View File

@@ -1,6 +1,6 @@
--- a/drivers/net/wireless/ath/ath9k/debug.c
+++ b/drivers/net/wireless/ath/ath9k/debug.c
@@ -1421,6 +1421,52 @@ static const struct file_operations fops
@@ -1424,6 +1424,52 @@ static const struct file_operations fops
.owner = THIS_MODULE
};
@@ -53,7 +53,7 @@
int ath9k_init_debug(struct ath_hw *ah)
{
struct ath_common *common = ath9k_hw_common(ah);
@@ -1442,6 +1488,8 @@ int ath9k_init_debug(struct ath_hw *ah)
@@ -1445,6 +1491,8 @@ int ath9k_init_debug(struct ath_hw *ah)
debugfs_create_file("eeprom", S_IRUSR, sc->debug.debugfs_phy, sc,
&fops_eeprom);

View File

@@ -1,6 +1,6 @@
--- a/drivers/net/wireless/ath/ath9k/ath9k.h
+++ b/drivers/net/wireless/ath/ath9k/ath9k.h
@@ -850,6 +850,9 @@ static inline int ath9k_dump_btcoex(stru
@@ -851,6 +851,9 @@ static inline int ath9k_dump_btcoex(stru
#ifdef CPTCFG_MAC80211_LEDS
void ath_init_leds(struct ath_softc *sc);
void ath_deinit_leds(struct ath_softc *sc);
@@ -10,7 +10,7 @@
#else
static inline void ath_init_leds(struct ath_softc *sc)
{
@@ -991,6 +994,13 @@ void ath_ant_comb_scan(struct ath_softc
@@ -992,6 +995,13 @@ void ath_ant_comb_scan(struct ath_softc
#define AIRTIME_USE_NEW_QUEUES BIT(2)
#define AIRTIME_ACTIVE(flags) (!!(flags & (AIRTIME_USE_TX|AIRTIME_USE_RX)))
@@ -24,7 +24,7 @@
struct ath_softc {
struct ieee80211_hw *hw;
struct device *dev;
@@ -1046,9 +1056,8 @@ struct ath_softc {
@@ -1047,9 +1057,8 @@ struct ath_softc {
spinlock_t chan_lock;
#ifdef CPTCFG_MAC80211_LEDS
@@ -192,7 +192,7 @@
#endif
--- a/drivers/net/wireless/ath/ath9k/debug.c
+++ b/drivers/net/wireless/ath/ath9k/debug.c
@@ -1466,6 +1466,61 @@ static const struct file_operations fops
@@ -1469,6 +1469,61 @@ static const struct file_operations fops
.llseek = default_llseek,
};
@@ -254,7 +254,7 @@
int ath9k_init_debug(struct ath_hw *ah)
{
@@ -1490,6 +1545,10 @@ int ath9k_init_debug(struct ath_hw *ah)
@@ -1493,6 +1548,10 @@ int ath9k_init_debug(struct ath_hw *ah)
&fops_eeprom);
debugfs_create_file("chanbw", S_IRUSR | S_IWUSR, sc->debug.debugfs_phy,
sc, &fops_chanbw);

View File

@@ -1,6 +1,6 @@
--- a/drivers/net/wireless/ath/ath9k/debug.c
+++ b/drivers/net/wireless/ath/ath9k/debug.c
@@ -1522,6 +1522,50 @@ static const struct file_operations fops
@@ -1525,6 +1525,50 @@ static const struct file_operations fops
#endif
@@ -51,7 +51,7 @@
int ath9k_init_debug(struct ath_hw *ah)
{
struct ath_common *common = ath9k_hw_common(ah);
@@ -1549,6 +1593,8 @@ int ath9k_init_debug(struct ath_hw *ah)
@@ -1552,6 +1596,8 @@ int ath9k_init_debug(struct ath_hw *ah)
debugfs_create_file("gpio_led", S_IWUSR,
sc->debug.debugfs_phy, sc, &fops_gpio_led);
#endif
@@ -84,7 +84,7 @@
bool reset_power_on;
bool htc_reset_init;
@@ -1073,6 +1081,7 @@ void ath9k_hw_check_nav(struct ath_hw *a
@@ -1074,6 +1082,7 @@ void ath9k_hw_check_nav(struct ath_hw *a
bool ath9k_hw_check_alive(struct ath_hw *ah);
bool ath9k_hw_setpower(struct ath_hw *ah, enum ath9k_power_mode mode);
@@ -94,7 +94,7 @@
struct ath_gen_timer *ath_gen_timer_alloc(struct ath_hw *ah,
--- a/drivers/net/wireless/ath/ath9k/hw.c
+++ b/drivers/net/wireless/ath/ath9k/hw.c
@@ -1883,6 +1883,20 @@ u32 ath9k_hw_get_tsf_offset(struct times
@@ -1882,6 +1882,20 @@ u32 ath9k_hw_get_tsf_offset(struct times
}
EXPORT_SYMBOL(ath9k_hw_get_tsf_offset);
@@ -115,7 +115,7 @@
int ath9k_hw_reset(struct ath_hw *ah, struct ath9k_channel *chan,
struct ath9k_hw_cal_data *caldata, bool fastcc)
{
@@ -2091,6 +2105,7 @@ int ath9k_hw_reset(struct ath_hw *ah, st
@@ -2090,6 +2104,7 @@ int ath9k_hw_reset(struct ath_hw *ah, st
ar9003_hw_disable_phy_restart(ah);
ath9k_hw_apply_gpio_override(ah);
@@ -125,9 +125,9 @@
REG_SET_BIT(ah, AR_BTCOEX_WL_LNADIV, AR_BTCOEX_WL_LNADIV_FORCE_ON);
--- a/drivers/net/wireless/ath/ath9k/main.c
+++ b/drivers/net/wireless/ath/ath9k/main.c
@@ -528,6 +528,11 @@ irqreturn_t ath_isr(int irq, void *dev)
if (test_bit(ATH_OP_HW_RESET, &common->op_flags))
@@ -535,6 +535,11 @@ irqreturn_t ath_isr(int irq, void *dev)
return IRQ_HANDLED;
}
+ if (test_bit(ATH_DIAG_TRIGGER_ERROR, &ah->diag)) {
+ status |= ATH9K_INT_FATAL;

View File

@@ -40,7 +40,7 @@
return true;
}
@@ -1861,8 +1880,14 @@ static int ath9k_hw_do_fastcc(struct ath
@@ -1860,8 +1879,14 @@ static int ath9k_hw_do_fastcc(struct ath
if (AR_SREV_9271(ah))
ar9002_hw_load_ani_reg(ah, chan);
@@ -55,7 +55,7 @@
return -EINVAL;
}
@@ -2116,6 +2141,9 @@ int ath9k_hw_reset(struct ath_hw *ah, st
@@ -2115,6 +2140,9 @@ int ath9k_hw_reset(struct ath_hw *ah, st
ath9k_hw_set_radar_params(ah);
}

View File

@@ -18,7 +18,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
#include "common.h"
#include "debug.h"
@@ -1001,6 +1002,14 @@ struct ath_led {
@@ -1002,6 +1003,14 @@ struct ath_led {
struct led_classdev cdev;
};
@@ -33,7 +33,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
struct ath_softc {
struct ieee80211_hw *hw;
struct device *dev;
@@ -1058,6 +1067,9 @@ struct ath_softc {
@@ -1059,6 +1068,9 @@ struct ath_softc {
#ifdef CPTCFG_MAC80211_LEDS
const char *led_default_trigger;
struct list_head leds;

View File

@@ -10,7 +10,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
---
--- a/drivers/net/wireless/ath/ath9k/ath9k.h
+++ b/drivers/net/wireless/ath/ath9k/ath9k.h
@@ -1069,6 +1069,7 @@ struct ath_softc {
@@ -1070,6 +1070,7 @@ struct ath_softc {
struct list_head leds;
#ifdef CONFIG_GPIOLIB
struct ath9k_gpio_chip *gpiochip;

View File

@@ -343,7 +343,7 @@
u8 ath9k_parse_mpdudensity(u8 mpdudensity)
{
@@ -649,6 +651,7 @@ void ath_reset_work(struct work_struct *
@@ -656,6 +658,7 @@ void ath_reset_work(struct work_struct *
static int ath9k_start(struct ieee80211_hw *hw)
{
struct ath_softc *sc = hw->priv;
@@ -351,7 +351,7 @@
struct ath_hw *ah = sc->sc_ah;
struct ath_common *common = ath9k_hw_common(ah);
struct ieee80211_channel *curchan = sc->cur_chan->chandef.chan;
@@ -727,6 +730,11 @@ static int ath9k_start(struct ieee80211_
@@ -734,6 +737,11 @@ static int ath9k_start(struct ieee80211_
AR_GPIO_OUTPUT_MUX_AS_OUTPUT);
}

View File

@@ -325,7 +325,7 @@
#include "common.h"
#include "debug.h"
@@ -1023,6 +1024,9 @@ struct ath_softc {
@@ -1024,6 +1025,9 @@ struct ath_softc {
struct ath_hw *sc_ah;
void __iomem *mem;
int irq;

View File

@@ -1,6 +1,6 @@
--- a/drivers/net/wireless/ath/ath10k/mac.c
+++ b/drivers/net/wireless/ath/ath10k/mac.c
@@ -8300,6 +8300,21 @@ static int ath10k_mac_init_rd(struct ath
@@ -8294,6 +8294,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[] = {
@@ -8584,6 +8599,12 @@ int ath10k_mac_register(struct ath10k *a
@@ -8578,6 +8593,12 @@ int ath10k_mac_register(struct ath10k *a
wiphy_ext_feature_set(ar->hw->wiphy, NL80211_EXT_FEATURE_CQM_RSSI_LIST);

View File

@@ -105,7 +105,7 @@ v9: use SM/MS macros from code.h to simplify shift/mask handling
}
--- a/drivers/net/wireless/ath/ath10k/wmi.c
+++ b/drivers/net/wireless/ath/ath10k/wmi.c
@@ -7391,12 +7391,7 @@ ath10k_wmi_peer_assoc_fill_10_4(struct a
@@ -7396,12 +7396,7 @@ ath10k_wmi_peer_assoc_fill_10_4(struct a
struct wmi_10_4_peer_assoc_complete_cmd *cmd = buf;
ath10k_wmi_peer_assoc_fill_10_2(ar, buf, arg);
@@ -121,7 +121,7 @@ v9: use SM/MS macros from code.h to simplify shift/mask handling
static int
--- a/drivers/net/wireless/ath/ath10k/wmi.h
+++ b/drivers/net/wireless/ath/ath10k/wmi.h
@@ -6357,7 +6357,19 @@ struct wmi_10_2_peer_assoc_complete_cmd
@@ -6360,7 +6360,19 @@ struct wmi_10_2_peer_assoc_complete_cmd
__le32 info0; /* WMI_PEER_ASSOC_INFO0_ */
} __packed;

View File

@@ -13,7 +13,7 @@ v2: fix trailing whitespace issue and fix some typos within the commit note
2 files changed, 8 insertions(+), 10 deletions(-)
--- a/drivers/net/wireless/ath/ath10k/mac.c
+++ b/drivers/net/wireless/ath/ath10k/mac.c
@@ -4483,13 +4483,6 @@ static struct ieee80211_sta_vht_cap ath1
@@ -4476,13 +4476,6 @@ static struct ieee80211_sta_vht_cap ath1
vht_cap.cap |= val;
}

View File

@@ -464,7 +464,7 @@ v13:
{
--- a/drivers/net/wireless/ath/ath10k/wmi-tlv.c
+++ b/drivers/net/wireless/ath/ath10k/wmi-tlv.c
@@ -3991,6 +3991,8 @@ static const struct wmi_ops wmi_tlv_ops
@@ -3999,6 +3999,8 @@ static const struct wmi_ops wmi_tlv_ops
.gen_echo = ath10k_wmi_tlv_op_gen_echo,
.gen_vdev_spectral_conf = ath10k_wmi_tlv_op_gen_vdev_spectral_conf,
.gen_vdev_spectral_enable = ath10k_wmi_tlv_op_gen_vdev_spectral_enable,
@@ -475,7 +475,7 @@ v13:
static const struct wmi_peer_flags_map wmi_tlv_peer_flags_map = {
--- a/drivers/net/wireless/ath/ath10k/wmi.c
+++ b/drivers/net/wireless/ath/ath10k/wmi.c
@@ -7211,6 +7211,49 @@ ath10k_wmi_op_gen_peer_set_param(struct
@@ -7216,6 +7216,49 @@ ath10k_wmi_op_gen_peer_set_param(struct
return skb;
}
@@ -525,7 +525,7 @@ v13:
static struct sk_buff *
ath10k_wmi_op_gen_set_psmode(struct ath10k *ar, u32 vdev_id,
enum wmi_sta_ps_mode psmode)
@@ -8822,6 +8865,9 @@ static const struct wmi_ops wmi_ops = {
@@ -8827,6 +8870,9 @@ static const struct wmi_ops wmi_ops = {
.fw_stats_fill = ath10k_wmi_main_op_fw_stats_fill,
.get_vdev_subtype = ath10k_wmi_op_get_vdev_subtype,
.gen_echo = ath10k_wmi_op_gen_echo,
@@ -535,7 +535,7 @@ v13:
/* .gen_bcn_tmpl not implemented */
/* .gen_prb_tmpl not implemented */
/* .gen_p2p_go_bcn_ie not implemented */
@@ -8892,6 +8938,8 @@ static const struct wmi_ops wmi_10_1_ops
@@ -8897,6 +8943,8 @@ static const struct wmi_ops wmi_10_1_ops
.fw_stats_fill = ath10k_wmi_10x_op_fw_stats_fill,
.get_vdev_subtype = ath10k_wmi_op_get_vdev_subtype,
.gen_echo = ath10k_wmi_op_gen_echo,
@@ -544,7 +544,7 @@ v13:
/* .gen_bcn_tmpl not implemented */
/* .gen_prb_tmpl not implemented */
/* .gen_p2p_go_bcn_ie not implemented */
@@ -8963,6 +9011,8 @@ static const struct wmi_ops wmi_10_2_ops
@@ -8968,6 +9016,8 @@ static const struct wmi_ops wmi_10_2_ops
.gen_delba_send = ath10k_wmi_op_gen_delba_send,
.fw_stats_fill = ath10k_wmi_10x_op_fw_stats_fill,
.get_vdev_subtype = ath10k_wmi_op_get_vdev_subtype,
@@ -553,7 +553,7 @@ v13:
/* .gen_pdev_enable_adaptive_cca not implemented */
};
@@ -9033,6 +9083,8 @@ static const struct wmi_ops wmi_10_2_4_o
@@ -9038,6 +9088,8 @@ static const struct wmi_ops wmi_10_2_4_o
.gen_pdev_enable_adaptive_cca =
ath10k_wmi_op_gen_pdev_enable_adaptive_cca,
.get_vdev_subtype = ath10k_wmi_10_2_4_op_get_vdev_subtype,
@@ -562,7 +562,7 @@ v13:
/* .gen_bcn_tmpl not implemented */
/* .gen_prb_tmpl not implemented */
/* .gen_p2p_go_bcn_ie not implemented */
@@ -9112,6 +9164,8 @@ static const struct wmi_ops wmi_10_4_ops
@@ -9117,6 +9169,8 @@ static const struct wmi_ops wmi_10_4_ops
.gen_pdev_bss_chan_info_req = ath10k_wmi_10_2_op_gen_pdev_bss_chan_info,
.gen_echo = ath10k_wmi_op_gen_echo,
.gen_pdev_get_tpc_config = ath10k_wmi_10_2_4_op_gen_pdev_get_tpc_config,
@@ -573,7 +573,7 @@ v13:
int ath10k_wmi_attach(struct ath10k *ar)
--- a/drivers/net/wireless/ath/ath10k/wmi.h
+++ b/drivers/net/wireless/ath/ath10k/wmi.h
@@ -2942,6 +2942,41 @@ enum wmi_10_4_feature_mask {
@@ -2945,6 +2945,41 @@ enum wmi_10_4_feature_mask {
};

View File

@@ -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
@@ -8616,7 +8616,7 @@ int ath10k_mac_register(struct ath10k *a
@@ -8610,7 +8610,7 @@ int ath10k_mac_register(struct ath10k *a
wiphy_ext_feature_set(ar->hw->wiphy, NL80211_EXT_FEATURE_CQM_RSSI_LIST);
#ifdef CPTCFG_MAC80211_LEDS

View File

@@ -43,7 +43,7 @@ Origin: backport, https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux
static int ath10k_mac_get_max_vht_mcs_map(u16 mcs_map, int nss)
{
switch ((mcs_map >> (2 * nss)) & 0x3) {
@@ -5485,9 +5501,10 @@ static void ath10k_bss_info_changed(stru
@@ -5479,9 +5495,10 @@ static void ath10k_bss_info_changed(stru
struct cfg80211_chan_def def;
u32 vdev_param, pdev_param, slottime, preamble;
u16 bitrate, hw_value;
@@ -56,7 +56,7 @@ Origin: backport, https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux
mutex_lock(&ar->conf_mutex);
@@ -5693,6 +5710,30 @@ static void ath10k_bss_info_changed(stru
@@ -5687,6 +5704,30 @@ static void ath10k_bss_info_changed(stru
arvif->vdev_id, ret);
}

View File

@@ -26,7 +26,7 @@ Origin: backport, https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux
if (ath10k_rates[i].bitrate == bitrate)
return hw_value_prefix | ath10k_rates[i].hw_value;
}
@@ -5716,22 +5716,22 @@ static void ath10k_bss_info_changed(stru
@@ -5710,22 +5710,22 @@ static void ath10k_bss_info_changed(stru
return;
}

View File

@@ -17,7 +17,7 @@ Origin: other, https://patchwork.kernel.org/patch/10723033/
--- a/drivers/net/wireless/ath/ath10k/mac.c
+++ b/drivers/net/wireless/ath/ath10k/mac.c
@@ -5501,8 +5501,8 @@ static void ath10k_bss_info_changed(stru
@@ -5495,8 +5495,8 @@ static void ath10k_bss_info_changed(stru
struct cfg80211_chan_def def;
u32 vdev_param, pdev_param, slottime, preamble;
u16 bitrate, hw_value;
@@ -28,7 +28,7 @@ Origin: other, https://patchwork.kernel.org/patch/10723033/
enum nl80211_band band;
const struct ieee80211_supported_band *sband;
@@ -5675,7 +5675,11 @@ static void ath10k_bss_info_changed(stru
@@ -5669,7 +5669,11 @@ static void ath10k_bss_info_changed(stru
if (changed & BSS_CHANGED_MCAST_RATE &&
!ath10k_mac_vif_chan(arvif->vif, &def)) {
band = def.chan->band;

View File

@@ -1,49 +0,0 @@
From: Sven Eckelmann <seckelmann@datto.com>
Date: Tue, 11 Jun 2019 13:58:35 +0200
Subject: ath10k: fix max antenna gain unit
Most of the txpower for the ath10k firmware is stored as twicepower (0.5 dB
steps). This isn't the case for max_antenna_gain - which is still expected
by the firmware as dB.
The firmware is converting it from dB to the internal (twicepower)
representation when it calculates the limits of a channel. This can be seen
in tpc_stats when configuring "12" as max_antenna_gain. Instead of the
expected 12 (6 dB), the tpc_stats shows 24 (12 dB).
Tested on QCA9888 and IPQ4019 with firmware 10.4-3.5.3-00057.
Fixes: 02256930d9b8 ("ath10k: use proper tx power unit")
Signed-off-by: Sven Eckelmann <seckelmann@datto.com>
Forwarded: https://patchwork.kernel.org/patch/10986723/
--- a/drivers/net/wireless/ath/ath10k/mac.c
+++ b/drivers/net/wireless/ath/ath10k/mac.c
@@ -1020,7 +1020,7 @@ 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;
- arg.channel.max_antenna_gain = channel->max_antenna_gain * 2;
+ arg.channel.max_antenna_gain = channel->max_antenna_gain;
reinit_completion(&ar->vdev_setup_done);
@@ -1462,7 +1462,7 @@ 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;
- arg.channel.max_antenna_gain = chandef->chan->max_antenna_gain * 2;
+ arg.channel.max_antenna_gain = chandef->chan->max_antenna_gain;
if (arvif->vdev_type == WMI_VDEV_TYPE_AP) {
arg.ssid = arvif->u.ap.ssid;
@@ -3143,7 +3143,7 @@ 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;
- ch->max_antenna_gain = channel->max_antenna_gain * 2;
+ ch->max_antenna_gain = channel->max_antenna_gain;
ch->reg_class_id = 0; /* FIXME */
/* FIXME: why use only legacy modes, why not any

View File

@@ -17,7 +17,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
@@ -6654,6 +6654,12 @@ static s32 brcmf_config_dongle(struct br
@@ -6660,6 +6660,12 @@ static s32 brcmf_config_dongle(struct br
brcmf_configure_arp_nd_offload(ifp, true);

View File

@@ -836,7 +836,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
return err;
}
sinfo->filled |= BIT_ULL(NL80211_STA_INFO_RX_PACKETS) |
@@ -2566,7 +2592,7 @@ brcmf_cfg80211_get_station(struct wiphy
@@ -2567,7 +2593,7 @@ brcmf_cfg80211_get_station(struct wiphy
&sta_info_le,
sizeof(sta_info_le));
if (err < 0) {
@@ -845,7 +845,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
goto done;
}
}
@@ -2635,7 +2661,8 @@ brcmf_cfg80211_get_station(struct wiphy
@@ -2638,7 +2664,8 @@ brcmf_cfg80211_get_station(struct wiphy
err = brcmf_fil_cmd_data_get(ifp, BRCMF_C_GET_RSSI,
&scb_val, sizeof(scb_val));
if (err) {
@@ -855,7 +855,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
goto done;
} else {
rssi = le32_to_cpu(scb_val.val);
@@ -2666,8 +2693,8 @@ brcmf_cfg80211_dump_station(struct wiphy
@@ -2669,8 +2696,8 @@ brcmf_cfg80211_dump_station(struct wiphy
&cfg->assoclist,
sizeof(cfg->assoclist));
if (err) {
@@ -866,7 +866,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
cfg->assoclist.count = 0;
return -EOPNOTSUPP;
}
@@ -2715,9 +2742,9 @@ brcmf_cfg80211_set_power_mgmt(struct wip
@@ -2718,9 +2745,9 @@ brcmf_cfg80211_set_power_mgmt(struct wip
err = brcmf_fil_cmd_int_set(ifp, BRCMF_C_SET_PM, pm);
if (err) {
if (err == -ENODEV)
@@ -878,7 +878,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
}
done:
brcmf_dbg(TRACE, "Exit\n");
@@ -2740,7 +2767,7 @@ static s32 brcmf_inform_single_bss(struc
@@ -2743,7 +2770,7 @@ static s32 brcmf_inform_single_bss(struc
struct cfg80211_inform_bss bss_data = {};
if (le32_to_cpu(bi->length) > WL_BSS_INFO_MAX) {
@@ -887,7 +887,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
return 0;
}
@@ -2799,6 +2826,7 @@ next_bss_le(struct brcmf_scan_results *l
@@ -2802,6 +2829,7 @@ next_bss_le(struct brcmf_scan_results *l
static s32 brcmf_inform_bss(struct brcmf_cfg80211_info *cfg)
{
@@ -895,7 +895,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
struct brcmf_scan_results *bss_list;
struct brcmf_bss_info_le *bi = NULL; /* must be initialized */
s32 err = 0;
@@ -2807,8 +2835,8 @@ static s32 brcmf_inform_bss(struct brcmf
@@ -2810,8 +2838,8 @@ static s32 brcmf_inform_bss(struct brcmf
bss_list = (struct brcmf_scan_results *)cfg->escan_info.escan_buf;
if (bss_list->count != 0 &&
bss_list->version != BRCMF_BSS_INFO_VERSION) {
@@ -906,7 +906,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
return -EOPNOTSUPP;
}
brcmf_dbg(SCAN, "scanned AP count (%d)\n", bss_list->count);
@@ -2852,7 +2880,7 @@ static s32 brcmf_inform_ibss(struct brcm
@@ -2855,7 +2883,7 @@ static s32 brcmf_inform_ibss(struct brcm
err = brcmf_fil_cmd_data_get(netdev_priv(ndev), BRCMF_C_GET_BSS_INFO,
buf, WL_BSS_INFO_MAX);
if (err) {
@@ -915,7 +915,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
goto CleanUp;
}
@@ -2906,6 +2934,7 @@ CleanUp:
@@ -2909,6 +2937,7 @@ CleanUp:
static s32 brcmf_update_bss_info(struct brcmf_cfg80211_info *cfg,
struct brcmf_if *ifp)
{
@@ -923,7 +923,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
struct brcmf_bss_info_le *bi;
const struct brcmf_tlv *tim;
u16 beacon_interval;
@@ -2922,7 +2951,7 @@ static s32 brcmf_update_bss_info(struct
@@ -2925,7 +2954,7 @@ static s32 brcmf_update_bss_info(struct
err = brcmf_fil_cmd_data_get(ifp, BRCMF_C_GET_BSS_INFO,
cfg->extra_buf, WL_EXTRA_BUF_MAX);
if (err) {
@@ -932,7 +932,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
goto update_bss_info_out;
}
@@ -2947,7 +2976,7 @@ static s32 brcmf_update_bss_info(struct
@@ -2950,7 +2979,7 @@ static s32 brcmf_update_bss_info(struct
u32 var;
err = brcmf_fil_iovar_int_get(ifp, "dtim_assoc", &var);
if (err) {
@@ -941,7 +941,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
goto update_bss_info_out;
}
dtim_period = (u8)var;
@@ -2985,9 +3014,10 @@ static void brcmf_escan_timeout(struct t
@@ -2988,9 +3017,10 @@ static void brcmf_escan_timeout(struct t
{
struct brcmf_cfg80211_info *cfg =
from_timer(cfg, t, escan_timeout);
@@ -953,7 +953,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
schedule_work(&cfg->escan_timeout_work);
}
}
@@ -3036,6 +3066,7 @@ brcmf_cfg80211_escan_handler(struct brcm
@@ -3039,6 +3069,7 @@ brcmf_cfg80211_escan_handler(struct brcm
const struct brcmf_event_msg *e, void *data)
{
struct brcmf_cfg80211_info *cfg = ifp->drvr->config;
@@ -961,7 +961,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
s32 status;
struct brcmf_escan_result_le *escan_result_le;
u32 escan_buflen;
@@ -3052,32 +3083,33 @@ brcmf_cfg80211_escan_handler(struct brcm
@@ -3055,32 +3086,33 @@ brcmf_cfg80211_escan_handler(struct brcm
goto exit;
if (!test_bit(BRCMF_SCAN_STATUS_BUSY, &cfg->scan_status)) {
@@ -1002,7 +1002,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
goto exit;
}
bss_info_le = &escan_result_le->bss_info_le;
@@ -3092,8 +3124,8 @@ brcmf_cfg80211_escan_handler(struct brcm
@@ -3095,8 +3127,8 @@ brcmf_cfg80211_escan_handler(struct brcm
bi_length = le32_to_cpu(bss_info_le->length);
if (bi_length != escan_buflen - WL_ESCAN_RESULTS_FIXED_SIZE) {
@@ -1013,7 +1013,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
goto exit;
}
@@ -3101,7 +3133,7 @@ brcmf_cfg80211_escan_handler(struct brcm
@@ -3104,7 +3136,7 @@ brcmf_cfg80211_escan_handler(struct brcm
BIT(NL80211_IFTYPE_ADHOC))) {
if (le16_to_cpu(bss_info_le->capability) &
WLAN_CAPABILITY_IBSS) {
@@ -1022,7 +1022,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
goto exit;
}
}
@@ -3109,7 +3141,7 @@ brcmf_cfg80211_escan_handler(struct brcm
@@ -3112,7 +3144,7 @@ brcmf_cfg80211_escan_handler(struct brcm
list = (struct brcmf_scan_results *)
cfg->escan_info.escan_buf;
if (bi_length > BRCMF_ESCAN_BUF_SIZE - list->buflen) {
@@ -1031,7 +1031,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
goto exit;
}
@@ -3301,14 +3333,14 @@ brcmf_notify_sched_scan_results(struct b
@@ -3304,14 +3336,14 @@ brcmf_notify_sched_scan_results(struct b
WARN_ON(status != BRCMF_PNO_SCAN_COMPLETE);
brcmf_dbg(SCAN, "PFN NET FOUND event. count: %d\n", result_count);
if (!result_count) {
@@ -1048,7 +1048,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
goto out_err;
}
@@ -3362,8 +3394,8 @@ brcmf_cfg80211_sched_scan_start(struct w
@@ -3365,8 +3397,8 @@ brcmf_cfg80211_sched_scan_start(struct w
req->n_match_sets, req->n_ssids);
if (test_bit(BRCMF_SCAN_STATUS_SUPPRESS, &cfg->scan_status)) {
@@ -1059,7 +1059,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
return -EAGAIN;
}
@@ -3442,6 +3474,7 @@ brcmf_wowl_nd_results(struct brcmf_if *i
@@ -3445,6 +3477,7 @@ brcmf_wowl_nd_results(struct brcmf_if *i
void *data)
{
struct brcmf_cfg80211_info *cfg = ifp->drvr->config;
@@ -1067,7 +1067,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
struct brcmf_pno_scanresults_le *pfn_result;
struct brcmf_pno_net_info_le *netinfo;
@@ -3460,8 +3493,8 @@ brcmf_wowl_nd_results(struct brcmf_if *i
@@ -3463,8 +3496,8 @@ brcmf_wowl_nd_results(struct brcmf_if *i
}
if (le32_to_cpu(pfn_result->count) < 1) {
@@ -1078,7 +1078,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
return -EINVAL;
}
@@ -3500,7 +3533,7 @@ static void brcmf_report_wowl_wakeind(st
@@ -3503,7 +3536,7 @@ static void brcmf_report_wowl_wakeind(st
err = brcmf_fil_iovar_data_get(ifp, "wowl_wakeind", &wake_ind_le,
sizeof(wake_ind_le));
if (err) {
@@ -1087,7 +1087,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
return;
}
@@ -3541,7 +3574,7 @@ static void brcmf_report_wowl_wakeind(st
@@ -3544,7 +3577,7 @@ static void brcmf_report_wowl_wakeind(st
cfg->wowl.nd_data_completed,
BRCMF_ND_INFO_TIMEOUT);
if (!timeout)
@@ -1096,7 +1096,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
else
wakeup_data.net_detect = cfg->wowl.nd_info;
}
@@ -3749,7 +3782,7 @@ brcmf_cfg80211_set_pmksa(struct wiphy *w
@@ -3752,7 +3785,7 @@ brcmf_cfg80211_set_pmksa(struct wiphy *w
cfg->pmk_list.npmk = cpu_to_le32(npmk);
}
} else {
@@ -1105,7 +1105,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
return -EINVAL;
}
@@ -3795,7 +3828,7 @@ brcmf_cfg80211_del_pmksa(struct wiphy *w
@@ -3798,7 +3831,7 @@ brcmf_cfg80211_del_pmksa(struct wiphy *w
memset(&pmk[i], 0, sizeof(*pmk));
cfg->pmk_list.npmk = cpu_to_le32(npmk - 1);
} else {
@@ -1114,7 +1114,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
return -EINVAL;
}
@@ -3827,19 +3860,20 @@ brcmf_cfg80211_flush_pmksa(struct wiphy
@@ -3830,19 +3863,20 @@ brcmf_cfg80211_flush_pmksa(struct wiphy
static s32 brcmf_configure_opensecurity(struct brcmf_if *ifp)
{
@@ -1137,7 +1137,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
return err;
}
/* set upper-layer auth */
@@ -3849,7 +3883,7 @@ static s32 brcmf_configure_opensecurity(
@@ -3852,7 +3886,7 @@ static s32 brcmf_configure_opensecurity(
wpa_val = WPA_AUTH_DISABLED;
err = brcmf_fil_bsscfg_int_set(ifp, "wpa_auth", wpa_val);
if (err < 0) {
@@ -1146,7 +1146,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
return err;
}
@@ -3869,6 +3903,7 @@ brcmf_configure_wpaie(struct brcmf_if *i
@@ -3872,6 +3906,7 @@ brcmf_configure_wpaie(struct brcmf_if *i
const struct brcmf_vs_tlv *wpa_ie,
bool is_rsn_ie)
{
@@ -1154,7 +1154,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
u32 auth = 0; /* d11 open authentication */
u16 count;
s32 err = 0;
@@ -3899,13 +3934,13 @@ brcmf_configure_wpaie(struct brcmf_if *i
@@ -3902,13 +3937,13 @@ brcmf_configure_wpaie(struct brcmf_if *i
/* check for multicast cipher suite */
if (offset + WPA_IE_MIN_OUI_LEN > len) {
err = -EINVAL;
@@ -1170,7 +1170,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
goto exit;
}
offset += TLV_OUI_LEN;
@@ -3927,7 +3962,7 @@ brcmf_configure_wpaie(struct brcmf_if *i
@@ -3930,7 +3965,7 @@ brcmf_configure_wpaie(struct brcmf_if *i
break;
default:
err = -EINVAL;
@@ -1179,7 +1179,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
goto exit;
}
@@ -3938,13 +3973,13 @@ brcmf_configure_wpaie(struct brcmf_if *i
@@ -3941,13 +3976,13 @@ brcmf_configure_wpaie(struct brcmf_if *i
/* Check for unicast suite(s) */
if (offset + (WPA_IE_MIN_OUI_LEN * count) > len) {
err = -EINVAL;
@@ -1195,7 +1195,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
goto exit;
}
offset += TLV_OUI_LEN;
@@ -3962,7 +3997,7 @@ brcmf_configure_wpaie(struct brcmf_if *i
@@ -3965,7 +4000,7 @@ brcmf_configure_wpaie(struct brcmf_if *i
pval |= AES_ENABLED;
break;
default:
@@ -1204,7 +1204,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
}
offset++;
}
@@ -3972,13 +4007,13 @@ brcmf_configure_wpaie(struct brcmf_if *i
@@ -3975,13 +4010,13 @@ brcmf_configure_wpaie(struct brcmf_if *i
/* Check for auth key management suite(s) */
if (offset + (WPA_IE_MIN_OUI_LEN * count) > len) {
err = -EINVAL;
@@ -1220,7 +1220,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
goto exit;
}
offset += TLV_OUI_LEN;
@@ -4006,7 +4041,7 @@ brcmf_configure_wpaie(struct brcmf_if *i
@@ -4009,7 +4044,7 @@ brcmf_configure_wpaie(struct brcmf_if *i
wpa_auth |= WPA2_AUTH_1X_SHA256;
break;
default:
@@ -1229,7 +1229,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
}
offset++;
}
@@ -4048,7 +4083,7 @@ brcmf_configure_wpaie(struct brcmf_if *i
@@ -4051,7 +4086,7 @@ brcmf_configure_wpaie(struct brcmf_if *i
err = brcmf_fil_bsscfg_int_set(ifp, "wme_bss_disable",
wme_bss_disable);
if (err < 0) {
@@ -1238,7 +1238,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
goto exit;
}
@@ -4062,7 +4097,7 @@ brcmf_configure_wpaie(struct brcmf_if *i
@@ -4065,7 +4100,7 @@ brcmf_configure_wpaie(struct brcmf_if *i
&data[offset],
WPA_IE_MIN_OUI_LEN);
if (err < 0) {
@@ -1247,7 +1247,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
goto exit;
}
}
@@ -4073,13 +4108,13 @@ brcmf_configure_wpaie(struct brcmf_if *i
@@ -4076,13 +4111,13 @@ brcmf_configure_wpaie(struct brcmf_if *i
/* set auth */
err = brcmf_fil_bsscfg_int_set(ifp, "auth", auth);
if (err < 0) {
@@ -1263,7 +1263,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
goto exit;
}
/* Configure MFP, this needs to go after wsec otherwise the wsec command
@@ -4088,14 +4123,14 @@ brcmf_configure_wpaie(struct brcmf_if *i
@@ -4091,14 +4126,14 @@ brcmf_configure_wpaie(struct brcmf_if *i
if (brcmf_feat_is_enabled(ifp, BRCMF_FEAT_MFP)) {
err = brcmf_fil_bsscfg_int_set(ifp, "mfp", mfp);
if (err < 0) {
@@ -1280,7 +1280,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
goto exit;
}
@@ -4182,6 +4217,7 @@ s32 brcmf_vif_set_mgmt_ie(struct brcmf_c
@@ -4185,6 +4220,7 @@ s32 brcmf_vif_set_mgmt_ie(struct brcmf_c
const u8 *vndr_ie_buf, u32 vndr_ie_len)
{
struct brcmf_if *ifp;
@@ -1288,7 +1288,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
struct vif_saved_ie *saved_ie;
s32 err = 0;
u8 *iovar_ie_buf;
@@ -4202,6 +4238,7 @@ s32 brcmf_vif_set_mgmt_ie(struct brcmf_c
@@ -4205,6 +4241,7 @@ s32 brcmf_vif_set_mgmt_ie(struct brcmf_c
if (!vif)
return -ENODEV;
ifp = vif->ifp;
@@ -1296,7 +1296,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
saved_ie = &vif->saved_ie;
brcmf_dbg(TRACE, "bsscfgidx %d, pktflag : 0x%02X\n", ifp->bsscfgidx,
@@ -4233,13 +4270,13 @@ s32 brcmf_vif_set_mgmt_ie(struct brcmf_c
@@ -4236,13 +4273,13 @@ s32 brcmf_vif_set_mgmt_ie(struct brcmf_c
break;
default:
err = -EPERM;
@@ -1312,7 +1312,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
goto exit;
}
@@ -4300,8 +4337,8 @@ s32 brcmf_vif_set_mgmt_ie(struct brcmf_c
@@ -4303,8 +4340,8 @@ s32 brcmf_vif_set_mgmt_ie(struct brcmf_c
/* verify remained buf size before copy data */
if (remained_buf_len < (vndrie_info->vndrie.len +
VNDR_IE_VSIE_OFFSET)) {
@@ -1323,7 +1323,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
break;
}
remained_buf_len -= (vndrie_info->ie_len +
@@ -4332,7 +4369,7 @@ s32 brcmf_vif_set_mgmt_ie(struct brcmf_c
@@ -4335,7 +4372,7 @@ s32 brcmf_vif_set_mgmt_ie(struct brcmf_c
err = brcmf_fil_bsscfg_data_set(ifp, "vndr_ie", iovar_ie_buf,
total_ie_buf_len);
if (err)
@@ -1332,7 +1332,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
}
exit:
@@ -4360,13 +4397,14 @@ static s32
@@ -4363,13 +4400,14 @@ static s32
brcmf_config_ap_mgmt_ie(struct brcmf_cfg80211_vif *vif,
struct cfg80211_beacon_data *beacon)
{
@@ -1348,7 +1348,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
return err;
}
brcmf_dbg(TRACE, "Applied Vndr IEs for Beacon\n");
@@ -4376,7 +4414,7 @@ brcmf_config_ap_mgmt_ie(struct brcmf_cfg
@@ -4379,7 +4417,7 @@ brcmf_config_ap_mgmt_ie(struct brcmf_cfg
beacon->proberesp_ies,
beacon->proberesp_ies_len);
if (err)
@@ -1357,7 +1357,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
else
brcmf_dbg(TRACE, "Applied Vndr IEs for Probe Resp\n");
@@ -4485,7 +4523,8 @@ brcmf_cfg80211_start_ap(struct wiphy *wi
@@ -4488,7 +4526,8 @@ brcmf_cfg80211_start_ap(struct wiphy *wi
err = brcmf_fil_cmd_int_set(ifp, BRCMF_C_SET_REGULATORY,
is_11d);
if (err < 0) {
@@ -1367,7 +1367,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
goto exit;
}
}
@@ -4493,8 +4532,8 @@ brcmf_cfg80211_start_ap(struct wiphy *wi
@@ -4496,8 +4535,8 @@ brcmf_cfg80211_start_ap(struct wiphy *wi
err = brcmf_fil_cmd_int_set(ifp, BRCMF_C_SET_BCNPRD,
settings->beacon_interval);
if (err < 0) {
@@ -1378,7 +1378,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
goto exit;
}
}
@@ -4502,7 +4541,8 @@ brcmf_cfg80211_start_ap(struct wiphy *wi
@@ -4505,7 +4544,8 @@ brcmf_cfg80211_start_ap(struct wiphy *wi
err = brcmf_fil_cmd_int_set(ifp, BRCMF_C_SET_DTIMPRD,
settings->dtim_period);
if (err < 0) {
@@ -1388,7 +1388,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
goto exit;
}
}
@@ -4512,7 +4552,8 @@ brcmf_cfg80211_start_ap(struct wiphy *wi
@@ -4515,7 +4555,8 @@ brcmf_cfg80211_start_ap(struct wiphy *wi
!brcmf_feat_is_enabled(ifp, BRCMF_FEAT_RSDB))) {
err = brcmf_fil_cmd_int_set(ifp, BRCMF_C_DOWN, 1);
if (err < 0) {
@@ -1398,7 +1398,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
goto exit;
}
brcmf_fil_iovar_int_set(ifp, "apsta", 0);
@@ -4520,7 +4561,7 @@ brcmf_cfg80211_start_ap(struct wiphy *wi
@@ -4523,7 +4564,7 @@ brcmf_cfg80211_start_ap(struct wiphy *wi
err = brcmf_fil_cmd_int_set(ifp, BRCMF_C_SET_INFRA, 1);
if (err < 0) {
@@ -1407,7 +1407,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
goto exit;
}
} else if (WARN_ON(supports_11d && (is_11d != ifp->vif->is_11d))) {
@@ -4536,7 +4577,8 @@ brcmf_cfg80211_start_ap(struct wiphy *wi
@@ -4539,7 +4580,8 @@ brcmf_cfg80211_start_ap(struct wiphy *wi
err = brcmf_fil_cmd_int_set(ifp, BRCMF_C_SET_AP, 1);
if (err < 0) {
@@ -1417,7 +1417,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
goto exit;
}
if (!mbss) {
@@ -4545,14 +4587,14 @@ brcmf_cfg80211_start_ap(struct wiphy *wi
@@ -4548,14 +4590,14 @@ brcmf_cfg80211_start_ap(struct wiphy *wi
*/
err = brcmf_fil_iovar_int_set(ifp, "chanspec", chanspec);
if (err < 0) {
@@ -1435,7 +1435,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
goto exit;
}
/* On DOWN the firmware removes the WEP keys, reconfigure
@@ -4567,14 +4609,14 @@ brcmf_cfg80211_start_ap(struct wiphy *wi
@@ -4570,14 +4612,14 @@ brcmf_cfg80211_start_ap(struct wiphy *wi
err = brcmf_fil_cmd_data_set(ifp, BRCMF_C_SET_SSID,
&join_params, sizeof(join_params));
if (err < 0) {
@@ -1452,7 +1452,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
goto exit;
}
}
@@ -4583,14 +4625,14 @@ brcmf_cfg80211_start_ap(struct wiphy *wi
@@ -4586,14 +4628,14 @@ brcmf_cfg80211_start_ap(struct wiphy *wi
} else if (dev_role == NL80211_IFTYPE_P2P_GO) {
err = brcmf_fil_iovar_int_set(ifp, "chanspec", chanspec);
if (err < 0) {
@@ -1470,7 +1470,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
goto exit;
}
bss_enable.bsscfgidx = cpu_to_le32(ifp->bsscfgidx);
@@ -4598,7 +4640,7 @@ brcmf_cfg80211_start_ap(struct wiphy *wi
@@ -4601,7 +4643,7 @@ brcmf_cfg80211_start_ap(struct wiphy *wi
err = brcmf_fil_iovar_data_set(ifp, "bss", &bss_enable,
sizeof(bss_enable));
if (err < 0) {
@@ -1479,7 +1479,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
goto exit;
}
@@ -4646,13 +4688,13 @@ static int brcmf_cfg80211_stop_ap(struct
@@ -4649,13 +4691,13 @@ static int brcmf_cfg80211_stop_ap(struct
err = brcmf_fil_cmd_data_set(ifp, BRCMF_C_SET_SSID,
&join_params, sizeof(join_params));
if (err < 0)
@@ -1496,7 +1496,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
if (brcmf_feat_is_enabled(ifp, BRCMF_FEAT_MBSS))
brcmf_fil_iovar_int_set(ifp, "mbss", 0);
brcmf_fil_cmd_int_set(ifp, BRCMF_C_SET_REGULATORY,
@@ -4660,7 +4702,7 @@ static int brcmf_cfg80211_stop_ap(struct
@@ -4663,7 +4705,7 @@ static int brcmf_cfg80211_stop_ap(struct
/* Bring device back up so it can be used again */
err = brcmf_fil_cmd_int_set(ifp, BRCMF_C_UP, 1);
if (err < 0)
@@ -1505,7 +1505,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
brcmf_vif_clear_mgmt_ies(ifp->vif);
} else {
@@ -4669,7 +4711,7 @@ static int brcmf_cfg80211_stop_ap(struct
@@ -4672,7 +4714,7 @@ static int brcmf_cfg80211_stop_ap(struct
err = brcmf_fil_iovar_data_set(ifp, "bss", &bss_enable,
sizeof(bss_enable));
if (err < 0)
@@ -1514,7 +1514,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
}
brcmf_set_mpc(ifp, 1);
brcmf_configure_arp_nd_offload(ifp, true);
@@ -4717,7 +4759,8 @@ brcmf_cfg80211_del_station(struct wiphy
@@ -4720,7 +4762,8 @@ brcmf_cfg80211_del_station(struct wiphy
err = brcmf_fil_cmd_data_set(ifp, BRCMF_C_SCB_DEAUTHENTICATE_FOR_REASON,
&scbval, sizeof(scbval));
if (err)
@@ -1524,7 +1524,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
brcmf_dbg(TRACE, "Exit\n");
return err;
@@ -4747,7 +4790,7 @@ brcmf_cfg80211_change_station(struct wip
@@ -4750,7 +4793,7 @@ brcmf_cfg80211_change_station(struct wip
err = brcmf_fil_cmd_data_set(ifp, BRCMF_C_SET_SCB_DEAUTHORIZE,
(void *)mac, ETH_ALEN);
if (err < 0)
@@ -1533,7 +1533,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
return err;
}
@@ -4797,7 +4840,7 @@ brcmf_cfg80211_mgmt_tx(struct wiphy *wip
@@ -4800,7 +4843,7 @@ brcmf_cfg80211_mgmt_tx(struct wiphy *wip
mgmt = (const struct ieee80211_mgmt *)buf;
if (!ieee80211_is_mgmt(mgmt->frame_control)) {
@@ -1542,7 +1542,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
return -EPERM;
}
@@ -4828,13 +4871,13 @@ brcmf_cfg80211_mgmt_tx(struct wiphy *wip
@@ -4831,13 +4874,13 @@ brcmf_cfg80211_mgmt_tx(struct wiphy *wip
GFP_KERNEL);
} else if (ieee80211_is_action(mgmt->frame_control)) {
if (len > BRCMF_FIL_ACTION_FRAME_SIZE + DOT11_MGMT_HDR_LEN) {
@@ -1558,7 +1558,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
err = -ENOMEM;
goto exit;
}
@@ -4892,7 +4935,7 @@ brcmf_cfg80211_cancel_remain_on_channel(
@@ -4895,7 +4938,7 @@ brcmf_cfg80211_cancel_remain_on_channel(
vif = cfg->p2p.bss_idx[P2PAPI_BSSCFG_DEVICE].vif;
if (vif == NULL) {
@@ -1567,7 +1567,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
err = -ENODEV;
goto exit;
}
@@ -4920,7 +4963,7 @@ static int brcmf_cfg80211_get_channel(st
@@ -4923,7 +4966,7 @@ static int brcmf_cfg80211_get_channel(st
err = brcmf_fil_iovar_int_get(ifp, "chanspec", &chanspec);
if (err) {
@@ -1576,7 +1576,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
return err;
}
@@ -5059,7 +5102,7 @@ static int brcmf_cfg80211_tdls_oper(stru
@@ -5062,7 +5105,7 @@ static int brcmf_cfg80211_tdls_oper(stru
ret = brcmf_fil_iovar_data_set(ifp, "tdls_endpoint",
&info, sizeof(info));
if (ret < 0)
@@ -1585,7 +1585,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
return ret;
}
@@ -5080,7 +5123,7 @@ brcmf_cfg80211_update_conn_params(struct
@@ -5083,7 +5126,7 @@ brcmf_cfg80211_update_conn_params(struct
err = brcmf_vif_set_mgmt_ie(ifp->vif, BRCMF_VNDR_IE_ASSOCREQ_FLAG,
sme->ie, sme->ie_len);
if (err)
@@ -1594,7 +1594,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
else
brcmf_dbg(TRACE, "Applied Vndr IEs for Assoc request\n");
@@ -5106,7 +5149,7 @@ brcmf_cfg80211_set_rekey_data(struct wip
@@ -5109,7 +5152,7 @@ brcmf_cfg80211_set_rekey_data(struct wip
ret = brcmf_fil_iovar_data_set(ifp, "gtk_key_info", &gtk_le,
sizeof(gtk_le));
if (ret < 0)
@@ -1603,7 +1603,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
return ret;
}
@@ -5338,6 +5381,7 @@ static void brcmf_clear_assoc_ies(struct
@@ -5344,6 +5387,7 @@ static void brcmf_clear_assoc_ies(struct
static s32 brcmf_get_assoc_ies(struct brcmf_cfg80211_info *cfg,
struct brcmf_if *ifp)
{
@@ -1611,7 +1611,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
struct brcmf_cfg80211_assoc_ielen_le *assoc_info;
struct brcmf_cfg80211_connect_info *conn_info = cfg_to_conn(cfg);
u32 req_len;
@@ -5349,7 +5393,7 @@ static s32 brcmf_get_assoc_ies(struct br
@@ -5355,7 +5399,7 @@ static s32 brcmf_get_assoc_ies(struct br
err = brcmf_fil_iovar_data_get(ifp, "assoc_info",
cfg->extra_buf, WL_ASSOC_INFO_MAX);
if (err) {
@@ -1620,7 +1620,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
return err;
}
assoc_info =
@@ -5361,7 +5405,7 @@ static s32 brcmf_get_assoc_ies(struct br
@@ -5367,7 +5411,7 @@ static s32 brcmf_get_assoc_ies(struct br
cfg->extra_buf,
WL_ASSOC_INFO_MAX);
if (err) {
@@ -1629,7 +1629,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
return err;
}
conn_info->req_ie_len = req_len;
@@ -5379,7 +5423,7 @@ static s32 brcmf_get_assoc_ies(struct br
@@ -5385,7 +5429,7 @@ static s32 brcmf_get_assoc_ies(struct br
cfg->extra_buf,
WL_ASSOC_INFO_MAX);
if (err) {
@@ -1638,7 +1638,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
return err;
}
conn_info->resp_ie_len = resp_len;
@@ -5508,6 +5552,7 @@ brcmf_notify_connect_status_ap(struct br
@@ -5514,6 +5558,7 @@ brcmf_notify_connect_status_ap(struct br
struct net_device *ndev,
const struct brcmf_event_msg *e, void *data)
{
@@ -1646,7 +1646,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
static int generation;
u32 event = e->event_code;
u32 reason = e->reason;
@@ -5525,7 +5570,7 @@ brcmf_notify_connect_status_ap(struct br
@@ -5531,7 +5576,7 @@ brcmf_notify_connect_status_ap(struct br
if (((event == BRCMF_E_ASSOC_IND) || (event == BRCMF_E_REASSOC_IND)) &&
(reason == BRCMF_E_STATUS_SUCCESS)) {
if (!data) {
@@ -1655,7 +1655,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
return -EINVAL;
}
@@ -5817,6 +5862,7 @@ static void init_vif_event(struct brcmf_
@@ -5823,6 +5868,7 @@ static void init_vif_event(struct brcmf_
static s32 brcmf_dongle_roam(struct brcmf_if *ifp)
{
@@ -1663,7 +1663,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
s32 err;
u32 bcn_timeout;
__le32 roamtrigger[2];
@@ -5829,7 +5875,7 @@ static s32 brcmf_dongle_roam(struct brcm
@@ -5835,7 +5881,7 @@ static s32 brcmf_dongle_roam(struct brcm
bcn_timeout = BRCMF_DEFAULT_BCN_TIMEOUT_ROAM_ON;
err = brcmf_fil_iovar_int_set(ifp, "bcn_timeout", bcn_timeout);
if (err) {
@@ -1672,7 +1672,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
goto roam_setup_done;
}
@@ -5841,7 +5887,7 @@ static s32 brcmf_dongle_roam(struct brcm
@@ -5847,7 +5893,7 @@ static s32 brcmf_dongle_roam(struct brcm
err = brcmf_fil_iovar_int_set(ifp, "roam_off",
ifp->drvr->settings->roamoff);
if (err) {
@@ -1681,7 +1681,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
goto roam_setup_done;
}
@@ -5850,7 +5896,7 @@ static s32 brcmf_dongle_roam(struct brcm
@@ -5856,7 +5902,7 @@ static s32 brcmf_dongle_roam(struct brcm
err = brcmf_fil_cmd_data_set(ifp, BRCMF_C_SET_ROAM_TRIGGER,
(void *)roamtrigger, sizeof(roamtrigger));
if (err) {
@@ -1690,7 +1690,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
goto roam_setup_done;
}
@@ -5859,7 +5905,7 @@ static s32 brcmf_dongle_roam(struct brcm
@@ -5865,7 +5911,7 @@ static s32 brcmf_dongle_roam(struct brcm
err = brcmf_fil_cmd_data_set(ifp, BRCMF_C_SET_ROAM_DELTA,
(void *)roam_delta, sizeof(roam_delta));
if (err) {
@@ -1699,7 +1699,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
goto roam_setup_done;
}
@@ -5870,25 +5916,26 @@ roam_setup_done:
@@ -5876,25 +5922,26 @@ roam_setup_done:
static s32
brcmf_dongle_scantime(struct brcmf_if *ifp)
{
@@ -1729,7 +1729,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
goto dongle_scantime_out;
}
@@ -5920,10 +5967,10 @@ static void brcmf_update_bw40_channel_fl
@@ -5926,10 +5973,10 @@ static void brcmf_update_bw40_channel_fl
static int brcmf_construct_chaninfo(struct brcmf_cfg80211_info *cfg,
u32 bw_cap[])
{
@@ -1741,7 +1741,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
struct brcmf_chanspec_list *list;
struct brcmu_chan ch;
int err;
@@ -5942,11 +5989,10 @@ static int brcmf_construct_chaninfo(stru
@@ -5948,11 +5995,10 @@ static int brcmf_construct_chaninfo(stru
err = brcmf_fil_iovar_data_get(ifp, "chanspecs", pbuf,
BRCMF_DCMD_MEDLEN);
if (err) {
@@ -1754,7 +1754,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
band = wiphy->bands[NL80211_BAND_2GHZ];
if (band)
for (i = 0; i < band->n_channels; i++)
@@ -5966,7 +6012,8 @@ static int brcmf_construct_chaninfo(stru
@@ -5972,7 +6018,8 @@ static int brcmf_construct_chaninfo(stru
} else if (ch.band == BRCMU_CHAN_BAND_5G) {
band = wiphy->bands[NL80211_BAND_5GHZ];
} else {
@@ -1764,7 +1764,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
continue;
}
if (!band)
@@ -5989,8 +6036,8 @@ static int brcmf_construct_chaninfo(stru
@@ -5995,8 +6042,8 @@ static int brcmf_construct_chaninfo(stru
/* It seems firmware supports some channel we never
* considered. Something new in IEEE standard?
*/
@@ -1775,7 +1775,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
continue;
}
@@ -6036,6 +6083,7 @@ fail_pbuf:
@@ -6042,6 +6089,7 @@ fail_pbuf:
static int brcmf_enable_bw40_2g(struct brcmf_cfg80211_info *cfg)
{
@@ -1783,7 +1783,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
struct brcmf_if *ifp = brcmf_get_ifp(cfg->pub, 0);
struct ieee80211_supported_band *band;
struct brcmf_fil_bwcap_le band_bwcap;
@@ -6082,7 +6130,7 @@ static int brcmf_enable_bw40_2g(struct b
@@ -6088,7 +6136,7 @@ static int brcmf_enable_bw40_2g(struct b
err = brcmf_fil_iovar_data_get(ifp, "chanspecs", pbuf,
BRCMF_DCMD_MEDLEN);
if (err) {
@@ -1792,7 +1792,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
kfree(pbuf);
return err;
}
@@ -6113,6 +6161,7 @@ static int brcmf_enable_bw40_2g(struct b
@@ -6119,6 +6167,7 @@ static int brcmf_enable_bw40_2g(struct b
static void brcmf_get_bwcap(struct brcmf_if *ifp, u32 bw_cap[])
{
@@ -1800,7 +1800,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
u32 band, mimo_bwcap;
int err;
@@ -6148,7 +6197,7 @@ static void brcmf_get_bwcap(struct brcmf
@@ -6154,7 +6203,7 @@ static void brcmf_get_bwcap(struct brcmf
bw_cap[NL80211_BAND_5GHZ] |= WLC_BW_20MHZ_BIT;
break;
default:
@@ -1809,7 +1809,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
}
}
@@ -6224,7 +6273,7 @@ static void brcmf_update_vht_cap(struct
@@ -6230,7 +6279,7 @@ static void brcmf_update_vht_cap(struct
static int brcmf_setup_wiphybands(struct brcmf_cfg80211_info *cfg)
{
struct brcmf_if *ifp = brcmf_get_ifp(cfg->pub, 0);
@@ -1818,7 +1818,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
u32 nmode = 0;
u32 vhtmode = 0;
u32 bw_cap[2] = { WLC_BW_20MHZ_BIT, WLC_BW_20MHZ_BIT };
@@ -6240,7 +6289,7 @@ static int brcmf_setup_wiphybands(struct
@@ -6246,7 +6295,7 @@ static int brcmf_setup_wiphybands(struct
(void)brcmf_fil_iovar_int_get(ifp, "vhtmode", &vhtmode);
err = brcmf_fil_iovar_int_get(ifp, "nmode", &nmode);
if (err) {
@@ -1827,7 +1827,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
} else {
brcmf_get_bwcap(ifp, bw_cap);
}
@@ -6250,7 +6299,7 @@ static int brcmf_setup_wiphybands(struct
@@ -6256,7 +6305,7 @@ static int brcmf_setup_wiphybands(struct
err = brcmf_fil_iovar_int_get(ifp, "rxchain", &rxchain);
if (err) {
@@ -1836,7 +1836,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
nchain = 1;
} else {
for (nchain = 0; rxchain; nchain++)
@@ -6260,7 +6309,7 @@ static int brcmf_setup_wiphybands(struct
@@ -6266,7 +6315,7 @@ static int brcmf_setup_wiphybands(struct
err = brcmf_construct_chaninfo(cfg, bw_cap);
if (err) {
@@ -1845,7 +1845,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
return err;
}
@@ -6272,7 +6321,6 @@ static int brcmf_setup_wiphybands(struct
@@ -6278,7 +6327,6 @@ static int brcmf_setup_wiphybands(struct
&txbf_bfr_cap);
}
@@ -1853,7 +1853,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
for (i = 0; i < ARRAY_SIZE(wiphy->bands); i++) {
band = wiphy->bands[i];
if (band == NULL)
@@ -6473,7 +6521,7 @@ static void brcmf_wiphy_wowl_params(stru
@@ -6479,7 +6527,7 @@ static void brcmf_wiphy_wowl_params(stru
wowl = kmemdup(&brcmf_wowlan_support, sizeof(brcmf_wowlan_support),
GFP_KERNEL);
if (!wowl) {
@@ -1862,7 +1862,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
wiphy->wowlan = &brcmf_wowlan_support;
return;
}
@@ -6570,7 +6618,7 @@ static int brcmf_setup_wiphy(struct wiph
@@ -6576,7 +6624,7 @@ static int brcmf_setup_wiphy(struct wiph
err = brcmf_fil_cmd_data_get(ifp, BRCMF_C_GET_BANDLIST, &bandlist,
sizeof(bandlist));
if (err) {
@@ -1871,7 +1871,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
return err;
}
/* first entry in bandlist is number of bands */
@@ -6619,6 +6667,7 @@ static int brcmf_setup_wiphy(struct wiph
@@ -6625,6 +6673,7 @@ static int brcmf_setup_wiphy(struct wiph
static s32 brcmf_config_dongle(struct brcmf_cfg80211_info *cfg)
{
@@ -1879,7 +1879,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
struct net_device *ndev;
struct wireless_dev *wdev;
struct brcmf_if *ifp;
@@ -6656,7 +6705,7 @@ static s32 brcmf_config_dongle(struct br
@@ -6662,7 +6711,7 @@ static s32 brcmf_config_dongle(struct br
err = brcmf_fil_cmd_int_set(ifp, BRCMF_C_SET_FAKEFRAG, 1);
if (err) {
@@ -1888,7 +1888,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
goto default_conf_out;
}
@@ -6848,8 +6897,8 @@ static void brcmf_cfg80211_reg_notifier(
@@ -6854,8 +6903,8 @@ static void brcmf_cfg80211_reg_notifier(
/* ignore non-ISO3166 country codes */
for (i = 0; i < 2; i++)
if (req->alpha2[i] < 'A' || req->alpha2[i] > 'Z') {
@@ -1899,7 +1899,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
return;
}
@@ -6858,7 +6907,7 @@ static void brcmf_cfg80211_reg_notifier(
@@ -6864,7 +6913,7 @@ static void brcmf_cfg80211_reg_notifier(
err = brcmf_fil_iovar_data_get(ifp, "country", &ccreq, sizeof(ccreq));
if (err) {
@@ -1908,7 +1908,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
return;
}
@@ -6868,7 +6917,7 @@ static void brcmf_cfg80211_reg_notifier(
@@ -6874,7 +6923,7 @@ static void brcmf_cfg80211_reg_notifier(
err = brcmf_fil_iovar_data_set(ifp, "country", &ccreq, sizeof(ccreq));
if (err) {
@@ -1917,7 +1917,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
return;
}
brcmf_setup_wiphybands(cfg);
@@ -6914,13 +6963,13 @@ struct brcmf_cfg80211_info *brcmf_cfg802
@@ -6920,13 +6969,13 @@ struct brcmf_cfg80211_info *brcmf_cfg802
u16 *cap = NULL;
if (!ndev) {
@@ -1933,7 +1933,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
return NULL;
}
@@ -6941,7 +6990,7 @@ struct brcmf_cfg80211_info *brcmf_cfg802
@@ -6947,7 +6996,7 @@ struct brcmf_cfg80211_info *brcmf_cfg802
err = wl_init_priv(cfg);
if (err) {
@@ -1942,7 +1942,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
brcmf_free_vif(vif);
goto wiphy_out;
}
@@ -6950,7 +6999,7 @@ struct brcmf_cfg80211_info *brcmf_cfg802
@@ -6956,7 +7005,7 @@ struct brcmf_cfg80211_info *brcmf_cfg802
/* determine d11 io type before wiphy setup */
err = brcmf_fil_cmd_int_get(ifp, BRCMF_C_GET_VERSION, &io_type);
if (err) {
@@ -1951,7 +1951,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
goto priv_out;
}
cfg->d11inf.io_type = (u8)io_type;
@@ -6984,13 +7033,13 @@ struct brcmf_cfg80211_info *brcmf_cfg802
@@ -6990,13 +7039,13 @@ struct brcmf_cfg80211_info *brcmf_cfg802
#endif
err = wiphy_register(wiphy);
if (err < 0) {
@@ -1967,7 +1967,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
goto wiphy_unreg_out;
}
@@ -7008,24 +7057,24 @@ struct brcmf_cfg80211_info *brcmf_cfg802
@@ -7014,24 +7063,24 @@ struct brcmf_cfg80211_info *brcmf_cfg802
err = brcmf_fweh_activate_events(ifp);
if (err) {
@@ -1996,7 +1996,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
brcmf_btcoex_detach(cfg);
brcmf_p2p_detach(&cfg->p2p);
goto wiphy_unreg_out;
@@ -7045,7 +7094,7 @@ struct brcmf_cfg80211_info *brcmf_cfg802
@@ -7051,7 +7100,7 @@ struct brcmf_cfg80211_info *brcmf_cfg802
/* (re-) activate FWEH event handling */
err = brcmf_fweh_activate_events(ifp);
if (err) {

View File

@@ -18,7 +18,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
@@ -6047,11 +6047,18 @@ static int brcmf_construct_chaninfo(stru
@@ -6053,11 +6053,18 @@ static int brcmf_construct_chaninfo(stru
/* assuming the chanspecs order is HT20,
* HT40 upper, HT40 lower, and VHT80.
*/

View File

@@ -18,7 +18,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
@@ -6048,6 +6048,9 @@ static int brcmf_construct_chaninfo(stru
@@ -6054,6 +6054,9 @@ static int brcmf_construct_chaninfo(stru
* HT40 upper, HT40 lower, and VHT80.
*/
switch (ch.bw) {

View File

@@ -946,7 +946,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
struct brcmf_scb_val_le scb_val;
s32 err = 0;
struct brcmf_sta_info_le sta_info_le;
@@ -2592,7 +2612,7 @@ brcmf_cfg80211_get_station(struct wiphy
@@ -2593,7 +2613,7 @@ brcmf_cfg80211_get_station(struct wiphy
&sta_info_le,
sizeof(sta_info_le));
if (err < 0) {
@@ -955,7 +955,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
goto done;
}
}
@@ -2661,7 +2681,7 @@ brcmf_cfg80211_get_station(struct wiphy
@@ -2664,7 +2684,7 @@ brcmf_cfg80211_get_station(struct wiphy
err = brcmf_fil_cmd_data_get(ifp, BRCMF_C_GET_RSSI,
&scb_val, sizeof(scb_val));
if (err) {
@@ -964,7 +964,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
err);
goto done;
} else {
@@ -2683,6 +2703,7 @@ brcmf_cfg80211_dump_station(struct wiphy
@@ -2686,6 +2706,7 @@ brcmf_cfg80211_dump_station(struct wiphy
{
struct brcmf_cfg80211_info *cfg = wiphy_to_cfg(wiphy);
struct brcmf_if *ifp = netdev_priv(ndev);
@@ -972,7 +972,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
s32 err;
brcmf_dbg(TRACE, "Enter, idx %d\n", idx);
@@ -2693,7 +2714,7 @@ brcmf_cfg80211_dump_station(struct wiphy
@@ -2696,7 +2717,7 @@ brcmf_cfg80211_dump_station(struct wiphy
&cfg->assoclist,
sizeof(cfg->assoclist));
if (err) {
@@ -981,7 +981,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
err);
cfg->assoclist.count = 0;
return -EOPNOTSUPP;
@@ -2714,6 +2735,7 @@ brcmf_cfg80211_set_power_mgmt(struct wip
@@ -2717,6 +2738,7 @@ brcmf_cfg80211_set_power_mgmt(struct wip
s32 err = 0;
struct brcmf_cfg80211_info *cfg = wiphy_to_cfg(wiphy);
struct brcmf_if *ifp = netdev_priv(ndev);
@@ -989,7 +989,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
brcmf_dbg(TRACE, "Enter\n");
@@ -2742,9 +2764,9 @@ brcmf_cfg80211_set_power_mgmt(struct wip
@@ -2745,9 +2767,9 @@ brcmf_cfg80211_set_power_mgmt(struct wip
err = brcmf_fil_cmd_int_set(ifp, BRCMF_C_SET_PM, pm);
if (err) {
if (err == -ENODEV)
@@ -1001,7 +1001,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
}
done:
brcmf_dbg(TRACE, "Exit\n");
@@ -2755,6 +2777,7 @@ static s32 brcmf_inform_single_bss(struc
@@ -2758,6 +2780,7 @@ static s32 brcmf_inform_single_bss(struc
struct brcmf_bss_info_le *bi)
{
struct wiphy *wiphy = cfg_to_wiphy(cfg);
@@ -1009,7 +1009,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
struct cfg80211_bss *bss;
enum nl80211_band band;
struct brcmu_chan ch;
@@ -2767,7 +2790,7 @@ static s32 brcmf_inform_single_bss(struc
@@ -2770,7 +2793,7 @@ static s32 brcmf_inform_single_bss(struc
struct cfg80211_inform_bss bss_data = {};
if (le32_to_cpu(bi->length) > WL_BSS_INFO_MAX) {
@@ -1018,7 +1018,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
return 0;
}
@@ -2826,7 +2849,7 @@ next_bss_le(struct brcmf_scan_results *l
@@ -2829,7 +2852,7 @@ next_bss_le(struct brcmf_scan_results *l
static s32 brcmf_inform_bss(struct brcmf_cfg80211_info *cfg)
{
@@ -1027,7 +1027,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
struct brcmf_scan_results *bss_list;
struct brcmf_bss_info_le *bi = NULL; /* must be initialized */
s32 err = 0;
@@ -2835,7 +2858,7 @@ static s32 brcmf_inform_bss(struct brcmf
@@ -2838,7 +2861,7 @@ static s32 brcmf_inform_bss(struct brcmf
bss_list = (struct brcmf_scan_results *)cfg->escan_info.escan_buf;
if (bss_list->count != 0 &&
bss_list->version != BRCMF_BSS_INFO_VERSION) {
@@ -1036,7 +1036,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
bss_list->version);
return -EOPNOTSUPP;
}
@@ -2853,6 +2876,7 @@ static s32 brcmf_inform_ibss(struct brcm
@@ -2856,6 +2879,7 @@ static s32 brcmf_inform_ibss(struct brcm
struct net_device *ndev, const u8 *bssid)
{
struct wiphy *wiphy = cfg_to_wiphy(cfg);
@@ -1044,7 +1044,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
struct ieee80211_channel *notify_channel;
struct brcmf_bss_info_le *bi = NULL;
struct ieee80211_supported_band *band;
@@ -2880,7 +2904,7 @@ static s32 brcmf_inform_ibss(struct brcm
@@ -2883,7 +2907,7 @@ static s32 brcmf_inform_ibss(struct brcm
err = brcmf_fil_cmd_data_get(netdev_priv(ndev), BRCMF_C_GET_BSS_INFO,
buf, WL_BSS_INFO_MAX);
if (err) {
@@ -1053,7 +1053,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
goto CleanUp;
}
@@ -2934,7 +2958,7 @@ CleanUp:
@@ -2937,7 +2961,7 @@ CleanUp:
static s32 brcmf_update_bss_info(struct brcmf_cfg80211_info *cfg,
struct brcmf_if *ifp)
{
@@ -1062,7 +1062,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
struct brcmf_bss_info_le *bi;
const struct brcmf_tlv *tim;
u16 beacon_interval;
@@ -2951,7 +2975,7 @@ static s32 brcmf_update_bss_info(struct
@@ -2954,7 +2978,7 @@ static s32 brcmf_update_bss_info(struct
err = brcmf_fil_cmd_data_get(ifp, BRCMF_C_GET_BSS_INFO,
cfg->extra_buf, WL_EXTRA_BUF_MAX);
if (err) {
@@ -1071,7 +1071,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
goto update_bss_info_out;
}
@@ -2976,7 +3000,7 @@ static s32 brcmf_update_bss_info(struct
@@ -2979,7 +3003,7 @@ static s32 brcmf_update_bss_info(struct
u32 var;
err = brcmf_fil_iovar_int_get(ifp, "dtim_assoc", &var);
if (err) {
@@ -1080,7 +1080,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
goto update_bss_info_out;
}
dtim_period = (u8)var;
@@ -3014,10 +3038,10 @@ static void brcmf_escan_timeout(struct t
@@ -3017,10 +3041,10 @@ static void brcmf_escan_timeout(struct t
{
struct brcmf_cfg80211_info *cfg =
from_timer(cfg, t, escan_timeout);
@@ -1093,7 +1093,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
schedule_work(&cfg->escan_timeout_work);
}
}
@@ -3065,8 +3089,8 @@ static s32
@@ -3068,8 +3092,8 @@ static s32
brcmf_cfg80211_escan_handler(struct brcmf_if *ifp,
const struct brcmf_event_msg *e, void *data)
{
@@ -1104,7 +1104,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
s32 status;
struct brcmf_escan_result_le *escan_result_le;
u32 escan_buflen;
@@ -3083,7 +3107,7 @@ brcmf_cfg80211_escan_handler(struct brcm
@@ -3086,7 +3110,7 @@ brcmf_cfg80211_escan_handler(struct brcm
goto exit;
if (!test_bit(BRCMF_SCAN_STATUS_BUSY, &cfg->scan_status)) {
@@ -1113,7 +1113,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
ifp->bsscfgidx);
return -EPERM;
}
@@ -3091,24 +3115,24 @@ brcmf_cfg80211_escan_handler(struct brcm
@@ -3094,24 +3118,24 @@ brcmf_cfg80211_escan_handler(struct brcm
if (status == BRCMF_E_STATUS_PARTIAL) {
brcmf_dbg(SCAN, "ESCAN Partial result\n");
if (e->datalen < sizeof(*escan_result_le)) {
@@ -1142,7 +1142,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
escan_result_le->bss_count);
goto exit;
}
@@ -3124,7 +3148,7 @@ brcmf_cfg80211_escan_handler(struct brcm
@@ -3127,7 +3151,7 @@ brcmf_cfg80211_escan_handler(struct brcm
bi_length = le32_to_cpu(bss_info_le->length);
if (bi_length != escan_buflen - WL_ESCAN_RESULTS_FIXED_SIZE) {
@@ -1151,7 +1151,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
bi_length);
goto exit;
}
@@ -3133,7 +3157,7 @@ brcmf_cfg80211_escan_handler(struct brcm
@@ -3136,7 +3160,7 @@ brcmf_cfg80211_escan_handler(struct brcm
BIT(NL80211_IFTYPE_ADHOC))) {
if (le16_to_cpu(bss_info_le->capability) &
WLAN_CAPABILITY_IBSS) {
@@ -1160,7 +1160,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
goto exit;
}
}
@@ -3141,7 +3165,7 @@ brcmf_cfg80211_escan_handler(struct brcm
@@ -3144,7 +3168,7 @@ brcmf_cfg80211_escan_handler(struct brcm
list = (struct brcmf_scan_results *)
cfg->escan_info.escan_buf;
if (bi_length > BRCMF_ESCAN_BUF_SIZE - list->buflen) {
@@ -1169,7 +1169,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
goto exit;
}
@@ -3300,7 +3324,8 @@ static s32
@@ -3303,7 +3327,8 @@ static s32
brcmf_notify_sched_scan_results(struct brcmf_if *ifp,
const struct brcmf_event_msg *e, void *data)
{
@@ -1179,7 +1179,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
struct brcmf_pno_net_info_le *netinfo, *netinfo_start;
struct cfg80211_scan_request *request = NULL;
struct wiphy *wiphy = cfg_to_wiphy(cfg);
@@ -3333,14 +3358,14 @@ brcmf_notify_sched_scan_results(struct b
@@ -3336,14 +3361,14 @@ brcmf_notify_sched_scan_results(struct b
WARN_ON(status != BRCMF_PNO_SCAN_COMPLETE);
brcmf_dbg(SCAN, "PFN NET FOUND event. count: %d\n", result_count);
if (!result_count) {
@@ -1196,7 +1196,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
goto out_err;
}
@@ -3387,14 +3412,15 @@ brcmf_cfg80211_sched_scan_start(struct w
@@ -3390,14 +3415,15 @@ brcmf_cfg80211_sched_scan_start(struct w
struct net_device *ndev,
struct cfg80211_sched_scan_request *req)
{
@@ -1214,7 +1214,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
cfg->scan_status);
return -EAGAIN;
}
@@ -3473,8 +3499,8 @@ static s32
@@ -3476,8 +3502,8 @@ static s32
brcmf_wowl_nd_results(struct brcmf_if *ifp, const struct brcmf_event_msg *e,
void *data)
{
@@ -1225,7 +1225,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
struct brcmf_pno_scanresults_le *pfn_result;
struct brcmf_pno_net_info_le *netinfo;
@@ -3493,7 +3519,7 @@ brcmf_wowl_nd_results(struct brcmf_if *i
@@ -3496,7 +3522,7 @@ brcmf_wowl_nd_results(struct brcmf_if *i
}
if (le32_to_cpu(pfn_result->count) < 1) {
@@ -1234,7 +1234,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
le32_to_cpu(pfn_result->count));
return -EINVAL;
}
@@ -3523,6 +3549,7 @@ brcmf_wowl_nd_results(struct brcmf_if *i
@@ -3526,6 +3552,7 @@ brcmf_wowl_nd_results(struct brcmf_if *i
static void brcmf_report_wowl_wakeind(struct wiphy *wiphy, struct brcmf_if *ifp)
{
struct brcmf_cfg80211_info *cfg = wiphy_to_cfg(wiphy);
@@ -1242,7 +1242,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
struct brcmf_wowl_wakeind_le wake_ind_le;
struct cfg80211_wowlan_wakeup wakeup_data;
struct cfg80211_wowlan_wakeup *wakeup;
@@ -3533,7 +3560,7 @@ static void brcmf_report_wowl_wakeind(st
@@ -3536,7 +3563,7 @@ static void brcmf_report_wowl_wakeind(st
err = brcmf_fil_iovar_data_get(ifp, "wowl_wakeind", &wake_ind_le,
sizeof(wake_ind_le));
if (err) {
@@ -1251,7 +1251,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
return;
}
@@ -3574,7 +3601,7 @@ static void brcmf_report_wowl_wakeind(st
@@ -3577,7 +3604,7 @@ static void brcmf_report_wowl_wakeind(st
cfg->wowl.nd_data_completed,
BRCMF_ND_INFO_TIMEOUT);
if (!timeout)
@@ -1260,7 +1260,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
else
wakeup_data.net_detect = cfg->wowl.nd_info;
}
@@ -3763,6 +3790,7 @@ brcmf_cfg80211_set_pmksa(struct wiphy *w
@@ -3766,6 +3793,7 @@ brcmf_cfg80211_set_pmksa(struct wiphy *w
struct brcmf_cfg80211_info *cfg = wiphy_to_cfg(wiphy);
struct brcmf_if *ifp = netdev_priv(ndev);
struct brcmf_pmksa *pmk = &cfg->pmk_list.pmk[0];
@@ -1268,7 +1268,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
s32 err;
u32 npmk, i;
@@ -3782,7 +3810,7 @@ brcmf_cfg80211_set_pmksa(struct wiphy *w
@@ -3785,7 +3813,7 @@ brcmf_cfg80211_set_pmksa(struct wiphy *w
cfg->pmk_list.npmk = cpu_to_le32(npmk);
}
} else {
@@ -1277,7 +1277,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
return -EINVAL;
}
@@ -3805,6 +3833,7 @@ brcmf_cfg80211_del_pmksa(struct wiphy *w
@@ -3808,6 +3836,7 @@ brcmf_cfg80211_del_pmksa(struct wiphy *w
struct brcmf_cfg80211_info *cfg = wiphy_to_cfg(wiphy);
struct brcmf_if *ifp = netdev_priv(ndev);
struct brcmf_pmksa *pmk = &cfg->pmk_list.pmk[0];
@@ -1285,7 +1285,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
s32 err;
u32 npmk, i;
@@ -3828,7 +3857,7 @@ brcmf_cfg80211_del_pmksa(struct wiphy *w
@@ -3831,7 +3860,7 @@ brcmf_cfg80211_del_pmksa(struct wiphy *w
memset(&pmk[i], 0, sizeof(*pmk));
cfg->pmk_list.npmk = cpu_to_le32(npmk - 1);
} else {
@@ -1294,7 +1294,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
return -EINVAL;
}
@@ -3860,20 +3889,20 @@ brcmf_cfg80211_flush_pmksa(struct wiphy
@@ -3863,20 +3892,20 @@ brcmf_cfg80211_flush_pmksa(struct wiphy
static s32 brcmf_configure_opensecurity(struct brcmf_if *ifp)
{
@@ -1318,7 +1318,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
return err;
}
/* set upper-layer auth */
@@ -3883,7 +3912,7 @@ static s32 brcmf_configure_opensecurity(
@@ -3886,7 +3915,7 @@ static s32 brcmf_configure_opensecurity(
wpa_val = WPA_AUTH_DISABLED;
err = brcmf_fil_bsscfg_int_set(ifp, "wpa_auth", wpa_val);
if (err < 0) {
@@ -1327,7 +1327,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
return err;
}
@@ -3903,7 +3932,7 @@ brcmf_configure_wpaie(struct brcmf_if *i
@@ -3906,7 +3935,7 @@ brcmf_configure_wpaie(struct brcmf_if *i
const struct brcmf_vs_tlv *wpa_ie,
bool is_rsn_ie)
{
@@ -1336,7 +1336,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
u32 auth = 0; /* d11 open authentication */
u16 count;
s32 err = 0;
@@ -3934,13 +3963,13 @@ brcmf_configure_wpaie(struct brcmf_if *i
@@ -3937,13 +3966,13 @@ brcmf_configure_wpaie(struct brcmf_if *i
/* check for multicast cipher suite */
if (offset + WPA_IE_MIN_OUI_LEN > len) {
err = -EINVAL;
@@ -1352,7 +1352,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
goto exit;
}
offset += TLV_OUI_LEN;
@@ -3962,7 +3991,7 @@ brcmf_configure_wpaie(struct brcmf_if *i
@@ -3965,7 +3994,7 @@ brcmf_configure_wpaie(struct brcmf_if *i
break;
default:
err = -EINVAL;
@@ -1361,7 +1361,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
goto exit;
}
@@ -3973,13 +4002,13 @@ brcmf_configure_wpaie(struct brcmf_if *i
@@ -3976,13 +4005,13 @@ brcmf_configure_wpaie(struct brcmf_if *i
/* Check for unicast suite(s) */
if (offset + (WPA_IE_MIN_OUI_LEN * count) > len) {
err = -EINVAL;
@@ -1377,7 +1377,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
goto exit;
}
offset += TLV_OUI_LEN;
@@ -3997,7 +4026,7 @@ brcmf_configure_wpaie(struct brcmf_if *i
@@ -4000,7 +4029,7 @@ brcmf_configure_wpaie(struct brcmf_if *i
pval |= AES_ENABLED;
break;
default:
@@ -1386,7 +1386,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
}
offset++;
}
@@ -4007,13 +4036,13 @@ brcmf_configure_wpaie(struct brcmf_if *i
@@ -4010,13 +4039,13 @@ brcmf_configure_wpaie(struct brcmf_if *i
/* Check for auth key management suite(s) */
if (offset + (WPA_IE_MIN_OUI_LEN * count) > len) {
err = -EINVAL;
@@ -1402,7 +1402,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
goto exit;
}
offset += TLV_OUI_LEN;
@@ -4041,7 +4070,7 @@ brcmf_configure_wpaie(struct brcmf_if *i
@@ -4044,7 +4073,7 @@ brcmf_configure_wpaie(struct brcmf_if *i
wpa_auth |= WPA2_AUTH_1X_SHA256;
break;
default:
@@ -1411,7 +1411,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
}
offset++;
}
@@ -4083,7 +4112,7 @@ brcmf_configure_wpaie(struct brcmf_if *i
@@ -4086,7 +4115,7 @@ brcmf_configure_wpaie(struct brcmf_if *i
err = brcmf_fil_bsscfg_int_set(ifp, "wme_bss_disable",
wme_bss_disable);
if (err < 0) {
@@ -1420,7 +1420,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
goto exit;
}
@@ -4097,7 +4126,7 @@ brcmf_configure_wpaie(struct brcmf_if *i
@@ -4100,7 +4129,7 @@ brcmf_configure_wpaie(struct brcmf_if *i
&data[offset],
WPA_IE_MIN_OUI_LEN);
if (err < 0) {
@@ -1429,7 +1429,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
goto exit;
}
}
@@ -4108,13 +4137,13 @@ brcmf_configure_wpaie(struct brcmf_if *i
@@ -4111,13 +4140,13 @@ brcmf_configure_wpaie(struct brcmf_if *i
/* set auth */
err = brcmf_fil_bsscfg_int_set(ifp, "auth", auth);
if (err < 0) {
@@ -1445,7 +1445,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
goto exit;
}
/* Configure MFP, this needs to go after wsec otherwise the wsec command
@@ -4123,14 +4152,14 @@ brcmf_configure_wpaie(struct brcmf_if *i
@@ -4126,14 +4155,14 @@ brcmf_configure_wpaie(struct brcmf_if *i
if (brcmf_feat_is_enabled(ifp, BRCMF_FEAT_MFP)) {
err = brcmf_fil_bsscfg_int_set(ifp, "mfp", mfp);
if (err < 0) {
@@ -1462,7 +1462,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
goto exit;
}
@@ -4216,8 +4245,8 @@ brcmf_vndr_ie(u8 *iebuf, s32 pktflag, u8
@@ -4219,8 +4248,8 @@ brcmf_vndr_ie(u8 *iebuf, s32 pktflag, u8
s32 brcmf_vif_set_mgmt_ie(struct brcmf_cfg80211_vif *vif, s32 pktflag,
const u8 *vndr_ie_buf, u32 vndr_ie_len)
{
@@ -1472,7 +1472,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
struct vif_saved_ie *saved_ie;
s32 err = 0;
u8 *iovar_ie_buf;
@@ -4238,7 +4267,7 @@ s32 brcmf_vif_set_mgmt_ie(struct brcmf_c
@@ -4241,7 +4270,7 @@ s32 brcmf_vif_set_mgmt_ie(struct brcmf_c
if (!vif)
return -ENODEV;
ifp = vif->ifp;
@@ -1481,7 +1481,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
saved_ie = &vif->saved_ie;
brcmf_dbg(TRACE, "bsscfgidx %d, pktflag : 0x%02X\n", ifp->bsscfgidx,
@@ -4270,13 +4299,13 @@ s32 brcmf_vif_set_mgmt_ie(struct brcmf_c
@@ -4273,13 +4302,13 @@ s32 brcmf_vif_set_mgmt_ie(struct brcmf_c
break;
default:
err = -EPERM;
@@ -1497,7 +1497,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
goto exit;
}
@@ -4337,7 +4366,7 @@ s32 brcmf_vif_set_mgmt_ie(struct brcmf_c
@@ -4340,7 +4369,7 @@ s32 brcmf_vif_set_mgmt_ie(struct brcmf_c
/* verify remained buf size before copy data */
if (remained_buf_len < (vndrie_info->vndrie.len +
VNDR_IE_VSIE_OFFSET)) {
@@ -1506,7 +1506,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
remained_buf_len);
break;
}
@@ -4369,7 +4398,7 @@ s32 brcmf_vif_set_mgmt_ie(struct brcmf_c
@@ -4372,7 +4401,7 @@ s32 brcmf_vif_set_mgmt_ie(struct brcmf_c
err = brcmf_fil_bsscfg_data_set(ifp, "vndr_ie", iovar_ie_buf,
total_ie_buf_len);
if (err)
@@ -1515,7 +1515,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
}
exit:
@@ -4397,14 +4426,14 @@ static s32
@@ -4400,14 +4429,14 @@ static s32
brcmf_config_ap_mgmt_ie(struct brcmf_cfg80211_vif *vif,
struct cfg80211_beacon_data *beacon)
{
@@ -1532,7 +1532,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
return err;
}
brcmf_dbg(TRACE, "Applied Vndr IEs for Beacon\n");
@@ -4414,7 +4443,7 @@ brcmf_config_ap_mgmt_ie(struct brcmf_cfg
@@ -4417,7 +4446,7 @@ brcmf_config_ap_mgmt_ie(struct brcmf_cfg
beacon->proberesp_ies,
beacon->proberesp_ies_len);
if (err)
@@ -1541,7 +1541,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
else
brcmf_dbg(TRACE, "Applied Vndr IEs for Probe Resp\n");
@@ -4428,6 +4457,7 @@ brcmf_cfg80211_start_ap(struct wiphy *wi
@@ -4431,6 +4460,7 @@ brcmf_cfg80211_start_ap(struct wiphy *wi
s32 ie_offset;
struct brcmf_cfg80211_info *cfg = wiphy_to_cfg(wiphy);
struct brcmf_if *ifp = netdev_priv(ndev);
@@ -1549,7 +1549,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
const struct brcmf_tlv *ssid_ie;
const struct brcmf_tlv *country_ie;
struct brcmf_ssid_le ssid_le;
@@ -4523,7 +4553,7 @@ brcmf_cfg80211_start_ap(struct wiphy *wi
@@ -4526,7 +4556,7 @@ brcmf_cfg80211_start_ap(struct wiphy *wi
err = brcmf_fil_cmd_int_set(ifp, BRCMF_C_SET_REGULATORY,
is_11d);
if (err < 0) {
@@ -1558,7 +1558,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
err);
goto exit;
}
@@ -4532,7 +4562,7 @@ brcmf_cfg80211_start_ap(struct wiphy *wi
@@ -4535,7 +4565,7 @@ brcmf_cfg80211_start_ap(struct wiphy *wi
err = brcmf_fil_cmd_int_set(ifp, BRCMF_C_SET_BCNPRD,
settings->beacon_interval);
if (err < 0) {
@@ -1567,7 +1567,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
err);
goto exit;
}
@@ -4541,7 +4571,7 @@ brcmf_cfg80211_start_ap(struct wiphy *wi
@@ -4544,7 +4574,7 @@ brcmf_cfg80211_start_ap(struct wiphy *wi
err = brcmf_fil_cmd_int_set(ifp, BRCMF_C_SET_DTIMPRD,
settings->dtim_period);
if (err < 0) {
@@ -1576,7 +1576,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
err);
goto exit;
}
@@ -4552,7 +4582,7 @@ brcmf_cfg80211_start_ap(struct wiphy *wi
@@ -4555,7 +4585,7 @@ brcmf_cfg80211_start_ap(struct wiphy *wi
!brcmf_feat_is_enabled(ifp, BRCMF_FEAT_RSDB))) {
err = brcmf_fil_cmd_int_set(ifp, BRCMF_C_DOWN, 1);
if (err < 0) {
@@ -1585,7 +1585,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
err);
goto exit;
}
@@ -4561,7 +4591,7 @@ brcmf_cfg80211_start_ap(struct wiphy *wi
@@ -4564,7 +4594,7 @@ brcmf_cfg80211_start_ap(struct wiphy *wi
err = brcmf_fil_cmd_int_set(ifp, BRCMF_C_SET_INFRA, 1);
if (err < 0) {
@@ -1594,7 +1594,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
goto exit;
}
} else if (WARN_ON(supports_11d && (is_11d != ifp->vif->is_11d))) {
@@ -4577,7 +4607,7 @@ brcmf_cfg80211_start_ap(struct wiphy *wi
@@ -4580,7 +4610,7 @@ brcmf_cfg80211_start_ap(struct wiphy *wi
err = brcmf_fil_cmd_int_set(ifp, BRCMF_C_SET_AP, 1);
if (err < 0) {
@@ -1603,7 +1603,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
err);
goto exit;
}
@@ -4587,14 +4617,14 @@ brcmf_cfg80211_start_ap(struct wiphy *wi
@@ -4590,14 +4620,14 @@ brcmf_cfg80211_start_ap(struct wiphy *wi
*/
err = brcmf_fil_iovar_int_set(ifp, "chanspec", chanspec);
if (err < 0) {
@@ -1620,7 +1620,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
goto exit;
}
/* On DOWN the firmware removes the WEP keys, reconfigure
@@ -4609,14 +4639,14 @@ brcmf_cfg80211_start_ap(struct wiphy *wi
@@ -4612,14 +4642,14 @@ brcmf_cfg80211_start_ap(struct wiphy *wi
err = brcmf_fil_cmd_data_set(ifp, BRCMF_C_SET_SSID,
&join_params, sizeof(join_params));
if (err < 0) {
@@ -1637,7 +1637,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
goto exit;
}
}
@@ -4625,14 +4655,14 @@ brcmf_cfg80211_start_ap(struct wiphy *wi
@@ -4628,14 +4658,14 @@ brcmf_cfg80211_start_ap(struct wiphy *wi
} else if (dev_role == NL80211_IFTYPE_P2P_GO) {
err = brcmf_fil_iovar_int_set(ifp, "chanspec", chanspec);
if (err < 0) {
@@ -1654,7 +1654,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
goto exit;
}
bss_enable.bsscfgidx = cpu_to_le32(ifp->bsscfgidx);
@@ -4640,7 +4670,7 @@ brcmf_cfg80211_start_ap(struct wiphy *wi
@@ -4643,7 +4673,7 @@ brcmf_cfg80211_start_ap(struct wiphy *wi
err = brcmf_fil_iovar_data_set(ifp, "bss", &bss_enable,
sizeof(bss_enable));
if (err < 0) {
@@ -1663,7 +1663,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
goto exit;
}
@@ -4663,7 +4693,9 @@ exit:
@@ -4666,7 +4696,9 @@ exit:
static int brcmf_cfg80211_stop_ap(struct wiphy *wiphy, struct net_device *ndev)
{
@@ -1673,7 +1673,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
s32 err;
struct brcmf_fil_bss_enable_le bss_enable;
struct brcmf_join_params join_params;
@@ -4688,13 +4720,13 @@ static int brcmf_cfg80211_stop_ap(struct
@@ -4691,13 +4723,13 @@ static int brcmf_cfg80211_stop_ap(struct
err = brcmf_fil_cmd_data_set(ifp, BRCMF_C_SET_SSID,
&join_params, sizeof(join_params));
if (err < 0)
@@ -1690,7 +1690,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
if (brcmf_feat_is_enabled(ifp, BRCMF_FEAT_MBSS))
brcmf_fil_iovar_int_set(ifp, "mbss", 0);
brcmf_fil_cmd_int_set(ifp, BRCMF_C_SET_REGULATORY,
@@ -4702,7 +4734,7 @@ static int brcmf_cfg80211_stop_ap(struct
@@ -4705,7 +4737,7 @@ static int brcmf_cfg80211_stop_ap(struct
/* Bring device back up so it can be used again */
err = brcmf_fil_cmd_int_set(ifp, BRCMF_C_UP, 1);
if (err < 0)
@@ -1699,7 +1699,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
brcmf_vif_clear_mgmt_ies(ifp->vif);
} else {
@@ -4711,7 +4743,7 @@ static int brcmf_cfg80211_stop_ap(struct
@@ -4714,7 +4746,7 @@ static int brcmf_cfg80211_stop_ap(struct
err = brcmf_fil_iovar_data_set(ifp, "bss", &bss_enable,
sizeof(bss_enable));
if (err < 0)
@@ -1708,7 +1708,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
}
brcmf_set_mpc(ifp, 1);
brcmf_configure_arp_nd_offload(ifp, true);
@@ -4740,6 +4772,7 @@ brcmf_cfg80211_del_station(struct wiphy
@@ -4743,6 +4775,7 @@ brcmf_cfg80211_del_station(struct wiphy
struct station_del_parameters *params)
{
struct brcmf_cfg80211_info *cfg = wiphy_to_cfg(wiphy);
@@ -1716,7 +1716,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
struct brcmf_scb_val_le scbval;
struct brcmf_if *ifp = netdev_priv(ndev);
s32 err;
@@ -4759,7 +4792,7 @@ brcmf_cfg80211_del_station(struct wiphy
@@ -4762,7 +4795,7 @@ brcmf_cfg80211_del_station(struct wiphy
err = brcmf_fil_cmd_data_set(ifp, BRCMF_C_SCB_DEAUTHENTICATE_FOR_REASON,
&scbval, sizeof(scbval));
if (err)
@@ -1725,7 +1725,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
err);
brcmf_dbg(TRACE, "Exit\n");
@@ -4770,6 +4803,8 @@ static int
@@ -4773,6 +4806,8 @@ static int
brcmf_cfg80211_change_station(struct wiphy *wiphy, struct net_device *ndev,
const u8 *mac, struct station_parameters *params)
{
@@ -1734,7 +1734,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
struct brcmf_if *ifp = netdev_priv(ndev);
s32 err;
@@ -4790,7 +4825,7 @@ brcmf_cfg80211_change_station(struct wip
@@ -4793,7 +4828,7 @@ brcmf_cfg80211_change_station(struct wip
err = brcmf_fil_cmd_data_set(ifp, BRCMF_C_SET_SCB_DEAUTHORIZE,
(void *)mac, ETH_ALEN);
if (err < 0)
@@ -1743,7 +1743,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
return err;
}
@@ -4820,6 +4855,7 @@ brcmf_cfg80211_mgmt_tx(struct wiphy *wip
@@ -4823,6 +4858,7 @@ brcmf_cfg80211_mgmt_tx(struct wiphy *wip
{
struct brcmf_cfg80211_info *cfg = wiphy_to_cfg(wiphy);
struct ieee80211_channel *chan = params->chan;
@@ -1751,7 +1751,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
const u8 *buf = params->buf;
size_t len = params->len;
const struct ieee80211_mgmt *mgmt;
@@ -4840,7 +4876,7 @@ brcmf_cfg80211_mgmt_tx(struct wiphy *wip
@@ -4843,7 +4879,7 @@ brcmf_cfg80211_mgmt_tx(struct wiphy *wip
mgmt = (const struct ieee80211_mgmt *)buf;
if (!ieee80211_is_mgmt(mgmt->frame_control)) {
@@ -1760,7 +1760,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
return -EPERM;
}
@@ -4871,13 +4907,13 @@ brcmf_cfg80211_mgmt_tx(struct wiphy *wip
@@ -4874,13 +4910,13 @@ brcmf_cfg80211_mgmt_tx(struct wiphy *wip
GFP_KERNEL);
} else if (ieee80211_is_action(mgmt->frame_control)) {
if (len > BRCMF_FIL_ACTION_FRAME_SIZE + DOT11_MGMT_HDR_LEN) {
@@ -1776,7 +1776,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
err = -ENOMEM;
goto exit;
}
@@ -4928,6 +4964,7 @@ brcmf_cfg80211_cancel_remain_on_channel(
@@ -4931,6 +4967,7 @@ brcmf_cfg80211_cancel_remain_on_channel(
u64 cookie)
{
struct brcmf_cfg80211_info *cfg = wiphy_to_cfg(wiphy);
@@ -1784,7 +1784,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
struct brcmf_cfg80211_vif *vif;
int err = 0;
@@ -4935,7 +4972,7 @@ brcmf_cfg80211_cancel_remain_on_channel(
@@ -4938,7 +4975,7 @@ brcmf_cfg80211_cancel_remain_on_channel(
vif = cfg->p2p.bss_idx[P2PAPI_BSSCFG_DEVICE].vif;
if (vif == NULL) {
@@ -1793,7 +1793,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
err = -ENODEV;
goto exit;
}
@@ -4950,6 +4987,7 @@ static int brcmf_cfg80211_get_channel(st
@@ -4953,6 +4990,7 @@ static int brcmf_cfg80211_get_channel(st
{
struct brcmf_cfg80211_info *cfg = wiphy_to_cfg(wiphy);
struct net_device *ndev = wdev->netdev;
@@ -1801,7 +1801,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
struct brcmf_if *ifp;
struct brcmu_chan ch;
enum nl80211_band band = 0;
@@ -4963,7 +5001,7 @@ static int brcmf_cfg80211_get_channel(st
@@ -4966,7 +5004,7 @@ static int brcmf_cfg80211_get_channel(st
err = brcmf_fil_iovar_int_get(ifp, "chanspec", &chanspec);
if (err) {
@@ -1810,7 +1810,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
return err;
}
@@ -5085,6 +5123,8 @@ static int brcmf_cfg80211_tdls_oper(stru
@@ -5088,6 +5126,8 @@ static int brcmf_cfg80211_tdls_oper(stru
struct net_device *ndev, const u8 *peer,
enum nl80211_tdls_operation oper)
{
@@ -1819,7 +1819,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
struct brcmf_if *ifp;
struct brcmf_tdls_iovar_le info;
int ret = 0;
@@ -5102,7 +5142,7 @@ static int brcmf_cfg80211_tdls_oper(stru
@@ -5105,7 +5145,7 @@ static int brcmf_cfg80211_tdls_oper(stru
ret = brcmf_fil_iovar_data_set(ifp, "tdls_endpoint",
&info, sizeof(info));
if (ret < 0)
@@ -1828,7 +1828,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
return ret;
}
@@ -5113,6 +5153,8 @@ brcmf_cfg80211_update_conn_params(struct
@@ -5116,6 +5156,8 @@ brcmf_cfg80211_update_conn_params(struct
struct cfg80211_connect_params *sme,
u32 changed)
{
@@ -1837,7 +1837,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
struct brcmf_if *ifp;
int err;
@@ -5123,7 +5165,7 @@ brcmf_cfg80211_update_conn_params(struct
@@ -5126,7 +5168,7 @@ brcmf_cfg80211_update_conn_params(struct
err = brcmf_vif_set_mgmt_ie(ifp->vif, BRCMF_VNDR_IE_ASSOCREQ_FLAG,
sme->ie, sme->ie_len);
if (err)
@@ -1846,7 +1846,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
else
brcmf_dbg(TRACE, "Applied Vndr IEs for Assoc request\n");
@@ -5135,6 +5177,8 @@ static int
@@ -5138,6 +5180,8 @@ static int
brcmf_cfg80211_set_rekey_data(struct wiphy *wiphy, struct net_device *ndev,
struct cfg80211_gtk_rekey_data *gtk)
{
@@ -1855,7 +1855,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
struct brcmf_if *ifp = netdev_priv(ndev);
struct brcmf_gtk_keyinfo_le gtk_le;
int ret;
@@ -5149,7 +5193,7 @@ brcmf_cfg80211_set_rekey_data(struct wip
@@ -5152,7 +5196,7 @@ brcmf_cfg80211_set_rekey_data(struct wip
ret = brcmf_fil_iovar_data_set(ifp, "gtk_key_info", &gtk_le,
sizeof(gtk_le));
if (ret < 0)
@@ -1864,7 +1864,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
return ret;
}
@@ -5381,7 +5425,7 @@ static void brcmf_clear_assoc_ies(struct
@@ -5387,7 +5431,7 @@ static void brcmf_clear_assoc_ies(struct
static s32 brcmf_get_assoc_ies(struct brcmf_cfg80211_info *cfg,
struct brcmf_if *ifp)
{
@@ -1873,7 +1873,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
struct brcmf_cfg80211_assoc_ielen_le *assoc_info;
struct brcmf_cfg80211_connect_info *conn_info = cfg_to_conn(cfg);
u32 req_len;
@@ -5393,7 +5437,7 @@ static s32 brcmf_get_assoc_ies(struct br
@@ -5399,7 +5443,7 @@ static s32 brcmf_get_assoc_ies(struct br
err = brcmf_fil_iovar_data_get(ifp, "assoc_info",
cfg->extra_buf, WL_ASSOC_INFO_MAX);
if (err) {
@@ -1882,7 +1882,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
return err;
}
assoc_info =
@@ -5405,7 +5449,7 @@ static s32 brcmf_get_assoc_ies(struct br
@@ -5411,7 +5455,7 @@ static s32 brcmf_get_assoc_ies(struct br
cfg->extra_buf,
WL_ASSOC_INFO_MAX);
if (err) {
@@ -1891,7 +1891,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
return err;
}
conn_info->req_ie_len = req_len;
@@ -5423,7 +5467,7 @@ static s32 brcmf_get_assoc_ies(struct br
@@ -5429,7 +5473,7 @@ static s32 brcmf_get_assoc_ies(struct br
cfg->extra_buf,
WL_ASSOC_INFO_MAX);
if (err) {
@@ -1900,7 +1900,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
return err;
}
conn_info->resp_ie_len = resp_len;
@@ -5552,7 +5596,7 @@ brcmf_notify_connect_status_ap(struct br
@@ -5558,7 +5602,7 @@ brcmf_notify_connect_status_ap(struct br
struct net_device *ndev,
const struct brcmf_event_msg *e, void *data)
{
@@ -1909,7 +1909,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
static int generation;
u32 event = e->event_code;
u32 reason = e->reason;
@@ -5570,7 +5614,7 @@ brcmf_notify_connect_status_ap(struct br
@@ -5576,7 +5620,7 @@ brcmf_notify_connect_status_ap(struct br
if (((event == BRCMF_E_ASSOC_IND) || (event == BRCMF_E_REASSOC_IND)) &&
(reason == BRCMF_E_STATUS_SUCCESS)) {
if (!data) {
@@ -1918,7 +1918,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
return -EINVAL;
}
@@ -5862,7 +5906,7 @@ static void init_vif_event(struct brcmf_
@@ -5868,7 +5912,7 @@ static void init_vif_event(struct brcmf_
static s32 brcmf_dongle_roam(struct brcmf_if *ifp)
{
@@ -1927,7 +1927,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
s32 err;
u32 bcn_timeout;
__le32 roamtrigger[2];
@@ -5875,7 +5919,7 @@ static s32 brcmf_dongle_roam(struct brcm
@@ -5881,7 +5925,7 @@ static s32 brcmf_dongle_roam(struct brcm
bcn_timeout = BRCMF_DEFAULT_BCN_TIMEOUT_ROAM_ON;
err = brcmf_fil_iovar_int_set(ifp, "bcn_timeout", bcn_timeout);
if (err) {
@@ -1936,7 +1936,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
goto roam_setup_done;
}
@@ -5887,7 +5931,7 @@ static s32 brcmf_dongle_roam(struct brcm
@@ -5893,7 +5937,7 @@ static s32 brcmf_dongle_roam(struct brcm
err = brcmf_fil_iovar_int_set(ifp, "roam_off",
ifp->drvr->settings->roamoff);
if (err) {
@@ -1945,7 +1945,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
goto roam_setup_done;
}
@@ -5896,7 +5940,7 @@ static s32 brcmf_dongle_roam(struct brcm
@@ -5902,7 +5946,7 @@ static s32 brcmf_dongle_roam(struct brcm
err = brcmf_fil_cmd_data_set(ifp, BRCMF_C_SET_ROAM_TRIGGER,
(void *)roamtrigger, sizeof(roamtrigger));
if (err) {
@@ -1954,7 +1954,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
goto roam_setup_done;
}
@@ -5905,7 +5949,7 @@ static s32 brcmf_dongle_roam(struct brcm
@@ -5911,7 +5955,7 @@ static s32 brcmf_dongle_roam(struct brcm
err = brcmf_fil_cmd_data_set(ifp, BRCMF_C_SET_ROAM_DELTA,
(void *)roam_delta, sizeof(roam_delta));
if (err) {
@@ -1963,7 +1963,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
goto roam_setup_done;
}
@@ -5916,26 +5960,26 @@ roam_setup_done:
@@ -5922,26 +5966,26 @@ roam_setup_done:
static s32
brcmf_dongle_scantime(struct brcmf_if *ifp)
{
@@ -1994,7 +1994,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
goto dongle_scantime_out;
}
@@ -5968,7 +6012,8 @@ static int brcmf_construct_chaninfo(stru
@@ -5974,7 +6018,8 @@ static int brcmf_construct_chaninfo(stru
u32 bw_cap[])
{
struct wiphy *wiphy = cfg_to_wiphy(cfg);
@@ -2004,7 +2004,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
struct ieee80211_supported_band *band;
struct ieee80211_channel *channel;
struct brcmf_chanspec_list *list;
@@ -5989,7 +6034,7 @@ static int brcmf_construct_chaninfo(stru
@@ -5995,7 +6040,7 @@ static int brcmf_construct_chaninfo(stru
err = brcmf_fil_iovar_data_get(ifp, "chanspecs", pbuf,
BRCMF_DCMD_MEDLEN);
if (err) {
@@ -2013,7 +2013,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
goto fail_pbuf;
}
@@ -6012,7 +6057,7 @@ static int brcmf_construct_chaninfo(stru
@@ -6018,7 +6063,7 @@ static int brcmf_construct_chaninfo(stru
} else if (ch.band == BRCMU_CHAN_BAND_5G) {
band = wiphy->bands[NL80211_BAND_5GHZ];
} else {
@@ -2022,7 +2022,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
ch.chspec);
continue;
}
@@ -6036,7 +6081,7 @@ static int brcmf_construct_chaninfo(stru
@@ -6042,7 +6087,7 @@ static int brcmf_construct_chaninfo(stru
/* It seems firmware supports some channel we never
* considered. Something new in IEEE standard?
*/
@@ -2031,7 +2031,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
ch.control_ch_num);
continue;
}
@@ -6093,8 +6138,8 @@ fail_pbuf:
@@ -6099,8 +6144,8 @@ fail_pbuf:
static int brcmf_enable_bw40_2g(struct brcmf_cfg80211_info *cfg)
{
@@ -2042,7 +2042,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
struct ieee80211_supported_band *band;
struct brcmf_fil_bwcap_le band_bwcap;
struct brcmf_chanspec_list *list;
@@ -6140,7 +6185,7 @@ static int brcmf_enable_bw40_2g(struct b
@@ -6146,7 +6191,7 @@ static int brcmf_enable_bw40_2g(struct b
err = brcmf_fil_iovar_data_get(ifp, "chanspecs", pbuf,
BRCMF_DCMD_MEDLEN);
if (err) {
@@ -2051,7 +2051,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
kfree(pbuf);
return err;
}
@@ -6171,7 +6216,7 @@ static int brcmf_enable_bw40_2g(struct b
@@ -6177,7 +6222,7 @@ static int brcmf_enable_bw40_2g(struct b
static void brcmf_get_bwcap(struct brcmf_if *ifp, u32 bw_cap[])
{
@@ -2060,7 +2060,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
u32 band, mimo_bwcap;
int err;
@@ -6207,7 +6252,7 @@ static void brcmf_get_bwcap(struct brcmf
@@ -6213,7 +6258,7 @@ static void brcmf_get_bwcap(struct brcmf
bw_cap[NL80211_BAND_5GHZ] |= WLC_BW_20MHZ_BIT;
break;
default:
@@ -2069,7 +2069,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
}
}
@@ -6282,7 +6327,8 @@ static void brcmf_update_vht_cap(struct
@@ -6288,7 +6333,8 @@ static void brcmf_update_vht_cap(struct
static int brcmf_setup_wiphybands(struct brcmf_cfg80211_info *cfg)
{
@@ -2079,7 +2079,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
struct wiphy *wiphy = cfg_to_wiphy(cfg);
u32 nmode = 0;
u32 vhtmode = 0;
@@ -6299,7 +6345,7 @@ static int brcmf_setup_wiphybands(struct
@@ -6305,7 +6351,7 @@ static int brcmf_setup_wiphybands(struct
(void)brcmf_fil_iovar_int_get(ifp, "vhtmode", &vhtmode);
err = brcmf_fil_iovar_int_get(ifp, "nmode", &nmode);
if (err) {
@@ -2088,7 +2088,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
} else {
brcmf_get_bwcap(ifp, bw_cap);
}
@@ -6309,7 +6355,7 @@ static int brcmf_setup_wiphybands(struct
@@ -6315,7 +6361,7 @@ static int brcmf_setup_wiphybands(struct
err = brcmf_fil_iovar_int_get(ifp, "rxchain", &rxchain);
if (err) {
@@ -2097,7 +2097,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
nchain = 1;
} else {
for (nchain = 0; rxchain; nchain++)
@@ -6319,7 +6365,7 @@ static int brcmf_setup_wiphybands(struct
@@ -6325,7 +6371,7 @@ static int brcmf_setup_wiphybands(struct
err = brcmf_construct_chaninfo(cfg, bw_cap);
if (err) {
@@ -2106,7 +2106,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
return err;
}
@@ -6526,12 +6572,13 @@ static void brcmf_wiphy_wowl_params(stru
@@ -6532,12 +6578,13 @@ static void brcmf_wiphy_wowl_params(stru
{
#ifdef CONFIG_PM
struct brcmf_cfg80211_info *cfg = wiphy_to_cfg(wiphy);
@@ -2121,7 +2121,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
wiphy->wowlan = &brcmf_wowlan_support;
return;
}
@@ -6628,7 +6675,7 @@ static int brcmf_setup_wiphy(struct wiph
@@ -6634,7 +6681,7 @@ static int brcmf_setup_wiphy(struct wiph
err = brcmf_fil_cmd_data_get(ifp, BRCMF_C_GET_BANDLIST, &bandlist,
sizeof(bandlist));
if (err) {
@@ -2130,7 +2130,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
return err;
}
/* first entry in bandlist is number of bands */
@@ -6677,7 +6724,7 @@ static int brcmf_setup_wiphy(struct wiph
@@ -6683,7 +6730,7 @@ static int brcmf_setup_wiphy(struct wiph
static s32 brcmf_config_dongle(struct brcmf_cfg80211_info *cfg)
{
@@ -2139,7 +2139,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
struct net_device *ndev;
struct wireless_dev *wdev;
struct brcmf_if *ifp;
@@ -6715,7 +6762,7 @@ static s32 brcmf_config_dongle(struct br
@@ -6721,7 +6768,7 @@ static s32 brcmf_config_dongle(struct br
err = brcmf_fil_cmd_int_set(ifp, BRCMF_C_SET_FAKEFRAG, 1);
if (err) {
@@ -2148,7 +2148,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
goto default_conf_out;
}
@@ -6896,6 +6943,7 @@ static void brcmf_cfg80211_reg_notifier(
@@ -6902,6 +6949,7 @@ static void brcmf_cfg80211_reg_notifier(
{
struct brcmf_cfg80211_info *cfg = wiphy_to_cfg(wiphy);
struct brcmf_if *ifp = brcmf_get_ifp(cfg->pub, 0);
@@ -2156,7 +2156,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
struct brcmf_fil_country_le ccreq;
s32 err;
int i;
@@ -6907,7 +6955,7 @@ static void brcmf_cfg80211_reg_notifier(
@@ -6913,7 +6961,7 @@ static void brcmf_cfg80211_reg_notifier(
/* ignore non-ISO3166 country codes */
for (i = 0; i < 2; i++)
if (req->alpha2[i] < 'A' || req->alpha2[i] > 'Z') {
@@ -2165,7 +2165,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
req->alpha2[0], req->alpha2[1]);
return;
}
@@ -6917,7 +6965,7 @@ static void brcmf_cfg80211_reg_notifier(
@@ -6923,7 +6971,7 @@ static void brcmf_cfg80211_reg_notifier(
err = brcmf_fil_iovar_data_get(ifp, "country", &ccreq, sizeof(ccreq));
if (err) {
@@ -2174,7 +2174,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
return;
}
@@ -6927,7 +6975,7 @@ static void brcmf_cfg80211_reg_notifier(
@@ -6933,7 +6981,7 @@ static void brcmf_cfg80211_reg_notifier(
err = brcmf_fil_iovar_data_set(ifp, "country", &ccreq, sizeof(ccreq));
if (err) {
@@ -2183,7 +2183,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
return;
}
brcmf_setup_wiphybands(cfg);
@@ -6973,13 +7021,13 @@ struct brcmf_cfg80211_info *brcmf_cfg802
@@ -6979,13 +7027,13 @@ struct brcmf_cfg80211_info *brcmf_cfg802
u16 *cap = NULL;
if (!ndev) {
@@ -2199,7 +2199,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
return NULL;
}
@@ -7000,7 +7048,7 @@ struct brcmf_cfg80211_info *brcmf_cfg802
@@ -7006,7 +7054,7 @@ struct brcmf_cfg80211_info *brcmf_cfg802
err = wl_init_priv(cfg);
if (err) {
@@ -2208,7 +2208,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
brcmf_free_vif(vif);
goto wiphy_out;
}
@@ -7009,7 +7057,7 @@ struct brcmf_cfg80211_info *brcmf_cfg802
@@ -7015,7 +7063,7 @@ struct brcmf_cfg80211_info *brcmf_cfg802
/* determine d11 io type before wiphy setup */
err = brcmf_fil_cmd_int_get(ifp, BRCMF_C_GET_VERSION, &io_type);
if (err) {
@@ -2217,7 +2217,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
goto priv_out;
}
cfg->d11inf.io_type = (u8)io_type;
@@ -7043,13 +7091,13 @@ struct brcmf_cfg80211_info *brcmf_cfg802
@@ -7049,13 +7097,13 @@ struct brcmf_cfg80211_info *brcmf_cfg802
#endif
err = wiphy_register(wiphy);
if (err < 0) {
@@ -2233,7 +2233,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
goto wiphy_unreg_out;
}
@@ -7067,24 +7115,24 @@ struct brcmf_cfg80211_info *brcmf_cfg802
@@ -7073,24 +7121,24 @@ struct brcmf_cfg80211_info *brcmf_cfg802
err = brcmf_fweh_activate_events(ifp);
if (err) {
@@ -2262,7 +2262,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
brcmf_btcoex_detach(cfg);
brcmf_p2p_detach(&cfg->p2p);
goto wiphy_unreg_out;
@@ -7104,7 +7152,7 @@ struct brcmf_cfg80211_info *brcmf_cfg802
@@ -7110,7 +7158,7 @@ struct brcmf_cfg80211_info *brcmf_cfg802
/* (re-) activate FWEH event handling */
err = brcmf_fweh_activate_events(ifp);
if (err) {

View File

@@ -19,7 +19,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
@@ -6725,6 +6725,11 @@ static int brcmf_setup_wiphy(struct wiph
@@ -6731,6 +6731,11 @@ static int brcmf_setup_wiphy(struct wiph
}
}

View File

@@ -56,7 +56,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
vif->profile.use_fwsup = BRCMF_PROFILE_FWSUP_NONE;
}
brcmf_dbg(TRACE, "Exit\n");
@@ -4996,18 +5001,16 @@ static int brcmf_cfg80211_get_channel(st
@@ -4999,18 +5004,16 @@ static int brcmf_cfg80211_get_channel(st
struct brcmf_cfg80211_info *cfg = wiphy_to_cfg(wiphy);
struct net_device *ndev = wdev->netdev;
struct brcmf_pub *drvr = cfg->pub;

View File

@@ -21,7 +21,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
@@ -2974,8 +2974,6 @@ static s32 brcmf_update_bss_info(struct
@@ -2977,8 +2977,6 @@ static s32 brcmf_update_bss_info(struct
struct brcmf_pub *drvr = cfg->pub;
struct brcmf_bss_info_le *bi;
const struct brcmf_tlv *tim;
@@ -30,7 +30,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
size_t ie_len;
u8 *ie;
s32 err = 0;
@@ -2999,12 +2997,9 @@ static s32 brcmf_update_bss_info(struct
@@ -3002,12 +3000,9 @@ static s32 brcmf_update_bss_info(struct
ie = ((u8 *)bi) + le16_to_cpu(bi->ie_offset);
ie_len = le32_to_cpu(bi->ie_length);
@@ -44,7 +44,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
/*
* active scan was done so we could not get dtim
* information out of probe response.
@@ -3016,7 +3011,6 @@ static s32 brcmf_update_bss_info(struct
@@ -3019,7 +3014,6 @@ static s32 brcmf_update_bss_info(struct
bphy_err(drvr, "wl dtim_assoc failed (%d)\n", err);
goto update_bss_info_out;
}

View File

@@ -23,7 +23,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
@@ -4236,9 +4236,7 @@ next:
@@ -4239,9 +4239,7 @@ next:
static u32
brcmf_vndr_ie(u8 *iebuf, s32 pktflag, u8 *ie_ptr, u32 ie_len, s8 *add_del_cmd)
{

View File

@@ -13,7 +13,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
@@ -4214,10 +4214,8 @@ brcmf_parse_vndr_ies(const u8 *vndr_ie_b
@@ -4217,10 +4217,8 @@ brcmf_parse_vndr_ies(const u8 *vndr_ie_b
vndr_ies->count++;
@@ -26,7 +26,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
parsed_info->vndrie.oui_type);
if (vndr_ies->count >= VNDR_IE_PARSE_LIMIT)
@@ -4341,12 +4339,10 @@ s32 brcmf_vif_set_mgmt_ie(struct brcmf_c
@@ -4344,12 +4342,10 @@ s32 brcmf_vif_set_mgmt_ie(struct brcmf_c
for (i = 0; i < old_vndr_ies.count; i++) {
vndrie_info = &old_vndr_ies.ie_info[i];
@@ -41,7 +41,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
del_add_ie_buf_len = brcmf_vndr_ie(curr_ie_buf, pktflag,
vndrie_info->ie_ptr,
@@ -4378,12 +4374,10 @@ s32 brcmf_vif_set_mgmt_ie(struct brcmf_c
@@ -4381,12 +4377,10 @@ s32 brcmf_vif_set_mgmt_ie(struct brcmf_c
remained_buf_len -= (vndrie_info->ie_len +
VNDR_IE_VSIE_OFFSET);

View File

@@ -24,7 +24,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
@@ -7194,7 +7194,6 @@ void brcmf_cfg80211_detach(struct brcmf_
@@ -7200,7 +7200,6 @@ void brcmf_cfg80211_detach(struct brcmf_
brcmf_pno_detach(cfg);
brcmf_btcoex_detach(cfg);
wiphy_unregister(cfg->wiphy);

View File

@@ -16,7 +16,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
@@ -5936,19 +5936,17 @@ static s32 brcmf_dongle_roam(struct brcm
@@ -5942,19 +5942,17 @@ static s32 brcmf_dongle_roam(struct brcm
roamtrigger[1] = cpu_to_le32(BRCM_BAND_ALL);
err = brcmf_fil_cmd_data_set(ifp, BRCMF_C_SET_ROAM_TRIGGER,
(void *)roamtrigger, sizeof(roamtrigger));

View File

@@ -20,7 +20,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
@@ -6444,6 +6444,9 @@ brcmf_txrx_stypes[NUM_NL80211_IFTYPES] =
@@ -6450,6 +6450,9 @@ brcmf_txrx_stypes[NUM_NL80211_IFTYPES] =
* #STA <= 1, #AP <= 1, channels = 1, 2 total
* #AP <= 4, matching BI, channels = 1, 4 total
*
@@ -30,7 +30,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* p2p, no mchan, and mbss:
*
* #STA <= 1, #P2P-DEV <= 1, #{P2P-CL, P2P-GO} <= 1, channels = 1, 3 total
@@ -6455,6 +6458,10 @@ brcmf_txrx_stypes[NUM_NL80211_IFTYPES] =
@@ -6461,6 +6464,10 @@ brcmf_txrx_stypes[NUM_NL80211_IFTYPES] =
* #STA <= 1, #P2P-DEV <= 1, #{P2P-CL, P2P-GO} <= 1, channels = 2, 3 total
* #STA <= 1, #P2P-DEV <= 1, #AP <= 1, #P2P-CL <= 1, channels = 1, 4 total
* #AP <= 4, matching BI, channels = 1, 4 total
@@ -41,7 +41,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
*/
static int brcmf_setup_ifmodes(struct wiphy *wiphy, struct brcmf_if *ifp)
{
@@ -6462,13 +6469,14 @@ static int brcmf_setup_ifmodes(struct wi
@@ -6468,13 +6475,14 @@ static int brcmf_setup_ifmodes(struct wi
struct ieee80211_iface_limit *c0_limits = NULL;
struct ieee80211_iface_limit *p2p_limits = NULL;
struct ieee80211_iface_limit *mbss_limits = NULL;
@@ -58,7 +58,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
combo = kcalloc(n_combos, sizeof(*combo), GFP_KERNEL);
if (!combo)
goto err;
@@ -6479,16 +6487,36 @@ static int brcmf_setup_ifmodes(struct wi
@@ -6485,16 +6493,36 @@ static int brcmf_setup_ifmodes(struct wi
c = 0;
i = 0;
@@ -99,7 +99,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
wiphy->interface_modes |= BIT(NL80211_IFTYPE_P2P_CLIENT) |
BIT(NL80211_IFTYPE_P2P_GO) |
BIT(NL80211_IFTYPE_P2P_DEVICE);
@@ -6497,16 +6525,26 @@ static int brcmf_setup_ifmodes(struct wi
@@ -6503,16 +6531,26 @@ static int brcmf_setup_ifmodes(struct wi
c0_limits[i].max = 1;
c0_limits[i++].types = BIT(NL80211_IFTYPE_P2P_CLIENT) |
BIT(NL80211_IFTYPE_P2P_GO);

View File

@@ -18,7 +18,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
@@ -5293,6 +5293,7 @@ struct brcmf_cfg80211_vif *brcmf_alloc_v
@@ -5296,6 +5296,7 @@ struct brcmf_cfg80211_vif *brcmf_alloc_v
struct brcmf_cfg80211_vif *vif_walk;
struct brcmf_cfg80211_vif *vif;
bool mbss;
@@ -26,7 +26,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
brcmf_dbg(TRACE, "allocating virtual interface (size=%zu)\n",
sizeof(*vif));
@@ -5305,7 +5306,8 @@ struct brcmf_cfg80211_vif *brcmf_alloc_v
@@ -5308,7 +5309,8 @@ struct brcmf_cfg80211_vif *brcmf_alloc_v
brcmf_init_prof(&vif->profile);

View File

@@ -18,7 +18,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
@@ -6471,12 +6471,13 @@ static int brcmf_setup_ifmodes(struct wi
@@ -6477,12 +6477,13 @@ static int brcmf_setup_ifmodes(struct wi
struct ieee80211_iface_limit *c0_limits = NULL;
struct ieee80211_iface_limit *p2p_limits = NULL;
struct ieee80211_iface_limit *mbss_limits = NULL;
@@ -33,7 +33,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
n_combos = 1 + !!(p2p && !rsdb) + !!mbss;
combo = kcalloc(n_combos, sizeof(*combo), GFP_KERNEL);
@@ -6486,6 +6487,10 @@ static int brcmf_setup_ifmodes(struct wi
@@ -6492,6 +6493,10 @@ static int brcmf_setup_ifmodes(struct wi
wiphy->interface_modes = BIT(NL80211_IFTYPE_STATION) |
BIT(NL80211_IFTYPE_ADHOC) |
BIT(NL80211_IFTYPE_AP);
@@ -44,7 +44,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
c = 0;
i = 0;
@@ -6497,48 +6502,28 @@ static int brcmf_setup_ifmodes(struct wi
@@ -6503,48 +6508,28 @@ static int brcmf_setup_ifmodes(struct wi
c0_limits = kcalloc(2, sizeof(*c0_limits), GFP_KERNEL);
if (!c0_limits)
goto err;

View File

@@ -139,7 +139,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
case NL80211_IFTYPE_AP:
return brcmf_cfg80211_del_ap_iface(wiphy, wdev);
case NL80211_IFTYPE_P2P_CLIENT:
@@ -6471,9 +6550,10 @@ static int brcmf_setup_ifmodes(struct wi
@@ -6477,9 +6556,10 @@ static int brcmf_setup_ifmodes(struct wi
struct ieee80211_iface_limit *c0_limits = NULL;
struct ieee80211_iface_limit *p2p_limits = NULL;
struct ieee80211_iface_limit *mbss_limits = NULL;
@@ -152,7 +152,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
mbss = brcmf_feat_is_enabled(ifp, BRCMF_FEAT_MBSS);
p2p = brcmf_feat_is_enabled(ifp, BRCMF_FEAT_P2P);
rsdb = brcmf_feat_is_enabled(ifp, BRCMF_FEAT_RSDB);
@@ -6487,6 +6567,8 @@ static int brcmf_setup_ifmodes(struct wi
@@ -6493,6 +6573,8 @@ static int brcmf_setup_ifmodes(struct wi
wiphy->interface_modes = BIT(NL80211_IFTYPE_STATION) |
BIT(NL80211_IFTYPE_ADHOC) |
BIT(NL80211_IFTYPE_AP);
@@ -161,7 +161,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
if (p2p)
wiphy->interface_modes |= BIT(NL80211_IFTYPE_P2P_CLIENT) |
BIT(NL80211_IFTYPE_P2P_GO) |
@@ -6494,18 +6576,18 @@ static int brcmf_setup_ifmodes(struct wi
@@ -6500,18 +6582,18 @@ static int brcmf_setup_ifmodes(struct wi
c = 0;
i = 0;
@@ -186,7 +186,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
if (p2p) {
c0_limits[i].max = 1;
c0_limits[i++].types = BIT(NL80211_IFTYPE_P2P_DEVICE);
@@ -6554,14 +6636,20 @@ static int brcmf_setup_ifmodes(struct wi
@@ -6560,14 +6642,20 @@ static int brcmf_setup_ifmodes(struct wi
if (mbss) {
c++;
i = 0;

View File

@@ -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
@@ -2866,6 +2866,10 @@ brcmf_cfg80211_set_power_mgmt(struct wip
@@ -2869,6 +2869,10 @@ brcmf_cfg80211_set_power_mgmt(struct wip
* preference in cfg struct to apply this to
* FW later while initializing the dongle
*/

View File

@@ -1,6 +1,6 @@
--- a/drivers/net/wireless/marvell/mwl8k.c
+++ b/drivers/net/wireless/marvell/mwl8k.c
@@ -5691,6 +5691,7 @@ MODULE_FIRMWARE("mwl8k/fmimage_8366.fw")
@@ -5692,6 +5692,7 @@ MODULE_FIRMWARE("mwl8k/fmimage_8366.fw")
MODULE_FIRMWARE(MWL8K_8366_AP_FW(MWL8K_8366_AP_FW_API));
static const struct pci_device_id mwl8k_pci_id_table[] = {

View File

@@ -1,6 +1,6 @@
--- a/drivers/net/wireless/marvell/mwl8k.c
+++ b/drivers/net/wireless/marvell/mwl8k.c
@@ -6276,6 +6276,8 @@ static int mwl8k_probe(struct pci_dev *p
@@ -6277,6 +6277,8 @@ static int mwl8k_probe(struct pci_dev *p
priv->running_bsses = 0;
@@ -9,7 +9,7 @@
return rc;
err_stop_firmware:
@@ -6309,8 +6311,6 @@ static void mwl8k_remove(struct pci_dev
@@ -6310,8 +6312,6 @@ static void mwl8k_remove(struct pci_dev
return;
priv = hw->priv;

View File

@@ -385,7 +385,7 @@
#endif /* AES_GCM_H */
--- a/net/mac80211/wpa.c
+++ b/net/mac80211/wpa.c
@@ -314,7 +314,8 @@ ieee80211_crypto_tkip_decrypt(struct iee
@@ -315,7 +315,8 @@ ieee80211_crypto_tkip_decrypt(struct iee
}
@@ -395,7 +395,7 @@
{
__le16 mask_fc;
int a4_included, mgmt;
@@ -344,14 +345,8 @@ static void ccmp_special_blocks(struct s
@@ -345,14 +346,8 @@ static void ccmp_special_blocks(struct s
else
qos_tid = 0;
@@ -412,7 +412,7 @@
/* Nonce: Nonce Flags | A2 | PN
* Nonce Flags: Priority (b0..b3) | Management (b4) | Reserved (b5..b7)
@@ -359,6 +354,8 @@ static void ccmp_special_blocks(struct s
@@ -360,6 +355,8 @@ static void ccmp_special_blocks(struct s
b_0[1] = qos_tid | (mgmt << 4);
memcpy(&b_0[2], hdr->addr2, ETH_ALEN);
memcpy(&b_0[8], pn, IEEE80211_CCMP_PN_LEN);
@@ -421,7 +421,7 @@
/* AAD (extra authenticate-only data) / masked 802.11 header
* FC | A1 | A2 | A3 | SC | [A4] | [QC] */
@@ -415,7 +412,7 @@ static int ccmp_encrypt_skb(struct ieee8
@@ -416,7 +413,7 @@ static int ccmp_encrypt_skb(struct ieee8
u8 *pos;
u8 pn[6];
u64 pn64;
@@ -430,7 +430,7 @@
u8 b_0[AES_BLOCK_SIZE];
if (info->control.hw_key &&
@@ -470,9 +467,11 @@ static int ccmp_encrypt_skb(struct ieee8
@@ -471,9 +468,11 @@ static int ccmp_encrypt_skb(struct ieee8
return 0;
pos += IEEE80211_CCMP_HDR_LEN;
@@ -445,7 +445,7 @@
}
@@ -545,13 +544,13 @@ ieee80211_crypto_ccmp_decrypt(struct iee
@@ -549,13 +548,13 @@ ieee80211_crypto_ccmp_decrypt(struct iee
u8 aad[2 * AES_BLOCK_SIZE];
u8 b_0[AES_BLOCK_SIZE];
/* hardware didn't decrypt/verify MIC */
@@ -461,7 +461,7 @@
return RX_DROP_UNUSABLE;
}
@@ -646,7 +645,7 @@ static int gcmp_encrypt_skb(struct ieee8
@@ -652,7 +651,7 @@ static int gcmp_encrypt_skb(struct ieee8
u8 *pos;
u8 pn[6];
u64 pn64;
@@ -470,7 +470,7 @@
u8 j_0[AES_BLOCK_SIZE];
if (info->control.hw_key &&
@@ -703,8 +702,10 @@ static int gcmp_encrypt_skb(struct ieee8
@@ -709,8 +708,10 @@ static int gcmp_encrypt_skb(struct ieee8
pos += IEEE80211_GCMP_HDR_LEN;
gcmp_special_blocks(skb, pn, j_0, aad);
@@ -483,7 +483,7 @@
}
ieee80211_tx_result
@@ -1127,9 +1128,9 @@ ieee80211_crypto_aes_gmac_encrypt(struct
@@ -1138,9 +1139,9 @@ ieee80211_crypto_aes_gmac_encrypt(struct
struct ieee80211_key *key = tx->key;
struct ieee80211_mmie_16 *mmie;
struct ieee80211_hdr *hdr;
@@ -495,7 +495,7 @@
if (WARN_ON(skb_queue_len(&tx->skbs) != 1))
return TX_DROP;
@@ -1175,7 +1176,7 @@ ieee80211_crypto_aes_gmac_decrypt(struct
@@ -1186,7 +1187,7 @@ ieee80211_crypto_aes_gmac_decrypt(struct
struct ieee80211_rx_status *status = IEEE80211_SKB_RXCB(skb);
struct ieee80211_key *key = rx->key;
struct ieee80211_mmie_16 *mmie;

View File

@@ -1,6 +1,6 @@
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -3833,6 +3833,12 @@ out:
@@ -3853,6 +3853,12 @@ out:
netdev_tx_t ieee80211_subif_start_xmit(struct sk_buff *skb,
struct net_device *dev)
{

View File

@@ -18,7 +18,7 @@
static int ieee80211_ifa6_changed(struct notifier_block *nb,
unsigned long data, void *arg)
{
@@ -1168,14 +1168,14 @@ int ieee80211_register_hw(struct ieee802
@@ -1182,14 +1182,14 @@ int ieee80211_register_hw(struct ieee802
rtnl_unlock();
@@ -35,7 +35,7 @@
local->ifa6_notifier.notifier_call = ieee80211_ifa6_changed;
result = register_inet6addr_notifier(&local->ifa6_notifier);
if (result)
@@ -1184,13 +1184,13 @@ int ieee80211_register_hw(struct ieee802
@@ -1198,13 +1198,13 @@ int ieee80211_register_hw(struct ieee802
return 0;
@@ -52,7 +52,7 @@
fail_ifa:
#endif
rtnl_lock();
@@ -1219,10 +1219,10 @@ void ieee80211_unregister_hw(struct ieee
@@ -1233,10 +1233,10 @@ void ieee80211_unregister_hw(struct ieee
tasklet_kill(&local->tx_pending_tasklet);
tasklet_kill(&local->tasklet);

View File

@@ -1,6 +1,6 @@
--- a/net/mac80211/cfg.c
+++ b/net/mac80211/cfg.c
@@ -2190,7 +2190,7 @@ static int ieee80211_scan(struct wiphy *
@@ -2189,7 +2189,7 @@ static int ieee80211_scan(struct wiphy *
* the frames sent while scanning on other channel will be
* lost)
*/

View File

@@ -61,7 +61,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
};
--- a/net/mac80211/ieee80211_i.h
+++ b/net/mac80211/ieee80211_i.h
@@ -818,6 +818,7 @@ enum txq_info_flags {
@@ -807,6 +807,7 @@ enum txq_info_flags {
IEEE80211_TXQ_STOP,
IEEE80211_TXQ_AMPDU,
IEEE80211_TXQ_NO_AMSDU,
@@ -69,7 +69,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
};
/**
@@ -1226,6 +1227,7 @@ struct ieee80211_local {
@@ -1214,6 +1215,7 @@ struct ieee80211_local {
struct sk_buff_head pending[IEEE80211_MAX_QUEUES];
struct tasklet_struct tx_pending_tasklet;
@@ -77,7 +77,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
atomic_t agg_queue_stop[IEEE80211_MAX_QUEUES];
@@ -2047,6 +2049,7 @@ void ieee80211_txq_remove_vlan(struct ie
@@ -2035,6 +2037,7 @@ void ieee80211_txq_remove_vlan(struct ie
struct ieee80211_sub_if_data *sdata);
void ieee80211_fill_txq_stats(struct cfg80211_txq_stats *txqstats,
struct txq_info *txqi);
@@ -100,7 +100,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
(unsigned long) local);
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -3498,13 +3498,19 @@ struct sk_buff *ieee80211_tx_dequeue(str
@@ -3518,13 +3518,19 @@ struct sk_buff *ieee80211_tx_dequeue(str
struct ieee80211_tx_info *info;
struct ieee80211_tx_data tx;
ieee80211_tx_result r;
@@ -122,7 +122,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
/* Make sure fragments stay together. */
skb = __skb_dequeue(&txqi->frags);
if (skb)
@@ -3617,6 +3623,7 @@ begin:
@@ -3637,6 +3643,7 @@ begin:
}
IEEE80211_SKB_CB(skb)->control.vif = vif;

View File

@@ -67,7 +67,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
ccflags-y += -DDEBUG
--- a/net/mac80211/main.c
+++ b/net/mac80211/main.c
@@ -1308,18 +1308,12 @@ static int __init ieee80211_init(void)
@@ -1322,18 +1322,12 @@ static int __init ieee80211_init(void)
if (ret)
return ret;
@@ -86,7 +86,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
rc80211_minstrel_exit();
return ret;
@@ -1327,7 +1321,6 @@ static int __init ieee80211_init(void)
@@ -1341,7 +1335,6 @@ static int __init ieee80211_init(void)
static void __exit ieee80211_exit(void)
{

View File

@@ -145,7 +145,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
struct cfg80211_nan_conf *conf)
--- a/net/mac80211/ieee80211_i.h
+++ b/net/mac80211/ieee80211_i.h
@@ -829,6 +829,8 @@ enum txq_info_flags {
@@ -818,6 +818,8 @@ enum txq_info_flags {
* a fq_flow which is already owned by a different tin
* @def_cvars: codel vars for @def_flow
* @frags: used to keep fragments created after dequeue
@@ -154,7 +154,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
*/
struct txq_info {
struct fq_tin tin;
@@ -836,6 +838,8 @@ struct txq_info {
@@ -825,6 +827,8 @@ struct txq_info {
struct codel_vars def_cvars;
struct codel_stats cstats;
struct sk_buff_head frags;
@@ -163,7 +163,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
unsigned long flags;
/* keep last! */
@@ -1127,6 +1131,11 @@ struct ieee80211_local {
@@ -1115,6 +1119,11 @@ struct ieee80211_local {
struct codel_vars *cvars;
struct codel_params cparams;
@@ -191,7 +191,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
--- a/net/mac80211/sta_info.c
+++ b/net/mac80211/sta_info.c
@@ -1261,7 +1261,7 @@ void ieee80211_sta_ps_deliver_wakeup(str
@@ -1265,7 +1265,7 @@ void ieee80211_sta_ps_deliver_wakeup(str
if (!txq_has_queue(sta->sta.txq[i]))
continue;
@@ -202,7 +202,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -1441,6 +1441,7 @@ void ieee80211_txq_init(struct ieee80211
@@ -1447,6 +1447,7 @@ void ieee80211_txq_init(struct ieee80211
codel_vars_init(&txqi->def_cvars);
codel_stats_init(&txqi->cstats);
__skb_queue_head_init(&txqi->frags);
@@ -210,7 +210,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
txqi->txq.vif = &sdata->vif;
@@ -1464,6 +1465,9 @@ void ieee80211_txq_purge(struct ieee8021
@@ -1470,6 +1471,9 @@ void ieee80211_txq_purge(struct ieee8021
fq_tin_reset(fq, tin, fq_skb_free_func);
ieee80211_purge_tx_queue(&local->hw, &txqi->frags);
@@ -220,7 +220,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
}
void ieee80211_txq_set_params(struct ieee80211_local *local)
@@ -1580,7 +1584,7 @@ static bool ieee80211_queue_skb(struct i
@@ -1586,7 +1590,7 @@ static bool ieee80211_queue_skb(struct i
ieee80211_txq_enqueue(local, txqi, skb);
spin_unlock_bh(&fq->lock);
@@ -229,7 +229,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
return true;
}
@@ -3631,6 +3635,60 @@ out:
@@ -3651,6 +3655,60 @@ out:
}
EXPORT_SYMBOL(ieee80211_tx_dequeue);

View File

@@ -156,7 +156,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
};
/* policy for the key attributes */
@@ -4715,6 +4716,11 @@ static int nl80211_send_station(struct s
@@ -4716,6 +4717,11 @@ static int nl80211_send_station(struct s
PUT_SINFO(PLID, plid, u16);
PUT_SINFO(PLINK_STATE, plink_state, u8);
PUT_SINFO_U64(RX_DURATION, rx_duration);
@@ -168,7 +168,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
switch (rdev->wiphy.signal_type) {
case CFG80211_SIGNAL_TYPE_MBM:
@@ -5351,6 +5357,15 @@ static int nl80211_set_station(struct sk
@@ -5352,6 +5358,15 @@ static int nl80211_set_station(struct sk
nla_get_u8(info->attrs[NL80211_ATTR_OPMODE_NOTIF]);
}
@@ -184,7 +184,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
/* Include parameters for TDLS peer (will check later) */
err = nl80211_set_station_tdls(info, &params);
if (err)
@@ -5489,6 +5504,15 @@ static int nl80211_new_station(struct sk
@@ -5490,6 +5505,15 @@ static int nl80211_new_station(struct sk
return -EINVAL;
}

View File

@@ -149,7 +149,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
/* if the dir failed, don't put all the other things into the root! */
--- a/net/mac80211/debugfs_sta.c
+++ b/net/mac80211/debugfs_sta.c
@@ -178,9 +178,9 @@ static ssize_t sta_aqm_read(struct file
@@ -179,9 +179,9 @@ static ssize_t sta_aqm_read(struct file
txqi->tin.tx_bytes,
txqi->tin.tx_packets,
txqi->flags,
@@ -162,7 +162,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
}
rcu_read_unlock();
@@ -192,6 +192,64 @@ static ssize_t sta_aqm_read(struct file
@@ -193,6 +193,64 @@ static ssize_t sta_aqm_read(struct file
}
STA_OPS(aqm);
@@ -227,7 +227,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
static ssize_t sta_agg_status_read(struct file *file, char __user *userbuf,
size_t count, loff_t *ppos)
{
@@ -546,6 +604,10 @@ void ieee80211_sta_debugfs_add(struct st
@@ -547,6 +605,10 @@ void ieee80211_sta_debugfs_add(struct st
if (local->ops->wake_tx_queue)
DEBUGFS_ADD(aqm);
@@ -240,7 +240,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
sta->debugfs_dir,
--- a/net/mac80211/ieee80211_i.h
+++ b/net/mac80211/ieee80211_i.h
@@ -1136,6 +1136,8 @@ struct ieee80211_local {
@@ -1124,6 +1124,8 @@ struct ieee80211_local {
struct list_head active_txqs[IEEE80211_NUM_ACS];
u16 schedule_round[IEEE80211_NUM_ACS];
@@ -259,7 +259,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
INIT_LIST_HEAD(&local->chanctx_list);
mutex_init(&local->chanctx_mtx);
@@ -1142,6 +1143,9 @@ int ieee80211_register_hw(struct ieee802
@@ -1156,6 +1157,9 @@ int ieee80211_register_hw(struct ieee802
if (!local->hw.max_nan_de_entries)
local->hw.max_nan_de_entries = IEEE80211_MAX_NAN_INSTANCE_ID;
@@ -289,7 +289,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
}
}
@@ -399,9 +396,12 @@ struct sta_info *sta_info_alloc(struct i
@@ -401,9 +398,12 @@ struct sta_info *sta_info_alloc(struct i
if (sta_prepare_rate_control(local, sta, gfp))
goto free_txq;
@@ -302,7 +302,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
}
for (i = 0; i < IEEE80211_NUM_TIDS; i++)
@@ -1838,6 +1838,27 @@ void ieee80211_sta_set_buffered(struct i
@@ -1837,6 +1837,27 @@ void ieee80211_sta_set_buffered(struct i
}
EXPORT_SYMBOL(ieee80211_sta_set_buffered);
@@ -330,7 +330,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
int sta_info_move_state(struct sta_info *sta,
enum ieee80211_sta_state new_state)
{
@@ -2208,6 +2229,23 @@ void sta_set_sinfo(struct sta_info *sta,
@@ -2207,6 +2228,23 @@ void sta_set_sinfo(struct sta_info *sta,
sinfo->filled |= BIT_ULL(NL80211_STA_INFO_TX_FAILED);
}
@@ -356,7 +356,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
for_each_possible_cpu(cpu) {
--- a/net/mac80211/sta_info.h
+++ b/net/mac80211/sta_info.h
@@ -127,6 +127,16 @@ enum ieee80211_agg_stop_reason {
@@ -129,6 +129,16 @@ enum ieee80211_agg_stop_reason {
AGG_STOP_DESTROY_STA,
};
@@ -373,7 +373,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
struct sta_info;
/**
@@ -563,6 +573,9 @@ struct sta_info {
@@ -594,6 +604,9 @@ struct sta_info {
} tx_stats;
u16 tid_seq[IEEE80211_QOS_CTL_TID_MASK + 1];
@@ -400,7 +400,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
if (sta->status_stats.lost_packets)
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -1463,8 +1463,11 @@ void ieee80211_txq_purge(struct ieee8021
@@ -1469,8 +1469,11 @@ void ieee80211_txq_purge(struct ieee8021
struct fq *fq = &local->fq;
struct fq_tin *tin = &txqi->tin;
@@ -412,7 +412,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
spin_lock_bh(&local->active_txq_lock[txqi->txq.ac]);
list_del_init(&txqi->schedule_order);
spin_unlock_bh(&local->active_txq_lock[txqi->txq.ac]);
@@ -3642,11 +3645,28 @@ struct ieee80211_txq *ieee80211_next_txq
@@ -3662,11 +3665,28 @@ struct ieee80211_txq *ieee80211_next_txq
lockdep_assert_held(&local->active_txq_lock[ac]);
@@ -442,7 +442,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
return NULL;
list_del_init(&txqi->schedule_order);
@@ -3664,12 +3684,74 @@ void ieee80211_return_txq(struct ieee802
@@ -3684,12 +3704,74 @@ void ieee80211_return_txq(struct ieee802
lockdep_assert_held(&local->active_txq_lock[txq->ac]);
if (list_empty(&txqi->schedule_order) &&

View File

@@ -51,7 +51,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -3704,6 +3704,19 @@ void ieee80211_return_txq(struct ieee802
@@ -3724,6 +3724,19 @@ void ieee80211_return_txq(struct ieee802
}
EXPORT_SYMBOL(ieee80211_return_txq);

View File

@@ -11,7 +11,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
--- a/net/mac80211/ieee80211_i.h
+++ b/net/mac80211/ieee80211_i.h
@@ -179,6 +179,7 @@ struct ieee80211_tx_data {
@@ -161,6 +161,7 @@ struct ieee80211_tx_data {
struct ieee80211_tx_rate rate;
unsigned int flags;
@@ -21,7 +21,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -925,7 +925,7 @@ ieee80211_tx_h_fragment(struct ieee80211
@@ -931,7 +931,7 @@ ieee80211_tx_h_fragment(struct ieee80211
struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
struct ieee80211_hdr *hdr = (void *)skb->data;
int frag_threshold = tx->local->hw.wiphy->frag_threshold;
@@ -30,7 +30,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
int fragnum;
/* no matter what happens, tx->skb moves to tx->skbs */
@@ -946,8 +946,6 @@ ieee80211_tx_h_fragment(struct ieee80211
@@ -952,8 +952,6 @@ ieee80211_tx_h_fragment(struct ieee80211
if (WARN_ON(info->flags & IEEE80211_TX_CTL_AMPDU))
return TX_DROP;
@@ -39,7 +39,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
/* internal error, why isn't DONTFRAG set? */
if (WARN_ON(skb->len + FCS_LEN <= frag_threshold))
return TX_DROP;
@@ -1178,6 +1176,8 @@ ieee80211_tx_prepare(struct ieee80211_su
@@ -1184,6 +1182,8 @@ ieee80211_tx_prepare(struct ieee80211_su
hdr = (struct ieee80211_hdr *) skb->data;
@@ -48,7 +48,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
if (likely(sta)) {
if (!IS_ERR(sta))
tx->sta = sta;
@@ -3536,6 +3536,7 @@ begin:
@@ -3556,6 +3556,7 @@ begin:
tx.local = local;
tx.skb = skb;
tx.sdata = vif_to_sdata(info->control.vif);
@@ -56,7 +56,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
if (txq->sta) {
tx.sta = container_of(txq->sta, struct sta_info, sta);
@@ -3580,7 +3581,7 @@ begin:
@@ -3600,7 +3601,7 @@ begin:
if (tx.key &&
(tx.key->conf.flags & IEEE80211_KEY_FLAG_GENERATE_IV))
@@ -65,7 +65,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
ieee80211_xmit_fast_finish(sta->sdata, sta, pn_offs,
tx.key, skb);
@@ -4039,6 +4040,7 @@ ieee80211_build_data_template(struct iee
@@ -4059,6 +4060,7 @@ ieee80211_build_data_template(struct iee
hdr = (void *)skb->data;
tx.sta = sta_info_get(sdata, hdr->addr1);
tx.skb = skb;
@@ -75,7 +75,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
rcu_read_unlock();
--- a/net/mac80211/util.c
+++ b/net/mac80211/util.c
@@ -1396,6 +1396,7 @@ void ieee80211_send_auth(struct ieee8021
@@ -1398,6 +1398,7 @@ void ieee80211_send_auth(struct ieee8021
struct ieee80211_local *local = sdata->local;
struct sk_buff *skb;
struct ieee80211_mgmt *mgmt;
@@ -83,7 +83,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
int err;
/* 24 + 6 = header + auth_algo + auth_transaction + status_code */
@@ -1419,8 +1420,10 @@ void ieee80211_send_auth(struct ieee8021
@@ -1421,8 +1422,10 @@ void ieee80211_send_auth(struct ieee8021
skb_put_data(skb, extra, extra_len);
if (auth_alg == WLAN_AUTH_SHARED_KEY && transaction == 3) {
@@ -164,7 +164,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
size_t klen, u8 *data, size_t data_len);
--- a/net/mac80211/wpa.c
+++ b/net/mac80211/wpa.c
@@ -44,7 +44,7 @@ ieee80211_tx_h_michael_mic_add(struct ie
@@ -45,7 +45,7 @@ ieee80211_tx_h_michael_mic_add(struct ie
skb->len < 24 || !ieee80211_is_data_present(hdr->frame_control))
return TX_CONTINUE;
@@ -173,7 +173,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
if (skb->len < hdrlen)
return TX_DROP;
@@ -195,7 +195,6 @@ mic_fail_no_key:
@@ -196,7 +196,6 @@ mic_fail_no_key:
static int tkip_encrypt_skb(struct ieee80211_tx_data *tx, struct sk_buff *skb)
{
@@ -181,7 +181,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
struct ieee80211_key *key = tx->key;
struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
unsigned int hdrlen;
@@ -210,7 +209,7 @@ static int tkip_encrypt_skb(struct ieee8
@@ -211,7 +210,7 @@ static int tkip_encrypt_skb(struct ieee8
return 0;
}
@@ -190,7 +190,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
len = skb->len - hdrlen;
if (info->control.hw_key)
@@ -428,7 +427,7 @@ static int ccmp_encrypt_skb(struct ieee8
@@ -429,7 +428,7 @@ static int ccmp_encrypt_skb(struct ieee8
return 0;
}
@@ -199,7 +199,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
len = skb->len - hdrlen;
if (info->control.hw_key)
@@ -660,7 +659,7 @@ static int gcmp_encrypt_skb(struct ieee8
@@ -666,7 +665,7 @@ static int gcmp_encrypt_skb(struct ieee8
return 0;
}
@@ -208,7 +208,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
len = skb->len - hdrlen;
if (info->control.hw_key)
@@ -800,7 +799,6 @@ static ieee80211_tx_result
@@ -811,7 +810,6 @@ static ieee80211_tx_result
ieee80211_crypto_cs_encrypt(struct ieee80211_tx_data *tx,
struct sk_buff *skb)
{
@@ -216,7 +216,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
struct ieee80211_key *key = tx->key;
struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
int hdrlen;
@@ -816,8 +814,7 @@ ieee80211_crypto_cs_encrypt(struct ieee8
@@ -827,8 +825,7 @@ ieee80211_crypto_cs_encrypt(struct ieee8
pskb_expand_head(skb, iv_len, 0, GFP_ATOMIC)))
return TX_DROP;

View File

@@ -81,7 +81,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
* mac80211 is capable of taking advantage of many hardware
--- a/net/mac80211/iface.c
+++ b/net/mac80211/iface.c
@@ -1871,6 +1871,10 @@ int ieee80211_if_add(struct ieee80211_lo
@@ -1873,6 +1873,10 @@ int ieee80211_if_add(struct ieee80211_lo
+ 8 /* rfc1042/bridge tunnel */
- ETH_HLEN /* ethernet hard_header_len */
+ IEEE80211_ENCRYPT_HEADROOM;
@@ -94,7 +94,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
ret = dev_alloc_name(ndev, ndev->name);
--- a/net/mac80211/mesh_pathtbl.c
+++ b/net/mac80211/mesh_pathtbl.c
@@ -105,13 +105,15 @@ void mesh_path_assign_nexthop(struct mes
@@ -109,13 +109,15 @@ void mesh_path_assign_nexthop(struct mes
static void prepare_for_gate(struct sk_buff *skb, char *dst_addr,
struct mesh_path *gate_mpath)
{
@@ -113,7 +113,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
if (!(mshdr->flags & MESH_FLAGS_AE)) {
--- a/net/mac80211/rx.c
+++ b/net/mac80211/rx.c
@@ -2621,7 +2621,7 @@ ieee80211_rx_h_mesh_fwding(struct ieee80
@@ -2702,7 +2702,7 @@ ieee80211_rx_h_mesh_fwding(struct ieee80
struct ieee80211_local *local = rx->local;
struct ieee80211_sub_if_data *sdata = rx->sdata;
struct ieee80211_if_mesh *ifmsh = &sdata->u.mesh;
@@ -122,7 +122,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
int tailroom = 0;
hdr = (struct ieee80211_hdr *) skb->data;
@@ -2714,7 +2714,9 @@ ieee80211_rx_h_mesh_fwding(struct ieee80
@@ -2795,7 +2795,9 @@ ieee80211_rx_h_mesh_fwding(struct ieee80
if (sdata->crypto_tx_tailroom_needed_cnt)
tailroom = IEEE80211_ENCRYPT_TAILROOM;
@@ -133,7 +133,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
sdata->encrypt_headroom,
tailroom, GFP_ATOMIC);
if (!fwd_skb)
@@ -2746,6 +2748,12 @@ ieee80211_rx_h_mesh_fwding(struct ieee80
@@ -2827,6 +2829,12 @@ ieee80211_rx_h_mesh_fwding(struct ieee80
return RX_DROP_MONITOR;
}
@@ -148,7 +148,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
out:
--- a/net/mac80211/sta_info.h
+++ b/net/mac80211/sta_info.h
@@ -311,7 +311,7 @@ struct ieee80211_fast_tx {
@@ -313,7 +313,7 @@ struct ieee80211_fast_tx {
u8 hdr_len;
u8 sa_offs, da_offs, pn_offs;
u8 band;
@@ -217,7 +217,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -1175,8 +1175,7 @@ ieee80211_tx_prepare(struct ieee80211_su
@@ -1181,8 +1181,7 @@ ieee80211_tx_prepare(struct ieee80211_su
info->flags &= ~IEEE80211_TX_INTFL_NEED_TXPROCESSING;
hdr = (struct ieee80211_hdr *) skb->data;
@@ -227,7 +227,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
if (likely(sta)) {
if (!IS_ERR(sta))
@@ -2233,7 +2232,7 @@ netdev_tx_t ieee80211_monitor_start_xmit
@@ -2243,7 +2242,7 @@ netdev_tx_t ieee80211_monitor_start_xmit
goto fail;
hdr = (struct ieee80211_hdr *)(skb->data + len_rthdr);
@@ -236,7 +236,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
if (skb->len < len_rthdr + hdrlen)
goto fail;
@@ -2452,7 +2451,7 @@ static struct sk_buff *ieee80211_build_h
@@ -2462,7 +2461,7 @@ static struct sk_buff *ieee80211_build_h
struct ieee80211_chanctx_conf *chanctx_conf;
struct ieee80211_sub_if_data *ap_sdata;
enum nl80211_band band;
@@ -245,7 +245,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
if (IS_ERR(sta))
sta = NULL;
@@ -2751,7 +2750,9 @@ static struct sk_buff *ieee80211_build_h
@@ -2761,7 +2760,9 @@ static struct sk_buff *ieee80211_build_h
}
skb_pull(skb, skip_header_bytes);
@@ -255,7 +255,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
/*
* So we need to modify the skb header and hence need a copy of
@@ -2784,6 +2785,9 @@ static struct sk_buff *ieee80211_build_h
@@ -2794,6 +2795,9 @@ static struct sk_buff *ieee80211_build_h
memcpy(skb_push(skb, meshhdrlen), &mesh_hdr, meshhdrlen);
#endif
@@ -265,7 +265,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
if (ieee80211_is_data_qos(fc)) {
__le16 *qos_control;
@@ -2960,6 +2964,8 @@ void ieee80211_check_fast_xmit(struct st
@@ -2970,6 +2974,8 @@ void ieee80211_check_fast_xmit(struct st
fc |= cpu_to_le16(IEEE80211_STYPE_QOS_DATA);
}
@@ -274,7 +274,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
/* We store the key here so there's no point in using rcu_dereference()
* but that's fine because the code that changes the pointers will call
* this function after doing so. For a single CPU that would be enough,
@@ -3536,7 +3542,7 @@ begin:
@@ -3556,7 +3562,7 @@ begin:
tx.local = local;
tx.skb = skb;
tx.sdata = vif_to_sdata(info->control.vif);
@@ -283,7 +283,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
if (txq->sta) {
tx.sta = container_of(txq->sta, struct sta_info, sta);
@@ -4040,7 +4046,7 @@ ieee80211_build_data_template(struct iee
@@ -4060,7 +4066,7 @@ ieee80211_build_data_template(struct iee
hdr = (void *)skb->data;
tx.sta = sta_info_get(sdata, hdr->addr1);
tx.skb = skb;

View File

@@ -95,7 +95,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
* ieee80211_txq_may_transmit - check whether TXQ is allowed to transmit
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -3648,16 +3648,17 @@ EXPORT_SYMBOL(ieee80211_tx_dequeue);
@@ -3668,16 +3668,17 @@ EXPORT_SYMBOL(ieee80211_tx_dequeue);
struct ieee80211_txq *ieee80211_next_txq(struct ieee80211_hw *hw, u8 ac)
{
struct ieee80211_local *local = hw_to_local(hw);
@@ -115,7 +115,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
if (txqi->txq.sta) {
struct sta_info *sta = container_of(txqi->txq.sta,
@@ -3674,21 +3675,25 @@ struct ieee80211_txq *ieee80211_next_txq
@@ -3694,21 +3695,25 @@ struct ieee80211_txq *ieee80211_next_txq
if (txqi->schedule_round == local->schedule_round[ac])
@@ -146,7 +146,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
if (list_empty(&txqi->schedule_order) &&
(!skb_queue_empty(&txqi->frags) || txqi->tin.backlog_packets)) {
@@ -3708,18 +3713,7 @@ void ieee80211_return_txq(struct ieee802
@@ -3728,18 +3733,7 @@ void ieee80211_return_txq(struct ieee802
list_add_tail(&txqi->schedule_order,
&local->active_txqs[txq->ac]);
}
@@ -165,7 +165,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
spin_unlock_bh(&local->active_txq_lock[txq->ac]);
}
EXPORT_SYMBOL(ieee80211_schedule_txq);
@@ -3732,7 +3726,7 @@ bool ieee80211_txq_may_transmit(struct i
@@ -3752,7 +3746,7 @@ bool ieee80211_txq_may_transmit(struct i
struct sta_info *sta;
u8 ac = txq->ac;
@@ -174,7 +174,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
if (!txqi->txq.sta)
goto out;
@@ -3762,34 +3756,27 @@ bool ieee80211_txq_may_transmit(struct i
@@ -3782,34 +3776,27 @@ bool ieee80211_txq_may_transmit(struct i
sta->airtime[ac].deficit += sta->airtime_weight;
list_move_tail(&txqi->schedule_order, &local->active_txqs[ac]);

View File

@@ -85,7 +85,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
void mesh_path_timer(struct timer_list *t)
--- a/net/mac80211/mesh_pathtbl.c
+++ b/net/mac80211/mesh_pathtbl.c
@@ -219,7 +219,7 @@ static struct mesh_path *mpath_lookup(st
@@ -223,7 +223,7 @@ static struct mesh_path *mpath_lookup(st
{
struct mesh_path *mpath;

View File

@@ -76,7 +76,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
flow->backlog += skb->len;
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -1390,11 +1390,15 @@ static void ieee80211_txq_enqueue(struct
@@ -1396,11 +1396,15 @@ static void ieee80211_txq_enqueue(struct
{
struct fq *fq = &local->fq;
struct fq_tin *tin = &txqi->tin;
@@ -93,7 +93,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
}
static bool fq_vlan_filter_func(struct fq *fq, struct fq_tin *tin,
@@ -1564,7 +1568,6 @@ static bool ieee80211_queue_skb(struct i
@@ -1570,7 +1574,6 @@ static bool ieee80211_queue_skb(struct i
struct sta_info *sta,
struct sk_buff *skb)
{
@@ -101,7 +101,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
struct ieee80211_vif *vif;
struct txq_info *txqi;
@@ -1582,9 +1585,7 @@ static bool ieee80211_queue_skb(struct i
@@ -1588,9 +1591,7 @@ static bool ieee80211_queue_skb(struct i
if (!txqi)
return false;
@@ -111,7 +111,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
schedule_and_wake_txq(local, txqi);
@@ -3211,6 +3212,7 @@ static bool ieee80211_amsdu_aggregate(st
@@ -3223,6 +3224,7 @@ static bool ieee80211_amsdu_aggregate(st
u8 max_subframes = sta->sta.max_amsdu_subframes;
int max_frags = local->hw.max_tx_fragments;
int max_amsdu_len = sta->sta.max_amsdu_len;
@@ -119,7 +119,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
int orig_truesize;
__be16 len;
void *data;
@@ -3233,6 +3235,8 @@ static bool ieee80211_amsdu_aggregate(st
@@ -3245,6 +3247,8 @@ static bool ieee80211_amsdu_aggregate(st
max_amsdu_len = min_t(int, max_amsdu_len,
sta->sta.max_rc_amsdu_len);
@@ -128,7 +128,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
spin_lock_bh(&fq->lock);
/* TODO: Ideally aggregation should be done on dequeue to remain
@@ -3240,7 +3244,8 @@ static bool ieee80211_amsdu_aggregate(st
@@ -3252,7 +3256,8 @@ static bool ieee80211_amsdu_aggregate(st
*/
tin = &txqi->tin;

View File

@@ -10,7 +10,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -3518,6 +3518,7 @@ struct sk_buff *ieee80211_tx_dequeue(str
@@ -3538,6 +3538,7 @@ struct sk_buff *ieee80211_tx_dequeue(str
ieee80211_tx_result r;
struct ieee80211_vif *vif = txq->vif;
@@ -18,7 +18,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
spin_lock_bh(&fq->lock);
if (test_bit(IEEE80211_TXQ_STOP, &txqi->flags) ||
@@ -3534,11 +3535,12 @@ struct sk_buff *ieee80211_tx_dequeue(str
@@ -3554,11 +3555,12 @@ struct sk_buff *ieee80211_tx_dequeue(str
if (skb)
goto out;
@@ -32,7 +32,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
hdr = (struct ieee80211_hdr *)skb->data;
info = IEEE80211_SKB_CB(skb);
@@ -3602,8 +3604,11 @@ begin:
@@ -3622,8 +3624,11 @@ begin:
skb = __skb_dequeue(&tx.skbs);
@@ -45,7 +45,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
}
if (skb && skb_has_frag_list(skb) &&
@@ -3642,6 +3647,7 @@ begin:
@@ -3662,6 +3667,7 @@ begin:
}
IEEE80211_SKB_CB(skb)->control.vif = vif;

View File

@@ -12,7 +12,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
--- a/net/mac80211/iface.c
+++ b/net/mac80211/iface.c
@@ -1301,6 +1301,7 @@ static void ieee80211_if_setup(struct ne
@@ -1297,6 +1297,7 @@ static void ieee80211_if_setup(struct ne
static void ieee80211_if_setup_no_queue(struct net_device *dev)
{
ieee80211_if_setup(dev);

View File

@@ -1,215 +0,0 @@
From: Felix Fietkau <nbd@nbd.name>
Date: Sun, 17 Mar 2019 18:11:30 +0100
Subject: [PATCH] mac80211: optimize skb resizing
When forwarding unicast packets from ethernet to batman-adv over 802.11s
(with forwarding disabled), the typical required headroom to transmit
encrypted packets on mt76 is 32 (802.11) + 6 (802.11s) + 8 (CCMP) +
2 (padding) + 6 (LLC) + 18 (batman-adv) - 14 (old ethernet header) = 58 bytes.
On systems where NET_SKB_PAD is 64 this leads to a call to pskb_expand_head
for every packet, since mac80211 also tries to allocate 16 bytes status
headroom for radiotap headers.
This patch fixes these unnecessary reallocations by only requiring the extra
status headroom in ieee80211_tx_monitor()
If however a reallocation happens before that call, the status headroom gets
added there as well, in order to avoid double reallocation.
The patch also cleans up the code by moving the headroom calculation to
ieee80211_skb_resize.
Signed-off-by: Felix Fietkau <nbd@nbd.name>
---
--- a/net/mac80211/ieee80211_i.h
+++ b/net/mac80211/ieee80211_i.h
@@ -1762,6 +1762,9 @@ void ieee80211_clear_fast_xmit(struct st
int ieee80211_tx_control_port(struct wiphy *wiphy, struct net_device *dev,
const u8 *buf, size_t len,
const u8 *dest, __be16 proto, bool unencrypted);
+int ieee80211_skb_resize(struct ieee80211_local *local,
+ struct ieee80211_sub_if_data *sdata,
+ struct sk_buff *skb, int hdrlen, int hdr_add);
/* HT */
void ieee80211_apply_htcap_overrides(struct ieee80211_sub_if_data *sdata,
--- a/net/mac80211/status.c
+++ b/net/mac80211/status.c
@@ -671,6 +671,11 @@ void ieee80211_tx_monitor(struct ieee802
}
}
+ if (ieee80211_skb_resize(local, NULL, skb, 0, 0)) {
+ dev_kfree_skb(skb);
+ return;
+ }
+
/* send frame to monitor interfaces now */
rtap_len = ieee80211_tx_radiotap_len(info);
if (WARN_ON_ONCE(skb_headroom(skb) < rtap_len)) {
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -1914,42 +1914,53 @@ static bool ieee80211_tx(struct ieee8021
}
/* device xmit handlers */
-
-enum ieee80211_encrypt {
- ENCRYPT_NO,
- ENCRYPT_MGMT,
- ENCRYPT_DATA,
-};
-
-static int ieee80211_skb_resize(struct ieee80211_sub_if_data *sdata,
- struct sk_buff *skb,
- int head_need,
- enum ieee80211_encrypt encrypt)
+int ieee80211_skb_resize(struct ieee80211_local *local,
+ struct ieee80211_sub_if_data *sdata,
+ struct sk_buff *skb, int hdr_len, int hdr_extra)
{
- struct ieee80211_local *local = sdata->local;
- bool enc_tailroom;
- int tail_need = 0;
-
- enc_tailroom = encrypt == ENCRYPT_MGMT ||
- (encrypt == ENCRYPT_DATA &&
- sdata->crypto_tx_tailroom_needed_cnt);
-
- if (enc_tailroom) {
- tail_need = IEEE80211_ENCRYPT_TAILROOM;
- tail_need -= skb_tailroom(skb);
- tail_need = max_t(int, tail_need, 0);
+ struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
+ struct ieee80211_hdr *hdr;
+ int head_need, head_max;
+ int tail_need, tail_max;
+ bool enc_tailroom = false;
+
+ if (sdata && !hdr_len &&
+ !(info->flags & IEEE80211_TX_INTFL_DONT_ENCRYPT)) {
+ hdr = (struct ieee80211_hdr *) skb->data;
+ enc_tailroom = (sdata->crypto_tx_tailroom_needed_cnt ||
+ ieee80211_is_mgmt(hdr->frame_control));
+ hdr_len += sdata->encrypt_headroom;
+ }
+
+ head_need = head_max = hdr_len;
+ tail_need = tail_max = 0;
+ if (!sdata) {
+ head_need = head_max = local->tx_headroom;
+ } else {
+ head_max += hdr_extra;
+ head_max += max_t(int, local->tx_headroom,
+ local->hw.extra_tx_headroom);
+ head_need += local->hw.extra_tx_headroom;
+
+ tail_max = IEEE80211_ENCRYPT_TAILROOM;
+ if (enc_tailroom)
+ tail_need = tail_max;
}
if (skb_cloned(skb) &&
(!ieee80211_hw_check(&local->hw, SUPPORTS_CLONED_SKBS) ||
!skb_clone_writable(skb, ETH_HLEN) || enc_tailroom))
I802_DEBUG_INC(local->tx_expand_skb_head_cloned);
- else if (head_need || tail_need)
+ else if (head_need > skb_headroom(skb) ||
+ tail_need > skb_tailroom(skb))
I802_DEBUG_INC(local->tx_expand_skb_head);
else
return 0;
- if (pskb_expand_head(skb, head_need, tail_need, GFP_ATOMIC)) {
+ head_max = max_t(int, 0, head_max - skb_headroom(skb));
+ tail_max = max_t(int, 0, tail_max - skb_tailroom(skb));
+
+ if (pskb_expand_head(skb, head_max, tail_max, GFP_ATOMIC)) {
wiphy_debug(local->hw.wiphy,
"failed to reallocate TX buffer\n");
return -ENOMEM;
@@ -1964,24 +1975,9 @@ void ieee80211_xmit(struct ieee80211_sub
{
struct ieee80211_local *local = sdata->local;
struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
- struct ieee80211_hdr *hdr = (struct ieee80211_hdr *) skb->data;
- int headroom;
- enum ieee80211_encrypt encrypt;
-
- if (info->flags & IEEE80211_TX_INTFL_DONT_ENCRYPT)
- encrypt = ENCRYPT_NO;
- else if (ieee80211_is_mgmt(hdr->frame_control))
- encrypt = ENCRYPT_MGMT;
- else
- encrypt = ENCRYPT_DATA;
-
- headroom = local->tx_headroom;
- if (encrypt != ENCRYPT_NO)
- headroom += sdata->encrypt_headroom;
- headroom -= skb_headroom(skb);
- headroom = max_t(int, 0, headroom);
+ struct ieee80211_hdr *hdr;
- if (ieee80211_skb_resize(sdata, skb, headroom, encrypt)) {
+ if (ieee80211_skb_resize(local, sdata, skb, 0, 0)) {
ieee80211_free_txskb(&local->hw, skb);
return;
}
@@ -2752,30 +2748,14 @@ static struct sk_buff *ieee80211_build_h
skb_pull(skb, skip_header_bytes);
padsize = ieee80211_hdr_padsize(&local->hw, hdrlen);
- head_need = hdrlen + encaps_len + meshhdrlen - skb_headroom(skb);
+ head_need = hdrlen + encaps_len + meshhdrlen;
head_need += padsize;
- /*
- * So we need to modify the skb header and hence need a copy of
- * that. The head_need variable above doesn't, so far, include
- * the needed header space that we don't need right away. If we
- * can, then we don't reallocate right now but only after the
- * frame arrives at the master device (if it does...)
- *
- * If we cannot, however, then we will reallocate to include all
- * the ever needed space. Also, if we need to reallocate it anyway,
- * make it big enough for everything we may ever need.
- */
-
- if (head_need > 0 || skb_cloned(skb)) {
- head_need += sdata->encrypt_headroom;
- head_need += local->tx_headroom;
- head_need = max_t(int, 0, head_need);
- if (ieee80211_skb_resize(sdata, skb, head_need, ENCRYPT_DATA)) {
- ieee80211_free_txskb(&local->hw, skb);
- skb = NULL;
- return ERR_PTR(-ENOMEM);
- }
+ if (ieee80211_skb_resize(local, sdata, skb, head_need,
+ sdata->encrypt_headroom)) {
+ ieee80211_free_txskb(&local->hw, skb);
+ skb = NULL;
+ return ERR_PTR(-ENOMEM);
}
if (encaps_data)
@@ -3388,7 +3368,6 @@ static bool ieee80211_xmit_fast(struct i
struct ieee80211_local *local = sdata->local;
u16 ethertype = (skb->data[12] << 8) | skb->data[13];
int extra_head = fast_tx->hdr_len - (ETH_HLEN - 2);
- int hw_headroom = sdata->local->hw.extra_tx_headroom;
struct ethhdr eth;
struct ieee80211_tx_info *info;
struct ieee80211_hdr *hdr = (void *)fast_tx->hdr;
@@ -3440,10 +3419,7 @@ static bool ieee80211_xmit_fast(struct i
* as the may-encrypt argument for the resize to not account for
* more room than we already have in 'extra_head'
*/
- if (unlikely(ieee80211_skb_resize(sdata, skb,
- max_t(int, extra_head + hw_headroom -
- skb_headroom(skb), 0),
- ENCRYPT_NO))) {
+ if (unlikely(ieee80211_skb_resize(local, sdata, skb, extra_head, 0))) {
kfree_skb(skb);
return true;
}

View File

@@ -72,7 +72,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
/**
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -3674,8 +3674,9 @@ out:
@@ -3718,8 +3718,9 @@ out:
}
EXPORT_SYMBOL(ieee80211_next_txq);
@@ -84,7 +84,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
{
struct ieee80211_local *local = hw_to_local(hw);
struct txq_info *txqi = to_txq_info(txq);
@@ -3683,7 +3684,8 @@ void ieee80211_schedule_txq(struct ieee8
@@ -3727,7 +3728,8 @@ void ieee80211_schedule_txq(struct ieee8
spin_lock_bh(&local->active_txq_lock[txq->ac]);
if (list_empty(&txqi->schedule_order) &&
@@ -94,7 +94,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
/* If airtime accounting is active, always enqueue STAs at the
* head of the list to ensure that they only get moved to the
* back by the airtime DRR scheduler once they have a negative
@@ -3703,7 +3705,7 @@ void ieee80211_schedule_txq(struct ieee8
@@ -3747,7 +3749,7 @@ void ieee80211_schedule_txq(struct ieee8
spin_unlock_bh(&local->active_txq_lock[txq->ac]);
}

View File

@@ -13,7 +13,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -3773,6 +3773,7 @@ void __ieee80211_subif_start_xmit(struct
@@ -3817,6 +3817,7 @@ void __ieee80211_subif_start_xmit(struct
u32 ctrl_flags)
{
struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
@@ -21,7 +21,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
struct sta_info *sta;
struct sk_buff *next;
@@ -3786,7 +3787,15 @@ void __ieee80211_subif_start_xmit(struct
@@ -3830,7 +3831,15 @@ void __ieee80211_subif_start_xmit(struct
if (ieee80211_lookup_ra_sta(sdata, skb, &sta))
goto out_free;

View File

@@ -36,7 +36,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
/**
--- a/net/mac80211/wpa.c
+++ b/net/mac80211/wpa.c
@@ -947,7 +947,8 @@ ieee80211_crypto_aes_cmac_encrypt(struct
@@ -958,7 +958,8 @@ ieee80211_crypto_aes_cmac_encrypt(struct
info = IEEE80211_SKB_CB(skb);
@@ -46,7 +46,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
return TX_CONTINUE;
if (WARN_ON(skb_tailroom(skb) < sizeof(*mmie)))
@@ -963,6 +964,9 @@ ieee80211_crypto_aes_cmac_encrypt(struct
@@ -974,6 +975,9 @@ ieee80211_crypto_aes_cmac_encrypt(struct
bip_ipn_set64(mmie->sequence_number, pn64);

View File

@@ -54,7 +54,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
}
--- a/net/mac80211/ieee80211_i.h
+++ b/net/mac80211/ieee80211_i.h
@@ -2071,7 +2071,8 @@ void ieee80211_send_auth(struct ieee8021
@@ -2056,7 +2056,8 @@ void ieee80211_send_auth(struct ieee8021
const u8 *da, const u8 *key, u8 key_len, u8 key_idx,
u32 tx_flags);
void ieee80211_send_deauth_disassoc(struct ieee80211_sub_if_data *sdata,
@@ -66,7 +66,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
enum {
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -2203,8 +2203,9 @@ static void ieee80211_set_disassoc(struc
@@ -2208,8 +2208,9 @@ static void ieee80211_set_disassoc(struc
!ifmgd->have_beacon)
drv_mgd_prepare_tx(sdata->local, sdata, 0);
@@ -78,7 +78,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
}
/* flush out frame - make sure the deauth was actually sent */
@@ -4369,7 +4370,7 @@ void ieee80211_mgd_quiesce(struct ieee80
@@ -4381,7 +4382,7 @@ void ieee80211_mgd_quiesce(struct ieee80
* cfg80211 won't know and won't actually abort those attempts,
* thus we need to do that ourselves.
*/
@@ -87,7 +87,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
IEEE80211_STYPE_DEAUTH,
WLAN_REASON_DEAUTH_LEAVING,
false, frame_buf);
@@ -5349,7 +5350,7 @@ int ieee80211_mgd_deauth(struct ieee8021
@@ -5361,7 +5362,7 @@ int ieee80211_mgd_deauth(struct ieee8021
ieee80211_get_reason_code_string(req->reason_code));
drv_mgd_prepare_tx(sdata->local, sdata, 0);
@@ -96,7 +96,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
IEEE80211_STYPE_DEAUTH,
req->reason_code, tx,
frame_buf);
@@ -5369,7 +5370,7 @@ int ieee80211_mgd_deauth(struct ieee8021
@@ -5381,7 +5382,7 @@ int ieee80211_mgd_deauth(struct ieee8021
ieee80211_get_reason_code_string(req->reason_code));
drv_mgd_prepare_tx(sdata->local, sdata, 0);
@@ -107,7 +107,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
frame_buf);
--- a/net/mac80211/util.c
+++ b/net/mac80211/util.c
@@ -1433,7 +1433,8 @@ void ieee80211_send_auth(struct ieee8021
@@ -1435,7 +1435,8 @@ void ieee80211_send_auth(struct ieee8021
}
void ieee80211_send_deauth_disassoc(struct ieee80211_sub_if_data *sdata,
@@ -117,7 +117,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
bool send_frame, u8 *frame_buf)
{
struct ieee80211_local *local = sdata->local;
@@ -1444,7 +1445,7 @@ void ieee80211_send_deauth_disassoc(stru
@@ -1446,7 +1447,7 @@ void ieee80211_send_deauth_disassoc(stru
mgmt->frame_control = cpu_to_le16(IEEE80211_FTYPE_MGMT | stype);
mgmt->duration = 0; /* initialize only */
mgmt->seq_ctrl = 0; /* initialize only */

View File

@@ -64,7 +64,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
__NL80211_SURVEY_INFO_AFTER_LAST,
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -8379,6 +8379,10 @@ static int nl80211_send_survey(struct sk
@@ -8380,6 +8380,10 @@ static int nl80211_send_survey(struct sk
nla_put_u64_64bit(msg, NL80211_SURVEY_INFO_TIME_SCAN,
survey->time_scan, NL80211_SURVEY_INFO_PAD))
goto nla_put_failure;

View File

@@ -57,7 +57,7 @@
__NL80211_ATTR_AFTER_LAST,
--- a/net/mac80211/cfg.c
+++ b/net/mac80211/cfg.c
@@ -2458,6 +2458,19 @@ static int ieee80211_get_tx_power(struct
@@ -2457,6 +2457,19 @@ static int ieee80211_get_tx_power(struct
return 0;
}
@@ -77,7 +77,7 @@
static int ieee80211_set_wds_peer(struct wiphy *wiphy, struct net_device *dev,
const u8 *addr)
{
@@ -3847,6 +3860,7 @@ const struct cfg80211_ops mac80211_confi
@@ -3846,6 +3859,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
@@ -1365,6 +1365,7 @@ struct ieee80211_local {
@@ -1353,6 +1353,7 @@ struct ieee80211_local {
int dynamic_ps_forced_timeout;
int user_power_level; /* in dBm, for all interfaces */

View File

@@ -8,9 +8,9 @@ PKG_LICENSE_FILES:=
PKG_SOURCE_URL:=https://github.com/openwrt/mt76
PKG_SOURCE_PROTO:=git
PKG_SOURCE_DATE:=2020-03-10
PKG_SOURCE_VERSION:=08054d5ab1350fcb8563feb90e6ab7f8f4a0a1b7
PKG_MIRROR_HASH:=b41a3cab1485c68befb1dcb4c1e426d41705db1b2a57851dafd6e8f75eeea3d7
PKG_SOURCE_DATE:=2021-02-15
PKG_SOURCE_VERSION:=5c768dec13389700ff3fa3d25083fb43d8e7adda
PKG_MIRROR_HASH:=2ef0cf233bedc20e77c61cd6dd6085e162cce5c2719b5285bcdd8bf92ebf88eb
PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>
PKG_BUILD_PARALLEL:=1

View File

@@ -21,6 +21,7 @@ PKG_MIRROR_HASH:=7bdd05765d8215a9c293cdcb028d63a04c9e55b337eaac9e8d3659bd8621832
PKG_MAINTAINER:=Imre Kaloz <kaloz@openwrt.org>
PKG_BUILD_PARALLEL:=1
PKG_FLAGS:=nonshared
include $(INCLUDE_DIR)/kernel.mk
include $(INCLUDE_DIR)/package.mk

View File

@@ -12,8 +12,7 @@ PKG_VERSION:=1.9.1
PKG_RELEASE:=2.1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://www.us.tcpdump.org/release/ \
http://www.tcpdump.org/release/
PKG_SOURCE_URL:=http://www.tcpdump.org/release/
PKG_HASH:=635237637c5b619bcceba91900666b64d56ecb7be63f298f601ec786ce087094
PKG_FIXUP:=patch-libtool

View File

@@ -8,13 +8,13 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=mbedtls
PKG_VERSION:=2.16.9
PKG_VERSION:=2.16.12
PKG_RELEASE:=1
PKG_USE_MIPS16:=0
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/ARMmbed/mbedtls/tar.gz/v$(PKG_VERSION)?
PKG_HASH:=fc17ff7d8c11d08f23ae2800a18269408ad2c24ea6bb8b9363e41a01c2425697
PKG_HASH:=294871ab1864a65d0b74325e9219d5bcd6e91c34a3c59270c357bb9ae4d5c393
PKG_BUILD_PARALLEL:=1
PKG_LICENSE:=GPL-2.0+

View File

@@ -144,7 +144,7 @@
/**
* \def MBEDTLS_SSL_TRUNCATED_HMAC_COMPAT
@@ -1779,7 +1779,7 @@
@@ -1796,7 +1796,7 @@
*
* Comment this to disable run-time checking and save ROM space
*/
@@ -153,7 +153,7 @@
/**
* \def MBEDTLS_X509_ALLOW_EXTENSIONS_NON_V3
@@ -2109,7 +2109,7 @@
@@ -2126,7 +2126,7 @@
* MBEDTLS_TLS_PSK_WITH_CAMELLIA_128_GCM_SHA256
* MBEDTLS_TLS_PSK_WITH_CAMELLIA_128_CBC_SHA256
*/
@@ -162,7 +162,7 @@
/**
* \def MBEDTLS_ARIA_C
@@ -2175,7 +2175,7 @@
@@ -2192,7 +2192,7 @@
* This module enables the AES-CCM ciphersuites, if other requisites are
* enabled as well.
*/
@@ -171,7 +171,7 @@
/**
* \def MBEDTLS_CERTS_C
@@ -2187,7 +2187,7 @@
@@ -2204,7 +2204,7 @@
*
* This module is used for testing (ssl_client/server).
*/
@@ -180,7 +180,7 @@
/**
* \def MBEDTLS_CHACHA20_C
@@ -2295,7 +2295,7 @@
@@ -2312,7 +2312,7 @@
* \warning DES is considered a weak cipher and its use constitutes a
* security risk. We recommend considering stronger ciphers instead.
*/
@@ -189,7 +189,7 @@
/**
* \def MBEDTLS_DHM_C
@@ -2458,7 +2458,7 @@
@@ -2475,7 +2475,7 @@
* This module adds support for the Hashed Message Authentication Code
* (HMAC)-based key derivation function (HKDF).
*/
@@ -198,7 +198,7 @@
/**
* \def MBEDTLS_HMAC_DRBG_C
@@ -2768,7 +2768,7 @@
@@ -2785,7 +2785,7 @@
*
* This module enables abstraction of common (libc) functions.
*/
@@ -207,7 +207,7 @@
/**
* \def MBEDTLS_POLY1305_C
@@ -2789,7 +2789,7 @@
@@ -2806,7 +2806,7 @@
* Caller: library/md.c
*
*/
@@ -216,7 +216,7 @@
/**
* \def MBEDTLS_RSA_C
@@ -2896,7 +2896,7 @@
@@ -2913,7 +2913,7 @@
*
* Requires: MBEDTLS_CIPHER_C
*/
@@ -225,7 +225,7 @@
/**
* \def MBEDTLS_SSL_CLI_C
@@ -2996,7 +2996,7 @@
@@ -3013,7 +3013,7 @@
*
* This module provides run-time version information.
*/
@@ -234,7 +234,7 @@
/**
* \def MBEDTLS_X509_USE_C
@@ -3106,7 +3106,7 @@
@@ -3123,7 +3123,7 @@
* Module: library/xtea.c
* Caller:
*/

View File

@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=openssl
PKG_BASE:=1.1.1
PKG_BUGFIX:=i
PKG_BUGFIX:=n
PKG_VERSION:=$(PKG_BASE)$(PKG_BUGFIX)
PKG_RELEASE:=1
PKG_USE_MIPS16:=0
@@ -19,12 +19,14 @@ PKG_BUILD_PARALLEL:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:= \
http://ftp.fi.muni.cz/pub/openssl/source/ \
http://ftp.linux.hr/pub/openssl/source/ \
ftp://ftp.pca.dfn.de/pub/tools/net/openssl/source/ \
http://www.openssl.org/source/ \
http://www.openssl.org/source/old/$(PKG_BASE)/
PKG_HASH:=e8be6a35fe41d10603c3cc635e93289ed00bf34b79671a3a4de64fcee00d5242
http://www.openssl.org/source/old/$(PKG_BASE)/ \
http://ftp.fi.muni.cz/pub/openssl/source/ \
http://ftp.fi.muni.cz/pub/openssl/source/old/$(PKG_BASE)/ \
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:=40dceb51a4f6a5275bde0e6bf20ef4b91bfc32ed57c0552e2e8e15463372b17a
PKG_LICENSE:=OpenSSL
PKG_LICENSE_FILES:=LICENSE
@@ -333,6 +335,7 @@ define Build/Configure
--prefix=/usr \
--libdir=lib \
--openssldir=/etc/ssl \
--cross-compile-prefix="$(TARGET_CROSS)" \
$(TARGET_CPPFLAGS) \
$(TARGET_LDFLAGS) \
$(OPENSSL_OPTIONS) && \
@@ -345,14 +348,12 @@ TARGET_LDFLAGS += -Wl,--gc-sections
define Build/Compile
+$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \
CROSS_COMPILE="$(TARGET_CROSS)" \
CC="$(TARGET_CC)" \
SOURCE_DATE_EPOCH=$(SOURCE_DATE_EPOCH) \
OPENWRT_OPTIMIZATION_FLAGS="$(TARGET_CFLAGS)" \
$(OPENSSL_MAKEFLAGS) \
all
$(MAKE) -C $(PKG_BUILD_DIR) \
CROSS_COMPILE="$(TARGET_CROSS)" \
CC="$(TARGET_CC)" \
DESTDIR="$(PKG_INSTALL_DIR)" \
$(OPENSSL_MAKEFLAGS) \

Some files were not shown because too many files have changed in this diff Show More