summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless
diff options
context:
space:
mode:
authorDan Williams <dcbw@redhat.com>2007-08-02 13:06:54 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2007-10-10 16:50:00 -0700
commitb20c520763a6fe1aabde27f6ba017a67f22f90d5 (patch)
treef38bea6423e68be89bc237274078f59652d10c27 /drivers/net/wireless
parentfcff0e0856351b201016cd9267cadcf6a8e988d5 (diff)
downloadop-kernel-dev-b20c520763a6fe1aabde27f6ba017a67f22f90d5.zip
op-kernel-dev-b20c520763a6fe1aabde27f6ba017a67f22f90d5.tar.gz
[PATCH] libertas: fix WEXT quality reporting
Found by Ronak and others at Marvell. Signed-off-by: Dan Williams <dcbw@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r--drivers/net/wireless/libertas/wext.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/wireless/libertas/wext.c b/drivers/net/wireless/libertas/wext.c
index e8c0629..7d14f9c 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)
priv->wstats.discard.misc = le16_to_cpu(adapter->logmsg.ackfailure);
/* 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;
stats_valid = 1;
OpenPOWER on IntegriCloud