Using is_zero_ether_addr() instead of directly use
memcmp() to determine if the ethernet address is all
zeros.
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>
netInterface_priv_t *interfacePriv = (netInterface_priv_t *)netdev_priv(dev);
unifi_priv_t *priv = interfacePriv->privPtr;
int err = 0;
- const unsigned char zero_bssid[ETH_ALEN] = {0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00};
func_enter();
unifi_trace(priv, UDBG1, "unifi_siwap: asked for %pM\n",
wrqu->ap_addr.sa_data);
- if (!memcmp(wrqu->ap_addr.sa_data, zero_bssid, ETH_ALEN)) {
+ if (is_zero_ether_addr(wrqu->ap_addr.sa_data)) {
priv->ignore_bssid_join = FALSE;
err = sme_mgt_disconnect(priv);
if (err) {