aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/e1000/e1000_ethtool.c50
-rw-r--r--drivers/net/e1000/e1000_main.c40
2 files changed, 45 insertions, 45 deletions
diff --git a/drivers/net/e1000/e1000_ethtool.c b/drivers/net/e1000/e1000_ethtool.c
index 237247f74df4..b27b71b8834f 100644
--- a/drivers/net/e1000/e1000_ethtool.c
+++ b/drivers/net/e1000/e1000_ethtool.c
@@ -105,7 +105,7 @@ static const char e1000_gstrings_test[][ETH_GSTRING_LEN] = {
105static int 105static int
106e1000_get_settings(struct net_device *netdev, struct ethtool_cmd *ecmd) 106e1000_get_settings(struct net_device *netdev, struct ethtool_cmd *ecmd)
107{ 107{
108 struct e1000_adapter *adapter = netdev->priv; 108 struct e1000_adapter *adapter = netdev_priv(netdev);
109 struct e1000_hw *hw = &adapter->hw; 109 struct e1000_hw *hw = &adapter->hw;
110 110
111 if(hw->media_type == e1000_media_type_copper) { 111 if(hw->media_type == e1000_media_type_copper) {
@@ -179,7 +179,7 @@ e1000_get_settings(struct net_device *netdev, struct ethtool_cmd *ecmd)
179static int 179static int
180e1000_set_settings(struct net_device *netdev, struct ethtool_cmd *ecmd) 180e1000_set_settings(struct net_device *netdev, struct ethtool_cmd *ecmd)
181{ 181{
182 struct e1000_adapter *adapter = netdev->priv; 182 struct e1000_adapter *adapter = netdev_priv(netdev);
183 struct e1000_hw *hw = &adapter->hw; 183 struct e1000_hw *hw = &adapter->hw;
184 184
185 if(ecmd->autoneg == AUTONEG_ENABLE) { 185 if(ecmd->autoneg == AUTONEG_ENABLE) {
@@ -206,7 +206,7 @@ static void
206e1000_get_pauseparam(struct net_device *netdev, 206e1000_get_pauseparam(struct net_device *netdev,
207 struct ethtool_pauseparam *pause) 207 struct ethtool_pauseparam *pause)
208{ 208{
209 struct e1000_adapter *adapter = netdev->priv; 209 struct e1000_adapter *adapter = netdev_priv(netdev);
210 struct e1000_hw *hw = &adapter->hw; 210 struct e1000_hw *hw = &adapter->hw;
211 211
212 pause->autoneg = 212 pause->autoneg =
@@ -226,7 +226,7 @@ static int
226e1000_set_pauseparam(struct net_device *netdev, 226e1000_set_pauseparam(struct net_device *netdev,
227 struct ethtool_pauseparam *pause) 227 struct ethtool_pauseparam *pause)
228{ 228{
229 struct e1000_adapter *adapter = netdev->priv; 229 struct e1000_adapter *adapter = netdev_priv(netdev);
230 struct e1000_hw *hw = &adapter->hw; 230 struct e1000_hw *hw = &adapter->hw;
231 231
232 adapter->fc_autoneg = pause->autoneg; 232 adapter->fc_autoneg = pause->autoneg;
@@ -259,14 +259,14 @@ e1000_set_pauseparam(struct net_device *netdev,
259static uint32_t 259static uint32_t
260e1000_get_rx_csum(struct net_device *netdev) 260e1000_get_rx_csum(struct net_device *netdev)
261{ 261{
262 struct e1000_adapter *adapter = netdev->priv; 262 struct e1000_adapter *adapter = netdev_priv(netdev);
263 return adapter->rx_csum; 263 return adapter->rx_csum;
264} 264}
265 265
266static int 266static int
267e1000_set_rx_csum(struct net_device *netdev, uint32_t data) 267e1000_set_rx_csum(struct net_device *netdev, uint32_t data)
268{ 268{
269 struct e1000_adapter *adapter = netdev->priv; 269 struct e1000_adapter *adapter = netdev_priv(netdev);
270 adapter->rx_csum = data; 270 adapter->rx_csum = data;
271 271
272 if(netif_running(netdev)) { 272 if(netif_running(netdev)) {
@@ -286,7 +286,7 @@ e1000_get_tx_csum(struct net_device *netdev)
286static int 286static int
287e1000_set_tx_csum(struct net_device *netdev, uint32_t data) 287e1000_set_tx_csum(struct net_device *netdev, uint32_t data)
288{ 288{
289 struct e1000_adapter *adapter = netdev->priv; 289 struct e1000_adapter *adapter = netdev_priv(netdev);
290 290
291 if(adapter->hw.mac_type < e1000_82543) { 291 if(adapter->hw.mac_type < e1000_82543) {
292 if (!data) 292 if (!data)
@@ -306,8 +306,8 @@ e1000_set_tx_csum(struct net_device *netdev, uint32_t data)
306static int 306static int
307e1000_set_tso(struct net_device *netdev, uint32_t data) 307e1000_set_tso(struct net_device *netdev, uint32_t data)
308{ 308{
309 struct e1000_adapter *adapter = netdev->priv; 309 struct e1000_adapter *adapter = netdev_priv(netdev);
310 if ((adapter->hw.mac_type < e1000_82544) || 310 if((adapter->hw.mac_type < e1000_82544) ||
311 (adapter->hw.mac_type == e1000_82547)) 311 (adapter->hw.mac_type == e1000_82547))
312 return data ? -EINVAL : 0; 312 return data ? -EINVAL : 0;
313 313
@@ -322,14 +322,14 @@ e1000_set_tso(struct net_device *netdev, uint32_t data)
322static uint32_t 322static uint32_t
323e1000_get_msglevel(struct net_device *netdev) 323e1000_get_msglevel(struct net_device *netdev)
324{ 324{
325 struct e1000_adapter *adapter = netdev->priv; 325 struct e1000_adapter *adapter = netdev_priv(netdev);
326 return adapter->msg_enable; 326 return adapter->msg_enable;
327} 327}
328 328
329static void 329static void
330e1000_set_msglevel(struct net_device *netdev, uint32_t data) 330e1000_set_msglevel(struct net_device *netdev, uint32_t data)
331{ 331{
332 struct e1000_adapter *adapter = netdev->priv; 332 struct e1000_adapter *adapter = netdev_priv(netdev);
333 adapter->msg_enable = data; 333 adapter->msg_enable = data;
334} 334}
335 335
@@ -344,7 +344,7 @@ static void
344e1000_get_regs(struct net_device *netdev, 344e1000_get_regs(struct net_device *netdev,
345 struct ethtool_regs *regs, void *p) 345 struct ethtool_regs *regs, void *p)
346{ 346{
347 struct e1000_adapter *adapter = netdev->priv; 347 struct e1000_adapter *adapter = netdev_priv(netdev);
348 struct e1000_hw *hw = &adapter->hw; 348 struct e1000_hw *hw = &adapter->hw;
349 uint32_t *regs_buff = p; 349 uint32_t *regs_buff = p;
350 uint16_t phy_data; 350 uint16_t phy_data;
@@ -432,7 +432,7 @@ e1000_get_regs(struct net_device *netdev,
432static int 432static int
433e1000_get_eeprom_len(struct net_device *netdev) 433e1000_get_eeprom_len(struct net_device *netdev)
434{ 434{
435 struct e1000_adapter *adapter = netdev->priv; 435 struct e1000_adapter *adapter = netdev_priv(netdev);
436 return adapter->hw.eeprom.word_size * 2; 436 return adapter->hw.eeprom.word_size * 2;
437} 437}
438 438
@@ -440,7 +440,7 @@ static int
440e1000_get_eeprom(struct net_device *netdev, 440e1000_get_eeprom(struct net_device *netdev,
441 struct ethtool_eeprom *eeprom, uint8_t *bytes) 441 struct ethtool_eeprom *eeprom, uint8_t *bytes)
442{ 442{
443 struct e1000_adapter *adapter = netdev->priv; 443 struct e1000_adapter *adapter = netdev_priv(netdev);
444 struct e1000_hw *hw = &adapter->hw; 444 struct e1000_hw *hw = &adapter->hw;
445 uint16_t *eeprom_buff; 445 uint16_t *eeprom_buff;
446 int first_word, last_word; 446 int first_word, last_word;
@@ -486,7 +486,7 @@ static int
486e1000_set_eeprom(struct net_device *netdev, 486e1000_set_eeprom(struct net_device *netdev,
487 struct ethtool_eeprom *eeprom, uint8_t *bytes) 487 struct ethtool_eeprom *eeprom, uint8_t *bytes)
488{ 488{
489 struct e1000_adapter *adapter = netdev->priv; 489 struct e1000_adapter *adapter = netdev_priv(netdev);
490 struct e1000_hw *hw = &adapter->hw; 490 struct e1000_hw *hw = &adapter->hw;
491 uint16_t *eeprom_buff; 491 uint16_t *eeprom_buff;
492 void *ptr; 492 void *ptr;
@@ -547,7 +547,7 @@ static void
547e1000_get_drvinfo(struct net_device *netdev, 547e1000_get_drvinfo(struct net_device *netdev,
548 struct ethtool_drvinfo *drvinfo) 548 struct ethtool_drvinfo *drvinfo)
549{ 549{
550 struct e1000_adapter *adapter = netdev->priv; 550 struct e1000_adapter *adapter = netdev_priv(netdev);
551 551
552 strncpy(drvinfo->driver, e1000_driver_name, 32); 552 strncpy(drvinfo->driver, e1000_driver_name, 32);
553 strncpy(drvinfo->version, e1000_driver_version, 32); 553 strncpy(drvinfo->version, e1000_driver_version, 32);
@@ -563,7 +563,7 @@ static void
563e1000_get_ringparam(struct net_device *netdev, 563e1000_get_ringparam(struct net_device *netdev,
564 struct ethtool_ringparam *ring) 564 struct ethtool_ringparam *ring)
565{ 565{
566 struct e1000_adapter *adapter = netdev->priv; 566 struct e1000_adapter *adapter = netdev_priv(netdev);
567 e1000_mac_type mac_type = adapter->hw.mac_type; 567 e1000_mac_type mac_type = adapter->hw.mac_type;
568 struct e1000_desc_ring *txdr = &adapter->tx_ring; 568 struct e1000_desc_ring *txdr = &adapter->tx_ring;
569 struct e1000_desc_ring *rxdr = &adapter->rx_ring; 569 struct e1000_desc_ring *rxdr = &adapter->rx_ring;
@@ -584,7 +584,7 @@ static int
584e1000_set_ringparam(struct net_device *netdev, 584e1000_set_ringparam(struct net_device *netdev,
585 struct ethtool_ringparam *ring) 585 struct ethtool_ringparam *ring)
586{ 586{
587 struct e1000_adapter *adapter = netdev->priv; 587 struct e1000_adapter *adapter = netdev_priv(netdev);
588 e1000_mac_type mac_type = adapter->hw.mac_type; 588 e1000_mac_type mac_type = adapter->hw.mac_type;
589 struct e1000_desc_ring *txdr = &adapter->tx_ring; 589 struct e1000_desc_ring *txdr = &adapter->tx_ring;
590 struct e1000_desc_ring *rxdr = &adapter->rx_ring; 590 struct e1000_desc_ring *rxdr = &adapter->rx_ring;
@@ -766,7 +766,7 @@ e1000_test_intr(int irq,
766 struct pt_regs *regs) 766 struct pt_regs *regs)
767{ 767{
768 struct net_device *netdev = (struct net_device *) data; 768 struct net_device *netdev = (struct net_device *) data;
769 struct e1000_adapter *adapter = netdev->priv; 769 struct e1000_adapter *adapter = netdev_priv(netdev);
770 770
771 adapter->test_icr |= E1000_READ_REG(&adapter->hw, ICR); 771 adapter->test_icr |= E1000_READ_REG(&adapter->hw, ICR);
772 772
@@ -1422,7 +1422,7 @@ static void
1422e1000_diag_test(struct net_device *netdev, 1422e1000_diag_test(struct net_device *netdev,
1423 struct ethtool_test *eth_test, uint64_t *data) 1423 struct ethtool_test *eth_test, uint64_t *data)
1424{ 1424{
1425 struct e1000_adapter *adapter = netdev->priv; 1425 struct e1000_adapter *adapter = netdev_priv(netdev);
1426 boolean_t if_running = netif_running(netdev); 1426 boolean_t if_running = netif_running(netdev);
1427 1427
1428 if(eth_test->flags == ETH_TEST_FL_OFFLINE) { 1428 if(eth_test->flags == ETH_TEST_FL_OFFLINE) {
@@ -1482,7 +1482,7 @@ e1000_diag_test(struct net_device *netdev,
1482static void 1482static void
1483e1000_get_wol(struct net_device *netdev, struct ethtool_wolinfo *wol) 1483e1000_get_wol(struct net_device *netdev, struct ethtool_wolinfo *wol)
1484{ 1484{
1485 struct e1000_adapter *adapter = netdev->priv; 1485 struct e1000_adapter *adapter = netdev_priv(netdev);
1486 struct e1000_hw *hw = &adapter->hw; 1486 struct e1000_hw *hw = &adapter->hw;
1487 1487
1488 switch(adapter->hw.device_id) { 1488 switch(adapter->hw.device_id) {
@@ -1527,7 +1527,7 @@ e1000_get_wol(struct net_device *netdev, struct ethtool_wolinfo *wol)
1527static int 1527static int
1528e1000_set_wol(struct net_device *netdev, struct ethtool_wolinfo *wol) 1528e1000_set_wol(struct net_device *netdev, struct ethtool_wolinfo *wol)
1529{ 1529{
1530 struct e1000_adapter *adapter = netdev->priv; 1530 struct e1000_adapter *adapter = netdev_priv(netdev);
1531 struct e1000_hw *hw = &adapter->hw; 1531 struct e1000_hw *hw = &adapter->hw;
1532 1532
1533 switch(adapter->hw.device_id) { 1533 switch(adapter->hw.device_id) {
@@ -1588,7 +1588,7 @@ e1000_led_blink_callback(unsigned long data)
1588static int 1588static int
1589e1000_phys_id(struct net_device *netdev, uint32_t data) 1589e1000_phys_id(struct net_device *netdev, uint32_t data)
1590{ 1590{
1591 struct e1000_adapter *adapter = netdev->priv; 1591 struct e1000_adapter *adapter = netdev_priv(netdev);
1592 1592
1593 if(!data || data > (uint32_t)(MAX_SCHEDULE_TIMEOUT / HZ)) 1593 if(!data || data > (uint32_t)(MAX_SCHEDULE_TIMEOUT / HZ))
1594 data = (uint32_t)(MAX_SCHEDULE_TIMEOUT / HZ); 1594 data = (uint32_t)(MAX_SCHEDULE_TIMEOUT / HZ);
@@ -1614,7 +1614,7 @@ e1000_phys_id(struct net_device *netdev, uint32_t data)
1614static int 1614static int
1615e1000_nway_reset(struct net_device *netdev) 1615e1000_nway_reset(struct net_device *netdev)
1616{ 1616{
1617 struct e1000_adapter *adapter = netdev->priv; 1617 struct e1000_adapter *adapter = netdev_priv(netdev);
1618 if(netif_running(netdev)) { 1618 if(netif_running(netdev)) {
1619 e1000_down(adapter); 1619 e1000_down(adapter);
1620 e1000_up(adapter); 1620 e1000_up(adapter);
@@ -1632,7 +1632,7 @@ static void
1632e1000_get_ethtool_stats(struct net_device *netdev, 1632e1000_get_ethtool_stats(struct net_device *netdev,
1633 struct ethtool_stats *stats, uint64_t *data) 1633 struct ethtool_stats *stats, uint64_t *data)
1634{ 1634{
1635 struct e1000_adapter *adapter = netdev->priv; 1635 struct e1000_adapter *adapter = netdev_priv(netdev);
1636 int i; 1636 int i;
1637 1637
1638 e1000_update_stats(adapter); 1638 e1000_update_stats(adapter);
diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c
index d21e29d09ddc..936fde1f38cc 100644
--- a/drivers/net/e1000/e1000_main.c
+++ b/drivers/net/e1000/e1000_main.c
@@ -517,7 +517,7 @@ e1000_probe(struct pci_dev *pdev,
517 SET_NETDEV_DEV(netdev, &pdev->dev); 517 SET_NETDEV_DEV(netdev, &pdev->dev);
518 518
519 pci_set_drvdata(pdev, netdev); 519 pci_set_drvdata(pdev, netdev);
520 adapter = netdev->priv; 520 adapter = netdev_priv(netdev);
521 adapter->netdev = netdev; 521 adapter->netdev = netdev;
522 adapter->pdev = pdev; 522 adapter->pdev = pdev;
523 adapter->hw.back = adapter; 523 adapter->hw.back = adapter;
@@ -738,7 +738,7 @@ static void __devexit
738e1000_remove(struct pci_dev *pdev) 738e1000_remove(struct pci_dev *pdev)
739{ 739{
740 struct net_device *netdev = pci_get_drvdata(pdev); 740 struct net_device *netdev = pci_get_drvdata(pdev);
741 struct e1000_adapter *adapter = netdev->priv; 741 struct e1000_adapter *adapter = netdev_priv(netdev);
742 uint32_t manc, swsm; 742 uint32_t manc, swsm;
743 743
744 flush_scheduled_work(); 744 flush_scheduled_work();
@@ -871,7 +871,7 @@ e1000_sw_init(struct e1000_adapter *adapter)
871static int 871static int
872e1000_open(struct net_device *netdev) 872e1000_open(struct net_device *netdev)
873{ 873{
874 struct e1000_adapter *adapter = netdev->priv; 874 struct e1000_adapter *adapter = netdev_priv(netdev);
875 int err; 875 int err;
876 876
877 /* allocate transmit descriptors */ 877 /* allocate transmit descriptors */
@@ -919,7 +919,7 @@ err_setup_tx:
919static int 919static int
920e1000_close(struct net_device *netdev) 920e1000_close(struct net_device *netdev)
921{ 921{
922 struct e1000_adapter *adapter = netdev->priv; 922 struct e1000_adapter *adapter = netdev_priv(netdev);
923 923
924 e1000_down(adapter); 924 e1000_down(adapter);
925 925
@@ -1599,7 +1599,7 @@ e1000_leave_82542_rst(struct e1000_adapter *adapter)
1599static int 1599static int
1600e1000_set_mac(struct net_device *netdev, void *p) 1600e1000_set_mac(struct net_device *netdev, void *p)
1601{ 1601{
1602 struct e1000_adapter *adapter = netdev->priv; 1602 struct e1000_adapter *adapter = netdev_priv(netdev);
1603 struct sockaddr *addr = p; 1603 struct sockaddr *addr = p;
1604 1604
1605 if(!is_valid_ether_addr(addr->sa_data)) 1605 if(!is_valid_ether_addr(addr->sa_data))
@@ -1634,7 +1634,7 @@ e1000_set_mac(struct net_device *netdev, void *p)
1634static void 1634static void
1635e1000_set_multi(struct net_device *netdev) 1635e1000_set_multi(struct net_device *netdev)
1636{ 1636{
1637 struct e1000_adapter *adapter = netdev->priv; 1637 struct e1000_adapter *adapter = netdev_priv(netdev);
1638 struct e1000_hw *hw = &adapter->hw; 1638 struct e1000_hw *hw = &adapter->hw;
1639 struct dev_mc_list *mc_ptr; 1639 struct dev_mc_list *mc_ptr;
1640 unsigned long flags; 1640 unsigned long flags;
@@ -2213,7 +2213,7 @@ e1000_transfer_dhcp_info(struct e1000_adapter *adapter, struct sk_buff *skb)
2213static int 2213static int
2214e1000_xmit_frame(struct sk_buff *skb, struct net_device *netdev) 2214e1000_xmit_frame(struct sk_buff *skb, struct net_device *netdev)
2215{ 2215{
2216 struct e1000_adapter *adapter = netdev->priv; 2216 struct e1000_adapter *adapter = netdev_priv(netdev);
2217 unsigned int first, max_per_txd = E1000_MAX_DATA_PER_TXD; 2217 unsigned int first, max_per_txd = E1000_MAX_DATA_PER_TXD;
2218 unsigned int max_txd_pwr = E1000_MAX_TXD_PWR; 2218 unsigned int max_txd_pwr = E1000_MAX_TXD_PWR;
2219 unsigned int tx_flags = 0; 2219 unsigned int tx_flags = 0;
@@ -2344,7 +2344,7 @@ e1000_xmit_frame(struct sk_buff *skb, struct net_device *netdev)
2344static void 2344static void
2345e1000_tx_timeout(struct net_device *netdev) 2345e1000_tx_timeout(struct net_device *netdev)
2346{ 2346{
2347 struct e1000_adapter *adapter = netdev->priv; 2347 struct e1000_adapter *adapter = netdev_priv(netdev);
2348 2348
2349 /* Do the reset outside of interrupt context */ 2349 /* Do the reset outside of interrupt context */
2350 schedule_work(&adapter->tx_timeout_task); 2350 schedule_work(&adapter->tx_timeout_task);
@@ -2353,7 +2353,7 @@ e1000_tx_timeout(struct net_device *netdev)
2353static void 2353static void
2354e1000_tx_timeout_task(struct net_device *netdev) 2354e1000_tx_timeout_task(struct net_device *netdev)
2355{ 2355{
2356 struct e1000_adapter *adapter = netdev->priv; 2356 struct e1000_adapter *adapter = netdev_priv(netdev);
2357 2357
2358 e1000_down(adapter); 2358 e1000_down(adapter);
2359 e1000_up(adapter); 2359 e1000_up(adapter);
@@ -2370,7 +2370,7 @@ e1000_tx_timeout_task(struct net_device *netdev)
2370static struct net_device_stats * 2370static struct net_device_stats *
2371e1000_get_stats(struct net_device *netdev) 2371e1000_get_stats(struct net_device *netdev)
2372{ 2372{
2373 struct e1000_adapter *adapter = netdev->priv; 2373 struct e1000_adapter *adapter = netdev_priv(netdev);
2374 2374
2375 e1000_update_stats(adapter); 2375 e1000_update_stats(adapter);
2376 return &adapter->net_stats; 2376 return &adapter->net_stats;
@@ -2387,7 +2387,7 @@ e1000_get_stats(struct net_device *netdev)
2387static int 2387static int
2388e1000_change_mtu(struct net_device *netdev, int new_mtu) 2388e1000_change_mtu(struct net_device *netdev, int new_mtu)
2389{ 2389{
2390 struct e1000_adapter *adapter = netdev->priv; 2390 struct e1000_adapter *adapter = netdev_priv(netdev);
2391 int max_frame = new_mtu + ENET_HEADER_SIZE + ETHERNET_FCS_SIZE; 2391 int max_frame = new_mtu + ENET_HEADER_SIZE + ETHERNET_FCS_SIZE;
2392 2392
2393 if((max_frame < MINIMUM_ETHERNET_FRAME_SIZE) || 2393 if((max_frame < MINIMUM_ETHERNET_FRAME_SIZE) ||
@@ -2598,7 +2598,7 @@ static irqreturn_t
2598e1000_intr(int irq, void *data, struct pt_regs *regs) 2598e1000_intr(int irq, void *data, struct pt_regs *regs)
2599{ 2599{
2600 struct net_device *netdev = data; 2600 struct net_device *netdev = data;
2601 struct e1000_adapter *adapter = netdev->priv; 2601 struct e1000_adapter *adapter = netdev_priv(netdev);
2602 struct e1000_hw *hw = &adapter->hw; 2602 struct e1000_hw *hw = &adapter->hw;
2603 uint32_t icr = E1000_READ_REG(hw, ICR); 2603 uint32_t icr = E1000_READ_REG(hw, ICR);
2604#ifndef CONFIG_E1000_NAPI 2604#ifndef CONFIG_E1000_NAPI
@@ -2661,7 +2661,7 @@ e1000_intr(int irq, void *data, struct pt_regs *regs)
2661static int 2661static int
2662e1000_clean(struct net_device *netdev, int *budget) 2662e1000_clean(struct net_device *netdev, int *budget)
2663{ 2663{
2664 struct e1000_adapter *adapter = netdev->priv; 2664 struct e1000_adapter *adapter = netdev_priv(netdev);
2665 int work_to_do = min(*budget, netdev->quota); 2665 int work_to_do = min(*budget, netdev->quota);
2666 int tx_cleaned; 2666 int tx_cleaned;
2667 int work_done = 0; 2667 int work_done = 0;
@@ -3371,7 +3371,7 @@ e1000_ioctl(struct net_device *netdev, struct ifreq *ifr, int cmd)
3371static int 3371static int
3372e1000_mii_ioctl(struct net_device *netdev, struct ifreq *ifr, int cmd) 3372e1000_mii_ioctl(struct net_device *netdev, struct ifreq *ifr, int cmd)
3373{ 3373{
3374 struct e1000_adapter *adapter = netdev->priv; 3374 struct e1000_adapter *adapter = netdev_priv(netdev);
3375 struct mii_ioctl_data *data = if_mii(ifr); 3375 struct mii_ioctl_data *data = if_mii(ifr);
3376 int retval; 3376 int retval;
3377 uint16_t mii_reg; 3377 uint16_t mii_reg;
@@ -3520,7 +3520,7 @@ e1000_io_write(struct e1000_hw *hw, unsigned long port, uint32_t value)
3520static void 3520static void
3521e1000_vlan_rx_register(struct net_device *netdev, struct vlan_group *grp) 3521e1000_vlan_rx_register(struct net_device *netdev, struct vlan_group *grp)
3522{ 3522{
3523 struct e1000_adapter *adapter = netdev->priv; 3523 struct e1000_adapter *adapter = netdev_priv(netdev);
3524 uint32_t ctrl, rctl; 3524 uint32_t ctrl, rctl;
3525 3525
3526 e1000_irq_disable(adapter); 3526 e1000_irq_disable(adapter);
@@ -3560,7 +3560,7 @@ e1000_vlan_rx_register(struct net_device *netdev, struct vlan_group *grp)
3560static void 3560static void
3561e1000_vlan_rx_add_vid(struct net_device *netdev, uint16_t vid) 3561e1000_vlan_rx_add_vid(struct net_device *netdev, uint16_t vid)
3562{ 3562{
3563 struct e1000_adapter *adapter = netdev->priv; 3563 struct e1000_adapter *adapter = netdev_priv(netdev);
3564 uint32_t vfta, index; 3564 uint32_t vfta, index;
3565 if((adapter->hw.mng_cookie.status & 3565 if((adapter->hw.mng_cookie.status &
3566 E1000_MNG_DHCP_COOKIE_STATUS_VLAN_SUPPORT) && 3566 E1000_MNG_DHCP_COOKIE_STATUS_VLAN_SUPPORT) &&
@@ -3576,7 +3576,7 @@ e1000_vlan_rx_add_vid(struct net_device *netdev, uint16_t vid)
3576static void 3576static void
3577e1000_vlan_rx_kill_vid(struct net_device *netdev, uint16_t vid) 3577e1000_vlan_rx_kill_vid(struct net_device *netdev, uint16_t vid)
3578{ 3578{
3579 struct e1000_adapter *adapter = netdev->priv; 3579 struct e1000_adapter *adapter = netdev_priv(netdev);
3580 uint32_t vfta, index; 3580 uint32_t vfta, index;
3581 3581
3582 e1000_irq_disable(adapter); 3582 e1000_irq_disable(adapter);
@@ -3663,7 +3663,7 @@ static int
3663e1000_suspend(struct pci_dev *pdev, uint32_t state) 3663e1000_suspend(struct pci_dev *pdev, uint32_t state)
3664{ 3664{
3665 struct net_device *netdev = pci_get_drvdata(pdev); 3665 struct net_device *netdev = pci_get_drvdata(pdev);
3666 struct e1000_adapter *adapter = netdev->priv; 3666 struct e1000_adapter *adapter = netdev_priv(netdev);
3667 uint32_t ctrl, ctrl_ext, rctl, manc, status, swsm; 3667 uint32_t ctrl, ctrl_ext, rctl, manc, status, swsm;
3668 uint32_t wufc = adapter->wol; 3668 uint32_t wufc = adapter->wol;
3669 3669
@@ -3756,8 +3756,8 @@ static int
3756e1000_resume(struct pci_dev *pdev) 3756e1000_resume(struct pci_dev *pdev)
3757{ 3757{
3758 struct net_device *netdev = pci_get_drvdata(pdev); 3758 struct net_device *netdev = pci_get_drvdata(pdev);
3759 struct e1000_adapter *adapter = netdev->priv;
3760 uint32_t manc, ret, swsm; 3759 uint32_t manc, ret, swsm;
3760 struct e1000_adapter *adapter = netdev_priv(netdev);
3761 3761
3762 pci_set_power_state(pdev, 0); 3762 pci_set_power_state(pdev, 0);
3763 pci_restore_state(pdev); 3763 pci_restore_state(pdev);
@@ -3804,7 +3804,7 @@ e1000_resume(struct pci_dev *pdev)
3804static void 3804static void
3805e1000_netpoll(struct net_device *netdev) 3805e1000_netpoll(struct net_device *netdev)
3806{ 3806{
3807 struct e1000_adapter *adapter = netdev->priv; 3807 struct e1000_adapter *adapter = netdev_priv(netdev);
3808 disable_irq(adapter->pdev->irq); 3808 disable_irq(adapter->pdev->irq);
3809 e1000_intr(adapter->pdev->irq, netdev, NULL); 3809 e1000_intr(adapter->pdev->irq, netdev, NULL);
3810 enable_irq(adapter->pdev->irq); 3810 enable_irq(adapter->pdev->irq);