Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 940a3fcd authored by Kalesh AP's avatar Kalesh AP Committed by David S. Miller
Browse files

be2net: use -ENETDOWN error status when interface is down



Updating VF's tx-rate and FW-download are not allowed when the interface is
down. In such cases return -ENETDOWN to the stack.
Signed-off-by: default avatarKalesh AP <kalesh.purayil@emulex.com>
Signed-off-by: default avatarSathya Perla <sathya.perla@emulex.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 23fa5c2c
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -1372,7 +1372,7 @@ static int be_set_vf_tx_rate(struct net_device *netdev, int vf,

	if (!link_status) {
		dev_err(dev, "TX-rate setting not allowed when link is down\n");
		status = -EPERM;
		status = -ENETDOWN;
		goto err;
	}

@@ -4221,7 +4221,7 @@ int be_load_fw(struct be_adapter *adapter, u8 *fw_file)
	if (!netif_running(adapter->netdev)) {
		dev_err(&adapter->pdev->dev,
			"Firmware load not allowed (interface is down)\n");
		return -1;
		return -ENETDOWN;
	}

	status = request_firmware(&fw, fw_file, &adapter->pdev->dev);