]> git.baikalelectronics.ru Git - kernel.git/commit
i40e: Properly check allowed advertisement capabilities
authorJan Sokolowski <jan.sokolowski@intel.com>
Mon, 19 Mar 2018 16:28:03 +0000 (09:28 -0700)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Mon, 19 Mar 2018 16:42:20 +0000 (09:42 -0700)
commit05b1604702f0bcd6b67944f9bbe535ebe7f11065
tree642c78d1df74909886b5cbfb0e16e8eabc84b7f7
parentf82b57d3693742e711e35af5e2e3b56a702b1395
i40e: Properly check allowed advertisement capabilities

The i40e_set_link_ksettings and i40e_get_link_ksettings use different
codepaths to check available and supported advertisement modes. This
creates scenarios where it's possible to set a mode that's not allowed,
resulting in a link down.

Fix setting advertisement in i40e_set_link_ksettings by calling
i40e_get_link_ksettings to check what modes are allowed.

Signed-off-by: Jan Sokolowski <jan.sokolowski@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/i40e/i40e_ethtool.c