linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Larry Finger <Larry.Finger@lwfinger.net>
To: John Linville <linville@tuxdriver.com>, Chr <chunkeey@web.de>
Cc: wireless <linux-wireless@vger.kernel.org>
Subject: [PATCH] p54: Move rx_mtu to struct bootrec_desc
Date: Thu, 09 Oct 2008 17:38:52 -0700	[thread overview]
Message-ID: <48EEA41C.6020306@lwfinger.net> (raw)

The patch entitled "[PATCH] p54: Fix sparse warnings" added the __le16
variable rx_mtu to struct bootrec, but it could equally well be placed
in the struct bootrec_desc, which overlays the 'data' section of bootrec.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
---

John,

I'm neutral regarding this change, which was suggested by Christian.
I'll leave it up to you whether it gets applied. It is 2.6.28 material.

Larry
---

Index: wireless-testing/drivers/net/wireless/p54/p54common.c
===================================================================
--- wireless-testing.orig/drivers/net/wireless/p54/p54common.c
+++ wireless-testing/drivers/net/wireless/p54/p54common.c
@@ -183,7 +183,7 @@ int p54_parse_firmware(struct ieee80211_
 			priv->headroom = desc->headroom;
 			priv->tailroom = desc->tailroom;
 			if (le32_to_cpu(bootrec->len) == 11)
-				priv->rx_mtu = le16_to_cpu(bootrec->rx_mtu);
+				priv->rx_mtu = le16_to_cpu(desc->rx_mtu);
 			else
 				priv->rx_mtu = (size_t)
 					0x620 - priv->tx_hdr_len;
Index: wireless-testing/drivers/net/wireless/p54/p54common.h
===================================================================
--- wireless-testing.orig/drivers/net/wireless/p54/p54common.h
+++ wireless-testing/drivers/net/wireless/p54/p54common.h
@@ -19,7 +19,6 @@ struct bootrec {
 	__le32 code;
 	__le32 len;
 	u32 data[10];
-	__le16 rx_mtu;
 } __attribute__((packed));

 struct bootrec_exp_if {
@@ -39,6 +38,8 @@ struct bootrec_desc {
 	u8 tailroom;
 	u8 unimportant[6];
 	u8 rates[16];
+	u8 padding2[4];
+	__le16 rx_mtu;
 } __attribute__((packed));

 #define BR_CODE_MIN			0x80000000



                 reply	other threads:[~2008-10-10  0:38 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=48EEA41C.6020306@lwfinger.net \
    --to=larry.finger@lwfinger.net \
    --cc=chunkeey@web.de \
    --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).