Commit 32ddf071 authored by Christian Lamparter's avatar Christian Lamparter Committed by John W. Linville

p54: rename prism54xyz -> p54xyz

It's been a long time, but fullmac prism54 driver is still around...
I think we should rename every prism54* in order to avoid some
confusion about "what is actually what" in the future ;-).

Thanks-to: Maxi <maxi@daemonizer.de>
Signed-off-by: default avatarChristian Lamparter <chunkeey@web.de>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 6042a3e3
#ifndef PRISM54_H #ifndef P54_H
#define PRISM54_H #define P54_H
/* /*
* Shared defines for all mac80211 Prism54 code * Shared defines for all mac80211 Prism54 code
...@@ -76,4 +76,4 @@ void p54_fill_eeprom_readback(struct p54_control_hdr *hdr); ...@@ -76,4 +76,4 @@ void p54_fill_eeprom_readback(struct p54_control_hdr *hdr);
struct ieee80211_hw *p54_init_common(size_t priv_data_len); struct ieee80211_hw *p54_init_common(size_t priv_data_len);
void p54_free_common(struct ieee80211_hw *dev); void p54_free_common(struct ieee80211_hw *dev);
#endif /* PRISM54_H */ #endif /* P54_H */
#ifndef PRISM54COMMON_H #ifndef P54COMMON_H
#define PRISM54COMMON_H #define P54COMMON_H
/* /*
* Common code specific definitions for mac80211 Prism54 drivers * Common code specific definitions for mac80211 Prism54 drivers
...@@ -250,4 +250,4 @@ struct p54_tx_control_vdcf { ...@@ -250,4 +250,4 @@ struct p54_tx_control_vdcf {
__le16 frameburst; __le16 frameburst;
} __attribute__ ((packed)); } __attribute__ ((packed));
#endif /* PRISM54COMMON_H */ #endif /* P54COMMON_H */
...@@ -75,7 +75,7 @@ static int p54p_upload_firmware(struct ieee80211_hw *dev) ...@@ -75,7 +75,7 @@ static int p54p_upload_firmware(struct ieee80211_hw *dev)
err = request_firmware(&fw_entry, "isl3886", &priv->pdev->dev); err = request_firmware(&fw_entry, "isl3886", &priv->pdev->dev);
if (err) { if (err) {
printk(KERN_ERR "%s (prism54pci): cannot find firmware " printk(KERN_ERR "%s (p54pci): cannot find firmware "
"(isl3886)\n", pci_name(priv->pdev)); "(isl3886)\n", pci_name(priv->pdev));
return err; return err;
} }
...@@ -150,16 +150,16 @@ static int p54p_read_eeprom(struct ieee80211_hw *dev) ...@@ -150,16 +150,16 @@ static int p54p_read_eeprom(struct ieee80211_hw *dev)
init_completion(&priv->boot_comp); init_completion(&priv->boot_comp);
err = request_irq(priv->pdev->irq, &p54p_simple_interrupt, err = request_irq(priv->pdev->irq, &p54p_simple_interrupt,
IRQF_SHARED, "prism54pci", priv); IRQF_SHARED, "p54pci", priv);
if (err) { if (err) {
printk(KERN_ERR "%s (prism54pci): failed to register IRQ handler\n", printk(KERN_ERR "%s (p54pci): failed to register IRQ handler\n",
pci_name(priv->pdev)); pci_name(priv->pdev));
return err; return err;
} }
eeprom = kmalloc(0x2010 + EEPROM_READBACK_LEN, GFP_KERNEL); eeprom = kmalloc(0x2010 + EEPROM_READBACK_LEN, GFP_KERNEL);
if (!eeprom) { if (!eeprom) {
printk(KERN_ERR "%s (prism54pci): no memory for eeprom!\n", printk(KERN_ERR "%s (p54pci): no memory for eeprom!\n",
pci_name(priv->pdev)); pci_name(priv->pdev));
err = -ENOMEM; err = -ENOMEM;
goto out; goto out;
...@@ -177,7 +177,7 @@ static int p54p_read_eeprom(struct ieee80211_hw *dev) ...@@ -177,7 +177,7 @@ static int p54p_read_eeprom(struct ieee80211_hw *dev)
P54P_WRITE(dev_int, cpu_to_le32(ISL38XX_DEV_INT_RESET)); P54P_WRITE(dev_int, cpu_to_le32(ISL38XX_DEV_INT_RESET));
if (!wait_for_completion_interruptible_timeout(&priv->boot_comp, HZ)) { if (!wait_for_completion_interruptible_timeout(&priv->boot_comp, HZ)) {
printk(KERN_ERR "%s (prism54pci): Cannot boot firmware!\n", printk(KERN_ERR "%s (p54pci): Cannot boot firmware!\n",
pci_name(priv->pdev)); pci_name(priv->pdev));
err = -EINVAL; err = -EINVAL;
goto out; goto out;
...@@ -219,7 +219,7 @@ static int p54p_read_eeprom(struct ieee80211_hw *dev) ...@@ -219,7 +219,7 @@ static int p54p_read_eeprom(struct ieee80211_hw *dev)
alen = le16_to_cpu(ring_control->rx_mgmt[0].len); alen = le16_to_cpu(ring_control->rx_mgmt[0].len);
if (le32_to_cpu(ring_control->device_idx[2]) != 1 || if (le32_to_cpu(ring_control->device_idx[2]) != 1 ||
alen < 0x10) { alen < 0x10) {
printk(KERN_ERR "%s (prism54pci): Cannot read eeprom!\n", printk(KERN_ERR "%s (p54pci): Cannot read eeprom!\n",
pci_name(priv->pdev)); pci_name(priv->pdev));
err = -EINVAL; err = -EINVAL;
goto out; goto out;
...@@ -412,7 +412,7 @@ static int p54p_open(struct ieee80211_hw *dev) ...@@ -412,7 +412,7 @@ static int p54p_open(struct ieee80211_hw *dev)
init_completion(&priv->boot_comp); init_completion(&priv->boot_comp);
err = request_irq(priv->pdev->irq, &p54p_interrupt, err = request_irq(priv->pdev->irq, &p54p_interrupt,
IRQF_SHARED, "prism54pci", dev); IRQF_SHARED, "p54pci", dev);
if (err) { if (err) {
printk(KERN_ERR "%s: failed to register IRQ handler\n", printk(KERN_ERR "%s: failed to register IRQ handler\n",
wiphy_name(dev->wiphy)); wiphy_name(dev->wiphy));
...@@ -506,7 +506,7 @@ static int __devinit p54p_probe(struct pci_dev *pdev, ...@@ -506,7 +506,7 @@ static int __devinit p54p_probe(struct pci_dev *pdev,
err = pci_enable_device(pdev); err = pci_enable_device(pdev);
if (err) { if (err) {
printk(KERN_ERR "%s (prism54pci): Cannot enable new PCI device\n", printk(KERN_ERR "%s (p54pci): Cannot enable new PCI device\n",
pci_name(pdev)); pci_name(pdev));
return err; return err;
} }
...@@ -514,22 +514,22 @@ static int __devinit p54p_probe(struct pci_dev *pdev, ...@@ -514,22 +514,22 @@ static int __devinit p54p_probe(struct pci_dev *pdev,
mem_addr = pci_resource_start(pdev, 0); mem_addr = pci_resource_start(pdev, 0);
mem_len = pci_resource_len(pdev, 0); mem_len = pci_resource_len(pdev, 0);
if (mem_len < sizeof(struct p54p_csr)) { if (mem_len < sizeof(struct p54p_csr)) {
printk(KERN_ERR "%s (prism54pci): Too short PCI resources\n", printk(KERN_ERR "%s (p54pci): Too short PCI resources\n",
pci_name(pdev)); pci_name(pdev));
pci_disable_device(pdev); pci_disable_device(pdev);
return err; return err;
} }
err = pci_request_regions(pdev, "prism54pci"); err = pci_request_regions(pdev, "p54pci");
if (err) { if (err) {
printk(KERN_ERR "%s (prism54pci): Cannot obtain PCI resources\n", printk(KERN_ERR "%s (p54pci): Cannot obtain PCI resources\n",
pci_name(pdev)); pci_name(pdev));
return err; return err;
} }
if (pci_set_dma_mask(pdev, DMA_32BIT_MASK) || if (pci_set_dma_mask(pdev, DMA_32BIT_MASK) ||
pci_set_consistent_dma_mask(pdev, DMA_32BIT_MASK)) { pci_set_consistent_dma_mask(pdev, DMA_32BIT_MASK)) {
printk(KERN_ERR "%s (prism54pci): No suitable DMA available\n", printk(KERN_ERR "%s (p54pci): No suitable DMA available\n",
pci_name(pdev)); pci_name(pdev));
goto err_free_reg; goto err_free_reg;
} }
...@@ -542,7 +542,7 @@ static int __devinit p54p_probe(struct pci_dev *pdev, ...@@ -542,7 +542,7 @@ static int __devinit p54p_probe(struct pci_dev *pdev,
dev = p54_init_common(sizeof(*priv)); dev = p54_init_common(sizeof(*priv));
if (!dev) { if (!dev) {
printk(KERN_ERR "%s (prism54pci): ieee80211 alloc failed\n", printk(KERN_ERR "%s (p54pci): ieee80211 alloc failed\n",
pci_name(pdev)); pci_name(pdev));
err = -ENOMEM; err = -ENOMEM;
goto err_free_reg; goto err_free_reg;
...@@ -556,7 +556,7 @@ static int __devinit p54p_probe(struct pci_dev *pdev, ...@@ -556,7 +556,7 @@ static int __devinit p54p_probe(struct pci_dev *pdev,
priv->map = ioremap(mem_addr, mem_len); priv->map = ioremap(mem_addr, mem_len);
if (!priv->map) { if (!priv->map) {
printk(KERN_ERR "%s (prism54pci): Cannot map device memory\n", printk(KERN_ERR "%s (p54pci): Cannot map device memory\n",
pci_name(pdev)); pci_name(pdev));
err = -EINVAL; // TODO: use a better error code? err = -EINVAL; // TODO: use a better error code?
goto err_free_dev; goto err_free_dev;
...@@ -565,7 +565,7 @@ static int __devinit p54p_probe(struct pci_dev *pdev, ...@@ -565,7 +565,7 @@ static int __devinit p54p_probe(struct pci_dev *pdev,
priv->ring_control = pci_alloc_consistent(pdev, sizeof(*priv->ring_control), priv->ring_control = pci_alloc_consistent(pdev, sizeof(*priv->ring_control),
&priv->ring_control_dma); &priv->ring_control_dma);
if (!priv->ring_control) { if (!priv->ring_control) {
printk(KERN_ERR "%s (prism54pci): Cannot allocate rings\n", printk(KERN_ERR "%s (p54pci): Cannot allocate rings\n",
pci_name(pdev)); pci_name(pdev));
err = -ENOMEM; err = -ENOMEM;
goto err_iounmap; goto err_iounmap;
...@@ -588,7 +588,7 @@ static int __devinit p54p_probe(struct pci_dev *pdev, ...@@ -588,7 +588,7 @@ static int __devinit p54p_probe(struct pci_dev *pdev,
err = ieee80211_register_hw(dev); err = ieee80211_register_hw(dev);
if (err) { if (err) {
printk(KERN_ERR "%s (prism54pci): Cannot register netdevice\n", printk(KERN_ERR "%s (p54pci): Cannot register netdevice\n",
pci_name(pdev)); pci_name(pdev));
goto err_free_common; goto err_free_common;
} }
...@@ -673,7 +673,7 @@ static int p54p_resume(struct pci_dev *pdev) ...@@ -673,7 +673,7 @@ static int p54p_resume(struct pci_dev *pdev)
#endif /* CONFIG_PM */ #endif /* CONFIG_PM */
static struct pci_driver p54p_driver = { static struct pci_driver p54p_driver = {
.name = "prism54pci", .name = "p54pci",
.id_table = p54p_table, .id_table = p54p_table,
.probe = p54p_probe, .probe = p54p_probe,
.remove = __devexit_p(p54p_remove), .remove = __devexit_p(p54p_remove),
......
#ifndef PRISM54PCI_H #ifndef P54PCI_H
#define PRISM54PCI_H #define P54PCI_H
/* /*
* Defines for PCI based mac80211 Prism54 driver * Defines for PCI based mac80211 Prism54 driver
...@@ -68,7 +68,7 @@ struct p54p_csr { ...@@ -68,7 +68,7 @@ struct p54p_csr {
} __attribute__ ((packed)); } __attribute__ ((packed));
/* usb backend only needs the register defines above */ /* usb backend only needs the register defines above */
#ifndef PRISM54USB_H #ifndef P54USB_H
struct p54p_desc { struct p54p_desc {
__le32 host_addr; __le32 host_addr;
__le32 device_addr; __le32 device_addr;
...@@ -102,5 +102,5 @@ struct p54p_priv { ...@@ -102,5 +102,5 @@ struct p54p_priv {
struct completion boot_comp; struct completion boot_comp;
}; };
#endif /* PRISM54USB_H */ #endif /* P54USB_H */
#endif /* PRISM54PCI_H */ #endif /* P54PCI_H */
...@@ -322,7 +322,7 @@ static int p54u_read_eeprom(struct ieee80211_hw *dev) ...@@ -322,7 +322,7 @@ static int p54u_read_eeprom(struct ieee80211_hw *dev)
buf = kmalloc(0x2020, GFP_KERNEL); buf = kmalloc(0x2020, GFP_KERNEL);
if (!buf) { if (!buf) {
printk(KERN_ERR "prism54usb: cannot allocate memory for " printk(KERN_ERR "p54usb: cannot allocate memory for "
"eeprom readback!\n"); "eeprom readback!\n");
return -ENOMEM; return -ENOMEM;
} }
...@@ -331,7 +331,7 @@ static int p54u_read_eeprom(struct ieee80211_hw *dev) ...@@ -331,7 +331,7 @@ static int p54u_read_eeprom(struct ieee80211_hw *dev)
*((u32 *) buf) = priv->common.rx_start; *((u32 *) buf) = priv->common.rx_start;
err = p54u_bulk_msg(priv, P54U_PIPE_DATA, buf, sizeof(u32)); err = p54u_bulk_msg(priv, P54U_PIPE_DATA, buf, sizeof(u32));
if (err) { if (err) {
printk(KERN_ERR "prism54usb: addr send failed\n"); printk(KERN_ERR "p54usb: addr send failed\n");
goto fail; goto fail;
} }
} else { } else {
...@@ -341,7 +341,7 @@ static int p54u_read_eeprom(struct ieee80211_hw *dev) ...@@ -341,7 +341,7 @@ static int p54u_read_eeprom(struct ieee80211_hw *dev)
reg->val = cpu_to_le32(ISL38XX_DEV_INT_DATA); reg->val = cpu_to_le32(ISL38XX_DEV_INT_DATA);
err = p54u_bulk_msg(priv, P54U_PIPE_DEV, buf, sizeof(*reg)); err = p54u_bulk_msg(priv, P54U_PIPE_DEV, buf, sizeof(*reg));
if (err) { if (err) {
printk(KERN_ERR "prism54usb: dev_int send failed\n"); printk(KERN_ERR "p54usb: dev_int send failed\n");
goto fail; goto fail;
} }
} }
...@@ -359,7 +359,7 @@ static int p54u_read_eeprom(struct ieee80211_hw *dev) ...@@ -359,7 +359,7 @@ static int p54u_read_eeprom(struct ieee80211_hw *dev)
err = p54u_bulk_msg(priv, P54U_PIPE_DATA, buf, err = p54u_bulk_msg(priv, P54U_PIPE_DATA, buf,
EEPROM_READBACK_LEN + priv->common.tx_hdr_len); EEPROM_READBACK_LEN + priv->common.tx_hdr_len);
if (err) { if (err) {
printk(KERN_ERR "prism54usb: eeprom req send failed\n"); printk(KERN_ERR "p54usb: eeprom req send failed\n");
goto fail; goto fail;
} }
...@@ -369,7 +369,7 @@ static int p54u_read_eeprom(struct ieee80211_hw *dev) ...@@ -369,7 +369,7 @@ static int p54u_read_eeprom(struct ieee80211_hw *dev)
if (!err && alen > offset) { if (!err && alen > offset) {
p54_parse_eeprom(dev, (u8 *)buf + offset, alen - offset); p54_parse_eeprom(dev, (u8 *)buf + offset, alen - offset);
} else { } else {
printk(KERN_ERR "prism54usb: eeprom read failed!\n"); printk(KERN_ERR "p54usb: eeprom read failed!\n");
err = -EINVAL; err = -EINVAL;
goto fail; goto fail;
} }
...@@ -458,7 +458,7 @@ static int p54u_upload_firmware_3887(struct ieee80211_hw *dev) ...@@ -458,7 +458,7 @@ static int p54u_upload_firmware_3887(struct ieee80211_hw *dev)
err = p54u_bulk_msg(priv, P54U_PIPE_DATA, buf, block_size); err = p54u_bulk_msg(priv, P54U_PIPE_DATA, buf, block_size);
if (err) { if (err) {
printk(KERN_ERR "prism54usb: firmware upload failed!\n"); printk(KERN_ERR "p54usb: firmware upload failed!\n");
goto err_upload_failed; goto err_upload_failed;
} }
...@@ -469,7 +469,7 @@ static int p54u_upload_firmware_3887(struct ieee80211_hw *dev) ...@@ -469,7 +469,7 @@ static int p54u_upload_firmware_3887(struct ieee80211_hw *dev)
*((__le32 *)buf) = cpu_to_le32(~crc32_le(~0, fw_entry->data, fw_entry->size)); *((__le32 *)buf) = cpu_to_le32(~crc32_le(~0, fw_entry->data, fw_entry->size));
err = p54u_bulk_msg(priv, P54U_PIPE_DATA, buf, sizeof(u32)); err = p54u_bulk_msg(priv, P54U_PIPE_DATA, buf, sizeof(u32));
if (err) { if (err) {
printk(KERN_ERR "prism54usb: firmware upload failed!\n"); printk(KERN_ERR "p54usb: firmware upload failed!\n");
goto err_upload_failed; goto err_upload_failed;
} }
...@@ -480,13 +480,13 @@ static int p54u_upload_firmware_3887(struct ieee80211_hw *dev) ...@@ -480,13 +480,13 @@ static int p54u_upload_firmware_3887(struct ieee80211_hw *dev)
break; break;
if (alen > 5 && !memcmp(buf, "ERROR", 5)) { if (alen > 5 && !memcmp(buf, "ERROR", 5)) {
printk(KERN_INFO "prism54usb: firmware upload failed!\n"); printk(KERN_INFO "p54usb: firmware upload failed!\n");
err = -EINVAL; err = -EINVAL;
break; break;
} }
if (time_after(jiffies, timeout)) { if (time_after(jiffies, timeout)) {
printk(KERN_ERR "prism54usb: firmware boot timed out!\n"); printk(KERN_ERR "p54usb: firmware boot timed out!\n");
err = -ETIMEDOUT; err = -ETIMEDOUT;
break; break;
} }
...@@ -498,7 +498,7 @@ static int p54u_upload_firmware_3887(struct ieee80211_hw *dev) ...@@ -498,7 +498,7 @@ static int p54u_upload_firmware_3887(struct ieee80211_hw *dev)
buf[1] = '\r'; buf[1] = '\r';
err = p54u_bulk_msg(priv, P54U_PIPE_DATA, buf, 2); err = p54u_bulk_msg(priv, P54U_PIPE_DATA, buf, 2);
if (err) { if (err) {
printk(KERN_ERR "prism54usb: firmware boot failed!\n"); printk(KERN_ERR "p54usb: firmware boot failed!\n");
goto err_upload_failed; goto err_upload_failed;
} }
...@@ -660,7 +660,7 @@ static int p54u_upload_firmware_net2280(struct ieee80211_hw *dev) ...@@ -660,7 +660,7 @@ static int p54u_upload_firmware_net2280(struct ieee80211_hw *dev)
err = p54u_bulk_msg(priv, P54U_PIPE_DATA, buf, block_len); err = p54u_bulk_msg(priv, P54U_PIPE_DATA, buf, block_len);
if (err) { if (err) {
printk(KERN_ERR "prism54usb: firmware block upload " printk(KERN_ERR "p54usb: firmware block upload "
"failed\n"); "failed\n");
goto fail; goto fail;
} }
...@@ -694,7 +694,7 @@ static int p54u_upload_firmware_net2280(struct ieee80211_hw *dev) ...@@ -694,7 +694,7 @@ static int p54u_upload_firmware_net2280(struct ieee80211_hw *dev)
0x002C | (unsigned long)&devreg->direct_mem_win); 0x002C | (unsigned long)&devreg->direct_mem_win);
if (!(reg & cpu_to_le32(ISL38XX_DMA_STATUS_DONE)) || if (!(reg & cpu_to_le32(ISL38XX_DMA_STATUS_DONE)) ||
!(reg & cpu_to_le32(ISL38XX_DMA_STATUS_READY))) { !(reg & cpu_to_le32(ISL38XX_DMA_STATUS_READY))) {
printk(KERN_ERR "prism54usb: firmware DMA transfer " printk(KERN_ERR "p54usb: firmware DMA transfer "
"failed\n"); "failed\n");
goto fail; goto fail;
} }
...@@ -802,7 +802,7 @@ static int __devinit p54u_probe(struct usb_interface *intf, ...@@ -802,7 +802,7 @@ static int __devinit p54u_probe(struct usb_interface *intf,
dev = p54_init_common(sizeof(*priv)); dev = p54_init_common(sizeof(*priv));
if (!dev) { if (!dev) {
printk(KERN_ERR "prism54usb: ieee80211 alloc failed\n"); printk(KERN_ERR "p54usb: ieee80211 alloc failed\n");
return -ENOMEM; return -ENOMEM;
} }
...@@ -858,7 +858,7 @@ static int __devinit p54u_probe(struct usb_interface *intf, ...@@ -858,7 +858,7 @@ static int __devinit p54u_probe(struct usb_interface *intf,
if (!is_valid_ether_addr(dev->wiphy->perm_addr)) { if (!is_valid_ether_addr(dev->wiphy->perm_addr)) {
u8 perm_addr[ETH_ALEN]; u8 perm_addr[ETH_ALEN];
printk(KERN_WARNING "prism54usb: Invalid hwaddr! Using randomly generated MAC addr\n"); printk(KERN_WARNING "p54usb: Invalid hwaddr! Using randomly generated MAC addr\n");
random_ether_addr(perm_addr); random_ether_addr(perm_addr);
SET_IEEE80211_PERM_ADDR(dev, perm_addr); SET_IEEE80211_PERM_ADDR(dev, perm_addr);
} }
...@@ -867,7 +867,7 @@ static int __devinit p54u_probe(struct usb_interface *intf, ...@@ -867,7 +867,7 @@ static int __devinit p54u_probe(struct usb_interface *intf,
err = ieee80211_register_hw(dev); err = ieee80211_register_hw(dev);
if (err) { if (err) {
printk(KERN_ERR "prism54usb: Cannot register netdevice\n"); printk(KERN_ERR "p54usb: Cannot register netdevice\n");
goto err_free_dev; goto err_free_dev;
} }
...@@ -902,7 +902,7 @@ static void __devexit p54u_disconnect(struct usb_interface *intf) ...@@ -902,7 +902,7 @@ static void __devexit p54u_disconnect(struct usb_interface *intf)
} }
static struct usb_driver p54u_driver = { static struct usb_driver p54u_driver = {
.name = "prism54usb", .name = "p54usb",
.id_table = p54u_table, .id_table = p54u_table,
.probe = p54u_probe, .probe = p54u_probe,
.disconnect = p54u_disconnect, .disconnect = p54u_disconnect,
......
#ifndef PRISM54USB_H #ifndef P54USB_H
#define PRISM54USB_H #define P54USB_H
/* /*
* Defines for USB based mac80211 Prism54 driver * Defines for USB based mac80211 Prism54 driver
...@@ -130,4 +130,4 @@ struct p54u_priv { ...@@ -130,4 +130,4 @@ struct p54u_priv {
struct sk_buff_head rx_queue; struct sk_buff_head rx_queue;
}; };
#endif /* PRISM54USB_H */ #endif /* P54USB_H */
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