diff options
author | Martin Kaiser <martin@kaiser.cx> | 2022-07-09 20:09:53 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2022-07-11 11:06:45 +0300 |
commit | 3c1178680b37b5a5269f4db6e4e4b4981e202ff9 (patch) | |
tree | a8e7c4ee5d66ba8af6aadb59f5209e5236c0712a /drivers/staging/r8188eu | |
parent | 0fcae03da0d80af6138c911a127b3d9ab5dc7fe8 (diff) | |
download | linux-3c1178680b37b5a5269f4db6e4e4b4981e202ff9.tar.xz |
staging: r8188eu: use memcpy for fallback mac address
Use memcpy to store the fallback mac address in eeprom->mac_addr. Do not
copy byte by byte.
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20220709171000.180481-8-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/r8188eu')
-rw-r--r-- | drivers/staging/r8188eu/hal/usb_halinit.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/staging/r8188eu/hal/usb_halinit.c b/drivers/staging/r8188eu/hal/usb_halinit.c index 16ac5b49459a..3439a64f31ae 100644 --- a/drivers/staging/r8188eu/hal/usb_halinit.c +++ b/drivers/staging/r8188eu/hal/usb_halinit.c @@ -912,13 +912,11 @@ exit: static void Hal_EfuseParseMACAddr_8188EU(struct adapter *adapt, u8 *hwinfo, bool AutoLoadFail) { - u16 i; u8 sMacAddr[6] = {0x00, 0xE0, 0x4C, 0x81, 0x88, 0x02}; struct eeprom_priv *eeprom = &adapt->eeprompriv; if (AutoLoadFail) { - for (i = 0; i < 6; i++) - eeprom->mac_addr[i] = sMacAddr[i]; + memcpy(eeprom->mac_addr, sMacAddr, ETH_ALEN); } else { /* Read Permanent MAC address */ memcpy(eeprom->mac_addr, &hwinfo[EEPROM_MAC_ADDR_88EU], ETH_ALEN); |