diff options
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-tx.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-tx.c | 21 |
1 files changed, 7 insertions, 14 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-tx.c b/drivers/net/wireless/iwlwifi/iwl-tx.c index 3788a3d4ddc2..2199b1bc1c28 100644 --- a/drivers/net/wireless/iwlwifi/iwl-tx.c +++ b/drivers/net/wireless/iwlwifi/iwl-tx.c | |||
@@ -80,14 +80,13 @@ static inline void iwl_free_dma_ptr(struct iwl_priv *priv, | |||
80 | /** | 80 | /** |
81 | * iwl_txq_update_write_ptr - Send new write index to hardware | 81 | * iwl_txq_update_write_ptr - Send new write index to hardware |
82 | */ | 82 | */ |
83 | int iwl_txq_update_write_ptr(struct iwl_priv *priv, struct iwl_tx_queue *txq) | 83 | void iwl_txq_update_write_ptr(struct iwl_priv *priv, struct iwl_tx_queue *txq) |
84 | { | 84 | { |
85 | u32 reg = 0; | 85 | u32 reg = 0; |
86 | int ret = 0; | ||
87 | int txq_id = txq->q.id; | 86 | int txq_id = txq->q.id; |
88 | 87 | ||
89 | if (txq->need_update == 0) | 88 | if (txq->need_update == 0) |
90 | return ret; | 89 | return; |
91 | 90 | ||
92 | /* if we're trying to save power */ | 91 | /* if we're trying to save power */ |
93 | if (test_bit(STATUS_POWER_PMI, &priv->status)) { | 92 | if (test_bit(STATUS_POWER_PMI, &priv->status)) { |
@@ -101,7 +100,7 @@ int iwl_txq_update_write_ptr(struct iwl_priv *priv, struct iwl_tx_queue *txq) | |||
101 | txq_id, reg); | 100 | txq_id, reg); |
102 | iwl_set_bit(priv, CSR_GP_CNTRL, | 101 | iwl_set_bit(priv, CSR_GP_CNTRL, |
103 | CSR_GP_CNTRL_REG_FLAG_MAC_ACCESS_REQ); | 102 | CSR_GP_CNTRL_REG_FLAG_MAC_ACCESS_REQ); |
104 | return ret; | 103 | return; |
105 | } | 104 | } |
106 | 105 | ||
107 | iwl_write_direct32(priv, HBUS_TARG_WRPTR, | 106 | iwl_write_direct32(priv, HBUS_TARG_WRPTR, |
@@ -114,8 +113,6 @@ int iwl_txq_update_write_ptr(struct iwl_priv *priv, struct iwl_tx_queue *txq) | |||
114 | txq->q.write_ptr | (txq_id << 8)); | 113 | txq->q.write_ptr | (txq_id << 8)); |
115 | 114 | ||
116 | txq->need_update = 0; | 115 | txq->need_update = 0; |
117 | |||
118 | return ret; | ||
119 | } | 116 | } |
120 | EXPORT_SYMBOL(iwl_txq_update_write_ptr); | 117 | EXPORT_SYMBOL(iwl_txq_update_write_ptr); |
121 | 118 | ||
@@ -731,7 +728,6 @@ int iwl_tx_skb(struct iwl_priv *priv, struct sk_buff *skb) | |||
731 | u8 tid = 0; | 728 | u8 tid = 0; |
732 | u8 *qc = NULL; | 729 | u8 *qc = NULL; |
733 | unsigned long flags; | 730 | unsigned long flags; |
734 | int ret; | ||
735 | 731 | ||
736 | spin_lock_irqsave(&priv->lock, flags); | 732 | spin_lock_irqsave(&priv->lock, flags); |
737 | if (iwl_is_rfkill(priv)) { | 733 | if (iwl_is_rfkill(priv)) { |
@@ -951,7 +947,7 @@ int iwl_tx_skb(struct iwl_priv *priv, struct sk_buff *skb) | |||
951 | 947 | ||
952 | /* Tell device the write index *just past* this latest filled TFD */ | 948 | /* Tell device the write index *just past* this latest filled TFD */ |
953 | q->write_ptr = iwl_queue_inc_wrap(q->write_ptr, q->n_bd); | 949 | q->write_ptr = iwl_queue_inc_wrap(q->write_ptr, q->n_bd); |
954 | ret = iwl_txq_update_write_ptr(priv, txq); | 950 | iwl_txq_update_write_ptr(priv, txq); |
955 | spin_unlock_irqrestore(&priv->lock, flags); | 951 | spin_unlock_irqrestore(&priv->lock, flags); |
956 | 952 | ||
957 | /* | 953 | /* |
@@ -965,9 +961,6 @@ int iwl_tx_skb(struct iwl_priv *priv, struct sk_buff *skb) | |||
965 | if (sta_priv && sta_priv->client) | 961 | if (sta_priv && sta_priv->client) |
966 | atomic_inc(&sta_priv->pending_frames); | 962 | atomic_inc(&sta_priv->pending_frames); |
967 | 963 | ||
968 | if (ret) | ||
969 | return ret; | ||
970 | |||
971 | if ((iwl_queue_space(q) < q->high_mark) && priv->mac80211_registered) { | 964 | if ((iwl_queue_space(q) < q->high_mark) && priv->mac80211_registered) { |
972 | if (wait_write_ptr) { | 965 | if (wait_write_ptr) { |
973 | spin_lock_irqsave(&priv->lock, flags); | 966 | spin_lock_irqsave(&priv->lock, flags); |
@@ -1006,7 +999,7 @@ int iwl_enqueue_hcmd(struct iwl_priv *priv, struct iwl_host_cmd *cmd) | |||
1006 | struct iwl_cmd_meta *out_meta; | 999 | struct iwl_cmd_meta *out_meta; |
1007 | dma_addr_t phys_addr; | 1000 | dma_addr_t phys_addr; |
1008 | unsigned long flags; | 1001 | unsigned long flags; |
1009 | int len, ret; | 1002 | int len; |
1010 | u32 idx; | 1003 | u32 idx; |
1011 | u16 fix_size; | 1004 | u16 fix_size; |
1012 | 1005 | ||
@@ -1103,10 +1096,10 @@ int iwl_enqueue_hcmd(struct iwl_priv *priv, struct iwl_host_cmd *cmd) | |||
1103 | 1096 | ||
1104 | /* Increment and update queue's write index */ | 1097 | /* Increment and update queue's write index */ |
1105 | q->write_ptr = iwl_queue_inc_wrap(q->write_ptr, q->n_bd); | 1098 | q->write_ptr = iwl_queue_inc_wrap(q->write_ptr, q->n_bd); |
1106 | ret = iwl_txq_update_write_ptr(priv, txq); | 1099 | iwl_txq_update_write_ptr(priv, txq); |
1107 | 1100 | ||
1108 | spin_unlock_irqrestore(&priv->hcmd_lock, flags); | 1101 | spin_unlock_irqrestore(&priv->hcmd_lock, flags); |
1109 | return ret ? ret : idx; | 1102 | return idx; |
1110 | } | 1103 | } |
1111 | 1104 | ||
1112 | static void iwl_tx_status(struct iwl_priv *priv, struct sk_buff *skb) | 1105 | static void iwl_tx_status(struct iwl_priv *priv, struct sk_buff *skb) |