Commit 7debca25 authored by Al Viro's avatar Al Viro Committed by Greg Kroah-Hartman

libertas: more endianness breakage

based on patch 8362cd41 in mainline.

	domain->header.len is le16 and has just been assigned
cpu_to_le16(arithmetical expression).  And all fields of adapter->logmsg
are __le32; not a single 16-bit among them...
	That's incremental to the previous one
Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
Signed-off-by: default avatarDan Williams <dcbw@redhat.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 08050400
...@@ -562,7 +562,7 @@ int libertas_cmd_802_11d_domain_info(wlan_private * priv, ...@@ -562,7 +562,7 @@ int libertas_cmd_802_11d_domain_info(wlan_private * priv,
nr_subband * sizeof(struct ieeetypes_subbandset)); nr_subband * sizeof(struct ieeetypes_subbandset));
cmd->size = cpu_to_le16(sizeof(pdomaininfo->action) + cmd->size = cpu_to_le16(sizeof(pdomaininfo->action) +
domain->header.len + le16_to_cpu(domain->header.len) +
sizeof(struct mrvlietypesheader) + sizeof(struct mrvlietypesheader) +
S_DS_GEN); S_DS_GEN);
} else { } else {
......
...@@ -973,7 +973,7 @@ static struct iw_statistics *wlan_get_wireless_stats(struct net_device *dev) ...@@ -973,7 +973,7 @@ static struct iw_statistics *wlan_get_wireless_stats(struct net_device *dev)
/* Quality by TX errors */ /* Quality by TX errors */
priv->wstats.discard.retries = priv->stats.tx_errors; priv->wstats.discard.retries = priv->stats.tx_errors;
tx_retries = le16_to_cpu(adapter->logmsg.retry); tx_retries = le32_to_cpu(adapter->logmsg.retry);
if (tx_retries > 75) if (tx_retries > 75)
tx_qual = (90 - tx_retries) * POOR / 15; tx_qual = (90 - tx_retries) * POOR / 15;
...@@ -989,10 +989,10 @@ static struct iw_statistics *wlan_get_wireless_stats(struct net_device *dev) ...@@ -989,10 +989,10 @@ static struct iw_statistics *wlan_get_wireless_stats(struct net_device *dev)
(PERFECT - VERY_GOOD) / 50 + VERY_GOOD; (PERFECT - VERY_GOOD) / 50 + VERY_GOOD;
quality = min(quality, tx_qual); quality = min(quality, tx_qual);
priv->wstats.discard.code = le16_to_cpu(adapter->logmsg.wepundecryptable); priv->wstats.discard.code = le32_to_cpu(adapter->logmsg.wepundecryptable);
priv->wstats.discard.fragment = le16_to_cpu(adapter->logmsg.rxfrag); priv->wstats.discard.fragment = le32_to_cpu(adapter->logmsg.rxfrag);
priv->wstats.discard.retries = tx_retries; priv->wstats.discard.retries = tx_retries;
priv->wstats.discard.misc = le16_to_cpu(adapter->logmsg.ackfailure); priv->wstats.discard.misc = le32_to_cpu(adapter->logmsg.ackfailure);
/* Calculate quality */ /* Calculate quality */
priv->wstats.qual.qual = max(quality, (u32)100); priv->wstats.qual.qual = max(quality, (u32)100);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment