From d6d32774b02b1f882c8e4b2768e31aee71a77bc1 Mon Sep 17 00:00:00 2001 From: Julia Lawall Date: Sun, 9 Nov 2008 17:56:10 +0100 Subject: [PATCH] --- yaml --- r: 122025 b: refs/heads/master c: 87c1687d1a7bf0d4975d613cb699ba95b329359e h: refs/heads/master i: 122023: dea23db94241df06875a5d60cb6b31a09719e90e v: v3 --- [refs] | 2 +- trunk/drivers/net/wireless/ath9k/rc.c | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/[refs] b/[refs] index d6540d935493..acc2ee3a214f 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: f9f88fed3433139b58962011c81597b44fd48458 +refs/heads/master: 87c1687d1a7bf0d4975d613cb699ba95b329359e diff --git a/trunk/drivers/net/wireless/ath9k/rc.c b/trunk/drivers/net/wireless/ath9k/rc.c index aa6bfd717c20..517992d14808 100644 --- a/trunk/drivers/net/wireless/ath9k/rc.c +++ b/trunk/drivers/net/wireless/ath9k/rc.c @@ -1272,8 +1272,7 @@ static void ath_rc_update_ht(struct ath_softc *sc, rate_ctrl->state[tx_rate].per = 100; } else { /* xretries == 2 */ - count = sizeof(nretry_to_per_lookup) / - sizeof(nretry_to_per_lookup[0]); + count = ARRAY_SIZE(nretry_to_per_lookup); if (retries >= count) retries = count - 1; /* new_PER = 7/8*old_PER + 1/8*(currentPER) */ @@ -1291,8 +1290,7 @@ static void ath_rc_update_ht(struct ath_softc *sc, } else { /* xretries == 0 */ /* Update the PER. */ /* Make sure it doesn't index out of array's bounds. */ - count = sizeof(nretry_to_per_lookup) / - sizeof(nretry_to_per_lookup[0]); + count = ARRAY_SIZE(nretry_to_per_lookup); if (retries >= count) retries = count - 1; if (info_priv->n_bad_frames) {