From: Jun Zhang <[email protected]> This reverts commit 572a26ce97d70c940f236cfdfcf670c2b16ff0b0.
Signed-off-by: Wenlin Kang <[email protected]> --- drivers/net/can/llce/llce_can.c | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/drivers/net/can/llce/llce_can.c b/drivers/net/can/llce/llce_can.c index 5a7754bc8925..468fa37b366d 100644 --- a/drivers/net/can/llce/llce_can.c +++ b/drivers/net/can/llce/llce_can.c @@ -227,7 +227,7 @@ static int llce_can_remove_filter(struct llce_can *llce, int filter) return ret; } -static void llce_can_cleanup_filters(struct llce_can *llce) +static void llce_can_filters_cleaup(struct llce_can *llce) { if (!llce->filter_setup_done) return; @@ -235,15 +235,8 @@ static void llce_can_cleanup_filters(struct llce_can *llce) /* The return value is ignored on purpose. * We should try to remove all the filters. */ - if (llce->basic_filter_addr != -EINVAL) { - llce_can_remove_filter(llce, llce->basic_filter_addr); - llce->basic_filter_addr = -EINVAL; - } - if (llce->advanced_filter_addr != -EINVAL) { - llce_can_remove_filter(llce, llce->advanced_filter_addr); - llce->advanced_filter_addr = -EINVAL; - } - llce->filter_setup_done = false; + llce_can_remove_filter(llce, llce->basic_filter_addr); + llce_can_remove_filter(llce, llce->advanced_filter_addr); } static int llce_can_set_filter_status(struct llce_can *llce, int filter, @@ -699,7 +692,7 @@ static int llce_can_close(struct net_device *dev) int ret, ret1; llce_can_configure_filter(llce, false); - llce_can_cleanup_filters(llce); + netif_stop_queue(dev); ret = stop_llce_can(llce); @@ -931,7 +924,7 @@ static int llce_can_remove(struct platform_device *pdev) struct llce_can_dev *common = &llce->common; llce_can_interfaces_cleanup(llce); - llce_can_cleanup_filters(llce); + llce_can_filters_cleaup(llce); unregister_candev(netdev); netif_napi_del(&common->napi); -- 2.25.1
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#13658): https://lists.yoctoproject.org/g/linux-yocto/message/13658 Mute This Topic: https://lists.yoctoproject.org/mt/104804618/21656 Group Owner: [email protected] Unsubscribe: https://lists.yoctoproject.org/g/linux-yocto/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
