mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-26 19:00:25 +00:00
s390/net: set HW port number in netdevice
struct net_device contains a dev_port field. Store the OSA port number in this field. Signed-off-by: Ursula Braun <ubraun@linux.ibm.com> Reviewed-by: Julian Wiedmann <jwi@linux.ibm.com> Signed-off-by: Julian Wiedmann <jwi@linux.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
d8de0ddfad
commit
71c4689780
4 changed files with 7 additions and 0 deletions
|
@ -1928,6 +1928,8 @@ lcs_portno_store (struct device *dev, struct device_attribute *attr, const char
|
|||
return -EINVAL;
|
||||
/* TODO: sanity checks */
|
||||
card->portno = value;
|
||||
if (card->dev)
|
||||
card->dev->dev_port = card->portno;
|
||||
|
||||
return count;
|
||||
|
||||
|
@ -2158,6 +2160,7 @@ lcs_new_device(struct ccwgroup_device *ccwgdev)
|
|||
card->dev = dev;
|
||||
card->dev->ml_priv = card;
|
||||
card->dev->netdev_ops = &lcs_netdev_ops;
|
||||
card->dev->dev_port = card->portno;
|
||||
memcpy(card->dev->dev_addr, card->mac, LCS_MAC_LENGTH);
|
||||
#ifdef CONFIG_IP_MULTICAST
|
||||
if (!lcs_check_multicast_support(card))
|
||||
|
|
|
@ -144,6 +144,8 @@ static ssize_t qeth_dev_portno_store(struct device *dev,
|
|||
goto out;
|
||||
}
|
||||
card->info.portno = portno;
|
||||
if (card->dev)
|
||||
card->dev->dev_port = portno;
|
||||
out:
|
||||
mutex_unlock(&card->conf_mutex);
|
||||
return rc ? rc : count;
|
||||
|
|
|
@ -984,6 +984,7 @@ static int qeth_l2_setup_netdev(struct qeth_card *card)
|
|||
card->dev->mtu = card->info.initial_mtu;
|
||||
card->dev->min_mtu = 64;
|
||||
card->dev->max_mtu = ETH_MAX_MTU;
|
||||
card->dev->dev_port = card->info.portno;
|
||||
card->dev->netdev_ops = &qeth_l2_netdev_ops;
|
||||
if (card->info.type == QETH_CARD_TYPE_OSN) {
|
||||
card->dev->ethtool_ops = &qeth_l2_osn_ops;
|
||||
|
|
|
@ -2576,6 +2576,7 @@ static int qeth_l3_setup_netdev(struct qeth_card *card)
|
|||
card->dev->mtu = card->info.initial_mtu;
|
||||
card->dev->min_mtu = 64;
|
||||
card->dev->max_mtu = ETH_MAX_MTU;
|
||||
card->dev->dev_port = card->info.portno;
|
||||
card->dev->ethtool_ops = &qeth_l3_ethtool_ops;
|
||||
card->dev->features |= NETIF_F_HW_VLAN_CTAG_TX |
|
||||
NETIF_F_HW_VLAN_CTAG_RX |
|
||||
|
|
Loading…
Reference in a new issue