Patchwork [net,next] bnx2x: Add dcbnl notification

login
register
mail settings
Submitter Shmulik Ravid
Date July 7, 2011, 1:55 p.m.
Message ID <1310046941.22577.20.camel@lb-tlvb-shmulik.il.broadcom.com>
Download mbox | patch
Permalink /patch/103645/
State Accepted
Delegated to: David Miller
Headers show

Comments

David Miller - July 7, 2011, 12:11 p.m.
From: "Shmulik Ravid" <shmulikr@broadcom.com>
Date: Thu, 7 Jul 2011 16:55:41 +0300

> This patch adds a dcbnl notification to the bnx2x. The notification is
> sent to user mode clients following a change in the dcb negotiated
> parameters as resolved by the embedded DCBX stack. 
> 
> Signed-off-by: Shmulik Ravid <shmulikr@broadcom.com>
> Signed-off-by: Eilon Greenstein <eilong@broadcom.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
Shmulik Ravid - July 7, 2011, 1:55 p.m.
This patch adds a dcbnl notification to the bnx2x. The notification is
sent to user mode clients following a change in the dcb negotiated
parameters as resolved by the embedded DCBX stack. 

Signed-off-by: Shmulik Ravid <shmulikr@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
---
 drivers/net/bnx2x/bnx2x_dcb.c |   12 +++++++++---
 1 files changed, 9 insertions(+), 3 deletions(-)

Patch

diff --git a/drivers/net/bnx2x/bnx2x_dcb.c b/drivers/net/bnx2x/bnx2x_dcb.c
index b51a759..45cf3ce 100644
--- a/drivers/net/bnx2x/bnx2x_dcb.c
+++ b/drivers/net/bnx2x/bnx2x_dcb.c
@@ -19,14 +19,14 @@ 
 #include <linux/netdevice.h>
 #include <linux/types.h>
 #include <linux/errno.h>
-#ifdef BCM_DCBNL
-#include <linux/dcbnl.h>
-#endif
 
 #include "bnx2x.h"
 #include "bnx2x_cmn.h"
 #include "bnx2x_dcb.h"
 
+#ifdef BCM_DCBNL
+#include <linux/rtnetlink.h>
+#endif
 
 /* forward declarations of dcbx related functions */
 static void bnx2x_dcbx_stop_hw_tx(struct bnx2x *bp);
@@ -702,6 +702,12 @@  void bnx2x_dcbx_set_params(struct bnx2x *bp, u32 state)
 	case BNX2X_DCBX_STATE_TX_RELEASED:
 		DP(NETIF_MSG_LINK, "BNX2X_DCBX_STATE_TX_RELEASED\n");
 		bnx2x_fw_command(bp, DRV_MSG_CODE_DCBX_PMF_DRV_OK, 0);
+#ifdef BCM_DCBNL
+		/**
+		 * Send a notification for the new negotiated parameters
+		 */
+		dcbnl_cee_notify(bp->dev, RTM_GETDCB, DCB_CMD_CEE_GET, 0, 0);
+#endif
 		return;
 	default:
 		BNX2X_ERR("Unknown DCBX_STATE\n");