aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarvey Harrison <harvey.harrison@gmail.com>2008-07-15 21:43:56 -0400
committerJohn W. Linville <linville@tuxdriver.com>2008-08-22 16:29:51 -0400
commitba5b6efe5d945f7a4c5b656051cc16698afdda24 (patch)
tree59912fd776e116de54c8636ba0a5fe7fc6836107
parentded2ae7c1fbff22516fd55ff0edcf6cd86f76186 (diff)
b43legacy: use le16 frame control directly, avoid byteswapping
Acked-by: Michael Buesch <mb@bu3sch.de> Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r--drivers/net/wireless/b43legacy/xmit.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/net/wireless/b43legacy/xmit.c b/drivers/net/wireless/b43legacy/xmit.c
index 68e1f8c78727..c5ca72aa59e7 100644
--- a/drivers/net/wireless/b43legacy/xmit.c
+++ b/drivers/net/wireless/b43legacy/xmit.c
@@ -193,7 +193,6 @@ static int generate_txhdr_fw3(struct b43legacy_wldev *dev,
193{ 193{
194 const struct ieee80211_hdr *wlhdr; 194 const struct ieee80211_hdr *wlhdr;
195 int use_encryption = !!info->control.hw_key; 195 int use_encryption = !!info->control.hw_key;
196 u16 fctl;
197 u8 rate; 196 u8 rate;
198 struct ieee80211_rate *rate_fb; 197 struct ieee80211_rate *rate_fb;
199 int rate_ofdm; 198 int rate_ofdm;
@@ -204,7 +203,6 @@ static int generate_txhdr_fw3(struct b43legacy_wldev *dev,
204 struct ieee80211_rate *tx_rate; 203 struct ieee80211_rate *tx_rate;
205 204
206 wlhdr = (const struct ieee80211_hdr *)fragment_data; 205 wlhdr = (const struct ieee80211_hdr *)fragment_data;
207 fctl = le16_to_cpu(wlhdr->frame_control);
208 206
209 memset(txhdr, 0, sizeof(*txhdr)); 207 memset(txhdr, 0, sizeof(*txhdr));
210 208
@@ -253,7 +251,7 @@ static int generate_txhdr_fw3(struct b43legacy_wldev *dev,
253 mac_ctl |= (key->algorithm << 251 mac_ctl |= (key->algorithm <<
254 B43legacy_TX4_MAC_KEYALG_SHIFT) & 252 B43legacy_TX4_MAC_KEYALG_SHIFT) &
255 B43legacy_TX4_MAC_KEYALG; 253 B43legacy_TX4_MAC_KEYALG;
256 wlhdr_len = ieee80211_get_hdrlen(fctl); 254 wlhdr_len = ieee80211_hdrlen(wlhdr->frame_control);
257 iv_len = min((size_t)info->control.iv_len, 255 iv_len = min((size_t)info->control.iv_len,
258 ARRAY_SIZE(txhdr->iv)); 256 ARRAY_SIZE(txhdr->iv));
259 memcpy(txhdr->iv, ((u8 *)wlhdr) + wlhdr_len, iv_len); 257 memcpy(txhdr->iv, ((u8 *)wlhdr) + wlhdr_len, iv_len);