diff options
-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) { |