diff options
author | David Kilroy <kilroyd@googlemail.com> | 2009-06-18 18:21:23 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-07-10 15:01:44 -0400 |
commit | a2608362b22ade22ef5472a8c9b82687d86f976f (patch) | |
tree | 116eb83f4bb6afc454dd5b082e8b51384477b3d3 /drivers/net/wireless/orinoco/main.c | |
parent | 44d8dade8f12ffe5c9b7eddd0512c1548c027a4c (diff) |
orinoco: Replace net_device with orinoco_private in driver interfaces
Move away from using net_device as the main structure in orinoco
function calls. Use orinoco_private instead.
This makes more sense when we move to cfg80211, and we get wiphys as
well.
Signed-off-by: David Kilroy <kilroyd@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/orinoco/main.c')
-rw-r--r-- | drivers/net/wireless/orinoco/main.c | 31 |
1 files changed, 15 insertions, 16 deletions
diff --git a/drivers/net/wireless/orinoco/main.c b/drivers/net/wireless/orinoco/main.c index 58a48db692e3..4fa8264a400f 100644 --- a/drivers/net/wireless/orinoco/main.c +++ b/drivers/net/wireless/orinoco/main.c | |||
@@ -252,7 +252,7 @@ static int orinoco_open(struct net_device *dev) | |||
252 | if (orinoco_lock(priv, &flags) != 0) | 252 | if (orinoco_lock(priv, &flags) != 0) |
253 | return -EBUSY; | 253 | return -EBUSY; |
254 | 254 | ||
255 | err = __orinoco_up(dev); | 255 | err = __orinoco_up(priv); |
256 | 256 | ||
257 | if (!err) | 257 | if (!err) |
258 | priv->open = 1; | 258 | priv->open = 1; |
@@ -274,7 +274,7 @@ static int orinoco_stop(struct net_device *dev) | |||
274 | 274 | ||
275 | priv->open = 0; | 275 | priv->open = 0; |
276 | 276 | ||
277 | err = __orinoco_down(dev); | 277 | err = __orinoco_down(priv); |
278 | 278 | ||
279 | spin_unlock_irq(&priv->lock); | 279 | spin_unlock_irq(&priv->lock); |
280 | 280 | ||
@@ -1511,9 +1511,9 @@ static void __orinoco_ev_infdrop(struct net_device *dev, hermes_t *hw) | |||
1511 | /* Internal hardware control routines */ | 1511 | /* Internal hardware control routines */ |
1512 | /********************************************************************/ | 1512 | /********************************************************************/ |
1513 | 1513 | ||
1514 | int __orinoco_up(struct net_device *dev) | 1514 | int __orinoco_up(struct orinoco_private *priv) |
1515 | { | 1515 | { |
1516 | struct orinoco_private *priv = netdev_priv(dev); | 1516 | struct net_device *dev = priv->ndev; |
1517 | struct hermes *hw = &priv->hw; | 1517 | struct hermes *hw = &priv->hw; |
1518 | int err; | 1518 | int err; |
1519 | 1519 | ||
@@ -1541,9 +1541,9 @@ int __orinoco_up(struct net_device *dev) | |||
1541 | } | 1541 | } |
1542 | EXPORT_SYMBOL(__orinoco_up); | 1542 | EXPORT_SYMBOL(__orinoco_up); |
1543 | 1543 | ||
1544 | int __orinoco_down(struct net_device *dev) | 1544 | int __orinoco_down(struct orinoco_private *priv) |
1545 | { | 1545 | { |
1546 | struct orinoco_private *priv = netdev_priv(dev); | 1546 | struct net_device *dev = priv->ndev; |
1547 | struct hermes *hw = &priv->hw; | 1547 | struct hermes *hw = &priv->hw; |
1548 | int err; | 1548 | int err; |
1549 | 1549 | ||
@@ -1573,9 +1573,8 @@ int __orinoco_down(struct net_device *dev) | |||
1573 | } | 1573 | } |
1574 | EXPORT_SYMBOL(__orinoco_down); | 1574 | EXPORT_SYMBOL(__orinoco_down); |
1575 | 1575 | ||
1576 | int orinoco_reinit_firmware(struct net_device *dev) | 1576 | int orinoco_reinit_firmware(struct orinoco_private *priv) |
1577 | { | 1577 | { |
1578 | struct orinoco_private *priv = netdev_priv(dev); | ||
1579 | struct hermes *hw = &priv->hw; | 1578 | struct hermes *hw = &priv->hw; |
1580 | int err; | 1579 | int err; |
1581 | 1580 | ||
@@ -1887,7 +1886,7 @@ void orinoco_reset(struct work_struct *work) | |||
1887 | } | 1886 | } |
1888 | } | 1887 | } |
1889 | 1888 | ||
1890 | err = orinoco_reinit_firmware(dev); | 1889 | err = orinoco_reinit_firmware(priv); |
1891 | if (err) { | 1890 | if (err) { |
1892 | printk(KERN_ERR "%s: orinoco_reset: Error %d re-initializing firmware\n", | 1891 | printk(KERN_ERR "%s: orinoco_reset: Error %d re-initializing firmware\n", |
1893 | dev->name, err); | 1892 | dev->name, err); |
@@ -1902,7 +1901,7 @@ void orinoco_reset(struct work_struct *work) | |||
1902 | /* priv->open or priv->hw_unavailable might have changed while | 1901 | /* priv->open or priv->hw_unavailable might have changed while |
1903 | * we dropped the lock */ | 1902 | * we dropped the lock */ |
1904 | if (priv->open && (!priv->hw_unavailable)) { | 1903 | if (priv->open && (!priv->hw_unavailable)) { |
1905 | err = __orinoco_up(dev); | 1904 | err = __orinoco_up(priv); |
1906 | if (err) { | 1905 | if (err) { |
1907 | printk(KERN_ERR "%s: orinoco_reset: Error %d reenabling card\n", | 1906 | printk(KERN_ERR "%s: orinoco_reset: Error %d reenabling card\n", |
1908 | dev->name, err); | 1907 | dev->name, err); |
@@ -1938,8 +1937,8 @@ static void __orinoco_ev_wterr(struct net_device *dev, hermes_t *hw) | |||
1938 | 1937 | ||
1939 | irqreturn_t orinoco_interrupt(int irq, void *dev_id) | 1938 | irqreturn_t orinoco_interrupt(int irq, void *dev_id) |
1940 | { | 1939 | { |
1941 | struct net_device *dev = dev_id; | 1940 | struct orinoco_private *priv = dev_id; |
1942 | struct orinoco_private *priv = netdev_priv(dev); | 1941 | struct net_device *dev = priv->ndev; |
1943 | hermes_t *hw = &priv->hw; | 1942 | hermes_t *hw = &priv->hw; |
1944 | int count = MAX_IRQLOOPS_PER_IRQ; | 1943 | int count = MAX_IRQLOOPS_PER_IRQ; |
1945 | u16 evstat, events; | 1944 | u16 evstat, events; |
@@ -2192,7 +2191,7 @@ static const struct net_device_ops orinoco_netdev_ops = { | |||
2192 | .ndo_get_stats = orinoco_get_stats, | 2191 | .ndo_get_stats = orinoco_get_stats, |
2193 | }; | 2192 | }; |
2194 | 2193 | ||
2195 | struct net_device | 2194 | struct orinoco_private |
2196 | *alloc_orinocodev(int sizeof_card, | 2195 | *alloc_orinocodev(int sizeof_card, |
2197 | struct device *device, | 2196 | struct device *device, |
2198 | int (*hard_reset)(struct orinoco_private *), | 2197 | int (*hard_reset)(struct orinoco_private *), |
@@ -2255,13 +2254,13 @@ struct net_device | |||
2255 | /* Register PM notifiers */ | 2254 | /* Register PM notifiers */ |
2256 | orinoco_register_pm_notifier(priv); | 2255 | orinoco_register_pm_notifier(priv); |
2257 | 2256 | ||
2258 | return dev; | 2257 | return priv; |
2259 | } | 2258 | } |
2260 | EXPORT_SYMBOL(alloc_orinocodev); | 2259 | EXPORT_SYMBOL(alloc_orinocodev); |
2261 | 2260 | ||
2262 | void free_orinocodev(struct net_device *dev) | 2261 | void free_orinocodev(struct orinoco_private *priv) |
2263 | { | 2262 | { |
2264 | struct orinoco_private *priv = netdev_priv(dev); | 2263 | struct net_device *dev = priv->ndev; |
2265 | struct orinoco_rx_data *rx_data, *temp; | 2264 | struct orinoco_rx_data *rx_data, *temp; |
2266 | 2265 | ||
2267 | /* If the tasklet is scheduled when we call tasklet_kill it | 2266 | /* If the tasklet is scheduled when we call tasklet_kill it |