Johannes Berg
d615ea32f6
wifi: iwlwifi: mvm: put only a single IGTK into FW
...
The firmware only supports a single IGTK, and due to some
changes it really doesn't like to have multiple programmed
in later versions. Since only newer firmware cannot remove
a key that isn't present any more, adjust only the MLD API
code to keep track of the previous IGTK and remove it when
a new one is added.
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
Signed-off-by: Gregory Greenman <gregory.greenman@intel.com >
Link: https://lore.kernel.org/r/20230613155501.3fde1ef09270.I2e12a3b0bba4325c07dc8fcce39b711f158bd621@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2023-06-14 12:32:20 +02:00
Gregory Greenman
637452360e
wifi: iwlwifi: mvm: fix potential array out of bounds access
...
Account for IWL_SEC_WEP_KEY_OFFSET when needed while verifying
key_len size in iwl_mvm_sec_key_add().
Signed-off-by: Gregory Greenman <gregory.greenman@intel.com >
Link: https://lore.kernel.org/r/20230613155501.f193b7493a93.I6948ba625b9318924b96a5e22602ac75d2bd0125@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2023-06-14 12:32:20 +02:00
Mukesh Sisodiya
9c5608b364
wifi: iwlwifi: support version C0 of BZ and GL devices
...
Add support for C0 version of MAC and RF for BZ and GL devices.
Signed-off-by: Mukesh Sisodiya <mukesh.sisodiya@intel.com >
Signed-off-by: Gregory Greenman <gregory.greenman@intel.com >
Link: https://lore.kernel.org/r/20230613155501.90ad8aab8a03.I86d1675095f0e4f5286d9b7c2b00a0220f524472@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2023-06-14 12:32:20 +02:00
Gregory Greenman
18c0ffb404
wifi: iwlwifi: mvm: add support for Extra EHT LTF
...
Add support for Extra EHT LTF defined in 9.4.2.313
EHT Capabilities element.
Signed-off-by: Gregory Greenman <gregory.greenman@intel.com >
Link: https://lore.kernel.org/r/20230613155501.de019d7cc174.I806f0f6042b89274192701a60b4f7900822db666@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2023-06-14 12:32:20 +02:00
Ariel Malamud
d51439a6d7
wifi: iwlwifi: mvm: Refactor iwl_mvm_get_lmac_id()
...
The iwl_mvm_get_lmac_id() function is currently
defined as a static inline function under fw/api
and receives mvm's fw pointer. It will need the
ability to access other mvm struct members for
future capabilities such as debug. Move the function
out of the fw/api and into mvm proper as a regular
function and have it receive the pointer to mvm.
Signed-off-by: Ariel Malamud <ariel.malamud@intel.com >
Signed-off-by: Gregory Greenman <gregory.greenman@intel.com >
Link: https://lore.kernel.org/r/20230613155501.507b2f9f64eb.I0ec91310e1911c33faf396b5e17bcb11a164f6ea@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2023-06-14 12:32:20 +02:00
Alon Giladi
ff75c21c20
wifi: iwlwifi: improve debug prints in iwl_read_ppag_table()
...
Add prints of ETSI and China bits.
Check if need to mask the China bit (when the firmware doesn't
support it) in a separate flow, so it will be easier to follow
the conditions. Add a separate message for the command version.
Signed-off-by: Alon Giladi <alon.giladi@intel.com >
Signed-off-by: Gregory Greenman <gregory.greenman@intel.com >
Link: https://lore.kernel.org/r/20230613155501.4ee455ec1ee8.I6f1a4b7dfa5cfd9b4f4a4b5bb5567849e629ae96@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2023-06-14 12:32:19 +02:00
Mukesh Sisodiya
97110233c0
wifi: iwlwifi: mvm: initialize the rx_vec before using it
...
Initialize the phy_data.rx_vec for both version-3 and above
where it is 4-byte data size and below version which has
data size of 2-byte.
The data will be sent uninitialized in called function if
notification version is less than three.
Signed-off-by: Mukesh Sisodiya <mukesh.sisodiya@intel.com >
Signed-off-by: Gregory Greenman <gregory.greenman@intel.com >
Link: https://lore.kernel.org/r/20230613155501.a6bb856f04bc.I9a15075f3dad61dcabdcd1ed0d34cf3e8ec5453f@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2023-06-14 12:32:19 +02:00
Haim Dreyfuss
e9f5ce3471
wifi: iwlwifi: mvm: rename BTM support flag and its TLV
...
Currently, we only need to support BTM rejection.
However, in the future we might want to support other BTM modes.
Rephrase its naming.
Signed-off-by: Haim Dreyfuss <haim.dreyfuss@intel.com >
Signed-off-by: Gregory Greenman <gregory.greenman@intel.com >
Link: https://lore.kernel.org/r/20230613155501.ad20f10668d1.Icbb3fbae50b2302b97225b183dd336b02a4f37ee@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2023-06-14 12:32:19 +02:00
Johannes Berg
557b56d523
wifi: iwlwifi: mvm: support U-SIG EHT validate checks
...
Support new firmware that can validate the validate bits in
sniffer mode, and advertise that fact and the result of the
checks in the U-SIG radiotap field.
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
Signed-off-by: Gregory Greenman <gregory.greenman@intel.com >
Link: https://lore.kernel.org/r/20230613155501.c20480aa1171.Icc0d077dae01d662ccb948823e196aa9c5c87976@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2023-06-14 12:32:19 +02:00
Azeem Shaikh
f3c21ed9ce
wifi: mac80211: Replace strlcpy with strscpy
...
strlcpy() reads the entire source buffer first.
This read may exceed the destination size limit.
This is both inefficient and can lead to linear read
overflows if a source string is not NUL-terminated [1].
In an effort to remove strlcpy() completely [2], replace
strlcpy() here with strscpy().
Direct replacement is safe here since LOCAL_ASSIGN is only used by
TRACE macros and the return values are ignored.
[1] https://www.kernel.org/doc/html/latest/process/deprecated.html#strlcpy
[2] https://github.com/KSPP/linux/issues/89
Signed-off-by: Azeem Shaikh <azeemshaikh38@gmail.com >
Reviewed-by: Kees Cook <keescook@chromium.org >
Link: https://lore.kernel.org/r/20230613003404.3538524-1-azeemshaikh38@gmail.com
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2023-06-14 12:32:19 +02:00
Azeem Shaikh
0ffe85885b
wifi: cfg80211: replace strlcpy() with strscpy()
...
strlcpy() reads the entire source buffer first.
This read may exceed the destination size limit.
This is both inefficient and can lead to linear read
overflows if a source string is not NUL-terminated [1].
In an effort to remove strlcpy() completely [2], replace
strlcpy() here with strscpy().
Direct replacement is safe here since WIPHY_ASSIGN is only used by
TRACE macros and the return values are ignored.
[1] https://www.kernel.org/doc/html/latest/process/deprecated.html#strlcpy
[2] https://github.com/KSPP/linux/issues/89
Signed-off-by: Azeem Shaikh <azeemshaikh38@gmail.com >
Reviewed-by: Kees Cook <keescook@chromium.org >
Link: https://lore.kernel.org/r/20230612232301.2572316-1-azeemshaikh38@gmail.com
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2023-06-14 12:32:19 +02:00
Ilan Peer
a3ff9303b4
wifi: iwlwifi: mvm: Propagate ERP slot changes to FW
...
In AP mode, ERP slot changes weren't properly indicated to the FW.
Fix it.
Signed-off-by: Ilan Peer <ilan.peer@intel.com >
Signed-off-by: Gregory Greenman <gregory.greenman@intel.com >
Link: https://lore.kernel.org/r/20230612184434.ef242b8ce245.I01eddee9d3a9a3208499c223eb8e70fe6663f42c@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2023-06-14 12:32:19 +02:00
Avraham Stern
fd940de72d
wifi: iwlwifi: mvm: FTM responder MLO support
...
Add a link configuration parameter to FTM responder start instead
of using the default link.
Signed-off-by: Avraham Stern <avraham.stern@intel.com >
Signed-off-by: Gregory Greenman <gregory.greenman@intel.com >
Link: https://lore.kernel.org/r/20230612184434.b367f9bd19b8.I158c71998f39a6c15463ff5ae30129da8ad46d22@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2023-06-14 12:32:18 +02:00
Emmanuel Grumbach
6107f30013
wifi: iwlwifi: pass ESR parameters to the firmware
...
The firmware needs to know the esr_transtition_timeout to time the
transition between EMLSR and single radio with the AP.
Add the EMLSR support bit to the wiphy extended capabilities so that
it'll be sent in our association request frame. There are some
limitations in the implementation so we cannot use zero
padding/transition delay; fill the correct values.
Also, feed the medium_synchronization delay to the firmware.
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com >
Signed-off-by: Gregory Greenman <gregory.greenman@intel.com >
Link: https://lore.kernel.org/r/20230612184434.09fa06820d03.Ie9a9fd37d4948f8c5dd91161de254184b1a093c0@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2023-06-14 12:32:18 +02:00
Alon Giladi
a114c4f5f9
wifi: iwlwifi: debugfs: add ppag capa to fw info file
...
Add information about ppag_china_bit_support capability.
Signed-off-by: Alon Giladi <alon.giladi@intel.com >
Signed-off-by: Gregory Greenman <gregory.greenman@intel.com >
Link: https://lore.kernel.org/r/20230612184434.4655922aff4d.Ie934027940bd53d05124222aa6a8a8b7021952c4@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2023-06-14 12:32:18 +02:00
Johannes Berg
af8bfc7e38
wifi: iwlwifi: mvm: always set MH len in offload_assist
...
Some versions of the new hardware don't have a functional
version of the new offload method, but still have stricter
checks on the MAC header (MH) length in the offload assist
word. Include that even if checksumming isn't offloaded to
hardware.
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
Signed-off-by: Gregory Greenman <gregory.greenman@intel.com >
Link: https://lore.kernel.org/r/20230612184434.bba713f7495a.Idbc8e3ce313b51af4060326e0191bd338b3163a2@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2023-06-14 12:32:18 +02:00
Mukesh Sisodiya
2b69d242e2
wifi: iwlwifi: fw: print PC register value instead of address
...
The program counter address is read from the TLV and
PC address is printed in debug messages.
Read the value at PC address and print the value
instead of the register address.
Fixes: 5e31b3df86 ("wifi: iwlwifi: dbg: print pc register data once fw dump occurred")
Signed-off-by: Mukesh Sisodiya <mukesh.sisodiya@intel.com >
Signed-off-by: Gregory Greenman <gregory.greenman@intel.com >
Link: https://lore.kernel.org/r/20230612184434.e5a5f18f1b2c.Ib6117a4e7f66a075913241cc81477c0059953d5d@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2023-06-14 12:32:18 +02:00
Johannes Berg
d4f1a50ca9
wifi: iwlwifi: unify checks for HW error values
...
The hardware, depending on which part fails or times out,
returns 0xA5A5A5A. or 0x5A5A5A5. with the lowest 4 bits
encoding some further reason/status. However, mostly we
don't really need to care about the exact reasons, so
unify the checks for this to avoid hardcoding those magic
values all over the driver.
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
Signed-off-by: Gregory Greenman <gregory.greenman@intel.com >
Link: https://lore.kernel.org/r/20230612184434.3e2959741a38.I1c297a53787b87e4e2b8f296c041921338573f4d@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2023-06-14 12:32:18 +02:00
Mukesh Sisodiya
cda2e9d797
wifi: iwlwifi: mvm: fix getting LDPC/STBC support
...
Use flags field from struct ieee80211_tx_info in order to get
LDPC/STBC support. The rate parameter, used originally, is 16
bits only and does not have details of LDPC/STBC support.
Signed-off-by: Mukesh Sisodiya <mukesh.sisodiya@intel.com >
Signed-off-by: Gregory Greenman <gregory.greenman@intel.com >
Link: https://lore.kernel.org/r/20230612184434.5a8856739b11.I6af4a55b22ed856f484ba77f87723dceec4904f2@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2023-06-14 12:32:17 +02:00
Gregory Greenman
ea05ef3f60
wifi: iwlwifi: bump FW API to 79 for AX devices
...
Start supporting API version 79 for AX devices.
Signed-off-by: Gregory Greenman <gregory.greenman@intel.com >
Link: https://lore.kernel.org/r/20230612184434.c54013425732.I4df33c68ee3ef6b6a330f1cbef7f5bbf4f54b269@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2023-06-14 12:32:17 +02:00
Abhishek Naik
e9b63341dc
wifi: iwlwifi: update response for mcc_update command
...
Add support for the MCC update response version 8.
Versions 5-6 are already covered by the existing
flags conversion, and 7 isn't used.
The capabilities field in iwl_mcc_update_resp is 32 bits
wide now, and the flags moved, so some more changes are
needed.
While at it, convert the flags to bool (to avoid having
to deal with BIT(16) specially etc.) and use the
struct_size() macro for the memory allocation.
Signed-off-by: Abhishek Naik <abhishek.naik@intel.com >
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
Signed-off-by: Gregory Greenman <gregory.greenman@intel.com >
Link: https://lore.kernel.org/r/20230612184434.71a7070aecd7.Ibddcb9fbfa74895f742c0ac20968720691c94853@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2023-06-14 12:32:17 +02:00
Avraham Stern
44fa698c78
wifi: iwlwifi: mvm: FTM initiator MLO support
...
When checking if the initiator is associated to the responder,
iterate over all active links.
Signed-off-by: Avraham Stern <avraham.stern@intel.com >
Signed-off-by: Gregory Greenman <gregory.greenman@intel.com >
Link: https://lore.kernel.org/r/20230612184434.1737f26e9cf7.I8f140ca55094da1d73c387fc036394fb2c148c85@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2023-06-14 12:32:17 +02:00
Mukesh Sisodiya
8d507812cb
wifi: iwlwifi: mvm: Handle return value for iwl_mvm_sta_init
...
sta_init function can fail and if it returns an error then
driver should not send the request to fw to add a station.
Fixes: 69aef84805 ("wifi: iwlwifi: mvm: refactor iwl_mvm_add_sta(), iwl_mvm_rm_sta()")
Signed-off-by: Mukesh Sisodiya <mukesh.sisodiya@intel.com >
Signed-off-by: Gregory Greenman <gregory.greenman@intel.com >
Link: https://lore.kernel.org/r/20230612184434.1ecd293539e8.I5ec6aab387bb2fe743a7402581beaeb9c801d31f@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2023-06-14 12:32:17 +02:00
Benjamin Berg
3f244876ef
wifi: iwlwifi: make debugfs entries link specific
...
All of the station elements are really elements for the link. Create
them from the correct callback and return the link specific information
rather than always using the default link.
Signed-off-by: Benjamin Berg <benjamin.berg@intel.com >
Signed-off-by: Gregory Greenman <gregory.greenman@intel.com >
Link: https://lore.kernel.org/r/20230612184434.a8e0c40d325e.I374d9433c3b8694667e1ce550d65f6f1f0d23c05@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2023-06-14 12:32:17 +02:00
Ilan Peer
4cacadc0db
wifi: mac80211: Fix permissions for valid_links debugfs entry
...
The entry should be a read only one and not a write only one. Fix it.
Fixes: 3d90110292 ("wifi: mac80211: implement link switching")
Signed-off-by: Ilan Peer <ilan.peer@intel.com >
Signed-off-by: Gregory Greenman <gregory.greenman@intel.com >
Link: https://lore.kernel.org/r/20230611121219.c75316990411.I1565a7fcba8a37f83efffb0cc6b71c572b896e94@changeid
[remove x16 change since it doesn't work yet]
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2023-06-14 12:31:55 +02:00
Ilan Peer
43ea09285f
wifi: mac80211: Do not use "non-MLD AP" syntax
...
Instead clarify the cases where link ID == 0 is intended
for an AP STA that is not part of an AP MLD.
Signed-off-by: Ilan Peer <ilan.peer@intel.com >
Signed-off-by: Gregory Greenman <gregory.greenman@intel.com >
Link: https://lore.kernel.org/r/20230611121219.77236a2e26ad.I8193ca8e236c9eb015870471f77a7d5134da3156@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2023-06-14 12:21:19 +02:00
Ilan Peer
6cf963edbb
wifi: cfg80211: Support association to AP MLD with disabled links
...
An AP part of an AP MLD might be temporarily disabled, and might be
enabled later. Such a link should be included in the association
exchange, but should not be used until enabled.
Extend the NL80211_CMD_ASSOCIATE to also indicate disabled links.
Signed-off-by: Ilan Peer <ilan.peer@intel.com >
Signed-off-by: Gregory Greenman <gregory.greenman@intel.com >
Link: https://lore.kernel.org/r/20230608163202.c4c61ee4c4a5.I784ef4a0d619fc9120514b5615458fbef3b3684a@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2023-06-14 12:21:17 +02:00
Ilan Peer
01ae1209c0
wifi: mac80211_hwsim: Don't access vif valid links directly
...
And instead use the vif getter functions, as a preparation for
supporting disabled/dormant links.
Signed-off-by: Ilan Peer <ilan.peer@intel.com >
Signed-off-by: Gregory Greenman <gregory.greenman@intel.com >
Link: https://lore.kernel.org/r/20230608163202.8966bd5ce7c8.Ia73e3555aaf4ddf9917bced8d413fad08cc28f1b@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2023-06-14 12:20:08 +02:00
Ilan Peer
f1871abd27
wifi: mac80211: Add getter functions for vif MLD state
...
As a preparation to support disabled/dormant links, add the
following function:
- ieee80211_vif_usable_links(): returns the bitmap of the links
that can be activated. Use this function in all the places that
the bitmap of the usable links is needed.
- ieee80211_vif_is_mld(): returns true iff the vif is an MLD.
Use this function in all the places where an indication that the
connection is a MLD is needed.
Signed-off-by: Ilan Peer <ilan.peer@intel.com >
Signed-off-by: Gregory Greenman <gregory.greenman@intel.com >
Link: https://lore.kernel.org/r/20230608163202.86e3351da1fc.If6fe3a339fda2019f13f57ff768ecffb711b710a@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2023-06-14 12:20:08 +02:00
Miri Korenblit
bc1be54d7e
wifi: mac80211: allow disabling SMPS debugfs controls
...
There are cases in which we don't want the user to override the
smps mode, e.g. when SMPS should be disabled due to EMLSR. Add
a driver flag to disable SMPS overriding and don't override if
it is set.
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com >
Signed-off-by: Gregory Greenman <gregory.greenman@intel.com >
Link: https://lore.kernel.org/r/20230608163202.ef129e80556c.I74a298fdc86b87074c95228d3916739de1400597@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2023-06-14 12:20:08 +02:00
Johannes Berg
0e966d9a35
wifi: mac80211: don't update rx_stats.last_rate for NDP
...
If we get an NDP (null data packet), there's reason to
believe the peer is just sending it to probe, and that
would happen at a low rate. Don't track this packet for
purposes of last RX rate reporting.
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
Signed-off-by: Gregory Greenman <gregory.greenman@intel.com >
Link: https://lore.kernel.org/r/20230608163202.8af46c4ac094.I13d9d5019addeaa4aff3c8a05f56c9f5a86b1ebd@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2023-06-14 12:20:08 +02:00
Benjamin Berg
556f16b834
wifi: mac80211: fix CSA processing while scanning
...
The channel switch parsing code would simply return if a scan is
in-progress. Supposedly, this was because channel switch announcements
from other APs should be ignored.
For the beacon case, the function is already only called if we are
associated with the sender. For the action frame cases, add the
appropriate check whether the frame is coming from the AP we are
associated with. Finally, drop the scanning check from
ieee80211_sta_process_chanswitch.
Signed-off-by: Benjamin Berg <benjamin.berg@intel.com >
Signed-off-by: Gregory Greenman <gregory.greenman@intel.com >
Link: https://lore.kernel.org/r/20230608163202.3366e9302468.I6c7e0b58c33b7fb4c675374cfe8c3a5cddcec416@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2023-06-14 12:20:08 +02:00
Johannes Berg
b580a372b8
wifi: mac80211: mlme: clarify WMM messages
...
These messages apply to a single link only, use link_info()
to indicate that.
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
Signed-off-by: Gregory Greenman <gregory.greenman@intel.com >
Link: https://lore.kernel.org/r/20230608163202.21a6bece4313.I08118e5e851fae2f9e43f8a58d3b6217709bf578@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2023-06-14 12:20:08 +02:00
Anjaneyulu
c6968d4fc9
wifi: mac80211: pass roc->sdata to drv_cancel_remain_on_channel()
...
In suspend flow "sdata" is NULL, destroy all roc's which are started.
pass "roc->sdata" to drv_cancel_remain_on_channel() to avoid NULL
dereference and destroy that roc
Signed-off-by: Anjaneyulu <pagadala.yesu.anjaneyulu@intel.com >
Signed-off-by: Gregory Greenman <gregory.greenman@intel.com >
Link: https://lore.kernel.org/r/20230608163202.c678187a308c.Ic11578778655e273931efc5355d570a16465d1be@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2023-06-14 12:20:08 +02:00
Johannes Berg
4c2d68f798
wifi: mac80211: include key action/command in tracing
...
We trace the key information and all, but not whether the key
is added or removed - add that information.
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
Signed-off-by: Gregory Greenman <gregory.greenman@intel.com >
Link: https://lore.kernel.org/r/20230608163202.546e86e216df.Ie3bf9009926f8fa154dde52b0c02537ff7edae36@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2023-06-14 12:20:07 +02:00
Johannes Berg
1ec7291e24
wifi: mac80211: add helpers to access sband iftype data
...
There's quite a bit of code accessing sband iftype data
(HE, HE 6 GHz, EHT) and we always need to remember to use
the ieee80211_vif_type_p2p() helper. Add new helpers to
directly get it from the sband/vif rather than having to
call ieee80211_vif_type_p2p().
Convert most code with the following spatch:
@@
expression vif, sband;
@@
-ieee80211_get_he_iftype_cap(sband, ieee80211_vif_type_p2p(vif))
+ieee80211_get_he_iftype_cap_vif(sband, vif)
@@
expression vif, sband;
@@
-ieee80211_get_eht_iftype_cap(sband, ieee80211_vif_type_p2p(vif))
+ieee80211_get_eht_iftype_cap_vif(sband, vif)
@@
expression vif, sband;
@@
-ieee80211_get_he_6ghz_capa(sband, ieee80211_vif_type_p2p(vif))
+ieee80211_get_he_6ghz_capa_vif(sband, vif)
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
Signed-off-by: Gregory Greenman <gregory.greenman@intel.com >
Link: https://lore.kernel.org/r/20230604120651.db099f49e764.Ie892966c49e22c7b7ee1073bc684f142debfdc84@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2023-06-14 11:57:29 +02:00
Gilad Itzkovitch
2ad66fcb2f
wifi: cfg80211: S1G rate information and calculations
...
Increase the size of S1G rate_info flags to support S1G and add
flags for new S1G MCS and the supported bandwidths. Also, include
S1G rate information to netlink STA rate message. Lastly, add
rate calculation function for S1G MCS.
Signed-off-by: Gilad Itzkovitch <gilad.itzkovitch@morsemicro.com >
Link: https://lore.kernel.org/r/20230518000723.991912-1-gilad.itzkovitch@morsemicro.com
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2023-06-14 11:57:26 +02:00
Ping-Ke Shih
91ccdbb94f
wifi: rtw88: add missing unwind goto for __rtw_download_firmware()
...
This flaw is detected by smatch:
drivers/net/wireless/realtek/rtw88/mac.c:748 __rtw_download_firmware()
warn: missing unwind goto?
Though most things of dlfw_fail have been done by
download_firmware_end_flow() and wlan_cpu_enable(), an exception is that
download_firmware_end_flow() clear BIT_MCUFWDL_EN bit conditionally.
So, make this change to clear the bit.
Reported-by: kernel test robot <lkp@intel.com >
Reported-by: Dan Carpenter <dan.carpenter@linaro.org >
Closes: https://lore.kernel.org/r/202306052310.OVhcUjZ3-lkp@intel.com/
Cc: Sascha Hauer <s.hauer@pengutronix.de >
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com >
Signed-off-by: Kalle Valo <kvalo@kernel.org >
Link: https://lore.kernel.org/r/20230607012741.10353-1-pkshih@realtek.com
2023-06-13 11:36:59 +03:00
Jakub Kicinski
cabb8b48e5
Merge branch 'mptcp-unify-pm-interfaces'
...
Matthieu Baerts says:
====================
mptcp: unify PM interfaces
These patches from Geliang better isolate the two MPTCP path-managers by
avoiding calling userspace PM functions from the in-kernel PM. Instead,
new functions declared in pm.c directly dispatch to the right PM.
In addition to have a clearer code, this also avoids a bit of duplicated
checks.
This is a refactoring, there is no behaviour change intended here.
====================
Link: https://lore.kernel.org/r/20230608-upstream-net-next-20230608-mptcp-unify-pm-interfaces-v1-0-b301717c9ff5@tessares.net
Signed-off-by: Jakub Kicinski <kuba@kernel.org >
2023-06-10 00:06:01 -07:00
Geliang Tang
6ba7ce8990
mptcp: unify pm set_flags interfaces
...
This patch unifies the three PM set_flags() interfaces:
mptcp_pm_nl_set_flags() in mptcp/pm_netlink.c for the in-kernel PM and
mptcp_userspace_pm_set_flags() in mptcp/pm_userspace.c for the
userspace PM.
They'll be switched in the common PM infterface mptcp_pm_set_flags() in
mptcp/pm.c based on whether token is NULL or not.
Signed-off-by: Geliang Tang <geliang.tang@suse.com >
Reviewed-by: Matthieu Baerts <matthieu.baerts@tessares.net >
Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net >
Reviewed-by: Larysa Zaremba <larysa.zaremba@intel.com >
Signed-off-by: Jakub Kicinski <kuba@kernel.org >
2023-06-10 00:05:59 -07:00
Geliang Tang
f40be0db0b
mptcp: unify pm get_flags_and_ifindex_by_id
...
This patch unifies the three PM get_flags_and_ifindex_by_id() interfaces:
mptcp_pm_nl_get_flags_and_ifindex_by_id() in mptcp/pm_netlink.c for the
in-kernel PM and mptcp_userspace_pm_get_flags_and_ifindex_by_id() in
mptcp/pm_userspace.c for the userspace PM.
They'll be switched in the common PM infterface
mptcp_pm_get_flags_and_ifindex_by_id() in mptcp/pm.c based on whether
mptcp_pm_is_userspace() or not.
Signed-off-by: Geliang Tang <geliang.tang@suse.com >
Reviewed-by: Matthieu Baerts <matthieu.baerts@tessares.net >
Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net >
Reviewed-by: Larysa Zaremba <larysa.zaremba@intel.com >
Signed-off-by: Jakub Kicinski <kuba@kernel.org >
2023-06-10 00:05:59 -07:00
Geliang Tang
9bbec87ecf
mptcp: unify pm get_local_id interfaces
...
This patch unifies the three PM get_local_id() interfaces:
mptcp_pm_nl_get_local_id() in mptcp/pm_netlink.c for the in-kernel PM and
mptcp_userspace_pm_get_local_id() in mptcp/pm_userspace.c for the
userspace PM.
They'll be switched in the common PM infterface mptcp_pm_get_local_id()
in mptcp/pm.c based on whether mptcp_pm_is_userspace() or not.
Also put together the declarations of these three functions in protocol.h.
Signed-off-by: Geliang Tang <geliang.tang@suse.com >
Reviewed-by: Matthieu Baerts <matthieu.baerts@tessares.net >
Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net >
Reviewed-by: Larysa Zaremba <larysa.zaremba@intel.com >
Signed-off-by: Jakub Kicinski <kuba@kernel.org >
2023-06-10 00:05:59 -07:00
Geliang Tang
dc886bce75
mptcp: export local_address
...
Rename local_address() with "mptcp_" prefix and export it in protocol.h.
This function will be re-used in the common PM code (pm.c) in the
following commit.
Signed-off-by: Geliang Tang <geliang.tang@suse.com >
Reviewed-by: Matthieu Baerts <matthieu.baerts@tessares.net >
Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net >
Reviewed-by: Larysa Zaremba <larysa.zaremba@intel.com >
Signed-off-by: Jakub Kicinski <kuba@kernel.org >
2023-06-10 00:05:59 -07:00
Jakub Kicinski
cde11936cf
Merge tag 'wireless-next-2023-06-09' of git://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless-next
...
Kalle Valo says:
====================
wireless-next patches for v6.5
The second pull request for v6.5. We have support for three new
Realtek chipsets, all from different generations. Shows how active
Realtek development is right now, even older generations are being
worked on.
Note: We merged wireless into wireless-next to avoid complex conflicts
between the trees.
Major changes:
rtl8xxxu
- RTL8192FU support
rtw89
- RTL8851BE support
rtw88
- RTL8723DS support
ath11k
- Multiple Basic Service Set Identifier (MBSSID) and Enhanced MBSSID
Advertisement (EMA) support in AP mode
iwlwifi
- support for segmented PNVM images and power tables
- new vendor entries for PPAG (platform antenna gain) feature
cfg80211/mac80211
- more Multi-Link Operation (MLO) support such as hardware restart
- fixes for a potential work/mutex deadlock and with it beginnings of
the previously discussed locking simplifications
* tag 'wireless-next-2023-06-09' of git://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless-next: (162 commits)
wifi: rtlwifi: remove misused flag from HAL data
wifi: rtlwifi: remove unused dualmac control leftovers
wifi: rtlwifi: remove unused timer and related code
wifi: rsi: Do not set MMC_PM_KEEP_POWER in shutdown
wifi: rsi: Do not configure WoWlan in shutdown hook if not enabled
wifi: brcmfmac: Detect corner error case earlier with log
wifi: rtw89: 8852c: update RF radio A/B parameters to R63
wifi: rtw89: 8852c: update TX power tables to R63 with 6 GHz power type (3 of 3)
wifi: rtw89: 8852c: update TX power tables to R63 with 6 GHz power type (2 of 3)
wifi: rtw89: 8852c: update TX power tables to R63 with 6 GHz power type (1 of 3)
wifi: rtw89: process regulatory for 6 GHz power type
wifi: rtw89: regd: update regulatory map to R64-R40
wifi: rtw89: regd: judge 6 GHz according to chip and BIOS
wifi: rtw89: refine clearing supported bands to check 2/5 GHz first
wifi: rtw89: 8851b: configure CRASH_TRIGGER feature for 8851B
wifi: rtw89: set TX power without precondition during setting channel
wifi: rtw89: debug: txpwr table access only valid page according to chip
wifi: rtw89: 8851b: enable hw_scan support
wifi: cfg80211: move scan done work to wiphy work
wifi: cfg80211: move sched scan stop to wiphy work
...
====================
Link: https://lore.kernel.org/r/87bkhohkbg.fsf@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org >
2023-06-09 23:26:56 -07:00
Jakub Kicinski
ded5c1a16e
Merge branch 'tools-ynl-gen-code-gen-improvements-before-ethtool'
...
Jakub Kicinski says:
====================
tools: ynl-gen: code gen improvements before ethtool
I was going to post ethtool but I couldn't stand the ugliness
of the if conditions which were previously generated.
So I cleaned that up and improved a number of other things
ethtool will benefit from.
====================
Link: https://lore.kernel.org/r/20230608211200.1247213-1-kuba@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org >
2023-06-09 14:40:33 -07:00
Jakub Kicinski
76abff37f0
tools: ynl-gen: support / skip pads on the way to kernel
...
Kernel does not have padding requirements for 64b attrs.
We can ignore pad attrs.
Signed-off-by: Jakub Kicinski <kuba@kernel.org >
2023-06-09 14:40:31 -07:00
Jakub Kicinski
6f96ec73cb
tools: ynl-gen: don't pass op_name to RenderInfo
...
The op_name argument is barely used and identical to op.name
in all cases.
Signed-off-by: Jakub Kicinski <kuba@kernel.org >
2023-06-09 14:40:31 -07:00
Jakub Kicinski
6da3424fd6
tools: ynl-gen: support code gen for events
...
Netlink specs support both events and notifications (former can
define their own message contents). Plug in missing code to
generate types, parsers and include events into notification
tables.
Signed-off-by: Jakub Kicinski <kuba@kernel.org >
2023-06-09 14:40:31 -07:00
Jakub Kicinski
ced1568862
tools: ynl-gen: sanitize notification tracking
...
Don't modify the raw dicts (as loaded from YAML) to pretend
that the notify attributes also exist on the ops. This makes
the code easier to follow.
Signed-off-by: Jakub Kicinski <kuba@kernel.org >
2023-06-09 14:40:31 -07:00
Jakub Kicinski
d0915d64c3
tools: ynl: regen: stop generating common notification handlers
...
Remove unused notification handlers.
Signed-off-by: Jakub Kicinski <kuba@kernel.org >
2023-06-09 14:40:31 -07:00