summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/wangxun/ngbe/ngbe_type.h
AgeCommit message (Collapse)AuthorFilesLines
2024-01-04net: wangxun: add ethtool_ops for channel numberJiawen Wu1-1/+3
Add support to get RX/TX queue number with ethtool -l, and set RX/TX queue number with ethtool -L. Since interrupts need to be rescheduled, adjust the allocation of msix enties. Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2024-01-04net: wangxun: add ethtool_ops for ring parametersJiawen Wu1-0/+3
Support to query RX/TX depth with ethtool -g, and change RX/TX depth with ethtool -G. Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2023-09-14net: wangxun: move MDIO bus implementation to the libraryJiawen Wu1-3/+0
Move similar code of accessing MDIO bus from txgbe/ngbe to libwx. Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com> Reviewed-by: Simon Horman <horms@kernel.org> Link: https://lore.kernel.org/r/20230912031424.721386-1-jiawenwu@trustnetic.com Signed-off-by: Paolo Abeni <pabeni@redhat.com>
2023-08-25net: ngbe: move mdio access registers to libwxJiawen Wu1-19/+0
Registers of mdio accessing are common defined in libwx, remove the redundant macro definitions in ngbe driver. Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2023-06-01net: ngbe: Implement vlan add and remove opsMengyuan Lou1-0/+1
ngbe add ndo_vlan_rx_add_vid and ndo_vlan_rx_kill_vid. Signed-off-by: Mengyuan Lou <mengyuanlou@net-swift.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2023-03-17net: wangxun: Implement the ndo change mtu interfaceMengyuan Lou1-1/+0
Add ngbe and txgbe ndo_change_mtu support. Signed-off-by: Mengyuan Lou <mengyuanlou@net-swift.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2023-02-06net: ngbe: Support Rx and Tx process pathMengyuan Lou1-0/+4
Add enable and disable operation process for ngbe open/close. Clean Rx and Tx ring interrupts, process packets in the data path. Signed-off-by: Mengyuan Lou <mengyuanlou@net-swift.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2023-02-06net: ngbe: Add irqs request flowMengyuan Lou1-0/+14
Add request_irq for tx/rx rings and misc other events. If the application is successful, config vertors for interrupts. Enable some base interrupts mask in ngbe_irq_enable. Signed-off-by: Mengyuan Lou <mengyuanlou@net-swift.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2023-01-18net: wangxun: clean up the codeMengyuan Lou1-7/+5
Convert various mult-bit fields to be defined using GENMASK/FIELD_PREP. Simplify the code with the ternary operator. Signed-off-by: Mengyuan Lou <mengyuanlou@net-swift.com> Reviewed-by: Simon Horman <simon.horman@corigine.com> Link: https://lore.kernel.org/r/20230116103839.84087-1-mengyuanlou@net-swift.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2023-01-13net: ngbe: Add ngbe mdio bus driver.Mengyuan Lou1-0/+24
Add mdio bus register for ngbe. The internal phy and external phy need to be handled separately. Add phy changed event detection. Signed-off-by: Mengyuan Lou <mengyuanlou@net-swift.com> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Link: https://lore.kernel.org/r/20230111111718.40745-1-mengyuanlou@net-swift.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2023-01-07net: ngbe: Remove structure ngbe_adapterMengyuan Lou1-80/+0
Move the total private structure to libwx. Signed-off-by: Mengyuan Lou <mengyuanlou@net-swift.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2023-01-07net: wangxun: Rename private structure in libwxJiawen Wu1-1/+1
In order to move the total members in struct adapter to struct wx_hw to keep the code clean, it's a bad name of 'wx_hw' only for hardware. Rename 'wx_hw' to 'wx', and rename the pointers at use. Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2023-01-07net: wangxun: Move MAC address handling to libwxJiawen Wu1-11/+0
For setting MAC address, both txgbe and ngbe drivers have the same handling flow with different parameters. Move the same codes to libwx. Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2023-01-07net: ngbe: Move defines into unified fileJiawen Wu1-0/+26
Remove ngbe.h, move defines into ngbe_type.h file. Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2023-01-07net: ngbe: Remove structure ngbe_hwJiawen Wu1-1/+42
Remove useless structure ngbe_hw to make the codes clear. Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2022-11-02net: ngbe: Initialize sw info and register netdevMengyuan Lou1-5/+94
Initialize ngbe mac/phy type. Check whether the firmware is initialized. Initialize ngbe hw and register netdev. Signed-off-by: Mengyuan Lou <mengyuanlou@net-swift.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2022-08-30net: ngbe: Add build support for ngbeMengyuan Lou1-0/+50
Add build options and guidance doc. Initialize pci device access for Wangxun Gigabit Ethernet devices. Reviewed-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: Mengyuan Lou <mengyuanlou@net-swift.com> Link: https://lore.kernel.org/r/20220826034609.51854-1-mengyuanlou@net-swift.com Signed-off-by: Paolo Abeni <pabeni@redhat.com>