s390/qeth: implement ndo_bridge_getlink for learning_sync
authorAlexandra Winter <wintera@linux.ibm.com>
Thu, 10 Sep 2020 17:23:50 +0000 (19:23 +0200)
committerDavid S. Miller <davem@davemloft.net>
Tue, 15 Sep 2020 20:21:47 +0000 (13:21 -0700)
commit780b6e7db25ed97248b7f747e98d2f7e7971156a
tree3eb0d8d7ee2bf95e03fe6d8dc40ce9c123aabba8
parent817741a8eaa21cc46baf6c4852e4ff83204b8181
s390/qeth: implement ndo_bridge_getlink for learning_sync

Documentation/networking/switchdev.txt and 'man bridge' indicate that the
learning_sync bridge attribute is used to indicate whether a given
device will sync MAC addresses learned on its device port to a master
bridge FDB.

learning_sync attribute can not be read while interface is offline (down).
See
'commit e6e771b3d897 ("s390/qeth: detach netdevice while card is offline")'
We return EOPNOTSUPP and not EONODEV in this case, because EONOTSUPP is the
only rc that is tolerated by 'bridge -d link show'.

Signed-off-by: Alexandra Winter <wintera@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>
drivers/s390/net/qeth_l2_main.c