aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Chan <mchan@broadcom.com>2006-01-23 19:12:43 -0500
committerDavid S. Miller <davem@davemloft.net>2006-01-23 19:12:43 -0500
commit972ec0d4ba67bf0ec7f00cd93fbac47452f80d25 (patch)
tree462f4d151f8989b7a04ea3cee630e162cdfeaa0e
parent1122db717ab5443ca9043fc0d23c1e862cfb3a61 (diff)
[BNX2]: Use netdev_priv()
Replace dev->priv with netdev_priv(dev) Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/bnx2.c80
1 files changed, 40 insertions, 40 deletions
diff --git a/drivers/net/bnx2.c b/drivers/net/bnx2.c
index 4f613b0be140..7be011f37d13 100644
--- a/drivers/net/bnx2.c
+++ b/drivers/net/bnx2.c
@@ -1799,7 +1799,7 @@ static irqreturn_t
1799bnx2_msi(int irq, void *dev_instance, struct pt_regs *regs) 1799bnx2_msi(int irq, void *dev_instance, struct pt_regs *regs)
1800{ 1800{
1801 struct net_device *dev = dev_instance; 1801 struct net_device *dev = dev_instance;
1802 struct bnx2 *bp = dev->priv; 1802 struct bnx2 *bp = netdev_priv(dev);
1803 1803
1804 prefetch(bp->status_blk); 1804 prefetch(bp->status_blk);
1805 REG_WR(bp, BNX2_PCICFG_INT_ACK_CMD, 1805 REG_WR(bp, BNX2_PCICFG_INT_ACK_CMD,
@@ -1819,7 +1819,7 @@ static irqreturn_t
1819bnx2_interrupt(int irq, void *dev_instance, struct pt_regs *regs) 1819bnx2_interrupt(int irq, void *dev_instance, struct pt_regs *regs)
1820{ 1820{
1821 struct net_device *dev = dev_instance; 1821 struct net_device *dev = dev_instance;
1822 struct bnx2 *bp = dev->priv; 1822 struct bnx2 *bp = netdev_priv(dev);
1823 1823
1824 /* When using INTx, it is possible for the interrupt to arrive 1824 /* When using INTx, it is possible for the interrupt to arrive
1825 * at the CPU before the status block posted prior to the 1825 * at the CPU before the status block posted prior to the
@@ -1864,7 +1864,7 @@ bnx2_has_work(struct bnx2 *bp)
1864static int 1864static int
1865bnx2_poll(struct net_device *dev, int *budget) 1865bnx2_poll(struct net_device *dev, int *budget)
1866{ 1866{
1867 struct bnx2 *bp = dev->priv; 1867 struct bnx2 *bp = netdev_priv(dev);
1868 1868
1869 if ((bp->status_blk->status_attn_bits & 1869 if ((bp->status_blk->status_attn_bits &
1870 STATUS_ATTN_BITS_LINK_STATE) != 1870 STATUS_ATTN_BITS_LINK_STATE) !=
@@ -1922,7 +1922,7 @@ bnx2_poll(struct net_device *dev, int *budget)
1922static void 1922static void
1923bnx2_set_rx_mode(struct net_device *dev) 1923bnx2_set_rx_mode(struct net_device *dev)
1924{ 1924{
1925 struct bnx2 *bp = dev->priv; 1925 struct bnx2 *bp = netdev_priv(dev);
1926 u32 rx_mode, sort_mode; 1926 u32 rx_mode, sort_mode;
1927 int i; 1927 int i;
1928 1928
@@ -4194,7 +4194,7 @@ bnx2_restart_timer:
4194static int 4194static int
4195bnx2_open(struct net_device *dev) 4195bnx2_open(struct net_device *dev)
4196{ 4196{
4197 struct bnx2 *bp = dev->priv; 4197 struct bnx2 *bp = netdev_priv(dev);
4198 int rc; 4198 int rc;
4199 4199
4200 bnx2_set_power_state(bp, PCI_D0); 4200 bnx2_set_power_state(bp, PCI_D0);
@@ -4307,7 +4307,7 @@ bnx2_reset_task(void *data)
4307static void 4307static void
4308bnx2_tx_timeout(struct net_device *dev) 4308bnx2_tx_timeout(struct net_device *dev)
4309{ 4309{
4310 struct bnx2 *bp = dev->priv; 4310 struct bnx2 *bp = netdev_priv(dev);
4311 4311
4312 /* This allows the netif to be shutdown gracefully before resetting */ 4312 /* This allows the netif to be shutdown gracefully before resetting */
4313 schedule_work(&bp->reset_task); 4313 schedule_work(&bp->reset_task);
@@ -4318,7 +4318,7 @@ bnx2_tx_timeout(struct net_device *dev)
4318static void 4318static void
4319bnx2_vlan_rx_register(struct net_device *dev, struct vlan_group *vlgrp) 4319bnx2_vlan_rx_register(struct net_device *dev, struct vlan_group *vlgrp)
4320{ 4320{
4321 struct bnx2 *bp = dev->priv; 4321 struct bnx2 *bp = netdev_priv(dev);
4322 4322
4323 bnx2_netif_stop(bp); 4323 bnx2_netif_stop(bp);
4324 4324
@@ -4332,7 +4332,7 @@ bnx2_vlan_rx_register(struct net_device *dev, struct vlan_group *vlgrp)
4332static void 4332static void
4333bnx2_vlan_rx_kill_vid(struct net_device *dev, uint16_t vid) 4333bnx2_vlan_rx_kill_vid(struct net_device *dev, uint16_t vid)
4334{ 4334{
4335 struct bnx2 *bp = dev->priv; 4335 struct bnx2 *bp = netdev_priv(dev);
4336 4336
4337 bnx2_netif_stop(bp); 4337 bnx2_netif_stop(bp);
4338 4338
@@ -4353,7 +4353,7 @@ bnx2_vlan_rx_kill_vid(struct net_device *dev, uint16_t vid)
4353static int 4353static int
4354bnx2_start_xmit(struct sk_buff *skb, struct net_device *dev) 4354bnx2_start_xmit(struct sk_buff *skb, struct net_device *dev)
4355{ 4355{
4356 struct bnx2 *bp = dev->priv; 4356 struct bnx2 *bp = netdev_priv(dev);
4357 dma_addr_t mapping; 4357 dma_addr_t mapping;
4358 struct tx_bd *txbd; 4358 struct tx_bd *txbd;
4359 struct sw_bd *tx_buf; 4359 struct sw_bd *tx_buf;
@@ -4482,7 +4482,7 @@ bnx2_start_xmit(struct sk_buff *skb, struct net_device *dev)
4482static int 4482static int
4483bnx2_close(struct net_device *dev) 4483bnx2_close(struct net_device *dev)
4484{ 4484{
4485 struct bnx2 *bp = dev->priv; 4485 struct bnx2 *bp = netdev_priv(dev);
4486 u32 reset_code; 4486 u32 reset_code;
4487 4487
4488 /* Calling flush_scheduled_work() may deadlock because 4488 /* Calling flush_scheduled_work() may deadlock because
@@ -4530,7 +4530,7 @@ bnx2_close(struct net_device *dev)
4530static struct net_device_stats * 4530static struct net_device_stats *
4531bnx2_get_stats(struct net_device *dev) 4531bnx2_get_stats(struct net_device *dev)
4532{ 4532{
4533 struct bnx2 *bp = dev->priv; 4533 struct bnx2 *bp = netdev_priv(dev);
4534 struct statistics_block *stats_blk = bp->stats_blk; 4534 struct statistics_block *stats_blk = bp->stats_blk;
4535 struct net_device_stats *net_stats = &bp->net_stats; 4535 struct net_device_stats *net_stats = &bp->net_stats;
4536 4536
@@ -4604,7 +4604,7 @@ bnx2_get_stats(struct net_device *dev)
4604static int 4604static int
4605bnx2_get_settings(struct net_device *dev, struct ethtool_cmd *cmd) 4605bnx2_get_settings(struct net_device *dev, struct ethtool_cmd *cmd)
4606{ 4606{
4607 struct bnx2 *bp = dev->priv; 4607 struct bnx2 *bp = netdev_priv(dev);
4608 4608
4609 cmd->supported = SUPPORTED_Autoneg; 4609 cmd->supported = SUPPORTED_Autoneg;
4610 if (bp->phy_flags & PHY_SERDES_FLAG) { 4610 if (bp->phy_flags & PHY_SERDES_FLAG) {
@@ -4651,7 +4651,7 @@ bnx2_get_settings(struct net_device *dev, struct ethtool_cmd *cmd)
4651static int 4651static int
4652bnx2_set_settings(struct net_device *dev, struct ethtool_cmd *cmd) 4652bnx2_set_settings(struct net_device *dev, struct ethtool_cmd *cmd)
4653{ 4653{
4654 struct bnx2 *bp = dev->priv; 4654 struct bnx2 *bp = netdev_priv(dev);
4655 u8 autoneg = bp->autoneg; 4655 u8 autoneg = bp->autoneg;
4656 u8 req_duplex = bp->req_duplex; 4656 u8 req_duplex = bp->req_duplex;
4657 u16 req_line_speed = bp->req_line_speed; 4657 u16 req_line_speed = bp->req_line_speed;
@@ -4723,7 +4723,7 @@ bnx2_set_settings(struct net_device *dev, struct ethtool_cmd *cmd)
4723static void 4723static void
4724bnx2_get_drvinfo(struct net_device *dev, struct ethtool_drvinfo *info) 4724bnx2_get_drvinfo(struct net_device *dev, struct ethtool_drvinfo *info)
4725{ 4725{
4726 struct bnx2 *bp = dev->priv; 4726 struct bnx2 *bp = netdev_priv(dev);
4727 4727
4728 strcpy(info->driver, DRV_MODULE_NAME); 4728 strcpy(info->driver, DRV_MODULE_NAME);
4729 strcpy(info->version, DRV_MODULE_VERSION); 4729 strcpy(info->version, DRV_MODULE_VERSION);
@@ -4739,7 +4739,7 @@ bnx2_get_drvinfo(struct net_device *dev, struct ethtool_drvinfo *info)
4739static void 4739static void
4740bnx2_get_wol(struct net_device *dev, struct ethtool_wolinfo *wol) 4740bnx2_get_wol(struct net_device *dev, struct ethtool_wolinfo *wol)
4741{ 4741{
4742 struct bnx2 *bp = dev->priv; 4742 struct bnx2 *bp = netdev_priv(dev);
4743 4743
4744 if (bp->flags & NO_WOL_FLAG) { 4744 if (bp->flags & NO_WOL_FLAG) {
4745 wol->supported = 0; 4745 wol->supported = 0;
@@ -4758,7 +4758,7 @@ bnx2_get_wol(struct net_device *dev, struct ethtool_wolinfo *wol)
4758static int 4758static int
4759bnx2_set_wol(struct net_device *dev, struct ethtool_wolinfo *wol) 4759bnx2_set_wol(struct net_device *dev, struct ethtool_wolinfo *wol)
4760{ 4760{
4761 struct bnx2 *bp = dev->priv; 4761 struct bnx2 *bp = netdev_priv(dev);
4762 4762
4763 if (wol->wolopts & ~WAKE_MAGIC) 4763 if (wol->wolopts & ~WAKE_MAGIC)
4764 return -EINVAL; 4764 return -EINVAL;
@@ -4778,7 +4778,7 @@ bnx2_set_wol(struct net_device *dev, struct ethtool_wolinfo *wol)
4778static int 4778static int
4779bnx2_nway_reset(struct net_device *dev) 4779bnx2_nway_reset(struct net_device *dev)
4780{ 4780{
4781 struct bnx2 *bp = dev->priv; 4781 struct bnx2 *bp = netdev_priv(dev);
4782 u32 bmcr; 4782 u32 bmcr;
4783 4783
4784 if (!(bp->autoneg & AUTONEG_SPEED)) { 4784 if (!(bp->autoneg & AUTONEG_SPEED)) {
@@ -4814,7 +4814,7 @@ bnx2_nway_reset(struct net_device *dev)
4814static int 4814static int
4815bnx2_get_eeprom_len(struct net_device *dev) 4815bnx2_get_eeprom_len(struct net_device *dev)
4816{ 4816{
4817 struct bnx2 *bp = dev->priv; 4817 struct bnx2 *bp = netdev_priv(dev);
4818 4818
4819 if (bp->flash_info == NULL) 4819 if (bp->flash_info == NULL)
4820 return 0; 4820 return 0;
@@ -4826,7 +4826,7 @@ static int
4826bnx2_get_eeprom(struct net_device *dev, struct ethtool_eeprom *eeprom, 4826bnx2_get_eeprom(struct net_device *dev, struct ethtool_eeprom *eeprom,
4827 u8 *eebuf) 4827 u8 *eebuf)
4828{ 4828{
4829 struct bnx2 *bp = dev->priv; 4829 struct bnx2 *bp = netdev_priv(dev);
4830 int rc; 4830 int rc;
4831 4831
4832 /* parameters already validated in ethtool_get_eeprom */ 4832 /* parameters already validated in ethtool_get_eeprom */
@@ -4840,7 +4840,7 @@ static int
4840bnx2_set_eeprom(struct net_device *dev, struct ethtool_eeprom *eeprom, 4840bnx2_set_eeprom(struct net_device *dev, struct ethtool_eeprom *eeprom,
4841 u8 *eebuf) 4841 u8 *eebuf)
4842{ 4842{
4843 struct bnx2 *bp = dev->priv; 4843 struct bnx2 *bp = netdev_priv(dev);
4844 int rc; 4844 int rc;
4845 4845
4846 /* parameters already validated in ethtool_set_eeprom */ 4846 /* parameters already validated in ethtool_set_eeprom */
@@ -4853,7 +4853,7 @@ bnx2_set_eeprom(struct net_device *dev, struct ethtool_eeprom *eeprom,
4853static int 4853static int
4854bnx2_get_coalesce(struct net_device *dev, struct ethtool_coalesce *coal) 4854bnx2_get_coalesce(struct net_device *dev, struct ethtool_coalesce *coal)
4855{ 4855{
4856 struct bnx2 *bp = dev->priv; 4856 struct bnx2 *bp = netdev_priv(dev);
4857 4857
4858 memset(coal, 0, sizeof(struct ethtool_coalesce)); 4858 memset(coal, 0, sizeof(struct ethtool_coalesce));
4859 4859
@@ -4875,7 +4875,7 @@ bnx2_get_coalesce(struct net_device *dev, struct ethtool_coalesce *coal)
4875static int 4875static int
4876bnx2_set_coalesce(struct net_device *dev, struct ethtool_coalesce *coal) 4876bnx2_set_coalesce(struct net_device *dev, struct ethtool_coalesce *coal)
4877{ 4877{
4878 struct bnx2 *bp = dev->priv; 4878 struct bnx2 *bp = netdev_priv(dev);
4879 4879
4880 bp->rx_ticks = (u16) coal->rx_coalesce_usecs; 4880 bp->rx_ticks = (u16) coal->rx_coalesce_usecs;
4881 if (bp->rx_ticks > 0x3ff) bp->rx_ticks = 0x3ff; 4881 if (bp->rx_ticks > 0x3ff) bp->rx_ticks = 0x3ff;
@@ -4919,7 +4919,7 @@ bnx2_set_coalesce(struct net_device *dev, struct ethtool_coalesce *coal)
4919static void 4919static void
4920bnx2_get_ringparam(struct net_device *dev, struct ethtool_ringparam *ering) 4920bnx2_get_ringparam(struct net_device *dev, struct ethtool_ringparam *ering)
4921{ 4921{
4922 struct bnx2 *bp = dev->priv; 4922 struct bnx2 *bp = netdev_priv(dev);
4923 4923
4924 ering->rx_max_pending = MAX_RX_DESC_CNT; 4924 ering->rx_max_pending = MAX_RX_DESC_CNT;
4925 ering->rx_mini_max_pending = 0; 4925 ering->rx_mini_max_pending = 0;
@@ -4936,7 +4936,7 @@ bnx2_get_ringparam(struct net_device *dev, struct ethtool_ringparam *ering)
4936static int 4936static int
4937bnx2_set_ringparam(struct net_device *dev, struct ethtool_ringparam *ering) 4937bnx2_set_ringparam(struct net_device *dev, struct ethtool_ringparam *ering)
4938{ 4938{
4939 struct bnx2 *bp = dev->priv; 4939 struct bnx2 *bp = netdev_priv(dev);
4940 4940
4941 if ((ering->rx_pending > MAX_RX_DESC_CNT) || 4941 if ((ering->rx_pending > MAX_RX_DESC_CNT) ||
4942 (ering->tx_pending > MAX_TX_DESC_CNT) || 4942 (ering->tx_pending > MAX_TX_DESC_CNT) ||
@@ -4959,7 +4959,7 @@ bnx2_set_ringparam(struct net_device *dev, struct ethtool_ringparam *ering)
4959static void 4959static void
4960bnx2_get_pauseparam(struct net_device *dev, struct ethtool_pauseparam *epause) 4960bnx2_get_pauseparam(struct net_device *dev, struct ethtool_pauseparam *epause)
4961{ 4961{
4962 struct bnx2 *bp = dev->priv; 4962 struct bnx2 *bp = netdev_priv(dev);
4963 4963
4964 epause->autoneg = ((bp->autoneg & AUTONEG_FLOW_CTRL) != 0); 4964 epause->autoneg = ((bp->autoneg & AUTONEG_FLOW_CTRL) != 0);
4965 epause->rx_pause = ((bp->flow_ctrl & FLOW_CTRL_RX) != 0); 4965 epause->rx_pause = ((bp->flow_ctrl & FLOW_CTRL_RX) != 0);
@@ -4969,7 +4969,7 @@ bnx2_get_pauseparam(struct net_device *dev, struct ethtool_pauseparam *epause)
4969static int 4969static int
4970bnx2_set_pauseparam(struct net_device *dev, struct ethtool_pauseparam *epause) 4970bnx2_set_pauseparam(struct net_device *dev, struct ethtool_pauseparam *epause)
4971{ 4971{
4972 struct bnx2 *bp = dev->priv; 4972 struct bnx2 *bp = netdev_priv(dev);
4973 4973
4974 bp->req_flow_ctrl = 0; 4974 bp->req_flow_ctrl = 0;
4975 if (epause->rx_pause) 4975 if (epause->rx_pause)
@@ -4996,7 +4996,7 @@ bnx2_set_pauseparam(struct net_device *dev, struct ethtool_pauseparam *epause)
4996static u32 4996static u32
4997bnx2_get_rx_csum(struct net_device *dev) 4997bnx2_get_rx_csum(struct net_device *dev)
4998{ 4998{
4999 struct bnx2 *bp = dev->priv; 4999 struct bnx2 *bp = netdev_priv(dev);
5000 5000
5001 return bp->rx_csum; 5001 return bp->rx_csum;
5002} 5002}
@@ -5004,7 +5004,7 @@ bnx2_get_rx_csum(struct net_device *dev)
5004static int 5004static int
5005bnx2_set_rx_csum(struct net_device *dev, u32 data) 5005bnx2_set_rx_csum(struct net_device *dev, u32 data)
5006{ 5006{
5007 struct bnx2 *bp = dev->priv; 5007 struct bnx2 *bp = netdev_priv(dev);
5008 5008
5009 bp->rx_csum = data; 5009 bp->rx_csum = data;
5010 return 0; 5010 return 0;
@@ -5153,7 +5153,7 @@ bnx2_self_test_count(struct net_device *dev)
5153static void 5153static void
5154bnx2_self_test(struct net_device *dev, struct ethtool_test *etest, u64 *buf) 5154bnx2_self_test(struct net_device *dev, struct ethtool_test *etest, u64 *buf)
5155{ 5155{
5156 struct bnx2 *bp = dev->priv; 5156 struct bnx2 *bp = netdev_priv(dev);
5157 5157
5158 memset(buf, 0, sizeof(u64) * BNX2_NUM_TESTS); 5158 memset(buf, 0, sizeof(u64) * BNX2_NUM_TESTS);
5159 if (etest->flags & ETH_TEST_FL_OFFLINE) { 5159 if (etest->flags & ETH_TEST_FL_OFFLINE) {
@@ -5229,7 +5229,7 @@ static void
5229bnx2_get_ethtool_stats(struct net_device *dev, 5229bnx2_get_ethtool_stats(struct net_device *dev,
5230 struct ethtool_stats *stats, u64 *buf) 5230 struct ethtool_stats *stats, u64 *buf)
5231{ 5231{
5232 struct bnx2 *bp = dev->priv; 5232 struct bnx2 *bp = netdev_priv(dev);
5233 int i; 5233 int i;
5234 u32 *hw_stats = (u32 *) bp->stats_blk; 5234 u32 *hw_stats = (u32 *) bp->stats_blk;
5235 u8 *stats_len_arr = NULL; 5235 u8 *stats_len_arr = NULL;
@@ -5269,7 +5269,7 @@ bnx2_get_ethtool_stats(struct net_device *dev,
5269static int 5269static int
5270bnx2_phys_id(struct net_device *dev, u32 data) 5270bnx2_phys_id(struct net_device *dev, u32 data)
5271{ 5271{
5272 struct bnx2 *bp = dev->priv; 5272 struct bnx2 *bp = netdev_priv(dev);
5273 int i; 5273 int i;
5274 u32 save; 5274 u32 save;
5275 5275
@@ -5341,7 +5341,7 @@ static int
5341bnx2_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) 5341bnx2_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
5342{ 5342{
5343 struct mii_ioctl_data *data = if_mii(ifr); 5343 struct mii_ioctl_data *data = if_mii(ifr);
5344 struct bnx2 *bp = dev->priv; 5344 struct bnx2 *bp = netdev_priv(dev);
5345 int err; 5345 int err;
5346 5346
5347 switch(cmd) { 5347 switch(cmd) {
@@ -5383,7 +5383,7 @@ static int
5383bnx2_change_mac_addr(struct net_device *dev, void *p) 5383bnx2_change_mac_addr(struct net_device *dev, void *p)
5384{ 5384{
5385 struct sockaddr *addr = p; 5385 struct sockaddr *addr = p;
5386 struct bnx2 *bp = dev->priv; 5386 struct bnx2 *bp = netdev_priv(dev);
5387 5387
5388 if (!is_valid_ether_addr(addr->sa_data)) 5388 if (!is_valid_ether_addr(addr->sa_data))
5389 return -EINVAL; 5389 return -EINVAL;
@@ -5399,7 +5399,7 @@ bnx2_change_mac_addr(struct net_device *dev, void *p)
5399static int 5399static int
5400bnx2_change_mtu(struct net_device *dev, int new_mtu) 5400bnx2_change_mtu(struct net_device *dev, int new_mtu)
5401{ 5401{
5402 struct bnx2 *bp = dev->priv; 5402 struct bnx2 *bp = netdev_priv(dev);
5403 5403
5404 if (((new_mtu + ETH_HLEN) > MAX_ETHERNET_JUMBO_PACKET_SIZE) || 5404 if (((new_mtu + ETH_HLEN) > MAX_ETHERNET_JUMBO_PACKET_SIZE) ||
5405 ((new_mtu + ETH_HLEN) < MIN_ETHERNET_PACKET_SIZE)) 5405 ((new_mtu + ETH_HLEN) < MIN_ETHERNET_PACKET_SIZE))
@@ -5420,7 +5420,7 @@ bnx2_change_mtu(struct net_device *dev, int new_mtu)
5420static void 5420static void
5421poll_bnx2(struct net_device *dev) 5421poll_bnx2(struct net_device *dev)
5422{ 5422{
5423 struct bnx2 *bp = dev->priv; 5423 struct bnx2 *bp = netdev_priv(dev);
5424 5424
5425 disable_irq(bp->pdev->irq); 5425 disable_irq(bp->pdev->irq);
5426 bnx2_interrupt(bp->pdev->irq, dev, NULL); 5426 bnx2_interrupt(bp->pdev->irq, dev, NULL);
@@ -5438,7 +5438,7 @@ bnx2_init_board(struct pci_dev *pdev, struct net_device *dev)
5438 5438
5439 SET_MODULE_OWNER(dev); 5439 SET_MODULE_OWNER(dev);
5440 SET_NETDEV_DEV(dev, &pdev->dev); 5440 SET_NETDEV_DEV(dev, &pdev->dev);
5441 bp = dev->priv; 5441 bp = netdev_priv(dev);
5442 5442
5443 bp->flags = 0; 5443 bp->flags = 0;
5444 bp->phy_flags = 0; 5444 bp->phy_flags = 0;
@@ -5757,7 +5757,7 @@ bnx2_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
5757 dev->ethtool_ops = &bnx2_ethtool_ops; 5757 dev->ethtool_ops = &bnx2_ethtool_ops;
5758 dev->weight = 64; 5758 dev->weight = 64;
5759 5759
5760 bp = dev->priv; 5760 bp = netdev_priv(dev);
5761 5761
5762#if defined(HAVE_POLL_CONTROLLER) || defined(CONFIG_NET_POLL_CONTROLLER) 5762#if defined(HAVE_POLL_CONTROLLER) || defined(CONFIG_NET_POLL_CONTROLLER)
5763 dev->poll_controller = poll_bnx2; 5763 dev->poll_controller = poll_bnx2;
@@ -5816,7 +5816,7 @@ static void __devexit
5816bnx2_remove_one(struct pci_dev *pdev) 5816bnx2_remove_one(struct pci_dev *pdev)
5817{ 5817{
5818 struct net_device *dev = pci_get_drvdata(pdev); 5818 struct net_device *dev = pci_get_drvdata(pdev);
5819 struct bnx2 *bp = dev->priv; 5819 struct bnx2 *bp = netdev_priv(dev);
5820 5820
5821 flush_scheduled_work(); 5821 flush_scheduled_work();
5822 5822
@@ -5835,7 +5835,7 @@ static int
5835bnx2_suspend(struct pci_dev *pdev, pm_message_t state) 5835bnx2_suspend(struct pci_dev *pdev, pm_message_t state)
5836{ 5836{
5837 struct net_device *dev = pci_get_drvdata(pdev); 5837 struct net_device *dev = pci_get_drvdata(pdev);
5838 struct bnx2 *bp = dev->priv; 5838 struct bnx2 *bp = netdev_priv(dev);
5839 u32 reset_code; 5839 u32 reset_code;
5840 5840
5841 if (!netif_running(dev)) 5841 if (!netif_running(dev))
@@ -5860,7 +5860,7 @@ static int
5860bnx2_resume(struct pci_dev *pdev) 5860bnx2_resume(struct pci_dev *pdev)
5861{ 5861{
5862 struct net_device *dev = pci_get_drvdata(pdev); 5862 struct net_device *dev = pci_get_drvdata(pdev);
5863 struct bnx2 *bp = dev->priv; 5863 struct bnx2 *bp = netdev_priv(dev);
5864 5864
5865 if (!netif_running(dev)) 5865 if (!netif_running(dev))
5866 return 0; 5866 return 0;