diff options
author | Joe Perches <joe@perches.com> | 2014-01-20 12:52:17 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-01-21 21:13:04 -0500 |
commit | 34b2cff4eeaa694bf629dfe140eec8cebb60cb9a (patch) | |
tree | a4fda61603aea241a4f358a49c71ab06d5feb690 /net | |
parent | 116e853f7f1548de3c1aed3181781788be42b99a (diff) |
caif_usb: Use ether_addr_copy
Use ether_addr_copy instead of memcpy(a, b, ETH_ALEN) to
save some cycles on arm and powerpc.
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r-- | net/caif/caif_usb.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/caif/caif_usb.c b/net/caif/caif_usb.c index 75ed04b78fa4..dda589c3d9d2 100644 --- a/net/caif/caif_usb.c +++ b/net/caif/caif_usb.c | |||
@@ -105,8 +105,8 @@ static struct cflayer *cfusbl_create(int phyid, u8 ethaddr[ETH_ALEN], | |||
105 | * 5-11 source address | 105 | * 5-11 source address |
106 | * 12-13 protocol type | 106 | * 12-13 protocol type |
107 | */ | 107 | */ |
108 | memcpy(&this->tx_eth_hdr[ETH_ALEN], braddr, ETH_ALEN); | 108 | ether_addr_copy(&this->tx_eth_hdr[ETH_ALEN], braddr); |
109 | memcpy(&this->tx_eth_hdr[ETH_ALEN], ethaddr, ETH_ALEN); | 109 | ether_addr_copy(&this->tx_eth_hdr[ETH_ALEN], ethaddr); |
110 | this->tx_eth_hdr[12] = cpu_to_be16(ETH_P_802_EX1) & 0xff; | 110 | this->tx_eth_hdr[12] = cpu_to_be16(ETH_P_802_EX1) & 0xff; |
111 | this->tx_eth_hdr[13] = (cpu_to_be16(ETH_P_802_EX1) >> 8) & 0xff; | 111 | this->tx_eth_hdr[13] = (cpu_to_be16(ETH_P_802_EX1) >> 8) & 0xff; |
112 | pr_debug("caif ethernet TX-header dst:%pM src:%pM type:%02x%02x\n", | 112 | pr_debug("caif ethernet TX-header dst:%pM src:%pM type:%02x%02x\n", |