Merge tag 'net-next-5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next
Pull networking updates from Jakub Kicinski:
"Core:
- support "prefer busy polling" NAPI operation mode, where we defer
softirq for some time expecting applications to periodically busy
poll
- AF_XDP: improve efficiency by more batching and hindering the
adjacency cache prefetcher
- af_packet: make packet_fanout.arr size configurable up to 64K
- tcp: optimize TCP zero copy receive in presence of partial or
unaligned reads making zero copy a performance win for much smaller
messages
- XDP: add bulk APIs for returning / freeing frames
- sched: support fragmenting IP packets as they come out of conntrack
- net: allow virtual netdevs to forward UDP L4 and fraglist GSO skbs
BPF:
- BPF switch from crude rlimit-based to memcg-based memory accounting
- BPF type format information for kernel modules and related tracing
enhancements
- BPF implement task local storage for BPF LSM
- allow the FENTRY/FEXIT/RAW_TP tracing programs to use
bpf_sk_storage
Protocols:
- mptcp: improve multiple xmit streams support, memory accounting and
many smaller improvements
- TLS: support CHACHA20-POLY1305 cipher
- seg6: add support for SRv6 End.DT4/DT6 behavior
- sctp: Implement RFC 6951: UDP Encapsulation of SCTP
- ppp_generic: add ability to bridge channels directly
- bridge: Connectivity Fault Management (CFM) support as is defined
in IEEE 802.1Q section 12.14.
Drivers:
- mlx5: make use of the new auxiliary bus to organize the driver
internals
- mlx5: more accurate port TX timestamping support
- mlxsw:
- improve the efficiency of offloaded next hop updates by using
the new nexthop object API
- support blackhole nexthops
- support IEEE 802.1ad (Q-in-Q) bridging
- rtw88: major bluetooth co-existance improvements
- iwlwifi: support new 6 GHz frequency band
- ath11k: Fast Initial Link Setup (FILS)
- mt7915: dual band concurrent (DBDC) support
- net: ipa: add basic support for IPA v4.5
Refactor:
- a few pieces of in_interrupt() cleanup work from Sebastian Andrzej
Siewior
- phy: add support for shared interrupts; get rid of multiple driver
APIs and have the drivers write a full IRQ handler, slight growth
of driver code should be compensated by the simpler API which also
allows shared IRQs
- add common code for handling netdev per-cpu counters
- move TX packet re-allocation from Ethernet switch tag drivers to a
central place
- improve efficiency and rename nla_strlcpy
- number of W=1 warning cleanups as we now catch those in a patchwork
build bot
Old code removal:
- wan: delete the DLCI / SDLA drivers
- wimax: move to staging
- wifi: remove old WDS wifi bridging support"
* tag 'net-next-5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next: (1922 commits)
net: hns3: fix expression that is currently always true
net: fix proc_fs init handling in af_packet and tls
nfc: pn533: convert comma to semicolon
af_vsock: Assign the vsock transport considering the vsock address flags
af_vsock: Set VMADDR_FLAG_TO_HOST flag on the receive path
vsock_addr: Check for supported flag values
vm_sockets: Add VMADDR_FLAG_TO_HOST vsock flag
vm_sockets: Add flags field in the vsock address data structure
net: Disable NETIF_F_HW_TLS_TX when HW_CSUM is disabled
tcp: Add logic to check for SYN w/ data in tcp_simple_retransmit
net: mscc: ocelot: install MAC addresses in .ndo_set_rx_mode from process context
nfc: s3fwrn5: Release the nfc firmware
net: vxget: clean up sparse warnings
mlxsw: spectrum_router: Use eXtended mezzanine to offload IPv4 router
mlxsw: spectrum: Set KVH XLT cache mode for Spectrum2/3
mlxsw: spectrum_router_xm: Introduce basic XM cache flushing
mlxsw: reg: Add Router LPM Cache Enable Register
mlxsw: reg: Add Router LPM Cache ML Delete Register
mlxsw: spectrum_router_xm: Implement L-value tracking for M-index
mlxsw: reg: Add XM Router M Table Register
...
This commit is contained in:
@@ -119,6 +119,9 @@
|
||||
|
||||
#define SO_DETACH_REUSEPORT_BPF 68
|
||||
|
||||
#define SO_PREFER_BUSY_POLL 69
|
||||
#define SO_BUSY_POLL_BUDGET 70
|
||||
|
||||
#if !defined(__KERNEL__)
|
||||
|
||||
#if __BITS_PER_LONG == 64 || (defined(__x86_64__) && defined(__ILP32__))
|
||||
|
||||
@@ -675,4 +675,30 @@ enum batadv_tp_meter_reason {
|
||||
BATADV_TP_REASON_TOO_MANY = 133,
|
||||
};
|
||||
|
||||
/**
|
||||
* enum batadv_ifla_attrs - batman-adv ifla nested attributes
|
||||
*/
|
||||
enum batadv_ifla_attrs {
|
||||
/**
|
||||
* @IFLA_BATADV_UNSPEC: unspecified attribute which is not parsed by
|
||||
* rtnetlink
|
||||
*/
|
||||
IFLA_BATADV_UNSPEC,
|
||||
|
||||
/**
|
||||
* @IFLA_BATADV_ALGO_NAME: routing algorithm (name) which should be
|
||||
* used by the newly registered batadv net_device.
|
||||
*/
|
||||
IFLA_BATADV_ALGO_NAME,
|
||||
|
||||
/* add attributes above here, update the policy in soft-interface.c */
|
||||
|
||||
/**
|
||||
* @__IFLA_BATADV_MAX: internal use
|
||||
*/
|
||||
__IFLA_BATADV_MAX,
|
||||
};
|
||||
|
||||
#define IFLA_BATADV_MAX (__IFLA_BATADV_MAX - 1)
|
||||
|
||||
#endif /* _UAPI_LINUX_BATMAN_ADV_H_ */
|
||||
|
||||
@@ -157,6 +157,7 @@ enum bpf_map_type {
|
||||
BPF_MAP_TYPE_STRUCT_OPS,
|
||||
BPF_MAP_TYPE_RINGBUF,
|
||||
BPF_MAP_TYPE_INODE_STORAGE,
|
||||
BPF_MAP_TYPE_TASK_STORAGE,
|
||||
};
|
||||
|
||||
/* Note that tracing related programs such as
|
||||
@@ -556,7 +557,12 @@ union bpf_attr {
|
||||
__aligned_u64 line_info; /* line info */
|
||||
__u32 line_info_cnt; /* number of bpf_line_info records */
|
||||
__u32 attach_btf_id; /* in-kernel BTF type id to attach to */
|
||||
__u32 attach_prog_fd; /* 0 to attach to vmlinux */
|
||||
union {
|
||||
/* valid prog_fd to attach to bpf prog */
|
||||
__u32 attach_prog_fd;
|
||||
/* or valid module BTF object fd or 0 to attach to vmlinux */
|
||||
__u32 attach_btf_obj_fd;
|
||||
};
|
||||
};
|
||||
|
||||
struct { /* anonymous struct used by BPF_OBJ_* commands */
|
||||
@@ -3742,6 +3748,88 @@ union bpf_attr {
|
||||
* Return
|
||||
* The helper returns **TC_ACT_REDIRECT** on success or
|
||||
* **TC_ACT_SHOT** on error.
|
||||
*
|
||||
* void *bpf_task_storage_get(struct bpf_map *map, struct task_struct *task, void *value, u64 flags)
|
||||
* Description
|
||||
* Get a bpf_local_storage from the *task*.
|
||||
*
|
||||
* Logically, it could be thought of as getting the value from
|
||||
* a *map* with *task* as the **key**. From this
|
||||
* perspective, the usage is not much different from
|
||||
* **bpf_map_lookup_elem**\ (*map*, **&**\ *task*) except this
|
||||
* helper enforces the key must be an task_struct and the map must also
|
||||
* be a **BPF_MAP_TYPE_TASK_STORAGE**.
|
||||
*
|
||||
* Underneath, the value is stored locally at *task* instead of
|
||||
* the *map*. The *map* is used as the bpf-local-storage
|
||||
* "type". The bpf-local-storage "type" (i.e. the *map*) is
|
||||
* searched against all bpf_local_storage residing at *task*.
|
||||
*
|
||||
* An optional *flags* (**BPF_LOCAL_STORAGE_GET_F_CREATE**) can be
|
||||
* used such that a new bpf_local_storage will be
|
||||
* created if one does not exist. *value* can be used
|
||||
* together with **BPF_LOCAL_STORAGE_GET_F_CREATE** to specify
|
||||
* the initial value of a bpf_local_storage. If *value* is
|
||||
* **NULL**, the new bpf_local_storage will be zero initialized.
|
||||
* Return
|
||||
* A bpf_local_storage pointer is returned on success.
|
||||
*
|
||||
* **NULL** if not found or there was an error in adding
|
||||
* a new bpf_local_storage.
|
||||
*
|
||||
* long bpf_task_storage_delete(struct bpf_map *map, struct task_struct *task)
|
||||
* Description
|
||||
* Delete a bpf_local_storage from a *task*.
|
||||
* Return
|
||||
* 0 on success.
|
||||
*
|
||||
* **-ENOENT** if the bpf_local_storage cannot be found.
|
||||
*
|
||||
* struct task_struct *bpf_get_current_task_btf(void)
|
||||
* Description
|
||||
* Return a BTF pointer to the "current" task.
|
||||
* This pointer can also be used in helpers that accept an
|
||||
* *ARG_PTR_TO_BTF_ID* of type *task_struct*.
|
||||
* Return
|
||||
* Pointer to the current task.
|
||||
*
|
||||
* long bpf_bprm_opts_set(struct linux_binprm *bprm, u64 flags)
|
||||
* Description
|
||||
* Set or clear certain options on *bprm*:
|
||||
*
|
||||
* **BPF_F_BPRM_SECUREEXEC** Set the secureexec bit
|
||||
* which sets the **AT_SECURE** auxv for glibc. The bit
|
||||
* is cleared if the flag is not specified.
|
||||
* Return
|
||||
* **-EINVAL** if invalid *flags* are passed, zero otherwise.
|
||||
*
|
||||
* u64 bpf_ktime_get_coarse_ns(void)
|
||||
* Description
|
||||
* Return a coarse-grained version of the time elapsed since
|
||||
* system boot, in nanoseconds. Does not include time the system
|
||||
* was suspended.
|
||||
*
|
||||
* See: **clock_gettime**\ (**CLOCK_MONOTONIC_COARSE**)
|
||||
* Return
|
||||
* Current *ktime*.
|
||||
*
|
||||
* long bpf_ima_inode_hash(struct inode *inode, void *dst, u32 size)
|
||||
* Description
|
||||
* Returns the stored IMA hash of the *inode* (if it's avaialable).
|
||||
* If the hash is larger than *size*, then only *size*
|
||||
* bytes will be copied to *dst*
|
||||
* Return
|
||||
* The **hash_algo** is returned on success,
|
||||
* **-EOPNOTSUP** if IMA is disabled or **-EINVAL** if
|
||||
* invalid arguments are passed.
|
||||
*
|
||||
* struct socket *bpf_sock_from_file(struct file *file)
|
||||
* Description
|
||||
* If the given file represents a socket, returns the associated
|
||||
* socket.
|
||||
* Return
|
||||
* A pointer to a struct socket on success or NULL if the file is
|
||||
* not a socket.
|
||||
*/
|
||||
#define __BPF_FUNC_MAPPER(FN) \
|
||||
FN(unspec), \
|
||||
@@ -3900,6 +3988,13 @@ union bpf_attr {
|
||||
FN(per_cpu_ptr), \
|
||||
FN(this_cpu_ptr), \
|
||||
FN(redirect_peer), \
|
||||
FN(task_storage_get), \
|
||||
FN(task_storage_delete), \
|
||||
FN(get_current_task_btf), \
|
||||
FN(bprm_opts_set), \
|
||||
FN(ktime_get_coarse_ns), \
|
||||
FN(ima_inode_hash), \
|
||||
FN(sock_from_file), \
|
||||
/* */
|
||||
|
||||
/* integer value in 'imm' field of BPF_CALL instruction selects which helper
|
||||
@@ -4071,6 +4166,11 @@ enum bpf_lwt_encap_mode {
|
||||
BPF_LWT_ENCAP_IP,
|
||||
};
|
||||
|
||||
/* Flags for bpf_bprm_opts_set helper */
|
||||
enum {
|
||||
BPF_F_BPRM_SECUREEXEC = (1ULL << 0),
|
||||
};
|
||||
|
||||
#define __bpf_md_ptr(type, name) \
|
||||
union { \
|
||||
type name; \
|
||||
@@ -4418,6 +4518,9 @@ struct bpf_btf_info {
|
||||
__aligned_u64 btf;
|
||||
__u32 btf_size;
|
||||
__u32 id;
|
||||
__aligned_u64 name;
|
||||
__u32 name_len;
|
||||
__u32 kernel_btf;
|
||||
} __attribute__((aligned(8)));
|
||||
|
||||
struct bpf_link_info {
|
||||
|
||||
@@ -84,6 +84,7 @@ typedef __u32 can_err_mask_t;
|
||||
|
||||
/* CAN payload length and DLC definitions according to ISO 11898-1 */
|
||||
#define CAN_MAX_DLC 8
|
||||
#define CAN_MAX_RAW_DLC 15
|
||||
#define CAN_MAX_DLEN 8
|
||||
|
||||
/* CAN FD payload length and DLC definitions according to ISO 11898-7 */
|
||||
@@ -91,23 +92,32 @@ typedef __u32 can_err_mask_t;
|
||||
#define CANFD_MAX_DLEN 64
|
||||
|
||||
/**
|
||||
* struct can_frame - basic CAN frame structure
|
||||
* @can_id: CAN ID of the frame and CAN_*_FLAG flags, see canid_t definition
|
||||
* @can_dlc: frame payload length in byte (0 .. 8) aka data length code
|
||||
* N.B. the DLC field from ISO 11898-1 Chapter 8.4.2.3 has a 1:1
|
||||
* mapping of the 'data length code' to the real payload length
|
||||
* @__pad: padding
|
||||
* @__res0: reserved / padding
|
||||
* @__res1: reserved / padding
|
||||
* @data: CAN frame payload (up to 8 byte)
|
||||
* struct can_frame - Classical CAN frame structure (aka CAN 2.0B)
|
||||
* @can_id: CAN ID of the frame and CAN_*_FLAG flags, see canid_t definition
|
||||
* @len: CAN frame payload length in byte (0 .. 8)
|
||||
* @can_dlc: deprecated name for CAN frame payload length in byte (0 .. 8)
|
||||
* @__pad: padding
|
||||
* @__res0: reserved / padding
|
||||
* @len8_dlc: optional DLC value (9 .. 15) at 8 byte payload length
|
||||
* len8_dlc contains values from 9 .. 15 when the payload length is
|
||||
* 8 bytes but the DLC value (see ISO 11898-1) is greater then 8.
|
||||
* CAN_CTRLMODE_CC_LEN8_DLC flag has to be enabled in CAN driver.
|
||||
* @data: CAN frame payload (up to 8 byte)
|
||||
*/
|
||||
struct can_frame {
|
||||
canid_t can_id; /* 32 bit CAN_ID + EFF/RTR/ERR flags */
|
||||
__u8 can_dlc; /* frame payload length in byte (0 .. CAN_MAX_DLEN) */
|
||||
__u8 __pad; /* padding */
|
||||
__u8 __res0; /* reserved / padding */
|
||||
__u8 __res1; /* reserved / padding */
|
||||
__u8 data[CAN_MAX_DLEN] __attribute__((aligned(8)));
|
||||
union {
|
||||
/* CAN frame payload length in byte (0 .. CAN_MAX_DLEN)
|
||||
* was previously named can_dlc so we need to carry that
|
||||
* name for legacy support
|
||||
*/
|
||||
__u8 len;
|
||||
__u8 can_dlc; /* deprecated */
|
||||
};
|
||||
__u8 __pad; /* padding */
|
||||
__u8 __res0; /* reserved / padding */
|
||||
__u8 len8_dlc; /* optional DLC for 8 byte payload length (9 .. 15) */
|
||||
__u8 data[CAN_MAX_DLEN] __attribute__((aligned(8)));
|
||||
};
|
||||
|
||||
/*
|
||||
|
||||
@@ -98,8 +98,8 @@ enum {
|
||||
|
||||
/* CAN frame elements that are affected by curr. 3 CAN frame modifications */
|
||||
#define CGW_MOD_ID 0x01
|
||||
#define CGW_MOD_DLC 0x02 /* contains the data length in bytes */
|
||||
#define CGW_MOD_LEN CGW_MOD_DLC /* CAN FD length representation */
|
||||
#define CGW_MOD_DLC 0x02 /* Classical CAN data length code */
|
||||
#define CGW_MOD_LEN CGW_MOD_DLC /* CAN FD (plain) data length */
|
||||
#define CGW_MOD_DATA 0x04
|
||||
#define CGW_MOD_FLAGS 0x08 /* CAN FD flags */
|
||||
|
||||
|
||||
@@ -135,7 +135,7 @@ struct can_isotp_ll_options {
|
||||
#define CAN_ISOTP_FORCE_RXSTMIN 0x100 /* ignore CFs depending on rx stmin */
|
||||
#define CAN_ISOTP_RX_EXT_ADDR 0x200 /* different rx extended addressing */
|
||||
#define CAN_ISOTP_WAIT_TX_DONE 0x400 /* wait for tx completion */
|
||||
|
||||
#define CAN_ISOTP_SF_BROADCAST 0x800 /* 1-to-N functional addressing */
|
||||
|
||||
/* default values */
|
||||
|
||||
|
||||
@@ -100,6 +100,7 @@ struct can_ctrlmode {
|
||||
#define CAN_CTRLMODE_FD 0x20 /* CAN FD mode */
|
||||
#define CAN_CTRLMODE_PRESUME_ACK 0x40 /* Ignore missing CAN ACKs */
|
||||
#define CAN_CTRLMODE_FD_NON_ISO 0x80 /* CAN FD in non-ISO mode */
|
||||
#define CAN_CTRLMODE_CC_LEN8_DLC 0x100 /* Classic CAN DLC option */
|
||||
|
||||
/*
|
||||
* CAN device statistics
|
||||
|
||||
64
include/uapi/linux/cfm_bridge.h
Normal file
64
include/uapi/linux/cfm_bridge.h
Normal file
@@ -0,0 +1,64 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
|
||||
|
||||
#ifndef _UAPI_LINUX_CFM_BRIDGE_H_
|
||||
#define _UAPI_LINUX_CFM_BRIDGE_H_
|
||||
|
||||
#include <linux/types.h>
|
||||
#include <linux/if_ether.h>
|
||||
|
||||
#define ETHER_HEADER_LENGTH (6+6+4+2)
|
||||
#define CFM_MAID_LENGTH 48
|
||||
#define CFM_CCM_PDU_LENGTH 75
|
||||
#define CFM_PORT_STATUS_TLV_LENGTH 4
|
||||
#define CFM_IF_STATUS_TLV_LENGTH 4
|
||||
#define CFM_IF_STATUS_TLV_TYPE 4
|
||||
#define CFM_PORT_STATUS_TLV_TYPE 2
|
||||
#define CFM_ENDE_TLV_TYPE 0
|
||||
#define CFM_CCM_MAX_FRAME_LENGTH (ETHER_HEADER_LENGTH+\
|
||||
CFM_CCM_PDU_LENGTH+\
|
||||
CFM_PORT_STATUS_TLV_LENGTH+\
|
||||
CFM_IF_STATUS_TLV_LENGTH)
|
||||
#define CFM_FRAME_PRIO 7
|
||||
#define CFM_CCM_TLV_OFFSET 70
|
||||
#define CFM_CCM_PDU_MAID_OFFSET 10
|
||||
#define CFM_CCM_PDU_MEPID_OFFSET 8
|
||||
#define CFM_CCM_PDU_SEQNR_OFFSET 4
|
||||
#define CFM_CCM_PDU_TLV_OFFSET 74
|
||||
#define CFM_CCM_ITU_RESERVED_SIZE 16
|
||||
|
||||
struct br_cfm_common_hdr {
|
||||
__u8 mdlevel_version;
|
||||
__u8 opcode;
|
||||
__u8 flags;
|
||||
__u8 tlv_offset;
|
||||
};
|
||||
|
||||
enum br_cfm_opcodes {
|
||||
BR_CFM_OPCODE_CCM = 0x1,
|
||||
};
|
||||
|
||||
/* MEP domain */
|
||||
enum br_cfm_domain {
|
||||
BR_CFM_PORT,
|
||||
BR_CFM_VLAN,
|
||||
};
|
||||
|
||||
/* MEP direction */
|
||||
enum br_cfm_mep_direction {
|
||||
BR_CFM_MEP_DIRECTION_DOWN,
|
||||
BR_CFM_MEP_DIRECTION_UP,
|
||||
};
|
||||
|
||||
/* CCM interval supported. */
|
||||
enum br_cfm_ccm_interval {
|
||||
BR_CFM_CCM_INTERVAL_NONE,
|
||||
BR_CFM_CCM_INTERVAL_3_3_MS,
|
||||
BR_CFM_CCM_INTERVAL_10_MS,
|
||||
BR_CFM_CCM_INTERVAL_100_MS,
|
||||
BR_CFM_CCM_INTERVAL_1_SEC,
|
||||
BR_CFM_CCM_INTERVAL_10_SEC,
|
||||
BR_CFM_CCM_INTERVAL_1_MIN,
|
||||
BR_CFM_CCM_INTERVAL_10_MIN,
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -121,6 +121,7 @@ enum {
|
||||
IFLA_BRIDGE_VLAN_INFO,
|
||||
IFLA_BRIDGE_VLAN_TUNNEL_INFO,
|
||||
IFLA_BRIDGE_MRP,
|
||||
IFLA_BRIDGE_CFM,
|
||||
__IFLA_BRIDGE_MAX,
|
||||
};
|
||||
#define IFLA_BRIDGE_MAX (__IFLA_BRIDGE_MAX - 1)
|
||||
@@ -328,6 +329,130 @@ struct br_mrp_start_in_test {
|
||||
__u16 in_id;
|
||||
};
|
||||
|
||||
enum {
|
||||
IFLA_BRIDGE_CFM_UNSPEC,
|
||||
IFLA_BRIDGE_CFM_MEP_CREATE,
|
||||
IFLA_BRIDGE_CFM_MEP_DELETE,
|
||||
IFLA_BRIDGE_CFM_MEP_CONFIG,
|
||||
IFLA_BRIDGE_CFM_CC_CONFIG,
|
||||
IFLA_BRIDGE_CFM_CC_PEER_MEP_ADD,
|
||||
IFLA_BRIDGE_CFM_CC_PEER_MEP_REMOVE,
|
||||
IFLA_BRIDGE_CFM_CC_RDI,
|
||||
IFLA_BRIDGE_CFM_CC_CCM_TX,
|
||||
IFLA_BRIDGE_CFM_MEP_CREATE_INFO,
|
||||
IFLA_BRIDGE_CFM_MEP_CONFIG_INFO,
|
||||
IFLA_BRIDGE_CFM_CC_CONFIG_INFO,
|
||||
IFLA_BRIDGE_CFM_CC_RDI_INFO,
|
||||
IFLA_BRIDGE_CFM_CC_CCM_TX_INFO,
|
||||
IFLA_BRIDGE_CFM_CC_PEER_MEP_INFO,
|
||||
IFLA_BRIDGE_CFM_MEP_STATUS_INFO,
|
||||
IFLA_BRIDGE_CFM_CC_PEER_STATUS_INFO,
|
||||
__IFLA_BRIDGE_CFM_MAX,
|
||||
};
|
||||
|
||||
#define IFLA_BRIDGE_CFM_MAX (__IFLA_BRIDGE_CFM_MAX - 1)
|
||||
|
||||
enum {
|
||||
IFLA_BRIDGE_CFM_MEP_CREATE_UNSPEC,
|
||||
IFLA_BRIDGE_CFM_MEP_CREATE_INSTANCE,
|
||||
IFLA_BRIDGE_CFM_MEP_CREATE_DOMAIN,
|
||||
IFLA_BRIDGE_CFM_MEP_CREATE_DIRECTION,
|
||||
IFLA_BRIDGE_CFM_MEP_CREATE_IFINDEX,
|
||||
__IFLA_BRIDGE_CFM_MEP_CREATE_MAX,
|
||||
};
|
||||
|
||||
#define IFLA_BRIDGE_CFM_MEP_CREATE_MAX (__IFLA_BRIDGE_CFM_MEP_CREATE_MAX - 1)
|
||||
|
||||
enum {
|
||||
IFLA_BRIDGE_CFM_MEP_DELETE_UNSPEC,
|
||||
IFLA_BRIDGE_CFM_MEP_DELETE_INSTANCE,
|
||||
__IFLA_BRIDGE_CFM_MEP_DELETE_MAX,
|
||||
};
|
||||
|
||||
#define IFLA_BRIDGE_CFM_MEP_DELETE_MAX (__IFLA_BRIDGE_CFM_MEP_DELETE_MAX - 1)
|
||||
|
||||
enum {
|
||||
IFLA_BRIDGE_CFM_MEP_CONFIG_UNSPEC,
|
||||
IFLA_BRIDGE_CFM_MEP_CONFIG_INSTANCE,
|
||||
IFLA_BRIDGE_CFM_MEP_CONFIG_UNICAST_MAC,
|
||||
IFLA_BRIDGE_CFM_MEP_CONFIG_MDLEVEL,
|
||||
IFLA_BRIDGE_CFM_MEP_CONFIG_MEPID,
|
||||
__IFLA_BRIDGE_CFM_MEP_CONFIG_MAX,
|
||||
};
|
||||
|
||||
#define IFLA_BRIDGE_CFM_MEP_CONFIG_MAX (__IFLA_BRIDGE_CFM_MEP_CONFIG_MAX - 1)
|
||||
|
||||
enum {
|
||||
IFLA_BRIDGE_CFM_CC_CONFIG_UNSPEC,
|
||||
IFLA_BRIDGE_CFM_CC_CONFIG_INSTANCE,
|
||||
IFLA_BRIDGE_CFM_CC_CONFIG_ENABLE,
|
||||
IFLA_BRIDGE_CFM_CC_CONFIG_EXP_INTERVAL,
|
||||
IFLA_BRIDGE_CFM_CC_CONFIG_EXP_MAID,
|
||||
__IFLA_BRIDGE_CFM_CC_CONFIG_MAX,
|
||||
};
|
||||
|
||||
#define IFLA_BRIDGE_CFM_CC_CONFIG_MAX (__IFLA_BRIDGE_CFM_CC_CONFIG_MAX - 1)
|
||||
|
||||
enum {
|
||||
IFLA_BRIDGE_CFM_CC_PEER_MEP_UNSPEC,
|
||||
IFLA_BRIDGE_CFM_CC_PEER_MEP_INSTANCE,
|
||||
IFLA_BRIDGE_CFM_CC_PEER_MEPID,
|
||||
__IFLA_BRIDGE_CFM_CC_PEER_MEP_MAX,
|
||||
};
|
||||
|
||||
#define IFLA_BRIDGE_CFM_CC_PEER_MEP_MAX (__IFLA_BRIDGE_CFM_CC_PEER_MEP_MAX - 1)
|
||||
|
||||
enum {
|
||||
IFLA_BRIDGE_CFM_CC_RDI_UNSPEC,
|
||||
IFLA_BRIDGE_CFM_CC_RDI_INSTANCE,
|
||||
IFLA_BRIDGE_CFM_CC_RDI_RDI,
|
||||
__IFLA_BRIDGE_CFM_CC_RDI_MAX,
|
||||
};
|
||||
|
||||
#define IFLA_BRIDGE_CFM_CC_RDI_MAX (__IFLA_BRIDGE_CFM_CC_RDI_MAX - 1)
|
||||
|
||||
enum {
|
||||
IFLA_BRIDGE_CFM_CC_CCM_TX_UNSPEC,
|
||||
IFLA_BRIDGE_CFM_CC_CCM_TX_INSTANCE,
|
||||
IFLA_BRIDGE_CFM_CC_CCM_TX_DMAC,
|
||||
IFLA_BRIDGE_CFM_CC_CCM_TX_SEQ_NO_UPDATE,
|
||||
IFLA_BRIDGE_CFM_CC_CCM_TX_PERIOD,
|
||||
IFLA_BRIDGE_CFM_CC_CCM_TX_IF_TLV,
|
||||
IFLA_BRIDGE_CFM_CC_CCM_TX_IF_TLV_VALUE,
|
||||
IFLA_BRIDGE_CFM_CC_CCM_TX_PORT_TLV,
|
||||
IFLA_BRIDGE_CFM_CC_CCM_TX_PORT_TLV_VALUE,
|
||||
__IFLA_BRIDGE_CFM_CC_CCM_TX_MAX,
|
||||
};
|
||||
|
||||
#define IFLA_BRIDGE_CFM_CC_CCM_TX_MAX (__IFLA_BRIDGE_CFM_CC_CCM_TX_MAX - 1)
|
||||
|
||||
enum {
|
||||
IFLA_BRIDGE_CFM_MEP_STATUS_UNSPEC,
|
||||
IFLA_BRIDGE_CFM_MEP_STATUS_INSTANCE,
|
||||
IFLA_BRIDGE_CFM_MEP_STATUS_OPCODE_UNEXP_SEEN,
|
||||
IFLA_BRIDGE_CFM_MEP_STATUS_VERSION_UNEXP_SEEN,
|
||||
IFLA_BRIDGE_CFM_MEP_STATUS_RX_LEVEL_LOW_SEEN,
|
||||
__IFLA_BRIDGE_CFM_MEP_STATUS_MAX,
|
||||
};
|
||||
|
||||
#define IFLA_BRIDGE_CFM_MEP_STATUS_MAX (__IFLA_BRIDGE_CFM_MEP_STATUS_MAX - 1)
|
||||
|
||||
enum {
|
||||
IFLA_BRIDGE_CFM_CC_PEER_STATUS_UNSPEC,
|
||||
IFLA_BRIDGE_CFM_CC_PEER_STATUS_INSTANCE,
|
||||
IFLA_BRIDGE_CFM_CC_PEER_STATUS_PEER_MEPID,
|
||||
IFLA_BRIDGE_CFM_CC_PEER_STATUS_CCM_DEFECT,
|
||||
IFLA_BRIDGE_CFM_CC_PEER_STATUS_RDI,
|
||||
IFLA_BRIDGE_CFM_CC_PEER_STATUS_PORT_TLV_VALUE,
|
||||
IFLA_BRIDGE_CFM_CC_PEER_STATUS_IF_TLV_VALUE,
|
||||
IFLA_BRIDGE_CFM_CC_PEER_STATUS_SEEN,
|
||||
IFLA_BRIDGE_CFM_CC_PEER_STATUS_TLV_SEEN,
|
||||
IFLA_BRIDGE_CFM_CC_PEER_STATUS_SEQ_UNEXP_SEEN,
|
||||
__IFLA_BRIDGE_CFM_CC_PEER_STATUS_MAX,
|
||||
};
|
||||
|
||||
#define IFLA_BRIDGE_CFM_CC_PEER_STATUS_MAX (__IFLA_BRIDGE_CFM_CC_PEER_STATUS_MAX - 1)
|
||||
|
||||
struct bridge_stp_xstats {
|
||||
__u64 transition_blk;
|
||||
__u64 transition_fwd;
|
||||
@@ -526,6 +651,7 @@ struct br_mdb_entry {
|
||||
union {
|
||||
__be32 ip4;
|
||||
struct in6_addr ip6;
|
||||
unsigned char mac_addr[ETH_ALEN];
|
||||
} u;
|
||||
__be16 proto;
|
||||
} addr;
|
||||
|
||||
@@ -99,6 +99,7 @@
|
||||
#define ETH_P_1588 0x88F7 /* IEEE 1588 Timesync */
|
||||
#define ETH_P_NCSI 0x88F8 /* NCSI protocol */
|
||||
#define ETH_P_PRP 0x88FB /* IEC 62439-3 PRP/HSRv0 */
|
||||
#define ETH_P_CFM 0x8902 /* Connectivity Fault Management */
|
||||
#define ETH_P_FCOE 0x8906 /* Fibre Channel over Ethernet */
|
||||
#define ETH_P_IBOE 0x8915 /* Infiniband over Ethernet */
|
||||
#define ETH_P_TDLS 0x890D /* TDLS */
|
||||
|
||||
@@ -1,123 +0,0 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
|
||||
/*
|
||||
* DLCI/FRAD Definitions for Frame Relay Access Devices. DLCI devices are
|
||||
* created for each DLCI associated with a FRAD. The FRAD driver
|
||||
* is not truly a network device, but the lower level device
|
||||
* handler. This allows other FRAD manufacturers to use the DLCI
|
||||
* code, including its RFC1490 encapsulation alongside the current
|
||||
* implementation for the Sangoma cards.
|
||||
*
|
||||
* Version: @(#)if_ifrad.h 0.15 31 Mar 96
|
||||
*
|
||||
* Author: Mike McLagan <mike.mclagan@linux.org>
|
||||
*
|
||||
* Changes:
|
||||
* 0.15 Mike McLagan changed structure defs (packed)
|
||||
* re-arranged flags
|
||||
* added DLCI_RET vars
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version
|
||||
* 2 of the License, or (at your option) any later version.
|
||||
*/
|
||||
|
||||
#ifndef _UAPI_FRAD_H_
|
||||
#define _UAPI_FRAD_H_
|
||||
|
||||
#include <linux/if.h>
|
||||
|
||||
/* Structures and constants associated with the DLCI device driver */
|
||||
|
||||
struct dlci_add
|
||||
{
|
||||
char devname[IFNAMSIZ];
|
||||
short dlci;
|
||||
};
|
||||
|
||||
#define DLCI_GET_CONF (SIOCDEVPRIVATE + 2)
|
||||
#define DLCI_SET_CONF (SIOCDEVPRIVATE + 3)
|
||||
|
||||
/*
|
||||
* These are related to the Sangoma SDLA and should remain in order.
|
||||
* Code within the SDLA module is based on the specifics of this
|
||||
* structure. Change at your own peril.
|
||||
*/
|
||||
struct dlci_conf {
|
||||
short flags;
|
||||
short CIR_fwd;
|
||||
short Bc_fwd;
|
||||
short Be_fwd;
|
||||
short CIR_bwd;
|
||||
short Bc_bwd;
|
||||
short Be_bwd;
|
||||
|
||||
/* these are part of the status read */
|
||||
short Tc_fwd;
|
||||
short Tc_bwd;
|
||||
short Tf_max;
|
||||
short Tb_max;
|
||||
|
||||
/* add any new fields here above is a mirror of sdla_dlci_conf */
|
||||
};
|
||||
|
||||
#define DLCI_GET_SLAVE (SIOCDEVPRIVATE + 4)
|
||||
|
||||
/* configuration flags for DLCI */
|
||||
#define DLCI_IGNORE_CIR_OUT 0x0001
|
||||
#define DLCI_ACCOUNT_CIR_IN 0x0002
|
||||
#define DLCI_BUFFER_IF 0x0008
|
||||
|
||||
#define DLCI_VALID_FLAGS 0x000B
|
||||
|
||||
/* defines for the actual Frame Relay hardware */
|
||||
#define FRAD_GET_CONF (SIOCDEVPRIVATE)
|
||||
#define FRAD_SET_CONF (SIOCDEVPRIVATE + 1)
|
||||
|
||||
#define FRAD_LAST_IOCTL FRAD_SET_CONF
|
||||
|
||||
/*
|
||||
* Based on the setup for the Sangoma SDLA. If changes are
|
||||
* necessary to this structure, a routine will need to be
|
||||
* added to that module to copy fields.
|
||||
*/
|
||||
struct frad_conf
|
||||
{
|
||||
short station;
|
||||
short flags;
|
||||
short kbaud;
|
||||
short clocking;
|
||||
short mtu;
|
||||
short T391;
|
||||
short T392;
|
||||
short N391;
|
||||
short N392;
|
||||
short N393;
|
||||
short CIR_fwd;
|
||||
short Bc_fwd;
|
||||
short Be_fwd;
|
||||
short CIR_bwd;
|
||||
short Bc_bwd;
|
||||
short Be_bwd;
|
||||
|
||||
/* Add new fields here, above is a mirror of the sdla_conf */
|
||||
|
||||
};
|
||||
|
||||
#define FRAD_STATION_CPE 0x0000
|
||||
#define FRAD_STATION_NODE 0x0001
|
||||
|
||||
#define FRAD_TX_IGNORE_CIR 0x0001
|
||||
#define FRAD_RX_ACCOUNT_CIR 0x0002
|
||||
#define FRAD_DROP_ABORTED 0x0004
|
||||
#define FRAD_BUFFERIF 0x0008
|
||||
#define FRAD_STATS 0x0010
|
||||
#define FRAD_MCI 0x0100
|
||||
#define FRAD_AUTODLCI 0x8000
|
||||
#define FRAD_VALID_FLAGS 0x811F
|
||||
|
||||
#define FRAD_CLOCK_INT 0x0001
|
||||
#define FRAD_CLOCK_EXT 0x0000
|
||||
|
||||
|
||||
#endif /* _UAPI_FRAD_H_ */
|
||||
@@ -588,6 +588,8 @@ enum {
|
||||
IFLA_MACVLAN_MACADDR,
|
||||
IFLA_MACVLAN_MACADDR_DATA,
|
||||
IFLA_MACVLAN_MACADDR_COUNT,
|
||||
IFLA_MACVLAN_BC_QUEUE_LEN,
|
||||
IFLA_MACVLAN_BC_QUEUE_LEN_USED,
|
||||
__IFLA_MACVLAN_MAX,
|
||||
};
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
#ifndef __LINUX_IF_PACKET_H
|
||||
#define __LINUX_IF_PACKET_H
|
||||
|
||||
#include <asm/byteorder.h>
|
||||
#include <linux/types.h>
|
||||
|
||||
struct sockaddr_pkt {
|
||||
@@ -296,6 +297,17 @@ struct packet_mreq {
|
||||
unsigned char mr_address[8];
|
||||
};
|
||||
|
||||
struct fanout_args {
|
||||
#if defined(__LITTLE_ENDIAN_BITFIELD)
|
||||
__u16 id;
|
||||
__u16 type_flags;
|
||||
#else
|
||||
__u16 type_flags;
|
||||
__u16 id;
|
||||
#endif
|
||||
__u32 max_num_members;
|
||||
};
|
||||
|
||||
#define PACKET_MR_MULTICAST 0
|
||||
#define PACKET_MR_PROMISC 1
|
||||
#define PACKET_MR_ALLMULTI 2
|
||||
|
||||
@@ -61,6 +61,7 @@ enum br_mrp_tlv_header_type {
|
||||
BR_MRP_TLV_HEADER_IN_TOPO = 0x7,
|
||||
BR_MRP_TLV_HEADER_IN_LINK_DOWN = 0x8,
|
||||
BR_MRP_TLV_HEADER_IN_LINK_UP = 0x9,
|
||||
BR_MRP_TLV_HEADER_IN_LINK_STATUS = 0xa,
|
||||
BR_MRP_TLV_HEADER_OPTION = 0x7f,
|
||||
};
|
||||
|
||||
|
||||
@@ -92,11 +92,11 @@ enum {
|
||||
/* Reserve empty slots */
|
||||
IPSET_ATTR_CADT_MAX = 16,
|
||||
/* Create-only specific attributes */
|
||||
IPSET_ATTR_GC,
|
||||
IPSET_ATTR_INITVAL, /* was unused IPSET_ATTR_GC */
|
||||
IPSET_ATTR_HASHSIZE,
|
||||
IPSET_ATTR_MAXELEM,
|
||||
IPSET_ATTR_NETMASK,
|
||||
IPSET_ATTR_PROBES,
|
||||
IPSET_ATTR_BUCKETSIZE, /* was unused IPSET_ATTR_PROBES */
|
||||
IPSET_ATTR_RESIZE,
|
||||
IPSET_ATTR_SIZE,
|
||||
/* Kernel-only */
|
||||
@@ -214,6 +214,8 @@ enum ipset_cadt_flags {
|
||||
enum ipset_create_flags {
|
||||
IPSET_CREATE_FLAG_BIT_FORCEADD = 0,
|
||||
IPSET_CREATE_FLAG_FORCEADD = (1 << IPSET_CREATE_FLAG_BIT_FORCEADD),
|
||||
IPSET_CREATE_FLAG_BIT_BUCKETSIZE = 1,
|
||||
IPSET_CREATE_FLAG_BUCKETSIZE = (1 << IPSET_CREATE_FLAG_BIT_BUCKETSIZE),
|
||||
IPSET_CREATE_FLAG_BIT_MAX = 7,
|
||||
};
|
||||
|
||||
|
||||
@@ -361,6 +361,7 @@ enum nft_set_field_attributes {
|
||||
* @NFTA_SET_OBJ_TYPE: stateful object type (NLA_U32: NFT_OBJECT_*)
|
||||
* @NFTA_SET_HANDLE: set handle (NLA_U64)
|
||||
* @NFTA_SET_EXPR: set expression (NLA_NESTED: nft_expr_attributes)
|
||||
* @NFTA_SET_EXPRESSIONS: list of expressions (NLA_NESTED: nft_list_attributes)
|
||||
*/
|
||||
enum nft_set_attributes {
|
||||
NFTA_SET_UNSPEC,
|
||||
@@ -381,6 +382,7 @@ enum nft_set_attributes {
|
||||
NFTA_SET_OBJ_TYPE,
|
||||
NFTA_SET_HANDLE,
|
||||
NFTA_SET_EXPR,
|
||||
NFTA_SET_EXPRESSIONS,
|
||||
__NFTA_SET_MAX
|
||||
};
|
||||
#define NFTA_SET_MAX (__NFTA_SET_MAX - 1)
|
||||
@@ -406,6 +408,7 @@ enum nft_set_elem_flags {
|
||||
* @NFTA_SET_ELEM_EXPR: expression (NLA_NESTED: nft_expr_attributes)
|
||||
* @NFTA_SET_ELEM_OBJREF: stateful object reference (NLA_STRING)
|
||||
* @NFTA_SET_ELEM_KEY_END: closing key value (NLA_NESTED: nft_data)
|
||||
* @NFTA_SET_ELEM_EXPRESSIONS: list of expressions (NLA_NESTED: nft_list_attributes)
|
||||
*/
|
||||
enum nft_set_elem_attributes {
|
||||
NFTA_SET_ELEM_UNSPEC,
|
||||
@@ -419,6 +422,7 @@ enum nft_set_elem_attributes {
|
||||
NFTA_SET_ELEM_PAD,
|
||||
NFTA_SET_ELEM_OBJREF,
|
||||
NFTA_SET_ELEM_KEY_END,
|
||||
NFTA_SET_ELEM_EXPRESSIONS,
|
||||
__NFTA_SET_ELEM_MAX
|
||||
};
|
||||
#define NFTA_SET_ELEM_MAX (__NFTA_SET_ELEM_MAX - 1)
|
||||
@@ -715,6 +719,7 @@ enum nft_dynset_flags {
|
||||
* @NFTA_DYNSET_TIMEOUT: timeout value for the new element (NLA_U64)
|
||||
* @NFTA_DYNSET_EXPR: expression (NLA_NESTED: nft_expr_attributes)
|
||||
* @NFTA_DYNSET_FLAGS: flags (NLA_U32)
|
||||
* @NFTA_DYNSET_EXPRESSIONS: list of expressions (NLA_NESTED: nft_list_attributes)
|
||||
*/
|
||||
enum nft_dynset_attributes {
|
||||
NFTA_DYNSET_UNSPEC,
|
||||
@@ -727,6 +732,7 @@ enum nft_dynset_attributes {
|
||||
NFTA_DYNSET_EXPR,
|
||||
NFTA_DYNSET_PAD,
|
||||
NFTA_DYNSET_FLAGS,
|
||||
NFTA_DYNSET_EXPRESSIONS,
|
||||
__NFTA_DYNSET_MAX,
|
||||
};
|
||||
#define NFTA_DYNSET_MAX (__NFTA_DYNSET_MAX - 1)
|
||||
|
||||
@@ -757,7 +757,8 @@
|
||||
* of any other interfaces, and other interfaces will again take
|
||||
* precedence when they are used.
|
||||
*
|
||||
* @NL80211_CMD_SET_WDS_PEER: Set the MAC address of the peer on a WDS interface.
|
||||
* @NL80211_CMD_SET_WDS_PEER: Set the MAC address of the peer on a WDS interface
|
||||
* (no longer supported).
|
||||
*
|
||||
* @NL80211_CMD_SET_MULTICAST_TO_UNICAST: Configure if this AP should perform
|
||||
* multicast to unicast conversion. When enabled, all multicast packets
|
||||
@@ -1177,6 +1178,10 @@
|
||||
* includes the contents of the frame. %NL80211_ATTR_ACK flag is included
|
||||
* if the recipient acknowledged the frame.
|
||||
*
|
||||
* @NL80211_CMD_SET_SAR_SPECS: SAR power limitation configuration is
|
||||
* passed using %NL80211_ATTR_SAR_SPEC. %NL80211_ATTR_WIPHY is used to
|
||||
* specify the wiphy index to be applied to.
|
||||
*
|
||||
* @NL80211_CMD_MAX: highest used command number
|
||||
* @__NL80211_CMD_AFTER_LAST: internal use
|
||||
*/
|
||||
@@ -1407,6 +1412,8 @@ enum nl80211_commands {
|
||||
|
||||
NL80211_CMD_CONTROL_PORT_FRAME_TX_STATUS,
|
||||
|
||||
NL80211_CMD_SET_SAR_SPECS,
|
||||
|
||||
/* add new commands above here */
|
||||
|
||||
/* used to define NL80211_CMD_MAX below */
|
||||
@@ -1750,8 +1757,9 @@ enum nl80211_commands {
|
||||
* specify just a single bitrate, which is to be used for the beacon.
|
||||
* The driver must also specify support for this with the extended
|
||||
* features NL80211_EXT_FEATURE_BEACON_RATE_LEGACY,
|
||||
* NL80211_EXT_FEATURE_BEACON_RATE_HT and
|
||||
* NL80211_EXT_FEATURE_BEACON_RATE_VHT.
|
||||
* NL80211_EXT_FEATURE_BEACON_RATE_HT,
|
||||
* NL80211_EXT_FEATURE_BEACON_RATE_VHT and
|
||||
* NL80211_EXT_FEATURE_BEACON_RATE_HE.
|
||||
*
|
||||
* @NL80211_ATTR_FRAME_MATCH: A binary attribute which typically must contain
|
||||
* at least one byte, currently used with @NL80211_CMD_REGISTER_FRAME.
|
||||
@@ -2077,7 +2085,8 @@ enum nl80211_commands {
|
||||
* until the channel switch event.
|
||||
* @NL80211_ATTR_CH_SWITCH_BLOCK_TX: flag attribute specifying that transmission
|
||||
* must be blocked on the current channel (before the channel switch
|
||||
* operation).
|
||||
* operation). Also included in the channel switch started event if quiet
|
||||
* was requested by the AP.
|
||||
* @NL80211_ATTR_CSA_IES: Nested set of attributes containing the IE information
|
||||
* for the time while performing a channel switch.
|
||||
* @NL80211_ATTR_CNTDWN_OFFS_BEACON: An array of offsets (u16) to the channel
|
||||
@@ -2527,6 +2536,20 @@ enum nl80211_commands {
|
||||
* override mask. Used with NL80211_ATTR_S1G_CAPABILITY in
|
||||
* NL80211_CMD_ASSOCIATE or NL80211_CMD_CONNECT.
|
||||
*
|
||||
* @NL80211_ATTR_SAE_PWE: Indicates the mechanism(s) allowed for SAE PWE
|
||||
* derivation in WPA3-Personal networks which are using SAE authentication.
|
||||
* This is a u8 attribute that encapsulates one of the values from
|
||||
* &enum nl80211_sae_pwe_mechanism.
|
||||
*
|
||||
* @NL80211_ATTR_SAR_SPEC: SAR power limitation specification when
|
||||
* used with %NL80211_CMD_SET_SAR_SPECS. The message contains fields
|
||||
* of %nl80211_sar_attrs which specifies the sar type and related
|
||||
* sar specs. Sar specs contains array of %nl80211_sar_specs_attrs.
|
||||
*
|
||||
* @NL80211_ATTR_RECONNECT_REQUESTED: flag attribute, used with deauth and
|
||||
* disassoc events to indicate that an immediate reconnect to the AP
|
||||
* is desired.
|
||||
*
|
||||
* @NUM_NL80211_ATTR: total number of nl80211_attrs available
|
||||
* @NL80211_ATTR_MAX: highest attribute number currently defined
|
||||
* @__NL80211_ATTR_AFTER_LAST: internal use
|
||||
@@ -3016,6 +3039,12 @@ enum nl80211_attrs {
|
||||
NL80211_ATTR_S1G_CAPABILITY,
|
||||
NL80211_ATTR_S1G_CAPABILITY_MASK,
|
||||
|
||||
NL80211_ATTR_SAE_PWE,
|
||||
|
||||
NL80211_ATTR_RECONNECT_REQUESTED,
|
||||
|
||||
NL80211_ATTR_SAR_SPEC,
|
||||
|
||||
/* add attributes here, update the policy in nl80211.c */
|
||||
|
||||
__NL80211_ATTR_AFTER_LAST,
|
||||
@@ -5896,6 +5925,9 @@ enum nl80211_feature_flags {
|
||||
* @NL80211_EXT_FEATURE_UNSOL_BCAST_PROBE_RESP: Driver/device supports
|
||||
* unsolicited broadcast probe response transmission
|
||||
*
|
||||
* @NL80211_EXT_FEATURE_BEACON_RATE_HE: Driver supports beacon rate
|
||||
* configuration (AP/mesh) with HE rates.
|
||||
*
|
||||
* @NUM_NL80211_EXT_FEATURES: number of extended features.
|
||||
* @MAX_NL80211_EXT_FEATURES: highest extended feature index.
|
||||
*/
|
||||
@@ -5956,6 +5988,7 @@ enum nl80211_ext_feature_index {
|
||||
NL80211_EXT_FEATURE_SAE_OFFLOAD_AP,
|
||||
NL80211_EXT_FEATURE_FILS_DISCOVERY,
|
||||
NL80211_EXT_FEATURE_UNSOL_BCAST_PROBE_RESP,
|
||||
NL80211_EXT_FEATURE_BEACON_RATE_HE,
|
||||
|
||||
/* add new features before the definition below */
|
||||
NUM_NL80211_EXT_FEATURES,
|
||||
@@ -7124,4 +7157,115 @@ enum nl80211_unsol_bcast_probe_resp_attributes {
|
||||
NL80211_UNSOL_BCAST_PROBE_RESP_ATTR_MAX =
|
||||
__NL80211_UNSOL_BCAST_PROBE_RESP_ATTR_LAST - 1
|
||||
};
|
||||
|
||||
/**
|
||||
* enum nl80211_sae_pwe_mechanism - The mechanism(s) allowed for SAE PWE
|
||||
* derivation. Applicable only when WPA3-Personal SAE authentication is
|
||||
* used.
|
||||
*
|
||||
* @NL80211_SAE_PWE_UNSPECIFIED: not specified, used internally to indicate that
|
||||
* attribute is not present from userspace.
|
||||
* @NL80211_SAE_PWE_HUNT_AND_PECK: hunting-and-pecking loop only
|
||||
* @NL80211_SAE_PWE_HASH_TO_ELEMENT: hash-to-element only
|
||||
* @NL80211_SAE_PWE_BOTH: both hunting-and-pecking loop and hash-to-element
|
||||
* can be used.
|
||||
*/
|
||||
enum nl80211_sae_pwe_mechanism {
|
||||
NL80211_SAE_PWE_UNSPECIFIED,
|
||||
NL80211_SAE_PWE_HUNT_AND_PECK,
|
||||
NL80211_SAE_PWE_HASH_TO_ELEMENT,
|
||||
NL80211_SAE_PWE_BOTH,
|
||||
};
|
||||
|
||||
/**
|
||||
* enum nl80211_sar_type - type of SAR specs
|
||||
*
|
||||
* @NL80211_SAR_TYPE_POWER: power limitation specified in 0.25dBm unit
|
||||
*
|
||||
*/
|
||||
enum nl80211_sar_type {
|
||||
NL80211_SAR_TYPE_POWER,
|
||||
|
||||
/* add new type here */
|
||||
|
||||
/* Keep last */
|
||||
NUM_NL80211_SAR_TYPE,
|
||||
};
|
||||
|
||||
/**
|
||||
* enum nl80211_sar_attrs - Attributes for SAR spec
|
||||
*
|
||||
* @NL80211_SAR_ATTR_TYPE: the SAR type as defined in &enum nl80211_sar_type.
|
||||
*
|
||||
* @NL80211_SAR_ATTR_SPECS: Nested array of SAR power
|
||||
* limit specifications. Each specification contains a set
|
||||
* of %nl80211_sar_specs_attrs.
|
||||
*
|
||||
* For SET operation, it contains array of %NL80211_SAR_ATTR_SPECS_POWER
|
||||
* and %NL80211_SAR_ATTR_SPECS_RANGE_INDEX.
|
||||
*
|
||||
* For sar_capa dump, it contains array of
|
||||
* %NL80211_SAR_ATTR_SPECS_START_FREQ
|
||||
* and %NL80211_SAR_ATTR_SPECS_END_FREQ.
|
||||
*
|
||||
* @__NL80211_SAR_ATTR_LAST: Internal
|
||||
* @NL80211_SAR_ATTR_MAX: highest sar attribute
|
||||
*
|
||||
* These attributes are used with %NL80211_CMD_SET_SAR_SPEC
|
||||
*/
|
||||
enum nl80211_sar_attrs {
|
||||
__NL80211_SAR_ATTR_INVALID,
|
||||
|
||||
NL80211_SAR_ATTR_TYPE,
|
||||
NL80211_SAR_ATTR_SPECS,
|
||||
|
||||
__NL80211_SAR_ATTR_LAST,
|
||||
NL80211_SAR_ATTR_MAX = __NL80211_SAR_ATTR_LAST - 1,
|
||||
};
|
||||
|
||||
/**
|
||||
* enum nl80211_sar_specs_attrs - Attributes for SAR power limit specs
|
||||
*
|
||||
* @NL80211_SAR_ATTR_SPECS_POWER: Required (s32)value to specify the actual
|
||||
* power limit value in units of 0.25 dBm if type is
|
||||
* NL80211_SAR_TYPE_POWER. (i.e., a value of 44 represents 11 dBm).
|
||||
* 0 means userspace doesn't have SAR limitation on this associated range.
|
||||
*
|
||||
* @NL80211_SAR_ATTR_SPECS_RANGE_INDEX: Required (u32) value to specify the
|
||||
* index of exported freq range table and the associated power limitation
|
||||
* is applied to this range.
|
||||
*
|
||||
* Userspace isn't required to set all the ranges advertised by WLAN driver,
|
||||
* and userspace can skip some certain ranges. These skipped ranges don't
|
||||
* have SAR limitations, and they are same as setting the
|
||||
* %NL80211_SAR_ATTR_SPECS_POWER to any unreasonable high value because any
|
||||
* value higher than regulatory allowed value just means SAR power
|
||||
* limitation is removed, but it's required to set at least one range.
|
||||
* It's not allowed to set duplicated range in one SET operation.
|
||||
*
|
||||
* Every SET operation overwrites previous SET operation.
|
||||
*
|
||||
* @NL80211_SAR_ATTR_SPECS_START_FREQ: Required (u32) value to specify the start
|
||||
* frequency of this range edge when registering SAR capability to wiphy.
|
||||
* It's not a channel center frequency. The unit is kHz.
|
||||
*
|
||||
* @NL80211_SAR_ATTR_SPECS_END_FREQ: Required (u32) value to specify the end
|
||||
* frequency of this range edge when registering SAR capability to wiphy.
|
||||
* It's not a channel center frequency. The unit is kHz.
|
||||
*
|
||||
* @__NL80211_SAR_ATTR_SPECS_LAST: Internal
|
||||
* @NL80211_SAR_ATTR_SPECS_MAX: highest sar specs attribute
|
||||
*/
|
||||
enum nl80211_sar_specs_attrs {
|
||||
__NL80211_SAR_ATTR_SPECS_INVALID,
|
||||
|
||||
NL80211_SAR_ATTR_SPECS_POWER,
|
||||
NL80211_SAR_ATTR_SPECS_RANGE_INDEX,
|
||||
NL80211_SAR_ATTR_SPECS_START_FREQ,
|
||||
NL80211_SAR_ATTR_SPECS_END_FREQ,
|
||||
|
||||
__NL80211_SAR_ATTR_SPECS_LAST,
|
||||
NL80211_SAR_ATTR_SPECS_MAX = __NL80211_SAR_ATTR_SPECS_LAST - 1,
|
||||
};
|
||||
|
||||
#endif /* __LINUX_NL80211_H */
|
||||
|
||||
@@ -115,6 +115,8 @@ struct pppol2tp_ioc_stats {
|
||||
#define PPPIOCATTCHAN _IOW('t', 56, int) /* attach to ppp channel */
|
||||
#define PPPIOCGCHAN _IOR('t', 55, int) /* get ppp channel number */
|
||||
#define PPPIOCGL2TPSTATS _IOR('t', 54, struct pppol2tp_ioc_stats)
|
||||
#define PPPIOCBRIDGECHAN _IOW('t', 53, int) /* bridge one channel to another */
|
||||
#define PPPIOCUNBRIDGECHAN _IO('t', 54) /* unbridge channel */
|
||||
|
||||
#define SIOCGPPPSTATS (SIOCDEVPRIVATE + 0)
|
||||
#define SIOCGPPPVER (SIOCDEVPRIVATE + 1) /* NEVER change this!! */
|
||||
|
||||
@@ -69,6 +69,16 @@ enum rfkill_operation {
|
||||
RFKILL_OP_CHANGE_ALL,
|
||||
};
|
||||
|
||||
/**
|
||||
* enum rfkill_hard_block_reasons - hard block reasons
|
||||
* @RFKILL_HARD_BLOCK_SIGNAL: the hardware rfkill signal is active
|
||||
* @RFKILL_HARD_BLOCK_NOT_OWNER: the NIC is not owned by the host
|
||||
*/
|
||||
enum rfkill_hard_block_reasons {
|
||||
RFKILL_HARD_BLOCK_SIGNAL = 1 << 0,
|
||||
RFKILL_HARD_BLOCK_NOT_OWNER = 1 << 1,
|
||||
};
|
||||
|
||||
/**
|
||||
* struct rfkill_event - events for userspace on /dev/rfkill
|
||||
* @idx: index of dev rfkill
|
||||
@@ -76,6 +86,8 @@ enum rfkill_operation {
|
||||
* @op: operation code
|
||||
* @hard: hard state (0/1)
|
||||
* @soft: soft state (0/1)
|
||||
* @hard_block_reasons: valid if hard is set. One or several reasons from
|
||||
* &enum rfkill_hard_block_reasons.
|
||||
*
|
||||
* Structure used for userspace communication on /dev/rfkill,
|
||||
* used for events from the kernel and control to the kernel.
|
||||
@@ -84,7 +96,9 @@ struct rfkill_event {
|
||||
__u32 idx;
|
||||
__u8 type;
|
||||
__u8 op;
|
||||
__u8 soft, hard;
|
||||
__u8 soft;
|
||||
__u8 hard;
|
||||
__u8 hard_block_reasons;
|
||||
} __attribute__((packed));
|
||||
|
||||
/*
|
||||
|
||||
@@ -396,11 +396,13 @@ struct rtnexthop {
|
||||
#define RTNH_F_DEAD 1 /* Nexthop is dead (used by multipath) */
|
||||
#define RTNH_F_PERVASIVE 2 /* Do recursive gateway lookup */
|
||||
#define RTNH_F_ONLINK 4 /* Gateway is forced on link */
|
||||
#define RTNH_F_OFFLOAD 8 /* offloaded route */
|
||||
#define RTNH_F_OFFLOAD 8 /* Nexthop is offloaded */
|
||||
#define RTNH_F_LINKDOWN 16 /* carrier-down on nexthop */
|
||||
#define RTNH_F_UNRESOLVED 32 /* The entry is unresolved (ipmr) */
|
||||
#define RTNH_F_TRAP 64 /* Nexthop is trapping packets */
|
||||
|
||||
#define RTNH_COMPARE_MASK (RTNH_F_DEAD | RTNH_F_LINKDOWN | RTNH_F_OFFLOAD)
|
||||
#define RTNH_COMPARE_MASK (RTNH_F_DEAD | RTNH_F_LINKDOWN | \
|
||||
RTNH_F_OFFLOAD | RTNH_F_TRAP)
|
||||
|
||||
/* Macros to handle hexthops */
|
||||
|
||||
@@ -766,12 +768,18 @@ enum {
|
||||
#define TA_PAYLOAD(n) NLMSG_PAYLOAD(n,sizeof(struct tcamsg))
|
||||
/* tcamsg flags stored in attribute TCA_ROOT_FLAGS
|
||||
*
|
||||
* TCA_FLAG_LARGE_DUMP_ON user->kernel to request for larger than TCA_ACT_MAX_PRIO
|
||||
* actions in a dump. All dump responses will contain the number of actions
|
||||
* being dumped stored in for user app's consumption in TCA_ROOT_COUNT
|
||||
* TCA_ACT_FLAG_LARGE_DUMP_ON user->kernel to request for larger than
|
||||
* TCA_ACT_MAX_PRIO actions in a dump. All dump responses will contain the
|
||||
* number of actions being dumped stored in for user app's consumption in
|
||||
* TCA_ROOT_COUNT
|
||||
*
|
||||
* TCA_ACT_FLAG_TERSE_DUMP user->kernel to request terse (brief) dump that only
|
||||
* includes essential action info (kind, index, etc.)
|
||||
*
|
||||
*/
|
||||
#define TCA_FLAG_LARGE_DUMP_ON (1 << 0)
|
||||
#define TCA_ACT_FLAG_LARGE_DUMP_ON TCA_FLAG_LARGE_DUMP_ON
|
||||
#define TCA_ACT_FLAG_TERSE_DUMP (1 << 1)
|
||||
|
||||
/* New extended info filters for IFLA_EXT_MASK */
|
||||
#define RTEXT_FILTER_VF (1 << 0)
|
||||
@@ -779,6 +787,8 @@ enum {
|
||||
#define RTEXT_FILTER_BRVLAN_COMPRESSED (1 << 2)
|
||||
#define RTEXT_FILTER_SKIP_STATS (1 << 3)
|
||||
#define RTEXT_FILTER_MRP (1 << 4)
|
||||
#define RTEXT_FILTER_CFM_CONFIG (1 << 5)
|
||||
#define RTEXT_FILTER_CFM_STATUS (1 << 6)
|
||||
|
||||
/* End of information exported to user level */
|
||||
|
||||
|
||||
@@ -140,6 +140,7 @@ typedef __s32 sctp_assoc_t;
|
||||
#define SCTP_ECN_SUPPORTED 130
|
||||
#define SCTP_EXPOSE_POTENTIALLY_FAILED_STATE 131
|
||||
#define SCTP_EXPOSE_PF_STATE SCTP_EXPOSE_POTENTIALLY_FAILED_STATE
|
||||
#define SCTP_REMOTE_UDP_ENCAPS_PORT 132
|
||||
|
||||
/* PR-SCTP policies */
|
||||
#define SCTP_PR_SCTP_NONE 0x0000
|
||||
@@ -1197,6 +1198,12 @@ struct sctp_event {
|
||||
uint8_t se_on;
|
||||
};
|
||||
|
||||
struct sctp_udpencaps {
|
||||
sctp_assoc_t sue_assoc_id;
|
||||
struct sockaddr_storage sue_address;
|
||||
uint16_t sue_port;
|
||||
};
|
||||
|
||||
/* SCTP Stream schedulers */
|
||||
enum sctp_sched_type {
|
||||
SCTP_SS_FCFS,
|
||||
|
||||
@@ -1,117 +0,0 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
|
||||
/*
|
||||
* INET An implementation of the TCP/IP protocol suite for the LINUX
|
||||
* operating system. INET is implemented using the BSD Socket
|
||||
* interface as the means of communication with the user level.
|
||||
*
|
||||
* Global definitions for the Frame relay interface.
|
||||
*
|
||||
* Version: @(#)if_ifrad.h 0.20 13 Apr 96
|
||||
*
|
||||
* Author: Mike McLagan <mike.mclagan@linux.org>
|
||||
*
|
||||
* Changes:
|
||||
* 0.15 Mike McLagan Structure packing
|
||||
*
|
||||
* 0.20 Mike McLagan New flags for S508 buffer handling
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version
|
||||
* 2 of the License, or (at your option) any later version.
|
||||
*/
|
||||
|
||||
#ifndef _UAPISDLA_H
|
||||
#define _UAPISDLA_H
|
||||
|
||||
/* adapter type */
|
||||
#define SDLA_TYPES
|
||||
#define SDLA_S502A 5020
|
||||
#define SDLA_S502E 5021
|
||||
#define SDLA_S503 5030
|
||||
#define SDLA_S507 5070
|
||||
#define SDLA_S508 5080
|
||||
#define SDLA_S509 5090
|
||||
#define SDLA_UNKNOWN -1
|
||||
|
||||
/* port selection flags for the S508 */
|
||||
#define SDLA_S508_PORT_V35 0x00
|
||||
#define SDLA_S508_PORT_RS232 0x02
|
||||
|
||||
/* Z80 CPU speeds */
|
||||
#define SDLA_CPU_3M 0x00
|
||||
#define SDLA_CPU_5M 0x01
|
||||
#define SDLA_CPU_7M 0x02
|
||||
#define SDLA_CPU_8M 0x03
|
||||
#define SDLA_CPU_10M 0x04
|
||||
#define SDLA_CPU_16M 0x05
|
||||
#define SDLA_CPU_12M 0x06
|
||||
|
||||
/* some private IOCTLs */
|
||||
#define SDLA_IDENTIFY (FRAD_LAST_IOCTL + 1)
|
||||
#define SDLA_CPUSPEED (FRAD_LAST_IOCTL + 2)
|
||||
#define SDLA_PROTOCOL (FRAD_LAST_IOCTL + 3)
|
||||
|
||||
#define SDLA_CLEARMEM (FRAD_LAST_IOCTL + 4)
|
||||
#define SDLA_WRITEMEM (FRAD_LAST_IOCTL + 5)
|
||||
#define SDLA_READMEM (FRAD_LAST_IOCTL + 6)
|
||||
|
||||
struct sdla_mem {
|
||||
int addr;
|
||||
int len;
|
||||
void __user *data;
|
||||
};
|
||||
|
||||
#define SDLA_START (FRAD_LAST_IOCTL + 7)
|
||||
#define SDLA_STOP (FRAD_LAST_IOCTL + 8)
|
||||
|
||||
/* some offsets in the Z80's memory space */
|
||||
#define SDLA_NMIADDR 0x0000
|
||||
#define SDLA_CONF_ADDR 0x0010
|
||||
#define SDLA_S502A_NMIADDR 0x0066
|
||||
#define SDLA_CODE_BASEADDR 0x0100
|
||||
#define SDLA_WINDOW_SIZE 0x2000
|
||||
#define SDLA_ADDR_MASK 0x1FFF
|
||||
|
||||
/* largest handleable block of data */
|
||||
#define SDLA_MAX_DATA 4080
|
||||
#define SDLA_MAX_MTU 4072 /* MAX_DATA - sizeof(fradhdr) */
|
||||
#define SDLA_MAX_DLCI 24
|
||||
|
||||
/* this should be the same as frad_conf */
|
||||
struct sdla_conf {
|
||||
short station;
|
||||
short config;
|
||||
short kbaud;
|
||||
short clocking;
|
||||
short max_frm;
|
||||
short T391;
|
||||
short T392;
|
||||
short N391;
|
||||
short N392;
|
||||
short N393;
|
||||
short CIR_fwd;
|
||||
short Bc_fwd;
|
||||
short Be_fwd;
|
||||
short CIR_bwd;
|
||||
short Bc_bwd;
|
||||
short Be_bwd;
|
||||
};
|
||||
|
||||
/* this should be the same as dlci_conf */
|
||||
struct sdla_dlci_conf {
|
||||
short config;
|
||||
short CIR_fwd;
|
||||
short Bc_fwd;
|
||||
short Be_fwd;
|
||||
short CIR_bwd;
|
||||
short Bc_bwd;
|
||||
short Be_bwd;
|
||||
short Tc_fwd;
|
||||
short Tc_bwd;
|
||||
short Tf_max;
|
||||
short Tb_max;
|
||||
};
|
||||
|
||||
|
||||
#endif /* _UAPISDLA_H */
|
||||
@@ -26,6 +26,7 @@ enum {
|
||||
SEG6_LOCAL_IIF,
|
||||
SEG6_LOCAL_OIF,
|
||||
SEG6_LOCAL_BPF,
|
||||
SEG6_LOCAL_VRFTABLE,
|
||||
__SEG6_LOCAL_MAX,
|
||||
};
|
||||
#define SEG6_LOCAL_MAX (__SEG6_LOCAL_MAX - 1)
|
||||
|
||||
@@ -33,4 +33,130 @@ enum { /* SMC PNET Table commands */
|
||||
#define SMCR_GENL_FAMILY_NAME "SMC_PNETID"
|
||||
#define SMCR_GENL_FAMILY_VERSION 1
|
||||
|
||||
/* gennetlink interface to access non-socket information from SMC module */
|
||||
#define SMC_GENL_FAMILY_NAME "SMC_GEN_NETLINK"
|
||||
#define SMC_GENL_FAMILY_VERSION 1
|
||||
|
||||
#define SMC_PCI_ID_STR_LEN 16 /* Max length of pci id string */
|
||||
|
||||
/* SMC_GENL_FAMILY commands */
|
||||
enum {
|
||||
SMC_NETLINK_GET_SYS_INFO = 1,
|
||||
SMC_NETLINK_GET_LGR_SMCR,
|
||||
SMC_NETLINK_GET_LINK_SMCR,
|
||||
SMC_NETLINK_GET_LGR_SMCD,
|
||||
SMC_NETLINK_GET_DEV_SMCD,
|
||||
SMC_NETLINK_GET_DEV_SMCR,
|
||||
};
|
||||
|
||||
/* SMC_GENL_FAMILY top level attributes */
|
||||
enum {
|
||||
SMC_GEN_UNSPEC,
|
||||
SMC_GEN_SYS_INFO, /* nest */
|
||||
SMC_GEN_LGR_SMCR, /* nest */
|
||||
SMC_GEN_LINK_SMCR, /* nest */
|
||||
SMC_GEN_LGR_SMCD, /* nest */
|
||||
SMC_GEN_DEV_SMCD, /* nest */
|
||||
SMC_GEN_DEV_SMCR, /* nest */
|
||||
__SMC_GEN_MAX,
|
||||
SMC_GEN_MAX = __SMC_GEN_MAX - 1
|
||||
};
|
||||
|
||||
/* SMC_GEN_SYS_INFO attributes */
|
||||
enum {
|
||||
SMC_NLA_SYS_UNSPEC,
|
||||
SMC_NLA_SYS_VER, /* u8 */
|
||||
SMC_NLA_SYS_REL, /* u8 */
|
||||
SMC_NLA_SYS_IS_ISM_V2, /* u8 */
|
||||
SMC_NLA_SYS_LOCAL_HOST, /* string */
|
||||
SMC_NLA_SYS_SEID, /* string */
|
||||
__SMC_NLA_SYS_MAX,
|
||||
SMC_NLA_SYS_MAX = __SMC_NLA_SYS_MAX - 1
|
||||
};
|
||||
|
||||
/* SMC_NLA_LGR_V2 nested attributes */
|
||||
enum {
|
||||
SMC_NLA_LGR_V2_VER, /* u8 */
|
||||
SMC_NLA_LGR_V2_REL, /* u8 */
|
||||
SMC_NLA_LGR_V2_OS, /* u8 */
|
||||
SMC_NLA_LGR_V2_NEG_EID, /* string */
|
||||
SMC_NLA_LGR_V2_PEER_HOST, /* string */
|
||||
};
|
||||
|
||||
/* SMC_GEN_LGR_SMCR attributes */
|
||||
enum {
|
||||
SMC_NLA_LGR_R_UNSPEC,
|
||||
SMC_NLA_LGR_R_ID, /* u32 */
|
||||
SMC_NLA_LGR_R_ROLE, /* u8 */
|
||||
SMC_NLA_LGR_R_TYPE, /* u8 */
|
||||
SMC_NLA_LGR_R_PNETID, /* string */
|
||||
SMC_NLA_LGR_R_VLAN_ID, /* u8 */
|
||||
SMC_NLA_LGR_R_CONNS_NUM, /* u32 */
|
||||
__SMC_NLA_LGR_R_MAX,
|
||||
SMC_NLA_LGR_R_MAX = __SMC_NLA_LGR_R_MAX - 1
|
||||
};
|
||||
|
||||
/* SMC_GEN_LINK_SMCR attributes */
|
||||
enum {
|
||||
SMC_NLA_LINK_UNSPEC,
|
||||
SMC_NLA_LINK_ID, /* u8 */
|
||||
SMC_NLA_LINK_IB_DEV, /* string */
|
||||
SMC_NLA_LINK_IB_PORT, /* u8 */
|
||||
SMC_NLA_LINK_GID, /* string */
|
||||
SMC_NLA_LINK_PEER_GID, /* string */
|
||||
SMC_NLA_LINK_CONN_CNT, /* u32 */
|
||||
SMC_NLA_LINK_NET_DEV, /* u32 */
|
||||
SMC_NLA_LINK_UID, /* u32 */
|
||||
SMC_NLA_LINK_PEER_UID, /* u32 */
|
||||
SMC_NLA_LINK_STATE, /* u32 */
|
||||
__SMC_NLA_LINK_MAX,
|
||||
SMC_NLA_LINK_MAX = __SMC_NLA_LINK_MAX - 1
|
||||
};
|
||||
|
||||
/* SMC_GEN_LGR_SMCD attributes */
|
||||
enum {
|
||||
SMC_NLA_LGR_D_UNSPEC,
|
||||
SMC_NLA_LGR_D_ID, /* u32 */
|
||||
SMC_NLA_LGR_D_GID, /* u64 */
|
||||
SMC_NLA_LGR_D_PEER_GID, /* u64 */
|
||||
SMC_NLA_LGR_D_VLAN_ID, /* u8 */
|
||||
SMC_NLA_LGR_D_CONNS_NUM, /* u32 */
|
||||
SMC_NLA_LGR_D_PNETID, /* string */
|
||||
SMC_NLA_LGR_D_CHID, /* u16 */
|
||||
SMC_NLA_LGR_D_PAD, /* flag */
|
||||
SMC_NLA_LGR_V2, /* nest */
|
||||
__SMC_NLA_LGR_D_MAX,
|
||||
SMC_NLA_LGR_D_MAX = __SMC_NLA_LGR_D_MAX - 1
|
||||
};
|
||||
|
||||
/* SMC_NLA_DEV_PORT nested attributes */
|
||||
enum {
|
||||
SMC_NLA_DEV_PORT_UNSPEC,
|
||||
SMC_NLA_DEV_PORT_PNET_USR, /* u8 */
|
||||
SMC_NLA_DEV_PORT_PNETID, /* string */
|
||||
SMC_NLA_DEV_PORT_NETDEV, /* u32 */
|
||||
SMC_NLA_DEV_PORT_STATE, /* u8 */
|
||||
SMC_NLA_DEV_PORT_VALID, /* u8 */
|
||||
SMC_NLA_DEV_PORT_LNK_CNT, /* u32 */
|
||||
__SMC_NLA_DEV_PORT_MAX,
|
||||
SMC_NLA_DEV_PORT_MAX = __SMC_NLA_DEV_PORT_MAX - 1
|
||||
};
|
||||
|
||||
/* SMC_GEN_DEV_SMCD and SMC_GEN_DEV_SMCR attributes */
|
||||
enum {
|
||||
SMC_NLA_DEV_UNSPEC,
|
||||
SMC_NLA_DEV_USE_CNT, /* u32 */
|
||||
SMC_NLA_DEV_IS_CRIT, /* u8 */
|
||||
SMC_NLA_DEV_PCI_FID, /* u32 */
|
||||
SMC_NLA_DEV_PCI_CHID, /* u16 */
|
||||
SMC_NLA_DEV_PCI_VENDOR, /* u16 */
|
||||
SMC_NLA_DEV_PCI_DEVICE, /* u16 */
|
||||
SMC_NLA_DEV_PCI_ID, /* string */
|
||||
SMC_NLA_DEV_PORT, /* nest */
|
||||
SMC_NLA_DEV_PORT2, /* nest */
|
||||
SMC_NLA_DEV_IB_NAME, /* string */
|
||||
__SMC_NLA_DEV_MAX,
|
||||
SMC_NLA_DEV_MAX = __SMC_NLA_DEV_MAX - 1
|
||||
};
|
||||
|
||||
#endif /* _UAPI_LINUX_SMC_H */
|
||||
|
||||
@@ -159,6 +159,7 @@ enum
|
||||
UDP_MIB_SNDBUFERRORS, /* SndbufErrors */
|
||||
UDP_MIB_CSUMERRORS, /* InCsumErrors */
|
||||
UDP_MIB_IGNOREDMULTI, /* IgnoredMulti */
|
||||
UDP_MIB_MEMERRORS, /* MemErrors */
|
||||
__UDP_MIB_MAX
|
||||
};
|
||||
|
||||
|
||||
@@ -343,11 +343,15 @@ struct tcp_diag_md5sig {
|
||||
|
||||
/* setsockopt(fd, IPPROTO_TCP, TCP_ZEROCOPY_RECEIVE, ...) */
|
||||
|
||||
#define TCP_RECEIVE_ZEROCOPY_FLAG_TLB_CLEAN_HINT 0x1
|
||||
struct tcp_zerocopy_receive {
|
||||
__u64 address; /* in: address of mapping */
|
||||
__u32 length; /* in/out: number of bytes to map/mapped */
|
||||
__u32 recv_skip_hint; /* out: amount of bytes to skip */
|
||||
__u32 inq; /* out: amount of bytes in read queue */
|
||||
__s32 err; /* out: socket error */
|
||||
__u64 copybuf_address; /* in: copybuf address (small reads) */
|
||||
__s32 copybuf_len; /* in/out: copybuf bytes avail/used or error */
|
||||
__u32 flags; /* in: flags */
|
||||
};
|
||||
#endif /* _UAPI_LINUX_TCP_H */
|
||||
|
||||
@@ -77,6 +77,13 @@
|
||||
#define TLS_CIPHER_AES_CCM_128_TAG_SIZE 16
|
||||
#define TLS_CIPHER_AES_CCM_128_REC_SEQ_SIZE 8
|
||||
|
||||
#define TLS_CIPHER_CHACHA20_POLY1305 54
|
||||
#define TLS_CIPHER_CHACHA20_POLY1305_IV_SIZE 12
|
||||
#define TLS_CIPHER_CHACHA20_POLY1305_KEY_SIZE 32
|
||||
#define TLS_CIPHER_CHACHA20_POLY1305_SALT_SIZE 0
|
||||
#define TLS_CIPHER_CHACHA20_POLY1305_TAG_SIZE 16
|
||||
#define TLS_CIPHER_CHACHA20_POLY1305_REC_SEQ_SIZE 8
|
||||
|
||||
#define TLS_SET_RECORD_TYPE 1
|
||||
#define TLS_GET_RECORD_TYPE 2
|
||||
|
||||
@@ -109,6 +116,14 @@ struct tls12_crypto_info_aes_ccm_128 {
|
||||
unsigned char rec_seq[TLS_CIPHER_AES_CCM_128_REC_SEQ_SIZE];
|
||||
};
|
||||
|
||||
struct tls12_crypto_info_chacha20_poly1305 {
|
||||
struct tls_crypto_info info;
|
||||
unsigned char iv[TLS_CIPHER_CHACHA20_POLY1305_IV_SIZE];
|
||||
unsigned char key[TLS_CIPHER_CHACHA20_POLY1305_KEY_SIZE];
|
||||
unsigned char salt[TLS_CIPHER_CHACHA20_POLY1305_SALT_SIZE];
|
||||
unsigned char rec_seq[TLS_CIPHER_CHACHA20_POLY1305_REC_SEQ_SIZE];
|
||||
};
|
||||
|
||||
enum {
|
||||
TLS_INFO_UNSPEC,
|
||||
TLS_INFO_VERSION,
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
#define _UAPI_VM_SOCKETS_H
|
||||
|
||||
#include <linux/socket.h>
|
||||
#include <linux/types.h>
|
||||
|
||||
/* Option name for STREAM socket buffer size. Use as the option name in
|
||||
* setsockopt(3) or getsockopt(3) to set or get an unsigned long long that
|
||||
@@ -114,6 +115,26 @@
|
||||
|
||||
#define VMADDR_CID_HOST 2
|
||||
|
||||
/* The current default use case for the vsock channel is the following:
|
||||
* local vsock communication between guest and host and nested VMs setup.
|
||||
* In addition to this, implicitly, the vsock packets are forwarded to the host
|
||||
* if no host->guest vsock transport is set.
|
||||
*
|
||||
* Set this flag value in the sockaddr_vm corresponding field if the vsock
|
||||
* packets need to be always forwarded to the host. Using this behavior,
|
||||
* vsock communication between sibling VMs can be setup.
|
||||
*
|
||||
* This way can explicitly distinguish between vsock channels created for
|
||||
* different use cases, such as nested VMs (or local communication between
|
||||
* guest and host) and sibling VMs.
|
||||
*
|
||||
* The flag can be set in the connect logic in the user space application flow.
|
||||
* In the listen logic (from kernel space) the flag is set on the remote peer
|
||||
* address. This happens for an incoming connection when it is routed from the
|
||||
* host and comes from the guest (local CID and remote CID > VMADDR_CID_HOST).
|
||||
*/
|
||||
#define VMADDR_FLAG_TO_HOST 0x01
|
||||
|
||||
/* Invalid vSockets version. */
|
||||
|
||||
#define VM_SOCKETS_INVALID_VERSION -1U
|
||||
@@ -148,10 +169,13 @@ struct sockaddr_vm {
|
||||
unsigned short svm_reserved1;
|
||||
unsigned int svm_port;
|
||||
unsigned int svm_cid;
|
||||
__u8 svm_flags;
|
||||
unsigned char svm_zero[sizeof(struct sockaddr) -
|
||||
sizeof(sa_family_t) -
|
||||
sizeof(unsigned short) -
|
||||
sizeof(unsigned int) - sizeof(unsigned int)];
|
||||
sizeof(unsigned int) -
|
||||
sizeof(unsigned int) -
|
||||
sizeof(__u8)];
|
||||
};
|
||||
|
||||
#define IOCTL_VM_SOCKETS_GET_LOCAL_CID _IO(7, 0xb9)
|
||||
|
||||
@@ -1,239 +0,0 @@
|
||||
/*
|
||||
* Linux WiMax
|
||||
* API for user space
|
||||
*
|
||||
*
|
||||
* Copyright (C) 2007-2008 Intel Corporation. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* * Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
* * Neither the name of Intel Corporation nor the names of its
|
||||
* contributors may be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
*
|
||||
* Intel Corporation <linux-wimax@intel.com>
|
||||
* Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>
|
||||
* - Initial implementation
|
||||
*
|
||||
*
|
||||
* This file declares the user/kernel protocol that is spoken over
|
||||
* Generic Netlink, as well as any type declaration that is to be used
|
||||
* by kernel and user space.
|
||||
*
|
||||
* It is intended for user space to clone it verbatim to use it as a
|
||||
* primary reference for definitions.
|
||||
*
|
||||
* Stuff intended for kernel usage as well as full protocol and stack
|
||||
* documentation is rooted in include/net/wimax.h.
|
||||
*/
|
||||
|
||||
#ifndef __LINUX__WIMAX_H__
|
||||
#define __LINUX__WIMAX_H__
|
||||
|
||||
#include <linux/types.h>
|
||||
|
||||
enum {
|
||||
/**
|
||||
* Version of the interface (unsigned decimal, MMm, max 25.5)
|
||||
* M - Major: change if removing or modifying an existing call.
|
||||
* m - minor: change when adding a new call
|
||||
*/
|
||||
WIMAX_GNL_VERSION = 01,
|
||||
/* Generic NetLink attributes */
|
||||
WIMAX_GNL_ATTR_INVALID = 0x00,
|
||||
WIMAX_GNL_ATTR_MAX = 10,
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
* Generic NetLink operations
|
||||
*
|
||||
* Most of these map to an API call; _OP_ stands for operation, _RP_
|
||||
* for reply and _RE_ for report (aka: signal).
|
||||
*/
|
||||
enum {
|
||||
WIMAX_GNL_OP_MSG_FROM_USER, /* User to kernel message */
|
||||
WIMAX_GNL_OP_MSG_TO_USER, /* Kernel to user message */
|
||||
WIMAX_GNL_OP_RFKILL, /* Run wimax_rfkill() */
|
||||
WIMAX_GNL_OP_RESET, /* Run wimax_rfkill() */
|
||||
WIMAX_GNL_RE_STATE_CHANGE, /* Report: status change */
|
||||
WIMAX_GNL_OP_STATE_GET, /* Request for current state */
|
||||
};
|
||||
|
||||
|
||||
/* Message from user / to user */
|
||||
enum {
|
||||
WIMAX_GNL_MSG_IFIDX = 1,
|
||||
WIMAX_GNL_MSG_PIPE_NAME,
|
||||
WIMAX_GNL_MSG_DATA,
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
* wimax_rfkill()
|
||||
*
|
||||
* The state of the radio (ON/OFF) is mapped to the rfkill subsystem's
|
||||
* switch state (DISABLED/ENABLED).
|
||||
*/
|
||||
enum wimax_rf_state {
|
||||
WIMAX_RF_OFF = 0, /* Radio is off, rfkill on/enabled */
|
||||
WIMAX_RF_ON = 1, /* Radio is on, rfkill off/disabled */
|
||||
WIMAX_RF_QUERY = 2,
|
||||
};
|
||||
|
||||
/* Attributes */
|
||||
enum {
|
||||
WIMAX_GNL_RFKILL_IFIDX = 1,
|
||||
WIMAX_GNL_RFKILL_STATE,
|
||||
};
|
||||
|
||||
|
||||
/* Attributes for wimax_reset() */
|
||||
enum {
|
||||
WIMAX_GNL_RESET_IFIDX = 1,
|
||||
};
|
||||
|
||||
/* Attributes for wimax_state_get() */
|
||||
enum {
|
||||
WIMAX_GNL_STGET_IFIDX = 1,
|
||||
};
|
||||
|
||||
/*
|
||||
* Attributes for the Report State Change
|
||||
*
|
||||
* For now we just have the old and new states; new attributes might
|
||||
* be added later on.
|
||||
*/
|
||||
enum {
|
||||
WIMAX_GNL_STCH_IFIDX = 1,
|
||||
WIMAX_GNL_STCH_STATE_OLD,
|
||||
WIMAX_GNL_STCH_STATE_NEW,
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* enum wimax_st - The different states of a WiMAX device
|
||||
* @__WIMAX_ST_NULL: The device structure has been allocated and zeroed,
|
||||
* but still wimax_dev_add() hasn't been called. There is no state.
|
||||
*
|
||||
* @WIMAX_ST_DOWN: The device has been registered with the WiMAX and
|
||||
* networking stacks, but it is not initialized (normally that is
|
||||
* done with 'ifconfig DEV up' [or equivalent], which can upload
|
||||
* firmware and enable communications with the device).
|
||||
* In this state, the device is powered down and using as less
|
||||
* power as possible.
|
||||
* This state is the default after a call to wimax_dev_add(). It
|
||||
* is ok to have drivers move directly to %WIMAX_ST_UNINITIALIZED
|
||||
* or %WIMAX_ST_RADIO_OFF in _probe() after the call to
|
||||
* wimax_dev_add().
|
||||
* It is recommended that the driver leaves this state when
|
||||
* calling 'ifconfig DEV up' and enters it back on 'ifconfig DEV
|
||||
* down'.
|
||||
*
|
||||
* @__WIMAX_ST_QUIESCING: The device is being torn down, so no API
|
||||
* operations are allowed to proceed except the ones needed to
|
||||
* complete the device clean up process.
|
||||
*
|
||||
* @WIMAX_ST_UNINITIALIZED: [optional] Communication with the device
|
||||
* is setup, but the device still requires some configuration
|
||||
* before being operational.
|
||||
* Some WiMAX API calls might work.
|
||||
*
|
||||
* @WIMAX_ST_RADIO_OFF: The device is fully up; radio is off (wether
|
||||
* by hardware or software switches).
|
||||
* It is recommended to always leave the device in this state
|
||||
* after initialization.
|
||||
*
|
||||
* @WIMAX_ST_READY: The device is fully up and radio is on.
|
||||
*
|
||||
* @WIMAX_ST_SCANNING: [optional] The device has been instructed to
|
||||
* scan. In this state, the device cannot be actively connected to
|
||||
* a network.
|
||||
*
|
||||
* @WIMAX_ST_CONNECTING: The device is connecting to a network. This
|
||||
* state exists because in some devices, the connect process can
|
||||
* include a number of negotiations between user space, kernel
|
||||
* space and the device. User space needs to know what the device
|
||||
* is doing. If the connect sequence in a device is atomic and
|
||||
* fast, the device can transition directly to CONNECTED
|
||||
*
|
||||
* @WIMAX_ST_CONNECTED: The device is connected to a network.
|
||||
*
|
||||
* @__WIMAX_ST_INVALID: This is an invalid state used to mark the
|
||||
* maximum numeric value of states.
|
||||
*
|
||||
* Description:
|
||||
*
|
||||
* Transitions from one state to another one are atomic and can only
|
||||
* be caused in kernel space with wimax_state_change(). To read the
|
||||
* state, use wimax_state_get().
|
||||
*
|
||||
* States starting with __ are internal and shall not be used or
|
||||
* referred to by drivers or userspace. They look ugly, but that's the
|
||||
* point -- if any use is made non-internal to the stack, it is easier
|
||||
* to catch on review.
|
||||
*
|
||||
* All API operations [with well defined exceptions] will take the
|
||||
* device mutex before starting and then check the state. If the state
|
||||
* is %__WIMAX_ST_NULL, %WIMAX_ST_DOWN, %WIMAX_ST_UNINITIALIZED or
|
||||
* %__WIMAX_ST_QUIESCING, it will drop the lock and quit with
|
||||
* -%EINVAL, -%ENOMEDIUM, -%ENOTCONN or -%ESHUTDOWN.
|
||||
*
|
||||
* The order of the definitions is important, so we can do numerical
|
||||
* comparisons (eg: < %WIMAX_ST_RADIO_OFF means the device is not ready
|
||||
* to operate).
|
||||
*/
|
||||
/*
|
||||
* The allowed state transitions are described in the table below
|
||||
* (states in rows can go to states in columns where there is an X):
|
||||
*
|
||||
* UNINI RADIO READY SCAN CONNEC CONNEC
|
||||
* NULL DOWN QUIESCING TIALIZED OFF NING TING TED
|
||||
* NULL - x
|
||||
* DOWN - x x x
|
||||
* QUIESCING x -
|
||||
* UNINITIALIZED x - x
|
||||
* RADIO_OFF x - x
|
||||
* READY x x - x x x
|
||||
* SCANNING x x x - x x
|
||||
* CONNECTING x x x x - x
|
||||
* CONNECTED x x x -
|
||||
*
|
||||
* This table not available in kernel-doc because the formatting messes it up.
|
||||
*/
|
||||
enum wimax_st {
|
||||
__WIMAX_ST_NULL = 0,
|
||||
WIMAX_ST_DOWN,
|
||||
__WIMAX_ST_QUIESCING,
|
||||
WIMAX_ST_UNINITIALIZED,
|
||||
WIMAX_ST_RADIO_OFF,
|
||||
WIMAX_ST_READY,
|
||||
WIMAX_ST_SCANNING,
|
||||
WIMAX_ST_CONNECTING,
|
||||
WIMAX_ST_CONNECTED,
|
||||
__WIMAX_ST_INVALID /* Always keep last */
|
||||
};
|
||||
|
||||
|
||||
#endif /* #ifndef __LINUX__WIMAX_H__ */
|
||||
@@ -1,572 +0,0 @@
|
||||
/*
|
||||
* Intel Wireless WiMax Connection 2400m
|
||||
* Host-Device protocol interface definitions
|
||||
*
|
||||
*
|
||||
* Copyright (C) 2007-2008 Intel Corporation. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* * Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
* * Neither the name of Intel Corporation nor the names of its
|
||||
* contributors may be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
*
|
||||
* Intel Corporation <linux-wimax@intel.com>
|
||||
* Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>
|
||||
* - Initial implementation
|
||||
*
|
||||
*
|
||||
* This header defines the data structures and constants used to
|
||||
* communicate with the device.
|
||||
*
|
||||
* BOOTMODE/BOOTROM/FIRMWARE UPLOAD PROTOCOL
|
||||
*
|
||||
* The firmware upload protocol is quite simple and only requires a
|
||||
* handful of commands. See drivers/net/wimax/i2400m/fw.c for more
|
||||
* details.
|
||||
*
|
||||
* The BCF data structure is for the firmware file header.
|
||||
*
|
||||
*
|
||||
* THE DATA / CONTROL PROTOCOL
|
||||
*
|
||||
* This is the normal protocol spoken with the device once the
|
||||
* firmware is uploaded. It transports data payloads and control
|
||||
* messages back and forth.
|
||||
*
|
||||
* It consists 'messages' that pack one or more payloads each. The
|
||||
* format is described in detail in drivers/net/wimax/i2400m/rx.c and
|
||||
* tx.c.
|
||||
*
|
||||
*
|
||||
* THE L3L4 PROTOCOL
|
||||
*
|
||||
* The term L3L4 refers to Layer 3 (the device), Layer 4 (the
|
||||
* driver/host software).
|
||||
*
|
||||
* This is the control protocol used by the host to control the i2400m
|
||||
* device (scan, connect, disconnect...). This is sent to / received
|
||||
* as control frames. These frames consist of a header and zero or
|
||||
* more TLVs with information. We call each control frame a "message".
|
||||
*
|
||||
* Each message is composed of:
|
||||
*
|
||||
* HEADER
|
||||
* [TLV0 + PAYLOAD0]
|
||||
* [TLV1 + PAYLOAD1]
|
||||
* [...]
|
||||
* [TLVN + PAYLOADN]
|
||||
*
|
||||
* The HEADER is defined by 'struct i2400m_l3l4_hdr'. The payloads are
|
||||
* defined by a TLV structure (Type Length Value) which is a 'header'
|
||||
* (struct i2400m_tlv_hdr) and then the payload.
|
||||
*
|
||||
* All integers are represented as Little Endian.
|
||||
*
|
||||
* - REQUESTS AND EVENTS
|
||||
*
|
||||
* The requests can be clasified as follows:
|
||||
*
|
||||
* COMMAND: implies a request from the host to the device requesting
|
||||
* an action being performed. The device will reply with a
|
||||
* message (with the same type as the command), status and
|
||||
* no (TLV) payload. Execution of a command might cause
|
||||
* events (of different type) to be sent later on as
|
||||
* device's state changes.
|
||||
*
|
||||
* GET/SET: similar to COMMAND, but will not cause other
|
||||
* EVENTs. The reply, in the case of GET, will contain
|
||||
* TLVs with the requested information.
|
||||
*
|
||||
* EVENT: asynchronous messages sent from the device, maybe as a
|
||||
* consequence of previous COMMANDs but disassociated from
|
||||
* them.
|
||||
*
|
||||
* Only one request might be pending at the same time (ie: don't
|
||||
* parallelize nor post another GET request before the previous
|
||||
* COMMAND has been acknowledged with it's corresponding reply by the
|
||||
* device).
|
||||
*
|
||||
* The different requests and their formats are described below:
|
||||
*
|
||||
* I2400M_MT_* Message types
|
||||
* I2400M_MS_* Message status (for replies, events)
|
||||
* i2400m_tlv_* TLVs
|
||||
*
|
||||
* data types are named 'struct i2400m_msg_OPNAME', OPNAME matching the
|
||||
* operation.
|
||||
*/
|
||||
|
||||
#ifndef __LINUX__WIMAX__I2400M_H__
|
||||
#define __LINUX__WIMAX__I2400M_H__
|
||||
|
||||
#include <linux/types.h>
|
||||
#include <linux/if_ether.h>
|
||||
|
||||
/*
|
||||
* Host Device Interface (HDI) common to all busses
|
||||
*/
|
||||
|
||||
/* Boot-mode (firmware upload mode) commands */
|
||||
|
||||
/* Header for the firmware file */
|
||||
struct i2400m_bcf_hdr {
|
||||
__le32 module_type;
|
||||
__le32 header_len;
|
||||
__le32 header_version;
|
||||
__le32 module_id;
|
||||
__le32 module_vendor;
|
||||
__le32 date; /* BCD YYYMMDD */
|
||||
__le32 size; /* in dwords */
|
||||
__le32 key_size; /* in dwords */
|
||||
__le32 modulus_size; /* in dwords */
|
||||
__le32 exponent_size; /* in dwords */
|
||||
__u8 reserved[88];
|
||||
} __attribute__ ((packed));
|
||||
|
||||
/* Boot mode opcodes */
|
||||
enum i2400m_brh_opcode {
|
||||
I2400M_BRH_READ = 1,
|
||||
I2400M_BRH_WRITE = 2,
|
||||
I2400M_BRH_JUMP = 3,
|
||||
I2400M_BRH_SIGNED_JUMP = 8,
|
||||
I2400M_BRH_HASH_PAYLOAD_ONLY = 9,
|
||||
};
|
||||
|
||||
/* Boot mode command masks and stuff */
|
||||
enum i2400m_brh {
|
||||
I2400M_BRH_SIGNATURE = 0xcbbc0000,
|
||||
I2400M_BRH_SIGNATURE_MASK = 0xffff0000,
|
||||
I2400M_BRH_SIGNATURE_SHIFT = 16,
|
||||
I2400M_BRH_OPCODE_MASK = 0x0000000f,
|
||||
I2400M_BRH_RESPONSE_MASK = 0x000000f0,
|
||||
I2400M_BRH_RESPONSE_SHIFT = 4,
|
||||
I2400M_BRH_DIRECT_ACCESS = 0x00000400,
|
||||
I2400M_BRH_RESPONSE_REQUIRED = 0x00000200,
|
||||
I2400M_BRH_USE_CHECKSUM = 0x00000100,
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* i2400m_bootrom_header - Header for a boot-mode command
|
||||
*
|
||||
* @cmd: the above command descriptor
|
||||
* @target_addr: where on the device memory should the action be performed.
|
||||
* @data_size: for read/write, amount of data to be read/written
|
||||
* @block_checksum: checksum value (if applicable)
|
||||
* @payload: the beginning of data attached to this header
|
||||
*/
|
||||
struct i2400m_bootrom_header {
|
||||
__le32 command; /* Compose with enum i2400_brh */
|
||||
__le32 target_addr;
|
||||
__le32 data_size;
|
||||
__le32 block_checksum;
|
||||
char payload[0];
|
||||
} __attribute__ ((packed));
|
||||
|
||||
|
||||
/*
|
||||
* Data / control protocol
|
||||
*/
|
||||
|
||||
/* Packet types for the host-device interface */
|
||||
enum i2400m_pt {
|
||||
I2400M_PT_DATA = 0,
|
||||
I2400M_PT_CTRL,
|
||||
I2400M_PT_TRACE, /* For device debug */
|
||||
I2400M_PT_RESET_WARM, /* device reset */
|
||||
I2400M_PT_RESET_COLD, /* USB[transport] reset, like reconnect */
|
||||
I2400M_PT_EDATA, /* Extended RX data */
|
||||
I2400M_PT_ILLEGAL
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
* Payload for a data packet
|
||||
*
|
||||
* This is prefixed to each and every outgoing DATA type.
|
||||
*/
|
||||
struct i2400m_pl_data_hdr {
|
||||
__le32 reserved;
|
||||
} __attribute__((packed));
|
||||
|
||||
|
||||
/*
|
||||
* Payload for an extended data packet
|
||||
*
|
||||
* New in fw v1.4
|
||||
*
|
||||
* @reorder: if this payload has to be reorder or not (and how)
|
||||
* @cs: the type of data in the packet, as defined per (802.16e
|
||||
* T11.13.19.1). Currently only 2 (IPv4 packet) supported.
|
||||
*
|
||||
* This is prefixed to each and every INCOMING DATA packet.
|
||||
*/
|
||||
struct i2400m_pl_edata_hdr {
|
||||
__le32 reorder; /* bits defined in i2400m_ro */
|
||||
__u8 cs;
|
||||
__u8 reserved[11];
|
||||
} __attribute__((packed));
|
||||
|
||||
enum i2400m_cs {
|
||||
I2400M_CS_IPV4_0 = 0,
|
||||
I2400M_CS_IPV4 = 2,
|
||||
};
|
||||
|
||||
enum i2400m_ro {
|
||||
I2400M_RO_NEEDED = 0x01,
|
||||
I2400M_RO_TYPE = 0x03,
|
||||
I2400M_RO_TYPE_SHIFT = 1,
|
||||
I2400M_RO_CIN = 0x0f,
|
||||
I2400M_RO_CIN_SHIFT = 4,
|
||||
I2400M_RO_FBN = 0x07ff,
|
||||
I2400M_RO_FBN_SHIFT = 8,
|
||||
I2400M_RO_SN = 0x07ff,
|
||||
I2400M_RO_SN_SHIFT = 21,
|
||||
};
|
||||
|
||||
enum i2400m_ro_type {
|
||||
I2400M_RO_TYPE_RESET = 0,
|
||||
I2400M_RO_TYPE_PACKET,
|
||||
I2400M_RO_TYPE_WS,
|
||||
I2400M_RO_TYPE_PACKET_WS,
|
||||
};
|
||||
|
||||
|
||||
/* Misc constants */
|
||||
enum {
|
||||
I2400M_PL_ALIGN = 16, /* Payload data size alignment */
|
||||
I2400M_PL_SIZE_MAX = 0x3EFF,
|
||||
I2400M_MAX_PLS_IN_MSG = 60,
|
||||
/* protocol barkers: sync sequences; for notifications they
|
||||
* are sent in groups of four. */
|
||||
I2400M_H2D_PREVIEW_BARKER = 0xcafe900d,
|
||||
I2400M_COLD_RESET_BARKER = 0xc01dc01d,
|
||||
I2400M_WARM_RESET_BARKER = 0x50f750f7,
|
||||
I2400M_NBOOT_BARKER = 0xdeadbeef,
|
||||
I2400M_SBOOT_BARKER = 0x0ff1c1a1,
|
||||
I2400M_SBOOT_BARKER_6050 = 0x80000001,
|
||||
I2400M_ACK_BARKER = 0xfeedbabe,
|
||||
I2400M_D2H_MSG_BARKER = 0xbeefbabe,
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
* Hardware payload descriptor
|
||||
*
|
||||
* Bitfields encoded in a struct to enforce typing semantics.
|
||||
*
|
||||
* Look in rx.c and tx.c for a full description of the format.
|
||||
*/
|
||||
struct i2400m_pld {
|
||||
__le32 val;
|
||||
} __attribute__ ((packed));
|
||||
|
||||
#define I2400M_PLD_SIZE_MASK 0x00003fff
|
||||
#define I2400M_PLD_TYPE_SHIFT 16
|
||||
#define I2400M_PLD_TYPE_MASK 0x000f0000
|
||||
|
||||
/*
|
||||
* Header for a TX message or RX message
|
||||
*
|
||||
* @barker: preamble
|
||||
* @size: used for management of the FIFO queue buffer; before
|
||||
* sending, this is converted to be a real preamble. This
|
||||
* indicates the real size of the TX message that starts at this
|
||||
* point. If the highest bit is set, then this message is to be
|
||||
* skipped.
|
||||
* @sequence: sequence number of this message
|
||||
* @offset: offset where the message itself starts -- see the comments
|
||||
* in the file header about message header and payload descriptor
|
||||
* alignment.
|
||||
* @num_pls: number of payloads in this message
|
||||
* @padding: amount of padding bytes at the end of the message to make
|
||||
* it be of block-size aligned
|
||||
*
|
||||
* Look in rx.c and tx.c for a full description of the format.
|
||||
*/
|
||||
struct i2400m_msg_hdr {
|
||||
union {
|
||||
__le32 barker;
|
||||
__u32 size; /* same size type as barker!! */
|
||||
};
|
||||
union {
|
||||
__le32 sequence;
|
||||
__u32 offset; /* same size type as barker!! */
|
||||
};
|
||||
__le16 num_pls;
|
||||
__le16 rsv1;
|
||||
__le16 padding;
|
||||
__le16 rsv2;
|
||||
struct i2400m_pld pld[0];
|
||||
} __attribute__ ((packed));
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* L3/L4 control protocol
|
||||
*/
|
||||
|
||||
enum {
|
||||
/* Interface version */
|
||||
I2400M_L3L4_VERSION = 0x0100,
|
||||
};
|
||||
|
||||
/* Message types */
|
||||
enum i2400m_mt {
|
||||
I2400M_MT_RESERVED = 0x0000,
|
||||
I2400M_MT_INVALID = 0xffff,
|
||||
I2400M_MT_REPORT_MASK = 0x8000,
|
||||
|
||||
I2400M_MT_GET_SCAN_RESULT = 0x4202,
|
||||
I2400M_MT_SET_SCAN_PARAM = 0x4402,
|
||||
I2400M_MT_CMD_RF_CONTROL = 0x4602,
|
||||
I2400M_MT_CMD_SCAN = 0x4603,
|
||||
I2400M_MT_CMD_CONNECT = 0x4604,
|
||||
I2400M_MT_CMD_DISCONNECT = 0x4605,
|
||||
I2400M_MT_CMD_EXIT_IDLE = 0x4606,
|
||||
I2400M_MT_GET_LM_VERSION = 0x5201,
|
||||
I2400M_MT_GET_DEVICE_INFO = 0x5202,
|
||||
I2400M_MT_GET_LINK_STATUS = 0x5203,
|
||||
I2400M_MT_GET_STATISTICS = 0x5204,
|
||||
I2400M_MT_GET_STATE = 0x5205,
|
||||
I2400M_MT_GET_MEDIA_STATUS = 0x5206,
|
||||
I2400M_MT_SET_INIT_CONFIG = 0x5404,
|
||||
I2400M_MT_CMD_INIT = 0x5601,
|
||||
I2400M_MT_CMD_TERMINATE = 0x5602,
|
||||
I2400M_MT_CMD_MODE_OF_OP = 0x5603,
|
||||
I2400M_MT_CMD_RESET_DEVICE = 0x5604,
|
||||
I2400M_MT_CMD_MONITOR_CONTROL = 0x5605,
|
||||
I2400M_MT_CMD_ENTER_POWERSAVE = 0x5606,
|
||||
I2400M_MT_GET_TLS_OPERATION_RESULT = 0x6201,
|
||||
I2400M_MT_SET_EAP_SUCCESS = 0x6402,
|
||||
I2400M_MT_SET_EAP_FAIL = 0x6403,
|
||||
I2400M_MT_SET_EAP_KEY = 0x6404,
|
||||
I2400M_MT_CMD_SEND_EAP_RESPONSE = 0x6602,
|
||||
I2400M_MT_REPORT_SCAN_RESULT = 0xc002,
|
||||
I2400M_MT_REPORT_STATE = 0xd002,
|
||||
I2400M_MT_REPORT_POWERSAVE_READY = 0xd005,
|
||||
I2400M_MT_REPORT_EAP_REQUEST = 0xe002,
|
||||
I2400M_MT_REPORT_EAP_RESTART = 0xe003,
|
||||
I2400M_MT_REPORT_ALT_ACCEPT = 0xe004,
|
||||
I2400M_MT_REPORT_KEY_REQUEST = 0xe005,
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
* Message Ack Status codes
|
||||
*
|
||||
* When a message is replied-to, this status is reported.
|
||||
*/
|
||||
enum i2400m_ms {
|
||||
I2400M_MS_DONE_OK = 0,
|
||||
I2400M_MS_DONE_IN_PROGRESS = 1,
|
||||
I2400M_MS_INVALID_OP = 2,
|
||||
I2400M_MS_BAD_STATE = 3,
|
||||
I2400M_MS_ILLEGAL_VALUE = 4,
|
||||
I2400M_MS_MISSING_PARAMS = 5,
|
||||
I2400M_MS_VERSION_ERROR = 6,
|
||||
I2400M_MS_ACCESSIBILITY_ERROR = 7,
|
||||
I2400M_MS_BUSY = 8,
|
||||
I2400M_MS_CORRUPTED_TLV = 9,
|
||||
I2400M_MS_UNINITIALIZED = 10,
|
||||
I2400M_MS_UNKNOWN_ERROR = 11,
|
||||
I2400M_MS_PRODUCTION_ERROR = 12,
|
||||
I2400M_MS_NO_RF = 13,
|
||||
I2400M_MS_NOT_READY_FOR_POWERSAVE = 14,
|
||||
I2400M_MS_THERMAL_CRITICAL = 15,
|
||||
I2400M_MS_MAX
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* i2400m_tlv - enumeration of the different types of TLVs
|
||||
*
|
||||
* TLVs stand for type-length-value and are the header for a payload
|
||||
* composed of almost anything. Each payload has a type assigned
|
||||
* and a length.
|
||||
*/
|
||||
enum i2400m_tlv {
|
||||
I2400M_TLV_L4_MESSAGE_VERSIONS = 129,
|
||||
I2400M_TLV_SYSTEM_STATE = 141,
|
||||
I2400M_TLV_MEDIA_STATUS = 161,
|
||||
I2400M_TLV_RF_OPERATION = 162,
|
||||
I2400M_TLV_RF_STATUS = 163,
|
||||
I2400M_TLV_DEVICE_RESET_TYPE = 132,
|
||||
I2400M_TLV_CONFIG_IDLE_PARAMETERS = 601,
|
||||
I2400M_TLV_CONFIG_IDLE_TIMEOUT = 611,
|
||||
I2400M_TLV_CONFIG_D2H_DATA_FORMAT = 614,
|
||||
I2400M_TLV_CONFIG_DL_HOST_REORDER = 615,
|
||||
};
|
||||
|
||||
|
||||
struct i2400m_tlv_hdr {
|
||||
__le16 type;
|
||||
__le16 length; /* payload's */
|
||||
__u8 pl[0];
|
||||
} __attribute__((packed));
|
||||
|
||||
|
||||
struct i2400m_l3l4_hdr {
|
||||
__le16 type;
|
||||
__le16 length; /* payload's */
|
||||
__le16 version;
|
||||
__le16 resv1;
|
||||
__le16 status;
|
||||
__le16 resv2;
|
||||
struct i2400m_tlv_hdr pl[0];
|
||||
} __attribute__((packed));
|
||||
|
||||
|
||||
/**
|
||||
* i2400m_system_state - different states of the device
|
||||
*/
|
||||
enum i2400m_system_state {
|
||||
I2400M_SS_UNINITIALIZED = 1,
|
||||
I2400M_SS_INIT,
|
||||
I2400M_SS_READY,
|
||||
I2400M_SS_SCAN,
|
||||
I2400M_SS_STANDBY,
|
||||
I2400M_SS_CONNECTING,
|
||||
I2400M_SS_WIMAX_CONNECTED,
|
||||
I2400M_SS_DATA_PATH_CONNECTED,
|
||||
I2400M_SS_IDLE,
|
||||
I2400M_SS_DISCONNECTING,
|
||||
I2400M_SS_OUT_OF_ZONE,
|
||||
I2400M_SS_SLEEPACTIVE,
|
||||
I2400M_SS_PRODUCTION,
|
||||
I2400M_SS_CONFIG,
|
||||
I2400M_SS_RF_OFF,
|
||||
I2400M_SS_RF_SHUTDOWN,
|
||||
I2400M_SS_DEVICE_DISCONNECT,
|
||||
I2400M_SS_MAX,
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* i2400m_tlv_system_state - report on the state of the system
|
||||
*
|
||||
* @state: see enum i2400m_system_state
|
||||
*/
|
||||
struct i2400m_tlv_system_state {
|
||||
struct i2400m_tlv_hdr hdr;
|
||||
__le32 state;
|
||||
} __attribute__((packed));
|
||||
|
||||
|
||||
struct i2400m_tlv_l4_message_versions {
|
||||
struct i2400m_tlv_hdr hdr;
|
||||
__le16 major;
|
||||
__le16 minor;
|
||||
__le16 branch;
|
||||
__le16 reserved;
|
||||
} __attribute__((packed));
|
||||
|
||||
|
||||
struct i2400m_tlv_detailed_device_info {
|
||||
struct i2400m_tlv_hdr hdr;
|
||||
__u8 reserved1[400];
|
||||
__u8 mac_address[ETH_ALEN];
|
||||
__u8 reserved2[2];
|
||||
} __attribute__((packed));
|
||||
|
||||
|
||||
enum i2400m_rf_switch_status {
|
||||
I2400M_RF_SWITCH_ON = 1,
|
||||
I2400M_RF_SWITCH_OFF = 2,
|
||||
};
|
||||
|
||||
struct i2400m_tlv_rf_switches_status {
|
||||
struct i2400m_tlv_hdr hdr;
|
||||
__u8 sw_rf_switch; /* 1 ON, 2 OFF */
|
||||
__u8 hw_rf_switch; /* 1 ON, 2 OFF */
|
||||
__u8 reserved[2];
|
||||
} __attribute__((packed));
|
||||
|
||||
|
||||
enum {
|
||||
i2400m_rf_operation_on = 1,
|
||||
i2400m_rf_operation_off = 2
|
||||
};
|
||||
|
||||
struct i2400m_tlv_rf_operation {
|
||||
struct i2400m_tlv_hdr hdr;
|
||||
__le32 status; /* 1 ON, 2 OFF */
|
||||
} __attribute__((packed));
|
||||
|
||||
|
||||
enum i2400m_tlv_reset_type {
|
||||
I2400M_RESET_TYPE_COLD = 1,
|
||||
I2400M_RESET_TYPE_WARM
|
||||
};
|
||||
|
||||
struct i2400m_tlv_device_reset_type {
|
||||
struct i2400m_tlv_hdr hdr;
|
||||
__le32 reset_type;
|
||||
} __attribute__((packed));
|
||||
|
||||
|
||||
struct i2400m_tlv_config_idle_parameters {
|
||||
struct i2400m_tlv_hdr hdr;
|
||||
__le32 idle_timeout; /* 100 to 300000 ms [5min], 100 increments
|
||||
* 0 disabled */
|
||||
__le32 idle_paging_interval; /* frames */
|
||||
} __attribute__((packed));
|
||||
|
||||
|
||||
enum i2400m_media_status {
|
||||
I2400M_MEDIA_STATUS_LINK_UP = 1,
|
||||
I2400M_MEDIA_STATUS_LINK_DOWN,
|
||||
I2400M_MEDIA_STATUS_LINK_RENEW,
|
||||
};
|
||||
|
||||
struct i2400m_tlv_media_status {
|
||||
struct i2400m_tlv_hdr hdr;
|
||||
__le32 media_status;
|
||||
} __attribute__((packed));
|
||||
|
||||
|
||||
/* New in v1.4 */
|
||||
struct i2400m_tlv_config_idle_timeout {
|
||||
struct i2400m_tlv_hdr hdr;
|
||||
__le32 timeout; /* 100 to 300000 ms [5min], 100 increments
|
||||
* 0 disabled */
|
||||
} __attribute__((packed));
|
||||
|
||||
/* New in v1.4 -- for backward compat, will be removed */
|
||||
struct i2400m_tlv_config_d2h_data_format {
|
||||
struct i2400m_tlv_hdr hdr;
|
||||
__u8 format; /* 0 old format, 1 enhanced */
|
||||
__u8 reserved[3];
|
||||
} __attribute__((packed));
|
||||
|
||||
/* New in v1.4 */
|
||||
struct i2400m_tlv_config_dl_host_reorder {
|
||||
struct i2400m_tlv_hdr hdr;
|
||||
__u8 reorder; /* 0 disabled, 1 enabled */
|
||||
__u8 reserved[3];
|
||||
} __attribute__((packed));
|
||||
|
||||
|
||||
#endif /* #ifndef __LINUX__WIMAX__I2400M_H__ */
|
||||
@@ -232,7 +232,7 @@ enum mlx5_ib_device_query_context_attrs {
|
||||
MLX5_IB_ATTR_QUERY_CONTEXT_RESP_UCTX = (1U << UVERBS_ID_NS_SHIFT),
|
||||
};
|
||||
|
||||
#define MLX5_IB_DW_MATCH_PARAM 0x80
|
||||
#define MLX5_IB_DW_MATCH_PARAM 0x90
|
||||
|
||||
struct mlx5_ib_match_params {
|
||||
__u32 match_params[MLX5_IB_DW_MATCH_PARAM];
|
||||
|
||||
Reference in New Issue
Block a user