@@ -904,6 +904,23 @@ static int team_mode_option_set(struct team *team, struct team_gsetter_ctx *ctx)
904
904
return team_change_mode (team , ctx -> data .str_val );
905
905
}
906
906
907
+ static int team_port_en_option_get (struct team * team ,
908
+ struct team_gsetter_ctx * ctx )
909
+ {
910
+ ctx -> data .bool_val = team_port_enabled (ctx -> port );
911
+ return 0 ;
912
+ }
913
+
914
+ static int team_port_en_option_set (struct team * team ,
915
+ struct team_gsetter_ctx * ctx )
916
+ {
917
+ if (ctx -> data .bool_val )
918
+ team_port_enable (team , ctx -> port );
919
+ else
920
+ team_port_disable (team , ctx -> port );
921
+ return 0 ;
922
+ }
923
+
907
924
static int team_user_linkup_option_get (struct team * team ,
908
925
struct team_gsetter_ctx * ctx )
909
926
{
@@ -945,6 +962,13 @@ static const struct team_option team_options[] = {
945
962
.getter = team_mode_option_get ,
946
963
.setter = team_mode_option_set ,
947
964
},
965
+ {
966
+ .name = "enabled" ,
967
+ .type = TEAM_OPTION_TYPE_BOOL ,
968
+ .per_port = true,
969
+ .getter = team_port_en_option_get ,
970
+ .setter = team_port_en_option_set ,
971
+ },
948
972
{
949
973
.name = "user_linkup" ,
950
974
.type = TEAM_OPTION_TYPE_BOOL ,
0 commit comments