> 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). -- GPG ID: 0xD21DB2DB As you read this post global entropy rises. Have Fun ;-) Nick - 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