staging: ks7010: use ether_addr_copy in ks_wlan_set_encode_ext

Instead of manually memcpy ethernet addresses use ether_addr_copy
function for this purpose.

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Sergio Paracuellos 2018-04-25 16:01:47 +02:00 committed by Greg Kroah-Hartman
parent 092f239e9f
commit b8cbbc1261

View File

@ -1594,7 +1594,7 @@ static int ks_wlan_set_encode_ext(struct net_device *dev,
memcpy(&key->rx_seq[0], &enc->rx_seq[0], IW_ENCODE_SEQ_MAX_SIZE); memcpy(&key->rx_seq[0], &enc->rx_seq[0], IW_ENCODE_SEQ_MAX_SIZE);
} }
memcpy(&key->addr.sa_data[0], &enc->addr.sa_data[0], ETH_ALEN); ether_addr_copy(&key->addr.sa_data[0], &enc->addr.sa_data[0]);
switch (enc->alg) { switch (enc->alg) {
case IW_ENCODE_ALG_NONE: case IW_ENCODE_ALG_NONE: