net: fix dcbnl_setnumtcs operation check
authorDon Skidmore <donald.c.skidmore@intel.com>
Mon, 15 Dec 2008 09:06:23 +0000 (01:06 -0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 15 Dec 2008 09:06:23 +0000 (01:06 -0800)
dcbml_setnumtcs wasn't checking for the presence of the setnumtcs
function.  Instead, it was checking for setstate which was a bug.

Signed-off-by: Don Skidmore <donald.c.skidmore@intel.com>
Signed-off-by: Eric W Multanen <eric.w.multanen@intel.com>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/dcb/dcbnl.c

index 79a351d323af626a19a116cf70a26acb6fed642f..a1254061629f55a1ed3b74cc0b0ac1848ecb9224 100644 (file)
@@ -469,7 +469,7 @@ static int dcbnl_setnumtcs(struct net_device *netdev, struct nlattr **tb,
        u8 value;
        int i;
 
-       if (!tb[DCB_ATTR_NUMTCS] || !netdev->dcbnl_ops->setstate)
+       if (!tb[DCB_ATTR_NUMTCS] || !netdev->dcbnl_ops->setnumtcs)
                return ret;
 
        ret = nla_parse_nested(data, DCB_NUMTCS_ATTR_MAX, tb[DCB_ATTR_NUMTCS],