diff options
author | Rajkumar Manoharan <rmanoharan@atheros.com> | 2011-01-16 00:26:37 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-01-17 16:09:03 -0500 |
commit | dc738cb6c5d5594de4bdf3b7839a250b032152e7 (patch) | |
tree | dd0e225ab85809163d09a147481a6b63aa7add2c /drivers/net/wireless | |
parent | 58c5296991d233f2e492aa7a884635bba478cf12 (diff) |
ath9k_htc: Fix endian issue in tx header
Signed-off-by: Rajkumar Manoharan <rmanoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r-- | drivers/net/wireless/ath/ath9k/htc.h | 2 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/htc_drv_txrx.c | 8 |
2 files changed, 6 insertions, 4 deletions
diff --git a/drivers/net/wireless/ath/ath9k/htc.h b/drivers/net/wireless/ath/ath9k/htc.h index 1ce506f23110..780ac5eac501 100644 --- a/drivers/net/wireless/ath/ath9k/htc.h +++ b/drivers/net/wireless/ath/ath9k/htc.h | |||
@@ -78,7 +78,7 @@ struct tx_frame_hdr { | |||
78 | u8 node_idx; | 78 | u8 node_idx; |
79 | u8 vif_idx; | 79 | u8 vif_idx; |
80 | u8 tidno; | 80 | u8 tidno; |
81 | u32 flags; /* ATH9K_HTC_TX_* */ | 81 | __be32 flags; /* ATH9K_HTC_TX_* */ |
82 | u8 key_type; | 82 | u8 key_type; |
83 | u8 keyix; | 83 | u8 keyix; |
84 | u8 reserved[26]; | 84 | u8 reserved[26]; |
diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_txrx.c b/drivers/net/wireless/ath/ath9k/htc_drv_txrx.c index 33f36029fa4f..7a5ffca21958 100644 --- a/drivers/net/wireless/ath/ath9k/htc_drv_txrx.c +++ b/drivers/net/wireless/ath/ath9k/htc_drv_txrx.c | |||
@@ -113,6 +113,7 @@ int ath9k_htc_tx_start(struct ath9k_htc_priv *priv, struct sk_buff *skb) | |||
113 | 113 | ||
114 | if (ieee80211_is_data(fc)) { | 114 | if (ieee80211_is_data(fc)) { |
115 | struct tx_frame_hdr tx_hdr; | 115 | struct tx_frame_hdr tx_hdr; |
116 | u32 flags = 0; | ||
116 | u8 *qc; | 117 | u8 *qc; |
117 | 118 | ||
118 | memset(&tx_hdr, 0, sizeof(struct tx_frame_hdr)); | 119 | 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 | /* Check for RTS protection */ | 137 | /* Check for RTS protection */ |
137 | if (priv->hw->wiphy->rts_threshold != (u32) -1) | 138 | if (priv->hw->wiphy->rts_threshold != (u32) -1) |
138 | if (skb->len > priv->hw->wiphy->rts_threshold) | 139 | if (skb->len > priv->hw->wiphy->rts_threshold) |
139 | tx_hdr.flags |= ATH9K_HTC_TX_RTSCTS; | 140 | flags |= ATH9K_HTC_TX_RTSCTS; |
140 | 141 | ||
141 | /* CTS-to-self */ | 142 | /* CTS-to-self */ |
142 | if (!(tx_hdr.flags & ATH9K_HTC_TX_RTSCTS) && | 143 | if (!(flags & ATH9K_HTC_TX_RTSCTS) && |
143 | (priv->op_flags & OP_PROTECT_ENABLE)) | 144 | (priv->op_flags & OP_PROTECT_ENABLE)) |
144 | tx_hdr.flags |= ATH9K_HTC_TX_CTSONLY; | 145 | flags |= ATH9K_HTC_TX_CTSONLY; |
145 | 146 | ||
147 | tx_hdr.flags = cpu_to_be32(flags); | ||
146 | tx_hdr.key_type = ath9k_cmn_get_hw_crypto_keytype(skb); | 148 | tx_hdr.key_type = ath9k_cmn_get_hw_crypto_keytype(skb); |
147 | if (tx_hdr.key_type == ATH9K_KEY_TYPE_CLEAR) | 149 | if (tx_hdr.key_type == ATH9K_KEY_TYPE_CLEAR) |
148 | tx_hdr.keyix = (u8) ATH9K_TXKEYIX_INVALID; | 150 | tx_hdr.keyix = (u8) ATH9K_TXKEYIX_INVALID; |