summaryrefslogtreecommitdiffstats
path: root/drivers/net/ixgbe/ixgbe_dcb_nl.c
diff options
context:
space:
mode:
authorJohn Fastabend2011-02-23 06:57:52 +0100
committerJeff Kirsher2011-03-12 13:11:11 +0100
commitdc166e22ede5ffb46b5b18b99ba0321ae545f89b (patch)
tree7e83a3db691fae1502f49453888762e9325e76d7 /drivers/net/ixgbe/ixgbe_dcb_nl.c
parentixgbe: DCB, implement ieee_setapp dcbnl ops (diff)
downloadkernel-qcow2-linux-dc166e22ede5ffb46b5b18b99ba0321ae545f89b.tar.gz
kernel-qcow2-linux-dc166e22ede5ffb46b5b18b99ba0321ae545f89b.tar.xz
kernel-qcow2-linux-dc166e22ede5ffb46b5b18b99ba0321ae545f89b.zip
ixgbe: DCB remove ixgbe_fcoe_getapp routine
Remove ixgbe_fcoe_getapp() and use the generic kernel routine instead. Also add application priority to the kernel maintained list on setapp so applications and stacks can query the value. Signed-off-by: John Fastabend <john.r.fastabend@intel.com> Tested-by: Ross Brattain <ross.b.brattain@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Diffstat (limited to 'drivers/net/ixgbe/ixgbe_dcb_nl.c')
-rw-r--r--drivers/net/ixgbe/ixgbe_dcb_nl.c28
1 files changed, 13 insertions, 15 deletions
diff --git a/drivers/net/ixgbe/ixgbe_dcb_nl.c b/drivers/net/ixgbe/ixgbe_dcb_nl.c
index 8d139f7b393a..d4b2914376db 100644
--- a/drivers/net/ixgbe/ixgbe_dcb_nl.c
+++ b/drivers/net/ixgbe/ixgbe_dcb_nl.c
@@ -542,24 +542,15 @@ static void ixgbe_dcbnl_setpfcstate(struct net_device *netdev, u8 state)
static u8 ixgbe_dcbnl_getapp(struct net_device *netdev, u8 idtype, u16 id)
{
struct ixgbe_adapter *adapter = netdev_priv(netdev);
- u8 rval = 0;
+ struct dcb_app app = {
+ .selector = idtype,
+ .protocol = id,
+ };
if (!(adapter->dcbx_cap & DCB_CAP_DCBX_VER_CEE))
- return rval;
+ return 0;
- switch (idtype) {
- case DCB_APP_IDTYPE_ETHTYPE:
-#ifdef IXGBE_FCOE
- if (id == ETH_P_FCOE)
- rval = ixgbe_fcoe_getapp(adapter);
-#endif
- break;
- case DCB_APP_IDTYPE_PORTNUM:
- break;
- default:
- break;
- }
- return rval;
+ return dcb_getapp(netdev, &app);
}
/**
@@ -576,10 +567,17 @@ static u8 ixgbe_dcbnl_setapp(struct net_device *netdev,
{
struct ixgbe_adapter *adapter = netdev_priv(netdev);
u8 rval = 1;
+ struct dcb_app app = {
+ .selector = idtype,
+ .protocol = id,
+ .priority = up
+ };
if (!(adapter->dcbx_cap & DCB_CAP_DCBX_VER_CEE))
return rval;
+ rval = dcb_setapp(netdev, &app);
+
switch (idtype) {
case DCB_APP_IDTYPE_ETHTYPE:
#ifdef IXGBE_FCOE