Patchwork [NET-NEXT,2/2] net: fix dcbnl_setnumtcs operation check

login
register
mail settings
Submitter Jeff Kirsher
Date Dec. 12, 2008, 9:52 a.m.
Message ID <20081212095244.4416.19017.stgit@lost.foo-projects.org>
Download mbox | patch
Permalink /patch/13694/
State Accepted
Delegated to: David Miller
Headers show

Comments

Jeff Kirsher - Dec. 12, 2008, 9:52 a.m.
From: Don Skidmore <donald.c.skidmore@intel.com>

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>
---

 net/dcb/dcbnl.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)


--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
David Miller - Dec. 15, 2008, 9:06 a.m.
From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Date: Fri, 12 Dec 2008 01:52:45 -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>

Applied.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch

diff --git a/net/dcb/dcbnl.c b/net/dcb/dcbnl.c
index d0c12f0..fc88fc4 100644
--- a/net/dcb/dcbnl.c
+++ b/net/dcb/dcbnl.c
@@ -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],