On Mon, Oct 26, 2009 at 01:31:44PM -0700, Kalle Valo wrote:
> "Luis R. Rodriguez" <lrodrig...@atheros.com> writes:
> 
> > Devices with external radios have revisions which we can count on.
> > On single chip solutions these EEPROM values for these radio revision
> > also exist but are not meaningful as the radios are embedded onto the
> > same chip. Each single-chip device evolves together as one device.
> >
> > Signed-off-by: Luis R. Rodriguez <lrodrig...@atheros.com>
> > ---
> >
> > Changes hw_name to 60 bytes.
> 
> Thanks, much better now.
> 
> Another minor comment, sorry that I didn't notice it earlier:
> 
> > +void ath9k_hw_name(struct ath_hw *ah, char *hw_name)
> > +{
> > +     /* chipsets >= AR9280 are single-chip */
> > +     if (AR_SREV_9280_10_OR_LATER(ah)) {
> > +             sprintf(hw_name,
> > +                     "Atheros single-chip AR%s Rev:%x",
> > +                     ath9k_hw_mac_bb_name(ah->hw_version.macVersion),
> > +                     ah->hw_version.macRev);
> > +     }
> > +     else {
> > +             sprintf(hw_name,
> > +                     "Atheros AR%s MAC/BB Rev:%x AR%s RF Rev:%x: ",
> > +                     ath9k_hw_mac_bb_name(ah->hw_version.macVersion),
> > +                     ah->hw_version.macRev,
> > +                     ath9k_hw_rf_name((ah->hw_version.analog5GhzRev &
> > +                                      AR_RADIO_SREV_MAJOR)),
> > +                     ah->hw_version.phyRev);
> > +     }
> > +}
> 
> I think you should provide the size of hw_name to this function and
> use snprintf() to avoid writing out of bounds.

I was going to do this but since I know the users of it and control
it seemed to not matter. I'll respin with this added, better to be careful.

Thanks for the review.

  Luis
_______________________________________________
ath9k-devel mailing list
ath9k-devel@lists.ath9k.org
https://lists.ath9k.org/mailman/listinfo/ath9k-devel

Reply via email to