diff options
author | David Howells <dhowells@redhat.com> | 2006-12-05 09:37:56 -0500 |
---|---|---|
committer | David Howells <dhowells@warthog.cambridge.redhat.com> | 2006-12-05 09:37:56 -0500 |
commit | 4c1ac1b49122b805adfa4efc620592f68dccf5db (patch) | |
tree | 87557f4bc2fd4fe65b7570489c2f610c45c0adcd /drivers/net/wireless/prism54/islpci_eth.c | |
parent | c4028958b6ecad064b1a6303a6a5906d4fe48d73 (diff) | |
parent | d916faace3efc0bf19fe9a615a1ab8fa1a24cd93 (diff) |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
Conflicts:
drivers/infiniband/core/iwcm.c
drivers/net/chelsio/cxgb2.c
drivers/net/wireless/bcm43xx/bcm43xx_main.c
drivers/net/wireless/prism54/islpci_eth.c
drivers/usb/core/hub.h
drivers/usb/input/hid-core.c
net/core/netpoll.c
Fix up merge failures with Linus's head and fix new compilation failures.
Signed-Off-By: David Howells <dhowells@redhat.com>
Diffstat (limited to 'drivers/net/wireless/prism54/islpci_eth.c')
-rw-r--r-- | drivers/net/wireless/prism54/islpci_eth.c | 28 |
1 files changed, 15 insertions, 13 deletions
diff --git a/drivers/net/wireless/prism54/islpci_eth.c b/drivers/net/wireless/prism54/islpci_eth.c index 103a37877733..b1122912ee2d 100644 --- a/drivers/net/wireless/prism54/islpci_eth.c +++ b/drivers/net/wireless/prism54/islpci_eth.c | |||
@@ -1,5 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * | ||
3 | * Copyright (C) 2002 Intersil Americas Inc. | 2 | * Copyright (C) 2002 Intersil Americas Inc. |
4 | * Copyright (C) 2004 Aurelien Alleaume <slts@free.fr> | 3 | * Copyright (C) 2004 Aurelien Alleaume <slts@free.fr> |
5 | * This program is free software; you can redistribute it and/or modify | 4 | * This program is free software; you can redistribute it and/or modify |
@@ -48,7 +47,7 @@ islpci_eth_cleanup_transmit(islpci_private *priv, | |||
48 | /* read the index of the first fragment to be freed */ | 47 | /* read the index of the first fragment to be freed */ |
49 | index = priv->free_data_tx % ISL38XX_CB_TX_QSIZE; | 48 | index = priv->free_data_tx % ISL38XX_CB_TX_QSIZE; |
50 | 49 | ||
51 | /* check for holes in the arrays caused by multi fragment frames | 50 | /* check for holes in the arrays caused by multi fragment frames |
52 | * searching for the last fragment of a frame */ | 51 | * searching for the last fragment of a frame */ |
53 | if (priv->pci_map_tx_address[index] != (dma_addr_t) NULL) { | 52 | if (priv->pci_map_tx_address[index] != (dma_addr_t) NULL) { |
54 | /* entry is the last fragment of a frame | 53 | /* entry is the last fragment of a frame |
@@ -253,6 +252,7 @@ islpci_monitor_rx(islpci_private *priv, struct sk_buff **skb) | |||
253 | * header and without the FCS. But there a is a bit that | 252 | * header and without the FCS. But there a is a bit that |
254 | * indicates if the packet is corrupted :-) */ | 253 | * indicates if the packet is corrupted :-) */ |
255 | struct rfmon_header *hdr = (struct rfmon_header *) (*skb)->data; | 254 | struct rfmon_header *hdr = (struct rfmon_header *) (*skb)->data; |
255 | |||
256 | if (hdr->flags & 0x01) | 256 | if (hdr->flags & 0x01) |
257 | /* This one is bad. Drop it ! */ | 257 | /* This one is bad. Drop it ! */ |
258 | return -1; | 258 | return -1; |
@@ -284,7 +284,7 @@ islpci_monitor_rx(islpci_private *priv, struct sk_buff **skb) | |||
284 | (struct avs_80211_1_header *) skb_push(*skb, | 284 | (struct avs_80211_1_header *) skb_push(*skb, |
285 | sizeof (struct | 285 | sizeof (struct |
286 | avs_80211_1_header)); | 286 | avs_80211_1_header)); |
287 | 287 | ||
288 | avs->version = cpu_to_be32(P80211CAPTURE_VERSION); | 288 | avs->version = cpu_to_be32(P80211CAPTURE_VERSION); |
289 | avs->length = cpu_to_be32(sizeof (struct avs_80211_1_header)); | 289 | avs->length = cpu_to_be32(sizeof (struct avs_80211_1_header)); |
290 | avs->mactime = cpu_to_be64(le64_to_cpu(clock)); | 290 | avs->mactime = cpu_to_be64(le64_to_cpu(clock)); |
@@ -390,7 +390,7 @@ islpci_eth_receive(islpci_private *priv) | |||
390 | struct rx_annex_header *annex = | 390 | struct rx_annex_header *annex = |
391 | (struct rx_annex_header *) skb->data; | 391 | (struct rx_annex_header *) skb->data; |
392 | wstats.level = annex->rfmon.rssi; | 392 | wstats.level = annex->rfmon.rssi; |
393 | /* The noise value can be a bit outdated if nobody's | 393 | /* The noise value can be a bit outdated if nobody's |
394 | * reading wireless stats... */ | 394 | * reading wireless stats... */ |
395 | wstats.noise = priv->local_iwstatistics.qual.noise; | 395 | wstats.noise = priv->local_iwstatistics.qual.noise; |
396 | wstats.qual = wstats.level - wstats.noise; | 396 | wstats.qual = wstats.level - wstats.noise; |
@@ -464,10 +464,8 @@ islpci_eth_receive(islpci_private *priv) | |||
464 | break; | 464 | break; |
465 | } | 465 | } |
466 | /* update the fragment address */ | 466 | /* update the fragment address */ |
467 | control_block->rx_data_low[index].address = cpu_to_le32((u32) | 467 | control_block->rx_data_low[index].address = |
468 | priv-> | 468 | cpu_to_le32((u32)priv->pci_map_rx_address[index]); |
469 | pci_map_rx_address | ||
470 | [index]); | ||
471 | wmb(); | 469 | wmb(); |
472 | 470 | ||
473 | /* increment the driver read pointer */ | 471 | /* increment the driver read pointer */ |
@@ -485,9 +483,11 @@ void | |||
485 | islpci_do_reset_and_wake(struct work_struct *work) | 483 | islpci_do_reset_and_wake(struct work_struct *work) |
486 | { | 484 | { |
487 | islpci_private *priv = container_of(work, islpci_private, reset_task); | 485 | islpci_private *priv = container_of(work, islpci_private, reset_task); |
486 | |||
488 | islpci_reset(priv, 1); | 487 | islpci_reset(priv, 1); |
489 | netif_wake_queue(priv->ndev); | ||
490 | priv->reset_task_pending = 0; | 488 | priv->reset_task_pending = 0; |
489 | smp_wmb(); | ||
490 | netif_wake_queue(priv->ndev); | ||
491 | } | 491 | } |
492 | 492 | ||
493 | void | 493 | void |
@@ -499,12 +499,14 @@ islpci_eth_tx_timeout(struct net_device *ndev) | |||
499 | /* increment the transmit error counter */ | 499 | /* increment the transmit error counter */ |
500 | statistics->tx_errors++; | 500 | statistics->tx_errors++; |
501 | 501 | ||
502 | printk(KERN_WARNING "%s: tx_timeout", ndev->name); | ||
503 | if (!priv->reset_task_pending) { | 502 | if (!priv->reset_task_pending) { |
504 | priv->reset_task_pending = 1; | 503 | printk(KERN_WARNING |
505 | printk(", scheduling a reset"); | 504 | "%s: tx_timeout, scheduling reset", ndev->name); |
506 | netif_stop_queue(ndev); | 505 | netif_stop_queue(ndev); |
506 | priv->reset_task_pending = 1; | ||
507 | schedule_work(&priv->reset_task); | 507 | schedule_work(&priv->reset_task); |
508 | } else { | ||
509 | printk(KERN_WARNING | ||
510 | "%s: tx_timeout, waiting for reset", ndev->name); | ||
508 | } | 511 | } |
509 | printk("\n"); | ||
510 | } | 512 | } |