]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commit - net/core/ethtool.c
ethtool: add ethtool_intersect_link_masks
authorAlan Brady <alan.brady@intel.com>
Thu, 5 Oct 2017 21:53:40 +0000 (14:53 -0700)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Tue, 17 Oct 2017 17:48:51 +0000 (10:48 -0700)
commit5a6cd6de76ae78b651e7c36eba8b1da465d65f06
treec9811c2b2602b081a541f65805a58ecb4b91a993
parent211b4c140a9de0a672a8f5c3cbaa3639ef507205
ethtool: add ethtool_intersect_link_masks

This function provides a way to intersect two link masks together to
find the common ground between them.  For example in i40e, the driver
first generates link masks for what is supported by the PHY type.  The
driver then gets the link masks for what the NVM supports.  The
resulting intersection between them yields what can truly be supported.

Signed-off-by: Alan Brady <alan.brady@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
include/linux/ethtool.h
net/core/ethtool.c