Commit Graph
15 Commits
Author SHA1 Message Date
Eric Dumazet 12d80ac4e7 net: dnet: fix dnet_poll()
A NAPI poll() handler is supposed to return exactly the budget when/if
napi_complete() has not been called.

It is also supposed to return number of frames that were received, so
that netdev_budget can have a meaning.

Signed-off-by: Eric Dumazet <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
2015-01-11 21:44:55 -05:00
Himangi Saraogi ae29223eaf net: dnet: Use managed interfaces
This patch introduces the use of managed interfaces like
devm_ioremap_resource and does away with the calls to free the
allocated memory in the probe and remove functions. Also, some
labels and variable are done away with. This fixes a bug as there
was a missing release_mem_region in the remove function.

Signed-off-by: Himangi Saraogi <[email protected]>
Acked-by: Julia Lawall <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
2014-08-02 16:40:52 -07:00
Florian Fainelli 89e158f909 dnet: remove empty MDIO bus reset function
dnet_mdio_reset() does nothing useful and is optional for the MDIO bus
code, so let's just remove it.

Signed-off-by: Florian Fainelli <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
2014-03-28 01:38:02 -04:00
Paul Gortmaker a81ab36bf5 drivers/net: delete non-required instances of include <linux/init.h>
None of these files are actually using any __init type directives
and hence don't need to include <linux/init.h>.   Most are just a
left over from __devinit and __cpuinit removal, or simply due to
code getting copied from one driver to the next.

This covers everything under drivers/net except for wireless, which
has been submitted separately.

Signed-off-by: Paul Gortmaker <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
2014-01-16 11:53:26 -08:00
Florian Fainelli f9a8f83b04 net: phy: remove flags argument from phy_{attach, connect, connect_direct}
The flags argument of the phy_{attach,connect,connect_direct} functions
is then used to assign a struct phy_device dev_flags with its value.
All callers but the tg3 driver pass the flag 0, which results in the
underlying PHY drivers in drivers/net/phy/ not being able to actually
use any of the flags they would set in dev_flags. This patch gets rid of
the flags argument, and passes phydev->dev_flags to the internal PHY
library call phy_attach_direct() such that drivers which actually modify
a phy device dev_flags get the value preserved for use by the underlying
phy driver.

Acked-by: Kosta Zertsekel <[email protected]>
Signed-off-by: Florian Fainelli <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
2013-01-14 15:11:50 -05:00
Bill Pemberton a0a4efedf9 net/ethernet: remove __dev* attributes
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 <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-12-03 11:16:56 -08:00
Joachim Eastwood c867b55eb4 net/ethernet: remove useless is_valid_ether_addr from drivers ndo_open
If ndo_validate_addr is set to the generic eth_validate_addr
function there is no point in calling is_valid_ether_addr
from driver ndo_open if ndo_open is not used elsewhere in
the driver.

With this change is_valid_ether_addr will be called from the
generic eth_validate_addr function. So there should be no change
in the actual behavior.

Signed-off-by: Joachim Eastwood <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
2012-11-19 19:01:18 -05:00
Richard Cochran eb774cbeae dnet: Support the get_ts_info ethtool method.
Signed-off-by: Richard Cochran <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
2012-04-04 05:28:46 -04:00
Danny Kukawka f2cedb63df net: replace random_ether_addr() with eth_hw_addr_random()
Replace usage of random_ether_addr() with eth_hw_addr_random()
to set addr_assign_type correctly to NET_ADDR_RANDOM.

Change the trivial cases.

v2: adapt to renamed eth_hw_addr_random()

Signed-off-by: Danny Kukawka <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
2012-02-15 15:34:16 -05:00
Pradeep A Dalvi 21a4e46995 netdev: ethernet dev_alloc_skb to netdev_alloc_skb
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 <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
2012-02-06 11:48:09 -05:00
Joe Perches 41de8d4cff drivers/net: Remove alloc_etherdev error messages
alloc_etherdev has a generic OOM/unable to alloc message.
Remove the duplicative messages after alloc_etherdev calls.

Signed-off-by: Joe Perches <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
2012-01-31 16:20:48 -05:00
Florian Fainelli 63f678301f dnet: use an unique MDIO bus name.
Signed-off-by: Florian Fainelli <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
2012-01-10 16:35:00 -08:00
Axel Lin db62f684de net/ethernet: convert drivers/net/ethernet/* to use module_platform_driver()
This patch converts the drivers in drivers/net/ethernet/* to use the
module_platform_driver() macro which makes the code smaller and a bit
simpler.

Cc: "David S. Miller" <[email protected]>
Cc: Pantelis Antoniou <[email protected]>
Cc: Vitaly Bordug <[email protected]>
Cc: Wan ZongShun <[email protected]>
Cc: Nicolas Pitre <[email protected]>
Cc: Giuseppe Cavallaro <[email protected]>
Cc: Marc Kleine-Budde <[email protected]>
Cc: Jeff Kirsher <[email protected]>
Cc: Jiri Pirko <[email protected]>
Cc: Daniel Hellstrom <[email protected]>
Cc: Alexey Dobriyan <[email protected]>
Cc: Tobias Klauser <[email protected]>
Cc: Grant Likely <[email protected]>
Cc: Jiri Kosina <[email protected]>
Cc: Richard Cochran <[email protected]>
Cc: Jonas Bonn <[email protected]>
Cc: Sebastian Poehn <[email protected]>
Cc: Yoshihiro Shimoda <[email protected]>
Cc: Ricardo Ribalda Delgado <[email protected]>
Cc: "Michał Mirosław" <[email protected]>
Signed-off-by: Axel Lin <[email protected]>
Acked-by: Wan ZongShun <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
2011-11-29 00:25:05 -05:00
Rick Jones 68aad78c50 sweep the floors and convert some .get_drvinfo routines to strlcpy
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 <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
2011-11-08 15:11:57 -05:00
Jeff Kirsher 9c8571da0a dnet: Move the Dave Ethernet driver
Move the Dave Ethernet driver into drivers/net/ethernet/ and
make the necessary Kconfig and Makefile changes.

CC: Ilya Yanok <[email protected]>
Signed-off-by: Jeff Kirsher <[email protected]>
2011-08-12 23:46:51 -07:00