Enable conditional use of ETHTOOL features in the NIC driver

The retrieval of the NIC speed, duplex, and autonegotiation
capabilities using the ETHTOOL driver extensions is not supported in
every NIC.

Depending on the driver, the use of the ETHTOOL_GSET command may
result in undesirable messages being printed by the kernel. In order
to avoid these kernel messages a compile time switch is added.  By
default the switch disables the use of the ETHTOOL features. Enable
the ETHTOOL feature by adding:
  EXTRA_OECONF_append = " --enable-nic-ethtool=yes"
to the phosphor-network bbappend file.

Tested:
Compiled the source without changing the bbappend file. The code
compiled as is, and after code was added that would cause a compile
time failure.
Loaded the code, and performed a Redfish read of the NIC.  The
SpeedMbps field was confirmed to be set to 0.

Enabled compiling the code by adding the EXTRA_OECONF entry to the
bbappend file. The code compiled as is, and failed to compile after
adding invalid code to the protected blocks.
Loaded the code, and performed a Redfish read of the NIC.  The
SpeedMbps reported the correct link speed.

Change-Id: If03e7d473d439ebb4a01b5d3f45e37ede2a5a84f
Signed-off-by: Johnathan Mantey <johnathanx.mantey@intel.com>
3 files changed