diff options
author | Stephen Hemminger <shemminger@vyatta.com> | 2009-03-20 15:36:26 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-03-22 01:43:59 -0400 |
commit | 7ae41cc3c04b0e79b7c9c3e5cbb5222f181e3ca1 (patch) | |
tree | ac0e85cbc4df9fb6079ea6e1bdae1cfaa3a03d4e /drivers/net/wireless/airo.c | |
parent | 9db0ba0a8b8bb0fd6606b4ac17073b2984b2d797 (diff) |
airo: convert to net_device_ops
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/wireless/airo.c')
-rw-r--r-- | drivers/net/wireless/airo.c | 63 |
1 files changed, 44 insertions, 19 deletions
diff --git a/drivers/net/wireless/airo.c b/drivers/net/wireless/airo.c index f5e2dca083cb..7e80aba8a148 100644 --- a/drivers/net/wireless/airo.c +++ b/drivers/net/wireless/airo.c | |||
@@ -2646,17 +2646,21 @@ static const struct header_ops airo_header_ops = { | |||
2646 | .parse = wll_header_parse, | 2646 | .parse = wll_header_parse, |
2647 | }; | 2647 | }; |
2648 | 2648 | ||
2649 | static const struct net_device_ops airo11_netdev_ops = { | ||
2650 | .ndo_open = airo_open, | ||
2651 | .ndo_stop = airo_close, | ||
2652 | .ndo_start_xmit = airo_start_xmit11, | ||
2653 | .ndo_get_stats = airo_get_stats, | ||
2654 | .ndo_set_mac_address = airo_set_mac_address, | ||
2655 | .ndo_do_ioctl = airo_ioctl, | ||
2656 | .ndo_change_mtu = airo_change_mtu, | ||
2657 | }; | ||
2658 | |||
2649 | static void wifi_setup(struct net_device *dev) | 2659 | static void wifi_setup(struct net_device *dev) |
2650 | { | 2660 | { |
2661 | dev->netdev_ops = &airo11_netdev_ops; | ||
2651 | dev->header_ops = &airo_header_ops; | 2662 | dev->header_ops = &airo_header_ops; |
2652 | dev->hard_start_xmit = &airo_start_xmit11; | ||
2653 | dev->get_stats = &airo_get_stats; | ||
2654 | dev->set_mac_address = &airo_set_mac_address; | ||
2655 | dev->do_ioctl = &airo_ioctl; | ||
2656 | dev->wireless_handlers = &airo_handler_def; | 2663 | dev->wireless_handlers = &airo_handler_def; |
2657 | dev->change_mtu = &airo_change_mtu; | ||
2658 | dev->open = &airo_open; | ||
2659 | dev->stop = &airo_close; | ||
2660 | 2664 | ||
2661 | dev->type = ARPHRD_IEEE80211; | 2665 | dev->type = ARPHRD_IEEE80211; |
2662 | dev->hard_header_len = ETH_HLEN; | 2666 | dev->hard_header_len = ETH_HLEN; |
@@ -2739,6 +2743,33 @@ static void airo_networks_initialize(struct airo_info *ai) | |||
2739 | &ai->network_free_list); | 2743 | &ai->network_free_list); |
2740 | } | 2744 | } |
2741 | 2745 | ||
2746 | static const struct net_device_ops airo_netdev_ops = { | ||
2747 | .ndo_open = airo_open, | ||
2748 | .ndo_stop = airo_close, | ||
2749 | .ndo_start_xmit = airo_start_xmit, | ||
2750 | .ndo_get_stats = airo_get_stats, | ||
2751 | .ndo_set_multicast_list = airo_set_multicast_list, | ||
2752 | .ndo_set_mac_address = airo_set_mac_address, | ||
2753 | .ndo_do_ioctl = airo_ioctl, | ||
2754 | .ndo_change_mtu = airo_change_mtu, | ||
2755 | .ndo_set_mac_address = eth_mac_addr, | ||
2756 | .ndo_validate_addr = eth_validate_addr, | ||
2757 | }; | ||
2758 | |||
2759 | static const struct net_device_ops mpi_netdev_ops = { | ||
2760 | .ndo_open = airo_open, | ||
2761 | .ndo_stop = airo_close, | ||
2762 | .ndo_start_xmit = mpi_start_xmit, | ||
2763 | .ndo_get_stats = airo_get_stats, | ||
2764 | .ndo_set_multicast_list = airo_set_multicast_list, | ||
2765 | .ndo_set_mac_address = airo_set_mac_address, | ||
2766 | .ndo_do_ioctl = airo_ioctl, | ||
2767 | .ndo_change_mtu = airo_change_mtu, | ||
2768 | .ndo_set_mac_address = eth_mac_addr, | ||
2769 | .ndo_validate_addr = eth_validate_addr, | ||
2770 | }; | ||
2771 | |||
2772 | |||
2742 | static struct net_device *_init_airo_card( unsigned short irq, int port, | 2773 | static struct net_device *_init_airo_card( unsigned short irq, int port, |
2743 | int is_pcmcia, struct pci_dev *pci, | 2774 | int is_pcmcia, struct pci_dev *pci, |
2744 | struct device *dmdev ) | 2775 | struct device *dmdev ) |
@@ -2776,22 +2807,16 @@ static struct net_device *_init_airo_card( unsigned short irq, int port, | |||
2776 | goto err_out_free; | 2807 | goto err_out_free; |
2777 | airo_networks_initialize (ai); | 2808 | airo_networks_initialize (ai); |
2778 | 2809 | ||
2810 | skb_queue_head_init (&ai->txq); | ||
2811 | |||
2779 | /* The Airo-specific entries in the device structure. */ | 2812 | /* The Airo-specific entries in the device structure. */ |
2780 | if (test_bit(FLAG_MPI,&ai->flags)) { | 2813 | if (test_bit(FLAG_MPI,&ai->flags)) |
2781 | skb_queue_head_init (&ai->txq); | 2814 | dev->netdev_ops = &mpi_netdev_ops; |
2782 | dev->hard_start_xmit = &mpi_start_xmit; | 2815 | else |
2783 | } else | 2816 | dev->netdev_ops = &airo_netdev_ops; |
2784 | dev->hard_start_xmit = &airo_start_xmit; | ||
2785 | dev->get_stats = &airo_get_stats; | ||
2786 | dev->set_multicast_list = &airo_set_multicast_list; | ||
2787 | dev->set_mac_address = &airo_set_mac_address; | ||
2788 | dev->do_ioctl = &airo_ioctl; | ||
2789 | dev->wireless_handlers = &airo_handler_def; | 2817 | dev->wireless_handlers = &airo_handler_def; |
2790 | ai->wireless_data.spy_data = &ai->spy_data; | 2818 | ai->wireless_data.spy_data = &ai->spy_data; |
2791 | dev->wireless_data = &ai->wireless_data; | 2819 | dev->wireless_data = &ai->wireless_data; |
2792 | dev->change_mtu = &airo_change_mtu; | ||
2793 | dev->open = &airo_open; | ||
2794 | dev->stop = &airo_close; | ||
2795 | dev->irq = irq; | 2820 | dev->irq = irq; |
2796 | dev->base_addr = port; | 2821 | dev->base_addr = port; |
2797 | 2822 | ||