Subject: [PATCH v2] net: dsa: qca8k: enable port flow control

From: xiaofeis <[email-masked]>
Date: Wed, 24 Jul 2019 13:02:56 +0800

Set phy device advertising to enable MAC flow control.

Signed-off-by: Xiaofei Shen <[email-masked]>
---
 drivers/net/dsa/qca8k.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/net/dsa/qca8k.c b/drivers/net/dsa/qca8k.c
index 232e8cc..c5ac426 100644
--- a/drivers/net/dsa/qca8k.c
+++ b/drivers/net/dsa/qca8k.c
@@ -2,7 +2,7 @@
 /*
  * Copyright (C) 2009 Felix Fietkau <[email-masked]>
  * Copyright (C) 2011-2012 Gabor Juhos <[email-masked]>
- * Copyright (c) 2015, The Linux Foundation. All rights reserved.
+ * Copyright (c) 2015, 2019, The Linux Foundation. All rights reserved.
  * Copyright (c) 2016 John Crispin <[email-masked]>
  */
 
@@ -935,6 +935,8 @@
 	qca8k_port_set_status(priv, port, 1);
 	priv->port_sts[port].enabled = 1;
 
+	phy->advertising |= ADVERTISED_Pause | ADVERTISED_Asym_Pause;
+
 	return 0;
 }
 
-- 
1.9.1