diff options
author | Pavel Roskin <proski@gnu.org> | 2007-06-16 03:38:41 -0400 |
---|---|---|
committer | Guido Guenther <agx@sigxcpu.org> | 2007-06-16 13:42:57 +0200 |
commit | 2b2123391762c827ef3eff1708393c18613f9424 (patch) | |
tree | e055783b63f2cc79237db237c9835ee39cc3e61d | |
parent | 4176d78759eedfab4dc08e7bde8991fb7942bf5c (diff) |
[PATCH] Always use cpu_to_le16 to populate priv->mib_buf.data with 16-bit data
Signed-off-by: Pavel Roskin <proski@gnu.org>
-rw-r--r-- | at76_usb.c | 6 |
1 files changed, 2 insertions, 4 deletions
@@ -938,8 +938,7 @@ static int at76_set_associd(struct at76_priv *priv, u16 id) priv->mib_buf.size = 2; priv->mib_buf.index = offsetof(struct mib_mac_mgmt, station_id); - priv->mib_buf.data[0] = id & 0xff; - priv->mib_buf.data[1] = id >> 8; + *(__le16 *)priv->mib_buf.data = cpu_to_le16(id); ret = at76_set_mib(priv, &priv->mib_buf); if (ret < 0) { @@ -960,8 +959,7 @@ static int at76_set_listen_interval(struct at76_priv *priv, u16 interval) priv->mib_buf.size = 2; priv->mib_buf.index = offsetof(struct mib_mac_mgmt, station_id); - priv->mib_buf.data[0] = interval & 0xff; - priv->mib_buf.data[1] = interval >> 8; + *(__le16 *)priv->mib_buf.data = cpu_to_le16(interval); ret = at76_set_mib(priv, &priv->mib_buf); if (ret < 0) { |