You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
llc: Use normal etherdevice.h tests
Convert the llc_<foo> static inlines to the equivalents from etherdevice.h and remove the llc_<foo> static inline functions. llc_mac_null -> is_zero_ether_addr llc_mac_multicast -> is_multicast_ether_addr llc_mac_match -> ether_addr_equal Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
7367d0b573
commit
951fd874c3
+3
-3
@@ -321,12 +321,12 @@ static int llc_ui_bind(struct socket *sock, struct sockaddr *uaddr, int addrlen)
|
||||
if (llc->dev) {
|
||||
if (!addr->sllc_arphrd)
|
||||
addr->sllc_arphrd = llc->dev->type;
|
||||
if (llc_mac_null(addr->sllc_mac))
|
||||
if (is_zero_ether_addr(addr->sllc_mac))
|
||||
memcpy(addr->sllc_mac, llc->dev->dev_addr,
|
||||
IFHWADDRLEN);
|
||||
if (addr->sllc_arphrd != llc->dev->type ||
|
||||
!llc_mac_match(addr->sllc_mac,
|
||||
llc->dev->dev_addr)) {
|
||||
!ether_addr_equal(addr->sllc_mac,
|
||||
llc->dev->dev_addr)) {
|
||||
rc = -EINVAL;
|
||||
llc->dev = NULL;
|
||||
}
|
||||
|
||||
+3
-3
@@ -478,8 +478,8 @@ static inline bool llc_estab_match(const struct llc_sap *sap,
|
||||
|
||||
return llc->laddr.lsap == laddr->lsap &&
|
||||
llc->daddr.lsap == daddr->lsap &&
|
||||
llc_mac_match(llc->laddr.mac, laddr->mac) &&
|
||||
llc_mac_match(llc->daddr.mac, daddr->mac);
|
||||
ether_addr_equal(llc->laddr.mac, laddr->mac) &&
|
||||
ether_addr_equal(llc->daddr.mac, daddr->mac);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -550,7 +550,7 @@ static inline bool llc_listener_match(const struct llc_sap *sap,
|
||||
|
||||
return sk->sk_type == SOCK_STREAM && sk->sk_state == TCP_LISTEN &&
|
||||
llc->laddr.lsap == laddr->lsap &&
|
||||
llc_mac_match(llc->laddr.mac, laddr->mac);
|
||||
ether_addr_equal(llc->laddr.mac, laddr->mac);
|
||||
}
|
||||
|
||||
static struct sock *__llc_lookup_listener(struct llc_sap *sap,
|
||||
|
||||
+2
-2
@@ -302,7 +302,7 @@ static inline bool llc_dgram_match(const struct llc_sap *sap,
|
||||
|
||||
return sk->sk_type == SOCK_DGRAM &&
|
||||
llc->laddr.lsap == laddr->lsap &&
|
||||
llc_mac_match(llc->laddr.mac, laddr->mac);
|
||||
ether_addr_equal(llc->laddr.mac, laddr->mac);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -425,7 +425,7 @@ void llc_sap_handler(struct llc_sap *sap, struct sk_buff *skb)
|
||||
llc_pdu_decode_da(skb, laddr.mac);
|
||||
llc_pdu_decode_dsap(skb, &laddr.lsap);
|
||||
|
||||
if (llc_mac_multicast(laddr.mac)) {
|
||||
if (is_multicast_ether_addr(laddr.mac)) {
|
||||
llc_sap_mcast(sap, &laddr, skb);
|
||||
kfree_skb(skb);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user