b43-dev.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: "Rafał Miłecki" <zajec5@gmail.com>
To: linux-wireless@vger.kernel.org,
	"John W. Linville" <linville@tuxdriver.com>
Cc: b43-dev@lists.infradead.org, "Rafał Miłecki" <zajec5@gmail.com>
Subject: [PATCH 1/3] b43: rename TX header formats
Date: Thu, 11 Aug 2011 15:07:14 +0200	[thread overview]
Message-ID: <1313068036-13608-1-git-send-email-zajec5@gmail.com> (raw)

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>
---
 drivers/net/wireless/b43/xmit.c |   24 ++++++++++++------------
 drivers/net/wireless/b43/xmit.h |    8 ++++----
 2 files changed, 16 insertions(+), 16 deletions(-)

diff --git a/drivers/net/wireless/b43/xmit.c b/drivers/net/wireless/b43/xmit.c
index b74f25e..36c7243 100644
--- a/drivers/net/wireless/b43/xmit.c
+++ b/drivers/net/wireless/b43/xmit.c
@@ -338,10 +338,10 @@ int b43_generate_txhdr(struct b43_wldev *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);
 	} 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);
 	}
 	b43_generate_plcp_hdr((struct b43_plcp_hdr4 *)(&txhdr->plcp_fb),
@@ -433,10 +433,10 @@ int b43_generate_txhdr(struct b43_wldev *dev,
 
 			if (b43_is_old_txhdr_format(dev)) {
 				cts = (struct ieee80211_cts *)
-					(txhdr->old_format.rts_frame);
+					(txhdr->format_351.rts_frame);
 			} else {
 				cts = (struct ieee80211_cts *)
-					(txhdr->new_format.rts_frame);
+					(txhdr->format_410.rts_frame);
 			}
 			ieee80211_ctstoself_get(dev->wl->hw, info->control.vif,
 						fragment_data, fragment_len,
@@ -448,10 +448,10 @@ int b43_generate_txhdr(struct b43_wldev *dev,
 
 			if (b43_is_old_txhdr_format(dev)) {
 				rts = (struct ieee80211_rts *)
-					(txhdr->old_format.rts_frame);
+					(txhdr->format_351.rts_frame);
 			} else {
 				rts = (struct ieee80211_rts *)
-					(txhdr->new_format.rts_frame);
+					(txhdr->format_410.rts_frame);
 			}
 			ieee80211_rts_get(dev->wl->hw, info->control.vif,
 					  fragment_data, fragment_len,
@@ -463,9 +463,9 @@ int b43_generate_txhdr(struct b43_wldev *dev,
 
 		/* Generate the PLCP headers for the RTS/CTS frame */
 		if (b43_is_old_txhdr_format(dev))
-			plcp = &txhdr->old_format.rts_plcp;
+			plcp = &txhdr->format_351.rts_plcp;
 		else
-			plcp = &txhdr->new_format.rts_plcp;
+			plcp = &txhdr->format_410.rts_plcp;
 		b43_generate_plcp_hdr((struct b43_plcp_hdr4 *)plcp,
 				      len, rts_rate);
 		plcp = &txhdr->rts_plcp_fb;
@@ -474,10 +474,10 @@ int b43_generate_txhdr(struct b43_wldev *dev,
 
 		if (b43_is_old_txhdr_format(dev)) {
 			hdr = (struct ieee80211_hdr *)
-				(&txhdr->old_format.rts_frame);
+				(&txhdr->format_351.rts_frame);
 		} else {
 			hdr = (struct ieee80211_hdr *)
-				(&txhdr->new_format.rts_frame);
+				(&txhdr->format_410.rts_frame);
 		}
 		txhdr->rts_dur_fb = hdr->duration_id;
 
@@ -506,9 +506,9 @@ int b43_generate_txhdr(struct b43_wldev *dev,
 
 	/* Magic cookie */
 	if (b43_is_old_txhdr_format(dev))
-		txhdr->old_format.cookie = cpu_to_le16(cookie);
+		txhdr->format_351.cookie = cpu_to_le16(cookie);
 	else
-		txhdr->new_format.cookie = cpu_to_le16(cookie);
+		txhdr->format_410.cookie = cpu_to_le16(cookie);
 
 	if (phy->type == B43_PHYTYPE_N) {
 		txhdr->phy_ctl1 =
diff --git a/drivers/net/wireless/b43/xmit.h b/drivers/net/wireless/b43/xmit.h
index 42debb5..79fc162 100644
--- a/drivers/net/wireless/b43/xmit.h
+++ b/drivers/net/wireless/b43/xmit.h
@@ -46,7 +46,7 @@ struct b43_txhdr {
 	__le32 timeout;			/* Timeout */
 
 	union {
-		/* The new r410 format. */
+		/* Tested with 410.2160, 478.104 and 508.* */
 		struct {
 			__le16 mimo_antenna;		/* MIMO antenna select */
 			__le16 preload_size;		/* Preload size */
@@ -57,9 +57,9 @@ struct b43_txhdr {
 			__u8 rts_frame[16];		/* The RTS frame (if used) */
 			PAD_BYTES(2);
 			struct b43_plcp_hdr6 plcp;	/* Main PLCP header */
-		} new_format __packed;
+		} format_410 __packed;
 
-		/* The old r351 format. */
+		/* Tested with 351.126 */
 		struct {
 			PAD_BYTES(2);
 			__le16 cookie;			/* TX frame cookie */
@@ -68,7 +68,7 @@ struct b43_txhdr {
 			__u8 rts_frame[16];		/* The RTS frame (if used) */
 			PAD_BYTES(2);
 			struct b43_plcp_hdr6 plcp;	/* Main PLCP header */
-		} old_format __packed;
+		} format_351 __packed;
 
 	} __packed;
 } __packed;
-- 
1.7.3.4

             reply	other threads:[~2011-08-11 13:07 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-11 13:07 Rafał Miłecki [this message]
2011-08-11 13:07 ` [PATCH 2/3] b43: use enum for firmware header format Rafał Miłecki
2011-08-11 13:07 ` [PATCH 3/3] b43: support new TX header, noticed to be used by 598.314+ fw Rafał Miłecki
2011-08-11 13:42   ` Larry Finger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1313068036-13608-1-git-send-email-zajec5@gmail.com \
    --to=zajec5@gmail.com \
    --cc=b43-dev@lists.infradead.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).