Commit 0e5606e4 authored by David S. Miller's avatar David S. Miller
parents 7c0ecc4c 7a193a5d
...@@ -2110,7 +2110,7 @@ M: reinette.chatre@intel.com ...@@ -2110,7 +2110,7 @@ M: reinette.chatre@intel.com
L: linux-wireless@vger.kernel.org L: linux-wireless@vger.kernel.org
L: ipw3945-devel@lists.sourceforge.net L: ipw3945-devel@lists.sourceforge.net
W: http://intellinuxwireless.org W: http://intellinuxwireless.org
T: git git://intellinuxwireless.org/repos/iwlwifi T: git git://git.kernel.org/pub/scm/linux/kernel/git/rchatre/iwlwifi-2.6.git
S: Supported S: Supported
IOC3 ETHERNET DRIVER IOC3 ETHERNET DRIVER
......
...@@ -1197,13 +1197,6 @@ static ctl_table arlan_table[] = ...@@ -1197,13 +1197,6 @@ static ctl_table arlan_table[] =
#else #else
static ctl_table arlan_table[MAX_ARLANS + 1] =
{
{ .ctl_name = 0 }
};
#endif
#else
static ctl_table arlan_table[MAX_ARLANS + 1] = static ctl_table arlan_table[MAX_ARLANS + 1] =
{ {
{ .ctl_name = 0 } { .ctl_name = 0 }
...@@ -1233,7 +1226,6 @@ static ctl_table arlan_root_table[] = ...@@ -1233,7 +1226,6 @@ static ctl_table arlan_root_table[] =
//}; //};
#ifdef CONFIG_PROC_FS
static struct ctl_table_header *arlan_device_sysctl_header; static struct ctl_table_header *arlan_device_sysctl_header;
int __init init_arlan_proc(void) int __init init_arlan_proc(void)
......
...@@ -618,6 +618,7 @@ void b43_debugfs_remove_device(struct b43_wldev *dev) ...@@ -618,6 +618,7 @@ void b43_debugfs_remove_device(struct b43_wldev *dev)
kfree(e); kfree(e);
} }
/* Called with IRQs disabled. */
void b43_debugfs_log_txstat(struct b43_wldev *dev, void b43_debugfs_log_txstat(struct b43_wldev *dev,
const struct b43_txstatus *status) const struct b43_txstatus *status)
{ {
...@@ -629,8 +630,7 @@ void b43_debugfs_log_txstat(struct b43_wldev *dev, ...@@ -629,8 +630,7 @@ void b43_debugfs_log_txstat(struct b43_wldev *dev,
if (!e) if (!e)
return; return;
log = &e->txstatlog; log = &e->txstatlog;
B43_WARN_ON(!irqs_disabled()); spin_lock(&log->lock); /* IRQs are already disabled. */
spin_lock(&log->lock);
i = log->end + 1; i = log->end + 1;
if (i == B43_NR_LOGGED_TXSTATUS) if (i == B43_NR_LOGGED_TXSTATUS)
i = 0; i = 0;
......
...@@ -560,7 +560,7 @@ static int b43_dmacontroller_tx_reset(struct b43_wldev *dev, u16 mmio_base, ...@@ -560,7 +560,7 @@ static int b43_dmacontroller_tx_reset(struct b43_wldev *dev, u16 mmio_base,
/* Check if a DMA mapping address is invalid. */ /* Check if a DMA mapping address is invalid. */
static bool b43_dma_mapping_error(struct b43_dmaring *ring, static bool b43_dma_mapping_error(struct b43_dmaring *ring,
dma_addr_t addr, dma_addr_t addr,
size_t buffersize) size_t buffersize, bool dma_to_device)
{ {
if (unlikely(dma_mapping_error(addr))) if (unlikely(dma_mapping_error(addr)))
return 1; return 1;
...@@ -568,11 +568,11 @@ static bool b43_dma_mapping_error(struct b43_dmaring *ring, ...@@ -568,11 +568,11 @@ static bool b43_dma_mapping_error(struct b43_dmaring *ring,
switch (ring->type) { switch (ring->type) {
case B43_DMA_30BIT: case B43_DMA_30BIT:
if ((u64)addr + buffersize > (1ULL << 30)) if ((u64)addr + buffersize > (1ULL << 30))
return 1; goto address_error;
break; break;
case B43_DMA_32BIT: case B43_DMA_32BIT:
if ((u64)addr + buffersize > (1ULL << 32)) if ((u64)addr + buffersize > (1ULL << 32))
return 1; goto address_error;
break; break;
case B43_DMA_64BIT: case B43_DMA_64BIT:
/* Currently we can't have addresses beyond /* Currently we can't have addresses beyond
...@@ -582,6 +582,12 @@ static bool b43_dma_mapping_error(struct b43_dmaring *ring, ...@@ -582,6 +582,12 @@ static bool b43_dma_mapping_error(struct b43_dmaring *ring,
/* The address is OK. */ /* The address is OK. */
return 0; return 0;
address_error:
/* We can't support this address. Unmap it again. */
unmap_descbuffer(ring, addr, buffersize, dma_to_device);
return 1;
} }
static int setup_rx_descbuffer(struct b43_dmaring *ring, static int setup_rx_descbuffer(struct b43_dmaring *ring,
...@@ -599,7 +605,7 @@ static int setup_rx_descbuffer(struct b43_dmaring *ring, ...@@ -599,7 +605,7 @@ static int setup_rx_descbuffer(struct b43_dmaring *ring,
if (unlikely(!skb)) if (unlikely(!skb))
return -ENOMEM; return -ENOMEM;
dmaaddr = map_descbuffer(ring, skb->data, ring->rx_buffersize, 0); dmaaddr = map_descbuffer(ring, skb->data, ring->rx_buffersize, 0);
if (b43_dma_mapping_error(ring, dmaaddr, ring->rx_buffersize)) { if (b43_dma_mapping_error(ring, dmaaddr, ring->rx_buffersize, 0)) {
/* ugh. try to realloc in zone_dma */ /* ugh. try to realloc in zone_dma */
gfp_flags |= GFP_DMA; gfp_flags |= GFP_DMA;
...@@ -612,7 +618,7 @@ static int setup_rx_descbuffer(struct b43_dmaring *ring, ...@@ -612,7 +618,7 @@ static int setup_rx_descbuffer(struct b43_dmaring *ring,
ring->rx_buffersize, 0); ring->rx_buffersize, 0);
} }
if (b43_dma_mapping_error(ring, dmaaddr, ring->rx_buffersize)) { if (b43_dma_mapping_error(ring, dmaaddr, ring->rx_buffersize, 0)) {
dev_kfree_skb_any(skb); dev_kfree_skb_any(skb);
return -EIO; return -EIO;
} }
...@@ -852,7 +858,8 @@ struct b43_dmaring *b43_setup_dmaring(struct b43_wldev *dev, ...@@ -852,7 +858,8 @@ struct b43_dmaring *b43_setup_dmaring(struct b43_wldev *dev,
b43_txhdr_size(dev), b43_txhdr_size(dev),
DMA_TO_DEVICE); DMA_TO_DEVICE);
if (b43_dma_mapping_error(ring, dma_test, b43_txhdr_size(dev))) { if (b43_dma_mapping_error(ring, dma_test,
b43_txhdr_size(dev), 1)) {
/* ugh realloc */ /* ugh realloc */
kfree(ring->txhdr_cache); kfree(ring->txhdr_cache);
ring->txhdr_cache = kcalloc(nr_slots, ring->txhdr_cache = kcalloc(nr_slots,
...@@ -867,7 +874,7 @@ struct b43_dmaring *b43_setup_dmaring(struct b43_wldev *dev, ...@@ -867,7 +874,7 @@ struct b43_dmaring *b43_setup_dmaring(struct b43_wldev *dev,
DMA_TO_DEVICE); DMA_TO_DEVICE);
if (b43_dma_mapping_error(ring, dma_test, if (b43_dma_mapping_error(ring, dma_test,
b43_txhdr_size(dev))) b43_txhdr_size(dev), 1))
goto err_kfree_txhdr_cache; goto err_kfree_txhdr_cache;
} }
...@@ -1189,7 +1196,7 @@ static int dma_tx_fragment(struct b43_dmaring *ring, ...@@ -1189,7 +1196,7 @@ static int dma_tx_fragment(struct b43_dmaring *ring,
meta_hdr->dmaaddr = map_descbuffer(ring, (unsigned char *)header, meta_hdr->dmaaddr = map_descbuffer(ring, (unsigned char *)header,
hdrsize, 1); hdrsize, 1);
if (b43_dma_mapping_error(ring, meta_hdr->dmaaddr, hdrsize)) { if (b43_dma_mapping_error(ring, meta_hdr->dmaaddr, hdrsize, 1)) {
ring->current_slot = old_top_slot; ring->current_slot = old_top_slot;
ring->used_slots = old_used_slots; ring->used_slots = old_used_slots;
return -EIO; return -EIO;
...@@ -1208,7 +1215,7 @@ static int dma_tx_fragment(struct b43_dmaring *ring, ...@@ -1208,7 +1215,7 @@ static int dma_tx_fragment(struct b43_dmaring *ring,
meta->dmaaddr = map_descbuffer(ring, skb->data, skb->len, 1); meta->dmaaddr = map_descbuffer(ring, skb->data, skb->len, 1);
/* create a bounce buffer in zone_dma on mapping failure. */ /* create a bounce buffer in zone_dma on mapping failure. */
if (b43_dma_mapping_error(ring, meta->dmaaddr, skb->len)) { if (b43_dma_mapping_error(ring, meta->dmaaddr, skb->len, 1)) {
bounce_skb = __dev_alloc_skb(skb->len, GFP_ATOMIC | GFP_DMA); bounce_skb = __dev_alloc_skb(skb->len, GFP_ATOMIC | GFP_DMA);
if (!bounce_skb) { if (!bounce_skb) {
ring->current_slot = old_top_slot; ring->current_slot = old_top_slot;
...@@ -1222,7 +1229,7 @@ static int dma_tx_fragment(struct b43_dmaring *ring, ...@@ -1222,7 +1229,7 @@ static int dma_tx_fragment(struct b43_dmaring *ring,
skb = bounce_skb; skb = bounce_skb;
meta->skb = skb; meta->skb = skb;
meta->dmaaddr = map_descbuffer(ring, skb->data, skb->len, 1); meta->dmaaddr = map_descbuffer(ring, skb->data, skb->len, 1);
if (b43_dma_mapping_error(ring, meta->dmaaddr, skb->len)) { if (b43_dma_mapping_error(ring, meta->dmaaddr, skb->len, 1)) {
ring->current_slot = old_top_slot; ring->current_slot = old_top_slot;
ring->used_slots = old_used_slots; ring->used_slots = old_used_slots;
err = -EIO; err = -EIO;
...@@ -1337,6 +1344,7 @@ int b43_dma_tx(struct b43_wldev *dev, ...@@ -1337,6 +1344,7 @@ int b43_dma_tx(struct b43_wldev *dev,
return err; return err;
} }
/* Called with IRQs disabled. */
void b43_dma_handle_txstatus(struct b43_wldev *dev, void b43_dma_handle_txstatus(struct b43_wldev *dev,
const struct b43_txstatus *status) const struct b43_txstatus *status)
{ {
...@@ -1349,8 +1357,8 @@ void b43_dma_handle_txstatus(struct b43_wldev *dev, ...@@ -1349,8 +1357,8 @@ void b43_dma_handle_txstatus(struct b43_wldev *dev,
ring = parse_cookie(dev, status->cookie, &slot); ring = parse_cookie(dev, status->cookie, &slot);
if (unlikely(!ring)) if (unlikely(!ring))
return; return;
B43_WARN_ON(!irqs_disabled());
spin_lock(&ring->lock); spin_lock(&ring->lock); /* IRQs are already disabled. */
B43_WARN_ON(!ring->tx); B43_WARN_ON(!ring->tx);
ops = ring->ops; ops = ring->ops;
......
...@@ -2049,7 +2049,6 @@ void b43_mac_enable(struct b43_wldev *dev) ...@@ -2049,7 +2049,6 @@ void b43_mac_enable(struct b43_wldev *dev)
{ {
dev->mac_suspended--; dev->mac_suspended--;
B43_WARN_ON(dev->mac_suspended < 0); B43_WARN_ON(dev->mac_suspended < 0);
B43_WARN_ON(irqs_disabled());
if (dev->mac_suspended == 0) { if (dev->mac_suspended == 0) {
b43_write32(dev, B43_MMIO_MACCTL, b43_write32(dev, B43_MMIO_MACCTL,
b43_read32(dev, B43_MMIO_MACCTL) b43_read32(dev, B43_MMIO_MACCTL)
...@@ -2075,7 +2074,6 @@ void b43_mac_suspend(struct b43_wldev *dev) ...@@ -2075,7 +2074,6 @@ void b43_mac_suspend(struct b43_wldev *dev)
u32 tmp; u32 tmp;
might_sleep(); might_sleep();
B43_WARN_ON(irqs_disabled());
B43_WARN_ON(dev->mac_suspended < 0); B43_WARN_ON(dev->mac_suspended < 0);
if (dev->mac_suspended == 0) { if (dev->mac_suspended == 0) {
......
...@@ -20,7 +20,7 @@ config IWL4965 ...@@ -20,7 +20,7 @@ config IWL4965
runs. runs.
If you want to compile the driver as a module ( = code which can be If you want to compile the driver as a module ( = code which can be
inserted in and remvoed from the running kernel whenever you want), inserted in and removed from the running kernel whenever you want),
say M here and read <file:Documentation/kbuild/modules.txt>. The say M here and read <file:Documentation/kbuild/modules.txt>. The
module will be called iwl4965.ko. module will be called iwl4965.ko.
...@@ -101,7 +101,7 @@ config IWL3945 ...@@ -101,7 +101,7 @@ config IWL3945
runs. runs.
If you want to compile the driver as a module ( = code which can be If you want to compile the driver as a module ( = code which can be
inserted in and remvoed from the running kernel whenever you want), inserted in and removed from the running kernel whenever you want),
say M here and read <file:Documentation/kbuild/modules.txt>. The say M here and read <file:Documentation/kbuild/modules.txt>. The
module will be called iwl3945.ko. module will be called iwl3945.ko.
......
...@@ -6206,11 +6206,11 @@ static void iwl3945_alive_start(struct iwl3945_priv *priv) ...@@ -6206,11 +6206,11 @@ static void iwl3945_alive_start(struct iwl3945_priv *priv)
/* At this point, the NIC is initialized and operational */ /* At this point, the NIC is initialized and operational */
priv->notif_missed_beacons = 0; priv->notif_missed_beacons = 0;
set_bit(STATUS_READY, &priv->status);
iwl3945_reg_txpower_periodic(priv); iwl3945_reg_txpower_periodic(priv);
IWL_DEBUG_INFO("ALIVE processing complete.\n"); IWL_DEBUG_INFO("ALIVE processing complete.\n");
set_bit(STATUS_READY, &priv->status);
wake_up_interruptible(&priv->wait_command_queue); wake_up_interruptible(&priv->wait_command_queue);
if (priv->error_recovering) if (priv->error_recovering)
...@@ -8706,7 +8706,7 @@ static int iwl3945_pci_probe(struct pci_dev *pdev, const struct pci_device_id *e ...@@ -8706,7 +8706,7 @@ static int iwl3945_pci_probe(struct pci_dev *pdev, const struct pci_device_id *e
return err; return err;
} }
static void iwl3945_pci_remove(struct pci_dev *pdev) static void __devexit iwl3945_pci_remove(struct pci_dev *pdev)
{ {
struct iwl3945_priv *priv = pci_get_drvdata(pdev); struct iwl3945_priv *priv = pci_get_drvdata(pdev);
struct list_head *p, *q; struct list_head *p, *q;
......
...@@ -6628,11 +6628,11 @@ static void iwl4965_alive_start(struct iwl4965_priv *priv) ...@@ -6628,11 +6628,11 @@ static void iwl4965_alive_start(struct iwl4965_priv *priv)
/* At this point, the NIC is initialized and operational */ /* At this point, the NIC is initialized and operational */
priv->notif_missed_beacons = 0; priv->notif_missed_beacons = 0;
set_bit(STATUS_READY, &priv->status);
iwl4965_rf_kill_ct_config(priv); iwl4965_rf_kill_ct_config(priv);
IWL_DEBUG_INFO("ALIVE processing complete.\n"); IWL_DEBUG_INFO("ALIVE processing complete.\n");
set_bit(STATUS_READY, &priv->status);
wake_up_interruptible(&priv->wait_command_queue); wake_up_interruptible(&priv->wait_command_queue);
if (priv->error_recovering) if (priv->error_recovering)
...@@ -9282,7 +9282,7 @@ static int iwl4965_pci_probe(struct pci_dev *pdev, const struct pci_device_id *e ...@@ -9282,7 +9282,7 @@ static int iwl4965_pci_probe(struct pci_dev *pdev, const struct pci_device_id *e
return err; return err;
} }
static void iwl4965_pci_remove(struct pci_dev *pdev) static void __devexit iwl4965_pci_remove(struct pci_dev *pdev)
{ {
struct iwl4965_priv *priv = pci_get_drvdata(pdev); struct iwl4965_priv *priv = pci_get_drvdata(pdev);
struct list_head *p, *q; struct list_head *p, *q;
......
...@@ -2095,6 +2095,8 @@ static struct usb_device_id rt73usb_device_table[] = { ...@@ -2095,6 +2095,8 @@ static struct usb_device_id rt73usb_device_table[] = {
{ USB_DEVICE(0x1371, 0x9032), USB_DEVICE_DATA(&rt73usb_ops) }, { USB_DEVICE(0x1371, 0x9032), USB_DEVICE_DATA(&rt73usb_ops) },
/* Conceptronic */ /* Conceptronic */
{ USB_DEVICE(0x14b2, 0x3c22), USB_DEVICE_DATA(&rt73usb_ops) }, { USB_DEVICE(0x14b2, 0x3c22), USB_DEVICE_DATA(&rt73usb_ops) },
/* Corega */
{ USB_DEVICE(0x07aa, 0x002e), USB_DEVICE_DATA(&rt73usb_ops) },
/* D-Link */ /* D-Link */
{ USB_DEVICE(0x07d1, 0x3c03), USB_DEVICE_DATA(&rt73usb_ops) }, { USB_DEVICE(0x07d1, 0x3c03), USB_DEVICE_DATA(&rt73usb_ops) },
{ USB_DEVICE(0x07d1, 0x3c04), USB_DEVICE_DATA(&rt73usb_ops) }, { USB_DEVICE(0x07d1, 0x3c04), USB_DEVICE_DATA(&rt73usb_ops) },
......
...@@ -309,7 +309,7 @@ struct mmw_t ...@@ -309,7 +309,7 @@ struct mmw_t
#define MMW_EXT_ANT_INTERNAL 0x00 /* Internal antenna */ #define MMW_EXT_ANT_INTERNAL 0x00 /* Internal antenna */
#define MMW_EXT_ANT_EXTERNAL 0x03 /* External antenna */ #define MMW_EXT_ANT_EXTERNAL 0x03 /* External antenna */
#define MMW_EXT_ANT_IQ_TEST 0x1C /* IQ test pattern (set to 0) */ #define MMW_EXT_ANT_IQ_TEST 0x1C /* IQ test pattern (set to 0) */
}; } __attribute__((packed));
/* Size for structure checking (if padding is correct) */ /* Size for structure checking (if padding is correct) */
#define MMW_SIZE 37 #define MMW_SIZE 37
......
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