aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/orinoco
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/orinoco')
-rw-r--r--drivers/net/wireless/orinoco/orinoco.c28
-rw-r--r--drivers/net/wireless/orinoco/orinoco_cs.c1
2 files changed, 26 insertions, 3 deletions
diff --git a/drivers/net/wireless/orinoco/orinoco.c b/drivers/net/wireless/orinoco/orinoco.c
index bc84e2792f8a..c3bb85e0251e 100644
--- a/drivers/net/wireless/orinoco/orinoco.c
+++ b/drivers/net/wireless/orinoco/orinoco.c
@@ -1610,6 +1610,16 @@ static void orinoco_rx_isr_tasklet(unsigned long data)
1610 struct orinoco_rx_data *rx_data, *temp; 1610 struct orinoco_rx_data *rx_data, *temp;
1611 struct hermes_rx_descriptor *desc; 1611 struct hermes_rx_descriptor *desc;
1612 struct sk_buff *skb; 1612 struct sk_buff *skb;
1613 unsigned long flags;
1614
1615 /* orinoco_rx requires the driver lock, and we also need to
1616 * protect priv->rx_list, so just hold the lock over the
1617 * lot.
1618 *
1619 * If orinoco_lock fails, we've unplugged the card. In this
1620 * case just abort. */
1621 if (orinoco_lock(priv, &flags) != 0)
1622 return;
1613 1623
1614 /* extract desc and skb from queue */ 1624 /* extract desc and skb from queue */
1615 list_for_each_entry_safe(rx_data, temp, &priv->rx_list, list) { 1625 list_for_each_entry_safe(rx_data, temp, &priv->rx_list, list) {
@@ -1622,6 +1632,8 @@ static void orinoco_rx_isr_tasklet(unsigned long data)
1622 1632
1623 kfree(desc); 1633 kfree(desc);
1624 } 1634 }
1635
1636 orinoco_unlock(priv, &flags);
1625} 1637}
1626 1638
1627/********************************************************************/ 1639/********************************************************************/
@@ -3645,12 +3657,22 @@ struct net_device
3645void free_orinocodev(struct net_device *dev) 3657void free_orinocodev(struct net_device *dev)
3646{ 3658{
3647 struct orinoco_private *priv = netdev_priv(dev); 3659 struct orinoco_private *priv = netdev_priv(dev);
3660 struct orinoco_rx_data *rx_data, *temp;
3648 3661
3649 /* No need to empty priv->rx_list: if the tasklet is scheduled 3662 /* If the tasklet is scheduled when we call tasklet_kill it
3650 * when we call tasklet_kill it will run one final time, 3663 * will run one final time. However the tasklet will only
3651 * emptying the list */ 3664 * drain priv->rx_list if the hw is still available. */
3652 tasklet_kill(&priv->rx_tasklet); 3665 tasklet_kill(&priv->rx_tasklet);
3653 3666
3667 /* Explicitly drain priv->rx_list */
3668 list_for_each_entry_safe(rx_data, temp, &priv->rx_list, list) {
3669 list_del(&rx_data->list);
3670
3671 dev_kfree_skb(rx_data->skb);
3672 kfree(rx_data->desc);
3673 kfree(rx_data);
3674 }
3675
3654 unregister_pm_notifier(&priv->pm_notifier); 3676 unregister_pm_notifier(&priv->pm_notifier);
3655 orinoco_uncache_fw(priv); 3677 orinoco_uncache_fw(priv);
3656 3678
diff --git a/drivers/net/wireless/orinoco/orinoco_cs.c b/drivers/net/wireless/orinoco/orinoco_cs.c
index f127602670ec..0b32215d3f5d 100644
--- a/drivers/net/wireless/orinoco/orinoco_cs.c
+++ b/drivers/net/wireless/orinoco/orinoco_cs.c
@@ -435,6 +435,7 @@ static struct pcmcia_device_id orinoco_cs_ids[] = {
435 PCMCIA_DEVICE_MANF_CARD(0x0250, 0x0002), /* Samsung SWL2000-N 11Mb/s WLAN Card */ 435 PCMCIA_DEVICE_MANF_CARD(0x0250, 0x0002), /* Samsung SWL2000-N 11Mb/s WLAN Card */
436 PCMCIA_DEVICE_MANF_CARD(0x0261, 0x0002), /* AirWay 802.11 Adapter (PCMCIA) */ 436 PCMCIA_DEVICE_MANF_CARD(0x0261, 0x0002), /* AirWay 802.11 Adapter (PCMCIA) */
437 PCMCIA_DEVICE_MANF_CARD(0x0268, 0x0001), /* ARtem Onair */ 437 PCMCIA_DEVICE_MANF_CARD(0x0268, 0x0001), /* ARtem Onair */
438 PCMCIA_DEVICE_MANF_CARD(0x0268, 0x0003), /* ARtem Onair Comcard 11 */
438 PCMCIA_DEVICE_MANF_CARD(0x026f, 0x0305), /* Buffalo WLI-PCM-S11 */ 439 PCMCIA_DEVICE_MANF_CARD(0x026f, 0x0305), /* Buffalo WLI-PCM-S11 */
439 PCMCIA_DEVICE_MANF_CARD(0x0274, 0x1612), /* Linksys WPC11 Version 2.5 */ 440 PCMCIA_DEVICE_MANF_CARD(0x0274, 0x1612), /* Linksys WPC11 Version 2.5 */
440 PCMCIA_DEVICE_MANF_CARD(0x0274, 0x1613), /* Linksys WPC11 Version 3 */ 441 PCMCIA_DEVICE_MANF_CARD(0x0274, 0x1613), /* Linksys WPC11 Version 3 */