提交 34b2cff4 编写于 作者: J Joe Perches 提交者: David S. Miller

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: NJoe Perches <joe@perches.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 116e853f
......@@ -105,8 +105,8 @@ static struct cflayer *cfusbl_create(int phyid, u8 ethaddr[ETH_ALEN],
* 5-11 source address
* 12-13 protocol type
*/
memcpy(&this->tx_eth_hdr[ETH_ALEN], braddr, ETH_ALEN);
memcpy(&this->tx_eth_hdr[ETH_ALEN], ethaddr, ETH_ALEN);
ether_addr_copy(&this->tx_eth_hdr[ETH_ALEN], braddr);
ether_addr_copy(&this->tx_eth_hdr[ETH_ALEN], ethaddr);
this->tx_eth_hdr[12] = cpu_to_be16(ETH_P_802_EX1) & 0xff;
this->tx_eth_hdr[13] = (cpu_to_be16(ETH_P_802_EX1) >> 8) & 0xff;
pr_debug("caif ethernet TX-header dst:%pM src:%pM type:%02x%02x\n",
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册