• Home
  • Raw
  • Download

Lines Matching full:channels

87 	for (i = 0; i < a->channels; i++) {  in p2p_reg_class_intersect()
88 for (j = 0; j < b->channels; j++) { in p2p_reg_class_intersect()
91 res->channel[res->channels] = a->channel[i]; in p2p_reg_class_intersect()
92 res->channels++; in p2p_reg_class_intersect()
93 if (res->channels == P2P_MAX_REG_CLASS_CHANNELS) in p2p_reg_class_intersect()
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) { in p2p_channels_intersect()
143 for (i = 0; i < b_cl->channels; i++) { in p2p_op_class_union()
144 for (j = 0; j < cl->channels; j++) { in p2p_op_class_union()
148 if (j == cl->channels) { in p2p_op_class_union()
149 if (cl->channels == P2P_MAX_REG_CLASS_CHANNELS) in p2p_op_class_union()
151 cl->channel[cl->channels++] = b_cl->channel[i]; in p2p_op_class_union()
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) { in p2p_channels_remove_freqs()
228 op->channels--; in p2p_channels_remove_freqs()
231 op->channels - c); in p2p_channels_remove_freqs()
236 if (op->channels == 0) { in p2p_channels_remove_freqs()
249 * @channels: List of supported channels
254 int p2p_channels_includes(const struct p2p_channels *channels, u8 reg_class, in p2p_channels_includes() argument
258 for (i = 0; i < channels->reg_classes; i++) { in p2p_channels_includes()
259 const struct p2p_reg_class *reg = &channels->reg_class[i]; in p2p_channels_includes()
262 for (j = 0; j < reg->channels; j++) { in p2p_channels_includes()
271 int p2p_channels_includes_freq(const struct p2p_channels *channels, in p2p_channels_includes_freq() argument
275 for (i = 0; i < channels->reg_classes; i++) { in p2p_channels_includes_freq()
276 const struct p2p_reg_class *reg = &channels->reg_class[i]; in p2p_channels_includes_freq()
277 for (j = 0; j < reg->channels; j++) { in p2p_channels_includes_freq()
292 return p2p_channels_includes(&p2p->cfg->channels, op_reg_class, in p2p_supported_freq()
302 return p2p_channels_includes(&p2p->cfg->channels, op_reg_class, in p2p_supported_freq_go()
313 return p2p_channels_includes(&p2p->cfg->channels, op_reg_class, in p2p_supported_freq_cli()
321 const struct p2p_channels *channels) in p2p_get_pref_freq() argument
325 const struct p2p_channels *tmpc = channels ? in p2p_get_pref_freq()
326 channels : &p2p->cfg->channels; in p2p_get_pref_freq()
359 for (j = 0; j < c->channels; j++) { in p2p_channels_dump()
374 static u8 p2p_channel_pick_random(const u8 *channels, unsigned int num_channels) in p2p_channel_pick_random() argument
380 return channels[r]; in p2p_channel_pick_random()
393 if (c->channels == 0) in p2p_channel_select()
398 * Pick one of the available channels in the in p2p_channel_select()
403 c->channel, c->channels); in p2p_channel_select()
421 /* Try to find available social channels from 2.4 GHz */ in p2p_channel_random_social()
429 /* Try to find available social channels from 60 GHz */ in p2p_channel_random_social()
446 int p2p_channels_to_freqs(const struct p2p_channels *channels, int *freq_list, in p2p_channels_to_freqs() argument
451 if (!channels || max_len == 0) in p2p_channels_to_freqs()
454 for (i = 0, idx = 0; i < channels->reg_classes; i++) { in p2p_channels_to_freqs()
455 const struct p2p_reg_class *c = &channels->reg_class[i]; in p2p_channels_to_freqs()
460 for (j = 0; j < c->channels; j++) { in p2p_channels_to_freqs()