On Mon, 2008-07-21 at 15:39 -0700, Luis R. Rodriguez wrote: > > diff --git a/ksrc/hw.c b/ksrc/hw.c > > index b8a9321..5a24cbe 100644 > > --- a/ksrc/hw.c > > +++ b/ksrc/hw.c > > @@ -852,9 +852,11 @@ static inline enum hal_status ath9k_hw_check_eeprom(struct ath_hal *ah) > > else > > el = ahp->ah_eeprom.baseEepHeader.length; > > > > + if (el < sizeof(struct ar5416_eeprom) / sizeof(u_int16_t)) > > + el = sizeof(struct ar5416_eeprom) / sizeof(u_int16_t); > > + > > eepdata = (u_int16_t *) (&ahp->ah_eeprom); > > - for (i = 0; i < > > - min(el, sizeof(struct ar5416_eeprom)) / sizeof(u_int16_t); i++) > > + for (i = 0; i < el; i++) > > sum ^= *eepdata++; > > > > if (need_swap) { > > Its a good thing indeed I split this into two patches, as your first > hunk breaks the check. Had you tested this??? Anyway I've fixed this > now. Sorry, I only compile tested it. Indeed, the first comparison should be inverted, or we get maximum, not minimum. I didn't want to change the code so much, but I wanted to avoid breaking the 80 character limit with casts. -- Regards, Pavel Roskin -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html