aboutsummaryrefslogtreecommitdiffstats
path: root/include
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
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')
-rw-r--r--include/asm-generic/errno.h2
-rw-r--r--include/linux/Kbuild1
-rw-r--r--include/linux/can/platform/sja1000.h3
-rw-r--r--include/linux/ethtool.h8
-rw-r--r--include/linux/ieee80211.h1
-rw-r--r--include/linux/if_arp.h2
-rw-r--r--include/linux/if_ether.h1
-rw-r--r--include/linux/in.h1
-rw-r--r--include/linux/ipv6.h6
-rw-r--r--include/linux/isdn/capilli.h2
-rw-r--r--include/linux/mdio.h9
-rw-r--r--include/linux/netdevice.h48
-rw-r--r--include/linux/netfilter/nf_conntrack_tcp.h4
-rw-r--r--include/linux/nl802154.h119
-rw-r--r--include/linux/notifier.h1
-rw-r--r--include/linux/pci_ids.h38
-rw-r--r--include/linux/rfkill.h371
-rw-r--r--include/linux/sctp.h20
-rw-r--r--include/linux/skbuff.h53
-rw-r--r--include/linux/socket.h4
-rw-r--r--include/linux/spi/libertas_spi.h3
-rw-r--r--include/linux/wimax.h7
-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
43 files changed, 1072 insertions, 232 deletions
diff --git a/include/asm-generic/errno.h b/include/asm-generic/errno.h
index e8852c092fea..28cc03bf19e6 100644
--- a/include/asm-generic/errno.h
+++ b/include/asm-generic/errno.h
@@ -106,4 +106,6 @@
106#define EOWNERDEAD 130 /* Owner died */ 106#define EOWNERDEAD 130 /* Owner died */
107#define ENOTRECOVERABLE 131 /* State not recoverable */ 107#define ENOTRECOVERABLE 131 /* State not recoverable */
108 108
109#define ERFKILL 132 /* Operation not possible due to RF-kill */
110
109#endif 111#endif
diff --git a/include/linux/Kbuild b/include/linux/Kbuild
index 3f0eaa397ef5..7e09c5c1ed02 100644
--- a/include/linux/Kbuild
+++ b/include/linux/Kbuild
@@ -311,6 +311,7 @@ unifdef-y += ptrace.h
311unifdef-y += qnx4_fs.h 311unifdef-y += qnx4_fs.h
312unifdef-y += quota.h 312unifdef-y += quota.h
313unifdef-y += random.h 313unifdef-y += random.h
314unifdef-y += rfkill.h
314unifdef-y += irqnr.h 315unifdef-y += irqnr.h
315unifdef-y += reboot.h 316unifdef-y += reboot.h
316unifdef-y += reiserfs_fs.h 317unifdef-y += reiserfs_fs.h
diff --git a/include/linux/can/platform/sja1000.h b/include/linux/can/platform/sja1000.h
index 37966e630ff5..01ee2aeb048d 100644
--- a/include/linux/can/platform/sja1000.h
+++ b/include/linux/can/platform/sja1000.h
@@ -13,6 +13,7 @@
13#define OCR_MODE_TEST 0x01 13#define OCR_MODE_TEST 0x01
14#define OCR_MODE_NORMAL 0x02 14#define OCR_MODE_NORMAL 0x02
15#define OCR_MODE_CLOCK 0x03 15#define OCR_MODE_CLOCK 0x03
16#define OCR_MODE_MASK 0x07
16#define OCR_TX0_INVERT 0x04 17#define OCR_TX0_INVERT 0x04
17#define OCR_TX0_PULLDOWN 0x08 18#define OCR_TX0_PULLDOWN 0x08
18#define OCR_TX0_PULLUP 0x10 19#define OCR_TX0_PULLUP 0x10
@@ -21,6 +22,8 @@
21#define OCR_TX1_PULLDOWN 0x40 22#define OCR_TX1_PULLDOWN 0x40
22#define OCR_TX1_PULLUP 0x80 23#define OCR_TX1_PULLUP 0x80
23#define OCR_TX1_PUSHPULL 0xc0 24#define OCR_TX1_PUSHPULL 0xc0
25#define OCR_TX_MASK 0xfc
26#define OCR_TX_SHIFT 2
24 27
25struct sja1000_platform_data { 28struct sja1000_platform_data {
26 u32 clock; /* CAN bus oscillator frequency in Hz */ 29 u32 clock; /* CAN bus oscillator frequency in Hz */
diff --git a/include/linux/ethtool.h b/include/linux/ethtool.h
index 380b04272bf1..9b660bd2e2b3 100644
--- a/include/linux/ethtool.h
+++ b/include/linux/ethtool.h
@@ -30,7 +30,8 @@ struct ethtool_cmd {
30 __u32 maxtxpkt; /* Tx pkts before generating tx int */ 30 __u32 maxtxpkt; /* Tx pkts before generating tx int */
31 __u32 maxrxpkt; /* Rx pkts before generating rx int */ 31 __u32 maxrxpkt; /* Rx pkts before generating rx int */
32 __u16 speed_hi; 32 __u16 speed_hi;
33 __u16 reserved2; 33 __u8 eth_tp_mdix;
34 __u8 reserved2;
34 __u32 lp_advertising; /* Features the link partner advertises */ 35 __u32 lp_advertising; /* Features the link partner advertises */
35 __u32 reserved[2]; 36 __u32 reserved[2];
36}; 37};
@@ -632,6 +633,11 @@ struct ethtool_ops {
632#define AUTONEG_DISABLE 0x00 633#define AUTONEG_DISABLE 0x00
633#define AUTONEG_ENABLE 0x01 634#define AUTONEG_ENABLE 0x01
634 635
636/* Mode MDI or MDI-X */
637#define ETH_TP_MDI_INVALID 0x00
638#define ETH_TP_MDI 0x01
639#define ETH_TP_MDI_X 0x02
640
635/* Wake-On-Lan options. */ 641/* Wake-On-Lan options. */
636#define WAKE_PHY (1 << 0) 642#define WAKE_PHY (1 << 0)
637#define WAKE_UCAST (1 << 1) 643#define WAKE_UCAST (1 << 1)
diff --git a/include/linux/ieee80211.h b/include/linux/ieee80211.h
index 34de8b21f6d4..a9173d5434d1 100644
--- a/include/linux/ieee80211.h
+++ b/include/linux/ieee80211.h
@@ -1092,6 +1092,7 @@ enum ieee80211_key_len {
1092 WLAN_KEY_LEN_WEP104 = 13, 1092 WLAN_KEY_LEN_WEP104 = 13,
1093 WLAN_KEY_LEN_CCMP = 16, 1093 WLAN_KEY_LEN_CCMP = 16,
1094 WLAN_KEY_LEN_TKIP = 32, 1094 WLAN_KEY_LEN_TKIP = 32,
1095 WLAN_KEY_LEN_AES_CMAC = 16,
1095}; 1096};
1096 1097
1097/* 1098/*
diff --git a/include/linux/if_arp.h b/include/linux/if_arp.h
index 5ff89809a581..b554300ef8bf 100644
--- a/include/linux/if_arp.h
+++ b/include/linux/if_arp.h
@@ -86,6 +86,8 @@
86#define ARPHRD_IEEE80211 801 /* IEEE 802.11 */ 86#define ARPHRD_IEEE80211 801 /* IEEE 802.11 */
87#define ARPHRD_IEEE80211_PRISM 802 /* IEEE 802.11 + Prism2 header */ 87#define ARPHRD_IEEE80211_PRISM 802 /* IEEE 802.11 + Prism2 header */
88#define ARPHRD_IEEE80211_RADIOTAP 803 /* IEEE 802.11 + radiotap header */ 88#define ARPHRD_IEEE80211_RADIOTAP 803 /* IEEE 802.11 + radiotap header */
89#define ARPHRD_IEEE802154 804
90#define ARPHRD_IEEE802154_PHY 805
89 91
90#define ARPHRD_PHONET 820 /* PhoNet media type */ 92#define ARPHRD_PHONET 820 /* PhoNet media type */
91#define ARPHRD_PHONET_PIPE 821 /* PhoNet pipe header */ 93#define ARPHRD_PHONET_PIPE 821 /* PhoNet pipe header */
diff --git a/include/linux/if_ether.h b/include/linux/if_ether.h
index cfe4fe1b7132..11a60e4f0a66 100644
--- a/include/linux/if_ether.h
+++ b/include/linux/if_ether.h
@@ -106,6 +106,7 @@
106#define ETH_P_DSA 0x001B /* Distributed Switch Arch. */ 106#define ETH_P_DSA 0x001B /* Distributed Switch Arch. */
107#define ETH_P_TRAILER 0x001C /* Trailer switch tagging */ 107#define ETH_P_TRAILER 0x001C /* Trailer switch tagging */
108#define ETH_P_PHONET 0x00F5 /* Nokia Phonet frames */ 108#define ETH_P_PHONET 0x00F5 /* Nokia Phonet frames */
109#define ETH_P_IEEE802154 0x00F6 /* IEEE802.15.4 frame */
109 110
110/* 111/*
111 * This is an Ethernet frame header. 112 * This is an Ethernet frame header.
diff --git a/include/linux/in.h b/include/linux/in.h
index d60122a3a088..cf196da04ec9 100644
--- a/include/linux/in.h
+++ b/include/linux/in.h
@@ -107,6 +107,7 @@ struct in_addr {
107#define MCAST_JOIN_SOURCE_GROUP 46 107#define MCAST_JOIN_SOURCE_GROUP 46
108#define MCAST_LEAVE_SOURCE_GROUP 47 108#define MCAST_LEAVE_SOURCE_GROUP 47
109#define MCAST_MSFILTER 48 109#define MCAST_MSFILTER 48
110#define IP_MULTICAST_ALL 49
110 111
111#define MCAST_EXCLUDE 0 112#define MCAST_EXCLUDE 0
112#define MCAST_INCLUDE 1 113#define MCAST_INCLUDE 1
diff --git a/include/linux/ipv6.h b/include/linux/ipv6.h
index 476d9464ac82..c662efa68289 100644
--- a/include/linux/ipv6.h
+++ b/include/linux/ipv6.h
@@ -169,6 +169,12 @@ struct ipv6_devconf {
169 __s32 accept_dad; 169 __s32 accept_dad;
170 void *sysctl; 170 void *sysctl;
171}; 171};
172
173struct ipv6_params {
174 __s32 disable_ipv6;
175 __s32 autoconf;
176};
177extern struct ipv6_params ipv6_defaults;
172#endif 178#endif
173 179
174/* index values for the variables in ipv6_devconf */ 180/* index values for the variables in ipv6_devconf */
diff --git a/include/linux/isdn/capilli.h b/include/linux/isdn/capilli.h
index 35e9b0fd014b..7acb87a44872 100644
--- a/include/linux/isdn/capilli.h
+++ b/include/linux/isdn/capilli.h
@@ -79,7 +79,7 @@ int attach_capi_ctr(struct capi_ctr *);
79int detach_capi_ctr(struct capi_ctr *); 79int detach_capi_ctr(struct capi_ctr *);
80 80
81void capi_ctr_ready(struct capi_ctr * card); 81void capi_ctr_ready(struct capi_ctr * card);
82void capi_ctr_reseted(struct capi_ctr * card); 82void capi_ctr_down(struct capi_ctr * card);
83void capi_ctr_suspend_output(struct capi_ctr * card); 83void capi_ctr_suspend_output(struct capi_ctr * card);
84void capi_ctr_resume_output(struct capi_ctr * card); 84void capi_ctr_resume_output(struct capi_ctr * card);
85void capi_ctr_handle_message(struct capi_ctr * card, u16 appl, struct sk_buff *skb); 85void capi_ctr_handle_message(struct capi_ctr * card, u16 appl, struct sk_buff *skb);
diff --git a/include/linux/mdio.h b/include/linux/mdio.h
index 56851646529a..cfdf1df2875e 100644
--- a/include/linux/mdio.h
+++ b/include/linux/mdio.h
@@ -45,6 +45,7 @@
45#define MDIO_PHYXS_LNSTAT 24 /* PHY XGXS lane state */ 45#define MDIO_PHYXS_LNSTAT 24 /* PHY XGXS lane state */
46 46
47/* Media-dependent registers. */ 47/* Media-dependent registers. */
48#define MDIO_PMA_10GBT_SWAPPOL 130 /* 10GBASE-T pair swap & polarity */
48#define MDIO_PMA_10GBT_TXPWR 131 /* 10GBASE-T TX power control */ 49#define MDIO_PMA_10GBT_TXPWR 131 /* 10GBASE-T TX power control */
49#define MDIO_PMA_10GBT_SNR 133 /* 10GBASE-T SNR margin, lane A. 50#define MDIO_PMA_10GBT_SNR 133 /* 10GBASE-T SNR margin, lane A.
50 * Lanes B-D are numbered 134-136. */ 51 * Lanes B-D are numbered 134-136. */
@@ -195,6 +196,14 @@
195#define MDIO_PHYXS_LNSTAT_SYNC3 0x0008 196#define MDIO_PHYXS_LNSTAT_SYNC3 0x0008
196#define MDIO_PHYXS_LNSTAT_ALIGN 0x1000 197#define MDIO_PHYXS_LNSTAT_ALIGN 0x1000
197 198
199/* PMA 10GBASE-T pair swap & polarity */
200#define MDIO_PMA_10GBT_SWAPPOL_ABNX 0x0001 /* Pair A/B uncrossed */
201#define MDIO_PMA_10GBT_SWAPPOL_CDNX 0x0002 /* Pair C/D uncrossed */
202#define MDIO_PMA_10GBT_SWAPPOL_AREV 0x0100 /* Pair A polarity reversed */
203#define MDIO_PMA_10GBT_SWAPPOL_BREV 0x0200 /* Pair B polarity reversed */
204#define MDIO_PMA_10GBT_SWAPPOL_CREV 0x0400 /* Pair C polarity reversed */
205#define MDIO_PMA_10GBT_SWAPPOL_DREV 0x0800 /* Pair D polarity reversed */
206
198/* PMA 10GBASE-T TX power register. */ 207/* PMA 10GBASE-T TX power register. */
199#define MDIO_PMA_10GBT_TXPWR_SHORT 0x0001 /* Short-reach mode */ 208#define MDIO_PMA_10GBT_TXPWR_SHORT 0x0001 /* Short-reach mode */
200 209
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index 371ece521e58..9ea8d6dfe540 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -215,9 +215,12 @@ struct netdev_hw_addr {
215 struct list_head list; 215 struct list_head list;
216 unsigned char addr[MAX_ADDR_LEN]; 216 unsigned char addr[MAX_ADDR_LEN];
217 unsigned char type; 217 unsigned char type;
218#define NETDEV_HW_ADDR_T_LAN 1 218#define NETDEV_HW_ADDR_T_LAN 1
219#define NETDEV_HW_ADDR_T_SAN 2 219#define NETDEV_HW_ADDR_T_SAN 2
220#define NETDEV_HW_ADDR_T_SLAVE 3 220#define NETDEV_HW_ADDR_T_SLAVE 3
221#define NETDEV_HW_ADDR_T_UNICAST 4
222 int refcount;
223 bool synced;
221 struct rcu_head rcu_head; 224 struct rcu_head rcu_head;
222}; 225};
223 226
@@ -773,10 +776,11 @@ struct net_device
773 unsigned char addr_len; /* hardware address length */ 776 unsigned char addr_len; /* hardware address length */
774 unsigned short dev_id; /* for shared network cards */ 777 unsigned short dev_id; /* for shared network cards */
775 778
776 spinlock_t addr_list_lock; 779 struct list_head uc_list; /* Secondary unicast mac
777 struct dev_addr_list *uc_list; /* Secondary unicast mac addresses */ 780 addresses */
778 int uc_count; /* Number of installed ucasts */ 781 int uc_count; /* Number of installed ucasts */
779 int uc_promisc; 782 int uc_promisc;
783 spinlock_t addr_list_lock;
780 struct dev_addr_list *mc_list; /* Multicast mac addresses */ 784 struct dev_addr_list *mc_list; /* Multicast mac addresses */
781 int mc_count; /* Number of installed mcasts */ 785 int mc_count; /* Number of installed mcasts */
782 unsigned int promiscuity; 786 unsigned int promiscuity;
@@ -905,7 +909,6 @@ struct net_device
905#define to_net_dev(d) container_of(d, struct net_device, dev) 909#define to_net_dev(d) container_of(d, struct net_device, dev)
906 910
907#define NETDEV_ALIGN 32 911#define NETDEV_ALIGN 32
908#define NETDEV_ALIGN_CONST (NETDEV_ALIGN - 1)
909 912
910static inline 913static inline
911struct netdev_queue *netdev_get_tx_queue(const struct net_device *dev, 914struct netdev_queue *netdev_get_tx_queue(const struct net_device *dev,
@@ -976,9 +979,7 @@ static inline bool netdev_uses_trailer_tags(struct net_device *dev)
976 */ 979 */
977static inline void *netdev_priv(const struct net_device *dev) 980static inline void *netdev_priv(const struct net_device *dev)
978{ 981{
979 return (char *)dev + ((sizeof(struct net_device) 982 return (char *)dev + ALIGN(sizeof(struct net_device), NETDEV_ALIGN);
980 + NETDEV_ALIGN_CONST)
981 & ~NETDEV_ALIGN_CONST);
982} 983}
983 984
984/* Set the sysfs physical device reference for the network logical device 985/* Set the sysfs physical device reference for the network logical device
@@ -1839,8 +1840,8 @@ extern int dev_addr_del_multiple(struct net_device *to_dev,
1839/* Functions used for secondary unicast and multicast support */ 1840/* Functions used for secondary unicast and multicast support */
1840extern void dev_set_rx_mode(struct net_device *dev); 1841extern void dev_set_rx_mode(struct net_device *dev);
1841extern void __dev_set_rx_mode(struct net_device *dev); 1842extern void __dev_set_rx_mode(struct net_device *dev);
1842extern int dev_unicast_delete(struct net_device *dev, void *addr, int alen); 1843extern int dev_unicast_delete(struct net_device *dev, void *addr);
1843extern int dev_unicast_add(struct net_device *dev, void *addr, int alen); 1844extern int dev_unicast_add(struct net_device *dev, void *addr);
1844extern int dev_unicast_sync(struct net_device *to, struct net_device *from); 1845extern int dev_unicast_sync(struct net_device *to, struct net_device *from);
1845extern void dev_unicast_unsync(struct net_device *to, struct net_device *from); 1846extern void dev_unicast_unsync(struct net_device *to, struct net_device *from);
1846extern int dev_mc_delete(struct net_device *dev, void *addr, int alen, int all); 1847extern int dev_mc_delete(struct net_device *dev, void *addr, int alen, int all);
@@ -1902,15 +1903,14 @@ static inline int net_gso_ok(int features, int gso_type)
1902 1903
1903static inline int skb_gso_ok(struct sk_buff *skb, int features) 1904static inline int skb_gso_ok(struct sk_buff *skb, int features)
1904{ 1905{
1905 return net_gso_ok(features, skb_shinfo(skb)->gso_type); 1906 return net_gso_ok(features, skb_shinfo(skb)->gso_type) &&
1907 (!skb_has_frags(skb) || (features & NETIF_F_FRAGLIST));
1906} 1908}
1907 1909
1908static inline int netif_needs_gso(struct net_device *dev, struct sk_buff *skb) 1910static inline int netif_needs_gso(struct net_device *dev, struct sk_buff *skb)
1909{ 1911{
1910 return skb_is_gso(skb) && 1912 return skb_is_gso(skb) &&
1911 (!skb_gso_ok(skb, dev->features) || 1913 (!skb_gso_ok(skb, dev->features) ||
1912 (skb_shinfo(skb)->frag_list &&
1913 !(dev->features & NETIF_F_FRAGLIST)) ||
1914 unlikely(skb->ip_summed != CHECKSUM_PARTIAL)); 1914 unlikely(skb->ip_summed != CHECKSUM_PARTIAL));
1915} 1915}
1916 1916
@@ -1920,6 +1920,16 @@ static inline void netif_set_gso_max_size(struct net_device *dev,
1920 dev->gso_max_size = size; 1920 dev->gso_max_size = size;
1921} 1921}
1922 1922
1923static inline void skb_bond_set_mac_by_master(struct sk_buff *skb,
1924 struct net_device *master)
1925{
1926 if (skb->pkt_type == PACKET_HOST) {
1927 u16 *dest = (u16 *) eth_hdr(skb)->h_dest;
1928
1929 memcpy(dest, master->dev_addr, ETH_ALEN);
1930 }
1931}
1932
1923/* On bonding slaves other than the currently active slave, suppress 1933/* On bonding slaves other than the currently active slave, suppress
1924 * duplicates except for 802.3ad ETH_P_SLOW, alb non-mcast/bcast, and 1934 * duplicates except for 802.3ad ETH_P_SLOW, alb non-mcast/bcast, and
1925 * ARP on active-backup slaves with arp_validate enabled. 1935 * ARP on active-backup slaves with arp_validate enabled.
@@ -1933,6 +1943,14 @@ static inline int skb_bond_should_drop(struct sk_buff *skb)
1933 if (master->priv_flags & IFF_MASTER_ARPMON) 1943 if (master->priv_flags & IFF_MASTER_ARPMON)
1934 dev->last_rx = jiffies; 1944 dev->last_rx = jiffies;
1935 1945
1946 if ((master->priv_flags & IFF_MASTER_ALB) && master->br_port) {
1947 /* Do address unmangle. The local destination address
1948 * will be always the one master has. Provides the right
1949 * functionality in a bridge.
1950 */
1951 skb_bond_set_mac_by_master(skb, master);
1952 }
1953
1936 if (dev->priv_flags & IFF_SLAVE_INACTIVE) { 1954 if (dev->priv_flags & IFF_SLAVE_INACTIVE) {
1937 if ((dev->priv_flags & IFF_SLAVE_NEEDARP) && 1955 if ((dev->priv_flags & IFF_SLAVE_NEEDARP) &&
1938 skb->protocol == __cpu_to_be16(ETH_P_ARP)) 1956 skb->protocol == __cpu_to_be16(ETH_P_ARP))
@@ -1978,4 +1996,4 @@ static inline u32 dev_ethtool_get_flags(struct net_device *dev)
1978} 1996}
1979#endif /* __KERNEL__ */ 1997#endif /* __KERNEL__ */
1980 1998
1981#endif /* _LINUX_DEV_H */ 1999#endif /* _LINUX_NETDEVICE_H */
diff --git a/include/linux/netfilter/nf_conntrack_tcp.h b/include/linux/netfilter/nf_conntrack_tcp.h
index 74c27ca770e5..4352feed2377 100644
--- a/include/linux/netfilter/nf_conntrack_tcp.h
+++ b/include/linux/netfilter/nf_conntrack_tcp.h
@@ -36,6 +36,9 @@ enum tcp_conntrack {
36/* Has unacknowledged data */ 36/* Has unacknowledged data */
37#define IP_CT_TCP_FLAG_DATA_UNACKNOWLEDGED 0x10 37#define IP_CT_TCP_FLAG_DATA_UNACKNOWLEDGED 0x10
38 38
39/* The field td_maxack has been set */
40#define IP_CT_TCP_FLAG_MAXACK_SET 0x20
41
39struct nf_ct_tcp_flags { 42struct nf_ct_tcp_flags {
40 __u8 flags; 43 __u8 flags;
41 __u8 mask; 44 __u8 mask;
@@ -47,6 +50,7 @@ struct ip_ct_tcp_state {
47 u_int32_t td_end; /* max of seq + len */ 50 u_int32_t td_end; /* max of seq + len */
48 u_int32_t td_maxend; /* max of ack + max(win, 1) */ 51 u_int32_t td_maxend; /* max of ack + max(win, 1) */
49 u_int32_t td_maxwin; /* max(win) */ 52 u_int32_t td_maxwin; /* max(win) */
53 u_int32_t td_maxack; /* max of ack */
50 u_int8_t td_scale; /* window scale factor */ 54 u_int8_t td_scale; /* window scale factor */
51 u_int8_t flags; /* per direction options */ 55 u_int8_t flags; /* per direction options */
52}; 56};
diff --git a/include/linux/nl802154.h b/include/linux/nl802154.h
new file mode 100644
index 000000000000..2cda00ccfcca
--- /dev/null
+++ b/include/linux/nl802154.h
@@ -0,0 +1,119 @@
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 NL802154_H
22#define NL802154_H
23
24#define IEEE802154_NL_NAME "802.15.4 MAC"
25#define IEEE802154_MCAST_COORD_NAME "coordinator"
26#define IEEE802154_MCAST_BEACON_NAME "beacon"
27
28enum {
29 __IEEE802154_ATTR_INVALID,
30
31 IEEE802154_ATTR_DEV_NAME,
32 IEEE802154_ATTR_DEV_INDEX,
33
34 IEEE802154_ATTR_STATUS,
35
36 IEEE802154_ATTR_SHORT_ADDR,
37 IEEE802154_ATTR_HW_ADDR,
38 IEEE802154_ATTR_PAN_ID,
39
40 IEEE802154_ATTR_CHANNEL,
41
42 IEEE802154_ATTR_COORD_SHORT_ADDR,
43 IEEE802154_ATTR_COORD_HW_ADDR,
44 IEEE802154_ATTR_COORD_PAN_ID,
45
46 IEEE802154_ATTR_SRC_SHORT_ADDR,
47 IEEE802154_ATTR_SRC_HW_ADDR,
48 IEEE802154_ATTR_SRC_PAN_ID,
49
50 IEEE802154_ATTR_DEST_SHORT_ADDR,
51 IEEE802154_ATTR_DEST_HW_ADDR,
52 IEEE802154_ATTR_DEST_PAN_ID,
53
54 IEEE802154_ATTR_CAPABILITY,
55 IEEE802154_ATTR_REASON,
56 IEEE802154_ATTR_SCAN_TYPE,
57 IEEE802154_ATTR_CHANNELS,
58 IEEE802154_ATTR_DURATION,
59 IEEE802154_ATTR_ED_LIST,
60 IEEE802154_ATTR_BCN_ORD,
61 IEEE802154_ATTR_SF_ORD,
62 IEEE802154_ATTR_PAN_COORD,
63 IEEE802154_ATTR_BAT_EXT,
64 IEEE802154_ATTR_COORD_REALIGN,
65 IEEE802154_ATTR_SEC,
66
67 __IEEE802154_ATTR_MAX,
68};
69
70#define IEEE802154_ATTR_MAX (__IEEE802154_ATTR_MAX - 1)
71
72extern struct nla_policy ieee802154_policy[];
73
74/* commands */
75/* REQ should be responded with CONF
76 * and INDIC with RESP
77 */
78enum {
79 __IEEE802154_COMMAND_INVALID,
80
81 IEEE802154_ASSOCIATE_REQ,
82 IEEE802154_ASSOCIATE_CONF,
83 IEEE802154_DISASSOCIATE_REQ,
84 IEEE802154_DISASSOCIATE_CONF,
85 IEEE802154_GET_REQ,
86 IEEE802154_GET_CONF,
87 IEEE802154_RESET_REQ,
88 IEEE802154_RESET_CONF,
89 IEEE802154_SCAN_REQ,
90 IEEE802154_SCAN_CONF,
91 IEEE802154_SET_REQ,
92 IEEE802154_SET_CONF,
93 IEEE802154_START_REQ,
94 IEEE802154_START_CONF,
95 IEEE802154_SYNC_REQ,
96 IEEE802154_POLL_REQ,
97 IEEE802154_POLL_CONF,
98
99 IEEE802154_ASSOCIATE_INDIC,
100 IEEE802154_ASSOCIATE_RESP,
101 IEEE802154_DISASSOCIATE_INDIC,
102 IEEE802154_BEACON_NOTIFY_INDIC,
103 IEEE802154_ORPHAN_INDIC,
104 IEEE802154_ORPHAN_RESP,
105 IEEE802154_COMM_STATUS_INDIC,
106 IEEE802154_SYNC_LOSS_INDIC,
107
108 IEEE802154_GTS_REQ, /* Not supported yet */
109 IEEE802154_GTS_INDIC, /* Not supported yet */
110 IEEE802154_GTS_CONF, /* Not supported yet */
111 IEEE802154_RX_ENABLE_REQ, /* Not supported yet */
112 IEEE802154_RX_ENABLE_CONF, /* Not supported yet */
113
114 __IEEE802154_CMD_MAX,
115};
116
117#define IEEE802154_CMD_MAX (__IEEE802154_CMD_MAX - 1)
118
119#endif
diff --git a/include/linux/notifier.h b/include/linux/notifier.h
index b86fa2ffca0c..81bc252dc8ac 100644
--- a/include/linux/notifier.h
+++ b/include/linux/notifier.h
@@ -198,6 +198,7 @@ static inline int notifier_to_errno(int ret)
198#define NETDEV_CHANGENAME 0x000A 198#define NETDEV_CHANGENAME 0x000A
199#define NETDEV_FEAT_CHANGE 0x000B 199#define NETDEV_FEAT_CHANGE 0x000B
200#define NETDEV_BONDING_FAILOVER 0x000C 200#define NETDEV_BONDING_FAILOVER 0x000C
201#define NETDEV_PRE_UP 0x000D
201 202
202#define SYS_DOWN 0x0001 /* Notify of system down */ 203#define SYS_DOWN 0x0001 /* Notify of system down */
203#define SYS_RESTART SYS_DOWN 204#define SYS_RESTART SYS_DOWN
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h
index 12db06cf0e23..b87c51aea14c 100644
--- a/include/linux/pci_ids.h
+++ b/include/linux/pci_ids.h
@@ -1066,8 +1066,6 @@
1066#define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP04_SMBUS 0x0034 1066#define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP04_SMBUS 0x0034
1067#define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP04_IDE 0x0035 1067#define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP04_IDE 0x0035
1068#define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP04_SATA 0x0036 1068#define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP04_SATA 0x0036
1069#define PCI_DEVICE_ID_NVIDIA_NVENET_10 0x0037
1070#define PCI_DEVICE_ID_NVIDIA_NVENET_11 0x0038
1071#define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP04_SATA2 0x003e 1069#define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP04_SATA2 0x003e
1072#define PCI_DEVICE_ID_NVIDIA_GEFORCE_6800_ULTRA 0x0040 1070#define PCI_DEVICE_ID_NVIDIA_GEFORCE_6800_ULTRA 0x0040
1073#define PCI_DEVICE_ID_NVIDIA_GEFORCE_6800 0x0041 1071#define PCI_DEVICE_ID_NVIDIA_GEFORCE_6800 0x0041
@@ -1078,21 +1076,16 @@
1078#define PCI_DEVICE_ID_NVIDIA_NFORCE_CK804_IDE 0x0053 1076#define PCI_DEVICE_ID_NVIDIA_NFORCE_CK804_IDE 0x0053
1079#define PCI_DEVICE_ID_NVIDIA_NFORCE_CK804_SATA 0x0054 1077#define PCI_DEVICE_ID_NVIDIA_NFORCE_CK804_SATA 0x0054
1080#define PCI_DEVICE_ID_NVIDIA_NFORCE_CK804_SATA2 0x0055 1078#define PCI_DEVICE_ID_NVIDIA_NFORCE_CK804_SATA2 0x0055
1081#define PCI_DEVICE_ID_NVIDIA_NVENET_8 0x0056
1082#define PCI_DEVICE_ID_NVIDIA_NVENET_9 0x0057
1083#define PCI_DEVICE_ID_NVIDIA_CK804_AUDIO 0x0059 1079#define PCI_DEVICE_ID_NVIDIA_CK804_AUDIO 0x0059
1084#define PCI_DEVICE_ID_NVIDIA_CK804_PCIE 0x005d 1080#define PCI_DEVICE_ID_NVIDIA_CK804_PCIE 0x005d
1085#define PCI_DEVICE_ID_NVIDIA_NFORCE2_SMBUS 0x0064 1081#define PCI_DEVICE_ID_NVIDIA_NFORCE2_SMBUS 0x0064
1086#define PCI_DEVICE_ID_NVIDIA_NFORCE2_IDE 0x0065 1082#define PCI_DEVICE_ID_NVIDIA_NFORCE2_IDE 0x0065
1087#define PCI_DEVICE_ID_NVIDIA_NVENET_2 0x0066
1088#define PCI_DEVICE_ID_NVIDIA_MCP2_MODEM 0x0069 1083#define PCI_DEVICE_ID_NVIDIA_MCP2_MODEM 0x0069
1089#define PCI_DEVICE_ID_NVIDIA_MCP2_AUDIO 0x006a 1084#define PCI_DEVICE_ID_NVIDIA_MCP2_AUDIO 0x006a
1090#define PCI_DEVICE_ID_NVIDIA_NFORCE2S_SMBUS 0x0084 1085#define PCI_DEVICE_ID_NVIDIA_NFORCE2S_SMBUS 0x0084
1091#define PCI_DEVICE_ID_NVIDIA_NFORCE2S_IDE 0x0085 1086#define PCI_DEVICE_ID_NVIDIA_NFORCE2S_IDE 0x0085
1092#define PCI_DEVICE_ID_NVIDIA_NVENET_4 0x0086
1093#define PCI_DEVICE_ID_NVIDIA_MCP2S_MODEM 0x0089 1087#define PCI_DEVICE_ID_NVIDIA_MCP2S_MODEM 0x0089
1094#define PCI_DEVICE_ID_NVIDIA_CK8_AUDIO 0x008a 1088#define PCI_DEVICE_ID_NVIDIA_CK8_AUDIO 0x008a
1095#define PCI_DEVICE_ID_NVIDIA_NVENET_5 0x008c
1096#define PCI_DEVICE_ID_NVIDIA_NFORCE2S_SATA 0x008e 1089#define PCI_DEVICE_ID_NVIDIA_NFORCE2S_SATA 0x008e
1097#define PCI_DEVICE_ID_NVIDIA_GEFORCE_7800_GT 0x0090 1090#define PCI_DEVICE_ID_NVIDIA_GEFORCE_7800_GT 0x0090
1098#define PCI_DEVICE_ID_NVIDIA_GEFORCE_7800_GTX 0x0091 1091#define PCI_DEVICE_ID_NVIDIA_GEFORCE_7800_GTX 0x0091
@@ -1108,15 +1101,12 @@
1108#define PCI_DEVICE_ID_NVIDIA_NFORCE3 0x00d1 1101#define PCI_DEVICE_ID_NVIDIA_NFORCE3 0x00d1
1109#define PCI_DEVICE_ID_NVIDIA_NFORCE3_SMBUS 0x00d4 1102#define PCI_DEVICE_ID_NVIDIA_NFORCE3_SMBUS 0x00d4
1110#define PCI_DEVICE_ID_NVIDIA_NFORCE3_IDE 0x00d5 1103#define PCI_DEVICE_ID_NVIDIA_NFORCE3_IDE 0x00d5
1111#define PCI_DEVICE_ID_NVIDIA_NVENET_3 0x00d6
1112#define PCI_DEVICE_ID_NVIDIA_MCP3_MODEM 0x00d9 1104#define PCI_DEVICE_ID_NVIDIA_MCP3_MODEM 0x00d9
1113#define PCI_DEVICE_ID_NVIDIA_MCP3_AUDIO 0x00da 1105#define PCI_DEVICE_ID_NVIDIA_MCP3_AUDIO 0x00da
1114#define PCI_DEVICE_ID_NVIDIA_NVENET_7 0x00df
1115#define PCI_DEVICE_ID_NVIDIA_NFORCE3S 0x00e1 1106#define PCI_DEVICE_ID_NVIDIA_NFORCE3S 0x00e1
1116#define PCI_DEVICE_ID_NVIDIA_NFORCE3S_SATA 0x00e3 1107#define PCI_DEVICE_ID_NVIDIA_NFORCE3S_SATA 0x00e3
1117#define PCI_DEVICE_ID_NVIDIA_NFORCE3S_SMBUS 0x00e4 1108#define PCI_DEVICE_ID_NVIDIA_NFORCE3S_SMBUS 0x00e4
1118#define PCI_DEVICE_ID_NVIDIA_NFORCE3S_IDE 0x00e5 1109#define PCI_DEVICE_ID_NVIDIA_NFORCE3S_IDE 0x00e5
1119#define PCI_DEVICE_ID_NVIDIA_NVENET_6 0x00e6
1120#define PCI_DEVICE_ID_NVIDIA_CK8S_AUDIO 0x00ea 1110#define PCI_DEVICE_ID_NVIDIA_CK8S_AUDIO 0x00ea
1121#define PCI_DEVICE_ID_NVIDIA_NFORCE3S_SATA2 0x00ee 1111#define PCI_DEVICE_ID_NVIDIA_NFORCE3S_SATA2 0x00ee
1122#define PCIE_DEVICE_ID_NVIDIA_GEFORCE_6800_ALT1 0x00f0 1112#define PCIE_DEVICE_ID_NVIDIA_GEFORCE_6800_ALT1 0x00f0
@@ -1176,7 +1166,6 @@
1176#define PCI_DEVICE_ID_NVIDIA_NFORCE_SMBUS 0x01b4 1166#define PCI_DEVICE_ID_NVIDIA_NFORCE_SMBUS 0x01b4
1177#define PCI_DEVICE_ID_NVIDIA_NFORCE_IDE 0x01bc 1167#define PCI_DEVICE_ID_NVIDIA_NFORCE_IDE 0x01bc
1178#define PCI_DEVICE_ID_NVIDIA_MCP1_MODEM 0x01c1 1168#define PCI_DEVICE_ID_NVIDIA_MCP1_MODEM 0x01c1
1179#define PCI_DEVICE_ID_NVIDIA_NVENET_1 0x01c3
1180#define PCI_DEVICE_ID_NVIDIA_NFORCE2 0x01e0 1169#define PCI_DEVICE_ID_NVIDIA_NFORCE2 0x01e0
1181#define PCI_DEVICE_ID_NVIDIA_GEFORCE3 0x0200 1170#define PCI_DEVICE_ID_NVIDIA_GEFORCE3 0x0200
1182#define PCI_DEVICE_ID_NVIDIA_GEFORCE3_1 0x0201 1171#define PCI_DEVICE_ID_NVIDIA_GEFORCE3_1 0x0201
@@ -1199,8 +1188,6 @@
1199#define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP55_IDE 0x036E 1188#define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP55_IDE 0x036E
1200#define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP55_SATA 0x037E 1189#define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP55_SATA 0x037E
1201#define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP55_SATA2 0x037F 1190#define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP55_SATA2 0x037F
1202#define PCI_DEVICE_ID_NVIDIA_NVENET_12 0x0268
1203#define PCI_DEVICE_ID_NVIDIA_NVENET_13 0x0269
1204#define PCI_DEVICE_ID_NVIDIA_GEFORCE4_TI_4800 0x0280 1191#define PCI_DEVICE_ID_NVIDIA_GEFORCE4_TI_4800 0x0280
1205#define PCI_DEVICE_ID_NVIDIA_GEFORCE4_TI_4800_8X 0x0281 1192#define PCI_DEVICE_ID_NVIDIA_GEFORCE4_TI_4800_8X 0x0281
1206#define PCI_DEVICE_ID_NVIDIA_GEFORCE4_TI_4800SE 0x0282 1193#define PCI_DEVICE_ID_NVIDIA_GEFORCE4_TI_4800SE 0x0282
@@ -1247,46 +1234,21 @@
1247#define PCI_DEVICE_ID_NVIDIA_GEFORCE_FX_GO5700_2 0x0348 1234#define PCI_DEVICE_ID_NVIDIA_GEFORCE_FX_GO5700_2 0x0348
1248#define PCI_DEVICE_ID_NVIDIA_QUADRO_FX_GO1000 0x034C 1235#define PCI_DEVICE_ID_NVIDIA_QUADRO_FX_GO1000 0x034C
1249#define PCI_DEVICE_ID_NVIDIA_QUADRO_FX_1100 0x034E 1236#define PCI_DEVICE_ID_NVIDIA_QUADRO_FX_1100 0x034E
1250#define PCI_DEVICE_ID_NVIDIA_NVENET_14 0x0372
1251#define PCI_DEVICE_ID_NVIDIA_NVENET_15 0x0373 1237#define PCI_DEVICE_ID_NVIDIA_NVENET_15 0x0373
1252#define PCI_DEVICE_ID_NVIDIA_NVENET_16 0x03E5
1253#define PCI_DEVICE_ID_NVIDIA_NVENET_17 0x03E6
1254#define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP61_SATA 0x03E7 1238#define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP61_SATA 0x03E7
1255#define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP61_SMBUS 0x03EB 1239#define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP61_SMBUS 0x03EB
1256#define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP61_IDE 0x03EC 1240#define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP61_IDE 0x03EC
1257#define PCI_DEVICE_ID_NVIDIA_NVENET_18 0x03EE
1258#define PCI_DEVICE_ID_NVIDIA_NVENET_19 0x03EF
1259#define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP61_SATA2 0x03F6 1241#define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP61_SATA2 0x03F6
1260#define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP61_SATA3 0x03F7 1242#define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP61_SATA3 0x03F7
1261#define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP65_SMBUS 0x0446 1243#define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP65_SMBUS 0x0446
1262#define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP65_IDE 0x0448 1244#define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP65_IDE 0x0448
1263#define PCI_DEVICE_ID_NVIDIA_NVENET_20 0x0450
1264#define PCI_DEVICE_ID_NVIDIA_NVENET_21 0x0451
1265#define PCI_DEVICE_ID_NVIDIA_NVENET_22 0x0452
1266#define PCI_DEVICE_ID_NVIDIA_NVENET_23 0x0453
1267#define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP67_SMBUS 0x0542 1245#define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP67_SMBUS 0x0542
1268#define PCI_DEVICE_ID_NVIDIA_NVENET_24 0x054C
1269#define PCI_DEVICE_ID_NVIDIA_NVENET_25 0x054D
1270#define PCI_DEVICE_ID_NVIDIA_NVENET_26 0x054E
1271#define PCI_DEVICE_ID_NVIDIA_NVENET_27 0x054F
1272#define PCI_DEVICE_ID_NVIDIA_NVENET_28 0x07DC
1273#define PCI_DEVICE_ID_NVIDIA_NVENET_29 0x07DD
1274#define PCI_DEVICE_ID_NVIDIA_NVENET_30 0x07DE
1275#define PCI_DEVICE_ID_NVIDIA_NVENET_31 0x07DF
1276#define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP67_IDE 0x0560 1246#define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP67_IDE 0x0560
1277#define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP73_IDE 0x056C 1247#define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP73_IDE 0x056C
1278#define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP78S_SMBUS 0x0752 1248#define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP78S_SMBUS 0x0752
1279#define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP77_IDE 0x0759 1249#define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP77_IDE 0x0759
1280#define PCI_DEVICE_ID_NVIDIA_NVENET_32 0x0760
1281#define PCI_DEVICE_ID_NVIDIA_NVENET_33 0x0761
1282#define PCI_DEVICE_ID_NVIDIA_NVENET_34 0x0762
1283#define PCI_DEVICE_ID_NVIDIA_NVENET_35 0x0763
1284#define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP73_SMBUS 0x07D8 1250#define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP73_SMBUS 0x07D8
1285#define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP79_SMBUS 0x0AA2 1251#define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP79_SMBUS 0x0AA2
1286#define PCI_DEVICE_ID_NVIDIA_NVENET_36 0x0AB0
1287#define PCI_DEVICE_ID_NVIDIA_NVENET_37 0x0AB1
1288#define PCI_DEVICE_ID_NVIDIA_NVENET_38 0x0AB2
1289#define PCI_DEVICE_ID_NVIDIA_NVENET_39 0x0AB3
1290 1252
1291#define PCI_VENDOR_ID_IMS 0x10e0 1253#define PCI_VENDOR_ID_IMS 0x10e0
1292#define PCI_DEVICE_ID_IMS_TT128 0x9128 1254#define PCI_DEVICE_ID_IMS_TT128 0x9128
diff --git a/include/linux/rfkill.h b/include/linux/rfkill.h
index de18ef227e00..16e39c7a67fc 100644
--- a/include/linux/rfkill.h
+++ b/include/linux/rfkill.h
@@ -4,6 +4,7 @@
4/* 4/*
5 * Copyright (C) 2006 - 2007 Ivo van Doorn 5 * Copyright (C) 2006 - 2007 Ivo van Doorn
6 * Copyright (C) 2007 Dmitry Torokhov 6 * Copyright (C) 2007 Dmitry Torokhov
7 * Copyright 2009 Johannes Berg <johannes@sipsolutions.net>
7 * 8 *
8 * This program is free software; you can redistribute it and/or modify 9 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by 10 * it under the terms of the GNU General Public License as published by
@@ -22,117 +23,331 @@
22 */ 23 */
23 24
24#include <linux/types.h> 25#include <linux/types.h>
25#include <linux/kernel.h> 26
26#include <linux/list.h> 27/* define userspace visible states */
27#include <linux/mutex.h> 28#define RFKILL_STATE_SOFT_BLOCKED 0
28#include <linux/device.h> 29#define RFKILL_STATE_UNBLOCKED 1
29#include <linux/leds.h> 30#define RFKILL_STATE_HARD_BLOCKED 2
30 31
31/** 32/**
32 * enum rfkill_type - type of rfkill switch. 33 * enum rfkill_type - type of rfkill switch.
33 * RFKILL_TYPE_WLAN: switch is on a 802.11 wireless network device. 34 *
34 * RFKILL_TYPE_BLUETOOTH: switch is on a bluetooth device. 35 * @RFKILL_TYPE_ALL: toggles all switches (userspace only)
35 * RFKILL_TYPE_UWB: switch is on a ultra wideband device. 36 * @RFKILL_TYPE_WLAN: switch is on a 802.11 wireless network device.
36 * RFKILL_TYPE_WIMAX: switch is on a WiMAX device. 37 * @RFKILL_TYPE_BLUETOOTH: switch is on a bluetooth device.
37 * RFKILL_TYPE_WWAN: switch is on a wireless WAN device. 38 * @RFKILL_TYPE_UWB: switch is on a ultra wideband device.
39 * @RFKILL_TYPE_WIMAX: switch is on a WiMAX device.
40 * @RFKILL_TYPE_WWAN: switch is on a wireless WAN device.
41 * @NUM_RFKILL_TYPES: number of defined rfkill types
38 */ 42 */
39enum rfkill_type { 43enum rfkill_type {
40 RFKILL_TYPE_WLAN , 44 RFKILL_TYPE_ALL = 0,
45 RFKILL_TYPE_WLAN,
41 RFKILL_TYPE_BLUETOOTH, 46 RFKILL_TYPE_BLUETOOTH,
42 RFKILL_TYPE_UWB, 47 RFKILL_TYPE_UWB,
43 RFKILL_TYPE_WIMAX, 48 RFKILL_TYPE_WIMAX,
44 RFKILL_TYPE_WWAN, 49 RFKILL_TYPE_WWAN,
45 RFKILL_TYPE_MAX, 50 NUM_RFKILL_TYPES,
46}; 51};
47 52
48enum rfkill_state { 53/**
49 RFKILL_STATE_SOFT_BLOCKED = 0, /* Radio output blocked */ 54 * enum rfkill_operation - operation types
50 RFKILL_STATE_UNBLOCKED = 1, /* Radio output allowed */ 55 * @RFKILL_OP_ADD: a device was added
51 RFKILL_STATE_HARD_BLOCKED = 2, /* Output blocked, non-overrideable */ 56 * @RFKILL_OP_DEL: a device was removed
52 RFKILL_STATE_MAX, /* marker for last valid state */ 57 * @RFKILL_OP_CHANGE: a device's state changed -- userspace changes one device
58 * @RFKILL_OP_CHANGE_ALL: userspace changes all devices (of a type, or all)
59 */
60enum rfkill_operation {
61 RFKILL_OP_ADD = 0,
62 RFKILL_OP_DEL,
63 RFKILL_OP_CHANGE,
64 RFKILL_OP_CHANGE_ALL,
53}; 65};
54 66
55/** 67/**
56 * struct rfkill - rfkill control structure. 68 * struct rfkill_event - events for userspace on /dev/rfkill
57 * @name: Name of the switch. 69 * @idx: index of dev rfkill
58 * @type: Radio type which the button controls, the value stored 70 * @type: type of the rfkill struct
59 * here should be a value from enum rfkill_type. 71 * @op: operation code
60 * @state: State of the switch, "UNBLOCKED" means radio can operate. 72 * @hard: hard state (0/1)
61 * @mutex: Guards switch state transitions. It serializes callbacks 73 * @soft: soft state (0/1)
62 * and also protects the state. 74 *
63 * @data: Pointer to the RF button drivers private data which will be 75 * Structure used for userspace communication on /dev/rfkill,
64 * passed along when toggling radio state. 76 * used for events from the kernel and control to the kernel.
65 * @toggle_radio(): Mandatory handler to control state of the radio. 77 */
66 * only RFKILL_STATE_SOFT_BLOCKED and RFKILL_STATE_UNBLOCKED are 78struct rfkill_event {
67 * valid parameters. 79 __u32 idx;
68 * @get_state(): handler to read current radio state from hardware, 80 __u8 type;
69 * may be called from atomic context, should return 0 on success. 81 __u8 op;
70 * Either this handler OR judicious use of rfkill_force_state() is 82 __u8 soft, hard;
71 * MANDATORY for any driver capable of RFKILL_STATE_HARD_BLOCKED. 83} __packed;
72 * @led_trigger: A LED trigger for this button's LED.
73 * @dev: Device structure integrating the switch into device tree.
74 * @node: Used to place switch into list of all switches known to the
75 * the system.
76 *
77 * This structure represents a RF switch located on a network device.
78 */
79struct rfkill {
80 const char *name;
81 enum rfkill_type type;
82
83 /* the mutex serializes callbacks and also protects
84 * the state */
85 struct mutex mutex;
86 enum rfkill_state state;
87 void *data;
88 int (*toggle_radio)(void *data, enum rfkill_state state);
89 int (*get_state)(void *data, enum rfkill_state *state);
90 84
91#ifdef CONFIG_RFKILL_LEDS 85/* ioctl for turning off rfkill-input (if present) */
92 struct led_trigger led_trigger; 86#define RFKILL_IOC_MAGIC 'R'
93#endif 87#define RFKILL_IOC_NOINPUT 1
88#define RFKILL_IOCTL_NOINPUT _IO(RFKILL_IOC_MAGIC, RFKILL_IOC_NOINPUT)
89
90/* and that's all userspace gets */
91#ifdef __KERNEL__
92/* don't allow anyone to use these in the kernel */
93enum rfkill_user_states {
94 RFKILL_USER_STATE_SOFT_BLOCKED = RFKILL_STATE_SOFT_BLOCKED,
95 RFKILL_USER_STATE_UNBLOCKED = RFKILL_STATE_UNBLOCKED,
96 RFKILL_USER_STATE_HARD_BLOCKED = RFKILL_STATE_HARD_BLOCKED,
97};
98#undef RFKILL_STATE_SOFT_BLOCKED
99#undef RFKILL_STATE_UNBLOCKED
100#undef RFKILL_STATE_HARD_BLOCKED
101
102#include <linux/types.h>
103#include <linux/kernel.h>
104#include <linux/list.h>
105#include <linux/mutex.h>
106#include <linux/device.h>
107#include <linux/leds.h>
108#include <linux/err.h>
109
110/* this is opaque */
111struct rfkill;
94 112
95 struct device dev; 113/**
96 struct list_head node; 114 * struct rfkill_ops - rfkill driver methods
97 enum rfkill_state state_for_resume; 115 *
116 * @poll: poll the rfkill block state(s) -- only assign this method
117 * when you need polling. When called, simply call one of the
118 * rfkill_set{,_hw,_sw}_state family of functions. If the hw
119 * is getting unblocked you need to take into account the return
120 * value of those functions to make sure the software block is
121 * properly used.
122 * @query: query the rfkill block state(s) and call exactly one of the
123 * rfkill_set{,_hw,_sw}_state family of functions. Assign this
124 * method if input events can cause hardware state changes to make
125 * the rfkill core query your driver before setting a requested
126 * block.
127 * @set_block: turn the transmitter on (blocked == false) or off
128 * (blocked == true) -- ignore and return 0 when hard blocked.
129 * This callback must be assigned.
130 */
131struct rfkill_ops {
132 void (*poll)(struct rfkill *rfkill, void *data);
133 void (*query)(struct rfkill *rfkill, void *data);
134 int (*set_block)(void *data, bool blocked);
98}; 135};
99#define to_rfkill(d) container_of(d, struct rfkill, dev)
100 136
101struct rfkill * __must_check rfkill_allocate(struct device *parent, 137#if defined(CONFIG_RFKILL) || defined(CONFIG_RFKILL_MODULE)
102 enum rfkill_type type); 138/**
103void rfkill_free(struct rfkill *rfkill); 139 * rfkill_alloc - allocate rfkill structure
140 * @name: name of the struct -- the string is not copied internally
141 * @parent: device that has rf switch on it
142 * @type: type of the switch (RFKILL_TYPE_*)
143 * @ops: rfkill methods
144 * @ops_data: data passed to each method
145 *
146 * This function should be called by the transmitter driver to allocate an
147 * rfkill structure. Returns %NULL on failure.
148 */
149struct rfkill * __must_check rfkill_alloc(const char *name,
150 struct device *parent,
151 const enum rfkill_type type,
152 const struct rfkill_ops *ops,
153 void *ops_data);
154
155/**
156 * rfkill_register - Register a rfkill structure.
157 * @rfkill: rfkill structure to be registered
158 *
159 * This function should be called by the transmitter driver to register
160 * the rfkill structure. Before calling this function the driver needs
161 * to be ready to service method calls from rfkill.
162 *
163 * If the software blocked state is not set before registration,
164 * set_block will be called to initialize it to a default value.
165 *
166 * If the hardware blocked state is not set before registration,
167 * it is assumed to be unblocked.
168 */
104int __must_check rfkill_register(struct rfkill *rfkill); 169int __must_check rfkill_register(struct rfkill *rfkill);
170
171/**
172 * rfkill_pause_polling(struct rfkill *rfkill)
173 *
174 * Pause polling -- say transmitter is off for other reasons.
175 * NOTE: not necessary for suspend/resume -- in that case the
176 * core stops polling anyway
177 */
178void rfkill_pause_polling(struct rfkill *rfkill);
179
180/**
181 * rfkill_resume_polling(struct rfkill *rfkill)
182 *
183 * Pause polling -- say transmitter is off for other reasons.
184 * NOTE: not necessary for suspend/resume -- in that case the
185 * core stops polling anyway
186 */
187void rfkill_resume_polling(struct rfkill *rfkill);
188
189
190/**
191 * rfkill_unregister - Unregister a rfkill structure.
192 * @rfkill: rfkill structure to be unregistered
193 *
194 * This function should be called by the network driver during device
195 * teardown to destroy rfkill structure. Until it returns, the driver
196 * needs to be able to service method calls.
197 */
105void rfkill_unregister(struct rfkill *rfkill); 198void rfkill_unregister(struct rfkill *rfkill);
106 199
107int rfkill_force_state(struct rfkill *rfkill, enum rfkill_state state); 200/**
108int rfkill_set_default(enum rfkill_type type, enum rfkill_state state); 201 * rfkill_destroy - free rfkill structure
202 * @rfkill: rfkill structure to be destroyed
203 *
204 * Destroys the rfkill structure.
205 */
206void rfkill_destroy(struct rfkill *rfkill);
207
208/**
209 * rfkill_set_hw_state - Set the internal rfkill hardware block state
210 * @rfkill: pointer to the rfkill class to modify.
211 * @state: the current hardware block state to set
212 *
213 * rfkill drivers that get events when the hard-blocked state changes
214 * use this function to notify the rfkill core (and through that also
215 * userspace) of the current state. They should also use this after
216 * resume if the state could have changed.
217 *
218 * You need not (but may) call this function if poll_state is assigned.
219 *
220 * This function can be called in any context, even from within rfkill
221 * callbacks.
222 *
223 * The function returns the combined block state (true if transmitter
224 * should be blocked) so that drivers need not keep track of the soft
225 * block state -- which they might not be able to.
226 */
227bool __must_check rfkill_set_hw_state(struct rfkill *rfkill, bool blocked);
228
229/**
230 * rfkill_set_sw_state - Set the internal rfkill software block state
231 * @rfkill: pointer to the rfkill class to modify.
232 * @state: the current software block state to set
233 *
234 * rfkill drivers that get events when the soft-blocked state changes
235 * (yes, some platforms directly act on input but allow changing again)
236 * use this function to notify the rfkill core (and through that also
237 * userspace) of the current state. It is not necessary to notify on
238 * resume; since hibernation can always change the soft-blocked state,
239 * the rfkill core will unconditionally restore the previous state.
240 *
241 * This function can be called in any context, even from within rfkill
242 * callbacks.
243 *
244 * The function returns the combined block state (true if transmitter
245 * should be blocked).
246 */
247bool rfkill_set_sw_state(struct rfkill *rfkill, bool blocked);
248
249/**
250 * rfkill_set_states - Set the internal rfkill block states
251 * @rfkill: pointer to the rfkill class to modify.
252 * @sw: the current software block state to set
253 * @hw: the current hardware block state to set
254 *
255 * This function can be called in any context, even from within rfkill
256 * callbacks.
257 */
258void rfkill_set_states(struct rfkill *rfkill, bool sw, bool hw);
109 259
110/** 260/**
111 * rfkill_state_complement - return complementar state 261 * rfkill_blocked - query rfkill block
112 * @state: state to return the complement of
113 * 262 *
114 * Returns RFKILL_STATE_SOFT_BLOCKED if @state is RFKILL_STATE_UNBLOCKED, 263 * @rfkill: rfkill struct to query
115 * returns RFKILL_STATE_UNBLOCKED otherwise.
116 */ 264 */
117static inline enum rfkill_state rfkill_state_complement(enum rfkill_state state) 265bool rfkill_blocked(struct rfkill *rfkill);
266#else /* !RFKILL */
267static inline struct rfkill * __must_check
268rfkill_alloc(const char *name,
269 struct device *parent,
270 const enum rfkill_type type,
271 const struct rfkill_ops *ops,
272 void *ops_data)
273{
274 return ERR_PTR(-ENODEV);
275}
276
277static inline int __must_check rfkill_register(struct rfkill *rfkill)
278{
279 if (rfkill == ERR_PTR(-ENODEV))
280 return 0;
281 return -EINVAL;
282}
283
284static inline void rfkill_pause_polling(struct rfkill *rfkill)
285{
286}
287
288static inline void rfkill_resume_polling(struct rfkill *rfkill)
289{
290}
291
292static inline void rfkill_unregister(struct rfkill *rfkill)
293{
294}
295
296static inline void rfkill_destroy(struct rfkill *rfkill)
118{ 297{
119 return (state == RFKILL_STATE_UNBLOCKED) ?
120 RFKILL_STATE_SOFT_BLOCKED : RFKILL_STATE_UNBLOCKED;
121} 298}
122 299
300static inline bool rfkill_set_hw_state(struct rfkill *rfkill, bool blocked)
301{
302 return blocked;
303}
304
305static inline bool rfkill_set_sw_state(struct rfkill *rfkill, bool blocked)
306{
307 return blocked;
308}
309
310static inline void rfkill_set_states(struct rfkill *rfkill, bool sw, bool hw)
311{
312}
313
314static inline bool rfkill_blocked(struct rfkill *rfkill)
315{
316 return false;
317}
318#endif /* RFKILL || RFKILL_MODULE */
319
320
321#ifdef CONFIG_RFKILL_LEDS
123/** 322/**
124 * rfkill_get_led_name - Get the LED trigger name for the button's LED. 323 * rfkill_get_led_trigger_name - Get the LED trigger name for the button's LED.
125 * This function might return a NULL pointer if registering of the 324 * This function might return a NULL pointer if registering of the
126 * LED trigger failed. 325 * LED trigger failed. Use this as "default_trigger" for the LED.
127 * Use this as "default_trigger" for the LED.
128 */ 326 */
129static inline char *rfkill_get_led_name(struct rfkill *rfkill) 327const char *rfkill_get_led_trigger_name(struct rfkill *rfkill);
130{ 328
131#ifdef CONFIG_RFKILL_LEDS 329/**
132 return (char *)(rfkill->led_trigger.name); 330 * rfkill_set_led_trigger_name -- set the LED trigger name
331 * @rfkill: rfkill struct
332 * @name: LED trigger name
333 *
334 * This function sets the LED trigger name of the radio LED
335 * trigger that rfkill creates. It is optional, but if called
336 * must be called before rfkill_register() to be effective.
337 */
338void rfkill_set_led_trigger_name(struct rfkill *rfkill, const char *name);
133#else 339#else
340static inline const char *rfkill_get_led_trigger_name(struct rfkill *rfkill)
341{
134 return NULL; 342 return NULL;
135#endif
136} 343}
137 344
345static inline void
346rfkill_set_led_trigger_name(struct rfkill *rfkill, const char *name)
347{
348}
349#endif
350
351#endif /* __KERNEL__ */
352
138#endif /* RFKILL_H */ 353#endif /* RFKILL_H */
diff --git a/include/linux/sctp.h b/include/linux/sctp.h
index c2731bfe04d8..b464b9d3d242 100644
--- a/include/linux/sctp.h
+++ b/include/linux/sctp.h
@@ -487,17 +487,17 @@ typedef enum {
487 * 487 *
488 * Value Cause Code 488 * Value Cause Code
489 * --------- ---------------- 489 * --------- ----------------
490 * 0x0100 Request to Delete Last Remaining IP Address. 490 * 0x00A0 Request to Delete Last Remaining IP Address.
491 * 0x0101 Operation Refused Due to Resource Shortage. 491 * 0x00A1 Operation Refused Due to Resource Shortage.
492 * 0x0102 Request to Delete Source IP Address. 492 * 0x00A2 Request to Delete Source IP Address.
493 * 0x0103 Association Aborted due to illegal ASCONF-ACK 493 * 0x00A3 Association Aborted due to illegal ASCONF-ACK
494 * 0x0104 Request refused - no authorization. 494 * 0x00A4 Request refused - no authorization.
495 */ 495 */
496 SCTP_ERROR_DEL_LAST_IP = cpu_to_be16(0x0100), 496 SCTP_ERROR_DEL_LAST_IP = cpu_to_be16(0x00A0),
497 SCTP_ERROR_RSRC_LOW = cpu_to_be16(0x0101), 497 SCTP_ERROR_RSRC_LOW = cpu_to_be16(0x00A1),
498 SCTP_ERROR_DEL_SRC_IP = cpu_to_be16(0x0102), 498 SCTP_ERROR_DEL_SRC_IP = cpu_to_be16(0x00A2),
499 SCTP_ERROR_ASCONF_ACK = cpu_to_be16(0x0103), 499 SCTP_ERROR_ASCONF_ACK = cpu_to_be16(0x00A3),
500 SCTP_ERROR_REQ_REFUSED = cpu_to_be16(0x0104), 500 SCTP_ERROR_REQ_REFUSED = cpu_to_be16(0x00A4),
501 501
502 /* AUTH Section 4. New Error Cause 502 /* AUTH Section 4. New Error Cause
503 * 503 *
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
index aff494ba6a31..fa51293f2708 100644
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -189,19 +189,19 @@ struct skb_shared_info {
189 atomic_t dataref; 189 atomic_t dataref;
190 unsigned short nr_frags; 190 unsigned short nr_frags;
191 unsigned short gso_size; 191 unsigned short gso_size;
192#ifdef CONFIG_HAS_DMA
193 dma_addr_t dma_head;
194#endif
192 /* Warning: this field is not always filled in (UFO)! */ 195 /* Warning: this field is not always filled in (UFO)! */
193 unsigned short gso_segs; 196 unsigned short gso_segs;
194 unsigned short gso_type; 197 unsigned short gso_type;
195 __be32 ip6_frag_id; 198 __be32 ip6_frag_id;
196 union skb_shared_tx tx_flags; 199 union skb_shared_tx tx_flags;
197#ifdef CONFIG_HAS_DMA
198 unsigned int num_dma_maps;
199#endif
200 struct sk_buff *frag_list; 200 struct sk_buff *frag_list;
201 struct skb_shared_hwtstamps hwtstamps; 201 struct skb_shared_hwtstamps hwtstamps;
202 skb_frag_t frags[MAX_SKB_FRAGS]; 202 skb_frag_t frags[MAX_SKB_FRAGS];
203#ifdef CONFIG_HAS_DMA 203#ifdef CONFIG_HAS_DMA
204 dma_addr_t dma_maps[MAX_SKB_FRAGS + 1]; 204 dma_addr_t dma_maps[MAX_SKB_FRAGS];
205#endif 205#endif
206 /* Intermediate layers must ensure that destructor_arg 206 /* Intermediate layers must ensure that destructor_arg
207 * remains valid until skb destructor */ 207 * remains valid until skb destructor */
@@ -304,9 +304,6 @@ typedef unsigned char *sk_buff_data_t;
304 * @tc_verd: traffic control verdict 304 * @tc_verd: traffic control verdict
305 * @ndisc_nodetype: router type (from link layer) 305 * @ndisc_nodetype: router type (from link layer)
306 * @do_not_encrypt: set to prevent encryption of this frame 306 * @do_not_encrypt: set to prevent encryption of this frame
307 * @requeue: set to indicate that the wireless core should attempt
308 * a software retry on this frame if we failed to
309 * receive an ACK for it
310 * @dma_cookie: a cookie to one of several possible DMA operations 307 * @dma_cookie: a cookie to one of several possible DMA operations
311 * done by skb DMA functions 308 * done by skb DMA functions
312 * @secmark: security marking 309 * @secmark: security marking
@@ -322,10 +319,7 @@ struct sk_buff {
322 ktime_t tstamp; 319 ktime_t tstamp;
323 struct net_device *dev; 320 struct net_device *dev;
324 321
325 union { 322 unsigned long _skb_dst;
326 struct dst_entry *dst;
327 struct rtable *rtable;
328 };
329#ifdef CONFIG_XFRM 323#ifdef CONFIG_XFRM
330 struct sec_path *sp; 324 struct sec_path *sp;
331#endif 325#endif
@@ -383,7 +377,6 @@ struct sk_buff {
383#endif 377#endif
384#if defined(CONFIG_MAC80211) || defined(CONFIG_MAC80211_MODULE) 378#if defined(CONFIG_MAC80211) || defined(CONFIG_MAC80211_MODULE)
385 __u8 do_not_encrypt:1; 379 __u8 do_not_encrypt:1;
386 __u8 requeue:1;
387#endif 380#endif
388 /* 0/13/14 bit hole */ 381 /* 0/13/14 bit hole */
389 382
@@ -426,6 +419,21 @@ extern void skb_dma_unmap(struct device *dev, struct sk_buff *skb,
426 enum dma_data_direction dir); 419 enum dma_data_direction dir);
427#endif 420#endif
428 421
422static inline struct dst_entry *skb_dst(const struct sk_buff *skb)
423{
424 return (struct dst_entry *)skb->_skb_dst;
425}
426
427static inline void skb_dst_set(struct sk_buff *skb, struct dst_entry *dst)
428{
429 skb->_skb_dst = (unsigned long)dst;
430}
431
432static inline struct rtable *skb_rtable(const struct sk_buff *skb)
433{
434 return (struct rtable *)skb_dst(skb);
435}
436
429extern void kfree_skb(struct sk_buff *skb); 437extern void kfree_skb(struct sk_buff *skb);
430extern void consume_skb(struct sk_buff *skb); 438extern void consume_skb(struct sk_buff *skb);
431extern void __kfree_skb(struct sk_buff *skb); 439extern void __kfree_skb(struct sk_buff *skb);
@@ -1065,7 +1073,7 @@ extern void skb_add_rx_frag(struct sk_buff *skb, int i, struct page *page,
1065 int off, int size); 1073 int off, int size);
1066 1074
1067#define SKB_PAGE_ASSERT(skb) BUG_ON(skb_shinfo(skb)->nr_frags) 1075#define SKB_PAGE_ASSERT(skb) BUG_ON(skb_shinfo(skb)->nr_frags)
1068#define SKB_FRAG_ASSERT(skb) BUG_ON(skb_shinfo(skb)->frag_list) 1076#define SKB_FRAG_ASSERT(skb) BUG_ON(skb_has_frags(skb))
1069#define SKB_LINEAR_ASSERT(skb) BUG_ON(skb_is_nonlinear(skb)) 1077#define SKB_LINEAR_ASSERT(skb) BUG_ON(skb_is_nonlinear(skb))
1070 1078
1071#ifdef NET_SKBUFF_DATA_USES_OFFSET 1079#ifdef NET_SKBUFF_DATA_USES_OFFSET
@@ -1704,6 +1712,25 @@ static inline int pskb_trim_rcsum(struct sk_buff *skb, unsigned int len)
1704 skb = skb->prev) 1712 skb = skb->prev)
1705 1713
1706 1714
1715static inline bool skb_has_frags(const struct sk_buff *skb)
1716{
1717 return skb_shinfo(skb)->frag_list != NULL;
1718}
1719
1720static inline void skb_frag_list_init(struct sk_buff *skb)
1721{
1722 skb_shinfo(skb)->frag_list = NULL;
1723}
1724
1725static inline void skb_frag_add_head(struct sk_buff *skb, struct sk_buff *frag)
1726{
1727 frag->next = skb_shinfo(skb)->frag_list;
1728 skb_shinfo(skb)->frag_list = frag;
1729}
1730
1731#define skb_walk_frags(skb, iter) \
1732 for (iter = skb_shinfo(skb)->frag_list; iter; iter = iter->next)
1733
1707extern struct sk_buff *__skb_recv_datagram(struct sock *sk, unsigned flags, 1734extern struct sk_buff *__skb_recv_datagram(struct sock *sk, unsigned flags,
1708 int *peeked, int *err); 1735 int *peeked, int *err);
1709extern struct sk_buff *skb_recv_datagram(struct sock *sk, unsigned flags, 1736extern struct sk_buff *skb_recv_datagram(struct sock *sk, unsigned flags,
diff --git a/include/linux/socket.h b/include/linux/socket.h
index d2310cb45d2f..3b461dffe244 100644
--- a/include/linux/socket.h
+++ b/include/linux/socket.h
@@ -194,7 +194,8 @@ struct ucred {
194#define AF_RXRPC 33 /* RxRPC sockets */ 194#define AF_RXRPC 33 /* RxRPC sockets */
195#define AF_ISDN 34 /* mISDN sockets */ 195#define AF_ISDN 34 /* mISDN sockets */
196#define AF_PHONET 35 /* Phonet sockets */ 196#define AF_PHONET 35 /* Phonet sockets */
197#define AF_MAX 36 /* For now.. */ 197#define AF_IEEE802154 36 /* IEEE802154 sockets */
198#define AF_MAX 37 /* For now.. */
198 199
199/* Protocol families, same as address families. */ 200/* Protocol families, same as address families. */
200#define PF_UNSPEC AF_UNSPEC 201#define PF_UNSPEC AF_UNSPEC
@@ -233,6 +234,7 @@ struct ucred {
233#define PF_RXRPC AF_RXRPC 234#define PF_RXRPC AF_RXRPC
234#define PF_ISDN AF_ISDN 235#define PF_ISDN AF_ISDN
235#define PF_PHONET AF_PHONET 236#define PF_PHONET AF_PHONET
237#define PF_IEEE802154 AF_IEEE802154
236#define PF_MAX AF_MAX 238#define PF_MAX AF_MAX
237 239
238/* Maximum queue length specifiable by listen. */ 240/* Maximum queue length specifiable by listen. */
diff --git a/include/linux/spi/libertas_spi.h b/include/linux/spi/libertas_spi.h
index 79506f5f9e67..1b5d5384fcd3 100644
--- a/include/linux/spi/libertas_spi.h
+++ b/include/linux/spi/libertas_spi.h
@@ -22,9 +22,6 @@ struct libertas_spi_platform_data {
22 * speed, you may want to use 0 here. */ 22 * speed, you may want to use 0 here. */
23 u16 use_dummy_writes; 23 u16 use_dummy_writes;
24 24
25 /* GPIO number to use as chip select */
26 u16 gpio_cs;
27
28 /* Board specific setup/teardown */ 25 /* Board specific setup/teardown */
29 int (*setup)(struct spi_device *spi); 26 int (*setup)(struct spi_device *spi);
30 int (*teardown)(struct spi_device *spi); 27 int (*teardown)(struct spi_device *spi);
diff --git a/include/linux/wimax.h b/include/linux/wimax.h
index c89de7f4e5b9..4fdcc5635518 100644
--- a/include/linux/wimax.h
+++ b/include/linux/wimax.h
@@ -59,7 +59,7 @@ enum {
59 * M - Major: change if removing or modifying an existing call. 59 * M - Major: change if removing or modifying an existing call.
60 * m - minor: change when adding a new call 60 * m - minor: change when adding a new call
61 */ 61 */
62 WIMAX_GNL_VERSION = 00, 62 WIMAX_GNL_VERSION = 01,
63 /* Generic NetLink attributes */ 63 /* Generic NetLink attributes */
64 WIMAX_GNL_ATTR_INVALID = 0x00, 64 WIMAX_GNL_ATTR_INVALID = 0x00,
65 WIMAX_GNL_ATTR_MAX = 10, 65 WIMAX_GNL_ATTR_MAX = 10,
@@ -78,6 +78,7 @@ enum {
78 WIMAX_GNL_OP_RFKILL, /* Run wimax_rfkill() */ 78 WIMAX_GNL_OP_RFKILL, /* Run wimax_rfkill() */
79 WIMAX_GNL_OP_RESET, /* Run wimax_rfkill() */ 79 WIMAX_GNL_OP_RESET, /* Run wimax_rfkill() */
80 WIMAX_GNL_RE_STATE_CHANGE, /* Report: status change */ 80 WIMAX_GNL_RE_STATE_CHANGE, /* Report: status change */
81 WIMAX_GNL_OP_STATE_GET, /* Request for current state */
81}; 82};
82 83
83 84
@@ -113,6 +114,10 @@ enum {
113 WIMAX_GNL_RESET_IFIDX = 1, 114 WIMAX_GNL_RESET_IFIDX = 1,
114}; 115};
115 116
117/* Atributes for wimax_state_get() */
118enum {
119 WIMAX_GNL_STGET_IFIDX = 1,
120};
116 121
117/* 122/*
118 * Attributes for the Report State Change 123 * Attributes for the Report State Change
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