All of lore.kernel.org
 help / color / mirror / Atom feed
From: "John W. Linville" <linville@tuxdriver.com>
To: jeff@garzik.org
Cc: netdev@vger.kernel.org, linux-wireless@vger.kernel.org,
	davem@davemloft.net
Subject: One more patch... -- Re: Please pull 'upstream-jgarzik' branch of wireless-2.6
Date: Tue, 8 Jan 2008 17:42:02 -0500	[thread overview]
Message-ID: <20080108224202.GE3086@tuxdriver.com> (raw)
In-Reply-To: <20080108222305.GD3086@tuxdriver.com>

On Tue, Jan 08, 2008 at 05:23:05PM -0500, John W. Linville wrote:
> Jeff,
>=20
> Another round of patches intended for 2.6.25...the biggest factions a=
re
> rt2x00 and b43 updates, as well as some Viro-isms... :-)
>=20
> Please let me know if there are any problems!
>=20
> John
>=20
> P.S.  Copying Dave in case he is handling these requests...FWIW, it
> will definitely depend on the patches already in netdev-2.6#upstream.=
=2E.

I left out a patch.  I have pushed it on top of the previous request.

Let me know if there are problems!

Thanks,

John

---

The following changes since commit f94de7b013f78ad8bbe1064c108dd55141ef=
b177:
  Miguel Bot=F3n (1):
        iwlwifi: fix compilation warning in 'iwl-4965.c'

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6.g=
it upstream-jgarzik

Michael Buesch (1):
      zd1211rw: fix alignment for QOS and WDS frames

 drivers/net/wireless/zd1211rw/zd_mac.c |   17 ++++++++++++++++-
 1 files changed, 16 insertions(+), 1 deletions(-)

diff --git a/drivers/net/wireless/zd1211rw/zd_mac.c b/drivers/net/wirel=
ess/zd1211rw/zd_mac.c
index 14fb727..7b86930 100644
--- a/drivers/net/wireless/zd1211rw/zd_mac.c
+++ b/drivers/net/wireless/zd1211rw/zd_mac.c
@@ -623,6 +623,8 @@ int zd_mac_rx(struct ieee80211_hw *hw, const u8 *bu=
ffer, unsigned int length)
 	const struct rx_status *status;
 	struct sk_buff *skb;
 	int bad_frame =3D 0;
+	u16 fc;
+	bool is_qos, is_4addr, need_padding;
=20
 	if (length < ZD_PLCP_HEADER_SIZE + 10 /* IEEE80211_1ADDR_LEN */ +
 	             FCS_LEN + sizeof(struct rx_status))
@@ -674,9 +676,22 @@ int zd_mac_rx(struct ieee80211_hw *hw, const u8 *b=
uffer, unsigned int length)
 			&& !mac->pass_ctrl)
 		return 0;
=20
-	skb =3D dev_alloc_skb(length);
+	fc =3D le16_to_cpu(*((__le16 *) buffer));
+
+	is_qos =3D ((fc & IEEE80211_FCTL_FTYPE) =3D=3D IEEE80211_FTYPE_DATA) =
&&
+		 ((fc & IEEE80211_FCTL_STYPE) =3D=3D IEEE80211_STYPE_QOS_DATA);
+	is_4addr =3D (fc & (IEEE80211_FCTL_TODS | IEEE80211_FCTL_FROMDS)) =3D=
=3D
+		   (IEEE80211_FCTL_TODS | IEEE80211_FCTL_FROMDS);
+	need_padding =3D is_qos ^ is_4addr;
+
+	skb =3D dev_alloc_skb(length + (need_padding ? 2 : 0));
 	if (skb =3D=3D NULL)
 		return -ENOMEM;
+	if (need_padding) {
+		/* Make sure the the payload data is 4 byte aligned. */
+		skb_reserve(skb, 2);
+	}
+
 	memcpy(skb_put(skb, length), buffer, length);
=20
 	ieee80211_rx_irqsafe(hw, skb, &stats);
--=20
John W. Linville
linville@tuxdriver.com
-
To unsubscribe from this list: send the line "unsubscribe linux-wireles=
s" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2008-01-08 22:50 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-08 22:23 Please pull 'upstream-jgarzik' branch of wireless-2.6 John W. Linville
2008-01-08 22:42 ` John W. Linville [this message]
2008-01-09  1:49   ` Belay that... -- " John W. Linville

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=20080108224202.GE3086@tuxdriver.com \
    --to=linville@tuxdriver.com \
    --cc=davem@davemloft.net \
    --cc=jeff@garzik.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.