diff options
-rw-r--r-- | Documentation/DocBook/kernel-api.tmpl | 6 | ||||
-rw-r--r-- | include/linux/etherdevice.h | 24 |
2 files changed, 18 insertions, 12 deletions
diff --git a/Documentation/DocBook/kernel-api.tmpl b/Documentation/DocBook/kernel-api.tmpl index 4d9b66d8b4db..ec474e5a25ed 100644 --- a/Documentation/DocBook/kernel-api.tmpl +++ b/Documentation/DocBook/kernel-api.tmpl | |||
@@ -239,9 +239,9 @@ X!Ilib/string.c | |||
239 | <title>Network device support</title> | 239 | <title>Network device support</title> |
240 | <sect1><title>Driver Support</title> | 240 | <sect1><title>Driver Support</title> |
241 | !Enet/core/dev.c | 241 | !Enet/core/dev.c |
242 | </sect1> | 242 | !Enet/ethernet/eth.c |
243 | <sect1><title>8390 Based Network Cards</title> | 243 | !Einclude/linux/etherdevice.h |
244 | !Edrivers/net/8390.c | 244 | !Enet/core/wireless.c |
245 | </sect1> | 245 | </sect1> |
246 | <sect1><title>Synchronous PPP</title> | 246 | <sect1><title>Synchronous PPP</title> |
247 | !Edrivers/net/wan/syncppp.c | 247 | !Edrivers/net/wan/syncppp.c |
diff --git a/include/linux/etherdevice.h b/include/linux/etherdevice.h index 17460c85df7b..5f49a30eb6f2 100644 --- a/include/linux/etherdevice.h +++ b/include/linux/etherdevice.h | |||
@@ -48,8 +48,10 @@ static inline void eth_copy_and_sum (struct sk_buff *dest, | |||
48 | } | 48 | } |
49 | 49 | ||
50 | /** | 50 | /** |
51 | * is_zero_ether_addr - Determine if give Ethernet address is all | 51 | * is_zero_ether_addr - Determine if give Ethernet address is all zeros. |
52 | * zeros. | 52 | * @addr: Pointer to a six-byte array containing the Ethernet address |
53 | * | ||
54 | * Return true if the address is all zeroes. | ||
53 | */ | 55 | */ |
54 | static inline int is_zero_ether_addr(const u8 *addr) | 56 | static inline int is_zero_ether_addr(const u8 *addr) |
55 | { | 57 | { |
@@ -57,9 +59,7 @@ static inline int is_zero_ether_addr(const u8 *addr) | |||
57 | } | 59 | } |
58 | 60 | ||
59 | /** | 61 | /** |
60 | * is_multicast_ether_addr - Determine if the given Ethernet address is a | 62 | * is_multicast_ether_addr - Determine if the Ethernet address is a multicast. |
61 | * multicast address. | ||
62 | * | ||
63 | * @addr: Pointer to a six-byte array containing the Ethernet address | 63 | * @addr: Pointer to a six-byte array containing the Ethernet address |
64 | * | 64 | * |
65 | * Return true if the address is a multicast address. | 65 | * Return true if the address is a multicast address. |
@@ -69,6 +69,12 @@ static inline int is_multicast_ether_addr(const u8 *addr) | |||
69 | return ((addr[0] != 0xff) && (0x01 & addr[0])); | 69 | return ((addr[0] != 0xff) && (0x01 & addr[0])); |
70 | } | 70 | } |
71 | 71 | ||
72 | /** | ||
73 | * is_broadcast_ether_addr - Determine if the Ethernet address is broadcast | ||
74 | * @addr: Pointer to a six-byte array containing the Ethernet address | ||
75 | * | ||
76 | * Return true if the address is the broadcast address. | ||
77 | */ | ||
72 | static inline int is_broadcast_ether_addr(const u8 *addr) | 78 | static inline int is_broadcast_ether_addr(const u8 *addr) |
73 | { | 79 | { |
74 | return (addr[0] & addr[1] & addr[2] & addr[3] & addr[4] & addr[5]) == 0xff; | 80 | return (addr[0] & addr[1] & addr[2] & addr[3] & addr[4] & addr[5]) == 0xff; |
@@ -107,14 +113,14 @@ static inline void random_ether_addr(u8 *addr) | |||
107 | /** | 113 | /** |
108 | * compare_ether_addr - Compare two Ethernet addresses | 114 | * compare_ether_addr - Compare two Ethernet addresses |
109 | * @addr1: Pointer to a six-byte array containing the Ethernet address | 115 | * @addr1: Pointer to a six-byte array containing the Ethernet address |
110 | * @addr2 Pointer other six-byte array containing the Ethernet address | 116 | * @addr2: Pointer other six-byte array containing the Ethernet address |
111 | * | 117 | * |
112 | * Compare two ethernet addresses, returns 0 if equal | 118 | * Compare two ethernet addresses, returns 0 if equal |
113 | */ | 119 | */ |
114 | static inline unsigned compare_ether_addr(const u8 *_a, const u8 *_b) | 120 | static inline unsigned compare_ether_addr(const u8 *addr1, const u8 *addr2) |
115 | { | 121 | { |
116 | const u16 *a = (const u16 *) _a; | 122 | const u16 *a = (const u16 *) addr1; |
117 | const u16 *b = (const u16 *) _b; | 123 | const u16 *b = (const u16 *) addr2; |
118 | 124 | ||
119 | BUILD_BUG_ON(ETH_ALEN != 6); | 125 | BUILD_BUG_ON(ETH_ALEN != 6); |
120 | return ((a[0] ^ b[0]) | (a[1] ^ b[1]) | (a[2] ^ b[2])) != 0; | 126 | return ((a[0] ^ b[0]) | (a[1] ^ b[1]) | (a[2] ^ b[2])) != 0; |