Lines Matching refs:channels

75 		*op_class = 81; /* 2.407 GHz, channels 1..13 */
90 *op_class = 115; /* 5 GHz, channels 36..48 */
99 *op_class = 124; /* 5 GHz, channels 149..161 */
108 *op_class = 125; /* 5 GHz, channels 149..169 */
117 *op_class = 180; /* 60 GHz, channels 1..4 */
134 for (i = 0; i < a->channels; i++) {
135 for (j = 0; j < b->channels; j++) {
138 res->channel[res->channels] = a->channel[i];
139 res->channels++;
140 if (res->channels == P2P_MAX_REG_CLASS_CHANNELS)
149 * @a: First set of supported channels
150 * @b: Second set of supported channels
151 * @res: Data structure for returning the intersection of support channels
153 * This function can be used to find a common set of supported channels. Both
154 * input channels sets are assumed to use the same country code. If different
175 if (res->reg_class[res->reg_classes].channels) {
190 for (i = 0; i < b_cl->channels; i++) {
191 for (j = 0; j < cl->channels; j++) {
195 if (j == cl->channels) {
196 if (cl->channels == P2P_MAX_REG_CLASS_CHANNELS)
198 cl->channel[cl->channels++] = b_cl->channel[i];
207 * @b: Second set of channels
245 * @a: First set of channels
246 * @b: Second set of channels
247 * @res: Data structure for returning the union of channels
271 while (c < op->channels) {
275 op->channels--;
278 op->channels - c);
283 if (op->channels == 0) {
296 * @channels: List of supported channels
301 int p2p_channels_includes(const struct p2p_channels *channels, u8 reg_class,
305 for (i = 0; i < channels->reg_classes; i++) {
306 const struct p2p_reg_class *reg = &channels->reg_class[i];
309 for (j = 0; j < reg->channels; j++) {
318 int p2p_channels_includes_freq(const struct p2p_channels *channels,
322 for (i = 0; i < channels->reg_classes; i++) {
323 const struct p2p_reg_class *reg = &channels->reg_class[i];
324 for (j = 0; j < reg->channels; j++) {
339 return p2p_channels_includes(&p2p->cfg->channels, op_reg_class,
349 return p2p_channels_includes(&p2p->cfg->channels, op_reg_class,
360 return p2p_channels_includes(&p2p->cfg->channels, op_reg_class,
368 const struct p2p_channels *channels)
372 const struct p2p_channels *tmpc = channels ?
373 channels : &p2p->cfg->channels;
406 for (j = 0; j < c->channels; j++) {
421 static u8 p2p_channel_pick_random(const u8 *channels, unsigned int num_channels)
427 return channels[r];
440 if (c->channels == 0)
445 * Pick one of the available channels in the
450 c->channel, c->channels);
468 /* Try to find available social channels from 2.4 GHz */
476 /* Try to find available social channels from 60 GHz */
493 int p2p_channels_to_freqs(const struct p2p_channels *channels, int *freq_list,
498 if (!channels || max_len == 0)
501 for (i = 0, idx = 0; i < channels->reg_classes; i++) {
502 const struct p2p_reg_class *c = &channels->reg_class[i];
507 for (j = 0; j < c->channels; j++) {