diff options
-rw-r--r-- | drivers/net/wireless/libertas/wext.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/wireless/libertas/wext.c b/drivers/net/wireless/libertas/wext.c index e8c0629f9a4b..7d14f9c2aff6 100644 --- a/drivers/net/wireless/libertas/wext.c +++ b/drivers/net/wireless/libertas/wext.c | |||
@@ -949,7 +949,7 @@ static struct iw_statistics *wlan_get_wireless_stats(struct net_device *dev) | |||
949 | priv->wstats.discard.misc = le16_to_cpu(adapter->logmsg.ackfailure); | 949 | priv->wstats.discard.misc = le16_to_cpu(adapter->logmsg.ackfailure); |
950 | 950 | ||
951 | /* Calculate quality */ | 951 | /* Calculate quality */ |
952 | priv->wstats.qual.qual = max(quality, (u32)100); | 952 | priv->wstats.qual.qual = min_t(u32, quality, 100); |
953 | priv->wstats.qual.updated = IW_QUAL_ALL_UPDATED | IW_QUAL_DBM; | 953 | priv->wstats.qual.updated = IW_QUAL_ALL_UPDATED | IW_QUAL_DBM; |
954 | stats_valid = 1; | 954 | stats_valid = 1; |
955 | 955 | ||