Commit 7ae41cc3 authored by Stephen Hemminger's avatar Stephen Hemminger Committed by David S. Miller

airo: convert to net_device_ops

Signed-off-by: default avatarStephen Hemminger <shemminger@vyatta.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 9db0ba0a
......@@ -2646,17 +2646,21 @@ static const struct header_ops airo_header_ops = {
.parse = wll_header_parse,
};
static const struct net_device_ops airo11_netdev_ops = {
.ndo_open = airo_open,
.ndo_stop = airo_close,
.ndo_start_xmit = airo_start_xmit11,
.ndo_get_stats = airo_get_stats,
.ndo_set_mac_address = airo_set_mac_address,
.ndo_do_ioctl = airo_ioctl,
.ndo_change_mtu = airo_change_mtu,
};
static void wifi_setup(struct net_device *dev)
{
dev->netdev_ops = &airo11_netdev_ops;
dev->header_ops = &airo_header_ops;
dev->hard_start_xmit = &airo_start_xmit11;
dev->get_stats = &airo_get_stats;
dev->set_mac_address = &airo_set_mac_address;
dev->do_ioctl = &airo_ioctl;
dev->wireless_handlers = &airo_handler_def;
dev->change_mtu = &airo_change_mtu;
dev->open = &airo_open;
dev->stop = &airo_close;
dev->type = ARPHRD_IEEE80211;
dev->hard_header_len = ETH_HLEN;
......@@ -2739,6 +2743,33 @@ static void airo_networks_initialize(struct airo_info *ai)
&ai->network_free_list);
}
static const struct net_device_ops airo_netdev_ops = {
.ndo_open = airo_open,
.ndo_stop = airo_close,
.ndo_start_xmit = airo_start_xmit,
.ndo_get_stats = airo_get_stats,
.ndo_set_multicast_list = airo_set_multicast_list,
.ndo_set_mac_address = airo_set_mac_address,
.ndo_do_ioctl = airo_ioctl,
.ndo_change_mtu = airo_change_mtu,
.ndo_set_mac_address = eth_mac_addr,
.ndo_validate_addr = eth_validate_addr,
};
static const struct net_device_ops mpi_netdev_ops = {
.ndo_open = airo_open,
.ndo_stop = airo_close,
.ndo_start_xmit = mpi_start_xmit,
.ndo_get_stats = airo_get_stats,
.ndo_set_multicast_list = airo_set_multicast_list,
.ndo_set_mac_address = airo_set_mac_address,
.ndo_do_ioctl = airo_ioctl,
.ndo_change_mtu = airo_change_mtu,
.ndo_set_mac_address = eth_mac_addr,
.ndo_validate_addr = eth_validate_addr,
};
static struct net_device *_init_airo_card( unsigned short irq, int port,
int is_pcmcia, struct pci_dev *pci,
struct device *dmdev )
......@@ -2776,22 +2807,16 @@ static struct net_device *_init_airo_card( unsigned short irq, int port,
goto err_out_free;
airo_networks_initialize (ai);
/* The Airo-specific entries in the device structure. */
if (test_bit(FLAG_MPI,&ai->flags)) {
skb_queue_head_init (&ai->txq);
dev->hard_start_xmit = &mpi_start_xmit;
} else
dev->hard_start_xmit = &airo_start_xmit;
dev->get_stats = &airo_get_stats;
dev->set_multicast_list = &airo_set_multicast_list;
dev->set_mac_address = &airo_set_mac_address;
dev->do_ioctl = &airo_ioctl;
/* The Airo-specific entries in the device structure. */
if (test_bit(FLAG_MPI,&ai->flags))
dev->netdev_ops = &mpi_netdev_ops;
else
dev->netdev_ops = &airo_netdev_ops;
dev->wireless_handlers = &airo_handler_def;
ai->wireless_data.spy_data = &ai->spy_data;
dev->wireless_data = &ai->wireless_data;
dev->change_mtu = &airo_change_mtu;
dev->open = &airo_open;
dev->stop = &airo_close;
dev->irq = irq;
dev->base_addr = port;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment