diff options
author | Dan Williams <dcbw@redhat.com> | 2007-12-11 17:35:51 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-01-28 18:06:50 -0500 |
commit | cb182a602802b36ff992afe238e1a3eafc0956b2 (patch) | |
tree | 3db0e5d2fafbbf937dbe0d8b086963f3835f0d2b | |
parent | 2dd4b26264d48f10e802cc9f2d75542be5a3c7fa (diff) |
libertas: endianness fixes for get_channel/set_channel
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>
-rw-r--r-- | 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 32f9f880a15a..0f07c2ab9cac 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) | |||
831 | if (ret) | 831 | if (ret) |
832 | goto out; | 832 | goto out; |
833 | 833 | ||
834 | lbs_deb_cmd("current radio channel is %d\n", cmd.channel); | 834 | ret = le16_to_cpu(cmd.channel); |
835 | ret = (int) cmd.channel; | 835 | lbs_deb_cmd("current radio channel is %d\n", ret); |
836 | 836 | ||
837 | out: | 837 | out: |
838 | lbs_deb_leave_args(LBS_DEB_CMD, "ret %d", ret); | 838 | lbs_deb_leave_args(LBS_DEB_CMD, "ret %d", ret); |
@@ -863,8 +863,9 @@ int lbs_set_channel(struct lbs_private *priv, u8 channel) | |||
863 | if (ret) | 863 | if (ret) |
864 | goto out; | 864 | goto out; |
865 | 865 | ||
866 | priv->curbssparams.channel = cmd.channel; | 866 | priv->curbssparams.channel = (uint8_t) le16_to_cpu(cmd.channel); |
867 | lbs_deb_cmd("channel switch from %d to %d\n", old_channel, cmd.channel); | 867 | lbs_deb_cmd("channel switch from %d to %d\n", old_channel, |
868 | priv->curbssparams.channel); | ||
868 | 869 | ||
869 | out: | 870 | out: |
870 | lbs_deb_leave_args(LBS_DEB_CMD, "ret %d", ret); | 871 | lbs_deb_leave_args(LBS_DEB_CMD, "ret %d", ret); |