From: Greg KH <gregkh@suse.de>
To: linux-kernel@vger.kernel.org, stable@kernel.org
Cc: Justin Forbes <jmforbes@linuxtx.org>,
Zwane Mwaikambo <zwane@arm.linux.org.uk>,
"Theodore Ts'o" <tytso@mit.edu>,
Randy Dunlap <rdunlap@xenotime.net>,
Dave Jones <davej@redhat.com>,
Chuck Wolber <chuckw@quantumlinux.com>,
Chris Wedgwood <reviews@ml.cw.f00f.org>,
Michael Krufky <mkrufky@linuxtv.org>,
Chuck Ebbert <cebbert@redhat.com>,
Domenico Andreoli <cavokz@gmail.com>,
torvalds@linux-foundation.org, akpm@linux-foundation.org,
alan@lxorguk.ukuu.org.uk, Al Viro <viro@zeniv.linux.org.uk>,
"John W. Linville" <linville@tuxdriver.com>,
Al Viro <viro@ftp.linux.org.uk>, Dan Williams <dcbw@redhat.com>
Subject: [patch 01/16] libertas: more endianness breakage
Date: Wed, 14 Nov 2007 22:39:36 -0800 [thread overview]
Message-ID: <20071115063936.GA18951@kroah.com> (raw)
In-Reply-To: <20071115063921.GA18827@kroah.com>
[-- Attachment #1: libertas-more-endianness-breakage.patch --]
[-- Type: text/plain, Size: 2320 bytes --]
-stable review patch. If anyone has any objections, please let us know.
------------------
From: Al Viro <viro@ftp.linux.org.uk>
based on patch 8362cd413e8116306fafbaf414f0419db0595142 in mainline.
domain->header.len is le16 and has just been assigned
cpu_to_le16(arithmetical expression). And all fields of adapter->logmsg
are __le32; not a single 16-bit among them...
That's incremental to the previous one
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/net/wireless/libertas/11d.c | 2 +-
drivers/net/wireless/libertas/wext.c | 8 ++++----
2 files changed, 5 insertions(+), 5 deletions(-)
--- a/drivers/net/wireless/libertas/11d.c
+++ b/drivers/net/wireless/libertas/11d.c
@@ -562,7 +562,7 @@ int libertas_cmd_802_11d_domain_info(wla
nr_subband * sizeof(struct ieeetypes_subbandset));
cmd->size = cpu_to_le16(sizeof(pdomaininfo->action) +
- domain->header.len +
+ le16_to_cpu(domain->header.len) +
sizeof(struct mrvlietypesheader) +
S_DS_GEN);
} else {
--- a/drivers/net/wireless/libertas/wext.c
+++ b/drivers/net/wireless/libertas/wext.c
@@ -973,7 +973,7 @@ static struct iw_statistics *wlan_get_wi
/* Quality by TX errors */
priv->wstats.discard.retries = priv->stats.tx_errors;
- tx_retries = le16_to_cpu(adapter->logmsg.retry);
+ tx_retries = le32_to_cpu(adapter->logmsg.retry);
if (tx_retries > 75)
tx_qual = (90 - tx_retries) * POOR / 15;
@@ -989,10 +989,10 @@ static struct iw_statistics *wlan_get_wi
(PERFECT - VERY_GOOD) / 50 + VERY_GOOD;
quality = min(quality, tx_qual);
- priv->wstats.discard.code = le16_to_cpu(adapter->logmsg.wepundecryptable);
- priv->wstats.discard.fragment = le16_to_cpu(adapter->logmsg.rxfrag);
+ priv->wstats.discard.code = le32_to_cpu(adapter->logmsg.wepundecryptable);
+ priv->wstats.discard.fragment = le32_to_cpu(adapter->logmsg.rxfrag);
priv->wstats.discard.retries = tx_retries;
- priv->wstats.discard.misc = le16_to_cpu(adapter->logmsg.ackfailure);
+ priv->wstats.discard.misc = le32_to_cpu(adapter->logmsg.ackfailure);
/* Calculate quality */
priv->wstats.qual.qual = max(quality, (u32)100);
--
next prev parent reply other threads:[~2007-11-15 6:43 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20071115060353.071060513@mini.kroah.org>
2007-11-15 6:39 ` [patch 00/16] 2.6.23-stable review, network driver changes Greg KH
2007-11-15 6:39 ` Greg KH [this message]
2007-11-15 6:39 ` [patch 02/16] libertas: fix endianness breakage Greg KH
2007-11-15 6:40 ` [patch 03/16] ehea: 64K page kernel support fix Greg KH
2007-11-15 6:40 ` [patch 04/16] forcedeth msi bugfix Greg KH
2007-11-15 6:40 ` [patch 05/16] forcedeth: add MCP77 device IDs Greg KH
2007-11-15 6:40 ` [patch 06/16] TG3: Fix performance regression on 5705 Greg KH
2007-11-15 6:40 ` [patch 07/16] Fix L2TP oopses Greg KH
2007-11-15 6:40 ` [patch 08/16] skge: fix ram buffer size calculation Greg KH
2007-11-15 16:11 ` Linus Torvalds
2007-11-15 16:27 ` Stephen Hemminger
2007-11-15 16:50 ` Linus Torvalds
2007-11-15 21:57 ` Heikki Orsila
2007-11-15 16:32 ` Greg KH
2007-11-15 16:48 ` Linus Torvalds
2007-11-15 17:57 ` Greg KH
2007-11-16 21:03 ` Heikki Orsila
2007-11-15 6:40 ` [patch 09/16] skge: XM PHY handling fixes Greg KH
2007-11-15 6:40 ` [patch 10/16] sky2: status ring race fix Greg KH
2007-11-15 6:40 ` [patch 11/16] sky2: ethtool register reserved area blackout Greg KH
2007-11-15 6:41 ` [patch 12/16] sky2: fix power settings on Yukon XL Greg KH
2007-11-15 6:41 ` [patch 13/16] zd1201: avoid null ptr access of skb->dev Greg KH
2007-11-15 6:41 ` [patch 14/16] ipw2100: send WEXT scan events Greg KH
2007-11-15 6:41 ` [patch 15/16] rtl8187: Fix more frag bit checking, rts duration calc Greg KH
2007-11-15 6:41 ` [patch 16/16] zd1211rw, fix oops when ejecting install media Greg KH
2007-11-15 12:24 ` [patch 00/16] 2.6.23-stable review, network driver changes Heikki Orsila
2007-11-15 18:34 ` [stable] " Greg KH
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=20071115063936.GA18951@kroah.com \
--to=gregkh@suse.de \
--cc=akpm@linux-foundation.org \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=cavokz@gmail.com \
--cc=cebbert@redhat.com \
--cc=chuckw@quantumlinux.com \
--cc=davej@redhat.com \
--cc=dcbw@redhat.com \
--cc=jmforbes@linuxtx.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linville@tuxdriver.com \
--cc=mkrufky@linuxtv.org \
--cc=rdunlap@xenotime.net \
--cc=reviews@ml.cw.f00f.org \
--cc=stable@kernel.org \
--cc=torvalds@linux-foundation.org \
--cc=tytso@mit.edu \
--cc=viro@ftp.linux.org.uk \
--cc=viro@zeniv.linux.org.uk \
--cc=zwane@arm.linux.org.uk \
/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