| 896 | } |
| 897 | |
| 898 | static void |
| 899 | bstp_update_state(struct bstp_state *bs, struct bstp_port *bp) |
| 900 | { |
| 901 | struct bstp_port *bp2; |
| 902 | int synced; |
| 903 | |
| 904 | BSTP_LOCK_ASSERT(bs); |
| 905 | |
| 906 | /* check if all the ports have syncronised again */ |
| 907 | if (!bs->bs_allsynced) { |
| 908 | synced = 1; |
| 909 | LIST_FOREACH(bp2, &bs->bs_bplist, bp_next) { |
| 910 | if (!(bp2->bp_synced || |
| 911 | bp2->bp_role == BSTP_ROLE_ROOT)) { |
| 912 | synced = 0; |
| 913 | break; |
| 914 | } |
| 915 | } |
| 916 | bs->bs_allsynced = synced; |
| 917 | } |
| 918 | |
| 919 | bstp_update_roles(bs, bp); |
| 920 | bstp_update_tc(bp); |
| 921 | } |
| 922 | |
| 923 | static void |
| 924 | bstp_update_roles(struct bstp_state *bs, struct bstp_port *bp) |
no test coverage detected