linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] iwlwifi updates
@ 2012-05-10 16:09 Johannes Berg
  2012-05-10 16:09 ` [PATCH 1/3] iwlwifi: s/iwlagn_txq_free_tfd/iwl_txq_free_tfd Johannes Berg
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Johannes Berg @ 2012-05-10 16:09 UTC (permalink / raw)
  To: linville; +Cc: linux-wireless

John,

Here are a few more iwlwifi updates. We rename some functions to
get rid of the "agn" in them which we're using to indicate that
the function belongs to the current firmware API, and move a
macro that we'll need in a few more places.

johannes

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH 1/3] iwlwifi: s/iwlagn_txq_free_tfd/iwl_txq_free_tfd
  2012-05-10 16:09 [PATCH 0/3] iwlwifi updates Johannes Berg
@ 2012-05-10 16:09 ` Johannes Berg
  2012-05-10 16:09 ` [PATCH 2/3] iwlwifi: s/iwlagn_unmap_tfd/iwl_unmap_tfd Johannes Berg
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Johannes Berg @ 2012-05-10 16:09 UTC (permalink / raw)
  To: linville; +Cc: linux-wireless, Emmanuel Grumbach

From: Emmanuel Grumbach <emmanuel.grumbach@intel.com>

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Reviewed-by: Wey-Yi W Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
---
 drivers/net/wireless/iwlwifi/iwl-trans-pcie-int.h |    4 ++--
 drivers/net/wireless/iwlwifi/iwl-trans-pcie-tx.c  |    8 ++++----
 drivers/net/wireless/iwlwifi/iwl-trans-pcie.c     |    2 +-
 3 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/drivers/net/wireless/iwlwifi/iwl-trans-pcie-int.h b/drivers/net/wireless/iwlwifi/iwl-trans-pcie-int.h
index e959207..ccb97b9 100644
--- a/drivers/net/wireless/iwlwifi/iwl-trans-pcie-int.h
+++ b/drivers/net/wireless/iwlwifi/iwl-trans-pcie-int.h
@@ -346,8 +346,8 @@ void iwl_trans_tx_queue_set_status(struct iwl_trans *trans,
 				   int tx_fifo_id, bool active);
 void iwl_trans_pcie_tx_agg_setup(struct iwl_trans *trans, int queue, int fifo,
 				 int sta_id, int tid, int frame_limit, u16 ssn);
-void iwlagn_txq_free_tfd(struct iwl_trans *trans, struct iwl_tx_queue *txq,
-			 enum dma_data_direction dma_dir);
+void iwl_txq_free_tfd(struct iwl_trans *trans, struct iwl_tx_queue *txq,
+		      enum dma_data_direction dma_dir);
 int iwl_tx_queue_reclaim(struct iwl_trans *trans, int txq_id, int index,
 			 struct sk_buff_head *skbs);
 int iwl_queue_space(const struct iwl_queue *q);
diff --git a/drivers/net/wireless/iwlwifi/iwl-trans-pcie-tx.c b/drivers/net/wireless/iwlwifi/iwl-trans-pcie-tx.c
index a875023..cf8f3cf 100644
--- a/drivers/net/wireless/iwlwifi/iwl-trans-pcie-tx.c
+++ b/drivers/net/wireless/iwlwifi/iwl-trans-pcie-tx.c
@@ -209,7 +209,7 @@ static void iwlagn_unmap_tfd(struct iwl_trans *trans, struct iwl_cmd_meta *meta,
 }
 
 /**
- * iwlagn_txq_free_tfd - Free all chunks referenced by TFD [txq->q.read_ptr]
+ * iwl_txq_free_tfd - Free all chunks referenced by TFD [txq->q.read_ptr]
  * @trans - transport private data
  * @txq - tx queue
  * @dma_dir - the direction of the DMA mapping
@@ -217,8 +217,8 @@ static void iwlagn_unmap_tfd(struct iwl_trans *trans, struct iwl_cmd_meta *meta,
  * Does NOT advance any TFD circular buffer read/write indexes
  * Does NOT free the TFD itself (which is within circular buffer)
  */
-void iwlagn_txq_free_tfd(struct iwl_trans *trans, struct iwl_tx_queue *txq,
-			 enum dma_data_direction dma_dir)
+void iwl_txq_free_tfd(struct iwl_trans *trans, struct iwl_tx_queue *txq,
+		      enum dma_data_direction dma_dir)
 {
 	struct iwl_tfd *tfd_tmp = txq->tfds;
 
@@ -979,7 +979,7 @@ int iwl_tx_queue_reclaim(struct iwl_trans *trans, int txq_id, int index,
 
 		iwlagn_txq_inval_byte_cnt_tbl(trans, txq);
 
-		iwlagn_txq_free_tfd(trans, txq, DMA_TO_DEVICE);
+		iwl_txq_free_tfd(trans, txq, DMA_TO_DEVICE);
 		freed++;
 	}
 
diff --git a/drivers/net/wireless/iwlwifi/iwl-trans-pcie.c b/drivers/net/wireless/iwlwifi/iwl-trans-pcie.c
index 3cdc014..2f8c84e 100644
--- a/drivers/net/wireless/iwlwifi/iwl-trans-pcie.c
+++ b/drivers/net/wireless/iwlwifi/iwl-trans-pcie.c
@@ -435,7 +435,7 @@ static void iwl_tx_queue_unmap(struct iwl_trans *trans, int txq_id)
 
 	spin_lock_bh(&txq->lock);
 	while (q->write_ptr != q->read_ptr) {
-		iwlagn_txq_free_tfd(trans, txq, dma_dir);
+		iwl_txq_free_tfd(trans, txq, dma_dir);
 		q->read_ptr = iwl_queue_inc_wrap(q->read_ptr, q->n_bd);
 	}
 	spin_unlock_bh(&txq->lock);
-- 
1.7.10


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 2/3] iwlwifi: s/iwlagn_unmap_tfd/iwl_unmap_tfd
  2012-05-10 16:09 [PATCH 0/3] iwlwifi updates Johannes Berg
  2012-05-10 16:09 ` [PATCH 1/3] iwlwifi: s/iwlagn_txq_free_tfd/iwl_txq_free_tfd Johannes Berg
@ 2012-05-10 16:09 ` Johannes Berg
  2012-05-10 16:09 ` [PATCH 3/3] iwlwifi: Move IWL_MASK macro to transport Johannes Berg
  2012-05-16 17:06 ` [PATCH 0/3] iwlwifi updates John W. Linville
  3 siblings, 0 replies; 5+ messages in thread
From: Johannes Berg @ 2012-05-10 16:09 UTC (permalink / raw)
  To: linville; +Cc: linux-wireless, Emmanuel Grumbach

From: Emmanuel Grumbach <emmanuel.grumbach@intel.com>

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Reviewed-by: Wey-Yi W Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
---
 drivers/net/wireless/iwlwifi/iwl-trans-pcie-tx.c |   17 ++++++++---------
 1 file changed, 8 insertions(+), 9 deletions(-)

diff --git a/drivers/net/wireless/iwlwifi/iwl-trans-pcie-tx.c b/drivers/net/wireless/iwlwifi/iwl-trans-pcie-tx.c
index cf8f3cf..e727c4f 100644
--- a/drivers/net/wireless/iwlwifi/iwl-trans-pcie-tx.c
+++ b/drivers/net/wireless/iwlwifi/iwl-trans-pcie-tx.c
@@ -178,8 +178,8 @@ static inline u8 iwl_tfd_get_num_tbs(struct iwl_tfd *tfd)
 	return tfd->num_tbs & 0x1f;
 }
 
-static void iwlagn_unmap_tfd(struct iwl_trans *trans, struct iwl_cmd_meta *meta,
-		     struct iwl_tfd *tfd, enum dma_data_direction dma_dir)
+static void iwl_unmap_tfd(struct iwl_trans *trans, struct iwl_cmd_meta *meta,
+			  struct iwl_tfd *tfd, enum dma_data_direction dma_dir)
 {
 	int i;
 	int num_tbs;
@@ -229,8 +229,8 @@ void iwl_txq_free_tfd(struct iwl_trans *trans, struct iwl_tx_queue *txq,
 	lockdep_assert_held(&txq->lock);
 
 	/* We have only q->n_window txq->entries, but we use q->n_bd tfds */
-	iwlagn_unmap_tfd(trans, &txq->entries[idx].meta,
-			 &tfd_tmp[rd_ptr], dma_dir);
+	iwl_unmap_tfd(trans, &txq->entries[idx].meta, &tfd_tmp[rd_ptr],
+		      dma_dir);
 
 	/* free SKB */
 	if (txq->entries) {
@@ -647,9 +647,9 @@ static int iwl_enqueue_hcmd(struct iwl_trans *trans, struct iwl_host_cmd *cmd)
 					   (void *)cmd->data[i],
 					   cmd->len[i], DMA_BIDIRECTIONAL);
 		if (dma_mapping_error(trans->dev, phys_addr)) {
-			iwlagn_unmap_tfd(trans, out_meta,
-					 &txq->tfds[q->write_ptr],
-					 DMA_BIDIRECTIONAL);
+			iwl_unmap_tfd(trans, out_meta,
+				      &txq->tfds[q->write_ptr],
+				      DMA_BIDIRECTIONAL);
 			idx = -ENOMEM;
 			goto out;
 		}
@@ -784,8 +784,7 @@ void iwl_tx_cmd_complete(struct iwl_trans *trans, struct iwl_rx_cmd_buffer *rxb,
 	cmd = txq->entries[cmd_index].cmd;
 	meta = &txq->entries[cmd_index].meta;
 
-	iwlagn_unmap_tfd(trans, meta, &txq->tfds[index],
-			 DMA_BIDIRECTIONAL);
+	iwl_unmap_tfd(trans, meta, &txq->tfds[index], DMA_BIDIRECTIONAL);
 
 	/* Input error checking is done when commands are added to queue. */
 	if (meta->flags & CMD_WANT_SKB) {
-- 
1.7.10


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 3/3] iwlwifi: Move IWL_MASK macro to transport.
  2012-05-10 16:09 [PATCH 0/3] iwlwifi updates Johannes Berg
  2012-05-10 16:09 ` [PATCH 1/3] iwlwifi: s/iwlagn_txq_free_tfd/iwl_txq_free_tfd Johannes Berg
  2012-05-10 16:09 ` [PATCH 2/3] iwlwifi: s/iwlagn_unmap_tfd/iwl_unmap_tfd Johannes Berg
@ 2012-05-10 16:09 ` Johannes Berg
  2012-05-16 17:06 ` [PATCH 0/3] iwlwifi updates John W. Linville
  3 siblings, 0 replies; 5+ messages in thread
From: Johannes Berg @ 2012-05-10 16:09 UTC (permalink / raw)
  To: linville; +Cc: linux-wireless, Gregory Greenman

From: Gregory Greenman <gregory.greenman@intel.com>

This macro is needed by other transports besides PCIe, thus
moving to a common location.

Signed-off-by: Gregory Greenman <gregory.greenman@intel.com>
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Reviewed-by: Wey-Yi W Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
---
 drivers/net/wireless/iwlwifi/iwl-trans-pcie.c |    2 --
 drivers/net/wireless/iwlwifi/iwl-trans.h      |    2 ++
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/wireless/iwlwifi/iwl-trans-pcie.c b/drivers/net/wireless/iwlwifi/iwl-trans-pcie.c
index 2f8c84e..14aa504 100644
--- a/drivers/net/wireless/iwlwifi/iwl-trans-pcie.c
+++ b/drivers/net/wireless/iwlwifi/iwl-trans-pcie.c
@@ -78,8 +78,6 @@
 /* FIXME: need to abstract out TX command (once we know what it looks like) */
 #include "iwl-commands.h"
 
-#define IWL_MASK(lo, hi) ((1 << (hi)) | ((1 << (hi)) - (1 << (lo))))
-
 #define SCD_QUEUECHAIN_SEL_ALL(trans, trans_pcie)	\
 	(((1<<trans->cfg->base_params->num_of_queues) - 1) &\
 	(~(1<<(trans_pcie)->cmd_queue)))
diff --git a/drivers/net/wireless/iwlwifi/iwl-trans.h b/drivers/net/wireless/iwlwifi/iwl-trans.h
index 79a1e7a..78b89f1 100644
--- a/drivers/net/wireless/iwlwifi/iwl-trans.h
+++ b/drivers/net/wireless/iwlwifi/iwl-trans.h
@@ -280,6 +280,8 @@ static inline struct page *rxb_steal_page(struct iwl_rx_cmd_buffer *r)
 
 #define MAX_NO_RECLAIM_CMDS	6
 
+#define IWL_MASK(lo, hi) ((1 << (hi)) | ((1 << (hi)) - (1 << (lo))))
+
 /*
  * Maximum number of HW queues the transport layer
  * currently supports
-- 
1.7.10


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH 0/3] iwlwifi updates
  2012-05-10 16:09 [PATCH 0/3] iwlwifi updates Johannes Berg
                   ` (2 preceding siblings ...)
  2012-05-10 16:09 ` [PATCH 3/3] iwlwifi: Move IWL_MASK macro to transport Johannes Berg
@ 2012-05-16 17:06 ` John W. Linville
  3 siblings, 0 replies; 5+ messages in thread
From: John W. Linville @ 2012-05-16 17:06 UTC (permalink / raw)
  To: Johannes Berg; +Cc: linux-wireless

On Thu, May 10, 2012 at 06:09:05PM +0200, Johannes Berg wrote:
> John,
> 
> Here are a few more iwlwifi updates. We rename some functions to
> get rid of the "agn" in them which we're using to indicate that
> the function belongs to the current firmware API, and move a
> macro that we'll need in a few more places.
> 
> johannes

I had trouble with this batch as well...

-- 
John W. Linville		Someday the world will need a hero, and you
linville@tuxdriver.com			might be all we have.  Be ready.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2012-05-16 17:17 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-10 16:09 [PATCH 0/3] iwlwifi updates Johannes Berg
2012-05-10 16:09 ` [PATCH 1/3] iwlwifi: s/iwlagn_txq_free_tfd/iwl_txq_free_tfd Johannes Berg
2012-05-10 16:09 ` [PATCH 2/3] iwlwifi: s/iwlagn_unmap_tfd/iwl_unmap_tfd Johannes Berg
2012-05-10 16:09 ` [PATCH 3/3] iwlwifi: Move IWL_MASK macro to transport Johannes Berg
2012-05-16 17:06 ` [PATCH 0/3] iwlwifi updates John W. Linville

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).