|
@@ -495,9 +495,19 @@ static int ax88772_bind(struct usbnet *dev, struct usb_interface *intf)
|
|
dev->rx_urb_size = 2048;
|
|
dev->rx_urb_size = 2048;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ dev->driver_priv = kzalloc(sizeof(struct asix_common_private), GFP_KERNEL);
|
|
|
|
+ if (!dev->driver_priv)
|
|
|
|
+ return -ENOMEM;
|
|
|
|
+
|
|
return 0;
|
|
return 0;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+void ax88772_unbind(struct usbnet *dev, struct usb_interface *intf)
|
|
|
|
+{
|
|
|
|
+ if (dev->driver_priv)
|
|
|
|
+ kfree(dev->driver_priv);
|
|
|
|
+}
|
|
|
|
+
|
|
static const struct ethtool_ops ax88178_ethtool_ops = {
|
|
static const struct ethtool_ops ax88178_ethtool_ops = {
|
|
.get_drvinfo = asix_get_drvinfo,
|
|
.get_drvinfo = asix_get_drvinfo,
|
|
.get_link = asix_get_link,
|
|
.get_link = asix_get_link,
|
|
@@ -829,6 +839,10 @@ static int ax88178_bind(struct usbnet *dev, struct usb_interface *intf)
|
|
dev->rx_urb_size = 2048;
|
|
dev->rx_urb_size = 2048;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ dev->driver_priv = kzalloc(sizeof(struct asix_common_private), GFP_KERNEL);
|
|
|
|
+ if (!dev->driver_priv)
|
|
|
|
+ return -ENOMEM;
|
|
|
|
+
|
|
return 0;
|
|
return 0;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -875,23 +889,25 @@ static const struct driver_info hawking_uf200_info = {
|
|
static const struct driver_info ax88772_info = {
|
|
static const struct driver_info ax88772_info = {
|
|
.description = "ASIX AX88772 USB 2.0 Ethernet",
|
|
.description = "ASIX AX88772 USB 2.0 Ethernet",
|
|
.bind = ax88772_bind,
|
|
.bind = ax88772_bind,
|
|
|
|
+ .unbind = ax88772_unbind,
|
|
.status = asix_status,
|
|
.status = asix_status,
|
|
.link_reset = ax88772_link_reset,
|
|
.link_reset = ax88772_link_reset,
|
|
.reset = ax88772_reset,
|
|
.reset = ax88772_reset,
|
|
.flags = FLAG_ETHER | FLAG_FRAMING_AX | FLAG_LINK_INTR | FLAG_MULTI_PACKET,
|
|
.flags = FLAG_ETHER | FLAG_FRAMING_AX | FLAG_LINK_INTR | FLAG_MULTI_PACKET,
|
|
- .rx_fixup = asix_rx_fixup,
|
|
|
|
|
|
+ .rx_fixup = asix_rx_fixup_common,
|
|
.tx_fixup = asix_tx_fixup,
|
|
.tx_fixup = asix_tx_fixup,
|
|
};
|
|
};
|
|
|
|
|
|
static const struct driver_info ax88772b_info = {
|
|
static const struct driver_info ax88772b_info = {
|
|
.description = "ASIX AX88772B USB 2.0 Ethernet",
|
|
.description = "ASIX AX88772B USB 2.0 Ethernet",
|
|
.bind = ax88772_bind,
|
|
.bind = ax88772_bind,
|
|
|
|
+ .unbind = ax88772_unbind,
|
|
.status = asix_status,
|
|
.status = asix_status,
|
|
.link_reset = ax88772_link_reset,
|
|
.link_reset = ax88772_link_reset,
|
|
.reset = ax88772_reset,
|
|
.reset = ax88772_reset,
|
|
.flags = FLAG_ETHER | FLAG_FRAMING_AX | FLAG_LINK_INTR |
|
|
.flags = FLAG_ETHER | FLAG_FRAMING_AX | FLAG_LINK_INTR |
|
|
FLAG_MULTI_PACKET,
|
|
FLAG_MULTI_PACKET,
|
|
- .rx_fixup = asix_rx_fixup,
|
|
|
|
|
|
+ .rx_fixup = asix_rx_fixup_common,
|
|
.tx_fixup = asix_tx_fixup,
|
|
.tx_fixup = asix_tx_fixup,
|
|
.data = FLAG_EEPROM_MAC,
|
|
.data = FLAG_EEPROM_MAC,
|
|
};
|
|
};
|
|
@@ -899,11 +915,12 @@ static const struct driver_info ax88772b_info = {
|
|
static const struct driver_info ax88178_info = {
|
|
static const struct driver_info ax88178_info = {
|
|
.description = "ASIX AX88178 USB 2.0 Ethernet",
|
|
.description = "ASIX AX88178 USB 2.0 Ethernet",
|
|
.bind = ax88178_bind,
|
|
.bind = ax88178_bind,
|
|
|
|
+ .unbind = ax88772_unbind,
|
|
.status = asix_status,
|
|
.status = asix_status,
|
|
.link_reset = ax88178_link_reset,
|
|
.link_reset = ax88178_link_reset,
|
|
.reset = ax88178_reset,
|
|
.reset = ax88178_reset,
|
|
.flags = FLAG_ETHER | FLAG_FRAMING_AX | FLAG_LINK_INTR,
|
|
.flags = FLAG_ETHER | FLAG_FRAMING_AX | FLAG_LINK_INTR,
|
|
- .rx_fixup = asix_rx_fixup,
|
|
|
|
|
|
+ .rx_fixup = asix_rx_fixup_common,
|
|
.tx_fixup = asix_tx_fixup,
|
|
.tx_fixup = asix_tx_fixup,
|
|
};
|
|
};
|
|
|
|
|