summaryrefslogtreecommitdiffstats
path: root/drivers/staging/vt6656/hostap.c
diff options
context:
space:
mode:
authorWei Yongjun2012-08-26 03:03:04 +0200
committerGreg Kroah-Hartman2012-09-04 23:01:42 +0200
commit70a1fb1933a3ecfc265444f954a8c0310cdf293a (patch)
treeac82bc6466b64791b0cbf2dc40f0bb51d529eb48 /drivers/staging/vt6656/hostap.c
parentstaging "vt6656" Typo rename Embeded to Embedded. (diff)
downloadkernel-qcow2-linux-70a1fb1933a3ecfc265444f954a8c0310cdf293a.tar.gz
kernel-qcow2-linux-70a1fb1933a3ecfc265444f954a8c0310cdf293a.tar.xz
kernel-qcow2-linux-70a1fb1933a3ecfc265444f954a8c0310cdf293a.zip
Staging: vt6656: using is_broadcast_ether_addr() to simplify the code
Using is_broadcast_ether_addr() to simplify the code. Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/vt6656/hostap.c')
-rw-r--r--drivers/staging/vt6656/hostap.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/staging/vt6656/hostap.c b/drivers/staging/vt6656/hostap.c
index 610604032960..0a73d4060ee1 100644
--- a/drivers/staging/vt6656/hostap.c
+++ b/drivers/staging/vt6656/hostap.c
@@ -439,9 +439,7 @@ static int hostap_set_encryption(PSDevice pDevice,
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 >= MAX_GROUP_KEY)
return -EINVAL;
iNodeIndex = 0;
@@ -663,9 +661,7 @@ static int hostap_get_encryption(PSDevice pDevice,
param->u.crypt.err = 0;
- 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)) {
iNodeIndex = 0;
} else {
if (BSSbIsSTAInNodeDB(pDevice, param->sta_addr, &iNodeIndex) == FALSE) {