aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorAlexander Beregalov <a.beregalov@gmail.com>2009-03-29 11:27:21 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2009-04-17 14:06:24 -0400
commitca7d2dbbadd6c3d6d10e98b94e25cb9566ed3af1 (patch)
treee21a96dd5c5ac53abb9cedc25a4688e9c5dc3ff7 /drivers
parent17a23b384f88a336a5230e80dea2013aad03b6f7 (diff)
Staging: rt2860: convert to netdev_ops
Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com> Acked-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/staging/rt2860/rt_main_dev.c25
1 files changed, 15 insertions, 10 deletions
diff --git a/drivers/staging/rt2860/rt_main_dev.c b/drivers/staging/rt2860/rt_main_dev.c
index cf17bcdd7333..6c4396f0903b 100644
--- a/drivers/staging/rt2860/rt_main_dev.c
+++ b/drivers/staging/rt2860/rt_main_dev.c
@@ -722,6 +722,20 @@ err:
722 return (-1); 722 return (-1);
723} /* End of rt28xx_open */ 723} /* End of rt28xx_open */
724 724
725static const struct net_device_ops rt2860_netdev_ops = {
726 .ndo_open = MainVirtualIF_open,
727 .ndo_stop = MainVirtualIF_close,
728 .ndo_do_ioctl = rt28xx_ioctl,
729 .ndo_get_stats = RT28xx_get_ether_stats,
730 .ndo_validate_addr = NULL,
731 .ndo_set_mac_address = eth_mac_addr,
732 .ndo_change_mtu = eth_change_mtu,
733#ifdef IKANOS_VX_1X0
734 .ndo_start_xmit = IKANOS_DataFramesTx,
735#else
736 .ndo_start_xmit = rt28xx_send_packets,
737#endif
738};
725 739
726/* Must not be called for mdev and apdev */ 740/* Must not be called for mdev and apdev */
727static NDIS_STATUS rt_ieee80211_if_setup(struct net_device *dev, PRTMP_ADAPTER pAd) 741static NDIS_STATUS rt_ieee80211_if_setup(struct net_device *dev, PRTMP_ADAPTER pAd)
@@ -733,11 +747,6 @@ static NDIS_STATUS rt_ieee80211_if_setup(struct net_device *dev, PRTMP_ADAPTER p
733 747
734 748
735 //ether_setup(dev); 749 //ether_setup(dev);
736 dev->hard_start_xmit = rt28xx_send_packets;
737
738#ifdef IKANOS_VX_1X0
739 dev->hard_start_xmit = IKANOS_DataFramesTx;
740#endif // IKANOS_VX_1X0 //
741 750
742#ifdef CONFIG_STA_SUPPORT 751#ifdef CONFIG_STA_SUPPORT
743#if WIRELESS_EXT >= 12 752#if WIRELESS_EXT >= 12
@@ -760,12 +769,8 @@ static NDIS_STATUS rt_ieee80211_if_setup(struct net_device *dev, PRTMP_ADAPTER p
760#if WIRELESS_EXT < 21 769#if WIRELESS_EXT < 21
761 dev->get_wireless_stats = rt28xx_get_wireless_stats; 770 dev->get_wireless_stats = rt28xx_get_wireless_stats;
762#endif 771#endif
763 dev->get_stats = RT28xx_get_ether_stats;
764 dev->open = MainVirtualIF_open; //rt28xx_open;
765 dev->stop = MainVirtualIF_close; //rt28xx_close;
766 dev->priv_flags = INT_MAIN; 772 dev->priv_flags = INT_MAIN;
767 dev->do_ioctl = rt28xx_ioctl; 773 dev->netdev_ops = &rt2860_netdev_ops;
768 dev->validate_addr = NULL;
769 // find available device name 774 // find available device name
770 for (i = 0; i < 8; i++) 775 for (i = 0; i < 8; i++)
771 { 776 {