summaryrefslogtreecommitdiff
path: root/drivers/staging/mt7621-eth/ethtool.c
AgeCommit message (Collapse)Author
2019-03-18staging: remove mt7621-ethNeilBrown
driver/net/ethernet/mediatek/ now supports this hardware, so we don't need a separate driver. Signed-off-by: NeilBrown <neil@brown.name> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-02-04staging: mt7621-eth/ethtool.c: Correction of SPDX license identifierCarlos Henrique Lima Melara
This patch fixes the checkpatch.p1 warning: WARNING: Missing or malformed SPDX-License-Identifier tag in line 1 +/* It includes the SPDX expression for GPL-2.0 according to the text license in the top of the C file. Signed-off-by: Carlos Henrique Lima Melara <charlesmelara@outlook.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-14staging: mt7621-eth: Refactor ethtool statsKamal Heib
This patch removes the ugly macro hack to make sure hw_stats and ethtool strings are consisten, instead define a new struct which will hold the stat string and his index within the hw_stats struct. Signed-off-by: Kamal Heib <kamalheib1@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-14staging: mt7621-eth: Fix line over 80 charactersKamal Heib
This change fixes all the lines that get over 80 characters. Signed-off-by: Kamal Heib <kamalheib1@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-08staging: mt7621-eth: Remove unnecessary blank linesKamal Heib
Remove un-necessary blank lines to solve errors found by checkpatch.pl. Signed-off-by: Kamal Heib <kamalheib1@gmail.com> Reviewed-by: NeilBrown <neil@brown.name> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-04-23staging: mt7621-eth: Fix sparse warning in ethtool.cChris Coffey
This fixes the following sparse warning: drivers/staging/mt7621-eth/ethtool.c:213:6: warning: symbol 'mtk_set_ethtool_ops' was not declared. Should it be static? Signed-off-by: Chris Coffey <cmc@babblebit.net> Reviewed-by: NeilBrown <neil@brown.name> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-03-19staging: mt7621-eth: add the drivers core filesJohn Crispin
Original comment: This patch adds the main chunk of the driver. The ethernet core is used in all of the Mediatek/Ralink Wireless SoCs. Over the years we have seen various changes to * the register layout * the type of ports (single/dual gbit, internal FE/Gbit switch) * dma engine (PDMA/QDMA) and new offloading features were added, such as * checksum * VLAN TX/RX * TSO * LRO The core functionality has however remained the same allowing us to use the same code for all SoCs. The abstraction for the various SoCs uses the typical ops struct pattern which allows us to extend or override the core functionality depending on which SoC we are on. The code to bring up the switches and external ports has also been split into separate files. There are 2 types of DMA engine, PDMA and the newer QDMA. PDMA uses a typical ring buffer while QDMA uses a linked list. Unfortunatley we have the MT7621 which has a few silicon issues. Due to these issues we need to PDMA for RX and QDMA for TX. All SoCs newer than the MT7621 can can run on QDMA exclusively. Most of the SoCs have a switch frontend. Older silicon has a so called ESW (Ethernet Switch) while newer cores have a GSW (Gigabit switch). Additionally there is a MDIO bus that can be used to talk to PHYs. In these cases one switch port get changed into a normal MAC port. Some SoCs have a dual MAC, we currently only support this on MT7623. NeilBrown: - removed everything not closely related to mt7621, as that is all I can test - converted ethtool.c to new ethtool_link_ksettings interfaces. Doesn't work yet. - updated some phydev interface use: e.g. dev_name() -> phydev_name() - updated mdio to use mdiobus_get_phy() - added some missing export_symbols - updated get_stats64 interface - TX_DMA_FPORT and TX_DMA_TSO to tx dma descriptor - range checked RX_DMA_FPORT in rx dma descriptor - tell hardware what mac address was chosen - fixed MT7620_GDMA1_FWD_CFG which was using wrong value Signed-off-by: John Crispin <blogic@openwrt.org> Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: Michael Lee <igvtee@gmail.com> Signed-off-by: NeilBrown <neil@brown.name> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>