I think people might be reading differences into 'if' and 'depends on'
that aren't there, like maybe 'if' being needed to "hide" a symbol,
while 'depends on' just adds a dependency.
There are no differences between 'if' and 'depends on'. 'if' is just a
shorthand for 'depends on'. They work the same when it comes to creating
implicit menus too.
The way symbols get "hidden" is through their dependencies not being
satisfied ('if'/'depends on' get copied up as a dependency on the
prompt).
Since 'if' and 'depends on' are the same, an 'if' with just a single
symbol in it can be replaced with a 'depends on'. IMO, it's best to
avoid 'if' there as a style choice too, because it confuses people into
thinking there's deep Kconfig magic going on that requires 'if'.
Going for 'depends on' can also remove some nested 'if's, which
generates nicer symbol information and docs, because nested 'if's really
are so simple/dumb that they just add the dependencies from both 'if's
to all symbols within.
Replace a bunch of single-symbol 'if's with 'depends on' to despam the
Kconfig files a bit and make it clearer how things work. Also do some
other minor related dependency refactoring.
The replacement isn't complete. Will fix up the rest later. Splitting it
a bit to make it more manageable.
(Everything above is true for choices, menus, and comments as well.)
Detected by tweaking the Kconfiglib parsing code. It's impossible to
detect after parsing, because 'if' turns into 'depends on'.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
91 lines
2.0 KiB
Plaintext
91 lines
2.0 KiB
Plaintext
# netusb configuration options
|
|
|
|
# Copyright (c) 2017 Intel Corp.
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
menu "USB Device Networking support"
|
|
|
|
config USB_DEVICE_NETWORK
|
|
bool
|
|
select NET_L2_ETHERNET
|
|
|
|
config USB_DEVICE_NETWORK_ECM
|
|
bool "USB Ethernet Control Model (ECM) Networking device"
|
|
select USB_DEVICE_NETWORK
|
|
help
|
|
Ethernet Control Model (ECM) is a part of Communications Device
|
|
Class (CDC) USB protocol specified by USB-IF.
|
|
|
|
config USB_DEVICE_NETWORK_EEM
|
|
bool "USB Ethernet Emulation Model (EEM) Networking device"
|
|
select USB_DEVICE_NETWORK
|
|
help
|
|
Ethernet Emulation Model (EEM) is part of Communications Device
|
|
Class (CDC) USB protocol and can be used to encapsulate Ethernet
|
|
frames for transport over USB.
|
|
|
|
config USB_DEVICE_NETWORK_RNDIS
|
|
bool "USB Remote NDIS (RNDIS) Networking device"
|
|
select USB_DEVICE_NETWORK
|
|
select USB_COMPOSITE_DEVICE
|
|
help
|
|
Remote NDIS (RNDIS) is commonly used Microsoft vendor protocol with
|
|
Specification available from Microsoft web site.
|
|
|
|
if USB_DEVICE_NETWORK_ECM
|
|
|
|
config CDC_ECM_INTERRUPT_EP_MPS
|
|
int
|
|
default 16
|
|
help
|
|
CDC ECM class interrupt endpoint size
|
|
|
|
config CDC_ECM_BULK_EP_MPS
|
|
int
|
|
default 64
|
|
help
|
|
CDC ECM class bulk endpoint size
|
|
|
|
config USB_DEVICE_NETWORK_ECM_MAC
|
|
string
|
|
default "00005E005301"
|
|
help
|
|
MAC Host OS Address string.
|
|
MAC Address which would be assigned to network device, created in
|
|
the Host's Operating System. Use RFC 7042 Documentation values as
|
|
default MAC.
|
|
|
|
endif # USB_DEVICE_NETWORK_ECM
|
|
|
|
config CDC_EEM_BULK_EP_MPS
|
|
int
|
|
default 64
|
|
depends on USB_DEVICE_NETWORK_EEM
|
|
|
|
if USB_DEVICE_NETWORK_RNDIS
|
|
|
|
config RNDIS_INTERRUPT_EP_MPS
|
|
int
|
|
default 16
|
|
help
|
|
RNDIS interrupt endpoint size
|
|
|
|
config RNDIS_BULK_EP_MPS
|
|
int
|
|
default 64
|
|
help
|
|
RNDIS bulk endpoint size
|
|
|
|
endif # USB_DEVICE_NETWORK_RNDIS
|
|
|
|
if USB_DEVICE_NETWORK
|
|
|
|
module = USB_DEVICE_NETWORK
|
|
module-dep = LOG
|
|
module-str = USB Device Network log level
|
|
source "subsys/net/Kconfig.template.log_config.net"
|
|
|
|
endif # USB_DEVICE_NETWORK
|
|
|
|
endmenu # USB Device Networking support
|