aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/xilinx_emaclite.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/xilinx_emaclite.c')
-rw-r--r--drivers/net/xilinx_emaclite.c36
1 files changed, 10 insertions, 26 deletions
diff --git a/drivers/net/xilinx_emaclite.c b/drivers/net/xilinx_emaclite.c
index 14f0955eca68..de6c3086d232 100644
--- a/drivers/net/xilinx_emaclite.c
+++ b/drivers/net/xilinx_emaclite.c
@@ -515,7 +515,7 @@ static void xemaclite_update_address(struct net_local *drvdata,
515 */ 515 */
516static int xemaclite_set_mac_address(struct net_device *dev, void *address) 516static int xemaclite_set_mac_address(struct net_device *dev, void *address)
517{ 517{
518 struct net_local *lp = (struct net_local *) netdev_priv(dev); 518 struct net_local *lp = netdev_priv(dev);
519 struct sockaddr *addr = address; 519 struct sockaddr *addr = address;
520 520
521 if (netif_running(dev)) 521 if (netif_running(dev))
@@ -534,7 +534,7 @@ static int xemaclite_set_mac_address(struct net_device *dev, void *address)
534 */ 534 */
535static void xemaclite_tx_timeout(struct net_device *dev) 535static void xemaclite_tx_timeout(struct net_device *dev)
536{ 536{
537 struct net_local *lp = (struct net_local *) netdev_priv(dev); 537 struct net_local *lp = netdev_priv(dev);
538 unsigned long flags; 538 unsigned long flags;
539 539
540 dev_err(&lp->ndev->dev, "Exceeded transmit timeout of %lu ms\n", 540 dev_err(&lp->ndev->dev, "Exceeded transmit timeout of %lu ms\n",
@@ -578,7 +578,7 @@ static void xemaclite_tx_timeout(struct net_device *dev)
578 */ 578 */
579static void xemaclite_tx_handler(struct net_device *dev) 579static void xemaclite_tx_handler(struct net_device *dev)
580{ 580{
581 struct net_local *lp = (struct net_local *) netdev_priv(dev); 581 struct net_local *lp = netdev_priv(dev);
582 582
583 dev->stats.tx_packets++; 583 dev->stats.tx_packets++;
584 if (lp->deferred_skb) { 584 if (lp->deferred_skb) {
@@ -605,7 +605,7 @@ static void xemaclite_tx_handler(struct net_device *dev)
605 */ 605 */
606static void xemaclite_rx_handler(struct net_device *dev) 606static void xemaclite_rx_handler(struct net_device *dev)
607{ 607{
608 struct net_local *lp = (struct net_local *) netdev_priv(dev); 608 struct net_local *lp = netdev_priv(dev);
609 struct sk_buff *skb; 609 struct sk_buff *skb;
610 unsigned int align; 610 unsigned int align;
611 u32 len; 611 u32 len;
@@ -661,7 +661,7 @@ static irqreturn_t xemaclite_interrupt(int irq, void *dev_id)
661{ 661{
662 bool tx_complete = 0; 662 bool tx_complete = 0;
663 struct net_device *dev = dev_id; 663 struct net_device *dev = dev_id;
664 struct net_local *lp = (struct net_local *) netdev_priv(dev); 664 struct net_local *lp = netdev_priv(dev);
665 void __iomem *base_addr = lp->base_addr; 665 void __iomem *base_addr = lp->base_addr;
666 u32 tx_status; 666 u32 tx_status;
667 667
@@ -918,7 +918,7 @@ void xemaclite_adjust_link(struct net_device *ndev)
918 */ 918 */
919static int xemaclite_open(struct net_device *dev) 919static int xemaclite_open(struct net_device *dev)
920{ 920{
921 struct net_local *lp = (struct net_local *) netdev_priv(dev); 921 struct net_local *lp = netdev_priv(dev);
922 int retval; 922 int retval;
923 923
924 /* Just to be safe, stop the device first */ 924 /* Just to be safe, stop the device first */
@@ -987,7 +987,7 @@ static int xemaclite_open(struct net_device *dev)
987 */ 987 */
988static int xemaclite_close(struct net_device *dev) 988static int xemaclite_close(struct net_device *dev)
989{ 989{
990 struct net_local *lp = (struct net_local *) netdev_priv(dev); 990 struct net_local *lp = netdev_priv(dev);
991 991
992 netif_stop_queue(dev); 992 netif_stop_queue(dev);
993 xemaclite_disable_interrupts(lp); 993 xemaclite_disable_interrupts(lp);
@@ -1001,21 +1001,6 @@ static int xemaclite_close(struct net_device *dev)
1001} 1001}
1002 1002
1003/** 1003/**
1004 * xemaclite_get_stats - Get the stats for the net_device
1005 * @dev: Pointer to the network device
1006 *
1007 * This function returns the address of the 'net_device_stats' structure for the
1008 * given network device. This structure holds usage statistics for the network
1009 * device.
1010 *
1011 * Return: Pointer to the net_device_stats structure.
1012 */
1013static struct net_device_stats *xemaclite_get_stats(struct net_device *dev)
1014{
1015 return &dev->stats;
1016}
1017
1018/**
1019 * xemaclite_send - Transmit a frame 1004 * xemaclite_send - Transmit a frame
1020 * @orig_skb: Pointer to the socket buffer to be transmitted 1005 * @orig_skb: Pointer to the socket buffer to be transmitted
1021 * @dev: Pointer to the network device 1006 * @dev: Pointer to the network device
@@ -1031,7 +1016,7 @@ static struct net_device_stats *xemaclite_get_stats(struct net_device *dev)
1031 */ 1016 */
1032static int xemaclite_send(struct sk_buff *orig_skb, struct net_device *dev) 1017static int xemaclite_send(struct sk_buff *orig_skb, struct net_device *dev)
1033{ 1018{
1034 struct net_local *lp = (struct net_local *) netdev_priv(dev); 1019 struct net_local *lp = netdev_priv(dev);
1035 struct sk_buff *new_skb; 1020 struct sk_buff *new_skb;
1036 unsigned int len; 1021 unsigned int len;
1037 unsigned long flags; 1022 unsigned long flags;
@@ -1068,7 +1053,7 @@ static int xemaclite_send(struct sk_buff *orig_skb, struct net_device *dev)
1068static void xemaclite_remove_ndev(struct net_device *ndev) 1053static void xemaclite_remove_ndev(struct net_device *ndev)
1069{ 1054{
1070 if (ndev) { 1055 if (ndev) {
1071 struct net_local *lp = (struct net_local *) netdev_priv(ndev); 1056 struct net_local *lp = netdev_priv(ndev);
1072 1057
1073 if (lp->base_addr) 1058 if (lp->base_addr)
1074 iounmap((void __iomem __force *) (lp->base_addr)); 1059 iounmap((void __iomem __force *) (lp->base_addr));
@@ -1245,7 +1230,7 @@ static int __devexit xemaclite_of_remove(struct platform_device *of_dev)
1245 struct device *dev = &of_dev->dev; 1230 struct device *dev = &of_dev->dev;
1246 struct net_device *ndev = dev_get_drvdata(dev); 1231 struct net_device *ndev = dev_get_drvdata(dev);
1247 1232
1248 struct net_local *lp = (struct net_local *) netdev_priv(ndev); 1233 struct net_local *lp = netdev_priv(ndev);
1249 1234
1250 /* Un-register the mii_bus, if configured */ 1235 /* Un-register the mii_bus, if configured */
1251 if (lp->has_mdio) { 1236 if (lp->has_mdio) {
@@ -1285,7 +1270,6 @@ static struct net_device_ops xemaclite_netdev_ops = {
1285 .ndo_start_xmit = xemaclite_send, 1270 .ndo_start_xmit = xemaclite_send,
1286 .ndo_set_mac_address = xemaclite_set_mac_address, 1271 .ndo_set_mac_address = xemaclite_set_mac_address,
1287 .ndo_tx_timeout = xemaclite_tx_timeout, 1272 .ndo_tx_timeout = xemaclite_tx_timeout,
1288 .ndo_get_stats = xemaclite_get_stats,
1289#ifdef CONFIG_NET_POLL_CONTROLLER 1273#ifdef CONFIG_NET_POLL_CONTROLLER
1290 .ndo_poll_controller = xemaclite_poll_controller, 1274 .ndo_poll_controller = xemaclite_poll_controller,
1291#endif 1275#endif