2019-06-04 10:11:33 +02:00
|
|
|
|
2007-05-05 11:45:53 -07:00
|
|
|
|
|
|
|
|
|
2009-01-08 13:32:01 +02:00
|
|
|
|
2017-12-01 13:50:52 +02:00
|
|
|
|
2023-09-25 17:25:09 +02:00
|
|
|
|
2007-05-05 11:45:53 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-07-02 11:05:35 -07:00
|
|
|
|
include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h
percpu.h is included by sched.h and module.h and thus ends up being
included when building most .c files. percpu.h includes slab.h which
in turn includes gfp.h making everything defined by the two files
universally available and complicating inclusion dependencies.
percpu.h -> slab.h dependency is about to be removed. Prepare for
this change by updating users of gfp and slab facilities include those
headers directly instead of assuming availability. As this conversion
needs to touch large number of source files, the following script is
used as the basis of conversion.
http://userweb.kernel.org/~tj/misc/slabh-sweep.py
The script does the followings.
* Scan files for gfp and slab usages and update includes such that
only the necessary includes are there. ie. if only gfp is used,
gfp.h, if slab is used, slab.h.
* When the script inserts a new include, it looks at the include
blocks and try to put the new include such that its order conforms
to its surrounding. It's put in the include block which contains
core kernel includes, in the same order that the rest are ordered -
alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
doesn't seem to be any matching order.
* If the script can't find a place to put a new include (mostly
because the file doesn't have fitting include block), it prints out
an error message indicating which .h file needs to be added to the
file.
The conversion was done in the following steps.
1. The initial automatic conversion of all .c files updated slightly
over 4000 files, deleting around 700 includes and adding ~480 gfp.h
and ~3000 slab.h inclusions. The script emitted errors for ~400
files.
2. Each error was manually checked. Some didn't need the inclusion,
some needed manual addition while adding it to implementation .h or
embedding .c file was more appropriate for others. This step added
inclusions to around 150 files.
3. The script was run again and the output was compared to the edits
from #2 to make sure no file was left behind.
4. Several build tests were done and a couple of problems were fixed.
e.g. lib/decompress_*.c used malloc/free() wrappers around slab
APIs requiring slab.h to be added manually.
5. The script was run on all .h files but without automatically
editing them as sprinkling gfp.h and slab.h inclusions around .h
files could easily lead to inclusion dependency hell. Most gfp.h
inclusion directives were ignored as stuff from gfp.h was usually
wildly available and often used in preprocessor macros. Each
slab.h inclusion directive was examined and added manually as
necessary.
6. percpu.h was updated not to include slab.h.
7. Build test were done on the following configurations and failures
were fixed. CONFIG_GCOV_KERNEL was turned off for all tests (as my
distributed build env didn't work with gcov compiles) and a few
more options had to be turned off depending on archs to make things
build (like ipr on powerpc/64 which failed due to missing writeq).
* x86 and x86_64 UP and SMP allmodconfig and a custom test config.
* powerpc and powerpc64 SMP allmodconfig
* sparc and sparc64 SMP allmodconfig
* ia64 SMP allmodconfig
* s390 SMP allmodconfig
* alpha SMP allmodconfig
* um on x86_64 SMP allmodconfig
8. percpu.h modifications were reverted so that it could be applied as
a separate patch and serve as bisection point.
Given the fact that I had only a couple of failures from tests on step
6, I'm fairly confident about the coverage of this conversion patch.
If there is a breakage, it's likely to be something in one of the arch
headers which should be easily discoverable easily on most builds of
the specific arch.
Signed-off-by: Tejun Heo <tj@kernel.org>
Guess-its-ok-by: Christoph Lameter <cl@linux-foundation.org>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
2010-03-24 17:04:11 +09:00
|
|
|
|
2024-10-01 15:35:57 -04:00
|
|
|
|
2007-05-05 11:45:53 -07:00
|
|
|
|
2011-07-06 21:59:39 +02:00
|
|
|
|
2023-08-23 18:32:25 +08:00
|
|
|
|
2007-08-28 17:01:53 -04:00
|
|
|
|
2007-05-05 11:45:53 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-01-08 13:32:01 +02:00
|
|
|
|
2015-01-24 19:52:09 +02:00
|
|
|
|
2015-01-24 19:52:06 +02:00
|
|
|
|
2007-05-05 11:45:53 -07:00
|
|
|
|
|
|
|
|
|
2008-01-31 19:48:20 +01:00
|
|
|
|
2008-02-25 16:27:43 +01:00
|
|
|
|
2007-05-05 11:45:53 -07:00
|
|
|
|
2011-02-03 18:34:28 +02:00
|
|
|
|
2007-05-05 11:45:53 -07:00
|
|
|
|
2008-07-02 11:05:35 -07:00
|
|
|
|
|
|
|
|
|
2007-05-05 11:45:53 -07:00
|
|
|
|
2010-01-17 01:47:58 +01:00
|
|
|
|
2008-05-29 10:38:53 +02:00
|
|
|
|
2007-05-05 11:45:53 -07:00
|
|
|
|
2008-07-02 16:30:52 -07:00
|
|
|
|
2010-08-10 09:46:38 +02:00
|
|
|
|
|
|
|
|
|
2008-01-31 19:48:20 +01:00
|
|
|
|
2007-05-05 11:45:53 -07:00
|
|
|
|
2008-07-02 11:05:35 -07:00
|
|
|
|
|
|
|
|
|
2008-01-31 19:48:20 +01:00
|
|
|
|
2007-05-05 11:45:53 -07:00
|
|
|
|
2008-07-02 11:05:35 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-02-03 18:35:19 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-01-17 01:47:58 +01:00
|
|
|
|
2011-10-07 14:01:25 +02:00
|
|
|
|
2016-10-18 23:12:11 +03:00
|
|
|
|
2017-12-01 13:50:52 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-01-31 19:48:20 +01:00
|
|
|
|
2007-05-05 11:45:53 -07:00
|
|
|
|
|
|
|
|
|
2008-05-29 10:38:53 +02:00
|
|
|
|
2010-01-17 01:47:58 +01:00
|
|
|
|
2013-05-08 13:09:08 +02:00
|
|
|
|
2008-05-29 10:38:53 +02:00
|
|
|
|
2014-09-08 11:22:42 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-05-29 10:38:53 +02:00
|
|
|
|
2007-05-05 11:45:53 -07:00
|
|
|
|
|
|
|
|
|
2017-12-01 13:50:52 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-07-02 11:05:35 -07:00
|
|
|
|
2011-02-03 18:35:19 +02:00
|
|
|
|
|
|
|
|
|
2007-05-05 11:45:53 -07:00
|
|
|
|
2008-01-31 19:48:20 +01:00
|
|
|
|
2007-05-05 11:45:53 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-01-31 19:48:20 +01:00
|
|
|
|
2008-02-25 16:27:43 +01:00
|
|
|
|
2007-05-05 11:45:53 -07:00
|
|
|
|
2011-02-03 18:34:28 +02:00
|
|
|
|
2007-05-05 11:45:53 -07:00
|
|
|
|
2008-07-02 11:05:35 -07:00
|
|
|
|
2007-05-05 11:45:53 -07:00
|
|
|
|
|
|
|
|
|
2009-11-16 13:58:20 +01:00
|
|
|
|
|
|
|
|
|
2007-05-05 11:45:53 -07:00
|
|
|
|
2011-04-30 15:24:30 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-01-31 19:48:20 +01:00
|
|
|
|
2007-05-05 11:45:53 -07:00
|
|
|
|
2011-04-30 15:24:30 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-12-04 19:47:42 +05:30
|
|
|
|
2011-04-30 15:24:30 +02:00
|
|
|
|
2012-10-02 21:34:23 +02:00
|
|
|
|
|
|
|
|
|
2011-04-30 15:24:30 +02:00
|
|
|
|
|
|
|
|
|
2008-01-31 19:48:20 +01:00
|
|
|
|
2011-04-30 15:24:30 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-01-07 13:09:38 +02:00
|
|
|
|
2011-04-30 15:24:30 +02:00
|
|
|
|
2023-09-25 17:25:09 +02:00
|
|
|
|
2011-04-30 15:24:30 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-05-05 11:45:53 -07:00
|
|
|
|
2008-07-02 11:05:35 -07:00
|
|
|
|
|
|
|
|
|
2023-09-25 17:25:09 +02:00
|
|
|
|
2007-05-05 11:45:53 -07:00
|
|
|
|
2012-03-12 13:49:14 +01:00
|
|
|
|
2023-09-25 17:25:09 +02:00
|
|
|
|
2012-03-12 13:49:14 +01:00
|
|
|
|
|
|
|
|
|
2008-07-02 11:05:35 -07:00
|
|
|
|
|
|
|
|
|
2011-02-03 18:34:28 +02:00
|
|
|
|
2008-07-02 11:05:35 -07:00
|
|
|
|
2017-06-10 04:59:12 +02:00
|
|
|
|
2011-04-30 15:24:30 +02:00
|
|
|
|
2007-05-05 11:45:53 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-04-30 15:24:30 +02:00
|
|
|
|
2007-09-26 15:19:45 +02:00
|
|
|
|
2021-05-11 20:02:48 +02:00
|
|
|
|
|
|
|
|
|
2007-09-26 15:19:45 +02:00
|
|
|
|
2008-01-31 19:48:20 +01:00
|
|
|
|
2011-04-30 15:24:30 +02:00
|
|
|
|
|
|
|
|
|
2012-12-04 19:47:42 +05:30
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-06-23 00:00:24 +03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-10-14 18:40:10 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-09-25 17:25:09 +02:00
|
|
|
|
2007-05-05 11:45:53 -07:00
|
|
|
|
|
|
|
|
|
2008-05-15 12:55:29 +02:00
|
|
|
|
2007-05-05 11:45:53 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-05-15 12:55:29 +02:00
|
|
|
|
2008-06-11 14:21:58 -07:00
|
|
|
|
|
|
|
|
|
2016-02-14 13:56:35 +02:00
|
|
|
|
2007-05-05 11:45:53 -07:00
|
|
|
|
|
|
|
|
|
2010-01-17 01:47:58 +01:00
|
|
|
|
2012-05-09 08:11:20 +03:00
|
|
|
|
|
|
|
|
|
2010-01-17 01:47:58 +01:00
|
|
|
|
2008-05-29 10:38:53 +02:00
|
|
|
|
2008-05-15 12:55:29 +02:00
|
|
|
|
|
|
|
|
|
2008-06-11 14:21:58 -07:00
|
|
|
|
2007-05-05 11:45:53 -07:00
|
|
|
|
|
|
|
|
|
2010-01-17 01:47:58 +01:00
|
|
|
|
2008-05-29 10:38:53 +02:00
|
|
|
|
2007-08-28 17:01:55 -04:00
|
|
|
|
2013-05-08 13:09:08 +02:00
|
|
|
|
2007-08-28 17:01:54 -04:00
|
|
|
|
2008-05-29 10:38:53 +02:00
|
|
|
|
2013-05-08 13:09:08 +02:00
|
|
|
|
2008-05-29 10:38:53 +02:00
|
|
|
|
2007-05-05 11:45:53 -07:00
|
|
|
|
2013-05-08 13:09:08 +02:00
|
|
|
|
|
|
|
|
|
2007-05-05 11:45:53 -07:00
|
|
|
|
|
|
|
|
|
2012-05-09 08:11:20 +03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-05-05 11:45:53 -07:00
|
|
|
|
2016-02-14 13:56:35 +02:00
|
|
|
|
|
|
|
|
|
2007-05-05 11:45:53 -07:00
|
|
|
|
2010-01-17 01:47:58 +01:00
|
|
|
|
|
|
|
|
|
2007-05-05 11:45:53 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-05-08 13:09:08 +02:00
|
|
|
|
2007-05-05 11:45:53 -07:00
|
|
|
|
2019-06-12 18:19:54 +02:00
|
|
|
|
mac80211: fix TKIP races, make API easier to use
Our current TKIP code races against itself on TX
since we can process multiple packets at the same
time on different ACs, but they all share the TX
context for TKIP. This can lead to bad IVs etc.
Also, the crypto offload helper code just obtains
the P1K/P2K from the cache, and can update it as
well, but there's no guarantee that packets are
really processed in order.
To fix these issues, first introduce a spinlock
that will protect the IV16/IV32 values in the TX
context. This first step makes sure that we don't
assign the same IV multiple times or get confused
in other ways.
Secondly, change the way the P1K cache works. I
add a field "p1k_iv32" that stores the value of
the IV32 when the P1K was last recomputed, and
if different from the last time, then a new P1K
is recomputed. This can cause the P1K computation
to flip back and forth if packets are processed
out of order. All this also happens under the new
spinlock.
Finally, because there are argument differences,
split up the ieee80211_get_tkip_key() API into
ieee80211_get_tkip_p1k() and ieee80211_get_tkip_p2k()
and give them the correct arguments.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-07-07 22:28:01 +02:00
|
|
|
|
2007-05-05 11:45:53 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-01-31 19:48:20 +01:00
|
|
|
|
2008-02-25 16:27:43 +01:00
|
|
|
|
2007-05-05 11:45:53 -07:00
|
|
|
|
2011-11-16 15:28:55 +01:00
|
|
|
|
2007-05-05 11:45:53 -07:00
|
|
|
|
2008-02-25 16:27:43 +01:00
|
|
|
|
2007-05-05 11:45:53 -07:00
|
|
|
|
2011-11-16 15:28:55 +01:00
|
|
|
|
2009-03-23 17:28:35 +01:00
|
|
|
|
|
|
|
|
|
2011-11-16 15:28:55 +01:00
|
|
|
|
2007-05-05 11:45:53 -07:00
|
|
|
|
2008-01-31 19:48:20 +01:00
|
|
|
|
2007-05-05 11:45:53 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-01-31 19:48:20 +01:00
|
|
|
|
2008-02-25 16:27:43 +01:00
|
|
|
|
2007-05-05 11:45:53 -07:00
|
|
|
|
|
|
|
|
|
2011-02-03 18:34:28 +02:00
|
|
|
|
2007-05-05 11:45:53 -07:00
|
|
|
|
|
|
|
|
|
2009-11-16 13:58:20 +01:00
|
|
|
|
2007-05-05 11:45:53 -07:00
|
|
|
|
2008-06-11 14:21:58 -07:00
|
|
|
|
2007-05-05 11:45:53 -07:00
|
|
|
|
2008-07-02 16:30:52 -07:00
|
|
|
|
2008-01-31 19:48:20 +01:00
|
|
|
|
2007-05-05 11:45:53 -07:00
|
|
|
|
|
|
|
|
|
2023-09-25 17:25:09 +02:00
|
|
|
|
2007-05-05 11:45:53 -07:00
|
|
|
|
2012-03-12 13:49:14 +01:00
|
|
|
|
|
|
|
|
|
2023-09-25 17:25:09 +02:00
|
|
|
|
2012-03-12 13:49:14 +01:00
|
|
|
|
|
|
|
|
|
2010-08-10 09:46:40 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-05-05 11:45:53 -07:00
|
|
|
|
|
|
|
|
|
2019-06-12 18:19:54 +02:00
|
|
|
|
2007-05-05 11:45:53 -07:00
|
|
|
|
2008-09-11 00:02:02 +02:00
|
|
|
|
2011-07-07 18:45:03 +02:00
|
|
|
|
2021-05-11 20:02:48 +02:00
|
|
|
|
|
|
|
|
|
2011-02-03 18:34:28 +02:00
|
|
|
|
2023-09-25 17:25:09 +02:00
|
|
|
|
2007-05-05 11:45:53 -07:00
|
|
|
|
|
|
|
|
|
2016-11-21 16:58:40 +02:00
|
|
|
|
|
|
|
|
|
2007-05-05 11:45:53 -07:00
|
|
|
|
|
|
|
|
|
2013-05-08 13:09:08 +02:00
|
|
|
|
|
|
|
|
|
2007-05-05 11:45:53 -07:00
|
|
|
|
2008-01-31 19:48:20 +01:00
|
|
|
|
2007-05-05 11:45:53 -07:00
|
|
|
|
|
|
|
|
|
2022-05-06 10:51:52 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
wifi: mac80211: Fix AAD/Nonce computation for management frames with MLO
Per IEEE Std 802.11be-2024, 12.5.2.3.3, if the MPDU is an
individually addressed Data frame between an AP MLD and a
non-AP MLD associated with the AP MLD, then A1/A2/A3
will be MLD MAC addresses. Otherwise, Al/A2/A3 will be
over-the-air link MAC addresses.
Currently, during AAD and Nonce computation for software based
encryption/decryption cases, mac80211 directly uses the addresses it
receives in the skb frame header. However, after the first
authentication, management frame addresses for non-AP MLD stations
are translated to MLD addresses from over the air link addresses in
software. This means that the skb header could contain translated MLD
addresses, which when used as is, can lead to incorrect AAD/Nonce
computation.
In the following manner, ensure that the right set of addresses are used:
In the receive path, stash the pre-translated link addresses in
ieee80211_rx_data and use them for the AAD/Nonce computations
when required.
In the transmit path, offload the encryption for a CCMP/GCMP key
to the hwsim driver that can then ensure that encryption and hence
the AAD/Nonce computations are performed on the frame containing the
right set of addresses, i.e, MLD addresses if unicast data frame and
link addresses otherwise.
To do so, register the set key handler in hwsim driver so mac80211 is
aware that it is the driver that would take care of encrypting the
frame. Offload encryption for a CCMP/GCMP key, while keeping the
encryption for WEP/TKIP and MMIE generation for a AES_CMAC or a
AES_GMAC key still at the SW crypto in mac layer
Co-developed-by: Rohan Dutta <quic_drohan@quicinc.com>
Signed-off-by: Rohan Dutta <quic_drohan@quicinc.com>
Signed-off-by: Sai Pratyusha Magam <sai.magam@oss.qualcomm.com>
Link: https://patch.msgid.link/20260226042959.3766157-1-sai.magam@oss.qualcomm.com
[only store and apply link_addrs for unicast non-data
rather storing always and applying for !unicast_data]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2026-02-26 09:59:59 +05:30
|
|
|
|
|
|
|
|
|
2007-05-05 11:45:53 -07:00
|
|
|
|
2022-05-06 10:51:52 +02:00
|
|
|
|
2008-07-02 11:05:35 -07:00
|
|
|
|
2009-01-08 13:32:00 +02:00
|
|
|
|
2008-07-02 11:05:35 -07:00
|
|
|
|
2022-03-24 08:48:16 +08:00
|
|
|
|
2007-05-05 11:45:53 -07:00
|
|
|
|
2008-07-02 11:05:35 -07:00
|
|
|
|
2009-01-08 13:32:00 +02:00
|
|
|
|
2022-03-24 08:48:16 +08:00
|
|
|
|
2008-07-02 11:05:35 -07:00
|
|
|
|
2009-01-08 13:32:00 +02:00
|
|
|
|
2008-07-02 11:05:35 -07:00
|
|
|
|
2009-01-08 13:32:00 +02:00
|
|
|
|
2008-07-02 11:05:35 -07:00
|
|
|
|
2009-01-08 13:32:00 +02:00
|
|
|
|
|
|
|
|
|
2008-07-02 11:05:35 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-03-24 08:48:16 +08:00
|
|
|
|
|
|
|
|
|
2008-07-02 11:05:35 -07:00
|
|
|
|
2022-03-24 08:48:16 +08:00
|
|
|
|
2024-01-02 21:35:40 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-03-24 08:48:16 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-07-02 11:05:35 -07:00
|
|
|
|
2022-03-24 08:48:16 +08:00
|
|
|
|
2008-07-02 11:05:35 -07:00
|
|
|
|
2007-05-05 11:45:53 -07:00
|
|
|
|
|
|
|
|
|
2008-07-02 11:05:35 -07:00
|
|
|
|
|
|
|
|
|
wifi: mac80211: Fix AAD/Nonce computation for management frames with MLO
Per IEEE Std 802.11be-2024, 12.5.2.3.3, if the MPDU is an
individually addressed Data frame between an AP MLD and a
non-AP MLD associated with the AP MLD, then A1/A2/A3
will be MLD MAC addresses. Otherwise, Al/A2/A3 will be
over-the-air link MAC addresses.
Currently, during AAD and Nonce computation for software based
encryption/decryption cases, mac80211 directly uses the addresses it
receives in the skb frame header. However, after the first
authentication, management frame addresses for non-AP MLD stations
are translated to MLD addresses from over the air link addresses in
software. This means that the skb header could contain translated MLD
addresses, which when used as is, can lead to incorrect AAD/Nonce
computation.
In the following manner, ensure that the right set of addresses are used:
In the receive path, stash the pre-translated link addresses in
ieee80211_rx_data and use them for the AAD/Nonce computations
when required.
In the transmit path, offload the encryption for a CCMP/GCMP key
to the hwsim driver that can then ensure that encryption and hence
the AAD/Nonce computations are performed on the frame containing the
right set of addresses, i.e, MLD addresses if unicast data frame and
link addresses otherwise.
To do so, register the set key handler in hwsim driver so mac80211 is
aware that it is the driver that would take care of encrypting the
frame. Offload encryption for a CCMP/GCMP key, while keeping the
encryption for WEP/TKIP and MMIE generation for a AES_CMAC or a
AES_GMAC key still at the SW crypto in mac layer
Co-developed-by: Rohan Dutta <quic_drohan@quicinc.com>
Signed-off-by: Rohan Dutta <quic_drohan@quicinc.com>
Signed-off-by: Sai Pratyusha Magam <sai.magam@oss.qualcomm.com>
Link: https://patch.msgid.link/20260226042959.3766157-1-sai.magam@oss.qualcomm.com
[only store and apply link_addrs for unicast non-data
rather storing always and applying for !unicast_data]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2026-02-26 09:59:59 +05:30
|
|
|
|
|
|
|
|
|
2007-05-05 11:45:53 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-07-02 11:05:35 -07:00
|
|
|
|
2007-05-05 11:45:53 -07:00
|
|
|
|
2008-07-02 11:05:34 -07:00
|
|
|
|
2008-07-02 11:05:35 -07:00
|
|
|
|
2007-05-05 11:45:53 -07:00
|
|
|
|
2008-07-02 11:05:35 -07:00
|
|
|
|
2008-07-02 11:05:34 -07:00
|
|
|
|
2008-07-02 11:05:35 -07:00
|
|
|
|
2007-05-05 11:45:53 -07:00
|
|
|
|
2022-05-06 10:51:52 +02:00
|
|
|
|
|
|
|
|
|
2007-05-05 11:45:53 -07:00
|
|
|
|
|
|
|
|
|
2024-01-02 21:35:40 +02:00
|
|
|
|
wifi: mac80211: Fix AAD/Nonce computation for management frames with MLO
Per IEEE Std 802.11be-2024, 12.5.2.3.3, if the MPDU is an
individually addressed Data frame between an AP MLD and a
non-AP MLD associated with the AP MLD, then A1/A2/A3
will be MLD MAC addresses. Otherwise, Al/A2/A3 will be
over-the-air link MAC addresses.
Currently, during AAD and Nonce computation for software based
encryption/decryption cases, mac80211 directly uses the addresses it
receives in the skb frame header. However, after the first
authentication, management frame addresses for non-AP MLD stations
are translated to MLD addresses from over the air link addresses in
software. This means that the skb header could contain translated MLD
addresses, which when used as is, can lead to incorrect AAD/Nonce
computation.
In the following manner, ensure that the right set of addresses are used:
In the receive path, stash the pre-translated link addresses in
ieee80211_rx_data and use them for the AAD/Nonce computations
when required.
In the transmit path, offload the encryption for a CCMP/GCMP key
to the hwsim driver that can then ensure that encryption and hence
the AAD/Nonce computations are performed on the frame containing the
right set of addresses, i.e, MLD addresses if unicast data frame and
link addresses otherwise.
To do so, register the set key handler in hwsim driver so mac80211 is
aware that it is the driver that would take care of encrypting the
frame. Offload encryption for a CCMP/GCMP key, while keeping the
encryption for WEP/TKIP and MMIE generation for a AES_CMAC or a
AES_GMAC key still at the SW crypto in mac layer
Co-developed-by: Rohan Dutta <quic_drohan@quicinc.com>
Signed-off-by: Rohan Dutta <quic_drohan@quicinc.com>
Signed-off-by: Sai Pratyusha Magam <sai.magam@oss.qualcomm.com>
Link: https://patch.msgid.link/20260226042959.3766157-1-sai.magam@oss.qualcomm.com
[only store and apply link_addrs for unicast non-data
rather storing always and applying for !unicast_data]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2026-02-26 09:59:59 +05:30
|
|
|
|
2022-05-06 10:51:52 +02:00
|
|
|
|
|
|
|
|
|
wifi: mac80211: Fix AAD/Nonce computation for management frames with MLO
Per IEEE Std 802.11be-2024, 12.5.2.3.3, if the MPDU is an
individually addressed Data frame between an AP MLD and a
non-AP MLD associated with the AP MLD, then A1/A2/A3
will be MLD MAC addresses. Otherwise, Al/A2/A3 will be
over-the-air link MAC addresses.
Currently, during AAD and Nonce computation for software based
encryption/decryption cases, mac80211 directly uses the addresses it
receives in the skb frame header. However, after the first
authentication, management frame addresses for non-AP MLD stations
are translated to MLD addresses from over the air link addresses in
software. This means that the skb header could contain translated MLD
addresses, which when used as is, can lead to incorrect AAD/Nonce
computation.
In the following manner, ensure that the right set of addresses are used:
In the receive path, stash the pre-translated link addresses in
ieee80211_rx_data and use them for the AAD/Nonce computations
when required.
In the transmit path, offload the encryption for a CCMP/GCMP key
to the hwsim driver that can then ensure that encryption and hence
the AAD/Nonce computations are performed on the frame containing the
right set of addresses, i.e, MLD addresses if unicast data frame and
link addresses otherwise.
To do so, register the set key handler in hwsim driver so mac80211 is
aware that it is the driver that would take care of encrypting the
frame. Offload encryption for a CCMP/GCMP key, while keeping the
encryption for WEP/TKIP and MMIE generation for a AES_CMAC or a
AES_GMAC key still at the SW crypto in mac layer
Co-developed-by: Rohan Dutta <quic_drohan@quicinc.com>
Signed-off-by: Rohan Dutta <quic_drohan@quicinc.com>
Signed-off-by: Sai Pratyusha Magam <sai.magam@oss.qualcomm.com>
Link: https://patch.msgid.link/20260226042959.3766157-1-sai.magam@oss.qualcomm.com
[only store and apply link_addrs for unicast non-data
rather storing always and applying for !unicast_data]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2026-02-26 09:59:59 +05:30
|
|
|
|
2022-05-06 10:51:52 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
wifi: mac80211: Fix AAD/Nonce computation for management frames with MLO
Per IEEE Std 802.11be-2024, 12.5.2.3.3, if the MPDU is an
individually addressed Data frame between an AP MLD and a
non-AP MLD associated with the AP MLD, then A1/A2/A3
will be MLD MAC addresses. Otherwise, Al/A2/A3 will be
over-the-air link MAC addresses.
Currently, during AAD and Nonce computation for software based
encryption/decryption cases, mac80211 directly uses the addresses it
receives in the skb frame header. However, after the first
authentication, management frame addresses for non-AP MLD stations
are translated to MLD addresses from over the air link addresses in
software. This means that the skb header could contain translated MLD
addresses, which when used as is, can lead to incorrect AAD/Nonce
computation.
In the following manner, ensure that the right set of addresses are used:
In the receive path, stash the pre-translated link addresses in
ieee80211_rx_data and use them for the AAD/Nonce computations
when required.
In the transmit path, offload the encryption for a CCMP/GCMP key
to the hwsim driver that can then ensure that encryption and hence
the AAD/Nonce computations are performed on the frame containing the
right set of addresses, i.e, MLD addresses if unicast data frame and
link addresses otherwise.
To do so, register the set key handler in hwsim driver so mac80211 is
aware that it is the driver that would take care of encrypting the
frame. Offload encryption for a CCMP/GCMP key, while keeping the
encryption for WEP/TKIP and MMIE generation for a AES_CMAC or a
AES_GMAC key still at the SW crypto in mac layer
Co-developed-by: Rohan Dutta <quic_drohan@quicinc.com>
Signed-off-by: Rohan Dutta <quic_drohan@quicinc.com>
Signed-off-by: Sai Pratyusha Magam <sai.magam@oss.qualcomm.com>
Link: https://patch.msgid.link/20260226042959.3766157-1-sai.magam@oss.qualcomm.com
[only store and apply link_addrs for unicast non-data
rather storing always and applying for !unicast_data]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2026-02-26 09:59:59 +05:30
|
|
|
|
|
|
|
|
|
2022-05-06 10:51:52 +02:00
|
|
|
|
|
|
|
|
|
2007-05-05 11:45:53 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-10-07 12:04:32 +02:00
|
|
|
|
2007-05-05 11:45:53 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-01-24 19:52:07 +02:00
|
|
|
|
|
|
|
|
|
2007-05-05 11:45:53 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-05-15 12:55:29 +02:00
|
|
|
|
2008-05-29 10:38:53 +02:00
|
|
|
|
2011-07-06 21:59:39 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-10-17 15:05:33 +01:00
|
|
|
|
2013-10-10 09:55:20 +02:00
|
|
|
|
2009-01-08 13:32:10 +02:00
|
|
|
|
2010-01-17 01:47:58 +01:00
|
|
|
|
2011-10-23 08:21:41 +02:00
|
|
|
|
2014-04-14 11:27:21 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-01-17 01:47:58 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-05-29 10:38:53 +02:00
|
|
|
|
2008-05-15 12:55:29 +02:00
|
|
|
|
|
|
|
|
|
2008-06-11 14:21:58 -07:00
|
|
|
|
2007-05-05 11:45:53 -07:00
|
|
|
|
|
|
|
|
|
2010-01-17 01:47:58 +01:00
|
|
|
|
2008-05-29 10:38:53 +02:00
|
|
|
|
2007-08-28 17:01:55 -04:00
|
|
|
|
2015-01-24 19:52:07 +02:00
|
|
|
|
2007-05-05 11:45:53 -07:00
|
|
|
|
2008-05-29 10:38:53 +02:00
|
|
|
|
2013-05-08 13:09:08 +02:00
|
|
|
|
2008-05-29 10:38:53 +02:00
|
|
|
|
2007-05-05 11:45:53 -07:00
|
|
|
|
2013-05-08 13:09:08 +02:00
|
|
|
|
|
|
|
|
|
2011-10-23 08:21:41 +02:00
|
|
|
|
|
|
|
|
|
2011-11-10 09:35:13 +02:00
|
|
|
|
|
|
|
|
|
2011-10-23 08:21:41 +02:00
|
|
|
|
|
|
|
|
|
2007-05-05 11:45:53 -07:00
|
|
|
|
|
|
|
|
|
2015-06-01 15:36:51 +02:00
|
|
|
|
2007-05-05 11:45:53 -07:00
|
|
|
|
2011-07-06 21:59:39 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-05-05 11:45:53 -07:00
|
|
|
|
2007-08-28 17:01:54 -04:00
|
|
|
|
2007-05-05 11:45:53 -07:00
|
|
|
|
2010-01-17 01:47:58 +01:00
|
|
|
|
|
|
|
|
|
2007-05-05 11:45:53 -07:00
|
|
|
|
|
|
|
|
|
2013-05-08 13:09:08 +02:00
|
|
|
|
2024-01-02 21:35:40 +02:00
|
|
|
|
wifi: mac80211: Fix AAD/Nonce computation for management frames with MLO
Per IEEE Std 802.11be-2024, 12.5.2.3.3, if the MPDU is an
individually addressed Data frame between an AP MLD and a
non-AP MLD associated with the AP MLD, then A1/A2/A3
will be MLD MAC addresses. Otherwise, Al/A2/A3 will be
over-the-air link MAC addresses.
Currently, during AAD and Nonce computation for software based
encryption/decryption cases, mac80211 directly uses the addresses it
receives in the skb frame header. However, after the first
authentication, management frame addresses for non-AP MLD stations
are translated to MLD addresses from over the air link addresses in
software. This means that the skb header could contain translated MLD
addresses, which when used as is, can lead to incorrect AAD/Nonce
computation.
In the following manner, ensure that the right set of addresses are used:
In the receive path, stash the pre-translated link addresses in
ieee80211_rx_data and use them for the AAD/Nonce computations
when required.
In the transmit path, offload the encryption for a CCMP/GCMP key
to the hwsim driver that can then ensure that encryption and hence
the AAD/Nonce computations are performed on the frame containing the
right set of addresses, i.e, MLD addresses if unicast data frame and
link addresses otherwise.
To do so, register the set key handler in hwsim driver so mac80211 is
aware that it is the driver that would take care of encrypting the
frame. Offload encryption for a CCMP/GCMP key, while keeping the
encryption for WEP/TKIP and MMIE generation for a AES_CMAC or a
AES_GMAC key still at the SW crypto in mac layer
Co-developed-by: Rohan Dutta <quic_drohan@quicinc.com>
Signed-off-by: Rohan Dutta <quic_drohan@quicinc.com>
Signed-off-by: Sai Pratyusha Magam <sai.magam@oss.qualcomm.com>
Link: https://patch.msgid.link/20260226042959.3766157-1-sai.magam@oss.qualcomm.com
[only store and apply link_addrs for unicast non-data
rather storing always and applying for !unicast_data]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2026-02-26 09:59:59 +05:30
|
|
|
|
|
|
|
|
|
2016-10-17 15:05:33 +01:00
|
|
|
|
2017-10-10 22:31:49 -04:00
|
|
|
|
2007-05-05 11:45:53 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-01-31 19:48:20 +01:00
|
|
|
|
2015-01-24 19:52:07 +02:00
|
|
|
|
|
|
|
|
|
2007-05-05 11:45:53 -07:00
|
|
|
|
2011-11-16 15:28:55 +01:00
|
|
|
|
2007-05-05 11:45:53 -07:00
|
|
|
|
2008-02-25 16:27:43 +01:00
|
|
|
|
2007-05-05 11:45:53 -07:00
|
|
|
|
2011-11-16 15:28:55 +01:00
|
|
|
|
2015-01-24 19:52:07 +02:00
|
|
|
|
2009-03-23 17:28:35 +01:00
|
|
|
|
2011-11-16 15:28:55 +01:00
|
|
|
|
2007-05-05 11:45:53 -07:00
|
|
|
|
2008-01-31 19:48:20 +01:00
|
|
|
|
2007-05-05 11:45:53 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-01-31 19:48:20 +01:00
|
|
|
|
2015-01-24 19:52:07 +02:00
|
|
|
|
|
|
|
|
|
2007-05-05 11:45:53 -07:00
|
|
|
|
2008-07-02 16:30:52 -07:00
|
|
|
|
2007-05-05 11:45:53 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-11-16 13:58:20 +01:00
|
|
|
|
2013-05-08 13:09:08 +02:00
|
|
|
|
2007-05-05 11:45:53 -07:00
|
|
|
|
2010-06-11 10:27:33 -07:00
|
|
|
|
2007-05-05 11:45:53 -07:00
|
|
|
|
2008-06-11 14:21:58 -07:00
|
|
|
|
2007-05-05 11:45:53 -07:00
|
|
|
|
2009-01-08 13:32:00 +02:00
|
|
|
|
2026-01-14 16:48:59 +05:30
|
|
|
|
|
|
|
|
|
2008-01-31 19:48:20 +01:00
|
|
|
|
2007-05-05 11:45:53 -07:00
|
|
|
|
2012-03-12 13:49:14 +01:00
|
|
|
|
2013-05-08 13:09:08 +02:00
|
|
|
|
2023-09-25 17:25:09 +02:00
|
|
|
|
2016-02-24 11:49:45 +02:00
|
|
|
|
|
|
|
|
|
2012-03-12 13:49:14 +01:00
|
|
|
|
|
|
|
|
|
2023-09-25 17:25:09 +02:00
|
|
|
|
2012-03-12 13:49:14 +01:00
|
|
|
|
|
|
|
|
|
2021-09-27 11:58:39 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-02-24 11:49:45 +02:00
|
|
|
|
|
|
|
|
|
2023-09-25 17:25:09 +02:00
|
|
|
|
2016-02-24 11:49:45 +02:00
|
|
|
|
2015-06-12 14:39:02 +02:00
|
|
|
|
2016-05-03 15:59:44 +03:00
|
|
|
|
|
|
|
|
|
2015-06-12 14:39:02 +02:00
|
|
|
|
2007-05-05 11:45:53 -07:00
|
|
|
|
2015-06-12 14:39:02 +02:00
|
|
|
|
2010-06-11 10:27:33 -07:00
|
|
|
|
2016-05-03 15:59:44 +03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-06-12 14:39:02 +02:00
|
|
|
|
2023-04-19 14:52:54 +02:00
|
|
|
|
2015-06-12 14:39:02 +02:00
|
|
|
|
2007-05-05 11:45:53 -07:00
|
|
|
|
2015-06-12 14:39:02 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
wifi: mac80211: Fix AAD/Nonce computation for management frames with MLO
Per IEEE Std 802.11be-2024, 12.5.2.3.3, if the MPDU is an
individually addressed Data frame between an AP MLD and a
non-AP MLD associated with the AP MLD, then A1/A2/A3
will be MLD MAC addresses. Otherwise, Al/A2/A3 will be
over-the-air link MAC addresses.
Currently, during AAD and Nonce computation for software based
encryption/decryption cases, mac80211 directly uses the addresses it
receives in the skb frame header. However, after the first
authentication, management frame addresses for non-AP MLD stations
are translated to MLD addresses from over the air link addresses in
software. This means that the skb header could contain translated MLD
addresses, which when used as is, can lead to incorrect AAD/Nonce
computation.
In the following manner, ensure that the right set of addresses are used:
In the receive path, stash the pre-translated link addresses in
ieee80211_rx_data and use them for the AAD/Nonce computations
when required.
In the transmit path, offload the encryption for a CCMP/GCMP key
to the hwsim driver that can then ensure that encryption and hence
the AAD/Nonce computations are performed on the frame containing the
right set of addresses, i.e, MLD addresses if unicast data frame and
link addresses otherwise.
To do so, register the set key handler in hwsim driver so mac80211 is
aware that it is the driver that would take care of encrypting the
frame. Offload encryption for a CCMP/GCMP key, while keeping the
encryption for WEP/TKIP and MMIE generation for a AES_CMAC or a
AES_GMAC key still at the SW crypto in mac layer
Co-developed-by: Rohan Dutta <quic_drohan@quicinc.com>
Signed-off-by: Rohan Dutta <quic_drohan@quicinc.com>
Signed-off-by: Sai Pratyusha Magam <sai.magam@oss.qualcomm.com>
Link: https://patch.msgid.link/20260226042959.3766157-1-sai.magam@oss.qualcomm.com
[only store and apply link_addrs for unicast non-data
rather storing always and applying for !unicast_data]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2026-02-26 09:59:59 +05:30
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-06-12 14:39:02 +02:00
|
|
|
|
2024-01-02 21:35:40 +02:00
|
|
|
|
wifi: mac80211: Fix AAD/Nonce computation for management frames with MLO
Per IEEE Std 802.11be-2024, 12.5.2.3.3, if the MPDU is an
individually addressed Data frame between an AP MLD and a
non-AP MLD associated with the AP MLD, then A1/A2/A3
will be MLD MAC addresses. Otherwise, Al/A2/A3 will be
over-the-air link MAC addresses.
Currently, during AAD and Nonce computation for software based
encryption/decryption cases, mac80211 directly uses the addresses it
receives in the skb frame header. However, after the first
authentication, management frame addresses for non-AP MLD stations
are translated to MLD addresses from over the air link addresses in
software. This means that the skb header could contain translated MLD
addresses, which when used as is, can lead to incorrect AAD/Nonce
computation.
In the following manner, ensure that the right set of addresses are used:
In the receive path, stash the pre-translated link addresses in
ieee80211_rx_data and use them for the AAD/Nonce computations
when required.
In the transmit path, offload the encryption for a CCMP/GCMP key
to the hwsim driver that can then ensure that encryption and hence
the AAD/Nonce computations are performed on the frame containing the
right set of addresses, i.e, MLD addresses if unicast data frame and
link addresses otherwise.
To do so, register the set key handler in hwsim driver so mac80211 is
aware that it is the driver that would take care of encrypting the
frame. Offload encryption for a CCMP/GCMP key, while keeping the
encryption for WEP/TKIP and MMIE generation for a AES_CMAC or a
AES_GMAC key still at the SW crypto in mac layer
Co-developed-by: Rohan Dutta <quic_drohan@quicinc.com>
Signed-off-by: Rohan Dutta <quic_drohan@quicinc.com>
Signed-off-by: Sai Pratyusha Magam <sai.magam@oss.qualcomm.com>
Link: https://patch.msgid.link/20260226042959.3766157-1-sai.magam@oss.qualcomm.com
[only store and apply link_addrs for unicast non-data
rather storing always and applying for !unicast_data]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2026-02-26 09:59:59 +05:30
|
|
|
|
|
|
|
|
|
2015-06-12 14:39:02 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-10-10 22:31:49 -04:00
|
|
|
|
2023-04-19 14:52:54 +02:00
|
|
|
|
2015-06-12 14:39:02 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2021-05-11 20:02:48 +02:00
|
|
|
|
|
|
|
|
|
2015-06-12 14:39:02 +02:00
|
|
|
|
2007-05-05 11:45:53 -07:00
|
|
|
|
|
|
|
|
|
2015-01-24 19:52:07 +02:00
|
|
|
|
2023-09-25 17:25:09 +02:00
|
|
|
|
2013-05-08 13:09:08 +02:00
|
|
|
|
|
|
|
|
|
2007-05-05 11:45:53 -07:00
|
|
|
|
2008-01-31 19:48:20 +01:00
|
|
|
|
2007-05-05 11:45:53 -07:00
|
|
|
|
2009-01-08 13:32:01 +02:00
|
|
|
|
2024-01-02 21:35:40 +02:00
|
|
|
|
wifi: mac80211: Fix AAD/Nonce computation for management frames with MLO
Per IEEE Std 802.11be-2024, 12.5.2.3.3, if the MPDU is an
individually addressed Data frame between an AP MLD and a
non-AP MLD associated with the AP MLD, then A1/A2/A3
will be MLD MAC addresses. Otherwise, Al/A2/A3 will be
over-the-air link MAC addresses.
Currently, during AAD and Nonce computation for software based
encryption/decryption cases, mac80211 directly uses the addresses it
receives in the skb frame header. However, after the first
authentication, management frame addresses for non-AP MLD stations
are translated to MLD addresses from over the air link addresses in
software. This means that the skb header could contain translated MLD
addresses, which when used as is, can lead to incorrect AAD/Nonce
computation.
In the following manner, ensure that the right set of addresses are used:
In the receive path, stash the pre-translated link addresses in
ieee80211_rx_data and use them for the AAD/Nonce computations
when required.
In the transmit path, offload the encryption for a CCMP/GCMP key
to the hwsim driver that can then ensure that encryption and hence
the AAD/Nonce computations are performed on the frame containing the
right set of addresses, i.e, MLD addresses if unicast data frame and
link addresses otherwise.
To do so, register the set key handler in hwsim driver so mac80211 is
aware that it is the driver that would take care of encrypting the
frame. Offload encryption for a CCMP/GCMP key, while keeping the
encryption for WEP/TKIP and MMIE generation for a AES_CMAC or a
AES_GMAC key still at the SW crypto in mac layer
Co-developed-by: Rohan Dutta <quic_drohan@quicinc.com>
Signed-off-by: Rohan Dutta <quic_drohan@quicinc.com>
Signed-off-by: Sai Pratyusha Magam <sai.magam@oss.qualcomm.com>
Link: https://patch.msgid.link/20260226042959.3766157-1-sai.magam@oss.qualcomm.com
[only store and apply link_addrs for unicast non-data
rather storing always and applying for !unicast_data]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2026-02-26 09:59:59 +05:30
|
|
|
|
2015-01-24 19:52:06 +02:00
|
|
|
|
2022-05-06 10:51:52 +02:00
|
|
|
|
2015-01-24 19:52:06 +02:00
|
|
|
|
wifi: mac80211: Fix AAD/Nonce computation for management frames with MLO
Per IEEE Std 802.11be-2024, 12.5.2.3.3, if the MPDU is an
individually addressed Data frame between an AP MLD and a
non-AP MLD associated with the AP MLD, then A1/A2/A3
will be MLD MAC addresses. Otherwise, Al/A2/A3 will be
over-the-air link MAC addresses.
Currently, during AAD and Nonce computation for software based
encryption/decryption cases, mac80211 directly uses the addresses it
receives in the skb frame header. However, after the first
authentication, management frame addresses for non-AP MLD stations
are translated to MLD addresses from over the air link addresses in
software. This means that the skb header could contain translated MLD
addresses, which when used as is, can lead to incorrect AAD/Nonce
computation.
In the following manner, ensure that the right set of addresses are used:
In the receive path, stash the pre-translated link addresses in
ieee80211_rx_data and use them for the AAD/Nonce computations
when required.
In the transmit path, offload the encryption for a CCMP/GCMP key
to the hwsim driver that can then ensure that encryption and hence
the AAD/Nonce computations are performed on the frame containing the
right set of addresses, i.e, MLD addresses if unicast data frame and
link addresses otherwise.
To do so, register the set key handler in hwsim driver so mac80211 is
aware that it is the driver that would take care of encrypting the
frame. Offload encryption for a CCMP/GCMP key, while keeping the
encryption for WEP/TKIP and MMIE generation for a AES_CMAC or a
AES_GMAC key still at the SW crypto in mac layer
Co-developed-by: Rohan Dutta <quic_drohan@quicinc.com>
Signed-off-by: Rohan Dutta <quic_drohan@quicinc.com>
Signed-off-by: Sai Pratyusha Magam <sai.magam@oss.qualcomm.com>
Link: https://patch.msgid.link/20260226042959.3766157-1-sai.magam@oss.qualcomm.com
[only store and apply link_addrs for unicast non-data
rather storing always and applying for !unicast_data]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2026-02-26 09:59:59 +05:30
|
|
|
|
|
|
|
|
|
2015-01-24 19:52:06 +02:00
|
|
|
|
|
|
|
|
|
wifi: mac80211: Fix AAD/Nonce computation for management frames with MLO
Per IEEE Std 802.11be-2024, 12.5.2.3.3, if the MPDU is an
individually addressed Data frame between an AP MLD and a
non-AP MLD associated with the AP MLD, then A1/A2/A3
will be MLD MAC addresses. Otherwise, Al/A2/A3 will be
over-the-air link MAC addresses.
Currently, during AAD and Nonce computation for software based
encryption/decryption cases, mac80211 directly uses the addresses it
receives in the skb frame header. However, after the first
authentication, management frame addresses for non-AP MLD stations
are translated to MLD addresses from over the air link addresses in
software. This means that the skb header could contain translated MLD
addresses, which when used as is, can lead to incorrect AAD/Nonce
computation.
In the following manner, ensure that the right set of addresses are used:
In the receive path, stash the pre-translated link addresses in
ieee80211_rx_data and use them for the AAD/Nonce computations
when required.
In the transmit path, offload the encryption for a CCMP/GCMP key
to the hwsim driver that can then ensure that encryption and hence
the AAD/Nonce computations are performed on the frame containing the
right set of addresses, i.e, MLD addresses if unicast data frame and
link addresses otherwise.
To do so, register the set key handler in hwsim driver so mac80211 is
aware that it is the driver that would take care of encrypting the
frame. Offload encryption for a CCMP/GCMP key, while keeping the
encryption for WEP/TKIP and MMIE generation for a AES_CMAC or a
AES_GMAC key still at the SW crypto in mac layer
Co-developed-by: Rohan Dutta <quic_drohan@quicinc.com>
Signed-off-by: Rohan Dutta <quic_drohan@quicinc.com>
Signed-off-by: Sai Pratyusha Magam <sai.magam@oss.qualcomm.com>
Link: https://patch.msgid.link/20260226042959.3766157-1-sai.magam@oss.qualcomm.com
[only store and apply link_addrs for unicast non-data
rather storing always and applying for !unicast_data]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2026-02-26 09:59:59 +05:30
|
|
|
|
2015-01-24 19:52:06 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-10-17 15:05:33 +01:00
|
|
|
|
2015-01-24 19:52:06 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-06-01 15:36:51 +02:00
|
|
|
|
2015-01-24 19:52:06 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-01-02 21:35:40 +02:00
|
|
|
|
wifi: mac80211: Fix AAD/Nonce computation for management frames with MLO
Per IEEE Std 802.11be-2024, 12.5.2.3.3, if the MPDU is an
individually addressed Data frame between an AP MLD and a
non-AP MLD associated with the AP MLD, then A1/A2/A3
will be MLD MAC addresses. Otherwise, Al/A2/A3 will be
over-the-air link MAC addresses.
Currently, during AAD and Nonce computation for software based
encryption/decryption cases, mac80211 directly uses the addresses it
receives in the skb frame header. However, after the first
authentication, management frame addresses for non-AP MLD stations
are translated to MLD addresses from over the air link addresses in
software. This means that the skb header could contain translated MLD
addresses, which when used as is, can lead to incorrect AAD/Nonce
computation.
In the following manner, ensure that the right set of addresses are used:
In the receive path, stash the pre-translated link addresses in
ieee80211_rx_data and use them for the AAD/Nonce computations
when required.
In the transmit path, offload the encryption for a CCMP/GCMP key
to the hwsim driver that can then ensure that encryption and hence
the AAD/Nonce computations are performed on the frame containing the
right set of addresses, i.e, MLD addresses if unicast data frame and
link addresses otherwise.
To do so, register the set key handler in hwsim driver so mac80211 is
aware that it is the driver that would take care of encrypting the
frame. Offload encryption for a CCMP/GCMP key, while keeping the
encryption for WEP/TKIP and MMIE generation for a AES_CMAC or a
AES_GMAC key still at the SW crypto in mac layer
Co-developed-by: Rohan Dutta <quic_drohan@quicinc.com>
Signed-off-by: Rohan Dutta <quic_drohan@quicinc.com>
Signed-off-by: Sai Pratyusha Magam <sai.magam@oss.qualcomm.com>
Link: https://patch.msgid.link/20260226042959.3766157-1-sai.magam@oss.qualcomm.com
[only store and apply link_addrs for unicast non-data
rather storing always and applying for !unicast_data]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2026-02-26 09:59:59 +05:30
|
|
|
|
|
|
|
|
|
2016-10-17 15:05:33 +01:00
|
|
|
|
|
|
|
|
|
2015-01-24 19:52:06 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-02-24 11:49:45 +02:00
|
|
|
|
2015-01-24 19:52:06 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2026-01-14 16:48:59 +05:30
|
|
|
|
|
|
|
|
|
2015-01-24 19:52:06 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-09-25 17:25:09 +02:00
|
|
|
|
2016-02-24 11:49:45 +02:00
|
|
|
|
|
|
|
|
|
2015-01-24 19:52:06 +02:00
|
|
|
|
|
|
|
|
|
2023-09-25 17:25:09 +02:00
|
|
|
|
2015-01-24 19:52:06 +02:00
|
|
|
|
|
|
|
|
|
2021-09-27 11:58:39 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-02-24 11:49:45 +02:00
|
|
|
|
|
|
|
|
|
2023-09-25 17:25:09 +02:00
|
|
|
|
2016-02-24 11:49:45 +02:00
|
|
|
|
2015-06-12 14:39:02 +02:00
|
|
|
|
2016-05-03 15:59:44 +03:00
|
|
|
|
|
|
|
|
|
2015-06-12 14:39:02 +02:00
|
|
|
|
2015-01-24 19:52:06 +02:00
|
|
|
|
2015-06-12 14:39:02 +02:00
|
|
|
|
2015-01-24 19:52:06 +02:00
|
|
|
|
2016-05-03 15:59:44 +03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-06-12 14:39:02 +02:00
|
|
|
|
2023-04-19 14:52:54 +02:00
|
|
|
|
2015-06-12 14:39:02 +02:00
|
|
|
|
2015-01-24 19:52:06 +02:00
|
|
|
|
2015-06-12 14:39:02 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
wifi: mac80211: Fix AAD/Nonce computation for management frames with MLO
Per IEEE Std 802.11be-2024, 12.5.2.3.3, if the MPDU is an
individually addressed Data frame between an AP MLD and a
non-AP MLD associated with the AP MLD, then A1/A2/A3
will be MLD MAC addresses. Otherwise, Al/A2/A3 will be
over-the-air link MAC addresses.
Currently, during AAD and Nonce computation for software based
encryption/decryption cases, mac80211 directly uses the addresses it
receives in the skb frame header. However, after the first
authentication, management frame addresses for non-AP MLD stations
are translated to MLD addresses from over the air link addresses in
software. This means that the skb header could contain translated MLD
addresses, which when used as is, can lead to incorrect AAD/Nonce
computation.
In the following manner, ensure that the right set of addresses are used:
In the receive path, stash the pre-translated link addresses in
ieee80211_rx_data and use them for the AAD/Nonce computations
when required.
In the transmit path, offload the encryption for a CCMP/GCMP key
to the hwsim driver that can then ensure that encryption and hence
the AAD/Nonce computations are performed on the frame containing the
right set of addresses, i.e, MLD addresses if unicast data frame and
link addresses otherwise.
To do so, register the set key handler in hwsim driver so mac80211 is
aware that it is the driver that would take care of encrypting the
frame. Offload encryption for a CCMP/GCMP key, while keeping the
encryption for WEP/TKIP and MMIE generation for a AES_CMAC or a
AES_GMAC key still at the SW crypto in mac layer
Co-developed-by: Rohan Dutta <quic_drohan@quicinc.com>
Signed-off-by: Rohan Dutta <quic_drohan@quicinc.com>
Signed-off-by: Sai Pratyusha Magam <sai.magam@oss.qualcomm.com>
Link: https://patch.msgid.link/20260226042959.3766157-1-sai.magam@oss.qualcomm.com
[only store and apply link_addrs for unicast non-data
rather storing always and applying for !unicast_data]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2026-02-26 09:59:59 +05:30
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-06-12 14:39:02 +02:00
|
|
|
|
2024-01-02 21:35:40 +02:00
|
|
|
|
wifi: mac80211: Fix AAD/Nonce computation for management frames with MLO
Per IEEE Std 802.11be-2024, 12.5.2.3.3, if the MPDU is an
individually addressed Data frame between an AP MLD and a
non-AP MLD associated with the AP MLD, then A1/A2/A3
will be MLD MAC addresses. Otherwise, Al/A2/A3 will be
over-the-air link MAC addresses.
Currently, during AAD and Nonce computation for software based
encryption/decryption cases, mac80211 directly uses the addresses it
receives in the skb frame header. However, after the first
authentication, management frame addresses for non-AP MLD stations
are translated to MLD addresses from over the air link addresses in
software. This means that the skb header could contain translated MLD
addresses, which when used as is, can lead to incorrect AAD/Nonce
computation.
In the following manner, ensure that the right set of addresses are used:
In the receive path, stash the pre-translated link addresses in
ieee80211_rx_data and use them for the AAD/Nonce computations
when required.
In the transmit path, offload the encryption for a CCMP/GCMP key
to the hwsim driver that can then ensure that encryption and hence
the AAD/Nonce computations are performed on the frame containing the
right set of addresses, i.e, MLD addresses if unicast data frame and
link addresses otherwise.
To do so, register the set key handler in hwsim driver so mac80211 is
aware that it is the driver that would take care of encrypting the
frame. Offload encryption for a CCMP/GCMP key, while keeping the
encryption for WEP/TKIP and MMIE generation for a AES_CMAC or a
AES_GMAC key still at the SW crypto in mac layer
Co-developed-by: Rohan Dutta <quic_drohan@quicinc.com>
Signed-off-by: Rohan Dutta <quic_drohan@quicinc.com>
Signed-off-by: Sai Pratyusha Magam <sai.magam@oss.qualcomm.com>
Link: https://patch.msgid.link/20260226042959.3766157-1-sai.magam@oss.qualcomm.com
[only store and apply link_addrs for unicast non-data
rather storing always and applying for !unicast_data]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2026-02-26 09:59:59 +05:30
|
|
|
|
|
|
|
|
|
2015-06-12 14:39:02 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-04-19 14:52:54 +02:00
|
|
|
|
2015-06-12 14:39:02 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2021-05-11 20:02:48 +02:00
|
|
|
|
|
|
|
|
|
2015-06-12 14:39:02 +02:00
|
|
|
|
2015-01-24 19:52:06 +02:00
|
|
|
|
|
|
|
|
|
2016-02-24 11:49:45 +02:00
|
|
|
|
2023-09-25 17:25:09 +02:00
|
|
|
|
2015-01-24 19:52:06 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-01-08 13:32:01 +02:00
|
|
|
|
|
|
|
|
|
mac80211: Fix FC masking in BIP AAD generation
The bits used in the mask were off-by-one and ended up masking PwrMgt,
MoreData, Protected fields instead of Retry, PwrMgt, MoreData. Fix this
and to mask the correct fields. While doing so, convert the code to mask
the full FC using IEEE80211_FCTL_* defines similarly to how CCMP AAD is
built.
Since BIP is used only with broadcast/multicast management frames, the
Retry field is always 0 in these frames. The Protected field is also
zero to maintain backwards compatibility. As such, the incorrect mask
here does not really cause any problems for valid frames. In theory, an
invalid BIP frame with Retry or Protected field set to 1 could be
rejected because of BIP validation. However, no such frame should show
up with standard compliant implementations, so this does not cause
problems in normal BIP use.
Signed-off-by: Jouni Malinen <j@w1.fi>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2012-09-30 19:47:40 +03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-01-08 13:32:01 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
mac80211: Fix FC masking in BIP AAD generation
The bits used in the mask were off-by-one and ended up masking PwrMgt,
MoreData, Protected fields instead of Retry, PwrMgt, MoreData. Fix this
and to mask the correct fields. While doing so, convert the code to mask
the full FC using IEEE80211_FCTL_* defines similarly to how CCMP AAD is
built.
Since BIP is used only with broadcast/multicast management frames, the
Retry field is always 0 in these frames. The Protected field is also
zero to maintain backwards compatibility. As such, the incorrect mask
here does not really cause any problems for valid frames. In theory, an
invalid BIP frame with Retry or Protected field set to 1 could be
rejected because of BIP validation. However, no such frame should show
up with standard compliant implementations, so this does not cause
problems in normal BIP use.
Signed-off-by: Jouni Malinen <j@w1.fi>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2012-09-30 19:47:40 +03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-01-08 13:32:01 +02:00
|
|
|
|
2022-08-29 11:46:38 +02:00
|
|
|
|
2009-01-08 13:32:01 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-07-06 22:00:35 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-01-08 13:32:01 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-11-13 22:05:11 +08:00
|
|
|
|
|
|
|
|
|
2009-01-08 13:32:01 +02:00
|
|
|
|
2011-11-16 15:28:55 +01:00
|
|
|
|
|
|
|
|
|
2009-01-08 13:32:01 +02:00
|
|
|
|
2025-11-13 22:05:11 +08:00
|
|
|
|
|
|
|
|
|
2011-07-06 22:00:35 +02:00
|
|
|
|
|
|
|
|
|
2009-01-08 13:32:01 +02:00
|
|
|
|
2011-11-16 15:28:55 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-07-16 00:09:19 +02:00
|
|
|
|
|
|
|
|
|
2011-11-16 15:28:55 +01:00
|
|
|
|
2009-01-08 13:32:01 +02:00
|
|
|
|
2025-11-13 22:05:11 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-01-08 13:32:01 +02:00
|
|
|
|
|
|
|
|
|
2025-11-13 22:05:11 +08:00
|
|
|
|
2009-01-08 13:32:01 +02:00
|
|
|
|
2025-11-13 22:05:11 +08:00
|
|
|
|
2009-01-08 13:32:01 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-06-01 15:36:51 +02:00
|
|
|
|
2009-01-08 13:32:01 +02:00
|
|
|
|
2011-07-06 22:00:35 +02:00
|
|
|
|
2009-01-08 13:32:01 +02:00
|
|
|
|
2019-07-16 00:09:19 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-01-08 13:32:01 +02:00
|
|
|
|
|
|
|
|
|
2026-02-18 13:35:00 -08:00
|
|
|
|
|
|
|
|
|
2015-01-24 19:52:08 +02:00
|
|
|
|
|
|
|
|
|
2009-01-08 13:32:01 +02:00
|
|
|
|
|
|
|
|
|
2025-11-13 22:05:11 +08:00
|
|
|
|
|
|
|
|
|
2009-01-08 13:32:01 +02:00
|
|
|
|
|
|
|
|
|
2009-11-16 13:58:20 +01:00
|
|
|
|
2009-01-08 13:32:01 +02:00
|
|
|
|
2025-11-13 22:05:11 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-01-08 13:32:01 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-11-13 22:05:11 +08:00
|
|
|
|
|
|
|
|
|
2012-03-12 13:49:14 +01:00
|
|
|
|
|
|
|
|
|
2025-11-13 22:05:11 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-01-08 13:32:01 +02:00
|
|
|
|
2025-11-13 22:05:11 +08:00
|
|
|
|
2009-01-08 13:32:01 +02:00
|
|
|
|
2025-11-13 22:05:11 +08:00
|
|
|
|
2023-04-19 14:52:54 +02:00
|
|
|
|
2009-01-08 13:32:01 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-04-19 14:52:54 +02:00
|
|
|
|
2009-01-08 13:32:01 +02:00
|
|
|
|
|
|
|
|
|
2009-11-16 13:58:20 +01:00
|
|
|
|
2009-01-08 13:32:01 +02:00
|
|
|
|
|
|
|
|
|
2026-02-18 13:35:00 -08:00
|
|
|
|
|
|
|
|
|
2025-11-13 22:05:11 +08:00
|
|
|
|
2009-01-08 13:32:01 +02:00
|
|
|
|
2023-04-19 14:52:54 +02:00
|
|
|
|
2009-01-08 13:32:01 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-11-13 22:05:11 +08:00
|
|
|
|
2015-01-24 19:52:08 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-01-24 19:52:09 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-10-17 15:05:33 +01:00
|
|
|
|
2015-01-24 19:52:09 +02:00
|
|
|
|
2016-10-17 15:05:33 +01:00
|
|
|
|
2015-01-24 19:52:09 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-03-26 08:30:36 +08:00
|
|
|
|
|
|
|
|
|
2015-01-24 19:52:09 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
networking: make skb_put & friends return void pointers
It seems like a historic accident that these return unsigned char *,
and in many places that means casts are required, more often than not.
Make these functions (skb_put, __skb_put and pskb_put) return void *
and remove all the casts across the tree, adding a (u8 *) cast only
where the unsigned char pointer was used directly, all done with the
following spatch:
@@
expression SKB, LEN;
typedef u8;
identifier fn = { skb_put, __skb_put };
@@
- *(fn(SKB, LEN))
+ *(u8 *)fn(SKB, LEN)
@@
expression E, SKB, LEN;
identifier fn = { skb_put, __skb_put };
type T;
@@
- E = ((T *)(fn(SKB, LEN)))
+ E = fn(SKB, LEN)
which actually doesn't cover pskb_put since there are only three
users overall.
A handful of stragglers were converted manually, notably a macro in
drivers/isdn/i4l/isdn_bsdcomp.c and, oddly enough, one of the many
instances in net/bluetooth/hci_sock.c. In the former file, I also
had to fix one whitespace problem spatch introduced.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2017-06-16 14:29:21 +02:00
|
|
|
|
2015-01-24 19:52:09 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-06-01 15:36:51 +02:00
|
|
|
|
2015-01-24 19:52:09 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-03-26 08:30:36 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-01-24 19:52:09 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-05-28 01:46:43 +03:00
|
|
|
|
2015-01-24 19:52:09 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-09-25 17:25:09 +02:00
|
|
|
|
2015-01-24 19:52:09 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-04-19 14:52:54 +02:00
|
|
|
|
2015-01-24 19:52:09 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-04-19 14:52:54 +02:00
|
|
|
|
2015-01-24 19:52:09 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-11-13 22:05:09 +08:00
|
|
|
|
2019-05-28 01:46:43 +03:00
|
|
|
|
2023-09-25 17:25:09 +02:00
|
|
|
|
2015-01-24 19:52:09 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-06-10 04:59:12 +02:00
|
|
|
|
2015-01-24 19:52:09 +02:00
|
|
|
|
2019-05-28 01:46:43 +03:00
|
|
|
|
2023-04-19 14:52:54 +02:00
|
|
|
|
2015-01-24 19:52:09 +02:00
|
|
|
|
2019-05-28 01:46:43 +03:00
|
|
|
|
2015-01-24 19:52:09 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|