aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/b43legacy/xmit.c
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2008-10-14 20:31:54 -0400
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2008-10-14 20:31:54 -0400
commit6dc6472581f693b5fc95aebedf67b4960fb85cf0 (patch)
tree06a5a9a08519950575505273eabced331ed51405 /drivers/net/wireless/b43legacy/xmit.c
parentee673eaa72d8d185012b1027a05e25aba18c267f (diff)
parent8acd3a60bcca17c6d89c73cee3ad6057eb83ba1e (diff)
Merge commit 'origin'
Manual fixup of conflicts on: arch/powerpc/include/asm/dcr-regs.h drivers/net/ibm_newemac/core.h
Diffstat (limited to 'drivers/net/wireless/b43legacy/xmit.c')
-rw-r--r--drivers/net/wireless/b43legacy/xmit.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/drivers/net/wireless/b43legacy/xmit.c b/drivers/net/wireless/b43legacy/xmit.c
index 68e1f8c78727..65e833781608 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
@@ -212,7 +210,7 @@ static int generate_txhdr_fw3(struct b43legacy_wldev *dev,
212 210
213 rate = tx_rate->hw_value; 211 rate = tx_rate->hw_value;
214 rate_ofdm = b43legacy_is_ofdm_rate(rate); 212 rate_ofdm = b43legacy_is_ofdm_rate(rate);
215 rate_fb = ieee80211_get_alt_retry_rate(dev->wl->hw, info) ? : tx_rate; 213 rate_fb = ieee80211_get_alt_retry_rate(dev->wl->hw, info, 0) ? : tx_rate;
216 rate_fb_ofdm = b43legacy_is_ofdm_rate(rate_fb->hw_value); 214 rate_fb_ofdm = b43legacy_is_ofdm_rate(rate_fb->hw_value);
217 215
218 txhdr->mac_frame_ctl = wlhdr->frame_control; 216 txhdr->mac_frame_ctl = wlhdr->frame_control;
@@ -245,7 +243,7 @@ static int generate_txhdr_fw3(struct b43legacy_wldev *dev,
245 243
246 if (key->enabled) { 244 if (key->enabled) {
247 /* Hardware appends ICV. */ 245 /* Hardware appends ICV. */
248 plcp_fragment_len += info->control.icv_len; 246 plcp_fragment_len += info->control.hw_key->icv_len;
249 247
250 key_idx = b43legacy_kidx_to_fw(dev, key_idx); 248 key_idx = b43legacy_kidx_to_fw(dev, key_idx);
251 mac_ctl |= (key_idx << B43legacy_TX4_MAC_KEYIDX_SHIFT) & 249 mac_ctl |= (key_idx << B43legacy_TX4_MAC_KEYIDX_SHIFT) &
@@ -253,8 +251,8 @@ 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.hw_key->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);
260 } else { 258 } else {
@@ -626,7 +624,7 @@ void b43legacy_handle_hwtxstatus(struct b43legacy_wldev *dev,
626 tmp = hw->count; 624 tmp = hw->count;
627 status.frame_count = (tmp >> 4); 625 status.frame_count = (tmp >> 4);
628 status.rts_count = (tmp & 0x0F); 626 status.rts_count = (tmp & 0x0F);
629 tmp = hw->flags; 627 tmp = hw->flags << 1;
630 status.supp_reason = ((tmp & 0x1C) >> 2); 628 status.supp_reason = ((tmp & 0x1C) >> 2);
631 status.pm_indicated = !!(tmp & 0x80); 629 status.pm_indicated = !!(tmp & 0x80);
632 status.intermediate = !!(tmp & 0x40); 630 status.intermediate = !!(tmp & 0x40);