Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932134AbcC2Ks3 (ORCPT ); Tue, 29 Mar 2016 06:48:29 -0400 Received: from cmccmta1.chinamobile.com ([221.176.66.79]:12219 "EHLO cmccmta1.chinamobile.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751522AbcC2Ks1 (ORCPT ); Tue, 29 Mar 2016 06:48:27 -0400 X-RM-TRANSID: 2ee456fa5d6ea65-28de7 X-RM-SPAM-FLAG: 00000000 X-RM-TRANSID: 2ee956fa5d6e3cd-a015e From: Haishuang Yan To: Stephen Hemminger , "David S. Miller" Cc: bridge@lists.linux-foundation.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Haishuang Yan Subject: [PATCH] bridge: Allow set bridge ageing time when switchdev disabled Date: Tue, 29 Mar 2016 18:48:08 +0800 Message-Id: <1459248488-25621-1-git-send-email-yanhaishuang@cmss.chinamobile.com> X-Mailer: git-send-email 2.5.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 667 Lines: 25 When NET_SWITCHDEV=n, switchdev_port_attr_set will return -EOPNOTSUPP, we should ignore this error code and continue to set the ageing time. Signed-off-by: Haishuang Yan --- net/bridge/br_stp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/bridge/br_stp.c b/net/bridge/br_stp.c index e234490..9cb7044 100644 --- a/net/bridge/br_stp.c +++ b/net/bridge/br_stp.c @@ -582,7 +582,7 @@ int br_set_ageing_time(struct net_bridge *br, u32 ageing_time) int err; err = switchdev_port_attr_set(br->dev, &attr); - if (err) + if (err && err != -EOPNOTSUPP) return err; br->ageing_time = t; -- 1.8.3.1