summaryrefslogtreecommitdiff
path: root/drivers/net/wireless
AgeCommit message (Collapse)Author
2025-04-25wifi: iwlwifi: mld: skip unknown FW channel load valuesJohannes Berg
The firmware statistics were previously reporting bogus/old channel load values if the device hadn't been active on a given channel; it'll report an unknown value now for those statistics affected (channel_load and channel_load_not_by_us.) Handle that by simply skipping the value, the averaging would result in the exact same value as before. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com> Link: https://patch.msgid.link/20250424153620.db5410318642.I4d2981f68b915ad335bb02c926e9289c2a60ea6c@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2025-04-25wifi: iwlwifi: define API for external FSEQ imagesJohannes Berg
The firmware will support external FSEQ images, define the necessary API for that. We're not yet using/shipping such, so don't add code to load them for now. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com> Link: https://patch.msgid.link/20250424153620.4f5acc3dff6c.Ic559d90376945c78495352a0d24b1d44ef887f2d@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2025-04-25wifi: iwlwifi: mld: allow EMLSR on separated 5 GHz subbandsJohannes Berg
If there are two links on 5 GHz subbands that are separated enough (using channels 36-64 and 100+) then we can support EMLSR across those two links. Allow that in the logic. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com> Link: https://patch.msgid.link/20250424153620.d568a26661d5.Ie4277945272c5bbf637957704fda34ea03ef28d2@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2025-04-25wifi: iwlwifi: mld: use cfg80211_chandef_get_width()Johannes Berg
We can use this helper now to simplify some code. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com> Link: https://patch.msgid.link/20250424153620.586e12d3d07c.Idc27c446d00a7f7925ee76b356f53b72dafc5745@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2025-04-25wifi: iwlwifi: mld: fix iwl_mld_emlsr_disallowed_with_link() returnJohannes Berg
The return type of iwl_mld_emlsr_disallowed_with_link() is a u32 bitmap of exit reasons, but in the data structure confusion case where the warning triggers, it returns false. Add a new reason bit for this case so it doesn't return that EMLSR is possible. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Reviewed-by: Benjamin Berg <benjamin.berg@intel.com> Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com> Link: https://patch.msgid.link/20250424153620.d1f8465e2b5e.I58c463c70801231a79b04c1ff600f41afcbb04f5@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2025-04-25wifi: iwlwifi: mld: clarify variable typeJohannes Berg
In iwl_mld_emlsr_disallowed_with_link() the code uses an enum for a bitmap of values from it, which doesn't really make sense.Use u32 for the variable just like the return value. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com> Link: https://patch.msgid.link/20250424153620.ddf54a728ec0.Ie2e8de150f67369c4e034452c5f1a15f85d2931c@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2025-04-25wifi: iwlwifi: pcie: add support for the reset handshake in MSIEmmanuel Grumbach
Add the proper case in the MSI interrupt handler and read the non-MSIx interrupt cause register in case of timeout. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com> Link: https://patch.msgid.link/20250424153620.758cdfbb78dc.Ia359071e6148218c26f18e783a8130c681d77df7@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2025-04-25wifi: mac80211_hwsim: Prevent tsf from setting if beacon is disabledEdward Adam Davis
Setting tsf is meaningless if beacon is disabled, so check that beacon is enabled before setting tsf. Reported-by: syzbot+064815c6cd721082a52a@syzkaller.appspotmail.com Closes: https://syzkaller.appspot.com/bug?extid=064815c6cd721082a52a Tested-by: syzbot+064815c6cd721082a52a@syzkaller.appspotmail.com Signed-off-by: Edward Adam Davis <eadavis@qq.com> Link: https://patch.msgid.link/tencent_3609AC2EFAAED68CA5A7E3C6D212D1C67806@qq.com Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2025-04-25Merge tag 'ath-next-20250418' of ↵Johannes Berg
git://git.kernel.org/pub/scm/linux/kernel/git/ath/ath into wireless-next Jeff Johnson says: ==================== ath.git patches for v6.16 ath12k: Enable AHB support for IPQ5332. Add monitor interface support to QCN9274. Add MLO support to WCN7850. Add 802.11d scan offload support to WCN7850. ath11k: Restore hibernation support In addition, perform the usual set of bug fixes and cleanups across all supported drivers. ==================== Change-Id: I6555e64d7434f3a5fed5faab25057be93106b18e Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2025-04-24Merge tag 'wireless-2025-04-24' of ↵Jakub Kicinski
https://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless Johannes Berg says: ==================== Some more fixes, notably: * iwlwifi: various regression and iwlmld fixes * mac80211: fix TX frames in monitor mode * brcmfmac: error handling for firmware load * tag 'wireless-2025-04-24' of https://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless: wifi: iwlwifi: restore missing initialization of async_handlers_list wifi: brcm80211: fmac: Add error handling for brcmf_usb_dl_writeimage() wifi: plfxlc: Remove erroneous assert in plfxlc_mac_release wifi: iwlwifi: fix the check for the SCRATCH register upon resume wifi: iwlwifi: don't warn if the NIC is gone in resume wifi: iwlwifi: mld: fix BAID validity check wifi: iwlwifi: back off on continuous errors wifi: iwlwifi: mld: only create debugfs symlink if it does not exist wifi: iwlwifi: mld: inform trans on init failure wifi: iwlwifi: mld: properly handle async notification in op mode start Revert "wifi: iwlwifi: make no_160 more generic" Revert "wifi: iwlwifi: add support for BE213" wifi: mac80211: restore monitor for outgoing frames ==================== Link: https://patch.msgid.link/20250424120535.56499-3-johannes@sipsolutions.net Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2025-04-23wifi: mac80211: restructure tx profile retrieval for MLO MBSSIDRameshkumar Sundaram
For MBSSID, each vif (struct ieee80211_vif) stores another vif pointer for the transmitting profile of MBSSID set. This won't suffice for MLO as there may be multiple links, each of which can be part of different MBSSID sets. Hence the information needs to be stored per-link. Additionally, the transmitted profile itself may be part of an MLD hence storing vif will not suffice either. Fix MLO by storing an instance of struct ieee80211_bss_conf for each link. Modify following operations to reflect the above structure updates: - channel switch completion - BSS color change completion - Removing nontransmitted links in ieee80211_stop_mbssid() - drivers retrieving the transmitted link for beacon templates. Signed-off-by: Rameshkumar Sundaram <rameshkumar.sundaram@oss.qualcomm.com> Co-developed-by: Muna Sinada <muna.sinada@oss.qualcomm.com> Signed-off-by: Muna Sinada <muna.sinada@oss.qualcomm.com> Co-developed-by: Aloka Dixit <aloka.dixit@oss.qualcomm.com> Signed-off-by: Aloka Dixit <aloka.dixit@oss.qualcomm.com> Link: https://patch.msgid.link/20250408184501.3715887-3-aloka.dixit@oss.qualcomm.com Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2025-04-23wifi: mwifiex: remove mwifiex_sta_init_cmd() last argumentSascha Hauer
The init argument from mwifiex_sta_init_cmd() is no longer used. Drop it. Reviewed-by: Francesco Dolcini <francesco.dolcini@toradex.com> Acked-by: Brian Norris <briannorris@chromium.org> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Link: https://patch.msgid.link/20250423-mwifiex-drop-asynchronous-init-v2-4-1bb951073a06@pengutronix.de Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2025-04-23wifi: mwifiex: drop asynchronous init waiting codeSascha Hauer
Historically all commands sent to the mwifiex driver have been asynchronous. The different commands sent during driver initialization have been queued at once and only the final command has been waited for being ready before finally starting the driver. This has been changed in Commit 7bff9c974e1a ("mwifiex: send firmware initialization commands synchronously"). With this the initialization is finished once the last mwifiex_send_cmd_sync() (now mwifiex_send_cmd()) has returned. This makes all the code used to wait for the last initialization command to be finished unnecessary, so it's removed in this patch. Acked-by: Brian Norris <briannorris@chromium.org> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Link: https://patch.msgid.link/20250423-mwifiex-drop-asynchronous-init-v2-3-1bb951073a06@pengutronix.de Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2025-04-23wifi: mwifiex: let mwifiex_init_fw() return 0 for successSascha Hauer
mwifiex_sta_init_cmd() returns -EINPROGRESS as success indication when the init param is true. Likewise mwifiex_init_fw() returns -EINPROGRESS as success indication: It will either return -EINPROGRESS directly when in mfg_mode or the return value of mwifiex_sta_init_cmd() when in normal mode. -EINPROGRESS is a leftover from times when the initialization commands were sent asynchronously. Since Commit 7bff9c974e1a ("mwifiex: send firmware initialization commands synchronously") the return value has become meaningless, so change mwifiex_sta_init_cmd() and mwifiex_init_fw() to return 0 for success. Reviewed-by: Francesco Dolcini <francesco.dolcini@toradex.com> Acked-by: Brian Norris <briannorris@chromium.org> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Link: https://patch.msgid.link/20250423-mwifiex-drop-asynchronous-init-v2-2-1bb951073a06@pengutronix.de Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2025-04-23wifi: mwifiex: remove unnecessary queue empty checkSascha Hauer
Since Commit 7bff9c974e1a ("mwifiex: send firmware initialization commands synchronously") all initialization commands are sent synchronously which means the command queue is empty when mwifiex_sta_init_cmd() returns. No need to check for entries in the command code then, so remove the check. Add a WARN_ON() just in case there is something wrong with the reasoning. Reviewed-by: Francesco Dolcini <francesco.dolcini@toradex.com> Acked-by: Brian Norris <briannorris@chromium.org> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Link: https://patch.msgid.link/20250423-mwifiex-drop-asynchronous-init-v2-1-1bb951073a06@pengutronix.de [remove now unused is_cmd_pend_q_empty variable and comment] Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2025-04-23wifi: iwlwifi: set step_urm in transport and not in the opmodesMiri Korenblit
This has nothing to do with the opmode. Set it in the transport layer instead. Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com> Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Tested-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Link: https://patch.msgid.link/20250423091408.4e288f7897be.I0c8f792ea2ed6967f8c6d8181f9c5f74bbec7d18@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2025-04-23wifi: iwlwifi: mld: tests: simplify le32 bitfield handlingJohannes Berg
We can use le32_encode_bits() instead of cpu_to_le32() combined with FIELD_PREP(). Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com> Link: https://patch.msgid.link/20250423091408.9155a412dcc7.I8330ca413d6bdf953e79361ac50939176bcc4e6e@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2025-04-23wifi: iwlwifi: update the PHY_CONTEXT_CMD APIEmmanuel Grumbach
A new field is added, no impact on the current flows. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com> Link: https://patch.msgid.link/20250423091408.0e1324ae07b7.I6d8ffda2b00c817d3f784241dd61cfe533e12d93@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2025-04-23wifi: iwlwifi: mld: inform trans on init failureMiri Korenblit
If starting the op mode failed, the opmode memory is being freed, so trans->op_mode needs to be NULLified. Otherwise, trans will access already freed memory. Call iwl_trans_op_mode_leave in that case. Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com> Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Reviewed-by: Johannes Berg <johannes.berg@intel.com> Link: https://patch.msgid.link/20250423091408.c7e178748ef7.Ifaf15bdd8ef8c59e04effbd2e7aa0034b30eeacb@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2025-04-23wifi: iwlwifi: mld: properly handle async notification in op mode startMiri Korenblit
From the moment that we have ALIVE, we can receive notification that are handled asynchronously. Some notifications (for example iwl_rfi_support_notif) requires an operational FW. So we need to make sure that they were handled in iwl_op_mode_mld_start before we stop the FW. Flush the async_handlers_wk there to achieve that. Also, if loading the FW in op mode start failed, we need to cancel these notifications, as they are from a dead FW. More than that, not doing so can cause us to access freed memory if async_handlers_wk is executed after ieee80211_free_hw is called. Fix this by canceling all async notifications if a failure occurred in init (after ALIVE). Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com> Reviewed-by: Johannes Berg <johannes.berg@intel.com> Link: https://patch.msgid.link/20250423091408.a8f63d983466.Ifd77d9c1a29fdd278b0a7bfc2709dd5d5e5efdb1@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2025-04-23wifi: iwlwifi: mld: refactor purging async notificationsMiri Korenblit
To cancel all async notifications, we need to: - cancel async_handlers_wk - empty async_handlers_list Instead of having the callers to do both, do it in iwl_mld_purge_async_handlers_list and rename it accordingly. Note that the caller iwl_cleanup_mld didn't cancel the work, but it is harmless. Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com> Reviewed-by: Johannes Berg <johannes.berg@intel.com> Link: https://patch.msgid.link/20250423091408.e98aed77e836.Id9f858d9d553d406a24165b09db830df111befce@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2025-04-23wifi: iwlwifi: mld: don't do iwl_trans_stop_device twiceMiri Korenblit
If iwl_mld_load_fw failed, we call iwl_mld_stop_fw which does, among the others, iwl_trans_stop_device. But this is already called from iwl_mld_load_fw's error path. Since we do need the other stuff of iwl_mld_stop_fw to be done also in the error path of iwl_mld_load_fw, just call it there. This also makes the call to iwl_fw_flush_dumps in iwl_mld_op_mope_start redundant, since it is the same as iwl_fw_dbg_stop_sync. Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com> Reviewed-by: Daniel Gabay <daniel.gabay@intel.com> Reviewed-by: Johannes Berg <johannes.berg@intel.com> Link: https://patch.msgid.link/20250423091408.f7d86be570d3.Ied68f0c4d126b3b0f1ffd9990bbc43d97f098e24@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2025-04-23wifi: iwlwifi: mld: stop hw if mcc_init failsMiri Korenblit
iwl_mld_run_fw_init_sequence used to be the last thing done in iwl_mld_load_fw, and if it failed, it called iwl_trans_stop_hw. Now we also have there iwl_mld_init_mcc, and it can fail. In that case, we need to undo what we did so far, which is basically only iwl_trans_stop_device. Do that. Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com> Reviewed-by: Johannes Berg <johannes.berg@intel.com> Link: https://patch.msgid.link/20250423091408.ba06d972a57b.I317fb7b10ed8a688a0d92c5d99de8765d8044b10@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2025-04-23wifi: iwlwifi: mld: avoid memory leak if mcc_init failsMiri Korenblit
allocating mld->nvm_data used to be the last thing done in iwl_mld_load_fw, so there was no need to free on any error path of iwl_mld_load_fw. But now iwl_mld_load_fw also calls iwl_mld_init_mcc, that can fail, after allocating nvm->data. In that case, it is not freed. As allocating the NVM data should only be done at op mode start anyway, simply move it to there, where it is already freed in the right error paths. Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com> Reviewed-by: Johannes Berg <johannes.berg@intel.com> Link: https://patch.msgid.link/20250423091408.d07469f866ac.I84ad2e624ce7cd4a661c73b4942186e50cdf82b2@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2025-04-23wifi: iwlwifi: mld: remove stored_beacon supportEmmanuel Grumbach
We never ask the firmware to store the beacon, so it won't ever send the notification. Remove the handling of that notification. Remove that notification from the arrays of the notifications' names and add the ones that we forgot to add. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com> Link: https://patch.msgid.link/20250423091408.2bb3ea3ff79b.Ie8f1d89f59d45a960a5fe63e7b717527251350ad@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2025-04-23wifi: iwlwifi: mld: remove P2P powersave trackingJohannes Berg
Since the FW is tracking the CT window by itself, we don't need to update the MAC context or even fill in the value. We just had added that because a firmware bug had broken it for a while. 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/20250423091408.ee164b464c21.I29de491b4d74b2b8084e54bfbd28646b15dee196@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2025-04-23wifi: iwlwifi: parse active and 20 MHz AP NVM channel flagAnjaneyulu
Configure 20 MHz AP mode based on NVM settings, set the NL80211_RRF_ALLOW_20MHZ_ACTIVITY flag, when the NVM indicates that an access point can operate in 20 MHz only. Signed-off-by: Somashekhar Puttagangaiah <somashekhar.puttagangaiah@intel.com> Signed-off-by: Pagadala Yesu Anjaneyulu <pagadala.yesu.anjaneyulu@intel.com> Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com> Link: https://patch.msgid.link/20250423091408.897d826a8612.I1f7f84f4485ed3928070c97a031110ccb608bda8@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2025-04-23wifi: iwlwifi: re-add IWL_AMSDU_8K caseMiri Korenblit
This case in iwl_trans_get_rb_size_order was accidently combined with the IWL_AMSDU_12K case. Fix this. Fixes: 7391b2a4f7db ("wifi: iwlwifi: rework firmware error handling") Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com> Link: https://patch.msgid.link/20250423091408.ef19205aa358.Ifbf89e7b7391cd7070267b7360c53230b3b2c57c@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2025-04-23wifi: iwlwifi: fw: do reset handshake during assert if neededJohannes Berg
Earlier, the firmware could only request the reset handshake is done during the dump, if the dump was split. However, it's also needed when the dump isn't split, in which case it must be done before the dump. The firmware now advertises this requirement, so do the handshake in the non-split case when asked for. Rename apply policy ..._RESET_HANDSHAKE to ..._SPLIT_DUMP_RESET to more clearly indicate that this specific dump needs to be split, while the handshake requirement overall is now indicated by the new capability flag. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com> Link: https://patch.msgid.link/20250423091408.10adafedb74b.Ie3911db1ebbd196ae4b0de1c53012aa1de193c0d@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2025-04-23wifi: iwlwifi: mvm: remove IWL_EMPTYING_HW_QUEUE_DELBA stateJohannes Berg
This state can never be entered, since the last place using it was removed with non-DQA mode in commit c8f54701bdbf ("iwlwifi: mvm: remove non-DQA mode"). Clean up this code too. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com> Link: https://patch.msgid.link/20250423091408.e8a20fb41dc5.I9cd41a15148c90e953335e7020405103ba3fc7f0@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2025-04-23wifi: brcm80211: fmac: Add error log in brcmf_usb_dl_cmd()Wentao Liang
In brcmf_usb_dl_cmd(), the error logging is not enough to describe the error state. And some caller of the brcmf_usb_dl_cmd() does not handle its error. An error log in brcmf_usb_dl_cmd() is needed to prevent silent failure. Add error handling in brcmf_usb_dl_cmd() to log the command id and error code in the brcmf_usb_dl_cmd() fails. In this way, every invocation of the function logs a message upon failure. Signed-off-by: Wentao Liang <vulab@iscas.ac.cn> Acked-by: Arend van Spriel <arend.vanspriel@broadcom.com> Link: https://patch.msgid.link/20250422065938.2345-1-vulab@iscas.ac.cn Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2025-04-23wifi: mwifiex: Don't use %pK through printkThomas Weißschuh
In the past %pK was preferable to %p as it would not leak raw pointer values into the kernel log. Since commit ad67b74d2469 ("printk: hash addresses printed with %p") the regular %p has been improved to avoid this issue. Furthermore, restricted pointers ("%pK") were never meant to be used through printk(). They can still unintentionally leak raw pointers or acquire sleeping looks in atomic contexts. Switch to the regular pointer formatting which is safer and easier to reason about. There are still a few users of %pK left, but these use it through seq_file, for which its usage is safe. Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de> Reviewed-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com> Acked-by: Brian Norris <briannorris@chromium.org> Link: https://patch.msgid.link/20250417-restricted-pointers-wifi-v1-1-b79cdaae5579@linutronix.de Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2025-04-23wifi: brcmsmac: Spelling correctionsSimon Horman
Various spelling corrections as flagged by codespell. Signed-off-by: Simon Horman <horms@kernel.org> Acked-by: Arend van Spriel <arend.vanspriel@broadcom.com> Link: https://patch.msgid.link/20250415-brcmsmac-spell-v1-1-3e1375586883@kernel.org Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2025-04-23wifi: mwifiex: move common settings out of switch/caseSascha Hauer
In mwifiex_add_virtual_intf() several settings done in a switch/case are the same in all cases. Move them out of the switch/case to deduplicate the code. bss_started is not initialized in all switch/case branches, but it is only used in AP mode in the driver, so it doesn't hurt to move its initialization out of the switch/case as well. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Reviewed-by: Francesco Dolcini <francesco@dolcini.it> Acked-by: Brian Norris <briannorris@chromium.org> Link: https://patch.msgid.link/20250410-mwifiex-cleanup-1-v6-9-a6bbd4ac4d37@pengutronix.de Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2025-04-23wifi: mwifiex: make locally used function staticSascha Hauer
mwifiex_is_tdls_off_chan() is only used locally. Make it static. Reviewed-by: Francesco Dolcini <francesco.dolcini@toradex.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Acked-by: Brian Norris <briannorris@chromium.org> Link: https://patch.msgid.link/20250410-mwifiex-cleanup-1-v6-8-a6bbd4ac4d37@pengutronix.de Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2025-04-23wifi: mwifiex: fix indentionSascha Hauer
Align multiline if() under the opening brace. Reviewed-by: Francesco Dolcini <francesco.dolcini@toradex.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Acked-by: Brian Norris <briannorris@chromium.org> Link: https://patch.msgid.link/20250410-mwifiex-cleanup-1-v6-7-a6bbd4ac4d37@pengutronix.de Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2025-04-23wifi: mwifiex: simplify mwifiex_setup_ht_caps()Sascha Hauer
In mwifiex_setup_ht_caps() first a local struct ieee80211_mcs_info is initialized and afterwards copied over &ht_info->mcs. Simplify this by initializing &ht_info->mcs directly. While at it call memset on the u8 rx_mask[] array instead of the struct which makes the intention clearer and we no longer have to assume the rx_mask array is the first member of struct ieee80211_mcs_info. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Acked-by: Brian Norris <briannorris@chromium.org> Reviewed-by: Jeff Chen <jeff.chen_1@nxp.com> Link: https://patch.msgid.link/20250410-mwifiex-cleanup-1-v6-6-a6bbd4ac4d37@pengutronix.de Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2025-04-23wifi: mwifiex: pass adapter to mwifiex_dnld_cmd_to_fw()Sascha Hauer
priv is not needed in mwifiex_dnld_cmd_to_fw(), so pass the adapter to it as context pointer. Reviewed-by: Francesco Dolcini <francesco.dolcini@toradex.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Acked-by: Brian Norris <briannorris@chromium.org> Link: https://patch.msgid.link/20250410-mwifiex-cleanup-1-v6-5-a6bbd4ac4d37@pengutronix.de Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2025-04-23wifi: mwifiex: make region_code_mapping_t constSascha Hauer
region_code_mapping_t is not modified and shouldn't be. Mark it const. Reviewed-by: Francesco Dolcini <francesco.dolcini@toradex.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Acked-by: Brian Norris <briannorris@chromium.org> Link: https://patch.msgid.link/20250410-mwifiex-cleanup-1-v6-4-a6bbd4ac4d37@pengutronix.de Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2025-04-23wifi: mwifiex: drop unnecessary initializationSascha Hauer
Several functions initialize the priv * without actually using the initialized value. Drop the initialization. Reviewed-by: Francesco Dolcini <francesco.dolcini@toradex.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Acked-by: Brian Norris <briannorris@chromium.org> Link: https://patch.msgid.link/20250410-mwifiex-cleanup-1-v6-3-a6bbd4ac4d37@pengutronix.de Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2025-04-23wifi: mwifiex: use adapter as context pointer for mwifiex_hs_activated_event()Sascha Hauer
mwifiex_hs_activated_event() takes a struct mwifiex_private * as context pointer which this function doesn't need directly and the callers don't have. Use struct mwifiex_adapter * instead to simplify both the function and the callers. Reviewed-by: Francesco Dolcini <francesco.dolcini@toradex.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Acked-by: Brian Norris <briannorris@chromium.org> Link: https://patch.msgid.link/20250410-mwifiex-cleanup-1-v6-2-a6bbd4ac4d37@pengutronix.de Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2025-04-23wifi: mwifiex: deduplicate code in mwifiex_cmd_tx_rate_cfg()Sascha Hauer
The code block inside the if/else is the same with just using pbitmap_rates if non NULL or priv->bitmap_rates otherwise. Deduplicate the code by picking the correct pointer first and then using it unconditionally. Reviewed-by: Francesco Dolcini <francesco.dolcini@toradex.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Acked-by: Brian Norris <briannorris@chromium.org> Link: https://patch.msgid.link/20250410-mwifiex-cleanup-1-v6-1-a6bbd4ac4d37@pengutronix.de Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2025-04-23wifi: iwlwifi: mvm: Avoid -Wflex-array-member-not-at-end warningGustavo A. R. Silva
-Wflex-array-member-not-at-end was introduced in GCC-14, and we are getting ready to enable it, globally. Use the `DEFINE_RAW_FLEX()` helper for an on-stack definition of a flexible structure where the size of the flexible-array member is known at compile-time, and refactor the rest of the code, accordingly. So, with these changes, fix the following warning: drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c:6430:41: warning: structure containing a flexible array member is not at the end of another structure [-Wflex-array-member-not-at-end] Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org> Acked-by: Miri Korenblit <miriam.rachel.korenblit@intel.com> Link: https://patch.msgid.link/Z-SV8gb6MuZJmmhe@kspp Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2025-04-23wifi: iwlwifi: fw: api: Absolute rudimentary typo fixes in the file power.hBhaskar Chowdhury
s/folowing/following/ s/Celsuis/Celsius/ s/temerature/temperature/ ...twice Signed-off-by: Bhaskar Chowdhury <unixbhaskar@gmail.com> Acked-by: Randy Dunlap <rdunlap@infradead.org> Link: https://patch.msgid.link/20210317042540.4097078-1-unixbhaskar@gmail.com Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2025-04-23wifi: iwlwifi: Add missing MODULE_FIRMWARE for Qu-c0-jf-b0Víctor Gonzalo
The module metadata for the firmware file iwlwifi-Qu-c0-jf-b0-* is missing. Signed-off-by: Víctor Gonzalo <victor.gonzalo@anddroptable.net> Link: https://patch.msgid.link/20240313180227.2224780-1-victor.gonzalo@anddroptable.net Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2025-04-23wifi: iwlwifi: mvm: Remove duplicated include in iwl-utils.cYang Li
The header files net/gso.h is included twice in iwl-utils.c, so one inclusion of each can be removed. Reported-by: Abaci Robot <abaci@linux.alibaba.com> Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=13555 Signed-off-by: Yang Li <yang.lee@linux.alibaba.com> Acked-by: Miri Korenblit <miriam.rachel.korenblit@intel.com> Link: https://patch.msgid.link/20250115005431.89510-1-yang.lee@linux.alibaba.com Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2025-04-23wifi: free SKBTX_WIFI_STATUS skb tx_flags flagJohannes Berg
Jason mentioned at netdevconf that we've run out of tx_flags in the skb_shinfo(). Gain one bit back by removing the wifi bit. We can do that because the only userspace application for it (hostapd) doesn't change the setting on the socket, it just uses different sockets, and normally doesn't even use this any more, sending the frames over nl80211 instead. Reviewed-by: Jason Xing <kerneljasonxing@gmail.com> Link: https://patch.msgid.link/20250313134942.52ff54a140ec.If390bbdc46904cf451256ba989d7a056c457af6e@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2025-04-23wifi: rt2x00: remove weird self-assignment in rt2800_loft_search()Dmitry Antipov
Remove weird self-assignment in 'rt2800_loft_search()' assuming that it was just a typo. Compile tested only. Found by Linux Verification Center (linuxtesting.org) with SVACE. Signed-off-by: Dmitry Antipov <dmantipov@yandex.ru> Acked-by: Stanislaw Gruszka <stf_xl@wp.pl> Link: https://patch.msgid.link/20250321134256.821596-1-dmantipov@yandex.ru Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2025-04-23wifi: iwlwifi: restore missing initialization of async_handlers_listItamar Shalev
The initialization of async_handlers_list was accidentally removed in a previous change. This patch restores the missing initialization to ensure proper handler registration. Fixes: 6895d74c11d8 ("wifi: iwlwifi: mld: initialize regulatory early") Signed-off-by: Itamar Shalev <itamar.shalev@intel.com> Acked-by: Miri Korenblit <miriam.rachel.korenblit@intel.com> Link: https://patch.msgid.link/20250423092503.35206-1-itamar.shalev@intel.com Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2025-04-23wifi: brcm80211: fmac: Add error handling for brcmf_usb_dl_writeimage()Wentao Liang
The function brcmf_usb_dl_writeimage() calls the function brcmf_usb_dl_cmd() but dose not check its return value. The 'state.state' and the 'state.bytes' are uninitialized if the function brcmf_usb_dl_cmd() fails. It is dangerous to use uninitialized variables in the conditions. Add error handling for brcmf_usb_dl_cmd() to jump to error handling path if the brcmf_usb_dl_cmd() fails and the 'state.state' and the 'state.bytes' are uninitialized. Improve the error message to report more detailed error information. Fixes: 71bb244ba2fd ("brcm80211: fmac: add USB support for bcm43235/6/8 chipsets") Cc: stable@vger.kernel.org # v3.4+ Signed-off-by: Wentao Liang <vulab@iscas.ac.cn> Acked-by: Arend van Spriel <arend.vanspriel@broadcom.com> Link: https://patch.msgid.link/20250422042203.2259-1-vulab@iscas.ac.cn Signed-off-by: Johannes Berg <johannes.berg@intel.com>