static int add_chanlist_band(struct ath_hal *ah, struct ieee80211_channel chans[], int maxchans, int *nchans, uint16_t freq_lo, uint16_t freq_hi, int step, uint32_t flags, REG_DMN_FREQ_BAND *fband, REG_DOMAIN *rd) { uint16_t freq = freq_lo; int error; if (freq_hi < freq_lo) return (0); error = addchan(ah, chans, maxchans, nchans, freq, flags, fband, rd); for (freq += step; freq <= freq_hi && error == 0; freq += step) error = copychan_prev(ah, chans, maxchans, nchans, freq); return (error); }
static int add_chanlist_band(struct ath_hal *ah, struct ieee80211_channel chans[], int maxchans, int *nchans, uint16_t freq_lo, uint16_t freq_hi, int step, uint32_t flags, REG_DMN_FREQ_BAND *fband, REG_DOMAIN *rd) { uint16_t freq = freq_lo; int error; if (freq_hi < freq_lo) return (0); HALDEBUG(ah, HAL_DEBUG_REGDOMAIN, "%s: freq=%d..%d, flags=0x%08x, step=%d\n", __func__, (int) freq_lo, (int) freq_hi, flags, step); error = addchan(ah, chans, maxchans, nchans, freq, flags, fband, rd); for (freq += step; freq <= freq_hi && error == 0; freq += step) error = copychan_prev(ah, chans, maxchans, nchans, freq, flags); return (error); }