diff options
Diffstat (limited to 'include/net')
29 files changed, 442 insertions, 140 deletions
diff --git a/include/net/act_api.h b/include/net/act_api.h index 565eed8fe496..c05fd717c588 100644 --- a/include/net/act_api.h +++ b/include/net/act_api.h | |||
@@ -16,7 +16,7 @@ struct tcf_common { | |||
16 | u32 tcfc_capab; | 16 | u32 tcfc_capab; |
17 | int tcfc_action; | 17 | int tcfc_action; |
18 | struct tcf_t tcfc_tm; | 18 | struct tcf_t tcfc_tm; |
19 | struct gnet_stats_basic 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_est tcfc_rate_est; |
22 | spinlock_t tcfc_lock; | 22 | spinlock_t tcfc_lock; |
diff --git a/include/net/af_ieee802154.h b/include/net/af_ieee802154.h index 0d78605fb1a6..75e64c7a2960 100644 --- a/include/net/af_ieee802154.h +++ b/include/net/af_ieee802154.h | |||
@@ -54,7 +54,9 @@ struct sockaddr_ieee802154 { | |||
54 | struct ieee802154_addr addr; | 54 | struct ieee802154_addr addr; |
55 | }; | 55 | }; |
56 | 56 | ||
57 | /* master device */ | 57 | /* get/setsockopt */ |
58 | #define IEEE802154_SIOC_ADD_SLAVE (SIOCDEVPRIVATE + 0) | 58 | #define SOL_IEEE802154 0 |
59 | |||
60 | #define WPAN_WANTACK 0 | ||
59 | 61 | ||
60 | #endif | 62 | #endif |
diff --git a/include/net/arp.h b/include/net/arp.h index c236270ec95e..716f43c5c98e 100644 --- a/include/net/arp.h +++ b/include/net/arp.h | |||
@@ -26,6 +26,6 @@ extern struct sk_buff *arp_create(int type, int ptype, __be32 dest_ip, | |||
26 | const unsigned char *target_hw); | 26 | const unsigned char *target_hw); |
27 | extern void arp_xmit(struct sk_buff *skb); | 27 | extern void arp_xmit(struct sk_buff *skb); |
28 | 28 | ||
29 | extern struct neigh_ops arp_broken_ops; | 29 | extern const struct neigh_ops arp_broken_ops; |
30 | 30 | ||
31 | #endif /* _ARP_H */ | 31 | #endif /* _ARP_H */ |
diff --git a/include/net/bluetooth/bluetooth.h b/include/net/bluetooth/bluetooth.h index 968166a45f86..718394e2c01e 100644 --- a/include/net/bluetooth/bluetooth.h +++ b/include/net/bluetooth/bluetooth.h | |||
@@ -138,8 +138,11 @@ struct sock *bt_accept_dequeue(struct sock *parent, struct socket *newsock); | |||
138 | struct bt_skb_cb { | 138 | struct bt_skb_cb { |
139 | __u8 pkt_type; | 139 | __u8 pkt_type; |
140 | __u8 incoming; | 140 | __u8 incoming; |
141 | __u8 tx_seq; | ||
142 | __u8 retries; | ||
143 | __u8 sar; | ||
141 | }; | 144 | }; |
142 | #define bt_cb(skb) ((struct bt_skb_cb *)(skb->cb)) | 145 | #define bt_cb(skb) ((struct bt_skb_cb *)((skb)->cb)) |
143 | 146 | ||
144 | static inline struct sk_buff *bt_skb_alloc(unsigned int len, gfp_t how) | 147 | static inline struct sk_buff *bt_skb_alloc(unsigned int len, gfp_t how) |
145 | { | 148 | { |
diff --git a/include/net/bluetooth/hci_core.h b/include/net/bluetooth/hci_core.h index c4ca4228b083..7b640aeddb64 100644 --- a/include/net/bluetooth/hci_core.h +++ b/include/net/bluetooth/hci_core.h | |||
@@ -117,7 +117,7 @@ struct hci_dev { | |||
117 | struct sk_buff *sent_cmd; | 117 | struct sk_buff *sent_cmd; |
118 | struct sk_buff *reassembly[3]; | 118 | struct sk_buff *reassembly[3]; |
119 | 119 | ||
120 | struct semaphore req_lock; | 120 | struct mutex req_lock; |
121 | wait_queue_head_t req_wait_q; | 121 | wait_queue_head_t req_wait_q; |
122 | __u32 req_status; | 122 | __u32 req_status; |
123 | __u32 req_result; | 123 | __u32 req_result; |
@@ -187,6 +187,7 @@ struct hci_conn { | |||
187 | struct work_struct work_del; | 187 | struct work_struct work_del; |
188 | 188 | ||
189 | struct device dev; | 189 | struct device dev; |
190 | atomic_t devref; | ||
190 | 191 | ||
191 | struct hci_dev *hdev; | 192 | struct hci_dev *hdev; |
192 | void *l2cap_data; | 193 | void *l2cap_data; |
@@ -339,6 +340,9 @@ int hci_conn_switch_role(struct hci_conn *conn, __u8 role); | |||
339 | void hci_conn_enter_active_mode(struct hci_conn *conn); | 340 | void hci_conn_enter_active_mode(struct hci_conn *conn); |
340 | void hci_conn_enter_sniff_mode(struct hci_conn *conn); | 341 | void hci_conn_enter_sniff_mode(struct hci_conn *conn); |
341 | 342 | ||
343 | void hci_conn_hold_device(struct hci_conn *conn); | ||
344 | void hci_conn_put_device(struct hci_conn *conn); | ||
345 | |||
342 | static inline void hci_conn_hold(struct hci_conn *conn) | 346 | static inline void hci_conn_hold(struct hci_conn *conn) |
343 | { | 347 | { |
344 | atomic_inc(&conn->refcnt); | 348 | atomic_inc(&conn->refcnt); |
@@ -700,8 +704,8 @@ struct hci_sec_filter { | |||
700 | #define HCI_REQ_PEND 1 | 704 | #define HCI_REQ_PEND 1 |
701 | #define HCI_REQ_CANCELED 2 | 705 | #define HCI_REQ_CANCELED 2 |
702 | 706 | ||
703 | #define hci_req_lock(d) down(&d->req_lock) | 707 | #define hci_req_lock(d) mutex_lock(&d->req_lock) |
704 | #define hci_req_unlock(d) up(&d->req_lock) | 708 | #define hci_req_unlock(d) mutex_unlock(&d->req_lock) |
705 | 709 | ||
706 | void hci_req_complete(struct hci_dev *hdev, int result); | 710 | void hci_req_complete(struct hci_dev *hdev, int result); |
707 | 711 | ||
diff --git a/include/net/bluetooth/l2cap.h b/include/net/bluetooth/l2cap.h index e919fca1072a..9516f4b4a3c2 100644 --- a/include/net/bluetooth/l2cap.h +++ b/include/net/bluetooth/l2cap.h | |||
@@ -27,12 +27,14 @@ | |||
27 | 27 | ||
28 | /* L2CAP defaults */ | 28 | /* L2CAP defaults */ |
29 | #define L2CAP_DEFAULT_MTU 672 | 29 | #define L2CAP_DEFAULT_MTU 672 |
30 | #define L2CAP_DEFAULT_MIN_MTU 48 | ||
30 | #define L2CAP_DEFAULT_FLUSH_TO 0xffff | 31 | #define L2CAP_DEFAULT_FLUSH_TO 0xffff |
31 | #define L2CAP_DEFAULT_RX_WINDOW 1 | 32 | #define L2CAP_DEFAULT_TX_WINDOW 63 |
32 | #define L2CAP_DEFAULT_MAX_RECEIVE 1 | 33 | #define L2CAP_DEFAULT_NUM_TO_ACK (L2CAP_DEFAULT_TX_WINDOW/5) |
33 | #define L2CAP_DEFAULT_RETRANS_TO 300 /* 300 milliseconds */ | 34 | #define L2CAP_DEFAULT_MAX_TX 3 |
34 | #define L2CAP_DEFAULT_MONITOR_TO 1000 /* 1 second */ | 35 | #define L2CAP_DEFAULT_RETRANS_TO 1000 /* 1 second */ |
35 | #define L2CAP_DEFAULT_MAX_RX_APDU 0xfff7 | 36 | #define L2CAP_DEFAULT_MONITOR_TO 12000 /* 12 seconds */ |
37 | #define L2CAP_DEFAULT_MAX_PDU_SIZE 672 | ||
36 | 38 | ||
37 | #define L2CAP_CONN_TIMEOUT (40000) /* 40 seconds */ | 39 | #define L2CAP_CONN_TIMEOUT (40000) /* 40 seconds */ |
38 | #define L2CAP_INFO_TIMEOUT (4000) /* 4 seconds */ | 40 | #define L2CAP_INFO_TIMEOUT (4000) /* 4 seconds */ |
@@ -52,6 +54,7 @@ struct l2cap_options { | |||
52 | __u16 imtu; | 54 | __u16 imtu; |
53 | __u16 flush_to; | 55 | __u16 flush_to; |
54 | __u8 mode; | 56 | __u8 mode; |
57 | __u8 fcs; | ||
55 | }; | 58 | }; |
56 | 59 | ||
57 | #define L2CAP_CONNINFO 0x02 | 60 | #define L2CAP_CONNINFO 0x02 |
@@ -93,6 +96,32 @@ struct l2cap_conninfo { | |||
93 | #define L2CAP_FCS_NONE 0x00 | 96 | #define L2CAP_FCS_NONE 0x00 |
94 | #define L2CAP_FCS_CRC16 0x01 | 97 | #define L2CAP_FCS_CRC16 0x01 |
95 | 98 | ||
99 | /* L2CAP Control Field bit masks */ | ||
100 | #define L2CAP_CTRL_SAR 0xC000 | ||
101 | #define L2CAP_CTRL_REQSEQ 0x3F00 | ||
102 | #define L2CAP_CTRL_TXSEQ 0x007E | ||
103 | #define L2CAP_CTRL_RETRANS 0x0080 | ||
104 | #define L2CAP_CTRL_FINAL 0x0080 | ||
105 | #define L2CAP_CTRL_POLL 0x0010 | ||
106 | #define L2CAP_CTRL_SUPERVISE 0x000C | ||
107 | #define L2CAP_CTRL_FRAME_TYPE 0x0001 /* I- or S-Frame */ | ||
108 | |||
109 | #define L2CAP_CTRL_TXSEQ_SHIFT 1 | ||
110 | #define L2CAP_CTRL_REQSEQ_SHIFT 8 | ||
111 | #define L2CAP_CTRL_SAR_SHIFT 14 | ||
112 | |||
113 | /* L2CAP Supervisory Function */ | ||
114 | #define L2CAP_SUPER_RCV_READY 0x0000 | ||
115 | #define L2CAP_SUPER_REJECT 0x0004 | ||
116 | #define L2CAP_SUPER_RCV_NOT_READY 0x0008 | ||
117 | #define L2CAP_SUPER_SELECT_REJECT 0x000C | ||
118 | |||
119 | /* L2CAP Segmentation and Reassembly */ | ||
120 | #define L2CAP_SDU_UNSEGMENTED 0x0000 | ||
121 | #define L2CAP_SDU_START 0x4000 | ||
122 | #define L2CAP_SDU_END 0x8000 | ||
123 | #define L2CAP_SDU_CONTINUE 0xC000 | ||
124 | |||
96 | /* L2CAP structures */ | 125 | /* L2CAP structures */ |
97 | struct l2cap_hdr { | 126 | struct l2cap_hdr { |
98 | __le16 len; | 127 | __le16 len; |
@@ -190,7 +219,7 @@ struct l2cap_conf_rfc { | |||
190 | #define L2CAP_MODE_RETRANS 0x01 | 219 | #define L2CAP_MODE_RETRANS 0x01 |
191 | #define L2CAP_MODE_FLOWCTL 0x02 | 220 | #define L2CAP_MODE_FLOWCTL 0x02 |
192 | #define L2CAP_MODE_ERTM 0x03 | 221 | #define L2CAP_MODE_ERTM 0x03 |
193 | #define L2CAP_MODE_STREAM 0x04 | 222 | #define L2CAP_MODE_STREAMING 0x04 |
194 | 223 | ||
195 | struct l2cap_disconn_req { | 224 | struct l2cap_disconn_req { |
196 | __le16 dcid; | 225 | __le16 dcid; |
@@ -261,6 +290,14 @@ struct l2cap_conn { | |||
261 | 290 | ||
262 | /* ----- L2CAP channel and socket info ----- */ | 291 | /* ----- L2CAP channel and socket info ----- */ |
263 | #define l2cap_pi(sk) ((struct l2cap_pinfo *) sk) | 292 | #define l2cap_pi(sk) ((struct l2cap_pinfo *) sk) |
293 | #define TX_QUEUE(sk) (&l2cap_pi(sk)->tx_queue) | ||
294 | #define SREJ_QUEUE(sk) (&l2cap_pi(sk)->srej_queue) | ||
295 | #define SREJ_LIST(sk) (&l2cap_pi(sk)->srej_l.list) | ||
296 | |||
297 | struct srej_list { | ||
298 | __u8 tx_seq; | ||
299 | struct list_head list; | ||
300 | }; | ||
264 | 301 | ||
265 | struct l2cap_pinfo { | 302 | struct l2cap_pinfo { |
266 | struct bt_sock bt; | 303 | struct bt_sock bt; |
@@ -271,30 +308,97 @@ struct l2cap_pinfo { | |||
271 | __u16 imtu; | 308 | __u16 imtu; |
272 | __u16 omtu; | 309 | __u16 omtu; |
273 | __u16 flush_to; | 310 | __u16 flush_to; |
274 | __u8 sec_level; | 311 | __u8 mode; |
312 | __u8 num_conf_req; | ||
313 | __u8 num_conf_rsp; | ||
314 | |||
315 | __u8 fcs; | ||
316 | __u8 sec_level; | ||
275 | __u8 role_switch; | 317 | __u8 role_switch; |
276 | __u8 force_reliable; | 318 | __u8 force_reliable; |
277 | 319 | ||
278 | __u8 conf_req[64]; | 320 | __u8 conf_req[64]; |
279 | __u8 conf_len; | 321 | __u8 conf_len; |
280 | __u8 conf_state; | 322 | __u8 conf_state; |
281 | __u8 conf_retry; | 323 | __u8 conn_state; |
324 | |||
325 | __u8 next_tx_seq; | ||
326 | __u8 expected_ack_seq; | ||
327 | __u8 req_seq; | ||
328 | __u8 expected_tx_seq; | ||
329 | __u8 buffer_seq; | ||
330 | __u8 buffer_seq_srej; | ||
331 | __u8 srej_save_reqseq; | ||
332 | __u8 unacked_frames; | ||
333 | __u8 retry_count; | ||
334 | __u8 num_to_ack; | ||
335 | __u16 sdu_len; | ||
336 | __u16 partial_sdu_len; | ||
337 | struct sk_buff *sdu; | ||
282 | 338 | ||
283 | __u8 ident; | 339 | __u8 ident; |
284 | 340 | ||
341 | __u8 remote_tx_win; | ||
342 | __u8 remote_max_tx; | ||
343 | __u16 retrans_timeout; | ||
344 | __u16 monitor_timeout; | ||
345 | __u16 max_pdu_size; | ||
346 | |||
285 | __le16 sport; | 347 | __le16 sport; |
286 | 348 | ||
349 | struct timer_list retrans_timer; | ||
350 | struct timer_list monitor_timer; | ||
351 | struct sk_buff_head tx_queue; | ||
352 | struct sk_buff_head srej_queue; | ||
353 | struct srej_list srej_l; | ||
287 | struct l2cap_conn *conn; | 354 | struct l2cap_conn *conn; |
288 | struct sock *next_c; | 355 | struct sock *next_c; |
289 | struct sock *prev_c; | 356 | struct sock *prev_c; |
290 | }; | 357 | }; |
291 | 358 | ||
292 | #define L2CAP_CONF_REQ_SENT 0x01 | 359 | #define L2CAP_CONF_REQ_SENT 0x01 |
293 | #define L2CAP_CONF_INPUT_DONE 0x02 | 360 | #define L2CAP_CONF_INPUT_DONE 0x02 |
294 | #define L2CAP_CONF_OUTPUT_DONE 0x04 | 361 | #define L2CAP_CONF_OUTPUT_DONE 0x04 |
295 | #define L2CAP_CONF_CONNECT_PEND 0x80 | 362 | #define L2CAP_CONF_MTU_DONE 0x08 |
296 | 363 | #define L2CAP_CONF_MODE_DONE 0x10 | |
297 | #define L2CAP_CONF_MAX_RETRIES 2 | 364 | #define L2CAP_CONF_CONNECT_PEND 0x20 |
365 | #define L2CAP_CONF_NO_FCS_RECV 0x40 | ||
366 | #define L2CAP_CONF_STATE2_DEVICE 0x80 | ||
367 | |||
368 | #define L2CAP_CONF_MAX_CONF_REQ 2 | ||
369 | #define L2CAP_CONF_MAX_CONF_RSP 2 | ||
370 | |||
371 | #define L2CAP_CONN_SAR_SDU 0x01 | ||
372 | #define L2CAP_CONN_SREJ_SENT 0x02 | ||
373 | #define L2CAP_CONN_WAIT_F 0x04 | ||
374 | #define L2CAP_CONN_SREJ_ACT 0x08 | ||
375 | #define L2CAP_CONN_SEND_PBIT 0x10 | ||
376 | #define L2CAP_CONN_REMOTE_BUSY 0x20 | ||
377 | #define L2CAP_CONN_LOCAL_BUSY 0x40 | ||
378 | |||
379 | #define __mod_retrans_timer() mod_timer(&l2cap_pi(sk)->retrans_timer, \ | ||
380 | jiffies + msecs_to_jiffies(L2CAP_DEFAULT_RETRANS_TO)); | ||
381 | #define __mod_monitor_timer() mod_timer(&l2cap_pi(sk)->monitor_timer, \ | ||
382 | jiffies + msecs_to_jiffies(L2CAP_DEFAULT_MONITOR_TO)); | ||
383 | |||
384 | static inline int l2cap_tx_window_full(struct sock *sk) | ||
385 | { | ||
386 | struct l2cap_pinfo *pi = l2cap_pi(sk); | ||
387 | int sub; | ||
388 | |||
389 | sub = (pi->next_tx_seq - pi->expected_ack_seq) % 64; | ||
390 | |||
391 | if (sub < 0) | ||
392 | sub += 64; | ||
393 | |||
394 | return (sub == pi->remote_tx_win); | ||
395 | } | ||
396 | |||
397 | #define __get_txseq(ctrl) ((ctrl) & L2CAP_CTRL_TXSEQ) >> 1 | ||
398 | #define __get_reqseq(ctrl) ((ctrl) & L2CAP_CTRL_REQSEQ) >> 8 | ||
399 | #define __is_iframe(ctrl) !((ctrl) & L2CAP_CTRL_FRAME_TYPE) | ||
400 | #define __is_sframe(ctrl) (ctrl) & L2CAP_CTRL_FRAME_TYPE | ||
401 | #define __is_sar_start(ctrl) ((ctrl) & L2CAP_CTRL_SAR) == L2CAP_SDU_START | ||
298 | 402 | ||
299 | void l2cap_load(void); | 403 | void l2cap_load(void); |
300 | 404 | ||
diff --git a/include/net/bluetooth/rfcomm.h b/include/net/bluetooth/rfcomm.h index 80072611d26a..921d7b3c7f8d 100644 --- a/include/net/bluetooth/rfcomm.h +++ b/include/net/bluetooth/rfcomm.h | |||
@@ -29,6 +29,7 @@ | |||
29 | #define RFCOMM_CONN_TIMEOUT (HZ * 30) | 29 | #define RFCOMM_CONN_TIMEOUT (HZ * 30) |
30 | #define RFCOMM_DISC_TIMEOUT (HZ * 20) | 30 | #define RFCOMM_DISC_TIMEOUT (HZ * 20) |
31 | #define RFCOMM_AUTH_TIMEOUT (HZ * 25) | 31 | #define RFCOMM_AUTH_TIMEOUT (HZ * 25) |
32 | #define RFCOMM_IDLE_TIMEOUT (HZ * 2) | ||
32 | 33 | ||
33 | #define RFCOMM_DEFAULT_MTU 127 | 34 | #define RFCOMM_DEFAULT_MTU 127 |
34 | #define RFCOMM_DEFAULT_CREDITS 7 | 35 | #define RFCOMM_DEFAULT_CREDITS 7 |
@@ -154,6 +155,7 @@ struct rfcomm_msc { | |||
154 | struct rfcomm_session { | 155 | struct rfcomm_session { |
155 | struct list_head list; | 156 | struct list_head list; |
156 | struct socket *sock; | 157 | struct socket *sock; |
158 | struct timer_list timer; | ||
157 | unsigned long state; | 159 | unsigned long state; |
158 | unsigned long flags; | 160 | unsigned long flags; |
159 | atomic_t refcnt; | 161 | atomic_t refcnt; |
@@ -355,7 +357,17 @@ struct rfcomm_dev_list_req { | |||
355 | }; | 357 | }; |
356 | 358 | ||
357 | int rfcomm_dev_ioctl(struct sock *sk, unsigned int cmd, void __user *arg); | 359 | int rfcomm_dev_ioctl(struct sock *sk, unsigned int cmd, void __user *arg); |
360 | |||
361 | #ifdef CONFIG_BT_RFCOMM_TTY | ||
358 | int rfcomm_init_ttys(void); | 362 | int rfcomm_init_ttys(void); |
359 | void rfcomm_cleanup_ttys(void); | 363 | void rfcomm_cleanup_ttys(void); |
360 | 364 | #else | |
365 | static inline int rfcomm_init_ttys(void) | ||
366 | { | ||
367 | return 0; | ||
368 | } | ||
369 | static inline void rfcomm_cleanup_ttys(void) | ||
370 | { | ||
371 | } | ||
372 | #endif | ||
361 | #endif /* __RFCOMM_H */ | 373 | #endif /* __RFCOMM_H */ |
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h index fa729979de88..3d874c620219 100644 --- a/include/net/cfg80211.h +++ b/include/net/cfg80211.h | |||
@@ -80,7 +80,6 @@ enum ieee80211_channel_flags { | |||
80 | * with cfg80211. | 80 | * with cfg80211. |
81 | * | 81 | * |
82 | * @center_freq: center frequency in MHz | 82 | * @center_freq: center frequency in MHz |
83 | * @max_bandwidth: maximum allowed bandwidth for this channel, in MHz | ||
84 | * @hw_value: hardware-specific value for the channel | 83 | * @hw_value: hardware-specific value for the channel |
85 | * @flags: channel flags from &enum ieee80211_channel_flags. | 84 | * @flags: channel flags from &enum ieee80211_channel_flags. |
86 | * @orig_flags: channel flags at registration time, used by regulatory | 85 | * @orig_flags: channel flags at registration time, used by regulatory |
@@ -97,7 +96,6 @@ enum ieee80211_channel_flags { | |||
97 | struct ieee80211_channel { | 96 | struct ieee80211_channel { |
98 | enum ieee80211_band band; | 97 | enum ieee80211_band band; |
99 | u16 center_freq; | 98 | u16 center_freq; |
100 | u8 max_bandwidth; | ||
101 | u16 hw_value; | 99 | u16 hw_value; |
102 | u32 flags; | 100 | u32 flags; |
103 | int max_antenna_gain; | 101 | int max_antenna_gain; |
@@ -372,6 +370,10 @@ struct rate_info { | |||
372 | * @txrate: current unicast bitrate to this station | 370 | * @txrate: current unicast bitrate to this station |
373 | * @rx_packets: packets received from this station | 371 | * @rx_packets: packets received from this station |
374 | * @tx_packets: packets transmitted to this station | 372 | * @tx_packets: packets transmitted to this station |
373 | * @generation: generation number for nl80211 dumps. | ||
374 | * This number should increase every time the list of stations | ||
375 | * changes, i.e. when a station is added or removed, so that | ||
376 | * userspace can tell whether it got a consistent snapshot. | ||
375 | */ | 377 | */ |
376 | struct station_info { | 378 | struct station_info { |
377 | u32 filled; | 379 | u32 filled; |
@@ -385,6 +387,8 @@ struct station_info { | |||
385 | struct rate_info txrate; | 387 | struct rate_info txrate; |
386 | u32 rx_packets; | 388 | u32 rx_packets; |
387 | u32 tx_packets; | 389 | u32 tx_packets; |
390 | |||
391 | int generation; | ||
388 | }; | 392 | }; |
389 | 393 | ||
390 | /** | 394 | /** |
@@ -444,6 +448,10 @@ enum mpath_info_flags { | |||
444 | * @flags: mesh path flags | 448 | * @flags: mesh path flags |
445 | * @discovery_timeout: total mesh path discovery timeout, in msecs | 449 | * @discovery_timeout: total mesh path discovery timeout, in msecs |
446 | * @discovery_retries: mesh path discovery retries | 450 | * @discovery_retries: mesh path discovery retries |
451 | * @generation: generation number for nl80211 dumps. | ||
452 | * This number should increase every time the list of mesh paths | ||
453 | * changes, i.e. when a station is added or removed, so that | ||
454 | * userspace can tell whether it got a consistent snapshot. | ||
447 | */ | 455 | */ |
448 | struct mpath_info { | 456 | struct mpath_info { |
449 | u32 filled; | 457 | u32 filled; |
@@ -454,6 +462,8 @@ struct mpath_info { | |||
454 | u32 discovery_timeout; | 462 | u32 discovery_timeout; |
455 | u8 discovery_retries; | 463 | u8 discovery_retries; |
456 | u8 flags; | 464 | u8 flags; |
465 | |||
466 | int generation; | ||
457 | }; | 467 | }; |
458 | 468 | ||
459 | /** | 469 | /** |
@@ -547,7 +557,6 @@ struct cfg80211_ssid { | |||
547 | struct cfg80211_scan_request { | 557 | struct cfg80211_scan_request { |
548 | struct cfg80211_ssid *ssids; | 558 | struct cfg80211_ssid *ssids; |
549 | int n_ssids; | 559 | int n_ssids; |
550 | struct ieee80211_channel **channels; | ||
551 | u32 n_channels; | 560 | u32 n_channels; |
552 | const u8 *ie; | 561 | const u8 *ie; |
553 | size_t ie_len; | 562 | size_t ie_len; |
@@ -556,6 +565,9 @@ struct cfg80211_scan_request { | |||
556 | struct wiphy *wiphy; | 565 | struct wiphy *wiphy; |
557 | struct net_device *dev; | 566 | struct net_device *dev; |
558 | bool aborted; | 567 | bool aborted; |
568 | |||
569 | /* keep last */ | ||
570 | struct ieee80211_channel *channels[0]; | ||
559 | }; | 571 | }; |
560 | 572 | ||
561 | /** | 573 | /** |
@@ -1076,6 +1088,10 @@ struct cfg80211_ops { | |||
1076 | * channels at a later time. This can be used for devices which do not | 1088 | * channels at a later time. This can be used for devices which do not |
1077 | * have calibration information gauranteed for frequencies or settings | 1089 | * have calibration information gauranteed for frequencies or settings |
1078 | * outside of its regulatory domain. | 1090 | * outside of its regulatory domain. |
1091 | * @disable_beacon_hints: enable this if your driver needs to ensure that | ||
1092 | * passive scan flags and beaconing flags may not be lifted by cfg80211 | ||
1093 | * due to regulatory beacon hints. For more information on beacon | ||
1094 | * hints read the documenation for regulatory_hint_found_beacon() | ||
1079 | * @reg_notifier: the driver's regulatory notification callback | 1095 | * @reg_notifier: the driver's regulatory notification callback |
1080 | * @regd: the driver's regulatory domain, if one was requested via | 1096 | * @regd: the driver's regulatory domain, if one was requested via |
1081 | * the regulatory_hint() API. This can be used by the driver | 1097 | * the regulatory_hint() API. This can be used by the driver |
@@ -1092,6 +1108,9 @@ struct cfg80211_ops { | |||
1092 | * @net: the network namespace this wiphy currently lives in | 1108 | * @net: the network namespace this wiphy currently lives in |
1093 | * @netnsok: if set to false, do not allow changing the netns of this | 1109 | * @netnsok: if set to false, do not allow changing the netns of this |
1094 | * wiphy at all | 1110 | * wiphy at all |
1111 | * @ps_default: default for powersave, will be set depending on the | ||
1112 | * kernel's default on wiphy_new(), but can be changed by the | ||
1113 | * driver if it has a good reason to override the default | ||
1095 | */ | 1114 | */ |
1096 | struct wiphy { | 1115 | struct wiphy { |
1097 | /* assign these fields before you register the wiphy */ | 1116 | /* assign these fields before you register the wiphy */ |
@@ -1104,8 +1123,10 @@ struct wiphy { | |||
1104 | 1123 | ||
1105 | bool custom_regulatory; | 1124 | bool custom_regulatory; |
1106 | bool strict_regulatory; | 1125 | bool strict_regulatory; |
1126 | bool disable_beacon_hints; | ||
1107 | 1127 | ||
1108 | bool netnsok; | 1128 | bool netnsok; |
1129 | bool ps_default; | ||
1109 | 1130 | ||
1110 | enum cfg80211_signal_type signal_type; | 1131 | enum cfg80211_signal_type signal_type; |
1111 | 1132 | ||
@@ -1304,6 +1325,8 @@ struct wireless_dev { | |||
1304 | 1325 | ||
1305 | struct mutex mtx; | 1326 | struct mutex mtx; |
1306 | 1327 | ||
1328 | struct work_struct cleanup_work; | ||
1329 | |||
1307 | /* currently used for IBSS and SME - might be rearranged later */ | 1330 | /* currently used for IBSS and SME - might be rearranged later */ |
1308 | u8 ssid[IEEE80211_MAX_SSID_LEN]; | 1331 | u8 ssid[IEEE80211_MAX_SSID_LEN]; |
1309 | u8 ssid_len; | 1332 | u8 ssid_len; |
@@ -1330,10 +1353,10 @@ struct wireless_dev { | |||
1330 | struct cfg80211_cached_keys *keys; | 1353 | struct cfg80211_cached_keys *keys; |
1331 | u8 *ie; | 1354 | u8 *ie; |
1332 | size_t ie_len; | 1355 | size_t ie_len; |
1333 | u8 bssid[ETH_ALEN]; | 1356 | u8 bssid[ETH_ALEN], prev_bssid[ETH_ALEN]; |
1334 | u8 ssid[IEEE80211_MAX_SSID_LEN]; | 1357 | u8 ssid[IEEE80211_MAX_SSID_LEN]; |
1335 | s8 default_key, default_mgmt_key; | 1358 | s8 default_key, default_mgmt_key; |
1336 | bool ps; | 1359 | bool ps, prev_bssid_valid; |
1337 | int ps_timeout; | 1360 | int ps_timeout; |
1338 | } wext; | 1361 | } wext; |
1339 | #endif | 1362 | #endif |
diff --git a/include/net/dcbnl.h b/include/net/dcbnl.h index 775cfc8055be..b36ac7e0914d 100644 --- a/include/net/dcbnl.h +++ b/include/net/dcbnl.h | |||
@@ -48,6 +48,8 @@ struct dcbnl_rtnl_ops { | |||
48 | void (*setbcncfg)(struct net_device *, int, u32); | 48 | void (*setbcncfg)(struct net_device *, int, u32); |
49 | void (*getbcnrp)(struct net_device *, int, u8 *); | 49 | void (*getbcnrp)(struct net_device *, int, u8 *); |
50 | void (*setbcnrp)(struct net_device *, int, u8); | 50 | void (*setbcnrp)(struct net_device *, int, u8); |
51 | u8 (*setapp)(struct net_device *, u8, u16, u8); | ||
52 | u8 (*getapp)(struct net_device *, u8, u16); | ||
51 | }; | 53 | }; |
52 | 54 | ||
53 | #endif /* __NET_DCBNL_H__ */ | 55 | #endif /* __NET_DCBNL_H__ */ |
diff --git a/include/net/dst.h b/include/net/dst.h index 7fc409c19b37..5a900ddcf10d 100644 --- a/include/net/dst.h +++ b/include/net/dst.h | |||
@@ -8,6 +8,7 @@ | |||
8 | #ifndef _NET_DST_H | 8 | #ifndef _NET_DST_H |
9 | #define _NET_DST_H | 9 | #define _NET_DST_H |
10 | 10 | ||
11 | #include <net/dst_ops.h> | ||
11 | #include <linux/netdevice.h> | 12 | #include <linux/netdevice.h> |
12 | #include <linux/rtnetlink.h> | 13 | #include <linux/rtnetlink.h> |
13 | #include <linux/rcupdate.h> | 14 | #include <linux/rcupdate.h> |
@@ -102,28 +103,6 @@ struct dst_entry | |||
102 | }; | 103 | }; |
103 | }; | 104 | }; |
104 | 105 | ||
105 | |||
106 | struct dst_ops | ||
107 | { | ||
108 | unsigned short family; | ||
109 | __be16 protocol; | ||
110 | unsigned gc_thresh; | ||
111 | |||
112 | int (*gc)(struct dst_ops *ops); | ||
113 | struct dst_entry * (*check)(struct dst_entry *, __u32 cookie); | ||
114 | void (*destroy)(struct dst_entry *); | ||
115 | void (*ifdown)(struct dst_entry *, | ||
116 | struct net_device *dev, int how); | ||
117 | struct dst_entry * (*negative_advice)(struct dst_entry *); | ||
118 | void (*link_failure)(struct sk_buff *); | ||
119 | void (*update_pmtu)(struct dst_entry *dst, u32 mtu); | ||
120 | int (*local_out)(struct sk_buff *skb); | ||
121 | |||
122 | atomic_t entries; | ||
123 | struct kmem_cache *kmem_cachep; | ||
124 | struct net *dst_net; | ||
125 | }; | ||
126 | |||
127 | #ifdef __KERNEL__ | 106 | #ifdef __KERNEL__ |
128 | 107 | ||
129 | static inline u32 | 108 | static inline u32 |
diff --git a/include/net/dst_ops.h b/include/net/dst_ops.h new file mode 100644 index 000000000000..d1ff9b7e99b8 --- /dev/null +++ b/include/net/dst_ops.h | |||
@@ -0,0 +1,28 @@ | |||
1 | #ifndef _NET_DST_OPS_H | ||
2 | #define _NET_DST_OPS_H | ||
3 | #include <linux/types.h> | ||
4 | |||
5 | struct dst_entry; | ||
6 | struct kmem_cachep; | ||
7 | struct net_device; | ||
8 | struct sk_buff; | ||
9 | |||
10 | struct dst_ops { | ||
11 | unsigned short family; | ||
12 | __be16 protocol; | ||
13 | unsigned gc_thresh; | ||
14 | |||
15 | int (*gc)(struct dst_ops *ops); | ||
16 | struct dst_entry * (*check)(struct dst_entry *, __u32 cookie); | ||
17 | void (*destroy)(struct dst_entry *); | ||
18 | void (*ifdown)(struct dst_entry *, | ||
19 | struct net_device *dev, int how); | ||
20 | struct dst_entry * (*negative_advice)(struct dst_entry *); | ||
21 | void (*link_failure)(struct sk_buff *); | ||
22 | void (*update_pmtu)(struct dst_entry *dst, u32 mtu); | ||
23 | int (*local_out)(struct sk_buff *skb); | ||
24 | |||
25 | atomic_t entries; | ||
26 | struct kmem_cache *kmem_cachep; | ||
27 | }; | ||
28 | #endif | ||
diff --git a/include/net/gen_stats.h b/include/net/gen_stats.h index d136b5240ef2..c1488553e349 100644 --- a/include/net/gen_stats.h +++ b/include/net/gen_stats.h | |||
@@ -28,7 +28,7 @@ extern int gnet_stats_start_copy_compat(struct sk_buff *skb, int type, | |||
28 | spinlock_t *lock, struct gnet_dump *d); | 28 | spinlock_t *lock, struct gnet_dump *d); |
29 | 29 | ||
30 | extern int gnet_stats_copy_basic(struct gnet_dump *d, | 30 | extern int gnet_stats_copy_basic(struct gnet_dump *d, |
31 | struct gnet_stats_basic *b); | 31 | struct gnet_stats_basic_packed *b); |
32 | extern int gnet_stats_copy_rate_est(struct gnet_dump *d, | 32 | extern int gnet_stats_copy_rate_est(struct gnet_dump *d, |
33 | struct gnet_stats_rate_est *r); | 33 | struct gnet_stats_rate_est *r); |
34 | extern int gnet_stats_copy_queue(struct gnet_dump *d, | 34 | extern int gnet_stats_copy_queue(struct gnet_dump *d, |
@@ -37,14 +37,14 @@ extern int gnet_stats_copy_app(struct gnet_dump *d, void *st, int len); | |||
37 | 37 | ||
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 *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_est *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 *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_est *rate_est); |
45 | extern int gen_replace_estimator(struct gnet_stats_basic *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_est *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 *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_est *rate_est); |
50 | #endif | 50 | #endif |
diff --git a/include/net/ieee802154_netdev.h b/include/net/ieee802154_netdev.h index e2506af3e7c8..5dc6a61952de 100644 --- a/include/net/ieee802154_netdev.h +++ b/include/net/ieee802154_netdev.h | |||
@@ -80,7 +80,7 @@ static inline int mac_cb_type(struct sk_buff *skb) | |||
80 | struct ieee802154_mlme_ops { | 80 | struct ieee802154_mlme_ops { |
81 | int (*assoc_req)(struct net_device *dev, | 81 | int (*assoc_req)(struct net_device *dev, |
82 | struct ieee802154_addr *addr, | 82 | struct ieee802154_addr *addr, |
83 | u8 channel, u8 cap); | 83 | u8 channel, u8 page, u8 cap); |
84 | int (*assoc_resp)(struct net_device *dev, | 84 | int (*assoc_resp)(struct net_device *dev, |
85 | struct ieee802154_addr *addr, | 85 | struct ieee802154_addr *addr, |
86 | u16 short_addr, u8 status); | 86 | u16 short_addr, u8 status); |
@@ -89,10 +89,10 @@ struct ieee802154_mlme_ops { | |||
89 | u8 reason); | 89 | u8 reason); |
90 | int (*start_req)(struct net_device *dev, | 90 | int (*start_req)(struct net_device *dev, |
91 | struct ieee802154_addr *addr, | 91 | struct ieee802154_addr *addr, |
92 | u8 channel, u8 bcn_ord, u8 sf_ord, | 92 | u8 channel, u8 page, u8 bcn_ord, u8 sf_ord, |
93 | u8 pan_coord, u8 blx, u8 coord_realign); | 93 | u8 pan_coord, u8 blx, u8 coord_realign); |
94 | int (*scan_req)(struct net_device *dev, | 94 | int (*scan_req)(struct net_device *dev, |
95 | u8 type, u32 channels, u8 duration); | 95 | u8 type, u32 channels, u8 page, u8 duration); |
96 | 96 | ||
97 | /* | 97 | /* |
98 | * FIXME: these should become the part of PIB/MIB interface. | 98 | * FIXME: these should become the part of PIB/MIB interface. |
diff --git a/include/net/iw_handler.h b/include/net/iw_handler.h index 2b3fbbb8669e..e9054a283fde 100644 --- a/include/net/iw_handler.h +++ b/include/net/iw_handler.h | |||
@@ -416,13 +416,13 @@ struct iw_spy_data | |||
416 | * data (i.e. valid as long as struct net_device exist, same locking rules). | 416 | * data (i.e. valid as long as struct net_device exist, same locking rules). |
417 | */ | 417 | */ |
418 | /* Forward declaration */ | 418 | /* Forward declaration */ |
419 | struct ieee80211_device; | 419 | struct libipw_device; |
420 | /* The struct */ | 420 | /* The struct */ |
421 | struct iw_public_data { | 421 | struct iw_public_data { |
422 | /* Driver enhanced spy support */ | 422 | /* Driver enhanced spy support */ |
423 | struct iw_spy_data * spy_data; | 423 | struct iw_spy_data * spy_data; |
424 | /* Structure managed by the in-kernel IEEE 802.11 layer */ | 424 | /* Legacy structure managed by the ipw2x00-specific IEEE 802.11 layer */ |
425 | struct ieee80211_device * ieee80211; | 425 | struct libipw_device * libipw; |
426 | }; | 426 | }; |
427 | 427 | ||
428 | /**************************** PROTOTYPES ****************************/ | 428 | /**************************** PROTOTYPES ****************************/ |
diff --git a/include/net/mac80211.h b/include/net/mac80211.h index e2fb5767e1fa..466859b285e1 100644 --- a/include/net/mac80211.h +++ b/include/net/mac80211.h | |||
@@ -239,7 +239,14 @@ struct ieee80211_bss_conf { | |||
239 | * @IEEE80211_TX_CTL_AMPDU: this frame should be sent as part of an A-MPDU | 239 | * @IEEE80211_TX_CTL_AMPDU: this frame should be sent as part of an A-MPDU |
240 | * @IEEE80211_TX_CTL_INJECTED: Frame was injected, internal to mac80211. | 240 | * @IEEE80211_TX_CTL_INJECTED: Frame was injected, internal to mac80211. |
241 | * @IEEE80211_TX_STAT_TX_FILTERED: The frame was not transmitted | 241 | * @IEEE80211_TX_STAT_TX_FILTERED: The frame was not transmitted |
242 | * because the destination STA was in powersave mode. | 242 | * because the destination STA was in powersave mode. Note that to |
243 | * avoid race conditions, the filter must be set by the hardware or | ||
244 | * firmware upon receiving a frame that indicates that the station | ||
245 | * went to sleep (must be done on device to filter frames already on | ||
246 | * the queue) and may only be unset after mac80211 gives the OK for | ||
247 | * that by setting the IEEE80211_TX_CTL_CLEAR_PS_FILT (see above), | ||
248 | * since only then is it guaranteed that no more frames are in the | ||
249 | * hardware queue. | ||
243 | * @IEEE80211_TX_STAT_ACK: Frame was acknowledged | 250 | * @IEEE80211_TX_STAT_ACK: Frame was acknowledged |
244 | * @IEEE80211_TX_STAT_AMPDU: The frame was aggregated, so status | 251 | * @IEEE80211_TX_STAT_AMPDU: The frame was aggregated, so status |
245 | * is for the whole aggregation. | 252 | * is for the whole aggregation. |
@@ -261,6 +268,10 @@ struct ieee80211_bss_conf { | |||
261 | * @IEEE80211_TX_CTL_PSPOLL_RESPONSE: (internal?) | 268 | * @IEEE80211_TX_CTL_PSPOLL_RESPONSE: (internal?) |
262 | * This frame is a response to a PS-poll frame and should be sent | 269 | * This frame is a response to a PS-poll frame and should be sent |
263 | * although the station is in powersave mode. | 270 | * although the station is in powersave mode. |
271 | * @IEEE80211_TX_CTL_MORE_FRAMES: More frames will be passed to the | ||
272 | * transmit function after the current frame, this can be used | ||
273 | * by drivers to kick the DMA queue only if unset or when the | ||
274 | * queue gets full. | ||
264 | */ | 275 | */ |
265 | enum mac80211_tx_control_flags { | 276 | enum mac80211_tx_control_flags { |
266 | IEEE80211_TX_CTL_REQ_TX_STATUS = BIT(0), | 277 | IEEE80211_TX_CTL_REQ_TX_STATUS = BIT(0), |
@@ -281,6 +292,7 @@ enum mac80211_tx_control_flags { | |||
281 | IEEE80211_TX_INTFL_RETRIED = BIT(15), | 292 | IEEE80211_TX_INTFL_RETRIED = BIT(15), |
282 | IEEE80211_TX_INTFL_DONT_ENCRYPT = BIT(16), | 293 | IEEE80211_TX_INTFL_DONT_ENCRYPT = BIT(16), |
283 | IEEE80211_TX_CTL_PSPOLL_RESPONSE = BIT(17), | 294 | IEEE80211_TX_CTL_PSPOLL_RESPONSE = BIT(17), |
295 | IEEE80211_TX_CTL_MORE_FRAMES = BIT(18), | ||
284 | }; | 296 | }; |
285 | 297 | ||
286 | /** | 298 | /** |
@@ -338,6 +350,21 @@ enum mac80211_rate_control_flags { | |||
338 | * | 350 | * |
339 | * When used for transmit status reporting, the driver should | 351 | * When used for transmit status reporting, the driver should |
340 | * always report the rate along with the flags it used. | 352 | * always report the rate along with the flags it used. |
353 | * | ||
354 | * &struct ieee80211_tx_info contains an array of these structs | ||
355 | * in the control information, and it will be filled by the rate | ||
356 | * control algorithm according to what should be sent. For example, | ||
357 | * if this array contains, in the format { <idx>, <count> } the | ||
358 | * information | ||
359 | * { 3, 2 }, { 2, 2 }, { 1, 4 }, { -1, 0 }, { -1, 0 } | ||
360 | * then this means that the frame should be transmitted | ||
361 | * up to twice at rate 3, up to twice at rate 2, and up to four | ||
362 | * times at rate 1 if it doesn't get acknowledged. Say it gets | ||
363 | * acknowledged by the peer after the fifth attempt, the status | ||
364 | * information should then contain | ||
365 | * { 3, 2 }, { 2, 2 }, { 1, 1 }, { -1, 0 } ... | ||
366 | * since it was transmitted twice at rate 3, twice at rate 2 | ||
367 | * and once at rate 1 after which we received an acknowledgement. | ||
341 | */ | 368 | */ |
342 | struct ieee80211_tx_rate { | 369 | struct ieee80211_tx_rate { |
343 | s8 idx; | 370 | s8 idx; |
@@ -556,7 +583,6 @@ enum ieee80211_conf_flags { | |||
556 | /** | 583 | /** |
557 | * enum ieee80211_conf_changed - denotes which configuration changed | 584 | * enum ieee80211_conf_changed - denotes which configuration changed |
558 | * | 585 | * |
559 | * @_IEEE80211_CONF_CHANGE_RADIO_ENABLED: DEPRECATED | ||
560 | * @IEEE80211_CONF_CHANGE_LISTEN_INTERVAL: the listen interval changed | 586 | * @IEEE80211_CONF_CHANGE_LISTEN_INTERVAL: the listen interval changed |
561 | * @IEEE80211_CONF_CHANGE_RADIOTAP: the radiotap flag changed | 587 | * @IEEE80211_CONF_CHANGE_RADIOTAP: the radiotap flag changed |
562 | * @IEEE80211_CONF_CHANGE_PS: the PS flag or dynamic PS timeout changed | 588 | * @IEEE80211_CONF_CHANGE_PS: the PS flag or dynamic PS timeout changed |
@@ -566,7 +592,6 @@ enum ieee80211_conf_flags { | |||
566 | * @IEEE80211_CONF_CHANGE_IDLE: Idle flag changed | 592 | * @IEEE80211_CONF_CHANGE_IDLE: Idle flag changed |
567 | */ | 593 | */ |
568 | enum ieee80211_conf_changed { | 594 | enum ieee80211_conf_changed { |
569 | _IEEE80211_CONF_CHANGE_RADIO_ENABLED = BIT(0), | ||
570 | IEEE80211_CONF_CHANGE_LISTEN_INTERVAL = BIT(2), | 595 | IEEE80211_CONF_CHANGE_LISTEN_INTERVAL = BIT(2), |
571 | IEEE80211_CONF_CHANGE_RADIOTAP = BIT(3), | 596 | IEEE80211_CONF_CHANGE_RADIOTAP = BIT(3), |
572 | IEEE80211_CONF_CHANGE_PS = BIT(4), | 597 | IEEE80211_CONF_CHANGE_PS = BIT(4), |
@@ -576,14 +601,6 @@ enum ieee80211_conf_changed { | |||
576 | IEEE80211_CONF_CHANGE_IDLE = BIT(8), | 601 | IEEE80211_CONF_CHANGE_IDLE = BIT(8), |
577 | }; | 602 | }; |
578 | 603 | ||
579 | static inline __deprecated enum ieee80211_conf_changed | ||
580 | __IEEE80211_CONF_CHANGE_RADIO_ENABLED(void) | ||
581 | { | ||
582 | return _IEEE80211_CONF_CHANGE_RADIO_ENABLED; | ||
583 | } | ||
584 | #define IEEE80211_CONF_CHANGE_RADIO_ENABLED \ | ||
585 | __IEEE80211_CONF_CHANGE_RADIO_ENABLED() | ||
586 | |||
587 | /** | 604 | /** |
588 | * struct ieee80211_conf - configuration of the device | 605 | * struct ieee80211_conf - configuration of the device |
589 | * | 606 | * |
@@ -591,9 +608,6 @@ __IEEE80211_CONF_CHANGE_RADIO_ENABLED(void) | |||
591 | * | 608 | * |
592 | * @flags: configuration flags defined above | 609 | * @flags: configuration flags defined above |
593 | * | 610 | * |
594 | * @radio_enabled: when zero, driver is required to switch off the radio. | ||
595 | * @beacon_int: DEPRECATED, DO NOT USE | ||
596 | * | ||
597 | * @listen_interval: listen interval in units of beacon interval | 611 | * @listen_interval: listen interval in units of beacon interval |
598 | * @max_sleep_period: the maximum number of beacon intervals to sleep for | 612 | * @max_sleep_period: the maximum number of beacon intervals to sleep for |
599 | * before checking the beacon for a TIM bit (managed mode only); this | 613 | * before checking the beacon for a TIM bit (managed mode only); this |
@@ -617,13 +631,11 @@ __IEEE80211_CONF_CHANGE_RADIO_ENABLED(void) | |||
617 | * number of transmissions not the number of retries | 631 | * number of transmissions not the number of retries |
618 | */ | 632 | */ |
619 | struct ieee80211_conf { | 633 | struct ieee80211_conf { |
620 | int __deprecated beacon_int; | ||
621 | u32 flags; | 634 | u32 flags; |
622 | int power_level, dynamic_ps_timeout; | 635 | int power_level, dynamic_ps_timeout; |
623 | int max_sleep_period; | 636 | int max_sleep_period; |
624 | 637 | ||
625 | u16 listen_interval; | 638 | u16 listen_interval; |
626 | bool __deprecated radio_enabled; | ||
627 | 639 | ||
628 | u8 long_frame_max_tx_count, short_frame_max_tx_count; | 640 | u8 long_frame_max_tx_count, short_frame_max_tx_count; |
629 | 641 | ||
@@ -1192,10 +1204,13 @@ ieee80211_get_alt_retry_rate(const struct ieee80211_hw *hw, | |||
1192 | * the driver's configure_filter() function which frames should be | 1204 | * the driver's configure_filter() function which frames should be |
1193 | * passed to mac80211 and which should be filtered out. | 1205 | * passed to mac80211 and which should be filtered out. |
1194 | * | 1206 | * |
1195 | * The configure_filter() callback is invoked with the parameters | 1207 | * Before configure_filter() is invoked, the prepare_multicast() |
1196 | * @mc_count and @mc_list for the combined multicast address list | 1208 | * callback is invoked with the parameters @mc_count and @mc_list |
1197 | * of all virtual interfaces, @changed_flags telling which flags | 1209 | * for the combined multicast address list of all virtual interfaces. |
1198 | * were changed and @total_flags with the new flag states. | 1210 | * It's use is optional, and it returns a u64 that is passed to |
1211 | * configure_filter(). Additionally, configure_filter() has the | ||
1212 | * arguments @changed_flags telling which flags were changed and | ||
1213 | * @total_flags with the new flag states. | ||
1199 | * | 1214 | * |
1200 | * If your device has no multicast address filters your driver will | 1215 | * If your device has no multicast address filters your driver will |
1201 | * need to check both the %FIF_ALLMULTI flag and the @mc_count | 1216 | * need to check both the %FIF_ALLMULTI flag and the @mc_count |
@@ -1348,9 +1363,13 @@ enum ieee80211_ampdu_mlme_action { | |||
1348 | * for association indication. The @changed parameter indicates which | 1363 | * for association indication. The @changed parameter indicates which |
1349 | * of the bss parameters has changed when a call is made. | 1364 | * of the bss parameters has changed when a call is made. |
1350 | * | 1365 | * |
1366 | * @prepare_multicast: Prepare for multicast filter configuration. | ||
1367 | * This callback is optional, and its return value is passed | ||
1368 | * to configure_filter(). This callback must be atomic. | ||
1369 | * | ||
1351 | * @configure_filter: Configure the device's RX filter. | 1370 | * @configure_filter: Configure the device's RX filter. |
1352 | * See the section "Frame filtering" for more information. | 1371 | * See the section "Frame filtering" for more information. |
1353 | * This callback must be implemented and atomic. | 1372 | * This callback must be implemented. |
1354 | * | 1373 | * |
1355 | * @set_tim: Set TIM bit. mac80211 calls this function when a TIM bit | 1374 | * @set_tim: Set TIM bit. mac80211 calls this function when a TIM bit |
1356 | * must be set or cleared for a given STA. Must be atomic. | 1375 | * must be set or cleared for a given STA. Must be atomic. |
@@ -1452,10 +1471,12 @@ struct ieee80211_ops { | |||
1452 | struct ieee80211_vif *vif, | 1471 | struct ieee80211_vif *vif, |
1453 | struct ieee80211_bss_conf *info, | 1472 | struct ieee80211_bss_conf *info, |
1454 | u32 changed); | 1473 | u32 changed); |
1474 | u64 (*prepare_multicast)(struct ieee80211_hw *hw, | ||
1475 | int mc_count, struct dev_addr_list *mc_list); | ||
1455 | void (*configure_filter)(struct ieee80211_hw *hw, | 1476 | void (*configure_filter)(struct ieee80211_hw *hw, |
1456 | unsigned int changed_flags, | 1477 | unsigned int changed_flags, |
1457 | unsigned int *total_flags, | 1478 | unsigned int *total_flags, |
1458 | int mc_count, struct dev_addr_list *mc_list); | 1479 | u64 multicast); |
1459 | int (*set_tim)(struct ieee80211_hw *hw, struct ieee80211_sta *sta, | 1480 | int (*set_tim)(struct ieee80211_hw *hw, struct ieee80211_sta *sta, |
1460 | bool set); | 1481 | bool set); |
1461 | int (*set_key)(struct ieee80211_hw *hw, enum set_key_cmd cmd, | 1482 | int (*set_key)(struct ieee80211_hw *hw, enum set_key_cmd cmd, |
@@ -1636,12 +1657,6 @@ void ieee80211_free_hw(struct ieee80211_hw *hw); | |||
1636 | */ | 1657 | */ |
1637 | void ieee80211_restart_hw(struct ieee80211_hw *hw); | 1658 | void ieee80211_restart_hw(struct ieee80211_hw *hw); |
1638 | 1659 | ||
1639 | /* | ||
1640 | * trick to avoid symbol clashes with the ieee80211 subsystem, | ||
1641 | * use the inline below instead | ||
1642 | */ | ||
1643 | void __ieee80211_rx(struct ieee80211_hw *hw, struct sk_buff *skb); | ||
1644 | |||
1645 | /** | 1660 | /** |
1646 | * ieee80211_rx - receive frame | 1661 | * ieee80211_rx - receive frame |
1647 | * | 1662 | * |
@@ -1657,10 +1672,7 @@ void __ieee80211_rx(struct ieee80211_hw *hw, struct sk_buff *skb); | |||
1657 | * @hw: the hardware this frame came in on | 1672 | * @hw: the hardware this frame came in on |
1658 | * @skb: the buffer to receive, owned by mac80211 after this call | 1673 | * @skb: the buffer to receive, owned by mac80211 after this call |
1659 | */ | 1674 | */ |
1660 | static inline void ieee80211_rx(struct ieee80211_hw *hw, struct sk_buff *skb) | 1675 | void ieee80211_rx(struct ieee80211_hw *hw, struct sk_buff *skb); |
1661 | { | ||
1662 | __ieee80211_rx(hw, skb); | ||
1663 | } | ||
1664 | 1676 | ||
1665 | /** | 1677 | /** |
1666 | * ieee80211_rx_irqsafe - receive frame | 1678 | * ieee80211_rx_irqsafe - receive frame |
diff --git a/include/net/neighbour.h b/include/net/neighbour.h index 18b69b6cecaf..3817fda82a80 100644 --- a/include/net/neighbour.h +++ b/include/net/neighbour.h | |||
@@ -118,7 +118,7 @@ struct neighbour | |||
118 | int (*output)(struct sk_buff *skb); | 118 | int (*output)(struct sk_buff *skb); |
119 | struct sk_buff_head arp_queue; | 119 | struct sk_buff_head arp_queue; |
120 | struct timer_list timer; | 120 | struct timer_list timer; |
121 | struct neigh_ops *ops; | 121 | const struct neigh_ops *ops; |
122 | u8 primary_key[0]; | 122 | u8 primary_key[0]; |
123 | }; | 123 | }; |
124 | 124 | ||
diff --git a/include/net/netfilter/xt_rateest.h b/include/net/netfilter/xt_rateest.h index 65d594dffbff..ddbf37e19616 100644 --- a/include/net/netfilter/xt_rateest.h +++ b/include/net/netfilter/xt_rateest.h | |||
@@ -8,7 +8,7 @@ struct xt_rateest { | |||
8 | spinlock_t lock; | 8 | spinlock_t lock; |
9 | struct gnet_estimator params; | 9 | struct gnet_estimator params; |
10 | struct gnet_stats_rate_est rstats; | 10 | struct gnet_stats_rate_est rstats; |
11 | struct gnet_stats_basic bstats; | 11 | struct gnet_stats_basic_packed bstats; |
12 | }; | 12 | }; |
13 | 13 | ||
14 | extern struct xt_rateest *xt_rateest_lookup(const char *name); | 14 | extern struct xt_rateest *xt_rateest_lookup(const char *name); |
diff --git a/include/net/netns/ipv6.h b/include/net/netns/ipv6.h index afab4e4cbac7..dfeb2d7c425b 100644 --- a/include/net/netns/ipv6.h +++ b/include/net/netns/ipv6.h | |||
@@ -6,6 +6,7 @@ | |||
6 | 6 | ||
7 | #ifndef __NETNS_IPV6_H__ | 7 | #ifndef __NETNS_IPV6_H__ |
8 | #define __NETNS_IPV6_H__ | 8 | #define __NETNS_IPV6_H__ |
9 | #include <net/dst_ops.h> | ||
9 | 10 | ||
10 | struct ctl_table_header; | 11 | struct ctl_table_header; |
11 | 12 | ||
@@ -42,7 +43,7 @@ struct netns_ipv6 { | |||
42 | struct timer_list ip6_fib_timer; | 43 | struct timer_list ip6_fib_timer; |
43 | struct hlist_head *fib_table_hash; | 44 | struct hlist_head *fib_table_hash; |
44 | struct fib6_table *fib6_main_tbl; | 45 | struct fib6_table *fib6_main_tbl; |
45 | struct dst_ops *ip6_dst_ops; | 46 | struct dst_ops ip6_dst_ops; |
46 | unsigned int ip6_rt_gc_expire; | 47 | unsigned int ip6_rt_gc_expire; |
47 | unsigned long ip6_rt_last_gc; | 48 | unsigned long ip6_rt_last_gc; |
48 | #ifdef CONFIG_IPV6_MULTIPLE_TABLES | 49 | #ifdef CONFIG_IPV6_MULTIPLE_TABLES |
diff --git a/include/net/nl802154.h b/include/net/nl802154.h index 6096096f6d7d..99d2ba1c7e03 100644 --- a/include/net/nl802154.h +++ b/include/net/nl802154.h | |||
@@ -95,7 +95,7 @@ int ieee802154_nl_disassoc_confirm(struct net_device *dev, | |||
95 | * Note: This API does not permit the return of an active scan result. | 95 | * Note: This API does not permit the return of an active scan result. |
96 | */ | 96 | */ |
97 | int ieee802154_nl_scan_confirm(struct net_device *dev, | 97 | int ieee802154_nl_scan_confirm(struct net_device *dev, |
98 | u8 status, u8 scan_type, u32 unscanned, | 98 | u8 status, u8 scan_type, u32 unscanned, u8 page, |
99 | u8 *edl/*, struct list_head *pan_desc_list */); | 99 | u8 *edl/*, struct list_head *pan_desc_list */); |
100 | 100 | ||
101 | /** | 101 | /** |
@@ -114,4 +114,13 @@ int ieee802154_nl_scan_confirm(struct net_device *dev, | |||
114 | int ieee802154_nl_beacon_indic(struct net_device *dev, u16 panid, | 114 | int ieee802154_nl_beacon_indic(struct net_device *dev, u16 panid, |
115 | u16 coord_addr); | 115 | u16 coord_addr); |
116 | 116 | ||
117 | /** | ||
118 | * ieee802154_nl_start_confirm - Notify userland of completion of start. | ||
119 | * @dev: The device which was instructed to scan. | ||
120 | * @status: The status of the scan operation. | ||
121 | * | ||
122 | * Note: This is in section 7.1.14 of the IEEE 802.15.4 document. | ||
123 | */ | ||
124 | int ieee802154_nl_start_confirm(struct net_device *dev, u8 status); | ||
125 | |||
117 | #endif | 126 | #endif |
diff --git a/include/net/rtnetlink.h b/include/net/rtnetlink.h index 85ba560332ed..c3aa044d3fc3 100644 --- a/include/net/rtnetlink.h +++ b/include/net/rtnetlink.h | |||
@@ -70,6 +70,9 @@ struct rtnl_link_ops { | |||
70 | size_t (*get_xstats_size)(const struct net_device *dev); | 70 | size_t (*get_xstats_size)(const struct net_device *dev); |
71 | int (*fill_xstats)(struct sk_buff *skb, | 71 | int (*fill_xstats)(struct sk_buff *skb, |
72 | const struct net_device *dev); | 72 | const struct net_device *dev); |
73 | int (*get_tx_queues)(struct net *net, struct nlattr *tb[], | ||
74 | unsigned int *tx_queues, | ||
75 | unsigned int *real_tx_queues); | ||
73 | }; | 76 | }; |
74 | 77 | ||
75 | extern int __rtnl_link_register(struct rtnl_link_ops *ops); | 78 | extern int __rtnl_link_register(struct rtnl_link_ops *ops); |
diff --git a/include/net/sch_generic.h b/include/net/sch_generic.h index 84b3fc2aef0f..88eb9de095de 100644 --- a/include/net/sch_generic.h +++ b/include/net/sch_generic.h | |||
@@ -46,6 +46,7 @@ struct Qdisc | |||
46 | #define TCQ_F_THROTTLED 2 | 46 | #define TCQ_F_THROTTLED 2 |
47 | #define TCQ_F_INGRESS 4 | 47 | #define TCQ_F_INGRESS 4 |
48 | #define TCQ_F_CAN_BYPASS 8 | 48 | #define TCQ_F_CAN_BYPASS 8 |
49 | #define TCQ_F_MQROOT 16 | ||
49 | #define TCQ_F_WARN_NONWC (1 << 16) | 50 | #define TCQ_F_WARN_NONWC (1 << 16) |
50 | int padded; | 51 | int padded; |
51 | struct Qdisc_ops *ops; | 52 | struct Qdisc_ops *ops; |
@@ -73,13 +74,14 @@ struct Qdisc | |||
73 | */ | 74 | */ |
74 | unsigned long state; | 75 | unsigned long state; |
75 | struct sk_buff_head q; | 76 | struct sk_buff_head q; |
76 | struct gnet_stats_basic bstats; | 77 | struct gnet_stats_basic_packed bstats; |
77 | struct gnet_stats_queue qstats; | 78 | struct gnet_stats_queue qstats; |
78 | }; | 79 | }; |
79 | 80 | ||
80 | struct Qdisc_class_ops | 81 | struct Qdisc_class_ops |
81 | { | 82 | { |
82 | /* Child qdisc manipulation */ | 83 | /* Child qdisc manipulation */ |
84 | unsigned int (*select_queue)(struct Qdisc *, struct tcmsg *); | ||
83 | int (*graft)(struct Qdisc *, unsigned long cl, | 85 | int (*graft)(struct Qdisc *, unsigned long cl, |
84 | struct Qdisc *, struct Qdisc **); | 86 | struct Qdisc *, struct Qdisc **); |
85 | struct Qdisc * (*leaf)(struct Qdisc *, unsigned long cl); | 87 | struct Qdisc * (*leaf)(struct Qdisc *, unsigned long cl); |
@@ -122,6 +124,7 @@ struct Qdisc_ops | |||
122 | void (*reset)(struct Qdisc *); | 124 | void (*reset)(struct Qdisc *); |
123 | void (*destroy)(struct Qdisc *); | 125 | void (*destroy)(struct Qdisc *); |
124 | int (*change)(struct Qdisc *, struct nlattr *arg); | 126 | int (*change)(struct Qdisc *, struct nlattr *arg); |
127 | void (*attach)(struct Qdisc *); | ||
125 | 128 | ||
126 | int (*dump)(struct Qdisc *, struct sk_buff *); | 129 | int (*dump)(struct Qdisc *, struct sk_buff *); |
127 | int (*dump_stats)(struct Qdisc *, struct gnet_dump *); | 130 | int (*dump_stats)(struct Qdisc *, struct gnet_dump *); |
@@ -255,6 +258,8 @@ static inline void sch_tree_unlock(struct Qdisc *q) | |||
255 | 258 | ||
256 | extern struct Qdisc noop_qdisc; | 259 | extern struct Qdisc noop_qdisc; |
257 | extern struct Qdisc_ops noop_qdisc_ops; | 260 | extern struct Qdisc_ops noop_qdisc_ops; |
261 | extern struct Qdisc_ops pfifo_fast_ops; | ||
262 | extern struct Qdisc_ops mq_qdisc_ops; | ||
258 | 263 | ||
259 | struct Qdisc_class_common | 264 | struct Qdisc_class_common |
260 | { | 265 | { |
@@ -302,6 +307,8 @@ extern void dev_init_scheduler(struct net_device *dev); | |||
302 | extern void dev_shutdown(struct net_device *dev); | 307 | extern void dev_shutdown(struct net_device *dev); |
303 | extern void dev_activate(struct net_device *dev); | 308 | extern void dev_activate(struct net_device *dev); |
304 | extern void dev_deactivate(struct net_device *dev); | 309 | extern void dev_deactivate(struct net_device *dev); |
310 | extern struct Qdisc *dev_graft_qdisc(struct netdev_queue *dev_queue, | ||
311 | struct Qdisc *qdisc); | ||
305 | extern void qdisc_reset(struct Qdisc *qdisc); | 312 | extern void qdisc_reset(struct Qdisc *qdisc); |
306 | extern void qdisc_destroy(struct Qdisc *qdisc); | 313 | extern void qdisc_destroy(struct Qdisc *qdisc); |
307 | extern void qdisc_tree_decrease_qlen(struct Qdisc *qdisc, unsigned int n); | 314 | extern void qdisc_tree_decrease_qlen(struct Qdisc *qdisc, unsigned int n); |
diff --git a/include/net/sctp/command.h b/include/net/sctp/command.h index 3b966802e05d..8be5135ff7aa 100644 --- a/include/net/sctp/command.h +++ b/include/net/sctp/command.h | |||
@@ -106,6 +106,7 @@ typedef enum { | |||
106 | SCTP_CMD_ASSOC_SHKEY, /* generate the association shared keys */ | 106 | SCTP_CMD_ASSOC_SHKEY, /* generate the association shared keys */ |
107 | SCTP_CMD_T1_RETRAN, /* Mark for retransmission after T1 timeout */ | 107 | SCTP_CMD_T1_RETRAN, /* Mark for retransmission after T1 timeout */ |
108 | SCTP_CMD_UPDATE_INITTAG, /* Update peer inittag */ | 108 | SCTP_CMD_UPDATE_INITTAG, /* Update peer inittag */ |
109 | SCTP_CMD_SEND_MSG, /* Send the whole use message */ | ||
109 | SCTP_CMD_LAST | 110 | SCTP_CMD_LAST |
110 | } sctp_verb_t; | 111 | } sctp_verb_t; |
111 | 112 | ||
@@ -139,6 +140,7 @@ typedef union { | |||
139 | struct sctp_ulpevent *ulpevent; | 140 | struct sctp_ulpevent *ulpevent; |
140 | struct sctp_packet *packet; | 141 | struct sctp_packet *packet; |
141 | sctp_sackhdr_t *sackh; | 142 | sctp_sackhdr_t *sackh; |
143 | struct sctp_datamsg *msg; | ||
142 | } sctp_arg_t; | 144 | } sctp_arg_t; |
143 | 145 | ||
144 | /* We are simulating ML type constructors here. | 146 | /* We are simulating ML type constructors here. |
@@ -188,6 +190,7 @@ SCTP_ARG_CONSTRUCTOR(PEER_INIT, sctp_init_chunk_t *, init) | |||
188 | SCTP_ARG_CONSTRUCTOR(ULPEVENT, struct sctp_ulpevent *, ulpevent) | 190 | SCTP_ARG_CONSTRUCTOR(ULPEVENT, struct sctp_ulpevent *, ulpevent) |
189 | SCTP_ARG_CONSTRUCTOR(PACKET, struct sctp_packet *, packet) | 191 | SCTP_ARG_CONSTRUCTOR(PACKET, struct sctp_packet *, packet) |
190 | SCTP_ARG_CONSTRUCTOR(SACKH, sctp_sackhdr_t *, sackh) | 192 | SCTP_ARG_CONSTRUCTOR(SACKH, sctp_sackhdr_t *, sackh) |
193 | SCTP_ARG_CONSTRUCTOR(DATAMSG, struct sctp_datamsg *, msg) | ||
191 | 194 | ||
192 | typedef struct { | 195 | typedef struct { |
193 | sctp_arg_t obj; | 196 | sctp_arg_t obj; |
diff --git a/include/net/sctp/constants.h b/include/net/sctp/constants.h index 8bc25f7b04ce..58f714a3b670 100644 --- a/include/net/sctp/constants.h +++ b/include/net/sctp/constants.h | |||
@@ -231,7 +231,7 @@ typedef enum { | |||
231 | SCTP_SS_LISTENING = TCP_LISTEN, | 231 | SCTP_SS_LISTENING = TCP_LISTEN, |
232 | SCTP_SS_ESTABLISHING = TCP_SYN_SENT, | 232 | SCTP_SS_ESTABLISHING = TCP_SYN_SENT, |
233 | SCTP_SS_ESTABLISHED = TCP_ESTABLISHED, | 233 | SCTP_SS_ESTABLISHED = TCP_ESTABLISHED, |
234 | SCTP_SS_DISCONNECTING = TCP_CLOSING, | 234 | SCTP_SS_CLOSING = TCP_CLOSING, |
235 | } sctp_sock_state_t; | 235 | } sctp_sock_state_t; |
236 | 236 | ||
237 | /* These functions map various type to printable names. */ | 237 | /* These functions map various type to printable names. */ |
@@ -363,6 +363,13 @@ typedef enum { | |||
363 | SCTP_SCOPE_UNUSABLE, /* IPv4 unusable addresses */ | 363 | SCTP_SCOPE_UNUSABLE, /* IPv4 unusable addresses */ |
364 | } sctp_scope_t; | 364 | } sctp_scope_t; |
365 | 365 | ||
366 | typedef enum { | ||
367 | SCTP_SCOPE_POLICY_DISABLE, /* Disable IPv4 address scoping */ | ||
368 | SCTP_SCOPE_POLICY_ENABLE, /* Enable IPv4 address scoping */ | ||
369 | SCTP_SCOPE_POLICY_PRIVATE, /* Follow draft but allow IPv4 private addresses */ | ||
370 | SCTP_SCOPE_POLICY_LINK, /* Follow draft but allow IPv4 link local addresses */ | ||
371 | } sctp_scope_policy_t; | ||
372 | |||
366 | /* Based on IPv4 scoping <draft-stewart-tsvwg-sctp-ipv4-00.txt>, | 373 | /* Based on IPv4 scoping <draft-stewart-tsvwg-sctp-ipv4-00.txt>, |
367 | * SCTP IPv4 unusable addresses: 0.0.0.0/8, 224.0.0.0/4, 198.18.0.0/24, | 374 | * SCTP IPv4 unusable addresses: 0.0.0.0/8, 224.0.0.0/4, 198.18.0.0/24, |
368 | * 192.88.99.0/24. | 375 | * 192.88.99.0/24. |
diff --git a/include/net/sctp/sctp.h b/include/net/sctp/sctp.h index d16a304cbed4..8a6d5297de16 100644 --- a/include/net/sctp/sctp.h +++ b/include/net/sctp/sctp.h | |||
@@ -486,15 +486,16 @@ static inline __s32 sctp_jitter(__u32 rto) | |||
486 | } | 486 | } |
487 | 487 | ||
488 | /* Break down data chunks at this point. */ | 488 | /* Break down data chunks at this point. */ |
489 | static inline int sctp_frag_point(const struct sctp_sock *sp, int pmtu) | 489 | static inline int sctp_frag_point(const struct sctp_association *asoc, int pmtu) |
490 | { | 490 | { |
491 | struct sctp_sock *sp = sctp_sk(asoc->base.sk); | ||
491 | int frag = pmtu; | 492 | int frag = pmtu; |
492 | 493 | ||
493 | frag -= sp->pf->af->net_header_len; | 494 | frag -= sp->pf->af->net_header_len; |
494 | frag -= sizeof(struct sctphdr) + sizeof(struct sctp_data_chunk); | 495 | frag -= sizeof(struct sctphdr) + sizeof(struct sctp_data_chunk); |
495 | 496 | ||
496 | if (sp->user_frag) | 497 | if (asoc->user_frag) |
497 | frag = min_t(int, frag, sp->user_frag); | 498 | frag = min_t(int, frag, asoc->user_frag); |
498 | 499 | ||
499 | frag = min_t(int, frag, SCTP_MAX_CHUNK_LEN); | 500 | frag = min_t(int, frag, SCTP_MAX_CHUNK_LEN); |
500 | 501 | ||
diff --git a/include/net/sctp/structs.h b/include/net/sctp/structs.h index edfcacf3250e..42d00ced5eb8 100644 --- a/include/net/sctp/structs.h +++ b/include/net/sctp/structs.h | |||
@@ -219,6 +219,15 @@ extern struct sctp_globals { | |||
219 | /* Flag to idicate if SCTP-AUTH is enabled */ | 219 | /* Flag to idicate if SCTP-AUTH is enabled */ |
220 | int auth_enable; | 220 | int auth_enable; |
221 | 221 | ||
222 | /* | ||
223 | * Policy to control SCTP IPv4 address scoping | ||
224 | * 0 - Disable IPv4 address scoping | ||
225 | * 1 - Enable IPv4 address scoping | ||
226 | * 2 - Selectively allow only IPv4 private addresses | ||
227 | * 3 - Selectively allow only IPv4 link local address | ||
228 | */ | ||
229 | int ipv4_scope_policy; | ||
230 | |||
222 | /* Flag to indicate whether computing and verifying checksum | 231 | /* Flag to indicate whether computing and verifying checksum |
223 | * is disabled. */ | 232 | * is disabled. */ |
224 | int checksum_disable; | 233 | int checksum_disable; |
@@ -252,6 +261,7 @@ extern struct sctp_globals { | |||
252 | #define sctp_port_hashtable (sctp_globals.port_hashtable) | 261 | #define sctp_port_hashtable (sctp_globals.port_hashtable) |
253 | #define sctp_local_addr_list (sctp_globals.local_addr_list) | 262 | #define sctp_local_addr_list (sctp_globals.local_addr_list) |
254 | #define sctp_local_addr_lock (sctp_globals.addr_list_lock) | 263 | #define sctp_local_addr_lock (sctp_globals.addr_list_lock) |
264 | #define sctp_scope_policy (sctp_globals.ipv4_scope_policy) | ||
255 | #define sctp_addip_enable (sctp_globals.addip_enable) | 265 | #define sctp_addip_enable (sctp_globals.addip_enable) |
256 | #define sctp_addip_noauth (sctp_globals.addip_noauth_enable) | 266 | #define sctp_addip_noauth (sctp_globals.addip_noauth_enable) |
257 | #define sctp_prsctp_enable (sctp_globals.prsctp_enable) | 267 | #define sctp_prsctp_enable (sctp_globals.prsctp_enable) |
@@ -628,7 +638,7 @@ struct sctp_datamsg { | |||
628 | /* Chunks waiting to be submitted to lower layer. */ | 638 | /* Chunks waiting to be submitted to lower layer. */ |
629 | struct list_head chunks; | 639 | struct list_head chunks; |
630 | /* Chunks that have been transmitted. */ | 640 | /* Chunks that have been transmitted. */ |
631 | struct list_head track; | 641 | size_t msg_size; |
632 | /* Reference counting. */ | 642 | /* Reference counting. */ |
633 | atomic_t refcnt; | 643 | atomic_t refcnt; |
634 | /* When is this message no longer interesting to the peer? */ | 644 | /* When is this message no longer interesting to the peer? */ |
@@ -643,6 +653,7 @@ struct sctp_datamsg { | |||
643 | struct sctp_datamsg *sctp_datamsg_from_user(struct sctp_association *, | 653 | struct sctp_datamsg *sctp_datamsg_from_user(struct sctp_association *, |
644 | struct sctp_sndrcvinfo *, | 654 | struct sctp_sndrcvinfo *, |
645 | struct msghdr *, int len); | 655 | struct msghdr *, int len); |
656 | void sctp_datamsg_free(struct sctp_datamsg *); | ||
646 | void sctp_datamsg_put(struct sctp_datamsg *); | 657 | void sctp_datamsg_put(struct sctp_datamsg *); |
647 | void sctp_chunk_fail(struct sctp_chunk *, int error); | 658 | void sctp_chunk_fail(struct sctp_chunk *, int error); |
648 | int sctp_chunk_abandoned(struct sctp_chunk *); | 659 | int sctp_chunk_abandoned(struct sctp_chunk *); |
@@ -811,22 +822,12 @@ struct sctp_packet { | |||
811 | /* pointer to the auth chunk for this packet */ | 822 | /* pointer to the auth chunk for this packet */ |
812 | struct sctp_chunk *auth; | 823 | struct sctp_chunk *auth; |
813 | 824 | ||
814 | /* This packet contains a COOKIE-ECHO chunk. */ | 825 | u8 has_cookie_echo:1, /* This packet contains a COOKIE-ECHO chunk. */ |
815 | __u8 has_cookie_echo; | 826 | has_sack:1, /* This packet contains a SACK chunk. */ |
816 | 827 | has_auth:1, /* This packet contains an AUTH chunk */ | |
817 | /* This packet contains a SACK chunk. */ | 828 | has_data:1, /* This packet contains at least 1 DATA chunk */ |
818 | __u8 has_sack; | 829 | ipfragok:1, /* So let ip fragment this packet */ |
819 | 830 | malloced:1; /* Is it malloced? */ | |
820 | /* This packet contains an AUTH chunk */ | ||
821 | __u8 has_auth; | ||
822 | |||
823 | /* This packet contains at least 1 DATA chunk */ | ||
824 | __u8 has_data; | ||
825 | |||
826 | /* SCTP cannot fragment this packet. So let ip fragment it. */ | ||
827 | __u8 ipfragok; | ||
828 | |||
829 | __u8 malloced; | ||
830 | }; | 831 | }; |
831 | 832 | ||
832 | struct sctp_packet *sctp_packet_init(struct sctp_packet *, | 833 | struct sctp_packet *sctp_packet_init(struct sctp_packet *, |
@@ -1567,13 +1568,13 @@ struct sctp_association { | |||
1567 | __u32 sack_cnt; | 1568 | __u32 sack_cnt; |
1568 | 1569 | ||
1569 | /* These are capabilities which our peer advertised. */ | 1570 | /* These are capabilities which our peer advertised. */ |
1570 | __u8 ecn_capable; /* Can peer do ECN? */ | 1571 | __u8 ecn_capable:1, /* Can peer do ECN? */ |
1571 | __u8 ipv4_address; /* Peer understands IPv4 addresses? */ | 1572 | ipv4_address:1, /* Peer understands IPv4 addresses? */ |
1572 | __u8 ipv6_address; /* Peer understands IPv6 addresses? */ | 1573 | ipv6_address:1, /* Peer understands IPv6 addresses? */ |
1573 | __u8 hostname_address;/* Peer understands DNS addresses? */ | 1574 | hostname_address:1, /* Peer understands DNS addresses? */ |
1574 | __u8 asconf_capable; /* Does peer support ADDIP? */ | 1575 | asconf_capable:1, /* Does peer support ADDIP? */ |
1575 | __u8 prsctp_capable; /* Can peer do PR-SCTP? */ | 1576 | prsctp_capable:1, /* Can peer do PR-SCTP? */ |
1576 | __u8 auth_capable; /* Is peer doing SCTP-AUTH? */ | 1577 | auth_capable:1; /* Is peer doing SCTP-AUTH? */ |
1577 | 1578 | ||
1578 | __u32 adaptation_ind; /* Adaptation Code point. */ | 1579 | __u32 adaptation_ind; /* Adaptation Code point. */ |
1579 | 1580 | ||
@@ -1738,6 +1739,12 @@ struct sctp_association { | |||
1738 | */ | 1739 | */ |
1739 | __u32 rwnd_over; | 1740 | __u32 rwnd_over; |
1740 | 1741 | ||
1742 | /* Keeps treack of rwnd pressure. This happens when we have | ||
1743 | * a window, but not recevie buffer (i.e small packets). This one | ||
1744 | * is releases slowly (1 PMTU at a time ). | ||
1745 | */ | ||
1746 | __u32 rwnd_press; | ||
1747 | |||
1741 | /* This is the sndbuf size in use for the association. | 1748 | /* This is the sndbuf size in use for the association. |
1742 | * This corresponds to the sndbuf size for the association, | 1749 | * This corresponds to the sndbuf size for the association, |
1743 | * as specified in the sk->sndbuf. | 1750 | * as specified in the sk->sndbuf. |
@@ -1756,6 +1763,7 @@ struct sctp_association { | |||
1756 | 1763 | ||
1757 | /* The message size at which SCTP fragmentation will occur. */ | 1764 | /* The message size at which SCTP fragmentation will occur. */ |
1758 | __u32 frag_point; | 1765 | __u32 frag_point; |
1766 | __u32 user_frag; | ||
1759 | 1767 | ||
1760 | /* Counter used to count INIT errors. */ | 1768 | /* Counter used to count INIT errors. */ |
1761 | int init_err_counter; | 1769 | int init_err_counter; |
@@ -1905,11 +1913,8 @@ struct sctp_association { | |||
1905 | 1913 | ||
1906 | __u16 active_key_id; | 1914 | __u16 active_key_id; |
1907 | 1915 | ||
1908 | /* Need to send an ECNE Chunk? */ | 1916 | __u8 need_ecne:1, /* Need to send an ECNE Chunk? */ |
1909 | char need_ecne; | 1917 | temp:1; /* Is it a temporary association? */ |
1910 | |||
1911 | /* Is it a temporary association? */ | ||
1912 | char temp; | ||
1913 | }; | 1918 | }; |
1914 | 1919 | ||
1915 | 1920 | ||
diff --git a/include/net/sctp/user.h b/include/net/sctp/user.h index 1580c04f68bc..be2334aaf52e 100644 --- a/include/net/sctp/user.h +++ b/include/net/sctp/user.h | |||
@@ -210,12 +210,6 @@ enum sctp_sinfo_flags { | |||
210 | }; | 210 | }; |
211 | 211 | ||
212 | 212 | ||
213 | typedef union { | ||
214 | __u8 raw; | ||
215 | struct sctp_initmsg init; | ||
216 | struct sctp_sndrcvinfo sndrcv; | ||
217 | } sctp_cmsg_data_t; | ||
218 | |||
219 | /* These are cmsg_types. */ | 213 | /* These are cmsg_types. */ |
220 | typedef enum sctp_cmsg_type { | 214 | typedef enum sctp_cmsg_type { |
221 | SCTP_INIT, /* 5.2.1 SCTP Initiation Structure */ | 215 | SCTP_INIT, /* 5.2.1 SCTP Initiation Structure */ |
diff --git a/include/net/tcp.h b/include/net/tcp.h index 88af84306471..b71a446d58f6 100644 --- a/include/net/tcp.h +++ b/include/net/tcp.h | |||
@@ -469,6 +469,7 @@ extern void __tcp_push_pending_frames(struct sock *sk, unsigned int cur_mss, | |||
469 | int nonagle); | 469 | int nonagle); |
470 | extern int tcp_may_send_now(struct sock *sk); | 470 | extern int tcp_may_send_now(struct sock *sk); |
471 | extern int tcp_retransmit_skb(struct sock *, struct sk_buff *); | 471 | extern int tcp_retransmit_skb(struct sock *, struct sk_buff *); |
472 | extern void tcp_retransmit_timer(struct sock *sk); | ||
472 | extern void tcp_xmit_retransmit_queue(struct sock *); | 473 | extern void tcp_xmit_retransmit_queue(struct sock *); |
473 | extern void tcp_simple_retransmit(struct sock *); | 474 | extern void tcp_simple_retransmit(struct sock *); |
474 | extern int tcp_trim_head(struct sock *, struct sk_buff *, u32); | 475 | extern int tcp_trim_head(struct sock *, struct sk_buff *, u32); |
@@ -521,6 +522,17 @@ extern int tcp_mtu_to_mss(struct sock *sk, int pmtu); | |||
521 | extern int tcp_mss_to_mtu(struct sock *sk, int mss); | 522 | extern int tcp_mss_to_mtu(struct sock *sk, int mss); |
522 | extern void tcp_mtup_init(struct sock *sk); | 523 | extern void tcp_mtup_init(struct sock *sk); |
523 | 524 | ||
525 | static inline void tcp_bound_rto(const struct sock *sk) | ||
526 | { | ||
527 | if (inet_csk(sk)->icsk_rto > TCP_RTO_MAX) | ||
528 | inet_csk(sk)->icsk_rto = TCP_RTO_MAX; | ||
529 | } | ||
530 | |||
531 | static inline u32 __tcp_set_rto(const struct tcp_sock *tp) | ||
532 | { | ||
533 | return (tp->srtt >> 3) + tp->rttvar; | ||
534 | } | ||
535 | |||
524 | static inline void __tcp_fast_path_on(struct tcp_sock *tp, u32 snd_wnd) | 536 | static inline void __tcp_fast_path_on(struct tcp_sock *tp, u32 snd_wnd) |
525 | { | 537 | { |
526 | tp->pred_flags = htonl((tp->tcp_header_len << 26) | | 538 | tp->pred_flags = htonl((tp->tcp_header_len << 26) | |
@@ -1007,6 +1019,11 @@ static inline int keepalive_time_when(const struct tcp_sock *tp) | |||
1007 | return tp->keepalive_time ? : sysctl_tcp_keepalive_time; | 1019 | return tp->keepalive_time ? : sysctl_tcp_keepalive_time; |
1008 | } | 1020 | } |
1009 | 1021 | ||
1022 | static inline int keepalive_probes(const struct tcp_sock *tp) | ||
1023 | { | ||
1024 | return tp->keepalive_probes ? : sysctl_tcp_keepalive_probes; | ||
1025 | } | ||
1026 | |||
1010 | static inline int tcp_fin_time(const struct sock *sk) | 1027 | static inline int tcp_fin_time(const struct sock *sk) |
1011 | { | 1028 | { |
1012 | int fin_timeout = tcp_sk(sk)->linger2 ? : sysctl_tcp_fin_timeout; | 1029 | int fin_timeout = tcp_sk(sk)->linger2 ? : sysctl_tcp_fin_timeout; |
@@ -1169,7 +1186,7 @@ extern int tcp_v4_md5_do_del(struct sock *sk, | |||
1169 | #define tcp_twsk_md5_key(twsk) NULL | 1186 | #define tcp_twsk_md5_key(twsk) NULL |
1170 | #endif | 1187 | #endif |
1171 | 1188 | ||
1172 | extern struct tcp_md5sig_pool **tcp_alloc_md5sig_pool(void); | 1189 | extern struct tcp_md5sig_pool **tcp_alloc_md5sig_pool(struct sock *); |
1173 | extern void tcp_free_md5sig_pool(void); | 1190 | extern void tcp_free_md5sig_pool(void); |
1174 | 1191 | ||
1175 | extern struct tcp_md5sig_pool *__tcp_get_md5sig_pool(int cpu); | 1192 | extern struct tcp_md5sig_pool *__tcp_get_md5sig_pool(int cpu); |
@@ -1235,6 +1252,29 @@ static inline struct sk_buff *tcp_write_queue_prev(struct sock *sk, struct sk_bu | |||
1235 | #define tcp_for_write_queue_from_safe(skb, tmp, sk) \ | 1252 | #define tcp_for_write_queue_from_safe(skb, tmp, sk) \ |
1236 | skb_queue_walk_from_safe(&(sk)->sk_write_queue, skb, tmp) | 1253 | skb_queue_walk_from_safe(&(sk)->sk_write_queue, skb, tmp) |
1237 | 1254 | ||
1255 | /* This function calculates a "timeout" which is equivalent to the timeout of a | ||
1256 | * TCP connection after "boundary" unsucessful, exponentially backed-off | ||
1257 | * retransmissions with an initial RTO of TCP_RTO_MIN. | ||
1258 | */ | ||
1259 | static inline bool retransmits_timed_out(const struct sock *sk, | ||
1260 | unsigned int boundary) | ||
1261 | { | ||
1262 | unsigned int timeout, linear_backoff_thresh; | ||
1263 | |||
1264 | if (!inet_csk(sk)->icsk_retransmits) | ||
1265 | return false; | ||
1266 | |||
1267 | linear_backoff_thresh = ilog2(TCP_RTO_MAX/TCP_RTO_MIN); | ||
1268 | |||
1269 | if (boundary <= linear_backoff_thresh) | ||
1270 | timeout = ((2 << boundary) - 1) * TCP_RTO_MIN; | ||
1271 | else | ||
1272 | timeout = ((2 << linear_backoff_thresh) - 1) * TCP_RTO_MIN + | ||
1273 | (boundary - linear_backoff_thresh) * TCP_RTO_MAX; | ||
1274 | |||
1275 | return (tcp_time_stamp - tcp_sk(sk)->retrans_stamp) >= timeout; | ||
1276 | } | ||
1277 | |||
1238 | static inline struct sk_buff *tcp_send_head(struct sock *sk) | 1278 | static inline struct sk_buff *tcp_send_head(struct sock *sk) |
1239 | { | 1279 | { |
1240 | return sk->sk_send_head; | 1280 | return sk->sk_send_head; |
diff --git a/include/net/transp_v6.h b/include/net/transp_v6.h index bfb240c6cf79..d65381cad0fc 100644 --- a/include/net/transp_v6.h +++ b/include/net/transp_v6.h | |||
@@ -51,7 +51,7 @@ extern int datagram_send_ctl(struct net *net, | |||
51 | /* | 51 | /* |
52 | * address family specific functions | 52 | * address family specific functions |
53 | */ | 53 | */ |
54 | extern struct inet_connection_sock_af_ops ipv4_specific; | 54 | extern const struct inet_connection_sock_af_ops ipv4_specific; |
55 | 55 | ||
56 | extern void inet6_destroy_sock(struct sock *sk); | 56 | extern void inet6_destroy_sock(struct sock *sk); |
57 | 57 | ||
diff --git a/include/net/wpan-phy.h b/include/net/wpan-phy.h new file mode 100644 index 000000000000..547b1e271ac9 --- /dev/null +++ b/include/net/wpan-phy.h | |||
@@ -0,0 +1,63 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2007, 2008, 2009 Siemens AG | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or modify | ||
5 | * it under the terms of the GNU General Public License version 2 | ||
6 | * as published by the Free Software Foundation. | ||
7 | * | ||
8 | * This program is distributed in the hope that it will be useful, | ||
9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
11 | * GNU General Public License for more details. | ||
12 | * | ||
13 | * You should have received a copy of the GNU General Public License along | ||
14 | * with this program; if not, write to the Free Software Foundation, Inc., | ||
15 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | ||
16 | * | ||
17 | * Written by: | ||
18 | * Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> | ||
19 | */ | ||
20 | |||
21 | #ifndef WPAN_PHY_H | ||
22 | #define WPAN_PHY_H | ||
23 | |||
24 | #include <linux/netdevice.h> | ||
25 | #include <linux/mutex.h> | ||
26 | |||
27 | struct wpan_phy { | ||
28 | struct mutex pib_lock; | ||
29 | |||
30 | /* | ||
31 | * This is a PIB acording to 802.15.4-2006. | ||
32 | * We do not provide timing-related variables, as they | ||
33 | * aren't used outside of driver | ||
34 | */ | ||
35 | u8 current_channel; | ||
36 | u8 current_page; | ||
37 | u32 channels_supported; | ||
38 | u8 transmit_power; | ||
39 | u8 cca_mode; | ||
40 | |||
41 | struct device dev; | ||
42 | int idx; | ||
43 | |||
44 | char priv[0] __attribute__((__aligned__(NETDEV_ALIGN))); | ||
45 | }; | ||
46 | |||
47 | struct wpan_phy *wpan_phy_alloc(size_t priv_size); | ||
48 | int wpan_phy_register(struct device *parent, struct wpan_phy *phy); | ||
49 | void wpan_phy_unregister(struct wpan_phy *phy); | ||
50 | void wpan_phy_free(struct wpan_phy *phy); | ||
51 | |||
52 | static inline void *wpan_phy_priv(struct wpan_phy *phy) | ||
53 | { | ||
54 | BUG_ON(!phy); | ||
55 | return &phy->priv; | ||
56 | } | ||
57 | |||
58 | struct wpan_phy *wpan_phy_find(const char *str); | ||
59 | static inline const char *wpan_phy_name(struct wpan_phy *phy) | ||
60 | { | ||
61 | return dev_name(&phy->dev); | ||
62 | } | ||
63 | #endif | ||