Lines Matching +full:len +full:- +full:or +full:- +full:limit
4 * Permission to use, copy, modify, and/or distribute this software for any
5 * purpose with or without fee is hereby granted, provided that the above
11 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
13 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
14 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
30 struct ieee80211_freq_range *limit = &freq_limits[i]; in wiphy_freq_limits_valid_chan() local
32 if (cfg80211_does_bw_fit_range(limit, in wiphy_freq_limits_valid_chan()
33 MHZ_TO_KHZ(chan->center_freq), in wiphy_freq_limits_valid_chan()
52 struct ieee80211_supported_band *sband = wiphy->bands[band]; in wiphy_freq_limits_apply()
57 for (i = 0; i < sband->n_channels; i++) { in wiphy_freq_limits_apply()
58 struct ieee80211_channel *chan = &sband->channels[i]; in wiphy_freq_limits_apply()
60 if (chan->flags & IEEE80211_CHAN_DISABLED) in wiphy_freq_limits_apply()
67 chan->center_freq); in wiphy_freq_limits_apply()
68 chan->flags |= IEEE80211_CHAN_DISABLED; in wiphy_freq_limits_apply()
82 int len, i; in wiphy_read_of_freq_limits() local
91 prop = of_find_property(np, "ieee80211-freq-limit", &len); in wiphy_read_of_freq_limits()
95 if (!len || len % sizeof(u32) || len / sizeof(u32) % 2) { in wiphy_read_of_freq_limits()
96 dev_err(dev, "ieee80211-freq-limit wrong format"); in wiphy_read_of_freq_limits()
99 n_freq_limits = len / sizeof(u32) / 2; in wiphy_read_of_freq_limits()
103 err = -ENOMEM; in wiphy_read_of_freq_limits()
109 struct ieee80211_freq_range *limit = &freq_limits[i]; in wiphy_read_of_freq_limits() local
111 p = of_prop_next_u32(prop, p, &limit->start_freq_khz); in wiphy_read_of_freq_limits()
113 err = -EINVAL; in wiphy_read_of_freq_limits()
117 p = of_prop_next_u32(prop, p, &limit->end_freq_khz); in wiphy_read_of_freq_limits()
119 err = -EINVAL; in wiphy_read_of_freq_limits()
123 if (!limit->start_freq_khz || in wiphy_read_of_freq_limits()
124 !limit->end_freq_khz || in wiphy_read_of_freq_limits()
125 limit->start_freq_khz >= limit->end_freq_khz) { in wiphy_read_of_freq_limits()
126 err = -EINVAL; in wiphy_read_of_freq_limits()