diff options
author | Stephen Hemminger <shemminger@linux-foundation.org> | 2009-01-09 08:01:30 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-01-21 17:02:34 -0500 |
commit | 9772a252b5b2ffbcf163cc07a443a444bf500040 (patch) | |
tree | f53f7684ff9e8d5cc2ee8d9d3f43b8d09757e724 /drivers | |
parent | cd94f08658e15972d6ca8b53501efa48841f1b5b (diff) |
baycom: convert to net_device_ops
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Acked-by: Thomas Sailer <t.sailer@alumni.ethz.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/hamradio/baycom_epp.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/drivers/net/hamradio/baycom_epp.c b/drivers/net/hamradio/baycom_epp.c index c6e4ec3ade69..bb78c11559cd 100644 --- a/drivers/net/hamradio/baycom_epp.c +++ b/drivers/net/hamradio/baycom_epp.c | |||
@@ -1102,6 +1102,14 @@ static int baycom_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) | |||
1102 | 1102 | ||
1103 | /* --------------------------------------------------------------------- */ | 1103 | /* --------------------------------------------------------------------- */ |
1104 | 1104 | ||
1105 | static const struct net_device_ops baycom_netdev_ops = { | ||
1106 | .ndo_open = epp_open, | ||
1107 | .ndo_stop = epp_close, | ||
1108 | .ndo_do_ioctl = baycom_ioctl, | ||
1109 | .ndo_start_xmit = baycom_send_packet, | ||
1110 | .ndo_set_mac_address = baycom_set_mac_address, | ||
1111 | }; | ||
1112 | |||
1105 | /* | 1113 | /* |
1106 | * Check for a network adaptor of this type, and return '0' if one exists. | 1114 | * Check for a network adaptor of this type, and return '0' if one exists. |
1107 | * If dev->base_addr == 0, probe all likely locations. | 1115 | * If dev->base_addr == 0, probe all likely locations. |
@@ -1129,16 +1137,12 @@ static void baycom_probe(struct net_device *dev) | |||
1129 | /* | 1137 | /* |
1130 | * initialize the device struct | 1138 | * initialize the device struct |
1131 | */ | 1139 | */ |
1132 | dev->open = epp_open; | ||
1133 | dev->stop = epp_close; | ||
1134 | dev->do_ioctl = baycom_ioctl; | ||
1135 | dev->hard_start_xmit = baycom_send_packet; | ||
1136 | 1140 | ||
1137 | /* Fill in the fields of the device structure */ | 1141 | /* Fill in the fields of the device structure */ |
1138 | bc->skb = NULL; | 1142 | bc->skb = NULL; |
1139 | 1143 | ||
1144 | dev->netdev_ops = &baycom_netdev_ops; | ||
1140 | dev->header_ops = &ax25_header_ops; | 1145 | dev->header_ops = &ax25_header_ops; |
1141 | dev->set_mac_address = baycom_set_mac_address; | ||
1142 | 1146 | ||
1143 | dev->type = ARPHRD_AX25; /* AF_AX25 device */ | 1147 | dev->type = ARPHRD_AX25; /* AF_AX25 device */ |
1144 | dev->hard_header_len = AX25_MAX_HEADER_LEN + AX25_BPQ_HEADER_LEN; | 1148 | dev->hard_header_len = AX25_MAX_HEADER_LEN + AX25_BPQ_HEADER_LEN; |