aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/gadget/f_phonet.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/gadget/f_phonet.c')
-rw-r--r--drivers/usb/gadget/f_phonet.c12
1 files changed, 8 insertions, 4 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/*-------------------------------------------------------------------------*/