mirror of
https://github.com/corundum/corundum.git
synced 2025-01-16 08:12:53 +08:00
modules/mqnic: Make mqnic_start_port/mqnic_stop_port non-static so they can be called from mqnic_ethtool
Signed-off-by: Alex Forencich <alex@alexforencich.com>
This commit is contained in:
parent
3c995dc8e0
commit
21b8d164cf
@ -539,6 +539,8 @@ u32 mqnic_port_get_tx_status(struct mqnic_port *port);
|
||||
u32 mqnic_port_get_rx_status(struct mqnic_port *port);
|
||||
|
||||
// mqnic_netdev.c
|
||||
int mqnic_start_port(struct net_device *ndev);
|
||||
void mqnic_stop_port(struct net_device *ndev);
|
||||
void mqnic_update_stats(struct net_device *ndev);
|
||||
struct net_device *mqnic_create_netdev(struct mqnic_if *interface, int index, int dev_port);
|
||||
void mqnic_destroy_netdev(struct net_device *ndev);
|
||||
|
@ -37,9 +37,7 @@
|
||||
|
||||
#include <linux/version.h>
|
||||
|
||||
static int mqnic_stop_port(struct net_device *ndev);
|
||||
|
||||
static int mqnic_start_port(struct net_device *ndev)
|
||||
int mqnic_start_port(struct net_device *ndev)
|
||||
{
|
||||
struct mqnic_priv *priv = netdev_priv(ndev);
|
||||
struct mqnic_dev *mdev = priv->mdev;
|
||||
@ -218,7 +216,7 @@ fail:
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int mqnic_stop_port(struct net_device *ndev)
|
||||
void mqnic_stop_port(struct net_device *ndev)
|
||||
{
|
||||
struct mqnic_priv *priv = netdev_priv(ndev);
|
||||
struct mqnic_dev *mdev = priv->mdev;
|
||||
@ -301,8 +299,6 @@ static int mqnic_stop_port(struct net_device *ndev)
|
||||
mqnic_destroy_cq(cq);
|
||||
}
|
||||
up_write(&priv->rxq_table_sem);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int mqnic_open(struct net_device *ndev)
|
||||
@ -331,11 +327,7 @@ static int mqnic_close(struct net_device *ndev)
|
||||
|
||||
mutex_lock(&mdev->state_lock);
|
||||
|
||||
ret = mqnic_stop_port(ndev);
|
||||
|
||||
if (ret)
|
||||
dev_err(mdev->dev, "Failed to stop port on interface %d netdev %d: %d",
|
||||
priv->interface->index, priv->index, ret);
|
||||
mqnic_stop_port(ndev);
|
||||
|
||||
mutex_unlock(&mdev->state_lock);
|
||||
return ret;
|
||||
|
Loading…
x
Reference in New Issue
Block a user