Lines Matching defs:channels

87 	for (i = 0; i < a->channels; i++) {
88 for (j = 0; j < b->channels; j++) {
91 res->channel[res->channels] = a->channel[i];
92 res->channels++;
93 if (res->channels == P2P_MAX_REG_CLASS_CHANNELS)
102 * @a: First set of supported channels
103 * @b: Second set of supported channels
104 * @res: Data structure for returning the intersection of support channels
106 * This function can be used to find a common set of supported channels. Both
107 * input channels sets are assumed to use the same country code. If different
128 if (res->reg_class[res->reg_classes].channels) {
143 for (i = 0; i < b_cl->channels; i++) {
144 for (j = 0; j < cl->channels; j++) {
148 if (j == cl->channels) {
149 if (cl->channels == P2P_MAX_REG_CLASS_CHANNELS)
151 cl->channel[cl->channels++] = b_cl->channel[i];
160 * @b: Second set of channels
198 * @a: First set of channels
199 * @b: Second set of channels
200 * @res: Data structure for returning the union of channels
224 while (c < op->channels) {
228 op->channels--;
231 op->channels - c);
236 if (op->channels == 0) {
249 * @channels: List of supported channels
254 int p2p_channels_includes(const struct p2p_channels *channels, u8 reg_class,
258 for (i = 0; i < channels->reg_classes; i++) {
259 const struct p2p_reg_class *reg = &channels->reg_class[i];
262 for (j = 0; j < reg->channels; j++) {
271 int p2p_channels_includes_freq(const struct p2p_channels *channels,
275 for (i = 0; i < channels->reg_classes; i++) {
276 const struct p2p_reg_class *reg = &channels->reg_class[i];
277 for (j = 0; j < reg->channels; j++) {
292 return p2p_channels_includes(&p2p->cfg->channels, op_reg_class,
302 return p2p_channels_includes(&p2p->cfg->channels, op_reg_class,
313 return p2p_channels_includes(&p2p->cfg->channels, op_reg_class,
321 const struct p2p_channels *channels)
325 const struct p2p_channels *tmpc = channels ?
326 channels : &p2p->cfg->channels;
359 for (j = 0; j < c->channels; j++) {
374 static u8 p2p_channel_pick_random(const u8 *channels, unsigned int num_channels)
380 return channels[r];
393 if (c->channels == 0)
398 * Pick one of the available channels in the
403 c->channel, c->channels);
423 /* Try to find available social channels from 2.4 GHz.
424 * If the avoid_list includes any of the 2.4 GHz social channels, that
442 /* Try to find available social channels from 60 GHz */
459 int p2p_channels_to_freqs(const struct p2p_channels *channels, int *freq_list,
464 if (!channels || max_len == 0)
467 for (i = 0, idx = 0; i < channels->reg_classes; i++) {
468 const struct p2p_reg_class *c = &channels->reg_class[i];
473 for (j = 0; j < c->channels; j++) {