diff options
author | Lennert Buytenhek <buytenh@wantstofly.org> | 2009-10-22 14:19:33 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-11-04 18:44:43 -0500 |
commit | c2c357ce309221b85fd36e50aade66d01a556cde (patch) | |
tree | d2669dd06e189fc8bb18419dad391a6a2a04b217 /drivers/net/wireless/mwl8k.c | |
parent | 8848fd253bb26f09987405613bad3e0d53441ec0 (diff) |
mwl8k: coding style cleanups
Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/mwl8k.c')
-rw-r--r-- | drivers/net/wireless/mwl8k.c | 122 |
1 files changed, 65 insertions, 57 deletions
diff --git a/drivers/net/wireless/mwl8k.c b/drivers/net/wireless/mwl8k.c index 32499984e917..252ef9c83364 100644 --- a/drivers/net/wireless/mwl8k.c +++ b/drivers/net/wireless/mwl8k.c | |||
@@ -27,11 +27,6 @@ | |||
27 | #define MWL8K_NAME KBUILD_MODNAME | 27 | #define MWL8K_NAME KBUILD_MODNAME |
28 | #define MWL8K_VERSION "0.10" | 28 | #define MWL8K_VERSION "0.10" |
29 | 29 | ||
30 | MODULE_DESCRIPTION(MWL8K_DESC); | ||
31 | MODULE_VERSION(MWL8K_VERSION); | ||
32 | MODULE_AUTHOR("Lennert Buytenhek <buytenh@marvell.com>"); | ||
33 | MODULE_LICENSE("GPL"); | ||
34 | |||
35 | static DEFINE_PCI_DEVICE_TABLE(mwl8k_table) = { | 30 | static DEFINE_PCI_DEVICE_TABLE(mwl8k_table) = { |
36 | { PCI_VDEVICE(MARVELL, 0x2a2b), .driver_data = 8687, }, | 31 | { PCI_VDEVICE(MARVELL, 0x2a2b), .driver_data = 8687, }, |
37 | { PCI_VDEVICE(MARVELL, 0x2a30), .driver_data = 8687, }, | 32 | { PCI_VDEVICE(MARVELL, 0x2a30), .driver_data = 8687, }, |
@@ -138,7 +133,6 @@ struct mwl8k_priv { | |||
138 | struct ieee80211_hw *hw; | 133 | struct ieee80211_hw *hw; |
139 | 134 | ||
140 | struct pci_dev *pdev; | 135 | struct pci_dev *pdev; |
141 | u8 name[16]; | ||
142 | 136 | ||
143 | /* firmware files and meta data */ | 137 | /* firmware files and meta data */ |
144 | struct mwl8k_firmware fw; | 138 | struct mwl8k_firmware fw; |
@@ -353,14 +347,14 @@ static void mwl8k_release_firmware(struct mwl8k_priv *priv) | |||
353 | 347 | ||
354 | /* Request fw image */ | 348 | /* Request fw image */ |
355 | static int mwl8k_request_fw(struct mwl8k_priv *priv, | 349 | static int mwl8k_request_fw(struct mwl8k_priv *priv, |
356 | const char *fname, struct firmware **fw) | 350 | const char *fname, struct firmware **fw) |
357 | { | 351 | { |
358 | /* release current image */ | 352 | /* release current image */ |
359 | if (*fw != NULL) | 353 | if (*fw != NULL) |
360 | mwl8k_release_fw(fw); | 354 | mwl8k_release_fw(fw); |
361 | 355 | ||
362 | return request_firmware((const struct firmware **)fw, | 356 | return request_firmware((const struct firmware **)fw, |
363 | fname, &priv->pdev->dev); | 357 | fname, &priv->pdev->dev); |
364 | } | 358 | } |
365 | 359 | ||
366 | static int mwl8k_request_firmware(struct mwl8k_priv *priv, u32 part_num) | 360 | static int mwl8k_request_firmware(struct mwl8k_priv *priv, u32 part_num) |
@@ -375,9 +369,8 @@ static int mwl8k_request_firmware(struct mwl8k_priv *priv, u32 part_num) | |||
375 | 369 | ||
376 | rc = mwl8k_request_fw(priv, filename, &priv->fw.helper); | 370 | rc = mwl8k_request_fw(priv, filename, &priv->fw.helper); |
377 | if (rc) { | 371 | if (rc) { |
378 | printk(KERN_ERR | 372 | printk(KERN_ERR "%s: Error requesting helper firmware " |
379 | "%s Error requesting helper firmware file %s\n", | 373 | "file %s\n", pci_name(priv->pdev), filename); |
380 | pci_name(priv->pdev), filename); | ||
381 | return rc; | 374 | return rc; |
382 | } | 375 | } |
383 | 376 | ||
@@ -386,8 +379,8 @@ static int mwl8k_request_firmware(struct mwl8k_priv *priv, u32 part_num) | |||
386 | 379 | ||
387 | rc = mwl8k_request_fw(priv, filename, &priv->fw.ucode); | 380 | rc = mwl8k_request_fw(priv, filename, &priv->fw.ucode); |
388 | if (rc) { | 381 | if (rc) { |
389 | printk(KERN_ERR "%s Error requesting firmware file %s\n", | 382 | printk(KERN_ERR "%s: Error requesting firmware file %s\n", |
390 | pci_name(priv->pdev), filename); | 383 | pci_name(priv->pdev), filename); |
391 | mwl8k_release_fw(&priv->fw.helper); | 384 | mwl8k_release_fw(&priv->fw.helper); |
392 | return rc; | 385 | return rc; |
393 | } | 386 | } |
@@ -542,32 +535,38 @@ static int mwl8k_feed_fw_image(struct mwl8k_priv *priv, | |||
542 | return rc; | 535 | return rc; |
543 | } | 536 | } |
544 | 537 | ||
545 | static int mwl8k_load_firmware(struct mwl8k_priv *priv) | 538 | static int mwl8k_load_firmware(struct ieee80211_hw *hw) |
546 | { | 539 | { |
547 | int loops, rc; | 540 | struct mwl8k_priv *priv = hw->priv; |
541 | struct firmware *fw = priv->fw.ucode; | ||
542 | int rc; | ||
543 | int loops; | ||
544 | |||
545 | if (!memcmp(fw->data, "\x01\x00\x00\x00", 4)) { | ||
546 | struct firmware *helper = priv->fw.helper; | ||
548 | 547 | ||
549 | const u8 *ucode = priv->fw.ucode->data; | 548 | if (helper == NULL) { |
550 | size_t ucode_len = priv->fw.ucode->size; | 549 | printk(KERN_ERR "%s: helper image needed but none " |
551 | const u8 *helper = priv->fw.helper->data; | 550 | "given\n", pci_name(priv->pdev)); |
552 | size_t helper_len = priv->fw.helper->size; | 551 | return -EINVAL; |
552 | } | ||
553 | 553 | ||
554 | if (!memcmp(ucode, "\x01\x00\x00\x00", 4)) { | 554 | rc = mwl8k_load_fw_image(priv, helper->data, helper->size); |
555 | rc = mwl8k_load_fw_image(priv, helper, helper_len); | ||
556 | if (rc) { | 555 | if (rc) { |
557 | printk(KERN_ERR "%s: unable to load firmware " | 556 | printk(KERN_ERR "%s: unable to load firmware " |
558 | "helper image\n", pci_name(priv->pdev)); | 557 | "helper image\n", pci_name(priv->pdev)); |
559 | return rc; | 558 | return rc; |
560 | } | 559 | } |
561 | msleep(1); | 560 | msleep(1); |
562 | 561 | ||
563 | rc = mwl8k_feed_fw_image(priv, ucode, ucode_len); | 562 | rc = mwl8k_feed_fw_image(priv, fw->data, fw->size); |
564 | } else { | 563 | } else { |
565 | rc = mwl8k_load_fw_image(priv, ucode, ucode_len); | 564 | rc = mwl8k_load_fw_image(priv, fw->data, fw->size); |
566 | } | 565 | } |
567 | 566 | ||
568 | if (rc) { | 567 | if (rc) { |
569 | printk(KERN_ERR "%s: unable to load firmware data\n", | 568 | printk(KERN_ERR "%s: unable to load firmware image\n", |
570 | pci_name(priv->pdev)); | 569 | pci_name(priv->pdev)); |
571 | return rc; | 570 | return rc; |
572 | } | 571 | } |
573 | 572 | ||
@@ -772,7 +771,7 @@ static int mwl8k_rxq_init(struct ieee80211_hw *hw, int index) | |||
772 | pci_alloc_consistent(priv->pdev, size, &rxq->rx_desc_dma); | 771 | pci_alloc_consistent(priv->pdev, size, &rxq->rx_desc_dma); |
773 | if (rxq->rx_desc_area == NULL) { | 772 | if (rxq->rx_desc_area == NULL) { |
774 | printk(KERN_ERR "%s: failed to alloc RX descriptors\n", | 773 | printk(KERN_ERR "%s: failed to alloc RX descriptors\n", |
775 | priv->name); | 774 | wiphy_name(hw->wiphy)); |
776 | return -ENOMEM; | 775 | return -ENOMEM; |
777 | } | 776 | } |
778 | memset(rxq->rx_desc_area, 0, size); | 777 | memset(rxq->rx_desc_area, 0, size); |
@@ -781,7 +780,7 @@ static int mwl8k_rxq_init(struct ieee80211_hw *hw, int index) | |||
781 | sizeof(*rxq->rx_skb), GFP_KERNEL); | 780 | sizeof(*rxq->rx_skb), GFP_KERNEL); |
782 | if (rxq->rx_skb == NULL) { | 781 | if (rxq->rx_skb == NULL) { |
783 | printk(KERN_ERR "%s: failed to alloc RX skbuff list\n", | 782 | printk(KERN_ERR "%s: failed to alloc RX skbuff list\n", |
784 | priv->name); | 783 | wiphy_name(hw->wiphy)); |
785 | pci_free_consistent(priv->pdev, size, | 784 | pci_free_consistent(priv->pdev, size, |
786 | rxq->rx_desc_area, rxq->rx_desc_dma); | 785 | rxq->rx_desc_area, rxq->rx_desc_dma); |
787 | return -ENOMEM; | 786 | return -ENOMEM; |
@@ -934,9 +933,9 @@ static int rxq_process(struct ieee80211_hw *hw, int index, int limit) | |||
934 | wh = (struct ieee80211_hdr *)skb->data; | 933 | wh = (struct ieee80211_hdr *)skb->data; |
935 | 934 | ||
936 | /* | 935 | /* |
937 | * Check for pending join operation. save a copy of | 936 | * Check for a pending join operation. Save a |
938 | * the beacon and schedule a tasklet to send finalize | 937 | * copy of the beacon and schedule a tasklet to |
939 | * join command to the firmware. | 938 | * send a FINALIZE_JOIN command to the firmware. |
940 | */ | 939 | */ |
941 | if (mwl8k_capture_bssid(priv, wh)) | 940 | if (mwl8k_capture_bssid(priv, wh)) |
942 | mwl8k_save_beacon(priv, skb); | 941 | mwl8k_save_beacon(priv, skb); |
@@ -1024,7 +1023,7 @@ static int mwl8k_txq_init(struct ieee80211_hw *hw, int index) | |||
1024 | pci_alloc_consistent(priv->pdev, size, &txq->tx_desc_dma); | 1023 | pci_alloc_consistent(priv->pdev, size, &txq->tx_desc_dma); |
1025 | if (txq->tx_desc_area == NULL) { | 1024 | if (txq->tx_desc_area == NULL) { |
1026 | printk(KERN_ERR "%s: failed to alloc TX descriptors\n", | 1025 | printk(KERN_ERR "%s: failed to alloc TX descriptors\n", |
1027 | priv->name); | 1026 | wiphy_name(hw->wiphy)); |
1028 | return -ENOMEM; | 1027 | return -ENOMEM; |
1029 | } | 1028 | } |
1030 | memset(txq->tx_desc_area, 0, size); | 1029 | memset(txq->tx_desc_area, 0, size); |
@@ -1033,7 +1032,7 @@ static int mwl8k_txq_init(struct ieee80211_hw *hw, int index) | |||
1033 | GFP_KERNEL); | 1032 | GFP_KERNEL); |
1034 | if (txq->tx_skb == NULL) { | 1033 | if (txq->tx_skb == NULL) { |
1035 | printk(KERN_ERR "%s: failed to alloc TX skbuff list\n", | 1034 | printk(KERN_ERR "%s: failed to alloc TX skbuff list\n", |
1036 | priv->name); | 1035 | wiphy_name(hw->wiphy)); |
1037 | pci_free_consistent(priv->pdev, size, | 1036 | pci_free_consistent(priv->pdev, size, |
1038 | txq->tx_desc_area, txq->tx_desc_dma); | 1037 | txq->tx_desc_area, txq->tx_desc_dma); |
1039 | return -ENOMEM; | 1038 | return -ENOMEM; |
@@ -1154,8 +1153,8 @@ static int mwl8k_tx_wait_empty(struct ieee80211_hw *hw) | |||
1154 | 1153 | ||
1155 | mwl8k_scan_tx_ring(priv, txinfo); | 1154 | mwl8k_scan_tx_ring(priv, txinfo); |
1156 | for (index = 0; index < MWL8K_TX_QUEUES; index++) | 1155 | for (index = 0; index < MWL8K_TX_QUEUES; index++) |
1157 | printk(KERN_ERR | 1156 | printk(KERN_ERR "TXQ:%u L:%u H:%u T:%u FW:%u " |
1158 | "TXQ:%u L:%u H:%u T:%u FW:%u DRV:%u U:%u\n", | 1157 | "DRV:%u U:%u\n", |
1159 | index, | 1158 | index, |
1160 | txinfo[index].len, | 1159 | txinfo[index].len, |
1161 | txinfo[index].head, | 1160 | txinfo[index].head, |
@@ -1317,7 +1316,7 @@ mwl8k_txq_xmit(struct ieee80211_hw *hw, int index, struct sk_buff *skb) | |||
1317 | 1316 | ||
1318 | if (pci_dma_mapping_error(priv->pdev, dma)) { | 1317 | if (pci_dma_mapping_error(priv->pdev, dma)) { |
1319 | printk(KERN_DEBUG "%s: failed to dma map skb, " | 1318 | printk(KERN_DEBUG "%s: failed to dma map skb, " |
1320 | "dropping TX frame.\n", priv->name); | 1319 | "dropping TX frame.\n", wiphy_name(hw->wiphy)); |
1321 | dev_kfree_skb(skb); | 1320 | dev_kfree_skb(skb); |
1322 | return NETDEV_TX_OK; | 1321 | return NETDEV_TX_OK; |
1323 | } | 1322 | } |
@@ -1431,7 +1430,7 @@ static int mwl8k_post_cmd(struct ieee80211_hw *hw, struct mwl8k_cmd_pkt *cmd) | |||
1431 | unsigned long timeout = 0; | 1430 | unsigned long timeout = 0; |
1432 | u8 buf[32]; | 1431 | u8 buf[32]; |
1433 | 1432 | ||
1434 | cmd->result = 0xFFFF; | 1433 | cmd->result = 0xffff; |
1435 | dma_size = le16_to_cpu(cmd->length); | 1434 | dma_size = le16_to_cpu(cmd->length); |
1436 | dma_addr = pci_map_single(priv->pdev, cmd, dma_size, | 1435 | dma_addr = pci_map_single(priv->pdev, cmd, dma_size, |
1437 | PCI_DMA_BIDIRECTIONAL); | 1436 | PCI_DMA_BIDIRECTIONAL); |
@@ -1464,7 +1463,7 @@ static int mwl8k_post_cmd(struct ieee80211_hw *hw, struct mwl8k_cmd_pkt *cmd) | |||
1464 | 1463 | ||
1465 | if (!timeout) { | 1464 | if (!timeout) { |
1466 | printk(KERN_ERR "%s: Command %s timeout after %u ms\n", | 1465 | printk(KERN_ERR "%s: Command %s timeout after %u ms\n", |
1467 | priv->name, | 1466 | wiphy_name(hw->wiphy), |
1468 | mwl8k_cmd_name(cmd->code, buf, sizeof(buf)), | 1467 | mwl8k_cmd_name(cmd->code, buf, sizeof(buf)), |
1469 | MWL8K_CMD_TIMEOUT_MS); | 1468 | MWL8K_CMD_TIMEOUT_MS); |
1470 | rc = -ETIMEDOUT; | 1469 | rc = -ETIMEDOUT; |
@@ -1472,7 +1471,7 @@ static int mwl8k_post_cmd(struct ieee80211_hw *hw, struct mwl8k_cmd_pkt *cmd) | |||
1472 | rc = cmd->result ? -EINVAL : 0; | 1471 | rc = cmd->result ? -EINVAL : 0; |
1473 | if (rc) | 1472 | if (rc) |
1474 | printk(KERN_ERR "%s: Command %s error 0x%x\n", | 1473 | printk(KERN_ERR "%s: Command %s error 0x%x\n", |
1475 | priv->name, | 1474 | wiphy_name(hw->wiphy), |
1476 | mwl8k_cmd_name(cmd->code, buf, sizeof(buf)), | 1475 | mwl8k_cmd_name(cmd->code, buf, sizeof(buf)), |
1477 | le16_to_cpu(cmd->result)); | 1476 | le16_to_cpu(cmd->result)); |
1478 | } | 1477 | } |
@@ -2091,8 +2090,8 @@ static int mwl8k_finalize_join(struct ieee80211_hw *hw, void *frame, | |||
2091 | /* XXX TBD Might just have to abort and return an error */ | 2090 | /* XXX TBD Might just have to abort and return an error */ |
2092 | if (payload_len > MWL8K_FJ_BEACON_MAXLEN) | 2091 | if (payload_len > MWL8K_FJ_BEACON_MAXLEN) |
2093 | printk(KERN_ERR "%s(): WARNING: Incomplete beacon " | 2092 | printk(KERN_ERR "%s(): WARNING: Incomplete beacon " |
2094 | "sent to firmware. Sz=%u MAX=%u\n", __func__, | 2093 | "sent to firmware. Sz=%u MAX=%u\n", __func__, |
2095 | payload_len, MWL8K_FJ_BEACON_MAXLEN); | 2094 | payload_len, MWL8K_FJ_BEACON_MAXLEN); |
2096 | 2095 | ||
2097 | if (payload_len > MWL8K_FJ_BEACON_MAXLEN) | 2096 | if (payload_len > MWL8K_FJ_BEACON_MAXLEN) |
2098 | payload_len = MWL8K_FJ_BEACON_MAXLEN; | 2097 | payload_len = MWL8K_FJ_BEACON_MAXLEN; |
@@ -2339,9 +2338,10 @@ static int mwl8k_cmd_use_fixed_rate(struct ieee80211_hw *hw, | |||
2339 | cmd->rate_type = cpu_to_le32(rate_type); | 2338 | cmd->rate_type = cpu_to_le32(rate_type); |
2340 | 2339 | ||
2341 | if (rate_table != NULL) { | 2340 | if (rate_table != NULL) { |
2342 | /* Copy over each field manually so | 2341 | /* |
2343 | * that bitflipping can be done | 2342 | * Copy over each field manually so that endian |
2344 | */ | 2343 | * conversion can be done. |
2344 | */ | ||
2345 | cmd->rate_table.allow_rate_drop = | 2345 | cmd->rate_table.allow_rate_drop = |
2346 | cpu_to_le32(rate_table->allow_rate_drop); | 2346 | cpu_to_le32(rate_table->allow_rate_drop); |
2347 | cmd->rate_table.num_rates = | 2347 | cmd->rate_table.num_rates = |
@@ -2416,7 +2416,7 @@ static int mwl8k_tx(struct ieee80211_hw *hw, struct sk_buff *skb) | |||
2416 | 2416 | ||
2417 | if (priv->current_channel == NULL) { | 2417 | if (priv->current_channel == NULL) { |
2418 | printk(KERN_DEBUG "%s: dropped TX frame since radio " | 2418 | printk(KERN_DEBUG "%s: dropped TX frame since radio " |
2419 | "disabled\n", priv->name); | 2419 | "disabled\n", wiphy_name(hw->wiphy)); |
2420 | dev_kfree_skb(skb); | 2420 | dev_kfree_skb(skb); |
2421 | return NETDEV_TX_OK; | 2421 | return NETDEV_TX_OK; |
2422 | } | 2422 | } |
@@ -2435,7 +2435,7 @@ static int mwl8k_start(struct ieee80211_hw *hw) | |||
2435 | IRQF_SHARED, MWL8K_NAME, hw); | 2435 | IRQF_SHARED, MWL8K_NAME, hw); |
2436 | if (rc) { | 2436 | if (rc) { |
2437 | printk(KERN_ERR "%s: failed to register IRQ handler\n", | 2437 | printk(KERN_ERR "%s: failed to register IRQ handler\n", |
2438 | priv->name); | 2438 | wiphy_name(hw->wiphy)); |
2439 | return -EIO; | 2439 | return -EIO; |
2440 | } | 2440 | } |
2441 | 2441 | ||
@@ -2862,14 +2862,14 @@ static int __devinit mwl8k_probe(struct pci_dev *pdev, | |||
2862 | priv->pdev = pdev; | 2862 | priv->pdev = pdev; |
2863 | priv->wmm_enabled = false; | 2863 | priv->wmm_enabled = false; |
2864 | priv->pending_tx_pkts = 0; | 2864 | priv->pending_tx_pkts = 0; |
2865 | strncpy(priv->name, MWL8K_NAME, sizeof(priv->name)); | ||
2866 | 2865 | ||
2867 | SET_IEEE80211_DEV(hw, &pdev->dev); | 2866 | SET_IEEE80211_DEV(hw, &pdev->dev); |
2868 | pci_set_drvdata(pdev, hw); | 2867 | pci_set_drvdata(pdev, hw); |
2869 | 2868 | ||
2870 | priv->regs = pci_iomap(pdev, 1, 0x10000); | 2869 | priv->regs = pci_iomap(pdev, 1, 0x10000); |
2871 | if (priv->regs == NULL) { | 2870 | if (priv->regs == NULL) { |
2872 | printk(KERN_ERR "%s: Cannot map device memory\n", priv->name); | 2871 | printk(KERN_ERR "%s: Cannot map device memory\n", |
2872 | wiphy_name(hw->wiphy)); | ||
2873 | goto err_iounmap; | 2873 | goto err_iounmap; |
2874 | } | 2874 | } |
2875 | 2875 | ||
@@ -2952,7 +2952,7 @@ static int __devinit mwl8k_probe(struct pci_dev *pdev, | |||
2952 | IRQF_SHARED, MWL8K_NAME, hw); | 2952 | IRQF_SHARED, MWL8K_NAME, hw); |
2953 | if (rc) { | 2953 | if (rc) { |
2954 | printk(KERN_ERR "%s: failed to register IRQ handler\n", | 2954 | printk(KERN_ERR "%s: failed to register IRQ handler\n", |
2955 | priv->name); | 2955 | wiphy_name(hw->wiphy)); |
2956 | goto err_free_queues; | 2956 | goto err_free_queues; |
2957 | } | 2957 | } |
2958 | 2958 | ||
@@ -2962,14 +2962,16 @@ static int __devinit mwl8k_probe(struct pci_dev *pdev, | |||
2962 | /* Ask userland hotplug daemon for the device firmware */ | 2962 | /* Ask userland hotplug daemon for the device firmware */ |
2963 | rc = mwl8k_request_firmware(priv, (u32)id->driver_data); | 2963 | rc = mwl8k_request_firmware(priv, (u32)id->driver_data); |
2964 | if (rc) { | 2964 | if (rc) { |
2965 | printk(KERN_ERR "%s: Firmware files not found\n", priv->name); | 2965 | printk(KERN_ERR "%s: Firmware files not found\n", |
2966 | wiphy_name(hw->wiphy)); | ||
2966 | goto err_free_irq; | 2967 | goto err_free_irq; |
2967 | } | 2968 | } |
2968 | 2969 | ||
2969 | /* Load firmware into hardware */ | 2970 | /* Load firmware into hardware */ |
2970 | rc = mwl8k_load_firmware(priv); | 2971 | rc = mwl8k_load_firmware(hw); |
2971 | if (rc) { | 2972 | if (rc) { |
2972 | printk(KERN_ERR "%s: Cannot start firmware\n", priv->name); | 2973 | printk(KERN_ERR "%s: Cannot start firmware\n", |
2974 | wiphy_name(hw->wiphy)); | ||
2973 | goto err_stop_firmware; | 2975 | goto err_stop_firmware; |
2974 | } | 2976 | } |
2975 | 2977 | ||
@@ -2986,14 +2988,15 @@ static int __devinit mwl8k_probe(struct pci_dev *pdev, | |||
2986 | /* Get config data, mac addrs etc */ | 2988 | /* Get config data, mac addrs etc */ |
2987 | rc = mwl8k_cmd_get_hw_spec(hw); | 2989 | rc = mwl8k_cmd_get_hw_spec(hw); |
2988 | if (rc) { | 2990 | if (rc) { |
2989 | printk(KERN_ERR "%s: Cannot initialise firmware\n", priv->name); | 2991 | printk(KERN_ERR "%s: Cannot initialise firmware\n", |
2992 | wiphy_name(hw->wiphy)); | ||
2990 | goto err_stop_firmware; | 2993 | goto err_stop_firmware; |
2991 | } | 2994 | } |
2992 | 2995 | ||
2993 | /* Turn radio off */ | 2996 | /* Turn radio off */ |
2994 | rc = mwl8k_cmd_802_11_radio_disable(hw); | 2997 | rc = mwl8k_cmd_802_11_radio_disable(hw); |
2995 | if (rc) { | 2998 | if (rc) { |
2996 | printk(KERN_ERR "%s: Cannot disable\n", priv->name); | 2999 | printk(KERN_ERR "%s: Cannot disable\n", wiphy_name(hw->wiphy)); |
2997 | goto err_stop_firmware; | 3000 | goto err_stop_firmware; |
2998 | } | 3001 | } |
2999 | 3002 | ||
@@ -3003,7 +3006,8 @@ static int __devinit mwl8k_probe(struct pci_dev *pdev, | |||
3003 | 3006 | ||
3004 | rc = ieee80211_register_hw(hw); | 3007 | rc = ieee80211_register_hw(hw); |
3005 | if (rc) { | 3008 | if (rc) { |
3006 | printk(KERN_ERR "%s: Cannot register device\n", priv->name); | 3009 | printk(KERN_ERR "%s: Cannot register device\n", |
3010 | wiphy_name(hw->wiphy)); | ||
3007 | goto err_stop_firmware; | 3011 | goto err_stop_firmware; |
3008 | } | 3012 | } |
3009 | 3013 | ||
@@ -3086,8 +3090,7 @@ static void __devexit mwl8k_remove(struct pci_dev *pdev) | |||
3086 | 3090 | ||
3087 | mwl8k_rxq_deinit(hw, 0); | 3091 | mwl8k_rxq_deinit(hw, 0); |
3088 | 3092 | ||
3089 | pci_free_consistent(priv->pdev, 4, | 3093 | pci_free_consistent(priv->pdev, 4, priv->cookie, priv->cookie_dma); |
3090 | priv->cookie, priv->cookie_dma); | ||
3091 | 3094 | ||
3092 | pci_iounmap(pdev, priv->regs); | 3095 | pci_iounmap(pdev, priv->regs); |
3093 | pci_set_drvdata(pdev, NULL); | 3096 | pci_set_drvdata(pdev, NULL); |
@@ -3116,3 +3119,8 @@ static void __exit mwl8k_exit(void) | |||
3116 | 3119 | ||
3117 | module_init(mwl8k_init); | 3120 | module_init(mwl8k_init); |
3118 | module_exit(mwl8k_exit); | 3121 | module_exit(mwl8k_exit); |
3122 | |||
3123 | MODULE_DESCRIPTION(MWL8K_DESC); | ||
3124 | MODULE_VERSION(MWL8K_VERSION); | ||
3125 | MODULE_AUTHOR("Lennert Buytenhek <buytenh@marvell.com>"); | ||
3126 | MODULE_LICENSE("GPL"); | ||