Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

b43: rename TX header formats

Replace "old" and "new" with number of the first firmware known to use
the given format.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>

authored by

Rafał Miłecki and committed by
John W. Linville
2391b7e8 e69deded

+16 -16
+12 -12
drivers/net/wireless/b43/xmit.c
··· 338 338 } 339 339 } 340 340 if (b43_is_old_txhdr_format(dev)) { 341 - b43_generate_plcp_hdr((struct b43_plcp_hdr4 *)(&txhdr->old_format.plcp), 341 + b43_generate_plcp_hdr((struct b43_plcp_hdr4 *)(&txhdr->format_351.plcp), 342 342 plcp_fragment_len, rate); 343 343 } else { 344 - b43_generate_plcp_hdr((struct b43_plcp_hdr4 *)(&txhdr->new_format.plcp), 344 + b43_generate_plcp_hdr((struct b43_plcp_hdr4 *)(&txhdr->format_410.plcp), 345 345 plcp_fragment_len, rate); 346 346 } 347 347 b43_generate_plcp_hdr((struct b43_plcp_hdr4 *)(&txhdr->plcp_fb), ··· 433 433 434 434 if (b43_is_old_txhdr_format(dev)) { 435 435 cts = (struct ieee80211_cts *) 436 - (txhdr->old_format.rts_frame); 436 + (txhdr->format_351.rts_frame); 437 437 } else { 438 438 cts = (struct ieee80211_cts *) 439 - (txhdr->new_format.rts_frame); 439 + (txhdr->format_410.rts_frame); 440 440 } 441 441 ieee80211_ctstoself_get(dev->wl->hw, info->control.vif, 442 442 fragment_data, fragment_len, ··· 448 448 449 449 if (b43_is_old_txhdr_format(dev)) { 450 450 rts = (struct ieee80211_rts *) 451 - (txhdr->old_format.rts_frame); 451 + (txhdr->format_351.rts_frame); 452 452 } else { 453 453 rts = (struct ieee80211_rts *) 454 - (txhdr->new_format.rts_frame); 454 + (txhdr->format_410.rts_frame); 455 455 } 456 456 ieee80211_rts_get(dev->wl->hw, info->control.vif, 457 457 fragment_data, fragment_len, ··· 463 463 464 464 /* Generate the PLCP headers for the RTS/CTS frame */ 465 465 if (b43_is_old_txhdr_format(dev)) 466 - plcp = &txhdr->old_format.rts_plcp; 466 + plcp = &txhdr->format_351.rts_plcp; 467 467 else 468 - plcp = &txhdr->new_format.rts_plcp; 468 + plcp = &txhdr->format_410.rts_plcp; 469 469 b43_generate_plcp_hdr((struct b43_plcp_hdr4 *)plcp, 470 470 len, rts_rate); 471 471 plcp = &txhdr->rts_plcp_fb; ··· 474 474 475 475 if (b43_is_old_txhdr_format(dev)) { 476 476 hdr = (struct ieee80211_hdr *) 477 - (&txhdr->old_format.rts_frame); 477 + (&txhdr->format_351.rts_frame); 478 478 } else { 479 479 hdr = (struct ieee80211_hdr *) 480 - (&txhdr->new_format.rts_frame); 480 + (&txhdr->format_410.rts_frame); 481 481 } 482 482 txhdr->rts_dur_fb = hdr->duration_id; 483 483 ··· 506 506 507 507 /* Magic cookie */ 508 508 if (b43_is_old_txhdr_format(dev)) 509 - txhdr->old_format.cookie = cpu_to_le16(cookie); 509 + txhdr->format_351.cookie = cpu_to_le16(cookie); 510 510 else 511 - txhdr->new_format.cookie = cpu_to_le16(cookie); 511 + txhdr->format_410.cookie = cpu_to_le16(cookie); 512 512 513 513 if (phy->type == B43_PHYTYPE_N) { 514 514 txhdr->phy_ctl1 =
+4 -4
drivers/net/wireless/b43/xmit.h
··· 46 46 __le32 timeout; /* Timeout */ 47 47 48 48 union { 49 - /* The new r410 format. */ 49 + /* Tested with 410.2160, 478.104 and 508.* */ 50 50 struct { 51 51 __le16 mimo_antenna; /* MIMO antenna select */ 52 52 __le16 preload_size; /* Preload size */ ··· 57 57 __u8 rts_frame[16]; /* The RTS frame (if used) */ 58 58 PAD_BYTES(2); 59 59 struct b43_plcp_hdr6 plcp; /* Main PLCP header */ 60 - } new_format __packed; 60 + } format_410 __packed; 61 61 62 - /* The old r351 format. */ 62 + /* Tested with 351.126 */ 63 63 struct { 64 64 PAD_BYTES(2); 65 65 __le16 cookie; /* TX frame cookie */ ··· 68 68 __u8 rts_frame[16]; /* The RTS frame (if used) */ 69 69 PAD_BYTES(2); 70 70 struct b43_plcp_hdr6 plcp; /* Main PLCP header */ 71 - } old_format __packed; 71 + } format_351 __packed; 72 72 73 73 } __packed; 74 74 } __packed;