| /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/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 | pci.c | 30 static int intel_th_pci_activate(struct intel_th *th) in intel_th_pci_activate() argument 32 struct pci_dev *pdev = to_pci_dev(th->dev); in intel_th_pci_activate() 36 if (!INTEL_TH_CAP(th, tscu_enable)) in intel_th_pci_activate() 51 static void intel_th_pci_deactivate(struct intel_th *th) in intel_th_pci_deactivate() argument 53 struct pci_dev *pdev = to_pci_dev(th->dev); in intel_th_pci_deactivate() 57 if (!INTEL_TH_CAP(th, tscu_enable)) in intel_th_pci_deactivate() 79 struct intel_th *th; in intel_th_pci_probe() local 107 th = intel_th_alloc(&pdev->dev, drvdata, resource, r); in intel_th_pci_probe() 108 if (IS_ERR(th)) { in intel_th_pci_probe() 109 err = PTR_ERR(th); in intel_th_pci_probe() [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/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/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/ceph/ |
| H A D | auth_x.c | 122 struct ceph_x_ticket_handler *th; in get_ticket_handler() local 128 th = rb_entry(parent, struct ceph_x_ticket_handler, node); in get_ticket_handler() 129 if (service < th->service) in get_ticket_handler() 131 else if (service > th->service) in get_ticket_handler() 134 return th; in get_ticket_handler() 138 th = kzalloc(sizeof(*th), GFP_NOFS); in get_ticket_handler() 139 if (!th) in get_ticket_handler() 141 th->service = service; in get_ticket_handler() 142 rb_link_node(&th->node, parent, p); in get_ticket_handler() 143 rb_insert_color(&th->node, &xi->ticket_handlers); in get_ticket_handler() [all …]
|
| /linux/net/netfilter/ |
| H A D | nf_synproxy_core.c | 29 const struct tcphdr *th, struct synproxy_options *opts) in synproxy_parse_options() argument 31 int length = (th->doff * 4) - sizeof(*th); in synproxy_parse_options() 37 ptr = skb_header_pointer(skb, doff + sizeof(*th), length, buf); in synproxy_parse_options() 115 synproxy_build_options(struct tcphdr *th, const struct synproxy_options *opts) in synproxy_build_options() argument 117 __be32 *ptr = (__be32 *)(th + 1); in synproxy_build_options() 186 struct tcphdr *th, struct nf_conn *ct, in synproxy_tstamp_adjust() argument 197 optend = protoff + th->doff * 4; in synproxy_tstamp_adjust() 229 inet_proto_csum_replace4(&th->check, skb, in synproxy_tstamp_adjust() 448 const struct sk_buff *skb, const struct tcphdr *th, in synproxy_send_client_synack() argument 470 nth->source = th->dest; in synproxy_send_client_synack() [all …]
|
| H A D | xt_tcpmss.c | 28 const struct tcphdr *th; in tcpmss_mt() local 36 th = skb_header_pointer(skb, par->thoff, sizeof(_tcph), &_tcph); in tcpmss_mt() 37 if (th == NULL) in tcpmss_mt() 41 if (th->doff*4 < sizeof(*th)) in tcpmss_mt() 44 optlen = th->doff*4 - sizeof(*th); in tcpmss_mt() 49 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 36 th = skb_header_pointer(skb, par->thoff, sizeof(_tcph), &_tcph); in match_tcp() 37 if (th == NULL) in match_tcp() 42 if (th->ece == 1) in match_tcp() 45 if (th->ece == 0) in match_tcp() 52 if (th->cwr == 1) in match_tcp() 55 if (th->cwr == 0) in match_tcp()
|
| /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/net/slip/ |
| H A D | slhc.c | 239 struct tcphdr *th, *oth; in slhc_compress() local 264 if (isize < nlen + sizeof(*th)) in slhc_compress() 267 th = (struct tcphdr *)(icp + nlen); in slhc_compress() 268 if (th->doff < sizeof(struct tcphdr) / 4) in slhc_compress() 270 hlen = nlen + th->doff * 4; in slhc_compress() 276 if(hlen > isize || th->syn || th->fin || th->rst || in slhc_compress() 277 ! (th->ack)){ in slhc_compress() 299 && th->source == cs->cs_tcp.source in slhc_compress() 300 && th->dest == cs->cs_tcp.dest) in slhc_compress() 357 || th->doff != cs->cs_tcp.doff in slhc_compress() [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 | 36 struct tcphdr th; in __check_active_hdr_in() member 119 if (hdr.th.dest != passive_lport_n || hdr.th.source != active_lport_n) in __check_active_hdr_in() 132 struct tcphdr *th; in check_active_hdr_in() local 137 th = skops->skb_data; in check_active_hdr_in() 138 if (th + 1 > skops->skb_data_end) in check_active_hdr_in() 141 if (tcp_hdrlen(th) < skops->skb_len) in check_active_hdr_in() 144 if (th->fin) in check_active_hdr_in() 147 if (th->ack && !th->fin && tcp_hdrlen(th) == skops->skb_len) in check_active_hdr_in() 175 struct tcphdr *th; in write_active_opt() local 217 th = skops->skb_data; in write_active_opt() [all …]
|
| H A D | test_select_reuseport_kern.c | 105 struct tcphdr *th = data; in _select_by_skb_data() 107 if (th + 1 > data_end) in _select_by_skb_data() 110 data_check.skb_ports[0] = th->source; in _select_by_skb_data() 111 data_check.skb_ports[1] = th->dest; in _select_by_skb_data() 113 if (th->fin) in _select_by_skb_data() 119 if ((th->doff << 2) + sizeof(*cmd) > data_check.len) in _select_by_skb_data() 121 if (bpf_skb_load_bytes(reuse_md, th->doff << 2, &cmd_copy, in _select_by_skb_data() 106 struct tcphdr *th = data; _select_by_skb_data() local
|
| /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/ipvs/ |
| H A D | ip_vs_app.c | 285 * Fixes th->seq based on ip_vs_seq info. 287 static inline void vs_fix_seq(const struct ip_vs_seq *vseq, struct tcphdr *th) 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() 311 * Fixes th->ack_seq based on ip_vs_seq info. 314 vs_fix_ack_seq(const struct ip_vs_seq *vseq, struct tcphdr *th) 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 in vs_fix_ack_seq() 288 vs_fix_seq(const struct ip_vs_seq * vseq,struct tcphdr * th) vs_fix_seq() argument 315 vs_fix_ack_seq(const struct ip_vs_seq * vseq,struct tcphdr * th) vs_fix_ack_seq() argument 366 struct tcphdr *th; app_tcp_pkt_out() local 443 struct tcphdr *th; app_tcp_pkt_in() local [all...] |
| H A D | ip_vs_proto_tcp.c | 40 struct tcphdr _tcph, *th; in tcp_conn_schedule() 48 th = skb_header_pointer(skb, iph->len, sizeof(_tcph), &_tcph); in tcp_conn_schedule() 49 if (th) { in tcp_conn_schedule() 50 if (th->rst || !(sysctl_sloppy_tcp(ipvs) || th->syn)) in tcp_conn_schedule() 52 ports = &th->source; in tcp_conn_schedule() 64 /* No !th->ack check to allow scheduling on SYN+ACK for Active FTP */ in tcp_conn_schedule() 497 static inline int tcp_state_idx(struct tcphdr *th) 499 if (th->rst) in tcp_state_idx() 501 if (th in tcp_state_idx() 41 struct tcphdr _tcph, *th; tcp_conn_schedule() local 498 tcp_state_idx(struct tcphdr * th) tcp_state_idx() argument 513 set_tcp_state(struct ip_vs_proto_data * pd,struct ip_vs_conn * cp,int direction,struct tcphdr * th) set_tcp_state() argument 592 struct tcphdr _tcph, *th; tcp_state_transition() local [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) + cfg_payload_len); in build_packet_tcp() 268 th->check = ~th->check; in build_packet_tcp() 270 fprintf(stderr, "tx: sending checksum: 0x%x\n", th->check); in build_packet_tcp() [all …]
|
| /linux/net/ipv6/ |
| H A D | tcp_ipv6.c | 381 const struct tcphdr *th = (struct tcphdr *)(skb->data+offset); in tcp_v6_err() 391 sk = __inet6_lookup_established(net, &hdr->daddr, th->dest, in tcp_v6_err() 392 &hdr->saddr, ntohs(th->source), in tcp_v6_err() 407 seq = ntohl(th->seq); in tcp_v6_err() 493 ipv6_icmp_error(sk, skb, err, th->dest, ntohl(info), (u8 *)th); in tcp_v6_err() 696 const struct tcphdr *th, int nbytes) in tcp_v6_md5_hash_headers() 707 h.tcp = *th; in tcp_v6_md5_hash_headers() 715 const struct tcphdr *th) in tcp_v6_md5_hash_headers() 720 tcp_v6_md5_hash_headers(&ctx, daddr, saddr, th, t 382 const struct tcphdr *th = (struct tcphdr *)(skb->data+offset); tcp_v6_err() local 697 tcp_v6_md5_hash_headers(struct tcp_sigpool * hp,const struct in6_addr * daddr,const struct in6_addr * saddr,const struct tcphdr * th,int nbytes) tcp_v6_md5_hash_headers() argument 722 tcp_v6_md5_hash_hdr(char * md5_hash,const struct tcp_md5sig_key * key,const struct in6_addr * daddr,struct in6_addr * saddr,const struct tcphdr * th) tcp_v6_md5_hash_hdr() argument 754 const struct tcphdr *th = tcp_hdr(skb); tcp_v6_md5_hash_skb() local 875 const struct tcphdr *th = tcp_hdr(skb); tcp_v6_send_response() local 1019 const struct tcphdr *th = tcp_hdr(skb); tcp_v6_send_reset() local 1304 const struct tcphdr *th = tcp_hdr(skb); global() local 1313 tcp_v6_get_syncookie(struct sock * sk,struct ipv6hdr * iph,struct tcphdr * th,u32 * cookie) global() argument 1732 tcp_v6_fill_cb(struct sk_buff * skb,const struct ipv6hdr * hdr,const struct tcphdr * th) global() argument 1761 const struct tcphdr *th; global() local 2023 const struct tcphdr *th; global() local [all...] |
| /linux/security/apparmor/ |
| H A D | match.c | 36 struct table_header th; in unpack_table() local 45 th.td_id = be16_to_cpu(*(__be16 *) (blob)) - 1; in unpack_table() 46 if (th.td_id > YYTD_ID_MAX) in unpack_table() 48 th.td_flags = be16_to_cpu(*(__be16 *) (blob + 2)); in unpack_table() 49 th.td_lolen = be32_to_cpu(*(__be32 *) (blob + 8)); in unpack_table() 52 if (!(th.td_flags == YYTD_DATA16 || th.td_flags == YYTD_DATA32 || in unpack_table() 53 th.td_flags == YYTD_DATA8)) in unpack_table() 57 if (th.td_lolen == 0) in unpack_table() 59 tsize = table_size(th.td_lolen, th.td_flags); in unpack_table() 65 table->td_id = th.td_id; in unpack_table() [all …]
|
| /linux/include/linux/ |
| H A D | netfilter_ipv6.h | 52 const struct tcphdr *th, u16 *mssp); 54 const struct tcphdr *th); 165 const struct tcphdr *th, in nf_ipv6_cookie_init_sequence() argument 173 return v6_ops->cookie_init_sequence(iph, th, mssp); in nf_ipv6_cookie_init_sequence() 175 return __cookie_v6_init_sequence(iph, th, mssp); in nf_ipv6_cookie_init_sequence() 182 const struct tcphdr *th) in nf_cookie_v6_check() argument 189 return v6_ops->cookie_v6_check(iph, th); in nf_cookie_v6_check() 191 return __cookie_v6_check(iph, th); in nf_cookie_v6_check()
|
| /linux/Documentation/driver-api/surface_aggregator/ |
| H A D | overview.rst | 9 introduced on 4th generation devices (Surface Pro 4, Surface Book 1), but 17 Not much is currently known about SAM on 4th generation devices (Surface Pro 19 between host and EC (as detailed below). On 5th (Surface Pro 2017, Surface 28 restructured for 7th generation devices and on those, specifically Surface 32 While features have not changed much on a coarse level since the 5th 34 5th and 6th generation devices, both battery and temperature information is 37 requests. On 7th generation devices, this additional layer is gone and these 49 generation of the Surface device. On 4th generation devices, host and EC 51 5th and later generations, communication takes place via a USART serial 67 communication interface for SAM on 5th- and all later-generation Surface
|
| /linux/include/net/netfilter/ |
| H A D | nf_synproxy.h | 46 const struct tcphdr *th, 53 const struct tcphdr *th, 58 const struct tcphdr *th, 71 const struct tcphdr *th, 75 const struct tcphdr *th,
|