aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephen Hemminger <shemminger@vyatta.com>2009-01-07 20:24:34 -0500
committerDavid S. Miller <davem@davemloft.net>2009-01-07 20:24:34 -0500
commitab638e69ff7d4882ac152ada17eab340c93df080 (patch)
tree997dec6e9092c61d4e61de286c21cc77b0480c14
parentb4d7f0a46bc0e30514b1779caff0fce6e424c4b5 (diff)
phonet: update to net_device_ops
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/usb/gadget/f_phonet.c12
-rw-r--r--net/phonet/pep-gprs.c12
2 files changed, 16 insertions, 8 deletions
diff --git a/drivers/usb/gadget/f_phonet.c b/drivers/usb/gadget/f_phonet.c
index d8fc9b32fe36..c0916c7b217e 100644
--- a/drivers/usb/gadget/f_phonet.c
+++ b/drivers/usb/gadget/f_phonet.c
@@ -279,6 +279,13 @@ static int pn_net_mtu(struct net_device *dev, int new_mtu)
279 return err; 279 return err;
280} 280}
281 281
282static const struct net_device_ops pn_netdev_ops = {
283 .ndo_open = pn_net_open,
284 .ndo_stop = pn_net_close,
285 .ndo_start_xmit = pn_net_xmit,
286 .ndo_change_mtu = pn_net_mtu,
287};
288
282static void pn_net_setup(struct net_device *dev) 289static void pn_net_setup(struct net_device *dev)
283{ 290{
284 dev->features = 0; 291 dev->features = 0;
@@ -290,12 +297,9 @@ static void pn_net_setup(struct net_device *dev)
290 dev->addr_len = 1; 297 dev->addr_len = 1;
291 dev->tx_queue_len = 1; 298 dev->tx_queue_len = 1;
292 299
300 dev->netdev_ops = &pn_netdev_ops;
293 dev->destructor = free_netdev; 301 dev->destructor = free_netdev;
294 dev->header_ops = &phonet_header_ops; 302 dev->header_ops = &phonet_header_ops;
295 dev->open = pn_net_open;
296 dev->stop = pn_net_close;
297 dev->hard_start_xmit = pn_net_xmit; /* mandatory */
298 dev->change_mtu = pn_net_mtu;
299} 303}
300 304
301/*-------------------------------------------------------------------------*/ 305/*-------------------------------------------------------------------------*/
diff --git a/net/phonet/pep-gprs.c b/net/phonet/pep-gprs.c
index b0ceac2d6cd1..6a91a32a80c1 100644
--- a/net/phonet/pep-gprs.c
+++ b/net/phonet/pep-gprs.c
@@ -227,6 +227,13 @@ static int gprs_set_mtu(struct net_device *dev, int new_mtu)
227 return 0; 227 return 0;
228} 228}
229 229
230static const struct net_device_ops gprs_netdev_ops = {
231 .ndo_open = gprs_open,
232 .ndo_stop = gprs_close,
233 .ndo_start_xmit = gprs_xmit,
234 .ndo_change_mtu = gprs_set_mtu,
235};
236
230static void gprs_setup(struct net_device *dev) 237static void gprs_setup(struct net_device *dev)
231{ 238{
232 dev->features = NETIF_F_FRAGLIST; 239 dev->features = NETIF_F_FRAGLIST;
@@ -237,11 +244,8 @@ static void gprs_setup(struct net_device *dev)
237 dev->addr_len = 0; 244 dev->addr_len = 0;
238 dev->tx_queue_len = 10; 245 dev->tx_queue_len = 10;
239 246
247 dev->netdev_ops = &gprs_netdev_ops;
240 dev->destructor = free_netdev; 248 dev->destructor = free_netdev;
241 dev->open = gprs_open;
242 dev->stop = gprs_close;
243 dev->hard_start_xmit = gprs_xmit; /* mandatory */
244 dev->change_mtu = gprs_set_mtu;
245} 249}
246 250
247/* 251/*