]> err.no Git - linux-2.6/commitdiff
libertas: endianness fixes for get_channel/set_channel
authorDan Williams <dcbw@redhat.com>
Tue, 11 Dec 2007 22:35:51 +0000 (17:35 -0500)
committerDavid S. Miller <davem@davemloft.net>
Mon, 28 Jan 2008 23:06:50 +0000 (15:06 -0800)
Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/libertas/cmd.c

index 32f9f880a15a251fe2deb025eab28b55f463eebd..0f07c2ab9cacd5a0709c44d5fff3cc21734e0a69 100644 (file)
@@ -831,8 +831,8 @@ int lbs_get_channel(struct lbs_private *priv)
        if (ret)
                goto out;
 
-       lbs_deb_cmd("current radio channel is %d\n", cmd.channel);
-       ret = (int) cmd.channel;
+       ret = le16_to_cpu(cmd.channel);
+       lbs_deb_cmd("current radio channel is %d\n", ret);
 
 out:
        lbs_deb_leave_args(LBS_DEB_CMD, "ret %d", ret);
@@ -863,8 +863,9 @@ int lbs_set_channel(struct lbs_private *priv, u8 channel)
        if (ret)
                goto out;
 
-       priv->curbssparams.channel = cmd.channel;
-       lbs_deb_cmd("channel switch from %d to %d\n", old_channel, cmd.channel);
+       priv->curbssparams.channel = (uint8_t) le16_to_cpu(cmd.channel);
+       lbs_deb_cmd("channel switch from %d to %d\n", old_channel,
+               priv->curbssparams.channel);
 
 out:
        lbs_deb_leave_args(LBS_DEB_CMD, "ret %d", ret);