introduce flag FLAG_NOARP for usb net devices which cannot do ARP
Subsystems (6)
PATCH 2/2 CDC_NCM adding support FLAG_NOARP for Infineon modem platform
In reply to a message not in the archiveInfineon(now Intel) HSPA Modem platform NCM cannot support ARP. we can define a new common structure wwan_noarp_info. Then more similiar NO ARP devices can be handled easily
Signed-off-by Wei Shuai <[email protected]>
--- drivers/net/usb/cdc_ncm.c | 21 +++++++++++++++++++++ 1 files changed, 21 insertions(+), 0 deletions(-)
drivers/net/usb/cdc_ncm.c +21 -0
@@ -1155,6 +1155,20 @@ static const struct driver_info wwan_info = { .tx_fixup = cdc_ncm_tx_fixup, }; +/* Same as wwan_info, but with IFF_NOARP */ +static const struct driver_info wwan_noarp_info = { + .description ="Mobile Broadband Network Device (NO ARP)" , + .flags =FLAG_POINTTOPOINT |FLAG_NO_SETINT |FLAG_MULTI_PACKET + |FLAG_WWAN |FLAG_NOARP , + .bind = cdc_ncm_bind, + .unbind = cdc_ncm_unbind, + .check_connect = cdc_ncm_check_connect, + .manage_power = usbnet_manage_power, + .status = cdc_ncm_status, + .rx_fixup = cdc_ncm_rx_fixup, + .tx_fixup = cdc_ncm_tx_fixup, +}; +static const struct usb_device_id cdc_devs[] = {/* Ericsson MBM devices like F5521gw */ { .match_flags =USB_DEVICE_ID_MATCH_INT_INFO
@@ -1194,6 +1208,13 @@ static const struct usb_device_id cdc_devs[] = { .driver_info = (unsigned long)&wwan_info, }, +/* Infineon(now Intel) HSPA Modem platform */ + {USB_DEVICE_AND_INTERFACE_INFO (0x1519 ,0x0443 , +USB_CLASS_COMM , + USB_CDC_SUBCLASS_NCM, USB_CDC_PROTO_NONE), + .driver_info = (unsigned long )&wwan_noarp_info, + }, + /* Generic CDC-NCM devices */ { USB_INTERFACE_INFO(USB_CLASS_COMM, USB_CDC_SUBCLASS_NCM, USB_CDC_PROTO_NONE),
Signature · 6 lines
1.7.6.5 -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
PATCH 1/2 introduce flag FLAG_NOARP for usb net devices which cannot do ARP
we do have some USB net devices, which cannot do ARP. so we can introduce a new flag FLAG_NOARP, then client drivers can easily handle these kind of devices
Signed-off-by Wei Shuai <[email protected]>
--- drivers/net/usb/usbnet.c | 4 ++++ include/linux/usb/usbnet.h | 1 + 2 files changed, 5 insertions(+), 0 deletions(-)
drivers/net/usb/usbnet.c +4 -0
@@ -1448,6 +1448,10 @@ usbnet_probe (struct usb_interface *udev, const struct usb_device_id *prod)if ((dev->driver_info->flags &FLAG_WWAN ) !=0 )strcpy (net->name,"wwan%d" ); +/* devices that cannot do ARP */ +if ((dev->driver_info->flags &FLAG_NOARP ) !=0 ) + net->flags |=IFF_NOARP ; +/* maybe the remote can't receive an Ethernet MTU */ if (net->mtu > (dev->hard_mtu - net->hard_header_len)) net->mtu = dev->hard_mtu - net->hard_header_len;
include/linux/usb/usbnet.h +1 -0
@@ -100,6 +100,7 @@ struct driver_info {#define FLAG_LINK_INTR 0x0800/* updates link (carrier) status */ #define FLAG_POINTTOPOINT 0x1000/* possibly use "usb%d" names */ +#define FLAG_NOARP 0x2000/* device can't do ARP */ /* * Indicates to usbnet, that USB driver accumulates multiple IP packets.
Signature · 1 line
1.7.6.5
PATCH 1/2 introduce flag FLAG_NOARP for usb net devices which cannot do ARP
Signed-off-by Wei Shuai <[email protected]>
--- drivers/net/usb/usbnet.c | 4 ++++ include/linux/usb/usbnet.h | 1 + 2 files changed, 5 insertions(+), 0 deletions(-)
drivers/net/usb/usbnet.c +4 -0
@@ -1448,6 +1448,10 @@ usbnet_probe (struct usb_interface *udev, const struct usb_device_id *prod)if ((dev->driver_info->flags &FLAG_WWAN ) !=0 )strcpy (net->name,"wwan%d" ); +/* devices that cannot do ARP */ +if ((dev->driver_info->flags &FLAG_NOARP ) !=0 ) + net->flags |=IFF_NOARP ; +/* maybe the remote can't receive an Ethernet MTU */ if (net->mtu > (dev->hard_mtu - net->hard_header_len)) net->mtu = dev->hard_mtu - net->hard_header_len;
include/linux/usb/usbnet.h +1 -0
@@ -100,6 +100,7 @@ struct driver_info {#define FLAG_LINK_INTR 0x0800/* updates link (carrier) status */ #define FLAG_POINTTOPOINT 0x1000/* possibly use "usb%d" names */ +#define FLAG_NOARP 0x2000/* device can't do ARP */ /* * Indicates to usbnet, that USB driver accumulates multiple IP packets.
Signature · 1 line
1.7.6.5