/freebsd/sys/gnu/dev/bwn/phy_n/ |
H A D | if_bwn_phy_n_core.c | 162 static inline bool bwn_nphy_ipa(struct bwn_mac *mac) in bwn_nphy_ipa() argument 164 bwn_band_t band = bwn_current_band(mac); in bwn_nphy_ipa() 165 return ((mac->mac_phy.phy_n->ipa2g_on && band == BWN_BAND_2G) || in bwn_nphy_ipa() 166 (mac->mac_phy.phy_n->ipa5g_on && band == BWN_BAND_5G)); in bwn_nphy_ipa() 170 static uint8_t bwn_nphy_get_rx_core_state(struct bwn_mac *mac) in bwn_nphy_get_rx_core_state() argument 172 return (BWN_PHY_READ(mac, BWN_NPHY_RFSEQCA) & BWN_NPHY_RFSEQCA_RXEN) >> in bwn_nphy_get_rx_core_state() 181 static void bwn_nphy_force_rf_sequence(struct bwn_mac *mac, in bwn_nphy_force_rf_sequence() argument 193 uint16_t seq_mode = BWN_PHY_READ(mac, BWN_NPHY_RFSEQMODE); in bwn_nphy_force_rf_sequence() 196 BWN_WARNPRINTF(mac->mac_sc, "%s: seq %d > max", __func__, seq); in bwn_nphy_force_rf_sequence() 199 BWN_PHY_SET(mac, BWN_NPHY_RFSEQMODE, in bwn_nphy_force_rf_sequence() [all …]
|
/freebsd/sys/dev/bwi/ |
H A D | bwiphy.c | 87 static void bwi_tbl_write_2(struct bwi_mac *mac, uint16_t, uint16_t); 88 static void bwi_tbl_write_4(struct bwi_mac *mac, uint16_t, uint32_t); 135 bwi_phy_write(struct bwi_mac *mac, uint16_t ctrl, uint16_t data) in bwi_phy_write() argument 137 struct bwi_softc *sc = mac->mac_sc; in bwi_phy_write() 144 bwi_phy_read(struct bwi_mac *mac, uint16_t ctrl) in bwi_phy_read() argument 146 struct bwi_softc *sc = mac->mac_sc; in bwi_phy_read() 153 bwi_phy_attach(struct bwi_mac *mac) in bwi_phy_attach() argument 155 struct bwi_softc *sc = mac->mac_sc; in bwi_phy_attach() 156 struct bwi_phy *phy = &mac->mac_phy; in bwi_phy_attach() 223 bwi_phy_set_bbp_atten(struct bwi_mac *mac, uint16_t bbp_atten) in bwi_phy_set_bbp_atten() argument [all …]
|
H A D | bwirf.c | 78 #define RF_LO_WRITE(mac, lo) bwi_rf_lo_write((mac), (lo)) argument 106 #define SAVE_RF_REG(mac, regs, n) (regs)->rf_##n = RF_READ((mac), 0x##n) argument 107 #define RESTORE_RF_REG(mac, regs, n) RF_WRITE((mac), 0x##n, (regs)->rf_##n) argument 109 #define SAVE_PHY_REG(mac, regs, n) (regs)->phy_##n = PHY_READ((mac), 0x##n) argument 110 #define RESTORE_PHY_REG(mac, regs, n) PHY_WRITE((mac), 0x##n, (regs)->phy_##n) argument 159 bwi_nrssi_11g(struct bwi_mac *mac) in bwi_nrssi_11g() argument 165 val = (int16_t)__SHIFTOUT(PHY_READ(mac, 0x47f), NRSSI_11G_MASK); in bwi_nrssi_11g() 174 bwi_get_rf_lo(struct bwi_mac *mac, uint16_t rf_atten, uint16_t bbp_atten) in bwi_get_rf_lo() argument 181 return &mac->mac_rf.rf_lo[n]; in bwi_get_rf_lo() 185 bwi_rf_lo_isused(struct bwi_mac *mac, const struct bwi_rf_lo *lo) in bwi_rf_lo_isused() argument [all …]
|
H A D | bwimac.c | 118 bwi_tmplt_write_4(struct bwi_mac *mac, uint32_t ofs, uint32_t val) in bwi_tmplt_write_4() argument 120 struct bwi_softc *sc = mac->mac_sc; in bwi_tmplt_write_4() 122 if (mac->mac_flags & BWI_MAC_F_BSWAP) in bwi_tmplt_write_4() 130 bwi_hostflags_write(struct bwi_mac *mac, uint64_t flags) in bwi_hostflags_write() argument 135 MOBJ_WRITE_2(mac, BWI_COMM_MOBJ, BWI_COMM_MOBJ_HFLAGS_LO, val); in bwi_hostflags_write() 138 MOBJ_WRITE_2(mac, BWI_COMM_MOBJ, BWI_COMM_MOBJ_HFLAGS_MI, val); in bwi_hostflags_write() 144 bwi_hostflags_read(struct bwi_mac *mac) in bwi_hostflags_read() argument 151 val = MOBJ_READ_2(mac, BWI_COMM_MOBJ, BWI_COMM_MOBJ_HFLAGS_MI); in bwi_hostflags_read() 154 val = MOBJ_READ_2(mac, BWI_COMM_MOBJ, BWI_COMM_MOBJ_HFLAGS_LO); in bwi_hostflags_read() 161 bwi_memobj_read_2(struct bwi_mac *mac, uint16_t obj_id, uint16_t ofs0) in bwi_memobj_read_2() argument [all …]
|
H A D | bwimac.h | 73 #define MOBJ_WRITE_2(mac, objid, ofs, val) \ argument 74 bwi_memobj_write_2((mac), (objid), (ofs), (val)) 75 #define MOBJ_WRITE_4(mac, objid, ofs, val) \ argument 76 bwi_memobj_write_4((mac), (objid), (ofs), (val)) 77 #define MOBJ_READ_2(mac, objid, ofs) \ argument 78 bwi_memobj_read_2((mac), (objid), (ofs)) 79 #define MOBJ_READ_4(mac, objid, ofs) \ argument 80 bwi_memobj_read_4((mac), (objid), (ofs)) 82 #define MOBJ_SETBITS_4(mac, objid, ofs, bits) \ argument 83 MOBJ_WRITE_4((mac), (objid), (ofs), \ [all …]
|
/freebsd/sys/dev/bwn/ |
H A D | if_bwn_phy_g.c | 124 static uint16_t bwn_phy_g_txctl(struct bwn_mac *mac); 125 static int bwn_phy_shm_tssi_read(struct bwn_mac *mac, uint16_t shm_offset); 126 static void bwn_phy_g_setatt(struct bwn_mac *mac, int *bbattp, int *rfattp); 127 static void bwn_phy_lock(struct bwn_mac *mac); 128 static void bwn_phy_unlock(struct bwn_mac *mac); 129 static void bwn_rf_lock(struct bwn_mac *mac); 130 static void bwn_rf_unlock(struct bwn_mac *mac); 140 bwn_has_hwpctl(struct bwn_mac *mac) in bwn_has_hwpctl() argument 143 if (mac->mac_phy.hwpctl == 0 || mac->mac_phy.use_hwpctl == NULL) in bwn_has_hwpctl() 145 return (mac->mac_phy.use_hwpctl(mac)); in bwn_has_hwpctl() [all …]
|
H A D | if_bwn.c | 537 struct bwn_mac *mac; in bwn_attach() local 549 mac = NULL; in bwn_attach() 615 mac = malloc(sizeof(*mac), M_DEVBUF, M_WAITOK | M_ZERO); in bwn_attach() 616 mac->mac_sc = sc; in bwn_attach() 617 mac->mac_status = BWN_MAC_STATUS_UNINIT; in bwn_attach() 619 mac->mac_flags |= BWN_MAC_FLAG_BADFRAME_PREEMP; in bwn_attach() 621 TASK_INIT(&mac->mac_hwreset, 0, bwn_hwreset, mac); in bwn_attach() 622 NET_TASK_INIT(&mac->mac_intrtask, 0, bwn_intrtask, mac); in bwn_attach() 623 TASK_INIT(&mac->mac_txpower, 0, bwn_txpwr, mac); in bwn_attach() 625 error = bwn_attach_core(mac); in bwn_attach() [all …]
|
H A D | if_bwn_phy_lp.c | 380 bwn_phy_lp_init_pre(struct bwn_mac *mac) in bwn_phy_lp_init_pre() argument 382 struct bwn_phy *phy = &mac->mac_phy; in bwn_phy_lp_init_pre() 389 bwn_phy_lp_init(struct bwn_mac *mac) in bwn_phy_lp_init() argument 408 struct bwn_phy_lp *plp = &mac->mac_phy.phy_lp; in bwn_phy_lp_init() 409 struct bwn_softc *sc = mac->mac_sc; in bwn_phy_lp_init() 422 if ((error = bwn_phy_lp_readsprom(mac))) in bwn_phy_lp_init() 425 bwn_phy_lp_bbinit(mac); in bwn_phy_lp_init() 428 BWN_PHY_SET(mac, BWN_PHY_4WIRECTL, 0x2); in bwn_phy_lp_init() 430 BWN_PHY_MASK(mac, BWN_PHY_4WIRECTL, 0xfffd); in bwn_phy_lp_init() 433 if (mac->mac_phy.rf_ver == 0x2062) { in bwn_phy_lp_init() [all …]
|
H A D | if_bwn_phy_n.c | 93 bwn_phy_n_attach(struct bwn_mac *mac) in bwn_phy_n_attach() argument 97 return bwn_nphy_op_allocate(mac); in bwn_phy_n_attach() 99 device_printf(mac->mac_sc->sc_dev, in bwn_phy_n_attach() 107 bwn_phy_n_detach(struct bwn_mac *mac) in bwn_phy_n_detach() argument 111 return bwn_nphy_op_free(mac); in bwn_phy_n_detach() 116 bwn_phy_n_prepare_hw(struct bwn_mac *mac) in bwn_phy_n_prepare_hw() argument 120 return (bwn_nphy_op_prepare_structs(mac)); in bwn_phy_n_prepare_hw() 127 bwn_phy_n_init_pre(struct bwn_mac *mac) in bwn_phy_n_init_pre() argument 134 bwn_phy_n_init(struct bwn_mac *mac) in bwn_phy_n_init() argument 137 return bwn_nphy_op_init(mac); in bwn_phy_n_init() [all …]
|
H A D | if_bwnvar.h | 58 #define BWN_ISOLDFMT(mac) ((mac)->mac_fw.rev <= 351) argument 61 #define BWN_HDRSIZE(mac) bwn_tx_hdrsize(mac) argument 68 #define BWN_READ_2(mac, o) \ argument 69 (bus_read_2((mac)->mac_sc->sc_mem_res, (o))) 70 #define BWN_READ_4(mac, o) \ argument 71 (bus_read_4((mac)->mac_sc->sc_mem_res, (o))) 72 #define BWN_WRITE_2(mac, o, v) \ argument 73 (bus_write_2((mac)->mac_sc->sc_mem_res, (o), (v))) 74 #define BWN_WRITE_2_F(mac, o, v) do { \ argument 75 (BWN_WRITE_2(mac, o, v)); \ [all …]
|
/freebsd/sys/dev/cxgb/common/ |
H A D | cxgb_xgmac.c | 38 static inline int macidx(const struct cmac *mac) in macidx() argument 40 return mac->offset / (XGMAC0_1_BASE_ADDR - XGMAC0_0_BASE_ADDR); in macidx() 44 * Returns a reasonable A_XGM_RESET_CTRL value for the mac specified. 46 static inline int xgm_reset_ctrl(const struct cmac *mac) in xgm_reset_ctrl() argument 48 adapter_t *adap = mac->adapter; in xgm_reset_ctrl() 52 int cfg = t3_read_reg(adap, A_XGM_PORT_CFG + mac->offset); in xgm_reset_ctrl() 65 static void xaui_serdes_reset(struct cmac *mac) in xaui_serdes_reset() argument 73 adapter_t *adap = mac->adapter; in xaui_serdes_reset() 74 u32 ctrl = A_XGM_SERDES_CTRL0 + mac->offset; in xaui_serdes_reset() 76 t3_write_reg(adap, ctrl, adap->params.vpd.xauicfg[macidx(mac)] | in xaui_serdes_reset() [all …]
|
/freebsd/crypto/openssl/test/recipes/30-test_evp_data/ |
H A D | evpkdf_kbkdf_kmac.txt | 10 # Cipher Decrypt Derive Digest Encoding KDF MAC PBE 21 Ctrl.mac = mac:KMAC128 30 Ctrl.mac = mac:KMAC128 39 Ctrl.mac = mac:KMAC128 48 Ctrl.mac = mac:KMAC128 57 Ctrl.mac = mac:KMAC128 66 Ctrl.mac = mac:KMAC128 75 Ctrl.mac = mac:KMAC128 84 Ctrl.mac = mac:KMAC128 93 Ctrl.mac = mac:KMAC128 [all …]
|
H A D | evpkdf_ss.txt | 10 # Cipher Decrypt Derive Digest Encoding KDF MAC PBE 439 Ctrl.mac = mac:HMAC 447 Ctrl.mac = mac:HMAC 455 Ctrl.mac = mac:HMAC 463 Ctrl.mac = mac:HMAC 471 Ctrl.mac = mac:HMAC 479 Ctrl.mac = mac:HMAC 487 Ctrl.mac = mac:HMAC 495 Ctrl.mac = mac:HMAC 503 Ctrl.mac = mac:HMAC [all …]
|
H A D | evpmac_poly1305.txt | 10 # Cipher Decrypt Derive Digest Encoding KDF MAC PBE 16 MAC = Poly1305 22 MAC = Poly1305 28 MAC = Poly1305 34 MAC = Poly1305 41 MAC = Poly1305 48 MAC = Poly1305 55 MAC = Poly1305 62 MAC = Poly1305 69 MAC = Poly1305 [all …]
|
H A D | evpmac_common.txt | 10 # Cipher Decrypt Derive Digest Encoding KDF MAC PBE 18 MAC = HMAC 27 MAC = HMAC 35 MAC = HMAC 46 MAC = HMAC 54 MAC = HMAC 61 MAC = HMAC 71 MAC = HMAC 80 MAC = HMAC 87 MAC = HMAC [all …]
|
H A D | evpmac_blake.txt | 10 # Cipher Decrypt Derive Digest Encoding KDF MAC PBE 16 MAC = BLAKE2BMAC 23 MAC = BLAKE2BMAC 29 MAC = BLAKE2BMAC 35 MAC = BLAKE2BMAC 40 MAC = BLAKE2BMAC 45 MAC = BLAKE2BMAC 50 MAC = BLAKE2BMAC 55 MAC = BLAKE2BMAC 60 MAC = BLAKE2BMAC [all …]
|
H A D | evpkdf_kbkdf_counter.txt | 10 # Cipher Decrypt Derive Digest Encoding KDF MAC PBE 30 Ctrl.mac = mac:CMAC 43 Ctrl.mac = mac:CMAC 56 Ctrl.mac = mac:CMAC 69 Ctrl.mac = mac:CMAC 87 Ctrl.mac = mac:CMAC 100 Ctrl.mac = mac:CMAC 113 Ctrl.mac = mac:CMAC 126 Ctrl.mac = mac:CMAC 144 Ctrl.mac = mac:CMAC [all …]
|
H A D | evpmac_siphash.txt | 10 # Cipher Decrypt Derive Digest Encoding KDF MAC PBE 14 # SIPHASH tests - default values: 2,4 rounds, 16-byte mac 19 MAC = SipHash 24 MAC = SipHash 29 MAC = SipHash 34 MAC = SipHash 39 MAC = SipHash 44 MAC = SipHash 49 MAC = SipHash 54 MAC = SipHash [all …]
|
/freebsd/crypto/openssl/crypto/evp/ |
H A D | mac_meth.c | 21 EVP_MAC *mac = vmac; in evp_mac_up_ref() local 24 CRYPTO_UP_REF(&mac->refcnt, &ref); in evp_mac_up_ref() 30 EVP_MAC *mac = vmac; in evp_mac_free() local 33 if (mac == NULL) in evp_mac_free() 36 CRYPTO_DOWN_REF(&mac->refcnt, &ref); in evp_mac_free() 39 OPENSSL_free(mac->type_name); in evp_mac_free() 40 ossl_provider_free(mac->prov); in evp_mac_free() 41 CRYPTO_FREE_REF(&mac->refcnt); in evp_mac_free() 42 OPENSSL_free(mac); in evp_mac_free() 47 EVP_MAC *mac = NULL; in evp_mac_new() local [all …]
|
/freebsd/crypto/openssl/test/ssl-tests/ |
H A D | 19-mac-then-encrypt.cnf | 5 test-0 = 0-disable-encrypt-then-mac-server-sha 6 test-1 = 1-disable-encrypt-then-mac-client-sha 7 test-2 = 2-disable-encrypt-then-mac-both-sha 8 test-3 = 3-disable-encrypt-then-mac-server-sha2 9 test-4 = 4-disable-encrypt-then-mac-client-sha2 10 test-5 = 5-disable-encrypt-then-mac-both-sha2 11 test-6 = 6-disable-encrypt-then-mac-server-sha-tls1 12 test-7 = 7-disable-encrypt-then-mac-client-sha-tls1 13 test-8 = 8-disable-encrypt-then-mac-both-sha-tls1 16 [0-disable-encrypt-then-mac-server-sha] [all …]
|
/freebsd/crypto/openssh/ |
H A D | mac.c | 1 /* $OpenBSD: mac.c,v 1.35 2019/09/06 04:53:27 djm Exp $ */ 37 #include "mac.h" 55 int etm; /* Encrypt-then-MAC */ 59 /* Encrypt-and-MAC (encrypt-and-authenticate) variants */ 69 /* Encrypt-then-MAC variants */ 106 mac_setup_by_alg(struct sshmac *mac, const struct macalg *macalg) in mac_setup_by_alg() argument 108 mac->type = macalg->type; in mac_setup_by_alg() 109 if (mac->type == SSH_DIGEST) { in mac_setup_by_alg() 110 if ((mac->hmac_ctx = ssh_hmac_start(macalg->alg)) == NULL) in mac_setup_by_alg() 112 mac->key_len = mac->mac_len = ssh_hmac_bytes(macalg->alg); in mac_setup_by_alg() [all …]
|
/freebsd/sys/security/mac/ |
H A D | mac_syscalls.c | 56 #include <sys/mac.h> 69 #include <security/mac/mac_framework.h> 70 #include <security/mac/mac_internal.h> 71 #include <security/mac/mac_policy.h> 72 #include <security/mac/mac_syscalls.h> 74 #ifdef MAC 79 struct mac *mac_p, int follow); 81 struct mac *mac_p, int follow); 91 * Copyin a 'struct mac', including the string pointed to by 'm_string'. 93 * On success (0 returned), fills '*mac', whose associated storage must be freed [all …]
|
/freebsd/lib/libc/posix1e/ |
H A D | mac.c | 49 #include <sys/mac.h> 293 mac_free(struct mac *mac) in mac_free() argument 296 if (mac->m_string != NULL) in mac_free() 297 free(mac->m_string); in mac_free() 298 free(mac); in mac_free() 304 mac_from_text(struct mac **mac, const char *text) in mac_from_text() argument 307 *mac = (struct mac *) malloc(sizeof(**mac)); in mac_from_text() 308 if (*mac == NULL) in mac_from_text() 311 (*mac)->m_string = strdup(text); in mac_from_text() 312 if ((*mac)->m_string == NULL) { in mac_from_text() [all …]
|
/freebsd/sys/dev/ath/ath_hal/ar5212/ |
H A D | ar5212reg.h | 27 #define AR_CR 0x0008 /* MAC control register */ 28 #define AR_RXDP 0x000C /* MAC receive queue descriptor pointer */ 29 #define AR_CFG 0x0014 /* MAC configuration and status register */ 30 #define AR_IER 0x0024 /* MAC Interrupt enable register */ 33 #define AR_TXCFG 0x0030 /* MAC tx DMA size config register */ 34 #define AR_RXCFG 0x0034 /* MAC rx DMA size config register */ 36 #define AR_MIBC 0x0040 /* MAC MIB control register */ 37 #define AR_TOPS 0x0044 /* MAC timeout prescale count */ 38 #define AR_RXNPTO 0x0048 /* MAC no frame received timeout */ 39 #define AR_TXNPTO 0x004C /* MAC no frame trasmitted timeout */ [all …]
|
/freebsd/secure/lib/libcrypto/man/man3/ |
H A D | EVP_MAC.3 | 73 EVP_MAC_do_all_provided \- EVP MAC routines 84 \& int EVP_MAC_up_ref(EVP_MAC *mac); 85 \& void EVP_MAC_free(EVP_MAC *mac); 86 \& int EVP_MAC_is_a(const EVP_MAC *mac, const char *name); 87 \& const char *EVP_MAC_get0_name(const EVP_MAC *mac); 88 \& int EVP_MAC_names_do_all(const EVP_MAC *mac, 91 \& const char *EVP_MAC_get0_description(const EVP_MAC *mac); 92 \& const OSSL_PROVIDER *EVP_MAC_get0_provider(const EVP_MAC *mac); 93 \& int EVP_MAC_get_params(EVP_MAC *mac, OSSL_PARAM params[]); 95 \& EVP_MAC_CTX *EVP_MAC_CTX_new(EVP_MAC *mac); [all …]
|