Commit 543b4e66 authored by Luis R. Rodriguez's avatar Luis R. Rodriguez Committed by Jeff Garzik

[wireless prism54] use netdev_priv() helper

parent 2bb0a0bb
This diff is collapsed.
...@@ -245,7 +245,7 @@ static int ...@@ -245,7 +245,7 @@ static int
islpci_open(struct net_device *ndev) islpci_open(struct net_device *ndev)
{ {
u32 rc; u32 rc;
islpci_private *priv = ndev->priv; islpci_private *priv = netdev_priv(ndev);
printk(KERN_DEBUG "%s: islpci_open()\n", ndev->name); printk(KERN_DEBUG "%s: islpci_open()\n", ndev->name);
...@@ -265,7 +265,7 @@ islpci_open(struct net_device *ndev) ...@@ -265,7 +265,7 @@ islpci_open(struct net_device *ndev)
static int static int
islpci_close(struct net_device *ndev) islpci_close(struct net_device *ndev)
{ {
islpci_private *priv = ndev->priv; islpci_private *priv = netdev_priv(ndev);
printk(KERN_DEBUG "%s: islpci_close ()\n", ndev->name); printk(KERN_DEBUG "%s: islpci_close ()\n", ndev->name);
...@@ -491,7 +491,7 @@ islpci_reset(islpci_private *priv, int reload_firmware) ...@@ -491,7 +491,7 @@ islpci_reset(islpci_private *priv, int reload_firmware)
struct net_device_stats * struct net_device_stats *
islpci_statistics(struct net_device *ndev) islpci_statistics(struct net_device *ndev)
{ {
islpci_private *priv = ndev->priv; islpci_private *priv = netdev_priv(ndev);
#if VERBOSE > SHOW_ERROR_MESSAGES #if VERBOSE > SHOW_ERROR_MESSAGES
DEBUG(SHOW_FUNCTION_CALLS, "islpci_statistics \n"); DEBUG(SHOW_FUNCTION_CALLS, "islpci_statistics \n");
......
...@@ -72,7 +72,7 @@ islpci_eth_cleanup_transmit(islpci_private *priv, ...@@ -72,7 +72,7 @@ islpci_eth_cleanup_transmit(islpci_private *priv,
int int
islpci_eth_transmit(struct sk_buff *skb, struct net_device *ndev) islpci_eth_transmit(struct sk_buff *skb, struct net_device *ndev)
{ {
islpci_private *priv = ndev->priv; islpci_private *priv = netdev_priv(ndev);
isl38xx_control_block *cb = priv->control_block; isl38xx_control_block *cb = priv->control_block;
u32 index; u32 index;
dma_addr_t pci_map_address; dma_addr_t pci_map_address;
...@@ -411,7 +411,7 @@ islpci_eth_receive(islpci_private *priv) ...@@ -411,7 +411,7 @@ islpci_eth_receive(islpci_private *priv)
void void
islpci_eth_tx_timeout(struct net_device *ndev) islpci_eth_tx_timeout(struct net_device *ndev)
{ {
islpci_private *priv = ndev->priv; islpci_private *priv = netdev_priv(ndev);
struct net_device_stats *statistics = &priv->statistics; struct net_device_stats *statistics = &priv->statistics;
/* increment the transmit error counter */ /* increment the transmit error counter */
......
...@@ -133,7 +133,7 @@ prism54_get_card_model(struct net_device *ndev) ...@@ -133,7 +133,7 @@ prism54_get_card_model(struct net_device *ndev)
islpci_private *priv; islpci_private *priv;
char *modelp; char *modelp;
priv = ndev->priv; priv = netdev_priv(ndev);
switch (priv->pdev->subsystem_device) { switch (priv->pdev->subsystem_device) {
case PCIDEVICE_ISL3877: case PCIDEVICE_ISL3877:
modelp = "PRISM Indigo"; modelp = "PRISM Indigo";
...@@ -269,7 +269,7 @@ prism54_probe(struct pci_dev *pdev, const struct pci_device_id *id) ...@@ -269,7 +269,7 @@ prism54_probe(struct pci_dev *pdev, const struct pci_device_id *id)
goto do_pci_release_regions; goto do_pci_release_regions;
} }
priv = ndev->priv; priv = netdev_priv(ndev);
islpci_set_state(priv, PRV_STATE_PREBOOT); /* we are attempting to boot */ islpci_set_state(priv, PRV_STATE_PREBOOT); /* we are attempting to boot */
/* card is in unknown state yet, might have some interrupts pending */ /* card is in unknown state yet, might have some interrupts pending */
...@@ -314,7 +314,7 @@ void ...@@ -314,7 +314,7 @@ void
prism54_remove(struct pci_dev *pdev) prism54_remove(struct pci_dev *pdev)
{ {
struct net_device *ndev = pci_get_drvdata(pdev); struct net_device *ndev = pci_get_drvdata(pdev);
islpci_private *priv = ndev ? ndev->priv : 0; islpci_private *priv = ndev ? netdev_priv(ndev) : 0;
BUG_ON(!priv); BUG_ON(!priv);
if (!__in_cleanup_module) { if (!__in_cleanup_module) {
...@@ -355,7 +355,7 @@ int ...@@ -355,7 +355,7 @@ int
prism54_suspend(struct pci_dev *pdev, u32 state) prism54_suspend(struct pci_dev *pdev, u32 state)
{ {
struct net_device *ndev = pci_get_drvdata(pdev); struct net_device *ndev = pci_get_drvdata(pdev);
islpci_private *priv = ndev ? ndev->priv : 0; islpci_private *priv = ndev ? netdev_priv(ndev) : 0;
BUG_ON(!priv); BUG_ON(!priv);
printk(KERN_NOTICE "%s: got suspend request (state %d)\n", printk(KERN_NOTICE "%s: got suspend request (state %d)\n",
...@@ -380,7 +380,7 @@ int ...@@ -380,7 +380,7 @@ int
prism54_resume(struct pci_dev *pdev) prism54_resume(struct pci_dev *pdev)
{ {
struct net_device *ndev = pci_get_drvdata(pdev); struct net_device *ndev = pci_get_drvdata(pdev);
islpci_private *priv = ndev ? ndev->priv : 0; islpci_private *priv = ndev ? netdev_priv(ndev) : 0;
BUG_ON(!priv); BUG_ON(!priv);
printk(KERN_NOTICE "%s: got resume request\n", ndev->name); printk(KERN_NOTICE "%s: got resume request\n", ndev->name);
......
...@@ -106,7 +106,7 @@ pimfor_decode_header(void *data, int len) ...@@ -106,7 +106,7 @@ pimfor_decode_header(void *data, int len)
int int
islpci_mgmt_rx_fill(struct net_device *ndev) islpci_mgmt_rx_fill(struct net_device *ndev)
{ {
islpci_private *priv = ndev->priv; islpci_private *priv = netdev_priv(ndev);
isl38xx_control_block *cb = /* volatile not needed */ isl38xx_control_block *cb = /* volatile not needed */
(isl38xx_control_block *) priv->control_block; (isl38xx_control_block *) priv->control_block;
u32 curr = le32_to_cpu(cb->driver_curr_frag[ISL38XX_CB_RX_MGMTQ]); u32 curr = le32_to_cpu(cb->driver_curr_frag[ISL38XX_CB_RX_MGMTQ]);
...@@ -165,7 +165,7 @@ static int ...@@ -165,7 +165,7 @@ static int
islpci_mgt_transmit(struct net_device *ndev, int operation, unsigned long oid, islpci_mgt_transmit(struct net_device *ndev, int operation, unsigned long oid,
void *data, int length) void *data, int length)
{ {
islpci_private *priv = ndev->priv; islpci_private *priv = netdev_priv(ndev);
isl38xx_control_block *cb = isl38xx_control_block *cb =
(isl38xx_control_block *) priv->control_block; (isl38xx_control_block *) priv->control_block;
void *p; void *p;
...@@ -271,7 +271,7 @@ islpci_mgt_transmit(struct net_device *ndev, int operation, unsigned long oid, ...@@ -271,7 +271,7 @@ islpci_mgt_transmit(struct net_device *ndev, int operation, unsigned long oid,
int int
islpci_mgt_receive(struct net_device *ndev) islpci_mgt_receive(struct net_device *ndev)
{ {
islpci_private *priv = ndev->priv; islpci_private *priv = netdev_priv(ndev);
isl38xx_control_block *cb = isl38xx_control_block *cb =
(isl38xx_control_block *) priv->control_block; (isl38xx_control_block *) priv->control_block;
u32 curr_frag; u32 curr_frag;
...@@ -414,7 +414,7 @@ n", ...@@ -414,7 +414,7 @@ n",
void void
islpci_mgt_cleanup_transmit(struct net_device *ndev) islpci_mgt_cleanup_transmit(struct net_device *ndev)
{ {
islpci_private *priv = ndev->priv; islpci_private *priv = netdev_priv(ndev);
isl38xx_control_block *cb = /* volatile not needed */ isl38xx_control_block *cb = /* volatile not needed */
(isl38xx_control_block *) priv->control_block; (isl38xx_control_block *) priv->control_block;
u32 curr_frag; u32 curr_frag;
...@@ -451,7 +451,7 @@ islpci_mgt_transaction(struct net_device *ndev, ...@@ -451,7 +451,7 @@ islpci_mgt_transaction(struct net_device *ndev,
void *senddata, int sendlen, void *senddata, int sendlen,
struct islpci_mgmtframe **recvframe) struct islpci_mgmtframe **recvframe)
{ {
islpci_private *priv = ndev->priv; islpci_private *priv = netdev_priv(ndev);
const long wait_cycle_jiffies = (ISL38XX_WAIT_CYCLE * 10 * HZ) / 1000; const long wait_cycle_jiffies = (ISL38XX_WAIT_CYCLE * 10 * HZ) / 1000;
long timeout_left = ISL38XX_MAX_WAIT_CYCLES * wait_cycle_jiffies; long timeout_left = ISL38XX_MAX_WAIT_CYCLES * wait_cycle_jiffies;
int err; int err;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment