Johannes Berg
550be5c419
wifi: iwlwifi: mvm: fix iwl_mvm_mac_flush_sta()
...
[ Upstream commit 43874283ce ]
When I implemented iwl_mvm_mac_flush_sta() I completely botched it;
it basically always happens after the iwl_mvm_sta_pre_rcu_remove()
call, and that already clears mvm->fw_id_to_mac_id[] entries, so we
cannot rely on those at iwl_mvm_mac_flush_sta() time. This means it
never did anything.
Fix this by just going through the station IDs and now with the new
API for iwl_mvm_flush_sta(), call those.
Fixes: a6cc6ccb1c ("wifi: iwlwifi: mvm: support new flush_sta method")
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
Signed-off-by: Gregory Greenman <gregory.greenman@intel.com >
Link: https://lore.kernel.org/r/20231011130030.0b5878e93118.I1093e60163052e7be64d2b01424097cd6a272979@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
Signed-off-by: Sasha Levin <sashal@kernel.org >
2023-11-20 11:59:02 +01:00
Johannes Berg
d43701c587
wifi: iwlwifi: mvm: change iwl_mvm_flush_sta() API
...
[ Upstream commit 3917629697 ]
This API is type unsafe and needs an extra parameter to know
what kind of station was passed, so it has two, but really it
only needs two values. Just pass the values instead of doing
this type-unsafe dance, which will also make it better to use
for multi-link.
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
Signed-off-by: Gregory Greenman <gregory.greenman@intel.com >
Link: https://lore.kernel.org/r/20231011130030.aeb3bf4204cd.I5b0e6d64a67455784bc8fbdaf9ceaf03699d9ce1@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
Stable-dep-of: 43874283ce ("wifi: iwlwifi: mvm: fix iwl_mvm_mac_flush_sta()")
Signed-off-by: Sasha Levin <sashal@kernel.org >
2023-11-20 11:59:02 +01:00
Ilan Peer
64c277f632
wifi: iwlwifi: mvm: Don't always bind/link the P2P Device interface
...
[ Upstream commit 84ef7cbe90 ]
It is not necessary to keep the P2P Device bound/linked to a PHY
context when there is no active ROC.
Modify the P2P Device flows so the binding/linking would be done
only while ROC is active. With this change the switch_phy_ctxt()
is no longer needed so remove 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/20231004123422.c5b83b4bf9de.Ia80daf3ba0b5fec7d0919247fcbdbdb58bddf02b@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
Stable-dep-of: 43874283ce ("wifi: iwlwifi: mvm: fix iwl_mvm_mac_flush_sta()")
Signed-off-by: Sasha Levin <sashal@kernel.org >
2023-11-20 11:59:02 +01:00
Avraham Stern
ffe001badd
wifi: iwlwifi: mvm: update station's MFP flag after association
...
[ Upstream commit 5a86dcb4a9 ]
The management frames protection flag is always set when the station
is not yet authorized. However, it was not cleared after association
even if the association did not use MFP. As a result, all public
action frames are not parsed by fw (which will cause FTM to fail,
for example). Update the station MFP flag after the station is
authorized.
Fixes: 4c8d5c8d07 ("wifi: iwlwifi: mvm: tell firmware about per-STA MFP enablement")
Signed-off-by: Avraham Stern <avraham.stern@intel.com >
Signed-off-by: Gregory Greenman <gregory.greenman@intel.com >
Link: https://lore.kernel.org/r/20230926110319.2488cbd01bde.Ic0f08b7d3efcbdce27ec897f84d740fec8d169ef@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
Signed-off-by: Sasha Levin <sashal@kernel.org >
2023-11-20 11:59:02 +01:00
Johannes Berg
d09d290ae3
wifi: iwlwifi: mvm: support flush on AP interfaces
...
Support TX flush on AP interfaces so that we will do a
proper flush for frames on the queue before keys are
removed.
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
Signed-off-by: Gregory Greenman <gregory.greenman@intel.com >
Link: https://lore.kernel.org/r/20230816104355.f4b749b91ec2.Ia8381bd4f7d47592e74387c564739798a01c4049@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2023-08-22 13:19:24 +02:00
Johannes Berg
b336633070
wifi: iwlwifi: mvm: advertise MLO only if EHT is enabled
...
If 11ax/EHT is disabled, then we shouldn't advertise MLO
support either.
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
Signed-off-by: Gregory Greenman <gregory.greenman@intel.com >
Link: https://lore.kernel.org/r/20230816104355.ae4f9151440e.I6ce0b98d063d5005fd7a613454fcdb8b866a417a@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2023-08-22 13:19:23 +02:00
Johannes Berg
de10760081
wifi: iwlwifi: mvm: check only affected links
...
When hostapd starts up, it may start up with only one link
while the other is still scanning for overlapping BSSes. A
station might start to connect at this point, but we run
into this warning instead. Since there's no need to check
for _all_ links, restrict the check to just the affected
links that the STA will be using.
Fixes: 57974a55d9 ("wifi: iwlwifi: mvm: refactor iwl_mvm_mac_sta_state_common()")
Reported-by: Miri Korenblit <miriam.rachel.korenblit@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/20230620125813.c3d5a006ec21.Ib4715381f598f4c18d67cd9598ebd5cdbe7d2b09@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2023-06-21 14:02:16 +02:00
Johannes Berg
a6cc6ccb1c
wifi: iwlwifi: mvm: support new flush_sta method
...
For iwlwifi this is simple to implement, and on newer hardware
it's an improvement since we have per-station queues.
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
Signed-off-by: Gregory Greenman <gregory.greenman@intel.com >
Link: https://lore.kernel.org/r/20230620125813.a1f8ec20b727.I48594b708b41aa55dc2b8c3d346b4412ad3a5ba3@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2023-06-21 14:02:16 +02:00
Emmanuel Grumbach
e119e740b1
wifi: iwlwifi: mvm: make iwl_mvm_set_fw_mu_edca_params mld aware
...
We need to work on the right link there.
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com >
Signed-off-by: Gregory Greenman <gregory.greenman@intel.com >
Link: https://lore.kernel.org/r/20230620125813.8762a90e8857.Ic5b8e96140a449fd1ed7008907d67fc36fe98506@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2023-06-21 14:02:15 +02:00
Johannes Berg
edcda51d99
wifi: iwlwifi: mvm: remove new checksum code
...
The hardware isn't going to get fixed, so this mode cannot work
in the foreseeable future. Remove it.
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
Signed-off-by: Gregory Greenman <gregory.greenman@intel.com >
Link: https://lore.kernel.org/r/20230614145722.ddbc16c4affe.Ia6921e4b8a9624d4f57489ac775105ed0e400313@changeid
[restore original subject]
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2023-06-19 12:05:24 +02:00
Emmanuel Grumbach
1724fc781f
wifi: iwlwifi: mvm: allow ADD_STA not to be advertised by the firwmare
...
Newest firmware don't advertise the version of ADD_STA because it has
been replaced by another command. There are old firmware images
that also don't advertise it. Replace all the checks with a new
inline, and in that check for either MLD API or the ADD_STA
command version.
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com >
Signed-off-by: Gregory Greenman <gregory.greenman@intel.com >
Link: https://lore.kernel.org/r/20230613155501.4b9305510223.I7cc143d87186f8441e9b8435cc550b76734c7eef@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2023-06-14 12:32:20 +02:00
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
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
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
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
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
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
Johannes Berg
10f5ae2194
Merge wireless into wireless-next
...
There are a number of upcoming things in both the stack and
drivers that would otherwise conflict, so merge wireless to
wireless-next to be able to avoid those conflicts.
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2023-06-07 19:49:36 +02:00
Johannes Berg
7d528eafc5
Revert "wifi: iwlwifi: update response for mcc_update command"
...
This reverts commit b70813e4a8 ("wifi: iwlwifi: update response
for mcc_update command") since it causes a merge conflict, and it
seems easier to redo the patch later.
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2023-06-06 15:28:34 +02:00
Johannes Berg
fccf5ff14e
wifi: iwlwifi: mvm: remove warning for beacon filtering error
...
This warning is sometimes happening if we force a FW error
while disconnecting, which is annoying but harmless.
However, it's also pointless to throw a warning here, since
the stack and driver state doesn't really help, so just
remove that so the driver will ignore the error if any.
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
Signed-off-by: Gregory Greenman <gregory.greenman@intel.com >
Link: https://lore.kernel.org/r/20230531194630.29fe6990d372.I00ff5dc7bfb4025a609f380a0a3911d842b72449@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2023-06-06 13:40:33 +02:00
Abhishek Naik
b70813e4a8
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/20230524203151.fd9016f8f994.Ibddcb9fbfa74895f742c0ac20968720691c94853@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2023-06-06 13:38:07 +02:00
Johannes Berg
1be4858ec4
wifi: iwlwifi: mvm: dissolve iwl_mvm_mac_add_interface_common()
...
This wasn't really common anymore, so dissolve it, it has a
pretty strange calling convention that's confusing.
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
Signed-off-by: Gregory Greenman <gregory.greenman@intel.com >
Link: https://lore.kernel.org/r/20230524203151.44320ab2e842.Ie1d6b9c28caca3b541ca383a4c0c8799b0e72fe0@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2023-06-06 13:03:20 +02:00
Johannes Berg
a2906ea60a
wifi: iwlwifi: mvm: make internal callback structs const
...
There's no need for these to be writable, so they can
be const (and static).
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
Signed-off-by: Gregory Greenman <gregory.greenman@intel.com >
Link: https://lore.kernel.org/r/20230524203151.c41eb6687868.I2dac1158e5723187bda1973aa49fde8a794621c8@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2023-06-06 13:03:09 +02:00
Miri Korenblit
207be64f4e
wifi: iwlwifi: Don't use valid_links to iterate sta links
...
This bitmap equals to zero when in a non-MLO mode, and then we won't
be iterating on any link. Use for_each_sta_active_link() instead, as
it handles also the case of non-MLO mode.
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/20230514120631.f32a8c08730a.Ib02248cd0b7f2bc885f91005c3c110dd027f9dcd@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2023-05-16 10:27:05 -07:00
Johannes Berg
783336b05f
wifi: iwlwifi: mvm: always free dup_data
...
There are some assertions in the STA removal code that can
fail, and in that case we may leak memory since we skip
the freeing.
Fix this by freeing the dup_data earlier in the function,
we already have a check for when we free the station, and
this we don't need to do it with and without MLD API, so
it's a win all around.
Fixes: a571f5f635 ("iwlwifi: mvm: add duplicate packet detection per rx queue")
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
Signed-off-by: Gregory Greenman <gregory.greenman@intel.com >
Link: https://lore.kernel.org/r/20230514120631.173938681d72.Iff4b55fc52943825d6e3e28d78a24b155ea5cd22@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2023-05-16 10:27:04 -07:00
Gregory Greenman
0120e6b3e3
wifi: iwlwifi: mvm: enable support for MLO APIs
...
Enable driver's support for MLO APIs to unlock this functionality.
Signed-off-by: Gregory Greenman <gregory.greenman@intel.com >
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
Link: https://lore.kernel.org/r/20230418122405.0ae0dd6f0481.Iec993cf0f28eacb2483fb9d1e755b0b2fd62e163@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2023-04-20 11:45:55 +02:00
Johannes Berg
3e75668be5
wifi: iwlwifi: mvm: prefer RCU_INIT_POINTER()
...
For constant values we don't need rcu_assign_pointer(),
use RCU_INIT_POINTER() instead.
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
Signed-off-by: Gregory Greenman <gregory.greenman@intel.com >
Link: https://lore.kernel.org/r/20230418122405.7b400d21a27f.Iccdef9d777677390a9881c88b06c0ed13a83d978@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2023-04-20 11:45:55 +02:00
Johannes Berg
15d4183425
wifi: iwlwifi: mvm: remove RS rate init update argument
...
Track instead whether or not the station was authorized, that's
clearer than trying to indicate in the code whether or not the
full bandwidth should be used via an 'update' argument.
While at it, give rs_fw_rate_init() the iwl_mvm_ prefix.
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
Signed-off-by: Gregory Greenman <gregory.greenman@intel.com >
Link: https://lore.kernel.org/r/20230417113648.92bd8d36e311.I1877a109104d5ffeaaad6a623e89f0c44decc38e@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2023-04-18 14:47:55 +02:00
Johannes Berg
c45217bd3f
wifi: iwlwifi: mvm: only clients can be 20MHz-only
...
Since only clients to an AP can be 20MHz-only STAs, adjust the
code to not make the use of EHT capabilities depend on only the
bandwidth, but also the type of interface.
Fixes: 701404f109 ("wifi: iwlwifi: rs: add support for parsing max MCS per NSS/BW in 11be")
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
Signed-off-by: Gregory Greenman <gregory.greenman@intel.com >
Link: https://lore.kernel.org/r/20230417113648.a3a4c931e4a3.I693a07f4d88044c889eee04793883a83bc5ee362@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2023-04-18 14:47:55 +02:00
Johannes Berg
a705a78281
wifi: iwlwifi: mvm: fix iwl_mvm_sta_rc_update for MLO
...
When this is called it might crash due to the use of
deflink's phy context, update all links instead. It
really shouldn't be called right now though, but it's
better to have safer code until we update this to be
with a link parameter.
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
Signed-off-by: Gregory Greenman <gregory.greenman@intel.com >
Link: https://lore.kernel.org/r/20230417113648.fd47d0de8319.I87c5e5bcb2fadd70acc32021eed394fc1eea12a4@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2023-04-18 14:47:55 +02:00
Johannes Berg
d16b96b5fd
wifi: iwlwifi: mvm: allow NL80211_EXT_FEATURE_SCAN_MIN_PREQ_CONTENT
...
We can allow NL80211_EXT_FEATURE_SCAN_MIN_PREQ_CONTENT since we
just use the elements from mac80211.
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
Signed-off-by: Gregory Greenman <gregory.greenman@intel.com >
Link: https://lore.kernel.org/r/20230417113648.88b1a70365fd.If5030437707ab67e2146291c1517a9b0e31d01ab@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2023-04-18 14:47:54 +02:00
Johannes Berg
d3f9cd61b1
wifi: iwlwifi: mvm: validate station properly in flush
...
If we have MLO, then the deflink.ap_sta_id cannot be used.
However, we can use the new mvmvif->ap_sta pointer for the
validation instead.
Also don't do it multiple times for different FW instances
of the same AP STA (TDLS STAs are only on a single link).
Note that this isn't really working right yet since the
underlying flush code hasn't been updated yet to know of
multiple link STAs.
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
Signed-off-by: Gregory Greenman <gregory.greenman@intel.com >
Link: https://lore.kernel.org/r/20230414130637.7d747df44d65.Ie5392859fab4cfb73c20b49bfee2caadef5fd8ec@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2023-04-14 13:15:27 +02:00
Johannes Berg
d066a530af
wifi: iwlwifi: mvm: fix ptk_pn memory leak
...
If adding a key to firmware fails we leak the allocated ptk_pn.
This shouldn't happen in practice, but we should still fix it.
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
Signed-off-by: Gregory Greenman <gregory.greenman@intel.com >
Link: https://lore.kernel.org/r/20230414130637.99446ffd02bc.I82a2ad6ec1395f188e0a1677cc619e3fcb1feac9@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2023-04-14 13:15:27 +02:00
Johannes Berg
0c9a8f9084
wifi: iwlwifi: mvm: track AP STA pointer and use it for MFP
...
Instead of relying on the AP STA ID and dereferencing our
firmware -> mac80211 STA array when we really only need
the STA, not the per-link information (and might not have
it, e.g. for a pairwise key installation where this is
relevant), keep track of the AP STA as a pointer to the
mac80211 STA, protected by the mutex. Then use it here in
the key code instead.
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
Signed-off-by: Gregory Greenman <gregory.greenman@intel.com >
Link: https://lore.kernel.org/r/20230414130637.7db01b1508de.I88e6d252cdb0a6e4581d7c5fd7cbc037b4fd40ae@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2023-04-14 13:15:27 +02:00
Miri Korenblit
fb40cd9d91
wifi: iwlwifi: mvm: cleanup beacon_inject_active during hw restart
...
beacon_inject_active turns true and false via debugfs when we inject a
beacon. During the time of the beacon injection we can't configure the
FW with a beacon cmd. If we have a hw restart during the beacon injection
then in the recovery flow we will not be able to configure the beacon
cmd to the FW. Fix this by cleaning up this variable after an hw restart.
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/20230413213309.b021bce5e162.Ia5a0a0b5d8734f63077ceaac936176a345f8d3d1@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2023-04-14 13:14:50 +02:00
Johannes Berg
784d4a4258
wifi: iwlwifi: mvm: request limiting to 8 MSDUs per A-MSDU
...
Due to hardware limitations when splitting up A-MSDUs, it
cannot handle an arbitrary number of MSDUs per A-MSDU. Set
the bits to ask transmitters to send only 8 MSDUs in one
A-MSDU.
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
Signed-off-by: Gregory Greenman <gregory.greenman@intel.com >
Link: https://lore.kernel.org/r/20230413213309.e6c518f2724f.I15c13d13b38289edbcd64f67d57cf18f6026457a@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2023-04-14 13:14:50 +02:00
Johannes Berg
a0c8ab93eb
wifi: iwlwifi: mvm: refactor TX csum mode check
...
There are two modes now, and we have two places checking
that must be in sync. Refactor the logic into a new small
helper function.
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
Signed-off-by: Gregory Greenman <gregory.greenman@intel.com >
Link: https://lore.kernel.org/r/20230413102635.ef6246f4b73b.I44820ec095634dd0bba3007465cf25e4ce1c77c6@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2023-04-13 16:30:00 +02:00
Johannes Berg
d34d11aea2
wifi: iwlwifi: mvm: fix A-MSDU checks
...
Since Gl A-step devices use the old checksum hardware,
we shouldn't use the Bz code to check for A-MSDU
combining ability; fix that.
Fixes: ec18e7d4d2 ("wifi: iwlwifi: mvm: use old checksum for Bz A-step")
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
Signed-off-by: Gregory Greenman <gregory.greenman@intel.com >
Link: https://lore.kernel.org/r/20230413102635.8c445b943fee.Ibf772102ca712f59e2ee0cdd4c344011fcf445aa@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2023-04-13 16:29:59 +02:00
Jakub Kicinski
ce7928f7cf
Merge tag 'wireless-next-2023-03-30' of git://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless-next
...
Johannes Berg says:
====================
Major stack changes:
* TC offload support for drivers below mac80211
* reduced neighbor report (RNR) handling for AP mode
* mac80211 mesh fast-xmit and fast-rx support
* support for another mesh A-MSDU format
(seems nobody got the spec right)
Major driver changes:
Kalle moved the drivers that were just plain C files
in drivers/net/wireless/ to legacy/ and virtual/ dirs.
hwsim
* multi-BSSID support
* some FTM support
ath11k
* MU-MIMO parameters support
* ack signal support for management packets
rtl8xxxu
* support for RTL8710BU aka RTL8188GU chips
rtw89
* support for various newer firmware APIs
ath10k
* enabled threaded NAPI on WCN3990
iwlwifi
* lots of work for multi-link/EHT (wifi7)
* hardware timestamping support for some devices/firwmares
* TX beacon protection on newer hardware
* tag 'wireless-next-2023-03-30' of git://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless-next: (181 commits)
wifi: clean up erroneously introduced file
wifi: iwlwifi: mvm: correctly use link in iwl_mvm_sta_del()
wifi: iwlwifi: separate AP link management queues
wifi: iwlwifi: mvm: free probe_resp_data later
wifi: iwlwifi: bump FW API to 75 for AX devices
wifi: iwlwifi: mvm: move max_agg_bufsize into host TLC lq_sta
wifi: iwlwifi: mvm: send full STA during HW restart
wifi: iwlwifi: mvm: rework active links counting
wifi: iwlwifi: mvm: update mac config when assigning chanctx
wifi: iwlwifi: mvm: use the correct link queue
wifi: iwlwifi: mvm: clean up mac_id vs. link_id in MLD sta
wifi: iwlwifi: mvm: fix station link data leak
wifi: iwlwifi: mvm: initialize max_rc_amsdu_len per-link
wifi: iwlwifi: mvm: use appropriate link for rate selection
wifi: iwlwifi: mvm: use the new lockdep-checking macros
wifi: iwlwifi: mvm: remove chanctx WARN_ON
wifi: iwlwifi: mvm: avoid sending MAC context for idle
wifi: iwlwifi: mvm: remove only link-specific AP keys
wifi: iwlwifi: mvm: skip inactive links
wifi: iwlwifi: mvm: adjust iwl_mvm_scan_respect_p2p_go_iter() for MLO
...
====================
Link: https://lore.kernel.org/r/20230330205612.921134-1-johannes@sipsolutions.net
Signed-off-by: Jakub Kicinski <kuba@kernel.org >
2023-03-30 23:52:20 -07:00
Gregory Greenman
9deccfcd48
wifi: iwlwifi: mvm: rework active links counting
...
Remove fw_active_links_num counter since we now have a bitmap of
active links in vif. Also, update link activation status only when
LINK_CONTEXT_MODIFY_ACTIVE bit set in changes parameter.
Signed-off-by: Gregory Greenman <gregory.greenman@intel.com >
Link: https://lore.kernel.org/r/20230329100040.1ecfb27b6b84.I3a5e0bc32b3728e4caae8a231bc3f04ea1d89cad@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2023-03-30 12:08:43 +02:00
Johannes Berg
0d504ca1f1
wifi: iwlwifi: mvm: use the new lockdep-checking macros
...
Use the new macros from mac80211 that do lockdep checking
on the RCU dereferences, instead of hard-coding 1 as the
argument to rcu_dereference_protected().
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
Signed-off-by: Gregory Greenman <gregory.greenman@intel.com >
Link: https://lore.kernel.org/r/20230329100039.112df5c8dec2.I1a1008f5566e509953d988f254d15c9e58630418@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2023-03-30 12:08:41 +02:00
Johannes Berg
072573f697
wifi: iwlwifi: mvm: remove only link-specific AP keys
...
When we remove the AP station, we iterate over the links
and remove all the keys, however, the key iteration will
return all keys for all links, so skip the ones that we
don't need based on the link ID.
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
Signed-off-by: Gregory Greenman <gregory.greenman@intel.com >
Link: https://lore.kernel.org/r/20230329100039.e724878f502e.I66870d4629244b4b309be79e11cbbd384bdf93be@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2023-03-30 12:08:40 +02:00
Johannes Berg
f14ad95a5d
wifi: iwlwifi: mvm: skip inactive links
...
When iterating station links, skip the links that are not
yet active by checking for mvmvif->link[] existence.
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
Signed-off-by: Gregory Greenman <gregory.greenman@intel.com >
Link: https://lore.kernel.org/r/20230329100039.bd9b4e64c478.Ie21422c3bf2589d22942c3c57d26e6330d2e3afc@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2023-03-30 12:08:40 +02:00
Johannes Berg
b8a85a1d42
wifi: iwlwifi: mvm: rxmq: report link ID to mac80211
...
Add a fw_id_to_link_sta array in mvm to track the link
STA for each firmware station ID, and then use that to
report the link a frame was received on (since we know
the station ID from firmware).
Notably, this fixes beacon tracking for the correct link
since mac80211 now queues and processes those on the one
link identified by the link ID only.
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
Signed-off-by: Gregory Greenman <gregory.greenman@intel.com >
Link: https://lore.kernel.org/r/20230329100039.c7dd3ec18077.I12ef9eb4a5b8b5c2b9d6bcaa1fda73b59eba39d8@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2023-03-30 12:08:40 +02:00
Shaul Triebitz
90723da664
wifi: iwlwifi: mvm: translate management frame address
...
For management frames sent by an AP interface, translate
the MLD addresses to LINK addresses (for an MLD AP).
AP (non-bufferable) management frames are sent via
the broadcast station so the translation cannot be
done by the firmware.
Signed-off-by: Shaul Triebitz <shaul.triebitz@intel.com >
Signed-off-by: Gregory Greenman <gregory.greenman@intel.com >
Link: https://lore.kernel.org/r/20230329100039.3cb4292f51e8.Ia662c00ff271c70eda927c12ed49b045b1eb8489@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2023-03-30 12:08:39 +02:00
Gregory Greenman
f53be9c4be
wifi: iwlwifi: mvm: adjust rs init to MLO
...
Rate scale initialization needs some parameters stored
separately for each link. Pass link_conf and link_sta
pointers and adjust the relevant code accordingly.
Signed-off-by: Gregory Greenman <gregory.greenman@intel.com >
Link: https://lore.kernel.org/r/20230329100039.e2f458198844.I98bf3ea807dd8ae8d703915ce9c01e7b7d5ccb42@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2023-03-30 12:08:38 +02:00
Gregory Greenman
ba9eef6ba6
wifi: iwlwifi: mvm: adjust iwl_mvm_sec_key_remove_ap to MLO
...
It has to be done per link. We still don't support keys
configuration for several links, but the single vif link can
still point to a link different from deflink. For now handle
the removal of keys for the default link.
Signed-off-by: Gregory Greenman <gregory.greenman@intel.com >
Link: https://lore.kernel.org/r/20230329100039.19d729cc4654.I4ebe8e3eb5fc00a994761f7c0ad40107382705ca@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2023-03-30 12:08:38 +02:00
Johannes Berg
6a2a71e563
wifi: iwlwifi: mvm: make a few warnings only trigger once
...
We're hitting these while starting to enable MLO in the
driver, but getting them each and every time isn't very
useful one way or the other. Make these warnings trigger
only once.
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
Signed-off-by: Gregory Greenman <gregory.greenman@intel.com >
Link: https://lore.kernel.org/r/20230329100039.f333741d3dcf.If063d4cfe8a583f0f980a1b0ae4e63e17ba4ddc9@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2023-03-30 12:08:38 +02:00
Johannes Berg
6c07b73e70
wifi: iwlwifi: mvm: skip MEI update for MLO
...
For now, if using MLO, skip the MEI update. It probably
needs new API for multiple channels.
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
Signed-off-by: Gregory Greenman <gregory.greenman@intel.com >
Link: https://lore.kernel.org/r/20230329100039.aeaa746b14e7.I42b084f3cdc20bb52cf867700a3c2e1f5e7b4ecb@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2023-03-30 12:08:36 +02:00