static void ixgb_led_blink_callback(unsigned long data) { struct ixgb_adapter *adapter = (struct ixgb_adapter *)data; if (test_and_change_bit(IXGB_LED_ON, &adapter->led_status)) ixgb_led_off(&adapter->hw); else ixgb_led_on(&adapter->hw); mod_timer(&adapter->blink_timer, jiffies + IXGB_ID_INTERVAL); }
static int ixgb_set_phys_id(struct net_device *netdev, enum ethtool_phys_id_state state) { struct ixgb_adapter *adapter = netdev_priv(netdev); switch (state) { case ETHTOOL_ID_ACTIVE: return 2; case ETHTOOL_ID_ON: ixgb_led_on(&adapter->hw); break; case ETHTOOL_ID_OFF: case ETHTOOL_ID_INACTIVE: ixgb_led_off(&adapter->hw); } return 0; }