提交 cb182a60 编写于 作者: D Dan Williams 提交者: David S. Miller

libertas: endianness fixes for get_channel/set_channel

Signed-off-by: NDan Williams <dcbw@redhat.com>
Signed-off-by: NDavid Woodhouse <dwmw2@infradead.org>
Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
上级 2dd4b262
...@@ -831,8 +831,8 @@ int lbs_get_channel(struct lbs_private *priv) ...@@ -831,8 +831,8 @@ int lbs_get_channel(struct lbs_private *priv)
if (ret) if (ret)
goto out; goto out;
lbs_deb_cmd("current radio channel is %d\n", cmd.channel); ret = le16_to_cpu(cmd.channel);
ret = (int) cmd.channel; lbs_deb_cmd("current radio channel is %d\n", ret);
out: out:
lbs_deb_leave_args(LBS_DEB_CMD, "ret %d", ret); 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,8 +863,9 @@ int lbs_set_channel(struct lbs_private *priv, u8 channel)
if (ret) if (ret)
goto out; goto out;
priv->curbssparams.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, cmd.channel); lbs_deb_cmd("channel switch from %d to %d\n", old_channel,
priv->curbssparams.channel);
out: out:
lbs_deb_leave_args(LBS_DEB_CMD, "ret %d", ret); lbs_deb_leave_args(LBS_DEB_CMD, "ret %d", ret);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册