diff options
-rw-r--r-- | drivers/net/ixgbe/ixgbe_dcb_nl.c | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/drivers/net/ixgbe/ixgbe_dcb_nl.c b/drivers/net/ixgbe/ixgbe_dcb_nl.c index d7c456f685ff..8d139f7b393a 100644 --- a/drivers/net/ixgbe/ixgbe_dcb_nl.c +++ b/drivers/net/ixgbe/ixgbe_dcb_nl.c | |||
@@ -709,6 +709,35 @@ static int ixgbe_dcbnl_ieee_setpfc(struct net_device *dev, | |||
709 | return err; | 709 | return err; |
710 | } | 710 | } |
711 | 711 | ||
712 | static int ixgbe_dcbnl_ieee_setapp(struct net_device *dev, | ||
713 | struct dcb_app *app) | ||
714 | { | ||
715 | struct ixgbe_adapter *adapter = netdev_priv(dev); | ||
716 | |||
717 | if (!(adapter->dcbx_cap & DCB_CAP_DCBX_VER_IEEE)) | ||
718 | return -EINVAL; | ||
719 | #ifdef IXGBE_FCOE | ||
720 | if (app->selector == 1 && app->protocol == ETH_P_FCOE) { | ||
721 | if (adapter->fcoe.tc == app->priority) | ||
722 | goto setapp; | ||
723 | |||
724 | /* In IEEE mode map up to tc 1:1 */ | ||
725 | adapter->fcoe.tc = app->priority; | ||
726 | adapter->fcoe.up = app->priority; | ||
727 | |||
728 | /* Force hardware reset required to push FCoE | ||
729 | * setup on {tx|rx}_rings | ||
730 | */ | ||
731 | adapter->dcb_set_bitmap |= BIT_APP_UPCHG; | ||
732 | ixgbe_dcbnl_set_all(dev); | ||
733 | } | ||
734 | |||
735 | setapp: | ||
736 | #endif | ||
737 | dcb_setapp(dev, app); | ||
738 | return 0; | ||
739 | } | ||
740 | |||
712 | static u8 ixgbe_dcbnl_getdcbx(struct net_device *dev) | 741 | static u8 ixgbe_dcbnl_getdcbx(struct net_device *dev) |
713 | { | 742 | { |
714 | struct ixgbe_adapter *adapter = netdev_priv(dev); | 743 | struct ixgbe_adapter *adapter = netdev_priv(dev); |
@@ -759,6 +788,7 @@ const struct dcbnl_rtnl_ops dcbnl_ops = { | |||
759 | .ieee_setets = ixgbe_dcbnl_ieee_setets, | 788 | .ieee_setets = ixgbe_dcbnl_ieee_setets, |
760 | .ieee_getpfc = ixgbe_dcbnl_ieee_getpfc, | 789 | .ieee_getpfc = ixgbe_dcbnl_ieee_getpfc, |
761 | .ieee_setpfc = ixgbe_dcbnl_ieee_setpfc, | 790 | .ieee_setpfc = ixgbe_dcbnl_ieee_setpfc, |
791 | .ieee_setapp = ixgbe_dcbnl_ieee_setapp, | ||
762 | .getstate = ixgbe_dcbnl_get_state, | 792 | .getstate = ixgbe_dcbnl_get_state, |
763 | .setstate = ixgbe_dcbnl_set_state, | 793 | .setstate = ixgbe_dcbnl_set_state, |
764 | .getpermhwaddr = ixgbe_dcbnl_get_perm_hw_addr, | 794 | .getpermhwaddr = ixgbe_dcbnl_get_perm_hw_addr, |