lkml.org 
[lkml]   [2022]   [Jul]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH net-next v3 3/7] net: lan966x: Expose lan966x_switchdev_nb and lan966x_switchdev_blocking_nb
    Date
    Expose lan966x_switchdev_nb and lan966x_switchdev_blocking_nb to the
    lan966x_main.h file because they will be needed by the lag driver.

    Signed-off-by: Horatiu Vultur <horatiu.vultur@microchip.com>
    ---
    drivers/net/ethernet/microchip/lan966x/lan966x_main.h | 2 ++
    drivers/net/ethernet/microchip/lan966x/lan966x_switchdev.c | 6 ++----
    2 files changed, 4 insertions(+), 4 deletions(-)

    diff --git a/drivers/net/ethernet/microchip/lan966x/lan966x_main.h b/drivers/net/ethernet/microchip/lan966x/lan966x_main.h
    index 0a4f4d27eaa7..f820b1c71c47 100644
    --- a/drivers/net/ethernet/microchip/lan966x/lan966x_main.h
    +++ b/drivers/net/ethernet/microchip/lan966x/lan966x_main.h
    @@ -296,6 +296,8 @@ struct lan966x_port {
    extern const struct phylink_mac_ops lan966x_phylink_mac_ops;
    extern const struct phylink_pcs_ops lan966x_phylink_pcs_ops;
    extern const struct ethtool_ops lan966x_ethtool_ops;
    +extern struct notifier_block lan966x_switchdev_nb __read_mostly;
    +extern struct notifier_block lan966x_switchdev_blocking_nb __read_mostly;

    bool lan966x_netdevice_check(const struct net_device *dev);

    diff --git a/drivers/net/ethernet/microchip/lan966x/lan966x_switchdev.c b/drivers/net/ethernet/microchip/lan966x/lan966x_switchdev.c
    index d9fc6a9a3da1..d9b3ca5f6214 100644
    --- a/drivers/net/ethernet/microchip/lan966x/lan966x_switchdev.c
    +++ b/drivers/net/ethernet/microchip/lan966x/lan966x_switchdev.c
    @@ -6,8 +6,6 @@
    #include "lan966x_main.h"

    static struct notifier_block lan966x_netdevice_nb __read_mostly;
    -static struct notifier_block lan966x_switchdev_nb __read_mostly;
    -static struct notifier_block lan966x_switchdev_blocking_nb __read_mostly;

    static void lan966x_port_set_mcast_ip_flood(struct lan966x_port *port,
    u32 pgid_ip)
    @@ -572,11 +570,11 @@ static struct notifier_block lan966x_netdevice_nb __read_mostly = {
    .notifier_call = lan966x_netdevice_event,
    };

    -static struct notifier_block lan966x_switchdev_nb __read_mostly = {
    +struct notifier_block lan966x_switchdev_nb __read_mostly = {
    .notifier_call = lan966x_switchdev_event,
    };

    -static struct notifier_block lan966x_switchdev_blocking_nb __read_mostly = {
    +struct notifier_block lan966x_switchdev_blocking_nb __read_mostly = {
    .notifier_call = lan966x_switchdev_blocking_event,
    };

    --
    2.33.0
    \
     
     \ /
      Last update: 2022-07-01 22:51    [W:7.548 / U:0.000 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site