diff options
author | Wei Yongjun <yongjun_wei@trendmicro.com.cn> | 2012-08-26 09:02:16 +0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-09-04 14:01:42 -0700 |
commit | 78b311435195ea54c36973394dae7ff14712b1c7 (patch) | |
tree | 9e9d7e2a783918be12b709f8967dfd1b01602fe8 /drivers/staging/vt6655 | |
parent | 70a1fb1933a3ecfc265444f954a8c0310cdf293a (diff) | |
download | op-kernel-dev-78b311435195ea54c36973394dae7ff14712b1c7.zip op-kernel-dev-78b311435195ea54c36973394dae7ff14712b1c7.tar.gz |
Staging: vt6655: 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/vt6655')
-rw-r--r-- | drivers/staging/vt6655/hostap.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/staging/vt6655/hostap.c b/drivers/staging/vt6655/hostap.c index 6ac6f45..67b1b88 100644 --- a/drivers/staging/vt6655/hostap.c +++ b/drivers/staging/vt6655/hostap.c @@ -495,9 +495,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; @@ -716,9 +714,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 (BSSDBbIsSTAInNodeDB(pMgmt, param->sta_addr, &iNodeIndex) == false) { |