| 1570 | } |
| 1571 | |
| 1572 | int |
| 1573 | bstp_set_priority(struct bstp_state *bs, int pri) |
| 1574 | { |
| 1575 | if (pri < 0 || pri > BSTP_MAX_PRIORITY) |
| 1576 | return (EINVAL); |
| 1577 | |
| 1578 | /* Limit to steps of 4096 */ |
| 1579 | pri -= pri % 4096; |
| 1580 | |
| 1581 | BSTP_LOCK(bs); |
| 1582 | bs->bs_bridge_priority = pri; |
| 1583 | bstp_reinit(bs); |
| 1584 | BSTP_UNLOCK(bs); |
| 1585 | return (0); |
| 1586 | } |
| 1587 | |
| 1588 | int |
| 1589 | bstp_set_port_priority(struct bstp_port *bp, int pri) |
no test coverage detected