/freebsd/usr.sbin/powerd/ |
H A D | powerd.c | 96 static int read_freqs(int *numfreqs, int **freqs, int **power, 205 read_freqs(int *numfreqs, int **freqs, int **power, int minfreq, int maxfreq) in read_freqs() argument 225 if ((*freqs = malloc(*numfreqs * sizeof(int))) == NULL) { in read_freqs() 231 free(*freqs); in read_freqs() 238 if (sscanf(p, "%d/%d", &(*freqs)[j], &(*power)[i]) != 2) { in read_freqs() 240 free(*freqs); in read_freqs() 244 if (((*freqs)[j] >= minfreq || minfreq == -1) && in read_freqs() 245 ((*freqs)[j] <= maxfreq || maxfreq == -1)) in read_freqs() 251 if ((*freqs = realloc(*freqs, *numfreq in read_freqs() 290 get_freq_id(int freq,int * freqs,int numfreqs) get_freq_id() argument 587 int freq, curfreq, initfreq, *freqs, i, j, *mwatts, numfreqs, load; global() local [all...] |
/freebsd/contrib/wpa/wpa_supplicant/ |
H A D | bgscan_learn.c | 215 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 …]
|
H A D | scan.c | 323 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(¶ms->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 …]
|
H A D | rrm.c | 477 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 …]
|
H A D | p2p_supplicant.c | 156 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 …]
|
H A D | config.c | 1438 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 …]
|
H A D | nan_usd.c | 487 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()
|
H A D | interworking.h | 27 int *freqs);
|
H A D | wpa_priv.c | 142 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()
|
H A D | wnm_sta.c | 1330 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()
|
H A D | bgscan_simple.c | 90 params.freqs = data->ssid->scan_freq; in bgscan_simple_timeout()
|
H A D | wpa_supplicant.c | 6620 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 …]
|
H A D | events.c | 940 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/sys/contrib/zstd/lib/dictBuilder/ |
H A D | fastcover.c | 135 U32 *freqs; member 157 U32 *freqs, U32 begin, U32 end, in FASTCOVER_selectSegment() argument 185 activeSegment.score += freqs[idx]; in FASTCOVER_selectSegment() 197 activeSegment.score -= freqs[delIndex]; in FASTCOVER_selectSegment() 221 freqs[i] = 0; in FASTCOVER_selectSegment() 272 free(ctx->freqs); in FASTCOVER_ctx_destroy() 273 ctx->freqs = NULL; in FASTCOVER_ctx_destroy() 284 FASTCOVER_computeFrequency(U32* freqs, const FASTCOVER_ctx_t* ctx) in FASTCOVER_computeFrequency() argument 298 freqs[dmerIndex]++; in FASTCOVER_computeFrequency() 382 ctx->freqs = (U32*)calloc(((U64)1 << f), sizeof(U32)); in FASTCOVER_ctx_init() [all …]
|
H A D | cover.c | 229 U32 *freqs; member 413 static COVER_segment_t COVER_selectSegment(const COVER_ctx_t *ctx, U32 *freqs, in COVER_selectSegment() argument 443 activeSegment.score += freqs[newDmer]; in COVER_selectSegment() 458 activeSegment.score -= freqs[delDmer]; in COVER_selectSegment() 473 U32 freq = freqs[ctx->dmerAt[pos]]; in COVER_selectSegment() 486 freqs[ctx->dmerAt[pos]] = 0; in COVER_selectSegment() 528 if (ctx->freqs) { in COVER_ctx_destroy() 529 free(ctx->freqs); in COVER_ctx_destroy() 530 ctx->freqs = NULL; in COVER_ctx_destroy() 599 ctx->freqs = NULL; in COVER_ctx_init() [all …]
|
/freebsd/contrib/wpa/src/drivers/ |
H A D | driver_nl80211_scan.c | 232 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 …]
|
H A D | driver_privsep.c | 120 params->freqs && params->freqs[i]; i++) in wpa_driver_privsep_scan() 121 scan.freqs[i] = params->freqs[i]; in wpa_driver_privsep_scan()
|
H A D | driver_nl80211_event.c | 1976 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/sys/x86/cpufreq/ |
H A D | est.c | 859 static int est_acpi_info(device_t dev, freq_info **freqs, 861 static int est_table_info(device_t dev, uint64_t msr, freq_info **freqs, 863 static int est_msr_info(device_t dev, uint64_t msr, freq_info **freqs, 1058 est_acpi_info(device_t dev, freq_info **freqs, size_t *freqslen) in est_acpi_info() argument 1112 *freqs = table; in est_acpi_info() 1125 est_table_info(device_t dev, uint64_t msr, freq_info **freqs, size_t *freqslen) in est_table_info() argument 1145 *freqs = p->freqtab; in est_table_info() 1169 est_msr_info(device_t dev, uint64_t msr, freq_info **freqs, size_t *freqslen) in est_msr_info() argument 1231 *freqs = fp; in est_msr_info()
|
/freebsd/contrib/wpa/src/ap/ |
H A D | hw_features.c | 438 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()
|
H A D | acs.c | 1410 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/contrib/wpa/src/common/ |
H A D | privsep_commands.h | 40 u16 freqs[PRIVSEP_MAX_SCAN_FREQS]; member
|
H A D | dpp.c | 553 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/sys/dev/ath/ath_hal/ |
H A D | ah_regdomain.h | 162 REG_DMN_FREQ_BAND *freqs; member
|
/freebsd/contrib/wpa/wpa_supplicant/dbus/ |
H A D | dbus_new_handlers.c | 1501 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 …]
|