You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next
Pull networking updates from David Miller:
1) BPF debugger and asm tool by Daniel Borkmann.
2) Speed up create/bind in AF_PACKET, also from Daniel Borkmann.
3) Correct reciprocal_divide and update users, from Hannes Frederic
Sowa and Daniel Borkmann.
4) Currently we only have a "set" operation for the hw timestamp socket
ioctl, add a "get" operation to match. From Ben Hutchings.
5) Add better trace events for debugging driver datapath problems, also
from Ben Hutchings.
6) Implement auto corking in TCP, from Eric Dumazet. Basically, if we
have a small send and a previous packet is already in the qdisc or
device queue, defer until TX completion or we get more data.
7) Allow userspace to manage ipv6 temporary addresses, from Jiri Pirko.
8) Add a qdisc bypass option for AF_PACKET sockets, from Daniel
Borkmann.
9) Share IP header compression code between Bluetooth and IEEE802154
layers, from Jukka Rissanen.
10) Fix ipv6 router reachability probing, from Jiri Benc.
11) Allow packets to be captured on macvtap devices, from Vlad Yasevich.
12) Support tunneling in GRO layer, from Jerry Chu.
13) Allow bonding to be configured fully using netlink, from Scott
Feldman.
14) Allow AF_PACKET users to obtain the VLAN TPID, just like they can
already get the TCI. From Atzm Watanabe.
15) New "Heavy Hitter" qdisc, from Terry Lam.
16) Significantly improve the IPSEC support in pktgen, from Fan Du.
17) Allow ipv4 tunnels to cache routes, just like sockets. From Tom
Herbert.
18) Add Proportional Integral Enhanced packet scheduler, from Vijay
Subramanian.
19) Allow openvswitch to mmap'd netlink, from Thomas Graf.
20) Key TCP metrics blobs also by source address, not just destination
address. From Christoph Paasch.
21) Support 10G in generic phylib. From Andy Fleming.
22) Try to short-circuit GRO flow compares using device provided RX
hash, if provided. From Tom Herbert.
The wireless and netfilter folks have been busy little bees too.
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next: (2064 commits)
net/cxgb4: Fix referencing freed adapter
ipv6: reallocate addrconf router for ipv6 address when lo device up
fib_frontend: fix possible NULL pointer dereference
rtnetlink: remove IFLA_BOND_SLAVE definition
rtnetlink: remove check for fill_slave_info in rtnl_have_link_slave_info
qlcnic: update version to 5.3.55
qlcnic: Enhance logic to calculate msix vectors.
qlcnic: Refactor interrupt coalescing code for all adapters.
qlcnic: Update poll controller code path
qlcnic: Interrupt code cleanup
qlcnic: Enhance Tx timeout debugging.
qlcnic: Use bool for rx_mac_learn.
bonding: fix u64 division
rtnetlink: add missing IFLA_BOND_AD_INFO_UNSPEC
sfc: Use the correct maximum TX DMA ring size for SFC9100
Add Shradha Shah as the sfc driver maintainer.
net/vxlan: Share RX skb de-marking and checksum checks with ovs
tulip: cleanup by using ARRAY_SIZE()
ip_tunnel: clear IPCB in ip_tunnel_xmit() in case dst_link_failure() is called
net/cxgb4: Don't retrieve stats during recovery
...
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
/* A unified ethernet device probe. This is the easiest way to have every
|
||||
* ethernet adaptor have the name "eth[0123...]".
|
||||
*/
|
||||
|
||||
struct net_device *hp100_probe(int unit);
|
||||
struct net_device *ultra_probe(int unit);
|
||||
struct net_device *wd_probe(int unit);
|
||||
struct net_device *ne_probe(int unit);
|
||||
struct net_device *fmv18x_probe(int unit);
|
||||
struct net_device *i82596_probe(int unit);
|
||||
struct net_device *ni65_probe(int unit);
|
||||
struct net_device *sonic_probe(int unit);
|
||||
struct net_device *smc_init(int unit);
|
||||
struct net_device *atarilance_probe(int unit);
|
||||
struct net_device *sun3lance_probe(int unit);
|
||||
struct net_device *sun3_82586_probe(int unit);
|
||||
struct net_device *apne_probe(int unit);
|
||||
struct net_device *cs89x0_probe(int unit);
|
||||
struct net_device *mvme147lance_probe(int unit);
|
||||
struct net_device *tc515_probe(int unit);
|
||||
struct net_device *lance_probe(int unit);
|
||||
struct net_device *mac8390_probe(int unit);
|
||||
struct net_device *mac89x0_probe(int unit);
|
||||
struct net_device *cops_probe(int unit);
|
||||
struct net_device *ltpc_probe(void);
|
||||
|
||||
/* Fibre Channel adapters */
|
||||
int iph5526_probe(struct net_device *dev);
|
||||
|
||||
/* SBNI adapters */
|
||||
int sbni_probe(int unit);
|
||||
+37
-26
@@ -9,7 +9,7 @@
|
||||
#include <net/pkt_sched.h>
|
||||
|
||||
struct tcf_common {
|
||||
struct tcf_common *tcfc_next;
|
||||
struct hlist_node tcfc_head;
|
||||
u32 tcfc_index;
|
||||
int tcfc_refcnt;
|
||||
int tcfc_bindcnt;
|
||||
@@ -22,7 +22,7 @@ struct tcf_common {
|
||||
spinlock_t tcfc_lock;
|
||||
struct rcu_head tcfc_rcu;
|
||||
};
|
||||
#define tcf_next common.tcfc_next
|
||||
#define tcf_head common.tcfc_head
|
||||
#define tcf_index common.tcfc_index
|
||||
#define tcf_refcnt common.tcfc_refcnt
|
||||
#define tcf_bindcnt common.tcfc_bindcnt
|
||||
@@ -36,9 +36,10 @@ struct tcf_common {
|
||||
#define tcf_rcu common.tcfc_rcu
|
||||
|
||||
struct tcf_hashinfo {
|
||||
struct tcf_common **htab;
|
||||
struct hlist_head *htab;
|
||||
unsigned int hmask;
|
||||
rwlock_t *lock;
|
||||
spinlock_t lock;
|
||||
u32 index;
|
||||
};
|
||||
|
||||
static inline unsigned int tcf_hash(u32 index, unsigned int hmask)
|
||||
@@ -46,33 +47,47 @@ static inline unsigned int tcf_hash(u32 index, unsigned int hmask)
|
||||
return index & hmask;
|
||||
}
|
||||
|
||||
static inline int tcf_hashinfo_init(struct tcf_hashinfo *hf, unsigned int mask)
|
||||
{
|
||||
int i;
|
||||
|
||||
spin_lock_init(&hf->lock);
|
||||
hf->index = 0;
|
||||
hf->hmask = mask;
|
||||
hf->htab = kzalloc((mask + 1) * sizeof(struct hlist_head),
|
||||
GFP_KERNEL);
|
||||
if (!hf->htab)
|
||||
return -ENOMEM;
|
||||
for (i = 0; i < mask + 1; i++)
|
||||
INIT_HLIST_HEAD(&hf->htab[i]);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline void tcf_hashinfo_destroy(struct tcf_hashinfo *hf)
|
||||
{
|
||||
kfree(hf->htab);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_NET_CLS_ACT
|
||||
|
||||
#define ACT_P_CREATED 1
|
||||
#define ACT_P_DELETED 1
|
||||
|
||||
struct tcf_act_hdr {
|
||||
struct tcf_common common;
|
||||
};
|
||||
|
||||
struct tc_action {
|
||||
void *priv;
|
||||
const struct tc_action_ops *ops;
|
||||
__u32 type; /* for backward compat(TCA_OLD_COMPAT) */
|
||||
__u32 order;
|
||||
struct tc_action *next;
|
||||
struct list_head list;
|
||||
};
|
||||
|
||||
#define TCA_CAP_NONE 0
|
||||
struct tc_action_ops {
|
||||
struct tc_action_ops *next;
|
||||
struct list_head head;
|
||||
struct tcf_hashinfo *hinfo;
|
||||
char kind[IFNAMSIZ];
|
||||
__u32 type; /* TBD to match kind */
|
||||
__u32 capab; /* capabilities includes 4 bit version */
|
||||
struct module *owner;
|
||||
int (*act)(struct sk_buff *, const struct tc_action *, struct tcf_result *);
|
||||
int (*get_stats)(struct sk_buff *, struct tc_action *);
|
||||
int (*dump)(struct sk_buff *, struct tc_action *, int, int);
|
||||
int (*cleanup)(struct tc_action *, int bind);
|
||||
int (*lookup)(struct tc_action *, u32);
|
||||
@@ -82,34 +97,30 @@ struct tc_action_ops {
|
||||
int (*walk)(struct sk_buff *, struct netlink_callback *, int, struct tc_action *);
|
||||
};
|
||||
|
||||
struct tcf_common *tcf_hash_lookup(u32 index, struct tcf_hashinfo *hinfo);
|
||||
int tcf_hash_search(struct tc_action *a, u32 index);
|
||||
void tcf_hash_destroy(struct tcf_common *p, struct tcf_hashinfo *hinfo);
|
||||
int tcf_hash_release(struct tcf_common *p, int bind,
|
||||
struct tcf_hashinfo *hinfo);
|
||||
int tcf_generic_walker(struct sk_buff *skb, struct netlink_callback *cb,
|
||||
int type, struct tc_action *a);
|
||||
u32 tcf_hash_new_index(u32 *idx_gen, struct tcf_hashinfo *hinfo);
|
||||
int tcf_hash_search(struct tc_action *a, u32 index);
|
||||
u32 tcf_hash_new_index(struct tcf_hashinfo *hinfo);
|
||||
struct tcf_common *tcf_hash_check(u32 index, struct tc_action *a,
|
||||
int bind, struct tcf_hashinfo *hinfo);
|
||||
int bind);
|
||||
struct tcf_common *tcf_hash_create(u32 index, struct nlattr *est,
|
||||
struct tc_action *a, int size,
|
||||
int bind, u32 *idx_gen,
|
||||
struct tcf_hashinfo *hinfo);
|
||||
int bind);
|
||||
void tcf_hash_insert(struct tcf_common *p, struct tcf_hashinfo *hinfo);
|
||||
|
||||
int tcf_register_action(struct tc_action_ops *a);
|
||||
int tcf_unregister_action(struct tc_action_ops *a);
|
||||
void tcf_action_destroy(struct tc_action *a, int bind);
|
||||
int tcf_action_exec(struct sk_buff *skb, const struct tc_action *a,
|
||||
void tcf_action_destroy(struct list_head *actions, int bind);
|
||||
int tcf_action_exec(struct sk_buff *skb, const struct list_head *actions,
|
||||
struct tcf_result *res);
|
||||
struct tc_action *tcf_action_init(struct net *net, struct nlattr *nla,
|
||||
int tcf_action_init(struct net *net, struct nlattr *nla,
|
||||
struct nlattr *est, char *n, int ovr,
|
||||
int bind);
|
||||
int bind, struct list_head *);
|
||||
struct tc_action *tcf_action_init_1(struct net *net, struct nlattr *nla,
|
||||
struct nlattr *est, char *n, int ovr,
|
||||
int bind);
|
||||
int tcf_action_dump(struct sk_buff *skb, struct tc_action *a, int, int);
|
||||
int tcf_action_dump(struct sk_buff *skb, struct list_head *, int, int);
|
||||
int tcf_action_dump_old(struct sk_buff *skb, struct tc_action *a, int, int);
|
||||
int tcf_action_dump_1(struct sk_buff *skb, struct tc_action *a, int, int);
|
||||
int tcf_action_copy_stats(struct sk_buff *, struct tc_action *, int);
|
||||
|
||||
+12
-4
@@ -81,9 +81,9 @@ int ipv6_dev_get_saddr(struct net *net, const struct net_device *dev,
|
||||
const struct in6_addr *daddr, unsigned int srcprefs,
|
||||
struct in6_addr *saddr);
|
||||
int __ipv6_get_lladdr(struct inet6_dev *idev, struct in6_addr *addr,
|
||||
unsigned char banned_flags);
|
||||
u32 banned_flags);
|
||||
int ipv6_get_lladdr(struct net_device *dev, struct in6_addr *addr,
|
||||
unsigned char banned_flags);
|
||||
u32 banned_flags);
|
||||
int ipv6_rcv_saddr_equal(const struct sock *sk, const struct sock *sk2);
|
||||
void addrconf_join_solict(struct net_device *dev, const struct in6_addr *addr);
|
||||
void addrconf_leave_solict(struct inet6_dev *idev, const struct in6_addr *addr);
|
||||
@@ -205,8 +205,9 @@ void ipv6_sock_ac_close(struct sock *sk);
|
||||
int ipv6_dev_ac_inc(struct net_device *dev, const struct in6_addr *addr);
|
||||
int __ipv6_dev_ac_dec(struct inet6_dev *idev, const struct in6_addr *addr);
|
||||
bool ipv6_chk_acast_addr(struct net *net, struct net_device *dev,
|
||||
const struct in6_addr *addr);
|
||||
|
||||
const struct in6_addr *addr);
|
||||
bool ipv6_chk_acast_addr_src(struct net *net, struct net_device *dev,
|
||||
const struct in6_addr *addr);
|
||||
|
||||
/* Device notifier */
|
||||
int register_inet6addr_notifier(struct notifier_block *nb);
|
||||
@@ -248,6 +249,13 @@ static inline struct inet6_dev *in6_dev_get(const struct net_device *dev)
|
||||
return idev;
|
||||
}
|
||||
|
||||
static inline struct neigh_parms *__in6_dev_nd_parms_get_rcu(const struct net_device *dev)
|
||||
{
|
||||
struct inet6_dev *idev = __in6_dev_get(dev);
|
||||
|
||||
return idev ? idev->nd_parms : NULL;
|
||||
}
|
||||
|
||||
void in6_dev_finish_destroy(struct inet6_dev *idev);
|
||||
|
||||
static inline void in6_dev_put(struct inet6_dev *idev)
|
||||
|
||||
@@ -62,6 +62,5 @@ struct sk_buff *arp_create(int type, int ptype, __be32 dest_ip,
|
||||
const unsigned char *src_hw,
|
||||
const unsigned char *target_hw);
|
||||
void arp_xmit(struct sk_buff *skb);
|
||||
int arp_invalidate(struct net_device *dev, __be32 ip);
|
||||
|
||||
#endif /* _ARP_H */
|
||||
|
||||
@@ -115,6 +115,9 @@ struct bt_voice {
|
||||
#define BT_VOICE_TRANSPARENT 0x0003
|
||||
#define BT_VOICE_CVSD_16BIT 0x0060
|
||||
|
||||
#define BT_SNDMTU 12
|
||||
#define BT_RCVMTU 13
|
||||
|
||||
__printf(1, 2)
|
||||
int bt_info(const char *fmt, ...);
|
||||
__printf(1, 2)
|
||||
|
||||
@@ -83,7 +83,8 @@
|
||||
enum {
|
||||
HCI_QUIRK_RESET_ON_CLOSE,
|
||||
HCI_QUIRK_RAW_DEVICE,
|
||||
HCI_QUIRK_FIXUP_BUFFER_SIZE
|
||||
HCI_QUIRK_FIXUP_BUFFER_SIZE,
|
||||
HCI_QUIRK_BROKEN_STORED_LINK_KEY,
|
||||
};
|
||||
|
||||
/* HCI device flags */
|
||||
@@ -131,6 +132,7 @@ enum {
|
||||
HCI_PERIODIC_INQ,
|
||||
HCI_FAST_CONNECTABLE,
|
||||
HCI_BREDR_ENABLED,
|
||||
HCI_6LOWPAN_ENABLED,
|
||||
};
|
||||
|
||||
/* A mask for the flags that are supposed to remain when a reset happens
|
||||
@@ -275,6 +277,12 @@ enum {
|
||||
#define LMP_EXTFEATURES 0x80
|
||||
|
||||
/* Extended LMP features */
|
||||
#define LMP_CSB_MASTER 0x01
|
||||
#define LMP_CSB_SLAVE 0x02
|
||||
#define LMP_SYNC_TRAIN 0x04
|
||||
#define LMP_SYNC_SCAN 0x08
|
||||
|
||||
/* Host features */
|
||||
#define LMP_HOST_SSP 0x01
|
||||
#define LMP_HOST_LE 0x02
|
||||
#define LMP_HOST_LE_BREDR 0x04
|
||||
|
||||
@@ -448,6 +448,7 @@ enum {
|
||||
HCI_CONN_SSP_ENABLED,
|
||||
HCI_CONN_POWER_SAVE,
|
||||
HCI_CONN_REMOTE_OOB,
|
||||
HCI_CONN_6LOWPAN,
|
||||
};
|
||||
|
||||
static inline bool hci_conn_ssp_enabled(struct hci_conn *conn)
|
||||
@@ -798,6 +799,12 @@ void hci_conn_del_sysfs(struct hci_conn *conn);
|
||||
#define lmp_transp_capable(dev) ((dev)->features[0][2] & LMP_TRANSPARENT)
|
||||
|
||||
/* ----- Extended LMP capabilities ----- */
|
||||
#define lmp_csb_master_capable(dev) ((dev)->features[2][0] & LMP_CSB_MASTER)
|
||||
#define lmp_csb_slave_capable(dev) ((dev)->features[2][0] & LMP_CSB_SLAVE)
|
||||
#define lmp_sync_train_capable(dev) ((dev)->features[2][0] & LMP_SYNC_TRAIN)
|
||||
#define lmp_sync_scan_capable(dev) ((dev)->features[2][0] & LMP_SYNC_SCAN)
|
||||
|
||||
/* ----- Host capabilities ----- */
|
||||
#define lmp_host_ssp_capable(dev) ((dev)->features[1][0] & LMP_HOST_SSP)
|
||||
#define lmp_host_le_capable(dev) (!!((dev)->features[1][0] & LMP_HOST_LE))
|
||||
#define lmp_host_le_br_capable(dev) (!!((dev)->features[1][0] & LMP_HOST_LE_BREDR))
|
||||
|
||||
@@ -112,6 +112,9 @@ struct l2cap_conninfo {
|
||||
#define L2CAP_MOVE_CHAN_CFM_RSP 0x11
|
||||
#define L2CAP_CONN_PARAM_UPDATE_REQ 0x12
|
||||
#define L2CAP_CONN_PARAM_UPDATE_RSP 0x13
|
||||
#define L2CAP_LE_CONN_REQ 0x14
|
||||
#define L2CAP_LE_CONN_RSP 0x15
|
||||
#define L2CAP_LE_CREDITS 0x16
|
||||
|
||||
/* L2CAP extended feature mask */
|
||||
#define L2CAP_FEAT_FLOWCTL 0x00000001
|
||||
@@ -133,6 +136,7 @@ struct l2cap_conninfo {
|
||||
#define L2CAP_FC_L2CAP 0x02
|
||||
#define L2CAP_FC_CONNLESS 0x04
|
||||
#define L2CAP_FC_A2MP 0x08
|
||||
#define L2CAP_FC_6LOWPAN 0x3e /* reserved and temporary value */
|
||||
|
||||
/* L2CAP Control Field bit masks */
|
||||
#define L2CAP_CTRL_SAR 0xC000
|
||||
@@ -249,6 +253,7 @@ struct l2cap_conn_rsp {
|
||||
#define L2CAP_CID_SMP 0x0006
|
||||
#define L2CAP_CID_DYN_START 0x0040
|
||||
#define L2CAP_CID_DYN_END 0xffff
|
||||
#define L2CAP_CID_LE_DYN_END 0x007f
|
||||
|
||||
/* connect/create channel results */
|
||||
#define L2CAP_CR_SUCCESS 0x0000
|
||||
@@ -257,6 +262,10 @@ struct l2cap_conn_rsp {
|
||||
#define L2CAP_CR_SEC_BLOCK 0x0003
|
||||
#define L2CAP_CR_NO_MEM 0x0004
|
||||
#define L2CAP_CR_BAD_AMP 0x0005
|
||||
#define L2CAP_CR_AUTHENTICATION 0x0005
|
||||
#define L2CAP_CR_AUTHORIZATION 0x0006
|
||||
#define L2CAP_CR_BAD_KEY_SIZE 0x0007
|
||||
#define L2CAP_CR_ENCRYPTION 0x0008
|
||||
|
||||
/* connect/create channel status */
|
||||
#define L2CAP_CS_NO_INFO 0x0000
|
||||
@@ -321,6 +330,12 @@ struct l2cap_conf_rfc {
|
||||
#define L2CAP_MODE_ERTM 0x03
|
||||
#define L2CAP_MODE_STREAMING 0x04
|
||||
|
||||
/* Unlike the above this one doesn't actually map to anything that would
|
||||
* ever be sent over the air. Therefore, use a value that's unlikely to
|
||||
* ever be used in the BR/EDR configuration phase.
|
||||
*/
|
||||
#define L2CAP_MODE_LE_FLOWCTL 0x80
|
||||
|
||||
struct l2cap_conf_efs {
|
||||
__u8 id;
|
||||
__u8 stype;
|
||||
@@ -423,6 +438,30 @@ struct l2cap_conn_param_update_rsp {
|
||||
#define L2CAP_CONN_PARAM_ACCEPTED 0x0000
|
||||
#define L2CAP_CONN_PARAM_REJECTED 0x0001
|
||||
|
||||
#define L2CAP_LE_MAX_CREDITS 10
|
||||
#define L2CAP_LE_DEFAULT_MPS 230
|
||||
|
||||
struct l2cap_le_conn_req {
|
||||
__le16 psm;
|
||||
__le16 scid;
|
||||
__le16 mtu;
|
||||
__le16 mps;
|
||||
__le16 credits;
|
||||
} __packed;
|
||||
|
||||
struct l2cap_le_conn_rsp {
|
||||
__le16 dcid;
|
||||
__le16 mtu;
|
||||
__le16 mps;
|
||||
__le16 credits;
|
||||
__le16 result;
|
||||
} __packed;
|
||||
|
||||
struct l2cap_le_credits {
|
||||
__le16 cid;
|
||||
__le16 credits;
|
||||
} __packed;
|
||||
|
||||
/* ----- L2CAP channels and connections ----- */
|
||||
struct l2cap_seq_list {
|
||||
__u16 head;
|
||||
@@ -477,6 +516,9 @@ struct l2cap_chan {
|
||||
__u16 monitor_timeout;
|
||||
__u16 mps;
|
||||
|
||||
__u16 tx_credits;
|
||||
__u16 rx_credits;
|
||||
|
||||
__u8 tx_state;
|
||||
__u8 rx_state;
|
||||
|
||||
@@ -553,6 +595,7 @@ struct l2cap_ops {
|
||||
void (*ready) (struct l2cap_chan *chan);
|
||||
void (*defer) (struct l2cap_chan *chan);
|
||||
void (*resume) (struct l2cap_chan *chan);
|
||||
void (*suspend) (struct l2cap_chan *chan);
|
||||
void (*set_shutdown) (struct l2cap_chan *chan);
|
||||
long (*get_sndtimeo) (struct l2cap_chan *chan);
|
||||
struct sk_buff *(*alloc_skb) (struct l2cap_chan *chan,
|
||||
@@ -654,6 +697,7 @@ enum {
|
||||
FLAG_EXT_CTRL,
|
||||
FLAG_EFS_ENABLE,
|
||||
FLAG_DEFER_SETUP,
|
||||
FLAG_LE_CONN_REQ_SENT,
|
||||
};
|
||||
|
||||
enum {
|
||||
@@ -809,11 +853,13 @@ static inline long l2cap_chan_no_get_sndtimeo(struct l2cap_chan *chan)
|
||||
}
|
||||
|
||||
extern bool disable_ertm;
|
||||
extern bool enable_lecoc;
|
||||
|
||||
int l2cap_init_sockets(void);
|
||||
void l2cap_cleanup_sockets(void);
|
||||
bool l2cap_is_socket(struct socket *sock);
|
||||
|
||||
void __l2cap_le_connect_rsp_defer(struct l2cap_chan *chan);
|
||||
void __l2cap_connect_rsp_defer(struct l2cap_chan *chan);
|
||||
|
||||
int l2cap_add_psm(struct l2cap_chan *chan, bdaddr_t *src, __le16 psm);
|
||||
|
||||
+281
-42
@@ -91,9 +91,8 @@ enum ieee80211_band {
|
||||
* Channel flags set by the regulatory control code.
|
||||
*
|
||||
* @IEEE80211_CHAN_DISABLED: This channel is disabled.
|
||||
* @IEEE80211_CHAN_PASSIVE_SCAN: Only passive scanning is permitted
|
||||
* on this channel.
|
||||
* @IEEE80211_CHAN_NO_IBSS: IBSS is not allowed on this channel.
|
||||
* @IEEE80211_CHAN_NO_IR: do not initiate radiation, this includes
|
||||
* sending probe requests or beaconing.
|
||||
* @IEEE80211_CHAN_RADAR: Radar detection is required on this channel.
|
||||
* @IEEE80211_CHAN_NO_HT40PLUS: extension channel above this channel
|
||||
* is not permitted.
|
||||
@@ -113,8 +112,8 @@ enum ieee80211_band {
|
||||
*/
|
||||
enum ieee80211_channel_flags {
|
||||
IEEE80211_CHAN_DISABLED = 1<<0,
|
||||
IEEE80211_CHAN_PASSIVE_SCAN = 1<<1,
|
||||
IEEE80211_CHAN_NO_IBSS = 1<<2,
|
||||
IEEE80211_CHAN_NO_IR = 1<<1,
|
||||
/* hole at 1<<2 */
|
||||
IEEE80211_CHAN_RADAR = 1<<3,
|
||||
IEEE80211_CHAN_NO_HT40PLUS = 1<<4,
|
||||
IEEE80211_CHAN_NO_HT40MINUS = 1<<5,
|
||||
@@ -748,6 +747,8 @@ enum station_parameters_apply_mask {
|
||||
* @supported_channels_len: number of supported channels
|
||||
* @supported_oper_classes: supported oper classes in IEEE 802.11 format
|
||||
* @supported_oper_classes_len: number of supported operating classes
|
||||
* @opmode_notif: operating mode field from Operating Mode Notification
|
||||
* @opmode_notif_used: information if operating mode field is used
|
||||
*/
|
||||
struct station_parameters {
|
||||
const u8 *supported_rates;
|
||||
@@ -771,6 +772,8 @@ struct station_parameters {
|
||||
u8 supported_channels_len;
|
||||
const u8 *supported_oper_classes;
|
||||
u8 supported_oper_classes_len;
|
||||
u8 opmode_notif;
|
||||
bool opmode_notif_used;
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -1763,7 +1766,8 @@ enum wiphy_params_flags {
|
||||
struct cfg80211_bitrate_mask {
|
||||
struct {
|
||||
u32 legacy;
|
||||
u8 mcs[IEEE80211_HT_MCS_MASK_LEN];
|
||||
u8 ht_mcs[IEEE80211_HT_MCS_MASK_LEN];
|
||||
u16 vht_mcs[NL80211_VHT_NSS_MAX];
|
||||
} control[IEEE80211_NUM_BANDS];
|
||||
};
|
||||
/**
|
||||
@@ -1944,6 +1948,73 @@ struct cfg80211_update_ft_ies_params {
|
||||
size_t ie_len;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct cfg80211_mgmt_tx_params - mgmt tx parameters
|
||||
*
|
||||
* This structure provides information needed to transmit a mgmt frame
|
||||
*
|
||||
* @chan: channel to use
|
||||
* @offchan: indicates wether off channel operation is required
|
||||
* @wait: duration for ROC
|
||||
* @buf: buffer to transmit
|
||||
* @len: buffer length
|
||||
* @no_cck: don't use cck rates for this frame
|
||||
* @dont_wait_for_ack: tells the low level not to wait for an ack
|
||||
*/
|
||||
struct cfg80211_mgmt_tx_params {
|
||||
struct ieee80211_channel *chan;
|
||||
bool offchan;
|
||||
unsigned int wait;
|
||||
const u8 *buf;
|
||||
size_t len;
|
||||
bool no_cck;
|
||||
bool dont_wait_for_ack;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct cfg80211_dscp_exception - DSCP exception
|
||||
*
|
||||
* @dscp: DSCP value that does not adhere to the user priority range definition
|
||||
* @up: user priority value to which the corresponding DSCP value belongs
|
||||
*/
|
||||
struct cfg80211_dscp_exception {
|
||||
u8 dscp;
|
||||
u8 up;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct cfg80211_dscp_range - DSCP range definition for user priority
|
||||
*
|
||||
* @low: lowest DSCP value of this user priority range, inclusive
|
||||
* @high: highest DSCP value of this user priority range, inclusive
|
||||
*/
|
||||
struct cfg80211_dscp_range {
|
||||
u8 low;
|
||||
u8 high;
|
||||
};
|
||||
|
||||
/* QoS Map Set element length defined in IEEE Std 802.11-2012, 8.4.2.97 */
|
||||
#define IEEE80211_QOS_MAP_MAX_EX 21
|
||||
#define IEEE80211_QOS_MAP_LEN_MIN 16
|
||||
#define IEEE80211_QOS_MAP_LEN_MAX \
|
||||
(IEEE80211_QOS_MAP_LEN_MIN + 2 * IEEE80211_QOS_MAP_MAX_EX)
|
||||
|
||||
/**
|
||||
* struct cfg80211_qos_map - QoS Map Information
|
||||
*
|
||||
* This struct defines the Interworking QoS map setting for DSCP values
|
||||
*
|
||||
* @num_des: number of DSCP exceptions (0..21)
|
||||
* @dscp_exception: optionally up to maximum of 21 DSCP exceptions from
|
||||
* the user priority DSCP range definition
|
||||
* @up: DSCP range definition for a particular user priority
|
||||
*/
|
||||
struct cfg80211_qos_map {
|
||||
u8 num_des;
|
||||
struct cfg80211_dscp_exception dscp_exception[IEEE80211_QOS_MAP_MAX_EX];
|
||||
struct cfg80211_dscp_range up[8];
|
||||
};
|
||||
|
||||
/**
|
||||
* struct cfg80211_ops - backend description for wireless configuration
|
||||
*
|
||||
@@ -2186,6 +2257,8 @@ struct cfg80211_update_ft_ies_params {
|
||||
* @set_coalesce: Set coalesce parameters.
|
||||
*
|
||||
* @channel_switch: initiate channel-switch procedure (with CSA)
|
||||
*
|
||||
* @set_qos_map: Set QoS mapping information to the driver
|
||||
*/
|
||||
struct cfg80211_ops {
|
||||
int (*suspend)(struct wiphy *wiphy, struct cfg80211_wowlan *wow);
|
||||
@@ -2342,9 +2415,8 @@ struct cfg80211_ops {
|
||||
u64 cookie);
|
||||
|
||||
int (*mgmt_tx)(struct wiphy *wiphy, struct wireless_dev *wdev,
|
||||
struct ieee80211_channel *chan, bool offchan,
|
||||
unsigned int wait, const u8 *buf, size_t len,
|
||||
bool no_cck, bool dont_wait_for_ack, u64 *cookie);
|
||||
struct cfg80211_mgmt_tx_params *params,
|
||||
u64 *cookie);
|
||||
int (*mgmt_tx_cancel_wait)(struct wiphy *wiphy,
|
||||
struct wireless_dev *wdev,
|
||||
u64 cookie);
|
||||
@@ -2428,6 +2500,9 @@ struct cfg80211_ops {
|
||||
int (*channel_switch)(struct wiphy *wiphy,
|
||||
struct net_device *dev,
|
||||
struct cfg80211_csa_settings *params);
|
||||
int (*set_qos_map)(struct wiphy *wiphy,
|
||||
struct net_device *dev,
|
||||
struct cfg80211_qos_map *qos_map);
|
||||
};
|
||||
|
||||
/*
|
||||
@@ -2438,27 +2513,6 @@ struct cfg80211_ops {
|
||||
/**
|
||||
* enum wiphy_flags - wiphy capability flags
|
||||
*
|
||||
* @WIPHY_FLAG_CUSTOM_REGULATORY: tells us the driver for this device
|
||||
* has its own custom regulatory domain and cannot identify the
|
||||
* ISO / IEC 3166 alpha2 it belongs to. When this is enabled
|
||||
* we will disregard the first regulatory hint (when the
|
||||
* initiator is %REGDOM_SET_BY_CORE).
|
||||
* @WIPHY_FLAG_STRICT_REGULATORY: tells us the driver for this device will
|
||||
* ignore regulatory domain settings until it gets its own regulatory
|
||||
* domain via its regulatory_hint() unless the regulatory hint is
|
||||
* from a country IE. After its gets its own regulatory domain it will
|
||||
* only allow further regulatory domain settings to further enhance
|
||||
* compliance. For example if channel 13 and 14 are disabled by this
|
||||
* regulatory domain no user regulatory domain can enable these channels
|
||||
* at a later time. This can be used for devices which do not have
|
||||
* calibration information guaranteed for frequencies or settings
|
||||
* outside of its regulatory domain. If used in combination with
|
||||
* WIPHY_FLAG_CUSTOM_REGULATORY the inspected country IE power settings
|
||||
* will be followed.
|
||||
* @WIPHY_FLAG_DISABLE_BEACON_HINTS: enable this if your driver needs to ensure
|
||||
* that passive scan flags and beaconing flags may not be lifted by
|
||||
* cfg80211 due to regulatory beacon hints. For more information on beacon
|
||||
* hints read the documenation for regulatory_hint_found_beacon()
|
||||
* @WIPHY_FLAG_NETNS_OK: if not set, do not allow changing the netns of this
|
||||
* wiphy at all
|
||||
* @WIPHY_FLAG_PS_ON_BY_DEFAULT: if set to true, powersave will be enabled
|
||||
@@ -2497,9 +2551,9 @@ struct cfg80211_ops {
|
||||
* beaconing mode (AP, IBSS, Mesh, ...).
|
||||
*/
|
||||
enum wiphy_flags {
|
||||
WIPHY_FLAG_CUSTOM_REGULATORY = BIT(0),
|
||||
WIPHY_FLAG_STRICT_REGULATORY = BIT(1),
|
||||
WIPHY_FLAG_DISABLE_BEACON_HINTS = BIT(2),
|
||||
/* use hole at 0 */
|
||||
/* use hole at 1 */
|
||||
/* use hole at 2 */
|
||||
WIPHY_FLAG_NETNS_OK = BIT(3),
|
||||
WIPHY_FLAG_PS_ON_BY_DEFAULT = BIT(4),
|
||||
WIPHY_FLAG_4ADDR_AP = BIT(5),
|
||||
@@ -2675,6 +2729,34 @@ struct wiphy_coalesce_support {
|
||||
int max_pkt_offset;
|
||||
};
|
||||
|
||||
/**
|
||||
* enum wiphy_vendor_command_flags - validation flags for vendor commands
|
||||
* @WIPHY_VENDOR_CMD_NEED_WDEV: vendor command requires wdev
|
||||
* @WIPHY_VENDOR_CMD_NEED_NETDEV: vendor command requires netdev
|
||||
* @WIPHY_VENDOR_CMD_NEED_RUNNING: interface/wdev must be up & running
|
||||
* (must be combined with %_WDEV or %_NETDEV)
|
||||
*/
|
||||
enum wiphy_vendor_command_flags {
|
||||
WIPHY_VENDOR_CMD_NEED_WDEV = BIT(0),
|
||||
WIPHY_VENDOR_CMD_NEED_NETDEV = BIT(1),
|
||||
WIPHY_VENDOR_CMD_NEED_RUNNING = BIT(2),
|
||||
};
|
||||
|
||||
/**
|
||||
* struct wiphy_vendor_command - vendor command definition
|
||||
* @info: vendor command identifying information, as used in nl80211
|
||||
* @flags: flags, see &enum wiphy_vendor_command_flags
|
||||
* @doit: callback for the operation, note that wdev is %NULL if the
|
||||
* flags didn't ask for a wdev and non-%NULL otherwise; the data
|
||||
* pointer may be %NULL if userspace provided no data at all
|
||||
*/
|
||||
struct wiphy_vendor_command {
|
||||
struct nl80211_vendor_cmd_info info;
|
||||
u32 flags;
|
||||
int (*doit)(struct wiphy *wiphy, struct wireless_dev *wdev,
|
||||
const void *data, int data_len);
|
||||
};
|
||||
|
||||
/**
|
||||
* struct wiphy - wireless hardware description
|
||||
* @reg_notifier: the driver's regulatory notification callback,
|
||||
@@ -2721,6 +2803,8 @@ struct wiphy_coalesce_support {
|
||||
* @software_iftypes: bitmask of software interface types, these are not
|
||||
* subject to any restrictions since they are purely managed in SW.
|
||||
* @flags: wiphy flags, see &enum wiphy_flags
|
||||
* @regulatory_flags: wiphy regulatory flags, see
|
||||
* &enum ieee80211_regulatory_flags
|
||||
* @features: features advertised to nl80211, see &enum nl80211_feature_flags.
|
||||
* @bss_priv_size: each BSS struct has private data allocated with it,
|
||||
* this variable determines its size
|
||||
@@ -2786,6 +2870,11 @@ struct wiphy_coalesce_support {
|
||||
* @extended_capabilities_mask: mask of the valid values
|
||||
* @extended_capabilities_len: length of the extended capabilities
|
||||
* @coalesce: packet coalescing support information
|
||||
*
|
||||
* @vendor_commands: array of vendor commands supported by the hardware
|
||||
* @n_vendor_commands: number of vendor commands
|
||||
* @vendor_events: array of vendor events supported by the hardware
|
||||
* @n_vendor_events: number of vendor events
|
||||
*/
|
||||
struct wiphy {
|
||||
/* assign these fields before you register the wiphy */
|
||||
@@ -2809,7 +2898,7 @@ struct wiphy {
|
||||
|
||||
u16 max_acl_mac_addrs;
|
||||
|
||||
u32 flags, features;
|
||||
u32 flags, regulatory_flags, features;
|
||||
|
||||
u32 ap_sme_capa;
|
||||
|
||||
@@ -2897,6 +2986,10 @@ struct wiphy {
|
||||
|
||||
const struct wiphy_coalesce_support *coalesce;
|
||||
|
||||
const struct wiphy_vendor_command *vendor_commands;
|
||||
const struct nl80211_vendor_cmd_info *vendor_events;
|
||||
int n_vendor_commands, n_vendor_events;
|
||||
|
||||
char priv[0] __aligned(NETDEV_ALIGN);
|
||||
};
|
||||
|
||||
@@ -3388,9 +3481,11 @@ void ieee80211_amsdu_to_8023s(struct sk_buff *skb, struct sk_buff_head *list,
|
||||
/**
|
||||
* cfg80211_classify8021d - determine the 802.1p/1d tag for a data frame
|
||||
* @skb: the data frame
|
||||
* @qos_map: Interworking QoS mapping or %NULL if not in use
|
||||
* Return: The 802.1p/1d tag.
|
||||
*/
|
||||
unsigned int cfg80211_classify8021d(struct sk_buff *skb);
|
||||
unsigned int cfg80211_classify8021d(struct sk_buff *skb,
|
||||
struct cfg80211_qos_map *qos_map);
|
||||
|
||||
/**
|
||||
* cfg80211_find_ie - find information element in data
|
||||
@@ -3472,6 +3567,9 @@ int regulatory_hint(struct wiphy *wiphy, const char *alpha2);
|
||||
* custom regulatory domain will be trusted completely and as such previous
|
||||
* default channel settings will be disregarded. If no rule is found for a
|
||||
* channel on the regulatory domain the channel will be disabled.
|
||||
* Drivers using this for a wiphy should also set the wiphy flag
|
||||
* WIPHY_FLAG_CUSTOM_REGULATORY or cfg80211 will set it for the wiphy
|
||||
* that called this helper.
|
||||
*/
|
||||
void wiphy_apply_custom_regulatory(struct wiphy *wiphy,
|
||||
const struct ieee80211_regdomain *regd);
|
||||
@@ -3838,6 +3936,121 @@ void wiphy_rfkill_start_polling(struct wiphy *wiphy);
|
||||
*/
|
||||
void wiphy_rfkill_stop_polling(struct wiphy *wiphy);
|
||||
|
||||
/**
|
||||
* DOC: Vendor commands
|
||||
*
|
||||
* Occasionally, there are special protocol or firmware features that
|
||||
* can't be implemented very openly. For this and similar cases, the
|
||||
* vendor command functionality allows implementing the features with
|
||||
* (typically closed-source) userspace and firmware, using nl80211 as
|
||||
* the configuration mechanism.
|
||||
*
|
||||
* A driver supporting vendor commands must register them as an array
|
||||
* in struct wiphy, with handlers for each one, each command has an
|
||||
* OUI and sub command ID to identify it.
|
||||
*
|
||||
* Note that this feature should not be (ab)used to implement protocol
|
||||
* features that could openly be shared across drivers. In particular,
|
||||
* it must never be required to use vendor commands to implement any
|
||||
* "normal" functionality that higher-level userspace like connection
|
||||
* managers etc. need.
|
||||
*/
|
||||
|
||||
struct sk_buff *__cfg80211_alloc_reply_skb(struct wiphy *wiphy,
|
||||
enum nl80211_commands cmd,
|
||||
enum nl80211_attrs attr,
|
||||
int approxlen);
|
||||
|
||||
struct sk_buff *__cfg80211_alloc_event_skb(struct wiphy *wiphy,
|
||||
enum nl80211_commands cmd,
|
||||
enum nl80211_attrs attr,
|
||||
int vendor_event_idx,
|
||||
int approxlen, gfp_t gfp);
|
||||
|
||||
void __cfg80211_send_event_skb(struct sk_buff *skb, gfp_t gfp);
|
||||
|
||||
/**
|
||||
* cfg80211_vendor_cmd_alloc_reply_skb - allocate vendor command reply
|
||||
* @wiphy: the wiphy
|
||||
* @approxlen: an upper bound of the length of the data that will
|
||||
* be put into the skb
|
||||
*
|
||||
* This function allocates and pre-fills an skb for a reply to
|
||||
* a vendor command. Since it is intended for a reply, calling
|
||||
* it outside of a vendor command's doit() operation is invalid.
|
||||
*
|
||||
* The returned skb is pre-filled with some identifying data in
|
||||
* a way that any data that is put into the skb (with skb_put(),
|
||||
* nla_put() or similar) will end up being within the
|
||||
* %NL80211_ATTR_VENDOR_DATA attribute, so all that needs to be done
|
||||
* with the skb is adding data for the corresponding userspace tool
|
||||
* which can then read that data out of the vendor data attribute.
|
||||
* You must not modify the skb in any other way.
|
||||
*
|
||||
* When done, call cfg80211_vendor_cmd_reply() with the skb and return
|
||||
* its error code as the result of the doit() operation.
|
||||
*
|
||||
* Return: An allocated and pre-filled skb. %NULL if any errors happen.
|
||||
*/
|
||||
static inline struct sk_buff *
|
||||
cfg80211_vendor_cmd_alloc_reply_skb(struct wiphy *wiphy, int approxlen)
|
||||
{
|
||||
return __cfg80211_alloc_reply_skb(wiphy, NL80211_CMD_VENDOR,
|
||||
NL80211_ATTR_VENDOR_DATA, approxlen);
|
||||
}
|
||||
|
||||
/**
|
||||
* cfg80211_vendor_cmd_reply - send the reply skb
|
||||
* @skb: The skb, must have been allocated with
|
||||
* cfg80211_vendor_cmd_alloc_reply_skb()
|
||||
*
|
||||
* Since calling this function will usually be the last thing
|
||||
* before returning from the vendor command doit() you should
|
||||
* return the error code. Note that this function consumes the
|
||||
* skb regardless of the return value.
|
||||
*
|
||||
* Return: An error code or 0 on success.
|
||||
*/
|
||||
int cfg80211_vendor_cmd_reply(struct sk_buff *skb);
|
||||
|
||||
/**
|
||||
* cfg80211_vendor_event_alloc - allocate vendor-specific event skb
|
||||
* @wiphy: the wiphy
|
||||
* @event_idx: index of the vendor event in the wiphy's vendor_events
|
||||
* @approxlen: an upper bound of the length of the data that will
|
||||
* be put into the skb
|
||||
* @gfp: allocation flags
|
||||
*
|
||||
* This function allocates and pre-fills an skb for an event on the
|
||||
* vendor-specific multicast group.
|
||||
*
|
||||
* When done filling the skb, call cfg80211_vendor_event() with the
|
||||
* skb to send the event.
|
||||
*
|
||||
* Return: An allocated and pre-filled skb. %NULL if any errors happen.
|
||||
*/
|
||||
static inline struct sk_buff *
|
||||
cfg80211_vendor_event_alloc(struct wiphy *wiphy, int approxlen,
|
||||
int event_idx, gfp_t gfp)
|
||||
{
|
||||
return __cfg80211_alloc_event_skb(wiphy, NL80211_CMD_VENDOR,
|
||||
NL80211_ATTR_VENDOR_DATA,
|
||||
event_idx, approxlen, gfp);
|
||||
}
|
||||
|
||||
/**
|
||||
* cfg80211_vendor_event - send the event
|
||||
* @skb: The skb, must have been allocated with cfg80211_vendor_event_alloc()
|
||||
* @gfp: allocation flags
|
||||
*
|
||||
* This function sends the given @skb, which must have been allocated
|
||||
* by cfg80211_vendor_event_alloc(), as an event. It always consumes it.
|
||||
*/
|
||||
static inline void cfg80211_vendor_event(struct sk_buff *skb, gfp_t gfp)
|
||||
{
|
||||
__cfg80211_send_event_skb(skb, gfp);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_NL80211_TESTMODE
|
||||
/**
|
||||
* DOC: Test mode
|
||||
@@ -3873,8 +4086,12 @@ void wiphy_rfkill_stop_polling(struct wiphy *wiphy);
|
||||
*
|
||||
* Return: An allocated and pre-filled skb. %NULL if any errors happen.
|
||||
*/
|
||||
struct sk_buff *cfg80211_testmode_alloc_reply_skb(struct wiphy *wiphy,
|
||||
int approxlen);
|
||||
static inline struct sk_buff *
|
||||
cfg80211_testmode_alloc_reply_skb(struct wiphy *wiphy, int approxlen)
|
||||
{
|
||||
return __cfg80211_alloc_reply_skb(wiphy, NL80211_CMD_TESTMODE,
|
||||
NL80211_ATTR_TESTDATA, approxlen);
|
||||
}
|
||||
|
||||
/**
|
||||
* cfg80211_testmode_reply - send the reply skb
|
||||
@@ -3888,7 +4105,10 @@ struct sk_buff *cfg80211_testmode_alloc_reply_skb(struct wiphy *wiphy,
|
||||
*
|
||||
* Return: An error code or 0 on success.
|
||||
*/
|
||||
int cfg80211_testmode_reply(struct sk_buff *skb);
|
||||
static inline int cfg80211_testmode_reply(struct sk_buff *skb)
|
||||
{
|
||||
return cfg80211_vendor_cmd_reply(skb);
|
||||
}
|
||||
|
||||
/**
|
||||
* cfg80211_testmode_alloc_event_skb - allocate testmode event
|
||||
@@ -3911,8 +4131,13 @@ int cfg80211_testmode_reply(struct sk_buff *skb);
|
||||
*
|
||||
* Return: An allocated and pre-filled skb. %NULL if any errors happen.
|
||||
*/
|
||||
struct sk_buff *cfg80211_testmode_alloc_event_skb(struct wiphy *wiphy,
|
||||
int approxlen, gfp_t gfp);
|
||||
static inline struct sk_buff *
|
||||
cfg80211_testmode_alloc_event_skb(struct wiphy *wiphy, int approxlen, gfp_t gfp)
|
||||
{
|
||||
return __cfg80211_alloc_event_skb(wiphy, NL80211_CMD_TESTMODE,
|
||||
NL80211_ATTR_TESTDATA, -1,
|
||||
approxlen, gfp);
|
||||
}
|
||||
|
||||
/**
|
||||
* cfg80211_testmode_event - send the event
|
||||
@@ -3924,7 +4149,10 @@ struct sk_buff *cfg80211_testmode_alloc_event_skb(struct wiphy *wiphy,
|
||||
* by cfg80211_testmode_alloc_event_skb(), as an event. It always
|
||||
* consumes it.
|
||||
*/
|
||||
void cfg80211_testmode_event(struct sk_buff *skb, gfp_t gfp);
|
||||
static inline void cfg80211_testmode_event(struct sk_buff *skb, gfp_t gfp)
|
||||
{
|
||||
__cfg80211_send_event_skb(skb, gfp);
|
||||
}
|
||||
|
||||
#define CFG80211_TESTMODE_CMD(cmd) .testmode_cmd = (cmd),
|
||||
#define CFG80211_TESTMODE_DUMP(cmd) .testmode_dump = (cmd),
|
||||
@@ -4146,6 +4374,7 @@ void cfg80211_radar_event(struct wiphy *wiphy,
|
||||
/**
|
||||
* cfg80211_cac_event - Channel availability check (CAC) event
|
||||
* @netdev: network device
|
||||
* @chandef: chandef for the current channel
|
||||
* @event: type of event
|
||||
* @gfp: context flags
|
||||
*
|
||||
@@ -4154,6 +4383,7 @@ void cfg80211_radar_event(struct wiphy *wiphy,
|
||||
* also by full-MAC drivers.
|
||||
*/
|
||||
void cfg80211_cac_event(struct net_device *netdev,
|
||||
const struct cfg80211_chan_def *chandef,
|
||||
enum nl80211_radar_event event, gfp_t gfp);
|
||||
|
||||
|
||||
@@ -4279,7 +4509,8 @@ bool cfg80211_reg_can_beacon(struct wiphy *wiphy,
|
||||
* @dev: the device which switched channels
|
||||
* @chandef: the new channel definition
|
||||
*
|
||||
* Acquires wdev_lock, so must only be called from sleepable driver context!
|
||||
* Caller must acquire wdev_lock, therefore must only be called from sleepable
|
||||
* driver context!
|
||||
*/
|
||||
void cfg80211_ch_switch_notify(struct net_device *dev,
|
||||
struct cfg80211_chan_def *chandef);
|
||||
@@ -4409,6 +4640,14 @@ void cfg80211_report_wowlan_wakeup(struct wireless_dev *wdev,
|
||||
*/
|
||||
void cfg80211_crit_proto_stopped(struct wireless_dev *wdev, gfp_t gfp);
|
||||
|
||||
/**
|
||||
* ieee80211_get_num_supported_channels - get number of channels device has
|
||||
* @wiphy: the wiphy
|
||||
*
|
||||
* Return: the number of channels supported by the device.
|
||||
*/
|
||||
unsigned int ieee80211_get_num_supported_channels(struct wiphy *wiphy);
|
||||
|
||||
/* Logging, debugging and troubleshooting/diagnostic helpers. */
|
||||
|
||||
/* wiphy_printk helpers, similar to dev_printk */
|
||||
|
||||
@@ -26,8 +26,7 @@
|
||||
* the GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
@@ -304,7 +303,7 @@ static inline int cipso_v4_validate(const struct sk_buff *skb,
|
||||
|
||||
for (opt_iter = 6; opt_iter < opt_len;) {
|
||||
tag_len = opt[opt_iter + 1];
|
||||
if ((tag_len == 0) || (opt[opt_iter + 1] > (opt_len - opt_iter))) {
|
||||
if ((tag_len == 0) || (tag_len > (opt_len - opt_iter))) {
|
||||
err_offset = opt_iter + 1;
|
||||
goto out;
|
||||
}
|
||||
|
||||
+12
-28
@@ -16,17 +16,16 @@
|
||||
#include <linux/cgroup.h>
|
||||
#include <linux/hardirq.h>
|
||||
#include <linux/rcupdate.h>
|
||||
#include <net/sock.h>
|
||||
|
||||
#if IS_ENABLED(CONFIG_NET_CLS_CGROUP)
|
||||
struct cgroup_cls_state
|
||||
{
|
||||
#ifdef CONFIG_CGROUP_NET_CLASSID
|
||||
struct cgroup_cls_state {
|
||||
struct cgroup_subsys_state css;
|
||||
u32 classid;
|
||||
};
|
||||
|
||||
void sock_update_classid(struct sock *sk);
|
||||
struct cgroup_cls_state *task_cls_state(struct task_struct *p);
|
||||
|
||||
#if IS_BUILTIN(CONFIG_NET_CLS_CGROUP)
|
||||
static inline u32 task_cls_classid(struct task_struct *p)
|
||||
{
|
||||
u32 classid;
|
||||
@@ -41,33 +40,18 @@ static inline u32 task_cls_classid(struct task_struct *p)
|
||||
|
||||
return classid;
|
||||
}
|
||||
#elif IS_MODULE(CONFIG_NET_CLS_CGROUP)
|
||||
static inline u32 task_cls_classid(struct task_struct *p)
|
||||
|
||||
static inline void sock_update_classid(struct sock *sk)
|
||||
{
|
||||
struct cgroup_subsys_state *css;
|
||||
u32 classid = 0;
|
||||
u32 classid;
|
||||
|
||||
if (in_interrupt())
|
||||
return 0;
|
||||
|
||||
rcu_read_lock();
|
||||
css = task_css(p, net_cls_subsys_id);
|
||||
if (css)
|
||||
classid = container_of(css,
|
||||
struct cgroup_cls_state, css)->classid;
|
||||
rcu_read_unlock();
|
||||
|
||||
return classid;
|
||||
classid = task_cls_classid(current);
|
||||
if (classid != sk->sk_classid)
|
||||
sk->sk_classid = classid;
|
||||
}
|
||||
#endif
|
||||
#else /* !CGROUP_NET_CLS_CGROUP */
|
||||
#else /* !CONFIG_CGROUP_NET_CLASSID */
|
||||
static inline void sock_update_classid(struct sock *sk)
|
||||
{
|
||||
}
|
||||
|
||||
static inline u32 task_cls_classid(struct task_struct *p)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
#endif /* CGROUP_NET_CLS_CGROUP */
|
||||
#endif /* CONFIG_CGROUP_NET_CLASSID */
|
||||
#endif /* _NET_CLS_CGROUP_H */
|
||||
|
||||
+1
-3
@@ -46,7 +46,6 @@
|
||||
#include <linux/skbuff.h>
|
||||
#include <net/pkt_sched.h>
|
||||
#include <net/inet_ecn.h>
|
||||
#include <linux/reciprocal_div.h>
|
||||
|
||||
/* Controlling Queue Delay (CoDel) algorithm
|
||||
* =========================================
|
||||
@@ -211,10 +210,9 @@ static codel_time_t codel_control_law(codel_time_t t,
|
||||
codel_time_t interval,
|
||||
u32 rec_inv_sqrt)
|
||||
{
|
||||
return t + reciprocal_divide(interval, rec_inv_sqrt << REC_INV_SQRT_SHIFT);
|
||||
return t + reciprocal_scale(interval, rec_inv_sqrt << REC_INV_SQRT_SHIFT);
|
||||
}
|
||||
|
||||
|
||||
static bool codel_should_drop(const struct sk_buff *skb,
|
||||
struct Qdisc *sch,
|
||||
struct codel_vars *vars,
|
||||
|
||||
@@ -11,8 +11,7 @@
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, write to the Free Software Foundation, Inc., 59 Temple
|
||||
* Place - Suite 330, Boston, MA 02111-1307 USA.
|
||||
* this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* Author: John Fastabend <john.r.fastabend@intel.com>
|
||||
*/
|
||||
|
||||
+1
-2
@@ -11,8 +11,7 @@
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, write to the Free Software Foundation, Inc., 59 Temple
|
||||
* Place - Suite 330, Boston, MA 02111-1307 USA.
|
||||
* this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* Author: Lucy Liu <lucy.liu@intel.com>
|
||||
*/
|
||||
|
||||
@@ -9,7 +9,7 @@ struct dn_ifaddr {
|
||||
struct dn_dev *ifa_dev;
|
||||
__le16 ifa_local;
|
||||
__le16 ifa_address;
|
||||
__u8 ifa_flags;
|
||||
__u32 ifa_flags;
|
||||
__u8 ifa_scope;
|
||||
char ifa_label[IFNAMSIZ];
|
||||
struct rcu_head rcu;
|
||||
|
||||
+2
-3
@@ -322,12 +322,11 @@ static inline void __skb_tunnel_rx(struct sk_buff *skb, struct net_device *dev,
|
||||
skb->dev = dev;
|
||||
|
||||
/*
|
||||
* Clear rxhash so that we can recalulate the hash for the
|
||||
* Clear hash so that we can recalulate the hash for the
|
||||
* encapsulated packet, unless we have already determine the hash
|
||||
* over the L4 4-tuple.
|
||||
*/
|
||||
if (!skb->l4_rxhash)
|
||||
skb->rxhash = 0;
|
||||
skb_clear_hash_if_not_l4(skb);
|
||||
skb_set_queue_mapping(skb, 0);
|
||||
skb_scrub_packet(skb, !net_eq(net, dev_net(dev)));
|
||||
}
|
||||
|
||||
+1
-2
@@ -20,8 +20,7 @@ struct flowi_common {
|
||||
__u8 flowic_proto;
|
||||
__u8 flowic_flags;
|
||||
#define FLOWI_FLAG_ANYSRC 0x01
|
||||
#define FLOWI_FLAG_CAN_SLEEP 0x02
|
||||
#define FLOWI_FLAG_KNOWN_NH 0x04
|
||||
#define FLOWI_FLAG_KNOWN_NH 0x02
|
||||
__u32 flowic_secid;
|
||||
};
|
||||
|
||||
|
||||
@@ -73,6 +73,7 @@ struct genl_family {
|
||||
* @attrs: netlink attributes
|
||||
* @_net: network namespace
|
||||
* @user_ptr: user pointers
|
||||
* @dst_sk: destination socket
|
||||
*/
|
||||
struct genl_info {
|
||||
u32 snd_seq;
|
||||
@@ -85,6 +86,7 @@ struct genl_info {
|
||||
struct net * _net;
|
||||
#endif
|
||||
void * user_ptr[2];
|
||||
struct sock * dst_sk;
|
||||
};
|
||||
|
||||
static inline struct net *genl_info_net(struct genl_info *info)
|
||||
@@ -177,6 +179,8 @@ void genl_notify(struct genl_family *family,
|
||||
struct sk_buff *skb, struct net *net, u32 portid,
|
||||
u32 group, struct nlmsghdr *nlh, gfp_t flags);
|
||||
|
||||
struct sk_buff *genlmsg_new_unicast(size_t payload, struct genl_info *info,
|
||||
gfp_t flags);
|
||||
void *genlmsg_put(struct sk_buff *skb, u32 portid, u32 seq,
|
||||
struct genl_family *family, int flags, u8 cmd);
|
||||
|
||||
|
||||
@@ -33,9 +33,6 @@ struct gre_cisco_protocol {
|
||||
int gre_cisco_register(struct gre_cisco_protocol *proto);
|
||||
int gre_cisco_unregister(struct gre_cisco_protocol *proto);
|
||||
|
||||
int gre_offload_init(void);
|
||||
void gre_offload_exit(void);
|
||||
|
||||
void gre_build_header(struct sk_buff *skb, const struct tnl_ptk_info *tpi,
|
||||
int hdr_len);
|
||||
|
||||
|
||||
@@ -50,8 +50,8 @@ struct inet6_ifaddr {
|
||||
|
||||
int state;
|
||||
|
||||
__u32 flags;
|
||||
__u8 dad_probes;
|
||||
__u8 flags;
|
||||
|
||||
__u16 scope;
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user