Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 29 Sep 2013 23:45:32 -0700
From:      Adrian Chadd <adrian@freebsd.org>
To:        Winston <tx2023@gmail.com>
Cc:        "freebsd-wireless@freebsd.org" <freebsd-wireless@freebsd.org>
Subject:   Re: Suggest improvement to ar5416_ani.c on adaptive noise immunity
Message-ID:  <CAJ-VmomEoEFrM5kWD-c3s7_E4wyQerTjyYyakmv0YqVJb-6Zhw@mail.gmail.com>
In-Reply-To: <CAC6a1Dgvrg-btU45pcSibP334xxb7=YruM69n673vJNPa0JqkA@mail.gmail.com>
References:  <CAC6a1Dhkfd9wT_3nTqLez-_z2HHncRuLO%2BEyL8gS-BqFus=Zsg@mail.gmail.com> <CAC6a1Dgvrg-btU45pcSibP334xxb7=YruM69n673vJNPa0JqkA@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
good catch!


-adrian


On 29 September 2013 22:32, Winston <tx2023@gmail.com> wrote:

> 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
> _______________________________________________
> freebsd-wireless@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-wireless
> To unsubscribe, send any mail to "freebsd-wireless-unsubscribe@freebsd.org
> "
>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAJ-VmomEoEFrM5kWD-c3s7_E4wyQerTjyYyakmv0YqVJb-6Zhw>