Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[NET]: Let USB_USBNET always select MII.

All this USB_USBNET_MII trickery is simply not worth it considering how
few code it saves.

As a side effect, this also fixes the following compile error reported
by Toralf F�rster:

<-- snip -->

...
LD .tmp_vmlinux1
drivers/built-in.o: In function `usbnet_set_settings':
(.text+0xf1876): undefined reference to `mii_ethtool_sset'
drivers/built-in.o: In function `usbnet_get_settings':
(.text+0xf1836): undefined reference to `mii_ethtool_gset'
drivers/built-in.o: In function `usbnet_get_link':
(.text+0xf18d6): undefined reference to `mii_link_ok'
drivers/built-in.o: In function `usbnet_nway_reset':
(.text+0xf18f6): undefined reference to `mii_nway_restart'
make: *** [.tmp_vmlinux1] Error 1

<-- snip -->

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Adrian Bunk and committed by
David S. Miller
4aa92cd9 df1e6e54

+1 -15
+1 -8
drivers/net/usb/Kconfig
··· 93 93 To compile this driver as a module, choose M here: the 94 94 module will be called rtl8150. 95 95 96 - config USB_USBNET_MII 97 - tristate 98 - default n 99 - 100 96 config USB_USBNET 101 97 tristate "Multi-purpose USB Networking Framework" 102 - select MII if USB_USBNET_MII != n 98 + select MII 103 99 ---help--- 104 100 This driver supports several kinds of network links over USB, 105 101 with "minidrivers" built around a common network driver core ··· 131 135 tristate "ASIX AX88xxx Based USB 2.0 Ethernet Adapters" 132 136 depends on USB_USBNET && NET_ETHERNET 133 137 select CRC32 134 - select USB_USBNET_MII 135 138 default y 136 139 help 137 140 This option adds support for ASIX AX88xxx based USB 2.0 ··· 185 190 tristate "Davicom DM9601 based USB 1.1 10/100 ethernet devices" 186 191 depends on USB_USBNET 187 192 select CRC32 188 - select USB_USBNET_MII 189 193 help 190 194 This option adds support for Davicom DM9601 based USB 1.1 191 195 10/100 Ethernet adapters. ··· 219 225 config USB_NET_MCS7830 220 226 tristate "MosChip MCS7830 based Ethernet adapters" 221 227 depends on USB_USBNET 222 - select USB_USBNET_MII 223 228 help 224 229 Choose this option if you're using a 10/100 Ethernet USB2 225 230 adapter based on the MosChip 7830 controller. This includes
-7
drivers/net/usb/usbnet.c
··· 683 683 * they'll probably want to use this base set. 684 684 */ 685 685 686 - #if defined(CONFIG_MII) || defined(CONFIG_MII_MODULE) 687 - #define HAVE_MII 688 - 689 686 int usbnet_get_settings (struct net_device *net, struct ethtool_cmd *cmd) 690 687 { 691 688 struct usbnet *dev = netdev_priv(net); ··· 741 744 } 742 745 EXPORT_SYMBOL_GPL(usbnet_nway_reset); 743 746 744 - #endif /* HAVE_MII */ 745 - 746 747 void usbnet_get_drvinfo (struct net_device *net, struct ethtool_drvinfo *info) 747 748 { 748 749 struct usbnet *dev = netdev_priv(net); ··· 771 776 772 777 /* drivers may override default ethtool_ops in their bind() routine */ 773 778 static struct ethtool_ops usbnet_ethtool_ops = { 774 - #ifdef HAVE_MII 775 779 .get_settings = usbnet_get_settings, 776 780 .set_settings = usbnet_set_settings, 777 781 .get_link = usbnet_get_link, 778 782 .nway_reset = usbnet_nway_reset, 779 - #endif 780 783 .get_drvinfo = usbnet_get_drvinfo, 781 784 .get_msglevel = usbnet_get_msglevel, 782 785 .set_msglevel = usbnet_set_msglevel,