net/ethernet: All types are prefixed with ethernet_
Aligning eth_hw_caps to the right prefix, so ethernet_hw_caps. Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
This commit is contained in:
parent
e9d77b60de
commit
4bf1a9bd60
12 changed files with 38 additions and 35 deletions
|
@ -329,11 +329,11 @@ static void eth_initialize(struct net_if *iface)
|
|||
}
|
||||
}
|
||||
|
||||
static enum eth_hw_caps eth_dw_get_capabilities(struct device *dev)
|
||||
static enum ethernet_hw_caps eth_dw_get_capabilities(struct device *dev)
|
||||
{
|
||||
ARG_UNUSED(dev);
|
||||
|
||||
return ETH_LINK_10BASE_T | ETH_LINK_100BASE_T;
|
||||
return ETHERNET_LINK_10BASE_T | ETHERNET_LINK_100BASE_T;
|
||||
}
|
||||
|
||||
static const struct ethernet_api api_funcs = {
|
||||
|
|
|
@ -764,11 +764,11 @@ static int eth_net_tx(struct net_if *iface, struct net_pkt *pkt)
|
|||
return ret;
|
||||
}
|
||||
|
||||
static enum eth_hw_caps eth_enc28j60_get_capabilities(struct device *dev)
|
||||
static enum ethernet_hw_caps eth_enc28j60_get_capabilities(struct device *dev)
|
||||
{
|
||||
ARG_UNUSED(dev);
|
||||
|
||||
return ETH_LINK_10BASE_T;
|
||||
return ETHERNET_LINK_10BASE_T;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_ETH_ENC28J60_0
|
||||
|
|
|
@ -664,11 +664,12 @@ static void eth_iface_init(struct net_if *iface)
|
|||
ethernet_init(iface);
|
||||
}
|
||||
|
||||
static enum eth_hw_caps eth_mcux_get_capabilities(struct device *dev)
|
||||
static enum ethernet_hw_caps eth_mcux_get_capabilities(struct device *dev)
|
||||
{
|
||||
ARG_UNUSED(dev);
|
||||
|
||||
return ETH_HW_VLAN | ETH_LINK_10BASE_T | ETH_LINK_100BASE_T;
|
||||
return ETHERNET_HW_VLAN | ETHERNET_LINK_10BASE_T |
|
||||
ETHERNET_LINK_100BASE_T;
|
||||
}
|
||||
|
||||
static const struct ethernet_api api_funcs = {
|
||||
|
|
|
@ -269,11 +269,12 @@ static void eth_iface_init(struct net_if *iface)
|
|||
}
|
||||
}
|
||||
|
||||
static enum eth_hw_caps eth_posix_native_get_capabilities(struct device *dev)
|
||||
static
|
||||
enum ethernet_hw_caps eth_posix_native_get_capabilities(struct device *dev)
|
||||
{
|
||||
ARG_UNUSED(dev);
|
||||
|
||||
return ETH_HW_VLAN;
|
||||
return ETHERNET_HW_VLAN;
|
||||
}
|
||||
|
||||
static const struct ethernet_api eth_if_api = {
|
||||
|
|
|
@ -899,11 +899,12 @@ static void eth0_iface_init(struct net_if *iface)
|
|||
init_done = true;
|
||||
}
|
||||
|
||||
static enum eth_hw_caps eth_sam_gmac_get_capabilities(struct device *dev)
|
||||
static enum ethernet_hw_caps eth_sam_gmac_get_capabilities(struct device *dev)
|
||||
{
|
||||
ARG_UNUSED(dev);
|
||||
|
||||
return ETH_HW_VLAN | ETH_LINK_10BASE_T | ETH_LINK_100BASE_T;
|
||||
return ETHERNET_HW_VLAN | ETHERNET_LINK_10BASE_T |
|
||||
ETHERNET_LINK_100BASE_T;
|
||||
}
|
||||
|
||||
static const struct ethernet_api eth_api = {
|
||||
|
|
|
@ -369,11 +369,11 @@ static void eth_iface_init(struct net_if *iface)
|
|||
NET_LINK_ETHERNET);
|
||||
}
|
||||
|
||||
static enum eth_hw_caps eth_stm32_hal_get_capabilities(struct device *dev)
|
||||
static enum ethernet_hw_caps eth_stm32_hal_get_capabilities(struct device *dev)
|
||||
{
|
||||
ARG_UNUSED(dev);
|
||||
|
||||
return ETH_LINK_10BASE_T | ETH_LINK_100BASE_T;
|
||||
return ETHERNET_LINK_10BASE_T | ETHERNET_LINK_100BASE_T;
|
||||
}
|
||||
|
||||
static const struct ethernet_api eth_api = {
|
||||
|
|
|
@ -508,11 +508,11 @@ use_random_mac:
|
|||
|
||||
static struct slip_context slip_context_data;
|
||||
|
||||
static enum eth_hw_caps eth_capabilities(struct device *dev)
|
||||
static enum ethernet_hw_caps eth_capabilities(struct device *dev)
|
||||
{
|
||||
ARG_UNUSED(dev);
|
||||
|
||||
return ETH_HW_VLAN;
|
||||
return ETHERNET_HW_VLAN;
|
||||
}
|
||||
|
||||
#if defined(CONFIG_SLIP_TAP) && defined(CONFIG_NET_L2_ETHERNET)
|
||||
|
|
|
@ -43,30 +43,30 @@ extern "C" {
|
|||
|
||||
#define NET_ETH_MINIMAL_FRAME_SIZE 60
|
||||
|
||||
enum eth_hw_caps {
|
||||
enum ethernet_hw_caps {
|
||||
/** TX Checksum offloading supported */
|
||||
ETH_HW_TX_CHKSUM_OFFLOAD = BIT(0),
|
||||
ETHERNET_HW_TX_CHKSUM_OFFLOAD = BIT(0),
|
||||
|
||||
/** RX Checksum offloading supported */
|
||||
ETH_HW_RX_CHKSUM_OFFLOAD = BIT(1),
|
||||
ETHERNET_HW_RX_CHKSUM_OFFLOAD = BIT(1),
|
||||
|
||||
/** VLAN supported */
|
||||
ETH_HW_VLAN = BIT(2),
|
||||
ETHERNET_HW_VLAN = BIT(2),
|
||||
|
||||
/** Enabling/disabling auto negotiation supported */
|
||||
ETH_AUTO_NEGOTIATION_SET = BIT(3),
|
||||
ETHERNET_AUTO_NEGOTIATION_SET = BIT(3),
|
||||
|
||||
/** 10 Mbits link supported */
|
||||
ETH_LINK_10BASE_T = BIT(4),
|
||||
ETHERNET_LINK_10BASE_T = BIT(4),
|
||||
|
||||
/** 100 Mbits link supported */
|
||||
ETH_LINK_100BASE_T = BIT(5),
|
||||
ETHERNET_LINK_100BASE_T = BIT(5),
|
||||
|
||||
/** 1 Gbits link supported */
|
||||
ETH_LINK_1000BASE_T = BIT(6),
|
||||
ETHERNET_LINK_1000BASE_T = BIT(6),
|
||||
|
||||
/** Changing duplex (half/full) supported */
|
||||
ETH_DUPLEX_SET = BIT(7),
|
||||
ETHERNET_DUPLEX_SET = BIT(7),
|
||||
};
|
||||
|
||||
struct ethernet_api {
|
||||
|
@ -77,7 +77,7 @@ struct ethernet_api {
|
|||
struct net_if_api iface_api;
|
||||
|
||||
/** Get the device capabilities */
|
||||
enum eth_hw_caps (*get_capabilities)(struct device *dev);
|
||||
enum ethernet_hw_caps (*get_capabilities)(struct device *dev);
|
||||
|
||||
#if defined(CONFIG_NET_VLAN)
|
||||
/** The IP stack will call this function when a VLAN tag is enabled
|
||||
|
@ -217,7 +217,7 @@ void net_eth_ipv6_mcast_to_mac_addr(const struct in6_addr *ipv6_addr,
|
|||
* @return Hardware capabilities
|
||||
*/
|
||||
static inline
|
||||
enum eth_hw_caps net_eth_get_hw_capabilities(struct net_if *iface)
|
||||
enum ethernet_hw_caps net_eth_get_hw_capabilities(struct net_if *iface)
|
||||
{
|
||||
const struct ethernet_api *eth =
|
||||
net_if_get_device(iface)->driver_api;
|
||||
|
|
|
@ -763,7 +763,7 @@ void ethernet_init(struct net_if *iface)
|
|||
struct ethernet_context *ctx = net_if_l2_data(iface);
|
||||
int i;
|
||||
|
||||
if (!(net_eth_get_hw_capabilities(iface) & ETH_HW_VLAN)) {
|
||||
if (!(net_eth_get_hw_capabilities(iface) & ETHERNET_HW_VLAN)) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -2010,7 +2010,7 @@ void net_if_call_link_cb(struct net_if *iface, struct net_linkaddr *lladdr,
|
|||
}
|
||||
}
|
||||
|
||||
static bool need_calc_checksum(struct net_if *iface, enum eth_hw_caps caps)
|
||||
static bool need_calc_checksum(struct net_if *iface, enum ethernet_hw_caps caps)
|
||||
{
|
||||
#if defined(CONFIG_NET_L2_ETHERNET)
|
||||
if (net_if_l2(iface) != &NET_L2_GET_NAME(ETHERNET)) {
|
||||
|
@ -2025,12 +2025,12 @@ static bool need_calc_checksum(struct net_if *iface, enum eth_hw_caps caps)
|
|||
|
||||
bool net_if_need_calc_tx_checksum(struct net_if *iface)
|
||||
{
|
||||
return need_calc_checksum(iface, ETH_HW_TX_CHKSUM_OFFLOAD);
|
||||
return need_calc_checksum(iface, ETHERNET_HW_TX_CHKSUM_OFFLOAD);
|
||||
}
|
||||
|
||||
bool net_if_need_calc_rx_checksum(struct net_if *iface)
|
||||
{
|
||||
return need_calc_checksum(iface, ETH_HW_RX_CHKSUM_OFFLOAD);
|
||||
return need_calc_checksum(iface, ETHERNET_HW_RX_CHKSUM_OFFLOAD);
|
||||
}
|
||||
|
||||
struct net_if *net_if_get_by_index(u8_t index)
|
||||
|
|
|
@ -214,13 +214,13 @@ static int eth_tx_offloading_enabled(struct net_if *iface, struct net_pkt *pkt)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static enum eth_hw_caps eth_offloading_enabled(struct device *dev)
|
||||
static enum ethernet_hw_caps eth_offloading_enabled(struct device *dev)
|
||||
{
|
||||
return ETH_HW_TX_CHKSUM_OFFLOAD |
|
||||
ETH_HW_RX_CHKSUM_OFFLOAD;
|
||||
return ETHERNET_HW_TX_CHKSUM_OFFLOAD |
|
||||
ETHERNET_HW_RX_CHKSUM_OFFLOAD;
|
||||
}
|
||||
|
||||
static enum eth_hw_caps eth_offloading_disabled(struct device *dev)
|
||||
static enum ethernet_hw_caps eth_offloading_disabled(struct device *dev)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -134,9 +134,9 @@ static int eth_tx(struct net_if *iface, struct net_pkt *pkt)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static enum eth_hw_caps eth_capabilities(struct device *dev)
|
||||
static enum ethernet_hw_caps eth_capabilities(struct device *dev)
|
||||
{
|
||||
return ETH_HW_VLAN;
|
||||
return ETHERNET_HW_VLAN;
|
||||
}
|
||||
|
||||
static struct ethernet_api api_funcs = {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue