summaryrefslogtreecommitdiff
path: root/drivers/net
AgeCommit message (Collapse)Author
2025-05-12wifi: iwlwifi: cfg: clean up HR device matchingJohannes Berg
We only need a few entries on top of the Killer ones. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com> Link: https://patch.msgid.link/20250510214621.fa0cde465de0.I6a3f9ed9a7341e2c58c69af50a9f126992a745f2@changeid
2025-05-12wifi: iwlwifi: cfg: unify and add some Killer devicesJohannes Berg
Unify a number of Killer devices now that we no longer need to distinguish the MAC type, and add a few more that wouldn't have gotten the right name before. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com> Link: https://patch.msgid.link/20250510214621.a16b1c2740f8.I147b97ef2c8e99451806ea0e34a9eb5bff37c326@changeid
2025-05-12wifi: iwlwifi: cfg: fix and unify Killer/JF configsJohannes Berg
All of these should be 160 MHz, and they can be recognised by just the subdevice ID. Unify all the Killer/JF entries. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com> Link: https://patch.msgid.link/20250510214621.a93788f159ec.I114f09a0f61849ac3b75d12d7def35be842e5b7c@changeid
2025-05-12wifi: iwlwifi: cfg: fix Ma device configsJohannes Berg
These should be according to their RF type, not just use GF unconditionally. Fix that. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com> Link: https://patch.msgid.link/20250510214621.4dd365eb76cd.I91f368df691a3ce6c545d9cdc44676e7883efa16@changeid
2025-05-12wifi: iwlwifi: cfg: fix some device namesJohannes Berg
Officially, the device names have dashes ("Wireless-N"), so add them. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com> Link: https://patch.msgid.link/20250510214621.4f7bbd57680f.Ida19b5e696723db5839c13341d6ca7085e8c2568@changeid
2025-05-12wifi: iwlwifi: cfg: remove some unused namesJohannes Berg
There are a couple of old names that don't actually get used. Remove them. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com> Link: https://patch.msgid.link/20250510214621.1ed5fc197ba0.I52d7bb49db24523ad93ad83a89c8e846d9a43241@changeid
2025-05-12wifi: iwlwifi: mld: add debug log instead of warningSomashekhar Puttagangaiah
During link selection if the links does not meet the valid grade criteria then add debug log instead of warning. Signed-off-by: Somashekhar Puttagangaiah <somashekhar.puttagangaiah@intel.com> Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com> Link: https://patch.msgid.link/20250510214621.2593268ca988.I9786126cd1078caec8587b166a7f8735300c951d@changeid
2025-05-12wifi: iwlwifi: dbg: fix dump trigger split checkJohannes Berg
Evidently, I confused the fields here, apply_policy should be checked for IWL_FW_INI_APPLY_POLICY_SPLIT_DUMP_RESET. Fix that. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Reviewed-by: Eilon Rinat <eilon.rinat@intel.com> Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com> Link: https://patch.msgid.link/20250510214621.c802d5cc1312.I0cf5d74f91349499ab35eef0ebdc604961e492ef@changeid
2025-05-12net: mana: Add support for auxiliary device servicing eventsShiraz Saleem
Handle soc servicing events which require the rdma auxiliary device resources to be cleaned up during a suspend, and re-initialized during a resume. Signed-off-by: Shiraz Saleem <shirazsaleem@microsoft.com> Signed-off-by: Konstantin Taranov <kotaranov@microsoft.com> Link: https://patch.msgid.link/1746633545-17653-5-git-send-email-kotaranov@linux.microsoft.com Signed-off-by: Leon Romanovsky <leon@kernel.org>
2025-05-12net: mana: Probe rdma device in mana driverKonstantin Taranov
Initialize gdma device for rdma inside mana module. For each gdma device, initialize an auxiliary ib device. Signed-off-by: Konstantin Taranov <kotaranov@microsoft.com> Link: https://patch.msgid.link/1746633545-17653-2-git-send-email-kotaranov@linux.microsoft.com Reviewed-by: Long Li <longli@microsoft.com> Signed-off-by: Leon Romanovsky <leon@kernel.org>
2025-05-10wifi: iwlwifi: mvm/mld: allow puncturing use in 5 GHzJohannes Berg
It was decided this was supported after all, so remove the restriction. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Link: https://patch.msgid.link/20250509104454.2582160-15-miriam.rachel.korenblit@intel.com Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
2025-05-10wifi: iwlwifi: mld: add support for ROC on BSSPagadala Yesu Anjaneyulu
add support for remain on channel on BSS vif for iwlmld. Signed-off-by: Pagadala Yesu Anjaneyulu <pagadala.yesu.anjaneyulu@intel.com> Link: https://patch.msgid.link/20250509104454.2582160-14-miriam.rachel.korenblit@intel.com Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
2025-05-10wifi: iwlwifi: mld: Block EMLSR only when ready to enter ROCPagadala Yesu Anjaneyulu
If one of the stages in starting a ROC failed, the ROC will not start nor end so EMLSR will stay blocked forever. Block EMLSR once all ROC conditions are validated and clear EMLSR blocked reasons in mld_vif cleanup. Signed-off-by: Pagadala Yesu Anjaneyulu <pagadala.yesu.anjaneyulu@intel.com> Link: https://patch.msgid.link/20250509104454.2582160-13-miriam.rachel.korenblit@intel.com Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
2025-05-10wifi: iwlwifi: mld: move aux_sta member from iwl_mld_link to iwl_mld_vifPagadala Yesu Anjaneyulu
This change reflects the correct ownership of aux_sta, as it is not a property of the link but rather of the virtual interface. Updated the initialization, cleanup and access logic for the aux_sta member to align with its new location within iwl_mld_vif. Signed-off-by: Pagadala Yesu Anjaneyulu <pagadala.yesu.anjaneyulu@intel.com> Reviewed-by: Somashekhar Puttagangaiah <somashekhar.puttagangaiah@intel.com> Link: https://patch.msgid.link/20250509104454.2582160-12-miriam.rachel.korenblit@intel.com Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
2025-05-10wifi: iwlwifi: mld: Fix ROC activity cleanup in iwl_mld_vifPagadala Yesu Anjaneyulu
The roc_activity member in the iwl_mld_vif structure was previously set to zero during cleanup as was present in struct_group, which incorrectly indicated ROC_ACTIVITY_HOTSPOT. To fix this issue, remove roc_activity member from struct_group. Notify mac80211 of ROC expiration during vif cleanup to maintain synchronization between the driver and mac80211. While on it, update it's type to enum iwl_roc_activity. Signed-off-by: Pagadala Yesu Anjaneyulu <pagadala.yesu.anjaneyulu@intel.com> Link: https://patch.msgid.link/20250509104454.2582160-11-miriam.rachel.korenblit@intel.com Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
2025-05-10wifi: iwlwifi: mld: Correct comments for cleanup functionsPagadala Yesu Anjaneyulu
Update comments to accurately reflect the purpose of the iwl_mld_cleanup_link and iwl_cleanup_mld functions. Signed-off-by: Pagadala Yesu Anjaneyulu <pagadala.yesu.anjaneyulu@intel.com> Reviewed-by: Somashekhar Puttagangaiah <somashekhar.puttagangaiah@intel.com> Link: https://patch.msgid.link/20250509104454.2582160-10-miriam.rachel.korenblit@intel.com Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
2025-05-10wifi: iwlwifi: rename iwl_cfg to iwl_rf_cfgJohannes Berg
With all the cleanups now, we can rename the structure to better indicate the functionality. For older devices this isn't quite accurate, of course, but it's better to have a name that reflects future use for maintenance. Add some kernel-doc while at it. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Link: https://patch.msgid.link/20250509104454.2582160-9-miriam.rachel.korenblit@intel.com Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
2025-05-10wifi: iwlwifi: cfg: clean up Sc/Dr/Br configsJohannes Berg
For now, the WH and PE radios require the same config as FM, so just add a #define for those instead of copying the data. Since this is true, Sc/Dr/Br all used the same configs for all RF types, but that's confusing, so now use the defined WH/PE names for the correct combinations. We can also now enable the unit test that ensures we have no duplicate RF configs. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Link: https://patch.msgid.link/20250509104454.2582160-8-miriam.rachel.korenblit@intel.com Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
2025-05-10wifi: iwlwifi: cfg: add FM RF configJohannes Berg
The Bz configs really should be FM for the RF, so move that around. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Link: https://patch.msgid.link/20250509104454.2582160-7-miriam.rachel.korenblit@intel.com Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
2025-05-10wifi: iwlwifi: cfg: add GF RF configJohannes Berg
This is equivalent to just the previous iwl_cfg_ma, but really should also be used for Bz/Gf and Sc/Gf, instead of those using EHT sizes. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Link: https://patch.msgid.link/20250509104454.2582160-6-miriam.rachel.korenblit@intel.com Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
2025-05-10wifi: iwlwifi: cfg: unify HR configsJohannes Berg
Unify the HR configs to just one HR RF config. All the fields were the same already, so this doesn't do anything. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Link: https://patch.msgid.link/20250509104454.2582160-5-miriam.rachel.korenblit@intel.com Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
2025-05-10wifi: iwlwifi: cfg: unify JF configsJohannes Berg
Unify the JF configs to just one JF RF config. This can be done because the differing fields (thermal and DCCM offsets) won't be used for Qu MACs (and up) due to firmware support. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Link: https://patch.msgid.link/20250509104454.2582160-4-miriam.rachel.korenblit@intel.com Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
2025-05-10wifi: iwlwifi: cfg: unify num_rbds configJohannes Berg
This should depend on both the RF (VHT/HE/EHT support) and the MAC (<=22000 can put multiple frames into one buffer), so unify the config in the struct iwl_cfg to just have it sized according to the RF, and then double it for all the MACs starting from AX210 (So/Ty). Signed-off-by: Johannes Berg <johannes.berg@intel.com> Link: https://patch.msgid.link/20250509104454.2582160-3-miriam.rachel.korenblit@intel.com Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
2025-05-10wifi: iwlwifi: cfg: add ucode API min/max to MAC configJohannes Berg
In some older devices, the min/max firmware API supported by the driver depends on the specific device, when sharing the the same MAC (config). For most newer devices, it really is dependent on the MAC instead, since the firmware was frozen for certain MAC types. However, in the future we expect also freezes for RF types there. To handle this most generally, add an API min/max to the MAC config and then use the narrowest range prescribed by both, if set. For the newer MACs since 9000, move the configuration, there was only a freeze on MAC+RF lines so far. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Link: https://patch.msgid.link/20250509104454.2582160-2-miriam.rachel.korenblit@intel.com Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
2025-05-10wifi: rtw89: declare MLO support if prerequisites are metZong-Zhe Yang
When the following prerequisites are met, driver will enable support_mlo. It means that driver will declare WIPHY_FLAG_SUPPORTS_MLO, and then deal with MLO related things. The main prerequisites are as below. 1. all prerequisites for running with chanctx 2. FW feature NOTIFY_AP_INFO Signed-off-by: Zong-Zhe Yang <kevin_yang@realtek.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Link: https://patch.msgid.link/20250505072440.45113-12-pkshih@realtek.com
2025-05-10wifi: rtw89: debug: add mlo_mode dbgfsZong-Zhe Yang
Add an dbgfs mlo_mode to get/set MLO mode. And, support to trigger MLSR switching. Setting it will automatically disable MLO Dynamic Mechanism (DM). Then MLO things can follow commands via dbgfs mlo_mode instead of MLO DM. The disabled DM(s) can be checked/cleared via dbgfs disable_dm. The following is an use example. Read it to show current MLD status. $ cat mlo_mode MLD(s) status: (MLO DM: enable) #0: MLO mode 0, valid 0x6, active 0x2 Write it to switch to MLSR on link id 2. $ echo 0 2 > mlo_mode $ cat mlo_mode MLD(s) status: (MLO DM: disable) #0: MLO mode 0, valid 0x6, active 0x4 Besides, to be safer, add RWLOCK attribute to dbgfs disable_dm. Signed-off-by: Zong-Zhe Yang <kevin_yang@realtek.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Link: https://patch.msgid.link/20250505072440.45113-11-pkshih@realtek.com
2025-05-10wifi: rtw89: debug: add FW log component for MLOPo-Hao Huang
This allows showing MLO related logs when FW debug mode is on. Signed-off-by: Po-Hao Huang <phhuang@realtek.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Link: https://patch.msgid.link/20250505072440.45113-10-pkshih@realtek.com
2025-05-10wifi: rtw89: debug: add MLD table dumpPo-Hao Huang
Add definition for MLD table dump, this is for debug purpose only. Signed-off-by: Po-Hao Huang <phhuang@realtek.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Link: https://patch.msgid.link/20250505072440.45113-9-pkshih@realtek.com
2025-05-10wifi: rtw89: debug: extend dbgfs for MLOPo-Hao Huang
Extend dbgfs vif/sta info to show current designated link. Signed-off-by: Po-Hao Huang <phhuang@realtek.com> Signed-off-by: Zong-Zhe Yang <kevin_yang@realtek.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Link: https://patch.msgid.link/20250505072440.45113-8-pkshih@realtek.com
2025-05-10wifi: rtw89: add MLO track for MLSR switch decisionPo-Hao Huang
Add MLSR switch mechanism based on tracking RSSI. Switch to a 2 GHz link (if any) when average RSSI is lower than threshold -53. And, switch out from a 2 GHz link when average RSSI is larger than threshold -38. The sequence of MLSR switch handling is like the following. 1. initialize target link and configure to PS mode 2. configure current designated link to PS mode 3. configure target link to non-PS mode 4. deinitialize currently active links except target link The above flow also implies that target link becomes new designated link. Signed-off-by: Po-Hao Huang <phhuang@realtek.com> Signed-off-by: Zong-Zhe Yang <kevin_yang@realtek.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Link: https://patch.msgid.link/20250505072440.45113-7-pkshih@realtek.com
2025-05-10wifi: rtw89: add handling of mlo_link_cfg H2C command and C2H eventZong-Zhe Yang
The mlo_link_cfg H2C command is used to tell FW to enter/leave PS mode on a given link. And, need to wait for status of C2H event to ensure if FW deals with it successfully. Signed-off-by: Po-Hao Huang <phhuang@realtek.com> Signed-off-by: Zong-Zhe Yang <kevin_yang@realtek.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Link: https://patch.msgid.link/20250505072440.45113-6-pkshih@realtek.com
2025-05-10wifi: rtw89: chan: re-calculate MLO DBCC mode during setting channelZong-Zhe Yang
Wi-Fi 7 chips have dual HW bands. After impending MLO support, they can work with HW-[0] / HW-[1] / HW-[0,1] according to active links. So, during setting channel, also re-calculate the MLO DBCC mode flag. Then, leaf chip functions of setting channel can configure with HWs based on current case. Besides, tweak the initial and idle MLO DBCC mode of Wi-Fi 7 chips to MLO_1_PLUS_1_1RF to work with dual HW bands. And, after disconnecting, due to no active links, MLO DBCC mode will re-calculate to idle case, i.e. MLO_1_PLUS_1_1RF. Signed-off-by: Zong-Zhe Yang <kevin_yang@realtek.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Link: https://patch.msgid.link/20250505072440.45113-5-pkshih@realtek.com
2025-05-10wifi: rtw89: send nullfunc based on the given linkPo-Hao Huang
The nullfunc sender function is link specific. Use core_tx_write_link with sw_mld flag to TX the nullfunc via the given link. Signed-off-by: Po-Hao Huang <phhuang@realtek.com> Signed-off-by: Zong-Zhe Yang <kevin_yang@realtek.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Link: https://patch.msgid.link/20250505072440.45113-4-pkshih@realtek.com
2025-05-10wifi: rtw89: allow driver to do specific band TX for MLOPo-Hao Huang
For data packets that can be sent on any band, fill in main mac_id and let HW decide. For packets that we wish to transmit on specific band, fill in sw_mld field so HW would only send it on that band. Main mac_id is the corresponding mac_id on band 0. Signed-off-by: Po-Hao Huang <phhuang@realtek.com> Signed-off-by: Zong-Zhe Yang <kevin_yang@realtek.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Link: https://patch.msgid.link/20250505072440.45113-3-pkshih@realtek.com
2025-05-10wifi: rtw89: extract link part from core tx write functionZong-Zhe Yang
Extract core_tx_write_link from core_tx_write to accept given links as parameters. To make the follow-up changes of TX description more clear, tweak SW functions to split things ahead. (don't change logic at all) Signed-off-by: Zong-Zhe Yang <kevin_yang@realtek.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Link: https://patch.msgid.link/20250505072440.45113-2-pkshih@realtek.com
2025-05-10wifi: rtw88: rtw8822bu VID/PID for BUFFALO WI-U2-866DMYuuki NAGAO
Add VID/PID 0411/03d1 for recently released BUFFALO WI-U2-866DM USB WiFi adapter. Signed-off-by: Yuuki NAGAO <wf.yn386@gmail.com> Acked-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Link: https://patch.msgid.link/20250503003227.6673-1-wf.yn386@gmail.com
2025-05-10wifi: rtw88: Handle RTL8723D(S) with blank efuseBitterblue Smith
Some users have RTL8723DS chips with nearly blank efuse. Currently these chips cannot connect when using rtw88, but they do work using the old out-of-tree driver. Use reasonable default values for TX power, antenna configuration, and crystal cap if the chip's efuse is missing these things. RTL8723D can use the same default values as RTL8703B, so simply move the code from rtl8703b_read_efuse() to the shared function __rtl8723x_read_efuse(). Link: https://github.com/lwfinger/rtw88/issues/157 Signed-off-by: Bitterblue Smith <rtl8821cerfe2@gmail.com> Acked-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Link: https://patch.msgid.link/5734afe7-0870-40b2-acd4-5657a02d7c56@gmail.com
2025-05-10wifi: rtw88: Fix RX aggregation settings for RTL8723DSBitterblue Smith
Use the same RX aggregation size and timeout used by the out-of-tree RTL8723DS driver. Also set mystery bit 31 of REG_RXDMA_AGG_PG_TH. This improves the RX speed from ~44 Mbps to ~67 Mbps. Signed-off-by: Bitterblue Smith <rtl8821cerfe2@gmail.com> Acked-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Link: https://patch.msgid.link/4c79fdc1-54bc-4986-9931-bb3ceb418b97@gmail.com
2025-05-09net: stmmac: dwxgmac2: Add support for HW-accelerated VLAN strippingBoon Khai Ng
This patch adds support for MAC level VLAN tag stripping for the dwxgmac2 IP. This feature can be configured through ethtool. If the rx-vlan-offload is off, then the VLAN tag will be stripped by the driver. If the rx-vlan-offload is on then the VLAN tag will be stripped by the MAC. Signed-off-by: Boon Khai Ng <boon.khai.ng@altera.com> Reviewed-by: Matthew Gerlach <matthew.gerlach@altera.com> Link: https://patch.msgid.link/20250507063812.34000-4-boon.khai.ng@altera.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2025-05-09net: stmmac: stmmac_vlan: rename VLAN functions and symbol to generic symbol.Boon Khai Ng
With the VLAN handling code decoupled from dwmac4 and dwxgmac2 and consolidated in stmmac_vlan.c, functions and symbols are renamed to use a generic prefix. This change improves code clarity and maintainability by reflecting the shared nature of the VLAN logic, facilitating future enhancements or reuse without being tied to specific MAC implementations. No functional changes are introduced in this patch. Note: The dwxgmac2_update_vlan_hash function is not combined due to minor differences in setting the VTFE bit. A separate fix patch will be submitted to align its behavior with the dwmac4 driver. Signed-off-by: Boon Khai Ng <boon.khai.ng@altera.com> Link: https://patch.msgid.link/20250507063812.34000-3-boon.khai.ng@altera.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2025-05-09net: stmmac: Refactor VLAN implementationBoon Khai Ng
Refactor VLAN implementation by moving common code for DWMAC4 and DWXGMAC IPs into a separate VLAN module. VLAN implementation for DWMAC4 and DWXGMAC differs only for CSR base address, the descriptor for the VLAN ID and VLAN VALID bit field. The descriptor format for VLAN is not moved to the common code due to hardware-specific differences between DWMAC4 and DWXGMAC. For the DWMAC4 IP, the Receive Normal Descriptor 0 (RDES0) is formatted as follows: 31 0 ------------------------ ----------------------- RDES0| Inner VLAN TAG [31:16] | Outer VLAN TAG [15:0] | ------------------------ ----------------------- For the DWXGMAC IP, the RDES0 format varies based on the Tunneled Frame bit (TNP): a) For Non-Tunneled Frame (TNP=0) 31 0 ------------------------ ----------------------- RDES0| Inner VLAN TAG [31:16] | Outer VLAN TAG [15:0] | ------------------------ ----------------------- b) For Tunneled Frame (TNP=1) 31 8 7 3 2 0 --------------------- ------------------ ------- RDES0| VNID/VSID | Reserved | OL2L3 | --------------------- ------------------ ------ The logic for handling tunneled frames is not yet implemented in the dwxgmac2_wrback_get_rx_vlan_tci() function. Therefore, it is prudent to maintain separate functions within their respective descriptor driver files (dwxgmac2_descs.c and dwmac4_descs.c). Signed-off-by: Boon Khai Ng <boon.khai.ng@altera.com> Link: https://patch.msgid.link/20250507063812.34000-2-boon.khai.ng@altera.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2025-05-09net: mvpp2: convert to ndo_hwtstamp_get() and ndo_hwtstamp_set()Vladimir Oltean
New timestamping API was introduced in commit 66f7223039c0 ("net: add NDOs for configuring hardware timestamping") from kernel v6.6. It is time to convert the mvpp2 driver to the new API, so that the ndo_eth_ioctl() path can be removed completely. Note that on the !port->hwtstamp condition, the old code used to fall through in mvpp2_ioctl(), and return either -ENOTSUPP if !port->phylink, or -EOPNOTSUPP, in phylink_mii_ioctl(). Keep the test for port->hwtstamp in the newly introduced net_device_ops, but consolidate the error code to just -EOPNOTSUPP. The other one is documented as NFS-specific, it's best to avoid it anyway. Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com> Reviewed-by: Vadim Fedorenko <vadim.fedorenko@linux.dev> Link: https://patch.msgid.link/20250508144630.1979215-1-vladimir.oltean@nxp.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2025-05-09net: gianfar: convert to ndo_hwtstamp_get() and ndo_hwtstamp_set()Vladimir Oltean
New timestamping API was introduced in commit 66f7223039c0 ("net: add NDOs for configuring hardware timestamping") from kernel v6.6. It is time to convert the gianfar driver to the new API, so that the ndo_eth_ioctl() path can be removed completely. Don't propagate the unnecessary "config.flags = 0;" assignment to gfar_hwtstamp_get(), because dev_get_hwtstamp() provides a zero initialized struct kernel_hwtstamp_config. After removing timestamping logic from gfar_ioctl(), the rest is equivalent to phy_do_ioctl_running(), so provide that directly as our ndo_eth_ioctl() implementation. Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com> Tested-by: Vladimir Oltean <vladimir.oltean@nxp.com> # LS1021A Reviewed-by: Vadim Fedorenko <vadim.fedorenko@linux.dev> Link: https://patch.msgid.link/20250508143659.1944220-1-vladimir.oltean@nxp.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2025-05-09net: dpaa2-eth: add ndo_hwtstamp_get() implementationVladimir Oltean
Allow SIOCGHWTSTAMP to retrieve the current timestamping settings on DPNIs. This reflects what has been done in dpaa2_eth_hwtstamp_set(). Tested with hwstamp_ctl -i endpmac17. Before the change, it prints "Device driver does not have support for non-destructive SIOCGHWTSTAMP." After the change, it retrieves the previously set configuration. Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com> Tested-by: Vladimir Oltean <vladimir.oltean@nxp.com> # LX2160A Reviewed-by: Vadim Fedorenko <vadim.fedorenko@linux.dev> Link: https://patch.msgid.link/20250508134102.1747075-2-vladimir.oltean@nxp.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2025-05-09net: dpaa2-eth: convert to ndo_hwtstamp_set()Vladimir Oltean
New timestamping API was introduced in commit 66f7223039c0 ("net: add NDOs for configuring hardware timestamping") from kernel v6.6. It is time to convert the DPAA2 Ethernet driver to the new API, so that the ndo_eth_ioctl() path can be removed completely. This driver only responds to SIOCSHWTSTAMP (not SIOCGHWTSTAMP) so convert just that. Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com> Tested-by: Vladimir Oltean <vladimir.oltean@nxp.com> # LX2160A Reviewed-by: Vadim Fedorenko <vadim.fedorenko@linux.dev> Link: https://patch.msgid.link/20250508134102.1747075-1-vladimir.oltean@nxp.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2025-05-09net: dpaa_eth: simplify dpaa_ioctl()Vladimir Oltean
phylink_mii_ioctl() handles multiple ioctls in addition to just SIOCGMIIREG: SIOCGMIIPHY, SIOCSMIIREG. Don't filter these out. Also, phylink can handle the case where net_dev->phydev is NULL (like optical SFP module, fixed-link). Be like other drivers and let phylink do so without any driver-side call filtering. Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com> Reviewed-by: Vadim Fedorenko <vadim.fedorenko@linux.dev> Acked-by: Madalin Bucur <madalin.bucur@oss.nxp.com> Link: https://patch.msgid.link/20250508124753.1492742-4-vladimir.oltean@nxp.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2025-05-09net: dpaa_eth: add ndo_hwtstamp_get() implementationVladimir Oltean
Allow SIOCGHWTSTAMP to retrieve the current timestamping settings on DPAA1 interfaces. This reflects what has been done in dpaa_hwtstamp_set(). Tested with hwstamp_ctl -i fm1-mac9. Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com> Reviewed-by: Vadim Fedorenko <vadim.fedorenko@linux.dev> Acked-by: Madalin Bucur <madalin.bucur@oss.nxp.com> Link: https://patch.msgid.link/20250508124753.1492742-3-vladimir.oltean@nxp.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2025-05-09net: dpaa_eth: convert to ndo_hwtstamp_set()Vladimir Oltean
New timestamping API was introduced in commit 66f7223039c0 ("net: add NDOs for configuring hardware timestamping") from kernel v6.6. It is time to convert the DPAA1 driver to the new API, so that the ndo_eth_ioctl() path can be removed completely. This driver only responds to SIOCSHWTSTAMP (not SIOCGHWTSTAMP) so convert just that. Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com> Reviewed-by: Vadim Fedorenko <vadim.fedorenko@linux.dev> Acked-by: Madalin Bucur <madalin.bucur@oss.nxp.com> Link: https://patch.msgid.link/20250508124753.1492742-2-vladimir.oltean@nxp.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2025-05-09net: dsa: convert to ndo_hwtstamp_get() and ndo_hwtstamp_set()Vladimir Oltean
New timestamping API was introduced in commit 66f7223039c0 ("net: add NDOs for configuring hardware timestamping") from kernel v6.6. It is time to convert DSA to the new API, so that the ndo_eth_ioctl() path can be removed completely. Move the ds->ops->port_hwtstamp_get() and ds->ops->port_hwtstamp_set() calls from dsa_user_ioctl() to dsa_user_hwtstamp_get() and dsa_user_hwtstamp_set(). Due to the fact that the underlying ifreq type changes to kernel_hwtstamp_config, the drivers and the Ocelot switchdev front-end, all hooked up directly or indirectly, must also be converted all at once. The conversion also updates the comment from dsa_port_supports_hwtstamp(), which is no longer true because kernel_hwtstamp_config is kernel memory and does not need copy_to_user(). I've deliberated whether it is necessary to also update "err != -EOPNOTSUPP" to a more general "!err", but all drivers now either return 0 or -EOPNOTSUPP. The existing logic from the ocelot_ioctl() function, to avoid configuring timestamping if the PHY supports the operation, is obsoleted by more advanced core logic in dev_set_hwtstamp_phylib(). This is only a partial preparation for proper PHY timestamping support. None of these switch driver currently sets up PTP traps for PHY timestamping, so setting dev->see_all_hwtstamp_requests is not yet necessary and the conversion is relatively trivial. Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com> Tested-by: Vladimir Oltean <vladimir.oltean@nxp.com> # felix, sja1105, mv88e6xxx Reviewed-by: Vadim Fedorenko <vadim.fedorenko@linux.dev> Link: https://patch.msgid.link/20250508095236.887789-1-vladimir.oltean@nxp.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2025-05-09net: thunder: make tx software timestamp independentJason Xing
skb_tx_timestamp() is used for tx software timestamp enabled by SOF_TIMESTAMPING_TX_SOFTWARE while SKBTX_HW_TSTAMP is used for SOF_TIMESTAMPING_TX_HARDWARE. As it clearly shows they are different timestamps in two dimensions, it's not appropriate to group these two together in the if-statement. This patch completes three things: 1. make the software one standalone. Users are able to set both timestamps together with SOF_TIMESTAMPING_OPT_TX_SWHW flag. 2. make the software one generated after the hardware timestamp logic to avoid generating sw and hw timestamps at one time without SOF_TIMESTAMPING_OPT_TX_SWHW being set. 3. move the software timestamp call as close to the door bell. Signed-off-by: Jason Xing <kernelxing@tencent.com> Reviewed-by: Willem de Bruijn <willemb@google.com> Link: https://patch.msgid.link/20250508034433.14408-1-kerneljasonxing@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>