Projectname
large_stringclasses
15 values
Filepath
large_stringlengths
4
106
Function
large_stringlengths
11
3.45k
Label
list
Linux Kernel
arch/powerpc/platforms/powernv/idle.c
unsigned long pnv_cpu_offline(unsigned int cpu) { unsigned long srr1; __ppc64_runlatch_off(); if (cpu_has_feature(CPU_FTR_ARCH_300) && deepest_stop_found) { unsigned long psscr; psscr = mfspr(SPRN_PSSCR); psscr = (psscr & ~pnv_deepest_stop_psscr_mask) | pnv_deepest_stop_psscr_val; srr1 = arch30...
[ 0, 0 ]
Linux Kernel
arch/powerpc/platforms/powernv/idle.c
static void __init pnv_disable_deep_states(void) { supported_cpuidle_states &= ~OPAL_PM_LOSE_FULL_CONTEXT; pr_warn("cpuidle-powernv: Disabling idle states that lose full context\n"); pr_warn("cpuidle-powernv: Idle power-savings, CPU-Hotplug affected\n"); if (cpu_has_feature(CPU_FTR_ARCH_300) && (pnv_dee...
[ 0, 0 ]
Linux Kernel
arch/powerpc/platforms/powernv/memtrace.c
static u64 memtrace_alloc_node(u32 nid, u64 size) { const unsigned long nr_pages = PHYS_PFN(size); unsigned long pfn, start_pfn; struct page *page; page = alloc_contig_pages( nr_pages, GFP_KERNEL | __GFP_THISNODE | __GFP_NOWARN, nid, NULL); if (!page) return 0; start_pfn = page_to_pfn(page); /...
[ 1, 1 ]
Linux Kernel
arch/powerpc/platforms/powernv/memtrace.c
static int memtrace_init_regions_runtime(u64 size) { u32 nid; u64 m; memtrace_array = kcalloc(num_online_nodes(), sizeof(struct memtrace_entry), GFP_KERNEL); if (!memtrace_array) { pr_err("Failed to allocate memtrace_array\n"); return -EINVAL; } for_each_online_node(nid) { m = memtrace_a...
[ 1, 0 ]
Linux Kernel
arch/powerpc/platforms/powernv/memtrace.c
static int memtrace_init_debugfs(void) { int ret = 0; int i; for (i = 0; i < memtrace_array_nr; i++) { struct dentry *dir; struct memtrace_entry *ent = &memtrace_array[i]; ent->mem = ioremap(ent->start, ent->size); if (!ent->mem) { pr_err("Failed to map trace memory at 0x%llx\n", ent->sta...
[ 0, 0 ]
Linux Kernel
arch/powerpc/platforms/powernv/memtrace.c
static int memtrace_init(void) { memtrace_debugfs_dir = debugfs_create_dir("memtrace", arch_debugfs_dir); debugfs_create_file("enable", 0600, memtrace_debugfs_dir, NULL, &memtrace_init_fops); return 0; }
[ 0, 0 ]
Linux Kernel
arch/powerpc/platforms/powernv/ocxl.c
static int find_dvsec_from_pos(struct pci_dev *dev, int dvsec_id, int pos) { int vsec = pos; u16 vendor, id; while ( (vsec = pci_find_next_ext_capability(dev, vsec, OCXL_EXT_CAP_ID_DVSEC))) { pci_read_config_word(dev, vsec + OCXL_DVSEC_VENDOR_OFFSET, &vendor); pci_read_config_word(dev, vsec + OCXL_...
[ 0, 0 ]
Linux Kernel
arch/powerpc/platforms/powernv/ocxl.c
static int get_max_afu_index(struct pci_dev *dev, int *afu_idx) { int pos; u32 val; pos = pci_find_dvsec_capability(dev, PCI_VENDOR_ID_IBM, OCXL_DVSEC_FUNC_ID); if (!pos) return -ESRCH; pci_read_config_dword(dev, pos + OCXL_DVSEC_FUNC_OFF_INDEX, &val); if (val & AFU_PRESENT) *afu_idx = (val & AFU...
[ 0, 0 ]
Linux Kernel
arch/powerpc/platforms/powernv/ocxl.c
static void assign_actags(struct npu_link *link) { u16 actag_count, range_start = 0, total_desired = 0; int i; for (i = 0; i < 8; i++) total_desired += link->fn_desired_actags[i]; for (i = 0; i < 8; i++) { if (link->fn_desired_actags[i]) { actag_count = assign_fn_actags(link->fn_desired_actags[...
[ 0, 0 ]
Linux Kernel
arch/powerpc/platforms/powernv/ocxl.c
int pnv_ocxl_get_actag(struct pci_dev *dev, u16 *base, u16 *enabled, u16 *supported) { struct npu_link *link; mutex_lock(&links_list_lock); link = find_link(dev); if (!link) { dev_err(&dev->dev, "actag information not found\n"); mutex_unlock(&links_list_lock); return -ENODEV...
[ 0, 0 ]
Linux Kernel
arch/powerpc/platforms/powernv/ocxl.c
int pnv_ocxl_get_pasid_count(struct pci_dev *dev, int *count) { struct npu_link *link; int i, rc = -EINVAL; mutex_lock(&links_list_lock); link = find_link(dev); if (!link) { dev_err(&dev->dev, "actag information not found\n"); mutex_unlock(&links_list_lock); return -ENODEV; } for (i = 0; i ...
[ 0, 0 ]
Linux Kernel
arch/powerpc/platforms/powernv/ocxl.c
int pnv_ocxl_get_xsl_irq(struct pci_dev *dev, int *hwirq) { int rc; rc = of_property_read_u32(dev->dev.of_node, "ibm,opal-xsl-irq", hwirq); if (rc) { dev_err(&dev->dev, "Can't get translation interrupt for device\n"); return rc; } return 0; }
[ 0, 0 ]
Linux Kernel
arch/powerpc/platforms/powernv/ocxl.c
int pnv_ocxl_map_xsl_regs(struct pci_dev *dev, void __iomem **dsisr, void __iomem **dar, void __iomem **tfc, void __iomem **pe_handle) { u64 reg; int i, j, rc = 0; void __iomem *regs[4]; for (i = 0; i < 4; i++) { rc = of_property_read_u64_index(dev->dev.o...
[ 1, 0 ]
Linux Kernel
arch/powerpc/platforms/powernv/opal-async.c
static int __opal_async_get_token(void) { unsigned long flags; int i, token = -EBUSY; spin_lock_irqsave(&opal_async_comp_lock, flags); for (i = 0; i < opal_max_async_tokens; i++) { if (opal_async_tokens[i].state == ASYNC_TOKEN_UNALLOCATED) { opal_async_tokens[i].state = ASYNC_TOKEN_ALLOCATED; ...
[ 0, 0 ]
Linux Kernel
net/packet/af_packet.c
static int packet_sendmsg(struct socket *sock, struct msghdr *msg, size_t len) { struct sock *sk = sock->sk; struct packet_sock *po = pkt_sk(sk); if (data_race(po->tx_ring.pg_vec)) return tpacket_snd(po, msg); return packet_snd(sock, msg, len); }
[ 0, 0 ]
Linux Kernel
net/packet/af_packet.c
static int packet_bind(struct socket *sock, struct sockaddr *uaddr, int addr_len) { struct sockaddr_ll *sll = (struct sockaddr_ll *)uaddr; struct sock *sk = sock->sk; if (addr_len < sizeof(struct sockaddr_ll)) return -EINVAL; if (sll->sll_family != AF_PACKET) return -EINVAL; r...
[ 1, 0 ]
Linux Kernel
net/packet/af_packet.c
static int packet_getname_spkt(struct socket *sock, struct sockaddr *uaddr, int peer) { struct net_device *dev; struct sock *sk = sock->sk; if (peer) return -EOPNOTSUPP; uaddr->sa_family = AF_PACKET; memset(uaddr->sa_data, 0, sizeof(uaddr->sa_data_min)); rcu_read_lock()...
[ 1, 0 ]
Linux Kernel
net/packet/af_packet.c
static int packet_dev_mc(struct net_device *dev, struct packet_mclist *i, int what) { switch (i->type) { case PACKET_MR_MULTICAST: if (i->alen != dev->addr_len) return -EINVAL; if (what > 0) return dev_mc_add(dev, i->addr); else return dev_mc_del(dev, i->addr)...
[ 0, 0 ]
Linux Kernel
net/packet/af_packet.c
static void packet_dev_mclist_delete(struct net_device *dev, struct packet_mclist **mlp) { struct packet_mclist *ml; while ((ml = *mlp) != NULL) { if (ml->ifindex == dev->ifindex) { packet_dev_mc(dev, ml, -1); *mlp = ml->next; kfree(ml); } else ...
[ 0, 0 ]
Linux Kernel
net/packet/af_packet.c
static void packet_mm_open(struct vm_area_struct *vma) { struct file *file = vma->vm_file; struct socket *sock = file->private_data; struct sock *sk = sock->sk; if (sk) atomic_inc(&pkt_sk(sk)->mapped); }
[ 0, 0 ]
Linux Kernel
net/packet/af_packet.c
static char *alloc_one_pg_vec_page(unsigned long order) { char *buffer; gfp_t gfp_flags = GFP_KERNEL | __GFP_COMP | __GFP_ZERO | __GFP_NOWARN | __GFP_NORETRY; buffer = (char *)__get_free_pages(gfp_flags, order); if (buffer) return buffer; buffer = vzalloc(array_size((1 << order), PAGE_SIZE)); if...
[ 0, 0 ]
Linux Kernel
net/packet/af_packet.c
static int packet_seq_show(struct seq_file *seq, void *v) { if (v == SEQ_START_TOKEN) seq_printf(seq, "%*sRefCnt Type Proto Iface R Rmem User Inode\n", IS_ENABLED(CONFIG_64BIT) ? -17 : -9, "sk"); else { struct sock *s = sk_entry(v); const struct packet_sock *po = pkt_sk(s); seq...
[ 1, 0 ]
Linux Kernel
net/packet/diag.c
static int pdiag_put_mclist(const struct packet_sock *po, struct sk_buff *nlskb) { struct nlattr *mca; struct packet_mclist *ml; mca = nla_nest_start_noflag(nlskb, PACKET_DIAG_MCLIST); if (!mca) return -EMSGSIZE; rtnl_lock(); for (ml = po->mclist; ml; ml = ml->next) { ...
[ 1, 0 ]
Linux Kernel
net/mac80211/tkip.c
void ieee80211_get_tkip_rx_p1k(struct ieee80211_key_conf *keyconf, const u8 *ta, u32 iv32, u16 *p1k) { const u8 *tk = &keyconf->key[NL80211_TKIP_DATA_OFFSET_ENCR_KEY]; struct tkip_ctx ctx; tkip_mixing_phase1(tk, &ctx, ta, iv32); memcpy(p1k, ctx.p1k, sizeof(ctx.p1k)); }
[ 1, 0 ]
Linux Kernel
net/mac80211/trace.c
void __sdata_info(const char *fmt, ...) { struct va_format vaf = { .fmt = fmt, }; va_list args; va_start(args, fmt); vaf.va = &args; pr_info("%pV", &vaf); trace_mac80211_info(&vaf); va_end(args); }
[ 0, 0 ]
Linux Kernel
net/mac80211/trace.c
void __sdata_dbg(bool print, const char *fmt, ...) { struct va_format vaf = { .fmt = fmt, }; va_list args; va_start(args, fmt); vaf.va = &args; if (print) pr_debug("%pV", &vaf); trace_mac80211_dbg(&vaf); va_end(args); }
[ 0, 0 ]
Linux Kernel
net/mac80211/trace.c
void __wiphy_dbg(struct wiphy *wiphy, bool print, const char *fmt, ...) { struct va_format vaf = { .fmt = fmt, }; va_list args; va_start(args, fmt); vaf.va = &args; if (print) wiphy_dbg(wiphy, "%pV", &vaf); trace_mac80211_dbg(&vaf); va_end(args); }
[ 0, 0 ]
Linux Kernel
net/mac80211/tx.c
static ieee80211_tx_result debug_noinline ieee80211_tx_h_check_assoc(struct ieee80211_tx_data *tx) { struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)tx->skb->data; struct ieee80211_tx_info *info = IEEE80211_SKB_CB(tx->skb); bool assoc = false; if (unlikely(info->flags & IEEE80211_TX_CTL_INJECTED)) ret...
[ 1, 0 ]
Linux Kernel
net/mac80211/tx.c
static void purge_old_ps_buffers(struct ieee80211_local *local) { int total = 0, purged = 0; struct sk_buff *skb; struct ieee80211_sub_if_data *sdata; struct sta_info *sta; list_for_each_entry_rcu(sdata, &local->interfaces, list) { struct ps_data *ps; if (sdata->vif.type == NL80211_IFTYPE_AP) ...
[ 0, 0 ]
Linux Kernel
net/mac80211/tx.c
static int ieee80211_fragment(struct ieee80211_tx_data *tx, struct sk_buff *skb, int hdrlen, int frag_threshold) { struct ieee80211_local *local = tx->local; struct ieee80211_tx_info *info; struct sk_buff *tmp; int per_fragm = frag_threshold - hdrlen - FCS_LEN; int pos = hdrlen +...
[ 1, 0 ]
Linux Kernel
net/mac80211/tx.c
static ieee80211_tx_result debug_noinline ieee80211_tx_h_encrypt(struct ieee80211_tx_data *tx) { if (!tx->key) return TX_CONTINUE; switch (tx->key->conf.cipher) { case WLAN_CIPHER_SUITE_WEP40: case WLAN_CIPHER_SUITE_WEP104: return ieee80211_crypto_wep_encrypt(tx); case WLAN_CIPHER_SUITE_TKIP: re...
[ 1, 0 ]
Linux Kernel
net/mac80211/tx.c
static void ieee80211_set_skb_enqueue_time(struct sk_buff *skb) { struct sk_buff *next; codel_time_t now = codel_get_time(); skb_list_walk_safe(skb, skb, next) IEEE80211_SKB_CB(skb) ->control.enqueue_time = now; }
[ 0, 0 ]
Linux Kernel
net/mac80211/tx.c
static void codel_drop_func(struct sk_buff *skb, void *ctx) { struct ieee80211_local *local; struct ieee80211_hw *hw; struct txq_info *txqi; txqi = ctx; local = vif_to_sdata(txqi->txq.vif)->local; hw = &local->hw; ieee80211_free_txskb(hw, skb); }
[ 0, 0 ]
Linux Kernel
net/mac80211/tx.c
static bool ieee80211_queue_skb(struct ieee80211_local *local, struct ieee80211_sub_if_data *sdata, struct sta_info *sta, struct sk_buff *skb) { struct ieee80211_vif *vif; struct txq_info *txqi; if (sdata->vif.type == NL80211_IFTYPE_MONITOR) re...
[ 0, 0 ]
Linux Kernel
net/mac80211/tx.c
bool ieee80211_tx_prepare_skb(struct ieee80211_hw *hw, struct ieee80211_vif *vif, struct sk_buff *skb, int band, struct ieee80211_sta **sta) { struct ieee80211_sub_if_data *sdata = vif_to_sdata(vif); struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb); ...
[ 0, 0 ]
Linux Kernel
net/mac80211/tx.c
static bool ieee80211_validate_radiotap_len(struct sk_buff *skb) { struct ieee80211_radiotap_header *rthdr = (struct ieee80211_radiotap_header *)skb->data; if (unlikely(skb->len < sizeof(struct ieee80211_radiotap_header))) return false; /* too short to be possibly valid */ /* is it a header version we...
[ 1, 0 ]
Linux Kernel
net/mac80211/tx.c
static inline bool ieee80211_is_tdls_setup(struct sk_buff *skb) { u16 ethertype = (skb->data[12] << 8) | skb->data[13]; return ethertype == ETH_P_TDLS && skb->len > 14 && skb->data[14] == WLAN_TDLS_SNAP_RFTYPE; }
[ 0, 0 ]
Linux Kernel
net/mac80211/tx.c
static u16 ieee80211_store_ack_skb(struct ieee80211_local *local, struct sk_buff *skb, u32 *info_flags, u64 *cookie) { struct sk_buff *ack_skb; u16 info_id = 0; if (skb->sk) ack_skb = skb_clone_sk(skb); else ack_skb = skb_clone(skb,...
[ 0, 0 ]
Linux Kernel
net/mac80211/tx.c
static netdev_features_t ieee80211_sdata_netdev_features(struct ieee80211_sub_if_data *sdata) { if (sdata->vif.type != NL80211_IFTYPE_AP_VLAN) return sdata->vif.netdev_features; if (!sdata->bss) return 0; sdata = container_of(sdata->bss, struct ieee80211_sub_if_data, u.ap); return sdata->vif.netdev_f...
[ 0, 0 ]
Linux Kernel
net/mac80211/tx.c
static bool ieee80211_txq_schedule_airtime_check(struct ieee80211_local *local, u8 ac) { unsigned int num_txq = 0; struct txq_info *txq; u32 aql_limit; if (!wiphy_ext_feature_isset(local->hw.wiphy, NL80211_EXT_FEATURE_AQL)) return true; list_for_each_ent...
[ 1, 0 ]
Linux Kernel
net/mac80211/tx.c
void __ieee80211_subif_start_xmit(struct sk_buff *skb, struct net_device *dev, u32 info_flags, u32 ctrl_flags, u64 *cookie) { struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev); struct ieee80211_local *local = sdata->local; struct sta_info *sta; struct sk_buff *...
[ 1, 0 ]
Linux Kernel
net/mac80211/tx.c
static int ieee80211_change_da(struct sk_buff *skb, struct sta_info *sta) { struct ethhdr *eth; int err; err = skb_ensure_writable(skb, ETH_HLEN); if (unlikely(err)) return err; eth = (void *)skb->data; ether_addr_copy(eth->h_dest, sta->sta.addr); return 0; }
[ 0, 0 ]
Linux Kernel
net/mac80211/tx.c
static bool ieee80211_multicast_to_unicast(struct sk_buff *skb, struct net_device *dev) { struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev); const struct ethhdr *eth = (void *)skb->data; const struct vlan_ethhdr *ethvlan = (void *)skb->data; __be16 eth...
[ 1, 0 ]
Linux Kernel
net/mac80211/tx.c
static void ieee80211_convert_to_unicast(struct sk_buff *skb, struct net_device *dev, struct sk_buff_head *queue) { struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev); struct ieee80211_local *local = sdata->local; co...
[ 0, 0 ]
Linux Kernel
net/mac80211/tx.c
static bool ieee80211_tx_8023(struct ieee80211_sub_if_data *sdata, struct sk_buff *skb, struct sta_info *sta, bool txpending) { struct ieee80211_local *local = sdata->local; struct sk_buff *next; bool ret = true; if (ieee80211_queue_skb(local, sdata,...
[ 0, 0 ]
Linux Kernel
net/mac80211/tx.c
netdev_tx_t ieee80211_subif_start_xmit_8023(struct sk_buff *skb, struct net_device *dev) { struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev); struct ethhdr *ehdr = (struct ethhdr *)skb->data; struct ieee80211_key *key; struct sta_info *sta; if (un...
[ 1, 0 ]
Linux Kernel
net/mac80211/tx.c
static bool ieee80211_tx_pending_skb(struct ieee80211_local *local, struct sk_buff *skb) { struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb); struct ieee80211_sub_if_data *sdata; struct sta_info *sta; struct ieee80211_hdr *hdr; bool result; struct ieee80211_chanctx_...
[ 0, 0 ]
Linux Kernel
net/mac80211/tx.c
struct sk_buff *ieee80211_proberesp_get(struct ieee80211_hw *hw, struct ieee80211_vif *vif) { struct sk_buff *skb = NULL; struct probe_resp *presp = NULL; struct ieee80211_hdr *hdr; struct ieee80211_sub_if_data *sdata = vif_to_sdata(vif); if (sdata->vif.type != NL8021...
[ 1, 0 ]
Linux Kernel
net/mac80211/tx.c
struct sk_buff *ieee80211_get_fils_discovery_tmpl(struct ieee80211_hw *hw, struct ieee80211_vif *vif) { struct sk_buff *skb = NULL; struct fils_discovery_data *tmpl = NULL; struct ieee80211_sub_if_data *sdata = vif_to_sdata(vif); if (sdata->vif.type != NL80211...
[ 1, 0 ]
Linux Kernel
net/mac80211/tx.c
void ieee80211_tx_skb_tid(struct ieee80211_sub_if_data *sdata, struct sk_buff *skb, int tid, int link_id) { struct ieee80211_chanctx_conf *chanctx_conf; enum nl80211_band band; rcu_read_lock(); if (!sdata->vif.valid_links) { WARN_ON(link_id >= 0); chanctx_conf = rcu_dereferenc...
[ 0, 0 ]
Linux Kernel
net/mac80211/tx.c
int ieee80211_probe_mesh_link(struct wiphy *wiphy, struct net_device *dev, const u8 *buf, size_t len) { struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev); struct ieee80211_local *local = sdata->local; struct sk_buff *skb; skb = dev_alloc_skb(local->hw.extra_tx_hea...
[ 0, 0 ]
Linux Kernel
net/mac80211/util.c
void ieee80211_tx_set_protected(struct ieee80211_tx_data *tx) { struct sk_buff *skb; struct ieee80211_hdr *hdr; skb_queue_walk(&tx->skbs, skb) { hdr = (struct ieee80211_hdr *)skb->data; hdr->frame_control |= cpu_to_le16(IEEE80211_FCTL_PROTECTED); } }
[ 0, 0 ]
Linux Kernel
net/mac80211/util.c
__le16 ieee80211_rts_duration(struct ieee80211_hw *hw, struct ieee80211_vif *vif, size_t frame_len, const struct ieee80211_tx_info *frame_txctl) { struct ieee80211_local *local = hw_to_local(hw); struct ieee80211_rate *rate; struct ieee80211_sub_if_data ...
[ 0, 0 ]
Linux Kernel
net/mac80211/util.c
void ieee80211_wake_queue_by_reason(struct ieee80211_hw *hw, int queue, enum queue_stop_reason reason, bool refcounted) { struct ieee80211_local *local = hw_to_local(hw); unsigned long flags; spin_lock_irqsave(&local->queue_stop_reason_lock...
[ 0, 0 ]
Linux Kernel
net/mac80211/util.c
void ieee80211_wake_queue(struct ieee80211_hw *hw, int queue) { ieee80211_wake_queue_by_reason(hw, queue, IEEE80211_QUEUE_STOP_REASON_DRIVER, false); }
[ 0, 0 ]
Linux Kernel
net/mac80211/util.c
void ieee80211_add_pending_skbs(struct ieee80211_local *local, struct sk_buff_head *skbs) { struct ieee80211_hw *hw = &local->hw; struct sk_buff *skb; unsigned long flags; int queue, i; spin_lock_irqsave(&local->queue_stop_reason_lock, flags); while ((skb = skb_dequeue(skbs...
[ 0, 0 ]
Linux Kernel
net/mac80211/util.c
void ieee80211_stop_queues_by_reason(struct ieee80211_hw *hw, unsigned long queues, enum queue_stop_reason reason, bool refcounted) { struct ieee80211_local *local = hw_to_local(hw); unsigned long flags; ...
[ 0, 0 ]
Linux Kernel
net/mac80211/util.c
static unsigned int ieee80211_get_vif_queues(struct ieee80211_local *local, struct ieee80211_sub_if_data *sdata) { unsigned int queues; if (sdata && ieee80211_hw_check(&local->hw, QUEUE_CONTROL)) { int ac; queues = 0; for (ac = 0; ac < IEEE80211_NUM_ACS; ac++) queues |=...
[ 0, 0 ]
Linux Kernel
net/mac80211/util.c
void __ieee80211_flush_queues(struct ieee80211_local *local, struct ieee80211_sub_if_data *sdata, unsigned int queues, bool drop) { if (!local->ops->flush) return; if (!queues || !ieee80211_hw_check(&local->hw, QUEUE_CONTROL)) queues = ieee80211_g...
[ 1, 0 ]
Linux Kernel
net/mac80211/util.c
void ieee80211_wake_vif_queues(struct ieee80211_local *local, struct ieee80211_sub_if_data *sdata, enum queue_stop_reason reason) { ieee80211_wake_queues_by_reason( &local->hw, ieee80211_get_vif_queues(local, sdata), reason, true); }
[ 0, 0 ]
Linux Kernel
net/mac80211/util.c
static void __iterate_interfaces(struct ieee80211_local *local, u32 iter_flags, void (*iterator)(void *data, u8 *mac, struct ieee80211_vif *vif), void *data) { struct ieee80211_sub_if_data *sdata; bo...
[ 1, 0 ]
Linux Kernel
net/mac80211/util.c
void ieee80211_iterate_stations(struct ieee80211_hw *hw, void (*iterator)(void *data, struct ieee80211_sta *sta), void *data) { struct ieee80211_local *local = hw_to_local(hw); mutex_lock(&local->sta_m...
[ 0, 0 ]
Linux Kernel
net/mac80211/util.c
static void ieee80211_mle_get_sta_prof(struct ieee802_11_elems *elems, u8 link_id) { const struct ieee80211_multi_link_elem *ml = elems->multi_link; size_t ml_len = elems->multi_link_len; const struct element *sub; if (!ml || !ml_len) return; if (le16_get_bits(ml->...
[ 0, 0 ]
Linux Kernel
net/mac80211/util.c
void ieee80211_regulatory_limit_wmm_params( struct ieee80211_sub_if_data *sdata, struct ieee80211_tx_queue_params *qparam, int ac) { struct ieee80211_chanctx_conf *chanctx_conf; const struct ieee80211_reg_rule *rrule; const struct ieee80211_wmm_ac *wmm_ac; u16 center_freq = 0; if (sdata->vif.type !=...
[ 1, 0 ]
Linux Kernel
net/mac80211/util.c
void ieee80211_send_deauth_disassoc(struct ieee80211_sub_if_data *sdata, const u8 *da, const u8 *bssid, u16 stype, u16 reason, bool send_frame, u8 *frame_buf) { struct ieee80211_local *local = sdata->local; s...
[ 1, 0 ]
Linux Kernel
net/mac80211/util.c
static u8 *ieee80211_write_he_6ghz_cap(u8 *pos, __le16 cap, u8 *end) { if ((end - pos) < 5) return pos; *pos++ = WLAN_EID_EXTENSION; *pos++ = 1 + sizeof(cap); *pos++ = WLAN_EID_EXT_HE_6GHZ_CAPA; memcpy(pos, &cap, sizeof(cap)); return pos + 2; }
[ 1, 0 ]
Linux Kernel
net/mac80211/util.c
void ieee80211_stop_device(struct ieee80211_local *local) { ieee80211_led_radio(local, false); ieee80211_mod_tpt_led_trig(local, 0, IEEE80211_TPT_LEDTRIG_FL_RADIO); cancel_work_sync(&local->reconfig_filter); flush_workqueue(local->workqueue); drv_stop(local); }
[ 0, 0 ]
Linux Kernel
net/mac80211/util.c
static void ieee80211_assign_chanctx(struct ieee80211_local *local, struct ieee80211_sub_if_data *sdata, struct ieee80211_link_data *link) { struct ieee80211_chanctx_conf *conf; struct ieee80211_chanctx *ctx; if (!local->use_chanctx) ...
[ 0, 0 ]
Linux Kernel
net/mac80211/util.c
static void ieee80211_reconfig_stations(struct ieee80211_sub_if_data *sdata) { struct ieee80211_local *local = sdata->local; struct sta_info *sta; mutex_lock(&local->sta_mtx); list_for_each_entry(sta, &local->sta_list, list) { enum ieee80211_sta_state state; if (!sta->uploaded || sta->sdata != sdata) ...
[ 1, 0 ]
Linux Kernel
net/mac80211/util.c
void ieee80211_ie_build_he_6ghz_cap(struct ieee80211_sub_if_data *sdata, enum ieee80211_smps_mode smps_mode, struct sk_buff *skb) { struct ieee80211_supported_band *sband; const struct ieee80211_sband_iftype_data *iftd; enum nl80211_iftype if...
[ 1, 0 ]
Linux Kernel
net/mac80211/util.c
int ieee80211_add_srates_ie(struct ieee80211_sub_if_data *sdata, struct sk_buff *skb, bool need_basic, enum nl80211_band band) { struct ieee80211_local *local = sdata->local; struct ieee80211_supported_band *sband; int rate, shift; u8 i, rates, *pos; u3...
[ 1, 0 ]
Linux Kernel
net/mac80211/util.c
void ieee80211_dfs_radar_detected_work(struct work_struct *work) { struct ieee80211_local *local = container_of(work, struct ieee80211_local, radar_detected_work); struct cfg80211_chan_def chandef = local->hw.conf.chandef; struct ieee80211_chanctx *ctx; int num_chanctx = 0; mutex_lock(&local->chanctx_m...
[ 0, 1 ]
Linux Kernel
net/mac80211/util.c
void ieee80211_radar_detected(struct ieee80211_hw *hw) { struct ieee80211_local *local = hw_to_local(hw); trace_api_radar_detected(local); schedule_work(&local->radar_detected_work); }
[ 0, 0 ]
Linux Kernel
net/mac80211/util.c
bool ieee80211_smps_is_restrictive(enum ieee80211_smps_mode smps_mode_old, enum ieee80211_smps_mode smps_mode_new) { if (WARN_ON_ONCE(smps_mode_old == IEEE80211_SMPS_AUTOMATIC || smps_mode_new == IEEE80211_SMPS_AUTOMATIC)) return false; switch (smps_mode_ol...
[ 0, 0 ]
Linux Kernel
net/mac80211/util.c
static void ieee80211_iter_max_chans(const struct ieee80211_iface_combination *c, void *data) { u32 *max_num_different_channels = data; *max_num_different_channels = max(*max_num_different_channels, c->num_different_channels); }
[ 0, 0 ]
Linux Kernel
net/mac80211/util.c
void ieee80211_add_aid_request_ie(struct ieee80211_sub_if_data *sdata, struct sk_buff *skb) { u8 *pos = skb_put(skb, 3); *pos++ = WLAN_EID_AID_REQUEST; *pos++ = 1; *pos++ = 0; }
[ 0, 0 ]
Linux Kernel
net/mac80211/util.c
u8 *ieee80211_add_wmm_info_ie(u8 *buf, u8 qosinfo) { *buf++ = WLAN_EID_VENDOR_SPECIFIC; *buf++ = 7; *buf++ = 0x00; /* Microsoft OUI 00:50:F2 */ *buf++ = 0x50; *buf++ = 0xf2; *buf++ = 2; /* WME */ *buf++ = 0; /* WME info */ *buf++ = 1; /* WME ver */ *buf++ = qosinfo; /* U-APSD no in u...
[ 1, 0 ]
Linux Kernel
net/mac80211/vht.c
enum nl80211_chan_width ieee80211_sta_cap_chan_bw(struct link_sta_info *link_sta) { struct ieee80211_sta_vht_cap *vht_cap = &link_sta->pub->vht_cap; u32 cap_width; if (!vht_cap->vht_supported) { if (!link_sta->pub->ht_cap.ht_supported) return NL80211_CHAN_WIDTH_20_NOHT; return link_sta->pub->ht_c...
[ 1, 0 ]
Linux Kernel
net/mac80211/vht.c
enum nl80211_chan_width ieee80211_sta_rx_bw_to_chan_width(struct link_sta_info *link_sta) { enum ieee80211_sta_rx_bandwidth cur_bw = link_sta->pub->bandwidth; struct ieee80211_sta_vht_cap *vht_cap = &link_sta->pub->vht_cap; u32 cap_width; switch (cur_bw) { case IEEE80211_STA_RX_BW_20: if (!link_sta->pub...
[ 1, 0 ]
Linux Kernel
net/mac80211/vht.c
enum ieee80211_sta_rx_bandwidth ieee80211_sta_cur_vht_bw(struct link_sta_info *link_sta) { struct sta_info *sta = link_sta->sta; struct ieee80211_bss_conf *link_conf; enum nl80211_chan_width bss_width; enum ieee80211_sta_rx_bandwidth bw; rcu_read_lock(); link_conf = rcu_dereference(sta->sdata->vif.link_con...
[ 0, 1 ]
Linux Kernel
net/mac80211/vht.c
void ieee80211_update_mu_groups(struct ieee80211_vif *vif, unsigned int link_id, const u8 *membership, const u8 *position) { struct ieee80211_bss_conf *link_conf; rcu_read_lock(); link_conf = rcu_dereference(vif->link_conf[link_id]); if (!WARN_ON_ONCE(!link_conf || !link_conf-...
[ 1, 0 ]
Linux Kernel
net/mac80211/vht.c
void ieee80211_vht_handle_opmode(struct ieee80211_sub_if_data *sdata, struct link_sta_info *link_sta, u8 opmode, enum nl80211_band band) { struct ieee80211_local *local = sdata->local; struct ieee80211_supported_band *sband = local->hw.wiphy->bands[...
[ 1, 0 ]
Linux Kernel
net/mac80211/wep.c
static inline bool ieee80211_wep_weak_iv(u32 iv, int keylen) { if ((iv & 0xff00) == 0xff00) { u8 B = (iv >> 16) & 0xff; if (B >= 3 && B < 3 + keylen) return true; } return false; }
[ 1, 0 ]
Linux Kernel
net/mac80211/wep.c
int ieee80211_wep_encrypt_data(struct arc4_ctx *ctx, u8 *rc4key, size_t klen, u8 *data, size_t data_len) { __le32 icv; icv = cpu_to_le32(~crc32_le(~0, data, data_len)); put_unaligned(icv, (__le32 *)(data + data_len)); arc4_setkey(ctx, rc4key, klen); arc4_crypt(ctx, data, data,...
[ 1, 0 ]
Linux Kernel
net/mac80211/wep.c
static int ieee80211_wep_decrypt(struct ieee80211_local *local, struct sk_buff *skb, struct ieee80211_key *key) { u32 klen; u8 rc4key[3 + WLAN_KEY_LEN_WEP104]; u8 keyidx; struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data; unsigned i...
[ 1, 0 ]
Linux Kernel
net/mac80211/wep.c
ieee80211_rx_result ieee80211_crypto_wep_decrypt(struct ieee80211_rx_data *rx) { struct sk_buff *skb = rx->skb; struct ieee80211_rx_status *status = IEEE80211_SKB_RXCB(skb); struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data; __le16 fc = hdr->frame_control; if (!ieee80211_is_data(fc) && !ieee80211...
[ 1, 0 ]
Linux Kernel
net/mac80211/wme.c
static inline u8 ieee80211_fix_reserved_tid(u8 tid) { switch (tid) { case 0: return 3; case 1: return 2; case 2: return 1; case 3: return 0; case 4: return 5; case 5: return 4; case 6: return 7; case 7: return 6; } return 0; }
[ 1, 0 ]
Linux Kernel
net/mac80211/wpa.c
ieee80211_tx_result ieee80211_crypto_tkip_encrypt(struct ieee80211_tx_data *tx) { struct sk_buff *skb; ieee80211_tx_set_protected(tx); skb_queue_walk(&tx->skbs, skb) { if (tkip_encrypt_skb(tx, skb) < 0) return TX_DROP; } return TX_CONTINUE; }
[ 0, 0 ]
Linux Kernel
net/mac80211/wpa.c
static inline void gcmp_pn2hdr(u8 *hdr, const u8 *pn, int key_id) { hdr[0] = pn[5]; hdr[1] = pn[4]; hdr[2] = 0; hdr[3] = 0x20 | (key_id << 6); hdr[4] = pn[3]; hdr[5] = pn[2]; hdr[6] = pn[1]; hdr[7] = pn[0]; }
[ 0, 0 ]
Linux Kernel
net/mac80211/wpa.c
static void bip_aad(struct sk_buff *skb, u8 *aad) { __le16 mask_fc; struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data; /* FC type/subtype */ /* Mask FC Retry, PwrMgt, MoreData flags to zero */ mask_fc = hdr->frame_control; mask_fc &= ~cpu_to_le16(IEEE80211_FCTL_RETRY | IEEE80211_FCTL_PM | ...
[ 1, 0 ]
Linux Kernel
net/mac80211/wpa.c
static inline void bip_ipn_set64(u8 *d, u64 pn) { *d++ = pn; *d++ = pn >> 8; *d++ = pn >> 16; *d++ = pn >> 24; *d++ = pn >> 32; *d = pn >> 40; }
[ 1, 0 ]
Linux Kernel
net/mac80211/wpa.c
ieee80211_rx_result ieee80211_crypto_aes_cmac_decrypt(struct ieee80211_rx_data *rx) { struct sk_buff *skb = rx->skb; struct ieee80211_rx_status *status = IEEE80211_SKB_RXCB(skb); struct ieee80211_key *key = rx->key; struct ieee80211_mmie *mmie; u8 aad[20], mic[8], ipn[6]; struct ieee80211_hdr *hdr = (struct...
[ 1, 0 ]
Linux Kernel
net/mac802154/cfg.c
static int ieee802154_suspend(struct wpan_phy *wpan_phy) { struct ieee802154_local *local = wpan_phy_priv(wpan_phy); if (!local->open_count) goto suspend; ieee802154_sync_and_hold_queue(local); synchronize_net(); ieee802154_stop_device(local); suspend: local->suspended = true; return 0; }
[ 0, 0 ]
Linux Kernel
net/mac802154/cfg.c
static int ieee802154_resume(struct wpan_phy *wpan_phy) { struct ieee802154_local *local = wpan_phy_priv(wpan_phy); int ret; if (!local->open_count) goto wake_up; /* restart hardware */ ret = drv_start(local, local->phy->filtering, &local->addr_filt); if (ret) return ret; wake_up: ieee802154_re...
[ 0, 0 ]
Linux Kernel
net/mac802154/cfg.c
static int ieee802154_add_iface(struct wpan_phy *phy, const char *name, unsigned char name_assign_type, enum nl802154_iftype type, __le64 extended_addr) { struct ieee802154_local *local = wpan_phy_priv(phy); struct net_...
[ 0, 0 ]
Linux Kernel
net/mac802154/cfg.c
static int ieee802154_set_channel(struct wpan_phy *wpan_phy, u8 page, u8 channel) { struct ieee802154_local *local = wpan_phy_priv(wpan_phy); int ret; ASSERT_RTNL(); if (wpan_phy->current_page == page && wpan_phy->current_channel == channel) return 0; ret = drv_set_ch...
[ 0, 0 ]
Linux Kernel
net/mac802154/cfg.c
static int ieee802154_set_ackreq_default(struct wpan_phy *wpan_phy, struct wpan_dev *wpan_dev, bool ackreq) { ASSERT_RTNL(); wpan_dev->ackreq = ackreq; return 0; }
[ 0, 0 ]
Linux Kernel
net/mac802154/cfg.c
static void ieee802154_unlock_llsec_table(struct wpan_phy *wpan_phy, struct wpan_dev *wpan_dev) { struct net_device *dev = wpan_dev->netdev; struct ieee802154_sub_if_data *sdata = IEEE802154_DEV_TO_SUB_IF(dev); mutex_unlock(&sdata->sec_mtx); }
[ 0, 0 ]
Linux Kernel
net/mac802154/cfg.c
static int ieee802154_get_llsec_params(struct wpan_phy *wpan_phy, struct wpan_dev *wpan_dev, struct ieee802154_llsec_params *params) { struct net_device *dev = wpan_dev->netdev; struct ieee802154_sub_if_data *sdata = IEEE802154_DEV_TO_SU...
[ 0, 0 ]
Linux Kernel
net/mac802154/cfg.c
static int ieee802154_add_llsec_key(struct wpan_phy *wpan_phy, struct wpan_dev *wpan_dev, const struct ieee802154_llsec_key_id *id, const struct ieee802154_llsec_key *key) { struct net_device *dev = wpan_dev->...
[ 0, 0 ]