Prevent invalid ixgbe advertise setting warning

Prevent ixgbe outputting "Invalid advertised speed" warning on boot with
no customisations by moving test from sysctl handler to set handler.

PR:		208022
MFC after:	3 days
Sponsored by:	Multiplay
This commit is contained in:
Steven Hartland 2016-03-16 01:41:55 +00:00
parent 54bc9e303d
commit d775d23ac5

View File

@ -4749,10 +4749,6 @@ ixgbe_sysctl_advertise(SYSCTL_HANDLER_ARGS)
if ((error) || (req->newptr == NULL))
return (error);
/* Checks to validate new value */
if (adapter->advertise == advertise) /* no change */
return (0);
return ixgbe_set_advertise(adapter, advertise);
}
@ -4763,6 +4759,10 @@ ixgbe_set_advertise(struct adapter *adapter, int advertise)
struct ixgbe_hw *hw;
ixgbe_link_speed speed;
/* Checks to validate new value */
if (adapter->advertise == advertise) /* no change */
return (0);
hw = &adapter->hw;
dev = adapter->dev;