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 10/34] iwlwifi: Document 4965 rate_n_flags bits
Date: Mon, 3 Dec 2007 13:43:22 +0200 [thread overview]
Message-ID: <1196682230902-git-send-email-tomas.winkler@intel.com> (raw)
In-Reply-To: <11966822302864-git-send-email-tomas.winkler@intel.com>
From: Ben Cahill <ben.m.cahill@intel.com>
Document 4965 rate_n_flags bits
Signed-off-by: Ben Cahill <ben.m.cahill@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
---
drivers/net/wireless/iwlwifi/iwl-4965-commands.h | 98 +++++++++++++++++++---
drivers/net/wireless/iwlwifi/iwl-4965.h | 30 ++-----
2 files changed, 92 insertions(+), 36 deletions(-)
diff --git a/drivers/net/wireless/iwlwifi/iwl-4965-commands.h b/drivers/net/wireless/iwlwifi/iwl-4965-commands.h
index 2703c52..00d4ab7 100644
--- a/drivers/net/wireless/iwlwifi/iwl-4965-commands.h
+++ b/drivers/net/wireless/iwlwifi/iwl-4965-commands.h
@@ -141,7 +141,8 @@ enum {
/******************************************************************************
* (0)
- * Header
+ * Commonly used structures and definitions:
+ * Command header, rate_n_flags
*
*****************************************************************************/
@@ -167,6 +168,89 @@ struct iwl4965_cmd_header {
u8 data[0];
} __attribute__ ((packed));
+/**
+ * 4965 rate_n_flags bit fields
+ *
+ * rate_n_flags format is used in following 4965 commands:
+ * REPLY_4965_RX (response only)
+ * REPLY_TX (both command and response)
+ * REPLY_TX_LINK_QUALITY_CMD
+ *
+ * High-throughput (HT) rate format for bits 7:0 (bit 8 must be "1"):
+ * 2-0: 0) 6 Mbps
+ * 1) 12 Mbps
+ * 2) 18 Mbps
+ * 3) 24 Mbps
+ * 4) 36 Mbps
+ * 5) 48 Mbps
+ * 6) 54 Mbps
+ * 7) 60 Mbps
+ *
+ * 3: 0) Single stream (SISO)
+ * 1) Dual stream (MIMO)
+ *
+ * 5: Value of 0x20 in bits 7:0 indicates 6 Mbps FAT duplicate data
+ *
+ * Legacy OFDM rate format for bits 7:0 (bit 8 must be "0", bit 9 "0"):
+ * 3-0: 0xD) 6 Mbps
+ * 0xF) 9 Mbps
+ * 0x5) 12 Mbps
+ * 0x7) 18 Mbps
+ * 0x9) 24 Mbps
+ * 0xB) 36 Mbps
+ * 0x1) 48 Mbps
+ * 0x3) 54 Mbps
+ *
+ * Legacy CCK rate format for bits 7:0 (bit 8 must be "0", bit 9 "1"):
+ * 3-0: 10) 1 Mbps
+ * 20) 2 Mbps
+ * 55) 5.5 Mbps
+ * 110) 11 Mbps
+ */
+#define RATE_MCS_CODE_MSK 0x7
+#define RATE_MCS_MIMO_POS 3
+#define RATE_MCS_MIMO_MSK 0x8
+#define RATE_MCS_HT_DUP_POS 5
+#define RATE_MCS_HT_DUP_MSK 0x20
+
+/* (1) HT format, (0) legacy format in bits 7:0 */
+#define RATE_MCS_FLAGS_POS 8
+#define RATE_MCS_HT_POS 8
+#define RATE_MCS_HT_MSK 0x100
+
+/* (1) CCK, (0) OFDM. HT (bit 8) must be "0" for this bit to be valid */
+#define RATE_MCS_CCK_POS 9
+#define RATE_MCS_CCK_MSK 0x200
+
+/* (1) Use Green Field preamble */
+#define RATE_MCS_GF_POS 10
+#define RATE_MCS_GF_MSK 0x400
+
+/* (1) Use 40Mhz FAT channel width, (0) use 20 MHz legacy channel width */
+#define RATE_MCS_FAT_POS 11
+#define RATE_MCS_FAT_MSK 0x800
+
+/* (1) Duplicate data on both 20MHz channels. FAT (bit 11) must be set. */
+#define RATE_MCS_DUP_POS 12
+#define RATE_MCS_DUP_MSK 0x1000
+
+/* (1) Short guard interval (0.4 usec), (0) normal GI (0.8 usec) */
+#define RATE_MCS_SGI_POS 13
+#define RATE_MCS_SGI_MSK 0x2000
+
+/**
+ * rate_n_flags Tx antenna masks (4965 has 2 transmitters):
+ * bit14:15 01 B inactive, A active
+ * 10 B active, A inactive
+ * 11 Both active
+ */
+#define RATE_MCS_ANT_A_POS 14
+#define RATE_MCS_ANT_B_POS 15
+#define RATE_MCS_ANT_A_MSK 0x4000
+#define RATE_MCS_ANT_B_MSK 0x8000
+#define RATE_MCS_ANT_AB_MSK 0xc000
+
+
/******************************************************************************
* (0a)
* Alive and Error Commands & Responses:
@@ -452,18 +536,6 @@ struct iwl4965_qosparam_cmd {
#define STA_MODIFY_DELBA_TID_MSK 0x10
#define BUILD_RAxTID(sta_id, tid) (((sta_id) << 4) + (tid))
-/*
- * Antenna masks:
- * bit14:15 01 B inactive, A active
- * 10 B active, A inactive
- * 11 Both active
- */
-#define RATE_MCS_ANT_A_POS 14
-#define RATE_MCS_ANT_B_POS 15
-#define RATE_MCS_ANT_A_MSK 0x4000
-#define RATE_MCS_ANT_B_MSK 0x8000
-#define RATE_MCS_ANT_AB_MSK 0xc000
-
struct iwl4965_keyinfo {
__le16 key_flags;
u8 tkip_rx_tsc_byte2; /* TSC[2] for key mix ph1 detection */
diff --git a/drivers/net/wireless/iwlwifi/iwl-4965.h b/drivers/net/wireless/iwlwifi/iwl-4965.h
index 028c66e..0fb8ee9 100644
--- a/drivers/net/wireless/iwlwifi/iwl-4965.h
+++ b/drivers/net/wireless/iwlwifi/iwl-4965.h
@@ -885,6 +885,11 @@ struct iwl4965_traffic_load {
};
#ifdef CONFIG_IWL4965_HT_AGG
+/**
+ * struct iwl4965_agg_control
+ * @requested_ba: bit map of tids requesting aggregation/block-ack
+ * @granted_ba: bit map of tids granted aggregation/block-ack
+ */
struct iwl4965_agg_control {
unsigned long next_retry;
u32 wait_for_agg_status;
@@ -1056,29 +1061,8 @@ struct iwl4965_chain_noise_data {
u8 radio_write;
};
-/* IWL4965 */
-#define RATE_MCS_CODE_MSK 0x7
-#define RATE_MCS_MIMO_POS 3
-#define RATE_MCS_MIMO_MSK 0x8
-#define RATE_MCS_HT_DUP_POS 5
-#define RATE_MCS_HT_DUP_MSK 0x20
-#define RATE_MCS_FLAGS_POS 8
-#define RATE_MCS_HT_POS 8
-#define RATE_MCS_HT_MSK 0x100
-#define RATE_MCS_CCK_POS 9
-#define RATE_MCS_CCK_MSK 0x200
-#define RATE_MCS_GF_POS 10
-#define RATE_MCS_GF_MSK 0x400
-
-#define RATE_MCS_FAT_POS 11
-#define RATE_MCS_FAT_MSK 0x800
-#define RATE_MCS_DUP_POS 12
-#define RATE_MCS_DUP_MSK 0x1000
-#define RATE_MCS_SGI_POS 13
-#define RATE_MCS_SGI_MSK 0x2000
-
-#define EEPROM_SEM_TIMEOUT 10
-#define EEPROM_SEM_RETRY_LIMIT 1000
+#define EEPROM_SEM_TIMEOUT 10 /* milliseconds */
+#define EEPROM_SEM_RETRY_LIMIT 1000 /* number of attempts (not time) */
#ifdef CONFIG_IWL4965_SPECTRUM_MEASUREMENT
--
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.
next prev parent 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 ` [PATCH 09/34] iwlwifi: Add comments to some driver data structures Tomas Winkler
2007-12-03 11:43 ` Tomas Winkler [this message]
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=1196682230902-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).