- 03 Apr, 2023 6 commits
-
-
Ping-Ke Shih authored
The register-based H2C/C2H are used to exchange information between driver and firmware, but only apply to narrow area because its data size is smaller than regular packet-based H2C/C2H. This kind of H2C/C2H must be paired. To identify if any H2C/C2H is missing, update counters to help diagnose this kind of problems. Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://lore.kernel.org/r/20230316063956.71687-1-pkshih@realtek.com
-
Ching-Te Ku authored
Update driver with the supported firmware version of the below item. Bluetooth firmware BT_Coex_Ver: 0x07 Wi-Fi firmware version: RTL8852C->v0.27.56.10 RTL8852A->v0.24.36 RTL8852B->v0.29.29 Signed-off-by: Ching-Te Ku <ku920601@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/20230314020617.28193-6-pkshih@realtek.com
-
Ching-Te Ku authored
In order to reduce firmware code size cost, remove some counter value from the structure. But firmware didn't update version code. To parse the correct report, add another variation version v105 to parse it. Signed-off-by: Ching-Te Ku <ku920601@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/20230314020617.28193-5-pkshih@realtek.com
-
Ching-Te Ku authored
The LNA gain didn't set before, it will lead some WiFi RX issue. And the setting can increase both of WiFi & BT performance while they are both RX. Signed-off-by: Ching-Te Ku <ku920601@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/20230314020617.28193-4-pkshih@realtek.com
-
Ching-Te Ku authored
If driver enable firmware report during WiFi power saving, the firmware timer will lead to some power saving issue like, fail to enter LPS, can not leave LPS or some unexpected issue. Signed-off-by: Ching-Te Ku <ku920601@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/20230314020617.28193-3-pkshih@realtek.com
-
Ching-Te Ku authored
This LPS state will not turn off RF, and it can still do some basic traffic, only RTL8852B has the state. Coexistence need let Bluetooth know WiFi is still alive to prevent some Bluetooth performance issue. Signed-off-by: Ching-Te Ku <ku920601@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/20230314020617.28193-2-pkshih@realtek.com
-
- 31 Mar, 2023 17 commits
-
-
Tom Rix authored
clang with W=1 reports drivers/bcma/driver_mips.c:49:19: error: unused function 'mips_read32' [-Werror,-Wunused-function] static inline u32 mips_read32(struct bcma_drv_mips *mcore, ^ This function is not used so remove it. Signed-off-by: Tom Rix <trix@redhat.com> Reviewed-by: Simon Horman <simon.horman@corigine.com> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://lore.kernel.org/r/20230324190647.2654293-1-trix@redhat.com
-
Rob Herring authored
Replace of_get_address() and of_translate_address() calls with single call to of_address_to_resource(). Signed-off-by: Rob Herring <robh@kernel.org> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://lore.kernel.org/r/20230319163159.225773-1-robh@kernel.org
-
Tom Rix authored
clang with W=1 reports drivers/net/wireless/marvell/mwifiex/11h.c:198:6: error: variable 'evt_buf' set but not used [-Werror,-Wunused-but-set-variable] u8 *evt_buf; ^ This variable is not used so remove it. Signed-off-by: Tom Rix <trix@redhat.com> Reviewed-by: Simon Horman <simon.horman@corigine.com> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://lore.kernel.org/r/20230329131444.1809018-1-trix@redhat.com
-
Tom Rix authored
clang with W=1 reports drivers/net/wireless/broadcom/brcm80211/brcmsmac/ampdu.c:848:5: error: variable 'suc_mpdu' set but not used [-Werror,-Wunused-but-set-variable] u8 suc_mpdu = 0, tot_mpdu = 0; ^ This variable is not used so remove it. Signed-off-by: Tom Rix <trix@redhat.com> Reviewed-by: Simon Horman <simon.horman@corigine.com> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://lore.kernel.org/r/20230327151151.1771350-1-trix@redhat.com
-
Wei Chen authored
If there is a failure during copy_from_user or user-provided data buffer is invalid, rtl_debugfs_set_write_reg should return negative error code instead of a positive value count. Fix this bug by returning correct error code. Moreover, the check of buffer against null is removed since it will be handled by copy_from_user. Fixes: 610247f4 ("rtlwifi: Improve debugging by using debugfs") Signed-off-by: Wei Chen <harperchen1110@gmail.com> Reviewed-by: Simon Horman <simon.horman@corigine.com> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://lore.kernel.org/r/20230326054217.93492-1-harperchen1110@gmail.com
-
Wei Chen authored
If there is a failure during copy_from_user or user-provided data buffer is invalid, rtl_debugfs_set_write_rfreg should return negative error code instead of a positive value count. Fix this bug by returning correct error code. Moreover, the check of buffer against null is removed since it will be handled by copy_from_user. Fixes: 610247f4 ("rtlwifi: Improve debugging by using debugfs") Signed-off-by: Wei Chen <harperchen1110@gmail.com> Reviewed-by: Simon Horman <simon.horman@corigine.com> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://lore.kernel.org/r/20230326053138.91338-1-harperchen1110@gmail.com
-
Tom Rix authored
clang with W=1 reports drivers/net/wireless/broadcom/brcm80211/brcmsmac/mac80211_if.c:1051:6: error: variable 'has_5g' set but not used [-Werror,-Wunused-but-set-variable] int has_5g = 0; ^ This variable is not used so remove it. Signed-off-by: Tom Rix <trix@redhat.com> Reviewed-by: Simon Horman <simon.horman@corigine.com> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://lore.kernel.org/r/20230325130343.1334209-1-trix@redhat.com
-
Tom Rix authored
clang with W=1 reports drivers/net/wireless/broadcom/b43legacy/radio.c:1713:5: error: unused function 'freq_r3A_value' [-Werror,-Wunused-function] u16 freq_r3A_value(u16 frequency) ^ This function is not used so remove it. Signed-off-by: Tom Rix <trix@redhat.com> Acked-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://lore.kernel.org/r/20230324135022.2649735-1-trix@redhat.com
-
Gustavo A. R. Silva authored
Zero-length arrays as fake flexible arrays are deprecated and we are moving towards adopting C99 flexible-array members instead. Address the following warning found with GCC-13 and -fstrict-flex-arrays=3 enabled: In function ‘fortify_memset_chk’, inlined from ‘rtl_usb_probe’ at drivers/net/wireless/realtek/rtlwifi/usb.c:1044:2: ./include/linux/fortify-string.h:430:25: warning: call to ‘__write_overflow_field’ declared with attribute warning: detected write beyond size of field (1st parameter); maybe use struct_group()? [-Wattribute-warning] 430 | __write_overflow_field(p_size_field, size); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ This helps with the ongoing efforts to tighten the FORTIFY_SOURCE routines on memcpy() and help us make progress towards globally enabling -fstrict-flex-arrays=3 [1]. Link: https://github.com/KSPP/linux/issues/21 Link: https://github.com/KSPP/linux/issues/277 Link: https://gcc.gnu.org/pipermail/gcc-patches/2022-October/602902.html [1] Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org> Reviewed-by: Simon Horman <simon.horman@corigine.com> Acked-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://lore.kernel.org/r/ZBz4x+MWoI/f65o1@work
-
Cai Huoqing authored
Remove pci_clear_master to simplify the code, the bus-mastering is also cleared in do_pci_disable_device, like this: ./drivers/pci/pci.c:2197 static void do_pci_disable_device(struct pci_dev *dev) { u16 pci_command; pci_read_config_word(dev, PCI_COMMAND, &pci_command); if (pci_command & PCI_COMMAND_MASTER) { pci_command &= ~PCI_COMMAND_MASTER; pci_write_config_word(dev, PCI_COMMAND, pci_command); } pcibios_disable_device(dev); }. And dev->is_busmaster is set to 0 in pci_disable_device. Signed-off-by: Cai Huoqing <cai.huoqing@linux.dev> Reviewed-by: Simon Horman <simon.horman@corigine.com> Reviewed-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://lore.kernel.org/r/20230323112613.7550-4-cai.huoqing@linux.dev
-
Gustavo A. R. Silva authored
Zero-length arrays as fake flexible arrays are deprecated and we are moving towards adopting C99 flexible-array members instead. Address the following warning found with GCC-13 and -fstrict-flex-array=3 enabled: drivers/net/wireless/rndis_wlan.c:2902:23: warning: array subscript 0 is outside array bounds of ‘struct ndis_80211_auth_request[0]’ [-Warray-bounds=] This helps with the ongoing efforts to tighten the FORTIFY_SOURCE routines on memcpy() and help us make progress towards globally enabling -fstrict-flex-arrays=3 [1]. Link: https://github.com/KSPP/linux/issues/21 Link: https://github.com/KSPP/linux/issues/274 Link: https://gcc.gnu.org/pipermail/gcc-patches/2022-October/602902.html [1] Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://lore.kernel.org/r/ZBtIbU77L9eXqa4j@work
-
Dan Carpenter authored
The rndis_bss_info_update() returns type bool. Change the NULL returns to false. Signed-off-by: Dan Carpenter <error27@gmail.com> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://lore.kernel.org/r/d1f250a3-653a-497d-9c92-12dd628b7927@kili.mountain
-
Tom Rix authored
clang with W=1 reports drivers/net/wireless/realtek/rtw88/pci.c:92:21: error: unused function 'rtw_pci_get_tx_desc' [-Werror,-Wunused-function] static inline void *rtw_pci_get_tx_desc(struct rtw_pci_tx_ring *tx_ring, u8 idx) ^ This function is not used, so remove it. Signed-off-by: Tom Rix <trix@redhat.com> Reviewed-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://lore.kernel.org/r/20230320233448.1729899-1-trix@redhat.com
-
Christophe JAILLET authored
There is no point in allocating 'skb' and then freeing it if !channel. Make the sanity check first to slightly simplify the code. Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Reviewed-by: Simon Horman <simon.horman@corigine.com> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://lore.kernel.org/r/29bf0296bd939e3f6952272bfdcc73b22edbc374.1679328588.git.christophe.jaillet@wanadoo.fr
-
Tom Rix authored
clang with W=1 reports drivers/net/wireless/intel/ipw2x00/ipw2200.c:381:19: error: unused function '_ipw_read16' [-Werror,-Wunused-function] static inline u16 _ipw_read16(struct ipw_priv *ipw, unsigned long ofs) ^ This function and its wrapping marco are not used, so remove them. Signed-off-by: Tom Rix <trix@redhat.com> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://lore.kernel.org/r/20230319135418.1703380-1-trix@redhat.com
-
Ryder Lee authored
Similar to AP beacon, this enables the basic mesh EHT mode, including EHT operation IE and the fixed field of EHT operation information IE. As for the optional part (i.e. preamble puncturing bitmap) will be added in future patch. Tested-by: Lian Chen <lian.chen@mediatek.com> Signed-off-by: Ryder Lee <ryder.lee@mediatek.com> Link: https://lore.kernel.org/r/1e0ddb9001312451c3e99c4eed2072caf8075f61.1679935259.git.ryder.lee@mediatek.comSigned-off-by: Johannes Berg <johannes.berg@intel.com>
-
Johannes Berg authored
There are a few merge conflicts due to overlapping fixes and changes, merge wireless/main to fix them. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
-
- 30 Mar, 2023 17 commits
-
-
Johannes Berg authored
Evidently Gregory sent this file but I (apparently every else) missed it entirely, remove that. Fixes: cf85123a ("wifi: iwlwifi: mvm: support enabling and disabling HW timestamping") Signed-off-by: Johannes Berg <johannes.berg@intel.com>
-
Johannes Berg authored
This function can be invoked for both MLO and non-MLO, so it must deal with multi-link correctly. Notable, on auth timeout, we'd otherwise get a warning due to the erroneous deflink usage in MLO cases. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Gregory Greenman <gregory.greenman@intel.com> Link: https://lore.kernel.org/r/20230329100040.b85f6052d51a.Iedfef4b4c4f3ca557aebc0093fdc3f5cfb49b507@changeidSigned-off-by: Johannes Berg <johannes.berg@intel.com>
-
Johannes Berg authored
The link management queues associated with the broadcast stations were forgotten and so the same queue was used with both broadcast stations. This leads to lost frames and warnings on cleanup and HW restart. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Gregory Greenman <gregory.greenman@intel.com> Link: https://lore.kernel.org/r/20230329100040.0671fa976832.Id5aa9856fd5984e447f247e6d0c3979d9794a21a@changeidSigned-off-by: Johannes Berg <johannes.berg@intel.com>
-
Johannes Berg authored
In the MLD code, we free probe_resp_data before we remove the MAC from the firmware, so we might receive another one from the device after freeing, and thus might leak it. Fix that by moving the free later. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Gregory Greenman <gregory.greenman@intel.com> Link: https://lore.kernel.org/r/20230329100040.152b1715fc13.Ibd37fed1b24cd25012923ad9170d1fe33ab35c5c@changeidSigned-off-by: Johannes Berg <johannes.berg@intel.com>
-
Gregory Greenman authored
Start supporting API version 75 for AX devices. Signed-off-by: Gregory Greenman <gregory.greenman@intel.com> Link: https://lore.kernel.org/r/20230329100040.f08a27944fc6.Iafe3a2db2b91072a559038b85eca7b6b322be3ff@changeidSigned-off-by: Johannes Berg <johannes.berg@intel.com>
-
Gregory Greenman authored
This field is used only for host TLC, so it can reside inside the corresponding lq_sta struct. Also, TLC lq_sta is cleared in iwl_mvm_rs_rate_init() upon association, but max_agg_bufsize is set earlier in iwl_mvm_sta_init(). Thus, place this field in the persistent part of lq_sta to retain its value. Signed-off-by: Gregory Greenman <gregory.greenman@intel.com> Link: https://lore.kernel.org/r/20230329100040.d55361064e39.Ib79d30f27d94607d097f0192af2aacd455a17958@changeidSigned-off-by: Johannes Berg <johannes.berg@intel.com>
-
Johannes Berg authored
By using the internal station add the station is installed in firmware with zeroed MAC addresses, which is wrong. Use the full installation function instead, to fill all 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/20230329100040.62d5371bb3c7.Ie25b62125a3a022f76a36bae5fed9796c18698aa@changeidSigned-off-by: Johannes Berg <johannes.berg@intel.com>
-
Gregory Greenman authored
Remove fw_active_links_num counter since we now have a bitmap of active links in vif. Also, update link activation status only when LINK_CONTEXT_MODIFY_ACTIVE bit set in changes parameter. Signed-off-by: Gregory Greenman <gregory.greenman@intel.com> Link: https://lore.kernel.org/r/20230329100040.1ecfb27b6b84.I3a5e0bc32b3728e4caae8a231bc3f04ea1d89cad@changeidSigned-off-by: Johannes Berg <johannes.berg@intel.com>
-
Gregory Greenman authored
Some mac parameters, such as HE support, can change at this stage. Update mac config before updating links. Signed-off-by: Gregory Greenman <gregory.greenman@intel.com> Link: https://lore.kernel.org/r/20230329100040.d7882a0d6e04.Ie38cd854a237c46cf85fd7143dc757326f30da6e@changeidSigned-off-by: Johannes Berg <johannes.berg@intel.com>
-
Shaul Triebitz authored
For bcase/mcast tx frames use the link queue. Signed-off-by: Shaul Triebitz <shaul.triebitz@intel.com> Signed-off-by: Gregory Greenman <gregory.greenman@intel.com> Link: https://lore.kernel.org/r/20230329100040.ccd7218e4be2.I40f608a0441190cc26137b039f7cb7b065fd4e0c@changeidSigned-off-by: Johannes Berg <johannes.berg@intel.com>
-
Johannes Berg authored
Here we always have a link ID, not MAC ID, so clean up the naming. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Gregory Greenman <gregory.greenman@intel.com> Link: https://lore.kernel.org/r/20230329100040.3def62de34b5.I10c9cf5dbfd1fc1e9c9c7d6d4cefcf0c08f1f2da@changeidSigned-off-by: Johannes Berg <johannes.berg@intel.com>
-
Johannes Berg authored
When we remove the station, we call iwl_mvm_sta_del() which returns true if we cannot remove it from the firmware yet, which happens if this is the station ID for the AP station that's still used because the MAC is still associated. However, we still must free the link data as the station is only kept alive in the firmware, in mac80211 and driver the data structures are destroyed. To fix that, we need to make iwl_mvm_mld_free_sta_link() track whether or not the station is still alive in FW, as otherwise we might reuse the station ID in the meantime and iwl_mvm_mld_rm_sta_from_fw() would reject the later delete from the firmware. Add an argument to it for that. Then we can use the return value of iwl_mvm_sta_del() for that to fix the issue, and call iwl_mvm_mld_rm_sta_from_fw() only if we need to not keep the station in FW. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Gregory Greenman <gregory.greenman@intel.com> Link: https://lore.kernel.org/r/20230329100039.1d81d4c71f35.I8fc60ac28ffc1147e9b1250e5e6237b3cb5516ac@changeidSigned-off-by: Johannes Berg <johannes.berg@intel.com>
-
Benjamin Berg authored
Initialize max_rc_amsdu_len per-link both on state change and when a new link is added. Signed-off-by: Benjamin Berg <benjamin.berg@intel.com> Signed-off-by: Gregory Greenman <gregory.greenman@intel.com> Link: https://lore.kernel.org/r/20230329100039.5bf521fe58b8.I73fe585f0ff75d41b5afd32077e3d6e48c90db2a@changeidSigned-off-by: Johannes Berg <johannes.berg@intel.com>
-
Benjamin Berg authored
We were still using the deflink in most cases, update the code to use the appropriate link. Signed-off-by: Benjamin Berg <benjamin.berg@intel.com> Signed-off-by: Gregory Greenman <gregory.greenman@intel.com> Link: https://lore.kernel.org/r/20230329100039.fa1025502fb4.Iaba0c64740fdcf04a521e2f213bd3f3e27862472@changeidSigned-off-by: Johannes Berg <johannes.berg@intel.com>
-
Johannes Berg authored
Use the new macros from mac80211 that do lockdep checking on the RCU dereferences, instead of hard-coding 1 as the argument to rcu_dereference_protected(). Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Gregory Greenman <gregory.greenman@intel.com> Link: https://lore.kernel.org/r/20230329100039.112df5c8dec2.I1a1008f5566e509953d988f254d15c9e58630418@changeidSigned-off-by: Johannes Berg <johannes.berg@intel.com>
-
Johannes Berg authored
During link switching there might be a link that's marked active but has no chanctx assigned (so it's not active from our driver's POV), skip such links in power recalculation without any 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/20230329100039.c629090bd5d2.If7a680d5e349d454f2122f936c21522b9528a55f@changeidSigned-off-by: Johannes Berg <johannes.berg@intel.com>
-
Johannes Berg authored
If we change only idle, avoid sending the MAC context command since it doesn't depend on idle state. This also fixes an issue with the firmware because without this we send the command during link switching, as we just deactivated the first link, and we cannot send this command when there's no active link. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Gregory Greenman <gregory.greenman@intel.com> Link: https://lore.kernel.org/r/20230329100039.f5218f8453ec.I1325ff14ec07a27dd7ea2c1c210a1721d969839f@changeidSigned-off-by: Johannes Berg <johannes.berg@intel.com>
-