MCPcopy Create free account
hub / github.com/F-Stack/f-stack / bstp_set_autoptp

Function bstp_set_autoptp

freebsd/net/bridgestp.c:1674–1688  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1672}
1673
1674int
1675bstp_set_autoptp(struct bstp_port *bp, int set)
1676{
1677 struct bstp_state *bs = bp->bp_bs;
1678
1679 BSTP_LOCK(bs);
1680 if (set) {
1681 bp->bp_flags |= BSTP_PORT_AUTOPTP;
1682 if (bp->bp_role != BSTP_ROLE_DISABLED)
1683 taskqueue_enqueue(taskqueue_swi, &bp->bp_mediatask);
1684 } else
1685 bp->bp_flags &= ~BSTP_PORT_AUTOPTP;
1686 BSTP_UNLOCK(bs);
1687 return (0);
1688}
1689
1690/*
1691 * Calculate the path cost according to the link speed.

Callers 1

bridge_ioctl_sifflagsFunction · 0.85

Calls 1

taskqueue_enqueueFunction · 0.85

Tested by

no test coverage detected