aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/wireless
AgeCommit message (Collapse)AuthorFilesLines
2024-04-22wifi: ath12k: fix out-of-bound access of qmi_invoke_handler()Karthikeyan Kathirvel1-0/+3
Currently, there is no terminator entry for ath12k_qmi_msg_handlers hence facing below KASAN warning, ================================================================== BUG: KASAN: global-out-of-bounds in qmi_invoke_handler+0xa4/0x148 Read of size 8 at addr ffffffd00a6428d8 by task kworker/u8:2/1273 CPU: 0 PID: 1273 Comm: kworker/u8:2 Not tainted 5.4.213 #0 Workqueue: qmi_msg_handler qmi_data_ready_work Call trace: dump_backtrace+0x0/0x20c show_stack+0x14/0x1c dump_stack+0xe0/0x138 print_address_description.isra.5+0x30/0x330 __kasan_report+0x16c/0x1bc kasan_report+0xc/0x14 __asan_load8+0xa8/0xb0 qmi_invoke_handler+0xa4/0x148 qmi_handle_message+0x18c/0x1bc qmi_data_ready_work+0x4ec/0x528 process_one_work+0x2c0/0x440 worker_thread+0x324/0x4b8 kthread+0x210/0x228 ret_from_fork+0x10/0x18 The address belongs to the variable: ath12k_mac_mon_status_filter_default+0x4bd8/0xfffffffffffe2300 [ath12k] [...] ================================================================== Add a dummy terminator entry at the end to assist the qmi_invoke_handler() in traversing up to the terminator entry without accessing an out-of-boundary index. Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.0.1-00029-QCAHKSWPL_SILICONZ-1 Fixes: d889913205cf ("wifi: ath12k: driver for Qualcomm Wi-Fi 7 devices") Reviewed-by: Jeff Johnson <[email protected]> Signed-off-by: Karthikeyan Kathirvel <[email protected]> Signed-off-by: Kalle Valo <[email protected]> Link: https://msgid.link/[email protected]
2024-04-22wifi: ath12k: Refactor data path cmem initKarthikeyan Periyasamy1-6/+47
Move the data path Tx and Rx descriptor primary page table CMEM configuration into a helper function. This will make the code more scalable for configuring partner device in support of multi-device MLO. Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.1.1-00188-QCAHKSWPL_SILICONZ-1 Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3 Signed-off-by: Karthikeyan Periyasamy <[email protected]> Acked-by: Jeff Johnson <[email protected]> Signed-off-by: Kalle Valo <[email protected]> Link: https://msgid.link/[email protected]
2024-04-22wifi: ath12k: displace the Tx and Rx descriptor in cookie conversion tableKarthikeyan Periyasamy1-2/+2
In the hardware cookie conversion table configuration, place the Rx descriptor at the end. This will allow for easier addition of partner device Rx descriptors in the future to support multi-device MLO. Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.1.1-00188-QCAHKSWPL_SILICONZ-1 Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3 Signed-off-by: Karthikeyan Periyasamy <[email protected]> Acked-by: Jeff Johnson <[email protected]> Signed-off-by: Kalle Valo <[email protected]> Link: https://msgid.link/[email protected]
2024-04-22wifi: ath12k: Refactor the hardware cookie conversion initKarthikeyan Periyasamy2-8/+20
Currently, the Rx descriptor is placed before the Tx descriptor in the primary page table of the hardware cookie conversion configuration. The Tx and Rx descriptor offsets are implicitly hardcoded. To allow for easy displacement of Tx and Rx descriptors, introduce Tx and Rx offset based cookie conversion initializationi. Additionally, should consider validating the respective offset ranges while retrieving the Tx and Rx descriptors. This change will be utilize by the next patch in the series. Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.1.1-00188-QCAHKSWPL_SILICONZ-1 Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3 Signed-off-by: Karthikeyan Periyasamy <[email protected]> Acked-by: Jeff Johnson <[email protected]> Signed-off-by: Kalle Valo <[email protected]> Link: https://msgid.link/[email protected]
2024-04-22wifi: ath12k: avoid redundant code in Rx cookie conversion initKarthikeyan Periyasamy1-1/+2
Currently, in the Rx data path cookie conversion initialization procedure, the primary page table index (ppt_idx) is computed within the secondary page table iteration. However this is invariant, and hence the ppt_idx should be calculated outside of the iteration to avoid repeated execution of the statement. Found in code review. Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.1.1-00188-QCAHKSWPL_SILICONZ-1 Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3 Signed-off-by: Karthikeyan Periyasamy <[email protected]> Acked-by: Jeff Johnson <[email protected]> Signed-off-by: Kalle Valo <[email protected]> Link: https://msgid.link/[email protected]
2024-04-22wifi: iwlwifi: mvm: fix link ID managementJohannes Berg1-1/+1
On older (pre-MLD API) devices, we started also calling iwl_mvm_set_link_mapping()/iwl_mvm_unset_link_mapping(), but of course not also iwl_mvm_remove_link(). Since the link ID was only released in iwl_mvm_remove_link() this causes us to run out of FW link IDs very quickly. Fix it by releasing the link ID correctly. Fixes: a8b5d4809b50 ("wifi: iwlwifi: mvm: Configure the link mapping for non-MLD FW") Link: https://msgid.link/20240420154435.dce72db5d5e3.Ic40b454b24f1c7b380a1eedf67455d9cf2f58541@changeid Signed-off-by: Johannes Berg <[email protected]>
2024-04-22wifi: rtl8xxxu: enable MFP support with security flag of RX descriptorMartin Kaistra2-2/+14
In order to connect to networks which require 802.11w, add the MFP_CAPABLE flag and let mac80211 do the actual crypto in software. When a robust management frame is received, rx_dec->swdec is not set, even though the HW did not decrypt it. Extend the check and don't set RX_FLAG_DECRYPTED for these frames in order to use SW decryption. Use the security flag in the RX descriptor for this purpose, like it is done in the rtw88 driver. Cc: [email protected] Signed-off-by: Martin Kaistra <[email protected]> Signed-off-by: Ping-Ke Shih <[email protected]> Link: https://msgid.link/[email protected]
2024-04-22Revert "wifi: rtl8xxxu: enable MFP support"Martin Kaistra1-7/+2
This reverts commit 77f5924fc41c243e907c80ce2576902d3a9cb336. There is a more elegant solution to check for not decrypted frames, which is to check the security flag in the RX descriptor. Revert commit 77f5924fc41c ("wifi: rtl8xxxu: enable MFP support") in favor of this to be able to send it to stable. Signed-off-by: Martin Kaistra <[email protected]> Signed-off-by: Ping-Ke Shih <[email protected]> Link: https://msgid.link/[email protected]
2024-04-22wifi: rtw88: suppress messages of failed to flush queuePing-Ke Shih3-3/+6
Driver throws messages when scanning with a lot of traffic, because packets in TX buffer can not be transmitted in time. Since this is a common occurrence, change them to debug message with special debug mask that developers can turn on this mask by default for further analysis. Cc: Lewis Robbins <[email protected]> Tested-by: Lewis Robbins <[email protected]> Signed-off-by: Ping-Ke Shih <[email protected]> Link: https://msgid.link/[email protected]
2024-04-22wifi: rtw89: 8922a: fix argument to hal_reset in bb_cfg_txrx_pathZong-Zhe Yang1-1/+1
When hal_reset on MAC_1/PHY_1, we should pass tx_en1 instead of tx_en0. Signed-off-by: Zong-Zhe Yang <[email protected]> Signed-off-by: Ping-Ke Shih <[email protected]> Link: https://msgid.link/[email protected]
2024-04-22wifi: rtw89: set WIPHY_FLAG_DISABLE_WEXT before MLOZong-Zhe Yang1-0/+3
We will support MLO on 802.11be chip, e.g. RTL8922A, in the future. At that time being, we will set WIPHY_FLAG_SUPPORTS_MLO according to chip info and FW features at runtime. But, with WIPHY_FLAG_SUPPORTS_MLO flag, cfg80211 will disable WEXT. In case inconsistent user experience, if 802.11be chip, we disable WEXT uniformly from now on. Signed-off-by: Zong-Zhe Yang <[email protected]> Signed-off-by: Ping-Ke Shih <[email protected]> Link: https://msgid.link/[email protected]
2024-04-19wifi: mac80211_hwsim: Use wider regulatory for custom for 6GHz testsChaitanya Tata1-2/+2
If a custom regulatory is being used, use the 6GHz regulatory for testing 6GHz channels. Signed-off-by: Chaitanya Tata <[email protected]> Link: https://msgid.link/[email protected] Signed-off-by: Johannes Berg <[email protected]>
2024-04-19wifi: iwlwifi: mvm: Don't allow EMLSR when the RSSI is lowMiri Korenblit5-29/+233
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 <[email protected]> Link: https://msgid.link/20240416134215.73263c000263.Ieb2b18855a2719b5e18ad2fa8a3e855ca4e23938@changeid Signed-off-by: Johannes Berg <[email protected]>
2024-04-19wifi: iwlwifi: mvm: disable EMLSR when we suspend with wowlanYedidya Benshimol3-11/+14
We can't be an EMLSR while suspended with wowlan. De-activate the secondary link upon wowlan entring. Set the blocking reason upon suspension and clear it upon resume. Signed-off-by: Yedidya Benshimol <[email protected]> Signed-off-by: Miri Korenblit <[email protected]> Link: https://msgid.link/20240416134215.6ea884b3f095.I84233cb1c79ba538defafb8ddb983c47f04a400a@changeid Signed-off-by: Johannes Berg <[email protected]>
2024-04-19wifi: iwlwifi: mvm: get periodic statistics in EMLSRMiri Korenblit4-1/+33
In EMLSR we need to track the RSSI of both links, and exit if the RSSI of one of the links got too low. For that request the FW to send statistics every 5 seconds when in EMLSR. Signed-off-by: Miri Korenblit <[email protected]> Link: https://msgid.link/20240416134215.6e19d596d77f.Ica2a75a031b1bced0dc2e18c5d365b5eb0d3ec07@changeid Signed-off-by: Johannes Berg <[email protected]>
2024-04-19wifi: iwlwifi: mvm: don't recompute EMLSR mode in can_activate_linksMiri Korenblit3-34/+7
mac80211 invokes the driver callback drv_can_activate_links() from ieee80211_set_active_links to verify it can activate the desired link combination. However, ieee80211_set_active_links is called with more than one link in 2 cases: - After driver's link selection decided to enter EMLSR - From debugfs, for testing purposes. For both cases there is no need to recompute all the considerations determining whether to activate EMLSR. Instead, only check if the vif is not blocked for EMLSR. Signed-off-by: Miri Korenblit <[email protected]> Reviewed-by: Johannes Berg <[email protected]> Link: https://msgid.link/20240416134215.202cf5a9ef2c.I65e4698b730a8652ad8d1c01420aabb41a1d04fd@changeid Signed-off-by: Johannes Berg <[email protected]>
2024-04-19wifi: iwlwifi: mvm: implement EMLSR prevention mechanism.Miri Korenblit3-0/+100
Address scenarios where repeated entry and exit from EMLSR occur, such as encountering missed beacons on a specific link, while still discovering that link during a scan. To mitigate this, introduce the EMLSR prevention mechanism, which operates as follows: - On each exit from EMLSR event, record the timestamp and the exit reason. - If two consecutive exits happen for the same reason within a 400-second window, enforce a 300-second EMLSR prevention. - If a third exit for the same reason occurs within 400 seconds from the second exit, enforce an extended EMLSR prevention of 600 seconds. Signed-off-by: Miri Korenblit <[email protected]> Reviewed-by: Johannes Berg <[email protected]> Link: https://msgid.link/20240416134215.d820ee98b300.I6406db40cf25eabdba602afd783466473b909216@changeid Signed-off-by: Johannes Berg <[email protected]>
2024-04-19wifi: iwlwifi: mvm: exit EMLSR upon missed beaconMiri Korenblit5-14/+40
In case of more than 6 missed beacons on one of the links, exit EMLSR by deactivating that link. Signed-off-by: Miri Korenblit <[email protected]> Link: https://msgid.link/20240416134215.f9111c79cb53.Ie95ea60149a9bc4367f6b338b37c8635051351ba@changeid Signed-off-by: Johannes Berg <[email protected]>
2024-04-19wifi: iwlwifi: mvm: init vif works only onceJohannes Berg3-2/+21
It's dangerous to re-initialize works repeatedly, especially delayed ones that have an associated timer, and even more so if they're not necessarily canceled inbetween. This can be the case for these workers here during FW restart scenarios, so make sure to initialize it only once. While at it, also ensure it is cancelled correctly. Fixes: f67806140220 ("iwlwifi: mvm: disconnect in case of bad channel switch parameters") Signed-off-by: Johannes Berg <[email protected]> Signed-off-by: Miri Korenblit <[email protected]> Link: https://msgid.link/20240416134215.ddf8eece5eac.I4164f5c9c444b64a9abbaab14c23858713778e35@changeid Signed-off-by: Johannes Berg <[email protected]>
2024-04-19wifi: iwlwifi: mvm: Add helper functions to update EMLSR statusMiri Korenblit4-55/+98
There are reasons for which we need to exit EMLSR, but not to block it completely, and there are reasons for which we need to block EMLSR. For both reason types we have the enum iwl_mvm_esr_state, when the blocking reasons are stored in the `mvmvif::esr_disable_reason` bitmap. This change introduces the APIs to use in the different cases: - iwl_mvm_exit_esr - will exit from EMLSR mode. - iwl_mvm_block_esr - will update the bitmap and exit EMLSR, to be used for the blocking reasons only. - iwl_mvm_unblock_esr - will update the bitmap. To be used for the blocking reasons only. Signed-off-by: Miri Korenblit <[email protected]> Reviewed-by: Johannes Berg <[email protected]> Link: https://msgid.link/20240416134215.d54142a75876.I552926065521f5f848c37b0bd845494bd7865fb7@changeid Signed-off-by: Johannes Berg <[email protected]>
2024-04-19wifi: iwlwifi: mvm: Implement new link selection algorithmMiri Korenblit9-187/+298
Replaces the current logic with a new algorithm based on the link grading introduced in a previous patch. The new selection algorithm will be invoked upon successful scan to ensure it has the necessary updated data it needs. This update delegates the selection logic as the primary link determiner in EMLSR mode, storing it in mvmvif to avoid repeated calculations, as the result may vary. Additionally, includes tests for iwl_mvm_valid_link_pair to validate link pairs for EMLSR. Signed-off-by: Miri Korenblit <[email protected]> Reviewed-by: Johannes Berg <[email protected]> Link: https://msgid.link/20240416134215.309fb1b3fe44.I5baf0c293c89a5a28bd1a6386bf9ca6d2bf61ab8@changeid Signed-off-by: Johannes Berg <[email protected]>
2024-04-19wifi: iwlwifi: mvm: move EMLSR/links codeMiri Korenblit3-222/+228
The functions that are link related, so they should be in link.c and not in mld-mac80211.c. Move them. Also move the different prototypes to the right place in mvm.h Signed-off-by: Miri Korenblit <[email protected]> Reviewed-by: Johannes Berg <[email protected]> Link: https://msgid.link/20240416134215.e7c368256fa0.I6b15805a7c8a75d1814f1a829601daf4d3788731@changeid Signed-off-by: Johannes Berg <[email protected]>
2024-04-19wifi: iwlwifi: mvm: check if EMLSR is allowed before selecting linksMiri Korenblit2-19/+29
Currenty iwl_mvm_mld_select_links() doesn't fully check that EMLSR is allowed before selecting the 2 best links. Although it will fail in ieee80211_set_active_links(), it is preferred to avoid the redundent calculations. Signed-off-by: Miri Korenblit <[email protected]> Reviewed-by: Johannes Berg <[email protected]> Link: https://msgid.link/20240416134215.3578a93feb1a.I1cd91608bb73fbe19b8dfdf90e14ce40b98c3430@changeid Signed-off-by: Johannes Berg <[email protected]>
2024-04-19wifi: iwlwifi: mvm: don't always disable EMLSR due to BT coexMiri Korenblit2-42/+56
2.4 GHz/LB (low band) link can't be used in an EMLSR links pair when BT is on. But EMLSR is still allowed for a pair of links which none of them operates in LB. In the existing code, EMLSR will always be disabled if one of the usable links is in LB (and BT is on). Move this check to the code that verifies a specific pair of links, and only if one of these links operates on LB - disable EMLSR. Fixes: 10159a45666b ("wifi: iwlwifi: disable eSR when BT is active") Signed-off-by: Miri Korenblit <[email protected]> Link: https://msgid.link/20240416134215.2841006b5cc4.I45ffd583f593daa950322852ceb9454cbf497e24@changeid Signed-off-by: Johannes Berg <[email protected]>
2024-04-19wifi: iwlwifi: mvm: calculate EMLSR mode after connectionMiri Korenblit5-22/+35
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 <[email protected]> Link: https://msgid.link/20240416134215.a767e243366e.I3b32d36cda23f67dc103a28a9bdccb0039d22574@changeid Signed-off-by: Johannes Berg <[email protected]>
2024-04-19wifi: iwlwifi: mvm: implement link gradingMiri Korenblit6-1/+398
For selecting what link(s) out of the usable ones to activate, calculate a grade for a given link. Calculation of a link grade is done as follows: 1. get the estimated throughput according to the RSSI of the link, this will be the base grade 2. get the channel load from the BSS Load Element, subtracting the load caused by us. Apply the factor on the grade. 3. puncturing factor: calculate the percentage of the punctured subchannels (out of the total subchannels). Apply this on the grade. The link grading will be used by the link selection mechanism in a later patch. Also add KUnit tests for it. Signed-off-by: Miri Korenblit <[email protected]> Reviewed-by: Johannes Berg <[email protected]> Link: https://msgid.link/20240416134215.a6799dbd5643.If137ca6dc443606c7d8c99ec1fc38b325003a7c1@changeid Signed-off-by: Johannes Berg <[email protected]>
2024-04-19wifi: iwlwifi: mvm: send ap_tx_power_constraints cmd to FW in AP modeMukesh Sisodiya4-2/+98
Send AP_TX_POWER_CONSTRAINTS_CMD with no local maximum transmit power constraint to FW and FW will update the TPE element with required tx power limits. Signed-off-by: Mukesh Sisodiya <[email protected]> Signed-off-by: Miri Korenblit <[email protected]> Link: https://msgid.link/20240416134215.b6af4ecfcfe8.I07e8db349190e0c58c468c18477d8551288ac069@changeid Signed-off-by: Johannes Berg <[email protected]>
2024-04-19wifi: iwlwifi: mvm: introduce esr_disable_reasonEmmanuel Grumbach3-28/+51
This will maintain a bitmap of reasons for which we want to avoid enabling EMLSR. For now, we have a single reason: BT coexistence, but we will add soon more reasons. Make it a bitmap to make it easier to manage. Since we'll impact the parameters that impact the enablement / disablement of EMLSR from several places, introduce a generic function that takes into account the current state and execute the decision that must be taken. Signed-off-by: Emmanuel Grumbach <[email protected]> Signed-off-by: Miri Korenblit <[email protected]> Link: https://msgid.link/20240416134215.94c3590c6f27.I6a190da5025d0523ef483ffac0c64e26675041e6@changeid Signed-off-by: Johannes Berg <[email protected]>
2024-04-19wifi: iwlwifi: Add support for LARI_CONFIG_CHANGE_CMD v10Anjaneyulu8-11/+157
Add support for enable/disable 320 MHz for Japan and South Korea by reading WBEM (WiFi Bandwidth Enablement per MCC) variable from UEFI or ACPI and sending it to the FW. Signed-off-by: Anjaneyulu <[email protected]> Signed-off-by: Miri Korenblit <[email protected]> Link: https://msgid.link/20240415114847.7946c3befbe1.I453c33f7ea48156ea2a3961f50a9003103fca5a5@changeid Signed-off-by: Johannes Berg <[email protected]>
2024-04-19wifi: iwlwifi: mvm: Add support for PPAG cmd v6Anjaneyulu2-2/+2
Add support for enablement of PPAG for - VLP for 6 GHz mode in CANADA, USA and ETSI countries. - LPI for 6 GHz mode in CANADA. - SP for 6 GHz mode in CANADA, USA and ETSI countries. Signed-off-by: Anjaneyulu <[email protected]> Signed-off-by: Miri Korenblit <[email protected]> Link: https://msgid.link/20240415114847.e1893fe24ea3.Ic84cf576de0883c2184c939bdfad4b110a8a1815@changeid Signed-off-by: Johannes Berg <[email protected]>
2024-04-19wifi: iwlwifi: move lari_config handlig to regulatoryAnjaneyulu3-95/+119
moved lari_config handling to common place to avoid code duplication. Signed-off-by: Anjaneyulu <[email protected]> Signed-off-by: Miri Korenblit <[email protected]> Link: https://msgid.link/20240415114847.02bfcd27b333.If149c3038bdfe57e254b26857209e8c7ab709779@changeid Signed-off-by: Johannes Berg <[email protected]>
2024-04-19wifi: iwlwifi: add a device ID for BZ-WEmmanuel Grumbach1-0/+1
Signed-off-by: Emmanuel Grumbach <[email protected]> Signed-off-by: Miri Korenblit <[email protected]> Link: https://msgid.link/20240415114847.c387957560ea.I9229336936faa0ed346af469e9c77c7d6e5a2541@changeid Signed-off-by: Johannes Berg <[email protected]>
2024-04-19wifi: iwlwifi: move WTAS macro to api fileAnjaneyulu2-2/+2
regulatory header file should not be included in API file, as API defination should be independent. Signed-off-by: Anjaneyulu <[email protected]> Signed-off-by: Miri Korenblit <[email protected]> Link: https://msgid.link/20240415114847.61c9163859a7.Id29a86566ff313ab8e85aa1007f841e95a67d6b7@changeid Signed-off-by: Johannes Berg <[email protected]>
2024-04-19wifi: iwlwifi: mvm: extend STEP URM workaround for new devicesJohannes Berg1-1/+1
The same applies for newer devices (currently SC), so just change the condition here. Signed-off-by: Johannes Berg <[email protected]> Signed-off-by: Miri Korenblit <[email protected]> Link: https://msgid.link/20240415114847.db62bba6b2fa.Ie7fdc75c0b8759574a8744f0a316065cb791dd82@changeid Signed-off-by: Johannes Berg <[email protected]>
2024-04-19wifi: iwlwifi: mvm: move phy band to nl80211 band helperBenjamin Berg2-16/+16
This function is useful in other places, so move it in order to share it. Signed-off-by: Benjamin Berg <[email protected]> Reviewed-by: Johannes Berg <[email protected]> Signed-off-by: Miri Korenblit <[email protected]> Link: https://msgid.link/20240415114847.8e456d6c599e.Ibaa76864b30c990bfc35d886ec1344d513a96d14@changeid Signed-off-by: Johannes Berg <[email protected]>
2024-04-19wifi: iwlwifi: mvm: Refactor tracking of scan UIDsIlan Peer1-16/+9
Instead of setting the UID to type mapping while building the scan command, set the UID to type mapping only after the scan request command was sent successfully. This resolves a bug where in case a scan request command fails and a recovery flow is initiated, the recovery flow would indicate to mac80211 that scan is completed though it was not really started. Signed-off-by: Ilan Peer <[email protected]> Reviewed-by: Ayala Beker <[email protected]> Signed-off-by: Miri Korenblit <[email protected]> Link: https://msgid.link/20240415114847.7011e93363a2.Idb9b401414864dfc5540d8798a6cb2b192a2acc2@changeid [also remove from iwl_mvm_scan_umac_v14_and_above()] Signed-off-by: Johannes Berg <[email protected]>
2024-04-19wifi: mac80211_hwsim: init peer measurement resultJohannes Berg1-1/+1
If we don't get all the values here, we might pass them to cfg80211 uninitialized. Fix that, even if the input might then not make much sense. Fixes: 2af3b2a631b1 ("mac80211_hwsim: add PMSR report support via virtio") Reviewed-by: Miriam Rachel Korenblit <[email protected]> Link: https://msgid.link/20240418105220.e1317621c1f9.If7dd447de24d7493d133284db5e9e482e4e299f8@changeid Signed-off-by: Johannes Berg <[email protected]>
2024-04-19Revert "wifi: iwlwifi: bump FW API to 90 for BZ/SC devices"Johannes Berg2-2/+2
Revert the API version bump, the kernel doesn't actually have all the code to deal with that version yet. Fixes: 653a90f6b226 ("wifi: iwlwifi: bump FW API to 90 for BZ/SC devices") Link: https://msgid.link/20240419085147.cd756fadab03.Ibccbb65be8e05b516cae1b9fb27a959662f9f51a@changeid Signed-off-by: Johannes Berg <[email protected]>
2024-04-19wifi: rtl8xxxu: Fix the TX power of RTL8192CU, RTL8723AUBitterblue Smith1-15/+10
Don't subtract 1 from the power index. This was added in commit 2fc0b8e5a17d ("rtl8xxxu: Add TX power base values for gen1 parts") for unknown reasons. The vendor drivers don't do this. Also correct the calculations of values written to REG_OFDM0_X{C,D}_TX_IQ_IMBALANCE. According to the vendor driver, these are used for TX power training. With these changes rtl8xxxu sets the TX power of RTL8192CU the same as the vendor driver. None of this appears to have any effect on my RTL8192CU device. Cc: [email protected] Signed-off-by: Bitterblue Smith <[email protected]> Reviewed-by: Ping-Ke Shih <[email protected]> Signed-off-by: Ping-Ke Shih <[email protected]> Link: https://msgid.link/[email protected]
2024-04-18wifi: ath12k: don't use %pK in dmesg format stringsJeff Johnson6-13/+13
Currently, when debug logs are enabled, messages such as the following are found in the kernel log: event mgmt rx skb pK-error len 209 ftype 00 stype 50 The "pK-error" comes from using %pK to display an skb address in an interrupt context. Per the guidance in the current "printk-formats" documentation, %pK "is only intended when producing content of a file read by userspace from e.g. procfs or sysfs, not for dmesg." So replace %pK with %p in all of the ath12k_dbg() format strings. Signed-off-by: Jeff Johnson <[email protected]> Signed-off-by: Kalle Valo <[email protected]> Link: https://msgid.link/[email protected]
2024-04-18wifi: ath12k: enable service flag for survey dump statsThiraviyam Mariyappan2-1/+3
The survey dump statistics does not display channel RX and TX time properly because the survey flag is not enabled in the firmware service flag. If firmware supports enable the service flag "bss_chan_info" in wmi_resource_config to fetch and print the stats for specific pdev. Enabling WMI_RSRC_CFG_FLAG1_BSS_CHANNEL_INFO_64 does not have any impact on WCN7850 since this bit is not utilized by the WCN7850 firmware. Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.0.1-00029-QCAHKSWPL_SILICONZ-1 Signed-off-by: Thiraviyam Mariyappan <[email protected]> Signed-off-by: Karthikeyan Kathirvel <[email protected]> Acked-by: Jeff Johnson <[email protected]> Signed-off-by: Kalle Valo <[email protected]> Link: https://msgid.link/[email protected]
2024-04-18wifi: ath12k: enable WIPHY_FLAG_DISABLE_WEXTKalle Valo1-0/+6
ath12k will support Multi-Link Operation (MLO) in the future but not yet. A major change with MLO is that cfg80211 will disable Wireless Extension (WEXT) user space interface. To avoid having inconsistent user experience, first supporting WEXT and later not, disable WEXT already now. Now ath12k claims that WEXT is not supported: $ iwconfig wlan0 wlan0 no wireless extensions. Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3 Signed-off-by: Kalle Valo <[email protected]> Acked-by: Jeff Johnson <[email protected]> Link: https://msgid.link/[email protected]
2024-04-18wifi: ath11k: Fix error handling in ath11k_wmi_p2p_noa_event()Christophe JAILLET1-12/+6
if (noa_descriptors > WMI_P2P_MAX_NOA_DESCRIPTORS), there is a mix of return and goto. In such a case, 'td' should be freed to avoid a memory leak. While at it, change ath11k_wmi_p2p_noa_event() to return void. '0' was returned in all cases, even in case of error and the only caller does not handle the return value. This is also more consistent with most of functions called from ath11k_wmi_tlv_op_rx(). Fixes: 2408379f15a1 ("wifi: ath11k: implement handling of P2P NoA event") Signed-off-by: Christophe JAILLET <[email protected]> Acked-by: Jeff Johnson <[email protected]> Signed-off-by: Kalle Valo <[email protected]> Link: https://msgid.link/07f1fc75b2d5b4173ae1b7bb1da5be7f6fc608c8.1713212781.git.christophe.jaillet@wanadoo.fr
2024-04-18wifi: ath11k: add support DT ieee80211-freq-limitChristian Lamparter1-0/+1
The common DT property can be used to limit the available channels/frequencies. But ath11k has to manually call wiphy_read_of_freq_limits(). Signed-off-by: Christian Lamparter <[email protected]> Signed-off-by: Kalle Valo <[email protected]> Link: https://msgid.link/ed266944c721de8dbf0fe35f387a3a71b2c84037.1686486468.git.chunkeey@gmail.com
2024-04-18wifi: rtw89: regd: handle policy of 6 GHz SP according to BIOSZong-Zhe Yang2-0/+60
According to BIOS configuration of Realtek ACPI DSM function 7, RTW89_ACPI_DSM_FUNC_6GHZ_SP_SUP, we handle the regd policy of 6 GHz SP. If BIOS indicates to override driver settings, we only allow the countries, which are enabled by BIOS, to use 6 GHz SP power. Other countries will be applied to select default power when recalculating 6 GHz regulatory power selection. Signed-off-by: Zong-Zhe Yang <[email protected]> Signed-off-by: Ping-Ke Shih <[email protected]> Link: https://msgid.link/[email protected]
2024-04-18wifi: rtw89: acpi: process 6 GHz SP policy from ACPI DSMZong-Zhe Yang2-0/+61
Realtek ACPI DSM func 7, RTW89_ACPI_DSM_FUNC_6GHZ_SP_SUP, accepts a format via ACPI buffer as below. | index | description | -------------------------------------------- | [0-3] | signature | | [4] | revision | | [5] | override driver settings, or not | | [6] | configuration if override | | [7] | reserved | where field of [6] is a bitmap by country, and for now, only define BIT(0) is for US. Through this function with overriding, BIOS can indicate to allow/block 6 GHz SP power by country. Signed-off-by: Zong-Zhe Yang <[email protected]> Signed-off-by: Ping-Ke Shih <[email protected]> Link: https://msgid.link/[email protected]
2024-04-18wifi: rtw89: regd: extend policy of UNII-4 for IC regulatoryZong-Zhe Yang4-27/+77
Originally, we have an ACPI function to determine whether to enable UNII-4. Since IC (Industry Canada) has allowed UNII-4, the ACPI result is extended to be two bits as below. * BIT(0): determine if rtw89_regd::FCC enable UNII-4 * BIT(1): determine if rtw89_regd::IC enable UNII-4 Besides, to take old platforms into account, we enable UNII-4 on IC if and only if BIOS configuration enable it. Signed-off-by: Zong-Zhe Yang <[email protected]> Signed-off-by: Ping-Ke Shih <[email protected]> Link: https://msgid.link/[email protected]
2024-04-18wifi: rtw89: regd: block 6 GHz by policy if not specific countryZong-Zhe Yang1-4/+2
We allow 6 GHz on target regd if and only if 1. it is a specific country, i.e. not any world-wide cases 2. its 6 GHz is not blocked So, for world-wide cases, their 6 GHz will be blocked now. Signed-off-by: Zong-Zhe Yang <[email protected]> Signed-off-by: Ping-Ke Shih <[email protected]> Link: https://msgid.link/[email protected]
2024-04-18wifi: rtw89: 8852c: update TX power tables to R69.1 (2 of 2)Zong-Zhe Yang1-1152/+0
Deconfigure fields for 6GHz SP. Don't use these set of values until getting certification of 6GHz SP regulation. Without configuring these fields, driver takes world-wide values when 6GHz SP cases. Signed-off-by: Zong-Zhe Yang <[email protected]> Signed-off-by: Ping-Ke Shih <[email protected]> Link: https://msgid.link/[email protected]
2024-04-18wifi: rtw89: 8852c: update TX power tables to R69.1 (1 of 2)Zong-Zhe Yang1-1464/+0
Deconfigure fields for 6GHz SP. Don't use these set of values until getting certification of 6GHz SP regulation. Without configuring these fields, driver takes world-wide values when 6GHz SP cases. Signed-off-by: Zong-Zhe Yang <[email protected]> Signed-off-by: Ping-Ke Shih <[email protected]> Link: https://msgid.link/[email protected]