Commit 2391b7e8 authored by Rafał Miłecki's avatar Rafał Miłecki Committed by John W. Linville

b43: rename TX header formats

Replace "old" and "new" with number of the first firmware known to use
the given format.
Signed-off-by: default avatarRafał Miłecki <zajec5@gmail.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent e69deded
...@@ -338,10 +338,10 @@ int b43_generate_txhdr(struct b43_wldev *dev, ...@@ -338,10 +338,10 @@ int b43_generate_txhdr(struct b43_wldev *dev,
} }
} }
if (b43_is_old_txhdr_format(dev)) { if (b43_is_old_txhdr_format(dev)) {
b43_generate_plcp_hdr((struct b43_plcp_hdr4 *)(&txhdr->old_format.plcp), b43_generate_plcp_hdr((struct b43_plcp_hdr4 *)(&txhdr->format_351.plcp),
plcp_fragment_len, rate); plcp_fragment_len, rate);
} else { } else {
b43_generate_plcp_hdr((struct b43_plcp_hdr4 *)(&txhdr->new_format.plcp), b43_generate_plcp_hdr((struct b43_plcp_hdr4 *)(&txhdr->format_410.plcp),
plcp_fragment_len, rate); plcp_fragment_len, rate);
} }
b43_generate_plcp_hdr((struct b43_plcp_hdr4 *)(&txhdr->plcp_fb), b43_generate_plcp_hdr((struct b43_plcp_hdr4 *)(&txhdr->plcp_fb),
...@@ -433,10 +433,10 @@ int b43_generate_txhdr(struct b43_wldev *dev, ...@@ -433,10 +433,10 @@ int b43_generate_txhdr(struct b43_wldev *dev,
if (b43_is_old_txhdr_format(dev)) { if (b43_is_old_txhdr_format(dev)) {
cts = (struct ieee80211_cts *) cts = (struct ieee80211_cts *)
(txhdr->old_format.rts_frame); (txhdr->format_351.rts_frame);
} else { } else {
cts = (struct ieee80211_cts *) cts = (struct ieee80211_cts *)
(txhdr->new_format.rts_frame); (txhdr->format_410.rts_frame);
} }
ieee80211_ctstoself_get(dev->wl->hw, info->control.vif, ieee80211_ctstoself_get(dev->wl->hw, info->control.vif,
fragment_data, fragment_len, fragment_data, fragment_len,
...@@ -448,10 +448,10 @@ int b43_generate_txhdr(struct b43_wldev *dev, ...@@ -448,10 +448,10 @@ int b43_generate_txhdr(struct b43_wldev *dev,
if (b43_is_old_txhdr_format(dev)) { if (b43_is_old_txhdr_format(dev)) {
rts = (struct ieee80211_rts *) rts = (struct ieee80211_rts *)
(txhdr->old_format.rts_frame); (txhdr->format_351.rts_frame);
} else { } else {
rts = (struct ieee80211_rts *) rts = (struct ieee80211_rts *)
(txhdr->new_format.rts_frame); (txhdr->format_410.rts_frame);
} }
ieee80211_rts_get(dev->wl->hw, info->control.vif, ieee80211_rts_get(dev->wl->hw, info->control.vif,
fragment_data, fragment_len, fragment_data, fragment_len,
...@@ -463,9 +463,9 @@ int b43_generate_txhdr(struct b43_wldev *dev, ...@@ -463,9 +463,9 @@ int b43_generate_txhdr(struct b43_wldev *dev,
/* Generate the PLCP headers for the RTS/CTS frame */ /* Generate the PLCP headers for the RTS/CTS frame */
if (b43_is_old_txhdr_format(dev)) if (b43_is_old_txhdr_format(dev))
plcp = &txhdr->old_format.rts_plcp; plcp = &txhdr->format_351.rts_plcp;
else else
plcp = &txhdr->new_format.rts_plcp; plcp = &txhdr->format_410.rts_plcp;
b43_generate_plcp_hdr((struct b43_plcp_hdr4 *)plcp, b43_generate_plcp_hdr((struct b43_plcp_hdr4 *)plcp,
len, rts_rate); len, rts_rate);
plcp = &txhdr->rts_plcp_fb; plcp = &txhdr->rts_plcp_fb;
...@@ -474,10 +474,10 @@ int b43_generate_txhdr(struct b43_wldev *dev, ...@@ -474,10 +474,10 @@ int b43_generate_txhdr(struct b43_wldev *dev,
if (b43_is_old_txhdr_format(dev)) { if (b43_is_old_txhdr_format(dev)) {
hdr = (struct ieee80211_hdr *) hdr = (struct ieee80211_hdr *)
(&txhdr->old_format.rts_frame); (&txhdr->format_351.rts_frame);
} else { } else {
hdr = (struct ieee80211_hdr *) hdr = (struct ieee80211_hdr *)
(&txhdr->new_format.rts_frame); (&txhdr->format_410.rts_frame);
} }
txhdr->rts_dur_fb = hdr->duration_id; txhdr->rts_dur_fb = hdr->duration_id;
...@@ -506,9 +506,9 @@ int b43_generate_txhdr(struct b43_wldev *dev, ...@@ -506,9 +506,9 @@ int b43_generate_txhdr(struct b43_wldev *dev,
/* Magic cookie */ /* Magic cookie */
if (b43_is_old_txhdr_format(dev)) if (b43_is_old_txhdr_format(dev))
txhdr->old_format.cookie = cpu_to_le16(cookie); txhdr->format_351.cookie = cpu_to_le16(cookie);
else else
txhdr->new_format.cookie = cpu_to_le16(cookie); txhdr->format_410.cookie = cpu_to_le16(cookie);
if (phy->type == B43_PHYTYPE_N) { if (phy->type == B43_PHYTYPE_N) {
txhdr->phy_ctl1 = txhdr->phy_ctl1 =
......
...@@ -46,7 +46,7 @@ struct b43_txhdr { ...@@ -46,7 +46,7 @@ struct b43_txhdr {
__le32 timeout; /* Timeout */ __le32 timeout; /* Timeout */
union { union {
/* The new r410 format. */ /* Tested with 410.2160, 478.104 and 508.* */
struct { struct {
__le16 mimo_antenna; /* MIMO antenna select */ __le16 mimo_antenna; /* MIMO antenna select */
__le16 preload_size; /* Preload size */ __le16 preload_size; /* Preload size */
...@@ -57,9 +57,9 @@ struct b43_txhdr { ...@@ -57,9 +57,9 @@ struct b43_txhdr {
__u8 rts_frame[16]; /* The RTS frame (if used) */ __u8 rts_frame[16]; /* The RTS frame (if used) */
PAD_BYTES(2); PAD_BYTES(2);
struct b43_plcp_hdr6 plcp; /* Main PLCP header */ struct b43_plcp_hdr6 plcp; /* Main PLCP header */
} new_format __packed; } format_410 __packed;
/* The old r351 format. */ /* Tested with 351.126 */
struct { struct {
PAD_BYTES(2); PAD_BYTES(2);
__le16 cookie; /* TX frame cookie */ __le16 cookie; /* TX frame cookie */
...@@ -68,7 +68,7 @@ struct b43_txhdr { ...@@ -68,7 +68,7 @@ struct b43_txhdr {
__u8 rts_frame[16]; /* The RTS frame (if used) */ __u8 rts_frame[16]; /* The RTS frame (if used) */
PAD_BYTES(2); PAD_BYTES(2);
struct b43_plcp_hdr6 plcp; /* Main PLCP header */ struct b43_plcp_hdr6 plcp; /* Main PLCP header */
} old_format __packed; } format_351 __packed;
} __packed; } __packed;
} __packed; } __packed;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment