diff options
author | Kejian Yan <yankejian@huawei.com> | 2016-03-22 11:06:24 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-03-22 22:45:57 +0300 |
commit | d5679849d134704bd9f9e95d2370eb60abf37ed5 (patch) | |
tree | ea3d7803f440ad46310d46a456b0295830690b58 /drivers/net/ethernet/hisilicon/hns/hns_ae_adapt.c | |
parent | f8a1a636c2a940d37dba9153bcfe687a802745fb (diff) | |
download | linux-d5679849d134704bd9f9e95d2370eb60abf37ed5.tar.xz |
net: hns: add uc match for debug ports
Debug ports receives lots of packets with dest mac addr does not match
local mac addr, because the filter is close, and it does not drop the
useless packets. This patch adds ON/OFF switch of filtering the packets
whose dest mac addr do not match the local addr in mac table. And the
switch is ON in initialization.
Signed-off-by: Kejian Yan <yankejian@huawei.com>
Signed-off-by: Peng Li <lipeng321@huawei.com>
Signed-off-by: Yisen Zhuang <Yisen.Zhuang@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/hisilicon/hns/hns_ae_adapt.c')
-rw-r--r-- | drivers/net/ethernet/hisilicon/hns/hns_ae_adapt.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/ethernet/hisilicon/hns/hns_ae_adapt.c b/drivers/net/ethernet/hisilicon/hns/hns_ae_adapt.c index 90352d64d7da..a7427b8d57de 100644 --- a/drivers/net/ethernet/hisilicon/hns/hns_ae_adapt.c +++ b/drivers/net/ethernet/hisilicon/hns/hns_ae_adapt.c @@ -420,7 +420,10 @@ static int hns_ae_set_autoneg(struct hnae_handle *handle, u8 enable) static void hns_ae_set_promisc_mode(struct hnae_handle *handle, u32 en) { + struct hns_mac_cb *mac_cb = hns_get_mac_cb(handle); + hns_dsaf_set_promisc_mode(hns_ae_get_dsaf_dev(handle->dev), en); + hns_mac_set_promisc(mac_cb, (u8)!!en); } static int hns_ae_get_autoneg(struct hnae_handle *handle) |