aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/net/ixgbe/ixgbe_dcb_nl.c20
-rw-r--r--include/linux/dcbnl.h2
-rw-r--r--net/dcb/dcbnl.c6
3 files changed, 26 insertions, 2 deletions
diff --git a/drivers/net/ixgbe/ixgbe_dcb_nl.c b/drivers/net/ixgbe/ixgbe_dcb_nl.c
index 7d158a5c545b..8ac639d0da03 100644
--- a/drivers/net/ixgbe/ixgbe_dcb_nl.c
+++ b/drivers/net/ixgbe/ixgbe_dcb_nl.c
@@ -93,6 +93,8 @@ int ixgbe_copy_dcb_cfg(struct ixgbe_dcb_config *src_dcb_cfg,
93 dst_dcb_cfg->bcn.rp_admin_mode[i - DCB_BCN_ATTR_RP_0] = 93 dst_dcb_cfg->bcn.rp_admin_mode[i - DCB_BCN_ATTR_RP_0] =
94 src_dcb_cfg->bcn.rp_admin_mode[i - DCB_BCN_ATTR_RP_0]; 94 src_dcb_cfg->bcn.rp_admin_mode[i - DCB_BCN_ATTR_RP_0];
95 } 95 }
96 dst_dcb_cfg->bcn.bcna_option[0] = src_dcb_cfg->bcn.bcna_option[0];
97 dst_dcb_cfg->bcn.bcna_option[1] = src_dcb_cfg->bcn.bcna_option[1];
96 dst_dcb_cfg->bcn.rp_alpha = src_dcb_cfg->bcn.rp_alpha; 98 dst_dcb_cfg->bcn.rp_alpha = src_dcb_cfg->bcn.rp_alpha;
97 dst_dcb_cfg->bcn.rp_beta = src_dcb_cfg->bcn.rp_beta; 99 dst_dcb_cfg->bcn.rp_beta = src_dcb_cfg->bcn.rp_beta;
98 dst_dcb_cfg->bcn.rp_gd = src_dcb_cfg->bcn.rp_gd; 100 dst_dcb_cfg->bcn.rp_gd = src_dcb_cfg->bcn.rp_gd;
@@ -457,6 +459,12 @@ static void ixgbe_dcbnl_getbcncfg(struct net_device *netdev, int enum_index,
457 struct ixgbe_adapter *adapter = netdev_priv(netdev); 459 struct ixgbe_adapter *adapter = netdev_priv(netdev);
458 460
459 switch (enum_index) { 461 switch (enum_index) {
462 case DCB_BCN_ATTR_BCNA_0:
463 *setting = adapter->dcb_cfg.bcn.bcna_option[0];
464 break;
465 case DCB_BCN_ATTR_BCNA_1:
466 *setting = adapter->dcb_cfg.bcn.bcna_option[1];
467 break;
460 case DCB_BCN_ATTR_ALPHA: 468 case DCB_BCN_ATTR_ALPHA:
461 *setting = adapter->dcb_cfg.bcn.rp_alpha; 469 *setting = adapter->dcb_cfg.bcn.rp_alpha;
462 break; 470 break;
@@ -516,6 +524,18 @@ static void ixgbe_dcbnl_setbcncfg(struct net_device *netdev, int enum_index,
516 struct ixgbe_adapter *adapter = netdev_priv(netdev); 524 struct ixgbe_adapter *adapter = netdev_priv(netdev);
517 525
518 switch (enum_index) { 526 switch (enum_index) {
527 case DCB_BCN_ATTR_BCNA_0:
528 adapter->temp_dcb_cfg.bcn.bcna_option[0] = setting;
529 if (adapter->temp_dcb_cfg.bcn.bcna_option[0] !=
530 adapter->dcb_cfg.bcn.bcna_option[0])
531 adapter->dcb_set_bitmap |= BIT_BCN;
532 break;
533 case DCB_BCN_ATTR_BCNA_1:
534 adapter->temp_dcb_cfg.bcn.bcna_option[1] = setting;
535 if (adapter->temp_dcb_cfg.bcn.bcna_option[1] !=
536 adapter->dcb_cfg.bcn.bcna_option[1])
537 adapter->dcb_set_bitmap |= BIT_BCN;
538 break;
519 case DCB_BCN_ATTR_ALPHA: 539 case DCB_BCN_ATTR_ALPHA:
520 adapter->temp_dcb_cfg.bcn.rp_alpha = setting; 540 adapter->temp_dcb_cfg.bcn.rp_alpha = setting;
521 if (adapter->temp_dcb_cfg.bcn.rp_alpha != 541 if (adapter->temp_dcb_cfg.bcn.rp_alpha !=
diff --git a/include/linux/dcbnl.h b/include/linux/dcbnl.h
index e73a61449ad6..b0ef274e0031 100644
--- a/include/linux/dcbnl.h
+++ b/include/linux/dcbnl.h
@@ -305,6 +305,8 @@ enum dcbnl_bcn_attrs{
305 DCB_BCN_ATTR_RP_7, 305 DCB_BCN_ATTR_RP_7,
306 DCB_BCN_ATTR_RP_ALL, 306 DCB_BCN_ATTR_RP_ALL,
307 307
308 DCB_BCN_ATTR_BCNA_0,
309 DCB_BCN_ATTR_BCNA_1,
308 DCB_BCN_ATTR_ALPHA, 310 DCB_BCN_ATTR_ALPHA,
309 DCB_BCN_ATTR_BETA, 311 DCB_BCN_ATTR_BETA,
310 DCB_BCN_ATTR_GD, 312 DCB_BCN_ATTR_GD,
diff --git a/net/dcb/dcbnl.c b/net/dcb/dcbnl.c
index fc88fc4d4f63..5dbfe5fdc0d6 100644
--- a/net/dcb/dcbnl.c
+++ b/net/dcb/dcbnl.c
@@ -140,6 +140,8 @@ static struct nla_policy dcbnl_bcn_nest[DCB_BCN_ATTR_MAX + 1] = {
140 [DCB_BCN_ATTR_RP_6] = {.type = NLA_U8}, 140 [DCB_BCN_ATTR_RP_6] = {.type = NLA_U8},
141 [DCB_BCN_ATTR_RP_7] = {.type = NLA_U8}, 141 [DCB_BCN_ATTR_RP_7] = {.type = NLA_U8},
142 [DCB_BCN_ATTR_RP_ALL] = {.type = NLA_FLAG}, 142 [DCB_BCN_ATTR_RP_ALL] = {.type = NLA_FLAG},
143 [DCB_BCN_ATTR_BCNA_0] = {.type = NLA_U32},
144 [DCB_BCN_ATTR_BCNA_1] = {.type = NLA_U32},
143 [DCB_BCN_ATTR_ALPHA] = {.type = NLA_U32}, 145 [DCB_BCN_ATTR_ALPHA] = {.type = NLA_U32},
144 [DCB_BCN_ATTR_BETA] = {.type = NLA_U32}, 146 [DCB_BCN_ATTR_BETA] = {.type = NLA_U32},
145 [DCB_BCN_ATTR_GD] = {.type = NLA_U32}, 147 [DCB_BCN_ATTR_GD] = {.type = NLA_U32},
@@ -922,7 +924,7 @@ static int dcbnl_bcn_getcfg(struct net_device *netdev, struct nlattr **tb,
922 goto err_bcn; 924 goto err_bcn;
923 } 925 }
924 926
925 for (i = DCB_BCN_ATTR_ALPHA; i <= DCB_BCN_ATTR_RI; i++) { 927 for (i = DCB_BCN_ATTR_BCNA_0; i <= DCB_BCN_ATTR_RI; i++) {
926 if (!getall && !bcn_tb[i]) 928 if (!getall && !bcn_tb[i])
927 continue; 929 continue;
928 930
@@ -980,7 +982,7 @@ static int dcbnl_bcn_setcfg(struct net_device *netdev, struct nlattr **tb,
980 data[i]->nla_type - DCB_BCN_ATTR_RP_0, value_byte); 982 data[i]->nla_type - DCB_BCN_ATTR_RP_0, value_byte);
981 } 983 }
982 984
983 for (i = DCB_BCN_ATTR_ALPHA; i <= DCB_BCN_ATTR_RI; i++) { 985 for (i = DCB_BCN_ATTR_BCNA_0; i <= DCB_BCN_ATTR_RI; i++) {
984 if (data[i] == NULL) 986 if (data[i] == NULL)
985 continue; 987 continue;
986 value_int = nla_get_u32(data[i]); 988 value_int = nla_get_u32(data[i]);