From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from pentafluge.infradead.org ([213.146.154.40]:45926 "EHLO pentafluge.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1764919AbXKOGWA (ORCPT ); Thu, 15 Nov 2007 01:22:00 -0500 Date: Wed, 14 Nov 2007 22:20:28 -0800 From: Greg KH To: linux-kernel@vger.kernel.org, stable@kernel.org, "John W. Linville" Cc: Justin Forbes , Zwane Mwaikambo , Theodore Ts'o , Randy Dunlap , Dave Jones , Chuck Wolber , Chris Wedgwood , Michael Krufky , Chuck Ebbert , Domenico Andreoli , torvalds@linux-foundation.org, akpm@linux-foundation.org, alan@lxorguk.ukuu.org.uk, linux-wireless , Johannes Berg Subject: [patch 08/23] softmac: fix wext MLME request reason code endianness Message-ID: <20071115062028.GI8282@kroah.com> (sfid-20071115_062210_091563_EA89C8F3) References: <20071115055238.692814352@mini.kroah.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii In-Reply-To: <20071115061806.GA8282@kroah.com> Sender: linux-wireless-owner@vger.kernel.org List-ID: -stable review patch. If anyone has any objections, please let us know. ------------------ From: Johannes Berg 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 Signed-off-by: John W. Linville Signed-off-by: Greg Kroah-Hartman --- 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; --