diff options
author | Linus Torvalds <torvalds@g5.osdl.org> | 2006-01-18 15:08:16 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-01-18 15:08:16 -0800 |
commit | 097916ecafd3bbedbde3ba068522093bf72319b3 (patch) | |
tree | 95b8f52826883ccb04086725f0b94186adc1566f /net/tipc/eth_media.c | |
parent | 3da38566dfd4b2402b280cb52ffc7c56f1a95b9c (diff) | |
parent | 29f8f63272bd286549d1c7f75ad22686191d35d8 (diff) |
Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Diffstat (limited to 'net/tipc/eth_media.c')
-rw-r--r-- | net/tipc/eth_media.c | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/net/tipc/eth_media.c b/net/tipc/eth_media.c index 34d0462db3a..1f8d83b9c8b 100644 --- a/net/tipc/eth_media.c +++ b/net/tipc/eth_media.c @@ -38,13 +38,11 @@ #include <net/tipc/tipc_bearer.h> #include <net/tipc/tipc_msg.h> #include <linux/netdevice.h> -#include <linux/version.h> #define MAX_ETH_BEARERS 2 -#define TIPC_PROTOCOL 0x88ca -#define ETH_LINK_PRIORITY 10 +#define ETH_LINK_PRIORITY TIPC_DEF_LINK_PRI #define ETH_LINK_TOLERANCE TIPC_DEF_LINK_TOL - +#define ETH_LINK_WINDOW TIPC_DEF_LINK_WIN /** * struct eth_bearer - Ethernet bearer data structure @@ -78,7 +76,7 @@ static int send_msg(struct sk_buff *buf, struct tipc_bearer *tb_ptr, clone->nh.raw = clone->data; dev = ((struct eth_bearer *)(tb_ptr->usr_handle))->dev; clone->dev = dev; - dev->hard_header(clone, dev, TIPC_PROTOCOL, + dev->hard_header(clone, dev, ETH_P_TIPC, &dest->dev_addr.eth_addr, dev->dev_addr, clone->len); dev_queue_xmit(clone); @@ -141,7 +139,7 @@ static int enable_bearer(struct tipc_bearer *tb_ptr) return -EDQUOT; if (!eb_ptr->dev) { eb_ptr->dev = dev; - eb_ptr->tipc_packet_type.type = __constant_htons(TIPC_PROTOCOL); + eb_ptr->tipc_packet_type.type = __constant_htons(ETH_P_TIPC); eb_ptr->tipc_packet_type.dev = dev; eb_ptr->tipc_packet_type.func = recv_msg; eb_ptr->tipc_packet_type.af_packet_priv = eb_ptr; @@ -240,13 +238,13 @@ static char *eth_addr2str(struct tipc_media_addr *a, char *str_buf, int str_size } /** - * eth_media_start - activate Ethernet bearer support + * tipc_eth_media_start - activate Ethernet bearer support * * Register Ethernet media type with TIPC bearer code. Also register * with OS for notifications about device state changes. */ -int eth_media_start(void) +int tipc_eth_media_start(void) { struct tipc_media_addr bcast_addr; int res; @@ -260,7 +258,7 @@ int eth_media_start(void) res = tipc_register_media(TIPC_MEDIA_TYPE_ETH, "eth", enable_bearer, disable_bearer, send_msg, eth_addr2str, &bcast_addr, ETH_LINK_PRIORITY, - ETH_LINK_TOLERANCE, TIPC_DEF_LINK_WIN); + ETH_LINK_TOLERANCE, ETH_LINK_WINDOW); if (res) return res; @@ -273,10 +271,10 @@ int eth_media_start(void) } /** - * eth_media_stop - deactivate Ethernet bearer support + * tipc_eth_media_stop - deactivate Ethernet bearer support */ -void eth_media_stop(void) +void tipc_eth_media_stop(void) { int i; |