aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/3com/typhoon.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2017-04-07net: typhoon: Use net_device_stats from struct net_deviceTobias Klauser1-4/+3
Instead of using a private copy of struct net_device_stats in struct typhoon, use stats from struct net_device. Signed-off-by: Tobias Klauser <tklauser@distanz.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
2017-01-30drivers: net: generalize napi_complete_done()Eric Dumazet1-1/+1
napi_complete_done() allows to opt-in for gro_flush_timeout, added back in linux-3.19, commit 3b47d30396ba ("net: gro: add a per device gro flush timer") This allows for more efficient GRO aggregation without sacrifying latencies. Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-12-30net: 3com: typhoon: typhoon_init_one: make return values more specificThomas Preisner1-8/+8
In some cases the return value of a failing function is not being used and the function typhoon_init_one() returns another negative error code instead. Signed-off-by: Thomas Preisner <thomas.preisner+linux@fau.de> Signed-off-by: Milan Stephan <milan.stephan+linux@fau.de> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-12-30net: 3com: typhoon: typhoon_init_one: fix incorrect return valuesThomas Preisner1-3/+6
In a few cases the err-variable is not set to a negative error code if a function call in typhoon_init_one() fails and thus 0 is returned instead. It may be better to set err to the appropriate negative error code before returning. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=188841 Reported-by: Pan Bian <bianpan2016@163.com> Signed-off-by: Thomas Preisner <thomas.preisner+linux@fau.de> Signed-off-by: Milan Stephan <milan.stephan+linux@fau.de> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-12-24Replace <asm/uaccess.h> with <linux/uaccess.h> globallyLinus Torvalds1-1/+1
This was entirely automated, using the script by Al: PATT='^[[:blank:]]*#[[:blank:]]*include[[:blank:]]*<asm/uaccess.h>' sed -i -e "s!$PATT!#include <linux/uaccess.h>!" \ $(git grep -l "$PATT"|grep -v ^include/linux/uaccess.h) to do the replacement at the end of the merge window. Requested-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2016-11-09net: 3com: typhoon: fix typhoon_get_link_ksettingsPhilippe Reynes1-1/+6
When moving from typhoon_get_settings to typhoon_getlink_ksettings in the commit f7a5537cd2a5 ("net: 3com: typhoon: use new api ethtool_{get|set}_link_ksettings"), we use a local variable supported but we forgot to update the struct ethtool_link_ksettings with this value. We also initialize advertising to zero, because otherwise it may be uninitialized if no case of the switch (tp->xcvr_select) is used. Signed-off-by: Philippe Reynes <tremyfr@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-11-02net: 3com: typhoon: use new api ethtool_{get|set}_link_ksettingsPhilippe Reynes1-30/+30
The ethtool api {get|set}_settings is deprecated. We move this driver to new api {get|set}_link_ksettings. Signed-off-by: Philippe Reynes <tremyfr@gmail.com> Reviewed-by: David Dillow <dave@thedillows.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-10-13net: deprecate eth_change_mtu, remove usageJarod Wilson1-1/+0
With centralized MTU checking, there's nothing productive done by eth_change_mtu that isn't already done in dev_set_mtu, so mark it as deprecated and remove all usage of it in the kernel. All callers have been audited for calls to alloc_etherdev* or ether_setup directly, which means they all have a valid dev->min_mtu and dev->max_mtu. Now eth_change_mtu prints out a netdev_warn about being deprecated, for the benefit of out-of-tree drivers that might be utilizing it. Of note, dvb_net.c actually had dev->mtu = 4096, while using eth_change_mtu, meaning that if you ever tried changing it's mtu, you couldn't set it above 1500 anymore. It's now getting dev->max_mtu also set to 4096 to remedy that. v2: fix up lantiq_etop, missed breakage due to drive not compiling on x86 CC: netdev@vger.kernel.org Signed-off-by: Jarod Wilson <jarod@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-01-13net: rename vlan_tx_* helpers since "tx" is misleading thereJiri Pirko1-2/+2
The same macros are used for rx as well. So rename it. Signed-off-by: Jiri Pirko <jiri@resnulli.us> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-10-24net: typhoon: Remove redundant castsRasmus Villemoes1-2/+2
Both image_data and typhoon_fw->data are const u8*, so the cast to u8* is unnecessary and confusing. Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk> Acked-by: David Dillow <dave@thedillows.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-08-12PCI: Remove DEFINE_PCI_DEVICE_TABLE macro useBenoit Taine1-1/+1
We should prefer `struct pci_device_id` over `DEFINE_PCI_DEVICE_TABLE` to meet kernel coding style guidelines. This issue was reported by checkpatch. A simplified version of the semantic patch that makes this change is as follows (http://coccinelle.lip6.fr/): // <smpl> @@ identifier i; declarer name DEFINE_PCI_DEVICE_TABLE; initializer z; @@ - DEFINE_PCI_DEVICE_TABLE(i) + const struct pci_device_id i[] = z; // </smpl> [bhelgaas: add semantic patch] Signed-off-by: Benoit Taine <benoit.taine@lip6.fr> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
2014-05-13net: get rid of SET_ETHTOOL_OPSWilfried Klaebe1-1/+1
net: get rid of SET_ETHTOOL_OPS Dave Miller mentioned he'd like to see SET_ETHTOOL_OPS gone. This does that. Mostly done via coccinelle script: @@ struct ethtool_ops *ops; struct net_device *dev; @@ - SET_ETHTOOL_OPS(dev, ops); + dev->ethtool_ops = ops; Compile tested only, but I'd seriously wonder if this broke anything. Suggested-by: Dave Miller <davem@davemloft.net> Signed-off-by: Wilfried Klaebe <w-lkml@lebenslange-mailadresse.de> Acked-by: Felipe Balbi <balbi@ti.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-10-18net: typhoon: remove unnecessary pci_set_drvdata()Jingoo Han1-1/+0
The driver core clears the driver data to NULL after device_release or on probe failure. Thus, it is not needed to manually clear the device driver data to NULL. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Acked-by: David Dillow <dave@thedillows.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-04-19net: vlan: add protocol argument to packet tagging functionsPatrick McHardy1-1/+1
Add a protocol argument to the VLAN packet tagging functions. In case of HW tagging, we need that protocol available in the ndo_start_xmit functions, so it is stored in a new field in the skb. The new field fits into a hole (on 64 bit) and doesn't increase the sks's size. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-04-19net: vlan: rename NETIF_F_HW_VLAN_* feature flags to NETIF_F_HW_VLAN_CTAG_*Patrick McHardy1-2/+2
Rename the hardware VLAN acceleration features to include "CTAG" to indicate that they only support CTAGs. Follow up patches will introduce 802.1ad server provider tagging (STAGs) and require the distinction for hardware not supporting acclerating both. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-12-03typhoon: remove __dev* attributesBill Pemberton1-5/+5
CONFIG_HOTPLUG is going away as an option. As result the __dev* markings will be going away. Remove use of __devinit, __devexit_p, __devinitdata, __devinitconst, and __devexit. Signed-off-by: Bill Pemberton <wfp5p@virginia.edu> Cc: David Dillow <dave@thedillows.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-01treewide: fix comment/printk/variable typosAnatol Pomozov1-1/+1
Signed-off-by: Anatol Pomozov <anatol.pomozov@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2012-04-30typhoon: get rid of redundant conditional before all to release_firmware()Jesper Juhl1-2/+1
There's no need to test for a NULL pointer before calling release_firmware() since the function does that check itself, so remove the redundant test. Signed-off-by: Jesper Juhl <jj@chaosbits.net> Acked-by: David Dillow <dave@thedillows.org> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2012-02-223com/typhoon: reuse eth_mac_addr()Danny Kukawka1-13/+1
Use eth_mac_addr() for .ndo_set_mac_address, remove typhoon_set_mac_address() since it do currently the same as eth_mac_addr(). Additional advantage: eth_mac_addr() already checks if the given address is valid. Signed-off-by: Danny Kukawka <danny.kukawka@bisect.de> Acked-by: Dave Dillow <dave@thedillows.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-02-06netdev: ethernet dev_alloc_skb to netdev_alloc_skbPradeep A Dalvi1-3/+2
Replaced deprecating dev_alloc_skb with netdev_alloc_skb in drivers/net/ethernet - Removed extra skb->dev = dev after netdev_alloc_skb Signed-off-by: Pradeep A Dalvi <netdev@pradeepdalvi.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-11-08sweep the floors and convert some .get_drvinfo routines to strlcpyRick Jones1-7/+9
Per the mention made by Ben Hutchings that strlcpy is now the preferred string copy routine for a .get_drvinfo routine, do a bit of floor sweeping and convert some of the as-yet unconverted ethernet drivers to it. Signed-off-by: Rick Jones <rick.jones2@hp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-10-19net: add skb frag size accessorsEric Dumazet1-3/+3
To ease skb->truesize sanitization, its better to be able to localize all references to skb frags size. Define accessors : skb_frag_size() to fetch frag size, and skb_frag_size_{set|add|sub}() to manipulate it. Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-10-07net: Remove unnecessary driver assignments of ethtool_ringparam fields to zeroRick Jones1-4/+0
Per comments from Ben Hutchings on a previous patch, sweep the floors a little removing unnecessary assignments of zero to fields of struct ethtool_ringparam in driver code supporting ethtool -g. Signed-off-by: Rick Jones <rick.jones2@hp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-09-22typhoon: convert to SKB paged frag API.Ian Campbell1-2/+1
Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Cc: David Dillow <dave@thedillows.org> Cc: netdev@vger.kernel.org Signed-off-by: David S. Miller <davem@davemloft.net>
2011-08-17net: remove use of ndo_set_multicast_list in driversJiri Pirko1-1/+1
replace it by ndo_set_rx_mode Signed-off-by: Jiri Pirko <jpirko@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-08-103c*/acenic/typhoon: Move 3Com Ethernet driversJeff Kirsher1-0/+2574
Moves the 3Com drivers into drivers/net/ethernet/3com/ and the necessary Kconfig and Makefile changes. Did not move the following drivers becuase they use a non-3Com chipset: 3c503, 3c505, 3c507, 3c523 and 3c527 CC: Steffen Klassert <klassert@mathematik.tu-chemnitz.de> CC: David Dillow <dave@thedillows.org> CC: Jes Sorensen <jes@trained-monkey.org> CC: Alan Cox <alan@linux.intel.com> CC: David Hinds <dahinds@users.sourceforge.net> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Acked-by: David Dillow <dave@thedillows.org>