Linux wireless drivers development
 help / color / mirror / Atom feed
From: Zhu Yi <yi.zhu@intel.com>
To: linville@tuxdriver.com
Cc: linux-wireless@vger.kernel.org,
	ipw3945-devel@lists.sourceforge.net,
	Abhijeet Kolekar <abhijeet.kolekar@intel.com>,
	Zhu Yi <yi.zhu@intel.com>
Subject: [PATCH 25/43] iwl3945: use iwl_rx_queue in iwl3945
Date: Fri, 19 Dec 2008 10:37:25 +0800	[thread overview]
Message-ID: <1229654263-21454-26-git-send-email-yi.zhu@intel.com> (raw)
In-Reply-To: <1229654263-21454-25-git-send-email-yi.zhu@intel.com>

From: Abhijeet Kolekar <abhijeet.kolekar@intel.com>

The patch replaces iwl3945_rx_queue with iwl_rx_queue.

Signed-off-by: Abhijeet Kolekar <abhijeet.kolekar@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
---
 drivers/net/wireless/iwlwifi/iwl-3945.c     |    4 +-
 drivers/net/wireless/iwlwifi/iwl-3945.h     |   33 ++------------------------
 drivers/net/wireless/iwlwifi/iwl3945-base.c |   16 ++++++------
 3 files changed, 13 insertions(+), 40 deletions(-)

diff --git a/drivers/net/wireless/iwlwifi/iwl-3945.c b/drivers/net/wireless/iwlwifi/iwl-3945.c
index bbba509..0192a88 100644
--- a/drivers/net/wireless/iwlwifi/iwl-3945.c
+++ b/drivers/net/wireless/iwlwifi/iwl-3945.c
@@ -962,7 +962,7 @@ static int iwl3945_nic_set_pwr_src(struct iwl3945_priv *priv, int pwr_max)
 	return rc;
 }
 
-static int iwl3945_rx_init(struct iwl3945_priv *priv, struct iwl3945_rx_queue *rxq)
+static int iwl3945_rx_init(struct iwl3945_priv *priv, struct iwl_rx_queue *rxq)
 {
 	int rc;
 	unsigned long flags;
@@ -1083,7 +1083,7 @@ int iwl3945_hw_nic_init(struct iwl3945_priv *priv)
 	u8 rev_id;
 	int rc;
 	unsigned long flags;
-	struct iwl3945_rx_queue *rxq = &priv->rxq;
+	struct iwl_rx_queue *rxq = &priv->rxq;
 
 	iwl3945_power_init_handle(priv);
 
diff --git a/drivers/net/wireless/iwlwifi/iwl-3945.h b/drivers/net/wireless/iwlwifi/iwl-3945.h
index 410a8bd..c4d56ef 100644
--- a/drivers/net/wireless/iwlwifi/iwl-3945.h
+++ b/drivers/net/wireless/iwlwifi/iwl-3945.h
@@ -213,33 +213,6 @@ struct iwl3945_host_cmd {
 #define SUP_RATE_11B_MAX_NUM_CHANNELS  4
 #define SUP_RATE_11G_MAX_NUM_CHANNELS  12
 
-/**
- * struct iwl3945_rx_queue - Rx queue
- * @processed: Internal index to last handled Rx packet
- * @read: Shared index to newest available Rx buffer
- * @write: Shared index to oldest written Rx packet
- * @free_count: Number of pre-allocated buffers in rx_free
- * @rx_free: list of free SKBs for use
- * @rx_used: List of Rx buffers with no SKB
- * @need_update: flag to indicate we need to update read/write index
- *
- * NOTE:  rx_free and rx_used are used as a FIFO for iwl_rx_mem_buffers
- */
-struct iwl3945_rx_queue {
-	__le32 *bd;
-	dma_addr_t dma_addr;
-	struct iwl_rx_mem_buffer pool[RX_QUEUE_SIZE + RX_FREE_BUFFERS];
-	struct iwl_rx_mem_buffer *queue[RX_QUEUE_SIZE];
-	u32 processed;
-	u32 read;
-	u32 write;
-	u32 free_count;
-	struct list_head rx_free;
-	struct list_head rx_used;
-	int need_update;
-	spinlock_t lock;
-};
-
 #define IWL_SUPPORTED_RATES_IE_LEN         8
 
 #define SCAN_INTERVAL 100
@@ -333,7 +306,7 @@ extern int iwl3945_power_init_handle(struct iwl3945_priv *priv);
 extern int iwl3945_eeprom_init(struct iwl3945_priv *priv);
 extern int iwl3945_rx_queue_alloc(struct iwl3945_priv *priv);
 extern void iwl3945_rx_queue_reset(struct iwl3945_priv *priv,
-			       struct iwl3945_rx_queue *rxq);
+			       struct iwl_rx_queue *rxq);
 extern int iwl3945_calc_db_from_ratio(int sig_ratio);
 extern int iwl3945_calc_sig_qual(int rssi_dbm, int noise_dbm);
 extern int iwl3945_tx_queue_init(struct iwl3945_priv *priv,
@@ -347,7 +320,7 @@ extern int __must_check iwl3945_send_cmd(struct iwl3945_priv *priv,
 extern unsigned int iwl3945_fill_beacon_frame(struct iwl3945_priv *priv,
 					struct ieee80211_hdr *hdr,int left);
 extern int iwl3945_rx_queue_update_write_ptr(struct iwl3945_priv *priv,
-					 struct iwl3945_rx_queue *q);
+					 struct iwl_rx_queue *q);
 extern int iwl3945_send_statistics_request(struct iwl3945_priv *priv);
 extern void iwl3945_set_decrypted_flag(struct iwl3945_priv *priv, struct sk_buff *skb,
 				   u32 decrypt_res,
@@ -564,7 +537,7 @@ struct iwl3945_priv {
 	int activity_timer_active;
 
 	/* Rx and Tx DMA processing queues */
-	struct iwl3945_rx_queue rxq;
+	struct iwl_rx_queue rxq;
 	struct iwl3945_tx_queue txq[IWL39_MAX_NUM_QUEUES];
 
 	unsigned long status;
diff --git a/drivers/net/wireless/iwlwifi/iwl3945-base.c b/drivers/net/wireless/iwlwifi/iwl3945-base.c
index 73587fe..c3ffbec 100644
--- a/drivers/net/wireless/iwlwifi/iwl3945-base.c
+++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c
@@ -3364,7 +3364,7 @@ static void iwl3945_tx_cmd_complete(struct iwl3945_priv *priv,
 /**
  * iwl3945_rx_queue_space - Return number of free slots available in queue.
  */
-static int iwl3945_rx_queue_space(const struct iwl3945_rx_queue *q)
+static int iwl3945_rx_queue_space(const struct iwl_rx_queue *q)
 {
 	int s = q->read - q->write;
 	if (s <= 0)
@@ -3379,7 +3379,7 @@ static int iwl3945_rx_queue_space(const struct iwl3945_rx_queue *q)
 /**
  * iwl3945_rx_queue_update_write_ptr - Update the write pointer for the RX queue
  */
-int iwl3945_rx_queue_update_write_ptr(struct iwl3945_priv *priv, struct iwl3945_rx_queue *q)
+int iwl3945_rx_queue_update_write_ptr(struct iwl3945_priv *priv, struct iwl_rx_queue *q)
 {
 	u32 reg = 0;
 	int rc = 0;
@@ -3444,7 +3444,7 @@ static inline __le32 iwl3945_dma_addr2rbd_ptr(struct iwl3945_priv *priv,
  */
 static int iwl3945_rx_queue_restock(struct iwl3945_priv *priv)
 {
-	struct iwl3945_rx_queue *rxq = &priv->rxq;
+	struct iwl_rx_queue *rxq = &priv->rxq;
 	struct list_head *element;
 	struct iwl_rx_mem_buffer *rxb;
 	unsigned long flags;
@@ -3496,7 +3496,7 @@ static int iwl3945_rx_queue_restock(struct iwl3945_priv *priv)
  */
 static void iwl3945_rx_allocate(struct iwl3945_priv *priv)
 {
-	struct iwl3945_rx_queue *rxq = &priv->rxq;
+	struct iwl_rx_queue *rxq = &priv->rxq;
 	struct list_head *element;
 	struct iwl_rx_mem_buffer *rxb;
 	unsigned long flags;
@@ -3568,7 +3568,7 @@ void iwl3945_rx_replenish(void *data)
  * This free routine walks the list of POOL entries and if SKB is set to
  * non NULL it is unmapped and freed
  */
-static void iwl3945_rx_queue_free(struct iwl3945_priv *priv, struct iwl3945_rx_queue *rxq)
+static void iwl3945_rx_queue_free(struct iwl3945_priv *priv, struct iwl_rx_queue *rxq)
 {
 	int i;
 	for (i = 0; i < RX_QUEUE_SIZE + RX_FREE_BUFFERS; i++) {
@@ -3587,7 +3587,7 @@ static void iwl3945_rx_queue_free(struct iwl3945_priv *priv, struct iwl3945_rx_q
 
 int iwl3945_rx_queue_alloc(struct iwl3945_priv *priv)
 {
-	struct iwl3945_rx_queue *rxq = &priv->rxq;
+	struct iwl_rx_queue *rxq = &priv->rxq;
 	struct pci_dev *dev = priv->pci_dev;
 	int i;
 
@@ -3612,7 +3612,7 @@ int iwl3945_rx_queue_alloc(struct iwl3945_priv *priv)
 	return 0;
 }
 
-void iwl3945_rx_queue_reset(struct iwl3945_priv *priv, struct iwl3945_rx_queue *rxq)
+void iwl3945_rx_queue_reset(struct iwl3945_priv *priv, struct iwl_rx_queue *rxq)
 {
 	unsigned long flags;
 	int i;
@@ -3730,7 +3730,7 @@ static void iwl3945_rx_handle(struct iwl3945_priv *priv)
 {
 	struct iwl_rx_mem_buffer *rxb;
 	struct iwl_rx_packet *pkt;
-	struct iwl3945_rx_queue *rxq = &priv->rxq;
+	struct iwl_rx_queue *rxq = &priv->rxq;
 	u32 r, i;
 	int reclaim;
 	unsigned long flags;
-- 
1.5.3.6


  reply	other threads:[~2008-12-19  2:45 UTC|newest]

Thread overview: 51+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-19  2:37 [PATCH 00/43] iwl3945 merges into iwlagn (Dec 19) Zhu Yi
2008-12-19  2:37 ` [PATCH 01/43] iwlwifi: 3945 extract flow handler definitions into iwl-3945-fh.h Zhu Yi
2008-12-19  2:37   ` [PATCH 02/43] iwlwifi: 3945 unfold iwl-3945-commands.h Zhu Yi
2008-12-19  2:37     ` [PATCH 03/43] iwlwifi: 3945 remove current_rate from station entry Zhu Yi
2008-12-19  2:37       ` [PATCH 04/43] iwlwifi: use iwl-commands.h also in 3945 Zhu Yi
2008-12-19  2:37         ` [PATCH 05/43] iwlwifi: 3945 remove duplicated code from iwl-3945-commands.h Zhu Yi
2008-12-19  2:37           ` [PATCH 06/43] iwlwifi: 3945 drop usage of union tsf Zhu Yi
2008-12-19  2:37             ` [PATCH 07/43] iwlwifi: 3945 remove iwl-3945-commands.h Zhu Yi
2008-12-19  2:37               ` [PATCH 08/43] iwl3945: Getting rid of iwl-3945-debug.h Zhu Yi
2008-12-19  2:37                 ` [PATCH 09/43] iwl3945: Remove DRV_NAME dependenies Zhu Yi
2008-12-19  2:37                   ` [PATCH 10/43] iwl3945: Getting rid of iwl3945_eeprom_channel Zhu Yi
2008-12-19  2:37                     ` [PATCH 11/43] iwl3945: Have consistant and not redefined HW constants Zhu Yi
2008-12-19  2:37                       ` [PATCH 12/43] iwl3945: Use iwl-agn-rs.h rates definitions Zhu Yi
2008-12-19  2:37                         ` [PATCH 13/43] iwl3945: Getting rid of iwl-3945-led.h Zhu Yi
2008-12-19  2:37                           ` [PATCH 14/43] iwl3945: Remove power related definitions from 3945 code Zhu Yi
2008-12-19  2:37                             ` [PATCH 15/43] iwl3945: iwl3945_queue and iwl3945_channel_info replacement Zhu Yi
2008-12-19  2:37                               ` [PATCH 16/43] iwlwifi: emliminate iwl3945_mac_get_stats mac80211 handler Zhu Yi
2008-12-19  2:37                                 ` [PATCH 17/43] iwl3945: Change IWLWIFI_VERSION constant name Zhu Yi
2008-12-19  2:37                                   ` [PATCH 18/43] iwl3945: include iwl-core.h Zhu Yi
2008-12-19  2:37                                     ` [PATCH 19/43] iwl3945: replace iwl_3945_cfg with iwl_cfg Zhu Yi
2008-12-19  2:37                                       ` [PATCH 20/43] iwl3945: move structures from iwl-3945.h to iwl-dev.h Zhu Yi
2008-12-19  2:37                                         ` [PATCH 21/43] iwl3945: remove duplicate structures from iwl-3945.h Zhu Yi
2008-12-19  2:37                                           ` [PATCH 22/43] iwl3945: replace iwl3945_broadcast_addr with iwl_bcast_addr Zhu Yi
2008-12-19  2:37                                             ` [PATCH 23/43] iwlwifi: beautify code Zhu Yi
2008-12-19  2:37                                               ` [PATCH 24/43] iwl3945: use iwl_rx_mem_buffer Zhu Yi
2008-12-19  2:37                                                 ` Zhu Yi [this message]
2008-12-19  2:37                                                   ` [PATCH 26/43] iwl3945: use iwl_hw_params in iwl3945_priv Zhu Yi
2008-12-19  2:37                                                     ` [PATCH 27/43] iwl3945: rename iwl3945_priv variables Zhu Yi
2008-12-19  2:37                                                       ` [PATCH 28/43] iwl3945: replaces iwl3945_priv with iwl_priv Zhu Yi
2008-12-19  2:37                                                         ` [PATCH 29/43] iwl3945: use iwl-io.h and delete iwl-3945-io.h Zhu Yi
2008-12-19  2:37                                                           ` [PATCH 30/43] iwlwifi: add more comments to IWL_DL_xx Zhu Yi
2008-12-19  2:37                                                             ` [PATCH 31/43] iwlwifi: clean up printing Zhu Yi
2008-12-19  2:37                                                               ` [PATCH 32/43] iwlwifi: replace IWL_WARNING with IWL_WARN Zhu Yi
2008-12-19  2:37                                                                 ` [PATCH 33/43] iwlwifi: replace IWL_ERROR with IWL_ERR Zhu Yi
2008-12-19  2:37                                                                   ` [PATCH 34/43] iwlwifi: use iwl_cmd instead of iwl3945_cmd Zhu Yi
2008-12-19  2:37                                                                     ` [PATCH 35/43] iwl3945: use iwl_mod_params for 3945 Zhu Yi
2008-12-19  2:37                                                                       ` [PATCH 36/43] iwl3945: cleanup and remove duplicate code Zhu Yi
2008-12-19  2:37                                                                         ` [PATCH 37/43] iwl3945: add load ucode op Zhu Yi
2008-12-19  2:37                                                                           ` [PATCH 38/43] iwl3945: add apm ops Zhu Yi
2008-12-19  2:37                                                                             ` [PATCH 39/43] iwl3945: add set_pwr_src Zhu Yi
2008-12-19  2:37                                                                               ` [PATCH 40/43] iwl3945: simplify iwl3945_pci_probe Zhu Yi
2008-12-19  2:37                                                                                 ` [PATCH 41/43] iwl3945: release resources before shutting down Zhu Yi
2008-12-19  2:37                                                                                   ` [PATCH 42/43] iwl3945: use iwl_get_hw_mode Zhu Yi
2008-12-19  2:37                                                                                     ` [PATCH 43/43] iwl3945: use iwl_rb_status Zhu Yi
2008-12-19 19:32 ` [PATCH 00/43] iwl3945 merges into iwlagn (Dec 19) drago01
2008-12-19 20:51   ` Luis R. Rodriguez
2008-12-19 21:15     ` drago01
2008-12-19 21:20       ` Stefanik Gábor
2008-12-22  3:55   ` Zhu Yi
2008-12-22  6:57     ` [ipw3945-devel] " Rafał Miłecki
2008-12-19 21:08 ` Maxim Levitsky

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1229654263-21454-26-git-send-email-yi.zhu@intel.com \
    --to=yi.zhu@intel.com \
    --cc=abhijeet.kolekar@intel.com \
    --cc=ipw3945-devel@lists.sourceforge.net \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox