30 #include <linux/device.h>
31 #include <linux/errno.h>
34 #include <linux/netdevice.h>
35 #include <linux/socket.h>
38 #include <linux/string.h>
39 #include <linux/types.h>
50 {
"Atmel", 0x00, 0x03, 0x02, 0x06, 0x04, 0x05, 0x15, 0x52, 0x62},
51 {
"SST", 0x01, 0x03, 0x02, 0x06, 0x04, 0x05, 0x90, 0x20, 0x60},
52 {
"ST", 0x01, 0x03, 0x02, 0x06, 0x04, 0x05, 0xAB, 0xD8, 0xC7},
79 if (netif_running(netdev))
82 if (!is_valid_ether_addr(addr->
sa_data))
98 spin_lock(&adapter->lock);
99 adapter->phy_timer_pending =
false;
102 spin_unlock(&adapter->lock);
107 if (netif_carrier_ok(netdev)) {
109 dev_info(&adapter->pdev->dev,
"%s link is down\n",
127 static void atlx_set_multi(
struct net_device *netdev)
158 static inline void atlx_imr_set(
struct atlx_adapter *adapter,
169 static void atlx_irq_enable(
struct atlx_adapter *adapter)
172 adapter->int_enabled =
true;
179 static void atlx_irq_disable(
struct atlx_adapter *adapter)
181 adapter->int_enabled =
false;
182 atlx_imr_set(adapter, 0);
186 static void atlx_clear_phy_int(
struct atlx_adapter *adapter)
193 spin_unlock_irqrestore(&adapter->lock, flags);
200 static void atlx_tx_timeout(
struct net_device *netdev)
219 spin_unlock_irqrestore(&adapter->lock, flags);
233 static void atlx_vlan_mode(
struct net_device *netdev,
243 __atlx_vlan_mode(features, &ctrl);
246 spin_unlock_irqrestore(&adapter->lock, flags);
249 static void atlx_restore_vlan(
struct atlx_adapter *adapter)
251 atlx_vlan_mode(adapter->netdev, adapter->netdev->features);
269 static int atlx_set_features(
struct net_device *netdev,
275 atlx_vlan_mode(netdev, features);