linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] softmac: fix wext MLME request reason code endianness
@ 2007-10-25 20:16 Johannes Berg
  2007-11-14 18:57 ` patch softmac-fix-wext-mlme-request-reason-code-endianness.patch queued to -stable tree gregkh
  0 siblings, 1 reply; 2+ messages in thread
From: Johannes Berg @ 2007-10-25 20:16 UTC (permalink / raw)
  To: John W. Linville; +Cc: linux-wireless, stable

The MLME request reason code is host-endian and our passing
it to the low level functions is host-endian as well since
they do the swapping. I noticed that the reason code 768 was
sent (0x300) rather than 3 when wpa_supplicant terminates.
This removes the superfluous cpu_to_le16() call.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
---
I guess that this bug has been present forever. It's not very critical
but what we're sending is in violation of the IEEE 802.11 specs.

 net/ieee80211/softmac/ieee80211softmac_wx.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- linux-2.6.orig/net/ieee80211/softmac/ieee80211softmac_wx.c	2007-10-25 22:09:03.583252548 +0200
+++ linux-2.6/net/ieee80211/softmac/ieee80211softmac_wx.c	2007-10-25 22:09:09.973254502 +0200
@@ -470,7 +470,7 @@ ieee80211softmac_wx_set_mlme(struct net_
 {
 	struct ieee80211softmac_device *mac = ieee80211_priv(dev);
 	struct iw_mlme *mlme = (struct iw_mlme *)extra;
-	u16 reason = cpu_to_le16(mlme->reason_code);
+	u16 reason = mlme->reason_code;
 	struct ieee80211softmac_network *net;
 	int err = -EINVAL;
 



^ permalink raw reply	[flat|nested] 2+ messages in thread

* patch softmac-fix-wext-mlme-request-reason-code-endianness.patch queued to -stable tree
  2007-10-25 20:16 [PATCH] softmac: fix wext MLME request reason code endianness Johannes Berg
@ 2007-11-14 18:57 ` gregkh
  0 siblings, 0 replies; 2+ messages in thread
From: gregkh @ 2007-11-14 18:57 UTC (permalink / raw)
  To: johannes, gregkh, linux-wireless, linville, stable; +Cc: stable, stable-commits


This is a note to let you know that we have just queued up the patch titled

     Subject: softmac: fix wext MLME request reason code endianness

to the 2.6.23-stable tree.  Its filename is

     softmac-fix-wext-mlme-request-reason-code-endianness.patch

A git repo of this tree can be found at 
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary


>From stable-bounces@linux.kernel.org Fri Oct 26 03:36:47 2007
From: Johannes Berg <johannes@sipsolutions.net>
Date: Thu, 25 Oct 2007 22:16:23 +0200
Subject: softmac: fix wext MLME request reason code endianness
To: "John W. Linville" <linville@tuxdriver.com>
Cc: linux-wireless <linux-wireless@vger.kernel.org>, stable <stable@kernel.org>
Message-ID: <1193343383.4406.30.camel@johannes.berg>

From: Johannes Berg <johannes@sipsolutions.net>

patch 94e10bfb8a7372df3ef2759c9ec2a37de2f24aca in mainline.

The MLME request reason code is host-endian and our passing
it to the low level functions is host-endian as well since
they do the swapping. I noticed that the reason code 768 was
sent (0x300) rather than 3 when wpa_supplicant terminates.
This removes the superfluous cpu_to_le16() call.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 net/ieee80211/softmac/ieee80211softmac_wx.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/net/ieee80211/softmac/ieee80211softmac_wx.c
+++ b/net/ieee80211/softmac/ieee80211softmac_wx.c
@@ -469,7 +469,7 @@ ieee80211softmac_wx_set_mlme(struct net_
 {
 	struct ieee80211softmac_device *mac = ieee80211_priv(dev);
 	struct iw_mlme *mlme = (struct iw_mlme *)extra;
-	u16 reason = cpu_to_le16(mlme->reason_code);
+	u16 reason = mlme->reason_code;
 	struct ieee80211softmac_network *net;
 	int err = -EINVAL;
 


Patches currently in stable-queue which might be from johannes@sipsolutions.net are

queue-2.6.23/mac80211-filter-locally-originated-multicast-frames.patch
queue-2.6.23/softmac-fix-wext-mlme-request-reason-code-endianness.patch

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-11-14 18:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-10-25 20:16 [PATCH] softmac: fix wext MLME request reason code endianness Johannes Berg
2007-11-14 18:57 ` patch softmac-fix-wext-mlme-request-reason-code-endianness.patch queued to -stable tree gregkh

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).