Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=cb182a602802b36ff992afe238e1a3eafc0956b2
Commit:     cb182a602802b36ff992afe238e1a3eafc0956b2
Parent:     2dd4b26264d48f10e802cc9f2d75542be5a3c7fa
Author:     Dan Williams <[EMAIL PROTECTED]>
AuthorDate: Tue Dec 11 17:35:51 2007 -0500
Committer:  David S. Miller <[EMAIL PROTECTED]>
CommitDate: Mon Jan 28 15:06:50 2008 -0800

    libertas: endianness fixes for get_channel/set_channel
    
    Signed-off-by: Dan Williams <[EMAIL PROTECTED]>
    Signed-off-by: David Woodhouse <[EMAIL PROTECTED]>
    Signed-off-by: John W. Linville <[EMAIL PROTECTED]>
---
 drivers/net/wireless/libertas/cmd.c |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/drivers/net/wireless/libertas/cmd.c 
b/drivers/net/wireless/libertas/cmd.c
index 32f9f88..0f07c2a 100644
--- a/drivers/net/wireless/libertas/cmd.c
+++ b/drivers/net/wireless/libertas/cmd.c
@@ -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);
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to