net: cdc_ncm: remove redundant netdev field
Too many pointers back and forth are likely to confuse developers, creating subtle bugs whenever we forget to syncronize them all. As a usbnet driver, we should stick with the standard struct usbnet fields as much as possible. The netdevice is one such field. Cc: Greg Suarez <gsuarez@smithmicro.com> Cc: Alexey Orishko <alexey.orishko@gmail.com> Signed-off-by: Bjørn Mork <bjorn@mork.no> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
ff1632aa85
commit
bed6f76212
@@ -98,7 +98,6 @@ struct cdc_ncm_ctx {
|
||||
const struct usb_cdc_union_desc *union_desc;
|
||||
const struct usb_cdc_ether_desc *ether_desc;
|
||||
|
||||
struct net_device *netdev;
|
||||
struct usb_device *udev;
|
||||
struct usb_interface *control;
|
||||
struct usb_interface *data;
|
||||
@@ -129,7 +128,7 @@ struct cdc_ncm_ctx {
|
||||
extern u8 cdc_ncm_select_altsetting(struct usbnet *dev, struct usb_interface *intf);
|
||||
extern int cdc_ncm_bind_common(struct usbnet *dev, struct usb_interface *intf, u8 data_altsetting);
|
||||
extern void cdc_ncm_unbind(struct usbnet *dev, struct usb_interface *intf);
|
||||
extern struct sk_buff *cdc_ncm_fill_tx_frame(struct cdc_ncm_ctx *ctx, struct sk_buff *skb, __le32 sign);
|
||||
extern struct sk_buff *cdc_ncm_fill_tx_frame(struct usbnet *dev, struct sk_buff *skb, __le32 sign);
|
||||
extern int cdc_ncm_rx_verify_nth16(struct cdc_ncm_ctx *ctx, struct sk_buff *skb_in);
|
||||
extern int cdc_ncm_rx_verify_ndp16(struct sk_buff *skb_in, int ndpoffset);
|
||||
|
||||
|
Reference in New Issue
Block a user