summaryrefslogtreecommitdiff
path: root/drivers/s390/net/lcs.c
diff options
context:
space:
mode:
authorUrsula Braun <ursula.braun@de.ibm.com>2018-04-26 10:42:15 +0300
committerDavid S. Miller <davem@davemloft.net>2018-04-27 20:38:47 +0300
commit71c4689780f8f3e46f0110a2683f7dc36b356f68 (patch)
treec1f50a031fc7ef1a078152b21e2fa2a71c6fb31b /drivers/s390/net/lcs.c
parentd8de0ddfade012ee2e3030c60ff288b78ec0a717 (diff)
downloadlinux-71c4689780f8f3e46f0110a2683f7dc36b356f68.tar.xz
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>
Diffstat (limited to 'drivers/s390/net/lcs.c')
-rw-r--r--drivers/s390/net/lcs.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/s390/net/lcs.c b/drivers/s390/net/lcs.c
index 0ee8f33efb54..2d9fe7e4ee40 100644
--- a/drivers/s390/net/lcs.c
+++ b/drivers/s390/net/lcs.c
@@ -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))