aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/sfc/efx.c
diff options
context:
space:
mode:
authorBen Hutchings <bhutchings@solarflare.com>2008-09-01 07:43:14 -0400
committerJeff Garzik <jgarzik@redhat.com>2008-09-03 09:53:42 -0400
commit767e468c06fc0e88f95881c1056437688b37c7c6 (patch)
tree57bd196f5c71cc7cccc40dc8bb2c50fd7aadb16f /drivers/net/sfc/efx.c
parent2c10b32bf57db7ec6d4cca4c4aa3d86bacb01c8a (diff)
sfc: Replace net_dev->priv with netdev_priv(net_dev)
Use of the net_device::priv field is deprecated. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Diffstat (limited to 'drivers/net/sfc/efx.c')
-rw-r--r--drivers/net/sfc/efx.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/drivers/net/sfc/efx.c b/drivers/net/sfc/efx.c
index 45c72eebb3a7..42539802b7ae 100644
--- a/drivers/net/sfc/efx.c
+++ b/drivers/net/sfc/efx.c
@@ -1249,7 +1249,7 @@ static void efx_monitor(struct work_struct *data)
1249 */ 1249 */
1250static int efx_ioctl(struct net_device *net_dev, struct ifreq *ifr, int cmd) 1250static int efx_ioctl(struct net_device *net_dev, struct ifreq *ifr, int cmd)
1251{ 1251{
1252 struct efx_nic *efx = net_dev->priv; 1252 struct efx_nic *efx = netdev_priv(net_dev);
1253 1253
1254 EFX_ASSERT_RESET_SERIALISED(efx); 1254 EFX_ASSERT_RESET_SERIALISED(efx);
1255 1255
@@ -1303,7 +1303,7 @@ static void efx_fini_napi(struct efx_nic *efx)
1303 */ 1303 */
1304static void efx_netpoll(struct net_device *net_dev) 1304static void efx_netpoll(struct net_device *net_dev)
1305{ 1305{
1306 struct efx_nic *efx = net_dev->priv; 1306 struct efx_nic *efx = netdev_priv(net_dev);
1307 struct efx_channel *channel; 1307 struct efx_channel *channel;
1308 1308
1309 efx_for_each_channel_with_interrupt(channel, efx) 1309 efx_for_each_channel_with_interrupt(channel, efx)
@@ -1321,7 +1321,7 @@ static void efx_netpoll(struct net_device *net_dev)
1321/* Context: process, rtnl_lock() held. */ 1321/* Context: process, rtnl_lock() held. */
1322static int efx_net_open(struct net_device *net_dev) 1322static int efx_net_open(struct net_device *net_dev)
1323{ 1323{
1324 struct efx_nic *efx = net_dev->priv; 1324 struct efx_nic *efx = netdev_priv(net_dev);
1325 EFX_ASSERT_RESET_SERIALISED(efx); 1325 EFX_ASSERT_RESET_SERIALISED(efx);
1326 1326
1327 EFX_LOG(efx, "opening device %s on CPU %d\n", net_dev->name, 1327 EFX_LOG(efx, "opening device %s on CPU %d\n", net_dev->name,
@@ -1337,7 +1337,7 @@ static int efx_net_open(struct net_device *net_dev)
1337 */ 1337 */
1338static int efx_net_stop(struct net_device *net_dev) 1338static int efx_net_stop(struct net_device *net_dev)
1339{ 1339{
1340 struct efx_nic *efx = net_dev->priv; 1340 struct efx_nic *efx = netdev_priv(net_dev);
1341 int rc; 1341 int rc;
1342 1342
1343 EFX_LOG(efx, "closing %s on CPU %d\n", net_dev->name, 1343 EFX_LOG(efx, "closing %s on CPU %d\n", net_dev->name,
@@ -1356,7 +1356,7 @@ static int efx_net_stop(struct net_device *net_dev)
1356/* Context: process, dev_base_lock or RTNL held, non-blocking. */ 1356/* Context: process, dev_base_lock or RTNL held, non-blocking. */
1357static struct net_device_stats *efx_net_stats(struct net_device *net_dev) 1357static struct net_device_stats *efx_net_stats(struct net_device *net_dev)
1358{ 1358{
1359 struct efx_nic *efx = net_dev->priv; 1359 struct efx_nic *efx = netdev_priv(net_dev);
1360 struct efx_mac_stats *mac_stats = &efx->mac_stats; 1360 struct efx_mac_stats *mac_stats = &efx->mac_stats;
1361 struct net_device_stats *stats = &net_dev->stats; 1361 struct net_device_stats *stats = &net_dev->stats;
1362 1362
@@ -1403,7 +1403,7 @@ static struct net_device_stats *efx_net_stats(struct net_device *net_dev)
1403/* Context: netif_tx_lock held, BHs disabled. */ 1403/* Context: netif_tx_lock held, BHs disabled. */
1404static void efx_watchdog(struct net_device *net_dev) 1404static void efx_watchdog(struct net_device *net_dev)
1405{ 1405{
1406 struct efx_nic *efx = net_dev->priv; 1406 struct efx_nic *efx = netdev_priv(net_dev);
1407 1407
1408 EFX_ERR(efx, "TX stuck with stop_count=%d port_enabled=%d: %s\n", 1408 EFX_ERR(efx, "TX stuck with stop_count=%d port_enabled=%d: %s\n",
1409 atomic_read(&efx->netif_stop_count), efx->port_enabled, 1409 atomic_read(&efx->netif_stop_count), efx->port_enabled,
@@ -1417,7 +1417,7 @@ static void efx_watchdog(struct net_device *net_dev)
1417/* Context: process, rtnl_lock() held. */ 1417/* Context: process, rtnl_lock() held. */
1418static int efx_change_mtu(struct net_device *net_dev, int new_mtu) 1418static int efx_change_mtu(struct net_device *net_dev, int new_mtu)
1419{ 1419{
1420 struct efx_nic *efx = net_dev->priv; 1420 struct efx_nic *efx = netdev_priv(net_dev);
1421 int rc = 0; 1421 int rc = 0;
1422 1422
1423 EFX_ASSERT_RESET_SERIALISED(efx); 1423 EFX_ASSERT_RESET_SERIALISED(efx);
@@ -1445,7 +1445,7 @@ static int efx_change_mtu(struct net_device *net_dev, int new_mtu)
1445 1445
1446static int efx_set_mac_address(struct net_device *net_dev, void *data) 1446static int efx_set_mac_address(struct net_device *net_dev, void *data)
1447{ 1447{
1448 struct efx_nic *efx = net_dev->priv; 1448 struct efx_nic *efx = netdev_priv(net_dev);
1449 struct sockaddr *addr = data; 1449 struct sockaddr *addr = data;
1450 char *new_addr = addr->sa_data; 1450 char *new_addr = addr->sa_data;
1451 1451
@@ -1469,7 +1469,7 @@ static int efx_set_mac_address(struct net_device *net_dev, void *data)
1469/* Context: netif_tx_lock held, BHs disabled. */ 1469/* Context: netif_tx_lock held, BHs disabled. */
1470static void efx_set_multicast_list(struct net_device *net_dev) 1470static void efx_set_multicast_list(struct net_device *net_dev)
1471{ 1471{
1472 struct efx_nic *efx = net_dev->priv; 1472 struct efx_nic *efx = netdev_priv(net_dev);
1473 struct dev_mc_list *mc_list = net_dev->mc_list; 1473 struct dev_mc_list *mc_list = net_dev->mc_list;
1474 union efx_multicast_hash *mc_hash = &efx->multicast_hash; 1474 union efx_multicast_hash *mc_hash = &efx->multicast_hash;
1475 int promiscuous; 1475 int promiscuous;
@@ -1510,7 +1510,7 @@ static int efx_netdev_event(struct notifier_block *this,
1510 struct net_device *net_dev = ptr; 1510 struct net_device *net_dev = ptr;
1511 1511
1512 if (net_dev->open == efx_net_open && event == NETDEV_CHANGENAME) { 1512 if (net_dev->open == efx_net_open && event == NETDEV_CHANGENAME) {
1513 struct efx_nic *efx = net_dev->priv; 1513 struct efx_nic *efx = netdev_priv(net_dev);
1514 1514
1515 strcpy(efx->name, net_dev->name); 1515 strcpy(efx->name, net_dev->name);
1516 } 1516 }
@@ -1568,7 +1568,7 @@ static void efx_unregister_netdev(struct efx_nic *efx)
1568 if (!efx->net_dev) 1568 if (!efx->net_dev)
1569 return; 1569 return;
1570 1570
1571 BUG_ON(efx->net_dev->priv != efx); 1571 BUG_ON(netdev_priv(efx->net_dev) != efx);
1572 1572
1573 /* Free up any skbs still remaining. This has to happen before 1573 /* Free up any skbs still remaining. This has to happen before
1574 * we try to unregister the netdev as running their destructors 1574 * we try to unregister the netdev as running their destructors
@@ -2105,7 +2105,7 @@ static int __devinit efx_pci_probe(struct pci_dev *pci_dev,
2105 NETIF_F_HIGHDMA | NETIF_F_TSO); 2105 NETIF_F_HIGHDMA | NETIF_F_TSO);
2106 if (lro) 2106 if (lro)
2107 net_dev->features |= NETIF_F_LRO; 2107 net_dev->features |= NETIF_F_LRO;
2108 efx = net_dev->priv; 2108 efx = netdev_priv(net_dev);
2109 pci_set_drvdata(pci_dev, efx); 2109 pci_set_drvdata(pci_dev, efx);
2110 rc = efx_init_struct(efx, type, pci_dev, net_dev); 2110 rc = efx_init_struct(efx, type, pci_dev, net_dev);
2111 if (rc) 2111 if (rc)