diff options
author | Fuyun Liang <liangfuyun1@huawei.com> | 2018-03-10 11:29:22 +0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-03-11 22:53:31 -0400 |
commit | 590980558bd0f49ff598909464661298aad74819 (patch) | |
tree | 6444dc1811ccafd2ed4b1fa89823da84710acc61 /drivers/net/ethernet/hisilicon/hns3/hnae3.h | |
parent | daa13701a95e4b88ab5628aaa6698bd59db9d3d9 (diff) | |
download | lwn-590980558bd0f49ff598909464661298aad74819.tar.gz lwn-590980558bd0f49ff598909464661298aad74819.zip |
net: hns3: add existence check when remove old uc mac address
When driver is in initial state, the mac_vlan table table is empty.
So the delete operation for mac address must fail. Existence check
is needed here. Otherwise, the error message will make user confused.
Fixes: 46a3df9f9718 ("net: hns3: Add HNS3 Acceleration Engine & Compatibility Layer Support")
Signed-off-by: Fuyun Liang <liangfuyun1@huawei.com>
Signed-off-by: Peng Li <lipeng321@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/hisilicon/hns3/hnae3.h')
-rw-r--r-- | drivers/net/ethernet/hisilicon/hns3/hnae3.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/ethernet/hisilicon/hns3/hnae3.h b/drivers/net/ethernet/hisilicon/hns3/hnae3.h index a07204837a9b..70441d281c27 100644 --- a/drivers/net/ethernet/hisilicon/hns3/hnae3.h +++ b/drivers/net/ethernet/hisilicon/hns3/hnae3.h @@ -338,7 +338,8 @@ struct hnae3_ae_ops { u32 *tx_usecs_high, u32 *rx_usecs_high); void (*get_mac_addr)(struct hnae3_handle *handle, u8 *p); - int (*set_mac_addr)(struct hnae3_handle *handle, void *p); + int (*set_mac_addr)(struct hnae3_handle *handle, void *p, + bool is_first); int (*add_uc_addr)(struct hnae3_handle *handle, const unsigned char *addr); int (*rm_uc_addr)(struct hnae3_handle *handle, |