Search Linux Wireless

Re: [ath5k-devel] [PATCH 1/1] ath5k: Cleanup after API changes patch

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Feb 2, 2008 6:07 PM, Nick Kossifidis <mickflemm@xxxxxxxxx> wrote:
>
> > I'm just going to resend all pending patches. For this stuff I've
> > shifted a bit like this:
> >
> >         /*
> >          * Check bounds supported by the PHY (we don't care about regultory
> >          * restrictions at this point). Note: hw_value already has the band
> >          * (CHANNEL_2GHZ, or CHANNEL_5GHZ) so we inform ath5k_channel_ok()
> >          * of the band by that */
> >         if (!ath5k_channel_ok(ah, channel->center_freq, channel->hw_value)) {
> >                 char bname[5];
> >                 switch (channel->band) {
> >                 case IEEE80211_BAND_2GHZ:
> >                         strcpy(bname, "2 GHz");
> >                         break;
> >                 case IEEE80211_BAND_5GHZ:
> >                         strcpy(bname, "5 GHz");
> >                         break;
> >                 default:
> >                         BUG_ON(1);
> >                         return -EINVAL;
> >                 }
> >                 ATH5K_ERR(ah->ah_sc,
> >                         "channel frequency (%u MHz) out of supported "
> >                         "%s band range (%u - %u MHz)\n",
> >                         channel->center_freq,
> >                         bname,
> >                         ah->ah_capabilities.cap_range.range_2ghz_min,
> >                         ah->ah_capabilities.cap_range.range_2ghz_max);
> >                         return -EINVAL;
> >         }
> >
>
> We really don't need all this IMHO, ath5k_channel_ok is a simple
> working function that's supposed to do all needed checks and print any
> error msg, if you want to modify something modify ath5k_channel_ok,
> don't add more stuff on the caller. Also why use strings for the band
> ??? You can have an int and set it 2 or 5 if you want (i realy think
> strcpy is baaad).

OK fine, I'll edit ath5k_channel_ok in a later patch, for now I'll
just keep the code to match what was there to finish the cleanup.

  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

[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux