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. For valid link states see the discussion 36of 37.Sy MAC_PROP_STATUS 38in the 39.Sx 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. As discussed in the 48.Sx Link Updates 49section of 50.Xr mac 9E , 51the driver should call this whenever it detects that the state of the 52link has changed. If the state has not changed, then the driver should 53not call this function. In addition, if the device driver is powering 54off the link or is transitioning to a state where it can no longer 55determine the link status, then it should make sure to call this 56function with the value of 57.Fa link 58set to 59.Sy LINK_STATE_UNKNOWN . 60.Pp 61Device drivers should ensure that they're not holding any of their 62specific locks when calling this function. 63.Sh CONTEXT 64The 65.Fn mac_link_update 66function may be called from 67.Sy user , 68.Sy kernel , 69or 70.Sy interrupt 71context. 72.Sh SEE ALSO 73.Xr mac 9E , 74.Xr mac_register 9F 75