Johannes Berg
91b9f31d5c
wifi: iwlwifi: mvm: remove extra link ID
...
Since the iwlmvm driver now only supports pre-MLO devices,
we no longer need to maintain an extra explicit link ID;
valid MAC IDs and link IDs are both in the range 0-3 and
the driver always has a 1:1 MAC/link correspondence. Thus,
simply use the MAC ID as the link ID as well.
This simplifies some further work because on RX the ID is
given but there is some confusion about which versions of
the firmware report MAC and which report link ID.
While at it, clarify iwl_mvm_handle_missed_beacons_notif()
code a bit so it doesn't look like an invalid vif pointer
is being used.
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com >
Link: https://patch.msgid.link/20250711183056.005aa5fe34fe.Ib0c1187453f46ce49dc0f9f58907ee21f5b52634@changeid
2025-07-14 19:36:13 +03:00
Johannes Berg
ed34e90554
wifi: iwlwifi: mvm: remove HT greenfield support
...
No hardware that uses iwlmvm actually supports HT greenfield.
Remove the support and then clean up the v1 rate API by doing
a conversion to v2 rate API, the only thing v1 covered that
couldn't be done in v2 was HT greenfield.
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com >
Link: https://patch.msgid.link/20250504132447.805ec090c61f.Iafd87f62ceb463b72f861a5348078999dcaace92@changeid
2025-05-07 06:08:01 +03:00
Johannes Berg
d586137848
wifi: iwlwifi: trans: collect device information
...
Add a new device information 'info' substruct to the transport
that's const and can only be set by a special helper, and move
some information there.
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com >
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com >
Link: https://patch.msgid.link/20250503224232.cd80cb55403c.Ic18524b66d655fad734bf97192a54d9cfa9fdf1f@changeid
2025-05-07 06:08:00 +03:00
Somashekhar(Som)
a2ba52b3a9
wifi: iwlwifi: add channel_load_not_by_us in iwl_mvm_phy_ctxt
...
Adding channel_load_not_by_us in the mvm phy context.
Signed-off-by: Somashekhar(Som) <somashekhar.puttagangaiah@intel.com >
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com >
Link: https://patch.msgid.link/20241228223206.7c7f3ebebadf.Ifac005cf1e3b02cba0861eb19bfd8099957faad9@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2025-01-13 15:26:40 +01:00
Benjamin Berg
83bb3633a2
wifi: iwlwifi: mvm: skip short statistics window when updating EMLSR
...
The statistics are not synchronized with the time that we enter EMLSR.
This means that we can receive the statistic notification just after
having cleared the counters, causing us to immediately exit EMLSR again.
Fix this by checking that most of the time for the window has passed. If
that is not the case, ignore this window and wait for the next
notification.
Signed-off-by: Benjamin Berg <benjamin.berg@intel.com >
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com >
Link: https://patch.msgid.link/20241227095718.0eb0f2044535.Ic2af92737ccfc873f3b6c228704238ebb9f983ca@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2025-01-13 14:01:51 +01:00
Emmanuel Grumbach
dc40fde446
wifi: iwlwifi: mvm: MLO scan upon channel condition degradation
...
This will allow to prevent disconnections.
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com >
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com >
Link: https://patch.msgid.link/20241028135215.6402718fbc94.Ia6ce651cc7c96f7aaeee449737dd28ed291788a6@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2024-11-07 14:42:29 +01:00
Al Viro
5f60d5f6bb
move asm/unaligned.h to linux/unaligned.h
...
asm/unaligned.h is always an include of asm-generic/unaligned.h;
might as well move that thing to linux/unaligned.h and include
that - there's nothing arch-specific in that header.
auto-generated by the following:
for i in `git grep -l -w asm/unaligned.h`; do
sed -i -e "s/asm\/unaligned.h/linux\/unaligned.h/" $i
done
for i in `git grep -l -w asm-generic/unaligned.h`; do
sed -i -e "s/asm-generic\/unaligned.h/linux\/unaligned.h/" $i
done
git mv include/asm-generic/unaligned.h include/linux/unaligned.h
git mv tools/include/asm-generic/unaligned.h tools/include/linux/unaligned.h
sed -i -e "/unaligned.h/d" include/asm-generic/Kbuild
sed -i -e "s/__ASM_GENERIC/__LINUX/" include/linux/unaligned.h tools/include/linux/unaligned.h
2024-10-02 17:23:23 -04:00
Miri Korenblit
b61ed2b809
wifi: iwlwifi: s/IWL_MVM_STATION_COUNT_MAX/IWL_STATION_COUNT_MAX
...
This isn't mvm specific.
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com >
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com >
Link: https://patch.msgid.link/20240901071542.5d71a0a2b56c.I7e0fe636d914852963e7a2f5e6037d0c3e367145@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2024-09-03 11:55:26 +02:00
Miri Korenblit
36a95e9c51
wifi: iwlwifi: mvm: add and improve EMLSR debug info
...
Add prints of the per-link MPDU counters, and change the other MPDU
counters related prints to use DL_INFO, which is already used for all
EMLSR tests anyway, instead of DL_STATS which pollutes the logs with all
the RX signal info.
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com >
Reviewed-by: Daniel Gabay <daniel.gabay@intel.com >
Link: https://patch.msgid.link/20240729201718.02bd85837c87.I85480c9c4fab0f7a574dd69cbeafd82674146921@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2024-08-27 10:15:15 +02:00
Miri Korenblit
cb2b6ce8b2
wifi: iwlwifi: remove MVM prefix from FW macros
...
These are not mvm specific.
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com >
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com >
Link: https://patch.msgid.link/20240729201718.939b32f84f46.I293957bf172680871eba24448d9d1870e49100b6@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2024-08-27 10:14:26 +02:00
Jakub Kicinski
76ed626479
Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
...
Cross-merge networking fixes after downstream PR.
Conflicts:
drivers/net/phy/aquantia/aquantia.h
219343755e ("net: phy: aquantia: add missing include guards")
61578f6793 ("net: phy: aquantia: add support for PHY LEDs")
drivers/net/ethernet/wangxun/libwx/wx_hw.c
bd07a98178 ("net: txgbe: remove separate irq request for MSI and INTx")
b501d261a5 ("net: txgbe: add FDIR ATR support")
https://lore.kernel.org/all/20240703112936.483c1975@canb.auug.org.au/
include/linux/mlx5/mlx5_ifc.h
048a403648 ("net/mlx5: IFC updates for changing max EQs")
99be56171f ("net/mlx5e: SHAMPO, Re-enable HW-GRO")
https://lore.kernel.org/all/20240701133951.6926b2e3@canb.auug.org.au/
Adjacent changes:
drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c
4130c67cd1 ("wifi: iwlwifi: mvm: check vif for NULL/ERR_PTR before dereference")
3f3126515f ("wifi: iwlwifi: mvm: add mvm-specific guard")
include/net/mac80211.h
816c6bec09 ("wifi: mac80211: fix BSS_CHANGED_UNSOL_BCAST_PROBE_RESP")
5a009b42e0 ("wifi: mac80211: track changes in AP's TPE")
Signed-off-by: Jakub Kicinski <kuba@kernel.org >
2024-07-04 14:16:11 -07:00
Miri Korenblit
4130c67cd1
wifi: iwlwifi: mvm: check vif for NULL/ERR_PTR before dereference
...
iwl_mvm_get_bss_vif might return a NULL or ERR_PTR. Some of the callers
check only the NULL case, and some doesn't check at all.
Some of the callers even have a pointer to the mvmvif of the bss vif,
so we don't even need to call this function, and can simply get the vif
from mvmvif. Do it for those cases, and for the others - properly check
if IS_ERR_OR_NULL
Fixes: ec0d43d26f ("wifi: iwlwifi: mvm: Activate EMLSR based on traffic volume")
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com >
Link: https://patch.msgid.link/20240703064027.a661f8c65aac.I45cf09b01af8ee3d55828863958ead741ea43b7f@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2024-07-03 16:06:54 +02:00
Johannes Berg
28e02bc9f4
wifi: iwlwifi: mvm: avoid link lookup in statistics
...
We already iterate the link bss_conf/link_info and have the
pointer, or know that deflink/bss_conf is used, so avoid an
extra lookup and just pass the pointer. This may also avoid
a crash when this is processed during restart, where the FW
to link conf array (link_id_to_link_conf) may be NULLed out.
Fixes: c1e458b987 ("wifi: iwlwifi: mvm: Move beacon filtering to be per link")
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
Reviewed-by: Ilan Peer <ilan.peer@intel.com >
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com >
Link: https://patch.msgid.link/20240703064026.346a6ef67a86.Iba5d65d728ca9f58518c88d029496c1250670544@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2024-07-03 16:06:05 +02:00
Miri Korenblit
6958c4becd
wifi: iwlwifi: mvm: add debug data for MPDU counting
...
It is hard to debug issues of EMLSR entry/exit due to low throughput.
Add debug data.
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com >
Reviewed-by: Johannes Berg <johannes.berg@intel.com >
Link: https://msgid.link/20240527190228.77ef3c2654dc.I1796a3995da2a49dd5102d33766af1ad416dd60b@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2024-05-29 10:33:52 +02:00
Miri Korenblit
df966c93f5
wifi: iwlwifi: mvm: exit EMLSR if secondary link is not used
...
Exit EMLSR mode if the secondary link is not used enough for Rx/Tx
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com >
Reviewed-by: Johannes Berg <johannes.berg@intel.com >
Link: https://msgid.link/20240506095953.99ad1d71e9b9.Ide825433488ec809773efdc36937e3089d0012df@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2024-05-06 16:33:26 +02:00
Miri Korenblit
ec0d43d26f
wifi: iwlwifi: mvm: Activate EMLSR based on traffic volume
...
Adjust EMLSR activation to account for traffic levels. By
tracking the number of RX/TX MPDUs, EMLSR will be activated only when
traffic volume meets the required threshold.
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com >
Link: https://msgid.link/20240505091420.9480f99ac8fc.If9eb946e929a39e10fe5f4638bc8bc3f8976edf1@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2024-05-06 16:33:23 +02:00
Miri Korenblit
30ce039094
wifi: iwlwifi: mvm: Don't allow EMLSR when the RSSI is low
...
If the RSSI of a link is low enough, don't use it for EMLSR.
If EMLSR is already active and the RSSI of one of the links gets low,
exit EMLSR by deactivating that link.
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com >
Link: https://msgid.link/20240416134215.73263c000263.Ieb2b18855a2719b5e18ad2fa8a3e855ca4e23938@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2024-04-19 10:16:34 +02:00
Miri Korenblit
9c69211219
wifi: iwlwifi: mvm: calculate EMLSR mode after connection
...
The function iwl_mvm_can_enter_esr() is (among others) calculating
if EMLSR mode is disabled due to BT coex by calling
iwl_mvm_bt_coex_calculate_esr_mode(), then stores the decision in
mvmvif::esr_disable_reason.
But there is no need to calculate this every time iwl_mvm_can_enter_esr
is called. Fix this by calculating it once after authorization,
and in iwl_mvm_can_enter_esr only check mvmvif::esr_disable_reason.
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com >
Link: https://msgid.link/20240416134215.a767e243366e.I3b32d36cda23f67dc103a28a9bdccb0039d22574@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2024-04-19 10:16:32 +02:00
Ilan Peer
c1e458b987
wifi: iwlwifi: mvm: Move beacon filtering to be per link
...
As the FW statistics are per link context and not per MAC context.
Signed-off-by: Ilan Peer <ilan.peer@intel.com >
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com >
Link: https://msgid.link/20240311081938.47bdecc68e73.Icc0eaebb35d119f8c538c068fbc8f874aac194c3@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2024-03-25 15:36:03 +01:00
Miri Korenblit
740dfecc33
wifi: iwlwifi: handle per-phy statistics from fw
...
In the operational statistics notifications (both old and new
API) the driver receives the statistics per phy.
currently this statistics wasn't handled because they wasn't needed.
Now the channel_load_by_us parameter in these statistics will be used
for the link grading calculation (implemented in another patch),
so store its value in phy_ctxt.
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com >
Reviewed-by: Johannes Berg <johannes.berg@intel.com >
Link: https://msgid.link/20240218194912.e84f975b69ee.Ibbc7817135827e45adaaa47b796be165f9f1ca48@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2024-02-21 15:19:05 +01:00
Miri Korenblit
10159a4566
wifi: iwlwifi: disable eSR when BT is active
...
eSR should be disabled when BT Coex is active and:
- LB link is the primary link.
- LB link is the secondary link and the predicted BT penalty
(the wifi loss rate caused by BT interference) is higher
than a given threshold.
If one of the conditions above is no longer true then re-enable eSR.
In order to implement this, add support for version 5 of
BT_PROFILE_NOTIFICATION, in which the bt penalty is provided
by FW.
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com >
Reviewed-by: Gregory Greenman <gregory.greenman@intel.com >
Link: https://msgid.link/20240131225342.b922b6485af8.I7d808ce535a7372aca9cb85c045755e6788a4904@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2024-02-02 13:46:28 +01:00
Anjaneyulu
b6e3d1ba4f
wifi: iwlwifi: mvm: implement new firmware API for statistics
...
The new firmware API uses a new command and notification,
the command configures in which statistics types driver is
interested and the notification is sent periodically.
An additional change in the API is that most of the statistics
data is accumulated and reported by the firmware per MLO link.
Implement new command and notification handlers and adjust to
per-link statistics.
Signed-off-by: Anjaneyulu <pagadala.yesu.anjaneyulu@intel.com >
Signed-off-by: Gregory Greenman <gregory.greenman@intel.com >
Link: https://lore.kernel.org/r/20231022173519.8cc7df0ebff2.If1dcb57145841c5b3c68ed112bbfcd0201f7acc3@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2023-10-23 12:49:29 +02:00
Anjaneyulu
aedb2b38ad
wifi: iwlwifi: mvm: Validate tid is in valid range before using it
...
Validate tid is less then MAX TID when it is used to access
corresponding arrays.
Signed-off-by: Anjaneyulu <pagadala.yesu.anjaneyulu@intel.com >
Signed-off-by: Gregory Greenman <gregory.greenman@intel.com >
Link: https://lore.kernel.org/r/20230614123447.cea75e1f57e7.I03bc0a81d2c1bdbf4784c12c4c62b8538892ccba@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2023-06-19 12:05:26 +02:00
Ayala Beker
8e5a26360c
wifi: iwlwifi: mvm: don't drop unencrypted MCAST frames
...
MCAST frames are filtered out by the driver if we are not
authorized yet.
Fix it to filter out only protected frames.
Fixes: 147eb05f24 ("iwlwifi: mvm: always tell the firmware to accept MCAST frames in BSS")
Signed-off-by: Ayala Beker <ayala.beker@intel.com >
Signed-off-by: Gregory Greenman <gregory.greenman@intel.com >
Link: https://lore.kernel.org/r/20230413213309.9cedcc27db60.I8fb7057981392660da482dd215e85c15946d3f4b@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2023-04-14 13:14:49 +02:00
Gregory Greenman
c8ee33e184
wifi: iwlwifi: mvm: sta preparation for MLO
...
Split iwl_mvm_sta into general and link specific parts. As a first
step, all link dependent parameters reside in deflink.
The change was done mostly using the spatch below with some manual
adjustments.
@iwl_mvm_sta@
struct iwl_mvm_sta *s;
identifier var = {sta_id, lq_sta, avg_energy};
@@
(
s->
- var
+ deflink.var
)
Signed-off-by: Gregory Greenman <gregory.greenman@intel.com >
Link: https://lore.kernel.org/r/20230328104948.34eace06d583.I1f8c5e919a71b21030460fbdd220d42401b688b1@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2023-03-30 12:07:52 +02:00
Gregory Greenman
650cadb730
wifi: iwlwifi: mvm: vif preparation for MLO
...
In MLO, some fields of iwl_mvm_vif should be defined in the
context of a link. Define a separate structure for these fields and
add a deflink object to hold it as part of iwl_mvm_vif. Non-MLO legacy
code will use only deflink object while MLO related code will use the
corresponding link from the link array.
It follows the strategy applied in mac80211 for introducing MLO
changes.
The below spatch takes care of updating all driver code to access
fields separated into MLD specific data structure via deflink (need
to convert all references to the fields listed in var to deflink.var
and also to take care of calls like iwl_mvm_vif_from_mac80211(vif)->field).
@iwl_mld_vif@
struct iwl_mvm_vif *v;
struct ieee80211_vif *vv;
identifier fn;
identifier var = {bssid, ap_sta_id, bcast_sta, mcast_sta,
beacon_stats, smps_requests, probe_resp_data,
he_ru_2mhz_block, cab_queue, phy_ctxt,
queue_params};
@@
(
v->
- var
+ deflink.var
|
fn(vv)->
- var
+ deflink.var
)
Signed-off-by: Gregory Greenman <gregory.greenman@intel.com >
Link: https://lore.kernel.org/r/20230328104948.4896576f0a9f.Ifaf0187c96b9fe52b24bd629331165831a877691@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2023-03-30 12:07:52 +02:00
Mordechay Goodstein
774302d2d3
wifi: iwlwifi: mvm: clean up duplicated defines
...
VHT, HE and EHT rates use the same bits for NSS, so no need for
defines per PHY version.
Also use spatch to replace bit manipulation with FIELD_GET:
@@
identifier rate;
@@
-((rate & RATE_MCS_NSS_MSK) >> RATE_MCS_NSS_POS)
+FIELD_GET(RATE_MCS_NSS_MSK, rate)
Signed-off-by: Mordechay Goodstein <mordechay.goodstein@intel.com >
Signed-off-by: Gregory Greenman <gregory.greenman@intel.com >
Link: https://lore.kernel.org/r/20230305124407.167ed9477aa8.Ibd8e71d31896e8d8f067ce4e3a6e9a0e86c78f3f@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2023-03-07 20:15:18 +01:00
Golan Ben Ami
876882b515
wifi: iwlwifi: reduce verbosity of some logging events
...
These are cases in which we'd like to warn that something
unexpected happened but they may not be errors.
Reduce verbosity.
Signed-off-by: Golan Ben Ami <golan.ben.ami@intel.com >
Signed-off-by: Gregory Greenman <gregory.greenman@intel.com >
Link: https://lore.kernel.org/r/20230305124407.5eea0f58a74f.Ifb6b35903a5a452a757bfe50b6a7e58b3fd2ef23@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2023-03-07 17:13:38 +01:00
Emmanuel Grumbach
147eb05f24
iwlwifi: mvm: always tell the firmware to accept MCAST frames in BSS
...
Make the firmware's life easier and always accept MCAST frames. If
needed, drop them in the driver. We need to filter out MCAST frames
in order not to have false positives in the decryption check. If we
accept MCAST frames before we have the GKT installed, we'll end up
complaining that we can't decrypt the frame.
Implement the same filtering, but in the driver.
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com >
Signed-off-by: Gregory Greenman <gregory.greenman@intel.com >
Link: https://lore.kernel.org/r/20220517120045.479956a46317.I21fac7ede9eca85a662671d694872898df884f0b@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2022-05-18 12:54:08 +02:00
Dan Carpenter
f1cbb0a8ca
iwlwifi: mvm: fix off by one in iwl_mvm_stat_iterator_all_macs()
...
Change the comparison from ">" to ">=" to avoid accessing one element
beyond the end of the ->per_mac_stats[] array.
Fixes: 6324c173ff ("iwlwifi: mvm: add support for statistics update version 15")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com >
Link: https://lore.kernel.org/r/20220106071825.GA5836@kili
Signed-off-by: Luca Coelho <luciano.coelho@intel.com >
2022-02-18 10:40:55 +02:00
Johannes Berg
3827cb59b3
iwlwifi: avoid void pointer arithmetic
...
Avoid void pointer arithmetic since it's technically
undefined and causes warnings in some places that use
our code.
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
Signed-off-by: Luca Coelho <luciano.coelho@intel.com >
Link: https://lore.kernel.org/r/iwlwifi.20220128153014.e349104ecd94.Iadc937f475158b9437becdfefb361a97e7eaa934@changeid
Signed-off-by: Luca Coelho <luciano.coelho@intel.com >
2022-02-18 10:40:50 +02:00
Mordechay Goodstein
6324c173ff
iwlwifi: mvm: add support for statistics update version 15
...
The main changes are remove the respond from STATISTICS_CMD and sending
it with STATISTICS_NOTIFICATION, and updating for all mac id's and phy
id's in one notification.
Signed-off-by: Mordechay Goodstein <mordechay.goodstein@intel.com >
Signed-off-by: Luca Coelho <luciano.coelho@intel.com >
Link: https://lore.kernel.org/r/iwlwifi.20211204130722.832c7b599202.If192dce8f51ec13005999c3ff96fe09a73cd8f91@changeid
Signed-off-by: Luca Coelho <luciano.coelho@intel.com >
2021-12-07 20:06:40 +02:00
Miri Korenblit
48c6ebc13c
iwlwifi: mvm: update definitions due to new rate & flags
...
As a part of preparing to the new rate & flags version
Update the relevant definitions and use them.
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com >
Signed-off-by: Luca Coelho <luciano.coelho@intel.com >
Link: https://lore.kernel.org/r/iwlwifi.20211017123741.5862bf4f14c4.Ib476b5443faa085539b79d49a0aebd81a213b42f@changeid
Signed-off-by: Luca Coelho <luciano.coelho@intel.com >
2021-10-22 10:49:00 +03:00
Miri Korenblit
57b7b345d2
iwlwifi: mvm: Remove antenna c references
...
Since antenna c is not in use and won't be relevant after the new rate &
flags, remove all it's references
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com >
Signed-off-by: Luca Coelho <luciano.coelho@intel.com >
Link: https://lore.kernel.org/r/iwlwifi.20211017113927.5e39106ec75b.I4281edc844f734bf9591396a5cc8009ad37ccda8@changeid
Signed-off-by: Luca Coelho <luciano.coelho@intel.com >
2021-10-22 10:48:58 +03:00
Johannes Berg
1e1a58bec7
iwlwifi: mvm: check more notification sizes
...
Some notifications aren't handled by the general RX handler
code, due to multi-queue. Add size checks for them explicitly.
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
Signed-off-by: Luca Coelho <luciano.coelho@intel.com >
Link: https://lore.kernel.org/r/iwlwifi.20210117130510.1370c776cb31.Ic536bd1aee5368969fbf65db85b9b9b5dc9c6034@changeid
Signed-off-by: Luca Coelho <luciano.coelho@intel.com >
2021-02-05 11:52:27 +02:00
Johannes Berg
afc857bc2a
iwlwifi: mvm: add notification size checks
...
We shouldn't trust the firmware with the sizes (or contents)
of notifications, accessing too much data could cause page
faults if the data doesn't fit into the allocated space. This
applies more on older NICs where multiple notifications can
be in a single RX buffer.
Add a general framework for checking a minimum size of any
notification in the RX handlers and use it for most. Some RX
handlers were already checking and I've moved the checks,
some more complex checks I left and made them _NO_SIZE for
the RX handlers.
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
Signed-off-by: Luca Coelho <luciano.coelho@intel.com >
Link: https://lore.kernel.org/r/iwlwifi.20210117130510.3e155d5e5f90.I2121fa4ac7cd7eb98970d84b793796646afa3eed@changeid
Signed-off-by: Luca Coelho <luciano.coelho@intel.com >
2021-02-05 11:52:24 +02:00
Gustavo A. R. Silva
5a2abdcadc
iwlwifi: mvm: Fix fall-through warnings for Clang
...
In preparation to enable -Wimplicit-fallthrough for Clang, fix multiple
warnings by explicitly using the fallthrough pseudo-keyword as a
replacement for a number of "fall through" markings.
Notice that Clang doesn't recognize "fall through" comments as
implicit fall-through.
Link: https://github.com/KSPP/linux/issues/115
Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org >
Signed-off-by: Kalle Valo <kvalo@codeaurora.org >
Link: https://lore.kernel.org/r/20201117135053.GA13248@embeddedor
2020-12-11 20:20:24 +02:00
Mordechay Goodstein
c0f46dca00
iwlwifi: mvm: check that statistics TLV version match struct version
...
FW now puts in the struct version, the TLV version so we also check
it to make sure it matches.
Signed-off-by: Mordechay Goodstein <mordechay.goodstein@intel.com >
Signed-off-by: Luca Coelho <luciano.coelho@intel.com >
Link: https://lore.kernel.org/r/iwlwifi.20201209231352.bc1dfb56ffbd.I99d8085cccc8687805781ccc43e189dbcef0e63b@changeid
Signed-off-by: Luca Coelho <luciano.coelho@intel.com >
2020-12-10 00:16:07 +02:00
Johannes Berg
b8aba27cdc
iwlwifi: tighten RX MPDU bounds checks
...
Previously, we added checks that the contained MPDU size is long
enough, but really we should also check that the notification
itself fits into the data. Add some checks for that.
Also add unlikely() annotations on the previously added checks.
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
Signed-off-by: Luca Coelho <luciano.coelho@intel.com >
Link: https://lore.kernel.org/r/iwlwifi.20201209231352.51cc04cf1e3e.I7bfd6809f8f5feb75f79397646e6656e95688a0e@changeid
Signed-off-by: Luca Coelho <luciano.coelho@intel.com >
2020-12-10 00:16:05 +02:00
Johannes Berg
8e99ea8d09
iwlwifi: use SPDX tags
...
Use SPDX tags instead of the long copyright notices. Also cleanup
some duplicate copyright notices and combine the years where possible.
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
Signed-off-by: Luca Coelho <luciano.coelho@intel.com >
Link: https://lore.kernel.org/r/iwlwifi.20201210000603.481bcb512a6f.I8146abe5a637079e7336209f23cb26af98b12b31@changeid
Signed-off-by: Luca Coelho <luciano.coelho@intel.com >
2020-12-10 00:15:31 +02:00
Johannes Berg
efc0ec5afb
iwlwifi: validate MPDU length against notification length
...
The MPDU contained in a notification shouldn't be larger than the
notification size itself is, validate this.
Reported-by: Haggai Abramovsky <haggai.abramovsky@intel.com >
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
Signed-off-by: Luca Coelho <luciano.coelho@intel.com >
Link: https://lore.kernel.org/r/iwlwifi.20201209231352.7c721ad37014.Id5746874ecfa208b60baa62691b2d9dc5dd4d89c@changeid
Signed-off-by: Luca Coelho <luciano.coelho@intel.com >
2020-12-10 00:14:14 +02:00
Mordechay Goodstein
c6bae21690
iwlwifi: mvm: iterate active stations when updating statistics
...
Instead of enumerating all possible stations iterate only active ones.
Signed-off-by: Mordechay Goodstein <mordechay.goodstein@intel.com >
Signed-off-by: Luca Coelho <luciano.coelho@intel.com >
Link: https://lore.kernel.org/r/iwlwifi.20201209231352.c049de5611b4.Ic35b8d1a328903195ec7cb887a9cb198b7d8f856@changeid
Signed-off-by: Luca Coelho <luciano.coelho@intel.com >
2020-12-10 00:14:13 +02:00
Mordechay Goodstein
853f4954ba
iwlwifi: stats: add new api fields for statistics cmd/ntfy
...
The new API uses TLV format for statistics to enable fast changes
and debug on the fly.
Signed-off-by: Mordechay Goodstein <mordechay.goodstein@intel.com >
Signed-off-by: Luca Coelho <luciano.coelho@intel.com >
Signed-off-by: Kalle Valo <kvalo@codeaurora.org >
Link: https://lore.kernel.org/r/iwlwifi.20201008181047.a45fd1a34a39.I7709305a6dc7b88d0c5119b12c9251fa6c740262@changeid
2020-10-08 20:14:54 +03:00
Nathan Errera
be9ae34ead
iwlwifi: mvm: get number of stations from TLV
...
FW is changing the max number of supported stations. To adapt to the
change we get the max number from the TLV and act according to the new
number.
Signed-off-by: Nathan Errera <nathan.errera@intel.com >
Signed-off-by: Luca Coelho <luciano.coelho@intel.com >
Signed-off-by: Kalle Valo <kvalo@codeaurora.org >
Link: https://lore.kernel.org/r/iwlwifi.20201008180656.863ab470babc.I393223392f36436663c4e66add03fefe77b74e60@changeid
2020-10-08 20:09:25 +03:00
Mordechay Goodstein
290d5e4951
iwlwifi: mvm: beacon statistics shouldn't go backwards
...
We reset statistics also in case that we didn't reassoc so in
this cases keep last beacon counter.
Cc: stable@vger.kernel.org # v4.19+
Signed-off-by: Mordechay Goodstein <mordechay.goodstein@intel.com >
Signed-off-by: Luca Coelho <luciano.coelho@intel.com >
Signed-off-by: Kalle Valo <kvalo@codeaurora.org >
Link: https://lore.kernel.org/r/iwlwifi.20200417100405.1f9142751fbc.Ifbfd0f928a0a761110b8f4f2ca5483a61fb21131@changeid
2020-04-21 15:39:01 +03:00
Wang Xuerui
c5aaa8be29
iwlwifi: mvm: fix unaligned read of rx_pkt_status
...
This is present since the introduction of iwlmvm.
Example stack trace on MIPS:
[<ffffffffc0789328>] iwl_mvm_rx_rx_mpdu+0xa8/0xb88 [iwlmvm]
[<ffffffffc0632b40>] iwl_pcie_rx_handle+0x420/0xc48 [iwlwifi]
Tested with a Wireless AC 7265 for ~6 months, confirmed to fix the
problem. No other unaligned accesses are spotted yet.
Signed-off-by: Wang Xuerui <wangxuerui@qiniu.com >
Signed-off-by: Luca Coelho <luciano.coelho@intel.com >
Signed-off-by: Kalle Valo <kvalo@codeaurora.org >
2019-11-15 09:34:28 +02:00
Emmanuel Grumbach
58d3bef416
iwlwifi: remove all the d0i3 references
...
As part of the d0i3 removal.
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com >
Signed-off-by: Luca Coelho <luciano.coelho@intel.com >
2019-09-06 15:31:13 +03:00
Jason A. Donenfeld
9285ec4c8b
timekeeping: Use proper clock specifier names in functions
...
This makes boot uniformly boottime and tai uniformly clocktai, to
address the remaining oversights.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
Signed-off-by: Thomas Gleixner <tglx@linutronix.de >
Reviewed-by: Arnd Bergmann <arnd@arndb.de >
Link: https://lkml.kernel.org/r/20190621203249.3909-2-Jason@zx2c4.com
2019-06-22 12:11:27 +02:00
Luca Coelho
244726ec9e
iwlwifi: mvm: add fall through comments where needed
...
Some switch-cases were missing a fall through comment, so the compiler
may warn. Fix that by adding the comments where needed. In other
cases there was more text in the comment, which the compiler doesn't
recognize, so either remove the extra text or move it to a separate
comment line as appropriate.
Signed-off-by: Luca Coelho <luciano.coelho@intel.com >
2019-02-04 12:27:20 +02:00
Emmanuel Grumbach
606b9ab677
iwlwifi: mvm: fix firmware statistics usage
...
The new (CDB) statistics API is used by non-CDB devices
as well. Look at the right TLV flag to know which version
of the statistics notification to use.
To avoid confusion, remove the _cdb suffix from the
structure name.
While at it, remove a structure that was never used.
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com >
Fixes: 678d9b6ddd ("iwlwifi: mvm: update rx statistics cmd api")
Signed-off-by: Luca Coelho <luciano.coelho@intel.com >
2019-01-25 20:57:19 +02:00