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 08/17] iwlwifi: QoS control endianity fixes
Date: Fri, 27 Jul 2007 17:26:32 +0800 [thread overview]
Message-ID: <11855284161716-git-send-email-yi.zhu@intel.com> (raw)
In-Reply-To: <11855284142478-git-send-email-yi.zhu@intel.com>
This patch fixes endianity issues in accessing QoS control field
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
---
drivers/net/wireless/iwl-4965.c | 4 ++--
drivers/net/wireless/iwl-base.c | 4 ++--
drivers/net/wireless/iwl-helpers.h | 2 +-
3 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/net/wireless/iwl-4965.c b/drivers/net/wireless/iwl-4965.c
index 03e3708..5586b4c 100644
--- a/drivers/net/wireless/iwl-4965.c
+++ b/drivers/net/wireless/iwl-4965.c
@@ -3236,7 +3236,7 @@ int iwl4965_tx_cmd(struct iwl_priv *priv, struct iwl_cmd *out_cmd,
int rate_index = min(ctrl->tx_rate & 0xffff, IWL_RATE_COUNT - 1);
#ifdef CONFIG_IWLWIFI_HT
#ifdef CONFIG_IWLWIFI_HT_AGG
- u16 *qc;
+ __le16 *qc;
#endif /*CONFIG_IWLWIFI_HT_AGG */
#endif /* CONFIG_IWLWIFI_HT */
@@ -3308,7 +3308,7 @@ int iwl4965_tx_cmd(struct iwl_priv *priv, struct iwl_cmd *out_cmd,
if (qc &&
(priv->iw_mode != IEEE80211_IF_TYPE_IBSS)) {
u8 tid = 0;
- tid = (u8) (*qc & 0xF);
+ tid = (u8) (le16_to_cpu(*qc) & 0xF);
if (tid < TID_MAX_LOAD_COUNT)
iwl4965_tl_add_packet(priv, tid);
}
diff --git a/drivers/net/wireless/iwl-base.c b/drivers/net/wireless/iwl-base.c
index 95e8ead..1adcdbe 100644
--- a/drivers/net/wireless/iwl-base.c
+++ b/drivers/net/wireless/iwl-base.c
@@ -2650,7 +2650,7 @@ static void iwl_build_tx_cmd_basic(struct iwl_priv *priv,
{
u32 tx_flags;
u16 fc = le16_to_cpu(hdr->frame_control);
- u16 *qc;
+ __le16 *qc;
tx_flags = cmd->cmd.tx.tx_flags;
@@ -2673,7 +2673,7 @@ static void iwl_build_tx_cmd_basic(struct iwl_priv *priv,
qc = ieee80211_get_qos_ctrl(hdr);
if (qc) {
- cmd->cmd.tx.tid_tspec = (u8) (*qc & 0xf);
+ cmd->cmd.tx.tid_tspec = (u8) (le16_to_cpu(*qc) & 0xf);
tx_flags &= ~TX_CMD_FLG_SEQ_CTL_MSK;
} else
tx_flags |= TX_CMD_FLG_SEQ_CTL_MSK;
diff --git a/drivers/net/wireless/iwl-helpers.h b/drivers/net/wireless/iwl-helpers.h
index c9ceff6..94dbb38 100644
--- a/drivers/net/wireless/iwl-helpers.h
+++ b/drivers/net/wireless/iwl-helpers.h
@@ -181,7 +181,7 @@ static inline __le16 *ieee80211_get_qos_ctrl(struct ieee80211_hdr *hdr)
u16 fc = le16_to_cpu(hdr->frame_control);
int hdr_len = ieee80211_get_hdrlen(fc);
if ( (fc & 0x00cc) == (IEEE80211_STYPE_QOS_DATA|IEEE80211_FTYPE_DATA))
- return (u16 *) ((u8 *) hdr + hdr_len - QOS_CONTROL_LEN);
+ return (__le16 *) ((u8 *) hdr + hdr_len - QOS_CONTROL_LEN);
return NULL;
}
--
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 ` Zhu Yi [this message]
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 ` [PATCH 11/17] iwlwifi: endianity cleanup for QoS host command Zhu Yi
2007-07-27 9:26 ` [PATCH 12/17] iwlwifi: endianity cleanup for power table " 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=11855284161716-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).