| /linux/drivers/macintosh/ |
| H A D | therm_adt746x.c | 92 static void write_both_fan_speed(struct thermostat *th, int speed); 93 static void write_fan_speed(struct thermostat *th, int speed, int fan); 96 write_reg(struct thermostat* th, int reg, u8 data) in write_reg() argument 103 rc = i2c_master_send(th->clt, (const char *)tmp, 2); in write_reg() 112 read_reg(struct thermostat* th, int reg) in read_reg() argument 118 rc = i2c_master_send(th->clt, ®_addr, 1); in read_reg() 123 rc = i2c_master_recv(th->clt, (char *)&data, 1); in read_reg() 129 static int read_fan_speed(struct thermostat *th, u8 addr) in read_fan_speed() argument 135 tmp[1] = read_reg(th, addr); in read_fan_speed() 136 tmp[0] = read_reg(th, addr + 1); in read_fan_speed() [all …]
|
| /linux/tools/lib/thermal/ |
| H A D | sampling.c | 17 struct thermal_handler *th = thp->th; in handle_thermal_sample() local 26 return th->ops->sampling.tz_temp( in handle_thermal_sample() 34 thermal_error_t thermal_sampling_handle(struct thermal_handler *th, void *arg) in thermal_sampling_handle() argument 36 struct thermal_handler_param thp = { .th = th, .arg = arg }; in thermal_sampling_handle() 38 if (!th) in thermal_sampling_handle() 41 if (nl_cb_set(th->cb_sampling, NL_CB_VALID, NL_CB_CUSTOM, in thermal_sampling_handle() 45 return nl_recvmsgs(th->sk_sampling, th->cb_sampling); in thermal_sampling_handle() 48 int thermal_sampling_fd(struct thermal_handler *th) in thermal_sampling_fd() argument 50 if (!th) in thermal_sampling_fd() 53 return nl_socket_get_fd(th->sk_sampling); in thermal_sampling_fd() [all …]
|
| /linux/drivers/hwtracing/intel_th/ |
| H A D | core.c | 105 struct intel_th *th = to_intel_th(hub); in intel_th_remove() local 121 for (i = 0, lowest = -1; i < th->num_thdevs; i++) { in intel_th_remove() 127 if (th->thdev[i]->type != INTEL_TH_OUTPUT) { in intel_th_remove() 129 th->thdev[lowest] = th->thdev[i]; in intel_th_remove() 130 th->thdev[i] = NULL; in intel_th_remove() 140 intel_th_device_remove(th->thdev[i]); in intel_th_remove() 141 th->thdev[i] = NULL; in intel_th_remove() 145 th->num_thdevs = lowest; in intel_th_remove() 192 const struct intel_th *th = to_intel_th(thdev); in intel_th_output_devnode() local 196 node = kasprintf(GFP_KERNEL, "intel_th%d/%s%d", th->id, in intel_th_output_devnode() [all …]
|
| H A D | acpi.c | 42 struct intel_th *th; in intel_th_acpi_probe() local 54 th = intel_th_alloc(&pdev->dev, (void *)id->driver_data, resource, r); in intel_th_acpi_probe() 55 if (IS_ERR(th)) in intel_th_acpi_probe() 56 return PTR_ERR(th); in intel_th_acpi_probe() 58 adev->driver_data = th; in intel_th_acpi_probe() 65 struct intel_th *th = platform_get_drvdata(pdev); in intel_th_acpi_remove() local 67 intel_th_free(th); in intel_th_acpi_remove()
|
| /linux/drivers/thermal/ |
| H A D | db8500_thermal.c | 64 struct db8500_thermal_zone *th = thermal_zone_device_priv(tz); in db8500_thermal_get_temp() local 71 *temp = th->interpolated_temp; in db8500_thermal_get_temp() 80 static void db8500_thermal_update_config(struct db8500_thermal_zone *th, in db8500_thermal_update_config() argument 87 th->cur_index = idx; in db8500_thermal_update_config() 88 th->interpolated_temp = (next_low + next_high)/2; in db8500_thermal_update_config() 100 struct db8500_thermal_zone *th = irq_data; in prcmu_low_irq_handler() local 101 unsigned int idx = th->cur_index; in prcmu_low_irq_handler() 117 db8500_thermal_update_config(th, idx, next_low, next_high); in prcmu_low_irq_handler() 118 dev_dbg(th->dev, in prcmu_low_irq_handler() 121 thermal_zone_device_update(th->tz, THERMAL_EVENT_UNSPECIFIED); in prcmu_low_irq_handler() [all …]
|
| /linux/net/ipv4/ |
| H A D | tcp_offload.c | 38 struct tcphdr *th; in __tcpv4_gso_segment_csum() local 44 th = tcp_hdr(seg); in __tcpv4_gso_segment_csum() 47 inet_proto_csum_replace4(&th->check, seg, *oldip, newip, true); in __tcpv4_gso_segment_csum() 48 inet_proto_csum_replace2(&th->check, seg, *oldport, newport, false); in __tcpv4_gso_segment_csum() 57 const struct tcphdr *th; in __tcpv4_gso_segment_list_csum() local 64 th = tcp_hdr(seg); in __tcpv4_gso_segment_list_csum() 69 if (!(*(const u32 *)&th->source ^ *(const u32 *)&th2->source) && in __tcpv4_gso_segment_list_csum() 79 &th2->source, th->source); in __tcpv4_gso_segment_list_csum() 82 &th2->dest, th->dest); in __tcpv4_gso_segment_list_csum() 108 struct tcphdr *th = tcp_hdr(skb); in tcp4_gso_segment() local [all …]
|
| H A D | tcp_ipv4.c | 97 __be32 daddr, __be32 saddr, const struct tcphdr *th); 494 struct tcphdr *th = (struct tcphdr *)(skb->data + (iph->ihl << 2)); in tcp_v4_err() local 504 sk = __inet_lookup_established(net, iph->daddr, th->dest, iph->saddr, in tcp_v4_err() 505 ntohs(th->source), inet_iif(skb), 0); in tcp_v4_err() 516 seq = ntohl(th->seq); in tcp_v4_err() 619 ip_icmp_error(sk, skb, err, th->dest, info, (u8 *)th); in tcp_v4_err() 720 const struct tcphdr *th = tcp_hdr(skb); in tcp_v4_send_reset() local 722 struct tcphdr th; in tcp_v4_send_reset() member 739 if (th->rst) in tcp_v4_send_reset() 750 rep.th.dest = th->source; in tcp_v4_send_reset() [all …]
|
| /linux/net/ceph/ |
| H A D | auth_x.c | 158 struct ceph_x_ticket_handler *th; in get_ticket_handler() local 164 th = rb_entry(parent, struct ceph_x_ticket_handler, node); in get_ticket_handler() 165 if (service < th->service) in get_ticket_handler() 167 else if (service > th->service) in get_ticket_handler() 170 return th; in get_ticket_handler() 174 th = kzalloc_obj(*th, GFP_NOFS); in get_ticket_handler() 175 if (!th) in get_ticket_handler() 177 th->service = service; in get_ticket_handler() 178 rb_link_node(&th->node, parent, p); in get_ticket_handler() 179 rb_insert_color(&th->node, &xi->ticket_handlers); in get_ticket_handler() [all …]
|
| /linux/net/ipv6/ |
| H A D | tcpv6_offload.c | 18 struct tcphdr *th) in tcp6_check_fraglist_gro() argument 27 p = tcp_gro_lookup(head, th); in tcp6_check_fraglist_gro() 47 sk = __inet6_lookup_established(net, &hdr->saddr, th->source, in tcp6_check_fraglist_gro() 48 &hdr->daddr, ntohs(th->dest), in tcp6_check_fraglist_gro() 59 struct tcphdr *th; in tcp6_gro_receive() local 67 th = tcp_gro_pull_header(skb); in tcp6_gro_receive() 68 if (!th) in tcp6_gro_receive() 72 tcp6_check_fraglist_gro(head, skb, th); in tcp6_gro_receive() 74 return tcp_gro_receive(head, skb, th); in tcp6_gro_receive() 85 struct tcphdr *th = tcp_hdr(skb); in tcp6_gro_complete() local [all …]
|
| H A D | tcp_ipv6.c | 407 const struct tcphdr *th = (struct tcphdr *)(skb->data+offset); in tcp_v6_err() local 417 sk = __inet6_lookup_established(net, &hdr->daddr, th->dest, in tcp_v6_err() 418 &hdr->saddr, ntohs(th->source), in tcp_v6_err() 433 seq = ntohl(th->seq); in tcp_v6_err() 519 ipv6_icmp_error(sk, skb, err, th->dest, ntohl(info), (u8 *)th); in tcp_v6_err() 722 const struct tcphdr *th, int nbytes) in tcp_v6_md5_hash_headers() argument 733 h.tcp = *th; in tcp_v6_md5_hash_headers() 741 const struct tcphdr *th) in tcp_v6_md5_hash_hdr() argument 746 tcp_v6_md5_hash_headers(&ctx, daddr, saddr, th, th->doff << 2); in tcp_v6_md5_hash_hdr() 755 const struct tcphdr *th = tcp_hdr(skb); in tcp_v6_md5_hash_skb() local [all …]
|
| /linux/tools/lib/thermal/include/ |
| H A D | thermal.h | 105 LIBTHERMAL_API int for_each_thermal_threshold(struct thermal_threshold *th, cb_th_t cb, void *arg); 112 LIBTHERMAL_API struct thermal_zone *thermal_zone_discover(struct thermal_handler *th); 116 LIBTHERMAL_API void thermal_exit(struct thermal_handler *th); 121 LIBTHERMAL_API thermal_error_t thermal_events_exit(struct thermal_handler *th); 123 LIBTHERMAL_API thermal_error_t thermal_events_init(struct thermal_handler *th); 125 LIBTHERMAL_API thermal_error_t thermal_events_handle(struct thermal_handler *th, void *arg); 127 LIBTHERMAL_API int thermal_events_fd(struct thermal_handler *th); 132 LIBTHERMAL_API thermal_error_t thermal_cmd_exit(struct thermal_handler *th); 134 LIBTHERMAL_API thermal_error_t thermal_cmd_init(struct thermal_handler *th); 136 LIBTHERMAL_API thermal_error_t thermal_cmd_get_tz(struct thermal_handler *th, [all …]
|
| /linux/net/ipv4/netfilter/ |
| H A D | ipt_SYNPROXY.c | 19 struct tcphdr *th, _th; in synproxy_tg4() local 24 th = skb_header_pointer(skb, par->thoff, sizeof(_th), &_th); in synproxy_tg4() 25 if (th == NULL) in synproxy_tg4() 28 if (!synproxy_parse_options(skb, par->thoff, th, &opts)) in synproxy_tg4() 31 if (th->syn && !(th->ack || th->fin || th->rst)) { in synproxy_tg4() 35 if (th->ece && th->cwr) in synproxy_tg4() 48 synproxy_send_client_synack(net, skb, th, &opts); in synproxy_tg4() 51 } else if (th->ack && !(th->fin || th->rst || th->syn)) { in synproxy_tg4() 53 if (synproxy_recv_client_ack(net, skb, th, &opts, ntohl(th->seq))) { in synproxy_tg4()
|
| /linux/net/ipv6/netfilter/ |
| H A D | ip6t_SYNPROXY.c | 19 struct tcphdr *th, _th; in synproxy_tg6() local 24 th = skb_header_pointer(skb, par->thoff, sizeof(_th), &_th); in synproxy_tg6() 25 if (th == NULL) in synproxy_tg6() 28 if (!synproxy_parse_options(skb, par->thoff, th, &opts)) in synproxy_tg6() 31 if (th->syn && !(th->ack || th->fin || th->rst)) { in synproxy_tg6() 35 if (th->ece && th->cwr) in synproxy_tg6() 48 synproxy_send_client_synack_ipv6(net, skb, th, &opts); in synproxy_tg6() 52 } else if (th->ack && !(th->fin || th->rst || th->syn)) { in synproxy_tg6() 54 if (synproxy_recv_client_ack_ipv6(net, skb, th, &opts, in synproxy_tg6() 55 ntohl(th->seq))) { in synproxy_tg6()
|
| /linux/drivers/spi/ |
| H A D | spi-virtio.c | 88 static int virtio_spi_set_delays(struct spi_transfer_head *th, in virtio_spi_set_delays() argument 105 th->cs_setup_ns = cpu_to_le32(cs_setup); in virtio_spi_set_delays() 118 th->word_delay_ns = cpu_to_le32(max(cs_word_delay_spi, cs_word_delay_xfer)); in virtio_spi_set_delays() 130 th->cs_delay_hold_ns = cpu_to_le32(delay + cs_hold); in virtio_spi_set_delays() 142 th->cs_change_delay_inactive_ns = in virtio_spi_set_delays() 153 struct spi_transfer_head *th; in virtio_spi_transfer_one() local 167 th = &spi_req->transfer_head; in virtio_spi_transfer_one() 170 th->chip_select_id = spi_get_chipselect(spi, 0); in virtio_spi_transfer_one() 171 th->bits_per_word = xfer->bits_per_word; in virtio_spi_transfer_one() 172 th->cs_change = xfer->cs_change; in virtio_spi_transfer_one() [all …]
|
| /linux/drivers/net/wireless/realtek/rtw89/ |
| H A D | phy_be.c | 911 const u16 *th; in rtw89_phy_bb_wrap_tx_rfsi_qam_comp_val() local 916 th = d->bands[0].qam_comp_th0; in rtw89_phy_bb_wrap_tx_rfsi_qam_comp_val() 917 rtw89_write32_idx(rtwdev, R_QAM_COMP_TH0_BE4, MASKLWORD, th[0], mac_idx); in rtw89_phy_bb_wrap_tx_rfsi_qam_comp_val() 918 rtw89_write32_idx(rtwdev, R_QAM_COMP_TH0_BE4, MASKHWORD, th[1], mac_idx); in rtw89_phy_bb_wrap_tx_rfsi_qam_comp_val() 919 rtw89_write32_idx(rtwdev, R_QAM_COMP_TH1_BE4, MASKLWORD, th[2], mac_idx); in rtw89_phy_bb_wrap_tx_rfsi_qam_comp_val() 920 rtw89_write32_idx(rtwdev, R_QAM_COMP_TH1_BE4, MASKHWORD, th[3], mac_idx); in rtw89_phy_bb_wrap_tx_rfsi_qam_comp_val() 921 rtw89_write32_idx(rtwdev, R_QAM_COMP_TH2_BE4, MASKLWORD, th[4], mac_idx); in rtw89_phy_bb_wrap_tx_rfsi_qam_comp_val() 922 rtw89_write32_idx(rtwdev, R_QAM_COMP_TH2_BE4, MASKHWORD, th[5], mac_idx); in rtw89_phy_bb_wrap_tx_rfsi_qam_comp_val() 923 rtw89_write32_idx(rtwdev, R_QAM_COMP_TH3_BE4, MASKLWORD, th[6], mac_idx); in rtw89_phy_bb_wrap_tx_rfsi_qam_comp_val() 924 rtw89_write32_idx(rtwdev, R_QAM_COMP_TH3_BE4, MASKHWORD, th[7], mac_idx); in rtw89_phy_bb_wrap_tx_rfsi_qam_comp_val() [all …]
|
| /linux/tools/testing/selftests/drivers/net/mlxsw/ |
| H A D | sharedbuffer_configuration.py | 36 def _get_static_size(self, th): argument 39 return th * 8000 * self._cell_size() 49 th = random.randint(3, 16) 51 return th 53 return self._get_static_size(th) 82 th = self._get_th(pool) 84 return (pool_n, th) 89 th = self._get_th(pool) 90 return (th,) 237 def dl_set(self, pool, th): argument [all …]
|
| /linux/tools/testing/selftests/bpf/progs/ |
| H A D | test_misc_tcp_hdr_options.c | 40 struct tcphdr th; in __check_active_hdr_in() member 123 if (hdr.th.dest != passive_lport_n || hdr.th.source != active_lport_n) in __check_active_hdr_in() 136 struct tcphdr *th; in check_active_hdr_in() local 141 th = skops->skb_data; in check_active_hdr_in() 142 if (th + 1 > skops->skb_data_end) in check_active_hdr_in() 145 if (tcp_hdrlen(th) < skops->skb_len) in check_active_hdr_in() 148 if (th->fin) in check_active_hdr_in() 151 if (th->ack && !th->fin && tcp_hdrlen(th) == skops->skb_len) in check_active_hdr_in() 179 struct tcphdr *th; in write_active_opt() local 221 th = skops->skb_data; in write_active_opt() [all …]
|
| /linux/drivers/char/ |
| H A D | ds1620.c | 336 struct therm th; in ds1620_proc_therm_show() local 339 ds1620_read_state(&th); in ds1620_proc_therm_show() 343 th.hi >> 1, th.hi & 1 ? 5 : 0, in ds1620_proc_therm_show() 344 th.lo >> 1, th.lo & 1 ? 5 : 0, in ds1620_proc_therm_show() 367 struct therm th, th_start; in ds1620_init() local 381 ds1620_read_state(&th); in ds1620_init() 388 ds1620_write_state(&th); in ds1620_init() 399 ds1620_read_state(&th); in ds1620_init() 404 th.hi >> 1, th.hi & 1 ? 5 : 0, in ds1620_init() 405 th.lo >> 1, th.lo & 1 ? 5 : 0, in ds1620_init()
|
| /linux/net/netfilter/ |
| H A D | xt_tcpmss.c | 28 const struct tcphdr *th; in tcpmss_mt() local 40 th = skb_header_pointer(skb, par->thoff, sizeof(_tcph), &_tcph); in tcpmss_mt() 41 if (th == NULL) in tcpmss_mt() 45 if (th->doff*4 < sizeof(*th)) in tcpmss_mt() 48 optlen = th->doff*4 - sizeof(*th); in tcpmss_mt() 53 op = skb_header_pointer(skb, par->thoff + sizeof(*th), optlen, _opt); in tcpmss_mt()
|
| H A D | xt_ecn.c | 31 const struct tcphdr *th; in match_tcp() local 40 th = skb_header_pointer(skb, par->thoff, sizeof(_tcph), &_tcph); in match_tcp() 41 if (th == NULL) in match_tcp() 46 if (th->ece == 1) in match_tcp() 49 if (th->ece == 0) in match_tcp() 56 if (th->cwr == 1) in match_tcp() 59 if (th->cwr == 0) in match_tcp()
|
| /linux/net/netfilter/ipvs/ |
| H A D | ip_vs_app.c | 287 static inline void vs_fix_seq(const struct ip_vs_seq *vseq, struct tcphdr *th) in vs_fix_seq() argument 289 __u32 seq = ntohl(th->seq); in vs_fix_seq() 298 th->seq = htonl(seq + vseq->delta); in vs_fix_seq() 302 th->seq = htonl(seq + vseq->previous_delta); in vs_fix_seq() 314 vs_fix_ack_seq(const struct ip_vs_seq *vseq, struct tcphdr *th) in vs_fix_ack_seq() argument 316 __u32 ack_seq = ntohl(th->ack_seq); in vs_fix_ack_seq() 327 th->ack_seq = htonl(ack_seq - vseq->delta); in vs_fix_ack_seq() 332 th->ack_seq = htonl(ack_seq - vseq->previous_delta); in vs_fix_ack_seq() 364 struct tcphdr *th; in app_tcp_pkt_out() local 367 if (skb_ensure_writable(skb, ipvsh->len + sizeof(*th))) in app_tcp_pkt_out() [all …]
|
| H A D | ip_vs_proto_tcp.c | 41 struct tcphdr _tcph, *th; in tcp_conn_schedule() local 49 th = skb_header_pointer(skb, iph->len, sizeof(_tcph), &_tcph); in tcp_conn_schedule() 50 if (th) { in tcp_conn_schedule() 51 if (th->rst || !(sysctl_sloppy_tcp(ipvs) || th->syn)) in tcp_conn_schedule() 53 ports = &th->source; in tcp_conn_schedule() 462 static inline int tcp_state_idx(struct tcphdr *th) in tcp_state_idx() argument 464 if (th->rst) in tcp_state_idx() 466 if (th->syn) in tcp_state_idx() 468 if (th->fin) in tcp_state_idx() 470 if (th->ack) in tcp_state_idx() [all …]
|
| /linux/drivers/acpi/ |
| H A D | prmt.c | 99 struct prm_handler_info *th; in acpi_parse_prmt() local 150 th = &tm->handlers[cur_handler]; in acpi_parse_prmt() 152 guid_copy(&th->guid, (guid_t *)handler_info->handler_guid); in acpi_parse_prmt() 164 th->handler_addr = in acpi_parse_prmt() 165 (void *)efi_pa_va_lookup(&th->guid, handler_info->handler_address); in acpi_parse_prmt() 170 if (unlikely(!th->handler_addr)) { in acpi_parse_prmt() 172 &th->guid, handler_info->handler_address); in acpi_parse_prmt() 176 th->static_data_buffer_addr = in acpi_parse_prmt() 177 efi_pa_va_lookup(&th->guid, handler_info->static_data_buffer_address); in acpi_parse_prmt() 183 if (unlikely(!th->static_data_buffer_addr && handler_info->static_data_buffer_address)) in acpi_parse_prmt() [all …]
|
| /linux/tools/testing/selftests/net/lib/ |
| H A D | csum.c | 169 static uint16_t checksum(void *th, uint16_t proto, size_t len) in checksum() argument 184 return checksum_fold(th, len, sum); in checksum() 258 struct tcphdr *th = _th; in build_packet_tcp() local 260 th->source = htons(cfg_port_src); in build_packet_tcp() 261 th->dest = htons(cfg_port_dst); in build_packet_tcp() 262 th->doff = 5; in build_packet_tcp() 263 th->check = 0; in build_packet_tcp() 265 th->check = checksum(th, IPPROTO_TCP, sizeof(*th) in build_packet_tcp() 590 recv_verify_csum(void * th,int len,uint16_t sport,uint16_t csum_field) recv_verify_csum() argument 616 recv_verify_packet_tcp(void * th,int len) recv_verify_packet_tcp() argument 626 recv_verify_packet_udp_encap(void * th,int len) recv_verify_packet_udp_encap() argument 636 recv_verify_packet_udp(void * th,int len) recv_verify_packet_udp() argument [all...] |
| /linux/security/apparmor/ |
| H A D | match.c | 37 struct table_header th; in unpack_table() local 46 th.td_id = get_unaligned_be16(blob) - 1; in unpack_table() 47 if (th.td_id > YYTD_ID_MAX) in unpack_table() 49 th.td_flags = get_unaligned_be16(blob + 2); in unpack_table() 50 th.td_lolen = get_unaligned_be32(blob + 8); in unpack_table() 53 if (!(th.td_flags == YYTD_DATA16 || th.td_flags == YYTD_DATA32 || in unpack_table() 54 th.td_flags == YYTD_DATA8)) in unpack_table() 58 if (th.td_lolen == 0) in unpack_table() 60 tsize = table_size(th.td_lolen, th.td_flags); in unpack_table() 66 table->td_id = th.td_id; in unpack_table() [all …]
|