40 #define MAX_ETH_BEARERS MAX_BEARERS
42 #define ETH_ADDR_OFFSET 4
62 static int eth_started;
70 .notifier_call = recv_notification,
111 skb_reset_network_header(clone);
161 static int enable_bearer(
struct tipc_bearer *tb_ptr)
171 while (eb_ptr->
dev) {
174 if (++eb_ptr == stop)
206 eth_media_addr_set(&tb_ptr->
addr, (
char *)dev->
dev_addr);
221 dev_put(eb_ptr->
dev);
232 static void disable_bearer(
struct tipc_bearer *tb_ptr)
254 if (!net_eq(dev_net(dev), &
init_net))
257 while ((eb_ptr->
dev != dev)) {
258 if (++eb_ptr == stop)
268 if (netif_carrier_ok(dev))
295 static int eth_addr2str(
struct tipc_media_addr *
a,
char *str_buf,
int str_size)
312 r =
sscanf(str_buf,
"%02x:%02x:%02x:%02x:%02x:%02x",
313 (
u32 *)&mac[0], (
u32 *)&mac[1], (
u32 *)&mac[2],
314 (
u32 *)&mac[3], (
u32 *)&mac[4], (
u32 *)&mac[5]);
319 eth_media_addr_set(a, mac);
353 .addr2str = eth_addr2str,
354 .str2addr = eth_str2addr,
355 .addr2msg = eth_addr2msg,
356 .msg2addr = eth_msg2addr,
357 .bcast_addr = { { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff },