From a9c567fd315d18cfbd9aaa671636e41960e07b06 Mon Sep 17 00:00:00 2001 From: Roberto Rodriguez Alkala Date: Sat, 7 Aug 2010 19:52:29 -0400 Subject: [PATCH] --- yaml --- r: 219656 b: refs/heads/master c: bed49c69453641a2fd80d90f5a3b5204107eb459 h: refs/heads/master v: v3 --- [refs] | 2 +- .../drivers/staging/otus/80211core/ratectrl.c | 26 +++++++------------ 2 files changed, 10 insertions(+), 18 deletions(-) diff --git a/[refs] b/[refs] index 2db376fb9e52..74c8a0c45918 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 1033f1f7ef3e0227eff68f236dc15d127ac550ff +refs/heads/master: bed49c69453641a2fd80d90f5a3b5204107eb459 diff --git a/trunk/drivers/staging/otus/80211core/ratectrl.c b/trunk/drivers/staging/otus/80211core/ratectrl.c index a1abe2f4f342..283b2b52638c 100644 --- a/trunk/drivers/staging/otus/80211core/ratectrl.c +++ b/trunk/drivers/staging/otus/80211core/ratectrl.c @@ -422,23 +422,15 @@ u8_t zfRateCtrlRateDiff(struct zsRcCell* rcCell, u8_t retryRate) u16_t i; /* Find retryRate in operationRateSet[] */ - for (i=0; ioperationRateCount; i++) - { - if (retryRate == rcCell->operationRateSet[i]) - { - if (i < rcCell->currentRateIndex) - { - return ((rcCell->currentRateIndex - i)+1)>>1; - } - else if (i == rcCell->currentRateIndex == 0) - { - return 1; - } - else - { - return 0; - } - } + for (i = 0; i < rcCell->operationRateCount; i++) { + if (retryRate == rcCell->operationRateSet[i]) { + if (i < rcCell->currentRateIndex) + return ((rcCell->currentRateIndex - i)+1)>>1; + else if (i == rcCell->currentRateIndex && i == 0) + return 1; + else + return 0; + } } /* TODO : retry rate not in operation rate set */ zm_msg1_tx(ZM_LV_0, "Not in operation rate set:", retryRate);