summaryrefslogtreecommitdiff
path: root/drivers/net/wireless
AgeCommit message (Collapse)AuthorFilesLines
2024-01-02Merge tag 'wireless-next-2023-12-22' of ↵David S. Miller50-349/+2333
git://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless-next Kalle Valo says: ==================== wireless-next patches for v6.8 The third "new features" pull request for v6.8. This is a smaller one to clear up our tree before the break and nothing really noteworthy this time. Major changes: stack * cfg80211: introduce cfg80211_ssid_eq() for SSID matching * cfg80211: support P2P operation on DFS channels * mac80211: allow 64-bit radiotap timestamps iwlwifi * AX210: allow concurrent P2P operation on DFS channels ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
2023-12-22Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/netPaolo Abeni3-7/+9
Cross-merge networking fixes after downstream PR. Adjacent changes: drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.c 23c93c3b6275 ("bnxt_en: do not map packet buffers twice") 6d1add95536b ("bnxt_en: Modify TX ring indexing logic.") tools/testing/selftests/net/Makefile 2258b666482d ("selftests: add vlan hw filter tests") a0bc96c0cd6e ("selftests: net: verify fq per-band packet limit") Signed-off-by: Paolo Abeni <pabeni@redhat.com>
2023-12-21wifi: iwlwifi: replace ENOTSUPP with EOPNOTSUPPAndrei Otcheretianski5-12/+12
ENOTSUPP isn't a standard error code, don't use it. Replace with EOPNOTSUPP instead. Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com> Reviewed-by: Gregory Greenman <gregory.greenman@intel.com> Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com> Link: https://msgid.link/20231219215605.a69f4347b5f8.I88429d5de8251287ec0b58ff26a588465b9049a5@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2023-12-21wifi: iwlwifi: mvm: use the new command to clear the internal bufferEmmanuel Grumbach3-0/+19
The firmware can allow to clear the internal debug buffer. This can be used to sanitize the data when requested to. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Reviewed-by: Gregory Greenman <gregory.greenman@intel.com> Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com> Link: https://msgid.link/20231219215605.99aed3efbacb.Ib5bda1d1ff4bae476667737d4081ad066d1d7e6b@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2023-12-21wifi: iwlwifi: mvm: disallow puncturing in US/CanadaJohannes Berg1-0/+10
For now, this isn't allowed. The API to mac80211 isn't great for this, but we need to change the API to move puncturing into the chanctx/chandef, and will do it better then. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Reviewed-by: Gregory Greenman <gregory.greenman@intel.com> Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com> Link: https://msgid.link/20231219215605.38955b68b429.I0c4ae99179b271648a747a51eb04853504c7952c@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2023-12-21wifi: iwlwifi: mvm: add US/Canada MCC to APIJohannes Berg2-5/+5
We don't want to duplicate the definitions later, so add them to the API. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Reviewed-by: Gregory Greenman <gregory.greenman@intel.com> Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com> Link: https://msgid.link/20231219215605.6595e905997b.I12354d31676911b29ab30c81a4e9b87f59284d3b@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2023-12-21wifi: iwlwifi: Add rf_mapping of new wifi7 devicesMukesh Sisodiya2-0/+12
Add the CSR register details for new wifi7 devices and correctly set rf_name for devices with FM and WP radios. Signed-off-by: Mukesh Sisodiya <mukesh.sisodiya@intel.com> Reviewed-by: Gregory Greenman <gregory.greenman@intel.com> Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com> Link: https://msgid.link/20231219215605.a9c04b1e9d13.Ibf258d5e6370d8840a2560282988a1c26377c410@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2023-12-21wifi: iwlwifi: cleanup BT Shared Single Antenna codeMiri Korenblit2-19/+4
We don't support such device. Reviewed-by: Gregory Greenman <gregory.greenman@intel.com> Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com> Link: https://msgid.link/20231219215605.6e6961ac0ac5.I923024eac20efd24a5b42332d8e73ae756e0469a@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2023-12-21wifi: iwlwifi: assign phy_ctxt before eSR activationMiri Korenblit1-3/+3
eSR is activated when a chanctx is assigned to more than one link. During eSR activation we should disable RLC for both phys, and configure the FW with a special phy command for both phys. Currently we assign the phy_ctxt to the link only after eSR activation, so RLC is not disabled for the new phy_ctxt, and a cmd is not sent to FW. Fix this by first assigning the new phy_ctxt to the link and then doing the eSR activation. Fixes: 12bacfc2c065 ("wifi: iwlwifi: handle eSR transitions") Reviewed-by: Gregory Greenman <gregory.greenman@intel.com> Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com> Link: https://msgid.link/20231219215605.3d94507f5d9a.I537fcd73aedf94c7348c03157e486f24301fef14@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2023-12-21wifi: iwlwifi: fix out of bound copy_from_userAnjaneyulu1-1/+1
The driver copies the userspace buffer into an internal NUL byte terminated buffer. While doing so, it was reading beyond the end of the userspace buffer, overwriting its own NUL termination in the process. Fix this by only copying the correct number of bytes. Fixes: 3f244876ef73 ("wifi: iwlwifi: make debugfs entries link specific") Signed-off-by: Anjaneyulu <pagadala.yesu.anjaneyulu@intel.com> Reviewed-by: Gregory Greenman <gregory.greenman@intel.com> Reviewed-by: Benjamin Berg <benjamin.berg@intel.com> Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com> Link: https://msgid.link/20231219215605.e4913deb2ad4.Idcf6a7e909ff4b7801cd49c2f691f84a2f68eff9@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2023-12-21wifi: iwlwifi: mvm: Do not warn if valid link pair was not foundIlan Peer1-1/+1
It is possible that though multiple links are enabled we cannot enabled EMLSR enable more than a single link, e.g., all valid links are on the same band etc. Thus, do not warn in case no valid link pair is found. Fixes: b9be67fb4207 ("wifi: iwlwifi: mvm: Add basic link selection logic") Signed-off-by: Ilan Peer <ilan.peer@intel.com> Reviewed-by: Gregory Greenman <gregory.greenman@intel.com> Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com> Link: https://msgid.link/20231219215605.142e57a05230.I7cfe78c94c3d15c4c744bccadd8f187e43594932@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2023-12-21wifi: iwlwifi: mvm: d3: avoid intermediate/early mutex unlockJohannes Berg1-15/+2
Now with the mac80211 locking model changed, we no longer can cause any bad dependencies here between mvm->mutex and other mutexes in mac80211, so we no longer need to drop the mutex early or even temporarily. Clean this up. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Reviewed-by: Gregory Greenman <gregory.greenman@intel.com> Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com> Link: https://msgid.link/20231219215605.1f2f5289ecc6.I7e3b8e806b6d50e88ba0c26767da8261806eb9c7@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2023-12-21wifi: iwlwifi: mvm: send TX path flush in rfkillJohannes Berg1-1/+1
If we want to drop packets, that's surely a good thing to do when we want to enter rfkill. Send this command despite rfkill so we can successfully clean up everything, we need to handle it separately since it has CMD_WANT_SKB, so it's not going to automatically return success when in rfkill. Fixes: d4e3a341b87b ("iwlwifi: mvm: add support for new flush queue response") Signed-off-by: Johannes Berg <johannes.berg@intel.com> Reviewed-by: Gregory Greenman <gregory.greenman@intel.com> Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com> Link: https://msgid.link/20231219215605.c528a6fa6cec.Ibe5e9560359ccc0fba60c35e01de285c376748a2@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2023-12-21wifi: iwlwifi: Don't mark DFS channels as NO-IRAndrei Otcheretianski1-1/+6
The NVM_CHANNEL_ACTIVE bit means that active scanning/beaconing is allowed, however it's not an exact opposite of IEEE80211_CHAN_NO_IR. For example, NVM_CHANNEL_ACTIVE bit is not set on DFS channels, while cfg80211 doesn't really expect NO-IR on DFS channels. Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com> Reviewed-by: Gregory Greenman <gregory.greenman@intel.com> Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com> Link: https://msgid.link/20231219215605.94cd9b96a532.Ifb0e8d8a6a6384493758f26b811d58432536101a@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2023-12-21wifi: iwlwifi: mvm: Allow DFS concurrent operationAndrei Otcheretianski2-4/+10
AX210 devices allow concurrent P2P operation on DFS channels. Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com> Reviewed-by: Gregory Greenman <gregory.greenman@intel.com> Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com> Link: https://msgid.link/20231219215605.dc39b33bf507.I04dfda24d73091fb75701279d10ac400314de488@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2023-12-21wifi: iwlwifi: mvm: set siso/mimo chains to 1 in FW SMPS requestJohannes Berg1-11/+0
The firmware changed their mind, don't set the chains to zero, instead set them to 1 as we normally would for connections to APs that don't use MIMO. Fixes: 2a7ce54ccc23 ("iwlwifi: mvm: honour firmware SMPS requests") Signed-off-by: Johannes Berg <johannes.berg@intel.com> Reviewed-by: Luciano Coelho <luciano.coelho@intel.com> Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com> Link: https://msgid.link/20231219215605.7f031f1a127f.Idc816e0f604b07d22a9d5352bc23c445512fad14@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2023-12-21wifi: mac80211: rework RX timestamp flagsJohannes Berg1-1/+1
We only have a single flag free, and before using that for another mactime flag, instead refactor the mactime flags to use a 2-bit field. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Reviewed-by: Gregory Greenman <gregory.greenman@intel.com> Reviewed-by: Benjamin Berg <benjamin.berg@intel.com> Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com> Link: https://msgid.link/20231220133549.d0e664832d14.I20c8900106f9bf81316bed778b1e3ce145785274@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2023-12-21wifi: mac80211_hwsim: Add custom reg for DFS concurrentAndrei Otcheretianski1-0/+19
Add custom regulatory that marks DFS channels as DFS_CONCURRENT. Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com> Reviewed-by: Gregory Greenman <gregory.greenman@intel.com> Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com> Link: https://msgid.link/20231220133549.4b08a6530fa3.Ic285ca7a4728e77a4bea1394a6a52cf286fbea22@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2023-12-21wifi: mac80211_hwsim: support HE 40 MHz in 2.4 GHz bandMiri Korenblit1-0/+6
We are missing the flag that indicates that capability of 40 MHz bandwidth support in HE on the LB. Add it. Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com> Reviewed-by: Gregory Greenman <gregory.greenman@intel.com> Link: https://msgid.link/20231220075830.4f10c6b64d1a.I1ba6905c806be6e0548ed15130c0bbb2ee04c9fd@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2023-12-21wifi: mwifiex: fix uninitialized firmware_statDavid Lin1-1/+1
Variable firmware_stat is possible to be used without initialization. Signed-off-by: David Lin <yu-hao.lin@nxp.com> Fixes: 1c5d463c0770 ("wifi: mwifiex: add extra delay for firmware ready") Cc: stable@vger.kernel.org Reported-by: kernel test robot <lkp@intel.com> Reported-by: Dan Carpenter <error27@gmail.com> Closes: https://lore.kernel.org/r/202312192236.ZflaWYCw-lkp@intel.com/ Acked-by: Brian Norris <briannorris@chromium.org> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://msgid.link/20231221015511.1032128-1-yu-hao.lin@nxp.com
2023-12-21wifi: rtlwifi: rtl8723{be,ae}: using calculate_bit_shift()Su Hui2-5/+5
Using calculate_bit_shift() to replace rtl8723_phy_calculate_bit_shift(). And fix an undefined bitwise shift behavior problem. Signed-off-by: Su Hui <suhui@nfschina.com> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://msgid.link/20231219065739.1895666-12-suhui@nfschina.com
2023-12-21wifi: rtlwifi: rtl8723_common: using calculate_bit_shift()Su Hui2-11/+2
Using calculate_bit_shift() to replace rtl8723_phy_calculate_bit_shift(). And fix the undefined bitwise shift behavior problem. Fixes: 0a168b48cdf7 ("rtlwifi: rtl8723ae: rtl8723-common: Create new driver for common code") Signed-off-by: Su Hui <suhui@nfschina.com> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://msgid.link/20231219065739.1895666-11-suhui@nfschina.com
2023-12-21wifi: rtlwifi: rtl8192se: using calculate_bit_shift()Su Hui1-11/+4
Using calculate_bit_shift() to replace _rtl92s_phy_calculate_bit_shift(). And fix the undefined bitwise shift behavior problem. Fixes: d15853163bea ("rtlwifi: rtl8192se: Merge phy routines") Signed-off-by: Su Hui <suhui@nfschina.com> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://msgid.link/20231219065739.1895666-10-suhui@nfschina.com
2023-12-21wifi: rtlwifi: rtl8192ee: using calculate_bit_shift()Su Hui1-12/+4
Using calculate_bit_shift() to replace _rtl92ee_phy_calculate_bit_shift(). And fix the undefined bitwise shift behavior problem. Fixes: b1a3bfc97cd9 ("rtlwifi: rtl8192ee: Move driver from staging to the regular tree") Signed-off-by: Su Hui <suhui@nfschina.com> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://msgid.link/20231219065739.1895666-9-suhui@nfschina.com
2023-12-21wifi: rtlwifi: rtl8192de: using calculate_bit_shift()Su Hui1-11/+4
Using calculate_bit_shift() to replace _rtl92d_phy_calculate_bit_shift(). And fix the undefined bitwise shift behavior problem. Fixes: 7274a8c22980 ("rtlwifi: rtl8192de: Merge phy routines") Signed-off-by: Su Hui <suhui@nfschina.com> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://msgid.link/20231219065739.1895666-8-suhui@nfschina.com
2023-12-21wifi: rtlwifi: rtl8192ce: using calculate_bit_shift()Su Hui2-4/+3
Using calculate_bit_shift() to replace _rtl92c_phy_calculate_bit_shift(). And fix the undefined bitwise shift behavior problem. Fixes: 0c8173385e54 ("rtl8192ce: Add new driver") Signed-off-by: Su Hui <suhui@nfschina.com> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://msgid.link/20231219065739.1895666-7-suhui@nfschina.com
2023-12-21wifi: rtlwifi: rtl8192cu: using calculate_bit_shift()Su Hui1-3/+3
Using calculate_bit_shift() to replace _rtl92c_phy_calculate_bit_shift(). And fix an undefined bitwise shift behavior problem. Fixes: f0a39ae738d6 ("rtlwifi: rtl8192cu: Add routine phy") Signed-off-by: Su Hui <suhui@nfschina.com> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://msgid.link/20231219065739.1895666-6-suhui@nfschina.com
2023-12-21wifi: rtlwifi: rtl8192c: using calculate_bit_shift()Su Hui2-11/+2
Using calculate_bit_shift() to replace _rtl92c_phy_calculate_bit_shift(). And fix the undefined bitwise shift behavior problem. Fixes: 4295cd254af3 ("rtlwifi: Move common parts of rtl8192ce/phy.c") Signed-off-by: Su Hui <suhui@nfschina.com> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://msgid.link/20231219065739.1895666-5-suhui@nfschina.com
2023-12-21wifi: rtlwifi: rtl8188ee: phy: using calculate_bit_shift()Su Hui1-10/+4
Using calculate_bit_shift() to replace _rtl88e_phy_calculate_bit_shift(). And fix the undefined bitwise shift behavior problem. Fixes: f0eb856e0b6c ("rtlwifi: rtl8188ee: Add new driver") Signed-off-by: Su Hui <suhui@nfschina.com> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://msgid.link/20231219065739.1895666-4-suhui@nfschina.com
2023-12-21wifi: rtlwifi: rtl8821ae: phy: using calculate_bit_shift()Su Hui1-11/+4
using calculate_bit_shift() to replace _rtl8821ae_phy_calculate_bit_shift(). Signed-off-by: Su Hui <suhui@nfschina.com> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://msgid.link/20231219065739.1895666-3-suhui@nfschina.com
2023-12-21wifi: rtlwifi: add calculate_bit_shift()Su Hui1-0/+7
There are many same functions like _rtl88e_phy_calculate_bit_shift(), _rtl92c_phy_calculate_bit_shift() and so on. And these functions can cause undefined bitwise shift behavior. Add calculate_bit_shift() to replace them and fix undefined behavior in subsequent patches. Signed-off-by: Su Hui <suhui@nfschina.com> Acked-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://msgid.link/20231219065739.1895666-2-suhui@nfschina.com
2023-12-20wifi: rtw89: coex: To improve Wi-Fi performance while BT is idleChing-Te Ku1-26/+37
Because some platform Bluetooth will have many background scan when idle. And the frequently Bluetooth scan will break Wi-Fi traffic many times at a short duration, it will make Wi-Fi throughput become lower. This patch will shorter Bluetooth slot and adjust priority settings, make Wi-Fi can have a more completed duration to do traffic. 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://msgid.link/20231218061341.51255-12-pkshih@realtek.com
2023-12-20wifi: rtw89: coex: Translate antenna configuration from ID to stringChing-Te Ku1-2/+22
More readable on the coexistence log. 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://msgid.link/20231218061341.51255-11-pkshih@realtek.com
2023-12-20wifi: rtw89: coex: Update RF parameter control setting logicChing-Te Ku2-27/+62
Coexistence will set the RF parameter according to Wi-Fi link mode, Wi-Fi/Bluetooth signal level, traffic direction, antenna type, and is there Bluetooth connection exist or not. Bluetooth will notify the current LNA level by scoreboard. If the setting not as expected, coexistence will try to assign the correct level. 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://msgid.link/20231218061341.51255-10-pkshih@realtek.com
2023-12-20wifi: rtw89: coex: Add Bluetooth RSSI level informationChing-Te Ku2-2/+36
In order to control RF LNA setting, need Bluetooth RSSI level information. RSSI level separate Bluetooth RSSI to several level, so the mechanism can assign a corresponding setting. 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://msgid.link/20231218061341.51255-9-pkshih@realtek.com
2023-12-20wifi: rtw89: coex: Set Bluetooth scan low-priority when Wi-Fi link/scanChing-Te Ku1-0/+2
To avoid Bluetooth reconnecting/pairing fail during Wi-Fi is link/scan, especially the Bluetooth connect event after the platform restart/boot up. 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://msgid.link/20231218061341.51255-8-pkshih@realtek.com
2023-12-20wifi: rtw89: coex: Update coexistence policy for Wi-Fi LPSChing-Te Ku1-24/+46
Including Wi-Fi RF mode to judge is Wi-Fi RF still on or off, if Wi-Fi is RF off should set scoreboard to let Bluetooth know Wi-Fi has gone. Every time the Wi-Fi radio state changed firmware should force execute refresh the TDMA coexistence mechanism to prevent incorrect mechanism runs at mismatch state. The coexistence antenna/TDMA settings should consider what the Wi-Fi mode it is now, this can help to solve some LPS transient state issue like A2DP slightly glitch. 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://msgid.link/20231218061341.51255-7-pkshih@realtek.com
2023-12-20wifi: rtw89: coex: Still show hardware grant signal info even Wi-Fi is PSChing-Te Ku2-42/+40
This can help to debug the grant signal and antenna path control issue during Wi-Fi power saving mode. 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://msgid.link/20231218061341.51255-6-pkshih@realtek.com
2023-12-20wifi: rtw89: coex: Update BTG control related logicChing-Te Ku2-22/+75
BTG is a RF system type, it means Wi-Fi 2.4GHz and Bluetooth share RF gain and antenna. The RF gain must control by Wi-Fi or Bluetooth in single side. For example, if Bluetooth RX a very strong signal, then Bluetooth will adjust to a lower gain. And Wi-Fi will also use the same gain to do RX, then maybe the gain will not enough. This BTG control mechanism can do some refine to this situation. 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://msgid.link/20231218061341.51255-5-pkshih@realtek.com
2023-12-20wifi: rtw89: coex: Add Pre-AGC control to enhance Wi-Fi RX performanceChing-Te Ku3-1/+208
Pre-AGC(Auto gain control) is a hardware mechanism, it will auto adjust the RX gain for every packet, it can help to keep Wi-Fi signal on a well RX quality. The coexistence will give advice to control the API and monitor the settings by firmware report. Also add function to check register, these registers were monitoring by Wi-Fi firmware and report to coexistence driver periodically. This can help to track whether these settings were taking effect or not. 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://msgid.link/20231218061341.51255-4-pkshih@realtek.com
2023-12-20wifi: rtw89: coex: Record down Wi-Fi initial mode informationChing-Te Ku2-1/+17
This information will use as judgment about how to set RF/HW parameters. 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://msgid.link/20231218061341.51255-3-pkshih@realtek.com
2023-12-20wifi: rtw89: coex: Fix wrong Wi-Fi role info and FDDT parameter membersChing-Te Ku2-11/+5
The Wi-Fi firmware 29.29.X should use version 2 role info format. FDDT mechanism version 5 use the same cell members to judge traffic situation, don't need to add another new format. 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://msgid.link/20231218061341.51255-2-pkshih@realtek.com
2023-12-19wifi: rtw88: use cfg80211_ssid_eq() instead of rtw_ssid_equal()Dmitry Antipov2-14/+2
Prefer generic 'cfg80211_ssid_eq()' over dropped 'rtw_ssid_equal()'. Compile tested only. Signed-off-by: Dmitry Antipov <dmantipov@yandex.ru> Link: https://msgid.link/20231215123859.196350-3-dmantipov@yandex.ru Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2023-12-19wifi: mwifiex: use cfg80211_ssid_eq() instead of mwifiex_ssid_cmp()Dmitry Antipov4-16/+4
Prefer generic 'cfg80211_ssid_eq()' over dropped 'mwifiex_ssid_cmp()'. Compile tested only. Signed-off-by: Dmitry Antipov <dmantipov@yandex.ru> Link: https://msgid.link/20231215123859.196350-2-dmantipov@yandex.ru Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2023-12-19wifi: rtl8xxxu: Add additional USB IDs for RTL8192EU devicesZenm Chen1-0/+12
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-12-19wifi: rtw89: mac: implement to configure TX/RX engines for WiFi 7 chipsPing-Ke Shih2-0/+1488
After enabling DMAC and CMAC, configure detail registers one by one. DMAC includes DLE (data link engine), packet preload engine, HFC (HCI flow control) for DMA channels, security egine and etc. CMAC includes scheduler, address CAM, RX filter, CCA control and etc. The SER IMR is to configure to help SER. When hardware TX/RX get abnormal, it raises an interrupt to firmware to determine if send C2H events to notify driver to reset PCI bus or call ieee80211_restart_hw(). Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://msgid.link/20231216045739.10432-3-pkshih@realtek.com
2023-12-19wifi: rtw89: mac: add sys_init and filter option for WiFi 7 chipsPing-Ke Shih2-0/+125
The sys_init is to enable hardware function block of DMAC (data-path MAC), CMAC (control-path MAC) and others called 'chip_func'. To understand the functionality of this function, we keep some functions as empty. The other is typ_fltr_opt that is to configure filter option to decide whether RX packets engine can forward packets to host or WiFi CPU. Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://msgid.link/20231216045739.10432-2-pkshih@realtek.com
2023-12-19Merge tag 'wireless-next-2023-12-18' of ↵Jakub Kicinski255-1881/+9468
git://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless-next Kalle Valo says: ==================== wireless-next patches for v6.8 The second features pull request for v6.8. A bigger one this time with changes both to stack and drivers. We have a new Wifi band RFI (WBRF) mitigation feature for which we pulled an immutable branch shared with other subsystems. And, as always, other new features and bug fixes all over. Major changes: cfg80211/mac80211 * AMD ACPI based Wifi band RFI (WBRF) mitigation feature * Basic Service Set (BSS) usage reporting * TID to link mapping support * mac80211 hardware flag to disallow puncturing iwlwifi * new debugfs file fw_dbg_clear mt76 * NVMEM EEPROM improvements * mt7996 Extremely High Throughpu (EHT) improvements * mt7996 Wireless Ethernet Dispatcher (WED) support * mt7996 36-bit DMA support ath12k * support one MSI vector * WCN7850: support AP mode * tag 'wireless-next-2023-12-18' of git://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless-next: (207 commits) wifi: mt76: mt7996: Use DECLARE_FLEX_ARRAY() and fix -Warray-bounds warnings wifi: ath11k: workaround too long expansion sparse warnings Revert "wifi: ath12k: use ATH12K_PCI_IRQ_DP_OFFSET for DP IRQ" wifi: rt2x00: remove useless code in rt2x00queue_create_tx_descriptor() wifi: rtw89: only reset BB/RF for existing WiFi 6 chips while starting up wifi: rtw89: add DBCC H2C to notify firmware the status wifi: rtw89: mac: add suffix _ax to MAC functions wifi: rtw89: mac: add flags to check if CMAC and DMAC are enabled wifi: rtw89: 8922a: add power on/off functions wifi: rtw89: add XTAL SI for WiFi 7 chips wifi: rtw89: phy: print out RFK log with formatted string wifi: rtw89: parse and print out RFK log from C2H events wifi: rtw89: add C2H event handlers of RFK log and report wifi: rtw89: load RFK log format string from firmware file wifi: rtw89: fw: add version field to BB MCU firmware element wifi: rtw89: fw: load TX power track tables from fw_element wifi: mwifiex: configure BSSID consistently when starting AP wifi: mwifiex: add extra delay for firmware ready wifi: mac80211: sta_info.c: fix sentence grammar wifi: mac80211: rx.c: fix sentence grammar ... ==================== Link: https://lore.kernel.org/r/20231218163900.C031DC433C9@smtp.kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2023-12-17Merge tag 'ath-next-20231215' of ↵Kalle Valo128-465/+630
git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath ath.git patches for v6.8. We have new features only for ath12k but lots of small cleanup for ath10k, ath11k and ath12k. And of course smaller fixes to several drivers. Major changes: ath12k * support one MSI vector * WCN7850: support AP mode
2023-12-17wifi: mt76: mt7996: Use DECLARE_FLEX_ARRAY() and fix -Warray-bounds warningsGustavo A. R. Silva1-5/+5
Transform zero-length arrays `rate`, `adm_stat` and `msdu_cnt` into proper flexible-array members in anonymous union in `struct mt7996_mcu_all_sta_info_event` via the DECLARE_FLEX_ARRAY() helper; and fix multiple -Warray-bounds warnings: drivers/net/wireless/mediatek/mt76/mt7996/mcu.c:544:61: warning: array subscript <unknown> is outside array bounds of 'struct <anonymous>[0]' [-Warray-bounds=] drivers/net/wireless/mediatek/mt76/mt7996/mcu.c:551:58: warning: array subscript <unknown> is outside array bounds of 'struct <anonymous>[0]' [-Warray-bounds=] drivers/net/wireless/mediatek/mt76/mt7996/mcu.c:553:58: warning: array subscript <unknown> is outside array bounds of 'struct <anonymous>[0]' [-Warray-bounds=] drivers/net/wireless/mediatek/mt76/mt7996/mcu.c:530:61: warning: array subscript <unknown> is outside array bounds of 'struct <anonymous>[0]' [-Warray-bounds=] drivers/net/wireless/mediatek/mt76/mt7996/mcu.c:538:66: warning: array subscript <unknown> is outside array bounds of 'struct <anonymous>[0]' [-Warray-bounds=] drivers/net/wireless/mediatek/mt76/mt7996/mcu.c:540:66: warning: array subscript <unknown> is outside array bounds of 'struct <anonymous>[0]' [-Warray-bounds=] drivers/net/wireless/mediatek/mt76/mt7996/mcu.c:520:57: warning: array subscript <unknown> is outside array bounds of 'struct all_sta_trx_rate[0]' [-Warray-bounds=] drivers/net/wireless/mediatek/mt76/mt7996/mcu.c:526:76: warning: array subscript <unknown> is outside array bounds of 'struct all_sta_trx_rate[0]' [-Warray-bounds=] drivers/net/wireless/mediatek/mt76/mt7996/mcu.c:526:76: warning: array subscript <unknown> is outside array bounds of 'struct all_sta_trx_rate[0]' [-Warray-bounds=] drivers/net/wireless/mediatek/mt76/mt7996/mcu.c:526:76: warning: array subscript <unknown> is outside array bounds of 'struct all_sta_trx_rate[0]' [-Warray-bounds=] drivers/net/wireless/mediatek/mt76/mt7996/mcu.c:526:76: warning: array subscript <unknown> is outside array bounds of 'struct all_sta_trx_rate[0]' [-Warray-bounds=] This results in no differences in binary output, helps with the ongoing efforts to globally enable -Warray-bounds. Reviewed-by: Kees Cook <keescook@chromium.org> Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://msgid.link/ZXiU9ayVCslt3qiI@work