Home
last modified time | relevance | path

Searched refs:idx (Results 1 – 25 of 89) sorted by relevance

1234

/net/core/
Dgen_estimator.c115 int idx = (int)arg; in est_timer() local
119 list_for_each_entry_rcu(e, &elist[idx].list, list) { in est_timer()
131 brate = (b.bytes - e->last_bytes)<<(7 - idx); in est_timer()
137 rate <<= (7 - idx); in est_timer()
146 if (!list_empty(&elist[idx].list)) in est_timer()
147 mod_timer(&elist[idx].timer, jiffies + ((HZ/4) << idx)); in est_timer()
216 int idx; in gen_new_estimator() local
230 idx = parm->interval + 2; in gen_new_estimator()
242 if (!elist[idx].timer.function) { in gen_new_estimator()
243 INIT_LIST_HEAD(&elist[idx].list); in gen_new_estimator()
[all …]
/net/ipv6/netfilter/
Dip6t_NPT.c46 unsigned int i, idx; in ip6t_npt_map_pfx() local
57 idx = i / 32; in ip6t_npt_map_pfx()
58 addr->s6_addr32[idx] &= mask; in ip6t_npt_map_pfx()
59 addr->s6_addr32[idx] |= ~mask & npt->dst_pfx.in6.s6_addr32[idx]; in ip6t_npt_map_pfx()
63 idx = 3; in ip6t_npt_map_pfx()
65 for (idx = 4; idx < ARRAY_SIZE(addr->s6_addr16); idx++) { in ip6t_npt_map_pfx()
66 if ((__force __sum16)addr->s6_addr16[idx] != in ip6t_npt_map_pfx()
70 if (idx == ARRAY_SIZE(addr->s6_addr16)) in ip6t_npt_map_pfx()
74 sum = ~csum_fold(csum_add(csum_unfold((__force __sum16)addr->s6_addr16[idx]), in ip6t_npt_map_pfx()
78 *(__force __sum16 *)&addr->s6_addr16[idx] = sum; in ip6t_npt_map_pfx()
/net/wireless/
Dwext-compat.c435 int idx, struct key_params *params) in __cfg80211_set_encryption() argument
465 if (idx < 4 || idx > 5) in __cfg80211_set_encryption()
467 } else if (idx < 0 || idx > 3) in __cfg80211_set_encryption()
477 if (idx == wdev->wext.default_key && in __cfg80211_set_encryption()
487 err = rdev_del_key(rdev, dev, idx, pairwise, in __cfg80211_set_encryption()
499 memset(wdev->wext.keys->data[idx], 0, in __cfg80211_set_encryption()
500 sizeof(wdev->wext.keys->data[idx])); in __cfg80211_set_encryption()
501 wdev->wext.keys->params[idx].key_len = 0; in __cfg80211_set_encryption()
502 wdev->wext.keys->params[idx].cipher = 0; in __cfg80211_set_encryption()
504 if (idx == wdev->wext.default_key) in __cfg80211_set_encryption()
[all …]
/net/nfc/
Dnetlink.c91 if (nla_put_u32(msg, NFC_ATTR_TARGET_INDEX, target->idx) || in nfc_genl_send_target()
129 u32 idx; in __get_device_from_cb() local
141 idx = nla_get_u32(nfc_genl_family.attrbuf[NFC_ATTR_DEVICE_INDEX]); in __get_device_from_cb()
143 dev = nfc_get_device(idx); in __get_device_from_cb()
211 if (nla_put_u32(msg, NFC_ATTR_DEVICE_INDEX, dev->idx)) in nfc_genl_targets_found()
270 if (nla_put_u32(msg, NFC_ATTR_DEVICE_INDEX, dev->idx)) in nfc_genl_tm_activated()
302 if (nla_put_u32(msg, NFC_ATTR_DEVICE_INDEX, dev->idx)) in nfc_genl_tm_deactivated()
333 nla_put_u32(msg, NFC_ATTR_DEVICE_INDEX, dev->idx) || in nfc_genl_device_added()
365 if (nla_put_u32(msg, NFC_ATTR_DEVICE_INDEX, dev->idx)) in nfc_genl_device_removed()
400 if (nla_put_u32(msg, NFC_ATTR_DEVICE_INDEX, dev->idx)) in nfc_genl_llc_send_sdres()
[all …]
Dcore.c284 if (dev->targets[i].idx == target_idx) in nfc_find_target()
471 if (dev->active_target->idx != target_idx) { in nfc_deactivate_target()
515 if (dev->active_target->idx != target_idx) { in nfc_data_exchange()
549 if (se->idx == se_idx) in nfc_find_se()
783 targets[i].idx = dev->target_next_idx++; in nfc_targets_found()
843 if (tg->idx == target_idx) in nfc_target_lost()
893 se->idx = se_idx; in nfc_add_se()
920 if (se->idx == se_idx) { in nfc_remove_se()
967 nfc_genl_se_removed(dev, se->idx); in nfc_release()
972 ida_simple_remove(&nfc_index_ida, dev->idx); in nfc_release()
[all …]
/net/ipv4/netfilter/
Dipt_CLUSTERIP.c599 struct clusterip_seq_position *idx; in clusterip_seq_start() local
607 idx = kmalloc(sizeof(struct clusterip_seq_position), GFP_KERNEL); in clusterip_seq_start()
608 if (!idx) in clusterip_seq_start()
611 idx->pos = *pos; in clusterip_seq_start()
612 idx->weight = weight; in clusterip_seq_start()
613 idx->bit = ffs(local_nodes); in clusterip_seq_start()
614 idx->val = local_nodes; in clusterip_seq_start()
615 clear_bit(idx->bit - 1, &idx->val); in clusterip_seq_start()
617 return idx; in clusterip_seq_start()
622 struct clusterip_seq_position *idx = v; in clusterip_seq_next() local
[all …]
/net/netlabel/
Dnetlabel_kapi.c483 u32 idx; in netlbl_catmap_walk() local
492 idx = offset / NETLBL_CATMAP_MAPSIZE; in netlbl_catmap_walk()
495 idx = 0; in netlbl_catmap_walk()
498 bitmap = iter->bitmap[idx] >> bit; in netlbl_catmap_walk()
507 (NETLBL_CATMAP_MAPSIZE * idx) + bit; in netlbl_catmap_walk()
509 if (++idx >= NETLBL_CATMAP_MAPCNT) { in netlbl_catmap_walk()
512 idx = 0; in netlbl_catmap_walk()
516 bitmap = iter->bitmap[idx]; in netlbl_catmap_walk()
538 u32 idx; in netlbl_catmap_walkrng() local
548 idx = offset / NETLBL_CATMAP_MAPSIZE; in netlbl_catmap_walkrng()
[all …]
/net/mac80211/
Drate.c260 static void rc_send_low_basicrate(s8 *idx, u32 basic_rates, in rc_send_low_basicrate() argument
267 if (*idx < 0) in rc_send_low_basicrate()
269 if (basic_rates & (1 << *idx)) in rc_send_low_basicrate()
272 for (i = *idx + 1; i <= sband->n_bitrates; i++) { in rc_send_low_basicrate()
274 *idx = i; in rc_send_low_basicrate()
296 info->control.rates[0].idx = 0; in __rate_control_send_low()
307 info->control.rates[0].idx = i; in __rate_control_send_low()
340 info->control.rates[0].idx = mcast_rate - 1; in rate_control_send_low()
351 rc_send_low_basicrate(&info->control.rates[0].idx, in rate_control_send_low()
568 rate = &sband->bitrates[rates[0].idx]; in rate_fixup_ratelist()
[all …]
Drc80211_minstrel_ht_debugfs.c43 int idx = i * MCS_GROUP_RATES + j; in minstrel_ht_stats_dump() local
62 *(p++) = (idx == mi->max_tp_rate[0]) ? 'A' : ' '; in minstrel_ht_stats_dump()
63 *(p++) = (idx == mi->max_tp_rate[1]) ? 'B' : ' '; in minstrel_ht_stats_dump()
64 *(p++) = (idx == mi->max_tp_rate[2]) ? 'C' : ' '; in minstrel_ht_stats_dump()
65 *(p++) = (idx == mi->max_tp_rate[3]) ? 'D' : ' '; in minstrel_ht_stats_dump()
66 *(p++) = (idx == mi->max_prob_rate) ? 'P' : ' '; in minstrel_ht_stats_dump()
78 p += sprintf(p, " %3u ", idx); in minstrel_ht_stats_dump()
189 int idx = i * MCS_GROUP_RATES + j; in minstrel_ht_stats_csv_dump() local
208 p += sprintf(p, "%s" ,((idx == mi->max_tp_rate[0]) ? "A" : "")); in minstrel_ht_stats_csv_dump()
209 p += sprintf(p, "%s" ,((idx == mi->max_tp_rate[1]) ? "B" : "")); in minstrel_ht_stats_csv_dump()
[all …]
Drc80211_minstrel_ht.c270 return GROUP_IDX((rate->idx / 8) + 1, in minstrel_ht_get_group_idx()
288 int group, idx; in minstrel_ht_get_stats() local
292 idx = rate->idx % 8; in minstrel_ht_get_stats()
295 idx = ieee80211_rate_get_vht_mcs(rate); in minstrel_ht_get_stats()
299 for (idx = 0; idx < ARRAY_SIZE(mp->cck_rates); idx++) in minstrel_ht_get_stats()
300 if (rate->idx == mp->cck_rates[idx]) in minstrel_ht_get_stats()
304 if (!(mi->groups[group].supported & BIT(idx))) in minstrel_ht_get_stats()
305 idx += 4; in minstrel_ht_get_stats()
307 return &mi->groups[group].rates[idx]; in minstrel_ht_get_stats()
612 if (rate->idx < 0) in minstrel_ht_txstat_valid()
[all …]
Dkey.c257 int idx, bool uni, bool multi) in __ieee80211_set_default_key() argument
263 if (idx >= 0 && idx < NUM_DEFAULT_KEYS) in __ieee80211_set_default_key()
264 key = key_mtx_dereference(sdata->local, sdata->keys[idx]); in __ieee80211_set_default_key()
269 drv_set_default_unicast_key(sdata->local, sdata, idx); in __ieee80211_set_default_key()
278 void ieee80211_set_default_key(struct ieee80211_sub_if_data *sdata, int idx, in ieee80211_set_default_key() argument
282 __ieee80211_set_default_key(sdata, idx, uni, multi); in ieee80211_set_default_key()
287 __ieee80211_set_default_mgmt_key(struct ieee80211_sub_if_data *sdata, int idx) in __ieee80211_set_default_mgmt_key() argument
293 if (idx >= NUM_DEFAULT_KEYS && in __ieee80211_set_default_mgmt_key()
294 idx < NUM_DEFAULT_KEYS + NUM_DEFAULT_MGMT_KEYS) in __ieee80211_set_default_mgmt_key()
295 key = key_mtx_dereference(sdata->local, sdata->keys[idx]); in __ieee80211_set_default_mgmt_key()
[all …]
Drc80211_minstrel.c114 int offset, int idx) in minstrel_set_rate() argument
116 struct minstrel_rate *r = &mi->r[idx]; in minstrel_set_rate()
118 ratetbl->rate[offset].idx = r->rix; in minstrel_set_rate()
148 ratetbl->rate[i].idx = mi->lowest_rix; in minstrel_update_rates()
277 if (ar[i].idx < 0 || !ar[i].count) in minstrel_tx_status()
280 ndx = rix_to_ndx(mi, ar[i].idx); in minstrel_tx_status()
286 if ((i != IEEE80211_TX_MAX_RATES - 1) && (ar[i + 1].idx < 0)) in minstrel_tx_status()
415 rate->idx = mi->r[ndx].rix; in minstrel_get_rate()
690 int idx = mi->max_tp_rate[0]; in minstrel_get_expected_throughput() local
696 tmp_mrs = &mi->r[idx].stats; in minstrel_get_expected_throughput()
[all …]
/net/netfilter/ipvs/
Dip_vs_ctl.c1453 int idx; in ip_vs_flush() local
1460 for(idx = 0; idx < IP_VS_SVC_TAB_SIZE; idx++) { in ip_vs_flush()
1461 hlist_for_each_entry_safe(svc, n, &ip_vs_svc_table[idx], in ip_vs_flush()
1471 for(idx = 0; idx < IP_VS_SVC_TAB_SIZE; idx++) { in ip_vs_flush()
1472 hlist_for_each_entry_safe(svc, n, &ip_vs_svc_fwm_table[idx], in ip_vs_flush()
1526 unsigned int idx; in ip_vs_dst_event() local
1533 for (idx = 0; idx < IP_VS_SVC_TAB_SIZE; idx++) { in ip_vs_dst_event()
1534 hlist_for_each_entry(svc, &ip_vs_svc_table[idx], s_list) { in ip_vs_dst_event()
1543 hlist_for_each_entry(svc, &ip_vs_svc_fwm_table[idx], f_list) { in ip_vs_dst_event()
1580 int idx; in ip_vs_zero_all() local
[all …]
Dip_vs_conn.c987 int idx; in ip_vs_conn_array() local
991 for (idx = 0; idx < ip_vs_conn_tab_size; idx++) { in ip_vs_conn_array()
992 hlist_for_each_entry_rcu(cp, &ip_vs_conn_tab[idx], c_list) { in ip_vs_conn_array()
997 iter->l = &ip_vs_conn_tab[idx]; in ip_vs_conn_array()
1023 int idx; in ip_vs_conn_seq_next() local
1034 idx = l - ip_vs_conn_tab; in ip_vs_conn_seq_next()
1035 while (++idx < ip_vs_conn_tab_size) { in ip_vs_conn_seq_next()
1036 hlist_for_each_entry_rcu(cp, &ip_vs_conn_tab[idx], c_list) { in ip_vs_conn_seq_next()
1037 iter->l = &ip_vs_conn_tab[idx]; in ip_vs_conn_seq_next()
1246 int idx; in ip_vs_random_dropentry() local
[all …]
Dip_vs_pe_sip.c14 int *idx) in ip_vs_dbg_callid() argument
17 size_t len = min3(max_len, callid_len, buf_len - *idx - 1); in ip_vs_dbg_callid()
18 memcpy(buf + *idx, callid, len); in ip_vs_dbg_callid()
19 buf[*idx+len] = '\0'; in ip_vs_dbg_callid()
20 *idx += len + 1; in ip_vs_dbg_callid()
21 return buf + *idx - len; in ip_vs_dbg_callid()
/net/caif/
Dcfmuxl.c108 int idx = phyid % DN_CACHE_SIZE; in cfmuxl_remove_dnlayer() local
111 RCU_INIT_POINTER(muxl->dn_cache[idx], NULL); in cfmuxl_remove_dnlayer()
126 int idx = id % UP_CACHE_SIZE; in get_up() local
127 up = rcu_dereference(muxl->up_cache[idx]); in get_up()
131 rcu_assign_pointer(muxl->up_cache[idx], up); in get_up()
140 int idx = dev_info->id % DN_CACHE_SIZE; in get_dn() local
141 dn = rcu_dereference(muxl->dn_cache[idx]); in get_dn()
145 rcu_assign_pointer(muxl->dn_cache[idx], dn); in get_dn()
155 int idx = id % UP_CACHE_SIZE; in cfmuxl_remove_uplayer() local
167 RCU_INIT_POINTER(muxl->up_cache[idx], NULL); in cfmuxl_remove_uplayer()
/net/dccp/
Dfeat.c194 int idx = dccp_feat_index(feat_num); in dccp_feat_type() local
196 if (idx < 0) in dccp_feat_type()
198 return dccp_feat_table[idx].reconciliation; in dccp_feat_type()
203 int idx = dccp_feat_index(feat_num); in dccp_feat_default_value() local
208 DCCP_BUG_ON(idx < 0); in dccp_feat_default_value()
210 return idx < 0 ? 0 : dccp_feat_table[idx].default_value; in dccp_feat_default_value()
308 static int __dccp_feat_activate(struct sock *sk, const int idx, in __dccp_feat_activate() argument
314 if (idx < 0 || idx >= DCCP_FEAT_SUPPORTED_MAX) in __dccp_feat_activate()
316 if (dccp_feat_table[idx].activation_hdlr == NULL) in __dccp_feat_activate()
320 val = dccp_feat_table[idx].default_value; in __dccp_feat_activate()
[all …]
/net/sched/
Dsch_fq_codel.c140 unsigned int maxbacklog = 0, idx = 0, i, len; in fq_codel_drop() local
151 idx = i; in fq_codel_drop()
154 flow = &q->flows[idx]; in fq_codel_drop()
157 q->backlogs[idx] -= len; in fq_codel_drop()
163 return idx; in fq_codel_drop()
178 unsigned int idx, prev_backlog; in fq_codel_enqueue() local
182 idx = fq_codel_classify(skb, sch, &ret); in fq_codel_enqueue()
183 if (idx == 0) { in fq_codel_enqueue()
189 idx--; in fq_codel_enqueue()
192 flow = &q->flows[idx]; in fq_codel_enqueue()
[all …]
Dematch.c175 struct tcf_ematch *em, struct nlattr *nla, int idx) in tcf_em_validate() argument
202 if (ref <= idx) in tcf_em_validate()
310 int idx, list_len, matches_len, err; in tcf_em_tree_validate() local
351 for (idx = 0; nla_ok(rt_match, list_len); idx++) { in tcf_em_tree_validate()
354 if (rt_match->nla_type != (idx + 1)) in tcf_em_tree_validate()
357 if (idx >= tree_hdr->nmatches) in tcf_em_tree_validate()
363 em = tcf_em_get_match(tree, idx); in tcf_em_tree_validate()
365 err = tcf_em_validate(tp, tree_hdr, em, rt_match, idx); in tcf_em_tree_validate()
377 if (idx != tree_hdr->nmatches) { in tcf_em_tree_validate()
Dsch_fq.c538 unsigned int idx; in fq_reset() local
546 for (idx = 0; idx < (1U << q->fq_trees_log); idx++) { in fq_reset()
547 root = &q->fq_root[idx]; in fq_reset()
574 u32 idx; in fq_rehash() local
576 for (idx = 0; idx < (1U << old_log); idx++) { in fq_rehash()
577 oroot = &old_array[idx]; in fq_rehash()
631 u32 idx; in fq_resize() local
642 for (idx = 0; idx < (1U << log); idx++) in fq_resize()
643 array[idx] = RB_ROOT; in fq_resize()
/net/nfc/hci/
Dcommand.c156 int nfc_hci_set_param(struct nfc_hci_dev *hdev, u8 gate, u8 idx, in nfc_hci_set_param() argument
170 pr_debug("idx=%d to gate %d\n", idx, gate); in nfc_hci_set_param()
176 *tmp = idx; in nfc_hci_set_param()
188 int nfc_hci_get_param(struct nfc_hci_dev *hdev, u8 gate, u8 idx, in nfc_hci_get_param() argument
191 pr_debug("gate=%d regidx=%d\n", gate, idx); in nfc_hci_get_param()
194 &idx, 1, skb); in nfc_hci_get_param()
/net/can/
Dproc.c339 static inline void can_rcvlist_proc_show_one(struct seq_file *m, int idx, in can_rcvlist_proc_show_one() argument
343 if (!hlist_empty(&d->rx[idx])) { in can_rcvlist_proc_show_one()
345 can_print_rcvlist(m, &d->rx[idx], dev); in can_rcvlist_proc_show_one()
354 int idx = (int)(long)m->private; in can_rcvlist_proc_show() local
358 seq_printf(m, "\nreceive list '%s':\n", rx_list_name[idx]); in can_rcvlist_proc_show()
364 can_rcvlist_proc_show_one(m, idx, NULL, d); in can_rcvlist_proc_show()
369 can_rcvlist_proc_show_one(m, idx, dev, dev->ml_priv); in can_rcvlist_proc_show()
/net/ieee802154/
Dnl-phy.c124 int idx, s_idx; member
134 if (data->idx++ < data->s_idx) in ieee802154_dump_phy_iter()
144 data->idx--; in ieee802154_dump_phy_iter()
157 .idx = 0, in ieee802154_dump_phy()
164 cb->args[0] = data.idx; in ieee802154_dump_phy()
Dnl-mac.c448 int idx; in ieee802154_dump_iface() local
453 idx = 0; in ieee802154_dump_iface()
455 if (idx < s_idx || dev->type != ARPHRD_IEEE802154) in ieee802154_dump_iface()
463 idx++; in ieee802154_dump_iface()
465 cb->args[0] = idx; in ieee802154_dump_iface()
783 int idx = 0; in ieee802154_llsec_dump_table() local
788 if (idx < first_dev || dev->type != ARPHRD_IEEE802154) in ieee802154_llsec_dump_table()
811 idx++; in ieee802154_llsec_dump_table()
813 cb->args[0] = idx; in ieee802154_llsec_dump_table()
959 int rc = 0, idx = 0; in llsec_iter_keys() local
[all …]
/net/ipv4/
Dip_input.c348 u32 idx = skb_dst(skb)->tclassid; in ip_rcv_finish() local
349 st[idx&0xFF].o_packets++; in ip_rcv_finish()
350 st[idx&0xFF].o_bytes += skb->len; in ip_rcv_finish()
351 st[(idx>>16)&0xFF].i_packets++; in ip_rcv_finish()
352 st[(idx>>16)&0xFF].i_bytes += skb->len; in ip_rcv_finish()

1234