|
@@ -1073,15 +1073,15 @@ static netdev_tx_t be_xmit(struct sk_buff *skb, struct net_device *netdev)
|
|
static int be_change_mtu(struct net_device *netdev, int new_mtu)
|
|
static int be_change_mtu(struct net_device *netdev, int new_mtu)
|
|
{
|
|
{
|
|
struct be_adapter *adapter = netdev_priv(netdev);
|
|
struct be_adapter *adapter = netdev_priv(netdev);
|
|
- if (new_mtu < BE_MIN_MTU ||
|
|
|
|
- new_mtu > (BE_MAX_JUMBO_FRAME_SIZE - (ETH_HLEN + ETH_FCS_LEN))) {
|
|
|
|
- dev_info(&adapter->pdev->dev,
|
|
|
|
- "MTU must be between %d and %d bytes\n",
|
|
|
|
- BE_MIN_MTU,
|
|
|
|
- (BE_MAX_JUMBO_FRAME_SIZE - (ETH_HLEN + ETH_FCS_LEN)));
|
|
|
|
|
|
+ struct device *dev = &adapter->pdev->dev;
|
|
|
|
+
|
|
|
|
+ if (new_mtu < BE_MIN_MTU || new_mtu > BE_MAX_MTU) {
|
|
|
|
+ dev_info(dev, "MTU must be between %d and %d bytes\n",
|
|
|
|
+ BE_MIN_MTU, BE_MAX_MTU);
|
|
return -EINVAL;
|
|
return -EINVAL;
|
|
}
|
|
}
|
|
- dev_info(&adapter->pdev->dev, "MTU changed from %d to %d bytes\n",
|
|
|
|
|
|
+
|
|
|
|
+ dev_info(dev, "MTU changed from %d to %d bytes\n",
|
|
netdev->mtu, new_mtu);
|
|
netdev->mtu, new_mtu);
|
|
netdev->mtu = new_mtu;
|
|
netdev->mtu = new_mtu;
|
|
return 0;
|
|
return 0;
|