/freebsd-12-stable/contrib/wpa/src/utils/ |
H A D | bitfield.c | 23 struct bitfield *bf; local 25 bf = os_zalloc(sizeof(*bf) + (max_bits + 7) / 8); 26 if (bf == NULL) 28 bf->bits = (u8 *) (bf + 1); 29 bf->max_bits = max_bits; 30 return bf; 34 void bitfield_free(struct bitfield *bf) argument 36 os_free(bf); 40 bitfield_set(struct bitfield *bf, size_t bit) argument 48 bitfield_clear(struct bitfield *bf, size_t bit) argument 56 bitfield_is_set(struct bitfield *bf, size_t bit) argument 76 bitfield_get_first_zero(struct bitfield *bf) argument [all...] |
H A D | bitfield.h | 15 void bitfield_free(struct bitfield *bf); 16 void bitfield_set(struct bitfield *bf, size_t bit); 17 void bitfield_clear(struct bitfield *bf, size_t bit); 18 int bitfield_is_set(struct bitfield *bf, size_t bit); 19 int bitfield_get_first_zero(struct bitfield *bf);
|
H A D | utils_module_tests.c | 130 struct bitfield *bf; local 136 bf = bitfield_alloc(123); 137 if (bf == NULL) 141 if (bitfield_is_set(bf, i) || bitfield_is_set(bf, i + 1)) 143 if (i > 0 && bitfield_is_set(bf, i - 1)) 145 bitfield_set(bf, i); 146 if (!bitfield_is_set(bf, i)) 148 bitfield_clear(bf, i); 149 if (bitfield_is_set(bf, [all...] |
/freebsd-12-stable/sys/dev/ath/ |
H A D | if_ath_tx.c | 130 struct ieee80211_node *ni, struct ath_buf *bf, struct mbuf *m0); 135 struct ath_tid *tid, struct ath_buf *bf); 141 struct ath_buf *bf; local 146 bf = bf_first; 148 while (bf != NULL) { 150 if (bf->bf_nseg == 0) 152 n = ((bf->bf_nseg - 1) / sc->sc_tx_nmaps) + 1; 153 for (i = 0, ds = (const char *) bf->bf_desc; 161 bf = bf 198 ath_tx_set_retry(struct ath_softc *sc, struct ath_buf *bf) argument 259 struct ath_buf *bf, *next; local 281 struct ath_buf *bf; local 302 ath_tx_dmasetup(struct ath_softc *sc, struct ath_buf *bf, struct mbuf *m0) argument 365 ath_tx_chaindesclist(struct ath_softc *sc, struct ath_desc *ds0, struct ath_buf *bf, bool is_aggr, int is_first_subframe, int is_last_subframe) argument 507 ath_tx_set_ratectrl(struct ath_softc *sc, struct ieee80211_node *ni, struct ath_buf *bf) argument 554 struct ath_buf *bf, *bf_prev = NULL; local 699 ath_tx_handoff_mcast(struct ath_softc *sc, struct ath_txq *txq, struct ath_buf *bf) argument 742 ath_tx_handoff_hw(struct ath_softc *sc, struct ath_txq *txq, struct ath_buf *bf) argument 913 struct ath_buf *bf, *bf_last; local 960 ath_legacy_xmit_handoff(struct ath_softc *sc, struct ath_txq *txq, struct ath_buf *bf) argument 1046 ath_tx_calc_protection(struct ath_softc *sc, struct ath_buf *bf) argument 1119 ath_tx_calc_duration(struct ath_softc *sc, struct ath_buf *bf) argument 1259 ath_tx_set_rtscts(struct ath_softc *sc, struct ath_buf *bf) argument 1331 ath_tx_setds(struct ath_softc *sc, struct ath_buf *bf) argument 1379 ath_tx_do_ratelookup(struct ath_softc *sc, struct ath_buf *bf, int tid, int pktlen, int is_aggr) argument 1418 ath_tx_update_clrdmask(struct ath_softc *sc, struct ath_tid *tid, struct ath_buf *bf) argument 1505 ath_tx_xmit_normal(struct ath_softc *sc, struct ath_txq *txq, struct ath_buf *bf) argument 1555 ath_tx_normal_setup(struct ath_softc *sc, struct ieee80211_node *ni, struct ath_buf *bf, struct mbuf *m0, struct ath_txq *txq) argument 1904 ath_tx_start(struct ath_softc *sc, struct ieee80211_node *ni, struct ath_buf *bf, struct mbuf *m0) argument 2139 ath_tx_raw_start(struct ath_softc *sc, struct ieee80211_node *ni, struct ath_buf *bf, struct mbuf *m0, const struct ieee80211_bpf_params *params) argument 2425 struct ath_buf *bf; local 2657 ath_tx_addto_baw(struct ath_softc *sc, struct ath_node *an, struct ath_tid *tid, struct ath_buf *bf) argument 2795 ath_tx_update_baw(struct ath_softc *sc, struct ath_node *an, struct ath_tid *tid, const struct ath_buf *bf) argument 2846 ath_tx_leak_count_update(struct ath_softc *sc, struct ath_tid *tid, struct ath_buf *bf) argument 2984 ath_tx_tid_seqno_assign(struct ath_softc *sc, struct ieee80211_node *ni, struct ath_buf *bf, struct mbuf *m0) argument 3048 ath_tx_xmit_aggr(struct ath_softc *sc, struct ath_node *an, struct ath_txq *txq, struct ath_buf *bf) argument 3137 ath_tx_swq(struct ath_softc *sc, struct ieee80211_node *ni, struct ath_txq *txq, int queue_to_head, struct ath_buf *bf) argument 3430 ath_tx_tid_filt_addbuf(struct ath_softc *sc, struct ath_tid *tid, struct ath_buf *bf) argument 3455 ath_tx_tid_filt_comp_buf(struct ath_softc *sc, struct ath_tid *tid, struct ath_buf *bf) argument 3482 struct ath_buf *bf; local 3523 ath_tx_tid_filt_comp_single(struct ath_softc *sc, struct ath_tid *tid, struct ath_buf *bf) argument 3577 struct ath_buf *bf, *bf_next, *nbf; local 3808 ath_tx_tid_drain_pkt(struct ath_softc *sc, struct ath_node *an, struct ath_tid *tid, ath_bufhead *bf_cq, struct ath_buf *bf) argument 3848 ath_tx_tid_drain_print(struct ath_softc *sc, struct ath_node *an, const char *pfx, struct ath_tid *tid, struct ath_buf *bf) argument 3933 struct ath_buf *bf; local 4093 struct ath_buf *bf; local 4148 struct ath_buf *bf; local 4188 ath_tx_normal_comp(struct ath_softc *sc, struct ath_buf *bf, int fail) argument 4275 ath_tx_comp_cleanup_unaggr(struct ath_softc *sc, struct ath_buf *bf) argument 4319 struct ath_buf *bf, *bf_next; local 4384 struct ath_buf *bf, *bf_next; local 4451 ath_tx_retry_clone(struct ath_softc *sc, struct ath_node *an, struct ath_tid *tid, struct ath_buf *bf) argument 4517 ath_tx_aggr_retry_unaggr(struct ath_softc *sc, struct ath_buf *bf) argument 4607 ath_tx_retry_subframe(struct ath_softc *sc, struct ath_buf *bf, ath_bufhead *bf_q) argument 4678 struct ath_buf *bf_next, *bf; local 4761 struct ath_buf *bf, *bf_next; local 4837 struct ath_buf *bf, *bf_next; local 5165 ath_tx_aggr_comp_unaggr(struct ath_softc *sc, struct ath_buf *bf, int fail) argument 5354 ath_tx_aggr_comp(struct ath_softc *sc, struct ath_buf *bf, int fail) argument 5374 struct ath_buf *bf; local 5430 struct ath_buf *bf; local 5661 struct ath_buf *bf; local 6050 struct ath_buf *bf; local 6126 struct ath_buf *bf; local [all...] |
H A D | if_ath_tx_ht.h | 56 extern void ath_tx_rate_fill_rcflags(struct ath_softc *sc, struct ath_buf *bf); 59 struct ieee80211_node *ni, struct ath_buf *bf);
|
H A D | if_ath_debug.c | 101 ath_printrxbuf(struct ath_softc *sc, const struct ath_buf *bf, argument 104 const struct ath_rx_status *rs = &bf->bf_status.ds_rxstat; 109 for (i = 0, ds = bf->bf_desc; i < bf->bf_nseg; i++, ds++) { 112 ix, ds, (const struct ath_desc *)bf->bf_daddr + i, 142 const struct ath_buf *bf = first_bf; local 147 printf("Q%u[%3u] (nseg=%d)", qnum, ix, bf->bf_nseg); 148 while (bf != NULL) { 157 n = ((bf->bf_nseg - 1) / 4) + 1; 159 for (i = 0, ds = (const char *) bf 204 const struct ath_buf *bf = first_bf; local [all...] |
H A D | if_ath_tx_edma.c | 176 struct ath_buf *bf, *bf_last; local 208 bf = ATH_TXQ_FIRST(txq); 209 if (bf == NULL) 211 ATH_TXQ_REMOVE(txq, bf, bf_list); 214 TAILQ_INSERT_TAIL(&sq, bf, bf_list); 217 bf->bf_flags &= ~(ATH_BUF_FIFOPTR | ATH_BUF_FIFOEND); 228 bf = TAILQ_FIRST(&sq); 239 bf->bf_flags |= ATH_BUF_FIFOPTR; 285 ath_hal_puttxbuf(sc->sc_ah, txq->axq_qnum, bf->bf_daddr); 406 struct ath_buf *bf; local 530 ath_edma_xmit_handoff_hw(struct ath_softc *sc, struct ath_txq *txq, struct ath_buf *bf) argument 567 ath_edma_xmit_handoff_mcast(struct ath_softc *sc, struct ath_txq *txq, struct ath_buf *bf) argument 622 ath_edma_xmit_handoff(struct ath_softc *sc, struct ath_txq *txq, struct ath_buf *bf) argument 802 struct ath_buf *bf; local [all...] |
H A D | if_ath_beacon.c | 186 struct ath_buf *bf; local 190 bf = avp->av_bcbuf; 192 __func__, bf->bf_m, bf->bf_node); 193 if (bf->bf_m != NULL) { 194 bus_dmamap_unload(sc->sc_dmat, bf->bf_dmamap); 195 m_freem(bf->bf_m); 196 bf->bf_m = NULL; 198 if (bf->bf_node != NULL) { 199 ieee80211_free_node(bf 268 ath_beacon_setup(struct ath_softc *sc, struct ath_buf *bf) argument 437 struct ath_buf *bf; local 570 struct ath_buf *bf, *bf_last; local 662 struct ath_buf *bf; local 703 struct ath_buf *bf; local 829 struct ath_buf *bf; local 868 ath_beacon_return(struct ath_softc *sc, struct ath_buf *bf) argument 891 struct ath_buf *bf; local [all...] |
H A D | if_ath_descdma.c | 247 struct ath_buf *bf; local 263 bf = malloc(bsize, M_ATHDEV, M_NOWAIT | M_ZERO); 264 if (bf == NULL) { 270 dd->dd_bufptr = bf; 273 for (i = 0; i < nbuf; i++, bf++, ds += (ndesc * dd->dd_descsize)) { 274 bf->bf_desc = (struct ath_desc *) ds; 275 bf->bf_daddr = DS2PHYS(dd, ds); 282 if (ATH_DESC_4KB_BOUND_CHECK(bf->bf_daddr, 285 ds += 0x1000 - (bf->bf_daddr & 0xFFF); 286 bf 331 struct ath_buf *bf; local 388 struct ath_buf *bf; local [all...] |
H A D | if_ath_tx_ht.c | 224 ath_tx_rate_fill_rcflags(struct ath_softc *sc, struct ath_buf *bf) argument 226 struct ieee80211_node *ni = bf->bf_node; 230 struct ath_rc_series *rc = bf->bf_state.bfs_rc; 252 if (bf->bf_flags & ATH_BUF_TOA_PROBE) 267 if ((! IS_HT_RATE(rate)) && bf->bf_state.bfs_shpream) 275 if (bf->bf_state.bfs_txflags & 305 (bf->bf_flags & ATH_BUF_TOA_PROBE) == 0) { 313 (bf->bf_flags & ATH_BUF_TOA_PROBE) == 0) { 328 (bf->bf_flags & ATH_BUF_TOA_PROBE) == 0) { 379 bf 565 ath_get_aggr_limit(struct ath_softc *sc, struct ieee80211_node *ni, struct ath_buf *bf) argument 616 ath_rateseries_setup(struct ath_softc *sc, struct ieee80211_node *ni, struct ath_buf *bf, HAL_11N_RATE_SERIES *series) argument 743 ath_buf_set_rate(struct ath_softc *sc, struct ieee80211_node *ni, struct ath_buf *bf) argument 824 struct ath_buf *bf, *bf_first = NULL, *bf_prev = NULL; local [all...] |
H A D | if_ath_rx_edma.c | 154 static void ath_edma_rxbuf_free(struct ath_softc *sc, struct ath_buf *bf); 210 struct ath_buf *bf; local 219 bf = re->m_fifo[i]; 225 (uintmax_t)bf->bf_daddr); 226 ath_hal_putrxbuf(sc->sc_ah, bf->bf_daddr, qtype); 417 struct ath_buf *bf; local 448 bf = re->m_fifo[re->m_fifo_head]; 450 if (bf == NULL) { 451 device_printf(sc->sc_dev, "%s: Q%d: NULL bf?\n", 456 m = bf 530 struct ath_buf *bf; local 555 struct ath_buf *bf, *next; local 677 ath_edma_rxbuf_init(struct ath_softc *sc, struct ath_buf *bf) argument 758 struct ath_buf *bf; local 791 ath_edma_rxbuf_free(struct ath_softc *sc, struct ath_buf *bf) argument 820 struct ath_buf *bf; local 894 struct ath_buf *bf = re->m_fifo[i]; local [all...] |
H A D | if_ath_misc.h | 55 struct ath_buf *bf); 57 extern void ath_freebuf(struct ath_softc *sc, struct ath_buf *bf); 58 extern void ath_returnbuf_head(struct ath_softc *sc, struct ath_buf *bf); 59 extern void ath_returnbuf_tail(struct ath_softc *sc, struct ath_buf *bf); 63 extern void ath_tx_default_comp(struct ath_softc *sc, struct ath_buf *bf, 73 extern void ath_tx_freebuf(struct ath_softc *sc, struct ath_buf *bf, 94 struct ath_txq *txq, struct ath_tx_status *ts, struct ath_buf *bf);
|
H A D | if_ath_rx.c | 248 ath_legacy_rxbuf_init(struct ath_softc *sc, struct ath_buf *bf) argument 257 m = bf->bf_m; 276 bf->bf_dmamap, m, 277 bf->bf_segs, &bf->bf_nseg, 287 KASSERT(bf->bf_nseg == 1, 288 ("multi-segment packet; nseg %u", bf->bf_nseg)); 289 bf->bf_m = m; 291 bus_dmamap_sync(sc->sc_dmat, bf->bf_dmamap, BUS_DMASYNC_PREREAD); 314 ds = bf 658 ath_rx_pkt(struct ath_softc *sc, struct ath_rx_status *rs, HAL_STATUS status, uint64_t tsf, int nf, HAL_RX_QUEUE qtype, struct ath_buf *bf, struct mbuf *m) argument 1073 struct ath_buf *bf; local 1349 struct ath_buf *bf; local 1408 struct ath_buf *bf; local 1451 struct ath_buf *bf; local [all...] |
/freebsd-12-stable/contrib/bearssl/src/ssl/ |
H A D | ssl_hashes.c | 29 br_ssl_choose_hash(unsigned bf) argument 41 if ((bf >> x) & 1) {
|
/freebsd-12-stable/usr.sbin/fstyp/ |
H A D | ntfs.c | 102 struct ntfs_bootfile *bf; local 113 bf = (struct ntfs_bootfile *)read_buf(fp, 0, 512); 114 if (bf == NULL || strncmp(bf->bf_sysid, "NTFS ", 8) != 0) 118 mftrecsz = bf->bf_mftrecsz; 119 recsize = (mftrecsz > 0) ? (mftrecsz * bf->bf_bps * bf->bf_spc) : (1 << -mftrecsz); 121 voloff = bf->bf_mftcn * bf->bf_spc * bf [all...] |
/freebsd-12-stable/sys/dev/mlx4/mlx4_core/ |
H A D | mlx4_pd.c | 172 int mlx4_bf_alloc(struct mlx4_dev *dev, struct mlx4_bf *bf, int node) argument 221 bf->uar = uar; 222 bf->offset = 0; 223 bf->buf_size = dev->caps.bf_reg_size / 2; 224 bf->reg = uar->bf_map + idx * dev->caps.bf_reg_size; 231 bf->uar = NULL; 246 void mlx4_bf_free(struct mlx4_dev *dev, struct mlx4_bf *bf) argument 251 if (!bf->uar || !bf->uar->bf_map) 255 idx = (bf [all...] |
/freebsd-12-stable/sys/dev/malo/ |
H A D | if_malo.c | 514 struct malo_rxbuf *bf; local 527 bf = malloc(bsize, M_MALODEV, M_NOWAIT | M_ZERO); 528 if (bf == NULL) { 533 sc->malo_rxdma.dd_bufptr = bf; 537 for (i = 0; i < malo_rxbuf; i++, bf++, ds++) { 538 bf->bf_desc = ds; 539 bf->bf_daddr = DS2PHYS(&sc->malo_rxdma, ds); 541 &bf->bf_dmamap); 549 STAILQ_INSERT_TAIL(&sc->malo_rxbuf, bf, bf_list); 558 struct malo_txbuf *bf; local 611 struct malo_rxbuf *bf; local 635 struct malo_txbuf *bf; local 746 struct malo_txbuf *bf, *bn; local 781 struct malo_txbuf *bf; local 799 malo_tx_dmasetup(struct malo_softc *sc, struct malo_txbuf *bf, struct mbuf *m0) argument 857 malo_printrxbuf(const struct malo_rxbuf *bf, u_int ix) argument 874 malo_printtxbuf(const struct malo_txbuf *bf, u_int qnum, u_int ix) argument 927 struct malo_txbuf *bf; local 1030 malo_tx_start(struct malo_softc *sc, struct ieee80211_node *ni, struct malo_txbuf *bf, struct mbuf *m0) argument 1231 struct malo_txbuf *bf = NULL; local 1341 malo_getrxmbuf(struct malo_softc *sc, struct malo_rxbuf *bf) argument 1369 malo_rxbuf_init(struct malo_softc *sc, struct malo_rxbuf *bf) argument 1409 struct malo_rxbuf *bf, *prev; local 1578 struct malo_txbuf *bf; local 1774 struct malo_txbuf *bf; local 1944 struct malo_rxbuf *bf; local [all...] |
/freebsd-12-stable/sys/geom/label/ |
H A D | g_label_ntfs.c | 100 struct ntfs_bootfile *bf; local 115 bf = (struct ntfs_bootfile *)g_read_data(cp, 0, pp->sectorsize, NULL); 116 if (bf == NULL || strncmp(bf->bf_sysid, "NTFS ", 8) != 0) 119 mftrecsz = bf->bf_mftrecsz; 120 recsize = (mftrecsz > 0) ? (mftrecsz * bf->bf_bps * bf->bf_spc) : (1 << -mftrecsz); 124 voloff = bf->bf_mftcn * bf->bf_spc * bf [all...] |
/freebsd-12-stable/contrib/ntp/sntp/libopts/ |
H A D | pgusage.c | 39 char * bf; local 48 bf = AGALOC(bfsz, "tmp fil"); 49 snprintf(bf, bfsz, TMP_FILE_FMT, tmpdir, my_pid); 55 int fd = mkstemp(bf); 59 AGFREE(bf); 62 *buf = bf;
|
/freebsd-12-stable/contrib/file/src/ |
H A D | encoding.c | 423 looks_ucs16(const unsigned char *bf, size_t nbytes, unichar *ubf, argument 432 if (bf[0] == 0xff && bf[1] == 0xfe) 434 else if (bf[0] == 0xfe && bf[1] == 0xff) 445 ubf[(*ulen)++] = bf[i + 1] 446 | (CAST(unichar, bf[i]) << 8); 448 ubf[(*ulen)++] = bf[i] 449 | (CAST(unichar, bf[i + 1]) << 8); 462 looks_ucs32(const unsigned char *bf, size_ argument [all...] |
/freebsd-12-stable/contrib/gdb/gdb/ |
H A D | dve3900-rom.c | 69 static unsigned long fetch_fields (struct bit_field *bf); 70 static void fetch_bitmapped_register (int regno, struct bit_field *bf); 72 static void store_bitmapped_register (int regno, struct bit_field *bf); 432 fetch_fields (struct bit_field *bf) argument 438 for (; bf->prefix != NULL; bf++) 440 monitor_expect (bf->prefix, NULL, 0); /* get prefix */ 441 monitor_expect (bf->suffix, buf, sizeof (buf)); /* hex value, suffix */ 442 if (bf->length != 0) 445 bits &= ((1 << bf 456 fetch_bitmapped_register(int regno, struct bit_field *bf) argument 504 store_bitmapped_register(int regno, struct bit_field *bf) argument [all...] |
/freebsd-12-stable/contrib/netbsd-tests/lib/libm/ |
H A D | t_round.c | 59 float af = VALF, bf, cf; local 63 bf = roundf(af); 67 ATF_CHECK(fabsf(bf) < SMALL_NUM);
|
/freebsd-12-stable/contrib/sendmail/src/ |
H A D | bf.c | 21 SM_RCSID("@(#)$Id: bf.c,v 8.63 2013-11-22 20:51:55 ca Exp $") 32 #include "bf.h" 36 /* bf io functions */ 53 struct bf struct 108 struct bf *bfp; 132 bfp = (struct bf *) sm_malloc(sizeof(struct bf)); 268 struct bf *bfp; 270 bfp = (struct bf *) fp->f_cookie; 302 struct bf *bf [all...] |
/freebsd-12-stable/sys/dev/mlx5/mlx5_core/ |
H A D | mlx5_uar.c | 77 struct mlx5_bf *bf; local 113 bf = &uuari->bfs[i]; 115 bf->buf_size = (1 << MLX5_CAP_GEN(dev, log_bf_reg_size)) / 2; 116 bf->uar = &uuari->uars[i / MLX5_BF_REGS_PER_PAGE]; 117 bf->regreg = uuari->uars[i / MLX5_BF_REGS_PER_PAGE].map; 118 bf->reg = NULL; /* Add WC support */ 119 bf->offset = (i % MLX5_BF_REGS_PER_PAGE) * 122 bf->need_lock = need_uuar_lock(i); 123 spin_lock_init(&bf->lock); 124 spin_lock_init(&bf [all...] |
/freebsd-12-stable/sys/dev/mwl/ |
H A D | if_mwl.c | 247 static void mwl_printrxbuf(const struct mwl_rxbuf *bf, u_int ix); 248 static void mwl_printtxbuf(const struct mwl_txbuf *bf, u_int qnum, u_int ix); 1268 struct mwl_txbuf *bf; local 1274 bf = STAILQ_FIRST(&txq->free); 1275 if (bf != NULL) { 1280 if (bf == NULL) 1283 return bf; 1293 mwl_puttxbuf_head(struct mwl_txq *txq, struct mwl_txbuf *bf) argument 1295 bf->bf_m = NULL; 1296 bf 1304 mwl_puttxbuf_tail(struct mwl_txq *txq, struct mwl_txbuf *bf) argument 1339 struct mwl_txbuf *bf; local 1419 struct mwl_txbuf *bf; local 2010 struct mwl_txbuf *bf; local 2027 struct mwl_txbuf *bf; local 2065 struct mwl_txbuf *bf; local 2089 struct mwl_rxbuf *bf; local 2485 mwl_rxbuf_init(struct mwl_softc *sc, struct mwl_rxbuf *bf) argument 2610 struct mwl_rxbuf *bf; local 2829 struct mwl_txbuf *bf, *bn; local 2947 mwl_tx_dmasetup(struct mwl_softc *sc, struct mwl_txbuf *bf, struct mbuf *m0) argument 3069 mwl_tx_start(struct mwl_softc *sc, struct ieee80211_node *ni, struct mwl_txbuf *bf, struct mbuf *m0) argument 3325 struct mwl_txbuf *bf; local 3444 struct mwl_txbuf *bf; local 3522 struct mwl_txbuf *bf; local 3725 struct mwl_rxbuf *bf, *prev; local 4484 mwl_printrxbuf(const struct mwl_rxbuf *bf, u_int ix) argument 4500 mwl_printtxbuf(const struct mwl_txbuf *bf, u_int qnum, u_int ix) argument [all...] |