From: Jun Zhang <jun.zh...@windriver.com>

This reverts commit 0f208baa111991764ba68f5f809d851897ecda64.

Signed-off-by: Wenlin Kang <wenlin.k...@windriver.com>
---
 drivers/net/can/llce/llce_can.c | 20 ++++----------------
 1 file changed, 4 insertions(+), 16 deletions(-)

diff --git a/drivers/net/can/llce/llce_can.c b/drivers/net/can/llce/llce_can.c
index 2844edfdda01..7cceacd6a3d3 100644
--- a/drivers/net/can/llce/llce_can.c
+++ b/drivers/net/can/llce/llce_can.c
@@ -316,7 +316,8 @@ static void set_basic_filter(struct llce_can_command *cmd, 
u8 intf, bool canfd)
        set_rx_filter(&cmd->cmd_list.set_filter.rx_filters[0], intf, canfd);
 }
 
-static void set_advanced_filter(struct llce_can_command *cmd, u8 intf)
+static void set_advanced_filter(struct llce_can_command *cmd, u8 intf,
+                               bool canfd)
 {
        struct llce_can_advanced_filter *afilt;
 
@@ -337,7 +338,7 @@ static void set_advanced_filter(struct llce_can_command 
*cmd, u8 intf)
                .can2eth_routing_table_idx = (u8)0x0U,
        };
 
-       set_rx_filter(&afilt->llce_can_Rx_filter, intf, true);
+       set_rx_filter(&afilt->llce_can_Rx_filter, intf, canfd);
 }
 
 static int can_add_open_filter(struct net_device *dev)
@@ -364,16 +365,7 @@ static int can_add_open_filter(struct net_device *dev)
        filt = &cmd.cmd_list.set_filter.rx_filters[0];
        llce->basic_filter_addr = filt->filter_addr;
 
-       if (!canfd) {
-               /* Logging is not supported if the interface is not in CAN FD
-                * mode.
-                */
-               llce->advanced_filter_addr = -EINVAL;
-               llce->filter_setup_done = true;
-               return 0;
-       }
-
-       set_advanced_filter(&cmd, priv->index);
+       set_advanced_filter(&cmd, priv->index, canfd);
        ret = send_cmd_msg(conf_chan, &cmd);
        if (ret) {
                netdev_info(dev, "Advanced RX filter not added. Logging feature 
not available.\n");
@@ -579,10 +571,6 @@ static int llce_can_device_event(struct notifier_block *nb,
        if (!llce)
                goto llce_can_event_out_unlock;
 
-       if (!is_canfd_dev(&llce->common.can)) {
-               goto llce_can_event_out_unlock;
-       }
-
        switch (action) {
        case NETDEV_DOWN:
                llce->logger_iface_up = false;
-- 
2.25.1

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#13656): 
https://lists.yoctoproject.org/g/linux-yocto/message/13656
Mute This Topic: https://lists.yoctoproject.org/mt/104804615/21656
Group Owner: linux-yocto+ow...@lists.yoctoproject.org
Unsubscribe: https://lists.yoctoproject.org/g/linux-yocto/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to