diff options
author | Wei Yongjun <yongjun_wei@trendmicro.com.cn> | 2012-08-26 01:22:33 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-09-04 21:03:40 (GMT) |
commit | 779477f29664e2e3f694339356f97a9e0eb30faa (patch) | |
tree | 77e6997317ec761b7ba92e5c63b5d00d5cbfb133 /drivers/staging/rtl8712/rtl871x_ioctl_set.c | |
parent | 148d711654cf0387fda241df3b9716783a60f803 (diff) | |
download | linux-fsl-qoriq-779477f29664e2e3f694339356f97a9e0eb30faa.tar.xz |
staging: r8712u: use is_broadcast_ether_addr() to simplify the code
Using is_broadcast_ether_addr() to simplify the code.
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>
Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/rtl8712/rtl871x_ioctl_set.c')
-rw-r--r-- | drivers/staging/rtl8712/rtl871x_ioctl_set.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/staging/rtl8712/rtl871x_ioctl_set.c b/drivers/staging/rtl8712/rtl871x_ioctl_set.c index f352b32..d3ab24e 100644 --- a/drivers/staging/rtl8712/rtl871x_ioctl_set.c +++ b/drivers/staging/rtl8712/rtl871x_ioctl_set.c @@ -131,10 +131,7 @@ u8 r8712_set_802_11_bssid(struct _adapter *padapter, u8 *bssid) u8 status = true; struct mlme_priv *pmlmepriv = &padapter->mlmepriv; - if ((bssid[0] == 0x00 && bssid[1] == 0x00 && bssid[2] == 0x00 && - bssid[3] == 0x00 && bssid[4] == 0x00 && bssid[5] == 0x00) || - (bssid[0] == 0xFF && bssid[1] == 0xFF && bssid[2] == 0xFF && - bssid[3] == 0xFF && bssid[4] == 0xFF && bssid[5] == 0xFF)) { + if (is_zero_ether_addr(bssid) || is_broadcast_ether_addr(bssid)) { status = false; return status; } |