From: Zhu Yi <yi.zhu@intel.com>
To: linville@tuxdriver.com
To: ipwpatch@vger.kernel.org
Cc: linux-wireless@vger.kernel.org, Zhu Yi <yi.zhu@intel.com>,
Tomas Winkler <tomas.winkler@intel.com>
Subject: [PATCH 11/17] iwlwifi: endianity cleanup for QoS host command
Date: Fri, 27 Jul 2007 17:26:35 +0800 [thread overview]
Message-ID: <11855284212390-git-send-email-yi.zhu@intel.com> (raw)
In-Reply-To: <11855284201330-git-send-email-yi.zhu@intel.com>
This patch cleans up endianity issues in QoS host command.
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
---
drivers/net/wireless/iwl-base.c | 54 ++++++++++++++++----------------------
drivers/net/wireless/iwl-hw.h | 12 +++------
2 files changed, 27 insertions(+), 39 deletions(-)
diff --git a/drivers/net/wireless/iwl-base.c b/drivers/net/wireless/iwl-base.c
index 8f9714f..d56360c 100644
--- a/drivers/net/wireless/iwl-base.c
+++ b/drivers/net/wireless/iwl-base.c
@@ -1898,7 +1898,6 @@ static void iwl_reset_qos(struct iwl_priv *priv)
u16 cw_min = 15;
u16 cw_max = 1023;
u8 aifs = 2;
- u16 burst_time = 0;
u8 is_legacy = 0;
unsigned long flags;
int i;
@@ -1923,63 +1922,56 @@ static void iwl_reset_qos(struct iwl_priv *priv)
if (priv->qos_data.qos_active)
aifs = 3;
- priv->qos_data.def_qos_parm.ac[0].cw_min = (__le16)
- cpu_to_le16(cw_min);
- priv->qos_data.def_qos_parm.ac[0].cw_max = (__le16)
- cpu_to_le16(cw_max);
+ priv->qos_data.def_qos_parm.ac[0].cw_min = cpu_to_le16(cw_min);
+ priv->qos_data.def_qos_parm.ac[0].cw_max = cpu_to_le16(cw_max);
priv->qos_data.def_qos_parm.ac[0].aifsn = aifs;
- priv->qos_data.def_qos_parm.ac[0].edca_txop = (__le16)
- cpu_to_le16(burst_time);
+ priv->qos_data.def_qos_parm.ac[0].edca_txop = 0;
priv->qos_data.def_qos_parm.ac[0].reserved1 = 0;
if (priv->qos_data.qos_active) {
i = 1;
- priv->qos_data.def_qos_parm.ac[i].cw_min = (__le16)
- cpu_to_le16(cw_min);
- priv->qos_data.def_qos_parm.ac[i].cw_max = (__le16)
- cpu_to_le16(cw_max);
+ priv->qos_data.def_qos_parm.ac[i].cw_min = cpu_to_le16(cw_min);
+ priv->qos_data.def_qos_parm.ac[i].cw_max = cpu_to_le16(cw_max);
priv->qos_data.def_qos_parm.ac[i].aifsn = 7;
- priv->qos_data.def_qos_parm.ac[i].edca_txop = (__le16)
- cpu_to_le16(burst_time);
+ priv->qos_data.def_qos_parm.ac[i].edca_txop = 0;
priv->qos_data.def_qos_parm.ac[i].reserved1 = 0;
i = 2;
- priv->qos_data.def_qos_parm.ac[i].cw_min = (__le16)
+ priv->qos_data.def_qos_parm.ac[i].cw_min =
cpu_to_le16((cw_min + 1) / 2 - 1);
- priv->qos_data.def_qos_parm.ac[i].cw_max = (__le16)
+ priv->qos_data.def_qos_parm.ac[i].cw_max =
cpu_to_le16(cw_max);
priv->qos_data.def_qos_parm.ac[i].aifsn = 2;
if (is_legacy)
- priv->qos_data.def_qos_parm.ac[i].edca_txop = (__le16)
- cpu_to_le16(6016);
+ priv->qos_data.def_qos_parm.ac[i].edca_txop =
+ cpu_to_le16(6016);
else
- priv->qos_data.def_qos_parm.ac[i].edca_txop = (__le16)
- cpu_to_le16(3008);
+ priv->qos_data.def_qos_parm.ac[i].edca_txop =
+ cpu_to_le16(3008);
priv->qos_data.def_qos_parm.ac[i].reserved1 = 0;
i = 3;
- priv->qos_data.def_qos_parm.ac[i].cw_min = (__le16)
+ priv->qos_data.def_qos_parm.ac[i].cw_min =
cpu_to_le16((cw_min + 1) / 4 - 1);
- priv->qos_data.def_qos_parm.ac[i].cw_max = (__le16)
+ priv->qos_data.def_qos_parm.ac[i].cw_max =
cpu_to_le16((cw_max + 1) / 2 - 1);
priv->qos_data.def_qos_parm.ac[i].aifsn = 2;
priv->qos_data.def_qos_parm.ac[i].reserved1 = 0;
if (is_legacy)
- priv->qos_data.def_qos_parm.ac[i].edca_txop = (__le16)
- cpu_to_le16(3264);
+ priv->qos_data.def_qos_parm.ac[i].edca_txop =
+ cpu_to_le16(3264);
else
- priv->qos_data.def_qos_parm.ac[i].edca_txop = (__le16)
- cpu_to_le16(1504);
+ priv->qos_data.def_qos_parm.ac[i].edca_txop =
+ cpu_to_le16(1504);
} else {
for (i = 1; i < 4; i++) {
- priv->qos_data.def_qos_parm.ac[i].cw_min = (__le16)
- cpu_to_le16(cw_min);
- priv->qos_data.def_qos_parm.ac[i].cw_max = (__le16)
- cpu_to_le16(cw_max);
+ priv->qos_data.def_qos_parm.ac[i].cw_min =
+ cpu_to_le16(cw_min);
+ priv->qos_data.def_qos_parm.ac[i].cw_max =
+ cpu_to_le16(cw_max);
priv->qos_data.def_qos_parm.ac[i].aifsn = aifs;
- priv->qos_data.def_qos_parm.ac[i].edca_txop = (__le16)
- cpu_to_le16(burst_time);
+ priv->qos_data.def_qos_parm.ac[i].edca_txop = 0;
priv->qos_data.def_qos_parm.ac[i].reserved1 = 0;
}
}
diff --git a/drivers/net/wireless/iwl-hw.h b/drivers/net/wireless/iwl-hw.h
index 7512fc7..e73cf88 100644
--- a/drivers/net/wireless/iwl-hw.h
+++ b/drivers/net/wireless/iwl-hw.h
@@ -254,19 +254,15 @@ struct iwl_ac_qos {
} __attribute__ ((packed));
/* QoS flags defines */
-#define MH_QOS_TXOP_TYPE_MSK 0x10
-#define QOS_PARAM_FLG_UPDATE_EDCA_MSK 0x1
-#define QOS_PARAM_FLG_TGN_MSK 0x2
-#define QOS_PARAM_FLG_TXOP_TYPE_MSK MH_QOS_TXOP_TYPE_MSK
+#define QOS_PARAM_FLG_UPDATE_EDCA_MSK __constant_cpu_to_le32(0x01)
+#define QOS_PARAM_FLG_TGN_MSK __constant_cpu_to_le32(0x02)
+#define QOS_PARAM_FLG_TXOP_TYPE_MSK __constant_cpu_to_le32(0x10)
/*
* TXFIFO Queue number defines
*/
/* number of Access categories (AC) (EDCA), queues 0..3 */
#define AC_NUM 4
-/* total number of queues */
-#define QUEUE_NUM 7
-/* command queue number */
struct iwl_qosparam_cmd {
__le32 qos_flags;
@@ -893,7 +889,7 @@ struct statistics {
#define CSR_HW_IF_CONFIG_REG_BIT_BOARD_TYPE (0x00000800)
#define CSR_HW_IF_CONFIG_REG_BITS_SILICON_TYPE_A (0x00000000)
#define CSR_HW_IF_CONFIG_REG_BITS_SILICON_TYPE_B (0x00001000)
-#define CSR_HW_IF_CONFIG_REG_BIT_EEPROM_OWN_SEM (0x00200000)
+#define CSR_HW_IF_CONFIG_REG_BIT_EEPROM_OWN_SEM (0x00200000)
#define CSR_UCODE_DRV_GP1_BIT_MAC_SLEEP (0x00000001)
#define CSR_UCODE_SW_BIT_RFKILL (0x00000002)
--
1.5.2
next prev parent reply other threads:[~2007-07-27 9:29 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <11855284012123-git-send-email-yi.zhu@intel.com>
2007-07-27 9:26 ` [PATCH 01/17] iwlwifi: provide frequency to radiotap monitor not channel index Zhu Yi
2007-07-27 9:26 ` [PATCH 02/17] iwlwifi: Calculate and report noise level while associated Zhu Yi
2007-07-27 9:26 ` [PATCH 03/17] iwlwifi: modify station fix Zhu Yi
2007-07-27 9:26 ` [PATCH 04/17] iwlwifi: cleanup tx queue allocation Zhu Yi
2007-07-27 9:26 ` [PATCH 05/17] iwlwifi: rxon filter_flags endianity fix Zhu Yi
2007-07-27 9:26 ` [PATCH 06/17] iwlwifi: rename base.c to iwl-base.c Zhu Yi
2007-07-27 9:26 ` [PATCH 07/17] iwilwifi: removed unused constant Zhu Yi
2007-07-27 9:26 ` [PATCH 08/17] iwlwifi: QoS control endianity fixes Zhu Yi
2007-07-27 9:26 ` [PATCH 09/17] iwlwifi: EEPROM reading fix Zhu Yi
2007-07-27 9:26 ` [PATCH 10/17] iwlwifi: endianity cleaning of iwl_print_rx_config_cmd Zhu Yi
2007-07-27 9:26 ` Zhu Yi [this message]
2007-07-27 9:26 ` [PATCH 12/17] iwlwifi: endianity cleanup for power table host command Zhu Yi
2007-07-27 9:26 ` [PATCH 13/17] iwlwifi: fix 11n on 2.4 channel Zhu Yi
2007-07-27 9:26 ` [PATCH 14/17] iwlwifi: fix channel switch assert Zhu Yi
2007-07-27 9:26 ` [PATCH 15/17] iwlwifi: fix scaing watchdog time out Zhu Yi
2007-07-27 9:26 ` [PATCH 16/17] iwlwifi: Add uCode/driver compatibility version number Zhu Yi
2007-07-27 9:26 ` [PATCH 17/17] iwlwifi: update version stamp to 0.1.5 Zhu Yi
2007-07-27 11:22 ` [PATCH 09/17] iwlwifi: EEPROM reading fix Michael Buesch
2007-07-27 22:24 ` Tomas Winkler
2007-07-27 22:32 ` Michael Buesch
2007-07-27 9:30 ` [PATCH 00/17] iwlwifi driver updated to version 0.1.5 Zhu Yi
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=11855284212390-git-send-email-yi.zhu@intel.com \
--to=yi.zhu@intel.com \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
--cc=tomas.winkler@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).