1.\" 2.\" This file and its contents are supplied under the terms of the 3.\" Common Development and Distribution License ("CDDL"), version 1.0. 4.\" You may only use this file in accordance with the terms of version 5.\" 1.0 of the CDDL. 6.\" 7.\" A full copy of the text of the CDDL should have accompanied this 8.\" source. A copy of the CDDL is also available via the Internet at 9.\" http://www.illumos.org/license/CDDL. 10.\" 11.\" 12.\" Copyright 2016 Joyent, Inc. 13.\" 14.Dd May 31, 2016 15.Dt MAC_LINK_UPDATE 9F 16.Os 17.Sh NAME 18.Nm mac_link_update 19.Nd inform the MAC layer about a link state change 20.Sh SYNOPSIS 21.In sys/mac_provider.h 22.Ft void 23.Fo mac_link_update 24.Fa "mac_handle_t mh" 25.Fa "link_state_t link" 26.Fc 27.Sh INTERFACE LEVEL 28illumos DDI specific 29.Sh PARAMETERS 30.Bl -tag -width Fa 31.It Fa mh 32The MAC handle obtained from a call to 33.Xr mac_register 9F . 34.It Fa link 35The current state of the link. 36For valid link states see the discussion of 37.Sy MAC_PROP_STATUS 38in the 39.Sy PROPERTIES 40section of 41.Xr mac 9E . 42.El 43.Sh DESCRIPTION 44The 45.Fn mac_link_update 46function is used by device drivers to inform the MAC layer that the 47state of a link has changed. 48As discussed in the 49.Sy Link Updates 50section of 51.Xr mac 9E , 52the driver should call this whenever it detects that the state of the 53link has changed. 54If the state has not changed, then the driver should not call this function. 55In addition, if the device driver is powering off the link or is transitioning 56to a state where it can no longer determine the link status, then it should make 57sure to call this function with the value of 58.Fa link 59set to 60.Sy LINK_STATE_UNKNOWN . 61.Pp 62Device drivers should ensure that they're not holding any of their 63specific locks when calling this function. 64.Sh CONTEXT 65The 66.Fn mac_link_update 67function may be called from 68.Sy user , 69.Sy kernel , 70or 71.Sy interrupt 72context. 73.Sh SEE ALSO 74.Xr mac 9E , 75.Xr mac_register 9F 76