staging: rtl8188eu: refactor rtw_macaddr_cfg()
authorMichael Straube <straube.linux@gmail.com>
Sun, 8 Jul 2018 11:58:11 +0000 (13:58 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 8 Jul 2018 15:42:05 +0000 (17:42 +0200)
commit4f98cf805d42c652b0c0e6737d8e025de881e293
tree9dc47745371e83007db2de7eea8e515bde4918ef
parent86ef7175e317f78f16013f023065dbb7993e7ecf
staging: rtl8188eu: refactor rtw_macaddr_cfg()

Use ether_addr_copy() instead of memcpy() to copy the mac address.

Using is_broadcast_ether_addr() and is_zero_ether_addr() instead of
testing each byte of the mac[] array for 0xff and 0x00 shortens the
code and improves readability.

Instead of a fixed default mac address use a random one to reduce the
likelihood of mac address collision.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8188eu/core/rtw_ieee80211.c