aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/usb
diff options
context:
space:
mode:
authorBjørn Mork <bjorn@mork.no>2012-09-02 19:20:33 -0400
committerDavid S. Miller <davem@davemloft.net>2012-09-03 13:51:02 -0400
commit5aee07281b2aa9a1f740a8ccac4781e787fc1192 (patch)
tree2e3923a3b99c424e5d9b595e3f8dee0c994e2462 /drivers/net/usb
parent9625e5fa345f079c92ce34dd564196e7dc45461b (diff)
net: sierra_net: rx_urb_size is constant
The rx_urb_size is set to the same value for every device supported by this driver. No need to keep a per-device data structure to do that. Replacing with a macro constant. This was the last device specific info, and removing it allows us to delete the sierra_net_info_data struct. Signed-off-by: Bjørn Mork <bjorn@mork.no> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/usb')
-rw-r--r--drivers/net/usb/sierra_net.c17
1 files changed, 4 insertions, 13 deletions
diff --git a/drivers/net/usb/sierra_net.c b/drivers/net/usb/sierra_net.c
index 596ddaaa370..7ae70e9489d 100644
--- a/drivers/net/usb/sierra_net.c
+++ b/drivers/net/usb/sierra_net.c
@@ -68,9 +68,8 @@ static atomic_t iface_counter = ATOMIC_INIT(0);
68 */ 68 */
69#define SIERRA_NET_USBCTL_BUF_LEN 1024 69#define SIERRA_NET_USBCTL_BUF_LEN 1024
70 70
71struct sierra_net_info_data { 71/* Overriding the default usbnet rx_urb_size */
72 u16 rx_urb_size; 72#define SIERRA_NET_RX_URB_SIZE (8 * 1024)
73};
74 73
75/* Private data structure */ 74/* Private data structure */
76struct sierra_net_data { 75struct sierra_net_data {
@@ -678,9 +677,6 @@ static int sierra_net_bind(struct usbnet *dev, struct usb_interface *intf)
678 static const u8 shdwn_tmplate[sizeof(priv->shdwn_msg)] = { 677 static const u8 shdwn_tmplate[sizeof(priv->shdwn_msg)] = {
679 0x00, 0x00, SIERRA_NET_HIP_SHUTD_ID, 0x00}; 678 0x00, 0x00, SIERRA_NET_HIP_SHUTD_ID, 0x00};
680 679
681 struct sierra_net_info_data *data =
682 (struct sierra_net_info_data *)dev->driver_info->data;
683
684 dev_dbg(&dev->udev->dev, "%s", __func__); 680 dev_dbg(&dev->udev->dev, "%s", __func__);
685 681
686 ifacenum = intf->cur_altsetting->desc.bInterfaceNumber; 682 ifacenum = intf->cur_altsetting->desc.bInterfaceNumber;
@@ -725,9 +721,9 @@ static int sierra_net_bind(struct usbnet *dev, struct usb_interface *intf)
725 sierra_net_set_ctx_index(priv, 0); 721 sierra_net_set_ctx_index(priv, 0);
726 722
727 /* decrease the rx_urb_size and max_tx_size to 4k on USB 1.1 */ 723 /* decrease the rx_urb_size and max_tx_size to 4k on USB 1.1 */
728 dev->rx_urb_size = data->rx_urb_size; 724 dev->rx_urb_size = SIERRA_NET_RX_URB_SIZE;
729 if (dev->udev->speed != USB_SPEED_HIGH) 725 if (dev->udev->speed != USB_SPEED_HIGH)
730 dev->rx_urb_size = min_t(size_t, 4096, data->rx_urb_size); 726 dev->rx_urb_size = min_t(size_t, 4096, SIERRA_NET_RX_URB_SIZE);
731 727
732 dev->net->hard_header_len += SIERRA_NET_HIP_EXT_HDR_LEN; 728 dev->net->hard_header_len += SIERRA_NET_HIP_EXT_HDR_LEN;
733 dev->hard_mtu = dev->net->mtu + dev->net->hard_header_len; 729 dev->hard_mtu = dev->net->mtu + dev->net->hard_header_len;
@@ -918,10 +914,6 @@ static struct sk_buff *sierra_net_tx_fixup(struct usbnet *dev,
918 return NULL; 914 return NULL;
919} 915}
920 916
921static const struct sierra_net_info_data sierra_net_info_data_direct_ip = {
922 .rx_urb_size = 8 * 1024,
923};
924
925static const struct driver_info sierra_net_info_direct_ip = { 917static const struct driver_info sierra_net_info_direct_ip = {
926 .description = "Sierra Wireless USB-to-WWAN Modem", 918 .description = "Sierra Wireless USB-to-WWAN Modem",
927 .flags = FLAG_WWAN | FLAG_SEND_ZLP, 919 .flags = FLAG_WWAN | FLAG_SEND_ZLP,
@@ -930,7 +922,6 @@ static const struct driver_info sierra_net_info_direct_ip = {
930 .status = sierra_net_status, 922 .status = sierra_net_status,
931 .rx_fixup = sierra_net_rx_fixup, 923 .rx_fixup = sierra_net_rx_fixup,
932 .tx_fixup = sierra_net_tx_fixup, 924 .tx_fixup = sierra_net_tx_fixup,
933 .data = (unsigned long)&sierra_net_info_data_direct_ip,
934}; 925};
935 926
936#define DIRECT_IP_DEVICE(vend, prod) \ 927#define DIRECT_IP_DEVICE(vend, prod) \