/* This function updates the value of the selected variable, using the partner administrative parameter values. The administrative values are compared with the corresponding operational parameter values for the partner. If one or more of the comparisons shows that the administrative value(s) differ from the current operational values, then Selected is set to FALSE and actor_oper_port_state.synchronization is set to OUT_OF_SYNC. Otherwise, Selected remains unchanged.  */
static void __update_default_selected(struct port *port)
/* This function updates the value of the selected variable, using the partner administrative parameter values. The administrative values are compared with the corresponding operational parameter values for the partner. If one or more of the comparisons shows that the administrative value(s) differ from the current operational values, then Selected is set to FALSE and actor_oper_port_state.synchronization is set to OUT_OF_SYNC. Otherwise, Selected remains unchanged.  */
static void __update_default_selected(struct port *port)
{
	if (port) {
		const struct port_params *admin = &port->partner_admin;
		const struct port_params *oper = &port->partner_oper;
		if (admin->port_number != oper->port_number ||
		    admin->port_priority != oper->port_priority ||
		    MAC_ADDRESS_COMPARE(&admin->system, &oper->system) ||
		    admin->system_priority != oper->system_priority ||
		    admin->key != oper->key ||
		    (admin->port_state & AD_STATE_AGGREGATION)
			!= (oper->port_state & AD_STATE_AGGREGATION)) {
			port->sm_vars &= ~AD_PORT_SELECTED;
		}
	}
}