| /linux/net/mac80211/ |
| H A D | rx.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * Copyright 2002-2005, Instant802 Networks, Inc. 4 * Copyright 2005-2006, Devicescape Software, Inc. 5 * Copyright 2006-2007 Jiri Benc <jbenc@suse.cz> 6 * Copyright 2007-2010 Johannes Berg <johannes@sipsolutions.net> 7 * Copyright 2013-2014 Intel Mobile Communications GmbH 8 * Copyright(c) 2015 - 2017 Intel Deutschland GmbH 9 * Copyright (C) 2018-2025 Intel Corporation 28 #include "driver-ops.h" 47 struct ieee80211_rx_status *status = IEEE80211_SKB_RXCB(skb); in ieee80211_clean_skb() local [all …]
|
| H A D | wep.c | 1 // SPDX-License-Identifier: GPL-2.0-only 29 get_random_bytes(&local->wep_iv, IEEE80211_WEP_IV_LEN); in ieee80211_wep_init() 51 local->wep_iv++; in ieee80211_wep_get_iv() 52 if (ieee80211_wep_weak_iv(local->wep_iv, keylen)) in ieee80211_wep_get_iv() 53 local->wep_iv += 0x0100; in ieee80211_wep_get_iv() 58 *iv++ = (local->wep_iv >> 16) & 0xff; in ieee80211_wep_get_iv() 59 *iv++ = (local->wep_iv >> 8) & 0xff; in ieee80211_wep_get_iv() 60 *iv++ = local->wep_iv & 0xff; in ieee80211_wep_get_iv() 69 struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data; in ieee80211_wep_add_iv() 74 hdr->frame_control |= cpu_to_le16(IEEE80211_FCTL_PROTECTED); in ieee80211_wep_add_iv() [all …]
|
| /linux/drivers/net/wireless/ath/ath6kl/ |
| H A D | htc_mbox.c | 2 * Copyright (c) 2007-2011 Atheros Communications Inc. 3 * Copyright (c) 2011-2012 Qualcomm Atheros, Inc. 21 #include "hif-ops.h" 26 #define CALC_TXRX_PADDED_LEN(dev, len) (__ALIGN_MASK((len), (dev)->block_mask)) argument 34 u16 svc_pri_order[], int len); 36 /* threshold to re-enable Tx bundling for an AC*/ 45 ep_dist->endpoint, credits); in ath6kl_credit_deposit() 47 ep_dist->credits += credits; in ath6kl_credit_deposit() 48 ep_dist->cred_assngd += credits; in ath6kl_credit_deposit() 49 cred_info->cur_free_credits -= credits; in ath6kl_credit_deposit() [all …]
|
| /linux/drivers/iio/imu/bno055/ |
| H A D | bno055_ser_core.c | 1 // SPDX-License-Identifier: GPL-2.0 7 * Copyright (C) 2021-2022 Istituto Italiano di Tecnologia 33 * +------+------+-----+-----+----- ... ----+ 34 * | 0xAA | 0xOO | REG | LEN | payload[LEN] | 35 * +------+------+-----+-----+----- ... ----+ 38 * +------+----------+ 40 * +------+----------+ 45 * sw resets - bno055 on serial bus basically requires the hw reset pin). 48 * +------+------+-----+-----+ 49 * | 0xAA | 0xO1 | REG | LEN | [all …]
|
| /linux/drivers/net/wireless/ath/ath10k/ |
| H A D | htt_rx.c | 1 // SPDX-License-Identifier: ISC 3 * Copyright (c) 2005-2011 Atheros Communications Inc. 4 * Copyright (c) 2011-2017 Qualcomm Atheros, Inc. 23 /* when under memory pressure rx ring refill may fail and needs a retry */ 28 /* shortcut to interpret a raw memory buffer as a rx descriptor */ 38 hash_for_each_possible(ar->htt.rx_ring.skb_table, rxcb, hlist, paddr) in ath10k_htt_rx_find_skb_paddr() 39 if (rxcb->paddr == paddr) in ath10k_htt_rx_find_skb_paddr() 53 if (htt->rx_ring.in_ord_rx) { in ath10k_htt_rx_ring_free() 54 hash_for_each_safe(htt->rx_ring.skb_table, i, n, rxcb, hlist) { in ath10k_htt_rx_ring_free() 56 dma_unmap_single(htt->ar->dev, rxcb->paddr, in ath10k_htt_rx_ring_free() [all …]
|
| H A D | htc.c | 1 // SPDX-License-Identifier: ISC 3 * Copyright (c) 2005-2011 Atheros Communications Inc. 4 * Copyright (c) 2011-2017 Qualcomm Atheros, Inc. 35 WARN_ONCE((unsigned long)skb->data & 3, "unaligned skb"); in ath10k_htc_build_tx_ctrl_skb() 49 if (htc->ar->bus_param.dev_type != ATH10K_DEV_TYPE_HL) in ath10k_htc_restore_tx_skb() 50 dma_unmap_single(htc->ar->dev, skb_cb->paddr, skb->len, DMA_TO_DEVICE); in ath10k_htc_restore_tx_skb() 57 struct ath10k *ar = ep->htc->ar; in ath10k_htc_notify_tx_completion() 61 ep->eid, skb); in ath10k_htc_notify_tx_completion() 68 if (ar->hw_params.delay_unmap_buffer && in ath10k_htc_notify_tx_completion() 69 ep->ul_pipe_id == 3) in ath10k_htc_notify_tx_completion() [all …]
|
| /linux/drivers/net/mctp/ |
| H A D | mctp-usb.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * mctp-usb.c - MCTP-over-USB (DMTF DSP0283) transport binding driver. 8 * Copyright (C) 2024-2025 Code Construct Pty Ltd 14 #include <linux/usb/mctp-usb.h> 40 struct sk_buff *skb = urb->context; in mctp_usb_out_complete() 41 struct net_device *netdev = skb->dev; in mctp_usb_out_complete() 42 int status; in mctp_usb_out_complete() local 44 status = urb->status; in mctp_usb_out_complete() 46 switch (status) { in mctp_usb_out_complete() 47 case -ENOENT: in mctp_usb_out_complete() [all …]
|
| /linux/tools/net/ynl/pyynl/ |
| H A D | ethtool.py | 2 # SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause 17 Verify and convert command-line arguments to the ynl-compatible request. 20 valid_attrs.remove('header') # not user-provided 22 if len(args) == 0: 27 while i < len(args): 29 if i + 1 >= len(args): 44 Pretty-print a set of fields from the reply. desc specifies the 50 if len(desc) == 0: 72 Print out the speed-like strings from the value dict. 74 speed_re = re.compile(r'[0-9]+base[^/]+/.+') [all …]
|
| /linux/drivers/gpu/drm/bridge/adv7511/ |
| H A D | adv7511_cec.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * adv7511_cec.c - Analog Devices ADV7511/33 cec driver 38 unsigned int offset = adv7511->info->reg_cec_offset; in adv_cec_tx_raw_status() 41 if (regmap_read(adv7511->regmap_cec, in adv_cec_tx_raw_status() 49 drm_connector_hdmi_cec_transmit_attempt_done(adv7511->cec_connector, in adv_cec_tx_raw_status() 54 u8 status; in adv_cec_tx_raw_status() local 61 * We set this status bit since this hardware performs in adv_cec_tx_raw_status() 64 status = CEC_TX_STATUS_MAX_RETRIES; in adv_cec_tx_raw_status() 65 if (regmap_read(adv7511->regmap_cec, in adv_cec_tx_raw_status() 68 status |= CEC_TX_STATUS_ERROR; in adv_cec_tx_raw_status() [all …]
|
| /linux/drivers/platform/mellanox/ |
| H A D | mlxbf-tmfifo.c | 1 // SPDX-License-Identifier: GPL-2.0+ 24 #include "mlxbf-tmfifo-regs.h" 35 /* House-keeping timer interval. */ 53 /* ACPI UID for BlueField-3. */ 59 * struct mlxbf_tmfifo_vring - Structure of the TmFifo virtual ring 101 r->desc_head == &r->drop_desc; }) 115 /* Ring types (Rx & Tx). */ 123 * struct mlxbf_tmfifo_vdev - Structure of the TmFifo virtual device 126 * @status: status of the device 129 * @config: non-anonymous union for cons and net [all …]
|
| /linux/drivers/fpga/ |
| H A D | machxo2-spi.c | 1 // SPDX-License-Identifier: GPL-2.0 12 #include <linux/fpga/fpga-mgr.h> 18 /* MachXO2 Programming Guide - sysCONFIG Programming Commands */ 30 * Sheet' sysCONFIG Port Timing Specifications (3-36) 43 /* Status register bits, errors and error mask */ 61 static inline u8 get_err(unsigned long *status) in get_err() argument 63 return (*status >> ERRBITS) & ERRMASK; in get_err() 66 static int get_status(struct spi_device *spi, unsigned long *status) in get_status() argument 69 struct spi_transfer rx, tx; in get_status() local 73 memset(&rx, 0, sizeof(rx)); in get_status() [all …]
|
| /linux/drivers/net/wireless/intel/iwlwifi/dvm/ |
| H A D | rx.c | 1 // SPDX-License-Identifier: GPL-2.0-only 4 * Copyright(c) 2003 - 2014 Intel Corporation. All rights reserved. 6 * Copyright(c) 2018, 2020-2021, 2025 Intel Corporation 18 #include "iwl-trans.h" 19 #include "iwl-io.h" 26 * Generic RX handler implementations 34 struct iwl_error_resp *err_resp = (void *)pkt->data; in iwlagn_rx_reply_error() 38 le32_to_cpu(err_resp->error_type), in iwlagn_rx_reply_error() 39 err_resp->cmd_id, in iwlagn_rx_reply_error() 40 le16_to_cpu(err_resp->bad_cmd_seq_num), in iwlagn_rx_reply_error() [all …]
|
| /linux/net/nfc/nci/ |
| H A D | data.c | 1 // SPDX-License-Identifier: GPL-2.0-only 39 cb = conn_info->data_exchange_cb; in nci_data_exchange_complete() 40 cb_context = conn_info->data_exchange_cb_context; in nci_data_exchange_complete() 42 pr_debug("len %d, err %d\n", skb ? skb->len : 0, err); in nci_data_exchange_complete() 45 timer_delete_sync(&ndev->data_timer); in nci_data_exchange_complete() 46 clear_bit(NCI_DATA_EXCHANGE_TO, &ndev->flags); in nci_data_exchange_complete() 52 pr_err("no rx callback, dropping rx data...\n"); in nci_data_exchange_complete() 59 clear_bit(NCI_DATA_EXCHANGE, &ndev->flags); in nci_data_exchange_complete() 62 /* ----------------- NCI TX Data ----------------- */ 70 int plen = skb->len; in nci_push_data_hdr() [all …]
|
| /linux/drivers/net/ethernet/realtek/ |
| H A D | 8139cp.c | 3 Copyright 2001-2004 Jeff Garzik <jgarzik@pobox.com> 8 Copyright 1999-2001 by Donald Becker. [natsemi.c] 9 Written 1997-2001 by Donald Becker. [8139too.c] 10 Copyright 1998-2001 by Jes Sorensen, <jes@trained-monkey.org>. [acenic.c] 23 Wake-on-LAN support - Felipe Damasio <felipewd@terra.com.br> 24 PCI suspend/resume - Felipe Damasio <felipewd@terra.com.br> 25 LinkChg interrupt - Felipe Damasio <felipewd@terra.com.br> 32 * Consider Rx interrupt mitigation using TimerIntr 33 * Investigate using skb->priority with h/w VLAN priority 34 * Investigate using High Priority Tx Queue with skb->priority [all …]
|
| /linux/drivers/net/ethernet/myricom/myri10ge/ |
| H A D | myri10ge.c | 2 * myri10ge.c: Myricom Myri-10G Ethernet driver. 4 * Copyright (C) 2005 - 2011 Myricom, Inc. 34 * http://www.myri.com/scs/download-Myri10GE.html 49 #include <linux/dma-mapping.h> 78 #define MYRI10GE_VERSION_STR "1.5.3-1.534" 109 DEFINE_DMA_UNMAP_LEN(len); 116 DEFINE_DMA_UNMAP_LEN(len); 135 int mask; /* number of rx slots -1 */ 146 int mask; /* number of transmit slots -1 */ 274 {[0 ... (MYRI10GE_MAX_BOARDS - 1)] = NULL }; [all …]
|
| /linux/drivers/net/wireless/ath/ath12k/ |
| H A D | htc.c | 1 // SPDX-License-Identifier: BSD-3-Clause-Clear 3 * Copyright (c) 2018-2021 The Linux Foundation. All rights reserved. 4 * Copyright (c) 2021-2022, 2024 Qualcomm Innovation Center, Inc. All rights reserved. 22 /* FW/HTC requires 4-byte aligned streams */ in ath12k_htc_alloc_skb() 23 if (!IS_ALIGNED((unsigned long)skb->data, 4)) in ath12k_htc_alloc_skb() 45 WARN_ON_ONCE(!IS_ALIGNED((unsigned long)skb->data, 4)); in ath12k_htc_build_tx_ctrl_skb() 58 hdr = (struct ath12k_htc_hdr *)skb->data; in ath12k_htc_prepare_tx_skb() 61 hdr->htc_info = le32_encode_bits(ep->eid, HTC_HDR_ENDPOINTID) | in ath12k_htc_prepare_tx_skb() 62 le32_encode_bits((skb->len - sizeof(*hdr)), in ath12k_htc_prepare_tx_skb() 65 if (ep->tx_credit_flow_enabled) in ath12k_htc_prepare_tx_skb() [all …]
|
| /linux/drivers/net/ethernet/micrel/ |
| H A D | ks8842.c | 1 // SPDX-License-Identifier: GPL-2.0-only 23 #include <linux/dma-mapping.h> 77 /* When running via timberdale in DMA mode, the RX interrupt should be 79 RX DMA internally. 147 #define KS8842_USE_DMA(adapter) (((adapter)->dma_tx.channel != -1) && \ 148 ((adapter)->dma_rx.channel != -1)) 168 iowrite32(1, adapter->hw_addr + REQ_TIMB_DMA_RESUME); in ks8842_resume_dma() 173 iowrite16(bank, adapter->hw_addr + REG_SELECT_BANK); in ks8842_select_bank() 180 iowrite8(value, adapter->hw_addr + offset); in ks8842_write8() 187 iowrite16(value, adapter->hw_addr + offset); in ks8842_write16() [all …]
|
| /linux/drivers/net/wireless/ath/ath11k/ |
| H A D | htc.c | 1 // SPDX-License-Identifier: BSD-3-Clause-Clear 3 * Copyright (c) 2018-2019 The Linux Foundation. All rights reserved. 4 * Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. All rights reserved. 22 /* FW/HTC requires 4-byte aligned streams */ in ath11k_htc_alloc_skb() 23 if (!IS_ALIGNED((unsigned long)skb->data, 4)) in ath11k_htc_alloc_skb() 45 WARN_ON_ONCE(!IS_ALIGNED((unsigned long)skb->data, 4)); in ath11k_htc_build_tx_ctrl_skb() 58 hdr = (struct ath11k_htc_hdr *)skb->data; in ath11k_htc_prepare_tx_skb() 61 hdr->htc_info = FIELD_PREP(HTC_HDR_ENDPOINTID, ep->eid) | in ath11k_htc_prepare_tx_skb() 63 (skb->len - sizeof(*hdr))); in ath11k_htc_prepare_tx_skb() 65 if (ep->tx_credit_flow_enabled) in ath11k_htc_prepare_tx_skb() [all …]
|
| /linux/drivers/platform/surface/aggregator/ |
| H A D | ssh_packet_layer.c | 1 // SPDX-License-Identifier: GPL-2.0+ 5 * Copyright (C) 2019-2022 Maximilian Luz <luzmaximilian@gmail.com> 10 #include <linux/error-injection.h> 34 * system below is similar to a state-machine for packets, however, there are 41 * - submit 42 * - transmission start (process next item in queue) 43 * - transmission finished (guaranteed to never be parallel to transmission 45 * - ACK received 46 * - NAK received (this is equivalent to issuing re-submit for all pending 48 * - timeout (this is equivalent to re-issuing a submit or canceling) [all …]
|
| /linux/drivers/net/wireless/st/cw1200/ |
| H A D | bh.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * Device handling thread implementation for mac80211 ST-Ericsson CW1200 drivers 5 * Copyright (c) 2010, ST-Ericsson 9 * ST-Ericsson UMAC CW1200 driver, which is 10 * Copyright (c) 2010, ST-Ericsson 29 #define DOWNLOAD_BLOCK_SIZE_WR (0x1000 - 4) 30 /* an SPI message cannot be bigger than (2"12-1)*2 bytes 35 #define EFFECTIVE_BUF_SIZE (MAX_SZ_RD_WR_BUFFERS - PIGGYBACK_CTRL_REG) 56 priv->bh_workqueue = alloc_workqueue("cw1200_bh", in cw1200_register_bh() 60 if (!priv->bh_workqueue) in cw1200_register_bh() [all …]
|
| /linux/drivers/net/wireless/ti/wlcore/ |
| H A D | rx.c | 1 // SPDX-License-Identifier: GPL-2.0-only 16 #include "rx.h" 30 if (wl->quirks & WLCORE_QUIRK_RX_BLOCKSIZE_ALIGN) in wlcore_rx_get_buf_size() 39 if (wl->quirks & WLCORE_QUIRK_RX_BLOCKSIZE_ALIGN) in wlcore_rx_get_align_buf_size() 47 struct ieee80211_rx_status *status, in wl1271_rx_status() argument 50 memset(status, 0, sizeof(struct ieee80211_rx_status)); in wl1271_rx_status() 52 if ((desc->flags & WL1271_RX_DESC_BAND_MASK) == WL1271_RX_DESC_BAND_BG) in wl1271_rx_status() 53 status->band = NL80211_BAND_2GHZ; in wl1271_rx_status() 55 status->band = NL80211_BAND_5GHZ; in wl1271_rx_status() 57 status->rate_idx = wlcore_rate_to_idx(wl, desc->rate, status->band); in wl1271_rx_status() [all …]
|
| /linux/drivers/net/wireless/ath/wil6210/ |
| H A D | txrx.c | 1 // SPDX-License-Identifier: ISC 3 * Copyright (c) 2012-2017 Qualcomm Atheros, Inc. 4 * Copyright (c) 2018-2019, The Linux Foundation. All rights reserved. 25 MODULE_PARM_DESC(rx_align_2, " align Rx buffers on 4*n+2, default - no"); 29 MODULE_PARM_DESC(rx_large_buf, " allocate 8KB RX buffers, default - no"); 39 /* wil_ring_wmark_low - low watermark for available descriptor space */ 42 return ring->size / 8; in wil_ring_wmark_low() 45 /* wil_ring_wmark_high - high watermark for available descriptor space */ 48 return ring->size / 4; in wil_ring_wmark_high() 71 struct wil_ring *vring = &wil->ring_tx[i]; in wil_is_tx_idle() [all …]
|
| H A D | debugfs.c | 1 // SPDX-License-Identifier: ISC 3 * Copyright (c) 2012-2017 Qualcomm Atheros, Inc. 4 * Copyright (c) 2018-2019, The Linux Foundation. All rights reserved. 21 static u32 dbg_ring_index; /* 24+ for Rx, 0..23 for Tx */ 23 /* 0..wil->num_rx_status_rings-1 for Rx, wil->tx_sring_idx for Tx */ 49 if (ring->is_rx) { in wil_print_desc_edma() 52 &ring->va[idx].rx.enhanced; in wil_print_desc_edma() 53 u16 buff_id = le16_to_cpu(rx_d->mac.buff_id); in wil_print_desc_edma() 55 if (wil->rx_buff_mgmt.buff_arr && in wil_print_desc_edma() 56 wil_val_in_range(buff_id, 0, wil->rx_buff_mgmt.size)) in wil_print_desc_edma() [all …]
|
| /linux/drivers/net/ethernet/huawei/hinic/ |
| H A D | hinic_rx.c | 1 // SPDX-License-Identifier: GPL-2.0-only 18 #include <linux/dma-mapping.h> 46 (HINIC_GET_RX_PKT_TYPE(be32_to_cpu((cqe)->offload_type)) == \ 50 * hinic_rxq_clean_stats - Clean the statistics of specific queue 51 * @rxq: Logical Rx Queue 55 struct hinic_rxq_stats *rxq_stats = &rxq->rxq_stats; in hinic_rxq_clean_stats() 57 u64_stats_update_begin(&rxq_stats->syncp); in hinic_rxq_clean_stats() 58 rxq_stats->pkts = 0; in hinic_rxq_clean_stats() 59 rxq_stats->bytes = 0; in hinic_rxq_clean_stats() 60 rxq_stats->errors = 0; in hinic_rxq_clean_stats() [all …]
|
| /linux/drivers/i2c/busses/ |
| H A D | i2c-xiic.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * i2c-xiic.c 4 * Copyright (c) 2002-2007 Xilinx Inc. 5 * Copyright (c) 2009-2010 Intel Corporation 27 #include <linux/platform_data/i2c-xiic.h> 36 #define DRIVER_NAME "xiic-i2c" 58 * struct xiic_i2c - Internal representation of the XIIC I2C bus 67 * @rx_msg: Current RX message 68 * @rx_pos: Position within current RX message 69 * @endianness: big/little-endian byte order [all …]
|