Commit dc738cb6 authored by Rajkumar Manoharan's avatar Rajkumar Manoharan Committed by John W. Linville

ath9k_htc: Fix endian issue in tx header

Signed-off-by: default avatarRajkumar Manoharan <rmanoharan@atheros.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 58c52969
...@@ -78,7 +78,7 @@ struct tx_frame_hdr { ...@@ -78,7 +78,7 @@ struct tx_frame_hdr {
u8 node_idx; u8 node_idx;
u8 vif_idx; u8 vif_idx;
u8 tidno; u8 tidno;
u32 flags; /* ATH9K_HTC_TX_* */ __be32 flags; /* ATH9K_HTC_TX_* */
u8 key_type; u8 key_type;
u8 keyix; u8 keyix;
u8 reserved[26]; u8 reserved[26];
......
...@@ -113,6 +113,7 @@ int ath9k_htc_tx_start(struct ath9k_htc_priv *priv, struct sk_buff *skb) ...@@ -113,6 +113,7 @@ int ath9k_htc_tx_start(struct ath9k_htc_priv *priv, struct sk_buff *skb)
if (ieee80211_is_data(fc)) { if (ieee80211_is_data(fc)) {
struct tx_frame_hdr tx_hdr; struct tx_frame_hdr tx_hdr;
u32 flags = 0;
u8 *qc; u8 *qc;
memset(&tx_hdr, 0, sizeof(struct tx_frame_hdr)); memset(&tx_hdr, 0, sizeof(struct tx_frame_hdr));
...@@ -136,13 +137,14 @@ int ath9k_htc_tx_start(struct ath9k_htc_priv *priv, struct sk_buff *skb) ...@@ -136,13 +137,14 @@ int ath9k_htc_tx_start(struct ath9k_htc_priv *priv, struct sk_buff *skb)
/* Check for RTS protection */ /* Check for RTS protection */
if (priv->hw->wiphy->rts_threshold != (u32) -1) if (priv->hw->wiphy->rts_threshold != (u32) -1)
if (skb->len > priv->hw->wiphy->rts_threshold) if (skb->len > priv->hw->wiphy->rts_threshold)
tx_hdr.flags |= ATH9K_HTC_TX_RTSCTS; flags |= ATH9K_HTC_TX_RTSCTS;
/* CTS-to-self */ /* CTS-to-self */
if (!(tx_hdr.flags & ATH9K_HTC_TX_RTSCTS) && if (!(flags & ATH9K_HTC_TX_RTSCTS) &&
(priv->op_flags & OP_PROTECT_ENABLE)) (priv->op_flags & OP_PROTECT_ENABLE))
tx_hdr.flags |= ATH9K_HTC_TX_CTSONLY; flags |= ATH9K_HTC_TX_CTSONLY;
tx_hdr.flags = cpu_to_be32(flags);
tx_hdr.key_type = ath9k_cmn_get_hw_crypto_keytype(skb); tx_hdr.key_type = ath9k_cmn_get_hw_crypto_keytype(skb);
if (tx_hdr.key_type == ATH9K_KEY_TYPE_CLEAR) if (tx_hdr.key_type == ATH9K_KEY_TYPE_CLEAR)
tx_hdr.keyix = (u8) ATH9K_TXKEYIX_INVALID; tx_hdr.keyix = (u8) ATH9K_TXKEYIX_INVALID;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment