summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/realtek/rtl8xxxu
AgeCommit message (Collapse)Author
2024-02-28wifi: rtl8xxxu: fix mixed declarations in rtl8xxxu_set_aifs()Shiji Yang
Moving struct ieee80211_sta *sta variable definition to the front of the code to fix the ISO C90 forbids mixed declarations and code warning. Fixes: 43532c050f8e ("wifi: rtl8xxxu: support multiple interfaces in set_aifs()") Signed-off-by: Shiji Yang <yangshiji66@outlook.com> Reviewed-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://msgid.link/TYAP286MB03157A408E0D69F2F6FBD88ABC552@TYAP286MB0315.JPNP286.PROD.OUTLOOK.COM
2024-02-21wifi: rtl8xxxu: check vif before using in rtl8xxxu_tx()Ping-Ke Shih
The 'vif' is from tx_info of SKB, and other codes check 'vif' before using, which raises smatch warnings: drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c:5656 rtl8xxxu_tx() warn: variable dereferenced before check 'vif' (see line 5553) Compile tested only. Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://msgid.link/20240216033923.34683-1-pkshih@realtek.com
2024-02-21wifi: mac80211: check beacon countdown is complete on per link basisAditya Kumar Singh
Currently, function to check if beacon countdown is complete uses deflink to fetch the beacon and check the counter. However, with MLO, there is a need to check the counter for the beacon in a particular link. Add support to use link_id in order to fetch the beacon from a particular link data. Signed-off-by: Aditya Kumar Singh <quic_adisi@quicinc.com> Link: https://msgid.link/20240216144621.514385-2-quic_adisi@quicinc.com Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2024-02-08wifi: mac80211: add support to call csa_finish on a linkAditya Kumar Singh
Currently ieee80211_csa_finish() function finalizes CSA by scheduling a finalizing worker using the deflink. With MLO, there is a need to do it on a given link basis. Pass link ID of the link on which CSA needs to be finalized. Signed-off-by: Aditya Kumar Singh <quic_adisi@quicinc.com> Link: https://msgid.link/20240130140918.1172387-6-quic_adisi@quicinc.com Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2024-02-08wifi: mac80211: simplify non-chanctx driversJohannes Berg
There are still surprisingly many non-chanctx drivers, but in mac80211 that code is a bit awkward. Simplify this by having those drivers assign 'emulated' ops, so that the mac80211 code can be more unified between non-chanctx/chanctx drivers. This cuts the number of places caring about it by about 15, which are scattered across - now they're fewer and no longer in the channel context handling. Link: https://msgid.link/20240129194108.6d0ead50f5cf.I60d093b2fc81ca1853925a4d0ac3a2337d5baa5b@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2024-02-06wifi: rtl8xxxu: update rate mask per staMartin Kaistra
Until now, rtl8xxxu_watchdog_callback() only fetches RSSI and updates the rate mask in station mode. This means, in AP mode only the default rate mask is used. In order to have the rate mask reflect the actual connection quality, extend rtl8xxxu_watchdog_callback() to iterate over every sta. Like in the rtw88 driver, add a function to collect all currently present stas and then iterate over a list of copies to ensure no RCU lock problems for register access via USB. Remove the existing RCU lock in rtl8xxxu_refresh_rate_mask(). Since the currently used ieee80211_ave_rssi() is only for 'vif', add driver-level tracking of RSSI per sta. Signed-off-by: Martin Kaistra <martin.kaistra@linutronix.de> Reviewed-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://msgid.link/20240205093040.1941140-1-martin.kaistra@linutronix.de
2024-02-05wifi: rtl8xxxu: Add TP-Link TL-WN823N V2Chun Qiu
TP-Link TL-WN823N V2 (2357:0135) is based on rtl8192fu and has been tested to work with the rtl8xxxu driver. Signed-off-by: Chun Qiu <cqca@cock.lu> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://msgid.link/20240129053030.16369-1-cqca@cock.lu
2024-02-01wifi: rtl8xxxu: fix error messagesDan Carpenter
The first parameter of WARN_ONCE() is a condition so this code will end up printing the function name instead of the proper message. Fixes: 3ff7a05996f9 ("wifi: rtl8xxxu: support setting bssid register for multiple interfaces") Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org> Reviewed-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://msgid.link/7b144531-a8da-4725-8911-9b614a525a35@moroto.mountain
2024-01-19wifi: rtl8xxxu: add missing number of sec cam entries for all variantsMartin Kaistra
Commit b837f78fbffa ("wifi: rtl8xxxu: add hw crypto support for AP mode") introduced max_sec_cam_num as a member of rtl8xxxu_fileops. It was missed to set this number for all variants except 8188f, which caused rtl8xxxu_get_free_sec_cam() to always return 0 and therefore breaking encrypted traffic. Fix it by adding the numbers for all variants. The values are taken from the vendor drivers and rtlwifi. Link: https://lore.kernel.org/linux-wireless/20240111163603.2325-1-zenmchen@gmail.com/ Fixes: b837f78fbffa ("wifi: rtl8xxxu: add hw crypto support for AP mode") Signed-off-by: Martin Kaistra <martin.kaistra@linutronix.de> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://msgid.link/20240116095001.399500-1-martin.kaistra@linutronix.de
2024-01-18wifi: rtl8xxxu: make instances of iface limit and combination to be static constPing-Ke Shih
rtl8xxxu_limits and rtl8xxxu_combinations can be static const, so add modifiers as desire. Otherwise, Sparse reports warnings rtl8xxxu_core.c:7677:30: warning: symbol 'rtl8xxxu_limits' was not declared. Should it be static? rtl8xxxu_core.c:7682:36: warning: symbol 'rtl8xxxu_combinations' was not declared. Should it be static? Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://msgid.link/20240116080945.20172-2-pkshih@realtek.com
2024-01-18wifi: rtl8xxxu: convert EN_DESC_ID of TX descriptor to le32 typePing-Ke Shih
Fields of TX descriptor are little-endian order, so correct EN_DESC_ID field to le32 type. Fixes: b837f78fbffa ("wifi: rtl8xxxu: add hw crypto support for AP mode") Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202401161318.YtXoCkjU-lkp@intel.com/ Cc: Martin Kaistra <martin.kaistra@linutronix.de> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://msgid.link/20240116080945.20172-1-pkshih@realtek.com
2024-01-14wifi: rtl8xxxu: enable channel switch supportMartin Kaistra
The CSA countdown in the beacon frames, which are sent out by firmware, needs to get updated by the driver. To achieve this, convert update_beacon_work to delayed_work and schedule it with the beacon interval in case CSA is active and the countdown is not complete. Signed-off-by: Martin Kaistra <martin.kaistra@linutronix.de> Reviewed-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://msgid.link/20240111163628.320697-3-martin.kaistra@linutronix.de
2024-01-14wifi: rtl8xxxu: add cancel_work_sync() for c2hcmd_workMartin Kaistra
The workqueue might still be running, when the driver is stopped. To avoid a use-after-free, call cancel_work_sync() in rtl8xxxu_stop(). Fixes: e542e66b7c2e ("rtl8xxxu: add bluetooth co-existence support for single antenna") Signed-off-by: Martin Kaistra <martin.kaistra@linutronix.de> Reviewed-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://msgid.link/20240111163628.320697-2-martin.kaistra@linutronix.de
2024-01-10wifi: rtl8xxxu: Fix off by one initial RTS rateBitterblue Smith
rtl8xxxu_set_basic_rates() sets the wrong initial RTS rate. It sets the next higher rate than the one it should set, e.g. 36M instead of 24M. The while loop was supposed to find the index of the most significant bit which is 1, but it was copied incorrectly from the vendor driver. Use __fls() instead. Signed-off-by: Bitterblue Smith <rtl8821cerfe2@gmail.com> Reviewed-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://msgid.link/761e6836-6cd6-4930-91b6-0446834655c5@gmail.com
2024-01-10wifi: rtl8xxxu: Fix LED control code of RTL8192FUBitterblue Smith
Some devices, like the Comfast CF-826F, use LED1, which already works. Others, like Asus USB-N13 C1, use LED0, which doesn't work correctly. Write the right values to the LED control registers to make LED0 work as well. This is unfortunately tested only with the Comfast CF-826F. Signed-off-by: Bitterblue Smith <rtl8821cerfe2@gmail.com> Reviewed-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://msgid.link/7a2c3158-3a45-4466-b11e-fc09802b20e2@gmail.com
2024-01-10wifi: rtl8xxxu: declare concurrent mode support for 8188fMartin Kaistra
Everything is in place now for concurrent mode, we can tell the system that we support it. We will allow a maximum of 2 virtual interfaces, one of them can be in AP mode. Signed-off-by: Martin Kaistra <martin.kaistra@linutronix.de> Reviewed-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://msgid.link/20231222101442.626837-22-martin.kaistra@linutronix.de
2024-01-10wifi: rtl8xxxu: make supporting AP mode only on port 0 transparentMartin Kaistra
When the driver is used for concurrent mode, both virtual interfaces can be set to station or AP mode, though only one can be in AP mode at the same time. In order to keep the code simple, use only hw port 0 for AP mode. When an interface is added in AP mode which would be assigned to port 1, use a switch_port function to transparently swap the mapping between virtual interface and hw port. Signed-off-by: Martin Kaistra <martin.kaistra@linutronix.de> Reviewed-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://msgid.link/20231222101442.626837-21-martin.kaistra@linutronix.de
2024-01-10wifi: rtl8xxxu: add hw crypto support for AP modeMartin Kaistra
Add a custom function for allocating entries in the sec cam. This allows us to store multiple keys with the same keyidx. The maximum number of sec cam entries for 8188f is 16 according to the vendor driver. Add the number to rtl8xxxu_fileops, so that other chips which might support more entries, can set a different number there. Set the bssid as mac address for group keys instead of just using the ethernet broadcast address and use BIT(6) in the sec cam ctrl entry for differentiating them from pairwise keys like in the vendor driver. Add the TXDESC_EN_DESC_ID bit and the hw_key_idx to tx broadcast/multicast packets in AP mode. Finally, allow the usage of rtl8xxxu_set_key() for AP mode. Signed-off-by: Martin Kaistra <martin.kaistra@linutronix.de> Reviewed-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://msgid.link/20231222101442.626837-20-martin.kaistra@linutronix.de
2024-01-10wifi: rtl8xxxu: remove obsolete priv->vifMartin Kaistra
Now that all uses of priv->vif have been converted to priv->vifs[] remove the old attribute. Signed-off-by: Martin Kaistra <martin.kaistra@linutronix.de> Reviewed-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://msgid.link/20231222101442.626837-19-martin.kaistra@linutronix.de
2024-01-10wifi: rtl8xxxu: add macids for STA modeMartin Kaistra
Until now, the driver only assigned a dedicated macid for connections made in AP mode, in STA mode the return value of rtl8xxxu_get_macid() was simply 0. To differentiate between port 0 and 1, when both are in STA mode, allocate a second macid (with value 1) and set sta_info->macid according to the used port_num in rtl8xxxu_sta_add(). Signed-off-by: Martin Kaistra <martin.kaistra@linutronix.de> Reviewed-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://msgid.link/20231222101442.626837-18-martin.kaistra@linutronix.de
2024-01-10wifi: rtl8xxxu: support multiple interface in start_ap()Martin Kaistra
Call set_bssid() with the correct port_num now. Signed-off-by: Martin Kaistra <martin.kaistra@linutronix.de> Reviewed-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://msgid.link/20231222101442.626837-17-martin.kaistra@linutronix.de
2024-01-10wifi: rtl8xxxu: support multiple interfaces in bss_info_changed()Martin Kaistra
Call set_linktype and set_bssid now with correct port_num. Call stop_tx_beacon only for port 0, as we don't support beacons on port 1. Explicit changes to BEACON will only happen for AP type interfaces, so we don't need an additional check there. Signed-off-by: Martin Kaistra <martin.kaistra@linutronix.de> Reviewed-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://msgid.link/20231222101442.626837-16-martin.kaistra@linutronix.de
2024-01-10wifi: rtl8xxxu: support multiple interfaces in {add,remove}_interface()Martin Kaistra
Add a custom struct to store in vif->drv_priv with a reference to port_num and fill it when a new interface is added. Choose a free port_num for the newly added interface. As we only want to support AP mode/sending beacons on port 0, only change the beacon settings if a new interface is actually assigned to port 0. Call set_linktype() and set_mac() with the appropriate port_num. Signed-off-by: Martin Kaistra <martin.kaistra@linutronix.de> Reviewed-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://msgid.link/20231222101442.626837-15-martin.kaistra@linutronix.de
2024-01-10wifi: rtl8xxxu: support multiple interfaces in watchdog_callback()Martin Kaistra
Check first whether priv->vifs[0] exists and is of type STATION, then go to priv->vifs[1]. Make sure to call refresh_rate_mask for both interfaces. Signed-off-by: Martin Kaistra <martin.kaistra@linutronix.de> Reviewed-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://msgid.link/20231222101442.626837-14-martin.kaistra@linutronix.de
2024-01-10wifi: rtl8xxxu: support multiple interfaces in configure_filter()Martin Kaistra
As we only want to support AP mode/sending beacons on port 0, change from priv->vif to priv->vifs[0] in the check for AP mode. Additionally, if we are in AP mode, don't filter RX beacon and probe response frames to still allow working STATION mode on the other interface. Signed-off-by: Martin Kaistra <martin.kaistra@linutronix.de> Reviewed-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://msgid.link/20231222101442.626837-13-martin.kaistra@linutronix.de
2024-01-10wifi: rtl8xxxu: support multiple interfaces in update_beacon_work_callback()Martin Kaistra
As we only want to support AP mode/sending beacons on port 0, it is enough to replace priv->vif with priv->vifs[0]. Signed-off-by: Martin Kaistra <martin.kaistra@linutronix.de> Reviewed-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://msgid.link/20231222101442.626837-12-martin.kaistra@linutronix.de
2024-01-10wifi: rtl8xxxu: support multiple interfaces in set_aifs()Martin Kaistra
In concurrent mode supported by this driver, both interfaces will use the same channel and same wireless mode. It is therefore possible to get the wireless mode by checking the first connected interface. Signed-off-by: Martin Kaistra <martin.kaistra@linutronix.de> Reviewed-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://msgid.link/20231222101442.626837-11-martin.kaistra@linutronix.de
2024-01-10wifi: rtl8xxxu: support setting bssid register for multiple interfacesMartin Kaistra
To prepare for concurrent mode, enhance rtl8xxxu_set_bssid() to write the BSSID of the respective interface to REG_BSSID or REG_BSSID1. Like done with rtl8xxxu_set_mac(), call rtl8xxxu_set_bssid() with port_num = 0, until the callers also support multiple interfaces. Signed-off-by: Martin Kaistra <martin.kaistra@linutronix.de> Reviewed-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://msgid.link/20231222101442.626837-10-martin.kaistra@linutronix.de
2024-01-10wifi: rtl8xxxu: don't parse CFO, if both interfaces are connected in STA modeMartin Kaistra
If both interfaces are in STATION mode and both are connected to an AP, there might be conflicting CFO values for the two connections. Ignore the CFO information in this case. Signed-off-by: Martin Kaistra <martin.kaistra@linutronix.de> Reviewed-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://msgid.link/20231222101442.626837-9-martin.kaistra@linutronix.de
2024-01-10wifi: rtl8xxxu: extend check for matching bssid to both interfacesMartin Kaistra
The driver will support two interfaces soon, which both can be in station mode, so extend the check, whether cfo information should be parsed, to cover both interfaces. For better code readability put the lines with priv->vifs[port_num] in a separate function. Signed-off-by: Martin Kaistra <martin.kaistra@linutronix.de> Reviewed-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://msgid.link/20231222101442.626837-8-martin.kaistra@linutronix.de
2024-01-10wifi: rtl8xxxu: extend wifi connected check to both interfacesMartin Kaistra
There are multiple places in the code where the current connection status of wifi is checked. The driver will support two interfaces soon and either one of them (or both) could be connected. Convert all uses of (vif && vif->cfg.assoc) to a new helper function rtl8xxxu_is_assoc() which checks both interfaces. Signed-off-by: Martin Kaistra <martin.kaistra@linutronix.de> Reviewed-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://msgid.link/20231222101442.626837-7-martin.kaistra@linutronix.de
2024-01-10wifi: rtl8xxxu: support setting mac address register for both interfacesMartin Kaistra
To prepare for concurrent mode, enhance rtl8xxxu_set_mac() to write the mac address of the respective interface to REG_MACID or REG_MACID1. Remove the call to rtl8xxxu_set_mac() from the init function as we set it in rtl8xxxu_add_interface() later anyway. Until rtl8xxxu_add_interface() can handle both interfaces, call rtl8xxxu_set_mac() with port_num = 0. Signed-off-by: Martin Kaistra <martin.kaistra@linutronix.de> Reviewed-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://msgid.link/20231222101442.626837-6-martin.kaistra@linutronix.de
2024-01-10wifi: rtl8xxxu: 8188e: convert usage of priv->vif to priv->vifs[0]Martin Kaistra
The driver currently does not support AP or concurrent mode for 8188e, so just use priv->vifs[0] instead of priv->vif for now. Signed-off-by: Martin Kaistra <martin.kaistra@linutronix.de> Reviewed-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://msgid.link/20231222101442.626837-5-martin.kaistra@linutronix.de
2024-01-10wifi: rtl8xxxu: support setting linktype for both interfacesMartin Kaistra
To prepare for concurrent mode, enhance the set_linktype function to be able to set the linktype in the MSR register for both hardware ports. Until the users of set_linktype can handle multiple interfaces, use port_num = 0. Signed-off-by: Martin Kaistra <martin.kaistra@linutronix.de> Reviewed-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://msgid.link/20231222101442.626837-4-martin.kaistra@linutronix.de
2024-01-10wifi: rtl8xxxu: prepare supporting two virtual interfacesMartin Kaistra
To prepare for concurrent mode, add an array ("vifs") to rtl8xxxu_priv to keep track of both interfaces. Keep the old priv->vif as long there are still users of it and let priv->vifs[0] point to the same location. Signed-off-by: Martin Kaistra <martin.kaistra@linutronix.de> Reviewed-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://msgid.link/20231222101442.626837-3-martin.kaistra@linutronix.de
2024-01-10wifi: rtl8xxxu: remove assignment of priv->vif in rtl8xxxu_bss_info_changed()Martin Kaistra
priv->vif gets already set in rtl8xxxu_add_interface, there is no need to set it also in rtl8xxxu_bss_info_changed(). Signed-off-by: Martin Kaistra <martin.kaistra@linutronix.de> Reviewed-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://msgid.link/20231222101442.626837-2-martin.kaistra@linutronix.de
2023-12-19wifi: rtl8xxxu: Add additional USB IDs for RTL8192EU devicesZenm Chen
Add additional USB IDs found in the vendor driver from https://github.com/Mange/rtl8192eu-linux-driver to support more RTL8192EU devices. Signed-off-by: Zenm Chen <zenmchen@gmail.com> Reviewed-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://msgid.link/20231217123017.1982-1-zenmchen@gmail.com
2023-09-18wifi: rtl8xxxu: Add a description about the device ID 0x7392:0xb722Zenm Chen
According to the driver provided by EDIMAX, the device ID 0x7392:0xb722 belongs to EDIMAX EW-7722UTn V3, so add a comment about this. Signed-off-by: Zenm Chen <zenmchen@gmail.com> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://lore.kernel.org/r/20230912053614.10644-1-zenmchen@gmail.com
2023-09-04wifi: rtl8xxxu: mark TOTOLINK N150UA V5/N150UA-B as testedZenm Chen
TOTOLINK N150UA V5/N150UA-B (VID=0x0bda, PID=0x2005) works fine with the rtl8xxxu driver, so mark as tested. Signed-off-by: Zenm Chen <zenmchen@gmail.com> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://lore.kernel.org/r/20230829074358.14795-1-zenmchen@gmail.com
2023-07-25wifi: rtl8xxxu: Enable AP mode for RTL8723BUBitterblue Smith
Theoretically this chip can handle 127 clients. Only compile tested but it should work as well as the RTL8188FU. Signed-off-by: Bitterblue Smith <rtl8821cerfe2@gmail.com> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://lore.kernel.org/r/b2876c56-0ea7-c398-5c9b-635f9f894f2c@gmail.com
2023-07-25wifi: rtl8xxxu: Enable AP mode for RTL8192EUBitterblue Smith
Theoretically this chip can handle 127 clients. Tested only very briefly but it should work as well as the RTL8188FU. Signed-off-by: Bitterblue Smith <rtl8821cerfe2@gmail.com> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://lore.kernel.org/r/56c9b186-ba9a-8469-652d-ce1709813e9e@gmail.com
2023-07-25wifi: rtl8xxxu: Enable AP mode for RTL8710BU (RTL8188GU)Bitterblue Smith
Theoretically this chip can handle 15 clients. Tested only very briefly but it should work as well as the RTL8188FU. Signed-off-by: Bitterblue Smith <rtl8821cerfe2@gmail.com> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://lore.kernel.org/r/ce04a0a1-df72-ea30-f742-8834e01457f5@gmail.com
2023-07-25wifi: rtl8xxxu: Enable AP mode for RTL8192FUBitterblue Smith
Theoretically this chip can handle 127 clients. Tested only very briefly but it should work as well as the RTL8188FU. Signed-off-by: Bitterblue Smith <rtl8821cerfe2@gmail.com> Reviewed-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://lore.kernel.org/r/ffcabba5-7e9e-674c-ad03-73646b040b96@gmail.com
2023-06-07Merge wireless into wireless-nextJohannes Berg
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>
2023-05-15wifi: rtl8xxxu: Rename some registersBitterblue Smith
Give proper names: RF6052_REG_UNKNOWN_56 -> RF6052_REG_PAD_TXG RF6052_REG_UNKNOWN_DF -> RF6052_REG_GAIN_CCA And fix typos: REG_OFDM0_AGCR_SSI_TABLE -> REG_OFDM0_AGC_RSSI_TABLE REG_BB_ACCEESS_CTRL -> REG_BB_ACCESS_CTRL Signed-off-by: Bitterblue Smith <rtl8821cerfe2@gmail.com> Reviewed-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://lore.kernel.org/r/40157253-76bd-8b23-06e0-3365139b5395@gmail.com
2023-05-15wifi: rtl8xxxu: Support new chip RTL8192FUBitterblue Smith
This is a newer chip, similar to the RTL8710BU in that it uses the same PHY status structs. Features: 2.4 GHz, b/g/n mode, 2T2R, 300 Mbps. It can allegedly have Bluetooth, but that's not implemented here. This chip can have many RFE (RF front end) types, of which types 1 and 5 are the only ones tested. Many of the other types need different initialisation tables. They can be added if someone wants them. The vendor driver v5.8.6.2_35538.20191028_COEX20190910-0d02 from https://github.com/BrightX/rtl8192fu was used as reference, with additional device IDs taken from https://github.com/kelebek333/rtl8192fu-dkms. The vendor driver also claims to support devices with ID 0bda:a725, but that is found in some bluetooth-only devices, so it's not supported here. Signed-off-by: Bitterblue Smith <rtl8821cerfe2@gmail.com> Reviewed-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://lore.kernel.org/r/7dcf9fb9-1c97-ac28-5286-2236e287a18c@gmail.com
2023-05-15wifi: rtl8xxxu: fix authentication timeout due to incorrect RCR valueYun Lu
When using rtl8192cu with rtl8xxxu driver to connect wifi, there is a probability of failure, which shows "authentication with ... timed out". Through debugging, it was found that the RCR register has been inexplicably modified to an incorrect value, resulting in the nic not being able to receive authenticated frames. To fix this problem, add regrcr in rtl8xxxu_priv struct, and store the RCR value every time the register is written, and use it the next time the register need to be modified. Signed-off-by: Yun Lu <luyun@kylinos.cn> Link: https://lore.kernel.org/all/20230427020512.1221062-1-luyun_611@163.com Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://lore.kernel.org/r/20230512012055.2990472-1-luyun_611@163.com
2023-05-05wifi: rtl8xxxu: rtl8xxxu_rx_complete(): remove unnecessary returnMartin Kaiser
Remove a return statement at the end of a void function. This fixes a checkpatch warning. WARNING: void function return statements are not generally useful 6206: FILE: ./drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c:6206: + return; +} Signed-off-by: Martin Kaiser <martin@kaiser.cx> Reviewed-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://lore.kernel.org/r/20230427185936.923777-1-martin@kaiser.cx
2023-05-05wifi: rtl8xxxu: Support USB RX aggregation for the newer chipsBitterblue Smith
The driver can receive several frames in the same USB transfer. Add the code to handle this in rtl8xxxu_parse_rxdesc24(), even though currently all the relevant chips send only one frame per USB transfer (RTL8723BU, RTL8192EU, RTL8188FU, RTL8710BU). This was tested with RTL8188FU, RTL8192EU, RTL8710BU, and RTL8192FU. Signed-off-by: Bitterblue Smith <rtl8821cerfe2@gmail.com> Reviewed-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://lore.kernel.org/r/16d2d1ff-6438-10c9-347f-6e14dd358ccf@gmail.com
2023-05-05wifi: rtl8xxxu: Set maximum number of supported stationsMartin Kaistra
Set maximum number of associated stations supported in AP mode. For 8188f, the maximum number of supported macids is 16, reserve one for broadcast/multicast frames. Signed-off-by: Martin Kaistra <martin.kaistra@linutronix.de> Reviewed-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://lore.kernel.org/r/20230428150833.218605-19-martin.kaistra@linutronix.de