From 1390005712aeeca0be13bf08e8db772db875a4f8 Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Thu, 25 May 2006 15:08:30 -0700 Subject: [PATCH] --- yaml --- r: 27499 b: refs/heads/master c: aecbd4e45c2e469e0452ffb2c0b0d881e2815bb8 h: refs/heads/master i: 27497: 039138f21b22f48ed163a498c70f47c50f058892 27495: c152d14c2108a94a2e1603a62f6c825f2379262a v: v3 --- [refs] | 2 +- trunk/include/net/llc_if.h | 13 ++++++------- trunk/net/llc/llc_if.c | 2 -- 3 files changed, 7 insertions(+), 10 deletions(-) diff --git a/[refs] b/[refs] index c477b74baa49..6e077c287661 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 17f3ae08b6e7fd778371f2cafbd1c988a67ee343 +refs/heads/master: aecbd4e45c2e469e0452ffb2c0b0d881e2815bb8 diff --git a/trunk/include/net/llc_if.h b/trunk/include/net/llc_if.h index 090eaa0d71f9..a05d04ac4513 100644 --- a/trunk/include/net/llc_if.h +++ b/trunk/include/net/llc_if.h @@ -16,6 +16,7 @@ #include #include #include +#include #include #define LLC_DATAUNIT_PRIM 1 @@ -61,8 +62,6 @@ #define LLC_STATUS_CONFLICT 7 /* disconnect conn */ #define LLC_STATUS_RESET_DONE 8 /* */ -extern u8 llc_mac_null_var[IFHWADDRLEN]; - /** * llc_mac_null - determines if a address is a null mac address * @mac: Mac address to test if null. @@ -70,12 +69,12 @@ extern u8 llc_mac_null_var[IFHWADDRLEN]; * Determines if a given address is a null mac address. Returns 0 if the * address is not a null mac, 1 if the address is a null mac. */ -static __inline__ int llc_mac_null(u8 *mac) +static inline int llc_mac_null(const u8 *mac) { - return !memcmp(mac, llc_mac_null_var, IFHWADDRLEN); + return is_zero_ether_addr(mac); } -static __inline__ int llc_addrany(struct llc_addr *addr) +static inline int llc_addrany(const struct llc_addr *addr) { return llc_mac_null(addr->mac) && !addr->lsap; } @@ -89,9 +88,9 @@ static __inline__ int llc_addrany(struct llc_addr *addr) * is not a complete match up to len, 1 if a complete match up to len is * found. */ -static __inline__ int llc_mac_match(u8 *mac1, u8 *mac2) +static inline int llc_mac_match(const u8 *mac1, const u8 *mac2) { - return !memcmp(mac1, mac2, IFHWADDRLEN); + return !compare_ether_addr(mac1, mac2); } extern int llc_establish_connection(struct sock *sk, u8 *lmac, diff --git a/trunk/net/llc/llc_if.c b/trunk/net/llc/llc_if.c index ba90f7f0801a..5ae47be7dde0 100644 --- a/trunk/net/llc/llc_if.c +++ b/trunk/net/llc/llc_if.c @@ -26,8 +26,6 @@ #include #include -u8 llc_mac_null_var[IFHWADDRLEN]; - /** * llc_build_and_send_pkt - Connection data sending for upper layers. * @sk: connection