linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tomas Winkler <tomas.winkler@intel.com>
To: linville@tuxdriver.com, yi.zhu@intel.com, johannes@sipsolutions.net
Cc: linux-wireless@vger.kernel.org, Ben Cahill <ben.m.cahill@intel.com>
Subject: [PATCH 09/34] iwlwifi: Add comments to some driver data structures
Date: Mon,  3 Dec 2007 13:43:21 +0200	[thread overview]
Message-ID: <11966822302864-git-send-email-tomas.winkler@intel.com> (raw)
In-Reply-To: <11966822301152-git-send-email-tomas.winkler@intel.com>

From: Ben Cahill <ben.m.cahill@intel.com>

Add comments to some driver data structures

Remove unused "sched_retry" member from struct iwl3945_tx_queue

Signed-off-by: Ben Cahill <ben.m.cahill@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
---
 drivers/net/wireless/iwlwifi/iwl-3945.h |   35 ++++++++++++++++++--
 drivers/net/wireless/iwlwifi/iwl-4965.h |   53 ++++++++++++++++++++++++++++---
 2 files changed, 79 insertions(+), 9 deletions(-)

diff --git a/drivers/net/wireless/iwlwifi/iwl-3945.h b/drivers/net/wireless/iwlwifi/iwl-3945.h
index 38802ff..cb565a9 100644
--- a/drivers/net/wireless/iwlwifi/iwl-3945.h
+++ b/drivers/net/wireless/iwlwifi/iwl-3945.h
@@ -131,6 +131,7 @@ struct iwl3945_queue {
 
 #define MAX_NUM_OF_TBS          (20)
 
+/* One for each TFD */
 struct iwl3945_tx_info {
 	struct ieee80211_tx_status status;
 	struct sk_buff *skb[MAX_NUM_OF_TBS];
@@ -138,10 +139,15 @@ struct iwl3945_tx_info {
 
 /**
  * struct iwl3945_tx_queue - Tx Queue for DMA
- * @need_update: need to update read/write index
- * @shed_retry: queue is HT AGG enabled
+ * @q: generic Rx/Tx queue descriptor
+ * @bd: base of circular buffer of TFDs
+ * @cmd: array of command/Tx buffers
+ * @dma_addr_cmd: physical address of cmd/tx buffer array
+ * @txb: array of per-TFD driver data
+ * @need_update: indicates need to update read/write index
  *
- * Queue consists of circular buffer of BD's and required locking structures.
+ * A Tx queue consists of circular buffer of BDs (a.k.a. TFDs, transmit frame
+ * descriptors) and required locking structures.
  */
 struct iwl3945_tx_queue {
 	struct iwl3945_queue q;
@@ -150,7 +156,6 @@ struct iwl3945_tx_queue {
 	dma_addr_t dma_addr_cmd;
 	struct iwl3945_tx_info *txb;
 	int need_update;
-	int sched_retry;
 	int active;
 };
 
@@ -326,6 +331,13 @@ struct iwl3945_cmd_meta {
 
 } __attribute__ ((packed));
 
+/**
+ * struct iwl3945_cmd
+ *
+ * For allocation of the command and tx queues, this establishes the overall
+ * size of the largest command we send to uCode, except for a scan command
+ * (which is relatively huge; space is allocated separately).
+ */
 struct iwl3945_cmd {
 	struct iwl3945_cmd_meta meta;
 	struct iwl3945_cmd_header hdr;
@@ -523,6 +535,19 @@ struct iwl3945_ibss_seq {
 	struct list_head list;
 };
 
+/**
+ * struct iwl4965_driver_hw_info
+ * @max_txq_num: Max # Tx queues supported
+ * @ac_queue_count: # Tx queues for EDCA Access Categories (AC)
+ * @tx_cmd_len: Size of Tx command (but not including frame itself)
+ * @max_rxq_size: Max # Rx frames in Rx queue (must be power-of-2)
+ * @rx_buffer_size:
+ * @max_rxq_log: Log-base-2 of max_rxq_size
+ * @max_stations:
+ * @bcast_sta_id:
+ * @shared_virt: Pointer to driver/uCode shared Tx Byte Counts and Rx status
+ * @shared_phys: Physical Pointer to Tx Byte Counts and Rx status
+ */
 struct iwl3945_driver_hw_info {
 	u16 max_txq_num;
 	u16 ac_queue_count;
@@ -860,6 +885,8 @@ struct iwl3945_priv {
 	u16 last_seq_num;
 	u16 last_frag_num;
 	unsigned long last_packet_time;
+
+	/* Hash table for finding stations in IBSS network */
 	struct list_head ibss_mac_hash[IWL_IBSS_MAC_HASH_SIZE];
 
 	/* eeprom */
diff --git a/drivers/net/wireless/iwlwifi/iwl-4965.h b/drivers/net/wireless/iwlwifi/iwl-4965.h
index 9302125..028c66e 100644
--- a/drivers/net/wireless/iwlwifi/iwl-4965.h
+++ b/drivers/net/wireless/iwlwifi/iwl-4965.h
@@ -130,6 +130,7 @@ struct iwl4965_queue {
 
 #define MAX_NUM_OF_TBS          (20)
 
+/* One for each TFD */
 struct iwl4965_tx_info {
 	struct ieee80211_tx_status status;
 	struct sk_buff *skb[MAX_NUM_OF_TBS];
@@ -137,10 +138,16 @@ struct iwl4965_tx_info {
 
 /**
  * struct iwl4965_tx_queue - Tx Queue for DMA
- * @need_update: need to update read/write index
- * @shed_retry: queue is HT AGG enabled
+ * @q: generic Rx/Tx queue descriptor
+ * @bd: base of circular buffer of TFDs
+ * @cmd: array of command/Tx buffers
+ * @dma_addr_cmd: physical address of cmd/tx buffer array
+ * @txb: array of per-TFD driver data
+ * @need_update: indicates need to update read/write index
+ * @sched_retry: indicates queue is high-throughput aggregation (HT AGG) enabled
  *
- * Queue consists of circular buffer of BD's and required locking structures.
+ * A Tx queue consists of circular buffer of BDs (a.k.a. TFDs, transmit frame
+ * descriptors) and required locking structures.
  */
 struct iwl4965_tx_queue {
 	struct iwl4965_queue q;
@@ -333,9 +340,16 @@ struct iwl4965_cmd_meta {
 
 } __attribute__ ((packed));
 
+/**
+ * struct iwl4965_cmd
+ *
+ * For allocation of the command and tx queues, this establishes the overall
+ * size of the largest command we send to uCode, except for a scan command
+ * (which is relatively huge; space is allocated separately).
+ */
 struct iwl4965_cmd {
-	struct iwl4965_cmd_meta meta;
-	struct iwl4965_cmd_header hdr;
+	struct iwl4965_cmd_meta meta;	/* driver data */
+	struct iwl4965_cmd_header hdr;	/* uCode API */
 	union {
 		struct iwl4965_addsta_cmd addsta;
 		struct iwl4965_led_cmd led;
@@ -437,6 +451,20 @@ struct iwl4965_rx_queue {
 
 #ifdef CONFIG_IWL4965_HT
 #ifdef CONFIG_IWL4965_HT_AGG
+/**
+ * struct iwl4965_ht_agg -- aggregation status while waiting for block-ack
+ * @txq_id: Tx queue used for Tx attempt
+ * @frame_count: # frames attempted by Tx command
+ * @wait_for_ba: Expect block-ack before next Tx reply
+ * @start_idx: Index of 1st Transmit Frame Descriptor (TFD) in Tx window
+ * @bitmap0: Low order bitmap, one bit for each frame pending ACK in Tx window
+ * @bitmap1: High order, one bit for each frame pending ACK in Tx window
+ * @rate_n_flags: Rate at which Tx was attempted
+ *
+ * If REPLY_TX indicates that aggregation was attempted, driver must wait
+ * for block ack (REPLY_COMPRESSED_BA).  This struct stores tx reply info
+ * until block ack arrives.
+ */
 struct iwl4965_ht_agg {
 	u16 txq_id;
 	u16 frame_count;
@@ -567,6 +595,19 @@ struct iwl4965_ibss_seq {
 	struct list_head list;
 };
 
+/**
+ * struct iwl4965_driver_hw_info
+ * @max_txq_num: Max # Tx queues supported
+ * @ac_queue_count: # Tx queues for EDCA Access Categories (AC)
+ * @tx_cmd_len: Size of Tx command (but not including frame itself)
+ * @max_rxq_size: Max # Rx frames in Rx queue (must be power-of-2)
+ * @rx_buffer_size:
+ * @max_rxq_log: Log-base-2 of max_rxq_size
+ * @max_stations:
+ * @bcast_sta_id:
+ * @shared_virt: Pointer to driver/uCode shared Tx Byte Counts and Rx status
+ * @shared_phys: Physical Pointer to Tx Byte Counts and Rx status
+ */
 struct iwl4965_driver_hw_info {
 	u16 max_txq_num;
 	u16 ac_queue_count;
@@ -1226,6 +1267,8 @@ struct iwl4965_priv {
 	u16 last_seq_num;
 	u16 last_frag_num;
 	unsigned long last_packet_time;
+
+	/* Hash table for finding stations in IBSS network */
 	struct list_head ibss_mac_hash[IWL_IBSS_MAC_HASH_SIZE];
 
 	/* eeprom */
-- 
1.5.2.2
---------------------------------------------------------------------
Intel Israel (74) Limited

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.

  reply	other threads:[~2007-12-03 11:44 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-12-03 11:43 [PATCH 0/34 V2] iwlwifi (version 1.1.22) Tomas Winkler
2007-12-03 11:43 ` [PATCH 01/34] iwlwifi: Support for uCode without init and bsm section Tomas Winkler
2007-12-03 11:43   ` [PATCH 02/34] iwlwifi: continue namespace changes - fix CONFIG variables Tomas Winkler
2007-12-03 11:43     ` [PATCH 03/34] iwl3945: re-align 3945 event log data Tomas Winkler
2007-12-03 11:43       ` [PATCH 04/34] iwl4965: add comments to rate scaling code Tomas Winkler
2007-12-03 11:43         ` [PATCH 05/34] iwlwifi: add comments to EEPROM stuff Tomas Winkler
2007-12-03 11:43           ` [PATCH 06/34] iwl-4965-hw.h: clean up unused eeprom structures and definitions Tomas Winkler
2007-12-03 11:43             ` [PATCH 07/34] iwlwifi: clean up and clarify some comments after 3945/4965 split Tomas Winkler
2007-12-03 11:43               ` [PATCH 08/34] iwlwifi: Move is_legacy() macro family from iwl-4965-hw.h to iwl-4965-rs.h Tomas Winkler
2007-12-03 11:43                 ` Tomas Winkler [this message]
2007-12-03 11:43                   ` [PATCH 10/34] iwlwifi: Document 4965 rate_n_flags bits Tomas Winkler
2007-12-03 11:43                     ` [PATCH 11/34] iwlwifi: Document Rx calibration Tomas Winkler
2007-12-03 11:43                       ` [PATCH 12/34] iwlwifi: Partially clean-up, add comments to iwl-*-hw.h Tomas Winkler
2007-12-03 11:43                         ` [PATCH 13/34] iwlwifi: clean up some unused definitions in iwl-4965.h and iwl-3945.h Tomas Winkler
2007-12-03 11:43                           ` [PATCH 14/34] iwlwifi: add comments, mostly on Tx queues Tomas Winkler
2007-12-03 11:43                             ` [PATCH 15/34] iwlwifi: add comments to iwl*-base.c Tomas Winkler
2007-12-03 11:43                               ` [PATCH 16/34] iwlwifi: Clean up unused definitions in iwl-3945-hw.h Tomas Winkler
2007-12-03 11:43                                 ` [PATCH 17/34] iwlwifi: clean up unused definitions in iwl-4965-hw.h Tomas Winkler
2007-12-03 11:43                                   ` [PATCH 18/34] iwlwifi: move uCode API definitions to iwl-4965-commands.h Tomas Winkler
2007-12-03 11:43                                     ` [PATCH 19/34] iwlwifi: move HT_IE_EXT_CHANNEL_* driver definitions to iwl-4965.h Tomas Winkler
2007-12-03 11:43                                       ` [PATCH 20/34] iwlwifi: document temperature calculation Tomas Winkler
2007-12-03 11:43                                         ` [PATCH 21/34] iwlwifi: document txpower calculations Tomas Winkler
2007-12-03 11:43                                           ` [PATCH 22/34] iwlwifi: document keep-warm buffer Tomas Winkler
2007-12-03 11:43                                             ` [PATCH 23/34] iwlwifi: document Rx registers Tomas Winkler
2007-12-03 11:43                                               ` [PATCH 24/34] iwlwifi: document shared Tx structures Tomas Winkler
2007-12-03 11:43                                                 ` [PATCH 25/34] iwlwifi: document 4965 Tx scheduler Tomas Winkler
2007-12-03 11:43                                                   ` [PATCH 26/34] iwlwifi: document command header and "alive" responses Tomas Winkler
2007-12-03 11:43                                                     ` [PATCH 27/34] iwlwifi: add comments to RXON command and txpower formats Tomas Winkler
2007-12-03 11:43                                                       ` [PATCH 28/34] iwlwifi: add comments to QOS and ADD_STA commands Tomas Winkler
2007-12-03 11:43                                                         ` [PATCH 29/34] iwlwifi: add comments to Tx commands Tomas Winkler
2007-12-03 11:43                                                           ` [PATCH 30/34] iwlwifi: document 4965 rate scaling Tomas Winkler
2007-12-03 11:43                                                             ` [PATCH 31/34] iwlwifi: enhance WPA authenication stability Tomas Winkler
2007-12-03 11:43                                                               ` [PATCH 32/34] iwlwifi: fix ucode assertion for RX queue overrun Tomas Winkler
2007-12-03 11:43                                                                 ` [PATCH 33/34] iwlwifi: avoid firmware command sending if rfkill is enabled Tomas Winkler
2007-12-03 11:43                                                                   ` [PATCH 34/34] iwlwifi: update version number to 1.2.22 Tomas Winkler

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=11966822302864-git-send-email-tomas.winkler@intel.com \
    --to=tomas.winkler@intel.com \
    --cc=ben.m.cahill@intel.com \
    --cc=johannes@sipsolutions.net \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    --cc=yi.zhu@intel.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;
as well as URLs for NNTP newsgroup(s).