Lines Matching refs:link_mode
185 static int hinic_get_link_mode_index(enum hinic_link_mode link_mode) in hinic_get_link_mode_index() argument
190 if (link_mode == hw_to_ethtool_link_mode_table[i].hw_link_mode) in hinic_get_link_mode_index()
201 enum hinic_link_mode link_mode; in hinic_add_ethtool_link_mode() local
204 for (link_mode = 0; link_mode < HINIC_LINK_MODE_NUMBERS; link_mode++) { in hinic_add_ethtool_link_mode()
205 if (hw_link_mode & ((u32)1 << link_mode)) { in hinic_add_ethtool_link_mode()
206 idx = hinic_get_link_mode_index(link_mode); in hinic_add_ethtool_link_mode()
261 struct hinic_link_mode_cmd link_mode = { 0 }; in hinic_get_link_ksettings() local
300 err = hinic_get_link_mode(nic_dev->hwdev, &link_mode); in hinic_get_link_ksettings()
301 if (err || link_mode.supported == HINIC_SUPPORTED_UNKNOWN || in hinic_get_link_ksettings()
302 link_mode.advertised == HINIC_SUPPORTED_UNKNOWN) in hinic_get_link_ksettings()
305 hinic_add_ethtool_link_mode(&settings, link_mode.supported, in hinic_get_link_ksettings()
307 hinic_add_ethtool_link_mode(&settings, link_mode.advertised, in hinic_get_link_ksettings()
350 enum hinic_link_mode link_mode; in hinic_is_support_speed() local
353 for (link_mode = 0; link_mode < HINIC_LINK_MODE_NUMBERS; link_mode++) { in hinic_is_support_speed()
354 if (!(supported_link & ((u32)1 << link_mode))) in hinic_is_support_speed()
357 idx = hinic_get_link_mode_index(link_mode); in hinic_is_support_speed()
370 struct hinic_link_mode_cmd link_mode = { 0 }; in hinic_is_speed_legal() local
375 err = hinic_get_link_mode(nic_dev->hwdev, &link_mode); in hinic_is_speed_legal()
379 if (link_mode.supported == HINIC_SUPPORTED_UNKNOWN || in hinic_is_speed_legal()
380 link_mode.advertised == HINIC_SUPPORTED_UNKNOWN) in hinic_is_speed_legal()
385 !hinic_is_support_speed(link_mode.supported, speed)) { in hinic_is_speed_legal()