diff options
author | Wei Yongjun <yongjun_wei@trendmicro.com.cn> | 2012-08-26 05:22:33 +0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-09-05 01:03:40 +0400 |
commit | 779477f29664e2e3f694339356f97a9e0eb30faa (patch) | |
tree | 77e6997317ec761b7ba92e5c63b5d00d5cbfb133 /drivers/staging/rtl8712/rtl871x_ioctl_linux.c | |
parent | 148d711654cf0387fda241df3b9716783a60f803 (diff) | |
download | linux-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_linux.c')
-rw-r--r-- | drivers/staging/rtl8712/rtl871x_ioctl_linux.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/staging/rtl8712/rtl871x_ioctl_linux.c b/drivers/staging/rtl8712/rtl871x_ioctl_linux.c index 35e781fca4a0..c9a6a7fbb89c 100644 --- a/drivers/staging/rtl8712/rtl871x_ioctl_linux.c +++ b/drivers/staging/rtl8712/rtl871x_ioctl_linux.c @@ -407,9 +407,7 @@ static int wpa_set_encryption(struct net_device *dev, struct ieee_param *param, if (param_len != (u32)((u8 *) param->u.crypt.key - (u8 *)param) + param->u.crypt.key_len) return -EINVAL; - if (param->sta_addr[0] == 0xff && param->sta_addr[1] == 0xff && - param->sta_addr[2] == 0xff && param->sta_addr[3] == 0xff && - param->sta_addr[4] == 0xff && param->sta_addr[5] == 0xff) { + if (is_broadcast_ether_addr(param->sta_addr)) { if (param->u.crypt.idx >= WEP_KEYS) { /* for large key indices, set the default (0) */ param->u.crypt.idx = 0; |