diff options
author | Tomas Winkler <tomas.winkler@intel.com> | 2008-07-20 19:40:14 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2008-08-04 15:09:11 -0400 |
commit | 3ac7f14694dd38273d9d96f1c873233d71190c15 (patch) | |
tree | 4ea3479c3bdba35bc49866356b44454910f9071e /drivers/net/wireless/iwlwifi/iwl3945-base.c | |
parent | 25bc2deda9e8a430ed49f507a1120fb2c86abf33 (diff) |
iwlwifi: fix checkpatch.pl errors
This patch fixes errors reported by checkpatch in iwlwifi drivers
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl3945-base.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl3945-base.c | 52 |
1 files changed, 23 insertions, 29 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl3945-base.c b/drivers/net/wireless/iwlwifi/iwl3945-base.c index 7c82ecfa30a4..eb41b02b506d 100644 --- a/drivers/net/wireless/iwlwifi/iwl3945-base.c +++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c | |||
@@ -275,10 +275,8 @@ static int iwl3945_tx_queue_alloc(struct iwl3945_priv *priv, | |||
275 | return 0; | 275 | return 0; |
276 | 276 | ||
277 | error: | 277 | error: |
278 | if (txq->txb) { | 278 | kfree(txq->txb); |
279 | kfree(txq->txb); | 279 | txq->txb = NULL; |
280 | txq->txb = NULL; | ||
281 | } | ||
282 | 280 | ||
283 | return -ENOMEM; | 281 | return -ENOMEM; |
284 | } | 282 | } |
@@ -365,10 +363,8 @@ void iwl3945_tx_queue_free(struct iwl3945_priv *priv, struct iwl3945_tx_queue *t | |||
365 | txq->q.n_bd, txq->bd, txq->q.dma_addr); | 363 | txq->q.n_bd, txq->bd, txq->q.dma_addr); |
366 | 364 | ||
367 | /* De-alloc array of per-TFD driver data */ | 365 | /* De-alloc array of per-TFD driver data */ |
368 | if (txq->txb) { | 366 | kfree(txq->txb); |
369 | kfree(txq->txb); | 367 | txq->txb = NULL; |
370 | txq->txb = NULL; | ||
371 | } | ||
372 | 368 | ||
373 | /* 0-fill queue descriptor structure */ | 369 | /* 0-fill queue descriptor structure */ |
374 | memset(txq, 0, sizeof(*txq)); | 370 | memset(txq, 0, sizeof(*txq)); |
@@ -2703,9 +2699,8 @@ static int iwl3945_tx_skb(struct iwl3945_priv *priv, struct sk_buff *skb) | |||
2703 | 2699 | ||
2704 | if (!ieee80211_has_morefrags(hdr->frame_control)) { | 2700 | if (!ieee80211_has_morefrags(hdr->frame_control)) { |
2705 | txq->need_update = 1; | 2701 | txq->need_update = 1; |
2706 | if (qc) { | 2702 | if (qc) |
2707 | priv->stations[sta_id].tid[tid].seq_number = seq_number; | 2703 | priv->stations[sta_id].tid[tid].seq_number = seq_number; |
2708 | } | ||
2709 | } else { | 2704 | } else { |
2710 | wait_write_ptr = 1; | 2705 | wait_write_ptr = 1; |
2711 | txq->need_update = 0; | 2706 | txq->need_update = 0; |
@@ -3813,7 +3808,7 @@ int iwl3945_calc_db_from_ratio(int sig_ratio) | |||
3813 | /* 100:1 or higher, divide by 10 and use table, | 3808 | /* 100:1 or higher, divide by 10 and use table, |
3814 | * add 20 dB to make up for divide by 10 */ | 3809 | * add 20 dB to make up for divide by 10 */ |
3815 | if (sig_ratio >= 100) | 3810 | if (sig_ratio >= 100) |
3816 | return (20 + (int)ratio2dB[sig_ratio/10]); | 3811 | return 20 + (int)ratio2dB[sig_ratio/10]; |
3817 | 3812 | ||
3818 | /* We shouldn't see this */ | 3813 | /* We shouldn't see this */ |
3819 | if (sig_ratio < 1) | 3814 | if (sig_ratio < 1) |
@@ -5088,7 +5083,7 @@ static void iwl3945_dealloc_ucode_pci(struct iwl3945_priv *priv) | |||
5088 | * iwl3945_verify_inst_full - verify runtime uCode image in card vs. host, | 5083 | * iwl3945_verify_inst_full - verify runtime uCode image in card vs. host, |
5089 | * looking at all data. | 5084 | * looking at all data. |
5090 | */ | 5085 | */ |
5091 | static int iwl3945_verify_inst_full(struct iwl3945_priv *priv, __le32 * image, u32 len) | 5086 | static int iwl3945_verify_inst_full(struct iwl3945_priv *priv, __le32 *image, u32 len) |
5092 | { | 5087 | { |
5093 | u32 val; | 5088 | u32 val; |
5094 | u32 save_len = len; | 5089 | u32 save_len = len; |
@@ -5237,7 +5232,7 @@ static int iwl3945_verify_bsm(struct iwl3945_priv *priv) | |||
5237 | val = iwl3945_read_prph(priv, BSM_WR_DWCOUNT_REG); | 5232 | val = iwl3945_read_prph(priv, BSM_WR_DWCOUNT_REG); |
5238 | for (reg = BSM_SRAM_LOWER_BOUND; | 5233 | for (reg = BSM_SRAM_LOWER_BOUND; |
5239 | reg < BSM_SRAM_LOWER_BOUND + len; | 5234 | reg < BSM_SRAM_LOWER_BOUND + len; |
5240 | reg += sizeof(u32), image ++) { | 5235 | reg += sizeof(u32), image++) { |
5241 | val = iwl3945_read_prph(priv, reg); | 5236 | val = iwl3945_read_prph(priv, reg); |
5242 | if (val != le32_to_cpu(*image)) { | 5237 | if (val != le32_to_cpu(*image)) { |
5243 | IWL_ERROR("BSM uCode verification failed at " | 5238 | IWL_ERROR("BSM uCode verification failed at " |
@@ -6336,7 +6331,7 @@ static void iwl3945_bg_post_associate(struct work_struct *data) | |||
6336 | DECLARE_MAC_BUF(mac); | 6331 | DECLARE_MAC_BUF(mac); |
6337 | 6332 | ||
6338 | if (priv->iw_mode == IEEE80211_IF_TYPE_AP) { | 6333 | if (priv->iw_mode == IEEE80211_IF_TYPE_AP) { |
6339 | IWL_ERROR("%s Should not be called in AP mode\n", __FUNCTION__); | 6334 | IWL_ERROR("%s Should not be called in AP mode\n", __func__); |
6340 | return; | 6335 | return; |
6341 | } | 6336 | } |
6342 | 6337 | ||
@@ -6417,7 +6412,7 @@ static void iwl3945_bg_post_associate(struct work_struct *data) | |||
6417 | 6412 | ||
6418 | default: | 6413 | default: |
6419 | IWL_ERROR("%s Should not be called in %d mode\n", | 6414 | IWL_ERROR("%s Should not be called in %d mode\n", |
6420 | __FUNCTION__, priv->iw_mode); | 6415 | __func__, priv->iw_mode); |
6421 | break; | 6416 | break; |
6422 | } | 6417 | } |
6423 | 6418 | ||
@@ -7456,7 +7451,7 @@ static ssize_t show_measurement(struct device *d, | |||
7456 | struct iwl3945_priv *priv = dev_get_drvdata(d); | 7451 | struct iwl3945_priv *priv = dev_get_drvdata(d); |
7457 | struct iwl3945_spectrum_notification measure_report; | 7452 | struct iwl3945_spectrum_notification measure_report; |
7458 | u32 size = sizeof(measure_report), len = 0, ofs = 0; | 7453 | u32 size = sizeof(measure_report), len = 0, ofs = 0; |
7459 | u8 *data = (u8 *) & measure_report; | 7454 | u8 *data = (u8 *)&measure_report; |
7460 | unsigned long flags; | 7455 | unsigned long flags; |
7461 | 7456 | ||
7462 | spin_lock_irqsave(&priv->lock, flags); | 7457 | spin_lock_irqsave(&priv->lock, flags); |
@@ -7627,7 +7622,7 @@ static ssize_t show_power_level(struct device *d, | |||
7627 | else | 7622 | else |
7628 | p += sprintf(p, " \n"); | 7623 | p += sprintf(p, " \n"); |
7629 | 7624 | ||
7630 | return (p - buf + 1); | 7625 | return p - buf + 1; |
7631 | 7626 | ||
7632 | } | 7627 | } |
7633 | 7628 | ||
@@ -7649,7 +7644,7 @@ static ssize_t show_statistics(struct device *d, | |||
7649 | struct iwl3945_priv *priv = dev_get_drvdata(d); | 7644 | struct iwl3945_priv *priv = dev_get_drvdata(d); |
7650 | u32 size = sizeof(struct iwl3945_notif_statistics); | 7645 | u32 size = sizeof(struct iwl3945_notif_statistics); |
7651 | u32 len = 0, ofs = 0; | 7646 | u32 len = 0, ofs = 0; |
7652 | u8 *data = (u8 *) & priv->statistics; | 7647 | u8 *data = (u8 *)&priv->statistics; |
7653 | int rc = 0; | 7648 | int rc = 0; |
7654 | 7649 | ||
7655 | if (!iwl3945_is_alive(priv)) | 7650 | if (!iwl3945_is_alive(priv)) |
@@ -8003,16 +7998,16 @@ static int iwl3945_pci_probe(struct pci_dev *pdev, const struct pci_device_id *e | |||
8003 | 7998 | ||
8004 | /* nic init */ | 7999 | /* nic init */ |
8005 | iwl3945_set_bit(priv, CSR_GIO_CHICKEN_BITS, | 8000 | iwl3945_set_bit(priv, CSR_GIO_CHICKEN_BITS, |
8006 | CSR_GIO_CHICKEN_BITS_REG_BIT_DIS_L0S_EXIT_TIMER); | 8001 | CSR_GIO_CHICKEN_BITS_REG_BIT_DIS_L0S_EXIT_TIMER); |
8007 | 8002 | ||
8008 | iwl3945_set_bit(priv, CSR_GP_CNTRL, CSR_GP_CNTRL_REG_FLAG_INIT_DONE); | 8003 | iwl3945_set_bit(priv, CSR_GP_CNTRL, CSR_GP_CNTRL_REG_FLAG_INIT_DONE); |
8009 | err = iwl3945_poll_bit(priv, CSR_GP_CNTRL, | 8004 | err = iwl3945_poll_bit(priv, CSR_GP_CNTRL, |
8010 | CSR_GP_CNTRL_REG_FLAG_MAC_CLOCK_READY, | 8005 | CSR_GP_CNTRL_REG_FLAG_MAC_CLOCK_READY, |
8011 | CSR_GP_CNTRL_REG_FLAG_MAC_CLOCK_READY, 25000); | 8006 | CSR_GP_CNTRL_REG_FLAG_MAC_CLOCK_READY, 25000); |
8012 | if (err < 0) { | 8007 | if (err < 0) { |
8013 | IWL_DEBUG_INFO("Failed to init the card\n"); | 8008 | IWL_DEBUG_INFO("Failed to init the card\n"); |
8014 | goto out_remove_sysfs; | 8009 | goto out_remove_sysfs; |
8015 | } | 8010 | } |
8016 | /* Read the EEPROM */ | 8011 | /* Read the EEPROM */ |
8017 | err = iwl3945_eeprom_init(priv); | 8012 | err = iwl3945_eeprom_init(priv); |
8018 | if (err) { | 8013 | if (err) { |
@@ -8114,9 +8109,8 @@ static void __devexit iwl3945_pci_remove(struct pci_dev *pdev) | |||
8114 | iwl3945_unset_hw_setting(priv); | 8109 | iwl3945_unset_hw_setting(priv); |
8115 | iwl3945_clear_stations_table(priv); | 8110 | iwl3945_clear_stations_table(priv); |
8116 | 8111 | ||
8117 | if (priv->mac80211_registered) { | 8112 | if (priv->mac80211_registered) |
8118 | ieee80211_unregister_hw(priv->hw); | 8113 | ieee80211_unregister_hw(priv->hw); |
8119 | } | ||
8120 | 8114 | ||
8121 | /*netif_stop_queue(dev); */ | 8115 | /*netif_stop_queue(dev); */ |
8122 | flush_workqueue(priv->workqueue); | 8116 | flush_workqueue(priv->workqueue); |