summaryrefslogtreecommitdiffstats
path: root/drivers/net
Commit message (Collapse)AuthorAgeFilesLines
* Merge tag 'wireless-next-2023-06-09' of ↵Jakub Kicinski2023-06-09139-5751/+32544
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless-next Kalle Valo says: ==================== wireless-next patches for v6.5 The second pull request for v6.5. We have support for three new Realtek chipsets, all from different generations. Shows how active Realtek development is right now, even older generations are being worked on. Note: We merged wireless into wireless-next to avoid complex conflicts between the trees. Major changes: rtl8xxxu - RTL8192FU support rtw89 - RTL8851BE support rtw88 - RTL8723DS support ath11k - Multiple Basic Service Set Identifier (MBSSID) and Enhanced MBSSID Advertisement (EMA) support in AP mode iwlwifi - support for segmented PNVM images and power tables - new vendor entries for PPAG (platform antenna gain) feature cfg80211/mac80211 - more Multi-Link Operation (MLO) support such as hardware restart - fixes for a potential work/mutex deadlock and with it beginnings of the previously discussed locking simplifications * tag 'wireless-next-2023-06-09' of git://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless-next: (162 commits) wifi: rtlwifi: remove misused flag from HAL data wifi: rtlwifi: remove unused dualmac control leftovers wifi: rtlwifi: remove unused timer and related code wifi: rsi: Do not set MMC_PM_KEEP_POWER in shutdown wifi: rsi: Do not configure WoWlan in shutdown hook if not enabled wifi: brcmfmac: Detect corner error case earlier with log wifi: rtw89: 8852c: update RF radio A/B parameters to R63 wifi: rtw89: 8852c: update TX power tables to R63 with 6 GHz power type (3 of 3) wifi: rtw89: 8852c: update TX power tables to R63 with 6 GHz power type (2 of 3) wifi: rtw89: 8852c: update TX power tables to R63 with 6 GHz power type (1 of 3) wifi: rtw89: process regulatory for 6 GHz power type wifi: rtw89: regd: update regulatory map to R64-R40 wifi: rtw89: regd: judge 6 GHz according to chip and BIOS wifi: rtw89: refine clearing supported bands to check 2/5 GHz first wifi: rtw89: 8851b: configure CRASH_TRIGGER feature for 8851B wifi: rtw89: set TX power without precondition during setting channel wifi: rtw89: debug: txpwr table access only valid page according to chip wifi: rtw89: 8851b: enable hw_scan support wifi: cfg80211: move scan done work to wiphy work wifi: cfg80211: move sched scan stop to wiphy work ... ==================== Link: https://lore.kernel.org/r/87bkhohkbg.fsf@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
| * wifi: rtlwifi: remove misused flag from HAL dataDmitry Antipov2023-06-082-5/+3
| | | | | | | | | | | | | | | | | | | | Always rely on 'driver_is_goingto_unload' of 'struct rtl_hal' and remove (presumably misused) 'driver_going2unload' from it. Signed-off-by: Dmitry Antipov <dmantipov@yandex.ru> Acked-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://lore.kernel.org/r/20230605100700.111644-1-dmantipov@yandex.ru
| * wifi: rtlwifi: remove unused dualmac control leftoversDmitry Antipov2023-06-082-14/+0
| | | | | | | | | | | | | | | | | | | | Remove 'struct rtl_dualmac_easy_concurrent_ctl' of 'struct rtl_priv' and related code in '_rtl_pci_tx_chk_waitq()'. Signed-off-by: Dmitry Antipov <dmantipov@yandex.ru> Acked-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://lore.kernel.org/r/20230602065940.149198-2-dmantipov@yandex.ru
| * wifi: rtlwifi: remove unused timer and related codeDmitry Antipov2023-06-083-18/+1
| | | | | | | | | | | | | | | | | | | | | | | | Drop unused 'dualmac_easyconcurrent_retrytimer' of 'struct rtl_works', corresponding 'rtl_easy_concurrent_retrytimer_callback()' handler, 'dualmac_easy_concurrent' function pointer of 'struct rtl_hal_ops' and related call to 'timer_setup()' in '_rtl_init_deferred_work()'. Signed-off-by: Dmitry Antipov <dmantipov@yandex.ru> Acked-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://lore.kernel.org/r/20230602065940.149198-1-dmantipov@yandex.ru
| * wifi: rsi: Do not set MMC_PM_KEEP_POWER in shutdownMarek Vasut2023-06-081-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | It makes no sense to set MMC_PM_KEEP_POWER in shutdown. The flag indicates to the MMC subsystem to keep the slot powered on during suspend, but in shutdown the slot should actually be powered off. Drop this call. Fixes: 063848c3e155 ("rsi: sdio: Add WOWLAN support for S5 shutdown state") Signed-off-by: Marek Vasut <marex@denx.de> Reviewed-by: Simon Horman <simon.horman@corigine.com> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://lore.kernel.org/r/20230527222859.273768-1-marex@denx.de
| * wifi: rsi: Do not configure WoWlan in shutdown hook if not enabledMarek Vasut2023-06-081-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In case WoWlan was never configured during the operation of the system, the hw->wiphy->wowlan_config will be NULL. rsi_config_wowlan() checks whether wowlan_config is non-NULL and if it is not, then WARNs about it. The warning is valid, as during normal operation the rsi_config_wowlan() should only ever be called with non-NULL wowlan_config. In shutdown this rsi_config_wowlan() should only ever be called if WoWlan was configured before by the user. Add checks for non-NULL wowlan_config into the shutdown hook. While at it, check whether the wiphy is also non-NULL before accessing wowlan_config . Drop the single-use wowlan_config variable, just inline it into function call. Fixes: 16bbc3eb8372 ("rsi: fix null pointer dereference during rsi_shutdown()") Signed-off-by: Marek Vasut <marex@denx.de> Reviewed-by: Simon Horman <simon.horman@corigine.com> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://lore.kernel.org/r/20230527222833.273741-1-marex@denx.de
| * wifi: brcmfmac: Detect corner error case earlier with logNeal Sidhwaney2023-06-081-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In brcmf_chip_recognition(), the return value from an MMIO read is interpreted as various fields without checking if it failed, which is harmless today, as the interpreted fields are checked for validity a few lines below. However, in corner cases (on my MacbookPro 14,1, sometimes after waking from sleep or soft reboot), when this happens, it causes the logging to be misleading, because the message indicates an unsupported chip type ("brcmfmac: brcmf_chip_recognition: chip backplane type 15 is not supported"). This patch detects this case slightly earlier and logs an appropriate message, with the same return result as is the case today. Signed-off-by: Neal Sidhwaney <nealsid@gmail.com> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://lore.kernel.org/r/20230603060021.57225-1-nealsid@gmail.com
| * wifi: rtw89: 8852c: update RF radio A/B parameters to R63Ping-Ke Shih2023-06-081-982/+3948
| | | | | | | | | | | | | | | | Update 8852c radio A/B parameters from internal HALRF_029_00_102 R63. Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://lore.kernel.org/r/20230602150556.36777-9-pkshih@realtek.com
| * wifi: rtw89: 8852c: update TX power tables to R63 with 6 GHz power type (3 of 3)Zong-Zhe Yang2023-06-083-1156/+7306
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Update TX power tables to RF version R63. TX power tables' changes: * TX power byrate: tweak a bit * TX power limit, TX power limit RU, TX power shape: configure values for MEXICO, UKRAINE, CHILE, QATAR tweak a bit on other configured values * 6 GHz TX power limit, 6 GHz TX power limit RU: add an extra dimension for 6 GHz regulatory power type, i.e. STD (standard power), LPI (low power indoor), VLP (very low power) Besides, we adjust TX power handling at 6 GHz in phy to consider 6 GHz regulatory power type. Signed-off-by: Zong-Zhe Yang <kevin_yang@realtek.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://lore.kernel.org/r/20230602150556.36777-8-pkshih@realtek.com
| * wifi: rtw89: 8852c: update TX power tables to R63 with 6 GHz power type (2 of 3)Zong-Zhe Yang2023-06-083-1956/+9282
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Update TX power tables to RF version R63. TX power tables' changes: * TX power byrate: tweak a bit * TX power limit, TX power limit RU, TX power shape: configure values for MEXICO, UKRAINE, CHILE, QATAR tweak a bit on other configured values * 6 GHz TX power limit, 6 GHz TX power limit RU: add an extra dimension for 6 GHz regulatory power type, i.e. STD (standard power), LPI (low power indoor), VLP (very low power) Besides, we adjust TX power handling at 6 GHz in phy to consider 6 GHz regulatory power type. Signed-off-by: Zong-Zhe Yang <kevin_yang@realtek.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://lore.kernel.org/r/20230602150556.36777-7-pkshih@realtek.com
| * wifi: rtw89: 8852c: update TX power tables to R63 with 6 GHz power type (1 of 3)Zong-Zhe Yang2023-06-081-418/+2964
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Update TX power tables to RF version R63. TX power tables' changes: * TX power byrate: tweak a bit * TX power limit, TX power limit RU, TX power shape: configure values for MEXICO, UKRAINE, CHILE, QATAR tweak a bit on other configured values * 6 GHz TX power limit, 6 GHz TX power limit RU: add an extra dimension for 6 GHz regulatory power type, i.e. STD (standard power), LPI (low power indoor), VLP (very low power) Besides, we adjust TX power handling at 6 GHz in phy to consider 6 GHz regulatory power type. Signed-off-by: Zong-Zhe Yang <kevin_yang@realtek.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://lore.kernel.org/r/20230602150556.36777-6-pkshih@realtek.com
| * wifi: rtw89: process regulatory for 6 GHz power typeZong-Zhe Yang2023-06-084-16/+116
| | | | | | | | | | | | | | | | | | | | Configure the corresponding power type for 6 GHz regulatory if we can determine one single target. Otherwise, we use the default one. Signed-off-by: Zong-Zhe Yang <kevin_yang@realtek.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://lore.kernel.org/r/20230602150556.36777-5-pkshih@realtek.com
| * wifi: rtw89: regd: update regulatory map to R64-R40Zong-Zhe Yang2023-06-081-61/+61
| | | | | | | | | | | | | | | | | | | | | | | | Update notes: According to Realtek Regulatory R40 and Realtek Channel Plan R64, configure rtw89_regulatory mapping of 6 GHz for more countries and adjust rtw89_regulatory mapping of 2/5 GHz for a few countries. Signed-off-by: Zong-Zhe Yang <kevin_yang@realtek.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://lore.kernel.org/r/20230602150556.36777-4-pkshih@realtek.com
| * wifi: rtw89: regd: judge 6 GHz according to chip and BIOSZong-Zhe Yang2023-06-081-0/+50
| | | | | | | | | | | | | | | | | | | | | | We allow platform to disable 6 GHz on chips, which supports 6 GHz, through BIOS. Driver will evaluate Realtek acpi DSM with RTW89_ACPI_DSM_FUNC_6G_DIS (function 3) to get whether 6 GHz should be disabled. Signed-off-by: Zong-Zhe Yang <kevin_yang@realtek.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://lore.kernel.org/r/20230602150556.36777-3-pkshih@realtek.com
| * wifi: rtw89: refine clearing supported bands to check 2/5 GHz firstZong-Zhe Yang2023-06-081-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | We refine to check if supported bands of NL80211_BAND_2GHZ and NL80211_BAND_5GHZ exist before freeing their iftype_data. For now, it does not really encounter problems because all current chips support both 2 GHz and 5 GHz. But, driver actually allows chips to declare whether 2/5 GHz are supported or not. In case some future chips really don't support them, we refine this code. Signed-off-by: Zong-Zhe Yang <kevin_yang@realtek.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://lore.kernel.org/r/20230602150556.36777-2-pkshih@realtek.com
| * wifi: rtw89: 8851b: configure CRASH_TRIGGER feature for 8851BZong-Zhe Yang2023-06-081-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | RTL8851B firmware supports CRASH_TRIGGER feature from v0.29.41.0. After this is configured, debugfs fw_crash can support type 1 on RTL8851B to trigger firmware crash and verify L2 recovery through simulation. Signed-off-by: Zong-Zhe Yang <kevin_yang@realtek.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://lore.kernel.org/r/20230531060713.57203-5-pkshih@realtek.com
| * wifi: rtw89: set TX power without precondition during setting channelZong-Zhe Yang2023-06-081-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The key condition to check in wrapper of setting TX power is whether entity is active or not. Before entity is active, we restrict TX power from being set by outside callers, e.g. SAR/regulatory. We mark entity as inactive when powering off MAC. Then, we will mark it as active when we initialize HW channel stuffs after MAC power on. Although we can get an active entity after leaving idle phase, TX power doesn't be set well for default channel until stack set target channel for connection. It causes that RF things cannot use better TX power during this interval. Below are some cases which may encounter this or a similar situation. * hw scan process before connection As described above. * right after restart hardware process (SER L2) HW stuffs of target channel is initialized after mac80211 restart hardware, but we unexpectedly need to wait one more command to set channel again or to set TX power. To fix it and improve RF behavior in that interval, during setting channel, we don't need to check entity state before setting TX power, which actually is used to restrict outside callers. It means we call chip ops directly to replace the wrapper call. Then, TX power can be initialized as long as we initialize/setup HW stuffs on one channel. Besides, all chips should configure ops of setting TX power, so we remove trivial check on pointer. Signed-off-by: Zong-Zhe Yang <kevin_yang@realtek.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://lore.kernel.org/r/20230531060713.57203-4-pkshih@realtek.com
| * wifi: rtw89: debug: txpwr table access only valid page according to chipZong-Zhe Yang2023-06-082-1/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | We now support RTL8851B which has only single RF path. For chip with single RF path, TX power page is valid only in single path section. So, we refine debugfs txpwr table to access TX power page according to RF path number of runtime chip. It can prevent us from reading beyond valid sections. Signed-off-by: Zong-Zhe Yang <kevin_yang@realtek.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://lore.kernel.org/r/20230531060713.57203-3-pkshih@realtek.com
| * wifi: rtw89: 8851b: enable hw_scan supportPo-Hao Huang2023-06-082-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | This enables hw_scan for 8851b after firmware version 0.29.37.1. Extend the channel info struct with padding zeros so newer firmware can work properly, this change is backward compatible with older firmware. Signed-off-by: Po-Hao Huang <phhuang@realtek.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://lore.kernel.org/r/20230531060713.57203-2-pkshih@realtek.com
| * Merge wireless into wireless-nextJohannes Berg2023-06-0742-135/+288
| |\ | | | | | | | | | | | | | | | | | | | | | There are a number of upcoming things in both the stack and drivers that would otherwise conflict, so merge wireless to wireless-next to be able to avoid those conflicts. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
| * | Revert "wifi: iwlwifi: update response for mcc_update command"Johannes Berg2023-06-066-161/+59
| | | | | | | | | | | | | | | | | | | | | | | | This reverts commit b70813e4a88f ("wifi: iwlwifi: update response for mcc_update command") since it causes a merge conflict, and it seems easier to redo the patch later. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
| * | Revert "wifi: iwlwifi: mvm: FTM initiator MLO support"Johannes Berg2023-06-061-32/+13
| | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 1bcbb1208e9a ("wifi: iwlwifi: mvm: FTM initiator MLO support") as it causes a merge conflict, and we can defer and re-do those changes later. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
| * | wifi: mac80211_hwsim: Fix possible NULL dereferenceIlan Peer2023-06-061-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In a call to mac80211_hwsim_select_tx_link() the sta pointer might be NULL, thus need to check that it is not NULL before accessing it. Signed-off-by: Ilan Peer <ilan.peer@intel.com> Signed-off-by: Gregory Greenman <gregory.greenman@intel.com> Link: https://lore.kernel.org/r/20230604120651.f4d889fc98c4.Iae85f527ed245a37637a874bb8b8c83d79812512@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
| * | wifi: mac80211_hwsim: check the return value of nla_put_u32Mukesh Sisodiya2023-06-061-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | Check the return value of nla_put_u32() and handle it accordingly. Signed-off-by: Mukesh Sisodiya <mukesh.sisodiya@intel.com> Signed-off-by: Gregory Greenman <gregory.greenman@intel.com> Link: https://lore.kernel.org/r/20230604120651.de5168568cf6.Ie16442af9be879fd835506ba5dade780edecfb60@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
| * | wifi: mac80211_hwsim: avoid warning with MLO PS stationsJohannes Berg2023-06-061-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the station disables all links it's in powersave and we shouldn't transmit anything to it, but we don't handle that correctly yet. For now, just avoid the warning, once we really add support for this case we can revert to the old warning. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Gregory Greenman <gregory.greenman@intel.com> Link: https://lore.kernel.org/r/20230504134511.828474-8-gregory.greenman@intel.com Signed-off-by: Johannes Berg <johannes.berg@intel.com>
| * | wifi: iwlwifi: pnvm: handle memory descriptor tlvGregory Greenman2023-06-063-17/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When PNVM is obtained from UEFI, there's an additional memory descriptor TLV that has to be handled. It is the same TLV that holds data in the reduced power tables. Also, in this TLV, the actual data is located after address and size, so add the corresponding offset. Signed-off-by: Gregory Greenman <gregory.greenman@intel.com> Link: https://lore.kernel.org/r/20230606103519.8c5f5ee8e30b.Id1893c9dec140b5ba4abe8a121c2e1a1d121d2d7@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
| * | wifi: iwlwifi: fw: don't use constant size with efi.get_variableGregory Greenman2023-06-062-82/+74
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use efi.get_variable() with NULL pointer for data in order to obtain entry size and then call it again with the correct size to get the entry itself. Signed-off-by: Gregory Greenman <gregory.greenman@intel.com> Link: https://lore.kernel.org/r/20230606103519.ef95a8055a50.Iae5389baaf0a9a3c89469f7502275ee119d378b6@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
| * | wifi: iwlwifi: fw: clean up PNVM loading codeJohannes Berg2023-06-061-66/+89
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This code is a bit of a maze of gotos etc. Clean up the code a bit to make the intent clearer. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Gregory Greenman <gregory.greenman@intel.com> Link: https://lore.kernel.org/r/20230606103519.51fb5ee63f21.I20f270b2d47612e84643dc235c2940b8d9ed9930@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
| * | wifi: iwlwifi: Separate reading and parsing of reduce power tableAlon Giladi2023-06-064-42/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It enables to better handle error cases. Also save the image till the end of the loading and only then free it. Signed-off-by: Alon Giladi <alon.giladi@intel.com> Signed-off-by: Gregory Greenman <gregory.greenman@intel.com> Link: https://lore.kernel.org/r/20230606103519.71e3b3e0e794.Ifbe69ad99a7e805eb70e09280365821eb146b1c9@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
| * | wifi: iwlwifi: Enable loading of reduce-power tables into several segmentsAlon Giladi2023-06-066-80/+169
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replace the field reduce_power_dram with a struct that holds data about the reduced-power tables drams regions. Generalize load_payloads_segments() to work for both pnvm tables and reduction power tables. Make required adjustments in the data structures. Signed-off-by: Alon Giladi <alon.giladi@intel.com> Signed-off-by: Gregory Greenman <gregory.greenman@intel.com> Link: https://lore.kernel.org/r/20230606103519.6fe66958f049.I85d80682229fc02fe354462cc9da40937558f30c@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
| * | wifi: iwlwifi: Use iwl_pnvm_image in reduce power tables flowAlon Giladi2023-06-066-83/+63
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Generalize the parsing, loading, and setting of the power-reduce tables, in order to support allocation of several DRAM payloads in the future. Signed-off-by: Alon Giladi <alon.giladi@intel.com> Signed-off-by: Gregory Greenman <gregory.greenman@intel.com> Link: https://lore.kernel.org/r/20230606103519.564f1eead99b.Iaba653b21dc09aafc72b9bbb3928abddce0db50a@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
| * | wifi: iwlwifi: Separate loading and setting of power reduce tablesAlon Giladi2023-06-065-21/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Take the part that copies the tables into DRAM, out of the method that sets the prph_scratch to make the code cleaner. Each of the operations will get more complex in the future when it will also support larger power-reduce tables images. Signed-off-by: Alon Giladi <alon.giladi@intel.com> Signed-off-by: Gregory Greenman <gregory.greenman@intel.com> Link: https://lore.kernel.org/r/20230606103519.7695684dc848.I13626cd318e5d68efec9618b2045f52788bff114@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
| * | wifi: iwlwifi: Implement loading and setting of fragmented pnvm imageAlon Giladi2023-06-064-6/+86
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Save the pnvm payloads in several DRAM segments (not only in one as used to). In addition, allocate a FW structure in DRAM that holds the segments' addresses and forward its address to the FW. It's done when FW has the capability to handle pnvm images this way (helps to process large pnvm images). Signed-off-by: Alon Giladi <alon.giladi@intel.com> Signed-off-by: Gregory Greenman <gregory.greenman@intel.com> Link: https://lore.kernel.org/r/20230606103519.dbdad8995ce1.I986213527982637042532de3851a1bd8a11be87a@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
| * | wifi: iwlwifi: Add support for fragmented pnvm imagesAlon Giladi2023-06-067-46/+88
| | | | | | | | | | | | | | | | | | | | | | | | | | | Add support for fragmented pnvm images, depending on the FW capability. Signed-off-by: Alon Giladi <alon.giladi@intel.com> Signed-off-by: Gregory Greenman <gregory.greenman@intel.com> Link: https://lore.kernel.org/r/20230606103519.c49bfaf435a9.I0278312e7c3355b224cd870d4f8cf6578d12f03e@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
| * | wifi: iwlwifi: Allow trans_pcie track more than 1 pnvm DRAM regionAlon Giladi2023-06-063-10/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change the field pnvm_dram to an array that describes many regions and add a counter to the number of pnvm regions that were allocated in DRAM. Signed-off-by: Alon Giladi <alon.giladi@intel.com> Signed-off-by: Gregory Greenman <gregory.greenman@intel.com> Link: https://lore.kernel.org/r/20230606103519.bb206d71bf45.I627640701757bb2f234f8e18a3afbd6af1206658@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
| * | wifi: iwlwifi: Take loading and setting of pnvm image out of parsing partAlon Giladi2023-06-062-61/+73
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change iwl_pnvm_parse so it will only save the information into the iwl_pnvm_image struct. This enables to use the parsing code for the power reduce tables in the future. Signed-off-by: Alon Giladi <alon.giladi@intel.com> Signed-off-by: Gregory Greenman <gregory.greenman@intel.com> Link: https://lore.kernel.org/r/20230606103519.504b42fc1611.I4ddf6ad76d922d118fcbcc4f0e9ec003753d0b75@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
| * | wifi: iwlwifi: Separate loading and setting of pnvm image into two functionsAlon Giladi2023-06-065-47/+65
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Take the part that is copying the pnvm image into DRAM, out of the the method that sets the prph_scratch. Makes the code cleaner since those 2 operations don't always happen together (loading should happen only once while setting can happen more than once). In addition, each operation will get more complex in the future when it will support also larger pnvm images. Signed-off-by: Alon Giladi <alon.giladi@intel.com> Signed-off-by: Gregory Greenman <gregory.greenman@intel.com> Link: https://lore.kernel.org/r/20230606103519.4c0728239fd6.Ibc30a9fbdb6123dadbe2dbb89318dbd5ec01080a@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
| * | wifi: iwlwifi: Generalize the parsing of the pnvm imageAlon Giladi2023-06-066-45/+72
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Generalize iwl_pnvm_parse(). This saves us from copying each payload twice (first in the parsing and later when copying it to the dram). Moreover, its more compatible for handling larger pnvm tables in the future (in which payloads won't be concatenated). The main changes are: 1. Take out the concatenating of the payloads from the parsing level 2. Start using iwl_pnvm_image structure that will hold pointers to payloads that should be delivered to fw, their sizes and number. Signed-off-by: Alon Giladi <alon.giladi@intel.com> Signed-off-by: Gregory Greenman <gregory.greenman@intel.com> Link: https://lore.kernel.org/r/20230606103519.06c02f380b6f.I03a3030fca194aa0c4bc2ecd18531f8914e98cfd@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
| * | wifi: iwlwifi: api: fix kernel-doc linksJohannes Berg2023-06-066-18/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some of the kernel-doc links are outdated due to other changes, fix that. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Gregory Greenman <gregory.greenman@intel.com> Link: https://lore.kernel.org/r/20230601171633.85e2cf489893.Ie3889ea6f755b80c988543ccca56c67420c51b1f@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
| * | wifi: iwlwifi: api: remove unused commandsJohannes Berg2023-06-062-13/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some commands are no longer used and have broken kernel-doc links, so just remove them. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Gregory Greenman <gregory.greenman@intel.com> Link: https://lore.kernel.org/r/20230601171633.3dad4ad9b53e.I018abd02d6925950b8748dfb7a59db87255fc670@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
| * | wifi: iwlwifi: api: use __le16 instead of u16Johannes Berg2023-06-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Even for reserved values we shouldn't use u16, that's just error prone. Fix this to __le16. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Gregory Greenman <gregory.greenman@intel.com> Link: https://lore.kernel.org/r/20230601171633.29ebf70aa64e.I1263f6724e1c70ff5541f447b9744f143ee736a3@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
| * | wifi: iwlwifi: api: link context action in kernel-docJohannes Berg2023-06-066-17/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is clearer in kernel-doc than spelling out the prefix. It also lets us generate better tracing data. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Gregory Greenman <gregory.greenman@intel.com> Link: https://lore.kernel.org/r/20230601171633.e11ece794f60.I9874c7b0437071a2620d68ca5a16efed60da07a9@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
| * | wifi: iwlwifi: mvm: tell firmware about per-STA MFP enablementJohannes Berg2023-06-062-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Indicate to the firmware for each station whether or not MFP is used with this station. Note that we indicate MFP for it before authorized since we don't know yet, and that will make the firmware not handle should-be-protected management frames without being able to check them. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Gregory Greenman <gregory.greenman@intel.com> Link: https://lore.kernel.org/r/20230601095201.b1052f39af4c.I1b46b751d5808e65ea3d0e7b8b38209c5aecf042@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
| * | wifi: iwlwifi: mvm: send time sync only if neededJohannes Berg2023-06-061-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If there's no peer configured then there's no point in sending the command down to the firmware with an invalid peer address. Fixes: cf85123a210f ("wifi: iwlwifi: mvm: support enabling and disabling HW timestamping") Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Gregory Greenman <gregory.greenman@intel.com> Link: https://lore.kernel.org/r/20230531194630.0fb9f81f1852.Idcc41b67d1fbb421e5ed9bac2177b948b7b4d1c9@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
| * | wifi: iwlwifi: mvm: remove warning for beacon filtering errorJohannes Berg2023-06-061-5/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This warning is sometimes happening if we force a FW error while disconnecting, which is annoying but harmless. However, it's also pointless to throw a warning here, since the stack and driver state doesn't really help, so just remove that so the driver will ignore the error if any. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Gregory Greenman <gregory.greenman@intel.com> Link: https://lore.kernel.org/r/20230531194630.29fe6990d372.I00ff5dc7bfb4025a609f380a0a3911d842b72449@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
| * | wifi: iwlwifi: remove dead code in iwl_dump_ini_imr_get_size()Mukesh Sisodiya2023-06-061-7/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove the check for the IMR debug data size which leads to dead code. Signed-off-by: Mukesh Sisodiya <mukesh.sisodiya@intel.com> Signed-off-by: Gregory Greenman <gregory.greenman@intel.com> Link: https://lore.kernel.org/r/20230531194630.58eec8d40729.Ifb7d64706eed45726db804f36e785283dff7adab@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
| * | wifi: iwlwifi: Add Dell to ppag approved listAlon Giladi2023-06-061-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | Add 2 new entries for Dell in PPAG approved list. Signed-off-by: Alon Giladi <alon.giladi@intel.com> Signed-off-by: Gregory Greenman <gregory.greenman@intel.com> Link: https://lore.kernel.org/r/20230531194630.a2696f0538ef.I324e4a0cc4696c27830a490b79c42dfeff8ba074@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
| * | wifi: iwlwifi: mvm: FTM initiator MLO supportAvraham Stern2023-06-061-13/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When checking if the initiator is associated to the responder, iterate over all active links. Signed-off-by: Avraham Stern <avraham.stern@intel.com> Signed-off-by: Gregory Greenman <gregory.greenman@intel.com> Link: https://lore.kernel.org/r/20230531194629.a0d86655e7d2.I8f140ca55094da1d73c387fc036394fb2c148c85@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
| * | wifi: iwlwifi: pcie: adjust Bz device timingsJohannes Berg2023-06-061-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The 100ms shouldn't be needed, only 10ms. However after reset we should have 10ms as well for these devices. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Gregory Greenman <gregory.greenman@intel.com> Link: https://lore.kernel.org/r/20230531194629.9a5627c1ff18.Ifcfbccd5458bd9ebd496aa834284fb0facfcaaef@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
| * | wifi: iwlwifi: mvm: offload BTM response during D3Haim Dreyfuss2023-06-063-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are mainly two types of BTM (BSS Transition Management) requests, recommendations and notifications. For the first type, a response is needed otherwise, most probably the STA will be disconnected. Since we don't want to wake up the host on it, set the BTM to reject offload flag (if the device supports it) and rely on the FW to take care of it. The FW will reject the BTM request and in case the AP sends DEAUTH the FW can wake up the host to let it decide on the next steps. Signed-off-by: Haim Dreyfuss <haim.dreyfuss@intel.com> Signed-off-by: Gregory Greenman <gregory.greenman@intel.com> Link: https://lore.kernel.org/r/20230531194629.d95ae6f2804c.I9457acc55bc23ce715c714b5088058f52540c224@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>