/freebsd/sys/dev/malo/ |
H A D | if_malohal.c | 59 pCmd = (_type *)&mh->mh_cmdbuf[0]; \ 66 malo_hal_read4(struct malo_hal *mh, bus_size_t off) in malo_hal_read4() argument 68 return bus_space_read_4(mh->mh_iot, mh->mh_ioh, off); in malo_hal_read4() 72 malo_hal_write4(struct malo_hal *mh, bus_size_t off, uint32_t val) in malo_hal_write4() argument 74 bus_space_write_4(mh->mh_iot, mh->mh_ioh, off, val); in malo_hal_write4() 99 struct malo_hal *mh; in malo_hal_attach() local 101 mh = malloc(sizeof(struct malo_hal), M_DEVBUF, M_NOWAIT | M_ZERO); in malo_hal_attach() 102 if (mh == NULL) in malo_hal_attach() 105 mh->mh_dev = dev; in malo_hal_attach() 106 mh->mh_ioh = ioh; in malo_hal_attach() [all …]
|
H A D | if_malohal.h | 202 #define MALO_HAL_LOCK(mh) mtx_lock(&mh->mh_mtx) argument 203 #define MALO_HAL_LOCK_ASSERT(mh) mtx_assert(&mh->mh_mtx, MA_OWNED) argument 204 #define MALO_HAL_UNLOCK(mh) mtx_unlock(&mh->mh_mtx) argument
|
H A D | if_malo.c | 168 struct malo_hal *mh; in malo_attach() local 176 mh = malo_hal_attach(sc->malo_dev, devid, in malo_attach() 178 if (mh == NULL) { in malo_attach() 183 sc->malo_mh = mh; in malo_attach() 190 error = malo_hal_fwload(mh, "malo8335-h", "malo8335-m"); in malo_attach() 196 error = malo_hal_gethwspecs(mh, &sc->malo_hwspecs); in malo_attach() 309 malo_hal_detach(mh); in malo_attach() 370 struct malo_hal *mh = sc->malo_mh; in malo_intr() local 385 malo_hal_getisr(mh, &status); /* NB: clears ISR too */ in malo_intr() 397 malo_hal_cmddone(mh); in malo_intr() [all …]
|
/freebsd/sys/dev/mwl/ |
H A D | mwlhal.c | 98 pCmd = (type *)&mh->mh_cmdbuf[0]; \ 127 struct mwl_hal_priv *mh; /* back pointer */ member 136 #define MWLVAP(_vap) ((_vap)->mh) 197 MWL_HAL_LOCK(struct mwl_hal_priv *mh) in MWL_HAL_LOCK() argument 199 mtx_lock(&mh->mh_mtx); in MWL_HAL_LOCK() 203 MWL_HAL_LOCK_ASSERT(struct mwl_hal_priv *mh) in MWL_HAL_LOCK_ASSERT() argument 205 mtx_assert(&mh->mh_mtx, MA_OWNED); in MWL_HAL_LOCK_ASSERT() 209 MWL_HAL_UNLOCK(struct mwl_hal_priv *mh) in MWL_HAL_UNLOCK() argument 211 mtx_unlock(&mh->mh_mtx); in MWL_HAL_UNLOCK() 215 RD4(struct mwl_hal_priv *mh, bus_size_t off) in RD4() argument [all …]
|
H A D | mwlhal.h | 126 mwl_hal_getisr(struct mwl_hal *mh, uint32_t *status) in mwl_hal_getisr() argument 132 cause = bus_space_read_4(mh->mh_iot, mh->mh_ioh, in mwl_hal_getisr() 138 bus_space_write_4(mh->mh_iot, mh->mh_ioh, in mwl_hal_getisr() 139 MACREG_REG_A2H_INTERRUPT_CAUSE, cause &~ mh->mh_imask); in mwl_hal_getisr() 140 (void) bus_space_read_4(mh->mh_iot, mh->mh_ioh, in mwl_hal_getisr() 142 cause &= mh->mh_imask; in mwl_hal_getisr() 149 void mwl_hal_intrset(struct mwl_hal *mh, uint32_t mask); 157 mwl_hal_txstart(struct mwl_hal *mh, int qnum) in mwl_hal_txstart() argument 163 bus_space_write_4(mh->mh_iot, mh->mh_ioh, in mwl_hal_txstart() 165 (void) bus_space_read_4(mh->mh_iot, mh->mh_ioh, MACREG_REG_INT_CODE); in mwl_hal_txstart() [all …]
|
H A D | if_mwl.c | 288 struct mwl_hal *mh; in mwl_attach() local 299 mh = mwl_hal_attach(sc->sc_dev, devid, in mwl_attach() 301 if (mh == NULL) { in mwl_attach() 306 sc->sc_mh = mh; in mwl_attach() 312 if (mwl_hal_fwload(mh, NULL) != 0) { in mwl_attach() 317 if (mwl_hal_gethwspecs(mh, &sc->sc_hwspecs) != 0) { in mwl_attach() 514 mwl_hal_detach(mh); in mwl_attach() 592 struct mwl_hal *mh = sc->sc_mh; in mwl_vap_create() local 604 hvap = mwl_hal_newvap(mh, MWL_HAL_AP, mac); in mwl_vap_create() 614 hvap = mwl_hal_newvap(mh, MWL_HAL_STA, mac); in mwl_vap_create() [all …]
|
/freebsd/tools/tools/ath/ath_ee_v4k_print/ |
H A D | v4k.c | 88 MODAL_EEP4K_HEADER *mh = &eep->ee_base.modalHeader; in eeprom_v4k_modal_print() local 91 printf("| antCtrlCommon: 0x%.8x |\n", mh->antCtrlCommon); in eeprom_v4k_modal_print() 92 printf("| switchSettling: 0x%.2x |\n", mh->switchSettling); in eeprom_v4k_modal_print() 94 mh->adcDesiredSize, (float) mh->pgaDesiredSize / 2.0); in eeprom_v4k_modal_print() 96 printf("| antCtrlChain: 0:0x%.4x |\n", mh->antCtrlChain[0]); in eeprom_v4k_modal_print() 97 printf("| antennaGainCh: 0:0x%.2x |\n", mh->antennaGainCh[0]); in eeprom_v4k_modal_print() 98 printf("| txRxAttenCh: 0:0x%.2x |\n", mh->txRxAttenCh[0]); in eeprom_v4k_modal_print() 99 printf("| rxTxMarginCh: 0:0x%.2x |\n", mh->rxTxMarginCh[0]); in eeprom_v4k_modal_print() 100 printf("| noiseFloorThresCh: 0:0x%.2x |\n", mh->noiseFloorThreshCh[0]); in eeprom_v4k_modal_print() 101 printf("| xlnaGainCh: 0:0x%.2x |\n", mh->xlnaGainCh[0]); in eeprom_v4k_modal_print() [all …]
|
/freebsd/tools/tools/ath/ath_ee_v14_print/ |
H A D | ath_ee_v14_print.c | 146 MODAL_EEP_HEADER *mh = &eep->ee_base.modalHeader[m]; in eeprom_v14_modal_print() local 149 printf("| antCtrlCommon: 0x%.8x |\n", mh->antCtrlCommon); in eeprom_v14_modal_print() 150 printf("| switchSettling: 0x%.2x |\n", mh->switchSettling); in eeprom_v14_modal_print() 152 mh->adcDesiredSize, (float) mh->pgaDesiredSize / 2.0); in eeprom_v14_modal_print() 155 mh->antCtrlChain[0], mh->antCtrlChain[1], mh->antCtrlChain[2]); in eeprom_v14_modal_print() 157 mh->antennaGainCh[0], mh->antennaGainCh[1], mh->antennaGainCh[2]); in eeprom_v14_modal_print() 159 mh->txRxAttenCh[0], mh->txRxAttenCh[1], mh->txRxAttenCh[2]); in eeprom_v14_modal_print() 161 mh->rxTxMarginCh[0], mh->rxTxMarginCh[1], mh->rxTxMarginCh[2]); in eeprom_v14_modal_print() 163 mh->noiseFloorThreshCh[0], mh->noiseFloorThreshCh[1], mh->noiseFloorThreshCh[2]); in eeprom_v14_modal_print() 165 mh->xlnaGainCh[0], mh->xlnaGainCh[1], mh->xlnaGainCh[2]); in eeprom_v14_modal_print() [all …]
|
/freebsd/tools/regression/netinet6/inet6_rth/ |
H A D | inet6_rth-segments.c | 223 struct msghdr mh; in test_cmsg_nexthdr() local 234 init_hdrs(&mh, &cmh, ancbuf, sizeof(ancbuf)); in test_cmsg_nexthdr() 235 mh.msg_control = (caddr_t)ancbuf; in test_cmsg_nexthdr() 236 mh.msg_controllen = CMSG_SPACE(0) * 2; /* 2 cmsghdr with no data */ in test_cmsg_nexthdr() 248 cmhp = CMSG_FIRSTHDR(&mh); in test_cmsg_nexthdr() 249 cmhnextp = CMSG_NXTHDR(&mh, cmhp); in test_cmsg_nexthdr() 256 init_hdrs(&mh, &cmh, ancbuf, sizeof(ancbuf)); in test_cmsg_nexthdr() 257 mh.msg_control = (caddr_t)ancbuf; in test_cmsg_nexthdr() 258 mh.msg_controllen = CMSG_SPACE(0); in test_cmsg_nexthdr() 261 cmhp = CMSG_FIRSTHDR(&mh); in test_cmsg_nexthdr() [all …]
|
/freebsd/tools/tools/ath/ath_ee_9287_print/ |
H A D | 9287.c | 96 MODAL_EEP_9287_HEADER *mh = &eep->ee_base.modalHeader; in eeprom_9287_modal_print() local 99 printf("| antCtrlCommon: 0x%.8x |\n", mh->antCtrlCommon); in eeprom_9287_modal_print() 100 printf("| switchSettling: 0x%.2x |\n", mh->switchSettling); in eeprom_9287_modal_print() 101 printf("| adcDesiredSize: %d |\n", mh->adcDesiredSize); in eeprom_9287_modal_print() 105 printf("| antCtrlChain: 0:0x%.4x |\n", mh->antCtrlChain[i]); in eeprom_9287_modal_print() 106 printf("| antennaGainCh: 0:0x%.2x |\n", mh->antennaGainCh[i]); in eeprom_9287_modal_print() 107 printf("| txRxAttenCh: 0:0x%.2x |\n", mh->txRxAttenCh[i]); in eeprom_9287_modal_print() 108 printf("| rxTxMarginCh: 0:0x%.2x |\n", mh->rxTxMarginCh[i]); in eeprom_9287_modal_print() 109 printf("| noiseFloorThresCh: 0:0x%.2x |\n", mh->noiseFloorThreshCh[i]); in eeprom_9287_modal_print() 110 printf("| iqCalICh: 0:0x%.2x |\n", mh->iqCalICh[i]); in eeprom_9287_modal_print() [all …]
|
/freebsd/sbin/camcontrol/ |
H A D | modeedit.c | 609 struct scsi_mode_header_6 *mh = in editlist_populate() local 611 mph = find_mode_page_6(mh); in editlist_populate() 613 struct scsi_mode_header_10 *mh = in editlist_populate() local 615 mph = find_mode_page_10(mh); in editlist_populate() 654 struct scsi_mode_header_6 *mh = in editlist_populate_desc() local 656 desc = (uint8_t *)(mh + 1); in editlist_populate_desc() 657 len = mh->blk_desc_len; in editlist_populate_desc() 660 struct scsi_mode_header_10 *mh = in editlist_populate_desc() local 662 desc = (uint8_t *)(mh + 1); in editlist_populate_desc() 663 len = scsi_2btoul(mh->blk_desc_len); in editlist_populate_desc() [all …]
|
/freebsd/sys/dev/hyperv/vmbus/ |
H A D | vmbus.c | 245 vmbus_msghc_reset(struct vmbus_msghc *mh, size_t dsize) in vmbus_msghc_reset() argument 252 inprm = vmbus_xact_req_data(mh->mh_xact); in vmbus_msghc_reset() 262 struct vmbus_msghc *mh; in vmbus_msghc_get() local 273 mh = vmbus_xact_priv(xact, sizeof(*mh)); in vmbus_msghc_get() 274 mh->mh_xact = xact; in vmbus_msghc_get() 276 vmbus_msghc_reset(mh, dsize); in vmbus_msghc_get() 277 return (mh); in vmbus_msghc_get() 281 vmbus_msghc_put(struct vmbus_softc *sc __unused, struct vmbus_msghc *mh) in vmbus_msghc_put() argument 284 vmbus_xact_put(mh in vmbus_msghc_put() 288 vmbus_msghc_dataptr(struct vmbus_msghc * mh) vmbus_msghc_dataptr() argument 297 vmbus_msghc_exec_noresult(struct vmbus_msghc * mh) vmbus_msghc_exec_noresult() argument 345 vmbus_msghc_exec(struct vmbus_softc * sc __unused,struct vmbus_msghc * mh) vmbus_msghc_exec() argument 357 vmbus_msghc_exec_cancel(struct vmbus_softc * sc __unused,struct vmbus_msghc * mh) vmbus_msghc_exec_cancel() argument 364 vmbus_msghc_wait_result(struct vmbus_softc * sc __unused,struct vmbus_msghc * mh) vmbus_msghc_wait_result() argument 372 vmbus_msghc_poll_result(struct vmbus_softc * sc __unused,struct vmbus_msghc * mh) vmbus_msghc_poll_result() argument 405 struct vmbus_msghc *mh; vmbus_req_tl_connect() local 439 struct vmbus_msghc *mh; vmbus_connect() local 493 struct vmbus_msghc *mh; vmbus_disconnect() local 519 struct vmbus_msghc *mh; vmbus_req_channels() local [all...] |
H A D | vmbus_chan.c | 384 struct vmbus_msghc *mh; in vmbus_chan_open_br() 455 mh = vmbus_msghc_get(sc, sizeof(*req)); in vmbus_chan_open_br() 456 if (mh == NULL) { in vmbus_chan_open_br() 464 req = vmbus_msghc_dataptr(mh); in vmbus_chan_open_br() 474 error = vmbus_msghc_exec(sc, mh); in vmbus_chan_open_br() 479 vmbus_msghc_put(sc, mh); in vmbus_chan_open_br() 484 msg = vmbus_msghc_poll_result(sc, mh); in vmbus_chan_open_br() 508 msg = vmbus_msghc_poll_result(sc, mh); in vmbus_chan_open_br() 515 vmbus_msghc_exec_cancel(sc, mh); in vmbus_chan_open_br() 528 vmbus_msghc_put(sc, mh); in vmbus_chan_open_br() 386 struct vmbus_msghc *mh; vmbus_chan_open_br() local 567 struct vmbus_msghc *mh; vmbus_chan_gpadl_connect() local 719 struct vmbus_msghc *mh; vmbus_chan_gpadl_disconnect() local 835 struct vmbus_msghc *mh; vmbus_chan_close_internal() local 2006 struct vmbus_msghc *mh; vmbus_chan_release() local [all...] |
/freebsd/contrib/tcpdump/ |
H A D | print-mobility.c | 205 const struct ip6_mobility *mh; in mobility_print() local 211 mh = (const struct ip6_mobility *)bp; in mobility_print() 216 if (!ND_TTEST_1(mh->ip6m_len)) { in mobility_print() 232 mhlen = (GET_U_1(mh->ip6m_len) + 1) << 3; in mobility_print() 236 type = GET_U_1(mh->ip6m_type); in mobility_print() 259 ND_PRINT(" nonce id=0x%x", GET_BE_U_2(mh->ip6m_data16[0])); in mobility_print() 279 ND_PRINT(" seq#=%u", GET_BE_U_2(mh->ip6m_data16[0])); in mobility_print() 299 ND_PRINT(" status=%u", GET_U_1(mh->ip6m_data8[0])); in mobility_print() 300 if (GET_U_1(mh->ip6m_data8[1]) & 0x80) in mobility_print() 311 ND_PRINT(" status=%u", GET_U_1(mh->ip6m_data8[0])); in mobility_print() [all …]
|
/freebsd/tools/test/stress2/misc/ |
H A D | datagram2.sh | 61 struct msghdr mh; 82 bzero(&mh, sizeof(mh)); 84 mh.msg_control = &m; 85 mh.msg_controllen = sizeof(m); 90 len = sendmsg(sockfd, &mh, 0);
|
H A D | datagram3.sh | 61 struct msghdr mh; 83 bzero(&mh, sizeof(mh)); 85 mh.msg_control = &m; 86 mh.msg_controllen = sizeof(m); 91 len = sendmsg(sockfd, &mh, 0);
|
/freebsd/tools/tools/net80211/w00t/redir/ |
H A D | buddy.c | 57 struct msghdr mh; in handle_data() local 89 memset(&mh, 0, sizeof(mh)); in handle_data() 90 mh.msg_iov = iov; in handle_data() 91 mh.msg_iovlen = sizeof(iov)/sizeof(struct iovec); in handle_data() 94 if (sendmsg(dude, &mh, 0) != (4 + len)) in handle_data()
|
/freebsd/sys/net/ |
H A D | if_me.c | 471 struct mobhdr *mh; in me_input() local 487 mh = (struct mobhdr *)mtodo(m, sizeof(struct ip)); in me_input() 489 if (mh->mob_flags & (~MOB_FLAGS_SP)) { in me_input() 493 if (mh->mob_flags) { in me_input() 501 if (me_in_cksum((uint16_t *)mh, hlen / sizeof(uint16_t)) != 0) { in me_input() 509 ip->ip_dst = mh->mob_dst; in me_input() 510 ip->ip_p = mh->mob_proto; in me_input() 513 if (mh->mob_flags) in me_input() 514 ip->ip_src = mh->mob_src; in me_input() 555 struct mobhdr mh; in me_transmit() 554 struct mobhdr mh; me_transmit() local [all...] |
/freebsd/contrib/processor-trace/libipt/src/windows/ |
H A D | pt_section_windows.c | 129 HANDLE fh, mh; in pt_sec_windows_map() local 157 mh = CreateFileMapping(fh, NULL, PAGE_READONLY, 0, 0, NULL); in pt_sec_windows_map() 158 if (!mh) in pt_sec_windows_map() 161 base = MapViewOfFile(mh, FILE_MAP_READ, (DWORD) (offset >> 32), in pt_sec_windows_map() 175 mapping->mh = mh; in pt_sec_windows_map() 191 CloseHandle(mh); in pt_sec_windows_map() 342 CloseHandle(mapping->mh); in pt_sec_windows_unmap()
|
/freebsd/tools/build/cross-build/include/mac/sys/ |
H A D | linker_set.h | 67 const struct mach_header *mh; in __set_getsectiondata() local 72 mh = _dyld_get_image_header(image_index); in __set_getsectiondata() 73 if (mh == NULL) in __set_getsectiondata() 76 ret = getsectiondata((const struct mach_header_64 *)mh, in __set_getsectiondata()
|
/freebsd/contrib/capsicum-test/ |
H A D | socket.cc | 315 struct msghdr mh; in TEST() local 316 memset(&mh, 0, sizeof(mh)); in TEST() 317 mh.msg_iov = &iov; in TEST() 318 mh.msg_iovlen = 1; in TEST() 325 mh.msg_name = &addr; in TEST() 326 mh.msg_namelen = sizeof(addr); in TEST() 328 EXPECT_NOTCAPABLE(sendmsg(cap_sock_rw, &mh, 0)); in TEST() 329 EXPECT_OK(sendmsg(cap_sock_connect, &mh, 0)); in TEST() 334 memcpy(&mv.msg_hdr, &mh, sizeof(struct msghdr)); in TEST()
|
H A D | procdesc.cc | 1017 struct msghdr mh; in TEST_F() local 1018 mh.msg_name = NULL; // No address needed in TEST_F() 1019 mh.msg_namelen = 0; in TEST_F() 1024 mh.msg_iov = iov; in TEST_F() 1025 mh.msg_iovlen = 1; in TEST_F() 1027 mh.msg_control = buffer2; in TEST_F() 1028 mh.msg_controllen = sizeof(buffer2); in TEST_F() 1039 int rc = recvmsg(sock_fds[0], &mh, 0); in TEST_F() 1041 EXPECT_LE(CMSG_LEN(sizeof(int)), mh.msg_controllen); in TEST_F() 1042 cmptr = CMSG_FIRSTHDR(&mh); in TEST_F() [all …]
|
/freebsd/sys/net80211/ |
H A D | ieee80211_power.c | 367 struct mbuf *mh; in ieee80211_pwrsave() local 377 mh = psq->psq_head[0].head; in ieee80211_pwrsave() 378 if (mh != NULL) in ieee80211_pwrsave() 379 age-= M_AGE_GET(mh); in ieee80211_pwrsave() 381 mh = psq->psq_head[1].head; in ieee80211_pwrsave() 382 if (mh != NULL) { in ieee80211_pwrsave() 383 int nage = M_AGE_GET(mh) - age; in ieee80211_pwrsave() 385 M_AGE_SET(mh, nage < 0 ? 0 : nage); in ieee80211_pwrsave()
|
/freebsd/contrib/llvm-project/llvm/include/llvm/BinaryFormat/ |
H A D | MachO.h | 1140 inline void swapStruct(fat_header &mh) { 1141 sys::swapByteOrder(mh.magic); in swapStruct() argument 1142 sys::swapByteOrder(mh.nfat_arch); in swapStruct() 1145 inline void swapStruct(fat_arch &mh) { 1146 sys::swapByteOrder(mh.cputype); in swapStruct() argument 1147 sys::swapByteOrder(mh.cpusubtype); in swapStruct() 1148 sys::swapByteOrder(mh.offset); in swapStruct() 1149 sys::swapByteOrder(mh.size); in swapStruct() 1150 sys::swapByteOrder(mh.align); in swapStruct() 1153 inline void swapStruct(fat_arch_64 &mh) { 1154 swapStruct(fat_arch_64 & mh) swapStruct() argument 1163 swapStruct(mach_header & mh) swapStruct() argument [all...] |
/freebsd/sys/netgraph/ |
H A D | ng_bridge.c | 670 struct ng_bridge_move_host *mh; in ng_bridge_rcvmsg() local 673 if (msg->header.arglen < sizeof(*mh)) { in ng_bridge_rcvmsg() 677 mh = (struct ng_bridge_move_host *)msg->data; in ng_bridge_rcvmsg() 678 hook = (mh->hook[0] == 0) in ng_bridge_rcvmsg() 680 : ng_findhook(node, mh->hook); in ng_bridge_rcvmsg() 685 error = ng_bridge_put(priv, mh->addr, NG_HOOK_PRIVATE(hook)); in ng_bridge_rcvmsg() 864 struct ng_bridge_move_host *mh; in ng_bridge_rcvdata() local 868 sizeof(*mh), M_NOWAIT); in ng_bridge_rcvdata() 875 mh = (struct ng_bridge_move_host *)msg->data; in ng_bridge_rcvdata() 876 strncpy(mh->hook, NG_HOOK_NAME(ctx.incoming->hook), in ng_bridge_rcvdata() [all …]
|