Lines Matching refs:network

19         assert(link->network);  in can_set_netlink_message()
34 if (link->network->can_bitrate > 0) { in can_set_netlink_message()
36 .bitrate = link->network->can_bitrate, in can_set_netlink_message()
37 .sample_point = link->network->can_sample_point, in can_set_netlink_message()
38 .sjw = link->network->can_sync_jump_width, in can_set_netlink_message()
42 if (link->network->can_sample_point > 0) in can_set_netlink_message()
50 } else if (link->network->can_time_quanta_ns > 0) { in can_set_netlink_message()
52 .tq = link->network->can_time_quanta_ns, in can_set_netlink_message()
53 .prop_seg = link->network->can_propagation_segment, in can_set_netlink_message()
54 .phase_seg1 = link->network->can_phase_buffer_segment_1, in can_set_netlink_message()
55 .phase_seg2 = link->network->can_phase_buffer_segment_2, in can_set_netlink_message()
56 .sjw = link->network->can_sync_jump_width, in can_set_netlink_message()
65 if (link->network->can_data_bitrate > 0) { in can_set_netlink_message()
67 .bitrate = link->network->can_data_bitrate, in can_set_netlink_message()
68 .sample_point = link->network->can_data_sample_point, in can_set_netlink_message()
69 .sjw = link->network->can_data_sync_jump_width, in can_set_netlink_message()
73 if (link->network->can_data_sample_point > 0) in can_set_netlink_message()
81 } else if (link->network->can_data_time_quanta_ns > 0) { in can_set_netlink_message()
83 .tq = link->network->can_data_time_quanta_ns, in can_set_netlink_message()
84 .prop_seg = link->network->can_data_propagation_segment, in can_set_netlink_message()
85 .phase_seg1 = link->network->can_data_phase_buffer_segment_1, in can_set_netlink_message()
86 .phase_seg2 = link->network->can_data_phase_buffer_segment_2, in can_set_netlink_message()
87 .sjw = link->network->can_data_sync_jump_width, in can_set_netlink_message()
96 if (link->network->can_restart_us > 0) { in can_set_netlink_message()
99 if (link->network->can_restart_us == USEC_INFINITY) in can_set_netlink_message()
102 restart_ms = DIV_ROUND_UP(link->network->can_restart_us, USEC_PER_MSEC); in can_set_netlink_message()
110 if (link->network->can_control_mode_mask != 0) { in can_set_netlink_message()
112 .mask = link->network->can_control_mode_mask, in can_set_netlink_message()
113 .flags = link->network->can_control_mode_flags, in can_set_netlink_message()
121 if (link->network->can_termination_set) { in can_set_netlink_message()
122 … log_link_debug(link, "Setting can-termination to '%u'.", link->network->can_termination); in can_set_netlink_message()
124 … r = sd_netlink_message_append_u16(m, IFLA_CAN_TERMINATION, link->network->can_termination); in can_set_netlink_message()
268 Network *network = userdata; in config_parse_can_control_mode() local
279 network->can_control_mode_mask &= ~mask; in config_parse_can_control_mode()
280 network->can_control_mode_flags &= ~mask; in config_parse_can_control_mode()
291 network->can_control_mode_mask |= mask; in config_parse_can_control_mode()
292 SET_FLAG(network->can_control_mode_flags, mask, r); in config_parse_can_control_mode()
308 Network *network = userdata; in config_parse_can_termination() local
317 network->can_termination_set = false; in config_parse_can_termination()
326 r = safe_atou16(rvalue, &network->can_termination); in config_parse_can_termination()
335 network->can_termination = r ? CAN_TERMINATION_DEFAULT_OHM_VALUE : 0; in config_parse_can_termination()
338 network->can_termination_set = true; in config_parse_can_termination()