staging: slicoss: Remove last reference to compare_ether_addr
And use the normal is_<foo>_ether_addr functions and ETH_ALEN too. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
12a2f3f3f4
commit
ae7d27c086
@ -14,7 +14,6 @@ TODO:
|
|||||||
- use net_device_ops
|
- use net_device_ops
|
||||||
- use dev->stats rather than adapter->stats
|
- use dev->stats rather than adapter->stats
|
||||||
- don't cast netdev_priv it is already void
|
- don't cast netdev_priv it is already void
|
||||||
- use compare_ether_addr
|
|
||||||
- GET RID OF MACROS
|
- GET RID OF MACROS
|
||||||
- work on all architectures
|
- work on all architectures
|
||||||
- without CONFIG_X86_64 confusion
|
- without CONFIG_X86_64 confusion
|
||||||
|
@ -595,15 +595,12 @@ static void slic_adapter_set_hwaddr(struct adapter *adapter)
|
|||||||
memcpy(adapter->macaddr,
|
memcpy(adapter->macaddr,
|
||||||
card->config.MacInfo[adapter->functionnumber].macaddrA,
|
card->config.MacInfo[adapter->functionnumber].macaddrA,
|
||||||
sizeof(struct slic_config_mac));
|
sizeof(struct slic_config_mac));
|
||||||
if (!(adapter->currmacaddr[0] || adapter->currmacaddr[1] ||
|
if (is_zero_ether_addr(adapter->currmacaddr))
|
||||||
adapter->currmacaddr[2] || adapter->currmacaddr[3] ||
|
memcpy(adapter->currmacaddr, adapter->macaddr,
|
||||||
adapter->currmacaddr[4] || adapter->currmacaddr[5])) {
|
ETH_ALEN);
|
||||||
memcpy(adapter->currmacaddr, adapter->macaddr, 6);
|
if (adapter->netdev)
|
||||||
}
|
|
||||||
if (adapter->netdev) {
|
|
||||||
memcpy(adapter->netdev->dev_addr, adapter->currmacaddr,
|
memcpy(adapter->netdev->dev_addr, adapter->currmacaddr,
|
||||||
6);
|
ETH_ALEN);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -767,13 +764,11 @@ static bool slic_mac_filter(struct adapter *adapter,
|
|||||||
{
|
{
|
||||||
struct net_device *netdev = adapter->netdev;
|
struct net_device *netdev = adapter->netdev;
|
||||||
u32 opts = adapter->macopts;
|
u32 opts = adapter->macopts;
|
||||||
u32 *dhost4 = (u32 *)ðer_frame->ether_dhost[0];
|
|
||||||
u16 *dhost2 = (u16 *)ðer_frame->ether_dhost[4];
|
|
||||||
|
|
||||||
if (opts & MAC_PROMISC)
|
if (opts & MAC_PROMISC)
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
if ((*dhost4 == 0xFFFFFFFF) && (*dhost2 == 0xFFFF)) {
|
if (is_broadcast_ether_addr(ether_frame->ether_dhost)) {
|
||||||
if (opts & MAC_BCAST) {
|
if (opts & MAC_BCAST) {
|
||||||
adapter->rcv_broadcasts++;
|
adapter->rcv_broadcasts++;
|
||||||
return true;
|
return true;
|
||||||
@ -782,7 +777,7 @@ static bool slic_mac_filter(struct adapter *adapter,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ether_frame->ether_dhost[0] & 0x01) {
|
if (is_multicast_ether_addr(ether_frame->ether_dhost)) {
|
||||||
if (opts & MAC_ALLMCAST) {
|
if (opts & MAC_ALLMCAST) {
|
||||||
adapter->rcv_multicasts++;
|
adapter->rcv_multicasts++;
|
||||||
netdev->stats.multicast++;
|
netdev->stats.multicast++;
|
||||||
@ -2335,7 +2330,7 @@ static int slic_mcast_add_list(struct adapter *adapter, char *address)
|
|||||||
if (mcaddr == NULL)
|
if (mcaddr == NULL)
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
memcpy(mcaddr->address, address, 6);
|
memcpy(mcaddr->address, address, ETH_ALEN);
|
||||||
|
|
||||||
mcaddr->next = adapter->mcastaddrs;
|
mcaddr->next = adapter->mcastaddrs;
|
||||||
adapter->mcastaddrs = mcaddr;
|
adapter->mcastaddrs = mcaddr;
|
||||||
|
Loading…
Reference in New Issue
Block a user