aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl3945-base.c
diff options
context:
space:
mode:
authorAbhijeet Kolekar <abhijeet.kolekar@intel.com>2010-02-03 16:47:56 -0500
committerReinette Chatre <reinette.chatre@intel.com>2010-02-11 13:26:31 -0500
commit7bfedc59ee350727b115bbc79780c69b114f162d (patch)
tree38eb5cbfcb50c6414dcdeba56adce057dbd04351 /drivers/net/wireless/iwlwifi/iwl3945-base.c
parenta24dd27c47fcb31ba5c906b66e5cbc28bfa3fa5e (diff)
iwlwifi: cleanup return values
Cleanup return values and removes unnecessary code. Signed-off-by: Abhijeet Kolekar <abhijeet.kolekar@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl3945-base.c')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl3945-base.c16
1 files changed, 4 insertions, 12 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl3945-base.c b/drivers/net/wireless/iwlwifi/iwl3945-base.c
index eac2b9a95711..f6e8f45ff7f0 100644
--- a/drivers/net/wireless/iwlwifi/iwl3945-base.c
+++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c
@@ -478,7 +478,6 @@ static int iwl3945_tx_skb(struct iwl_priv *priv, struct sk_buff *skb)
478 u8 wait_write_ptr = 0; 478 u8 wait_write_ptr = 0;
479 u8 *qc = NULL; 479 u8 *qc = NULL;
480 unsigned long flags; 480 unsigned long flags;
481 int rc;
482 481
483 spin_lock_irqsave(&priv->lock, flags); 482 spin_lock_irqsave(&priv->lock, flags);
484 if (iwl_is_rfkill(priv)) { 483 if (iwl_is_rfkill(priv)) {
@@ -663,12 +662,9 @@ static int iwl3945_tx_skb(struct iwl_priv *priv, struct sk_buff *skb)
663 662
664 /* Tell device the write index *just past* this latest filled TFD */ 663 /* Tell device the write index *just past* this latest filled TFD */
665 q->write_ptr = iwl_queue_inc_wrap(q->write_ptr, q->n_bd); 664 q->write_ptr = iwl_queue_inc_wrap(q->write_ptr, q->n_bd);
666 rc = iwl_txq_update_write_ptr(priv, txq); 665 iwl_txq_update_write_ptr(priv, txq);
667 spin_unlock_irqrestore(&priv->lock, flags); 666 spin_unlock_irqrestore(&priv->lock, flags);
668 667
669 if (rc)
670 return rc;
671
672 if ((iwl_queue_space(q) < q->high_mark) 668 if ((iwl_queue_space(q) < q->high_mark)
673 && priv->mac80211_registered) { 669 && priv->mac80211_registered) {
674 if (wait_write_ptr) { 670 if (wait_write_ptr) {
@@ -1063,13 +1059,13 @@ static inline __le32 iwl3945_dma_addr2rbd_ptr(struct iwl_priv *priv,
1063 * also updates the memory address in the firmware to reference the new 1059 * also updates the memory address in the firmware to reference the new
1064 * target buffer. 1060 * target buffer.
1065 */ 1061 */
1066static int iwl3945_rx_queue_restock(struct iwl_priv *priv) 1062static void iwl3945_rx_queue_restock(struct iwl_priv *priv)
1067{ 1063{
1068 struct iwl_rx_queue *rxq = &priv->rxq; 1064 struct iwl_rx_queue *rxq = &priv->rxq;
1069 struct list_head *element; 1065 struct list_head *element;
1070 struct iwl_rx_mem_buffer *rxb; 1066 struct iwl_rx_mem_buffer *rxb;
1071 unsigned long flags; 1067 unsigned long flags;
1072 int write, rc; 1068 int write;
1073 1069
1074 spin_lock_irqsave(&rxq->lock, flags); 1070 spin_lock_irqsave(&rxq->lock, flags);
1075 write = rxq->write & ~0x7; 1071 write = rxq->write & ~0x7;
@@ -1099,12 +1095,8 @@ static int iwl3945_rx_queue_restock(struct iwl_priv *priv)
1099 spin_lock_irqsave(&rxq->lock, flags); 1095 spin_lock_irqsave(&rxq->lock, flags);
1100 rxq->need_update = 1; 1096 rxq->need_update = 1;
1101 spin_unlock_irqrestore(&rxq->lock, flags); 1097 spin_unlock_irqrestore(&rxq->lock, flags);
1102 rc = iwl_rx_queue_update_write_ptr(priv, rxq); 1098 iwl_rx_queue_update_write_ptr(priv, rxq);
1103 if (rc)
1104 return rc;
1105 } 1099 }
1106
1107 return 0;
1108} 1100}
1109 1101
1110/** 1102/**