diff options
author | Sage Weil <sage@inktank.com> | 2013-08-15 14:11:45 -0400 |
---|---|---|
committer | Sage Weil <sage@inktank.com> | 2013-08-15 14:11:45 -0400 |
commit | ee3e542fec6e69bc9fb668698889a37d93950ddf (patch) | |
tree | e74ee766a4764769ef1d3d45d266b4dea64101d3 /include/net | |
parent | fe2a801b50c0bb8039d627e5ae1fec249d10ff39 (diff) | |
parent | f1d6e17f540af37bb1891480143669ba7636c4cf (diff) |
Merge remote-tracking branch 'linus/master' into testing
Diffstat (limited to 'include/net')
36 files changed, 785 insertions, 391 deletions
diff --git a/include/net/9p/transport.h b/include/net/9p/transport.h index adcbb20f6511..d9fa68f26c41 100644 --- a/include/net/9p/transport.h +++ b/include/net/9p/transport.h | |||
@@ -26,6 +26,9 @@ | |||
26 | #ifndef NET_9P_TRANSPORT_H | 26 | #ifndef NET_9P_TRANSPORT_H |
27 | #define NET_9P_TRANSPORT_H | 27 | #define NET_9P_TRANSPORT_H |
28 | 28 | ||
29 | #define P9_DEF_MIN_RESVPORT (665U) | ||
30 | #define P9_DEF_MAX_RESVPORT (1023U) | ||
31 | |||
29 | /** | 32 | /** |
30 | * struct p9_trans_module - transport module interface | 33 | * struct p9_trans_module - transport module interface |
31 | * @list: used to maintain a list of currently available transports | 34 | * @list: used to maintain a list of currently available transports |
@@ -37,6 +40,8 @@ | |||
37 | * @close: member function to discard a connection on this transport | 40 | * @close: member function to discard a connection on this transport |
38 | * @request: member function to issue a request to the transport | 41 | * @request: member function to issue a request to the transport |
39 | * @cancel: member function to cancel a request (if it hasn't been sent) | 42 | * @cancel: member function to cancel a request (if it hasn't been sent) |
43 | * @cancelled: member function to notify that a cancelled request will not | ||
44 | * not receive a reply | ||
40 | * | 45 | * |
41 | * This is the basic API for a transport module which is registered by the | 46 | * This is the basic API for a transport module which is registered by the |
42 | * transport module with the 9P core network module and used by the client | 47 | * transport module with the 9P core network module and used by the client |
@@ -55,6 +60,7 @@ struct p9_trans_module { | |||
55 | void (*close) (struct p9_client *); | 60 | void (*close) (struct p9_client *); |
56 | int (*request) (struct p9_client *, struct p9_req_t *req); | 61 | int (*request) (struct p9_client *, struct p9_req_t *req); |
57 | int (*cancel) (struct p9_client *, struct p9_req_t *req); | 62 | int (*cancel) (struct p9_client *, struct p9_req_t *req); |
63 | int (*cancelled)(struct p9_client *, struct p9_req_t *req); | ||
58 | int (*zc_request)(struct p9_client *, struct p9_req_t *, | 64 | int (*zc_request)(struct p9_client *, struct p9_req_t *, |
59 | char *, char *, int , int, int, int); | 65 | char *, char *, int , int, int, int); |
60 | }; | 66 | }; |
diff --git a/include/net/act_api.h b/include/net/act_api.h index 06ef7e926a66..b8ffac7b6bab 100644 --- a/include/net/act_api.h +++ b/include/net/act_api.h | |||
@@ -18,7 +18,7 @@ struct tcf_common { | |||
18 | struct tcf_t tcfc_tm; | 18 | struct tcf_t tcfc_tm; |
19 | struct gnet_stats_basic_packed tcfc_bstats; | 19 | struct gnet_stats_basic_packed tcfc_bstats; |
20 | struct gnet_stats_queue tcfc_qstats; | 20 | struct gnet_stats_queue tcfc_qstats; |
21 | struct gnet_stats_rate_est tcfc_rate_est; | 21 | struct gnet_stats_rate_est64 tcfc_rate_est; |
22 | spinlock_t tcfc_lock; | 22 | spinlock_t tcfc_lock; |
23 | struct rcu_head tcfc_rcu; | 23 | struct rcu_head tcfc_rcu; |
24 | }; | 24 | }; |
diff --git a/include/net/addrconf.h b/include/net/addrconf.h index 21f702704f24..c7b181cb47a6 100644 --- a/include/net/addrconf.h +++ b/include/net/addrconf.h | |||
@@ -86,6 +86,9 @@ extern int ipv6_dev_get_saddr(struct net *net, | |||
86 | const struct in6_addr *daddr, | 86 | const struct in6_addr *daddr, |
87 | unsigned int srcprefs, | 87 | unsigned int srcprefs, |
88 | struct in6_addr *saddr); | 88 | struct in6_addr *saddr); |
89 | extern int __ipv6_get_lladdr(struct inet6_dev *idev, | ||
90 | struct in6_addr *addr, | ||
91 | unsigned char banned_flags); | ||
89 | extern int ipv6_get_lladdr(struct net_device *dev, | 92 | extern int ipv6_get_lladdr(struct net_device *dev, |
90 | struct in6_addr *addr, | 93 | struct in6_addr *addr, |
91 | unsigned char banned_flags); | 94 | unsigned char banned_flags); |
@@ -155,6 +158,7 @@ extern bool ipv6_chk_mcast_addr(struct net_device *dev, | |||
155 | const struct in6_addr *group, | 158 | const struct in6_addr *group, |
156 | const struct in6_addr *src_addr); | 159 | const struct in6_addr *src_addr); |
157 | 160 | ||
161 | extern void ipv6_mc_dad_complete(struct inet6_dev *idev); | ||
158 | /* | 162 | /* |
159 | * identify MLD packets for MLD filter exceptions | 163 | * identify MLD packets for MLD filter exceptions |
160 | */ | 164 | */ |
diff --git a/include/net/bluetooth/hci.h b/include/net/bluetooth/hci.h index e0512aaef4b8..3c592cf473da 100644 --- a/include/net/bluetooth/hci.h +++ b/include/net/bluetooth/hci.h | |||
@@ -107,7 +107,6 @@ enum { | |||
107 | HCI_MGMT, | 107 | HCI_MGMT, |
108 | HCI_PAIRABLE, | 108 | HCI_PAIRABLE, |
109 | HCI_SERVICE_CACHE, | 109 | HCI_SERVICE_CACHE, |
110 | HCI_LINK_KEYS, | ||
111 | HCI_DEBUG_KEYS, | 110 | HCI_DEBUG_KEYS, |
112 | HCI_UNREGISTER, | 111 | HCI_UNREGISTER, |
113 | 112 | ||
diff --git a/include/net/bluetooth/hci_core.h b/include/net/bluetooth/hci_core.h index 7cb6d360d147..f77885ea78c2 100644 --- a/include/net/bluetooth/hci_core.h +++ b/include/net/bluetooth/hci_core.h | |||
@@ -117,13 +117,6 @@ struct oob_data { | |||
117 | u8 randomizer[16]; | 117 | u8 randomizer[16]; |
118 | }; | 118 | }; |
119 | 119 | ||
120 | struct le_scan_params { | ||
121 | u8 type; | ||
122 | u16 interval; | ||
123 | u16 window; | ||
124 | int timeout; | ||
125 | }; | ||
126 | |||
127 | #define HCI_MAX_SHORT_NAME_LENGTH 10 | 120 | #define HCI_MAX_SHORT_NAME_LENGTH 10 |
128 | 121 | ||
129 | struct amp_assoc { | 122 | struct amp_assoc { |
@@ -283,9 +276,6 @@ struct hci_dev { | |||
283 | 276 | ||
284 | struct delayed_work le_scan_disable; | 277 | struct delayed_work le_scan_disable; |
285 | 278 | ||
286 | struct work_struct le_scan; | ||
287 | struct le_scan_params le_scan_params; | ||
288 | |||
289 | __s8 adv_tx_power; | 279 | __s8 adv_tx_power; |
290 | __u8 adv_data[HCI_MAX_AD_LENGTH]; | 280 | __u8 adv_data[HCI_MAX_AD_LENGTH]; |
291 | __u8 adv_data_len; | 281 | __u8 adv_data_len; |
@@ -432,6 +422,7 @@ void hci_inquiry_cache_update_resolve(struct hci_dev *hdev, | |||
432 | struct inquiry_entry *ie); | 422 | struct inquiry_entry *ie); |
433 | bool hci_inquiry_cache_update(struct hci_dev *hdev, struct inquiry_data *data, | 423 | bool hci_inquiry_cache_update(struct hci_dev *hdev, struct inquiry_data *data, |
434 | bool name_known, bool *ssp); | 424 | bool name_known, bool *ssp); |
425 | void hci_inquiry_cache_flush(struct hci_dev *hdev); | ||
435 | 426 | ||
436 | /* ----- HCI Connections ----- */ | 427 | /* ----- HCI Connections ----- */ |
437 | enum { | 428 | enum { |
@@ -1114,6 +1105,16 @@ void hci_sock_dev_event(struct hci_dev *hdev, int event); | |||
1114 | BIT(BDADDR_LE_PUBLIC) | \ | 1105 | BIT(BDADDR_LE_PUBLIC) | \ |
1115 | BIT(BDADDR_LE_RANDOM)) | 1106 | BIT(BDADDR_LE_RANDOM)) |
1116 | 1107 | ||
1108 | /* These LE scan and inquiry parameters were chosen according to LE General | ||
1109 | * Discovery Procedure specification. | ||
1110 | */ | ||
1111 | #define DISCOV_LE_SCAN_WIN 0x12 | ||
1112 | #define DISCOV_LE_SCAN_INT 0x12 | ||
1113 | #define DISCOV_LE_TIMEOUT msecs_to_jiffies(10240) | ||
1114 | #define DISCOV_INTERLEAVED_TIMEOUT msecs_to_jiffies(5120) | ||
1115 | #define DISCOV_INTERLEAVED_INQUIRY_LEN 0x04 | ||
1116 | #define DISCOV_BREDR_INQUIRY_LEN 0x08 | ||
1117 | |||
1117 | int mgmt_control(struct sock *sk, struct msghdr *msg, size_t len); | 1118 | int mgmt_control(struct sock *sk, struct msghdr *msg, size_t len); |
1118 | int mgmt_index_added(struct hci_dev *hdev); | 1119 | int mgmt_index_added(struct hci_dev *hdev); |
1119 | int mgmt_index_removed(struct hci_dev *hdev); | 1120 | int mgmt_index_removed(struct hci_dev *hdev); |
@@ -1169,10 +1170,7 @@ int mgmt_device_found(struct hci_dev *hdev, bdaddr_t *bdaddr, u8 link_type, | |||
1169 | u8 ssp, u8 *eir, u16 eir_len); | 1170 | u8 ssp, u8 *eir, u16 eir_len); |
1170 | int mgmt_remote_name(struct hci_dev *hdev, bdaddr_t *bdaddr, u8 link_type, | 1171 | int mgmt_remote_name(struct hci_dev *hdev, bdaddr_t *bdaddr, u8 link_type, |
1171 | u8 addr_type, s8 rssi, u8 *name, u8 name_len); | 1172 | u8 addr_type, s8 rssi, u8 *name, u8 name_len); |
1172 | int mgmt_start_discovery_failed(struct hci_dev *hdev, u8 status); | ||
1173 | int mgmt_stop_discovery_failed(struct hci_dev *hdev, u8 status); | ||
1174 | int mgmt_discovering(struct hci_dev *hdev, u8 discovering); | 1173 | int mgmt_discovering(struct hci_dev *hdev, u8 discovering); |
1175 | int mgmt_interleaved_discovery(struct hci_dev *hdev); | ||
1176 | int mgmt_device_blocked(struct hci_dev *hdev, bdaddr_t *bdaddr, u8 type); | 1174 | int mgmt_device_blocked(struct hci_dev *hdev, bdaddr_t *bdaddr, u8 type); |
1177 | int mgmt_device_unblocked(struct hci_dev *hdev, bdaddr_t *bdaddr, u8 type); | 1175 | int mgmt_device_unblocked(struct hci_dev *hdev, bdaddr_t *bdaddr, u8 type); |
1178 | bool mgmt_valid_hdev(struct hci_dev *hdev); | 1176 | bool mgmt_valid_hdev(struct hci_dev *hdev); |
@@ -1212,11 +1210,6 @@ void hci_le_conn_update(struct hci_conn *conn, u16 min, u16 max, | |||
1212 | u16 latency, u16 to_multiplier); | 1210 | u16 latency, u16 to_multiplier); |
1213 | void hci_le_start_enc(struct hci_conn *conn, __le16 ediv, __u8 rand[8], | 1211 | void hci_le_start_enc(struct hci_conn *conn, __le16 ediv, __u8 rand[8], |
1214 | __u8 ltk[16]); | 1212 | __u8 ltk[16]); |
1215 | int hci_do_inquiry(struct hci_dev *hdev, u8 length); | ||
1216 | int hci_cancel_inquiry(struct hci_dev *hdev); | ||
1217 | int hci_le_scan(struct hci_dev *hdev, u8 type, u16 interval, u16 window, | ||
1218 | int timeout); | ||
1219 | int hci_cancel_le_scan(struct hci_dev *hdev); | ||
1220 | 1213 | ||
1221 | u8 bdaddr_to_le(u8 bdaddr_type); | 1214 | u8 bdaddr_to_le(u8 bdaddr_type); |
1222 | 1215 | ||
diff --git a/include/net/bluetooth/l2cap.h b/include/net/bluetooth/l2cap.h index fb94cf13c777..1a966afbbfa8 100644 --- a/include/net/bluetooth/l2cap.h +++ b/include/net/bluetooth/l2cap.h | |||
@@ -242,7 +242,7 @@ struct l2cap_conn_rsp { | |||
242 | #define L2CAP_CID_SIGNALING 0x0001 | 242 | #define L2CAP_CID_SIGNALING 0x0001 |
243 | #define L2CAP_CID_CONN_LESS 0x0002 | 243 | #define L2CAP_CID_CONN_LESS 0x0002 |
244 | #define L2CAP_CID_A2MP 0x0003 | 244 | #define L2CAP_CID_A2MP 0x0003 |
245 | #define L2CAP_CID_LE_DATA 0x0004 | 245 | #define L2CAP_CID_ATT 0x0004 |
246 | #define L2CAP_CID_LE_SIGNALING 0x0005 | 246 | #define L2CAP_CID_LE_SIGNALING 0x0005 |
247 | #define L2CAP_CID_SMP 0x0006 | 247 | #define L2CAP_CID_SMP 0x0006 |
248 | #define L2CAP_CID_DYN_START 0x0040 | 248 | #define L2CAP_CID_DYN_START 0x0040 |
diff --git a/include/net/busy_poll.h b/include/net/busy_poll.h new file mode 100644 index 000000000000..f18b91966d3d --- /dev/null +++ b/include/net/busy_poll.h | |||
@@ -0,0 +1,190 @@ | |||
1 | /* | ||
2 | * net busy poll support | ||
3 | * Copyright(c) 2013 Intel Corporation. | ||
4 | * | ||
5 | * This program is free software; you can redistribute it and/or modify it | ||
6 | * under the terms and conditions of the GNU General Public License, | ||
7 | * version 2, as published by the Free Software Foundation. | ||
8 | * | ||
9 | * This program is distributed in the hope it will be useful, but WITHOUT | ||
10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | ||
12 | * more details. | ||
13 | * | ||
14 | * You should have received a copy of the GNU General Public License along with | ||
15 | * this program; if not, write to the Free Software Foundation, Inc., | ||
16 | * 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. | ||
17 | * | ||
18 | * Author: Eliezer Tamir | ||
19 | * | ||
20 | * Contact Information: | ||
21 | * e1000-devel Mailing List <e1000-devel@lists.sourceforge.net> | ||
22 | */ | ||
23 | |||
24 | #ifndef _LINUX_NET_BUSY_POLL_H | ||
25 | #define _LINUX_NET_BUSY_POLL_H | ||
26 | |||
27 | #include <linux/netdevice.h> | ||
28 | #include <net/ip.h> | ||
29 | |||
30 | #ifdef CONFIG_NET_RX_BUSY_POLL | ||
31 | |||
32 | struct napi_struct; | ||
33 | extern unsigned int sysctl_net_busy_read __read_mostly; | ||
34 | extern unsigned int sysctl_net_busy_poll __read_mostly; | ||
35 | |||
36 | /* return values from ndo_ll_poll */ | ||
37 | #define LL_FLUSH_FAILED -1 | ||
38 | #define LL_FLUSH_BUSY -2 | ||
39 | |||
40 | static inline bool net_busy_loop_on(void) | ||
41 | { | ||
42 | return sysctl_net_busy_poll; | ||
43 | } | ||
44 | |||
45 | /* a wrapper to make debug_smp_processor_id() happy | ||
46 | * we can use sched_clock() because we don't care much about precision | ||
47 | * we only care that the average is bounded | ||
48 | */ | ||
49 | #ifdef CONFIG_DEBUG_PREEMPT | ||
50 | static inline u64 busy_loop_us_clock(void) | ||
51 | { | ||
52 | u64 rc; | ||
53 | |||
54 | preempt_disable_notrace(); | ||
55 | rc = sched_clock(); | ||
56 | preempt_enable_no_resched_notrace(); | ||
57 | |||
58 | return rc >> 10; | ||
59 | } | ||
60 | #else /* CONFIG_DEBUG_PREEMPT */ | ||
61 | static inline u64 busy_loop_us_clock(void) | ||
62 | { | ||
63 | return sched_clock() >> 10; | ||
64 | } | ||
65 | #endif /* CONFIG_DEBUG_PREEMPT */ | ||
66 | |||
67 | static inline unsigned long sk_busy_loop_end_time(struct sock *sk) | ||
68 | { | ||
69 | return busy_loop_us_clock() + ACCESS_ONCE(sk->sk_ll_usec); | ||
70 | } | ||
71 | |||
72 | /* in poll/select we use the global sysctl_net_ll_poll value */ | ||
73 | static inline unsigned long busy_loop_end_time(void) | ||
74 | { | ||
75 | return busy_loop_us_clock() + ACCESS_ONCE(sysctl_net_busy_poll); | ||
76 | } | ||
77 | |||
78 | static inline bool sk_can_busy_loop(struct sock *sk) | ||
79 | { | ||
80 | return sk->sk_ll_usec && sk->sk_napi_id && | ||
81 | !need_resched() && !signal_pending(current); | ||
82 | } | ||
83 | |||
84 | |||
85 | static inline bool busy_loop_timeout(unsigned long end_time) | ||
86 | { | ||
87 | unsigned long now = busy_loop_us_clock(); | ||
88 | |||
89 | return time_after(now, end_time); | ||
90 | } | ||
91 | |||
92 | /* when used in sock_poll() nonblock is known at compile time to be true | ||
93 | * so the loop and end_time will be optimized out | ||
94 | */ | ||
95 | static inline bool sk_busy_loop(struct sock *sk, int nonblock) | ||
96 | { | ||
97 | unsigned long end_time = !nonblock ? sk_busy_loop_end_time(sk) : 0; | ||
98 | const struct net_device_ops *ops; | ||
99 | struct napi_struct *napi; | ||
100 | int rc = false; | ||
101 | |||
102 | /* | ||
103 | * rcu read lock for napi hash | ||
104 | * bh so we don't race with net_rx_action | ||
105 | */ | ||
106 | rcu_read_lock_bh(); | ||
107 | |||
108 | napi = napi_by_id(sk->sk_napi_id); | ||
109 | if (!napi) | ||
110 | goto out; | ||
111 | |||
112 | ops = napi->dev->netdev_ops; | ||
113 | if (!ops->ndo_busy_poll) | ||
114 | goto out; | ||
115 | |||
116 | do { | ||
117 | rc = ops->ndo_busy_poll(napi); | ||
118 | |||
119 | if (rc == LL_FLUSH_FAILED) | ||
120 | break; /* permanent failure */ | ||
121 | |||
122 | if (rc > 0) | ||
123 | /* local bh are disabled so it is ok to use _BH */ | ||
124 | NET_ADD_STATS_BH(sock_net(sk), | ||
125 | LINUX_MIB_LOWLATENCYRXPACKETS, rc); | ||
126 | |||
127 | } while (!nonblock && skb_queue_empty(&sk->sk_receive_queue) && | ||
128 | !need_resched() && !busy_loop_timeout(end_time)); | ||
129 | |||
130 | rc = !skb_queue_empty(&sk->sk_receive_queue); | ||
131 | out: | ||
132 | rcu_read_unlock_bh(); | ||
133 | return rc; | ||
134 | } | ||
135 | |||
136 | /* used in the NIC receive handler to mark the skb */ | ||
137 | static inline void skb_mark_napi_id(struct sk_buff *skb, | ||
138 | struct napi_struct *napi) | ||
139 | { | ||
140 | skb->napi_id = napi->napi_id; | ||
141 | } | ||
142 | |||
143 | /* used in the protocol hanlder to propagate the napi_id to the socket */ | ||
144 | static inline void sk_mark_napi_id(struct sock *sk, struct sk_buff *skb) | ||
145 | { | ||
146 | sk->sk_napi_id = skb->napi_id; | ||
147 | } | ||
148 | |||
149 | #else /* CONFIG_NET_RX_BUSY_POLL */ | ||
150 | static inline unsigned long net_busy_loop_on(void) | ||
151 | { | ||
152 | return 0; | ||
153 | } | ||
154 | |||
155 | static inline unsigned long busy_loop_end_time(void) | ||
156 | { | ||
157 | return 0; | ||
158 | } | ||
159 | |||
160 | static inline bool sk_can_busy_loop(struct sock *sk) | ||
161 | { | ||
162 | return false; | ||
163 | } | ||
164 | |||
165 | static inline bool sk_busy_poll(struct sock *sk, int nonblock) | ||
166 | { | ||
167 | return false; | ||
168 | } | ||
169 | |||
170 | static inline void skb_mark_napi_id(struct sk_buff *skb, | ||
171 | struct napi_struct *napi) | ||
172 | { | ||
173 | } | ||
174 | |||
175 | static inline void sk_mark_napi_id(struct sock *sk, struct sk_buff *skb) | ||
176 | { | ||
177 | } | ||
178 | |||
179 | static inline bool busy_loop_timeout(unsigned long end_time) | ||
180 | { | ||
181 | return true; | ||
182 | } | ||
183 | |||
184 | static inline bool sk_busy_loop(struct sock *sk, int nonblock) | ||
185 | { | ||
186 | return false; | ||
187 | } | ||
188 | |||
189 | #endif /* CONFIG_NET_RX_BUSY_POLL */ | ||
190 | #endif /* _LINUX_NET_BUSY_POLL_H */ | ||
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h index 26b5b692c22b..7b0730aeb892 100644 --- a/include/net/cfg80211.h +++ b/include/net/cfg80211.h | |||
@@ -188,6 +188,8 @@ struct ieee80211_channel { | |||
188 | * when used with 802.11g (on the 2.4 GHz band); filled by the | 188 | * when used with 802.11g (on the 2.4 GHz band); filled by the |
189 | * core code when registering the wiphy. | 189 | * core code when registering the wiphy. |
190 | * @IEEE80211_RATE_ERP_G: This is an ERP rate in 802.11g mode. | 190 | * @IEEE80211_RATE_ERP_G: This is an ERP rate in 802.11g mode. |
191 | * @IEEE80211_RATE_SUPPORTS_5MHZ: Rate can be used in 5 MHz mode | ||
192 | * @IEEE80211_RATE_SUPPORTS_10MHZ: Rate can be used in 10 MHz mode | ||
191 | */ | 193 | */ |
192 | enum ieee80211_rate_flags { | 194 | enum ieee80211_rate_flags { |
193 | IEEE80211_RATE_SHORT_PREAMBLE = 1<<0, | 195 | IEEE80211_RATE_SHORT_PREAMBLE = 1<<0, |
@@ -195,6 +197,8 @@ enum ieee80211_rate_flags { | |||
195 | IEEE80211_RATE_MANDATORY_B = 1<<2, | 197 | IEEE80211_RATE_MANDATORY_B = 1<<2, |
196 | IEEE80211_RATE_MANDATORY_G = 1<<3, | 198 | IEEE80211_RATE_MANDATORY_G = 1<<3, |
197 | IEEE80211_RATE_ERP_G = 1<<4, | 199 | IEEE80211_RATE_ERP_G = 1<<4, |
200 | IEEE80211_RATE_SUPPORTS_5MHZ = 1<<5, | ||
201 | IEEE80211_RATE_SUPPORTS_10MHZ = 1<<6, | ||
198 | }; | 202 | }; |
199 | 203 | ||
200 | /** | 204 | /** |
@@ -433,6 +437,30 @@ bool cfg80211_chandef_usable(struct wiphy *wiphy, | |||
433 | u32 prohibited_flags); | 437 | u32 prohibited_flags); |
434 | 438 | ||
435 | /** | 439 | /** |
440 | * ieee80211_chandef_rate_flags - returns rate flags for a channel | ||
441 | * | ||
442 | * In some channel types, not all rates may be used - for example CCK | ||
443 | * rates may not be used in 5/10 MHz channels. | ||
444 | * | ||
445 | * @chandef: channel definition for the channel | ||
446 | * | ||
447 | * Returns: rate flags which apply for this channel | ||
448 | */ | ||
449 | static inline enum ieee80211_rate_flags | ||
450 | ieee80211_chandef_rate_flags(struct cfg80211_chan_def *chandef) | ||
451 | { | ||
452 | switch (chandef->width) { | ||
453 | case NL80211_CHAN_WIDTH_5: | ||
454 | return IEEE80211_RATE_SUPPORTS_5MHZ; | ||
455 | case NL80211_CHAN_WIDTH_10: | ||
456 | return IEEE80211_RATE_SUPPORTS_10MHZ; | ||
457 | default: | ||
458 | break; | ||
459 | } | ||
460 | return 0; | ||
461 | } | ||
462 | |||
463 | /** | ||
436 | * enum survey_info_flags - survey information flags | 464 | * enum survey_info_flags - survey information flags |
437 | * | 465 | * |
438 | * @SURVEY_INFO_NOISE_DBM: noise (in dBm) was filled in | 466 | * @SURVEY_INFO_NOISE_DBM: noise (in dBm) was filled in |
@@ -753,6 +781,8 @@ int cfg80211_check_station_change(struct wiphy *wiphy, | |||
753 | * @STATION_INFO_LOCAL_PM: @local_pm filled | 781 | * @STATION_INFO_LOCAL_PM: @local_pm filled |
754 | * @STATION_INFO_PEER_PM: @peer_pm filled | 782 | * @STATION_INFO_PEER_PM: @peer_pm filled |
755 | * @STATION_INFO_NONPEER_PM: @nonpeer_pm filled | 783 | * @STATION_INFO_NONPEER_PM: @nonpeer_pm filled |
784 | * @STATION_INFO_CHAIN_SIGNAL: @chain_signal filled | ||
785 | * @STATION_INFO_CHAIN_SIGNAL_AVG: @chain_signal_avg filled | ||
756 | */ | 786 | */ |
757 | enum station_info_flags { | 787 | enum station_info_flags { |
758 | STATION_INFO_INACTIVE_TIME = 1<<0, | 788 | STATION_INFO_INACTIVE_TIME = 1<<0, |
@@ -781,6 +811,8 @@ enum station_info_flags { | |||
781 | STATION_INFO_NONPEER_PM = 1<<23, | 811 | STATION_INFO_NONPEER_PM = 1<<23, |
782 | STATION_INFO_RX_BYTES64 = 1<<24, | 812 | STATION_INFO_RX_BYTES64 = 1<<24, |
783 | STATION_INFO_TX_BYTES64 = 1<<25, | 813 | STATION_INFO_TX_BYTES64 = 1<<25, |
814 | STATION_INFO_CHAIN_SIGNAL = 1<<26, | ||
815 | STATION_INFO_CHAIN_SIGNAL_AVG = 1<<27, | ||
784 | }; | 816 | }; |
785 | 817 | ||
786 | /** | 818 | /** |
@@ -857,6 +889,8 @@ struct sta_bss_parameters { | |||
857 | u16 beacon_interval; | 889 | u16 beacon_interval; |
858 | }; | 890 | }; |
859 | 891 | ||
892 | #define IEEE80211_MAX_CHAINS 4 | ||
893 | |||
860 | /** | 894 | /** |
861 | * struct station_info - station information | 895 | * struct station_info - station information |
862 | * | 896 | * |
@@ -874,6 +908,9 @@ struct sta_bss_parameters { | |||
874 | * For CFG80211_SIGNAL_TYPE_MBM, value is expressed in _dBm_. | 908 | * For CFG80211_SIGNAL_TYPE_MBM, value is expressed in _dBm_. |
875 | * @signal_avg: Average signal strength, type depends on the wiphy's signal_type. | 909 | * @signal_avg: Average signal strength, type depends on the wiphy's signal_type. |
876 | * For CFG80211_SIGNAL_TYPE_MBM, value is expressed in _dBm_. | 910 | * For CFG80211_SIGNAL_TYPE_MBM, value is expressed in _dBm_. |
911 | * @chains: bitmask for filled values in @chain_signal, @chain_signal_avg | ||
912 | * @chain_signal: per-chain signal strength of last received packet in dBm | ||
913 | * @chain_signal_avg: per-chain signal strength average in dBm | ||
877 | * @txrate: current unicast bitrate from this station | 914 | * @txrate: current unicast bitrate from this station |
878 | * @rxrate: current unicast bitrate to this station | 915 | * @rxrate: current unicast bitrate to this station |
879 | * @rx_packets: packets received from this station | 916 | * @rx_packets: packets received from this station |
@@ -909,6 +946,11 @@ struct station_info { | |||
909 | u8 plink_state; | 946 | u8 plink_state; |
910 | s8 signal; | 947 | s8 signal; |
911 | s8 signal_avg; | 948 | s8 signal_avg; |
949 | |||
950 | u8 chains; | ||
951 | s8 chain_signal[IEEE80211_MAX_CHAINS]; | ||
952 | s8 chain_signal_avg[IEEE80211_MAX_CHAINS]; | ||
953 | |||
912 | struct rate_info txrate; | 954 | struct rate_info txrate; |
913 | struct rate_info rxrate; | 955 | struct rate_info rxrate; |
914 | u32 rx_packets; | 956 | u32 rx_packets; |
@@ -947,6 +989,7 @@ struct station_info { | |||
947 | * @MONITOR_FLAG_CONTROL: pass control frames | 989 | * @MONITOR_FLAG_CONTROL: pass control frames |
948 | * @MONITOR_FLAG_OTHER_BSS: disable BSSID filtering | 990 | * @MONITOR_FLAG_OTHER_BSS: disable BSSID filtering |
949 | * @MONITOR_FLAG_COOK_FRAMES: report frames after processing | 991 | * @MONITOR_FLAG_COOK_FRAMES: report frames after processing |
992 | * @MONITOR_FLAG_ACTIVE: active monitor, ACKs frames on its MAC address | ||
950 | */ | 993 | */ |
951 | enum monitor_flags { | 994 | enum monitor_flags { |
952 | MONITOR_FLAG_FCSFAIL = 1<<NL80211_MNTR_FLAG_FCSFAIL, | 995 | MONITOR_FLAG_FCSFAIL = 1<<NL80211_MNTR_FLAG_FCSFAIL, |
@@ -954,6 +997,7 @@ enum monitor_flags { | |||
954 | MONITOR_FLAG_CONTROL = 1<<NL80211_MNTR_FLAG_CONTROL, | 997 | MONITOR_FLAG_CONTROL = 1<<NL80211_MNTR_FLAG_CONTROL, |
955 | MONITOR_FLAG_OTHER_BSS = 1<<NL80211_MNTR_FLAG_OTHER_BSS, | 998 | MONITOR_FLAG_OTHER_BSS = 1<<NL80211_MNTR_FLAG_OTHER_BSS, |
956 | MONITOR_FLAG_COOK_FRAMES = 1<<NL80211_MNTR_FLAG_COOK_FRAMES, | 999 | MONITOR_FLAG_COOK_FRAMES = 1<<NL80211_MNTR_FLAG_COOK_FRAMES, |
1000 | MONITOR_FLAG_ACTIVE = 1<<NL80211_MNTR_FLAG_ACTIVE, | ||
957 | }; | 1001 | }; |
958 | 1002 | ||
959 | /** | 1003 | /** |
@@ -1108,6 +1152,9 @@ struct bss_parameters { | |||
1108 | * setting for new peer links. | 1152 | * setting for new peer links. |
1109 | * @dot11MeshAwakeWindowDuration: The duration in TUs the STA will remain awake | 1153 | * @dot11MeshAwakeWindowDuration: The duration in TUs the STA will remain awake |
1110 | * after transmitting its beacon. | 1154 | * after transmitting its beacon. |
1155 | * @plink_timeout: If no tx activity is seen from a STA we've established | ||
1156 | * peering with for longer than this time (in seconds), then remove it | ||
1157 | * from the STA's list of peers. Default is 30 minutes. | ||
1111 | */ | 1158 | */ |
1112 | struct mesh_config { | 1159 | struct mesh_config { |
1113 | u16 dot11MeshRetryTimeout; | 1160 | u16 dot11MeshRetryTimeout; |
@@ -1137,6 +1184,7 @@ struct mesh_config { | |||
1137 | u16 dot11MeshHWMPconfirmationInterval; | 1184 | u16 dot11MeshHWMPconfirmationInterval; |
1138 | enum nl80211_mesh_power_mode power_mode; | 1185 | enum nl80211_mesh_power_mode power_mode; |
1139 | u16 dot11MeshAwakeWindowDuration; | 1186 | u16 dot11MeshAwakeWindowDuration; |
1187 | u32 plink_timeout; | ||
1140 | }; | 1188 | }; |
1141 | 1189 | ||
1142 | /** | 1190 | /** |
@@ -1147,6 +1195,7 @@ struct mesh_config { | |||
1147 | * @sync_method: which synchronization method to use | 1195 | * @sync_method: which synchronization method to use |
1148 | * @path_sel_proto: which path selection protocol to use | 1196 | * @path_sel_proto: which path selection protocol to use |
1149 | * @path_metric: which metric to use | 1197 | * @path_metric: which metric to use |
1198 | * @auth_id: which authentication method this mesh is using | ||
1150 | * @ie: vendor information elements (optional) | 1199 | * @ie: vendor information elements (optional) |
1151 | * @ie_len: length of vendor information elements | 1200 | * @ie_len: length of vendor information elements |
1152 | * @is_authenticated: this mesh requires authentication | 1201 | * @is_authenticated: this mesh requires authentication |
@@ -1155,6 +1204,7 @@ struct mesh_config { | |||
1155 | * @dtim_period: DTIM period to use | 1204 | * @dtim_period: DTIM period to use |
1156 | * @beacon_interval: beacon interval to use | 1205 | * @beacon_interval: beacon interval to use |
1157 | * @mcast_rate: multicat rate for Mesh Node [6Mbps is the default for 802.11a] | 1206 | * @mcast_rate: multicat rate for Mesh Node [6Mbps is the default for 802.11a] |
1207 | * @basic_rates: basic rates to use when creating the mesh | ||
1158 | * | 1208 | * |
1159 | * These parameters are fixed when the mesh is created. | 1209 | * These parameters are fixed when the mesh is created. |
1160 | */ | 1210 | */ |
@@ -1165,6 +1215,7 @@ struct mesh_setup { | |||
1165 | u8 sync_method; | 1215 | u8 sync_method; |
1166 | u8 path_sel_proto; | 1216 | u8 path_sel_proto; |
1167 | u8 path_metric; | 1217 | u8 path_metric; |
1218 | u8 auth_id; | ||
1168 | const u8 *ie; | 1219 | const u8 *ie; |
1169 | u8 ie_len; | 1220 | u8 ie_len; |
1170 | bool is_authenticated; | 1221 | bool is_authenticated; |
@@ -1173,6 +1224,7 @@ struct mesh_setup { | |||
1173 | u8 dtim_period; | 1224 | u8 dtim_period; |
1174 | u16 beacon_interval; | 1225 | u16 beacon_interval; |
1175 | int mcast_rate[IEEE80211_NUM_BANDS]; | 1226 | int mcast_rate[IEEE80211_NUM_BANDS]; |
1227 | u32 basic_rates; | ||
1176 | }; | 1228 | }; |
1177 | 1229 | ||
1178 | /** | 1230 | /** |
@@ -1241,6 +1293,7 @@ struct cfg80211_ssid { | |||
1241 | * @scan_start: time (in jiffies) when the scan started | 1293 | * @scan_start: time (in jiffies) when the scan started |
1242 | * @wdev: the wireless device to scan for | 1294 | * @wdev: the wireless device to scan for |
1243 | * @aborted: (internal) scan request was notified as aborted | 1295 | * @aborted: (internal) scan request was notified as aborted |
1296 | * @notified: (internal) scan request was notified as done or aborted | ||
1244 | * @no_cck: used to send probe requests at non CCK rate in 2GHz band | 1297 | * @no_cck: used to send probe requests at non CCK rate in 2GHz band |
1245 | */ | 1298 | */ |
1246 | struct cfg80211_scan_request { | 1299 | struct cfg80211_scan_request { |
@@ -1258,7 +1311,7 @@ struct cfg80211_scan_request { | |||
1258 | /* internal */ | 1311 | /* internal */ |
1259 | struct wiphy *wiphy; | 1312 | struct wiphy *wiphy; |
1260 | unsigned long scan_start; | 1313 | unsigned long scan_start; |
1261 | bool aborted; | 1314 | bool aborted, notified; |
1262 | bool no_cck; | 1315 | bool no_cck; |
1263 | 1316 | ||
1264 | /* keep last */ | 1317 | /* keep last */ |
@@ -1406,7 +1459,8 @@ const u8 *ieee80211_bss_get_ie(struct cfg80211_bss *bss, u8 ie); | |||
1406 | * This structure provides information needed to complete IEEE 802.11 | 1459 | * This structure provides information needed to complete IEEE 802.11 |
1407 | * authentication. | 1460 | * authentication. |
1408 | * | 1461 | * |
1409 | * @bss: The BSS to authenticate with. | 1462 | * @bss: The BSS to authenticate with, the callee must obtain a reference |
1463 | * to it if it needs to keep it. | ||
1410 | * @auth_type: Authentication type (algorithm) | 1464 | * @auth_type: Authentication type (algorithm) |
1411 | * @ie: Extra IEs to add to Authentication frame or %NULL | 1465 | * @ie: Extra IEs to add to Authentication frame or %NULL |
1412 | * @ie_len: Length of ie buffer in octets | 1466 | * @ie_len: Length of ie buffer in octets |
@@ -1444,11 +1498,10 @@ enum cfg80211_assoc_req_flags { | |||
1444 | * | 1498 | * |
1445 | * This structure provides information needed to complete IEEE 802.11 | 1499 | * This structure provides information needed to complete IEEE 802.11 |
1446 | * (re)association. | 1500 | * (re)association. |
1447 | * @bss: The BSS to associate with. If the call is successful the driver | 1501 | * @bss: The BSS to associate with. If the call is successful the driver is |
1448 | * is given a reference that it must release, normally via a call to | 1502 | * given a reference that it must give back to cfg80211_send_rx_assoc() |
1449 | * cfg80211_send_rx_assoc(), or, if association timed out, with a | 1503 | * or to cfg80211_assoc_timeout(). To ensure proper refcounting, new |
1450 | * call to cfg80211_put_bss() (in addition to calling | 1504 | * association requests while already associating must be rejected. |
1451 | * cfg80211_send_assoc_timeout()) | ||
1452 | * @ie: Extra IEs to add to (Re)Association Request frame or %NULL | 1505 | * @ie: Extra IEs to add to (Re)Association Request frame or %NULL |
1453 | * @ie_len: Length of ie buffer in octets | 1506 | * @ie_len: Length of ie buffer in octets |
1454 | * @use_mfp: Use management frame protection (IEEE 802.11w) in this association | 1507 | * @use_mfp: Use management frame protection (IEEE 802.11w) in this association |
@@ -1850,7 +1903,9 @@ struct cfg80211_update_ft_ies_params { | |||
1850 | * @get_mpath: get a mesh path for the given parameters | 1903 | * @get_mpath: get a mesh path for the given parameters |
1851 | * @dump_mpath: dump mesh path callback -- resume dump at index @idx | 1904 | * @dump_mpath: dump mesh path callback -- resume dump at index @idx |
1852 | * @join_mesh: join the mesh network with the specified parameters | 1905 | * @join_mesh: join the mesh network with the specified parameters |
1906 | * (invoked with the wireless_dev mutex held) | ||
1853 | * @leave_mesh: leave the current mesh network | 1907 | * @leave_mesh: leave the current mesh network |
1908 | * (invoked with the wireless_dev mutex held) | ||
1854 | * | 1909 | * |
1855 | * @get_mesh_config: Get the current mesh configuration | 1910 | * @get_mesh_config: Get the current mesh configuration |
1856 | * | 1911 | * |
@@ -1877,20 +1932,28 @@ struct cfg80211_update_ft_ies_params { | |||
1877 | * the scan/scan_done bracket too. | 1932 | * the scan/scan_done bracket too. |
1878 | * | 1933 | * |
1879 | * @auth: Request to authenticate with the specified peer | 1934 | * @auth: Request to authenticate with the specified peer |
1935 | * (invoked with the wireless_dev mutex held) | ||
1880 | * @assoc: Request to (re)associate with the specified peer | 1936 | * @assoc: Request to (re)associate with the specified peer |
1937 | * (invoked with the wireless_dev mutex held) | ||
1881 | * @deauth: Request to deauthenticate from the specified peer | 1938 | * @deauth: Request to deauthenticate from the specified peer |
1939 | * (invoked with the wireless_dev mutex held) | ||
1882 | * @disassoc: Request to disassociate from the specified peer | 1940 | * @disassoc: Request to disassociate from the specified peer |
1941 | * (invoked with the wireless_dev mutex held) | ||
1883 | * | 1942 | * |
1884 | * @connect: Connect to the ESS with the specified parameters. When connected, | 1943 | * @connect: Connect to the ESS with the specified parameters. When connected, |
1885 | * call cfg80211_connect_result() with status code %WLAN_STATUS_SUCCESS. | 1944 | * call cfg80211_connect_result() with status code %WLAN_STATUS_SUCCESS. |
1886 | * If the connection fails for some reason, call cfg80211_connect_result() | 1945 | * If the connection fails for some reason, call cfg80211_connect_result() |
1887 | * with the status from the AP. | 1946 | * with the status from the AP. |
1947 | * (invoked with the wireless_dev mutex held) | ||
1888 | * @disconnect: Disconnect from the BSS/ESS. | 1948 | * @disconnect: Disconnect from the BSS/ESS. |
1949 | * (invoked with the wireless_dev mutex held) | ||
1889 | * | 1950 | * |
1890 | * @join_ibss: Join the specified IBSS (or create if necessary). Once done, call | 1951 | * @join_ibss: Join the specified IBSS (or create if necessary). Once done, call |
1891 | * cfg80211_ibss_joined(), also call that function when changing BSSID due | 1952 | * cfg80211_ibss_joined(), also call that function when changing BSSID due |
1892 | * to a merge. | 1953 | * to a merge. |
1954 | * (invoked with the wireless_dev mutex held) | ||
1893 | * @leave_ibss: Leave the IBSS. | 1955 | * @leave_ibss: Leave the IBSS. |
1956 | * (invoked with the wireless_dev mutex held) | ||
1894 | * | 1957 | * |
1895 | * @set_mcast_rate: Set the specified multicast rate (only if vif is in ADHOC or | 1958 | * @set_mcast_rate: Set the specified multicast rate (only if vif is in ADHOC or |
1896 | * MESH mode) | 1959 | * MESH mode) |
@@ -2307,6 +2370,7 @@ struct cfg80211_ops { | |||
2307 | * responds to probe-requests in hardware. | 2370 | * responds to probe-requests in hardware. |
2308 | * @WIPHY_FLAG_OFFCHAN_TX: Device supports direct off-channel TX. | 2371 | * @WIPHY_FLAG_OFFCHAN_TX: Device supports direct off-channel TX. |
2309 | * @WIPHY_FLAG_HAS_REMAIN_ON_CHANNEL: Device supports remain-on-channel call. | 2372 | * @WIPHY_FLAG_HAS_REMAIN_ON_CHANNEL: Device supports remain-on-channel call. |
2373 | * @WIPHY_FLAG_SUPPORTS_5_10_MHZ: Device supports 5 MHz and 10 MHz channels. | ||
2310 | */ | 2374 | */ |
2311 | enum wiphy_flags { | 2375 | enum wiphy_flags { |
2312 | WIPHY_FLAG_CUSTOM_REGULATORY = BIT(0), | 2376 | WIPHY_FLAG_CUSTOM_REGULATORY = BIT(0), |
@@ -2330,6 +2394,7 @@ enum wiphy_flags { | |||
2330 | WIPHY_FLAG_AP_PROBE_RESP_OFFLOAD = BIT(19), | 2394 | WIPHY_FLAG_AP_PROBE_RESP_OFFLOAD = BIT(19), |
2331 | WIPHY_FLAG_OFFCHAN_TX = BIT(20), | 2395 | WIPHY_FLAG_OFFCHAN_TX = BIT(20), |
2332 | WIPHY_FLAG_HAS_REMAIN_ON_CHANNEL = BIT(21), | 2396 | WIPHY_FLAG_HAS_REMAIN_ON_CHANNEL = BIT(21), |
2397 | WIPHY_FLAG_SUPPORTS_5_10_MHZ = BIT(22), | ||
2333 | }; | 2398 | }; |
2334 | 2399 | ||
2335 | /** | 2400 | /** |
@@ -2556,6 +2621,9 @@ struct wiphy_wowlan_support { | |||
2556 | * may request, if implemented. | 2621 | * may request, if implemented. |
2557 | * | 2622 | * |
2558 | * @wowlan: WoWLAN support information | 2623 | * @wowlan: WoWLAN support information |
2624 | * @wowlan_config: current WoWLAN configuration; this should usually not be | ||
2625 | * used since access to it is necessarily racy, use the parameter passed | ||
2626 | * to the suspend() operation instead. | ||
2559 | * | 2627 | * |
2560 | * @ap_sme_capa: AP SME capabilities, flags from &enum nl80211_ap_sme_features. | 2628 | * @ap_sme_capa: AP SME capabilities, flags from &enum nl80211_ap_sme_features. |
2561 | * @ht_capa_mod_mask: Specify what ht_cap values can be over-ridden. | 2629 | * @ht_capa_mod_mask: Specify what ht_cap values can be over-ridden. |
@@ -2622,7 +2690,8 @@ struct wiphy { | |||
2622 | u32 hw_version; | 2690 | u32 hw_version; |
2623 | 2691 | ||
2624 | #ifdef CONFIG_PM | 2692 | #ifdef CONFIG_PM |
2625 | struct wiphy_wowlan_support wowlan; | 2693 | const struct wiphy_wowlan_support *wowlan; |
2694 | struct cfg80211_wowlan *wowlan_config; | ||
2626 | #endif | 2695 | #endif |
2627 | 2696 | ||
2628 | u16 max_remain_on_channel_duration; | 2697 | u16 max_remain_on_channel_duration; |
@@ -2820,7 +2889,7 @@ struct cfg80211_cached_keys; | |||
2820 | * @current_bss: (private) Used by the internal configuration code | 2889 | * @current_bss: (private) Used by the internal configuration code |
2821 | * @channel: (private) Used by the internal configuration code to track | 2890 | * @channel: (private) Used by the internal configuration code to track |
2822 | * the user-set AP, monitor and WDS channel | 2891 | * the user-set AP, monitor and WDS channel |
2823 | * @preset_chan: (private) Used by the internal configuration code to | 2892 | * @preset_chandef: (private) Used by the internal configuration code to |
2824 | * track the channel to be used for AP later | 2893 | * track the channel to be used for AP later |
2825 | * @bssid: (private) Used by the internal configuration code | 2894 | * @bssid: (private) Used by the internal configuration code |
2826 | * @ssid: (private) Used by the internal configuration code | 2895 | * @ssid: (private) Used by the internal configuration code |
@@ -2834,14 +2903,23 @@ struct cfg80211_cached_keys; | |||
2834 | * by cfg80211 on change_interface | 2903 | * by cfg80211 on change_interface |
2835 | * @mgmt_registrations: list of registrations for management frames | 2904 | * @mgmt_registrations: list of registrations for management frames |
2836 | * @mgmt_registrations_lock: lock for the list | 2905 | * @mgmt_registrations_lock: lock for the list |
2837 | * @mtx: mutex used to lock data in this struct | 2906 | * @mtx: mutex used to lock data in this struct, may be used by drivers |
2838 | * @cleanup_work: work struct used for cleanup that can't be done directly | 2907 | * and some API functions require it held |
2839 | * @beacon_interval: beacon interval used on this device for transmitting | 2908 | * @beacon_interval: beacon interval used on this device for transmitting |
2840 | * beacons, 0 when not valid | 2909 | * beacons, 0 when not valid |
2841 | * @address: The address for this device, valid only if @netdev is %NULL | 2910 | * @address: The address for this device, valid only if @netdev is %NULL |
2842 | * @p2p_started: true if this is a P2P Device that has been started | 2911 | * @p2p_started: true if this is a P2P Device that has been started |
2843 | * @cac_started: true if DFS channel availability check has been started | 2912 | * @cac_started: true if DFS channel availability check has been started |
2844 | * @cac_start_time: timestamp (jiffies) when the dfs state was entered. | 2913 | * @cac_start_time: timestamp (jiffies) when the dfs state was entered. |
2914 | * @ps: powersave mode is enabled | ||
2915 | * @ps_timeout: dynamic powersave timeout | ||
2916 | * @ap_unexpected_nlportid: (private) netlink port ID of application | ||
2917 | * registered for unexpected class 3 frames (AP mode) | ||
2918 | * @conn: (private) cfg80211 software SME connection state machine data | ||
2919 | * @connect_keys: (private) keys to set after connection is established | ||
2920 | * @ibss_fixed: (private) IBSS is using fixed BSSID | ||
2921 | * @event_list: (private) list for internal event processing | ||
2922 | * @event_lock: (private) lock for event list | ||
2845 | */ | 2923 | */ |
2846 | struct wireless_dev { | 2924 | struct wireless_dev { |
2847 | struct wiphy *wiphy; | 2925 | struct wiphy *wiphy; |
@@ -2858,8 +2936,6 @@ struct wireless_dev { | |||
2858 | 2936 | ||
2859 | struct mutex mtx; | 2937 | struct mutex mtx; |
2860 | 2938 | ||
2861 | struct work_struct cleanup_work; | ||
2862 | |||
2863 | bool use_4addr, p2p_started; | 2939 | bool use_4addr, p2p_started; |
2864 | 2940 | ||
2865 | u8 address[ETH_ALEN] __aligned(sizeof(u16)); | 2941 | u8 address[ETH_ALEN] __aligned(sizeof(u16)); |
@@ -2867,11 +2943,6 @@ struct wireless_dev { | |||
2867 | /* currently used for IBSS and SME - might be rearranged later */ | 2943 | /* currently used for IBSS and SME - might be rearranged later */ |
2868 | u8 ssid[IEEE80211_MAX_SSID_LEN]; | 2944 | u8 ssid[IEEE80211_MAX_SSID_LEN]; |
2869 | u8 ssid_len, mesh_id_len, mesh_id_up_len; | 2945 | u8 ssid_len, mesh_id_len, mesh_id_up_len; |
2870 | enum { | ||
2871 | CFG80211_SME_IDLE, | ||
2872 | CFG80211_SME_CONNECTING, | ||
2873 | CFG80211_SME_CONNECTED, | ||
2874 | } sme_state; | ||
2875 | struct cfg80211_conn *conn; | 2946 | struct cfg80211_conn *conn; |
2876 | struct cfg80211_cached_keys *connect_keys; | 2947 | struct cfg80211_cached_keys *connect_keys; |
2877 | 2948 | ||
@@ -2989,6 +3060,15 @@ struct ieee80211_rate * | |||
2989 | ieee80211_get_response_rate(struct ieee80211_supported_band *sband, | 3060 | ieee80211_get_response_rate(struct ieee80211_supported_band *sband, |
2990 | u32 basic_rates, int bitrate); | 3061 | u32 basic_rates, int bitrate); |
2991 | 3062 | ||
3063 | /** | ||
3064 | * ieee80211_mandatory_rates - get mandatory rates for a given band | ||
3065 | * @sband: the band to look for rates in | ||
3066 | * | ||
3067 | * This function returns a bitmap of the mandatory rates for the given | ||
3068 | * band, bits are set according to the rate position in the bitrates array. | ||
3069 | */ | ||
3070 | u32 ieee80211_mandatory_rates(struct ieee80211_supported_band *sband); | ||
3071 | |||
2992 | /* | 3072 | /* |
2993 | * Radiotap parsing functions -- for controlled injection support | 3073 | * Radiotap parsing functions -- for controlled injection support |
2994 | * | 3074 | * |
@@ -3392,122 +3472,87 @@ void cfg80211_put_bss(struct wiphy *wiphy, struct cfg80211_bss *bss); | |||
3392 | void cfg80211_unlink_bss(struct wiphy *wiphy, struct cfg80211_bss *bss); | 3472 | void cfg80211_unlink_bss(struct wiphy *wiphy, struct cfg80211_bss *bss); |
3393 | 3473 | ||
3394 | /** | 3474 | /** |
3395 | * cfg80211_send_rx_auth - notification of processed authentication | 3475 | * cfg80211_rx_mlme_mgmt - notification of processed MLME management frame |
3396 | * @dev: network device | 3476 | * @dev: network device |
3397 | * @buf: authentication frame (header + body) | 3477 | * @buf: authentication frame (header + body) |
3398 | * @len: length of the frame data | 3478 | * @len: length of the frame data |
3399 | * | 3479 | * |
3400 | * This function is called whenever an authentication has been processed in | 3480 | * This function is called whenever an authentication, disassociation or |
3401 | * station mode. The driver is required to call either this function or | 3481 | * deauthentication frame has been received and processed in station mode. |
3402 | * cfg80211_send_auth_timeout() to indicate the result of cfg80211_ops::auth() | 3482 | * After being asked to authenticate via cfg80211_ops::auth() the driver must |
3403 | * call. This function may sleep. | 3483 | * call either this function or cfg80211_auth_timeout(). |
3484 | * After being asked to associate via cfg80211_ops::assoc() the driver must | ||
3485 | * call either this function or cfg80211_auth_timeout(). | ||
3486 | * While connected, the driver must calls this for received and processed | ||
3487 | * disassociation and deauthentication frames. If the frame couldn't be used | ||
3488 | * because it was unprotected, the driver must call the function | ||
3489 | * cfg80211_rx_unprot_mlme_mgmt() instead. | ||
3490 | * | ||
3491 | * This function may sleep. The caller must hold the corresponding wdev's mutex. | ||
3404 | */ | 3492 | */ |
3405 | void cfg80211_send_rx_auth(struct net_device *dev, const u8 *buf, size_t len); | 3493 | void cfg80211_rx_mlme_mgmt(struct net_device *dev, const u8 *buf, size_t len); |
3406 | 3494 | ||
3407 | /** | 3495 | /** |
3408 | * cfg80211_send_auth_timeout - notification of timed out authentication | 3496 | * cfg80211_auth_timeout - notification of timed out authentication |
3409 | * @dev: network device | 3497 | * @dev: network device |
3410 | * @addr: The MAC address of the device with which the authentication timed out | 3498 | * @addr: The MAC address of the device with which the authentication timed out |
3411 | * | 3499 | * |
3412 | * This function may sleep. | 3500 | * This function may sleep. The caller must hold the corresponding wdev's |
3501 | * mutex. | ||
3413 | */ | 3502 | */ |
3414 | void cfg80211_send_auth_timeout(struct net_device *dev, const u8 *addr); | 3503 | void cfg80211_auth_timeout(struct net_device *dev, const u8 *addr); |
3415 | 3504 | ||
3416 | /** | 3505 | /** |
3417 | * cfg80211_send_rx_assoc - notification of processed association | 3506 | * cfg80211_rx_assoc_resp - notification of processed association response |
3418 | * @dev: network device | 3507 | * @dev: network device |
3419 | * @bss: the BSS struct association was requested for, the struct reference | 3508 | * @bss: the BSS that association was requested with, ownership of the pointer |
3420 | * is owned by cfg80211 after this call | 3509 | * moves to cfg80211 in this call |
3421 | * @buf: (re)association response frame (header + body) | 3510 | * @buf: authentication frame (header + body) |
3422 | * @len: length of the frame data | 3511 | * @len: length of the frame data |
3423 | * | 3512 | * |
3424 | * This function is called whenever a (re)association response has been | 3513 | * After being asked to associate via cfg80211_ops::assoc() the driver must |
3425 | * processed in station mode. The driver is required to call either this | 3514 | * call either this function or cfg80211_auth_timeout(). |
3426 | * function or cfg80211_send_assoc_timeout() to indicate the result of | 3515 | * |
3427 | * cfg80211_ops::assoc() call. This function may sleep. | 3516 | * This function may sleep. The caller must hold the corresponding wdev's mutex. |
3428 | */ | 3517 | */ |
3429 | void cfg80211_send_rx_assoc(struct net_device *dev, struct cfg80211_bss *bss, | 3518 | void cfg80211_rx_assoc_resp(struct net_device *dev, |
3519 | struct cfg80211_bss *bss, | ||
3430 | const u8 *buf, size_t len); | 3520 | const u8 *buf, size_t len); |
3431 | 3521 | ||
3432 | /** | 3522 | /** |
3433 | * cfg80211_send_assoc_timeout - notification of timed out association | 3523 | * cfg80211_assoc_timeout - notification of timed out association |
3434 | * @dev: network device | 3524 | * @dev: network device |
3435 | * @addr: The MAC address of the device with which the association timed out | 3525 | * @bss: The BSS entry with which association timed out. |
3436 | * | 3526 | * |
3437 | * This function may sleep. | 3527 | * This function may sleep. The caller must hold the corresponding wdev's mutex. |
3438 | */ | 3528 | */ |
3439 | void cfg80211_send_assoc_timeout(struct net_device *dev, const u8 *addr); | 3529 | void cfg80211_assoc_timeout(struct net_device *dev, struct cfg80211_bss *bss); |
3440 | 3530 | ||
3441 | /** | 3531 | /** |
3442 | * cfg80211_send_deauth - notification of processed deauthentication | 3532 | * cfg80211_tx_mlme_mgmt - notification of transmitted deauth/disassoc frame |
3443 | * @dev: network device | 3533 | * @dev: network device |
3444 | * @buf: deauthentication frame (header + body) | 3534 | * @buf: 802.11 frame (header + body) |
3445 | * @len: length of the frame data | 3535 | * @len: length of the frame data |
3446 | * | 3536 | * |
3447 | * This function is called whenever deauthentication has been processed in | 3537 | * This function is called whenever deauthentication has been processed in |
3448 | * station mode. This includes both received deauthentication frames and | 3538 | * station mode. This includes both received deauthentication frames and |
3449 | * locally generated ones. This function may sleep. | 3539 | * locally generated ones. This function may sleep. The caller must hold the |
3450 | */ | 3540 | * corresponding wdev's mutex. |
3451 | void cfg80211_send_deauth(struct net_device *dev, const u8 *buf, size_t len); | ||
3452 | |||
3453 | /** | ||
3454 | * __cfg80211_send_deauth - notification of processed deauthentication | ||
3455 | * @dev: network device | ||
3456 | * @buf: deauthentication frame (header + body) | ||
3457 | * @len: length of the frame data | ||
3458 | * | ||
3459 | * Like cfg80211_send_deauth(), but doesn't take the wdev lock. | ||
3460 | */ | ||
3461 | void __cfg80211_send_deauth(struct net_device *dev, const u8 *buf, size_t len); | ||
3462 | |||
3463 | /** | ||
3464 | * cfg80211_send_disassoc - notification of processed disassociation | ||
3465 | * @dev: network device | ||
3466 | * @buf: disassociation response frame (header + body) | ||
3467 | * @len: length of the frame data | ||
3468 | * | ||
3469 | * This function is called whenever disassociation has been processed in | ||
3470 | * station mode. This includes both received disassociation frames and locally | ||
3471 | * generated ones. This function may sleep. | ||
3472 | */ | ||
3473 | void cfg80211_send_disassoc(struct net_device *dev, const u8 *buf, size_t len); | ||
3474 | |||
3475 | /** | ||
3476 | * __cfg80211_send_disassoc - notification of processed disassociation | ||
3477 | * @dev: network device | ||
3478 | * @buf: disassociation response frame (header + body) | ||
3479 | * @len: length of the frame data | ||
3480 | * | ||
3481 | * Like cfg80211_send_disassoc(), but doesn't take the wdev lock. | ||
3482 | */ | 3541 | */ |
3483 | void __cfg80211_send_disassoc(struct net_device *dev, const u8 *buf, | 3542 | void cfg80211_tx_mlme_mgmt(struct net_device *dev, const u8 *buf, size_t len); |
3484 | size_t len); | ||
3485 | 3543 | ||
3486 | /** | 3544 | /** |
3487 | * cfg80211_send_unprot_deauth - notification of unprotected deauthentication | 3545 | * cfg80211_rx_unprot_mlme_mgmt - notification of unprotected mlme mgmt frame |
3488 | * @dev: network device | 3546 | * @dev: network device |
3489 | * @buf: deauthentication frame (header + body) | 3547 | * @buf: deauthentication frame (header + body) |
3490 | * @len: length of the frame data | 3548 | * @len: length of the frame data |
3491 | * | 3549 | * |
3492 | * This function is called whenever a received Deauthentication frame has been | 3550 | * This function is called whenever a received deauthentication or dissassoc |
3493 | * dropped in station mode because of MFP being used but the Deauthentication | 3551 | * frame has been dropped in station mode because of MFP being used but the |
3494 | * frame was not protected. This function may sleep. | 3552 | * frame was not protected. This function may sleep. |
3495 | */ | 3553 | */ |
3496 | void cfg80211_send_unprot_deauth(struct net_device *dev, const u8 *buf, | 3554 | void cfg80211_rx_unprot_mlme_mgmt(struct net_device *dev, |
3497 | size_t len); | 3555 | const u8 *buf, size_t len); |
3498 | |||
3499 | /** | ||
3500 | * cfg80211_send_unprot_disassoc - notification of unprotected disassociation | ||
3501 | * @dev: network device | ||
3502 | * @buf: disassociation frame (header + body) | ||
3503 | * @len: length of the frame data | ||
3504 | * | ||
3505 | * This function is called whenever a received Disassociation frame has been | ||
3506 | * dropped in station mode because of MFP being used but the Disassociation | ||
3507 | * frame was not protected. This function may sleep. | ||
3508 | */ | ||
3509 | void cfg80211_send_unprot_disassoc(struct net_device *dev, const u8 *buf, | ||
3510 | size_t len); | ||
3511 | 3556 | ||
3512 | /** | 3557 | /** |
3513 | * cfg80211_michael_mic_failure - notification of Michael MIC failure (TKIP) | 3558 | * cfg80211_michael_mic_failure - notification of Michael MIC failure (TKIP) |
@@ -4153,6 +4198,7 @@ void cfg80211_report_wowlan_wakeup(struct wireless_dev *wdev, | |||
4153 | * cfg80211_crit_proto_stopped() - indicate critical protocol stopped by driver. | 4198 | * cfg80211_crit_proto_stopped() - indicate critical protocol stopped by driver. |
4154 | * | 4199 | * |
4155 | * @wdev: the wireless device for which critical protocol is stopped. | 4200 | * @wdev: the wireless device for which critical protocol is stopped. |
4201 | * @gfp: allocation flags | ||
4156 | * | 4202 | * |
4157 | * This function can be called by the driver to indicate it has reverted | 4203 | * This function can be called by the driver to indicate it has reverted |
4158 | * operation back to normal. One reason could be that the duration given | 4204 | * operation back to normal. One reason could be that the duration given |
diff --git a/include/net/gen_stats.h b/include/net/gen_stats.h index a79b6cfb02a8..cf8439ba4d11 100644 --- a/include/net/gen_stats.h +++ b/include/net/gen_stats.h | |||
@@ -30,7 +30,7 @@ extern int gnet_stats_copy_basic(struct gnet_dump *d, | |||
30 | struct gnet_stats_basic_packed *b); | 30 | struct gnet_stats_basic_packed *b); |
31 | extern int gnet_stats_copy_rate_est(struct gnet_dump *d, | 31 | extern int gnet_stats_copy_rate_est(struct gnet_dump *d, |
32 | const struct gnet_stats_basic_packed *b, | 32 | const struct gnet_stats_basic_packed *b, |
33 | struct gnet_stats_rate_est *r); | 33 | struct gnet_stats_rate_est64 *r); |
34 | extern int gnet_stats_copy_queue(struct gnet_dump *d, | 34 | extern int gnet_stats_copy_queue(struct gnet_dump *d, |
35 | struct gnet_stats_queue *q); | 35 | struct gnet_stats_queue *q); |
36 | extern int gnet_stats_copy_app(struct gnet_dump *d, void *st, int len); | 36 | extern int gnet_stats_copy_app(struct gnet_dump *d, void *st, int len); |
@@ -38,13 +38,13 @@ extern int gnet_stats_copy_app(struct gnet_dump *d, void *st, int len); | |||
38 | extern int gnet_stats_finish_copy(struct gnet_dump *d); | 38 | extern int gnet_stats_finish_copy(struct gnet_dump *d); |
39 | 39 | ||
40 | extern int gen_new_estimator(struct gnet_stats_basic_packed *bstats, | 40 | extern int gen_new_estimator(struct gnet_stats_basic_packed *bstats, |
41 | struct gnet_stats_rate_est *rate_est, | 41 | struct gnet_stats_rate_est64 *rate_est, |
42 | spinlock_t *stats_lock, struct nlattr *opt); | 42 | spinlock_t *stats_lock, struct nlattr *opt); |
43 | extern void gen_kill_estimator(struct gnet_stats_basic_packed *bstats, | 43 | extern void gen_kill_estimator(struct gnet_stats_basic_packed *bstats, |
44 | struct gnet_stats_rate_est *rate_est); | 44 | struct gnet_stats_rate_est64 *rate_est); |
45 | extern int gen_replace_estimator(struct gnet_stats_basic_packed *bstats, | 45 | extern int gen_replace_estimator(struct gnet_stats_basic_packed *bstats, |
46 | struct gnet_stats_rate_est *rate_est, | 46 | struct gnet_stats_rate_est64 *rate_est, |
47 | spinlock_t *stats_lock, struct nlattr *opt); | 47 | spinlock_t *stats_lock, struct nlattr *opt); |
48 | extern bool gen_estimator_active(const struct gnet_stats_basic_packed *bstats, | 48 | extern bool gen_estimator_active(const struct gnet_stats_basic_packed *bstats, |
49 | const struct gnet_stats_rate_est *rate_est); | 49 | const struct gnet_stats_rate_est64 *rate_est); |
50 | #endif | 50 | #endif |
diff --git a/include/net/gre.h b/include/net/gre.h index 9f03a390c826..57e4afdf7879 100644 --- a/include/net/gre.h +++ b/include/net/gre.h | |||
@@ -7,6 +7,7 @@ | |||
7 | #define GREPROTO_CISCO 0 | 7 | #define GREPROTO_CISCO 0 |
8 | #define GREPROTO_PPTP 1 | 8 | #define GREPROTO_PPTP 1 |
9 | #define GREPROTO_MAX 2 | 9 | #define GREPROTO_MAX 2 |
10 | #define GRE_IP_PROTO_MAX 2 | ||
10 | 11 | ||
11 | struct gre_protocol { | 12 | struct gre_protocol { |
12 | int (*handler)(struct sk_buff *skb); | 13 | int (*handler)(struct sk_buff *skb); |
@@ -22,6 +23,36 @@ struct gre_base_hdr { | |||
22 | int gre_add_protocol(const struct gre_protocol *proto, u8 version); | 23 | int gre_add_protocol(const struct gre_protocol *proto, u8 version); |
23 | int gre_del_protocol(const struct gre_protocol *proto, u8 version); | 24 | int gre_del_protocol(const struct gre_protocol *proto, u8 version); |
24 | 25 | ||
26 | struct gre_cisco_protocol { | ||
27 | int (*handler)(struct sk_buff *skb, const struct tnl_ptk_info *tpi); | ||
28 | int (*err_handler)(struct sk_buff *skb, u32 info, | ||
29 | const struct tnl_ptk_info *tpi); | ||
30 | u8 priority; | ||
31 | }; | ||
32 | |||
33 | int gre_cisco_register(struct gre_cisco_protocol *proto); | ||
34 | int gre_cisco_unregister(struct gre_cisco_protocol *proto); | ||
35 | |||
36 | int gre_offload_init(void); | ||
37 | void gre_offload_exit(void); | ||
38 | |||
39 | void gre_build_header(struct sk_buff *skb, const struct tnl_ptk_info *tpi, | ||
40 | int hdr_len); | ||
41 | struct sk_buff *gre_handle_offloads(struct sk_buff *skb, bool gre_csum); | ||
42 | |||
43 | static inline int ip_gre_calc_hlen(__be16 o_flags) | ||
44 | { | ||
45 | int addend = 4; | ||
46 | |||
47 | if (o_flags&TUNNEL_CSUM) | ||
48 | addend += 4; | ||
49 | if (o_flags&TUNNEL_KEY) | ||
50 | addend += 4; | ||
51 | if (o_flags&TUNNEL_SEQ) | ||
52 | addend += 4; | ||
53 | return addend; | ||
54 | } | ||
55 | |||
25 | static inline __be16 gre_flags_to_tnl_flags(__be16 flags) | 56 | static inline __be16 gre_flags_to_tnl_flags(__be16 flags) |
26 | { | 57 | { |
27 | __be16 tflags = 0; | 58 | __be16 tflags = 0; |
diff --git a/include/net/ieee80211_radiotap.h b/include/net/ieee80211_radiotap.h index c3999632e616..c6d07cb074bc 100644 --- a/include/net/ieee80211_radiotap.h +++ b/include/net/ieee80211_radiotap.h | |||
@@ -269,6 +269,7 @@ enum ieee80211_radiotap_type { | |||
269 | #define IEEE80211_RADIOTAP_MCS_HAVE_GI 0x04 | 269 | #define IEEE80211_RADIOTAP_MCS_HAVE_GI 0x04 |
270 | #define IEEE80211_RADIOTAP_MCS_HAVE_FMT 0x08 | 270 | #define IEEE80211_RADIOTAP_MCS_HAVE_FMT 0x08 |
271 | #define IEEE80211_RADIOTAP_MCS_HAVE_FEC 0x10 | 271 | #define IEEE80211_RADIOTAP_MCS_HAVE_FEC 0x10 |
272 | #define IEEE80211_RADIOTAP_MCS_HAVE_STBC 0x20 | ||
272 | 273 | ||
273 | #define IEEE80211_RADIOTAP_MCS_BW_MASK 0x03 | 274 | #define IEEE80211_RADIOTAP_MCS_BW_MASK 0x03 |
274 | #define IEEE80211_RADIOTAP_MCS_BW_20 0 | 275 | #define IEEE80211_RADIOTAP_MCS_BW_20 0 |
@@ -278,6 +279,12 @@ enum ieee80211_radiotap_type { | |||
278 | #define IEEE80211_RADIOTAP_MCS_SGI 0x04 | 279 | #define IEEE80211_RADIOTAP_MCS_SGI 0x04 |
279 | #define IEEE80211_RADIOTAP_MCS_FMT_GF 0x08 | 280 | #define IEEE80211_RADIOTAP_MCS_FMT_GF 0x08 |
280 | #define IEEE80211_RADIOTAP_MCS_FEC_LDPC 0x10 | 281 | #define IEEE80211_RADIOTAP_MCS_FEC_LDPC 0x10 |
282 | #define IEEE80211_RADIOTAP_MCS_STBC_MASK 0x60 | ||
283 | #define IEEE80211_RADIOTAP_MCS_STBC_1 1 | ||
284 | #define IEEE80211_RADIOTAP_MCS_STBC_2 2 | ||
285 | #define IEEE80211_RADIOTAP_MCS_STBC_3 3 | ||
286 | |||
287 | #define IEEE80211_RADIOTAP_MCS_STBC_SHIFT 5 | ||
281 | 288 | ||
282 | /* For IEEE80211_RADIOTAP_AMPDU_STATUS */ | 289 | /* For IEEE80211_RADIOTAP_AMPDU_STATUS */ |
283 | #define IEEE80211_RADIOTAP_AMPDU_REPORT_ZEROLEN 0x0001 | 290 | #define IEEE80211_RADIOTAP_AMPDU_REPORT_ZEROLEN 0x0001 |
diff --git a/include/net/if_inet6.h b/include/net/if_inet6.h index 100fb8cec17c..736b5fb95474 100644 --- a/include/net/if_inet6.h +++ b/include/net/if_inet6.h | |||
@@ -50,7 +50,7 @@ struct inet6_ifaddr { | |||
50 | 50 | ||
51 | int state; | 51 | int state; |
52 | 52 | ||
53 | __u8 probes; | 53 | __u8 dad_probes; |
54 | __u8 flags; | 54 | __u8 flags; |
55 | 55 | ||
56 | __u16 scope; | 56 | __u16 scope; |
@@ -58,7 +58,7 @@ struct inet6_ifaddr { | |||
58 | unsigned long cstamp; /* created timestamp */ | 58 | unsigned long cstamp; /* created timestamp */ |
59 | unsigned long tstamp; /* updated timestamp */ | 59 | unsigned long tstamp; /* updated timestamp */ |
60 | 60 | ||
61 | struct timer_list timer; | 61 | struct timer_list dad_timer; |
62 | 62 | ||
63 | struct inet6_dev *idev; | 63 | struct inet6_dev *idev; |
64 | struct rt6_info *rt; | 64 | struct rt6_info *rt; |
@@ -74,6 +74,7 @@ struct inet6_ifaddr { | |||
74 | bool tokenized; | 74 | bool tokenized; |
75 | 75 | ||
76 | struct rcu_head rcu; | 76 | struct rcu_head rcu; |
77 | struct in6_addr peer_addr; | ||
77 | }; | 78 | }; |
78 | 79 | ||
79 | struct ip6_sf_socklist { | 80 | struct ip6_sf_socklist { |
@@ -165,6 +166,7 @@ struct inet6_dev { | |||
165 | struct net_device *dev; | 166 | struct net_device *dev; |
166 | 167 | ||
167 | struct list_head addr_list; | 168 | struct list_head addr_list; |
169 | int valid_ll_addr_cnt; | ||
168 | 170 | ||
169 | struct ifmcaddr6 *mc_list; | 171 | struct ifmcaddr6 *mc_list; |
170 | struct ifmcaddr6 *mc_tomb; | 172 | struct ifmcaddr6 *mc_tomb; |
@@ -172,10 +174,12 @@ struct inet6_dev { | |||
172 | unsigned char mc_qrv; | 174 | unsigned char mc_qrv; |
173 | unsigned char mc_gq_running; | 175 | unsigned char mc_gq_running; |
174 | unsigned char mc_ifc_count; | 176 | unsigned char mc_ifc_count; |
177 | unsigned char mc_dad_count; | ||
175 | unsigned long mc_v1_seen; | 178 | unsigned long mc_v1_seen; |
176 | unsigned long mc_maxdelay; | 179 | unsigned long mc_maxdelay; |
177 | struct timer_list mc_gq_timer; /* general query timer */ | 180 | struct timer_list mc_gq_timer; /* general query timer */ |
178 | struct timer_list mc_ifc_timer; /* interface change timer */ | 181 | struct timer_list mc_ifc_timer; /* interface change timer */ |
182 | struct timer_list mc_dad_timer; /* dad complete mc timer */ | ||
179 | 183 | ||
180 | struct ifacaddr6 *ac_list; | 184 | struct ifacaddr6 *ac_list; |
181 | rwlock_t lock; | 185 | rwlock_t lock; |
@@ -192,9 +196,12 @@ struct inet6_dev { | |||
192 | struct in6_addr token; | 196 | struct in6_addr token; |
193 | 197 | ||
194 | struct neigh_parms *nd_parms; | 198 | struct neigh_parms *nd_parms; |
195 | struct inet6_dev *next; | ||
196 | struct ipv6_devconf cnf; | 199 | struct ipv6_devconf cnf; |
197 | struct ipv6_devstat stats; | 200 | struct ipv6_devstat stats; |
201 | |||
202 | struct timer_list rs_timer; | ||
203 | __u8 rs_probes; | ||
204 | |||
198 | unsigned long tstamp; /* ipv6InterfaceTable update timestamp */ | 205 | unsigned long tstamp; /* ipv6InterfaceTable update timestamp */ |
199 | struct rcu_head rcu; | 206 | struct rcu_head rcu; |
200 | }; | 207 | }; |
diff --git a/include/net/inet_ecn.h b/include/net/inet_ecn.h index aab73757bc4d..3bd22795c3e2 100644 --- a/include/net/inet_ecn.h +++ b/include/net/inet_ecn.h | |||
@@ -134,12 +134,14 @@ static inline int INET_ECN_set_ce(struct sk_buff *skb) | |||
134 | { | 134 | { |
135 | switch (skb->protocol) { | 135 | switch (skb->protocol) { |
136 | case cpu_to_be16(ETH_P_IP): | 136 | case cpu_to_be16(ETH_P_IP): |
137 | if (skb->network_header + sizeof(struct iphdr) <= skb->tail) | 137 | if (skb_network_header(skb) + sizeof(struct iphdr) <= |
138 | skb_tail_pointer(skb)) | ||
138 | return IP_ECN_set_ce(ip_hdr(skb)); | 139 | return IP_ECN_set_ce(ip_hdr(skb)); |
139 | break; | 140 | break; |
140 | 141 | ||
141 | case cpu_to_be16(ETH_P_IPV6): | 142 | case cpu_to_be16(ETH_P_IPV6): |
142 | if (skb->network_header + sizeof(struct ipv6hdr) <= skb->tail) | 143 | if (skb_network_header(skb) + sizeof(struct ipv6hdr) <= |
144 | skb_tail_pointer(skb)) | ||
143 | return IP6_ECN_set_ce(ipv6_hdr(skb)); | 145 | return IP6_ECN_set_ce(ipv6_hdr(skb)); |
144 | break; | 146 | break; |
145 | } | 147 | } |
diff --git a/include/net/inet_sock.h b/include/net/inet_sock.h index 7235ae73a1e8..b21a7f06d6a4 100644 --- a/include/net/inet_sock.h +++ b/include/net/inet_sock.h | |||
@@ -32,7 +32,6 @@ | |||
32 | * | 32 | * |
33 | * @faddr - Saved first hop address | 33 | * @faddr - Saved first hop address |
34 | * @nexthop - Saved nexthop address in LSRR and SSRR | 34 | * @nexthop - Saved nexthop address in LSRR and SSRR |
35 | * @is_data - Options in __data, rather than skb | ||
36 | * @is_strictroute - Strict source route | 35 | * @is_strictroute - Strict source route |
37 | * @srr_is_hit - Packet destination addr was our one | 36 | * @srr_is_hit - Packet destination addr was our one |
38 | * @is_changed - IP checksum more not valid | 37 | * @is_changed - IP checksum more not valid |
diff --git a/include/net/ip6_fib.h b/include/net/ip6_fib.h index 2a601e7da1bf..48ec25a7fcb6 100644 --- a/include/net/ip6_fib.h +++ b/include/net/ip6_fib.h | |||
@@ -300,7 +300,7 @@ extern void inet6_rt_notify(int event, struct rt6_info *rt, | |||
300 | struct nl_info *info); | 300 | struct nl_info *info); |
301 | 301 | ||
302 | extern void fib6_run_gc(unsigned long expires, | 302 | extern void fib6_run_gc(unsigned long expires, |
303 | struct net *net); | 303 | struct net *net, bool force); |
304 | 304 | ||
305 | extern void fib6_gc_cleanup(void); | 305 | extern void fib6_gc_cleanup(void); |
306 | 306 | ||
diff --git a/include/net/ip_fib.h b/include/net/ip_fib.h index e49db91593a9..cbf2be37c91a 100644 --- a/include/net/ip_fib.h +++ b/include/net/ip_fib.h | |||
@@ -51,11 +51,13 @@ struct rtable; | |||
51 | 51 | ||
52 | struct fib_nh_exception { | 52 | struct fib_nh_exception { |
53 | struct fib_nh_exception __rcu *fnhe_next; | 53 | struct fib_nh_exception __rcu *fnhe_next; |
54 | int fnhe_genid; | ||
54 | __be32 fnhe_daddr; | 55 | __be32 fnhe_daddr; |
55 | u32 fnhe_pmtu; | 56 | u32 fnhe_pmtu; |
56 | __be32 fnhe_gw; | 57 | __be32 fnhe_gw; |
57 | unsigned long fnhe_expires; | 58 | unsigned long fnhe_expires; |
58 | struct rtable __rcu *fnhe_rth; | 59 | struct rtable __rcu *fnhe_rth_input; |
60 | struct rtable __rcu *fnhe_rth_output; | ||
59 | unsigned long fnhe_stamp; | 61 | unsigned long fnhe_stamp; |
60 | }; | 62 | }; |
61 | 63 | ||
@@ -289,7 +291,6 @@ static inline int fib_num_tclassid_users(struct net *net) | |||
289 | extern int ip_fib_check_default(__be32 gw, struct net_device *dev); | 291 | extern int ip_fib_check_default(__be32 gw, struct net_device *dev); |
290 | extern int fib_sync_down_dev(struct net_device *dev, int force); | 292 | extern int fib_sync_down_dev(struct net_device *dev, int force); |
291 | extern int fib_sync_down_addr(struct net *net, __be32 local); | 293 | extern int fib_sync_down_addr(struct net *net, __be32 local); |
292 | extern void fib_update_nh_saddrs(struct net_device *dev); | ||
293 | extern int fib_sync_up(struct net_device *dev); | 294 | extern int fib_sync_up(struct net_device *dev); |
294 | extern void fib_select_multipath(struct fib_result *res); | 295 | extern void fib_select_multipath(struct fib_result *res); |
295 | 296 | ||
diff --git a/include/net/ip_tunnels.h b/include/net/ip_tunnels.h index 09b1360e10bf..781b3cf86a2f 100644 --- a/include/net/ip_tunnels.h +++ b/include/net/ip_tunnels.h | |||
@@ -42,6 +42,7 @@ struct ip_tunnel { | |||
42 | struct ip_tunnel __rcu *next; | 42 | struct ip_tunnel __rcu *next; |
43 | struct hlist_node hash_node; | 43 | struct hlist_node hash_node; |
44 | struct net_device *dev; | 44 | struct net_device *dev; |
45 | struct net *net; /* netns for packet i/o */ | ||
45 | 46 | ||
46 | int err_count; /* Number of arrived ICMP errors */ | 47 | int err_count; /* Number of arrived ICMP errors */ |
47 | unsigned long err_time; /* Time when the last ICMP error | 48 | unsigned long err_time; /* Time when the last ICMP error |
@@ -73,6 +74,7 @@ struct ip_tunnel { | |||
73 | #define TUNNEL_REC __cpu_to_be16(0x20) | 74 | #define TUNNEL_REC __cpu_to_be16(0x20) |
74 | #define TUNNEL_VERSION __cpu_to_be16(0x40) | 75 | #define TUNNEL_VERSION __cpu_to_be16(0x40) |
75 | #define TUNNEL_NO_KEY __cpu_to_be16(0x80) | 76 | #define TUNNEL_NO_KEY __cpu_to_be16(0x80) |
77 | #define TUNNEL_DONT_FRAGMENT __cpu_to_be16(0x0100) | ||
76 | 78 | ||
77 | struct tnl_ptk_info { | 79 | struct tnl_ptk_info { |
78 | __be16 flags; | 80 | __be16 flags; |
@@ -92,6 +94,8 @@ struct ip_tunnel_net { | |||
92 | struct net_device *fb_tunnel_dev; | 94 | struct net_device *fb_tunnel_dev; |
93 | }; | 95 | }; |
94 | 96 | ||
97 | #ifdef CONFIG_INET | ||
98 | |||
95 | int ip_tunnel_init(struct net_device *dev); | 99 | int ip_tunnel_init(struct net_device *dev); |
96 | void ip_tunnel_uninit(struct net_device *dev); | 100 | void ip_tunnel_uninit(struct net_device *dev); |
97 | void ip_tunnel_dellink(struct net_device *dev, struct list_head *head); | 101 | void ip_tunnel_dellink(struct net_device *dev, struct list_head *head); |
@@ -101,7 +105,7 @@ int ip_tunnel_init_net(struct net *net, int ip_tnl_net_id, | |||
101 | void ip_tunnel_delete_net(struct ip_tunnel_net *itn); | 105 | void ip_tunnel_delete_net(struct ip_tunnel_net *itn); |
102 | 106 | ||
103 | void ip_tunnel_xmit(struct sk_buff *skb, struct net_device *dev, | 107 | void ip_tunnel_xmit(struct sk_buff *skb, struct net_device *dev, |
104 | const struct iphdr *tnl_params); | 108 | const struct iphdr *tnl_params, const u8 protocol); |
105 | int ip_tunnel_ioctl(struct net_device *dev, struct ip_tunnel_parm *p, int cmd); | 109 | int ip_tunnel_ioctl(struct net_device *dev, struct ip_tunnel_parm *p, int cmd); |
106 | int ip_tunnel_change_mtu(struct net_device *dev, int new_mtu); | 110 | int ip_tunnel_change_mtu(struct net_device *dev, int new_mtu); |
107 | 111 | ||
@@ -155,23 +159,31 @@ static inline void tunnel_ip_select_ident(struct sk_buff *skb, | |||
155 | (skb_shinfo(skb)->gso_segs ?: 1) - 1); | 159 | (skb_shinfo(skb)->gso_segs ?: 1) - 1); |
156 | } | 160 | } |
157 | 161 | ||
158 | static inline void iptunnel_xmit(struct sk_buff *skb, struct net_device *dev) | 162 | int iptunnel_pull_header(struct sk_buff *skb, int hdr_len, __be16 inner_proto); |
159 | { | 163 | int iptunnel_xmit(struct net *net, struct rtable *rt, |
160 | int err; | 164 | struct sk_buff *skb, |
161 | int pkt_len = skb->len - skb_transport_offset(skb); | 165 | __be32 src, __be32 dst, __u8 proto, |
162 | struct pcpu_tstats *tstats = this_cpu_ptr(dev->tstats); | 166 | __u8 tos, __u8 ttl, __be16 df); |
163 | 167 | ||
164 | nf_reset(skb); | 168 | static inline void iptunnel_xmit_stats(int err, |
169 | struct net_device_stats *err_stats, | ||
170 | struct pcpu_tstats __percpu *stats) | ||
171 | { | ||
172 | if (err > 0) { | ||
173 | struct pcpu_tstats *tstats = this_cpu_ptr(stats); | ||
165 | 174 | ||
166 | err = ip_local_out(skb); | ||
167 | if (likely(net_xmit_eval(err) == 0)) { | ||
168 | u64_stats_update_begin(&tstats->syncp); | 175 | u64_stats_update_begin(&tstats->syncp); |
169 | tstats->tx_bytes += pkt_len; | 176 | tstats->tx_bytes += err; |
170 | tstats->tx_packets++; | 177 | tstats->tx_packets++; |
171 | u64_stats_update_end(&tstats->syncp); | 178 | u64_stats_update_end(&tstats->syncp); |
179 | } else if (err < 0) { | ||
180 | err_stats->tx_errors++; | ||
181 | err_stats->tx_aborted_errors++; | ||
172 | } else { | 182 | } else { |
173 | dev->stats.tx_errors++; | 183 | err_stats->tx_dropped++; |
174 | dev->stats.tx_aborted_errors++; | ||
175 | } | 184 | } |
176 | } | 185 | } |
186 | |||
187 | #endif /* CONFIG_INET */ | ||
188 | |||
177 | #endif /* __NET_IP_TUNNELS_H */ | 189 | #endif /* __NET_IP_TUNNELS_H */ |
diff --git a/include/net/ip_vs.h b/include/net/ip_vs.h index 4c062ccff9aa..f0d70f066f3d 100644 --- a/include/net/ip_vs.h +++ b/include/net/ip_vs.h | |||
@@ -197,31 +197,6 @@ ip_vs_fill_iph_skb(int af, const struct sk_buff *skb, struct ip_vs_iphdr *iphdr) | |||
197 | } | 197 | } |
198 | } | 198 | } |
199 | 199 | ||
200 | /* This function is a faster version of ip_vs_fill_iph_skb(). | ||
201 | * Where we only populate {s,d}addr (and avoid calling ipv6_find_hdr()). | ||
202 | * This is used by the some of the ip_vs_*_schedule() functions. | ||
203 | * (Mostly done to avoid ABI breakage of external schedulers) | ||
204 | */ | ||
205 | static inline void | ||
206 | ip_vs_fill_iph_addr_only(int af, const struct sk_buff *skb, | ||
207 | struct ip_vs_iphdr *iphdr) | ||
208 | { | ||
209 | #ifdef CONFIG_IP_VS_IPV6 | ||
210 | if (af == AF_INET6) { | ||
211 | const struct ipv6hdr *iph = | ||
212 | (struct ipv6hdr *)skb_network_header(skb); | ||
213 | iphdr->saddr.in6 = iph->saddr; | ||
214 | iphdr->daddr.in6 = iph->daddr; | ||
215 | } else | ||
216 | #endif | ||
217 | { | ||
218 | const struct iphdr *iph = | ||
219 | (struct iphdr *)skb_network_header(skb); | ||
220 | iphdr->saddr.ip = iph->saddr; | ||
221 | iphdr->daddr.ip = iph->daddr; | ||
222 | } | ||
223 | } | ||
224 | |||
225 | static inline void ip_vs_addr_copy(int af, union nf_inet_addr *dst, | 200 | static inline void ip_vs_addr_copy(int af, union nf_inet_addr *dst, |
226 | const union nf_inet_addr *src) | 201 | const union nf_inet_addr *src) |
227 | { | 202 | { |
@@ -405,17 +380,18 @@ enum { | |||
405 | */ | 380 | */ |
406 | enum ip_vs_sctp_states { | 381 | enum ip_vs_sctp_states { |
407 | IP_VS_SCTP_S_NONE, | 382 | IP_VS_SCTP_S_NONE, |
408 | IP_VS_SCTP_S_INIT_CLI, | 383 | IP_VS_SCTP_S_INIT1, |
409 | IP_VS_SCTP_S_INIT_SER, | 384 | IP_VS_SCTP_S_INIT, |
410 | IP_VS_SCTP_S_INIT_ACK_CLI, | 385 | IP_VS_SCTP_S_COOKIE_SENT, |
411 | IP_VS_SCTP_S_INIT_ACK_SER, | 386 | IP_VS_SCTP_S_COOKIE_REPLIED, |
412 | IP_VS_SCTP_S_ECHO_CLI, | 387 | IP_VS_SCTP_S_COOKIE_WAIT, |
413 | IP_VS_SCTP_S_ECHO_SER, | 388 | IP_VS_SCTP_S_COOKIE, |
389 | IP_VS_SCTP_S_COOKIE_ECHOED, | ||
414 | IP_VS_SCTP_S_ESTABLISHED, | 390 | IP_VS_SCTP_S_ESTABLISHED, |
415 | IP_VS_SCTP_S_SHUT_CLI, | 391 | IP_VS_SCTP_S_SHUTDOWN_SENT, |
416 | IP_VS_SCTP_S_SHUT_SER, | 392 | IP_VS_SCTP_S_SHUTDOWN_RECEIVED, |
417 | IP_VS_SCTP_S_SHUT_ACK_CLI, | 393 | IP_VS_SCTP_S_SHUTDOWN_ACK_SENT, |
418 | IP_VS_SCTP_S_SHUT_ACK_SER, | 394 | IP_VS_SCTP_S_REJECTED, |
419 | IP_VS_SCTP_S_CLOSED, | 395 | IP_VS_SCTP_S_CLOSED, |
420 | IP_VS_SCTP_S_LAST | 396 | IP_VS_SCTP_S_LAST |
421 | }; | 397 | }; |
@@ -814,7 +790,8 @@ struct ip_vs_scheduler { | |||
814 | 790 | ||
815 | /* selecting a server from the given service */ | 791 | /* selecting a server from the given service */ |
816 | struct ip_vs_dest* (*schedule)(struct ip_vs_service *svc, | 792 | struct ip_vs_dest* (*schedule)(struct ip_vs_service *svc, |
817 | const struct sk_buff *skb); | 793 | const struct sk_buff *skb, |
794 | struct ip_vs_iphdr *iph); | ||
818 | }; | 795 | }; |
819 | 796 | ||
820 | /* The persistence engine object */ | 797 | /* The persistence engine object */ |
@@ -905,7 +882,7 @@ struct ip_vs_app { | |||
905 | struct ipvs_master_sync_state { | 882 | struct ipvs_master_sync_state { |
906 | struct list_head sync_queue; | 883 | struct list_head sync_queue; |
907 | struct ip_vs_sync_buff *sync_buff; | 884 | struct ip_vs_sync_buff *sync_buff; |
908 | int sync_queue_len; | 885 | unsigned long sync_queue_len; |
909 | unsigned int sync_queue_delay; | 886 | unsigned int sync_queue_delay; |
910 | struct task_struct *master_thread; | 887 | struct task_struct *master_thread; |
911 | struct delayed_work master_wakeup_work; | 888 | struct delayed_work master_wakeup_work; |
@@ -998,10 +975,13 @@ struct netns_ipvs { | |||
998 | int sysctl_snat_reroute; | 975 | int sysctl_snat_reroute; |
999 | int sysctl_sync_ver; | 976 | int sysctl_sync_ver; |
1000 | int sysctl_sync_ports; | 977 | int sysctl_sync_ports; |
1001 | int sysctl_sync_qlen_max; | 978 | int sysctl_sync_persist_mode; |
979 | unsigned long sysctl_sync_qlen_max; | ||
1002 | int sysctl_sync_sock_size; | 980 | int sysctl_sync_sock_size; |
1003 | int sysctl_cache_bypass; | 981 | int sysctl_cache_bypass; |
1004 | int sysctl_expire_nodest_conn; | 982 | int sysctl_expire_nodest_conn; |
983 | int sysctl_sloppy_tcp; | ||
984 | int sysctl_sloppy_sctp; | ||
1005 | int sysctl_expire_quiescent_template; | 985 | int sysctl_expire_quiescent_template; |
1006 | int sysctl_sync_threshold[2]; | 986 | int sysctl_sync_threshold[2]; |
1007 | unsigned int sysctl_sync_refresh_period; | 987 | unsigned int sysctl_sync_refresh_period; |
@@ -1044,6 +1024,8 @@ struct netns_ipvs { | |||
1044 | #define DEFAULT_SYNC_THRESHOLD 3 | 1024 | #define DEFAULT_SYNC_THRESHOLD 3 |
1045 | #define DEFAULT_SYNC_PERIOD 50 | 1025 | #define DEFAULT_SYNC_PERIOD 50 |
1046 | #define DEFAULT_SYNC_VER 1 | 1026 | #define DEFAULT_SYNC_VER 1 |
1027 | #define DEFAULT_SLOPPY_TCP 0 | ||
1028 | #define DEFAULT_SLOPPY_SCTP 0 | ||
1047 | #define DEFAULT_SYNC_REFRESH_PERIOD (0U * HZ) | 1029 | #define DEFAULT_SYNC_REFRESH_PERIOD (0U * HZ) |
1048 | #define DEFAULT_SYNC_RETRIES 0 | 1030 | #define DEFAULT_SYNC_RETRIES 0 |
1049 | #define IPVS_SYNC_WAKEUP_RATE 8 | 1031 | #define IPVS_SYNC_WAKEUP_RATE 8 |
@@ -1080,12 +1062,27 @@ static inline int sysctl_sync_ver(struct netns_ipvs *ipvs) | |||
1080 | return ipvs->sysctl_sync_ver; | 1062 | return ipvs->sysctl_sync_ver; |
1081 | } | 1063 | } |
1082 | 1064 | ||
1065 | static inline int sysctl_sloppy_tcp(struct netns_ipvs *ipvs) | ||
1066 | { | ||
1067 | return ipvs->sysctl_sloppy_tcp; | ||
1068 | } | ||
1069 | |||
1070 | static inline int sysctl_sloppy_sctp(struct netns_ipvs *ipvs) | ||
1071 | { | ||
1072 | return ipvs->sysctl_sloppy_sctp; | ||
1073 | } | ||
1074 | |||
1083 | static inline int sysctl_sync_ports(struct netns_ipvs *ipvs) | 1075 | static inline int sysctl_sync_ports(struct netns_ipvs *ipvs) |
1084 | { | 1076 | { |
1085 | return ACCESS_ONCE(ipvs->sysctl_sync_ports); | 1077 | return ACCESS_ONCE(ipvs->sysctl_sync_ports); |
1086 | } | 1078 | } |
1087 | 1079 | ||
1088 | static inline int sysctl_sync_qlen_max(struct netns_ipvs *ipvs) | 1080 | static inline int sysctl_sync_persist_mode(struct netns_ipvs *ipvs) |
1081 | { | ||
1082 | return ipvs->sysctl_sync_persist_mode; | ||
1083 | } | ||
1084 | |||
1085 | static inline unsigned long sysctl_sync_qlen_max(struct netns_ipvs *ipvs) | ||
1089 | { | 1086 | { |
1090 | return ipvs->sysctl_sync_qlen_max; | 1087 | return ipvs->sysctl_sync_qlen_max; |
1091 | } | 1088 | } |
@@ -1133,12 +1130,27 @@ static inline int sysctl_sync_ver(struct netns_ipvs *ipvs) | |||
1133 | return DEFAULT_SYNC_VER; | 1130 | return DEFAULT_SYNC_VER; |
1134 | } | 1131 | } |
1135 | 1132 | ||
1133 | static inline int sysctl_sloppy_tcp(struct netns_ipvs *ipvs) | ||
1134 | { | ||
1135 | return DEFAULT_SLOPPY_TCP; | ||
1136 | } | ||
1137 | |||
1138 | static inline int sysctl_sloppy_sctp(struct netns_ipvs *ipvs) | ||
1139 | { | ||
1140 | return DEFAULT_SLOPPY_SCTP; | ||
1141 | } | ||
1142 | |||
1136 | static inline int sysctl_sync_ports(struct netns_ipvs *ipvs) | 1143 | static inline int sysctl_sync_ports(struct netns_ipvs *ipvs) |
1137 | { | 1144 | { |
1138 | return 1; | 1145 | return 1; |
1139 | } | 1146 | } |
1140 | 1147 | ||
1141 | static inline int sysctl_sync_qlen_max(struct netns_ipvs *ipvs) | 1148 | static inline int sysctl_sync_persist_mode(struct netns_ipvs *ipvs) |
1149 | { | ||
1150 | return 0; | ||
1151 | } | ||
1152 | |||
1153 | static inline unsigned long sysctl_sync_qlen_max(struct netns_ipvs *ipvs) | ||
1142 | { | 1154 | { |
1143 | return IPVS_SYNC_QLEN_MAX; | 1155 | return IPVS_SYNC_QLEN_MAX; |
1144 | } | 1156 | } |
diff --git a/include/net/ipv6.h b/include/net/ipv6.h index 0810aa57c780..5fe564985171 100644 --- a/include/net/ipv6.h +++ b/include/net/ipv6.h | |||
@@ -260,6 +260,12 @@ static inline void fl6_sock_release(struct ip6_flowlabel *fl) | |||
260 | 260 | ||
261 | extern void icmpv6_notify(struct sk_buff *skb, u8 type, u8 code, __be32 info); | 261 | extern void icmpv6_notify(struct sk_buff *skb, u8 type, u8 code, __be32 info); |
262 | 262 | ||
263 | int icmpv6_push_pending_frames(struct sock *sk, struct flowi6 *fl6, | ||
264 | struct icmp6hdr *thdr, int len); | ||
265 | |||
266 | struct dst_entry *icmpv6_route_lookup(struct net *net, struct sk_buff *skb, | ||
267 | struct sock *sk, struct flowi6 *fl6); | ||
268 | |||
263 | extern int ip6_ra_control(struct sock *sk, int sel); | 269 | extern int ip6_ra_control(struct sock *sk, int sel); |
264 | 270 | ||
265 | extern int ipv6_parse_hopopts(struct sk_buff *skb); | 271 | extern int ipv6_parse_hopopts(struct sk_buff *skb); |
@@ -853,8 +859,8 @@ static inline int snmp6_unregister_dev(struct inet6_dev *idev) { return 0; } | |||
853 | #endif | 859 | #endif |
854 | 860 | ||
855 | #ifdef CONFIG_SYSCTL | 861 | #ifdef CONFIG_SYSCTL |
856 | extern ctl_table ipv6_route_table_template[]; | 862 | extern struct ctl_table ipv6_route_table_template[]; |
857 | extern ctl_table ipv6_icmp_table_template[]; | 863 | extern struct ctl_table ipv6_icmp_table_template[]; |
858 | 864 | ||
859 | extern struct ctl_table *ipv6_icmp_sysctl_init(struct net *net); | 865 | extern struct ctl_table *ipv6_icmp_sysctl_init(struct net *net); |
860 | extern struct ctl_table *ipv6_route_sysctl_init(struct net *net); | 866 | extern struct ctl_table *ipv6_route_sysctl_init(struct net *net); |
diff --git a/include/net/mac80211.h b/include/net/mac80211.h index 885898a40d13..5b7a3dadadde 100644 --- a/include/net/mac80211.h +++ b/include/net/mac80211.h | |||
@@ -217,8 +217,8 @@ struct ieee80211_chanctx_conf { | |||
217 | * @BSS_CHANGED_TXPOWER: TX power setting changed for this interface | 217 | * @BSS_CHANGED_TXPOWER: TX power setting changed for this interface |
218 | * @BSS_CHANGED_P2P_PS: P2P powersave settings (CTWindow, opportunistic PS) | 218 | * @BSS_CHANGED_P2P_PS: P2P powersave settings (CTWindow, opportunistic PS) |
219 | * changed (currently only in P2P client mode, GO mode will be later) | 219 | * changed (currently only in P2P client mode, GO mode will be later) |
220 | * @BSS_CHANGED_DTIM_PERIOD: the DTIM period value was changed (set when | 220 | * @BSS_CHANGED_BEACON_INFO: Data from the AP's beacon became available: |
221 | * it becomes valid, managed mode only) | 221 | * currently dtim_period only is under consideration. |
222 | * @BSS_CHANGED_BANDWIDTH: The bandwidth used by this interface changed, | 222 | * @BSS_CHANGED_BANDWIDTH: The bandwidth used by this interface changed, |
223 | * note that this is only called when it changes after the channel | 223 | * note that this is only called when it changes after the channel |
224 | * context had been assigned. | 224 | * context had been assigned. |
@@ -244,7 +244,7 @@ enum ieee80211_bss_change { | |||
244 | BSS_CHANGED_PS = 1<<17, | 244 | BSS_CHANGED_PS = 1<<17, |
245 | BSS_CHANGED_TXPOWER = 1<<18, | 245 | BSS_CHANGED_TXPOWER = 1<<18, |
246 | BSS_CHANGED_P2P_PS = 1<<19, | 246 | BSS_CHANGED_P2P_PS = 1<<19, |
247 | BSS_CHANGED_DTIM_PERIOD = 1<<20, | 247 | BSS_CHANGED_BEACON_INFO = 1<<20, |
248 | BSS_CHANGED_BANDWIDTH = 1<<21, | 248 | BSS_CHANGED_BANDWIDTH = 1<<21, |
249 | 249 | ||
250 | /* when adding here, make sure to change ieee80211_reconfig */ | 250 | /* when adding here, make sure to change ieee80211_reconfig */ |
@@ -288,7 +288,7 @@ enum ieee80211_rssi_event { | |||
288 | * IEEE80211_HW_2GHZ_SHORT_SLOT_INCAPABLE hardware flag | 288 | * IEEE80211_HW_2GHZ_SHORT_SLOT_INCAPABLE hardware flag |
289 | * @dtim_period: num of beacons before the next DTIM, for beaconing, | 289 | * @dtim_period: num of beacons before the next DTIM, for beaconing, |
290 | * valid in station mode only if after the driver was notified | 290 | * valid in station mode only if after the driver was notified |
291 | * with the %BSS_CHANGED_DTIM_PERIOD flag, will be non-zero then. | 291 | * with the %BSS_CHANGED_BEACON_INFO flag, will be non-zero then. |
292 | * @sync_tsf: last beacon's/probe response's TSF timestamp (could be old | 292 | * @sync_tsf: last beacon's/probe response's TSF timestamp (could be old |
293 | * as it may have been received during scanning long ago). If the | 293 | * as it may have been received during scanning long ago). If the |
294 | * HW flag %IEEE80211_HW_TIMING_BEACON_ONLY is set, then this can | 294 | * HW flag %IEEE80211_HW_TIMING_BEACON_ONLY is set, then this can |
@@ -305,6 +305,7 @@ enum ieee80211_rssi_event { | |||
305 | * @basic_rates: bitmap of basic rates, each bit stands for an | 305 | * @basic_rates: bitmap of basic rates, each bit stands for an |
306 | * index into the rate table configured by the driver in | 306 | * index into the rate table configured by the driver in |
307 | * the current band. | 307 | * the current band. |
308 | * @beacon_rate: associated AP's beacon TX rate | ||
308 | * @mcast_rate: per-band multicast rate index + 1 (0: disabled) | 309 | * @mcast_rate: per-band multicast rate index + 1 (0: disabled) |
309 | * @bssid: The BSSID for this BSS | 310 | * @bssid: The BSSID for this BSS |
310 | * @enable_beacon: whether beaconing should be enabled or not | 311 | * @enable_beacon: whether beaconing should be enabled or not |
@@ -352,6 +353,7 @@ struct ieee80211_bss_conf { | |||
352 | u32 sync_device_ts; | 353 | u32 sync_device_ts; |
353 | u8 sync_dtim_count; | 354 | u8 sync_dtim_count; |
354 | u32 basic_rates; | 355 | u32 basic_rates; |
356 | struct ieee80211_rate *beacon_rate; | ||
355 | int mcast_rate[IEEE80211_NUM_BANDS]; | 357 | int mcast_rate[IEEE80211_NUM_BANDS]; |
356 | u16 ht_operation_mode; | 358 | u16 ht_operation_mode; |
357 | s32 cqm_rssi_thold; | 359 | s32 cqm_rssi_thold; |
@@ -460,6 +462,8 @@ struct ieee80211_bss_conf { | |||
460 | * @IEEE80211_TX_CTL_DONTFRAG: Don't fragment this packet even if it | 462 | * @IEEE80211_TX_CTL_DONTFRAG: Don't fragment this packet even if it |
461 | * would be fragmented by size (this is optional, only used for | 463 | * would be fragmented by size (this is optional, only used for |
462 | * monitor injection). | 464 | * monitor injection). |
465 | * @IEEE80211_TX_CTL_PS_RESPONSE: This frame is a response to a poll | ||
466 | * frame (PS-Poll or uAPSD). | ||
463 | * | 467 | * |
464 | * Note: If you have to add new flags to the enumeration, then don't | 468 | * Note: If you have to add new flags to the enumeration, then don't |
465 | * forget to update %IEEE80211_TX_TEMPORARY_FLAGS when necessary. | 469 | * forget to update %IEEE80211_TX_TEMPORARY_FLAGS when necessary. |
@@ -495,6 +499,7 @@ enum mac80211_tx_control_flags { | |||
495 | IEEE80211_TX_STATUS_EOSP = BIT(28), | 499 | IEEE80211_TX_STATUS_EOSP = BIT(28), |
496 | IEEE80211_TX_CTL_USE_MINRATE = BIT(29), | 500 | IEEE80211_TX_CTL_USE_MINRATE = BIT(29), |
497 | IEEE80211_TX_CTL_DONTFRAG = BIT(30), | 501 | IEEE80211_TX_CTL_DONTFRAG = BIT(30), |
502 | IEEE80211_TX_CTL_PS_RESPONSE = BIT(31), | ||
498 | }; | 503 | }; |
499 | 504 | ||
500 | #define IEEE80211_TX_CTL_STBC_SHIFT 23 | 505 | #define IEEE80211_TX_CTL_STBC_SHIFT 23 |
@@ -805,6 +810,7 @@ ieee80211_tx_info_clear_status(struct ieee80211_tx_info *info) | |||
805 | * on this subframe | 810 | * on this subframe |
806 | * @RX_FLAG_AMPDU_DELIM_CRC_KNOWN: The delimiter CRC field is known (the CRC | 811 | * @RX_FLAG_AMPDU_DELIM_CRC_KNOWN: The delimiter CRC field is known (the CRC |
807 | * is stored in the @ampdu_delimiter_crc field) | 812 | * is stored in the @ampdu_delimiter_crc field) |
813 | * @RX_FLAG_STBC_MASK: STBC 2 bit bitmask. 1 - Nss=1, 2 - Nss=2, 3 - Nss=3 | ||
808 | */ | 814 | */ |
809 | enum mac80211_rx_flags { | 815 | enum mac80211_rx_flags { |
810 | RX_FLAG_MMIC_ERROR = BIT(0), | 816 | RX_FLAG_MMIC_ERROR = BIT(0), |
@@ -832,8 +838,11 @@ enum mac80211_rx_flags { | |||
832 | RX_FLAG_80MHZ = BIT(23), | 838 | RX_FLAG_80MHZ = BIT(23), |
833 | RX_FLAG_80P80MHZ = BIT(24), | 839 | RX_FLAG_80P80MHZ = BIT(24), |
834 | RX_FLAG_160MHZ = BIT(25), | 840 | RX_FLAG_160MHZ = BIT(25), |
841 | RX_FLAG_STBC_MASK = BIT(26) | BIT(27), | ||
835 | }; | 842 | }; |
836 | 843 | ||
844 | #define RX_FLAG_STBC_SHIFT 26 | ||
845 | |||
837 | /** | 846 | /** |
838 | * struct ieee80211_rx_status - receive status | 847 | * struct ieee80211_rx_status - receive status |
839 | * | 848 | * |
@@ -850,6 +859,10 @@ enum mac80211_rx_flags { | |||
850 | * @signal: signal strength when receiving this frame, either in dBm, in dB or | 859 | * @signal: signal strength when receiving this frame, either in dBm, in dB or |
851 | * unspecified depending on the hardware capabilities flags | 860 | * unspecified depending on the hardware capabilities flags |
852 | * @IEEE80211_HW_SIGNAL_* | 861 | * @IEEE80211_HW_SIGNAL_* |
862 | * @chains: bitmask of receive chains for which separate signal strength | ||
863 | * values were filled. | ||
864 | * @chain_signal: per-chain signal strength, in dBm (unlike @signal, doesn't | ||
865 | * support dB or unspecified units) | ||
853 | * @antenna: antenna used | 866 | * @antenna: antenna used |
854 | * @rate_idx: index of data rate into band's supported rates or MCS index if | 867 | * @rate_idx: index of data rate into band's supported rates or MCS index if |
855 | * HT or VHT is used (%RX_FLAG_HT/%RX_FLAG_VHT) | 868 | * HT or VHT is used (%RX_FLAG_HT/%RX_FLAG_VHT) |
@@ -881,6 +894,8 @@ struct ieee80211_rx_status { | |||
881 | u8 band; | 894 | u8 band; |
882 | u8 antenna; | 895 | u8 antenna; |
883 | s8 signal; | 896 | s8 signal; |
897 | u8 chains; | ||
898 | s8 chain_signal[IEEE80211_MAX_CHAINS]; | ||
884 | u8 ampdu_delimiter_crc; | 899 | u8 ampdu_delimiter_crc; |
885 | u8 vendor_radiotap_align; | 900 | u8 vendor_radiotap_align; |
886 | u8 vendor_radiotap_oui[3]; | 901 | u8 vendor_radiotap_oui[3]; |
@@ -1235,7 +1250,7 @@ enum ieee80211_sta_rx_bandwidth { | |||
1235 | * struct ieee80211_sta_rates - station rate selection table | 1250 | * struct ieee80211_sta_rates - station rate selection table |
1236 | * | 1251 | * |
1237 | * @rcu_head: RCU head used for freeing the table on update | 1252 | * @rcu_head: RCU head used for freeing the table on update |
1238 | * @rates: transmit rates/flags to be used by default. | 1253 | * @rate: transmit rates/flags to be used by default. |
1239 | * Overriding entries per-packet is possible by using cb tx control. | 1254 | * Overriding entries per-packet is possible by using cb tx control. |
1240 | */ | 1255 | */ |
1241 | struct ieee80211_sta_rates { | 1256 | struct ieee80211_sta_rates { |
@@ -1276,7 +1291,7 @@ struct ieee80211_sta_rates { | |||
1276 | * notifications and capabilities. The value is only valid after | 1291 | * notifications and capabilities. The value is only valid after |
1277 | * the station moves to associated state. | 1292 | * the station moves to associated state. |
1278 | * @smps_mode: current SMPS mode (off, static or dynamic) | 1293 | * @smps_mode: current SMPS mode (off, static or dynamic) |
1279 | * @tx_rates: rate control selection table | 1294 | * @rates: rate control selection table |
1280 | */ | 1295 | */ |
1281 | struct ieee80211_sta { | 1296 | struct ieee80211_sta { |
1282 | u32 supp_rates[IEEE80211_NUM_BANDS]; | 1297 | u32 supp_rates[IEEE80211_NUM_BANDS]; |
diff --git a/include/net/ndisc.h b/include/net/ndisc.h index 745bf741e029..6fea32340ae8 100644 --- a/include/net/ndisc.h +++ b/include/net/ndisc.h | |||
@@ -119,7 +119,7 @@ extern struct ndisc_options *ndisc_parse_options(u8 *opt, int opt_len, | |||
119 | * if RFC 3831 IPv6-over-Fibre Channel is ever implemented it may | 119 | * if RFC 3831 IPv6-over-Fibre Channel is ever implemented it may |
120 | * also need a pad of 2. | 120 | * also need a pad of 2. |
121 | */ | 121 | */ |
122 | static int ndisc_addr_option_pad(unsigned short type) | 122 | static inline int ndisc_addr_option_pad(unsigned short type) |
123 | { | 123 | { |
124 | switch (type) { | 124 | switch (type) { |
125 | case ARPHRD_INFINIBAND: return 2; | 125 | case ARPHRD_INFINIBAND: return 2; |
@@ -230,7 +230,7 @@ extern int ndisc_ifinfo_sysctl_change(struct ctl_table *ctl, | |||
230 | void __user *buffer, | 230 | void __user *buffer, |
231 | size_t *lenp, | 231 | size_t *lenp, |
232 | loff_t *ppos); | 232 | loff_t *ppos); |
233 | int ndisc_ifinfo_sysctl_strategy(ctl_table *ctl, | 233 | int ndisc_ifinfo_sysctl_strategy(struct ctl_table *ctl, |
234 | void __user *oldval, size_t __user *oldlenp, | 234 | void __user *oldval, size_t __user *oldlenp, |
235 | void __user *newval, size_t newlen); | 235 | void __user *newval, size_t newlen); |
236 | #endif | 236 | #endif |
diff --git a/include/net/net_namespace.h b/include/net/net_namespace.h index b17697827482..84e37b1ca9e1 100644 --- a/include/net/net_namespace.h +++ b/include/net/net_namespace.h | |||
@@ -115,9 +115,12 @@ struct net { | |||
115 | #ifdef CONFIG_XFRM | 115 | #ifdef CONFIG_XFRM |
116 | struct netns_xfrm xfrm; | 116 | struct netns_xfrm xfrm; |
117 | #endif | 117 | #endif |
118 | #if IS_ENABLED(CONFIG_IP_VS) | ||
118 | struct netns_ipvs *ipvs; | 119 | struct netns_ipvs *ipvs; |
120 | #endif | ||
119 | struct sock *diag_nlsk; | 121 | struct sock *diag_nlsk; |
120 | atomic_t rt_genid; | 122 | atomic_t rt_genid; |
123 | atomic_t fnhe_genid; | ||
121 | }; | 124 | }; |
122 | 125 | ||
123 | /* | 126 | /* |
@@ -340,4 +343,14 @@ static inline void rt_genid_bump(struct net *net) | |||
340 | atomic_inc(&net->rt_genid); | 343 | atomic_inc(&net->rt_genid); |
341 | } | 344 | } |
342 | 345 | ||
346 | static inline int fnhe_genid(struct net *net) | ||
347 | { | ||
348 | return atomic_read(&net->fnhe_genid); | ||
349 | } | ||
350 | |||
351 | static inline void fnhe_genid_bump(struct net *net) | ||
352 | { | ||
353 | atomic_inc(&net->fnhe_genid); | ||
354 | } | ||
355 | |||
343 | #endif /* __NET_NET_NAMESPACE_H */ | 356 | #endif /* __NET_NET_NAMESPACE_H */ |
diff --git a/include/net/netfilter/xt_rateest.h b/include/net/netfilter/xt_rateest.h index 5a2978d1cb22..495c71f66e7e 100644 --- a/include/net/netfilter/xt_rateest.h +++ b/include/net/netfilter/xt_rateest.h | |||
@@ -6,7 +6,7 @@ struct xt_rateest { | |||
6 | struct gnet_stats_basic_packed bstats; | 6 | struct gnet_stats_basic_packed bstats; |
7 | spinlock_t lock; | 7 | spinlock_t lock; |
8 | /* keep rstats and lock on same cache line to speedup xt_rateest_mt() */ | 8 | /* keep rstats and lock on same cache line to speedup xt_rateest_mt() */ |
9 | struct gnet_stats_rate_est rstats; | 9 | struct gnet_stats_rate_est64 rstats; |
10 | 10 | ||
11 | /* following fields not accessed in hot path */ | 11 | /* following fields not accessed in hot path */ |
12 | struct hlist_node list; | 12 | struct hlist_node list; |
diff --git a/include/net/netns/x_tables.h b/include/net/netns/x_tables.h index c24060ee411e..02fe40f8c8fd 100644 --- a/include/net/netns/x_tables.h +++ b/include/net/netns/x_tables.h | |||
@@ -15,5 +15,11 @@ struct netns_xt { | |||
15 | struct ebt_table *frame_filter; | 15 | struct ebt_table *frame_filter; |
16 | struct ebt_table *frame_nat; | 16 | struct ebt_table *frame_nat; |
17 | #endif | 17 | #endif |
18 | #if IS_ENABLED(CONFIG_IP_NF_TARGET_ULOG) | ||
19 | bool ulog_warn_deprecated; | ||
20 | #endif | ||
21 | #if IS_ENABLED(CONFIG_BRIDGE_EBT_ULOG) | ||
22 | bool ebt_ulog_warn_deprecated; | ||
23 | #endif | ||
18 | }; | 24 | }; |
19 | #endif | 25 | #endif |
diff --git a/include/net/nfc/hci.h b/include/net/nfc/hci.h index b87a1692b086..b64b7bce4b94 100644 --- a/include/net/nfc/hci.h +++ b/include/net/nfc/hci.h | |||
@@ -59,8 +59,10 @@ struct nfc_hci_ops { | |||
59 | struct nfc_target *target); | 59 | struct nfc_target *target); |
60 | int (*event_received)(struct nfc_hci_dev *hdev, u8 gate, u8 event, | 60 | int (*event_received)(struct nfc_hci_dev *hdev, u8 gate, u8 event, |
61 | struct sk_buff *skb); | 61 | struct sk_buff *skb); |
62 | int (*enable_se)(struct nfc_dev *dev, u32 secure_element); | 62 | int (*fw_download)(struct nfc_hci_dev *hdev, const char *firmware_name); |
63 | int (*disable_se)(struct nfc_dev *dev, u32 secure_element); | 63 | int (*discover_se)(struct nfc_hci_dev *dev); |
64 | int (*enable_se)(struct nfc_hci_dev *dev, u32 se_idx); | ||
65 | int (*disable_se)(struct nfc_hci_dev *dev, u32 se_idx); | ||
64 | }; | 66 | }; |
65 | 67 | ||
66 | /* Pipes */ | 68 | /* Pipes */ |
@@ -152,7 +154,6 @@ struct nfc_hci_dev *nfc_hci_allocate_device(struct nfc_hci_ops *ops, | |||
152 | struct nfc_hci_init_data *init_data, | 154 | struct nfc_hci_init_data *init_data, |
153 | unsigned long quirks, | 155 | unsigned long quirks, |
154 | u32 protocols, | 156 | u32 protocols, |
155 | u32 supported_se, | ||
156 | const char *llc_name, | 157 | const char *llc_name, |
157 | int tx_headroom, | 158 | int tx_headroom, |
158 | int tx_tailroom, | 159 | int tx_tailroom, |
diff --git a/include/net/nfc/nci_core.h b/include/net/nfc/nci_core.h index 5bc0c460edc0..99fc1f3a392a 100644 --- a/include/net/nfc/nci_core.h +++ b/include/net/nfc/nci_core.h | |||
@@ -3,6 +3,7 @@ | |||
3 | * NFC Controller (NFCC) and a Device Host (DH). | 3 | * NFC Controller (NFCC) and a Device Host (DH). |
4 | * | 4 | * |
5 | * Copyright (C) 2011 Texas Instruments, Inc. | 5 | * Copyright (C) 2011 Texas Instruments, Inc. |
6 | * Copyright (C) 2013 Intel Corporation. All rights reserved. | ||
6 | * | 7 | * |
7 | * Written by Ilan Elias <ilane@ti.com> | 8 | * Written by Ilan Elias <ilane@ti.com> |
8 | * | 9 | * |
@@ -66,7 +67,7 @@ struct nci_dev; | |||
66 | struct nci_ops { | 67 | struct nci_ops { |
67 | int (*open)(struct nci_dev *ndev); | 68 | int (*open)(struct nci_dev *ndev); |
68 | int (*close)(struct nci_dev *ndev); | 69 | int (*close)(struct nci_dev *ndev); |
69 | int (*send)(struct sk_buff *skb); | 70 | int (*send)(struct nci_dev *ndev, struct sk_buff *skb); |
70 | }; | 71 | }; |
71 | 72 | ||
72 | #define NCI_MAX_SUPPORTED_RF_INTERFACES 4 | 73 | #define NCI_MAX_SUPPORTED_RF_INTERFACES 4 |
@@ -147,13 +148,12 @@ struct nci_dev { | |||
147 | /* ----- NCI Devices ----- */ | 148 | /* ----- NCI Devices ----- */ |
148 | struct nci_dev *nci_allocate_device(struct nci_ops *ops, | 149 | struct nci_dev *nci_allocate_device(struct nci_ops *ops, |
149 | __u32 supported_protocols, | 150 | __u32 supported_protocols, |
150 | __u32 supported_se, | ||
151 | int tx_headroom, | 151 | int tx_headroom, |
152 | int tx_tailroom); | 152 | int tx_tailroom); |
153 | void nci_free_device(struct nci_dev *ndev); | 153 | void nci_free_device(struct nci_dev *ndev); |
154 | int nci_register_device(struct nci_dev *ndev); | 154 | int nci_register_device(struct nci_dev *ndev); |
155 | void nci_unregister_device(struct nci_dev *ndev); | 155 | void nci_unregister_device(struct nci_dev *ndev); |
156 | int nci_recv_frame(struct sk_buff *skb); | 156 | int nci_recv_frame(struct nci_dev *ndev, struct sk_buff *skb); |
157 | 157 | ||
158 | static inline struct sk_buff *nci_skb_alloc(struct nci_dev *ndev, | 158 | static inline struct sk_buff *nci_skb_alloc(struct nci_dev *ndev, |
159 | unsigned int len, | 159 | unsigned int len, |
@@ -202,4 +202,56 @@ void nci_req_complete(struct nci_dev *ndev, int result); | |||
202 | /* ----- NCI status code ----- */ | 202 | /* ----- NCI status code ----- */ |
203 | int nci_to_errno(__u8 code); | 203 | int nci_to_errno(__u8 code); |
204 | 204 | ||
205 | /* ----- NCI over SPI acknowledge modes ----- */ | ||
206 | #define NCI_SPI_CRC_DISABLED 0x00 | ||
207 | #define NCI_SPI_CRC_ENABLED 0x01 | ||
208 | |||
209 | /* ----- NCI SPI structures ----- */ | ||
210 | struct nci_spi_dev; | ||
211 | |||
212 | struct nci_spi_ops { | ||
213 | int (*open)(struct nci_spi_dev *ndev); | ||
214 | int (*close)(struct nci_spi_dev *ndev); | ||
215 | void (*assert_int)(struct nci_spi_dev *ndev); | ||
216 | void (*deassert_int)(struct nci_spi_dev *ndev); | ||
217 | }; | ||
218 | |||
219 | struct nci_spi_dev { | ||
220 | struct nci_dev *nci_dev; | ||
221 | struct spi_device *spi; | ||
222 | struct nci_spi_ops *ops; | ||
223 | |||
224 | unsigned int xfer_udelay; /* microseconds delay between | ||
225 | transactions */ | ||
226 | u8 acknowledge_mode; | ||
227 | |||
228 | struct completion req_completion; | ||
229 | u8 req_result; | ||
230 | |||
231 | void *driver_data; | ||
232 | }; | ||
233 | |||
234 | /* ----- NCI SPI Devices ----- */ | ||
235 | struct nci_spi_dev *nci_spi_allocate_device(struct spi_device *spi, | ||
236 | struct nci_spi_ops *ops, | ||
237 | u32 supported_protocols, | ||
238 | u32 supported_se, | ||
239 | u8 acknowledge_mode, | ||
240 | unsigned int delay); | ||
241 | void nci_spi_free_device(struct nci_spi_dev *ndev); | ||
242 | int nci_spi_register_device(struct nci_spi_dev *ndev); | ||
243 | void nci_spi_unregister_device(struct nci_spi_dev *ndev); | ||
244 | int nci_spi_recv_frame(struct nci_spi_dev *ndev); | ||
245 | |||
246 | static inline void nci_spi_set_drvdata(struct nci_spi_dev *ndev, | ||
247 | void *data) | ||
248 | { | ||
249 | ndev->driver_data = data; | ||
250 | } | ||
251 | |||
252 | static inline void *nci_spi_get_drvdata(struct nci_spi_dev *ndev) | ||
253 | { | ||
254 | return ndev->driver_data; | ||
255 | } | ||
256 | |||
205 | #endif /* __NCI_CORE_H */ | 257 | #endif /* __NCI_CORE_H */ |
diff --git a/include/net/nfc/nfc.h b/include/net/nfc/nfc.h index 5eb80bb3cbb2..5f286b726bb6 100644 --- a/include/net/nfc/nfc.h +++ b/include/net/nfc/nfc.h | |||
@@ -68,8 +68,12 @@ struct nfc_ops { | |||
68 | void *cb_context); | 68 | void *cb_context); |
69 | int (*tm_send)(struct nfc_dev *dev, struct sk_buff *skb); | 69 | int (*tm_send)(struct nfc_dev *dev, struct sk_buff *skb); |
70 | int (*check_presence)(struct nfc_dev *dev, struct nfc_target *target); | 70 | int (*check_presence)(struct nfc_dev *dev, struct nfc_target *target); |
71 | int (*enable_se)(struct nfc_dev *dev, u32 secure_element); | 71 | int (*fw_download)(struct nfc_dev *dev, const char *firmware_name); |
72 | int (*disable_se)(struct nfc_dev *dev, u32 secure_element); | 72 | |
73 | /* Secure Element API */ | ||
74 | int (*discover_se)(struct nfc_dev *dev); | ||
75 | int (*enable_se)(struct nfc_dev *dev, u32 se_idx); | ||
76 | int (*disable_se)(struct nfc_dev *dev, u32 se_idx); | ||
73 | }; | 77 | }; |
74 | 78 | ||
75 | #define NFC_TARGET_IDX_ANY -1 | 79 | #define NFC_TARGET_IDX_ANY -1 |
@@ -83,6 +87,8 @@ struct nfc_target { | |||
83 | u8 sel_res; | 87 | u8 sel_res; |
84 | u8 nfcid1_len; | 88 | u8 nfcid1_len; |
85 | u8 nfcid1[NFC_NFCID1_MAXSIZE]; | 89 | u8 nfcid1[NFC_NFCID1_MAXSIZE]; |
90 | u8 nfcid2_len; | ||
91 | u8 nfcid2[NFC_NFCID2_MAXSIZE]; | ||
86 | u8 sensb_res_len; | 92 | u8 sensb_res_len; |
87 | u8 sensb_res[NFC_SENSB_RES_MAXSIZE]; | 93 | u8 sensb_res[NFC_SENSB_RES_MAXSIZE]; |
88 | u8 sensf_res_len; | 94 | u8 sensf_res_len; |
@@ -91,6 +97,23 @@ struct nfc_target { | |||
91 | u8 logical_idx; | 97 | u8 logical_idx; |
92 | }; | 98 | }; |
93 | 99 | ||
100 | /** | ||
101 | * nfc_se - A structure for NFC accessible secure elements. | ||
102 | * | ||
103 | * @idx: The secure element index. User space will enable or | ||
104 | * disable a secure element by its index. | ||
105 | * @type: The secure element type. It can be SE_UICC or | ||
106 | * SE_EMBEDDED. | ||
107 | * @state: The secure element state, either enabled or disabled. | ||
108 | * | ||
109 | */ | ||
110 | struct nfc_se { | ||
111 | struct list_head list; | ||
112 | u32 idx; | ||
113 | u16 type; | ||
114 | u16 state; | ||
115 | }; | ||
116 | |||
94 | struct nfc_genl_data { | 117 | struct nfc_genl_data { |
95 | u32 poll_req_portid; | 118 | u32 poll_req_portid; |
96 | struct mutex genl_data_mutex; | 119 | struct mutex genl_data_mutex; |
@@ -104,6 +127,7 @@ struct nfc_dev { | |||
104 | int targets_generation; | 127 | int targets_generation; |
105 | struct device dev; | 128 | struct device dev; |
106 | bool dev_up; | 129 | bool dev_up; |
130 | bool fw_download_in_progress; | ||
107 | u8 rf_mode; | 131 | u8 rf_mode; |
108 | bool polling; | 132 | bool polling; |
109 | struct nfc_target *active_target; | 133 | struct nfc_target *active_target; |
@@ -111,8 +135,7 @@ struct nfc_dev { | |||
111 | struct nfc_genl_data genl_data; | 135 | struct nfc_genl_data genl_data; |
112 | u32 supported_protocols; | 136 | u32 supported_protocols; |
113 | 137 | ||
114 | u32 supported_se; | 138 | struct list_head secure_elements; |
115 | u32 active_se; | ||
116 | 139 | ||
117 | int tx_headroom; | 140 | int tx_headroom; |
118 | int tx_tailroom; | 141 | int tx_tailroom; |
@@ -132,7 +155,6 @@ extern struct class nfc_class; | |||
132 | 155 | ||
133 | struct nfc_dev *nfc_allocate_device(struct nfc_ops *ops, | 156 | struct nfc_dev *nfc_allocate_device(struct nfc_ops *ops, |
134 | u32 supported_protocols, | 157 | u32 supported_protocols, |
135 | u32 supported_se, | ||
136 | int tx_headroom, | 158 | int tx_headroom, |
137 | int tx_tailroom); | 159 | int tx_tailroom); |
138 | 160 | ||
@@ -216,4 +238,7 @@ int nfc_tm_data_received(struct nfc_dev *dev, struct sk_buff *skb); | |||
216 | 238 | ||
217 | void nfc_driver_failure(struct nfc_dev *dev, int err); | 239 | void nfc_driver_failure(struct nfc_dev *dev, int err); |
218 | 240 | ||
241 | int nfc_add_se(struct nfc_dev *dev, u32 se_idx, u16 type); | ||
242 | int nfc_remove_se(struct nfc_dev *dev, u32 se_idx); | ||
243 | |||
219 | #endif /* __NET_NFC_H */ | 244 | #endif /* __NET_NFC_H */ |
diff --git a/include/net/ping.h b/include/net/ping.h index 682b5ae9af51..5db0224b73ac 100644 --- a/include/net/ping.h +++ b/include/net/ping.h | |||
@@ -13,6 +13,7 @@ | |||
13 | #ifndef _PING_H | 13 | #ifndef _PING_H |
14 | #define _PING_H | 14 | #define _PING_H |
15 | 15 | ||
16 | #include <net/icmp.h> | ||
16 | #include <net/netns/hash.h> | 17 | #include <net/netns/hash.h> |
17 | 18 | ||
18 | /* PING_HTABLE_SIZE must be power of 2 */ | 19 | /* PING_HTABLE_SIZE must be power of 2 */ |
@@ -28,6 +29,18 @@ | |||
28 | */ | 29 | */ |
29 | #define GID_T_MAX (((gid_t)~0U) >> 1) | 30 | #define GID_T_MAX (((gid_t)~0U) >> 1) |
30 | 31 | ||
32 | /* Compatibility glue so we can support IPv6 when it's compiled as a module */ | ||
33 | struct pingv6_ops { | ||
34 | int (*ipv6_recv_error)(struct sock *sk, struct msghdr *msg, int len); | ||
35 | int (*ip6_datagram_recv_ctl)(struct sock *sk, struct msghdr *msg, | ||
36 | struct sk_buff *skb); | ||
37 | int (*icmpv6_err_convert)(u8 type, u8 code, int *err); | ||
38 | void (*ipv6_icmp_error)(struct sock *sk, struct sk_buff *skb, int err, | ||
39 | __be16 port, u32 info, u8 *payload); | ||
40 | int (*ipv6_chk_addr)(struct net *net, const struct in6_addr *addr, | ||
41 | const struct net_device *dev, int strict); | ||
42 | }; | ||
43 | |||
31 | struct ping_table { | 44 | struct ping_table { |
32 | struct hlist_nulls_head hash[PING_HTABLE_SIZE]; | 45 | struct hlist_nulls_head hash[PING_HTABLE_SIZE]; |
33 | rwlock_t lock; | 46 | rwlock_t lock; |
@@ -36,20 +49,66 @@ struct ping_table { | |||
36 | struct ping_iter_state { | 49 | struct ping_iter_state { |
37 | struct seq_net_private p; | 50 | struct seq_net_private p; |
38 | int bucket; | 51 | int bucket; |
52 | sa_family_t family; | ||
39 | }; | 53 | }; |
40 | 54 | ||
41 | extern struct proto ping_prot; | 55 | extern struct proto ping_prot; |
56 | extern struct ping_table ping_table; | ||
57 | #if IS_ENABLED(CONFIG_IPV6) | ||
58 | extern struct pingv6_ops pingv6_ops; | ||
59 | #endif | ||
60 | |||
61 | struct pingfakehdr { | ||
62 | struct icmphdr icmph; | ||
63 | struct iovec *iov; | ||
64 | sa_family_t family; | ||
65 | __wsum wcheck; | ||
66 | }; | ||
67 | |||
68 | int ping_get_port(struct sock *sk, unsigned short ident); | ||
69 | void ping_hash(struct sock *sk); | ||
70 | void ping_unhash(struct sock *sk); | ||
42 | 71 | ||
72 | int ping_init_sock(struct sock *sk); | ||
73 | void ping_close(struct sock *sk, long timeout); | ||
74 | int ping_bind(struct sock *sk, struct sockaddr *uaddr, int addr_len); | ||
75 | void ping_err(struct sk_buff *skb, int offset, u32 info); | ||
76 | int ping_getfrag(void *from, char *to, int offset, int fraglen, int odd, | ||
77 | struct sk_buff *); | ||
43 | 78 | ||
44 | extern void ping_rcv(struct sk_buff *); | 79 | int ping_recvmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg, |
45 | extern void ping_err(struct sk_buff *, u32 info); | 80 | size_t len, int noblock, int flags, int *addr_len); |
81 | int ping_common_sendmsg(int family, struct msghdr *msg, size_t len, | ||
82 | void *user_icmph, size_t icmph_len); | ||
83 | int ping_v4_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg, | ||
84 | size_t len); | ||
85 | int ping_v6_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg, | ||
86 | size_t len); | ||
87 | int ping_queue_rcv_skb(struct sock *sk, struct sk_buff *skb); | ||
88 | void ping_rcv(struct sk_buff *skb); | ||
46 | 89 | ||
47 | #ifdef CONFIG_PROC_FS | 90 | #ifdef CONFIG_PROC_FS |
91 | struct ping_seq_afinfo { | ||
92 | char *name; | ||
93 | sa_family_t family; | ||
94 | const struct file_operations *seq_fops; | ||
95 | const struct seq_operations seq_ops; | ||
96 | }; | ||
97 | |||
98 | extern const struct file_operations ping_seq_fops; | ||
99 | |||
100 | void *ping_seq_start(struct seq_file *seq, loff_t *pos, sa_family_t family); | ||
101 | void *ping_seq_next(struct seq_file *seq, void *v, loff_t *pos); | ||
102 | void ping_seq_stop(struct seq_file *seq, void *v); | ||
103 | int ping_proc_register(struct net *net, struct ping_seq_afinfo *afinfo); | ||
104 | void ping_proc_unregister(struct net *net, struct ping_seq_afinfo *afinfo); | ||
105 | |||
48 | extern int __init ping_proc_init(void); | 106 | extern int __init ping_proc_init(void); |
49 | extern void ping_proc_exit(void); | 107 | extern void ping_proc_exit(void); |
50 | #endif | 108 | #endif |
51 | 109 | ||
52 | void __init ping_init(void); | 110 | void __init ping_init(void); |
53 | 111 | int __init pingv6_init(void); | |
112 | void pingv6_exit(void); | ||
54 | 113 | ||
55 | #endif /* _PING_H */ | 114 | #endif /* _PING_H */ |
diff --git a/include/net/sch_generic.h b/include/net/sch_generic.h index e7f4e21cc3e1..6eab63363e59 100644 --- a/include/net/sch_generic.h +++ b/include/net/sch_generic.h | |||
@@ -58,14 +58,12 @@ struct Qdisc { | |||
58 | * multiqueue device. | 58 | * multiqueue device. |
59 | */ | 59 | */ |
60 | #define TCQ_F_WARN_NONWC (1 << 16) | 60 | #define TCQ_F_WARN_NONWC (1 << 16) |
61 | int padded; | 61 | u32 limit; |
62 | const struct Qdisc_ops *ops; | 62 | const struct Qdisc_ops *ops; |
63 | struct qdisc_size_table __rcu *stab; | 63 | struct qdisc_size_table __rcu *stab; |
64 | struct list_head list; | 64 | struct list_head list; |
65 | u32 handle; | 65 | u32 handle; |
66 | u32 parent; | 66 | u32 parent; |
67 | atomic_t refcnt; | ||
68 | struct gnet_stats_rate_est rate_est; | ||
69 | int (*reshape_fail)(struct sk_buff *skb, | 67 | int (*reshape_fail)(struct sk_buff *skb, |
70 | struct Qdisc *q); | 68 | struct Qdisc *q); |
71 | 69 | ||
@@ -76,8 +74,9 @@ struct Qdisc { | |||
76 | */ | 74 | */ |
77 | struct Qdisc *__parent; | 75 | struct Qdisc *__parent; |
78 | struct netdev_queue *dev_queue; | 76 | struct netdev_queue *dev_queue; |
79 | struct Qdisc *next_sched; | ||
80 | 77 | ||
78 | struct gnet_stats_rate_est64 rate_est; | ||
79 | struct Qdisc *next_sched; | ||
81 | struct sk_buff *gso_skb; | 80 | struct sk_buff *gso_skb; |
82 | /* | 81 | /* |
83 | * For performance sake on SMP, we put highly modified fields at the end | 82 | * For performance sake on SMP, we put highly modified fields at the end |
@@ -88,8 +87,10 @@ struct Qdisc { | |||
88 | unsigned int __state; | 87 | unsigned int __state; |
89 | struct gnet_stats_queue qstats; | 88 | struct gnet_stats_queue qstats; |
90 | struct rcu_head rcu_head; | 89 | struct rcu_head rcu_head; |
91 | spinlock_t busylock; | 90 | int padded; |
92 | u32 limit; | 91 | atomic_t refcnt; |
92 | |||
93 | spinlock_t busylock ____cacheline_aligned_in_smp; | ||
93 | }; | 94 | }; |
94 | 95 | ||
95 | static inline bool qdisc_is_running(const struct Qdisc *qdisc) | 96 | static inline bool qdisc_is_running(const struct Qdisc *qdisc) |
@@ -679,7 +680,7 @@ static inline struct sk_buff *skb_act_clone(struct sk_buff *skb, gfp_t gfp_mask, | |||
679 | #endif | 680 | #endif |
680 | 681 | ||
681 | struct psched_ratecfg { | 682 | struct psched_ratecfg { |
682 | u64 rate_bps; | 683 | u64 rate_bytes_ps; /* bytes per second */ |
683 | u32 mult; | 684 | u32 mult; |
684 | u16 overhead; | 685 | u16 overhead; |
685 | u8 shift; | 686 | u8 shift; |
@@ -697,7 +698,7 @@ static inline void psched_ratecfg_getrate(struct tc_ratespec *res, | |||
697 | const struct psched_ratecfg *r) | 698 | const struct psched_ratecfg *r) |
698 | { | 699 | { |
699 | memset(res, 0, sizeof(*res)); | 700 | memset(res, 0, sizeof(*res)); |
700 | res->rate = r->rate_bps >> 3; | 701 | res->rate = r->rate_bytes_ps; |
701 | res->overhead = r->overhead; | 702 | res->overhead = r->overhead; |
702 | } | 703 | } |
703 | 704 | ||
diff --git a/include/net/sctp/checksum.h b/include/net/sctp/checksum.h index 5a2110d3176d..0cb08e6fb6df 100644 --- a/include/net/sctp/checksum.h +++ b/include/net/sctp/checksum.h | |||
@@ -42,6 +42,9 @@ | |||
42 | * be incorporated into the next SCTP release. | 42 | * be incorporated into the next SCTP release. |
43 | */ | 43 | */ |
44 | 44 | ||
45 | #ifndef __sctp_checksum_h__ | ||
46 | #define __sctp_checksum_h__ | ||
47 | |||
45 | #include <linux/types.h> | 48 | #include <linux/types.h> |
46 | #include <net/sctp/sctp.h> | 49 | #include <net/sctp/sctp.h> |
47 | #include <linux/crc32c.h> | 50 | #include <linux/crc32c.h> |
@@ -81,3 +84,5 @@ static inline __le32 sctp_end_cksum(__u32 crc32) | |||
81 | { | 84 | { |
82 | return cpu_to_le32(~crc32); | 85 | return cpu_to_le32(~crc32); |
83 | } | 86 | } |
87 | |||
88 | #endif /* __sctp_checksum_h__ */ | ||
diff --git a/include/net/sctp/sctp.h b/include/net/sctp/sctp.h index cd89510eab2a..d8e37ecea691 100644 --- a/include/net/sctp/sctp.h +++ b/include/net/sctp/sctp.h | |||
@@ -83,30 +83,12 @@ | |||
83 | #include <net/sctp/structs.h> | 83 | #include <net/sctp/structs.h> |
84 | #include <net/sctp/constants.h> | 84 | #include <net/sctp/constants.h> |
85 | 85 | ||
86 | |||
87 | /* Set SCTP_DEBUG flag via config if not already set. */ | ||
88 | #ifndef SCTP_DEBUG | ||
89 | #ifdef CONFIG_SCTP_DBG_MSG | ||
90 | #define SCTP_DEBUG 1 | ||
91 | #else | ||
92 | #define SCTP_DEBUG 0 | ||
93 | #endif /* CONFIG_SCTP_DBG */ | ||
94 | #endif /* SCTP_DEBUG */ | ||
95 | |||
96 | #ifdef CONFIG_IP_SCTP_MODULE | 86 | #ifdef CONFIG_IP_SCTP_MODULE |
97 | #define SCTP_PROTOSW_FLAG 0 | 87 | #define SCTP_PROTOSW_FLAG 0 |
98 | #else /* static! */ | 88 | #else /* static! */ |
99 | #define SCTP_PROTOSW_FLAG INET_PROTOSW_PERMANENT | 89 | #define SCTP_PROTOSW_FLAG INET_PROTOSW_PERMANENT |
100 | #endif | 90 | #endif |
101 | 91 | ||
102 | |||
103 | /* Certain internal static functions need to be exported when | ||
104 | * compiled into the test frame. | ||
105 | */ | ||
106 | #ifndef SCTP_STATIC | ||
107 | #define SCTP_STATIC static | ||
108 | #endif | ||
109 | |||
110 | /* | 92 | /* |
111 | * Function declarations. | 93 | * Function declarations. |
112 | */ | 94 | */ |
@@ -196,11 +178,6 @@ extern struct kmem_cache *sctp_bucket_cachep __read_mostly; | |||
196 | * Section: Macros, externs, and inlines | 178 | * Section: Macros, externs, and inlines |
197 | */ | 179 | */ |
198 | 180 | ||
199 | |||
200 | #ifdef TEST_FRAME | ||
201 | #include <test_frame.h> | ||
202 | #else | ||
203 | |||
204 | /* spin lock wrappers. */ | 181 | /* spin lock wrappers. */ |
205 | #define sctp_spin_lock_irqsave(lock, flags) spin_lock_irqsave(lock, flags) | 182 | #define sctp_spin_lock_irqsave(lock, flags) spin_lock_irqsave(lock, flags) |
206 | #define sctp_spin_unlock_irqrestore(lock, flags) \ | 183 | #define sctp_spin_unlock_irqrestore(lock, flags) \ |
@@ -226,8 +203,6 @@ extern struct kmem_cache *sctp_bucket_cachep __read_mostly; | |||
226 | #define SCTP_INC_STATS_USER(net, field) SNMP_INC_STATS_USER((net)->sctp.sctp_statistics, field) | 203 | #define SCTP_INC_STATS_USER(net, field) SNMP_INC_STATS_USER((net)->sctp.sctp_statistics, field) |
227 | #define SCTP_DEC_STATS(net, field) SNMP_DEC_STATS((net)->sctp.sctp_statistics, field) | 204 | #define SCTP_DEC_STATS(net, field) SNMP_DEC_STATS((net)->sctp.sctp_statistics, field) |
228 | 205 | ||
229 | #endif /* !TEST_FRAME */ | ||
230 | |||
231 | /* sctp mib definitions */ | 206 | /* sctp mib definitions */ |
232 | enum { | 207 | enum { |
233 | SCTP_MIB_NUM = 0, | 208 | SCTP_MIB_NUM = 0, |
@@ -285,61 +260,6 @@ static inline void sctp_max_rto(struct sctp_association *asoc, | |||
285 | } | 260 | } |
286 | } | 261 | } |
287 | 262 | ||
288 | /* Print debugging messages. */ | ||
289 | #if SCTP_DEBUG | ||
290 | extern int sctp_debug_flag; | ||
291 | #define SCTP_DEBUG_PRINTK(fmt, args...) \ | ||
292 | do { \ | ||
293 | if (sctp_debug_flag) \ | ||
294 | printk(KERN_DEBUG pr_fmt(fmt), ##args); \ | ||
295 | } while (0) | ||
296 | #define SCTP_DEBUG_PRINTK_CONT(fmt, args...) \ | ||
297 | do { \ | ||
298 | if (sctp_debug_flag) \ | ||
299 | pr_cont(fmt, ##args); \ | ||
300 | } while (0) | ||
301 | #define SCTP_DEBUG_PRINTK_IPADDR(fmt_lead, fmt_trail, \ | ||
302 | args_lead, addr, args_trail...) \ | ||
303 | do { \ | ||
304 | const union sctp_addr *_addr = (addr); \ | ||
305 | if (sctp_debug_flag) { \ | ||
306 | if (_addr->sa.sa_family == AF_INET6) { \ | ||
307 | printk(KERN_DEBUG \ | ||
308 | pr_fmt(fmt_lead "%pI6" fmt_trail), \ | ||
309 | args_lead, \ | ||
310 | &_addr->v6.sin6_addr, \ | ||
311 | args_trail); \ | ||
312 | } else { \ | ||
313 | printk(KERN_DEBUG \ | ||
314 | pr_fmt(fmt_lead "%pI4" fmt_trail), \ | ||
315 | args_lead, \ | ||
316 | &_addr->v4.sin_addr.s_addr, \ | ||
317 | args_trail); \ | ||
318 | } \ | ||
319 | } \ | ||
320 | } while (0) | ||
321 | #define SCTP_ENABLE_DEBUG { sctp_debug_flag = 1; } | ||
322 | #define SCTP_DISABLE_DEBUG { sctp_debug_flag = 0; } | ||
323 | |||
324 | #define SCTP_ASSERT(expr, str, func) \ | ||
325 | if (!(expr)) { \ | ||
326 | SCTP_DEBUG_PRINTK("Assertion Failed: %s(%s) at %s:%s:%d\n", \ | ||
327 | str, (#expr), __FILE__, __func__, __LINE__); \ | ||
328 | func; \ | ||
329 | } | ||
330 | |||
331 | #else /* SCTP_DEBUG */ | ||
332 | |||
333 | #define SCTP_DEBUG_PRINTK(whatever...) | ||
334 | #define SCTP_DEBUG_PRINTK_CONT(fmt, args...) | ||
335 | #define SCTP_DEBUG_PRINTK_IPADDR(whatever...) | ||
336 | #define SCTP_ENABLE_DEBUG | ||
337 | #define SCTP_DISABLE_DEBUG | ||
338 | #define SCTP_ASSERT(expr, str, func) | ||
339 | |||
340 | #endif /* SCTP_DEBUG */ | ||
341 | |||
342 | |||
343 | /* | 263 | /* |
344 | * Macros for keeping a global reference of object allocations. | 264 | * Macros for keeping a global reference of object allocations. |
345 | */ | 265 | */ |
@@ -575,27 +495,6 @@ for (pos = chunk->subh.fwdtsn_hdr->skip;\ | |||
575 | /* Round an int up to the next multiple of 4. */ | 495 | /* Round an int up to the next multiple of 4. */ |
576 | #define WORD_ROUND(s) (((s)+3)&~3) | 496 | #define WORD_ROUND(s) (((s)+3)&~3) |
577 | 497 | ||
578 | /* Make a new instance of type. */ | ||
579 | #define t_new(type, flags) kzalloc(sizeof(type), flags) | ||
580 | |||
581 | /* Compare two timevals. */ | ||
582 | #define tv_lt(s, t) \ | ||
583 | (s.tv_sec < t.tv_sec || (s.tv_sec == t.tv_sec && s.tv_usec < t.tv_usec)) | ||
584 | |||
585 | /* Add tv1 to tv2. */ | ||
586 | #define TIMEVAL_ADD(tv1, tv2) \ | ||
587 | ({ \ | ||
588 | suseconds_t usecs = (tv2).tv_usec + (tv1).tv_usec; \ | ||
589 | time_t secs = (tv2).tv_sec + (tv1).tv_sec; \ | ||
590 | \ | ||
591 | if (usecs >= 1000000) { \ | ||
592 | usecs -= 1000000; \ | ||
593 | secs++; \ | ||
594 | } \ | ||
595 | (tv2).tv_sec = secs; \ | ||
596 | (tv2).tv_usec = usecs; \ | ||
597 | }) | ||
598 | |||
599 | /* External references. */ | 498 | /* External references. */ |
600 | 499 | ||
601 | extern struct proto sctp_prot; | 500 | extern struct proto sctp_prot; |
@@ -633,16 +532,6 @@ static inline int param_type2af(__be16 type) | |||
633 | } | 532 | } |
634 | } | 533 | } |
635 | 534 | ||
636 | /* Perform some sanity checks. */ | ||
637 | static inline int sctp_sanity_check(void) | ||
638 | { | ||
639 | SCTP_ASSERT(sizeof(struct sctp_ulpevent) <= | ||
640 | sizeof(((struct sk_buff *)0)->cb), | ||
641 | "SCTP: ulpevent does not fit in skb!\n", return 0); | ||
642 | |||
643 | return 1; | ||
644 | } | ||
645 | |||
646 | /* Warning: The following hash functions assume a power of two 'size'. */ | 535 | /* Warning: The following hash functions assume a power of two 'size'. */ |
647 | /* This is the hash function for the SCTP port hash table. */ | 536 | /* This is the hash function for the SCTP port hash table. */ |
648 | static inline int sctp_phashfn(struct net *net, __u16 lport) | 537 | static inline int sctp_phashfn(struct net *net, __u16 lport) |
diff --git a/include/net/sctp/structs.h b/include/net/sctp/structs.h index 1bd4c4144fe8..e745c92a1532 100644 --- a/include/net/sctp/structs.h +++ b/include/net/sctp/structs.h | |||
@@ -54,7 +54,7 @@ | |||
54 | #ifndef __sctp_structs_h__ | 54 | #ifndef __sctp_structs_h__ |
55 | #define __sctp_structs_h__ | 55 | #define __sctp_structs_h__ |
56 | 56 | ||
57 | #include <linux/time.h> /* We get struct timespec. */ | 57 | #include <linux/ktime.h> |
58 | #include <linux/socket.h> /* linux/in.h needs this!! */ | 58 | #include <linux/socket.h> /* linux/in.h needs this!! */ |
59 | #include <linux/in.h> /* We get struct sockaddr_in. */ | 59 | #include <linux/in.h> /* We get struct sockaddr_in. */ |
60 | #include <linux/in6.h> /* We get struct in6_addr */ | 60 | #include <linux/in6.h> /* We get struct in6_addr */ |
@@ -284,7 +284,7 @@ struct sctp_cookie { | |||
284 | __u32 peer_ttag; | 284 | __u32 peer_ttag; |
285 | 285 | ||
286 | /* When does this cookie expire? */ | 286 | /* When does this cookie expire? */ |
287 | struct timeval expiration; | 287 | ktime_t expiration; |
288 | 288 | ||
289 | /* Number of inbound/outbound streams which are set | 289 | /* Number of inbound/outbound streams which are set |
290 | * and negotiated during the INIT process. | 290 | * and negotiated during the INIT process. |
@@ -1537,7 +1537,7 @@ struct sctp_association { | |||
1537 | sctp_state_t state; | 1537 | sctp_state_t state; |
1538 | 1538 | ||
1539 | /* The cookie life I award for any cookie. */ | 1539 | /* The cookie life I award for any cookie. */ |
1540 | struct timeval cookie_life; | 1540 | ktime_t cookie_life; |
1541 | 1541 | ||
1542 | /* Overall : The overall association error count. | 1542 | /* Overall : The overall association error count. |
1543 | * Error Count : [Clear this any time I get something.] | 1543 | * Error Count : [Clear this any time I get something.] |
diff --git a/include/net/sock.h b/include/net/sock.h index 66772cf8c3c5..31d5cfbb51ec 100644 --- a/include/net/sock.h +++ b/include/net/sock.h | |||
@@ -229,6 +229,8 @@ struct cg_proto; | |||
229 | * @sk_omem_alloc: "o" is "option" or "other" | 229 | * @sk_omem_alloc: "o" is "option" or "other" |
230 | * @sk_wmem_queued: persistent queue size | 230 | * @sk_wmem_queued: persistent queue size |
231 | * @sk_forward_alloc: space allocated forward | 231 | * @sk_forward_alloc: space allocated forward |
232 | * @sk_napi_id: id of the last napi context to receive data for sk | ||
233 | * @sk_ll_usec: usecs to busypoll when there is no data | ||
232 | * @sk_allocation: allocation mode | 234 | * @sk_allocation: allocation mode |
233 | * @sk_sndbuf: size of send buffer in bytes | 235 | * @sk_sndbuf: size of send buffer in bytes |
234 | * @sk_flags: %SO_LINGER (l_onoff), %SO_BROADCAST, %SO_KEEPALIVE, | 236 | * @sk_flags: %SO_LINGER (l_onoff), %SO_BROADCAST, %SO_KEEPALIVE, |
@@ -325,6 +327,10 @@ struct sock { | |||
325 | #ifdef CONFIG_RPS | 327 | #ifdef CONFIG_RPS |
326 | __u32 sk_rxhash; | 328 | __u32 sk_rxhash; |
327 | #endif | 329 | #endif |
330 | #ifdef CONFIG_NET_RX_BUSY_POLL | ||
331 | unsigned int sk_napi_id; | ||
332 | unsigned int sk_ll_usec; | ||
333 | #endif | ||
328 | atomic_t sk_drops; | 334 | atomic_t sk_drops; |
329 | int sk_rcvbuf; | 335 | int sk_rcvbuf; |
330 | 336 | ||
@@ -2041,18 +2047,21 @@ static inline void sk_wake_async(struct sock *sk, int how, int band) | |||
2041 | sock_wake_async(sk->sk_socket, how, band); | 2047 | sock_wake_async(sk->sk_socket, how, band); |
2042 | } | 2048 | } |
2043 | 2049 | ||
2044 | #define SOCK_MIN_SNDBUF 2048 | 2050 | /* Since sk_{r,w}mem_alloc sums skb->truesize, even a small frame might |
2045 | /* | 2051 | * need sizeof(sk_buff) + MTU + padding, unless net driver perform copybreak. |
2046 | * Since sk_rmem_alloc sums skb->truesize, even a small frame might need | 2052 | * Note: for send buffers, TCP works better if we can build two skbs at |
2047 | * sizeof(sk_buff) + MTU + padding, unless net driver perform copybreak | 2053 | * minimum. |
2048 | */ | 2054 | */ |
2049 | #define SOCK_MIN_RCVBUF (2048 + sizeof(struct sk_buff)) | 2055 | #define TCP_SKB_MIN_TRUESIZE (2048 + SKB_DATA_ALIGN(sizeof(struct sk_buff))) |
2056 | |||
2057 | #define SOCK_MIN_SNDBUF (TCP_SKB_MIN_TRUESIZE * 2) | ||
2058 | #define SOCK_MIN_RCVBUF TCP_SKB_MIN_TRUESIZE | ||
2050 | 2059 | ||
2051 | static inline void sk_stream_moderate_sndbuf(struct sock *sk) | 2060 | static inline void sk_stream_moderate_sndbuf(struct sock *sk) |
2052 | { | 2061 | { |
2053 | if (!(sk->sk_userlocks & SOCK_SNDBUF_LOCK)) { | 2062 | if (!(sk->sk_userlocks & SOCK_SNDBUF_LOCK)) { |
2054 | sk->sk_sndbuf = min(sk->sk_sndbuf, sk->sk_wmem_queued >> 1); | 2063 | sk->sk_sndbuf = min(sk->sk_sndbuf, sk->sk_wmem_queued >> 1); |
2055 | sk->sk_sndbuf = max(sk->sk_sndbuf, SOCK_MIN_SNDBUF); | 2064 | sk->sk_sndbuf = max_t(u32, sk->sk_sndbuf, SOCK_MIN_SNDBUF); |
2056 | } | 2065 | } |
2057 | } | 2066 | } |
2058 | 2067 | ||
diff --git a/include/net/tcp.h b/include/net/tcp.h index 5bba80fbd1d9..d1980054ec75 100644 --- a/include/net/tcp.h +++ b/include/net/tcp.h | |||
@@ -61,9 +61,6 @@ extern void tcp_time_wait(struct sock *sk, int state, int timeo); | |||
61 | */ | 61 | */ |
62 | #define MAX_TCP_WINDOW 32767U | 62 | #define MAX_TCP_WINDOW 32767U |
63 | 63 | ||
64 | /* Offer an initial receive window of 10 mss. */ | ||
65 | #define TCP_DEFAULT_INIT_RCVWND 10 | ||
66 | |||
67 | /* Minimal accepted MSS. It is (60+60+8) - (20+20). */ | 64 | /* Minimal accepted MSS. It is (60+60+8) - (20+20). */ |
68 | #define TCP_MIN_MSS 88U | 65 | #define TCP_MIN_MSS 88U |
69 | 66 | ||
@@ -1047,6 +1044,8 @@ static inline void tcp_sack_reset(struct tcp_options_received *rx_opt) | |||
1047 | rx_opt->num_sacks = 0; | 1044 | rx_opt->num_sacks = 0; |
1048 | } | 1045 | } |
1049 | 1046 | ||
1047 | extern u32 tcp_default_init_rwnd(u32 mss); | ||
1048 | |||
1050 | /* Determine a window scaling and initial window to offer. */ | 1049 | /* Determine a window scaling and initial window to offer. */ |
1051 | extern void tcp_select_initial_window(int __space, __u32 mss, | 1050 | extern void tcp_select_initial_window(int __space, __u32 mss, |
1052 | __u32 *rcv_wnd, __u32 *window_clamp, | 1051 | __u32 *rcv_wnd, __u32 *window_clamp, |
@@ -1193,7 +1192,6 @@ static inline void tcp_mib_init(struct net *net) | |||
1193 | static inline void tcp_clear_retrans_hints_partial(struct tcp_sock *tp) | 1192 | static inline void tcp_clear_retrans_hints_partial(struct tcp_sock *tp) |
1194 | { | 1193 | { |
1195 | tp->lost_skb_hint = NULL; | 1194 | tp->lost_skb_hint = NULL; |
1196 | tp->scoreboard_skb_hint = NULL; | ||
1197 | } | 1195 | } |
1198 | 1196 | ||
1199 | static inline void tcp_clear_all_retrans_hints(struct tcp_sock *tp) | 1197 | static inline void tcp_clear_all_retrans_hints(struct tcp_sock *tp) |
@@ -1284,11 +1282,13 @@ static inline struct tcp_md5sig_key *tcp_md5_do_lookup(struct sock *sk, | |||
1284 | #define tcp_twsk_md5_key(twsk) NULL | 1282 | #define tcp_twsk_md5_key(twsk) NULL |
1285 | #endif | 1283 | #endif |
1286 | 1284 | ||
1287 | extern struct tcp_md5sig_pool __percpu *tcp_alloc_md5sig_pool(struct sock *); | 1285 | extern bool tcp_alloc_md5sig_pool(void); |
1288 | extern void tcp_free_md5sig_pool(void); | ||
1289 | 1286 | ||
1290 | extern struct tcp_md5sig_pool *tcp_get_md5sig_pool(void); | 1287 | extern struct tcp_md5sig_pool *tcp_get_md5sig_pool(void); |
1291 | extern void tcp_put_md5sig_pool(void); | 1288 | static inline void tcp_put_md5sig_pool(void) |
1289 | { | ||
1290 | local_bh_enable(); | ||
1291 | } | ||
1292 | 1292 | ||
1293 | extern int tcp_md5_hash_header(struct tcp_md5sig_pool *, const struct tcphdr *); | 1293 | extern int tcp_md5_hash_header(struct tcp_md5sig_pool *, const struct tcphdr *); |
1294 | extern int tcp_md5_hash_skb_data(struct tcp_md5sig_pool *, const struct sk_buff *, | 1294 | extern int tcp_md5_hash_skb_data(struct tcp_md5sig_pool *, const struct sk_buff *, |
@@ -1319,9 +1319,9 @@ void tcp_fastopen_cookie_gen(__be32 addr, struct tcp_fastopen_cookie *foc); | |||
1319 | 1319 | ||
1320 | /* Fastopen key context */ | 1320 | /* Fastopen key context */ |
1321 | struct tcp_fastopen_context { | 1321 | struct tcp_fastopen_context { |
1322 | struct crypto_cipher __rcu *tfm; | 1322 | struct crypto_cipher *tfm; |
1323 | __u8 key[TCP_FASTOPEN_KEY_LENGTH]; | 1323 | __u8 key[TCP_FASTOPEN_KEY_LENGTH]; |
1324 | struct rcu_head rcu; | 1324 | struct rcu_head rcu; |
1325 | }; | 1325 | }; |
1326 | 1326 | ||
1327 | /* write queue abstraction */ | 1327 | /* write queue abstraction */ |
@@ -1540,15 +1540,14 @@ extern struct request_sock_ops tcp6_request_sock_ops; | |||
1540 | 1540 | ||
1541 | extern void tcp_v4_destroy_sock(struct sock *sk); | 1541 | extern void tcp_v4_destroy_sock(struct sock *sk); |
1542 | 1542 | ||
1543 | extern int tcp_v4_gso_send_check(struct sk_buff *skb); | ||
1544 | extern struct sk_buff *tcp_tso_segment(struct sk_buff *skb, | 1543 | extern struct sk_buff *tcp_tso_segment(struct sk_buff *skb, |
1545 | netdev_features_t features); | 1544 | netdev_features_t features); |
1546 | extern struct sk_buff **tcp_gro_receive(struct sk_buff **head, | 1545 | extern struct sk_buff **tcp_gro_receive(struct sk_buff **head, |
1547 | struct sk_buff *skb); | 1546 | struct sk_buff *skb); |
1548 | extern struct sk_buff **tcp4_gro_receive(struct sk_buff **head, | ||
1549 | struct sk_buff *skb); | ||
1550 | extern int tcp_gro_complete(struct sk_buff *skb); | 1547 | extern int tcp_gro_complete(struct sk_buff *skb); |
1551 | extern int tcp4_gro_complete(struct sk_buff *skb); | 1548 | |
1549 | extern void __tcp_v4_send_check(struct sk_buff *skb, __be32 saddr, | ||
1550 | __be32 daddr); | ||
1552 | 1551 | ||
1553 | #ifdef CONFIG_PROC_FS | 1552 | #ifdef CONFIG_PROC_FS |
1554 | extern int tcp4_proc_init(void); | 1553 | extern int tcp4_proc_init(void); |
@@ -1583,6 +1582,8 @@ struct tcp_request_sock_ops { | |||
1583 | #endif | 1582 | #endif |
1584 | }; | 1583 | }; |
1585 | 1584 | ||
1585 | extern int tcpv4_offload_init(void); | ||
1586 | |||
1586 | extern void tcp_v4_init(void); | 1587 | extern void tcp_v4_init(void); |
1587 | extern void tcp_init(void); | 1588 | extern void tcp_init(void); |
1588 | 1589 | ||
diff --git a/include/net/transp_v6.h b/include/net/transp_v6.h index 938b7fd11204..48660e50ae90 100644 --- a/include/net/transp_v6.h +++ b/include/net/transp_v6.h | |||
@@ -3,56 +3,57 @@ | |||
3 | 3 | ||
4 | #include <net/checksum.h> | 4 | #include <net/checksum.h> |
5 | 5 | ||
6 | /* | 6 | /* IPv6 transport protocols */ |
7 | * IPv6 transport protocols | ||
8 | */ | ||
9 | |||
10 | extern struct proto rawv6_prot; | 7 | extern struct proto rawv6_prot; |
11 | extern struct proto udpv6_prot; | 8 | extern struct proto udpv6_prot; |
12 | extern struct proto udplitev6_prot; | 9 | extern struct proto udplitev6_prot; |
13 | extern struct proto tcpv6_prot; | 10 | extern struct proto tcpv6_prot; |
11 | extern struct proto pingv6_prot; | ||
14 | 12 | ||
15 | struct flowi6; | 13 | struct flowi6; |
16 | 14 | ||
17 | /* extension headers */ | 15 | /* extension headers */ |
18 | extern int ipv6_exthdrs_init(void); | 16 | int ipv6_exthdrs_init(void); |
19 | extern void ipv6_exthdrs_exit(void); | 17 | void ipv6_exthdrs_exit(void); |
20 | extern int ipv6_frag_init(void); | 18 | int ipv6_frag_init(void); |
21 | extern void ipv6_frag_exit(void); | 19 | void ipv6_frag_exit(void); |
22 | 20 | ||
23 | /* transport protocols */ | 21 | /* transport protocols */ |
24 | extern int rawv6_init(void); | 22 | int pingv6_init(void); |
25 | extern void rawv6_exit(void); | 23 | void pingv6_exit(void); |
26 | extern int udpv6_init(void); | 24 | int rawv6_init(void); |
27 | extern void udpv6_exit(void); | 25 | void rawv6_exit(void); |
28 | extern int udplitev6_init(void); | 26 | int udpv6_init(void); |
29 | extern void udplitev6_exit(void); | 27 | void udpv6_exit(void); |
30 | extern int tcpv6_init(void); | 28 | int udplitev6_init(void); |
31 | extern void tcpv6_exit(void); | 29 | void udplitev6_exit(void); |
32 | 30 | int tcpv6_init(void); | |
33 | extern int udpv6_connect(struct sock *sk, | 31 | void tcpv6_exit(void); |
34 | struct sockaddr *uaddr, | 32 | |
35 | int addr_len); | 33 | int udpv6_connect(struct sock *sk, struct sockaddr *uaddr, int addr_len); |
36 | 34 | ||
37 | extern int ip6_datagram_recv_ctl(struct sock *sk, | 35 | int ip6_datagram_recv_ctl(struct sock *sk, struct msghdr *msg, |
38 | struct msghdr *msg, | 36 | struct sk_buff *skb); |
39 | struct sk_buff *skb); | 37 | |
40 | 38 | int ip6_datagram_send_ctl(struct net *net, struct sock *sk, struct msghdr *msg, | |
41 | extern int ip6_datagram_send_ctl(struct net *net, | 39 | struct flowi6 *fl6, struct ipv6_txoptions *opt, |
42 | struct sock *sk, | 40 | int *hlimit, int *tclass, int *dontfrag); |
43 | struct msghdr *msg, | 41 | |
44 | struct flowi6 *fl6, | 42 | void ip6_dgram_sock_seq_show(struct seq_file *seq, struct sock *sp, |
45 | struct ipv6_txoptions *opt, | 43 | __u16 srcp, __u16 destp, int bucket); |
46 | int *hlimit, int *tclass, | 44 | |
47 | int *dontfrag); | 45 | #define LOOPBACK4_IPV6 cpu_to_be32(0x7f000006) |
48 | 46 | ||
49 | #define LOOPBACK4_IPV6 cpu_to_be32(0x7f000006) | 47 | /* address family specific functions */ |
50 | |||
51 | /* | ||
52 | * address family specific functions | ||
53 | */ | ||
54 | extern const struct inet_connection_sock_af_ops ipv4_specific; | 48 | extern const struct inet_connection_sock_af_ops ipv4_specific; |
55 | 49 | ||
56 | extern void inet6_destroy_sock(struct sock *sk); | 50 | void inet6_destroy_sock(struct sock *sk); |
51 | |||
52 | #define IPV6_SEQ_DGRAM_HEADER \ | ||
53 | " sl " \ | ||
54 | "local_address " \ | ||
55 | "remote_address " \ | ||
56 | "st tx_queue rx_queue tr tm->when retrnsmt" \ | ||
57 | " uid timeout inode ref pointer drops\n" | ||
57 | 58 | ||
58 | #endif | 59 | #endif |
diff --git a/include/net/udp.h b/include/net/udp.h index 065f379c6503..74c10ec5e74f 100644 --- a/include/net/udp.h +++ b/include/net/udp.h | |||
@@ -181,12 +181,15 @@ extern int udp_get_port(struct sock *sk, unsigned short snum, | |||
181 | extern void udp_err(struct sk_buff *, u32); | 181 | extern void udp_err(struct sk_buff *, u32); |
182 | extern int udp_sendmsg(struct kiocb *iocb, struct sock *sk, | 182 | extern int udp_sendmsg(struct kiocb *iocb, struct sock *sk, |
183 | struct msghdr *msg, size_t len); | 183 | struct msghdr *msg, size_t len); |
184 | extern int udp_push_pending_frames(struct sock *sk); | ||
184 | extern void udp_flush_pending_frames(struct sock *sk); | 185 | extern void udp_flush_pending_frames(struct sock *sk); |
185 | extern int udp_rcv(struct sk_buff *skb); | 186 | extern int udp_rcv(struct sk_buff *skb); |
186 | extern int udp_ioctl(struct sock *sk, int cmd, unsigned long arg); | 187 | extern int udp_ioctl(struct sock *sk, int cmd, unsigned long arg); |
187 | extern int udp_disconnect(struct sock *sk, int flags); | 188 | extern int udp_disconnect(struct sock *sk, int flags); |
188 | extern unsigned int udp_poll(struct file *file, struct socket *sock, | 189 | extern unsigned int udp_poll(struct file *file, struct socket *sock, |
189 | poll_table *wait); | 190 | poll_table *wait); |
191 | extern struct sk_buff *skb_udp_tunnel_segment(struct sk_buff *skb, | ||
192 | netdev_features_t features); | ||
190 | extern int udp_lib_getsockopt(struct sock *sk, int level, int optname, | 193 | extern int udp_lib_getsockopt(struct sock *sk, int level, int optname, |
191 | char __user *optval, int __user *optlen); | 194 | char __user *optval, int __user *optlen); |
192 | extern int udp_lib_setsockopt(struct sock *sk, int level, int optname, | 195 | extern int udp_lib_setsockopt(struct sock *sk, int level, int optname, |
@@ -262,11 +265,10 @@ extern int udp4_proc_init(void); | |||
262 | extern void udp4_proc_exit(void); | 265 | extern void udp4_proc_exit(void); |
263 | #endif | 266 | #endif |
264 | 267 | ||
268 | extern int udpv4_offload_init(void); | ||
269 | |||
265 | extern void udp_init(void); | 270 | extern void udp_init(void); |
266 | 271 | ||
267 | extern int udp4_ufo_send_check(struct sk_buff *skb); | ||
268 | extern struct sk_buff *udp4_ufo_fragment(struct sk_buff *skb, | ||
269 | netdev_features_t features); | ||
270 | extern void udp_encap_enable(void); | 272 | extern void udp_encap_enable(void); |
271 | #if IS_ENABLED(CONFIG_IPV6) | 273 | #if IS_ENABLED(CONFIG_IPV6) |
272 | extern void udpv6_encap_enable(void); | 274 | extern void udpv6_encap_enable(void); |