> 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. Luis -- 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