Lines Matching refs:link_mode

184 static int hinic_get_link_mode_index(enum hinic_link_mode link_mode)  in hinic_get_link_mode_index()  argument
189 if (link_mode == hw_to_ethtool_link_mode_table[i].hw_link_mode) in hinic_get_link_mode_index()
200 enum hinic_link_mode link_mode; in hinic_add_ethtool_link_mode() local
203 for (link_mode = 0; link_mode < HINIC_LINK_MODE_NUMBERS; link_mode++) { in hinic_add_ethtool_link_mode()
204 if (hw_link_mode & ((u32)1 << link_mode)) { in hinic_add_ethtool_link_mode()
205 idx = hinic_get_link_mode_index(link_mode); in hinic_add_ethtool_link_mode()
260 struct hinic_link_mode_cmd link_mode = { 0 }; in hinic_get_link_ksettings() local
299 err = hinic_get_link_mode(nic_dev->hwdev, &link_mode); in hinic_get_link_ksettings()
300 if (err || link_mode.supported == HINIC_SUPPORTED_UNKNOWN || in hinic_get_link_ksettings()
301 link_mode.advertised == HINIC_SUPPORTED_UNKNOWN) in hinic_get_link_ksettings()
304 hinic_add_ethtool_link_mode(&settings, link_mode.supported, in hinic_get_link_ksettings()
306 hinic_add_ethtool_link_mode(&settings, link_mode.advertised, in hinic_get_link_ksettings()
347 enum hinic_link_mode link_mode; in hinic_is_support_speed() local
350 for (link_mode = 0; link_mode < HINIC_LINK_MODE_NUMBERS; link_mode++) { in hinic_is_support_speed()
351 if (!(supported_link & ((u32)1 << link_mode))) in hinic_is_support_speed()
354 idx = hinic_get_link_mode_index(link_mode); in hinic_is_support_speed()
367 struct hinic_link_mode_cmd link_mode = { 0 }; in hinic_is_speed_legal() local
372 err = hinic_get_link_mode(nic_dev->hwdev, &link_mode); in hinic_is_speed_legal()
376 if (link_mode.supported == HINIC_SUPPORTED_UNKNOWN || in hinic_is_speed_legal()
377 link_mode.advertised == HINIC_SUPPORTED_UNKNOWN) in hinic_is_speed_legal()
382 !hinic_is_support_speed(link_mode.supported, speed)) { in hinic_is_speed_legal()