diff options
Diffstat (limited to 'include')
34 files changed, 826 insertions, 170 deletions
diff --git a/include/linux/arcdevice.h b/include/linux/arcdevice.h index a1916078fd08..cd4bcb6989ce 100644 --- a/include/linux/arcdevice.h +++ b/include/linux/arcdevice.h | |||
@@ -235,8 +235,6 @@ struct Outgoing { | |||
235 | 235 | ||
236 | 236 | ||
237 | struct arcnet_local { | 237 | struct arcnet_local { |
238 | struct net_device_stats stats; | ||
239 | |||
240 | uint8_t config, /* current value of CONFIG register */ | 238 | uint8_t config, /* current value of CONFIG register */ |
241 | timeout, /* Extended timeout for COM20020 */ | 239 | timeout, /* Extended timeout for COM20020 */ |
242 | backplane, /* Backplane flag for COM20020 */ | 240 | backplane, /* Backplane flag for COM20020 */ |
@@ -335,7 +333,12 @@ void arcnet_dump_skb(struct net_device *dev, struct sk_buff *skb, char *desc); | |||
335 | 333 | ||
336 | void arcnet_unregister_proto(struct ArcProto *proto); | 334 | void arcnet_unregister_proto(struct ArcProto *proto); |
337 | irqreturn_t arcnet_interrupt(int irq, void *dev_id); | 335 | irqreturn_t arcnet_interrupt(int irq, void *dev_id); |
338 | struct net_device *alloc_arcdev(char *name); | 336 | struct net_device *alloc_arcdev(const char *name); |
337 | |||
338 | int arcnet_open(struct net_device *dev); | ||
339 | int arcnet_close(struct net_device *dev); | ||
340 | int arcnet_send_packet(struct sk_buff *skb, struct net_device *dev); | ||
341 | void arcnet_timeout(struct net_device *dev); | ||
339 | 342 | ||
340 | #endif /* __KERNEL__ */ | 343 | #endif /* __KERNEL__ */ |
341 | #endif /* _LINUX_ARCDEVICE_H */ | 344 | #endif /* _LINUX_ARCDEVICE_H */ |
diff --git a/include/linux/ath9k_platform.h b/include/linux/ath9k_platform.h new file mode 100644 index 000000000000..b847fc7b93f9 --- /dev/null +++ b/include/linux/ath9k_platform.h | |||
@@ -0,0 +1,28 @@ | |||
1 | /* | ||
2 | * Copyright (c) 2008 Atheros Communications Inc. | ||
3 | * Copyright (c) 2009 Gabor Juhos <juhosg@openwrt.org> | ||
4 | * Copyright (c) 2009 Imre Kaloz <kaloz@openwrt.org> | ||
5 | * | ||
6 | * Permission to use, copy, modify, and/or distribute this software for any | ||
7 | * purpose with or without fee is hereby granted, provided that the above | ||
8 | * copyright notice and this permission notice appear in all copies. | ||
9 | * | ||
10 | * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
11 | * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
12 | * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
13 | * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
14 | * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
15 | * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
16 | * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
17 | */ | ||
18 | |||
19 | #ifndef _LINUX_ATH9K_PLATFORM_H | ||
20 | #define _LINUX_ATH9K_PLATFORM_H | ||
21 | |||
22 | #define ATH9K_PLAT_EEP_MAX_WORDS 2048 | ||
23 | |||
24 | struct ath9k_platform_data { | ||
25 | u16 eeprom_data[ATH9K_PLAT_EEP_MAX_WORDS]; | ||
26 | }; | ||
27 | |||
28 | #endif /* _LINUX_ATH9K_PLATFORM_H */ | ||
diff --git a/include/linux/com20020.h b/include/linux/com20020.h index ac6d9a43e085..5dcfb944b6ce 100644 --- a/include/linux/com20020.h +++ b/include/linux/com20020.h | |||
@@ -29,6 +29,7 @@ | |||
29 | 29 | ||
30 | int com20020_check(struct net_device *dev); | 30 | int com20020_check(struct net_device *dev); |
31 | int com20020_found(struct net_device *dev, int shared); | 31 | int com20020_found(struct net_device *dev, int shared); |
32 | extern const struct net_device_ops com20020_netdev_ops; | ||
32 | 33 | ||
33 | /* The number of low I/O ports used by the card. */ | 34 | /* The number of low I/O ports used by the card. */ |
34 | #define ARCNET_TOTAL_SIZE 8 | 35 | #define ARCNET_TOTAL_SIZE 8 |
diff --git a/include/linux/connector.h b/include/linux/connector.h index 34f2789d9b9b..fc65d219d88c 100644 --- a/include/linux/connector.h +++ b/include/linux/connector.h | |||
@@ -109,6 +109,12 @@ struct cn_queue_dev { | |||
109 | unsigned char name[CN_CBQ_NAMELEN]; | 109 | unsigned char name[CN_CBQ_NAMELEN]; |
110 | 110 | ||
111 | struct workqueue_struct *cn_queue; | 111 | struct workqueue_struct *cn_queue; |
112 | /* Sent to kevent to create cn_queue only when needed */ | ||
113 | struct work_struct wq_creation; | ||
114 | /* Tell if the wq_creation job is pending/completed */ | ||
115 | atomic_t wq_requested; | ||
116 | /* Wait for cn_queue to be created */ | ||
117 | wait_queue_head_t wq_created; | ||
112 | 118 | ||
113 | struct list_head queue_list; | 119 | struct list_head queue_list; |
114 | spinlock_t queue_lock; | 120 | spinlock_t queue_lock; |
@@ -164,6 +170,8 @@ int cn_netlink_send(struct cn_msg *, u32, gfp_t); | |||
164 | int cn_queue_add_callback(struct cn_queue_dev *dev, char *name, struct cb_id *id, void (*callback)(void *)); | 170 | int cn_queue_add_callback(struct cn_queue_dev *dev, char *name, struct cb_id *id, void (*callback)(void *)); |
165 | void cn_queue_del_callback(struct cn_queue_dev *dev, struct cb_id *id); | 171 | void cn_queue_del_callback(struct cn_queue_dev *dev, struct cb_id *id); |
166 | 172 | ||
173 | int queue_cn_work(struct cn_callback_entry *cbq, struct work_struct *work); | ||
174 | |||
167 | struct cn_queue_dev *cn_queue_alloc_dev(char *name, struct sock *); | 175 | struct cn_queue_dev *cn_queue_alloc_dev(char *name, struct sock *); |
168 | void cn_queue_free_dev(struct cn_queue_dev *dev); | 176 | void cn_queue_free_dev(struct cn_queue_dev *dev); |
169 | 177 | ||
diff --git a/include/linux/dccp.h b/include/linux/dccp.h index 61734e27abb7..7434a8353e23 100644 --- a/include/linux/dccp.h +++ b/include/linux/dccp.h | |||
@@ -355,46 +355,6 @@ static inline unsigned int dccp_hdr_len(const struct sk_buff *skb) | |||
355 | return __dccp_hdr_len(dccp_hdr(skb)); | 355 | return __dccp_hdr_len(dccp_hdr(skb)); |
356 | } | 356 | } |
357 | 357 | ||
358 | |||
359 | /* initial values for each feature */ | ||
360 | #define DCCPF_INITIAL_SEQUENCE_WINDOW 100 | ||
361 | #define DCCPF_INITIAL_ACK_RATIO 2 | ||
362 | #define DCCPF_INITIAL_CCID DCCPC_CCID2 | ||
363 | /* FIXME: for now we're default to 1 but it should really be 0 */ | ||
364 | #define DCCPF_INITIAL_SEND_NDP_COUNT 1 | ||
365 | |||
366 | /** | ||
367 | * struct dccp_minisock - Minimal DCCP connection representation | ||
368 | * | ||
369 | * Will be used to pass the state from dccp_request_sock to dccp_sock. | ||
370 | * | ||
371 | * @dccpms_sequence_window - Sequence Window Feature (section 7.5.2) | ||
372 | * @dccpms_pending - List of features being negotiated | ||
373 | * @dccpms_conf - | ||
374 | */ | ||
375 | struct dccp_minisock { | ||
376 | __u64 dccpms_sequence_window; | ||
377 | struct list_head dccpms_pending; | ||
378 | struct list_head dccpms_conf; | ||
379 | }; | ||
380 | |||
381 | struct dccp_opt_conf { | ||
382 | __u8 *dccpoc_val; | ||
383 | __u8 dccpoc_len; | ||
384 | }; | ||
385 | |||
386 | struct dccp_opt_pend { | ||
387 | struct list_head dccpop_node; | ||
388 | __u8 dccpop_type; | ||
389 | __u8 dccpop_feat; | ||
390 | __u8 *dccpop_val; | ||
391 | __u8 dccpop_len; | ||
392 | int dccpop_conf; | ||
393 | struct dccp_opt_conf *dccpop_sc; | ||
394 | }; | ||
395 | |||
396 | extern void dccp_minisock_init(struct dccp_minisock *dmsk); | ||
397 | |||
398 | /** | 358 | /** |
399 | * struct dccp_request_sock - represent DCCP-specific connection request | 359 | * struct dccp_request_sock - represent DCCP-specific connection request |
400 | * @dreq_inet_rsk: structure inherited from | 360 | * @dreq_inet_rsk: structure inherited from |
@@ -483,13 +443,14 @@ struct dccp_ackvec; | |||
483 | * @dccps_timestamp_time - time of receiving latest @dccps_timestamp_echo | 443 | * @dccps_timestamp_time - time of receiving latest @dccps_timestamp_echo |
484 | * @dccps_l_ack_ratio - feature-local Ack Ratio | 444 | * @dccps_l_ack_ratio - feature-local Ack Ratio |
485 | * @dccps_r_ack_ratio - feature-remote Ack Ratio | 445 | * @dccps_r_ack_ratio - feature-remote Ack Ratio |
446 | * @dccps_l_seq_win - local Sequence Window (influences ack number validity) | ||
447 | * @dccps_r_seq_win - remote Sequence Window (influences seq number validity) | ||
486 | * @dccps_pcslen - sender partial checksum coverage (via sockopt) | 448 | * @dccps_pcslen - sender partial checksum coverage (via sockopt) |
487 | * @dccps_pcrlen - receiver partial checksum coverage (via sockopt) | 449 | * @dccps_pcrlen - receiver partial checksum coverage (via sockopt) |
488 | * @dccps_send_ndp_count - local Send NDP Count feature (7.7.2) | 450 | * @dccps_send_ndp_count - local Send NDP Count feature (7.7.2) |
489 | * @dccps_ndp_count - number of Non Data Packets since last data packet | 451 | * @dccps_ndp_count - number of Non Data Packets since last data packet |
490 | * @dccps_mss_cache - current value of MSS (path MTU minus header sizes) | 452 | * @dccps_mss_cache - current value of MSS (path MTU minus header sizes) |
491 | * @dccps_rate_last - timestamp for rate-limiting DCCP-Sync (RFC 4340, 7.5.4) | 453 | * @dccps_rate_last - timestamp for rate-limiting DCCP-Sync (RFC 4340, 7.5.4) |
492 | * @dccps_minisock - associated minisock (accessed via dccp_msk) | ||
493 | * @dccps_featneg - tracks feature-negotiation state (mostly during handshake) | 454 | * @dccps_featneg - tracks feature-negotiation state (mostly during handshake) |
494 | * @dccps_hc_rx_ackvec - rx half connection ack vector | 455 | * @dccps_hc_rx_ackvec - rx half connection ack vector |
495 | * @dccps_hc_rx_ccid - CCID used for the receiver (or receiving half-connection) | 456 | * @dccps_hc_rx_ccid - CCID used for the receiver (or receiving half-connection) |
@@ -523,12 +484,13 @@ struct dccp_sock { | |||
523 | __u32 dccps_timestamp_time; | 484 | __u32 dccps_timestamp_time; |
524 | __u16 dccps_l_ack_ratio; | 485 | __u16 dccps_l_ack_ratio; |
525 | __u16 dccps_r_ack_ratio; | 486 | __u16 dccps_r_ack_ratio; |
487 | __u64 dccps_l_seq_win:48; | ||
488 | __u64 dccps_r_seq_win:48; | ||
526 | __u8 dccps_pcslen:4; | 489 | __u8 dccps_pcslen:4; |
527 | __u8 dccps_pcrlen:4; | 490 | __u8 dccps_pcrlen:4; |
528 | __u8 dccps_send_ndp_count:1; | 491 | __u8 dccps_send_ndp_count:1; |
529 | __u64 dccps_ndp_count:48; | 492 | __u64 dccps_ndp_count:48; |
530 | unsigned long dccps_rate_last; | 493 | unsigned long dccps_rate_last; |
531 | struct dccp_minisock dccps_minisock; | ||
532 | struct list_head dccps_featneg; | 494 | struct list_head dccps_featneg; |
533 | struct dccp_ackvec *dccps_hc_rx_ackvec; | 495 | struct dccp_ackvec *dccps_hc_rx_ackvec; |
534 | struct ccid *dccps_hc_rx_ccid; | 496 | struct ccid *dccps_hc_rx_ccid; |
@@ -546,11 +508,6 @@ static inline struct dccp_sock *dccp_sk(const struct sock *sk) | |||
546 | return (struct dccp_sock *)sk; | 508 | return (struct dccp_sock *)sk; |
547 | } | 509 | } |
548 | 510 | ||
549 | static inline struct dccp_minisock *dccp_msk(const struct sock *sk) | ||
550 | { | ||
551 | return (struct dccp_minisock *)&dccp_sk(sk)->dccps_minisock; | ||
552 | } | ||
553 | |||
554 | static inline const char *dccp_role(const struct sock *sk) | 511 | static inline const char *dccp_role(const struct sock *sk) |
555 | { | 512 | { |
556 | switch (dccp_sk(sk)->dccps_role) { | 513 | switch (dccp_sk(sk)->dccps_role) { |
diff --git a/include/linux/hdlc.h b/include/linux/hdlc.h index fd47a151665e..6a6e701f1631 100644 --- a/include/linux/hdlc.h +++ b/include/linux/hdlc.h | |||
@@ -38,6 +38,7 @@ struct hdlc_proto { | |||
38 | int (*ioctl)(struct net_device *dev, struct ifreq *ifr); | 38 | int (*ioctl)(struct net_device *dev, struct ifreq *ifr); |
39 | __be16 (*type_trans)(struct sk_buff *skb, struct net_device *dev); | 39 | __be16 (*type_trans)(struct sk_buff *skb, struct net_device *dev); |
40 | int (*netif_rx)(struct sk_buff *skb); | 40 | int (*netif_rx)(struct sk_buff *skb); |
41 | int (*xmit)(struct sk_buff *skb, struct net_device *dev); | ||
41 | struct module *module; | 42 | struct module *module; |
42 | struct hdlc_proto *next; /* next protocol in the list */ | 43 | struct hdlc_proto *next; /* next protocol in the list */ |
43 | }; | 44 | }; |
@@ -102,6 +103,10 @@ static __inline__ void debug_frame(const struct sk_buff *skb) | |||
102 | int hdlc_open(struct net_device *dev); | 103 | int hdlc_open(struct net_device *dev); |
103 | /* Must be called by hardware driver when HDLC device is being closed */ | 104 | /* Must be called by hardware driver when HDLC device is being closed */ |
104 | void hdlc_close(struct net_device *dev); | 105 | void hdlc_close(struct net_device *dev); |
106 | /* May be used by hardware driver */ | ||
107 | int hdlc_change_mtu(struct net_device *dev, int new_mtu); | ||
108 | /* Must be pointed to by hw driver's dev->netdev_ops->ndo_start_xmit */ | ||
109 | int hdlc_start_xmit(struct sk_buff *skb, struct net_device *dev); | ||
105 | 110 | ||
106 | int attach_hdlc_protocol(struct net_device *dev, struct hdlc_proto *proto, | 111 | int attach_hdlc_protocol(struct net_device *dev, struct hdlc_proto *proto, |
107 | size_t size); | 112 | size_t size); |
diff --git a/include/linux/hdlcdrv.h b/include/linux/hdlcdrv.h index bf6302f6b5f8..0821bac62b83 100644 --- a/include/linux/hdlcdrv.h +++ b/include/linux/hdlcdrv.h | |||
@@ -241,7 +241,6 @@ struct hdlcdrv_state { | |||
241 | struct hdlcdrv_bitbuffer bitbuf_hdlc; | 241 | struct hdlcdrv_bitbuffer bitbuf_hdlc; |
242 | #endif /* HDLCDRV_DEBUG */ | 242 | #endif /* HDLCDRV_DEBUG */ |
243 | 243 | ||
244 | struct net_device_stats stats; | ||
245 | int ptt_keyed; | 244 | int ptt_keyed; |
246 | 245 | ||
247 | /* queued skb for transmission */ | 246 | /* queued skb for transmission */ |
diff --git a/include/linux/ibmtr.h b/include/linux/ibmtr.h index 1c7a0dd5536a..06695b74d405 100644 --- a/include/linux/ibmtr.h +++ b/include/linux/ibmtr.h | |||
@@ -207,7 +207,7 @@ struct tok_info { | |||
207 | unsigned short exsap_station_id; | 207 | unsigned short exsap_station_id; |
208 | unsigned short global_int_enable; | 208 | unsigned short global_int_enable; |
209 | struct sk_buff *current_skb; | 209 | struct sk_buff *current_skb; |
210 | struct net_device_stats tr_stats; | 210 | |
211 | unsigned char auto_speedsave; | 211 | unsigned char auto_speedsave; |
212 | open_state open_status, sap_status; | 212 | open_state open_status, sap_status; |
213 | enum {MANUAL, AUTOMATIC} open_mode; | 213 | enum {MANUAL, AUTOMATIC} open_mode; |
diff --git a/include/linux/ieee80211.h b/include/linux/ieee80211.h index c4e6ca1a6306..b1bb817d1427 100644 --- a/include/linux/ieee80211.h +++ b/include/linux/ieee80211.h | |||
@@ -527,6 +527,8 @@ struct ieee80211_tim_ie { | |||
527 | u8 virtual_map[0]; | 527 | u8 virtual_map[0]; |
528 | } __attribute__ ((packed)); | 528 | } __attribute__ ((packed)); |
529 | 529 | ||
530 | #define WLAN_SA_QUERY_TR_ID_LEN 16 | ||
531 | |||
530 | struct ieee80211_mgmt { | 532 | struct ieee80211_mgmt { |
531 | __le16 frame_control; | 533 | __le16 frame_control; |
532 | __le16 duration; | 534 | __le16 duration; |
@@ -646,6 +648,10 @@ struct ieee80211_mgmt { | |||
646 | u8 action_code; | 648 | u8 action_code; |
647 | u8 variable[0]; | 649 | u8 variable[0]; |
648 | } __attribute__((packed)) mesh_action; | 650 | } __attribute__((packed)) mesh_action; |
651 | struct { | ||
652 | u8 action; | ||
653 | u8 trans_id[WLAN_SA_QUERY_TR_ID_LEN]; | ||
654 | } __attribute__ ((packed)) sa_query; | ||
649 | } u; | 655 | } u; |
650 | } __attribute__ ((packed)) action; | 656 | } __attribute__ ((packed)) action; |
651 | } u; | 657 | } u; |
@@ -655,6 +661,15 @@ struct ieee80211_mgmt { | |||
655 | #define IEEE80211_MIN_ACTION_SIZE offsetof(struct ieee80211_mgmt, u.action.u) | 661 | #define IEEE80211_MIN_ACTION_SIZE offsetof(struct ieee80211_mgmt, u.action.u) |
656 | 662 | ||
657 | 663 | ||
664 | /* Management MIC information element (IEEE 802.11w) */ | ||
665 | struct ieee80211_mmie { | ||
666 | u8 element_id; | ||
667 | u8 length; | ||
668 | __le16 key_id; | ||
669 | u8 sequence_number[6]; | ||
670 | u8 mic[8]; | ||
671 | } __attribute__ ((packed)); | ||
672 | |||
658 | /* Control frames */ | 673 | /* Control frames */ |
659 | struct ieee80211_rts { | 674 | struct ieee80211_rts { |
660 | __le16 frame_control; | 675 | __le16 frame_control; |
@@ -899,6 +914,9 @@ enum ieee80211_statuscode { | |||
899 | /* 802.11g */ | 914 | /* 802.11g */ |
900 | WLAN_STATUS_ASSOC_DENIED_NOSHORTTIME = 25, | 915 | WLAN_STATUS_ASSOC_DENIED_NOSHORTTIME = 25, |
901 | WLAN_STATUS_ASSOC_DENIED_NODSSSOFDM = 26, | 916 | WLAN_STATUS_ASSOC_DENIED_NODSSSOFDM = 26, |
917 | /* 802.11w */ | ||
918 | WLAN_STATUS_ASSOC_REJECTED_TEMPORARILY = 30, | ||
919 | WLAN_STATUS_ROBUST_MGMT_FRAME_POLICY_VIOLATION = 31, | ||
902 | /* 802.11i */ | 920 | /* 802.11i */ |
903 | WLAN_STATUS_INVALID_IE = 40, | 921 | WLAN_STATUS_INVALID_IE = 40, |
904 | WLAN_STATUS_INVALID_GROUP_CIPHER = 41, | 922 | WLAN_STATUS_INVALID_GROUP_CIPHER = 41, |
@@ -1018,6 +1036,8 @@ enum ieee80211_eid { | |||
1018 | WLAN_EID_HT_INFORMATION = 61, | 1036 | WLAN_EID_HT_INFORMATION = 61, |
1019 | /* 802.11i */ | 1037 | /* 802.11i */ |
1020 | WLAN_EID_RSN = 48, | 1038 | WLAN_EID_RSN = 48, |
1039 | WLAN_EID_TIMEOUT_INTERVAL = 56, | ||
1040 | WLAN_EID_MMIE = 76 /* 802.11w */, | ||
1021 | WLAN_EID_WPA = 221, | 1041 | WLAN_EID_WPA = 221, |
1022 | WLAN_EID_GENERIC = 221, | 1042 | WLAN_EID_GENERIC = 221, |
1023 | WLAN_EID_VENDOR_SPECIFIC = 221, | 1043 | WLAN_EID_VENDOR_SPECIFIC = 221, |
@@ -1030,6 +1050,8 @@ enum ieee80211_category { | |||
1030 | WLAN_CATEGORY_QOS = 1, | 1050 | WLAN_CATEGORY_QOS = 1, |
1031 | WLAN_CATEGORY_DLS = 2, | 1051 | WLAN_CATEGORY_DLS = 2, |
1032 | WLAN_CATEGORY_BACK = 3, | 1052 | WLAN_CATEGORY_BACK = 3, |
1053 | WLAN_CATEGORY_PUBLIC = 4, | ||
1054 | WLAN_CATEGORY_SA_QUERY = 8, | ||
1033 | WLAN_CATEGORY_WMM = 17, | 1055 | WLAN_CATEGORY_WMM = 17, |
1034 | }; | 1056 | }; |
1035 | 1057 | ||
@@ -1104,6 +1126,12 @@ struct ieee80211_country_ie_triplet { | |||
1104 | }; | 1126 | }; |
1105 | } __attribute__ ((packed)); | 1127 | } __attribute__ ((packed)); |
1106 | 1128 | ||
1129 | enum ieee80211_timeout_interval_type { | ||
1130 | WLAN_TIMEOUT_REASSOC_DEADLINE = 1 /* 802.11r */, | ||
1131 | WLAN_TIMEOUT_KEY_LIFETIME = 2 /* 802.11r */, | ||
1132 | WLAN_TIMEOUT_ASSOC_COMEBACK = 3 /* 802.11w */, | ||
1133 | }; | ||
1134 | |||
1107 | /* BACK action code */ | 1135 | /* BACK action code */ |
1108 | enum ieee80211_back_actioncode { | 1136 | enum ieee80211_back_actioncode { |
1109 | WLAN_ACTION_ADDBA_REQ = 0, | 1137 | WLAN_ACTION_ADDBA_REQ = 0, |
@@ -1118,6 +1146,13 @@ enum ieee80211_back_parties { | |||
1118 | WLAN_BACK_TIMER = 2, | 1146 | WLAN_BACK_TIMER = 2, |
1119 | }; | 1147 | }; |
1120 | 1148 | ||
1149 | /* SA Query action */ | ||
1150 | enum ieee80211_sa_query_action { | ||
1151 | WLAN_ACTION_SA_QUERY_REQUEST = 0, | ||
1152 | WLAN_ACTION_SA_QUERY_RESPONSE = 1, | ||
1153 | }; | ||
1154 | |||
1155 | |||
1121 | /* A-MSDU 802.11n */ | 1156 | /* A-MSDU 802.11n */ |
1122 | #define IEEE80211_QOS_CONTROL_A_MSDU_PRESENT 0x0080 | 1157 | #define IEEE80211_QOS_CONTROL_A_MSDU_PRESENT 0x0080 |
1123 | 1158 | ||
@@ -1128,6 +1163,7 @@ enum ieee80211_back_parties { | |||
1128 | /* reserved: 0x000FAC03 */ | 1163 | /* reserved: 0x000FAC03 */ |
1129 | #define WLAN_CIPHER_SUITE_CCMP 0x000FAC04 | 1164 | #define WLAN_CIPHER_SUITE_CCMP 0x000FAC04 |
1130 | #define WLAN_CIPHER_SUITE_WEP104 0x000FAC05 | 1165 | #define WLAN_CIPHER_SUITE_WEP104 0x000FAC05 |
1166 | #define WLAN_CIPHER_SUITE_AES_CMAC 0x000FAC06 | ||
1131 | 1167 | ||
1132 | #define WLAN_MAX_KEY_LEN 32 | 1168 | #define WLAN_MAX_KEY_LEN 32 |
1133 | 1169 | ||
@@ -1185,4 +1221,149 @@ static inline u8 *ieee80211_get_DA(struct ieee80211_hdr *hdr) | |||
1185 | return hdr->addr1; | 1221 | return hdr->addr1; |
1186 | } | 1222 | } |
1187 | 1223 | ||
1224 | /** | ||
1225 | * ieee80211_is_robust_mgmt_frame - check if frame is a robust management frame | ||
1226 | * @hdr: the frame (buffer must include at least the first octet of payload) | ||
1227 | */ | ||
1228 | static inline bool ieee80211_is_robust_mgmt_frame(struct ieee80211_hdr *hdr) | ||
1229 | { | ||
1230 | if (ieee80211_is_disassoc(hdr->frame_control) || | ||
1231 | ieee80211_is_deauth(hdr->frame_control)) | ||
1232 | return true; | ||
1233 | |||
1234 | if (ieee80211_is_action(hdr->frame_control)) { | ||
1235 | u8 *category; | ||
1236 | |||
1237 | /* | ||
1238 | * Action frames, excluding Public Action frames, are Robust | ||
1239 | * Management Frames. However, if we are looking at a Protected | ||
1240 | * frame, skip the check since the data may be encrypted and | ||
1241 | * the frame has already been found to be a Robust Management | ||
1242 | * Frame (by the other end). | ||
1243 | */ | ||
1244 | if (ieee80211_has_protected(hdr->frame_control)) | ||
1245 | return true; | ||
1246 | category = ((u8 *) hdr) + 24; | ||
1247 | return *category != WLAN_CATEGORY_PUBLIC; | ||
1248 | } | ||
1249 | |||
1250 | return false; | ||
1251 | } | ||
1252 | |||
1253 | /** | ||
1254 | * ieee80211_fhss_chan_to_freq - get channel frequency | ||
1255 | * @channel: the FHSS channel | ||
1256 | * | ||
1257 | * Convert IEEE802.11 FHSS channel to frequency (MHz) | ||
1258 | * Ref IEEE 802.11-2007 section 14.6 | ||
1259 | */ | ||
1260 | static inline int ieee80211_fhss_chan_to_freq(int channel) | ||
1261 | { | ||
1262 | if ((channel > 1) && (channel < 96)) | ||
1263 | return channel + 2400; | ||
1264 | else | ||
1265 | return -1; | ||
1266 | } | ||
1267 | |||
1268 | /** | ||
1269 | * ieee80211_freq_to_fhss_chan - get channel | ||
1270 | * @freq: the channels frequency | ||
1271 | * | ||
1272 | * Convert frequency (MHz) to IEEE802.11 FHSS channel | ||
1273 | * Ref IEEE 802.11-2007 section 14.6 | ||
1274 | */ | ||
1275 | static inline int ieee80211_freq_to_fhss_chan(int freq) | ||
1276 | { | ||
1277 | if ((freq > 2401) && (freq < 2496)) | ||
1278 | return freq - 2400; | ||
1279 | else | ||
1280 | return -1; | ||
1281 | } | ||
1282 | |||
1283 | /** | ||
1284 | * ieee80211_dsss_chan_to_freq - get channel center frequency | ||
1285 | * @channel: the DSSS channel | ||
1286 | * | ||
1287 | * Convert IEEE802.11 DSSS channel to the center frequency (MHz). | ||
1288 | * Ref IEEE 802.11-2007 section 15.6 | ||
1289 | */ | ||
1290 | static inline int ieee80211_dsss_chan_to_freq(int channel) | ||
1291 | { | ||
1292 | if ((channel > 0) && (channel < 14)) | ||
1293 | return 2407 + (channel * 5); | ||
1294 | else if (channel == 14) | ||
1295 | return 2484; | ||
1296 | else | ||
1297 | return -1; | ||
1298 | } | ||
1299 | |||
1300 | /** | ||
1301 | * ieee80211_freq_to_dsss_chan - get channel | ||
1302 | * @freq: the frequency | ||
1303 | * | ||
1304 | * Convert frequency (MHz) to IEEE802.11 DSSS channel | ||
1305 | * Ref IEEE 802.11-2007 section 15.6 | ||
1306 | * | ||
1307 | * This routine selects the channel with the closest center frequency. | ||
1308 | */ | ||
1309 | static inline int ieee80211_freq_to_dsss_chan(int freq) | ||
1310 | { | ||
1311 | if ((freq >= 2410) && (freq < 2475)) | ||
1312 | return (freq - 2405) / 5; | ||
1313 | else if ((freq >= 2482) && (freq < 2487)) | ||
1314 | return 14; | ||
1315 | else | ||
1316 | return -1; | ||
1317 | } | ||
1318 | |||
1319 | /* Convert IEEE802.11 HR DSSS channel to frequency (MHz) and back | ||
1320 | * Ref IEEE 802.11-2007 section 18.4.6.2 | ||
1321 | * | ||
1322 | * The channels and frequencies are the same as those defined for DSSS | ||
1323 | */ | ||
1324 | #define ieee80211_hr_chan_to_freq(chan) ieee80211_dsss_chan_to_freq(chan) | ||
1325 | #define ieee80211_freq_to_hr_chan(freq) ieee80211_freq_to_dsss_chan(freq) | ||
1326 | |||
1327 | /* Convert IEEE802.11 ERP channel to frequency (MHz) and back | ||
1328 | * Ref IEEE 802.11-2007 section 19.4.2 | ||
1329 | */ | ||
1330 | #define ieee80211_erp_chan_to_freq(chan) ieee80211_hr_chan_to_freq(chan) | ||
1331 | #define ieee80211_freq_to_erp_chan(freq) ieee80211_freq_to_hr_chan(freq) | ||
1332 | |||
1333 | /** | ||
1334 | * ieee80211_ofdm_chan_to_freq - get channel center frequency | ||
1335 | * @s_freq: starting frequency == (dotChannelStartingFactor/2) MHz | ||
1336 | * @channel: the OFDM channel | ||
1337 | * | ||
1338 | * Convert IEEE802.11 OFDM channel to center frequency (MHz) | ||
1339 | * Ref IEEE 802.11-2007 section 17.3.8.3.2 | ||
1340 | */ | ||
1341 | static inline int ieee80211_ofdm_chan_to_freq(int s_freq, int channel) | ||
1342 | { | ||
1343 | if ((channel > 0) && (channel <= 200) && | ||
1344 | (s_freq >= 4000)) | ||
1345 | return s_freq + (channel * 5); | ||
1346 | else | ||
1347 | return -1; | ||
1348 | } | ||
1349 | |||
1350 | /** | ||
1351 | * ieee80211_freq_to_ofdm_channel - get channel | ||
1352 | * @s_freq: starting frequency == (dotChannelStartingFactor/2) MHz | ||
1353 | * @freq: the frequency | ||
1354 | * | ||
1355 | * Convert frequency (MHz) to IEEE802.11 OFDM channel | ||
1356 | * Ref IEEE 802.11-2007 section 17.3.8.3.2 | ||
1357 | * | ||
1358 | * This routine selects the channel with the closest center frequency. | ||
1359 | */ | ||
1360 | static inline int ieee80211_freq_to_ofdm_chan(int s_freq, int freq) | ||
1361 | { | ||
1362 | if ((freq > (s_freq + 2)) && (freq <= (s_freq + 1202)) && | ||
1363 | (s_freq >= 4000)) | ||
1364 | return (freq + 2 - s_freq) / 5; | ||
1365 | else | ||
1366 | return -1; | ||
1367 | } | ||
1368 | |||
1188 | #endif /* LINUX_IEEE80211_H */ | 1369 | #endif /* LINUX_IEEE80211_H */ |
diff --git a/include/linux/if.h b/include/linux/if.h index 2a6e29620a96..1108f3e099e3 100644 --- a/include/linux/if.h +++ b/include/linux/if.h | |||
@@ -66,6 +66,7 @@ | |||
66 | #define IFF_SLAVE_NEEDARP 0x40 /* need ARPs for validation */ | 66 | #define IFF_SLAVE_NEEDARP 0x40 /* need ARPs for validation */ |
67 | #define IFF_ISATAP 0x80 /* ISATAP interface (RFC4214) */ | 67 | #define IFF_ISATAP 0x80 /* ISATAP interface (RFC4214) */ |
68 | #define IFF_MASTER_ARPMON 0x100 /* bonding master, ARP mon in use */ | 68 | #define IFF_MASTER_ARPMON 0x100 /* bonding master, ARP mon in use */ |
69 | #define IFF_WAN_HDLC 0x200 /* WAN HDLC device */ | ||
69 | 70 | ||
70 | #define IF_GET_IFACE 0x0001 /* for querying only */ | 71 | #define IF_GET_IFACE 0x0001 /* for querying only */ |
71 | #define IF_GET_PROTO 0x0002 | 72 | #define IF_GET_PROTO 0x0002 |
diff --git a/include/linux/inetdevice.h b/include/linux/inetdevice.h index 06fcdb45106b..acef2a770b6b 100644 --- a/include/linux/inetdevice.h +++ b/include/linux/inetdevice.h | |||
@@ -108,6 +108,7 @@ static inline void ipv4_devconf_setall(struct in_device *in_dev) | |||
108 | #define IN_DEV_ARPFILTER(in_dev) IN_DEV_ORCONF((in_dev), ARPFILTER) | 108 | #define IN_DEV_ARPFILTER(in_dev) IN_DEV_ORCONF((in_dev), ARPFILTER) |
109 | #define IN_DEV_ARP_ANNOUNCE(in_dev) IN_DEV_MAXCONF((in_dev), ARP_ANNOUNCE) | 109 | #define IN_DEV_ARP_ANNOUNCE(in_dev) IN_DEV_MAXCONF((in_dev), ARP_ANNOUNCE) |
110 | #define IN_DEV_ARP_IGNORE(in_dev) IN_DEV_MAXCONF((in_dev), ARP_IGNORE) | 110 | #define IN_DEV_ARP_IGNORE(in_dev) IN_DEV_MAXCONF((in_dev), ARP_IGNORE) |
111 | #define IN_DEV_ARP_NOTIFY(in_dev) IN_DEV_MAXCONF((in_dev), ARP_NOTIFY) | ||
111 | 112 | ||
112 | struct in_ifaddr | 113 | struct in_ifaddr |
113 | { | 114 | { |
diff --git a/include/linux/mroute.h b/include/linux/mroute.h index 8a455694d682..0d45b4e8d367 100644 --- a/include/linux/mroute.h +++ b/include/linux/mroute.h | |||
@@ -193,6 +193,9 @@ struct vif_device | |||
193 | struct mfc_cache | 193 | struct mfc_cache |
194 | { | 194 | { |
195 | struct mfc_cache *next; /* Next entry on cache line */ | 195 | struct mfc_cache *next; /* Next entry on cache line */ |
196 | #ifdef CONFIG_NET_NS | ||
197 | struct net *mfc_net; | ||
198 | #endif | ||
196 | __be32 mfc_mcastgrp; /* Group the entry belongs to */ | 199 | __be32 mfc_mcastgrp; /* Group the entry belongs to */ |
197 | __be32 mfc_origin; /* Source of packet */ | 200 | __be32 mfc_origin; /* Source of packet */ |
198 | vifi_t mfc_parent; /* Source interface */ | 201 | vifi_t mfc_parent; /* Source interface */ |
@@ -215,6 +218,18 @@ struct mfc_cache | |||
215 | } mfc_un; | 218 | } mfc_un; |
216 | }; | 219 | }; |
217 | 220 | ||
221 | static inline | ||
222 | struct net *mfc_net(const struct mfc_cache *mfc) | ||
223 | { | ||
224 | return read_pnet(&mfc->mfc_net); | ||
225 | } | ||
226 | |||
227 | static inline | ||
228 | void mfc_net_set(struct mfc_cache *mfc, struct net *net) | ||
229 | { | ||
230 | write_pnet(&mfc->mfc_net, hold_net(net)); | ||
231 | } | ||
232 | |||
218 | #define MFC_STATIC 1 | 233 | #define MFC_STATIC 1 |
219 | #define MFC_NOTIFY 2 | 234 | #define MFC_NOTIFY 2 |
220 | 235 | ||
@@ -241,7 +256,8 @@ struct mfc_cache | |||
241 | 256 | ||
242 | #ifdef __KERNEL__ | 257 | #ifdef __KERNEL__ |
243 | struct rtmsg; | 258 | struct rtmsg; |
244 | extern int ipmr_get_route(struct sk_buff *skb, struct rtmsg *rtm, int nowait); | 259 | extern int ipmr_get_route(struct net *net, struct sk_buff *skb, |
260 | struct rtmsg *rtm, int nowait); | ||
245 | #endif | 261 | #endif |
246 | 262 | ||
247 | #endif | 263 | #endif |
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index ec54785d34f9..7a5057fbb7cd 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h | |||
@@ -984,6 +984,9 @@ void netif_napi_add(struct net_device *dev, struct napi_struct *napi, | |||
984 | void netif_napi_del(struct napi_struct *napi); | 984 | void netif_napi_del(struct napi_struct *napi); |
985 | 985 | ||
986 | struct napi_gro_cb { | 986 | struct napi_gro_cb { |
987 | /* This indicates where we are processing relative to skb->data. */ | ||
988 | int data_offset; | ||
989 | |||
987 | /* This is non-zero if the packet may be of the same flow. */ | 990 | /* This is non-zero if the packet may be of the same flow. */ |
988 | int same_flow; | 991 | int same_flow; |
989 | 992 | ||
@@ -1087,6 +1090,29 @@ extern int dev_restart(struct net_device *dev); | |||
1087 | #ifdef CONFIG_NETPOLL_TRAP | 1090 | #ifdef CONFIG_NETPOLL_TRAP |
1088 | extern int netpoll_trap(void); | 1091 | extern int netpoll_trap(void); |
1089 | #endif | 1092 | #endif |
1093 | extern void *skb_gro_header(struct sk_buff *skb, unsigned int hlen); | ||
1094 | extern int skb_gro_receive(struct sk_buff **head, | ||
1095 | struct sk_buff *skb); | ||
1096 | |||
1097 | static inline unsigned int skb_gro_offset(const struct sk_buff *skb) | ||
1098 | { | ||
1099 | return NAPI_GRO_CB(skb)->data_offset; | ||
1100 | } | ||
1101 | |||
1102 | static inline unsigned int skb_gro_len(const struct sk_buff *skb) | ||
1103 | { | ||
1104 | return skb->len - NAPI_GRO_CB(skb)->data_offset; | ||
1105 | } | ||
1106 | |||
1107 | static inline void skb_gro_pull(struct sk_buff *skb, unsigned int len) | ||
1108 | { | ||
1109 | NAPI_GRO_CB(skb)->data_offset += len; | ||
1110 | } | ||
1111 | |||
1112 | static inline void skb_gro_reset_offset(struct sk_buff *skb) | ||
1113 | { | ||
1114 | NAPI_GRO_CB(skb)->data_offset = 0; | ||
1115 | } | ||
1090 | 1116 | ||
1091 | static inline int dev_hard_header(struct sk_buff *skb, struct net_device *dev, | 1117 | static inline int dev_hard_header(struct sk_buff *skb, struct net_device *dev, |
1092 | unsigned short type, | 1118 | unsigned short type, |
@@ -1375,12 +1401,15 @@ extern int netif_receive_skb(struct sk_buff *skb); | |||
1375 | extern void napi_gro_flush(struct napi_struct *napi); | 1401 | extern void napi_gro_flush(struct napi_struct *napi); |
1376 | extern int dev_gro_receive(struct napi_struct *napi, | 1402 | extern int dev_gro_receive(struct napi_struct *napi, |
1377 | struct sk_buff *skb); | 1403 | struct sk_buff *skb); |
1404 | extern int napi_skb_finish(int ret, struct sk_buff *skb); | ||
1378 | extern int napi_gro_receive(struct napi_struct *napi, | 1405 | extern int napi_gro_receive(struct napi_struct *napi, |
1379 | struct sk_buff *skb); | 1406 | struct sk_buff *skb); |
1380 | extern void napi_reuse_skb(struct napi_struct *napi, | 1407 | extern void napi_reuse_skb(struct napi_struct *napi, |
1381 | struct sk_buff *skb); | 1408 | struct sk_buff *skb); |
1382 | extern struct sk_buff * napi_fraginfo_skb(struct napi_struct *napi, | 1409 | extern struct sk_buff * napi_fraginfo_skb(struct napi_struct *napi, |
1383 | struct napi_gro_fraginfo *info); | 1410 | struct napi_gro_fraginfo *info); |
1411 | extern int napi_frags_finish(struct napi_struct *napi, | ||
1412 | struct sk_buff *skb, int ret); | ||
1384 | extern int napi_gro_frags(struct napi_struct *napi, | 1413 | extern int napi_gro_frags(struct napi_struct *napi, |
1385 | struct napi_gro_fraginfo *info); | 1414 | struct napi_gro_fraginfo *info); |
1386 | extern void netif_nit_deliver(struct sk_buff *skb); | 1415 | extern void netif_nit_deliver(struct sk_buff *skb); |
@@ -1574,56 +1603,6 @@ static inline u32 netif_msg_init(int debug_value, int default_msg_enable_bits) | |||
1574 | return (1 << debug_value) - 1; | 1603 | return (1 << debug_value) - 1; |
1575 | } | 1604 | } |
1576 | 1605 | ||
1577 | /* Test if receive needs to be scheduled but only if up */ | ||
1578 | static inline int netif_rx_schedule_prep(struct napi_struct *napi) | ||
1579 | { | ||
1580 | return napi_schedule_prep(napi); | ||
1581 | } | ||
1582 | |||
1583 | /* Add interface to tail of rx poll list. This assumes that _prep has | ||
1584 | * already been called and returned 1. | ||
1585 | */ | ||
1586 | static inline void __netif_rx_schedule(struct napi_struct *napi) | ||
1587 | { | ||
1588 | __napi_schedule(napi); | ||
1589 | } | ||
1590 | |||
1591 | /* Try to reschedule poll. Called by irq handler. */ | ||
1592 | |||
1593 | static inline void netif_rx_schedule(struct napi_struct *napi) | ||
1594 | { | ||
1595 | if (netif_rx_schedule_prep(napi)) | ||
1596 | __netif_rx_schedule(napi); | ||
1597 | } | ||
1598 | |||
1599 | /* Try to reschedule poll. Called by dev->poll() after netif_rx_complete(). */ | ||
1600 | static inline int netif_rx_reschedule(struct napi_struct *napi) | ||
1601 | { | ||
1602 | if (napi_schedule_prep(napi)) { | ||
1603 | __netif_rx_schedule(napi); | ||
1604 | return 1; | ||
1605 | } | ||
1606 | return 0; | ||
1607 | } | ||
1608 | |||
1609 | /* same as netif_rx_complete, except that local_irq_save(flags) | ||
1610 | * has already been issued | ||
1611 | */ | ||
1612 | static inline void __netif_rx_complete(struct napi_struct *napi) | ||
1613 | { | ||
1614 | __napi_complete(napi); | ||
1615 | } | ||
1616 | |||
1617 | /* Remove interface from poll list: it must be in the poll list | ||
1618 | * on current cpu. This primitive is called by dev->poll(), when | ||
1619 | * it completes the work. The device cannot be out of poll list at this | ||
1620 | * moment, it is BUG(). | ||
1621 | */ | ||
1622 | static inline void netif_rx_complete(struct napi_struct *napi) | ||
1623 | { | ||
1624 | napi_complete(napi); | ||
1625 | } | ||
1626 | |||
1627 | static inline void __netif_tx_lock(struct netdev_queue *txq, int cpu) | 1606 | static inline void __netif_tx_lock(struct netdev_queue *txq, int cpu) |
1628 | { | 1607 | { |
1629 | spin_lock(&txq->_xmit_lock); | 1608 | spin_lock(&txq->_xmit_lock); |
diff --git a/include/linux/nl80211.h b/include/linux/nl80211.h index e86ed59f9ad5..76aae3d8e97e 100644 --- a/include/linux/nl80211.h +++ b/include/linux/nl80211.h | |||
@@ -47,7 +47,7 @@ | |||
47 | * @NL80211_CMD_SET_WIPHY: set wiphy parameters, needs %NL80211_ATTR_WIPHY or | 47 | * @NL80211_CMD_SET_WIPHY: set wiphy parameters, needs %NL80211_ATTR_WIPHY or |
48 | * %NL80211_ATTR_IFINDEX; can be used to set %NL80211_ATTR_WIPHY_NAME, | 48 | * %NL80211_ATTR_IFINDEX; can be used to set %NL80211_ATTR_WIPHY_NAME, |
49 | * %NL80211_ATTR_WIPHY_TXQ_PARAMS, %NL80211_ATTR_WIPHY_FREQ, and/or | 49 | * %NL80211_ATTR_WIPHY_TXQ_PARAMS, %NL80211_ATTR_WIPHY_FREQ, and/or |
50 | * %NL80211_ATTR_WIPHY_SEC_CHAN_OFFSET. | 50 | * %NL80211_ATTR_WIPHY_CHANNEL_TYPE. |
51 | * @NL80211_CMD_NEW_WIPHY: Newly created wiphy, response to get request | 51 | * @NL80211_CMD_NEW_WIPHY: Newly created wiphy, response to get request |
52 | * or rename notification. Has attributes %NL80211_ATTR_WIPHY and | 52 | * or rename notification. Has attributes %NL80211_ATTR_WIPHY and |
53 | * %NL80211_ATTR_WIPHY_NAME. | 53 | * %NL80211_ATTR_WIPHY_NAME. |
@@ -72,8 +72,8 @@ | |||
72 | * | 72 | * |
73 | * @NL80211_CMD_GET_KEY: Get sequence counter information for a key specified | 73 | * @NL80211_CMD_GET_KEY: Get sequence counter information for a key specified |
74 | * by %NL80211_ATTR_KEY_IDX and/or %NL80211_ATTR_MAC. | 74 | * by %NL80211_ATTR_KEY_IDX and/or %NL80211_ATTR_MAC. |
75 | * @NL80211_CMD_SET_KEY: Set key attributes %NL80211_ATTR_KEY_DEFAULT or | 75 | * @NL80211_CMD_SET_KEY: Set key attributes %NL80211_ATTR_KEY_DEFAULT, |
76 | * %NL80211_ATTR_KEY_THRESHOLD. | 76 | * %NL80211_ATTR_KEY_DEFAULT_MGMT, or %NL80211_ATTR_KEY_THRESHOLD. |
77 | * @NL80211_CMD_NEW_KEY: add a key with given %NL80211_ATTR_KEY_DATA, | 77 | * @NL80211_CMD_NEW_KEY: add a key with given %NL80211_ATTR_KEY_DATA, |
78 | * %NL80211_ATTR_KEY_IDX, %NL80211_ATTR_MAC and %NL80211_ATTR_KEY_CIPHER | 78 | * %NL80211_ATTR_KEY_IDX, %NL80211_ATTR_MAC and %NL80211_ATTR_KEY_CIPHER |
79 | * attributes. | 79 | * attributes. |
@@ -84,7 +84,7 @@ | |||
84 | * %NL80222_CMD_NEW_BEACON message) | 84 | * %NL80222_CMD_NEW_BEACON message) |
85 | * @NL80211_CMD_SET_BEACON: set the beacon on an access point interface | 85 | * @NL80211_CMD_SET_BEACON: set the beacon on an access point interface |
86 | * using the %NL80211_ATTR_BEACON_INTERVAL, %NL80211_ATTR_DTIM_PERIOD, | 86 | * using the %NL80211_ATTR_BEACON_INTERVAL, %NL80211_ATTR_DTIM_PERIOD, |
87 | * %NL80211_BEACON_HEAD and %NL80211_BEACON_TAIL attributes. | 87 | * %NL80211_ATTR_BEACON_HEAD and %NL80211_ATTR_BEACON_TAIL attributes. |
88 | * @NL80211_CMD_NEW_BEACON: add a new beacon to an access point interface, | 88 | * @NL80211_CMD_NEW_BEACON: add a new beacon to an access point interface, |
89 | * parameters are like for %NL80211_CMD_SET_BEACON. | 89 | * parameters are like for %NL80211_CMD_SET_BEACON. |
90 | * @NL80211_CMD_DEL_BEACON: remove the beacon, stop sending it | 90 | * @NL80211_CMD_DEL_BEACON: remove the beacon, stop sending it |
@@ -133,6 +133,14 @@ | |||
133 | * @NL80211_CMD_SET_MESH_PARAMS: Set mesh networking properties for the | 133 | * @NL80211_CMD_SET_MESH_PARAMS: Set mesh networking properties for the |
134 | * interface identified by %NL80211_ATTR_IFINDEX | 134 | * interface identified by %NL80211_ATTR_IFINDEX |
135 | * | 135 | * |
136 | * @NL80211_CMD_SET_MGMT_EXTRA_IE: Set extra IEs for management frames. The | ||
137 | * interface is identified with %NL80211_ATTR_IFINDEX and the management | ||
138 | * frame subtype with %NL80211_ATTR_MGMT_SUBTYPE. The extra IE data to be | ||
139 | * added to the end of the specified management frame is specified with | ||
140 | * %NL80211_ATTR_IE. If the command succeeds, the requested data will be | ||
141 | * added to all specified management frames generated by | ||
142 | * kernel/firmware/driver. | ||
143 | * | ||
136 | * @NL80211_CMD_MAX: highest used command number | 144 | * @NL80211_CMD_MAX: highest used command number |
137 | * @__NL80211_CMD_AFTER_LAST: internal use | 145 | * @__NL80211_CMD_AFTER_LAST: internal use |
138 | */ | 146 | */ |
@@ -178,6 +186,8 @@ enum nl80211_commands { | |||
178 | NL80211_CMD_GET_MESH_PARAMS, | 186 | NL80211_CMD_GET_MESH_PARAMS, |
179 | NL80211_CMD_SET_MESH_PARAMS, | 187 | NL80211_CMD_SET_MESH_PARAMS, |
180 | 188 | ||
189 | NL80211_CMD_SET_MGMT_EXTRA_IE, | ||
190 | |||
181 | /* add new commands above here */ | 191 | /* add new commands above here */ |
182 | 192 | ||
183 | /* used to define NL80211_CMD_MAX below */ | 193 | /* used to define NL80211_CMD_MAX below */ |
@@ -190,6 +200,7 @@ enum nl80211_commands { | |||
190 | * here | 200 | * here |
191 | */ | 201 | */ |
192 | #define NL80211_CMD_SET_BSS NL80211_CMD_SET_BSS | 202 | #define NL80211_CMD_SET_BSS NL80211_CMD_SET_BSS |
203 | #define NL80211_CMD_SET_MGMT_EXTRA_IE NL80211_CMD_SET_MGMT_EXTRA_IE | ||
193 | 204 | ||
194 | /** | 205 | /** |
195 | * enum nl80211_attrs - nl80211 netlink attributes | 206 | * enum nl80211_attrs - nl80211 netlink attributes |
@@ -284,6 +295,12 @@ enum nl80211_commands { | |||
284 | * supported interface types, each a flag attribute with the number | 295 | * supported interface types, each a flag attribute with the number |
285 | * of the interface mode. | 296 | * of the interface mode. |
286 | * | 297 | * |
298 | * @NL80211_ATTR_MGMT_SUBTYPE: Management frame subtype for | ||
299 | * %NL80211_CMD_SET_MGMT_EXTRA_IE. | ||
300 | * | ||
301 | * @NL80211_ATTR_IE: Information element(s) data (used, e.g., with | ||
302 | * %NL80211_CMD_SET_MGMT_EXTRA_IE). | ||
303 | * | ||
287 | * @NL80211_ATTR_MAX: highest attribute number currently defined | 304 | * @NL80211_ATTR_MAX: highest attribute number currently defined |
288 | * @__NL80211_ATTR_AFTER_LAST: internal use | 305 | * @__NL80211_ATTR_AFTER_LAST: internal use |
289 | */ | 306 | */ |
@@ -346,6 +363,11 @@ enum nl80211_attrs { | |||
346 | NL80211_ATTR_WIPHY_FREQ, | 363 | NL80211_ATTR_WIPHY_FREQ, |
347 | NL80211_ATTR_WIPHY_CHANNEL_TYPE, | 364 | NL80211_ATTR_WIPHY_CHANNEL_TYPE, |
348 | 365 | ||
366 | NL80211_ATTR_KEY_DEFAULT_MGMT, | ||
367 | |||
368 | NL80211_ATTR_MGMT_SUBTYPE, | ||
369 | NL80211_ATTR_IE, | ||
370 | |||
349 | /* add attributes here, update the policy in nl80211.c */ | 371 | /* add attributes here, update the policy in nl80211.c */ |
350 | 372 | ||
351 | __NL80211_ATTR_AFTER_LAST, | 373 | __NL80211_ATTR_AFTER_LAST, |
@@ -360,7 +382,9 @@ enum nl80211_attrs { | |||
360 | #define NL80211_ATTR_BSS_BASIC_RATES NL80211_ATTR_BSS_BASIC_RATES | 382 | #define NL80211_ATTR_BSS_BASIC_RATES NL80211_ATTR_BSS_BASIC_RATES |
361 | #define NL80211_ATTR_WIPHY_TXQ_PARAMS NL80211_ATTR_WIPHY_TXQ_PARAMS | 383 | #define NL80211_ATTR_WIPHY_TXQ_PARAMS NL80211_ATTR_WIPHY_TXQ_PARAMS |
362 | #define NL80211_ATTR_WIPHY_FREQ NL80211_ATTR_WIPHY_FREQ | 384 | #define NL80211_ATTR_WIPHY_FREQ NL80211_ATTR_WIPHY_FREQ |
363 | #define NL80211_ATTR_WIPHY_SEC_CHAN_OFFSET NL80211_ATTR_WIPHY_SEC_CHAN_OFFSET | 385 | #define NL80211_ATTR_WIPHY_CHANNEL_TYPE NL80211_ATTR_WIPHY_CHANNEL_TYPE |
386 | #define NL80211_ATTR_MGMT_SUBTYPE NL80211_ATTR_MGMT_SUBTYPE | ||
387 | #define NL80211_ATTR_IE NL80211_ATTR_IE | ||
364 | 388 | ||
365 | #define NL80211_MAX_SUPP_RATES 32 | 389 | #define NL80211_MAX_SUPP_RATES 32 |
366 | #define NL80211_MAX_SUPP_REG_RULES 32 | 390 | #define NL80211_MAX_SUPP_REG_RULES 32 |
@@ -412,12 +436,14 @@ enum nl80211_iftype { | |||
412 | * @NL80211_STA_FLAG_SHORT_PREAMBLE: station is capable of receiving frames | 436 | * @NL80211_STA_FLAG_SHORT_PREAMBLE: station is capable of receiving frames |
413 | * with short barker preamble | 437 | * with short barker preamble |
414 | * @NL80211_STA_FLAG_WME: station is WME/QoS capable | 438 | * @NL80211_STA_FLAG_WME: station is WME/QoS capable |
439 | * @NL80211_STA_FLAG_MFP: station uses management frame protection | ||
415 | */ | 440 | */ |
416 | enum nl80211_sta_flags { | 441 | enum nl80211_sta_flags { |
417 | __NL80211_STA_FLAG_INVALID, | 442 | __NL80211_STA_FLAG_INVALID, |
418 | NL80211_STA_FLAG_AUTHORIZED, | 443 | NL80211_STA_FLAG_AUTHORIZED, |
419 | NL80211_STA_FLAG_SHORT_PREAMBLE, | 444 | NL80211_STA_FLAG_SHORT_PREAMBLE, |
420 | NL80211_STA_FLAG_WME, | 445 | NL80211_STA_FLAG_WME, |
446 | NL80211_STA_FLAG_MFP, | ||
421 | 447 | ||
422 | /* keep last */ | 448 | /* keep last */ |
423 | __NL80211_STA_FLAG_AFTER_LAST, | 449 | __NL80211_STA_FLAG_AFTER_LAST, |
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h index 52a9fe08451c..966e02332990 100644 --- a/include/linux/pci_ids.h +++ b/include/linux/pci_ids.h | |||
@@ -834,6 +834,8 @@ | |||
834 | #define PCI_DEVICE_ID_PROMISE_20276 0x5275 | 834 | #define PCI_DEVICE_ID_PROMISE_20276 0x5275 |
835 | #define PCI_DEVICE_ID_PROMISE_20277 0x7275 | 835 | #define PCI_DEVICE_ID_PROMISE_20277 0x7275 |
836 | 836 | ||
837 | #define PCI_VENDOR_ID_FOXCONN 0x105b | ||
838 | |||
837 | #define PCI_VENDOR_ID_UMC 0x1060 | 839 | #define PCI_VENDOR_ID_UMC 0x1060 |
838 | #define PCI_DEVICE_ID_UMC_UM8673F 0x0101 | 840 | #define PCI_DEVICE_ID_UMC_UM8673F 0x0101 |
839 | #define PCI_DEVICE_ID_UMC_UM8886BF 0x673a | 841 | #define PCI_DEVICE_ID_UMC_UM8886BF 0x673a |
@@ -1969,6 +1971,8 @@ | |||
1969 | 1971 | ||
1970 | #define PCI_VENDOR_ID_SAMSUNG 0x144d | 1972 | #define PCI_VENDOR_ID_SAMSUNG 0x144d |
1971 | 1973 | ||
1974 | #define PCI_VENDOR_ID_AMBIT 0x1468 | ||
1975 | |||
1972 | #define PCI_VENDOR_ID_MYRICOM 0x14c1 | 1976 | #define PCI_VENDOR_ID_MYRICOM 0x14c1 |
1973 | 1977 | ||
1974 | #define PCI_VENDOR_ID_TITAN 0x14D2 | 1978 | #define PCI_VENDOR_ID_TITAN 0x14D2 |
@@ -2213,6 +2217,8 @@ | |||
2213 | 2217 | ||
2214 | #define PCI_VENDOR_ID_TOPSPIN 0x1867 | 2218 | #define PCI_VENDOR_ID_TOPSPIN 0x1867 |
2215 | 2219 | ||
2220 | #define PCI_VENDOR_ID_SILAN 0x1904 | ||
2221 | |||
2216 | #define PCI_VENDOR_ID_TDI 0x192E | 2222 | #define PCI_VENDOR_ID_TDI 0x192E |
2217 | #define PCI_DEVICE_ID_TDI_EHCI 0x0101 | 2223 | #define PCI_DEVICE_ID_TDI_EHCI 0x0101 |
2218 | 2224 | ||
diff --git a/include/linux/ppp_channel.h b/include/linux/ppp_channel.h index a942892d6dfe..9d64bdf14770 100644 --- a/include/linux/ppp_channel.h +++ b/include/linux/ppp_channel.h | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <linux/list.h> | 22 | #include <linux/list.h> |
23 | #include <linux/skbuff.h> | 23 | #include <linux/skbuff.h> |
24 | #include <linux/poll.h> | 24 | #include <linux/poll.h> |
25 | #include <net/net_namespace.h> | ||
25 | 26 | ||
26 | struct ppp_channel; | 27 | struct ppp_channel; |
27 | 28 | ||
@@ -56,6 +57,9 @@ extern void ppp_input(struct ppp_channel *, struct sk_buff *); | |||
56 | that we may have missed a packet. */ | 57 | that we may have missed a packet. */ |
57 | extern void ppp_input_error(struct ppp_channel *, int code); | 58 | extern void ppp_input_error(struct ppp_channel *, int code); |
58 | 59 | ||
60 | /* Attach a channel to a given PPP unit in specified net. */ | ||
61 | extern int ppp_register_net_channel(struct net *, struct ppp_channel *); | ||
62 | |||
59 | /* Attach a channel to a given PPP unit. */ | 63 | /* Attach a channel to a given PPP unit. */ |
60 | extern int ppp_register_channel(struct ppp_channel *); | 64 | extern int ppp_register_channel(struct ppp_channel *); |
61 | 65 | ||
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index cf2cb50f77d1..08670d017479 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h | |||
@@ -1687,8 +1687,6 @@ extern int skb_shift(struct sk_buff *tgt, struct sk_buff *skb, | |||
1687 | int shiftlen); | 1687 | int shiftlen); |
1688 | 1688 | ||
1689 | extern struct sk_buff *skb_segment(struct sk_buff *skb, int features); | 1689 | extern struct sk_buff *skb_segment(struct sk_buff *skb, int features); |
1690 | extern int skb_gro_receive(struct sk_buff **head, | ||
1691 | struct sk_buff *skb); | ||
1692 | 1690 | ||
1693 | static inline void *skb_header_pointer(const struct sk_buff *skb, int offset, | 1691 | static inline void *skb_header_pointer(const struct sk_buff *skb, int offset, |
1694 | int len, void *buffer) | 1692 | int len, void *buffer) |
@@ -1904,6 +1902,21 @@ static inline void skb_copy_queue_mapping(struct sk_buff *to, const struct sk_bu | |||
1904 | to->queue_mapping = from->queue_mapping; | 1902 | to->queue_mapping = from->queue_mapping; |
1905 | } | 1903 | } |
1906 | 1904 | ||
1905 | static inline void skb_record_rx_queue(struct sk_buff *skb, u16 rx_queue) | ||
1906 | { | ||
1907 | skb->queue_mapping = rx_queue + 1; | ||
1908 | } | ||
1909 | |||
1910 | static inline u16 skb_get_rx_queue(struct sk_buff *skb) | ||
1911 | { | ||
1912 | return skb->queue_mapping - 1; | ||
1913 | } | ||
1914 | |||
1915 | static inline bool skb_rx_queue_recorded(struct sk_buff *skb) | ||
1916 | { | ||
1917 | return (skb->queue_mapping != 0); | ||
1918 | } | ||
1919 | |||
1907 | #ifdef CONFIG_XFRM | 1920 | #ifdef CONFIG_XFRM |
1908 | static inline struct sec_path *skb_sec_path(struct sk_buff *skb) | 1921 | static inline struct sec_path *skb_sec_path(struct sk_buff *skb) |
1909 | { | 1922 | { |
diff --git a/include/linux/smsc911x.h b/include/linux/smsc911x.h index 1cbf0313adde..b32725075d71 100644 --- a/include/linux/smsc911x.h +++ b/include/linux/smsc911x.h | |||
@@ -43,5 +43,8 @@ struct smsc911x_platform_config { | |||
43 | /* Constants for flags */ | 43 | /* Constants for flags */ |
44 | #define SMSC911X_USE_16BIT (BIT(0)) | 44 | #define SMSC911X_USE_16BIT (BIT(0)) |
45 | #define SMSC911X_USE_32BIT (BIT(1)) | 45 | #define SMSC911X_USE_32BIT (BIT(1)) |
46 | #define SMSC911X_FORCE_INTERNAL_PHY (BIT(2)) | ||
47 | #define SMSC911X_FORCE_EXTERNAL_PHY (BIT(3)) | ||
48 | #define SMSC911X_SAVE_MAC_ADDRESS (BIT(4)) | ||
46 | 49 | ||
47 | #endif /* __LINUX_SMSC911X_H__ */ | 50 | #endif /* __LINUX_SMSC911X_H__ */ |
diff --git a/include/linux/spi/libertas_spi.h b/include/linux/spi/libertas_spi.h new file mode 100644 index 000000000000..ada71b4f3788 --- /dev/null +++ b/include/linux/spi/libertas_spi.h | |||
@@ -0,0 +1,25 @@ | |||
1 | /* | ||
2 | * board-specific data for the libertas_spi driver. | ||
3 | * | ||
4 | * Copyright 2008 Analog Devices Inc. | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License as published by | ||
8 | * the Free Software Foundation; either version 2 of the License, or (at | ||
9 | * your option) any later version. | ||
10 | */ | ||
11 | #ifndef _LIBERTAS_SPI_H_ | ||
12 | #define _LIBERTAS_SPI_H_ | ||
13 | struct libertas_spi_platform_data { | ||
14 | /* There are two ways to read data from the WLAN module's SPI | ||
15 | * interface. Setting 0 or 1 here controls which one is used. | ||
16 | * | ||
17 | * Usually you want to set use_dummy_writes = 1. | ||
18 | * However, if that doesn't work or if you are using a slow SPI clock | ||
19 | * speed, you may want to use 0 here. */ | ||
20 | u16 use_dummy_writes; | ||
21 | |||
22 | /* GPIO number to use as chip select */ | ||
23 | u16 gpio_cs; | ||
24 | }; | ||
25 | #endif | ||
diff --git a/include/linux/ssb/ssb_regs.h b/include/linux/ssb/ssb_regs.h index 99a0f991e850..a01b982b5783 100644 --- a/include/linux/ssb/ssb_regs.h +++ b/include/linux/ssb/ssb_regs.h | |||
@@ -326,6 +326,42 @@ | |||
326 | #define SSB_SPROM5_GPIOB_P3 0xFF00 /* Pin 3 */ | 326 | #define SSB_SPROM5_GPIOB_P3 0xFF00 /* Pin 3 */ |
327 | #define SSB_SPROM5_GPIOB_P3_SHIFT 8 | 327 | #define SSB_SPROM5_GPIOB_P3_SHIFT 8 |
328 | 328 | ||
329 | /* SPROM Revision 8 */ | ||
330 | #define SSB_SPROM8_BFLLO 0x1084 /* Boardflags (low 16 bits) */ | ||
331 | #define SSB_SPROM8_BFLHI 0x1086 /* Boardflags Hi */ | ||
332 | #define SSB_SPROM8_IL0MAC 0x108C /* 6 byte MAC address */ | ||
333 | #define SSB_SPROM8_CCODE 0x1092 /* 2 byte country code */ | ||
334 | #define SSB_SPROM8_ANTAVAIL 0x109C /* Antenna available bitfields*/ | ||
335 | #define SSB_SPROM8_ANTAVAIL_A 0xFF00 /* A-PHY bitfield */ | ||
336 | #define SSB_SPROM8_ANTAVAIL_A_SHIFT 8 | ||
337 | #define SSB_SPROM8_ANTAVAIL_BG 0x00FF /* B-PHY and G-PHY bitfield */ | ||
338 | #define SSB_SPROM8_ANTAVAIL_BG_SHIFT 0 | ||
339 | #define SSB_SPROM8_AGAIN01 0x109E /* Antenna Gain (in dBm Q5.2) */ | ||
340 | #define SSB_SPROM8_AGAIN0 0x00FF /* Antenna 0 */ | ||
341 | #define SSB_SPROM8_AGAIN0_SHIFT 0 | ||
342 | #define SSB_SPROM8_AGAIN1 0xFF00 /* Antenna 1 */ | ||
343 | #define SSB_SPROM8_AGAIN1_SHIFT 8 | ||
344 | #define SSB_SPROM8_AGAIN23 0x10A0 | ||
345 | #define SSB_SPROM8_AGAIN2 0x00FF /* Antenna 2 */ | ||
346 | #define SSB_SPROM8_AGAIN2_SHIFT 0 | ||
347 | #define SSB_SPROM8_AGAIN3 0xFF00 /* Antenna 3 */ | ||
348 | #define SSB_SPROM8_AGAIN3_SHIFT 8 | ||
349 | #define SSB_SPROM8_GPIOA 0x1096 /*Gen. Purpose IO # 0 and 1 */ | ||
350 | #define SSB_SPROM8_GPIOA_P0 0x00FF /* Pin 0 */ | ||
351 | #define SSB_SPROM8_GPIOA_P1 0xFF00 /* Pin 1 */ | ||
352 | #define SSB_SPROM8_GPIOA_P1_SHIFT 8 | ||
353 | #define SSB_SPROM8_GPIOB 0x1098 /* Gen. Purpose IO # 2 and 3 */ | ||
354 | #define SSB_SPROM8_GPIOB_P2 0x00FF /* Pin 2 */ | ||
355 | #define SSB_SPROM8_GPIOB_P3 0xFF00 /* Pin 3 */ | ||
356 | #define SSB_SPROM8_GPIOB_P3_SHIFT 8 | ||
357 | #define SSB_SPROM8_MAXP_BG 0x10C0 /* Max Power BG in path 1 */ | ||
358 | #define SSB_SPROM8_MAXP_BG_MASK 0x00FF /* Mask for Max Power BG */ | ||
359 | #define SSB_SPROM8_ITSSI_BG 0xFF00 /* Mask for path 1 itssi_bg */ | ||
360 | #define SSB_SPROM8_ITSSI_BG_SHIFT 8 | ||
361 | #define SSB_SPROM8_MAXP_A 0x10C8 /* Max Power A in path 1 */ | ||
362 | #define SSB_SPROM8_MAXP_A_MASK 0x00FF /* Mask for Max Power A */ | ||
363 | #define SSB_SPROM8_ITSSI_A 0xFF00 /* Mask for path 1 itssi_a */ | ||
364 | #define SSB_SPROM8_ITSSI_A_SHIFT 8 | ||
329 | 365 | ||
330 | /* Values for SSB_SPROM1_BINF_CCODE */ | 366 | /* Values for SSB_SPROM1_BINF_CCODE */ |
331 | enum { | 367 | enum { |
diff --git a/include/linux/sysctl.h b/include/linux/sysctl.h index 39d471d1163b..e76d3b22a466 100644 --- a/include/linux/sysctl.h +++ b/include/linux/sysctl.h | |||
@@ -490,6 +490,7 @@ enum | |||
490 | NET_IPV4_CONF_ARP_IGNORE=19, | 490 | NET_IPV4_CONF_ARP_IGNORE=19, |
491 | NET_IPV4_CONF_PROMOTE_SECONDARIES=20, | 491 | NET_IPV4_CONF_PROMOTE_SECONDARIES=20, |
492 | NET_IPV4_CONF_ARP_ACCEPT=21, | 492 | NET_IPV4_CONF_ARP_ACCEPT=21, |
493 | NET_IPV4_CONF_ARP_NOTIFY=22, | ||
493 | __NET_IPV4_CONF_MAX | 494 | __NET_IPV4_CONF_MAX |
494 | }; | 495 | }; |
495 | 496 | ||
diff --git a/include/linux/virtio_net.h b/include/linux/virtio_net.h index 3efa86c3ecb3..242348bb3766 100644 --- a/include/linux/virtio_net.h +++ b/include/linux/virtio_net.h | |||
@@ -22,11 +22,19 @@ | |||
22 | #define VIRTIO_NET_F_HOST_ECN 13 /* Host can handle TSO[6] w/ ECN in. */ | 22 | #define VIRTIO_NET_F_HOST_ECN 13 /* Host can handle TSO[6] w/ ECN in. */ |
23 | #define VIRTIO_NET_F_HOST_UFO 14 /* Host can handle UFO in. */ | 23 | #define VIRTIO_NET_F_HOST_UFO 14 /* Host can handle UFO in. */ |
24 | #define VIRTIO_NET_F_MRG_RXBUF 15 /* Host can merge receive buffers. */ | 24 | #define VIRTIO_NET_F_MRG_RXBUF 15 /* Host can merge receive buffers. */ |
25 | #define VIRTIO_NET_F_STATUS 16 /* virtio_net_config.status available */ | ||
26 | #define VIRTIO_NET_F_CTRL_VQ 17 /* Control channel available */ | ||
27 | #define VIRTIO_NET_F_CTRL_RX 18 /* Control channel RX mode support */ | ||
28 | #define VIRTIO_NET_F_CTRL_VLAN 19 /* Control channel VLAN filtering */ | ||
29 | |||
30 | #define VIRTIO_NET_S_LINK_UP 1 /* Link is up */ | ||
25 | 31 | ||
26 | struct virtio_net_config | 32 | struct virtio_net_config |
27 | { | 33 | { |
28 | /* The config defining mac address (if VIRTIO_NET_F_MAC) */ | 34 | /* The config defining mac address (if VIRTIO_NET_F_MAC) */ |
29 | __u8 mac[6]; | 35 | __u8 mac[6]; |
36 | /* See VIRTIO_NET_F_STATUS and VIRTIO_NET_S_* above */ | ||
37 | __u16 status; | ||
30 | } __attribute__((packed)); | 38 | } __attribute__((packed)); |
31 | 39 | ||
32 | /* This is the first element of the scatter-gather list. If you don't | 40 | /* This is the first element of the scatter-gather list. If you don't |
@@ -54,4 +62,67 @@ struct virtio_net_hdr_mrg_rxbuf { | |||
54 | __u16 num_buffers; /* Number of merged rx buffers */ | 62 | __u16 num_buffers; /* Number of merged rx buffers */ |
55 | }; | 63 | }; |
56 | 64 | ||
65 | /* | ||
66 | * Control virtqueue data structures | ||
67 | * | ||
68 | * The control virtqueue expects a header in the first sg entry | ||
69 | * and an ack/status response in the last entry. Data for the | ||
70 | * command goes in between. | ||
71 | */ | ||
72 | struct virtio_net_ctrl_hdr { | ||
73 | __u8 class; | ||
74 | __u8 cmd; | ||
75 | } __attribute__((packed)); | ||
76 | |||
77 | typedef __u8 virtio_net_ctrl_ack; | ||
78 | |||
79 | #define VIRTIO_NET_OK 0 | ||
80 | #define VIRTIO_NET_ERR 1 | ||
81 | |||
82 | /* | ||
83 | * Control the RX mode, ie. promisucous and allmulti. PROMISC and | ||
84 | * ALLMULTI commands require an "out" sg entry containing a 1 byte | ||
85 | * state value, zero = disable, non-zero = enable. These commands | ||
86 | * are supported with the VIRTIO_NET_F_CTRL_RX feature. | ||
87 | */ | ||
88 | #define VIRTIO_NET_CTRL_RX 0 | ||
89 | #define VIRTIO_NET_CTRL_RX_PROMISC 0 | ||
90 | #define VIRTIO_NET_CTRL_RX_ALLMULTI 1 | ||
91 | |||
92 | /* | ||
93 | * Control the MAC filter table. | ||
94 | * | ||
95 | * The MAC filter table is managed by the hypervisor, the guest should | ||
96 | * assume the size is infinite. Filtering should be considered | ||
97 | * non-perfect, ie. based on hypervisor resources, the guest may | ||
98 | * received packets from sources not specified in the filter list. | ||
99 | * | ||
100 | * In addition to the class/cmd header, the TABLE_SET command requires | ||
101 | * two out scatterlists. Each contains a 4 byte count of entries followed | ||
102 | * by a concatenated byte stream of the ETH_ALEN MAC addresses. The | ||
103 | * first sg list contains unicast addresses, the second is for multicast. | ||
104 | * This functionality is present if the VIRTIO_NET_F_CTRL_RX feature | ||
105 | * is available. | ||
106 | */ | ||
107 | struct virtio_net_ctrl_mac { | ||
108 | __u32 entries; | ||
109 | __u8 macs[][ETH_ALEN]; | ||
110 | } __attribute__((packed)); | ||
111 | |||
112 | #define VIRTIO_NET_CTRL_MAC 1 | ||
113 | #define VIRTIO_NET_CTRL_MAC_TABLE_SET 0 | ||
114 | |||
115 | /* | ||
116 | * Control VLAN filtering | ||
117 | * | ||
118 | * The VLAN filter table is controlled via a simple ADD/DEL interface. | ||
119 | * VLAN IDs not added may be filterd by the hypervisor. Del is the | ||
120 | * opposite of add. Both commands expect an out entry containing a 2 | ||
121 | * byte VLAN ID. VLAN filterting is available with the | ||
122 | * VIRTIO_NET_F_CTRL_VLAN feature bit. | ||
123 | */ | ||
124 | #define VIRTIO_NET_CTRL_VLAN 2 | ||
125 | #define VIRTIO_NET_CTRL_VLAN_ADD 0 | ||
126 | #define VIRTIO_NET_CTRL_VLAN_DEL 1 | ||
127 | |||
57 | #endif /* _LINUX_VIRTIO_NET_H */ | 128 | #endif /* _LINUX_VIRTIO_NET_H */ |
diff --git a/include/linux/wireless.h b/include/linux/wireless.h index d7958f9b52cb..cb24204851f7 100644 --- a/include/linux/wireless.h +++ b/include/linux/wireless.h | |||
@@ -577,18 +577,22 @@ | |||
577 | #define IW_AUTH_RX_UNENCRYPTED_EAPOL 8 | 577 | #define IW_AUTH_RX_UNENCRYPTED_EAPOL 8 |
578 | #define IW_AUTH_ROAMING_CONTROL 9 | 578 | #define IW_AUTH_ROAMING_CONTROL 9 |
579 | #define IW_AUTH_PRIVACY_INVOKED 10 | 579 | #define IW_AUTH_PRIVACY_INVOKED 10 |
580 | #define IW_AUTH_CIPHER_GROUP_MGMT 11 | ||
581 | #define IW_AUTH_MFP 12 | ||
580 | 582 | ||
581 | /* IW_AUTH_WPA_VERSION values (bit field) */ | 583 | /* IW_AUTH_WPA_VERSION values (bit field) */ |
582 | #define IW_AUTH_WPA_VERSION_DISABLED 0x00000001 | 584 | #define IW_AUTH_WPA_VERSION_DISABLED 0x00000001 |
583 | #define IW_AUTH_WPA_VERSION_WPA 0x00000002 | 585 | #define IW_AUTH_WPA_VERSION_WPA 0x00000002 |
584 | #define IW_AUTH_WPA_VERSION_WPA2 0x00000004 | 586 | #define IW_AUTH_WPA_VERSION_WPA2 0x00000004 |
585 | 587 | ||
586 | /* IW_AUTH_PAIRWISE_CIPHER and IW_AUTH_GROUP_CIPHER values (bit field) */ | 588 | /* IW_AUTH_PAIRWISE_CIPHER, IW_AUTH_GROUP_CIPHER, and IW_AUTH_CIPHER_GROUP_MGMT |
589 | * values (bit field) */ | ||
587 | #define IW_AUTH_CIPHER_NONE 0x00000001 | 590 | #define IW_AUTH_CIPHER_NONE 0x00000001 |
588 | #define IW_AUTH_CIPHER_WEP40 0x00000002 | 591 | #define IW_AUTH_CIPHER_WEP40 0x00000002 |
589 | #define IW_AUTH_CIPHER_TKIP 0x00000004 | 592 | #define IW_AUTH_CIPHER_TKIP 0x00000004 |
590 | #define IW_AUTH_CIPHER_CCMP 0x00000008 | 593 | #define IW_AUTH_CIPHER_CCMP 0x00000008 |
591 | #define IW_AUTH_CIPHER_WEP104 0x00000010 | 594 | #define IW_AUTH_CIPHER_WEP104 0x00000010 |
595 | #define IW_AUTH_CIPHER_AES_CMAC 0x00000020 | ||
592 | 596 | ||
593 | /* IW_AUTH_KEY_MGMT values (bit field) */ | 597 | /* IW_AUTH_KEY_MGMT values (bit field) */ |
594 | #define IW_AUTH_KEY_MGMT_802_1X 1 | 598 | #define IW_AUTH_KEY_MGMT_802_1X 1 |
@@ -604,6 +608,11 @@ | |||
604 | #define IW_AUTH_ROAMING_DISABLE 1 /* user space program used for roaming | 608 | #define IW_AUTH_ROAMING_DISABLE 1 /* user space program used for roaming |
605 | * control */ | 609 | * control */ |
606 | 610 | ||
611 | /* IW_AUTH_MFP (management frame protection) values */ | ||
612 | #define IW_AUTH_MFP_DISABLED 0 /* MFP disabled */ | ||
613 | #define IW_AUTH_MFP_OPTIONAL 1 /* MFP optional */ | ||
614 | #define IW_AUTH_MFP_REQUIRED 2 /* MFP required */ | ||
615 | |||
607 | /* SIOCSIWENCODEEXT definitions */ | 616 | /* SIOCSIWENCODEEXT definitions */ |
608 | #define IW_ENCODE_SEQ_MAX_SIZE 8 | 617 | #define IW_ENCODE_SEQ_MAX_SIZE 8 |
609 | /* struct iw_encode_ext ->alg */ | 618 | /* struct iw_encode_ext ->alg */ |
@@ -612,6 +621,7 @@ | |||
612 | #define IW_ENCODE_ALG_TKIP 2 | 621 | #define IW_ENCODE_ALG_TKIP 2 |
613 | #define IW_ENCODE_ALG_CCMP 3 | 622 | #define IW_ENCODE_ALG_CCMP 3 |
614 | #define IW_ENCODE_ALG_PMK 4 | 623 | #define IW_ENCODE_ALG_PMK 4 |
624 | #define IW_ENCODE_ALG_AES_CMAC 5 | ||
615 | /* struct iw_encode_ext ->ext_flags */ | 625 | /* struct iw_encode_ext ->ext_flags */ |
616 | #define IW_ENCODE_EXT_TX_SEQ_VALID 0x00000001 | 626 | #define IW_ENCODE_EXT_TX_SEQ_VALID 0x00000001 |
617 | #define IW_ENCODE_EXT_RX_SEQ_VALID 0x00000002 | 627 | #define IW_ENCODE_EXT_RX_SEQ_VALID 0x00000002 |
diff --git a/include/net/atmclip.h b/include/net/atmclip.h index b5a51a7bb364..467c531b8a7e 100644 --- a/include/net/atmclip.h +++ b/include/net/atmclip.h | |||
@@ -50,7 +50,6 @@ struct atmarp_entry { | |||
50 | struct clip_priv { | 50 | struct clip_priv { |
51 | int number; /* for convenience ... */ | 51 | int number; /* for convenience ... */ |
52 | spinlock_t xoff_lock; /* ensures that pop is atomic (SMP) */ | 52 | spinlock_t xoff_lock; /* ensures that pop is atomic (SMP) */ |
53 | struct net_device_stats stats; | ||
54 | struct net_device *next; /* next CLIP interface */ | 53 | struct net_device *next; /* next CLIP interface */ |
55 | }; | 54 | }; |
56 | 55 | ||
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h index 23c0ab74ded6..dd1fd51638fc 100644 --- a/include/net/cfg80211.h +++ b/include/net/cfg80211.h | |||
@@ -112,12 +112,14 @@ struct beacon_parameters { | |||
112 | * @STATION_FLAG_SHORT_PREAMBLE: station is capable of receiving frames | 112 | * @STATION_FLAG_SHORT_PREAMBLE: station is capable of receiving frames |
113 | * with short preambles | 113 | * with short preambles |
114 | * @STATION_FLAG_WME: station is WME/QoS capable | 114 | * @STATION_FLAG_WME: station is WME/QoS capable |
115 | * @STATION_FLAG_MFP: station uses management frame protection | ||
115 | */ | 116 | */ |
116 | enum station_flags { | 117 | enum station_flags { |
117 | STATION_FLAG_CHANGED = 1<<0, | 118 | STATION_FLAG_CHANGED = 1<<0, |
118 | STATION_FLAG_AUTHORIZED = 1<<NL80211_STA_FLAG_AUTHORIZED, | 119 | STATION_FLAG_AUTHORIZED = 1<<NL80211_STA_FLAG_AUTHORIZED, |
119 | STATION_FLAG_SHORT_PREAMBLE = 1<<NL80211_STA_FLAG_SHORT_PREAMBLE, | 120 | STATION_FLAG_SHORT_PREAMBLE = 1<<NL80211_STA_FLAG_SHORT_PREAMBLE, |
120 | STATION_FLAG_WME = 1<<NL80211_STA_FLAG_WME, | 121 | STATION_FLAG_WME = 1<<NL80211_STA_FLAG_WME, |
122 | STATION_FLAG_MFP = 1<<NL80211_STA_FLAG_MFP, | ||
121 | }; | 123 | }; |
122 | 124 | ||
123 | /** | 125 | /** |
@@ -355,6 +357,51 @@ enum reg_set_by { | |||
355 | REGDOM_SET_BY_COUNTRY_IE, | 357 | REGDOM_SET_BY_COUNTRY_IE, |
356 | }; | 358 | }; |
357 | 359 | ||
360 | /** | ||
361 | * enum environment_cap - Environment parsed from country IE | ||
362 | * @ENVIRON_ANY: indicates country IE applies to both indoor and | ||
363 | * outdoor operation. | ||
364 | * @ENVIRON_INDOOR: indicates country IE applies only to indoor operation | ||
365 | * @ENVIRON_OUTDOOR: indicates country IE applies only to outdoor operation | ||
366 | */ | ||
367 | enum environment_cap { | ||
368 | ENVIRON_ANY, | ||
369 | ENVIRON_INDOOR, | ||
370 | ENVIRON_OUTDOOR, | ||
371 | }; | ||
372 | |||
373 | /** | ||
374 | * struct regulatory_request - receipt of last regulatory request | ||
375 | * | ||
376 | * @wiphy: this is set if this request's initiator is | ||
377 | * %REGDOM_SET_BY_COUNTRY_IE or %REGDOM_SET_BY_DRIVER. This | ||
378 | * can be used by the wireless core to deal with conflicts | ||
379 | * and potentially inform users of which devices specifically | ||
380 | * cased the conflicts. | ||
381 | * @initiator: indicates who sent this request, could be any of | ||
382 | * of those set in reg_set_by, %REGDOM_SET_BY_* | ||
383 | * @alpha2: the ISO / IEC 3166 alpha2 country code of the requested | ||
384 | * regulatory domain. We have a few special codes: | ||
385 | * 00 - World regulatory domain | ||
386 | * 99 - built by driver but a specific alpha2 cannot be determined | ||
387 | * 98 - result of an intersection between two regulatory domains | ||
388 | * @intersect: indicates whether the wireless core should intersect | ||
389 | * the requested regulatory domain with the presently set regulatory | ||
390 | * domain. | ||
391 | * @country_ie_checksum: checksum of the last processed and accepted | ||
392 | * country IE | ||
393 | * @country_ie_env: lets us know if the AP is telling us we are outdoor, | ||
394 | * indoor, or if it doesn't matter | ||
395 | */ | ||
396 | struct regulatory_request { | ||
397 | struct wiphy *wiphy; | ||
398 | enum reg_set_by initiator; | ||
399 | char alpha2[2]; | ||
400 | bool intersect; | ||
401 | u32 country_ie_checksum; | ||
402 | enum environment_cap country_ie_env; | ||
403 | }; | ||
404 | |||
358 | struct ieee80211_freq_range { | 405 | struct ieee80211_freq_range { |
359 | u32 start_freq_khz; | 406 | u32 start_freq_khz; |
360 | u32 end_freq_khz; | 407 | u32 end_freq_khz; |
@@ -431,6 +478,26 @@ struct ieee80211_txq_params { | |||
431 | u8 aifs; | 478 | u8 aifs; |
432 | }; | 479 | }; |
433 | 480 | ||
481 | /** | ||
482 | * struct mgmt_extra_ie_params - Extra management frame IE parameters | ||
483 | * | ||
484 | * Used to add extra IE(s) into management frames. If the driver cannot add the | ||
485 | * requested data into all management frames of the specified subtype that are | ||
486 | * generated in kernel or firmware/hardware, it must reject the configuration | ||
487 | * call. The IE data buffer is added to the end of the specified management | ||
488 | * frame body after all other IEs. This addition is not applied to frames that | ||
489 | * are injected through a monitor interface. | ||
490 | * | ||
491 | * @subtype: Management frame subtype | ||
492 | * @ies: IE data buffer or %NULL to remove previous data | ||
493 | * @ies_len: Length of @ies in octets | ||
494 | */ | ||
495 | struct mgmt_extra_ie_params { | ||
496 | u8 subtype; | ||
497 | u8 *ies; | ||
498 | int ies_len; | ||
499 | }; | ||
500 | |||
434 | /* from net/wireless.h */ | 501 | /* from net/wireless.h */ |
435 | struct wiphy; | 502 | struct wiphy; |
436 | 503 | ||
@@ -450,6 +517,9 @@ struct ieee80211_channel; | |||
450 | * wireless extensions but this is subject to reevaluation as soon as this | 517 | * wireless extensions but this is subject to reevaluation as soon as this |
451 | * code is used more widely and we have a first user without wext. | 518 | * code is used more widely and we have a first user without wext. |
452 | * | 519 | * |
520 | * @suspend: wiphy device needs to be suspended | ||
521 | * @resume: wiphy device needs to be resumed | ||
522 | * | ||
453 | * @add_virtual_intf: create a new virtual interface with the given name, | 523 | * @add_virtual_intf: create a new virtual interface with the given name, |
454 | * must set the struct wireless_dev's iftype. | 524 | * must set the struct wireless_dev's iftype. |
455 | * | 525 | * |
@@ -471,6 +541,8 @@ struct ieee80211_channel; | |||
471 | * | 541 | * |
472 | * @set_default_key: set the default key on an interface | 542 | * @set_default_key: set the default key on an interface |
473 | * | 543 | * |
544 | * @set_default_mgmt_key: set the default management frame key on an interface | ||
545 | * | ||
474 | * @add_beacon: Add a beacon with given parameters, @head, @interval | 546 | * @add_beacon: Add a beacon with given parameters, @head, @interval |
475 | * and @dtim_period will be valid, @tail is optional. | 547 | * and @dtim_period will be valid, @tail is optional. |
476 | * @set_beacon: Change the beacon parameters for an access point mode | 548 | * @set_beacon: Change the beacon parameters for an access point mode |
@@ -497,8 +569,13 @@ struct ieee80211_channel; | |||
497 | * @set_txq_params: Set TX queue parameters | 569 | * @set_txq_params: Set TX queue parameters |
498 | * | 570 | * |
499 | * @set_channel: Set channel | 571 | * @set_channel: Set channel |
572 | * | ||
573 | * @set_mgmt_extra_ie: Set extra IE data for management frames | ||
500 | */ | 574 | */ |
501 | struct cfg80211_ops { | 575 | struct cfg80211_ops { |
576 | int (*suspend)(struct wiphy *wiphy); | ||
577 | int (*resume)(struct wiphy *wiphy); | ||
578 | |||
502 | int (*add_virtual_intf)(struct wiphy *wiphy, char *name, | 579 | int (*add_virtual_intf)(struct wiphy *wiphy, char *name, |
503 | enum nl80211_iftype type, u32 *flags, | 580 | enum nl80211_iftype type, u32 *flags, |
504 | struct vif_params *params); | 581 | struct vif_params *params); |
@@ -518,6 +595,9 @@ struct cfg80211_ops { | |||
518 | int (*set_default_key)(struct wiphy *wiphy, | 595 | int (*set_default_key)(struct wiphy *wiphy, |
519 | struct net_device *netdev, | 596 | struct net_device *netdev, |
520 | u8 key_index); | 597 | u8 key_index); |
598 | int (*set_default_mgmt_key)(struct wiphy *wiphy, | ||
599 | struct net_device *netdev, | ||
600 | u8 key_index); | ||
521 | 601 | ||
522 | int (*add_beacon)(struct wiphy *wiphy, struct net_device *dev, | 602 | int (*add_beacon)(struct wiphy *wiphy, struct net_device *dev, |
523 | struct beacon_parameters *info); | 603 | struct beacon_parameters *info); |
@@ -564,6 +644,10 @@ struct cfg80211_ops { | |||
564 | int (*set_channel)(struct wiphy *wiphy, | 644 | int (*set_channel)(struct wiphy *wiphy, |
565 | struct ieee80211_channel *chan, | 645 | struct ieee80211_channel *chan, |
566 | enum nl80211_channel_type channel_type); | 646 | enum nl80211_channel_type channel_type); |
647 | |||
648 | int (*set_mgmt_extra_ie)(struct wiphy *wiphy, | ||
649 | struct net_device *dev, | ||
650 | struct mgmt_extra_ie_params *params); | ||
567 | }; | 651 | }; |
568 | 652 | ||
569 | /* temporary wext handlers */ | 653 | /* temporary wext handlers */ |
diff --git a/include/net/inet_hashtables.h b/include/net/inet_hashtables.h index d0a043153cc6..a44e2248b2ef 100644 --- a/include/net/inet_hashtables.h +++ b/include/net/inet_hashtables.h | |||
@@ -82,6 +82,7 @@ struct inet_bind_bucket { | |||
82 | #endif | 82 | #endif |
83 | unsigned short port; | 83 | unsigned short port; |
84 | signed short fastreuse; | 84 | signed short fastreuse; |
85 | int num_owners; | ||
85 | struct hlist_node node; | 86 | struct hlist_node node; |
86 | struct hlist_head owners; | 87 | struct hlist_head owners; |
87 | }; | 88 | }; |
@@ -133,7 +134,7 @@ struct inet_hashinfo { | |||
133 | struct inet_bind_hashbucket *bhash; | 134 | struct inet_bind_hashbucket *bhash; |
134 | 135 | ||
135 | unsigned int bhash_size; | 136 | unsigned int bhash_size; |
136 | /* Note : 4 bytes padding on 64 bit arches */ | 137 | /* 4 bytes hole on 64 bit */ |
137 | 138 | ||
138 | struct kmem_cache *bind_bucket_cachep; | 139 | struct kmem_cache *bind_bucket_cachep; |
139 | 140 | ||
@@ -150,6 +151,7 @@ struct inet_hashinfo { | |||
150 | struct inet_listen_hashbucket listening_hash[INET_LHTABLE_SIZE] | 151 | struct inet_listen_hashbucket listening_hash[INET_LHTABLE_SIZE] |
151 | ____cacheline_aligned_in_smp; | 152 | ____cacheline_aligned_in_smp; |
152 | 153 | ||
154 | atomic_t bsockets; | ||
153 | }; | 155 | }; |
154 | 156 | ||
155 | static inline struct inet_ehash_bucket *inet_ehash_bucket( | 157 | static inline struct inet_ehash_bucket *inet_ehash_bucket( |
diff --git a/include/net/mac80211.h b/include/net/mac80211.h index 559422fc0943..e2144f0e8728 100644 --- a/include/net/mac80211.h +++ b/include/net/mac80211.h | |||
@@ -207,7 +207,7 @@ struct ieee80211_bss_conf { | |||
207 | u16 beacon_int; | 207 | u16 beacon_int; |
208 | u16 assoc_capability; | 208 | u16 assoc_capability; |
209 | u64 timestamp; | 209 | u64 timestamp; |
210 | u64 basic_rates; | 210 | u32 basic_rates; |
211 | struct ieee80211_bss_ht_conf ht; | 211 | struct ieee80211_bss_ht_conf ht; |
212 | }; | 212 | }; |
213 | 213 | ||
@@ -262,6 +262,26 @@ enum mac80211_tx_control_flags { | |||
262 | IEEE80211_TX_CTL_RATE_CTRL_PROBE = BIT(12), | 262 | IEEE80211_TX_CTL_RATE_CTRL_PROBE = BIT(12), |
263 | }; | 263 | }; |
264 | 264 | ||
265 | /** | ||
266 | * enum mac80211_rate_control_flags - per-rate flags set by the | ||
267 | * Rate Control algorithm. | ||
268 | * | ||
269 | * These flags are set by the Rate control algorithm for each rate during tx, | ||
270 | * in the @flags member of struct ieee80211_tx_rate. | ||
271 | * | ||
272 | * @IEEE80211_TX_RC_USE_RTS_CTS: Use RTS/CTS exchange for this rate. | ||
273 | * @IEEE80211_TX_RC_USE_CTS_PROTECT: CTS-to-self protection is required. | ||
274 | * This is set if the current BSS requires ERP protection. | ||
275 | * @IEEE80211_TX_RC_USE_SHORT_PREAMBLE: Use short preamble. | ||
276 | * @IEEE80211_TX_RC_MCS: HT rate. | ||
277 | * @IEEE80211_TX_RC_GREEN_FIELD: Indicates whether this rate should be used in | ||
278 | * Greenfield mode. | ||
279 | * @IEEE80211_TX_RC_40_MHZ_WIDTH: Indicates if the Channel Width should be 40 MHz. | ||
280 | * @IEEE80211_TX_RC_DUP_DATA: The frame should be transmitted on both of the | ||
281 | * adjacent 20 MHz channels, if the current channel type is | ||
282 | * NL80211_CHAN_HT40MINUS or NL80211_CHAN_HT40PLUS. | ||
283 | * @IEEE80211_TX_RC_SHORT_GI: Short Guard interval should be used for this rate. | ||
284 | */ | ||
265 | enum mac80211_rate_control_flags { | 285 | enum mac80211_rate_control_flags { |
266 | IEEE80211_TX_RC_USE_RTS_CTS = BIT(0), | 286 | IEEE80211_TX_RC_USE_RTS_CTS = BIT(0), |
267 | IEEE80211_TX_RC_USE_CTS_PROTECT = BIT(1), | 287 | IEEE80211_TX_RC_USE_CTS_PROTECT = BIT(1), |
@@ -507,11 +527,6 @@ static inline int __deprecated __IEEE80211_CONF_SHORT_SLOT_TIME(void) | |||
507 | } | 527 | } |
508 | #define IEEE80211_CONF_SHORT_SLOT_TIME (__IEEE80211_CONF_SHORT_SLOT_TIME()) | 528 | #define IEEE80211_CONF_SHORT_SLOT_TIME (__IEEE80211_CONF_SHORT_SLOT_TIME()) |
509 | 529 | ||
510 | struct ieee80211_ht_conf { | ||
511 | bool enabled; | ||
512 | enum nl80211_channel_type channel_type; | ||
513 | }; | ||
514 | |||
515 | /** | 530 | /** |
516 | * enum ieee80211_conf_changed - denotes which configuration changed | 531 | * enum ieee80211_conf_changed - denotes which configuration changed |
517 | * | 532 | * |
@@ -520,10 +535,10 @@ struct ieee80211_ht_conf { | |||
520 | * @IEEE80211_CONF_CHANGE_LISTEN_INTERVAL: the listen interval changed | 535 | * @IEEE80211_CONF_CHANGE_LISTEN_INTERVAL: the listen interval changed |
521 | * @IEEE80211_CONF_CHANGE_RADIOTAP: the radiotap flag changed | 536 | * @IEEE80211_CONF_CHANGE_RADIOTAP: the radiotap flag changed |
522 | * @IEEE80211_CONF_CHANGE_PS: the PS flag changed | 537 | * @IEEE80211_CONF_CHANGE_PS: the PS flag changed |
538 | * @IEEE80211_CONF_CHANGE_DYNPS_TIMEOUT: the dynamic PS timeout changed | ||
523 | * @IEEE80211_CONF_CHANGE_POWER: the TX power changed | 539 | * @IEEE80211_CONF_CHANGE_POWER: the TX power changed |
524 | * @IEEE80211_CONF_CHANGE_CHANNEL: the channel changed | 540 | * @IEEE80211_CONF_CHANGE_CHANNEL: the channel/channel_type changed |
525 | * @IEEE80211_CONF_CHANGE_RETRY_LIMITS: retry limits changed | 541 | * @IEEE80211_CONF_CHANGE_RETRY_LIMITS: retry limits changed |
526 | * @IEEE80211_CONF_CHANGE_HT: HT configuration changed | ||
527 | */ | 542 | */ |
528 | enum ieee80211_conf_changed { | 543 | enum ieee80211_conf_changed { |
529 | IEEE80211_CONF_CHANGE_RADIO_ENABLED = BIT(0), | 544 | IEEE80211_CONF_CHANGE_RADIO_ENABLED = BIT(0), |
@@ -531,10 +546,10 @@ enum ieee80211_conf_changed { | |||
531 | IEEE80211_CONF_CHANGE_LISTEN_INTERVAL = BIT(2), | 546 | IEEE80211_CONF_CHANGE_LISTEN_INTERVAL = BIT(2), |
532 | IEEE80211_CONF_CHANGE_RADIOTAP = BIT(3), | 547 | IEEE80211_CONF_CHANGE_RADIOTAP = BIT(3), |
533 | IEEE80211_CONF_CHANGE_PS = BIT(4), | 548 | IEEE80211_CONF_CHANGE_PS = BIT(4), |
534 | IEEE80211_CONF_CHANGE_POWER = BIT(5), | 549 | IEEE80211_CONF_CHANGE_DYNPS_TIMEOUT = BIT(5), |
535 | IEEE80211_CONF_CHANGE_CHANNEL = BIT(6), | 550 | IEEE80211_CONF_CHANGE_POWER = BIT(6), |
536 | IEEE80211_CONF_CHANGE_RETRY_LIMITS = BIT(7), | 551 | IEEE80211_CONF_CHANGE_CHANNEL = BIT(7), |
537 | IEEE80211_CONF_CHANGE_HT = BIT(8), | 552 | IEEE80211_CONF_CHANGE_RETRY_LIMITS = BIT(8), |
538 | }; | 553 | }; |
539 | 554 | ||
540 | /** | 555 | /** |
@@ -547,8 +562,9 @@ enum ieee80211_conf_changed { | |||
547 | * @listen_interval: listen interval in units of beacon interval | 562 | * @listen_interval: listen interval in units of beacon interval |
548 | * @flags: configuration flags defined above | 563 | * @flags: configuration flags defined above |
549 | * @power_level: requested transmit power (in dBm) | 564 | * @power_level: requested transmit power (in dBm) |
565 | * @dynamic_ps_timeout: dynamic powersave timeout (in ms) | ||
550 | * @channel: the channel to tune to | 566 | * @channel: the channel to tune to |
551 | * @ht: the HT configuration for the device | 567 | * @channel_type: the channel (HT) type |
552 | * @long_frame_max_tx_count: Maximum number of transmissions for a "long" frame | 568 | * @long_frame_max_tx_count: Maximum number of transmissions for a "long" frame |
553 | * (a frame not RTS protected), called "dot11LongRetryLimit" in 802.11, | 569 | * (a frame not RTS protected), called "dot11LongRetryLimit" in 802.11, |
554 | * but actually means the number of transmissions not the number of retries | 570 | * but actually means the number of transmissions not the number of retries |
@@ -559,7 +575,7 @@ enum ieee80211_conf_changed { | |||
559 | struct ieee80211_conf { | 575 | struct ieee80211_conf { |
560 | int beacon_int; | 576 | int beacon_int; |
561 | u32 flags; | 577 | u32 flags; |
562 | int power_level; | 578 | int power_level, dynamic_ps_timeout; |
563 | 579 | ||
564 | u16 listen_interval; | 580 | u16 listen_interval; |
565 | bool radio_enabled; | 581 | bool radio_enabled; |
@@ -567,7 +583,7 @@ struct ieee80211_conf { | |||
567 | u8 long_frame_max_tx_count, short_frame_max_tx_count; | 583 | u8 long_frame_max_tx_count, short_frame_max_tx_count; |
568 | 584 | ||
569 | struct ieee80211_channel *channel; | 585 | struct ieee80211_channel *channel; |
570 | struct ieee80211_ht_conf ht; | 586 | enum nl80211_channel_type channel_type; |
571 | }; | 587 | }; |
572 | 588 | ||
573 | /** | 589 | /** |
@@ -630,10 +646,12 @@ struct ieee80211_if_init_conf { | |||
630 | * @IEEE80211_IFCC_BSSID: The BSSID changed. | 646 | * @IEEE80211_IFCC_BSSID: The BSSID changed. |
631 | * @IEEE80211_IFCC_BEACON: The beacon for this interface changed | 647 | * @IEEE80211_IFCC_BEACON: The beacon for this interface changed |
632 | * (currently AP and MESH only), use ieee80211_beacon_get(). | 648 | * (currently AP and MESH only), use ieee80211_beacon_get(). |
649 | * @IEEE80211_IFCC_BEACON_ENABLED: The enable_beacon value changed. | ||
633 | */ | 650 | */ |
634 | enum ieee80211_if_conf_change { | 651 | enum ieee80211_if_conf_change { |
635 | IEEE80211_IFCC_BSSID = BIT(0), | 652 | IEEE80211_IFCC_BSSID = BIT(0), |
636 | IEEE80211_IFCC_BEACON = BIT(1), | 653 | IEEE80211_IFCC_BEACON = BIT(1), |
654 | IEEE80211_IFCC_BEACON_ENABLED = BIT(2), | ||
637 | }; | 655 | }; |
638 | 656 | ||
639 | /** | 657 | /** |
@@ -641,13 +659,16 @@ enum ieee80211_if_conf_change { | |||
641 | * | 659 | * |
642 | * @changed: parameters that have changed, see &enum ieee80211_if_conf_change. | 660 | * @changed: parameters that have changed, see &enum ieee80211_if_conf_change. |
643 | * @bssid: BSSID of the network we are associated to/creating. | 661 | * @bssid: BSSID of the network we are associated to/creating. |
662 | * @enable_beacon: Indicates whether beacons can be sent. | ||
663 | * This is valid only for AP/IBSS/MESH modes. | ||
644 | * | 664 | * |
645 | * This structure is passed to the config_interface() callback of | 665 | * This structure is passed to the config_interface() callback of |
646 | * &struct ieee80211_hw. | 666 | * &struct ieee80211_hw. |
647 | */ | 667 | */ |
648 | struct ieee80211_if_conf { | 668 | struct ieee80211_if_conf { |
649 | u32 changed; | 669 | u32 changed; |
650 | u8 *bssid; | 670 | const u8 *bssid; |
671 | bool enable_beacon; | ||
651 | }; | 672 | }; |
652 | 673 | ||
653 | /** | 674 | /** |
@@ -655,11 +676,13 @@ struct ieee80211_if_conf { | |||
655 | * @ALG_WEP: WEP40 or WEP104 | 676 | * @ALG_WEP: WEP40 or WEP104 |
656 | * @ALG_TKIP: TKIP | 677 | * @ALG_TKIP: TKIP |
657 | * @ALG_CCMP: CCMP (AES) | 678 | * @ALG_CCMP: CCMP (AES) |
679 | * @ALG_AES_CMAC: AES-128-CMAC | ||
658 | */ | 680 | */ |
659 | enum ieee80211_key_alg { | 681 | enum ieee80211_key_alg { |
660 | ALG_WEP, | 682 | ALG_WEP, |
661 | ALG_TKIP, | 683 | ALG_TKIP, |
662 | ALG_CCMP, | 684 | ALG_CCMP, |
685 | ALG_AES_CMAC, | ||
663 | }; | 686 | }; |
664 | 687 | ||
665 | /** | 688 | /** |
@@ -688,12 +711,16 @@ enum ieee80211_key_len { | |||
688 | * generation in software. | 711 | * generation in software. |
689 | * @IEEE80211_KEY_FLAG_PAIRWISE: Set by mac80211, this flag indicates | 712 | * @IEEE80211_KEY_FLAG_PAIRWISE: Set by mac80211, this flag indicates |
690 | * that the key is pairwise rather then a shared key. | 713 | * that the key is pairwise rather then a shared key. |
714 | * @IEEE80211_KEY_FLAG_SW_MGMT: This flag should be set by the driver for a | ||
715 | * CCMP key if it requires CCMP encryption of management frames (MFP) to | ||
716 | * be done in software. | ||
691 | */ | 717 | */ |
692 | enum ieee80211_key_flags { | 718 | enum ieee80211_key_flags { |
693 | IEEE80211_KEY_FLAG_WMM_STA = 1<<0, | 719 | IEEE80211_KEY_FLAG_WMM_STA = 1<<0, |
694 | IEEE80211_KEY_FLAG_GENERATE_IV = 1<<1, | 720 | IEEE80211_KEY_FLAG_GENERATE_IV = 1<<1, |
695 | IEEE80211_KEY_FLAG_GENERATE_MMIC= 1<<2, | 721 | IEEE80211_KEY_FLAG_GENERATE_MMIC= 1<<2, |
696 | IEEE80211_KEY_FLAG_PAIRWISE = 1<<3, | 722 | IEEE80211_KEY_FLAG_PAIRWISE = 1<<3, |
723 | IEEE80211_KEY_FLAG_SW_MGMT = 1<<4, | ||
697 | }; | 724 | }; |
698 | 725 | ||
699 | /** | 726 | /** |
@@ -714,8 +741,8 @@ enum ieee80211_key_flags { | |||
714 | * - Temporal Encryption Key (128 bits) | 741 | * - Temporal Encryption Key (128 bits) |
715 | * - Temporal Authenticator Tx MIC Key (64 bits) | 742 | * - Temporal Authenticator Tx MIC Key (64 bits) |
716 | * - Temporal Authenticator Rx MIC Key (64 bits) | 743 | * - Temporal Authenticator Rx MIC Key (64 bits) |
717 | * @icv_len: FIXME | 744 | * @icv_len: The ICV length for this key type |
718 | * @iv_len: FIXME | 745 | * @iv_len: The IV length for this key type |
719 | */ | 746 | */ |
720 | struct ieee80211_key_conf { | 747 | struct ieee80211_key_conf { |
721 | enum ieee80211_key_alg alg; | 748 | enum ieee80211_key_alg alg; |
@@ -759,7 +786,7 @@ enum set_key_cmd { | |||
759 | * sizeof(void *), size is determined in hw information. | 786 | * sizeof(void *), size is determined in hw information. |
760 | */ | 787 | */ |
761 | struct ieee80211_sta { | 788 | struct ieee80211_sta { |
762 | u64 supp_rates[IEEE80211_NUM_BANDS]; | 789 | u32 supp_rates[IEEE80211_NUM_BANDS]; |
763 | u8 addr[ETH_ALEN]; | 790 | u8 addr[ETH_ALEN]; |
764 | u16 aid; | 791 | u16 aid; |
765 | struct ieee80211_sta_ht_cap ht_cap; | 792 | struct ieee80211_sta_ht_cap ht_cap; |
@@ -854,10 +881,18 @@ enum ieee80211_tkip_key_type { | |||
854 | * @IEEE80211_HW_AMPDU_AGGREGATION: | 881 | * @IEEE80211_HW_AMPDU_AGGREGATION: |
855 | * Hardware supports 11n A-MPDU aggregation. | 882 | * Hardware supports 11n A-MPDU aggregation. |
856 | * | 883 | * |
857 | * @IEEE80211_HW_NO_STACK_DYNAMIC_PS: | 884 | * @IEEE80211_HW_SUPPORTS_PS: |
858 | * Hardware which has dynamic power save support, meaning | 885 | * Hardware has power save support (i.e. can go to sleep). |
859 | * that power save is enabled in idle periods, and don't need support | 886 | * |
860 | * from stack. | 887 | * @IEEE80211_HW_PS_NULLFUNC_STACK: |
888 | * Hardware requires nullfunc frame handling in stack, implies | ||
889 | * stack support for dynamic PS. | ||
890 | * | ||
891 | * @IEEE80211_HW_SUPPORTS_DYNAMIC_PS: | ||
892 | * Hardware has support for dynamic PS. | ||
893 | * | ||
894 | * @IEEE80211_HW_MFP_CAPABLE: | ||
895 | * Hardware supports management frame protection (MFP, IEEE 802.11w). | ||
861 | */ | 896 | */ |
862 | enum ieee80211_hw_flags { | 897 | enum ieee80211_hw_flags { |
863 | IEEE80211_HW_RX_INCLUDES_FCS = 1<<1, | 898 | IEEE80211_HW_RX_INCLUDES_FCS = 1<<1, |
@@ -870,7 +905,10 @@ enum ieee80211_hw_flags { | |||
870 | IEEE80211_HW_NOISE_DBM = 1<<8, | 905 | IEEE80211_HW_NOISE_DBM = 1<<8, |
871 | IEEE80211_HW_SPECTRUM_MGMT = 1<<9, | 906 | IEEE80211_HW_SPECTRUM_MGMT = 1<<9, |
872 | IEEE80211_HW_AMPDU_AGGREGATION = 1<<10, | 907 | IEEE80211_HW_AMPDU_AGGREGATION = 1<<10, |
873 | IEEE80211_HW_NO_STACK_DYNAMIC_PS = 1<<11, | 908 | IEEE80211_HW_SUPPORTS_PS = 1<<11, |
909 | IEEE80211_HW_PS_NULLFUNC_STACK = 1<<12, | ||
910 | IEEE80211_HW_SUPPORTS_DYNAMIC_PS = 1<<13, | ||
911 | IEEE80211_HW_MFP_CAPABLE = 1<<14, | ||
874 | }; | 912 | }; |
875 | 913 | ||
876 | /** | 914 | /** |
@@ -890,9 +928,8 @@ enum ieee80211_hw_flags { | |||
890 | * @workqueue: single threaded workqueue available for driver use, | 928 | * @workqueue: single threaded workqueue available for driver use, |
891 | * allocated by mac80211 on registration and flushed when an | 929 | * allocated by mac80211 on registration and flushed when an |
892 | * interface is removed. | 930 | * interface is removed. |
893 | * NOTICE: All work performed on this workqueue should NEVER | 931 | * NOTICE: All work performed on this workqueue must not |
894 | * acquire the RTNL lock (i.e. Don't use the function | 932 | * acquire the RTNL lock. |
895 | * ieee80211_iterate_active_interfaces()) | ||
896 | * | 933 | * |
897 | * @priv: pointer to private area that was allocated for driver use | 934 | * @priv: pointer to private area that was allocated for driver use |
898 | * along with this structure. | 935 | * along with this structure. |
@@ -952,6 +989,19 @@ struct ieee80211_hw { | |||
952 | }; | 989 | }; |
953 | 990 | ||
954 | /** | 991 | /** |
992 | * wiphy_to_ieee80211_hw - return a mac80211 driver hw struct from a wiphy | ||
993 | * | ||
994 | * @wiphy: the &struct wiphy which we want to query | ||
995 | * | ||
996 | * mac80211 drivers can use this to get to their respective | ||
997 | * &struct ieee80211_hw. Drivers wishing to get to their own private | ||
998 | * structure can then access it via hw->priv. Note that mac802111 drivers should | ||
999 | * not use wiphy_priv() to try to get their private driver structure as this | ||
1000 | * is already used internally by mac80211. | ||
1001 | */ | ||
1002 | struct ieee80211_hw *wiphy_to_ieee80211_hw(struct wiphy *wiphy); | ||
1003 | |||
1004 | /** | ||
955 | * SET_IEEE80211_DEV - set device for 802.11 hardware | 1005 | * SET_IEEE80211_DEV - set device for 802.11 hardware |
956 | * | 1006 | * |
957 | * @hw: the &struct ieee80211_hw to set the device for | 1007 | * @hw: the &struct ieee80211_hw to set the device for |
@@ -1018,16 +1068,12 @@ ieee80211_get_alt_retry_rate(const struct ieee80211_hw *hw, | |||
1018 | * | 1068 | * |
1019 | * The set_key() callback in the &struct ieee80211_ops for a given | 1069 | * The set_key() callback in the &struct ieee80211_ops for a given |
1020 | * device is called to enable hardware acceleration of encryption and | 1070 | * device is called to enable hardware acceleration of encryption and |
1021 | * decryption. The callback takes an @address parameter that will be | 1071 | * decryption. The callback takes a @sta parameter that will be NULL |
1022 | * the broadcast address for default keys, the other station's hardware | 1072 | * for default keys or keys used for transmission only, or point to |
1023 | * address for individual keys or the zero address for keys that will | 1073 | * the station information for the peer for individual keys. |
1024 | * be used only for transmission. | ||
1025 | * Multiple transmission keys with the same key index may be used when | 1074 | * Multiple transmission keys with the same key index may be used when |
1026 | * VLANs are configured for an access point. | 1075 | * VLANs are configured for an access point. |
1027 | * | 1076 | * |
1028 | * The @local_address parameter will always be set to our own address, | ||
1029 | * this is only relevant if you support multiple local addresses. | ||
1030 | * | ||
1031 | * When transmitting, the TX control data will use the @hw_key_idx | 1077 | * When transmitting, the TX control data will use the @hw_key_idx |
1032 | * selected by the driver by modifying the &struct ieee80211_key_conf | 1078 | * selected by the driver by modifying the &struct ieee80211_key_conf |
1033 | * pointed to by the @key parameter to the set_key() function. | 1079 | * pointed to by the @key parameter to the set_key() function. |
@@ -1061,6 +1107,42 @@ ieee80211_get_alt_retry_rate(const struct ieee80211_hw *hw, | |||
1061 | */ | 1107 | */ |
1062 | 1108 | ||
1063 | /** | 1109 | /** |
1110 | * DOC: Powersave support | ||
1111 | * | ||
1112 | * mac80211 has support for various powersave implementations. | ||
1113 | * | ||
1114 | * First, it can support hardware that handles all powersaving by | ||
1115 | * itself, such hardware should simply set the %IEEE80211_HW_SUPPORTS_PS | ||
1116 | * hardware flag. In that case, it will be told about the desired | ||
1117 | * powersave mode depending on the association status, and the driver | ||
1118 | * must take care of sending nullfunc frames when necessary, i.e. when | ||
1119 | * entering and leaving powersave mode. The driver is required to look at | ||
1120 | * the AID in beacons and signal to the AP that it woke up when it finds | ||
1121 | * traffic directed to it. This mode supports dynamic PS by simply | ||
1122 | * enabling/disabling PS. | ||
1123 | * | ||
1124 | * Additionally, such hardware may set the %IEEE80211_HW_SUPPORTS_DYNAMIC_PS | ||
1125 | * flag to indicate that it can support dynamic PS mode itself (see below). | ||
1126 | * | ||
1127 | * Other hardware designs cannot send nullfunc frames by themselves and also | ||
1128 | * need software support for parsing the TIM bitmap. This is also supported | ||
1129 | * by mac80211 by combining the %IEEE80211_HW_SUPPORTS_PS and | ||
1130 | * %IEEE80211_HW_PS_NULLFUNC_STACK flags. The hardware is of course still | ||
1131 | * required to pass up beacons. Additionally, in this case, mac80211 will | ||
1132 | * wake up the hardware when multicast traffic is announced in the beacon. | ||
1133 | * | ||
1134 | * FIXME: I don't think we can be fast enough in software when we want to | ||
1135 | * receive multicast traffic? | ||
1136 | * | ||
1137 | * Dynamic powersave mode is an extension to normal powersave mode in which | ||
1138 | * the hardware stays awake for a user-specified period of time after sending | ||
1139 | * a frame so that reply frames need not be buffered and therefore delayed | ||
1140 | * to the next wakeup. This can either be supported by hardware, in which case | ||
1141 | * the driver needs to look at the @dynamic_ps_timeout hardware configuration | ||
1142 | * value, or by the stack if all nullfunc handling is in the stack. | ||
1143 | */ | ||
1144 | |||
1145 | /** | ||
1064 | * DOC: Frame filtering | 1146 | * DOC: Frame filtering |
1065 | * | 1147 | * |
1066 | * mac80211 requires to see many management frames for proper | 1148 | * mac80211 requires to see many management frames for proper |
@@ -1172,6 +1254,8 @@ enum ieee80211_ampdu_mlme_action { | |||
1172 | * configuration in the TX control data. This handler should, | 1254 | * configuration in the TX control data. This handler should, |
1173 | * preferably, never fail and stop queues appropriately, more | 1255 | * preferably, never fail and stop queues appropriately, more |
1174 | * importantly, however, it must never fail for A-MPDU-queues. | 1256 | * importantly, however, it must never fail for A-MPDU-queues. |
1257 | * This function should return NETDEV_TX_OK except in very | ||
1258 | * limited cases. | ||
1175 | * Must be implemented and atomic. | 1259 | * Must be implemented and atomic. |
1176 | * | 1260 | * |
1177 | * @start: Called before the first netdevice attached to the hardware | 1261 | * @start: Called before the first netdevice attached to the hardware |
@@ -1212,9 +1296,12 @@ enum ieee80211_ampdu_mlme_action { | |||
1212 | * | 1296 | * |
1213 | * @config: Handler for configuration requests. IEEE 802.11 code calls this | 1297 | * @config: Handler for configuration requests. IEEE 802.11 code calls this |
1214 | * function to change hardware configuration, e.g., channel. | 1298 | * function to change hardware configuration, e.g., channel. |
1299 | * This function should never fail but returns a negative error code | ||
1300 | * if it does. | ||
1215 | * | 1301 | * |
1216 | * @config_interface: Handler for configuration requests related to interfaces | 1302 | * @config_interface: Handler for configuration requests related to interfaces |
1217 | * (e.g. BSSID changes.) | 1303 | * (e.g. BSSID changes.) |
1304 | * Returns a negative error code which will be seen in userspace. | ||
1218 | * | 1305 | * |
1219 | * @bss_info_changed: Handler for configuration requests related to BSS | 1306 | * @bss_info_changed: Handler for configuration requests related to BSS |
1220 | * parameters that may vary during BSS's lifespan, and may affect low | 1307 | * parameters that may vary during BSS's lifespan, and may affect low |
@@ -1232,8 +1319,9 @@ enum ieee80211_ampdu_mlme_action { | |||
1232 | * | 1319 | * |
1233 | * @set_key: See the section "Hardware crypto acceleration" | 1320 | * @set_key: See the section "Hardware crypto acceleration" |
1234 | * This callback can sleep, and is only called between add_interface | 1321 | * This callback can sleep, and is only called between add_interface |
1235 | * and remove_interface calls, i.e. while the interface with the | 1322 | * and remove_interface calls, i.e. while the given virtual interface |
1236 | * given local_address is enabled. | 1323 | * is enabled. |
1324 | * Returns a negative error code if the key can't be added. | ||
1237 | * | 1325 | * |
1238 | * @update_tkip_key: See the section "Hardware crypto acceleration" | 1326 | * @update_tkip_key: See the section "Hardware crypto acceleration" |
1239 | * This callback will be called in the context of Rx. Called for drivers | 1327 | * This callback will be called in the context of Rx. Called for drivers |
@@ -1245,8 +1333,10 @@ enum ieee80211_ampdu_mlme_action { | |||
1245 | * bands. When the scan finishes, ieee80211_scan_completed() must be | 1333 | * bands. When the scan finishes, ieee80211_scan_completed() must be |
1246 | * called; note that it also must be called when the scan cannot finish | 1334 | * called; note that it also must be called when the scan cannot finish |
1247 | * because the hardware is turned off! Anything else is a bug! | 1335 | * because the hardware is turned off! Anything else is a bug! |
1336 | * Returns a negative error code which will be seen in userspace. | ||
1248 | * | 1337 | * |
1249 | * @get_stats: return low-level statistics | 1338 | * @get_stats: Return low-level statistics. |
1339 | * Returns zero if statistics are available. | ||
1250 | * | 1340 | * |
1251 | * @get_tkip_seq: If your device implements TKIP encryption in hardware this | 1341 | * @get_tkip_seq: If your device implements TKIP encryption in hardware this |
1252 | * callback should be provided to read the TKIP transmit IVs (both IV32 | 1342 | * callback should be provided to read the TKIP transmit IVs (both IV32 |
@@ -1260,6 +1350,7 @@ enum ieee80211_ampdu_mlme_action { | |||
1260 | * | 1350 | * |
1261 | * @conf_tx: Configure TX queue parameters (EDCF (aifs, cw_min, cw_max), | 1351 | * @conf_tx: Configure TX queue parameters (EDCF (aifs, cw_min, cw_max), |
1262 | * bursting) for a hardware TX queue. | 1352 | * bursting) for a hardware TX queue. |
1353 | * Returns a negative error code on failure. | ||
1263 | * | 1354 | * |
1264 | * @get_tx_stats: Get statistics of the current TX queue status. This is used | 1355 | * @get_tx_stats: Get statistics of the current TX queue status. This is used |
1265 | * to get number of currently queued packets (queue length), maximum queue | 1356 | * to get number of currently queued packets (queue length), maximum queue |
@@ -1268,7 +1359,11 @@ enum ieee80211_ampdu_mlme_action { | |||
1268 | * hw->ampdu_queues items. | 1359 | * hw->ampdu_queues items. |
1269 | * | 1360 | * |
1270 | * @get_tsf: Get the current TSF timer value from firmware/hardware. Currently, | 1361 | * @get_tsf: Get the current TSF timer value from firmware/hardware. Currently, |
1271 | * this is only used for IBSS mode debugging and, as such, is not a | 1362 | * this is only used for IBSS mode BSSID merging and debugging. Is not a |
1363 | * required function. Must be atomic. | ||
1364 | * | ||
1365 | * @set_tsf: Set the TSF timer to the specified value in the firmware/hardware. | ||
1366 | * Currently, this is only used for IBSS mode debugging. Is not a | ||
1272 | * required function. Must be atomic. | 1367 | * required function. Must be atomic. |
1273 | * | 1368 | * |
1274 | * @reset_tsf: Reset the TSF timer and allow firmware/hardware to synchronize | 1369 | * @reset_tsf: Reset the TSF timer and allow firmware/hardware to synchronize |
@@ -1279,13 +1374,15 @@ enum ieee80211_ampdu_mlme_action { | |||
1279 | * @tx_last_beacon: Determine whether the last IBSS beacon was sent by us. | 1374 | * @tx_last_beacon: Determine whether the last IBSS beacon was sent by us. |
1280 | * This is needed only for IBSS mode and the result of this function is | 1375 | * This is needed only for IBSS mode and the result of this function is |
1281 | * used to determine whether to reply to Probe Requests. | 1376 | * used to determine whether to reply to Probe Requests. |
1377 | * Returns non-zero if this device sent the last beacon. | ||
1282 | * | 1378 | * |
1283 | * @ampdu_action: Perform a certain A-MPDU action | 1379 | * @ampdu_action: Perform a certain A-MPDU action |
1284 | * The RA/TID combination determines the destination and TID we want | 1380 | * The RA/TID combination determines the destination and TID we want |
1285 | * the ampdu action to be performed for. The action is defined through | 1381 | * the ampdu action to be performed for. The action is defined through |
1286 | * ieee80211_ampdu_mlme_action. Starting sequence number (@ssn) | 1382 | * ieee80211_ampdu_mlme_action. Starting sequence number (@ssn) |
1287 | * is the first frame we expect to perform the action on. notice | 1383 | * is the first frame we expect to perform the action on. Notice |
1288 | * that TX/RX_STOP can pass NULL for this parameter. | 1384 | * that TX/RX_STOP can pass NULL for this parameter. |
1385 | * Returns a negative error code on failure. | ||
1289 | */ | 1386 | */ |
1290 | struct ieee80211_ops { | 1387 | struct ieee80211_ops { |
1291 | int (*tx)(struct ieee80211_hw *hw, struct sk_buff *skb); | 1388 | int (*tx)(struct ieee80211_hw *hw, struct sk_buff *skb); |
@@ -1310,7 +1407,7 @@ struct ieee80211_ops { | |||
1310 | int (*set_tim)(struct ieee80211_hw *hw, struct ieee80211_sta *sta, | 1407 | int (*set_tim)(struct ieee80211_hw *hw, struct ieee80211_sta *sta, |
1311 | bool set); | 1408 | bool set); |
1312 | int (*set_key)(struct ieee80211_hw *hw, enum set_key_cmd cmd, | 1409 | int (*set_key)(struct ieee80211_hw *hw, enum set_key_cmd cmd, |
1313 | const u8 *local_address, const u8 *address, | 1410 | struct ieee80211_vif *vif, struct ieee80211_sta *sta, |
1314 | struct ieee80211_key_conf *key); | 1411 | struct ieee80211_key_conf *key); |
1315 | void (*update_tkip_key)(struct ieee80211_hw *hw, | 1412 | void (*update_tkip_key)(struct ieee80211_hw *hw, |
1316 | struct ieee80211_key_conf *conf, const u8 *address, | 1413 | struct ieee80211_key_conf *conf, const u8 *address, |
@@ -1328,6 +1425,7 @@ struct ieee80211_ops { | |||
1328 | int (*get_tx_stats)(struct ieee80211_hw *hw, | 1425 | int (*get_tx_stats)(struct ieee80211_hw *hw, |
1329 | struct ieee80211_tx_queue_stats *stats); | 1426 | struct ieee80211_tx_queue_stats *stats); |
1330 | u64 (*get_tsf)(struct ieee80211_hw *hw); | 1427 | u64 (*get_tsf)(struct ieee80211_hw *hw); |
1428 | void (*set_tsf)(struct ieee80211_hw *hw, u64 tsf); | ||
1331 | void (*reset_tsf)(struct ieee80211_hw *hw); | 1429 | void (*reset_tsf)(struct ieee80211_hw *hw); |
1332 | int (*tx_last_beacon)(struct ieee80211_hw *hw); | 1430 | int (*tx_last_beacon)(struct ieee80211_hw *hw); |
1333 | int (*ampdu_action)(struct ieee80211_hw *hw, | 1431 | int (*ampdu_action)(struct ieee80211_hw *hw, |
@@ -1962,4 +2060,34 @@ rate_lowest_index(struct ieee80211_supported_band *sband, | |||
1962 | int ieee80211_rate_control_register(struct rate_control_ops *ops); | 2060 | int ieee80211_rate_control_register(struct rate_control_ops *ops); |
1963 | void ieee80211_rate_control_unregister(struct rate_control_ops *ops); | 2061 | void ieee80211_rate_control_unregister(struct rate_control_ops *ops); |
1964 | 2062 | ||
2063 | static inline bool | ||
2064 | conf_is_ht20(struct ieee80211_conf *conf) | ||
2065 | { | ||
2066 | return conf->channel_type == NL80211_CHAN_HT20; | ||
2067 | } | ||
2068 | |||
2069 | static inline bool | ||
2070 | conf_is_ht40_minus(struct ieee80211_conf *conf) | ||
2071 | { | ||
2072 | return conf->channel_type == NL80211_CHAN_HT40MINUS; | ||
2073 | } | ||
2074 | |||
2075 | static inline bool | ||
2076 | conf_is_ht40_plus(struct ieee80211_conf *conf) | ||
2077 | { | ||
2078 | return conf->channel_type == NL80211_CHAN_HT40PLUS; | ||
2079 | } | ||
2080 | |||
2081 | static inline bool | ||
2082 | conf_is_ht40(struct ieee80211_conf *conf) | ||
2083 | { | ||
2084 | return conf_is_ht40_minus(conf) || conf_is_ht40_plus(conf); | ||
2085 | } | ||
2086 | |||
2087 | static inline bool | ||
2088 | conf_is_ht(struct ieee80211_conf *conf) | ||
2089 | { | ||
2090 | return conf->channel_type != NL80211_CHAN_NO_HT; | ||
2091 | } | ||
2092 | |||
1965 | #endif /* MAC80211_H */ | 2093 | #endif /* MAC80211_H */ |
diff --git a/include/net/netns/ipv4.h b/include/net/netns/ipv4.h index 977f482d97a9..2eb3814d6258 100644 --- a/include/net/netns/ipv4.h +++ b/include/net/netns/ipv4.h | |||
@@ -54,5 +54,18 @@ struct netns_ipv4 { | |||
54 | 54 | ||
55 | struct timer_list rt_secret_timer; | 55 | struct timer_list rt_secret_timer; |
56 | atomic_t rt_genid; | 56 | atomic_t rt_genid; |
57 | |||
58 | #ifdef CONFIG_IP_MROUTE | ||
59 | struct sock *mroute_sk; | ||
60 | struct mfc_cache **mfc_cache_array; | ||
61 | struct vif_device *vif_table; | ||
62 | int maxvif; | ||
63 | atomic_t cache_resolve_queue_len; | ||
64 | int mroute_do_assert; | ||
65 | int mroute_do_pim; | ||
66 | #if defined(CONFIG_IP_PIMSM_V1) || defined(CONFIG_IP_PIMSM_V2) | ||
67 | int mroute_reg_vif_num; | ||
68 | #endif | ||
69 | #endif | ||
57 | }; | 70 | }; |
58 | #endif | 71 | #endif |
diff --git a/include/net/netrom.h b/include/net/netrom.h index f06852bba62a..15696b1fd30f 100644 --- a/include/net/netrom.h +++ b/include/net/netrom.h | |||
@@ -59,10 +59,6 @@ enum { | |||
59 | #define NR_MAX_WINDOW_SIZE 127 /* Maximum Window Allowable - 127 */ | 59 | #define NR_MAX_WINDOW_SIZE 127 /* Maximum Window Allowable - 127 */ |
60 | #define NR_MAX_PACKET_SIZE 236 /* Maximum Packet Length - 236 */ | 60 | #define NR_MAX_PACKET_SIZE 236 /* Maximum Packet Length - 236 */ |
61 | 61 | ||
62 | struct nr_private { | ||
63 | struct net_device_stats stats; | ||
64 | }; | ||
65 | |||
66 | struct nr_sock { | 62 | struct nr_sock { |
67 | struct sock sock; | 63 | struct sock sock; |
68 | ax25_address user_addr, source_addr, dest_addr; | 64 | ax25_address user_addr, source_addr, dest_addr; |
diff --git a/include/net/phonet/phonet.h b/include/net/phonet/phonet.h index 057b0a8a2885..d43f71b5ec00 100644 --- a/include/net/phonet/phonet.h +++ b/include/net/phonet/phonet.h | |||
@@ -105,7 +105,6 @@ void phonet_proto_unregister(int protocol, struct phonet_protocol *pp); | |||
105 | 105 | ||
106 | int phonet_sysctl_init(void); | 106 | int phonet_sysctl_init(void); |
107 | void phonet_sysctl_exit(void); | 107 | void phonet_sysctl_exit(void); |
108 | void phonet_netlink_register(void); | ||
109 | int isi_register(void); | 108 | int isi_register(void); |
110 | void isi_unregister(void); | 109 | void isi_unregister(void); |
111 | 110 | ||
diff --git a/include/net/phonet/pn_dev.h b/include/net/phonet/pn_dev.h index aa1c59a1d33f..5054dc5ea2c2 100644 --- a/include/net/phonet/pn_dev.h +++ b/include/net/phonet/pn_dev.h | |||
@@ -28,7 +28,7 @@ struct phonet_device_list { | |||
28 | spinlock_t lock; | 28 | spinlock_t lock; |
29 | }; | 29 | }; |
30 | 30 | ||
31 | extern struct phonet_device_list pndevs; | 31 | struct phonet_device_list *phonet_device_list(struct net *net); |
32 | 32 | ||
33 | struct phonet_device { | 33 | struct phonet_device { |
34 | struct list_head list; | 34 | struct list_head list; |
@@ -36,8 +36,9 @@ struct phonet_device { | |||
36 | DECLARE_BITMAP(addrs, 64); | 36 | DECLARE_BITMAP(addrs, 64); |
37 | }; | 37 | }; |
38 | 38 | ||
39 | void phonet_device_init(void); | 39 | int phonet_device_init(void); |
40 | void phonet_device_exit(void); | 40 | void phonet_device_exit(void); |
41 | int phonet_netlink_register(void); | ||
41 | struct net_device *phonet_device_get(struct net *net); | 42 | struct net_device *phonet_device_get(struct net *net); |
42 | 43 | ||
43 | int phonet_address_add(struct net_device *dev, u8 addr); | 44 | int phonet_address_add(struct net_device *dev, u8 addr); |
diff --git a/include/net/pkt_sched.h b/include/net/pkt_sched.h index 4082f39f5079..e37fe3129c17 100644 --- a/include/net/pkt_sched.h +++ b/include/net/pkt_sched.h | |||
@@ -85,6 +85,7 @@ extern struct qdisc_rate_table *qdisc_get_rtab(struct tc_ratespec *r, | |||
85 | struct nlattr *tab); | 85 | struct nlattr *tab); |
86 | extern void qdisc_put_rtab(struct qdisc_rate_table *tab); | 86 | extern void qdisc_put_rtab(struct qdisc_rate_table *tab); |
87 | extern void qdisc_put_stab(struct qdisc_size_table *tab); | 87 | extern void qdisc_put_stab(struct qdisc_size_table *tab); |
88 | extern void qdisc_warn_nonwc(char *txt, struct Qdisc *qdisc); | ||
88 | 89 | ||
89 | extern void __qdisc_run(struct Qdisc *q); | 90 | extern void __qdisc_run(struct Qdisc *q); |
90 | 91 | ||
diff --git a/include/net/sch_generic.h b/include/net/sch_generic.h index f8c47429044a..3d78a4d22460 100644 --- a/include/net/sch_generic.h +++ b/include/net/sch_generic.h | |||
@@ -42,9 +42,10 @@ struct Qdisc | |||
42 | int (*enqueue)(struct sk_buff *skb, struct Qdisc *dev); | 42 | int (*enqueue)(struct sk_buff *skb, struct Qdisc *dev); |
43 | struct sk_buff * (*dequeue)(struct Qdisc *dev); | 43 | struct sk_buff * (*dequeue)(struct Qdisc *dev); |
44 | unsigned flags; | 44 | unsigned flags; |
45 | #define TCQ_F_BUILTIN 1 | 45 | #define TCQ_F_BUILTIN 1 |
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_WARN_NONWC (1 << 16) | ||
48 | int padded; | 49 | int padded; |
49 | struct Qdisc_ops *ops; | 50 | struct Qdisc_ops *ops; |
50 | struct qdisc_size_table *stab; | 51 | struct qdisc_size_table *stab; |
diff --git a/include/net/wireless.h b/include/net/wireless.h index 21c5d966142d..a42c1562d52b 100644 --- a/include/net/wireless.h +++ b/include/net/wireless.h | |||
@@ -181,12 +181,25 @@ struct ieee80211_supported_band { | |||
181 | * struct wiphy - wireless hardware description | 181 | * struct wiphy - wireless hardware description |
182 | * @idx: the wiphy index assigned to this item | 182 | * @idx: the wiphy index assigned to this item |
183 | * @class_dev: the class device representing /sys/class/ieee80211/<wiphy-name> | 183 | * @class_dev: the class device representing /sys/class/ieee80211/<wiphy-name> |
184 | * @fw_handles_regulatory: tells us the firmware for this device | 184 | * @custom_regulatory: tells us the driver for this device |
185 | * has its own regulatory solution and cannot identify the | 185 | * has its own custom regulatory domain and cannot identify the |
186 | * ISO / IEC 3166 alpha2 it belongs to. When this is enabled | 186 | * ISO / IEC 3166 alpha2 it belongs to. When this is enabled |
187 | * we will disregard the first regulatory hint (when the | 187 | * we will disregard the first regulatory hint (when the |
188 | * initiator is %REGDOM_SET_BY_CORE). | 188 | * initiator is %REGDOM_SET_BY_CORE). |
189 | * @strict_regulatory: tells us the driver for this device will ignore | ||
190 | * regulatory domain settings until it gets its own regulatory domain | ||
191 | * via its regulatory_hint(). After its gets its own regulatory domain | ||
192 | * it will only allow further regulatory domain settings to further | ||
193 | * enhance compliance. For example if channel 13 and 14 are disabled | ||
194 | * by this regulatory domain no user regulatory domain can enable these | ||
195 | * channels at a later time. This can be used for devices which do not | ||
196 | * have calibration information gauranteed for frequencies or settings | ||
197 | * outside of its regulatory domain. | ||
189 | * @reg_notifier: the driver's regulatory notification callback | 198 | * @reg_notifier: the driver's regulatory notification callback |
199 | * @regd: the driver's regulatory domain, if one was requested via | ||
200 | * the regulatory_hint() API. This can be used by the driver | ||
201 | * on the reg_notifier() if it chooses to ignore future | ||
202 | * regulatory domain changes caused by other drivers. | ||
190 | */ | 203 | */ |
191 | struct wiphy { | 204 | struct wiphy { |
192 | /* assign these fields before you register the wiphy */ | 205 | /* assign these fields before you register the wiphy */ |
@@ -197,7 +210,8 @@ struct wiphy { | |||
197 | /* Supported interface modes, OR together BIT(NL80211_IFTYPE_...) */ | 210 | /* Supported interface modes, OR together BIT(NL80211_IFTYPE_...) */ |
198 | u16 interface_modes; | 211 | u16 interface_modes; |
199 | 212 | ||
200 | bool fw_handles_regulatory; | 213 | bool custom_regulatory; |
214 | bool strict_regulatory; | ||
201 | 215 | ||
202 | /* If multiple wiphys are registered and you're handed e.g. | 216 | /* If multiple wiphys are registered and you're handed e.g. |
203 | * a regular netdev with assigned ieee80211_ptr, you won't | 217 | * a regular netdev with assigned ieee80211_ptr, you won't |
@@ -209,10 +223,13 @@ struct wiphy { | |||
209 | struct ieee80211_supported_band *bands[IEEE80211_NUM_BANDS]; | 223 | struct ieee80211_supported_band *bands[IEEE80211_NUM_BANDS]; |
210 | 224 | ||
211 | /* Lets us get back the wiphy on the callback */ | 225 | /* Lets us get back the wiphy on the callback */ |
212 | int (*reg_notifier)(struct wiphy *wiphy, enum reg_set_by setby); | 226 | int (*reg_notifier)(struct wiphy *wiphy, |
227 | struct regulatory_request *request); | ||
213 | 228 | ||
214 | /* fields below are read-only, assigned by cfg80211 */ | 229 | /* fields below are read-only, assigned by cfg80211 */ |
215 | 230 | ||
231 | const struct ieee80211_regdomain *regd; | ||
232 | |||
216 | /* the item in /sys/class/ieee80211/ points to this, | 233 | /* the item in /sys/class/ieee80211/ points to this, |
217 | * you need use set_wiphy_dev() (see below) */ | 234 | * you need use set_wiphy_dev() (see below) */ |
218 | struct device dev; | 235 | struct device dev; |
@@ -361,7 +378,7 @@ ieee80211_get_channel(struct wiphy *wiphy, int freq) | |||
361 | */ | 378 | */ |
362 | struct ieee80211_rate * | 379 | struct ieee80211_rate * |
363 | ieee80211_get_response_rate(struct ieee80211_supported_band *sband, | 380 | ieee80211_get_response_rate(struct ieee80211_supported_band *sband, |
364 | u64 basic_rates, int bitrate); | 381 | u32 basic_rates, int bitrate); |
365 | 382 | ||
366 | /** | 383 | /** |
367 | * regulatory_hint - driver hint to the wireless core a regulatory domain | 384 | * regulatory_hint - driver hint to the wireless core a regulatory domain |
@@ -395,4 +412,45 @@ extern void regulatory_hint(struct wiphy *wiphy, const char *alpha2); | |||
395 | extern void regulatory_hint_11d(struct wiphy *wiphy, | 412 | extern void regulatory_hint_11d(struct wiphy *wiphy, |
396 | u8 *country_ie, | 413 | u8 *country_ie, |
397 | u8 country_ie_len); | 414 | u8 country_ie_len); |
415 | |||
416 | /** | ||
417 | * wiphy_apply_custom_regulatory - apply a custom driver regulatory domain | ||
418 | * @wiphy: the wireless device we want to process the regulatory domain on | ||
419 | * @regd: the custom regulatory domain to use for this wiphy | ||
420 | * | ||
421 | * Drivers can sometimes have custom regulatory domains which do not apply | ||
422 | * to a specific country. Drivers can use this to apply such custom regulatory | ||
423 | * domains. This routine must be called prior to wiphy registration. The | ||
424 | * custom regulatory domain will be trusted completely and as such previous | ||
425 | * default channel settings will be disregarded. If no rule is found for a | ||
426 | * channel on the regulatory domain the channel will be disabled. | ||
427 | */ | ||
428 | extern void wiphy_apply_custom_regulatory( | ||
429 | struct wiphy *wiphy, | ||
430 | const struct ieee80211_regdomain *regd); | ||
431 | |||
432 | /** | ||
433 | * freq_reg_info - get regulatory information for the given frequency | ||
434 | * @wiphy: the wiphy for which we want to process this rule for | ||
435 | * @center_freq: Frequency in KHz for which we want regulatory information for | ||
436 | * @bandwidth: the bandwidth requirement you have in KHz, if you do not have one | ||
437 | * you can set this to 0. If this frequency is allowed we then set | ||
438 | * this value to the maximum allowed bandwidth. | ||
439 | * @reg_rule: the regulatory rule which we have for this frequency | ||
440 | * | ||
441 | * Use this function to get the regulatory rule for a specific frequency on | ||
442 | * a given wireless device. If the device has a specific regulatory domain | ||
443 | * it wants to follow we respect that unless a country IE has been received | ||
444 | * and processed already. | ||
445 | * | ||
446 | * Returns 0 if it was able to find a valid regulatory rule which does | ||
447 | * apply to the given center_freq otherwise it returns non-zero. It will | ||
448 | * also return -ERANGE if we determine the given center_freq does not even have | ||
449 | * a regulatory rule for a frequency range in the center_freq's band. See | ||
450 | * freq_in_rule_band() for our current definition of a band -- this is purely | ||
451 | * subjective and right now its 802.11 specific. | ||
452 | */ | ||
453 | extern int freq_reg_info(struct wiphy *wiphy, u32 center_freq, u32 *bandwidth, | ||
454 | const struct ieee80211_reg_rule **reg_rule); | ||
455 | |||
398 | #endif /* __NET_WIRELESS_H */ | 456 | #endif /* __NET_WIRELESS_H */ |