Staging: otus: hpani: using the wrong variable
authorDan Carpenter <error27@gmail.com>
Sun, 28 Mar 2010 11:48:10 +0000 (14:48 +0300)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 11 May 2010 18:35:43 +0000 (11:35 -0700)
We're updating the "HpPriv->ani" array here so we should use that to
determine the end of the for loop.  "HpPriv->ani" has 50 elements and
"wd->regulationTable.allowChannel" has 59 elements.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/otus/hal/hpani.c

index 0afecd8c2de4e1ff509988eca98ae0f32fe4b06b..d401504f2004259da6db191ec55300b71fd6a69c 100644 (file)
@@ -96,7 +96,7 @@ void zfHpAniAttach(zdev_t* dev)
     HpPriv->hasHwPhyCounters = 1;
 
     memset((char *)&HpPriv->ani, 0, sizeof(HpPriv->ani));
-    for (i = 0; i < N(wd->regulationTable.allowChannel); i++)
+    for (i = 0; i < ARRAY_SIZE(HpPriv->ani); i++)
     {
         /* New ANI stuff */
         HpPriv->ani[i].ofdmTrigHigh = ZM_HAL_ANI_OFDM_TRIG_HIGH;