diff options
Diffstat (limited to 'net/dcb/dcbnl.c')
-rw-r--r-- | net/dcb/dcbnl.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/net/dcb/dcbnl.c b/net/dcb/dcbnl.c index ed1bb8c65a9e..3a6d97d5280c 100644 --- a/net/dcb/dcbnl.c +++ b/net/dcb/dcbnl.c | |||
@@ -1288,6 +1288,7 @@ static int dcbnl_ieee_get(struct net_device *netdev, struct nlattr **tb, | |||
1288 | struct nlattr *ieee, *app; | 1288 | struct nlattr *ieee, *app; |
1289 | struct dcb_app_type *itr; | 1289 | struct dcb_app_type *itr; |
1290 | const struct dcbnl_rtnl_ops *ops = netdev->dcbnl_ops; | 1290 | const struct dcbnl_rtnl_ops *ops = netdev->dcbnl_ops; |
1291 | int dcbx; | ||
1291 | int err; | 1292 | int err; |
1292 | 1293 | ||
1293 | if (!ops) | 1294 | if (!ops) |
@@ -1338,6 +1339,12 @@ static int dcbnl_ieee_get(struct net_device *netdev, struct nlattr **tb, | |||
1338 | } | 1339 | } |
1339 | } | 1340 | } |
1340 | } | 1341 | } |
1342 | |||
1343 | if (netdev->dcbnl_ops->getdcbx) | ||
1344 | dcbx = netdev->dcbnl_ops->getdcbx(netdev); | ||
1345 | else | ||
1346 | dcbx = -EOPNOTSUPP; | ||
1347 | |||
1341 | spin_unlock(&dcb_lock); | 1348 | spin_unlock(&dcb_lock); |
1342 | nla_nest_end(skb, app); | 1349 | nla_nest_end(skb, app); |
1343 | 1350 | ||
@@ -1366,6 +1373,11 @@ static int dcbnl_ieee_get(struct net_device *netdev, struct nlattr **tb, | |||
1366 | } | 1373 | } |
1367 | 1374 | ||
1368 | nla_nest_end(skb, ieee); | 1375 | nla_nest_end(skb, ieee); |
1376 | if (dcbx >= 0) { | ||
1377 | err = nla_put_u8(skb, DCB_ATTR_DCBX, dcbx); | ||
1378 | if (err) | ||
1379 | goto nla_put_failure; | ||
1380 | } | ||
1369 | nlmsg_end(skb, nlh); | 1381 | nlmsg_end(skb, nlh); |
1370 | 1382 | ||
1371 | return rtnl_unicast(skb, &init_net, pid); | 1383 | return rtnl_unicast(skb, &init_net, pid); |