Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 30 Sep 2013 13:32:28 +0800
From:      Winston <tx2023@gmail.com>
To:        freebsd-wireless@freebsd.org
Subject:   Fwd: Suggest improvement to ar5416_ani.c on adaptive noise immunity
Message-ID:  <CAC6a1Dgvrg-btU45pcSibP334xxb7=YruM69n673vJNPa0JqkA@mail.gmail.com>
In-Reply-To: <CAC6a1Dhkfd9wT_3nTqLez-_z2HHncRuLO%2BEyL8gS-BqFus=Zsg@mail.gmail.com>
References:  <CAC6a1Dhkfd9wT_3nTqLez-_z2HHncRuLO%2BEyL8gS-BqFus=Zsg@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
I was reading the source code in the ar5416_ani.c file and I would
like to suggest an improvement.

http://svnweb.freebsd.org/base/projects/bmake/sys/dev/ath/ath_hal/ar5416/ar5416_ani.c?view=markup


Code:
---------
966    params = aniState->params;
967    if (aniState->listenTime > 5*params->period) {
968            /*
969            * Check to see if need to lower immunity if
970            * 5 aniPeriods have passed
971            */
972            updateMIBStats(ah, aniState);
973            if (aniState->ofdmPhyErrCount <= aniState->listenTime *
974                params->ofdmTrigLow/1000 &&
975                aniState->cckPhyErrCount <= aniState->listenTime *
976                params->cckTrigLow/1000)
977                    ar5416AniLowerImmunity(ah);
978            HALDEBUG(ah, HAL_DEBUG_ANI, "%s: lower immunity\n",
979                __func__);
980            ar5416AniRestart(ah, aniState);
981    } else if (aniState->listenTime > params->period) {
---------
I think lines 977 to 979 should be grouped together by curly braces.

The reason is that currently line 978 is outside of the "if" block
starting in line 973.

Link to Atheros HAL: Ambient Noise Immunity (ANI):
https://wiki.freebsd.org/dev/ath_hal%284%29/AutomaticNoiseImmunity
************

http://forums.FreeBSD.org/showthread.php?t=42136

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
w



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAC6a1Dgvrg-btU45pcSibP334xxb7=YruM69n673vJNPa0JqkA>