aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ixgb/ixgb_main.c
diff options
context:
space:
mode:
authorMalli Chilakala <mallikarjuna.chilakala@intel.com>2005-08-11 16:58:40 -0400
committerJeff Garzik <jgarzik@pobox.com>2005-08-11 17:09:19 -0400
commit8908c6cd1d6889850148aeb50bb14301959adaa7 (patch)
treef2d35f3f9dbad26caa665cdaef261ba42dac15fb /drivers/net/ixgb/ixgb_main.c
parent51b54b512cd26c4477ccd57b8d3736b99ccef7a0 (diff)
[PATCH] ixgb: Use netdev_priv() instead of netdev->priv
Use netdev_priv() instead of netdev->priv Signed-off-by: Mallikarjuna R Chilakala <mallikarjuna.chilakala@intel.com> Signed-off-by: Ganesh Venkatesan <ganesh.venkatesan@intel.com> Signed-off-by: John Ronciak <john.ronciak@intel.com> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
Diffstat (limited to 'drivers/net/ixgb/ixgb_main.c')
-rw-r--r--drivers/net/ixgb/ixgb_main.c32
1 files changed, 16 insertions, 16 deletions
diff --git a/drivers/net/ixgb/ixgb_main.c b/drivers/net/ixgb/ixgb_main.c
index 492783be205e..d1fc431cb1c9 100644
--- a/drivers/net/ixgb/ixgb_main.c
+++ b/drivers/net/ixgb/ixgb_main.c
@@ -378,7 +378,7 @@ ixgb_probe(struct pci_dev *pdev,
378 SET_NETDEV_DEV(netdev, &pdev->dev); 378 SET_NETDEV_DEV(netdev, &pdev->dev);
379 379
380 pci_set_drvdata(pdev, netdev); 380 pci_set_drvdata(pdev, netdev);
381 adapter = netdev->priv; 381 adapter = netdev_priv(netdev);
382 adapter->netdev = netdev; 382 adapter->netdev = netdev;
383 adapter->pdev = pdev; 383 adapter->pdev = pdev;
384 adapter->hw.back = adapter; 384 adapter->hw.back = adapter;
@@ -514,7 +514,7 @@ static void __devexit
514ixgb_remove(struct pci_dev *pdev) 514ixgb_remove(struct pci_dev *pdev)
515{ 515{
516 struct net_device *netdev = pci_get_drvdata(pdev); 516 struct net_device *netdev = pci_get_drvdata(pdev);
517 struct ixgb_adapter *adapter = netdev->priv; 517 struct ixgb_adapter *adapter = netdev_priv(netdev);
518 518
519 unregister_netdev(netdev); 519 unregister_netdev(netdev);
520 520
@@ -585,7 +585,7 @@ ixgb_sw_init(struct ixgb_adapter *adapter)
585static int 585static int
586ixgb_open(struct net_device *netdev) 586ixgb_open(struct net_device *netdev)
587{ 587{
588 struct ixgb_adapter *adapter = netdev->priv; 588 struct ixgb_adapter *adapter = netdev_priv(netdev);
589 int err; 589 int err;
590 590
591 /* allocate transmit descriptors */ 591 /* allocate transmit descriptors */
@@ -628,7 +628,7 @@ err_setup_tx:
628static int 628static int
629ixgb_close(struct net_device *netdev) 629ixgb_close(struct net_device *netdev)
630{ 630{
631 struct ixgb_adapter *adapter = netdev->priv; 631 struct ixgb_adapter *adapter = netdev_priv(netdev);
632 632
633 ixgb_down(adapter, TRUE); 633 ixgb_down(adapter, TRUE);
634 634
@@ -1019,7 +1019,7 @@ ixgb_clean_rx_ring(struct ixgb_adapter *adapter)
1019static int 1019static int
1020ixgb_set_mac(struct net_device *netdev, void *p) 1020ixgb_set_mac(struct net_device *netdev, void *p)
1021{ 1021{
1022 struct ixgb_adapter *adapter = netdev->priv; 1022 struct ixgb_adapter *adapter = netdev_priv(netdev);
1023 struct sockaddr *addr = p; 1023 struct sockaddr *addr = p;
1024 1024
1025 if(!is_valid_ether_addr(addr->sa_data)) 1025 if(!is_valid_ether_addr(addr->sa_data))
@@ -1045,7 +1045,7 @@ ixgb_set_mac(struct net_device *netdev, void *p)
1045static void 1045static void
1046ixgb_set_multi(struct net_device *netdev) 1046ixgb_set_multi(struct net_device *netdev)
1047{ 1047{
1048 struct ixgb_adapter *adapter = netdev->priv; 1048 struct ixgb_adapter *adapter = netdev_priv(netdev);
1049 struct ixgb_hw *hw = &adapter->hw; 1049 struct ixgb_hw *hw = &adapter->hw;
1050 struct dev_mc_list *mc_ptr; 1050 struct dev_mc_list *mc_ptr;
1051 uint32_t rctl; 1051 uint32_t rctl;
@@ -1373,7 +1373,7 @@ ixgb_tx_queue(struct ixgb_adapter *adapter, int count, int vlan_id,int tx_flags)
1373static int 1373static int
1374ixgb_xmit_frame(struct sk_buff *skb, struct net_device *netdev) 1374ixgb_xmit_frame(struct sk_buff *skb, struct net_device *netdev)
1375{ 1375{
1376 struct ixgb_adapter *adapter = netdev->priv; 1376 struct ixgb_adapter *adapter = netdev_priv(netdev);
1377 unsigned int first; 1377 unsigned int first;
1378 unsigned int tx_flags = 0; 1378 unsigned int tx_flags = 0;
1379 unsigned long flags; 1379 unsigned long flags;
@@ -1427,7 +1427,7 @@ ixgb_xmit_frame(struct sk_buff *skb, struct net_device *netdev)
1427static void 1427static void
1428ixgb_tx_timeout(struct net_device *netdev) 1428ixgb_tx_timeout(struct net_device *netdev)
1429{ 1429{
1430 struct ixgb_adapter *adapter = netdev->priv; 1430 struct ixgb_adapter *adapter = netdev_priv(netdev);
1431 1431
1432 /* Do the reset outside of interrupt context */ 1432 /* Do the reset outside of interrupt context */
1433 schedule_work(&adapter->tx_timeout_task); 1433 schedule_work(&adapter->tx_timeout_task);
@@ -1436,7 +1436,7 @@ ixgb_tx_timeout(struct net_device *netdev)
1436static void 1436static void
1437ixgb_tx_timeout_task(struct net_device *netdev) 1437ixgb_tx_timeout_task(struct net_device *netdev)
1438{ 1438{
1439 struct ixgb_adapter *adapter = netdev->priv; 1439 struct ixgb_adapter *adapter = netdev_priv(netdev);
1440 1440
1441 ixgb_down(adapter, TRUE); 1441 ixgb_down(adapter, TRUE);
1442 ixgb_up(adapter); 1442 ixgb_up(adapter);
@@ -1453,7 +1453,7 @@ ixgb_tx_timeout_task(struct net_device *netdev)
1453static struct net_device_stats * 1453static struct net_device_stats *
1454ixgb_get_stats(struct net_device *netdev) 1454ixgb_get_stats(struct net_device *netdev)
1455{ 1455{
1456 struct ixgb_adapter *adapter = netdev->priv; 1456 struct ixgb_adapter *adapter = netdev_priv(netdev);
1457 1457
1458 return &adapter->net_stats; 1458 return &adapter->net_stats;
1459} 1459}
@@ -1469,7 +1469,7 @@ ixgb_get_stats(struct net_device *netdev)
1469static int 1469static int
1470ixgb_change_mtu(struct net_device *netdev, int new_mtu) 1470ixgb_change_mtu(struct net_device *netdev, int new_mtu)
1471{ 1471{
1472 struct ixgb_adapter *adapter = netdev->priv; 1472 struct ixgb_adapter *adapter = netdev_priv(netdev);
1473 int max_frame = new_mtu + ENET_HEADER_SIZE + ENET_FCS_LENGTH; 1473 int max_frame = new_mtu + ENET_HEADER_SIZE + ENET_FCS_LENGTH;
1474 int old_max_frame = netdev->mtu + ENET_HEADER_SIZE + ENET_FCS_LENGTH; 1474 int old_max_frame = netdev->mtu + ENET_HEADER_SIZE + ENET_FCS_LENGTH;
1475 1475
@@ -1643,7 +1643,7 @@ static irqreturn_t
1643ixgb_intr(int irq, void *data, struct pt_regs *regs) 1643ixgb_intr(int irq, void *data, struct pt_regs *regs)
1644{ 1644{
1645 struct net_device *netdev = data; 1645 struct net_device *netdev = data;
1646 struct ixgb_adapter *adapter = netdev->priv; 1646 struct ixgb_adapter *adapter = netdev_priv(netdev);
1647 struct ixgb_hw *hw = &adapter->hw; 1647 struct ixgb_hw *hw = &adapter->hw;
1648 uint32_t icr = IXGB_READ_REG(hw, ICR); 1648 uint32_t icr = IXGB_READ_REG(hw, ICR);
1649#ifndef CONFIG_IXGB_NAPI 1649#ifndef CONFIG_IXGB_NAPI
@@ -1690,7 +1690,7 @@ ixgb_intr(int irq, void *data, struct pt_regs *regs)
1690static int 1690static int
1691ixgb_clean(struct net_device *netdev, int *budget) 1691ixgb_clean(struct net_device *netdev, int *budget)
1692{ 1692{
1693 struct ixgb_adapter *adapter = netdev->priv; 1693 struct ixgb_adapter *adapter = netdev_priv(netdev);
1694 int work_to_do = min(*budget, netdev->quota); 1694 int work_to_do = min(*budget, netdev->quota);
1695 int tx_cleaned; 1695 int tx_cleaned;
1696 int work_done = 0; 1696 int work_done = 0;
@@ -2019,7 +2019,7 @@ ixgb_alloc_rx_buffers(struct ixgb_adapter *adapter)
2019static void 2019static void
2020ixgb_vlan_rx_register(struct net_device *netdev, struct vlan_group *grp) 2020ixgb_vlan_rx_register(struct net_device *netdev, struct vlan_group *grp)
2021{ 2021{
2022 struct ixgb_adapter *adapter = netdev->priv; 2022 struct ixgb_adapter *adapter = netdev_priv(netdev);
2023 uint32_t ctrl, rctl; 2023 uint32_t ctrl, rctl;
2024 2024
2025 ixgb_irq_disable(adapter); 2025 ixgb_irq_disable(adapter);
@@ -2057,7 +2057,7 @@ ixgb_vlan_rx_register(struct net_device *netdev, struct vlan_group *grp)
2057static void 2057static void
2058ixgb_vlan_rx_add_vid(struct net_device *netdev, uint16_t vid) 2058ixgb_vlan_rx_add_vid(struct net_device *netdev, uint16_t vid)
2059{ 2059{
2060 struct ixgb_adapter *adapter = netdev->priv; 2060 struct ixgb_adapter *adapter = netdev_priv(netdev);
2061 uint32_t vfta, index; 2061 uint32_t vfta, index;
2062 2062
2063 /* add VID to filter table */ 2063 /* add VID to filter table */
@@ -2071,7 +2071,7 @@ ixgb_vlan_rx_add_vid(struct net_device *netdev, uint16_t vid)
2071static void 2071static void
2072ixgb_vlan_rx_kill_vid(struct net_device *netdev, uint16_t vid) 2072ixgb_vlan_rx_kill_vid(struct net_device *netdev, uint16_t vid)
2073{ 2073{
2074 struct ixgb_adapter *adapter = netdev->priv; 2074 struct ixgb_adapter *adapter = netdev_priv(netdev);
2075 uint32_t vfta, index; 2075 uint32_t vfta, index;
2076 2076
2077 ixgb_irq_disable(adapter); 2077 ixgb_irq_disable(adapter);