]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit8a96dfe586d819d0cf2c075f12dff5bbcae54784
tree9dc47745371e83007db2de7eea8e515bde4918ef
parentb3e398db35dc758dd2458ed51fa54eaa72efdffd
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