OSDN Git Service

cxgb4: use eth_zero_addr() to clear mac address
authorMiaohe Lin <linmiaohe@huawei.com>
Thu, 23 Jul 2020 11:05:00 +0000 (19:05 +0800)
committerDavid S. Miller <davem@davemloft.net>
Thu, 23 Jul 2020 18:49:12 +0000 (11:49 -0700)
Use eth_zero_addr() to clear mac address insetad of memset().

Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/chelsio/cxgb4/smt.c

index cbe72ed..e617e4a 100644 (file)
@@ -55,7 +55,7 @@ struct smt_data *t4_init_smt(void)
        for (i = 0; i < s->smt_size; ++i) {
                s->smtab[i].idx = i;
                s->smtab[i].state = SMT_STATE_UNUSED;
-               memset(&s->smtab[i].src_mac, 0, ETH_ALEN);
+               eth_zero_addr(s->smtab[i].src_mac);
                spin_lock_init(&s->smtab[i].lock);
                s->smtab[i].refcnt = 0;
        }