File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change 15
15
#include <linux/kmod.h>
16
16
#include <linux/etherdevice.h>
17
17
#include <linux/rtnetlink.h>
18
+ #include <net/switchdev.h>
18
19
19
20
#include "br_private.h"
20
21
#include "br_private_stp.h"
@@ -35,11 +36,22 @@ static inline port_id br_make_port_id(__u8 priority, __u16 port_no)
35
36
/* called under bridge lock */
36
37
void br_init_port (struct net_bridge_port * p )
37
38
{
39
+ struct switchdev_attr attr = {
40
+ .id = SWITCHDEV_ATTR_ID_BRIDGE_AGEING_TIME ,
41
+ .flags = SWITCHDEV_F_SKIP_EOPNOTSUPP | SWITCHDEV_F_DEFER ,
42
+ .u .ageing_time = p -> br -> ageing_time ,
43
+ };
44
+ int err ;
45
+
38
46
p -> port_id = br_make_port_id (p -> priority , p -> port_no );
39
47
br_become_designated_port (p );
40
48
br_set_state (p , BR_STATE_BLOCKING );
41
49
p -> topology_change_ack = 0 ;
42
50
p -> config_pending = 0 ;
51
+
52
+ err = switchdev_port_attr_set (p -> dev , & attr );
53
+ if (err )
54
+ netdev_err (p -> dev , "failed to set HW ageing time\n" );
43
55
}
44
56
45
57
/* called under bridge lock */
You can’t perform that action at this time.
0 commit comments