aboutsummaryrefslogtreecommitdiffstats
path: root/include/net
diff options
context:
space:
mode:
authorPatrick McHardy <kaber@trash.net>2009-06-11 10:00:49 -0400
committerPatrick McHardy <kaber@trash.net>2009-06-11 10:00:49 -0400
commit36432dae73cf2c90a59b39c8df9fd8219272b005 (patch)
tree660b9104305a809ec4fdeb295ca13d6e90790ecc /include/net
parent440f0d588555892601cfe511728a0fc0c8204063 (diff)
parentbb400801c2f40bbd9a688818323ad09abfc4e581 (diff)
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6
Diffstat (limited to 'include/net')
-rw-r--r--include/net/bluetooth/bluetooth.h15
-rw-r--r--include/net/bluetooth/hci_core.h2
-rw-r--r--include/net/bluetooth/l2cap.h71
-rw-r--r--include/net/cfg80211.h51
-rw-r--r--include/net/dst.h12
-rw-r--r--include/net/ieee802154/af_ieee802154.h60
-rw-r--r--include/net/ieee802154/mac_def.h160
-rw-r--r--include/net/ieee802154/netdevice.h115
-rw-r--r--include/net/ieee802154/nl802154.h41
-rw-r--r--include/net/inet6_hashtables.h2
-rw-r--r--include/net/inet_hashtables.h2
-rw-r--r--include/net/inet_sock.h3
-rw-r--r--include/net/ip6_route.h2
-rw-r--r--include/net/mac80211.h29
-rw-r--r--include/net/pkt_sched.h7
-rw-r--r--include/net/route.h2
-rw-r--r--include/net/sctp/structs.h6
-rw-r--r--include/net/sctp/user.h2
-rw-r--r--include/net/sock.h6
-rw-r--r--include/net/wimax.h8
-rw-r--r--include/net/xfrm.h4
21 files changed, 529 insertions, 71 deletions
diff --git a/include/net/bluetooth/bluetooth.h b/include/net/bluetooth/bluetooth.h
index 3ad5390a4dd5..968166a45f86 100644
--- a/include/net/bluetooth/bluetooth.h
+++ b/include/net/bluetooth/bluetooth.h
@@ -81,12 +81,6 @@ enum {
81 BT_CLOSED 81 BT_CLOSED
82}; 82};
83 83
84/* Endianness conversions */
85#define htobs(a) __cpu_to_le16(a)
86#define htobl(a) __cpu_to_le32(a)
87#define btohs(a) __le16_to_cpu(a)
88#define btohl(a) __le32_to_cpu(a)
89
90/* BD Address */ 84/* BD Address */
91typedef struct { 85typedef struct {
92 __u8 b[6]; 86 __u8 b[6];
@@ -171,15 +165,6 @@ static inline struct sk_buff *bt_skb_send_alloc(struct sock *sk, unsigned long l
171 return skb; 165 return skb;
172} 166}
173 167
174static inline int skb_frags_no(struct sk_buff *skb)
175{
176 register struct sk_buff *frag = skb_shinfo(skb)->frag_list;
177 register int n = 1;
178
179 for (; frag; frag=frag->next, n++);
180 return n;
181}
182
183int bt_err(__u16 code); 168int bt_err(__u16 code);
184 169
185extern int hci_sock_init(void); 170extern int hci_sock_init(void);
diff --git a/include/net/bluetooth/hci_core.h b/include/net/bluetooth/hci_core.h
index 73aead222b32..c4ca4228b083 100644
--- a/include/net/bluetooth/hci_core.h
+++ b/include/net/bluetooth/hci_core.h
@@ -137,6 +137,8 @@ struct hci_dev {
137 struct device *parent; 137 struct device *parent;
138 struct device dev; 138 struct device dev;
139 139
140 struct rfkill *rfkill;
141
140 struct module *owner; 142 struct module *owner;
141 143
142 int (*open)(struct hci_dev *hdev); 144 int (*open)(struct hci_dev *hdev);
diff --git a/include/net/bluetooth/l2cap.h b/include/net/bluetooth/l2cap.h
index f566aa1f0a4c..e919fca1072a 100644
--- a/include/net/bluetooth/l2cap.h
+++ b/include/net/bluetooth/l2cap.h
@@ -26,8 +26,13 @@
26#define __L2CAP_H 26#define __L2CAP_H
27 27
28/* L2CAP defaults */ 28/* L2CAP defaults */
29#define L2CAP_DEFAULT_MTU 672 29#define L2CAP_DEFAULT_MTU 672
30#define L2CAP_DEFAULT_FLUSH_TO 0xFFFF 30#define L2CAP_DEFAULT_FLUSH_TO 0xffff
31#define L2CAP_DEFAULT_RX_WINDOW 1
32#define L2CAP_DEFAULT_MAX_RECEIVE 1
33#define L2CAP_DEFAULT_RETRANS_TO 300 /* 300 milliseconds */
34#define L2CAP_DEFAULT_MONITOR_TO 1000 /* 1 second */
35#define L2CAP_DEFAULT_MAX_RX_APDU 0xfff7
31 36
32#define L2CAP_CONN_TIMEOUT (40000) /* 40 seconds */ 37#define L2CAP_CONN_TIMEOUT (40000) /* 40 seconds */
33#define L2CAP_INFO_TIMEOUT (4000) /* 4 seconds */ 38#define L2CAP_INFO_TIMEOUT (4000) /* 4 seconds */
@@ -64,17 +69,29 @@ struct l2cap_conninfo {
64#define L2CAP_LM_SECURE 0x0020 69#define L2CAP_LM_SECURE 0x0020
65 70
66/* L2CAP command codes */ 71/* L2CAP command codes */
67#define L2CAP_COMMAND_REJ 0x01 72#define L2CAP_COMMAND_REJ 0x01
68#define L2CAP_CONN_REQ 0x02 73#define L2CAP_CONN_REQ 0x02
69#define L2CAP_CONN_RSP 0x03 74#define L2CAP_CONN_RSP 0x03
70#define L2CAP_CONF_REQ 0x04 75#define L2CAP_CONF_REQ 0x04
71#define L2CAP_CONF_RSP 0x05 76#define L2CAP_CONF_RSP 0x05
72#define L2CAP_DISCONN_REQ 0x06 77#define L2CAP_DISCONN_REQ 0x06
73#define L2CAP_DISCONN_RSP 0x07 78#define L2CAP_DISCONN_RSP 0x07
74#define L2CAP_ECHO_REQ 0x08 79#define L2CAP_ECHO_REQ 0x08
75#define L2CAP_ECHO_RSP 0x09 80#define L2CAP_ECHO_RSP 0x09
76#define L2CAP_INFO_REQ 0x0a 81#define L2CAP_INFO_REQ 0x0a
77#define L2CAP_INFO_RSP 0x0b 82#define L2CAP_INFO_RSP 0x0b
83
84/* L2CAP feature mask */
85#define L2CAP_FEAT_FLOWCTL 0x00000001
86#define L2CAP_FEAT_RETRANS 0x00000002
87#define L2CAP_FEAT_ERTM 0x00000008
88#define L2CAP_FEAT_STREAMING 0x00000010
89#define L2CAP_FEAT_FCS 0x00000020
90#define L2CAP_FEAT_FIXED_CHAN 0x00000080
91
92/* L2CAP checksum option */
93#define L2CAP_FCS_NONE 0x00
94#define L2CAP_FCS_CRC16 0x01
78 95
79/* L2CAP structures */ 96/* L2CAP structures */
80struct l2cap_hdr { 97struct l2cap_hdr {
@@ -106,17 +123,23 @@ struct l2cap_conn_rsp {
106 __le16 status; 123 __le16 status;
107} __attribute__ ((packed)); 124} __attribute__ ((packed));
108 125
126/* channel indentifier */
127#define L2CAP_CID_SIGNALING 0x0001
128#define L2CAP_CID_CONN_LESS 0x0002
129#define L2CAP_CID_DYN_START 0x0040
130#define L2CAP_CID_DYN_END 0xffff
131
109/* connect result */ 132/* connect result */
110#define L2CAP_CR_SUCCESS 0x0000 133#define L2CAP_CR_SUCCESS 0x0000
111#define L2CAP_CR_PEND 0x0001 134#define L2CAP_CR_PEND 0x0001
112#define L2CAP_CR_BAD_PSM 0x0002 135#define L2CAP_CR_BAD_PSM 0x0002
113#define L2CAP_CR_SEC_BLOCK 0x0003 136#define L2CAP_CR_SEC_BLOCK 0x0003
114#define L2CAP_CR_NO_MEM 0x0004 137#define L2CAP_CR_NO_MEM 0x0004
115 138
116/* connect status */ 139/* connect status */
117#define L2CAP_CS_NO_INFO 0x0000 140#define L2CAP_CS_NO_INFO 0x0000
118#define L2CAP_CS_AUTHEN_PEND 0x0001 141#define L2CAP_CS_AUTHEN_PEND 0x0001
119#define L2CAP_CS_AUTHOR_PEND 0x0002 142#define L2CAP_CS_AUTHOR_PEND 0x0002
120 143
121struct l2cap_conf_req { 144struct l2cap_conf_req {
122 __le16 dcid; 145 __le16 dcid;
@@ -143,10 +166,14 @@ struct l2cap_conf_opt {
143} __attribute__ ((packed)); 166} __attribute__ ((packed));
144#define L2CAP_CONF_OPT_SIZE 2 167#define L2CAP_CONF_OPT_SIZE 2
145 168
169#define L2CAP_CONF_HINT 0x80
170#define L2CAP_CONF_MASK 0x7f
171
146#define L2CAP_CONF_MTU 0x01 172#define L2CAP_CONF_MTU 0x01
147#define L2CAP_CONF_FLUSH_TO 0x02 173#define L2CAP_CONF_FLUSH_TO 0x02
148#define L2CAP_CONF_QOS 0x03 174#define L2CAP_CONF_QOS 0x03
149#define L2CAP_CONF_RFC 0x04 175#define L2CAP_CONF_RFC 0x04
176#define L2CAP_CONF_FCS 0x05
150 177
151#define L2CAP_CONF_MAX_SIZE 22 178#define L2CAP_CONF_MAX_SIZE 22
152 179
@@ -162,6 +189,8 @@ struct l2cap_conf_rfc {
162#define L2CAP_MODE_BASIC 0x00 189#define L2CAP_MODE_BASIC 0x00
163#define L2CAP_MODE_RETRANS 0x01 190#define L2CAP_MODE_RETRANS 0x01
164#define L2CAP_MODE_FLOWCTL 0x02 191#define L2CAP_MODE_FLOWCTL 0x02
192#define L2CAP_MODE_ERTM 0x03
193#define L2CAP_MODE_STREAM 0x04
165 194
166struct l2cap_disconn_req { 195struct l2cap_disconn_req {
167 __le16 dcid; 196 __le16 dcid;
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h
index f20da7d63b1e..1a21895b732b 100644
--- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h
@@ -752,6 +752,19 @@ enum wiphy_params_flags {
752}; 752};
753 753
754/** 754/**
755 * enum tx_power_setting - TX power adjustment
756 *
757 * @TX_POWER_AUTOMATIC: the dbm parameter is ignored
758 * @TX_POWER_LIMITED: limit TX power by the dbm parameter
759 * @TX_POWER_FIXED: fix TX power to the dbm parameter
760 */
761enum tx_power_setting {
762 TX_POWER_AUTOMATIC,
763 TX_POWER_LIMITED,
764 TX_POWER_FIXED,
765};
766
767/**
755 * struct cfg80211_ops - backend description for wireless configuration 768 * struct cfg80211_ops - backend description for wireless configuration
756 * 769 *
757 * This struct is registered by fullmac card drivers and/or wireless stacks 770 * This struct is registered by fullmac card drivers and/or wireless stacks
@@ -837,6 +850,13 @@ enum wiphy_params_flags {
837 * @changed bitfield (see &enum wiphy_params_flags) describes which values 850 * @changed bitfield (see &enum wiphy_params_flags) describes which values
838 * have changed. The actual parameter values are available in 851 * have changed. The actual parameter values are available in
839 * struct wiphy. If returning an error, no value should be changed. 852 * struct wiphy. If returning an error, no value should be changed.
853 *
854 * @set_tx_power: set the transmit power according to the parameters
855 * @get_tx_power: store the current TX power into the dbm variable;
856 * return 0 if successful
857 *
858 * @rfkill_poll: polls the hw rfkill line, use cfg80211 reporting
859 * functions to adjust rfkill hw state
840 */ 860 */
841struct cfg80211_ops { 861struct cfg80211_ops {
842 int (*suspend)(struct wiphy *wiphy); 862 int (*suspend)(struct wiphy *wiphy);
@@ -928,6 +948,12 @@ struct cfg80211_ops {
928 int (*leave_ibss)(struct wiphy *wiphy, struct net_device *dev); 948 int (*leave_ibss)(struct wiphy *wiphy, struct net_device *dev);
929 949
930 int (*set_wiphy_params)(struct wiphy *wiphy, u32 changed); 950 int (*set_wiphy_params)(struct wiphy *wiphy, u32 changed);
951
952 int (*set_tx_power)(struct wiphy *wiphy,
953 enum tx_power_setting type, int dbm);
954 int (*get_tx_power)(struct wiphy *wiphy, int *dbm);
955
956 void (*rfkill_poll)(struct wiphy *wiphy);
931}; 957};
932 958
933/* 959/*
@@ -1451,6 +1477,12 @@ int cfg80211_wext_siwencode(struct net_device *dev,
1451int cfg80211_wext_giwencode(struct net_device *dev, 1477int cfg80211_wext_giwencode(struct net_device *dev,
1452 struct iw_request_info *info, 1478 struct iw_request_info *info,
1453 struct iw_point *erq, char *keybuf); 1479 struct iw_point *erq, char *keybuf);
1480int cfg80211_wext_siwtxpower(struct net_device *dev,
1481 struct iw_request_info *info,
1482 union iwreq_data *data, char *keybuf);
1483int cfg80211_wext_giwtxpower(struct net_device *dev,
1484 struct iw_request_info *info,
1485 union iwreq_data *data, char *keybuf);
1454 1486
1455/* 1487/*
1456 * callbacks for asynchronous cfg80211 methods, notification 1488 * callbacks for asynchronous cfg80211 methods, notification
@@ -1636,4 +1668,23 @@ void cfg80211_michael_mic_failure(struct net_device *dev, const u8 *addr,
1636 */ 1668 */
1637void cfg80211_ibss_joined(struct net_device *dev, const u8 *bssid, gfp_t gfp); 1669void cfg80211_ibss_joined(struct net_device *dev, const u8 *bssid, gfp_t gfp);
1638 1670
1671/**
1672 * wiphy_rfkill_set_hw_state - notify cfg80211 about hw block state
1673 * @wiphy: the wiphy
1674 * @blocked: block status
1675 */
1676void wiphy_rfkill_set_hw_state(struct wiphy *wiphy, bool blocked);
1677
1678/**
1679 * wiphy_rfkill_start_polling - start polling rfkill
1680 * @wiphy: the wiphy
1681 */
1682void wiphy_rfkill_start_polling(struct wiphy *wiphy);
1683
1684/**
1685 * wiphy_rfkill_stop_polling - stop polling rfkill
1686 * @wiphy: the wiphy
1687 */
1688void wiphy_rfkill_stop_polling(struct wiphy *wiphy);
1689
1639#endif /* __NET_CFG80211_H */ 1690#endif /* __NET_CFG80211_H */
diff --git a/include/net/dst.h b/include/net/dst.h
index 6be3b082a070..7fc409c19b37 100644
--- a/include/net/dst.h
+++ b/include/net/dst.h
@@ -195,6 +195,12 @@ struct dst_entry * dst_clone(struct dst_entry * dst)
195} 195}
196 196
197extern void dst_release(struct dst_entry *dst); 197extern void dst_release(struct dst_entry *dst);
198static inline void skb_dst_drop(struct sk_buff *skb)
199{
200 if (skb->_skb_dst)
201 dst_release(skb_dst(skb));
202 skb->_skb_dst = 0UL;
203}
198 204
199/* Children define the path of the packet through the 205/* Children define the path of the packet through the
200 * Linux networking. Thus, destinations are stackable. 206 * Linux networking. Thus, destinations are stackable.
@@ -246,7 +252,7 @@ static inline void dst_negative_advice(struct dst_entry **dst_p)
246 252
247static inline void dst_link_failure(struct sk_buff *skb) 253static inline void dst_link_failure(struct sk_buff *skb)
248{ 254{
249 struct dst_entry * dst = skb->dst; 255 struct dst_entry *dst = skb_dst(skb);
250 if (dst && dst->ops && dst->ops->link_failure) 256 if (dst && dst->ops && dst->ops->link_failure)
251 dst->ops->link_failure(skb); 257 dst->ops->link_failure(skb);
252} 258}
@@ -265,13 +271,13 @@ static inline void dst_set_expires(struct dst_entry *dst, int timeout)
265/* Output packet to network from transport. */ 271/* Output packet to network from transport. */
266static inline int dst_output(struct sk_buff *skb) 272static inline int dst_output(struct sk_buff *skb)
267{ 273{
268 return skb->dst->output(skb); 274 return skb_dst(skb)->output(skb);
269} 275}
270 276
271/* Input packet from network to transport. */ 277/* Input packet from network to transport. */
272static inline int dst_input(struct sk_buff *skb) 278static inline int dst_input(struct sk_buff *skb)
273{ 279{
274 return skb->dst->input(skb); 280 return skb_dst(skb)->input(skb);
275} 281}
276 282
277static inline struct dst_entry *dst_check(struct dst_entry *dst, u32 cookie) 283static inline struct dst_entry *dst_check(struct dst_entry *dst, u32 cookie)
diff --git a/include/net/ieee802154/af_ieee802154.h b/include/net/ieee802154/af_ieee802154.h
new file mode 100644
index 000000000000..0d78605fb1a6
--- /dev/null
+++ b/include/net/ieee802154/af_ieee802154.h
@@ -0,0 +1,60 @@
1/*
2 * IEEE 802.15.4 inteface for userspace
3 *
4 * Copyright 2007, 2008 Siemens AG
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 version 2
8 * as published by the Free Software Foundation.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License along
16 * with this program; if not, write to the Free Software Foundation, Inc.,
17 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Written by:
20 * Sergey Lapin <slapin@ossfans.org>
21 * Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
22 */
23
24#ifndef _AF_IEEE802154_H
25#define _AF_IEEE802154_H
26
27#include <linux/socket.h> /* for sa_family_t */
28
29enum {
30 IEEE802154_ADDR_NONE = 0x0,
31 /* RESERVED = 0x01, */
32 IEEE802154_ADDR_SHORT = 0x2, /* 16-bit address + PANid */
33 IEEE802154_ADDR_LONG = 0x3, /* 64-bit address + PANid */
34};
35
36/* address length, octets */
37#define IEEE802154_ADDR_LEN 8
38
39struct ieee802154_addr {
40 int addr_type;
41 u16 pan_id;
42 union {
43 u8 hwaddr[IEEE802154_ADDR_LEN];
44 u16 short_addr;
45 };
46};
47
48#define IEEE802154_PANID_BROADCAST 0xffff
49#define IEEE802154_ADDR_BROADCAST 0xffff
50#define IEEE802154_ADDR_UNDEF 0xfffe
51
52struct sockaddr_ieee802154 {
53 sa_family_t family; /* AF_IEEE802154 */
54 struct ieee802154_addr addr;
55};
56
57/* master device */
58#define IEEE802154_SIOC_ADD_SLAVE (SIOCDEVPRIVATE + 0)
59
60#endif
diff --git a/include/net/ieee802154/mac_def.h b/include/net/ieee802154/mac_def.h
new file mode 100644
index 000000000000..8cb684635650
--- /dev/null
+++ b/include/net/ieee802154/mac_def.h
@@ -0,0 +1,160 @@
1/*
2 * IEEE802.15.4-2003 specification
3 *
4 * Copyright (C) 2007, 2008 Siemens AG
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 version 2
8 * as published by the Free Software Foundation.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License along
16 * with this program; if not, write to the Free Software Foundation, Inc.,
17 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Written by:
20 * Pavel Smolenskiy <pavel.smolenskiy@gmail.com>
21 * Maxim Gorbachyov <maxim.gorbachev@siemens.com>
22 * Maxim Osipov <maxim.osipov@siemens.com>
23 * Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
24 */
25
26#ifndef IEEE802154_MAC_DEF_H
27#define IEEE802154_MAC_DEF_H
28
29#define IEEE802154_FC_TYPE_BEACON 0x0 /* Frame is beacon */
30#define IEEE802154_FC_TYPE_DATA 0x1 /* Frame is data */
31#define IEEE802154_FC_TYPE_ACK 0x2 /* Frame is acknowledgment */
32#define IEEE802154_FC_TYPE_MAC_CMD 0x3 /* Frame is MAC command */
33
34#define IEEE802154_FC_TYPE_SHIFT 0
35#define IEEE802154_FC_TYPE_MASK ((1 << 3) - 1)
36#define IEEE802154_FC_TYPE(x) ((x & IEEE802154_FC_TYPE_MASK) >> IEEE802154_FC_TYPE_SHIFT)
37#define IEEE802154_FC_SET_TYPE(v, x) do { \
38 v = (((v) & ~IEEE802154_FC_TYPE_MASK) | \
39 (((x) << IEEE802154_FC_TYPE_SHIFT) & IEEE802154_FC_TYPE_MASK)); \
40 } while (0)
41
42#define IEEE802154_FC_SECEN (1 << 3)
43#define IEEE802154_FC_FRPEND (1 << 4)
44#define IEEE802154_FC_ACK_REQ (1 << 5)
45#define IEEE802154_FC_INTRA_PAN (1 << 6)
46
47#define IEEE802154_FC_SAMODE_SHIFT 14
48#define IEEE802154_FC_SAMODE_MASK (3 << IEEE802154_FC_SAMODE_SHIFT)
49#define IEEE802154_FC_DAMODE_SHIFT 10
50#define IEEE802154_FC_DAMODE_MASK (3 << IEEE802154_FC_DAMODE_SHIFT)
51
52#define IEEE802154_FC_SAMODE(x) \
53 (((x) & IEEE802154_FC_SAMODE_MASK) >> IEEE802154_FC_SAMODE_SHIFT)
54
55#define IEEE802154_FC_DAMODE(x) \
56 (((x) & IEEE802154_FC_DAMODE_MASK) >> IEEE802154_FC_DAMODE_SHIFT)
57
58
59/* MAC's Command Frames Identifiers */
60#define IEEE802154_CMD_ASSOCIATION_REQ 0x01
61#define IEEE802154_CMD_ASSOCIATION_RESP 0x02
62#define IEEE802154_CMD_DISASSOCIATION_NOTIFY 0x03
63#define IEEE802154_CMD_DATA_REQ 0x04
64#define IEEE802154_CMD_PANID_CONFLICT_NOTIFY 0x05
65#define IEEE802154_CMD_ORPHAN_NOTIFY 0x06
66#define IEEE802154_CMD_BEACON_REQ 0x07
67#define IEEE802154_CMD_COORD_REALIGN_NOTIFY 0x08
68#define IEEE802154_CMD_GTS_REQ 0x09
69
70/*
71 * The return values of MAC operations
72 */
73enum {
74 /*
75 * The requested operation was completed successfully.
76 * For a transmission request, this value indicates
77 * a successful transmission.
78 */
79 IEEE802154_SUCCESS = 0x0,
80
81 /* The beacon was lost following a synchronization request. */
82 IEEE802154_BEACON_LOSS = 0xe0,
83 /*
84 * A transmission could not take place due to activity on the
85 * channel, i.e., the CSMA-CA mechanism has failed.
86 */
87 IEEE802154_CHNL_ACCESS_FAIL = 0xe1,
88 /* The GTS request has been denied by the PAN coordinator. */
89 IEEE802154_DENINED = 0xe2,
90 /* The attempt to disable the transceiver has failed. */
91 IEEE802154_DISABLE_TRX_FAIL = 0xe3,
92 /*
93 * The received frame induces a failed security check according to
94 * the security suite.
95 */
96 IEEE802154_FAILED_SECURITY_CHECK = 0xe4,
97 /*
98 * The frame resulting from secure processing has a length that is
99 * greater than aMACMaxFrameSize.
100 */
101 IEEE802154_FRAME_TOO_LONG = 0xe5,
102 /*
103 * The requested GTS transmission failed because the specified GTS
104 * either did not have a transmit GTS direction or was not defined.
105 */
106 IEEE802154_INVALID_GTS = 0xe6,
107 /*
108 * A request to purge an MSDU from the transaction queue was made using
109 * an MSDU handle that was not found in the transaction table.
110 */
111 IEEE802154_INVALID_HANDLE = 0xe7,
112 /* A parameter in the primitive is out of the valid range.*/
113 IEEE802154_INVALID_PARAMETER = 0xe8,
114 /* No acknowledgment was received after aMaxFrameRetries. */
115 IEEE802154_NO_ACK = 0xe9,
116 /* A scan operation failed to find any network beacons.*/
117 IEEE802154_NO_BEACON = 0xea,
118 /* No response data were available following a request. */
119 IEEE802154_NO_DATA = 0xeb,
120 /* The operation failed because a short address was not allocated. */
121 IEEE802154_NO_SHORT_ADDRESS = 0xec,
122 /*
123 * A receiver enable request was unsuccessful because it could not be
124 * completed within the CAP.
125 */
126 IEEE802154_OUT_OF_CAP = 0xed,
127 /*
128 * A PAN identifier conflict has been detected and communicated to the
129 * PAN coordinator.
130 */
131 IEEE802154_PANID_CONFLICT = 0xee,
132 /* A coordinator realignment command has been received. */
133 IEEE802154_REALIGMENT = 0xef,
134 /* The transaction has expired and its information discarded. */
135 IEEE802154_TRANSACTION_EXPIRED = 0xf0,
136 /* There is no capacity to store the transaction. */
137 IEEE802154_TRANSACTION_OVERFLOW = 0xf1,
138 /*
139 * The transceiver was in the transmitter enabled state when the
140 * receiver was requested to be enabled.
141 */
142 IEEE802154_TX_ACTIVE = 0xf2,
143 /* The appropriate key is not available in the ACL. */
144 IEEE802154_UNAVAILABLE_KEY = 0xf3,
145 /*
146 * A SET/GET request was issued with the identifier of a PIB attribute
147 * that is not supported.
148 */
149 IEEE802154_UNSUPPORTED_ATTR = 0xf4,
150 /*
151 * A request to perform a scan operation failed because the MLME was
152 * in the process of performing a previously initiated scan operation.
153 */
154 IEEE802154_SCAN_IN_PROGRESS = 0xfc,
155};
156
157
158#endif
159
160
diff --git a/include/net/ieee802154/netdevice.h b/include/net/ieee802154/netdevice.h
new file mode 100644
index 000000000000..e2506af3e7c8
--- /dev/null
+++ b/include/net/ieee802154/netdevice.h
@@ -0,0 +1,115 @@
1/*
2 * An interface between IEEE802.15.4 device and rest of the kernel.
3 *
4 * Copyright (C) 2007, 2008, 2009 Siemens AG
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 version 2
8 * as published by the Free Software Foundation.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License along
16 * with this program; if not, write to the Free Software Foundation, Inc.,
17 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Written by:
20 * Pavel Smolenskiy <pavel.smolenskiy@gmail.com>
21 * Maxim Gorbachyov <maxim.gorbachev@siemens.com>
22 * Maxim Osipov <maxim.osipov@siemens.com>
23 * Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
24 */
25
26#ifndef IEEE802154_NETDEVICE_H
27#define IEEE802154_NETDEVICE_H
28
29/*
30 * A control block of skb passed between the ARPHRD_IEEE802154 device
31 * and other stack parts.
32 */
33struct ieee802154_mac_cb {
34 u8 lqi;
35 struct ieee802154_addr sa;
36 struct ieee802154_addr da;
37 u8 flags;
38 u8 seq;
39};
40
41static inline struct ieee802154_mac_cb *mac_cb(struct sk_buff *skb)
42{
43 return (struct ieee802154_mac_cb *)skb->cb;
44}
45
46#define MAC_CB_FLAG_TYPEMASK ((1 << 3) - 1)
47
48#define MAC_CB_FLAG_ACKREQ (1 << 3)
49#define MAC_CB_FLAG_SECEN (1 << 4)
50#define MAC_CB_FLAG_INTRAPAN (1 << 5)
51
52static inline int mac_cb_is_ackreq(struct sk_buff *skb)
53{
54 return mac_cb(skb)->flags & MAC_CB_FLAG_ACKREQ;
55}
56
57static inline int mac_cb_is_secen(struct sk_buff *skb)
58{
59 return mac_cb(skb)->flags & MAC_CB_FLAG_SECEN;
60}
61
62static inline int mac_cb_is_intrapan(struct sk_buff *skb)
63{
64 return mac_cb(skb)->flags & MAC_CB_FLAG_INTRAPAN;
65}
66
67static inline int mac_cb_type(struct sk_buff *skb)
68{
69 return mac_cb(skb)->flags & MAC_CB_FLAG_TYPEMASK;
70}
71
72#define IEEE802154_MAC_SCAN_ED 0
73#define IEEE802154_MAC_SCAN_ACTIVE 1
74#define IEEE802154_MAC_SCAN_PASSIVE 2
75#define IEEE802154_MAC_SCAN_ORPHAN 3
76
77/*
78 * This should be located at net_device->ml_priv
79 */
80struct ieee802154_mlme_ops {
81 int (*assoc_req)(struct net_device *dev,
82 struct ieee802154_addr *addr,
83 u8 channel, u8 cap);
84 int (*assoc_resp)(struct net_device *dev,
85 struct ieee802154_addr *addr,
86 u16 short_addr, u8 status);
87 int (*disassoc_req)(struct net_device *dev,
88 struct ieee802154_addr *addr,
89 u8 reason);
90 int (*start_req)(struct net_device *dev,
91 struct ieee802154_addr *addr,
92 u8 channel, u8 bcn_ord, u8 sf_ord,
93 u8 pan_coord, u8 blx, u8 coord_realign);
94 int (*scan_req)(struct net_device *dev,
95 u8 type, u32 channels, u8 duration);
96
97 /*
98 * FIXME: these should become the part of PIB/MIB interface.
99 * However we still don't have IB interface of any kind
100 */
101 u16 (*get_pan_id)(struct net_device *dev);
102 u16 (*get_short_addr)(struct net_device *dev);
103 u8 (*get_dsn)(struct net_device *dev);
104 u8 (*get_bsn)(struct net_device *dev);
105};
106
107static inline struct ieee802154_mlme_ops *ieee802154_mlme_ops(
108 struct net_device *dev)
109{
110 return dev->ml_priv;
111}
112
113#endif
114
115
diff --git a/include/net/ieee802154/nl802154.h b/include/net/ieee802154/nl802154.h
new file mode 100644
index 000000000000..78efcdf52b59
--- /dev/null
+++ b/include/net/ieee802154/nl802154.h
@@ -0,0 +1,41 @@
1/*
2 * nl802154.h
3 *
4 * Copyright (C) 2007, 2008, 2009 Siemens AG
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 version 2
8 * as published by the Free Software Foundation.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License along
16 * with this program; if not, write to the Free Software Foundation, Inc.,
17 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 */
20
21#ifndef IEEE802154_NL_H
22#define IEEE802154_NL_H
23
24struct net_device;
25struct ieee802154_addr;
26
27int ieee802154_nl_assoc_indic(struct net_device *dev,
28 struct ieee802154_addr *addr, u8 cap);
29int ieee802154_nl_assoc_confirm(struct net_device *dev,
30 u16 short_addr, u8 status);
31int ieee802154_nl_disassoc_indic(struct net_device *dev,
32 struct ieee802154_addr *addr, u8 reason);
33int ieee802154_nl_disassoc_confirm(struct net_device *dev,
34 u8 status);
35int ieee802154_nl_scan_confirm(struct net_device *dev,
36 u8 status, u8 scan_type, u32 unscanned,
37 u8 *edl/*, struct list_head *pan_desc_list */);
38int ieee802154_nl_beacon_indic(struct net_device *dev, u16 panid,
39 u16 coord_addr);
40
41#endif
diff --git a/include/net/inet6_hashtables.h b/include/net/inet6_hashtables.h
index f74665d7bea8..22c73a77cd99 100644
--- a/include/net/inet6_hashtables.h
+++ b/include/net/inet6_hashtables.h
@@ -100,7 +100,7 @@ static inline struct sock *__inet6_lookup_skb(struct inet_hashinfo *hashinfo,
100 100
101 if (unlikely(sk = skb_steal_sock(skb))) 101 if (unlikely(sk = skb_steal_sock(skb)))
102 return sk; 102 return sk;
103 else return __inet6_lookup(dev_net(skb->dst->dev), hashinfo, 103 else return __inet6_lookup(dev_net(skb_dst(skb)->dev), hashinfo,
104 &ipv6_hdr(skb)->saddr, sport, 104 &ipv6_hdr(skb)->saddr, sport,
105 &ipv6_hdr(skb)->daddr, ntohs(dport), 105 &ipv6_hdr(skb)->daddr, ntohs(dport),
106 inet6_iif(skb)); 106 inet6_iif(skb));
diff --git a/include/net/inet_hashtables.h b/include/net/inet_hashtables.h
index a44e2248b2ef..d522dcf3031a 100644
--- a/include/net/inet_hashtables.h
+++ b/include/net/inet_hashtables.h
@@ -385,7 +385,7 @@ static inline struct sock *__inet_lookup_skb(struct inet_hashinfo *hashinfo,
385 if (unlikely(sk = skb_steal_sock(skb))) 385 if (unlikely(sk = skb_steal_sock(skb)))
386 return sk; 386 return sk;
387 else 387 else
388 return __inet_lookup(dev_net(skb->dst->dev), hashinfo, 388 return __inet_lookup(dev_net(skb_dst(skb)->dev), hashinfo,
389 iph->saddr, sport, 389 iph->saddr, sport,
390 iph->daddr, dport, inet_iif(skb)); 390 iph->daddr, dport, inet_iif(skb));
391} 391}
diff --git a/include/net/inet_sock.h b/include/net/inet_sock.h
index de0ecc71cf03..20a6957af870 100644
--- a/include/net/inet_sock.h
+++ b/include/net/inet_sock.h
@@ -130,7 +130,8 @@ struct inet_sock {
130 freebind:1, 130 freebind:1,
131 hdrincl:1, 131 hdrincl:1,
132 mc_loop:1, 132 mc_loop:1,
133 transparent:1; 133 transparent:1,
134 mc_all:1;
134 int mc_index; 135 int mc_index;
135 __be32 mc_addr; 136 __be32 mc_addr;
136 struct ip_mc_socklist *mc_list; 137 struct ip_mc_socklist *mc_list;
diff --git a/include/net/ip6_route.h b/include/net/ip6_route.h
index 5f53db7e4e57..0e1b8aebaff8 100644
--- a/include/net/ip6_route.h
+++ b/include/net/ip6_route.h
@@ -142,7 +142,7 @@ static inline void ip6_dst_store(struct sock *sk, struct dst_entry *dst,
142 142
143static inline int ipv6_unicast_destination(struct sk_buff *skb) 143static inline int ipv6_unicast_destination(struct sk_buff *skb)
144{ 144{
145 struct rt6_info *rt = (struct rt6_info *) skb->dst; 145 struct rt6_info *rt = (struct rt6_info *) skb_dst(skb);
146 146
147 return rt->rt6i_flags & RTF_LOCAL; 147 return rt->rt6i_flags & RTF_LOCAL;
148} 148}
diff --git a/include/net/mac80211.h b/include/net/mac80211.h
index d72346ff3247..c06104476973 100644
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -239,6 +239,8 @@ struct ieee80211_bss_conf {
239 * @IEEE80211_TX_INTFL_NEED_TXPROCESSING: completely internal to mac80211, 239 * @IEEE80211_TX_INTFL_NEED_TXPROCESSING: completely internal to mac80211,
240 * used to indicate that a pending frame requires TX processing before 240 * used to indicate that a pending frame requires TX processing before
241 * it can be sent out. 241 * it can be sent out.
242 * @IEEE80211_TX_INTFL_RETRIED: completely internal to mac80211,
243 * used to indicate that a frame was already retried due to PS
242 */ 244 */
243enum mac80211_tx_control_flags { 245enum mac80211_tx_control_flags {
244 IEEE80211_TX_CTL_REQ_TX_STATUS = BIT(0), 246 IEEE80211_TX_CTL_REQ_TX_STATUS = BIT(0),
@@ -256,6 +258,7 @@ enum mac80211_tx_control_flags {
256 IEEE80211_TX_CTL_RATE_CTRL_PROBE = BIT(12), 258 IEEE80211_TX_CTL_RATE_CTRL_PROBE = BIT(12),
257 IEEE80211_TX_INTFL_RCALGO = BIT(13), 259 IEEE80211_TX_INTFL_RCALGO = BIT(13),
258 IEEE80211_TX_INTFL_NEED_TXPROCESSING = BIT(14), 260 IEEE80211_TX_INTFL_NEED_TXPROCESSING = BIT(14),
261 IEEE80211_TX_INTFL_RETRIED = BIT(15),
259}; 262};
260 263
261/** 264/**
@@ -526,8 +529,7 @@ enum ieee80211_conf_flags {
526/** 529/**
527 * enum ieee80211_conf_changed - denotes which configuration changed 530 * enum ieee80211_conf_changed - denotes which configuration changed
528 * 531 *
529 * @IEEE80211_CONF_CHANGE_RADIO_ENABLED: the value of radio_enabled changed 532 * @_IEEE80211_CONF_CHANGE_RADIO_ENABLED: DEPRECATED
530 * @_IEEE80211_CONF_CHANGE_BEACON_INTERVAL: DEPRECATED
531 * @IEEE80211_CONF_CHANGE_LISTEN_INTERVAL: the listen interval changed 533 * @IEEE80211_CONF_CHANGE_LISTEN_INTERVAL: the listen interval changed
532 * @IEEE80211_CONF_CHANGE_RADIOTAP: the radiotap flag changed 534 * @IEEE80211_CONF_CHANGE_RADIOTAP: the radiotap flag changed
533 * @IEEE80211_CONF_CHANGE_PS: the PS flag or dynamic PS timeout changed 535 * @IEEE80211_CONF_CHANGE_PS: the PS flag or dynamic PS timeout changed
@@ -537,8 +539,7 @@ enum ieee80211_conf_flags {
537 * @IEEE80211_CONF_CHANGE_IDLE: Idle flag changed 539 * @IEEE80211_CONF_CHANGE_IDLE: Idle flag changed
538 */ 540 */
539enum ieee80211_conf_changed { 541enum ieee80211_conf_changed {
540 IEEE80211_CONF_CHANGE_RADIO_ENABLED = BIT(0), 542 _IEEE80211_CONF_CHANGE_RADIO_ENABLED = BIT(0),
541 _IEEE80211_CONF_CHANGE_BEACON_INTERVAL = BIT(1),
542 IEEE80211_CONF_CHANGE_LISTEN_INTERVAL = BIT(2), 543 IEEE80211_CONF_CHANGE_LISTEN_INTERVAL = BIT(2),
543 IEEE80211_CONF_CHANGE_RADIOTAP = BIT(3), 544 IEEE80211_CONF_CHANGE_RADIOTAP = BIT(3),
544 IEEE80211_CONF_CHANGE_PS = BIT(4), 545 IEEE80211_CONF_CHANGE_PS = BIT(4),
@@ -549,12 +550,12 @@ enum ieee80211_conf_changed {
549}; 550};
550 551
551static inline __deprecated enum ieee80211_conf_changed 552static inline __deprecated enum ieee80211_conf_changed
552__IEEE80211_CONF_CHANGE_BEACON_INTERVAL(void) 553__IEEE80211_CONF_CHANGE_RADIO_ENABLED(void)
553{ 554{
554 return _IEEE80211_CONF_CHANGE_BEACON_INTERVAL; 555 return _IEEE80211_CONF_CHANGE_RADIO_ENABLED;
555} 556}
556#define IEEE80211_CONF_CHANGE_BEACON_INTERVAL \ 557#define IEEE80211_CONF_CHANGE_RADIO_ENABLED \
557 __IEEE80211_CONF_CHANGE_BEACON_INTERVAL() 558 __IEEE80211_CONF_CHANGE_RADIO_ENABLED()
558 559
559/** 560/**
560 * struct ieee80211_conf - configuration of the device 561 * struct ieee80211_conf - configuration of the device
@@ -564,7 +565,7 @@ __IEEE80211_CONF_CHANGE_BEACON_INTERVAL(void)
564 * @flags: configuration flags defined above 565 * @flags: configuration flags defined above
565 * 566 *
566 * @radio_enabled: when zero, driver is required to switch off the radio. 567 * @radio_enabled: when zero, driver is required to switch off the radio.
567 * @beacon_int: beacon interval (TODO make interface config) 568 * @beacon_int: DEPRECATED, DO NOT USE
568 * 569 *
569 * @listen_interval: listen interval in units of beacon interval 570 * @listen_interval: listen interval in units of beacon interval
570 * @max_sleep_period: the maximum number of beacon intervals to sleep for 571 * @max_sleep_period: the maximum number of beacon intervals to sleep for
@@ -589,13 +590,13 @@ __IEEE80211_CONF_CHANGE_BEACON_INTERVAL(void)
589 * number of transmissions not the number of retries 590 * number of transmissions not the number of retries
590 */ 591 */
591struct ieee80211_conf { 592struct ieee80211_conf {
592 int beacon_int; 593 int __deprecated beacon_int;
593 u32 flags; 594 u32 flags;
594 int power_level, dynamic_ps_timeout; 595 int power_level, dynamic_ps_timeout;
595 int max_sleep_period; 596 int max_sleep_period;
596 597
597 u16 listen_interval; 598 u16 listen_interval;
598 bool radio_enabled; 599 bool __deprecated radio_enabled;
599 600
600 u8 long_frame_max_tx_count, short_frame_max_tx_count; 601 u8 long_frame_max_tx_count, short_frame_max_tx_count;
601 602
@@ -1406,6 +1407,10 @@ enum ieee80211_ampdu_mlme_action {
1406 * is the first frame we expect to perform the action on. Notice 1407 * is the first frame we expect to perform the action on. Notice
1407 * that TX/RX_STOP can pass NULL for this parameter. 1408 * that TX/RX_STOP can pass NULL for this parameter.
1408 * Returns a negative error code on failure. 1409 * Returns a negative error code on failure.
1410 *
1411 * @rfkill_poll: Poll rfkill hardware state. If you need this, you also
1412 * need to set wiphy->rfkill_poll to %true before registration,
1413 * and need to call wiphy_rfkill_set_hw_state() in the callback.
1409 */ 1414 */
1410struct ieee80211_ops { 1415struct ieee80211_ops {
1411 int (*tx)(struct ieee80211_hw *hw, struct sk_buff *skb); 1416 int (*tx)(struct ieee80211_hw *hw, struct sk_buff *skb);
@@ -1454,6 +1459,8 @@ struct ieee80211_ops {
1454 int (*ampdu_action)(struct ieee80211_hw *hw, 1459 int (*ampdu_action)(struct ieee80211_hw *hw,
1455 enum ieee80211_ampdu_mlme_action action, 1460 enum ieee80211_ampdu_mlme_action action,
1456 struct ieee80211_sta *sta, u16 tid, u16 *ssn); 1461 struct ieee80211_sta *sta, u16 tid, u16 *ssn);
1462
1463 void (*rfkill_poll)(struct ieee80211_hw *hw);
1457}; 1464};
1458 1465
1459/** 1466/**
diff --git a/include/net/pkt_sched.h b/include/net/pkt_sched.h
index e37fe3129c17..120935b2abd8 100644
--- a/include/net/pkt_sched.h
+++ b/include/net/pkt_sched.h
@@ -41,9 +41,10 @@ static inline void *qdisc_priv(struct Qdisc *q)
41typedef u64 psched_time_t; 41typedef u64 psched_time_t;
42typedef long psched_tdiff_t; 42typedef long psched_tdiff_t;
43 43
44/* Avoid doing 64 bit divide by 1000 */ 44/* Avoid doing 64 bit divide */
45#define PSCHED_US2NS(x) ((s64)(x) << 10) 45#define PSCHED_SHIFT 6
46#define PSCHED_NS2US(x) ((x) >> 10) 46#define PSCHED_US2NS(x) ((s64)(x) << PSCHED_SHIFT)
47#define PSCHED_NS2US(x) ((x) >> PSCHED_SHIFT)
47 48
48#define PSCHED_TICKS_PER_SEC PSCHED_NS2US(NSEC_PER_SEC) 49#define PSCHED_TICKS_PER_SEC PSCHED_NS2US(NSEC_PER_SEC)
49#define PSCHED_PASTPERFECT 0 50#define PSCHED_PASTPERFECT 0
diff --git a/include/net/route.h b/include/net/route.h
index 4e8cae0e5841..40f6346ef496 100644
--- a/include/net/route.h
+++ b/include/net/route.h
@@ -210,7 +210,7 @@ static inline struct inet_peer *rt_get_peer(struct rtable *rt)
210 210
211static inline int inet_iif(const struct sk_buff *skb) 211static inline int inet_iif(const struct sk_buff *skb)
212{ 212{
213 return skb->rtable->rt_iif; 213 return skb_rtable(skb)->rt_iif;
214} 214}
215 215
216#endif /* _ROUTE_H */ 216#endif /* _ROUTE_H */
diff --git a/include/net/sctp/structs.h b/include/net/sctp/structs.h
index 23f08fe1d50a..edfcacf3250e 100644
--- a/include/net/sctp/structs.h
+++ b/include/net/sctp/structs.h
@@ -1939,10 +1939,8 @@ void sctp_association_free(struct sctp_association *);
1939void sctp_association_put(struct sctp_association *); 1939void sctp_association_put(struct sctp_association *);
1940void sctp_association_hold(struct sctp_association *); 1940void sctp_association_hold(struct sctp_association *);
1941 1941
1942struct sctp_transport *sctp_assoc_choose_init_transport( 1942struct sctp_transport *sctp_assoc_choose_alter_transport(
1943 struct sctp_association *); 1943 struct sctp_association *, struct sctp_transport *);
1944struct sctp_transport *sctp_assoc_choose_shutdown_transport(
1945 struct sctp_association *);
1946void sctp_assoc_update_retran_path(struct sctp_association *); 1944void sctp_assoc_update_retran_path(struct sctp_association *);
1947struct sctp_transport *sctp_assoc_lookup_paddr(const struct sctp_association *, 1945struct sctp_transport *sctp_assoc_lookup_paddr(const struct sctp_association *,
1948 const union sctp_addr *); 1946 const union sctp_addr *);
diff --git a/include/net/sctp/user.h b/include/net/sctp/user.h
index b259fc5798fb..1580c04f68bc 100644
--- a/include/net/sctp/user.h
+++ b/include/net/sctp/user.h
@@ -147,6 +147,8 @@ enum sctp_optname {
147#define SCTP_GET_LOCAL_ADDRS SCTP_GET_LOCAL_ADDRS 147#define SCTP_GET_LOCAL_ADDRS SCTP_GET_LOCAL_ADDRS
148 SCTP_SOCKOPT_CONNECTX, /* CONNECTX requests. */ 148 SCTP_SOCKOPT_CONNECTX, /* CONNECTX requests. */
149#define SCTP_SOCKOPT_CONNECTX SCTP_SOCKOPT_CONNECTX 149#define SCTP_SOCKOPT_CONNECTX SCTP_SOCKOPT_CONNECTX
150 SCTP_SOCKOPT_CONNECTX3, /* CONNECTX requests. (new implementation) */
151#define SCTP_SOCKOPT_CONNECTX3 SCTP_SOCKOPT_CONNECTX3
150}; 152};
151 153
152/* 154/*
diff --git a/include/net/sock.h b/include/net/sock.h
index 4bb1ff9fd15b..010e14a93c92 100644
--- a/include/net/sock.h
+++ b/include/net/sock.h
@@ -1217,9 +1217,13 @@ static inline int skb_copy_to_page(struct sock *sk, char __user *from,
1217 1217
1218static inline void skb_set_owner_w(struct sk_buff *skb, struct sock *sk) 1218static inline void skb_set_owner_w(struct sk_buff *skb, struct sock *sk)
1219{ 1219{
1220 sock_hold(sk);
1221 skb->sk = sk; 1220 skb->sk = sk;
1222 skb->destructor = sock_wfree; 1221 skb->destructor = sock_wfree;
1222 /*
1223 * We used to take a refcount on sk, but following operation
1224 * is enough to guarantee sk_free() wont free this sock until
1225 * all in-flight packets are completed
1226 */
1223 atomic_add(skb->truesize, &sk->sk_wmem_alloc); 1227 atomic_add(skb->truesize, &sk->sk_wmem_alloc);
1224} 1228}
1225 1229
diff --git a/include/net/wimax.h b/include/net/wimax.h
index 6b3824edb39e..2af7bf839f23 100644
--- a/include/net/wimax.h
+++ b/include/net/wimax.h
@@ -253,7 +253,6 @@
253struct net_device; 253struct net_device;
254struct genl_info; 254struct genl_info;
255struct wimax_dev; 255struct wimax_dev;
256struct input_dev;
257 256
258/** 257/**
259 * struct wimax_dev - Generic WiMAX device 258 * struct wimax_dev - Generic WiMAX device
@@ -293,8 +292,8 @@ struct input_dev;
293 * See wimax_reset()'s documentation. 292 * See wimax_reset()'s documentation.
294 * 293 *
295 * @name: [fill] A way to identify this device. We need to register a 294 * @name: [fill] A way to identify this device. We need to register a
296 * name with many subsystems (input for RFKILL, workqueue 295 * name with many subsystems (rfkill, workqueue creation, etc).
297 * creation, etc). We can't use the network device name as that 296 * We can't use the network device name as that
298 * might change and in some instances we don't know it yet (until 297 * might change and in some instances we don't know it yet (until
299 * we don't call register_netdev()). So we generate an unique one 298 * we don't call register_netdev()). So we generate an unique one
300 * using the driver name and device bus id, place it here and use 299 * using the driver name and device bus id, place it here and use
@@ -316,9 +315,6 @@ struct input_dev;
316 * 315 *
317 * @rfkill: [private] integration into the RF-Kill infrastructure. 316 * @rfkill: [private] integration into the RF-Kill infrastructure.
318 * 317 *
319 * @rfkill_input: [private] virtual input device to process the
320 * hardware RF Kill switches.
321 *
322 * @rf_sw: [private] State of the software radio switch (OFF/ON) 318 * @rf_sw: [private] State of the software radio switch (OFF/ON)
323 * 319 *
324 * @rf_hw: [private] State of the hardware radio switch (OFF/ON) 320 * @rf_hw: [private] State of the hardware radio switch (OFF/ON)
diff --git a/include/net/xfrm.h b/include/net/xfrm.h
index 2e9f5c0018ae..736bca450886 100644
--- a/include/net/xfrm.h
+++ b/include/net/xfrm.h
@@ -994,7 +994,7 @@ static inline int __xfrm_policy_check2(struct sock *sk, int dir,
994 return __xfrm_policy_check(sk, ndir, skb, family); 994 return __xfrm_policy_check(sk, ndir, skb, family);
995 995
996 return (!net->xfrm.policy_count[dir] && !skb->sp) || 996 return (!net->xfrm.policy_count[dir] && !skb->sp) ||
997 (skb->dst->flags & DST_NOPOLICY) || 997 (skb_dst(skb)->flags & DST_NOPOLICY) ||
998 __xfrm_policy_check(sk, ndir, skb, family); 998 __xfrm_policy_check(sk, ndir, skb, family);
999} 999}
1000 1000
@@ -1048,7 +1048,7 @@ static inline int xfrm_route_forward(struct sk_buff *skb, unsigned short family)
1048 struct net *net = dev_net(skb->dev); 1048 struct net *net = dev_net(skb->dev);
1049 1049
1050 return !net->xfrm.policy_count[XFRM_POLICY_OUT] || 1050 return !net->xfrm.policy_count[XFRM_POLICY_OUT] ||
1051 (skb->dst->flags & DST_NOXFRM) || 1051 (skb_dst(skb)->flags & DST_NOXFRM) ||
1052 __xfrm_route_forward(skb, family); 1052 __xfrm_route_forward(skb, family);
1053} 1053}
1054 1054