Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 27499
b: refs/heads/master
c: aecbd4e
h: refs/heads/master
i:
  27497: 039138f
  27495: c152d14
v: v3
  • Loading branch information
Stephen Hemminger authored and David S. Miller committed Jun 18, 2006
1 parent 5d37751 commit 1390005
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 10 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 17f3ae08b6e7fd778371f2cafbd1c988a67ee343
refs/heads/master: aecbd4e45c2e469e0452ffb2c0b0d881e2815bb8
13 changes: 6 additions & 7 deletions trunk/include/net/llc_if.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
#include <linux/if.h>
#include <linux/if_arp.h>
#include <linux/llc.h>
#include <linux/etherdevice.h>
#include <net/llc.h>

#define LLC_DATAUNIT_PRIM 1
Expand Down Expand Up @@ -61,21 +62,19 @@
#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.
*
* 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;
}
Expand All @@ -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,
Expand Down
2 changes: 0 additions & 2 deletions trunk/net/llc/llc_if.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@
#include <net/llc_c_st.h>
#include <net/tcp_states.h>

u8 llc_mac_null_var[IFHWADDRLEN];

/**
* llc_build_and_send_pkt - Connection data sending for upper layers.
* @sk: connection
Expand Down

0 comments on commit 1390005

Please sign in to comment.