diff options
Diffstat (limited to 'drivers/net/wireless/wl12xx/wl1251_tx.c')
-rw-r--r-- | drivers/net/wireless/wl12xx/wl1251_tx.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/net/wireless/wl12xx/wl1251_tx.c b/drivers/net/wireless/wl12xx/wl1251_tx.c index c8223185efd2..a38ec199187a 100644 --- a/drivers/net/wireless/wl12xx/wl1251_tx.c +++ b/drivers/net/wireless/wl12xx/wl1251_tx.c | |||
@@ -117,7 +117,7 @@ static void wl1251_tx_frag_block_num(struct tx_double_buffer_desc *tx_hdr) | |||
117 | frag_threshold = IEEE80211_MAX_FRAG_THRESHOLD; | 117 | frag_threshold = IEEE80211_MAX_FRAG_THRESHOLD; |
118 | tx_hdr->frag_threshold = cpu_to_le16(frag_threshold); | 118 | tx_hdr->frag_threshold = cpu_to_le16(frag_threshold); |
119 | 119 | ||
120 | payload_len = tx_hdr->length + MAX_MSDU_SECURITY_LENGTH; | 120 | payload_len = le16_to_cpu(tx_hdr->length) + MAX_MSDU_SECURITY_LENGTH; |
121 | 121 | ||
122 | if (payload_len > frag_threshold) { | 122 | if (payload_len > frag_threshold) { |
123 | mem_blocks_per_frag = | 123 | mem_blocks_per_frag = |
@@ -191,11 +191,13 @@ static int wl1251_tx_send_packet(struct wl1251 *wl, struct sk_buff *skb, | |||
191 | if (control->control.hw_key && | 191 | if (control->control.hw_key && |
192 | control->control.hw_key->alg == ALG_TKIP) { | 192 | control->control.hw_key->alg == ALG_TKIP) { |
193 | int hdrlen; | 193 | int hdrlen; |
194 | u16 fc; | 194 | __le16 fc; |
195 | u16 length; | ||
195 | u8 *pos; | 196 | u8 *pos; |
196 | 197 | ||
197 | fc = *(u16 *)(skb->data + sizeof(*tx_hdr)); | 198 | fc = *(__le16 *)(skb->data + sizeof(*tx_hdr)); |
198 | tx_hdr->length += WL1251_TKIP_IV_SPACE; | 199 | length = le16_to_cpu(tx_hdr->length) + WL1251_TKIP_IV_SPACE; |
200 | tx_hdr->length = cpu_to_le16(length); | ||
199 | 201 | ||
200 | hdrlen = ieee80211_hdrlen(fc); | 202 | hdrlen = ieee80211_hdrlen(fc); |
201 | 203 | ||