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, Michael Wu <flamingice@sourmilk.net>,
linux-wireless@vger.kernel.org,
"John W. Linville" <linville@tuxdriver.com>
Subject: [patch 15/16] rtl8187: Fix more frag bit checking, rts duration calc
Date: Wed, 14 Nov 2007 22:41:19 -0800 [thread overview]
Message-ID: <20071115064119.GP18951@kroah.com> (raw)
In-Reply-To: <20071115063921.GA18827@kroah.com>
[-- Attachment #1: rtl8187-fix-more-frag-bit-checking-rts-duration-calc.patch --]
[-- Type: text/plain, Size: 2489 bytes --]
-stable review patch. If anyone has any objections, please let us know.
------------------
From: Michael Wu <flamingice@sourmilk.net>
patch 98798f4875b7149db4eb7d0a126fc6dcd9637821 in mainline.
The wrong pointer is passed to ieee80211_get_morefrag. Fix this.
While we're at it, reorder things so they look better and the rts duration
calculation is done with the right length.
Thanks to Christoph Hellwig for finding the ieee80211_get_morefrag issue.
Signed-off-by: Michael Wu <flamingice@sourmilk.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/net/wireless/rtl8187_dev.c | 31 ++++++++++++++++---------------
1 file changed, 16 insertions(+), 15 deletions(-)
--- a/drivers/net/wireless/rtl8187_dev.c
+++ b/drivers/net/wireless/rtl8187_dev.c
@@ -78,7 +78,8 @@ static int rtl8187_tx(struct ieee80211_h
struct rtl8187_tx_hdr *hdr;
struct rtl8187_tx_info *info;
struct urb *urb;
- u32 tmp;
+ __le16 rts_dur = 0;
+ u32 flags;
urb = usb_alloc_urb(0, GFP_ATOMIC);
if (!urb) {
@@ -86,24 +87,24 @@ static int rtl8187_tx(struct ieee80211_h
return 0;
}
- hdr = (struct rtl8187_tx_hdr *)skb_push(skb, sizeof(*hdr));
- tmp = skb->len - sizeof(*hdr);
- tmp |= RTL8187_TX_FLAG_NO_ENCRYPT;
- tmp |= control->rts_cts_rate << 19;
- tmp |= control->tx_rate << 24;
- if (ieee80211_get_morefrag((struct ieee80211_hdr *)skb))
- tmp |= RTL8187_TX_FLAG_MORE_FRAG;
+ flags = skb->len;
+ flags |= RTL8187_TX_FLAG_NO_ENCRYPT;
+ flags |= control->rts_cts_rate << 19;
+ flags |= control->tx_rate << 24;
+ if (ieee80211_get_morefrag((struct ieee80211_hdr *)skb->data))
+ flags |= RTL8187_TX_FLAG_MORE_FRAG;
if (control->flags & IEEE80211_TXCTL_USE_RTS_CTS) {
- tmp |= RTL8187_TX_FLAG_RTS;
- hdr->rts_duration =
- ieee80211_rts_duration(dev, skb->len, control);
+ flags |= RTL8187_TX_FLAG_RTS;
+ rts_dur = ieee80211_rts_duration(dev, skb->len, control);
}
if (control->flags & IEEE80211_TXCTL_USE_CTS_PROTECT)
- tmp |= RTL8187_TX_FLAG_CTS;
- hdr->flags = cpu_to_le32(tmp);
+ flags |= RTL8187_TX_FLAG_CTS;
+
+ hdr = (struct rtl8187_tx_hdr *)skb_push(skb, sizeof(*hdr));
+ hdr->flags = cpu_to_le32(flags);
hdr->len = 0;
- tmp = control->retry_limit << 8;
- hdr->retry = cpu_to_le32(tmp);
+ hdr->rts_duration = rts_dur;
+ hdr->retry = cpu_to_le32(control->retry_limit << 8);
info = (struct rtl8187_tx_info *)skb->cb;
info->control = kmemdup(control, sizeof(*control), GFP_ATOMIC);
--
next prev parent reply other threads:[~2007-11-15 6:50 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 ` [patch 01/16] libertas: more endianness breakage Greg KH
2007-11-15 6:39 ` [patch 02/16] libertas: fix " 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 ` Greg KH [this message]
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=20071115064119.GP18951@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=flamingice@sourmilk.net \
--cc=jmforbes@linuxtx.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@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=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