diff options
author | Wei Yongjun <yongjun_wei@trendmicro.com.cn> | 2012-08-21 16:38:45 +0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-09-04 14:11:28 -0700 |
commit | 71cd7913cb7b28aa6e7daee217339fc8c70f1a0b (patch) | |
tree | 324d00a74792346e99d6e0d27fe57103c3199005 /drivers/staging/rtl8192e | |
parent | ceee26c0e09ee6df22563bf01aa6b29bd1e5c0de (diff) | |
download | blackbird-op-linux-71cd7913cb7b28aa6e7daee217339fc8c70f1a0b.tar.gz blackbird-op-linux-71cd7913cb7b28aa6e7daee217339fc8c70f1a0b.zip |
staging: rtl8192e: using random_ether_addr() to generate random MAC
Using random_ether_addr() to generate a random Ethernet
address (MAC) that is not multicast and has the local
assigned bit set. Not need to duplicating its implementation.
spatch with a semantic match is used to found this problem.
(http://coccinelle.lip6.fr/)
Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/rtl8192e')
-rw-r--r-- | drivers/staging/rtl8192e/rtllib_softmac.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/drivers/staging/rtl8192e/rtllib_softmac.c b/drivers/staging/rtl8192e/rtllib_softmac.c index 8027ceb53c58..99e907d46224 100644 --- a/drivers/staging/rtl8192e/rtllib_softmac.c +++ b/drivers/staging/rtl8192e/rtllib_softmac.c @@ -2620,13 +2620,7 @@ void rtllib_wake_all_queues(struct rtllib_device *ieee) inline void rtllib_randomize_cell(struct rtllib_device *ieee) { - get_random_bytes(ieee->current_network.bssid, ETH_ALEN); - - /* an IBSS cell address must have the two less significant - * bits of the first byte = 2 - */ - ieee->current_network.bssid[0] &= ~0x01; - ieee->current_network.bssid[0] |= 0x02; + random_ether_addr(ieee->current_network.bssid); } /* called in user context only */ |