Home
last modified time | relevance | path

Searched refs:freqs (Results 1 – 25 of 36) sorted by relevance

12

/freebsd-13-stable/usr.sbin/powerd/
HDpowerd.c88 static int read_freqs(int *numfreqs, int **freqs, int **power,
193 read_freqs(int *numfreqs, int **freqs, int **power, int minfreq, int maxfreq) in read_freqs() argument
213 if ((*freqs = malloc(*numfreqs * sizeof(int))) == NULL) { in read_freqs()
219 free(*freqs); in read_freqs()
226 if (sscanf(p, "%d/%d", &(*freqs)[j], &(*power)[i]) != 2) { in read_freqs()
228 free(*freqs); in read_freqs()
232 if (((*freqs)[j] >= minfreq || minfreq == -1) && in read_freqs()
233 ((*freqs)[j] <= maxfreq || maxfreq == -1)) in read_freqs()
239 if ((*freqs = realloc(*freqs, *numfreqs * sizeof(int))) == NULL) { in read_freqs()
241 free(*freqs); in read_freqs()
[all …]
/freebsd-13-stable/contrib/wpa/wpa_supplicant/
HDbgscan_learn.c215 int *freqs = NULL, *n; in bgscan_learn_get_freqs() local
220 if (in_array(freqs, bss->freq)) in bgscan_learn_get_freqs()
222 n = os_realloc_array(freqs, *count + 2, sizeof(int)); in bgscan_learn_get_freqs()
224 return freqs; in bgscan_learn_get_freqs()
225 freqs = n; in bgscan_learn_get_freqs()
226 freqs[*count] = bss->freq; in bgscan_learn_get_freqs()
228 freqs[*count] = 0; in bgscan_learn_get_freqs()
231 return freqs; in bgscan_learn_get_freqs()
236 int *freqs, size_t count) in bgscan_learn_get_probe_freq() argument
241 return freqs; in bgscan_learn_get_probe_freq()
[all …]
HDscan.c323 wpa_s->last_scan_all_chan = !params->freqs; in wpa_supplicant_trigger_scan()
438 if (params->freqs == NULL && wpa_s->p2p_in_provisioning && in wpa_supplicant_optimize_freqs()
446 params->freqs = os_calloc(2, sizeof(int)); in wpa_supplicant_optimize_freqs()
447 if (params->freqs) in wpa_supplicant_optimize_freqs()
448 params->freqs[0] = wpa_s->go_params->freq; in wpa_supplicant_optimize_freqs()
453 int_array_concat(&params->freqs, in wpa_supplicant_optimize_freqs()
455 if (params->freqs) in wpa_supplicant_optimize_freqs()
456 int_array_sort_unique(params->freqs); in wpa_supplicant_optimize_freqs()
461 if (params->freqs == NULL && wpa_s->p2p_in_invitation) { in wpa_supplicant_optimize_freqs()
484 params->freqs = os_calloc(2, sizeof(int)); in wpa_supplicant_optimize_freqs()
[all …]
HDrrm.c477 int *freqs) in wpas_add_channel() argument
484 freqs[i] = ieee80211_chan_to_freq(NULL, op_class, primary_chan); in wpas_add_channel()
488 if (freqs[i] < 0 && in wpas_add_channel()
490 freqs[i] = 5000 + 5 * primary_chan; in wpas_add_channel()
491 if (freqs[i] < 0) { in wpas_add_channel()
507 int *freqs, *next_freq; in wpas_add_channels() local
524 freqs = os_calloc(num_chans * num_primary_channels + 1, sizeof(*freqs)); in wpas_add_channels()
525 if (!freqs) { in wpas_add_channels()
531 next_freq = freqs; in wpas_add_channels()
542 os_free(freqs); in wpas_add_channels()
[all …]
HDp2p_supplicant.c156 struct wpa_used_freq_data *freqs,
162 struct wpa_used_freq_data *freqs, unsigned int num,
186 int *freqs; in wpas_p2p_num_unused_channels() local
189 freqs = os_calloc(wpa_s->num_multichan_concurrent, sizeof(int)); in wpas_p2p_num_unused_channels()
190 if (!freqs) in wpas_p2p_num_unused_channels()
193 num = get_shared_radio_freqs(wpa_s, freqs, in wpas_p2p_num_unused_channels()
195 os_free(freqs); in wpas_p2p_num_unused_channels()
212 struct wpa_used_freq_data *freqs; in wpas_p2p_valid_oper_freqs() local
215 freqs = os_calloc(wpa_s->num_multichan_concurrent, in wpas_p2p_valid_oper_freqs()
217 if (!freqs) in wpas_p2p_valid_oper_freqs()
[all …]
HDconfig.c1438 int *freqs; in wpa_config_parse_int_array() local
1444 freqs = os_calloc(len + 1, sizeof(int)); in wpa_config_parse_int_array()
1445 if (freqs == NULL) in wpa_config_parse_int_array()
1455 n = os_realloc_array(freqs, len * 2 + 1, sizeof(int)); in wpa_config_parse_int_array()
1457 os_free(freqs); in wpa_config_parse_int_array()
1462 freqs = n; in wpa_config_parse_int_array()
1466 freqs[used] = atoi(pos); in wpa_config_parse_int_array()
1467 if (freqs[used] == 0) in wpa_config_parse_int_array()
1473 return freqs; in wpa_config_parse_int_array()
1481 int *freqs; in wpa_config_parse_scan_freq() local
[all …]
HDinterworking.h27 int *freqs);
HDnan_usd.c487 int *freqs = NULL; in wpas_nan_usd_all_freqs() local
508 int_array_add_unique(&freqs, chan->freq); in wpas_nan_usd_all_freqs()
512 return freqs; in wpas_nan_usd_all_freqs()
HDwpa_priv.c142 int freqs[PRIVSEP_MAX_SCAN_FREQS + 1]; in wpa_priv_cmd_scan() local
171 freqs[i] = scan->freqs[i]; in wpa_priv_cmd_scan()
172 freqs[i] = 0; in wpa_priv_cmd_scan()
173 params.freqs = freqs; in wpa_priv_cmd_scan()
HDwnm_sta.c1330 int *freqs; in wnm_set_scan_freqs() local
1343 freqs = os_calloc(wpa_s->wnm_num_neighbor_report + 1, sizeof(int)); in wnm_set_scan_freqs()
1344 if (freqs == NULL) in wnm_set_scan_freqs()
1360 os_free(freqs); in wnm_set_scan_freqs()
1364 add_freq(freqs, &num_freqs, nei->freq); in wnm_set_scan_freqs()
1368 os_free(freqs); in wnm_set_scan_freqs()
1375 wpa_s->next_scan_freqs = freqs; in wnm_set_scan_freqs()
HDbgscan_simple.c90 params.freqs = data->ssid->scan_freq; in bgscan_simple_timeout()
HDwpa_supplicant.c6620 unsigned int wpas_get_bands(struct wpa_supplicant *wpa_s, const int *freqs) in wpas_get_bands() argument
6625 if (freqs) { in wpas_get_bands()
6627 for (i = 0; freqs[i]; i++) in wpas_get_bands()
6628 band |= wpas_freq_to_band(freqs[i]); in wpas_get_bands()
7029 ctx)->freqs); in radio_add_work()
8318 void add_freq(int *freqs, int *num_freqs, int freq) in add_freq() argument
8323 if (freqs[i] == freq) in add_freq()
8327 freqs[*num_freqs] = freq; in add_freq()
8336 int *freqs; in get_bss_freqs_in_ess() local
8339 freqs = os_calloc(max_freqs + 1, sizeof(int)); in get_bss_freqs_in_ess()
[all …]
HDevents.c940 static int freq_allowed(int *freqs, int freq) in freq_allowed() argument
944 if (freqs == NULL) in freq_allowed()
947 for (i = 0; freqs[i]; i++) in freq_allowed()
948 if (freqs[i] == freq) in freq_allowed()
1916 int *freqs; in wpa_supplicant_connect_ml_missing() local
1940 freqs = os_malloc(sizeof(int) * 2); in wpa_supplicant_connect_ml_missing()
1941 if (!freqs) in wpa_supplicant_connect_ml_missing()
1947 freqs[0] = selected->freq; in wpa_supplicant_connect_ml_missing()
1948 freqs[1] = 0; in wpa_supplicant_connect_ml_missing()
1955 wpa_s->manual_scan_freqs = freqs; in wpa_supplicant_connect_ml_missing()
[all …]
/freebsd-13-stable/sys/contrib/zstd/lib/dictBuilder/
HDfastcover.c127 U32 *freqs; member
149 U32 *freqs, U32 begin, U32 end, in FASTCOVER_selectSegment() argument
177 activeSegment.score += freqs[idx]; in FASTCOVER_selectSegment()
189 activeSegment.score -= freqs[delIndex]; in FASTCOVER_selectSegment()
213 freqs[i] = 0; in FASTCOVER_selectSegment()
264 free(ctx->freqs); in FASTCOVER_ctx_destroy()
265 ctx->freqs = NULL; in FASTCOVER_ctx_destroy()
276 FASTCOVER_computeFrequency(U32* freqs, const FASTCOVER_ctx_t* ctx) in FASTCOVER_computeFrequency() argument
290 freqs[dmerIndex]++; in FASTCOVER_computeFrequency()
374 ctx->freqs = (U32*)calloc(((U64)1 << f), sizeof(U32)); in FASTCOVER_ctx_init()
[all …]
HDcover.c221 U32 *freqs; member
405 static COVER_segment_t COVER_selectSegment(const COVER_ctx_t *ctx, U32 *freqs, in COVER_selectSegment() argument
435 activeSegment.score += freqs[newDmer]; in COVER_selectSegment()
450 activeSegment.score -= freqs[delDmer]; in COVER_selectSegment()
465 U32 freq = freqs[ctx->dmerAt[pos]]; in COVER_selectSegment()
478 freqs[ctx->dmerAt[pos]] = 0; in COVER_selectSegment()
520 if (ctx->freqs) { in COVER_ctx_destroy()
521 free(ctx->freqs); in COVER_ctx_destroy()
522 ctx->freqs = NULL; in COVER_ctx_destroy()
591 ctx->freqs = NULL; in COVER_ctx_init()
[all …]
/freebsd-13-stable/contrib/wpa/src/drivers/
HDdriver_nl80211_scan.c232 if (params->freqs) { in nl80211_scan_common()
233 struct nlattr *freqs; in nl80211_scan_common() local
234 freqs = nla_nest_start(msg, NL80211_ATTR_SCAN_FREQUENCIES); in nl80211_scan_common()
235 if (freqs == NULL) in nl80211_scan_common()
237 for (i = 0; params->freqs[i]; i++) { in nl80211_scan_common()
239 "MHz", params->freqs[i]); in nl80211_scan_common()
240 if (nla_put_u32(msg, i + 1, params->freqs[i])) in nl80211_scan_common()
243 nla_nest_end(msg, freqs); in nl80211_scan_common()
1186 if (params->freqs) { in wpa_driver_nl80211_vendor_scan()
1187 struct nlattr *freqs; in wpa_driver_nl80211_vendor_scan() local
[all …]
HDdriver_privsep.c120 params->freqs && params->freqs[i]; i++) in wpa_driver_privsep_scan()
121 scan.freqs[i] = params->freqs[i]; in wpa_driver_privsep_scan()
HDdriver_nl80211_event.c1976 int freqs[MAX_REPORT_FREQS]; in send_scan_event() local
2016 freqs[num_freqs] = nla_get_u32(nl); in send_scan_event()
2018 freqs[num_freqs]); in send_scan_event()
2025 info->freqs = freqs; in send_scan_event()
2973 int freqs[MAX_REPORT_FREQS]; in send_vendor_scan_event() local
3009 freqs[num_freqs] = nla_get_u32(nl); in send_vendor_scan_event()
3011 freqs[num_freqs]); in send_vendor_scan_event()
3019 info->freqs = freqs; in send_vendor_scan_event()
/freebsd-13-stable/sys/x86/cpufreq/
HDest.c860 static int est_acpi_info(device_t dev, freq_info **freqs,
862 static int est_table_info(device_t dev, uint64_t msr, freq_info **freqs,
864 static int est_msr_info(device_t dev, uint64_t msr, freq_info **freqs,
1060 est_acpi_info(device_t dev, freq_info **freqs, size_t *freqslen) in est_acpi_info() argument
1114 *freqs = table; in est_acpi_info()
1127 est_table_info(device_t dev, uint64_t msr, freq_info **freqs, size_t *freqslen) in est_table_info() argument
1147 *freqs = p->freqtab; in est_table_info()
1171 est_msr_info(device_t dev, uint64_t msr, freq_info **freqs, size_t *freqslen) in est_msr_info() argument
1233 *freqs = fp; in est_msr_info()
/freebsd-13-stable/contrib/wpa/src/ap/
HDhw_features.c438 params->freqs = os_calloc(mode->num_channels + 1, sizeof(int)); in ieee80211n_scan_channels_2g4()
439 if (params->freqs == NULL) in ieee80211n_scan_channels_2g4()
450 params->freqs[pos++] = chan->freq; in ieee80211n_scan_channels_2g4()
479 params->freqs = os_calloc(mode->num_channels + 1, sizeof(int)); in ieee80211n_scan_channels_5g()
480 if (params->freqs == NULL) in ieee80211n_scan_channels_5g()
491 params->freqs[pos++] = chan->freq; in ieee80211n_scan_channels_5g()
517 os_free(params.freqs); in ap_ht40_scan_retry()
572 os_free(params.freqs); in ieee80211n_check_40mhz()
HDacs.c1410 params.freqs = os_calloc(num_channels + 1, sizeof(params.freqs[0])); in acs_request_scan()
1411 if (params.freqs == NULL) in acs_request_scan()
1414 freq = params.freqs; in acs_request_scan()
1424 if (params.freqs == freq) { in acs_request_scan()
1426 os_free(params.freqs); in acs_request_scan()
1442 os_free(params.freqs); in acs_request_scan()
/freebsd-13-stable/sys/dev/ath/ath_hal/
HDah_regdomain.h162 REG_DMN_FREQ_BAND *freqs; member
/freebsd-13-stable/contrib/wpa/src/common/
HDprivsep_commands.h40 u16 freqs[PRIVSEP_MAX_SCAN_FREQS]; member
HDdpp.c553 static int freq_included(const unsigned int freqs[], unsigned int num, in freq_included() argument
557 if (freqs[--num] == freq) in freq_included()
564 static void freq_to_start(unsigned int freqs[], unsigned int num, in freq_to_start() argument
570 if (freqs[i] == freq) in freq_to_start()
575 os_memmove(&freqs[1], &freqs[0], i * sizeof(freqs[0])); in freq_to_start()
576 freqs[0] = freq; in freq_to_start()
649 char freqs[DPP_BOOTSTRAP_MAX_FREQ * 6 + 10], *pos, *end; in dpp_prepare_channel_list() local
677 pos = freqs; in dpp_prepare_channel_list()
678 end = pos + sizeof(freqs); in dpp_prepare_channel_list()
687 freqs); in dpp_prepare_channel_list()
/freebsd-13-stable/contrib/wpa/wpa_supplicant/dbus/
HDdbus_new_handlers.c1501 int *freqs = NULL, *nfreqs; in wpas_dbus_get_scan_channels() local
1542 os_free(freqs); in wpas_dbus_get_scan_channels()
1556 os_free(freqs); in wpas_dbus_get_scan_channels()
1565 freqs, freqs_num + FREQS_ALLOC_CHUNK, in wpas_dbus_get_scan_channels()
1568 os_free(freqs); in wpas_dbus_get_scan_channels()
1569 freqs = nfreqs; in wpas_dbus_get_scan_channels()
1571 if (freqs == NULL) { in wpas_dbus_get_scan_channels()
1576 freqs[freqs_num] = freq; in wpas_dbus_get_scan_channels()
1582 nfreqs = os_realloc_array(freqs, freqs_num + 1, sizeof(int)); in wpas_dbus_get_scan_channels()
1584 os_free(freqs); in wpas_dbus_get_scan_channels()
[all …]

12