Commit b20c5207 authored by Dan Williams's avatar Dan Williams Committed by David S. Miller

[PATCH] libertas: fix WEXT quality reporting

Found by Ronak and others at Marvell.
Signed-off-by: default avatarDan Williams <dcbw@redhat.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent fcff0e08
...@@ -949,7 +949,7 @@ static struct iw_statistics *wlan_get_wireless_stats(struct net_device *dev) ...@@ -949,7 +949,7 @@ static struct iw_statistics *wlan_get_wireless_stats(struct net_device *dev)
priv->wstats.discard.misc = le16_to_cpu(adapter->logmsg.ackfailure); priv->wstats.discard.misc = le16_to_cpu(adapter->logmsg.ackfailure);
/* Calculate quality */ /* Calculate quality */
priv->wstats.qual.qual = max(quality, (u32)100); priv->wstats.qual.qual = min_t(u32, quality, 100);
priv->wstats.qual.updated = IW_QUAL_ALL_UPDATED | IW_QUAL_DBM; priv->wstats.qual.updated = IW_QUAL_ALL_UPDATED | IW_QUAL_DBM;
stats_valid = 1; stats_valid = 1;
......
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