]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
softmac: fix wext MLME request reason code endianness
authorJohannes Berg <johannes@sipsolutions.net>
Thu, 25 Oct 2007 20:16:23 +0000 (22:16 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 16 Nov 2007 16:27:37 +0000 (08:27 -0800)
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

index 5742dc803b796af7423f36cf871ce60e74fe62fc..2b0b4c73089d0088ffb970c562f66380360b7f71 100644 (file)
@@ -469,7 +469,7 @@ ieee80211softmac_wx_set_mlme(struct net_device *dev,
 {
        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;