diff options
Diffstat (limited to 'drivers/net/wireless/b43legacy/xmit.c')
-rw-r--r-- | drivers/net/wireless/b43legacy/xmit.c | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/drivers/net/wireless/b43legacy/xmit.c b/drivers/net/wireless/b43legacy/xmit.c index 55dc251bf510..82dc04d59446 100644 --- a/drivers/net/wireless/b43legacy/xmit.c +++ b/drivers/net/wireless/b43legacy/xmit.c | |||
@@ -188,11 +188,11 @@ static int generate_txhdr_fw3(struct b43legacy_wldev *dev, | |||
188 | struct b43legacy_txhdr_fw3 *txhdr, | 188 | struct b43legacy_txhdr_fw3 *txhdr, |
189 | const unsigned char *fragment_data, | 189 | const unsigned char *fragment_data, |
190 | unsigned int fragment_len, | 190 | unsigned int fragment_len, |
191 | const struct ieee80211_tx_control *txctl, | 191 | const struct ieee80211_tx_info *info, |
192 | u16 cookie) | 192 | u16 cookie) |
193 | { | 193 | { |
194 | const struct ieee80211_hdr *wlhdr; | 194 | const struct ieee80211_hdr *wlhdr; |
195 | int use_encryption = (!(txctl->flags & IEEE80211_TXCTL_DO_NOT_ENCRYPT)); | 195 | int use_encryption = (!(info->flags & IEEE80211_TX_CTL_DO_NOT_ENCRYPT)); |
196 | u16 fctl; | 196 | u16 fctl; |
197 | u8 rate; | 197 | u8 rate; |
198 | struct ieee80211_rate *rate_fb; | 198 | struct ieee80211_rate *rate_fb; |
@@ -208,11 +208,11 @@ static int generate_txhdr_fw3(struct b43legacy_wldev *dev, | |||
208 | 208 | ||
209 | memset(txhdr, 0, sizeof(*txhdr)); | 209 | memset(txhdr, 0, sizeof(*txhdr)); |
210 | 210 | ||
211 | tx_rate = ieee80211_get_tx_rate(dev->wl->hw, txctl); | 211 | tx_rate = ieee80211_get_tx_rate(dev->wl->hw, info); |
212 | 212 | ||
213 | rate = tx_rate->hw_value; | 213 | rate = tx_rate->hw_value; |
214 | rate_ofdm = b43legacy_is_ofdm_rate(rate); | 214 | rate_ofdm = b43legacy_is_ofdm_rate(rate); |
215 | rate_fb = ieee80211_get_alt_retry_rate(dev->wl->hw, txctl) ? : tx_rate; | 215 | rate_fb = ieee80211_get_alt_retry_rate(dev->wl->hw, info) ? : tx_rate; |
216 | rate_fb_ofdm = b43legacy_is_ofdm_rate(rate_fb->hw_value); | 216 | rate_fb_ofdm = b43legacy_is_ofdm_rate(rate_fb->hw_value); |
217 | 217 | ||
218 | txhdr->mac_frame_ctl = wlhdr->frame_control; | 218 | txhdr->mac_frame_ctl = wlhdr->frame_control; |
@@ -228,14 +228,14 @@ static int generate_txhdr_fw3(struct b43legacy_wldev *dev, | |||
228 | txhdr->dur_fb = wlhdr->duration_id; | 228 | txhdr->dur_fb = wlhdr->duration_id; |
229 | } else { | 229 | } else { |
230 | txhdr->dur_fb = ieee80211_generic_frame_duration(dev->wl->hw, | 230 | txhdr->dur_fb = ieee80211_generic_frame_duration(dev->wl->hw, |
231 | txctl->vif, | 231 | info->control.vif, |
232 | fragment_len, | 232 | fragment_len, |
233 | rate_fb); | 233 | rate_fb); |
234 | } | 234 | } |
235 | 235 | ||
236 | plcp_fragment_len = fragment_len + FCS_LEN; | 236 | plcp_fragment_len = fragment_len + FCS_LEN; |
237 | if (use_encryption) { | 237 | if (use_encryption) { |
238 | u8 key_idx = txctl->hw_key->hw_key_idx; | 238 | u8 key_idx = info->control.hw_key->hw_key_idx; |
239 | struct b43legacy_key *key; | 239 | struct b43legacy_key *key; |
240 | int wlhdr_len; | 240 | int wlhdr_len; |
241 | size_t iv_len; | 241 | size_t iv_len; |
@@ -245,7 +245,7 @@ static int generate_txhdr_fw3(struct b43legacy_wldev *dev, | |||
245 | 245 | ||
246 | if (key->enabled) { | 246 | if (key->enabled) { |
247 | /* Hardware appends ICV. */ | 247 | /* Hardware appends ICV. */ |
248 | plcp_fragment_len += txctl->icv_len; | 248 | plcp_fragment_len += info->control.icv_len; |
249 | 249 | ||
250 | key_idx = b43legacy_kidx_to_fw(dev, key_idx); | 250 | key_idx = b43legacy_kidx_to_fw(dev, key_idx); |
251 | mac_ctl |= (key_idx << B43legacy_TX4_MAC_KEYIDX_SHIFT) & | 251 | mac_ctl |= (key_idx << B43legacy_TX4_MAC_KEYIDX_SHIFT) & |
@@ -254,7 +254,7 @@ static int generate_txhdr_fw3(struct b43legacy_wldev *dev, | |||
254 | B43legacy_TX4_MAC_KEYALG_SHIFT) & | 254 | B43legacy_TX4_MAC_KEYALG_SHIFT) & |
255 | B43legacy_TX4_MAC_KEYALG; | 255 | B43legacy_TX4_MAC_KEYALG; |
256 | wlhdr_len = ieee80211_get_hdrlen(fctl); | 256 | wlhdr_len = ieee80211_get_hdrlen(fctl); |
257 | iv_len = min((size_t)txctl->iv_len, | 257 | iv_len = min((size_t)info->control.iv_len, |
258 | ARRAY_SIZE(txhdr->iv)); | 258 | ARRAY_SIZE(txhdr->iv)); |
259 | memcpy(txhdr->iv, ((u8 *)wlhdr) + wlhdr_len, iv_len); | 259 | memcpy(txhdr->iv, ((u8 *)wlhdr) + wlhdr_len, iv_len); |
260 | } else { | 260 | } else { |
@@ -278,7 +278,7 @@ static int generate_txhdr_fw3(struct b43legacy_wldev *dev, | |||
278 | phy_ctl |= B43legacy_TX4_PHY_OFDM; | 278 | phy_ctl |= B43legacy_TX4_PHY_OFDM; |
279 | if (dev->short_preamble) | 279 | if (dev->short_preamble) |
280 | phy_ctl |= B43legacy_TX4_PHY_SHORTPRMBL; | 280 | phy_ctl |= B43legacy_TX4_PHY_SHORTPRMBL; |
281 | switch (txctl->antenna_sel_tx) { | 281 | switch (info->antenna_sel_tx) { |
282 | case 0: | 282 | case 0: |
283 | phy_ctl |= B43legacy_TX4_PHY_ANTLAST; | 283 | phy_ctl |= B43legacy_TX4_PHY_ANTLAST; |
284 | break; | 284 | break; |
@@ -293,21 +293,21 @@ static int generate_txhdr_fw3(struct b43legacy_wldev *dev, | |||
293 | } | 293 | } |
294 | 294 | ||
295 | /* MAC control */ | 295 | /* MAC control */ |
296 | if (!(txctl->flags & IEEE80211_TXCTL_NO_ACK)) | 296 | if (!(info->flags & IEEE80211_TX_CTL_NO_ACK)) |
297 | mac_ctl |= B43legacy_TX4_MAC_ACK; | 297 | mac_ctl |= B43legacy_TX4_MAC_ACK; |
298 | if (!(((fctl & IEEE80211_FCTL_FTYPE) == IEEE80211_FTYPE_CTL) && | 298 | if (!(((fctl & IEEE80211_FCTL_FTYPE) == IEEE80211_FTYPE_CTL) && |
299 | ((fctl & IEEE80211_FCTL_STYPE) == IEEE80211_STYPE_PSPOLL))) | 299 | ((fctl & IEEE80211_FCTL_STYPE) == IEEE80211_STYPE_PSPOLL))) |
300 | mac_ctl |= B43legacy_TX4_MAC_HWSEQ; | 300 | mac_ctl |= B43legacy_TX4_MAC_HWSEQ; |
301 | if (txctl->flags & IEEE80211_TXCTL_FIRST_FRAGMENT) | 301 | if (info->flags & IEEE80211_TX_CTL_FIRST_FRAGMENT) |
302 | mac_ctl |= B43legacy_TX4_MAC_STMSDU; | 302 | mac_ctl |= B43legacy_TX4_MAC_STMSDU; |
303 | if (rate_fb_ofdm) | 303 | if (rate_fb_ofdm) |
304 | mac_ctl |= B43legacy_TX4_MAC_FALLBACKOFDM; | 304 | mac_ctl |= B43legacy_TX4_MAC_FALLBACKOFDM; |
305 | if (txctl->flags & IEEE80211_TXCTL_LONG_RETRY_LIMIT) | 305 | if (info->flags & IEEE80211_TX_CTL_LONG_RETRY_LIMIT) |
306 | mac_ctl |= B43legacy_TX4_MAC_LONGFRAME; | 306 | mac_ctl |= B43legacy_TX4_MAC_LONGFRAME; |
307 | 307 | ||
308 | /* Generate the RTS or CTS-to-self frame */ | 308 | /* Generate the RTS or CTS-to-self frame */ |
309 | if ((txctl->flags & IEEE80211_TXCTL_USE_RTS_CTS) || | 309 | if ((info->flags & IEEE80211_TX_CTL_USE_RTS_CTS) || |
310 | (txctl->flags & IEEE80211_TXCTL_USE_CTS_PROTECT)) { | 310 | (info->flags & IEEE80211_TX_CTL_USE_CTS_PROTECT)) { |
311 | unsigned int len; | 311 | unsigned int len; |
312 | struct ieee80211_hdr *hdr; | 312 | struct ieee80211_hdr *hdr; |
313 | int rts_rate; | 313 | int rts_rate; |
@@ -315,26 +315,26 @@ static int generate_txhdr_fw3(struct b43legacy_wldev *dev, | |||
315 | int rts_rate_ofdm; | 315 | int rts_rate_ofdm; |
316 | int rts_rate_fb_ofdm; | 316 | int rts_rate_fb_ofdm; |
317 | 317 | ||
318 | rts_rate = ieee80211_get_rts_cts_rate(dev->wl->hw, txctl)->hw_value; | 318 | rts_rate = ieee80211_get_rts_cts_rate(dev->wl->hw, info)->hw_value; |
319 | rts_rate_ofdm = b43legacy_is_ofdm_rate(rts_rate); | 319 | rts_rate_ofdm = b43legacy_is_ofdm_rate(rts_rate); |
320 | rts_rate_fb = b43legacy_calc_fallback_rate(rts_rate); | 320 | rts_rate_fb = b43legacy_calc_fallback_rate(rts_rate); |
321 | rts_rate_fb_ofdm = b43legacy_is_ofdm_rate(rts_rate_fb); | 321 | rts_rate_fb_ofdm = b43legacy_is_ofdm_rate(rts_rate_fb); |
322 | if (rts_rate_fb_ofdm) | 322 | if (rts_rate_fb_ofdm) |
323 | mac_ctl |= B43legacy_TX4_MAC_CTSFALLBACKOFDM; | 323 | mac_ctl |= B43legacy_TX4_MAC_CTSFALLBACKOFDM; |
324 | 324 | ||
325 | if (txctl->flags & IEEE80211_TXCTL_USE_CTS_PROTECT) { | 325 | if (info->flags & IEEE80211_TX_CTL_USE_CTS_PROTECT) { |
326 | ieee80211_ctstoself_get(dev->wl->hw, | 326 | ieee80211_ctstoself_get(dev->wl->hw, |
327 | txctl->vif, | 327 | info->control.vif, |
328 | fragment_data, | 328 | fragment_data, |
329 | fragment_len, txctl, | 329 | fragment_len, info, |
330 | (struct ieee80211_cts *) | 330 | (struct ieee80211_cts *) |
331 | (txhdr->rts_frame)); | 331 | (txhdr->rts_frame)); |
332 | mac_ctl |= B43legacy_TX4_MAC_SENDCTS; | 332 | mac_ctl |= B43legacy_TX4_MAC_SENDCTS; |
333 | len = sizeof(struct ieee80211_cts); | 333 | len = sizeof(struct ieee80211_cts); |
334 | } else { | 334 | } else { |
335 | ieee80211_rts_get(dev->wl->hw, | 335 | ieee80211_rts_get(dev->wl->hw, |
336 | txctl->vif, | 336 | info->control.vif, |
337 | fragment_data, fragment_len, txctl, | 337 | fragment_data, fragment_len, info, |
338 | (struct ieee80211_rts *) | 338 | (struct ieee80211_rts *) |
339 | (txhdr->rts_frame)); | 339 | (txhdr->rts_frame)); |
340 | mac_ctl |= B43legacy_TX4_MAC_SENDRTS; | 340 | mac_ctl |= B43legacy_TX4_MAC_SENDRTS; |
@@ -365,12 +365,12 @@ int b43legacy_generate_txhdr(struct b43legacy_wldev *dev, | |||
365 | u8 *txhdr, | 365 | u8 *txhdr, |
366 | const unsigned char *fragment_data, | 366 | const unsigned char *fragment_data, |
367 | unsigned int fragment_len, | 367 | unsigned int fragment_len, |
368 | const struct ieee80211_tx_control *txctl, | 368 | const struct ieee80211_tx_info *info, |
369 | u16 cookie) | 369 | u16 cookie) |
370 | { | 370 | { |
371 | return generate_txhdr_fw3(dev, (struct b43legacy_txhdr_fw3 *)txhdr, | 371 | return generate_txhdr_fw3(dev, (struct b43legacy_txhdr_fw3 *)txhdr, |
372 | fragment_data, fragment_len, | 372 | fragment_data, fragment_len, |
373 | txctl, cookie); | 373 | info, cookie); |
374 | } | 374 | } |
375 | 375 | ||
376 | static s8 b43legacy_rssi_postprocess(struct b43legacy_wldev *dev, | 376 | static s8 b43legacy_rssi_postprocess(struct b43legacy_wldev *dev, |