aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2013-02-20 21:58:50 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2013-02-20 21:58:50 -0500
commita0b1c42951dd06ec83cc1bc2c9788131d9fefcd8 (patch)
treea572f1523cf904c93020c9cdb32f3bc84ec3ac16 /include/linux
parent8ec4942212a6d337982967778a3dc3b60aea782e (diff)
parentecd9883724b78cc72ed92c98bcb1a46c764fff21 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next
Pull networking update from David Miller: 1) Checkpoint/restarted TCP sockets now can properly propagate the TCP timestamp offset. From Andrey Vagin. 2) VMWARE VM VSOCK layer, from Andy King. 3) Much improved support for virtual functions and SR-IOV in bnx2x, from Ariel ELior. 4) All protocols on ipv4 and ipv6 are now network namespace aware, and all the compatability checks for initial-namespace-only protocols is removed. Thanks to Tom Parkin for helping deal with the last major holdout, L2TP. 5) IPV6 support in netpoll and network namespace support in pktgen, from Cong Wang. 6) Multiple Registration Protocol (MRP) and Multiple VLAN Registration Protocol (MVRP) support, from David Ward. 7) Compute packet lengths more accurately in the packet scheduler, from Eric Dumazet. 8) Use per-task page fragment allocator in skb_append_datato_frags(), also from Eric Dumazet. 9) Add support for connection tracking labels in netfilter, from Florian Westphal. 10) Fix default multicast group joining on ipv6, and add anti-spoofing checks to 6to4 and 6rd. From Hannes Frederic Sowa. 11) Make ipv4/ipv6 fragmentation memory limits more reasonable in modern times, rearrange inet frag datastructures for better cacheline locality, and move more operations outside of locking. From Jesper Dangaard Brouer. 12) Instead of strict master <--> slave relationships, allow arbitrary scenerios with "upper device lists". From Jiri Pirko. 13) Improve rate limiting accuracy in TBF and act_police, also from Jiri Pirko. 14) Add a BPF filter netfilter match target, from Willem de Bruijn. 15) Orphan and delete a bunch of pre-historic networking drivers from Paul Gortmaker. 16) Add TSO support for GRE tunnels, from Pravin B SHelar. Although this still needs some minor bug fixing before it's %100 correct in all cases. 17) Handle unresolved IPSEC states like ARP, with a resolution packet queue. From Steffen Klassert. 18) Remove TCP Appropriate Byte Count support (ABC), from Stephen Hemminger. This was long overdue. 19) Support SO_REUSEPORT, from Tom Herbert. 20) Allow locking a socket BPF filter, so that it cannot change after a process drops capabilities. 21) Add VLAN filtering to bridge, from Vlad Yasevich. 22) Bring ipv6 on-par with ipv4 and do not cache neighbour entries in the ipv6 routes, from YOSHIFUJI Hideaki. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next: (1538 commits) ipv6: fix race condition regarding dst->expires and dst->from. net: fix a wrong assignment in skb_split() ip_gre: remove an extra dst_release() ppp: set qdisc_tx_busylock to avoid LOCKDEP splat atl1c: restore buffer state net: fix a build failure when !CONFIG_PROC_FS net: ipv4: fix waring -Wunused-variable net: proc: fix build failed when procfs is not configured Revert "xen: netback: remove redundant xenvif_put" net: move procfs code to net/core/net-procfs.c qmi_wwan, cdc-ether: add ADU960S bonding: set sysfs device_type to 'bond' bonding: fix bond_release_all inconsistencies b44: use netdev_alloc_skb_ip_align() xen: netback: remove redundant xenvif_put net: fec: Do a sanity check on the gpio number ip_gre: propogate target device GSO capability to the tunnel device ip_gre: allow CSUM capable devices to handle packets bonding: Fix initialize after use for 3ad machine state spinlock bonding: Fix race condition between bond_enslave() and bond_3ad_update_lacp_rate() ...
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/bcma/bcma_driver_chipcommon.h4
-rw-r--r--include/linux/bcma/bcma_driver_mips.h11
-rw-r--r--include/linux/bcma/bcma_driver_pci.h2
-rw-r--r--include/linux/can/dev.h11
-rw-r--r--include/linux/can/led.h51
-rw-r--r--include/linux/can/skb.h45
-rw-r--r--include/linux/cyclomx.h77
-rw-r--r--include/linux/cycx_drv.h64
-rw-r--r--include/linux/etherdevice.h4
-rw-r--r--include/linux/ieee80211.h155
-rw-r--r--include/linux/if_macvlan.h6
-rw-r--r--include/linux/if_team.h1
-rw-r--r--include/linux/in6.h13
-rw-r--r--include/linux/inetdevice.h6
-rw-r--r--include/linux/ipv6.h10
-rw-r--r--include/linux/micrel_phy.h9
-rw-r--r--include/linux/mlx4/device.h8
-rw-r--r--include/linux/mroute.h2
-rw-r--r--include/linux/mroute6.h2
-rw-r--r--include/linux/netdev_features.h3
-rw-r--r--include/linux/netdevice.h113
-rw-r--r--include/linux/netfilter/nf_conntrack_sip.h3
-rw-r--r--include/linux/netfilter/nfnetlink.h4
-rw-r--r--include/linux/netpoll.h28
-rw-r--r--include/linux/pci_ids.h1
-rw-r--r--include/linux/phy.h6
-rw-r--r--include/linux/platform_data/cpsw.h4
-rw-r--r--include/linux/platform_data/microread.h35
-rw-r--r--include/linux/proc_fs.h15
-rw-r--r--include/linux/random.h6
-rw-r--r--include/linux/skbuff.h61
-rw-r--r--include/linux/socket.h4
-rw-r--r--include/linux/ssb/ssb_driver_gige.h23
-rw-r--r--include/linux/ssb/ssb_driver_mips.h5
-rw-r--r--include/linux/tcp.h4
-rw-r--r--include/linux/wanrouter.h127
-rw-r--r--include/linux/wl12xx.h16
37 files changed, 552 insertions, 387 deletions
diff --git a/include/linux/bcma/bcma_driver_chipcommon.h b/include/linux/bcma/bcma_driver_chipcommon.h
index 9a0e3fa3ca95..1d002b58b60b 100644
--- a/include/linux/bcma/bcma_driver_chipcommon.h
+++ b/include/linux/bcma/bcma_driver_chipcommon.h
@@ -27,7 +27,7 @@
27#define BCMA_CC_FLASHT_NONE 0x00000000 /* No flash */ 27#define BCMA_CC_FLASHT_NONE 0x00000000 /* No flash */
28#define BCMA_CC_FLASHT_STSER 0x00000100 /* ST serial flash */ 28#define BCMA_CC_FLASHT_STSER 0x00000100 /* ST serial flash */
29#define BCMA_CC_FLASHT_ATSER 0x00000200 /* Atmel serial flash */ 29#define BCMA_CC_FLASHT_ATSER 0x00000200 /* Atmel serial flash */
30#define BCMA_CC_FLASHT_NFLASH 0x00000200 /* NAND flash */ 30#define BCMA_CC_FLASHT_NAND 0x00000300 /* NAND flash */
31#define BCMA_CC_FLASHT_PARA 0x00000700 /* Parallel flash */ 31#define BCMA_CC_FLASHT_PARA 0x00000700 /* Parallel flash */
32#define BCMA_CC_CAP_PLLT 0x00038000 /* PLL Type */ 32#define BCMA_CC_CAP_PLLT 0x00038000 /* PLL Type */
33#define BCMA_PLLTYPE_NONE 0x00000000 33#define BCMA_PLLTYPE_NONE 0x00000000
@@ -634,4 +634,6 @@ extern void bcma_chipco_regctl_maskset(struct bcma_drv_cc *cc,
634 u32 offset, u32 mask, u32 set); 634 u32 offset, u32 mask, u32 set);
635extern void bcma_pmu_spuravoid_pllupdate(struct bcma_drv_cc *cc, int spuravoid); 635extern void bcma_pmu_spuravoid_pllupdate(struct bcma_drv_cc *cc, int spuravoid);
636 636
637extern u32 bcma_pmu_get_bus_clock(struct bcma_drv_cc *cc);
638
637#endif /* LINUX_BCMA_DRIVER_CC_H_ */ 639#endif /* LINUX_BCMA_DRIVER_CC_H_ */
diff --git a/include/linux/bcma/bcma_driver_mips.h b/include/linux/bcma/bcma_driver_mips.h
index 0baf8a56b794..fb61f3fb4ddb 100644
--- a/include/linux/bcma/bcma_driver_mips.h
+++ b/include/linux/bcma/bcma_driver_mips.h
@@ -28,6 +28,7 @@
28#define BCMA_MIPS_MIPS74K_GPIOEN 0x0048 28#define BCMA_MIPS_MIPS74K_GPIOEN 0x0048
29#define BCMA_MIPS_MIPS74K_CLKCTLST 0x01E0 29#define BCMA_MIPS_MIPS74K_CLKCTLST 0x01E0
30 30
31#define BCMA_MIPS_OOBSELINA74 0x004
31#define BCMA_MIPS_OOBSELOUTA30 0x100 32#define BCMA_MIPS_OOBSELOUTA30 0x100
32 33
33struct bcma_device; 34struct bcma_device;
@@ -36,19 +37,23 @@ struct bcma_drv_mips {
36 struct bcma_device *core; 37 struct bcma_device *core;
37 u8 setup_done:1; 38 u8 setup_done:1;
38 u8 early_setup_done:1; 39 u8 early_setup_done:1;
39 unsigned int assigned_irqs;
40}; 40};
41 41
42#ifdef CONFIG_BCMA_DRIVER_MIPS 42#ifdef CONFIG_BCMA_DRIVER_MIPS
43extern void bcma_core_mips_init(struct bcma_drv_mips *mcore); 43extern void bcma_core_mips_init(struct bcma_drv_mips *mcore);
44extern void bcma_core_mips_early_init(struct bcma_drv_mips *mcore); 44extern void bcma_core_mips_early_init(struct bcma_drv_mips *mcore);
45
46extern unsigned int bcma_core_irq(struct bcma_device *core);
45#else 47#else
46static inline void bcma_core_mips_init(struct bcma_drv_mips *mcore) { } 48static inline void bcma_core_mips_init(struct bcma_drv_mips *mcore) { }
47static inline void bcma_core_mips_early_init(struct bcma_drv_mips *mcore) { } 49static inline void bcma_core_mips_early_init(struct bcma_drv_mips *mcore) { }
50
51static inline unsigned int bcma_core_irq(struct bcma_device *core)
52{
53 return 0;
54}
48#endif 55#endif
49 56
50extern u32 bcma_cpu_clock(struct bcma_drv_mips *mcore); 57extern u32 bcma_cpu_clock(struct bcma_drv_mips *mcore);
51 58
52extern unsigned int bcma_core_mips_irq(struct bcma_device *dev);
53
54#endif /* LINUX_BCMA_DRIVER_MIPS_H_ */ 59#endif /* LINUX_BCMA_DRIVER_MIPS_H_ */
diff --git a/include/linux/bcma/bcma_driver_pci.h b/include/linux/bcma/bcma_driver_pci.h
index c48d98d27b77..424760f01b9d 100644
--- a/include/linux/bcma/bcma_driver_pci.h
+++ b/include/linux/bcma/bcma_driver_pci.h
@@ -179,6 +179,8 @@ struct pci_dev;
179#define BCMA_CORE_PCI_CFG_FUN_MASK 7 /* Function mask */ 179#define BCMA_CORE_PCI_CFG_FUN_MASK 7 /* Function mask */
180#define BCMA_CORE_PCI_CFG_OFF_MASK 0xfff /* Register mask */ 180#define BCMA_CORE_PCI_CFG_OFF_MASK 0xfff /* Register mask */
181 181
182#define BCMA_CORE_PCI_CFG_DEVCTRL 0xd8
183
182/* PCIE Root Capability Register bits (Host mode only) */ 184/* PCIE Root Capability Register bits (Host mode only) */
183#define BCMA_CORE_PCI_RC_CRS_VISIBILITY 0x0001 185#define BCMA_CORE_PCI_RC_CRS_VISIBILITY 0x0001
184 186
diff --git a/include/linux/can/dev.h b/include/linux/can/dev.h
index 2b2fc345afca..fb0ab651a041 100644
--- a/include/linux/can/dev.h
+++ b/include/linux/can/dev.h
@@ -16,6 +16,7 @@
16#include <linux/can.h> 16#include <linux/can.h>
17#include <linux/can/netlink.h> 17#include <linux/can/netlink.h>
18#include <linux/can/error.h> 18#include <linux/can/error.h>
19#include <linux/can/led.h>
19 20
20/* 21/*
21 * CAN mode 22 * CAN mode
@@ -52,6 +53,13 @@ struct can_priv {
52 53
53 unsigned int echo_skb_max; 54 unsigned int echo_skb_max;
54 struct sk_buff **echo_skb; 55 struct sk_buff **echo_skb;
56
57#ifdef CONFIG_CAN_LEDS
58 struct led_trigger *tx_led_trig;
59 char tx_led_trig_name[CAN_LED_NAME_SZ];
60 struct led_trigger *rx_led_trig;
61 char rx_led_trig_name[CAN_LED_NAME_SZ];
62#endif
55}; 63};
56 64
57/* 65/*
@@ -98,6 +106,9 @@ u8 can_len2dlc(u8 len);
98struct net_device *alloc_candev(int sizeof_priv, unsigned int echo_skb_max); 106struct net_device *alloc_candev(int sizeof_priv, unsigned int echo_skb_max);
99void free_candev(struct net_device *dev); 107void free_candev(struct net_device *dev);
100 108
109/* a candev safe wrapper around netdev_priv */
110struct can_priv *safe_candev_priv(struct net_device *dev);
111
101int open_candev(struct net_device *dev); 112int open_candev(struct net_device *dev);
102void close_candev(struct net_device *dev); 113void close_candev(struct net_device *dev);
103 114
diff --git a/include/linux/can/led.h b/include/linux/can/led.h
new file mode 100644
index 000000000000..9c1167baf273
--- /dev/null
+++ b/include/linux/can/led.h
@@ -0,0 +1,51 @@
1/*
2 * Copyright 2012, Fabio Baltieri <fabio.baltieri@gmail.com>
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation.
7 */
8
9#ifndef CAN_LED_H
10#define CAN_LED_H
11
12#include <linux/if.h>
13#include <linux/leds.h>
14
15enum can_led_event {
16 CAN_LED_EVENT_OPEN,
17 CAN_LED_EVENT_STOP,
18 CAN_LED_EVENT_TX,
19 CAN_LED_EVENT_RX,
20};
21
22#ifdef CONFIG_CAN_LEDS
23
24/* keep space for interface name + "-tx"/"-rx" suffix and null terminator */
25#define CAN_LED_NAME_SZ (IFNAMSIZ + 4)
26
27void can_led_event(struct net_device *netdev, enum can_led_event event);
28void devm_can_led_init(struct net_device *netdev);
29int __init can_led_notifier_init(void);
30void __exit can_led_notifier_exit(void);
31
32#else
33
34static inline void can_led_event(struct net_device *netdev,
35 enum can_led_event event)
36{
37}
38static inline void devm_can_led_init(struct net_device *netdev)
39{
40}
41static inline int can_led_notifier_init(void)
42{
43 return 0;
44}
45static inline void can_led_notifier_exit(void)
46{
47}
48
49#endif
50
51#endif
diff --git a/include/linux/can/skb.h b/include/linux/can/skb.h
new file mode 100644
index 000000000000..2f0543f7510c
--- /dev/null
+++ b/include/linux/can/skb.h
@@ -0,0 +1,45 @@
1/*
2 * linux/can/skb.h
3 *
4 * Definitions for the CAN network socket buffer
5 *
6 * Copyright (C) 2012 Oliver Hartkopp <socketcan@hartkopp.net>
7 *
8 */
9
10#ifndef CAN_SKB_H
11#define CAN_SKB_H
12
13#include <linux/types.h>
14#include <linux/can.h>
15
16/*
17 * The struct can_skb_priv is used to transport additional information along
18 * with the stored struct can(fd)_frame that can not be contained in existing
19 * struct sk_buff elements.
20 * N.B. that this information must not be modified in cloned CAN sk_buffs.
21 * To modify the CAN frame content or the struct can_skb_priv content
22 * skb_copy() needs to be used instead of skb_clone().
23 */
24
25/**
26 * struct can_skb_priv - private additional data inside CAN sk_buffs
27 * @ifindex: ifindex of the first interface the CAN frame appeared on
28 * @cf: align to the following CAN frame at skb->data
29 */
30struct can_skb_priv {
31 int ifindex;
32 struct can_frame cf[0];
33};
34
35static inline struct can_skb_priv *can_skb_prv(struct sk_buff *skb)
36{
37 return (struct can_skb_priv *)(skb->head);
38}
39
40static inline void can_skb_reserve(struct sk_buff *skb)
41{
42 skb_reserve(skb, sizeof(struct can_skb_priv));
43}
44
45#endif /* CAN_SKB_H */
diff --git a/include/linux/cyclomx.h b/include/linux/cyclomx.h
deleted file mode 100644
index b88f7f428e58..000000000000
--- a/include/linux/cyclomx.h
+++ /dev/null
@@ -1,77 +0,0 @@
1#ifndef _CYCLOMX_H
2#define _CYCLOMX_H
3/*
4* cyclomx.h Cyclom 2X WAN Link Driver.
5* User-level API definitions.
6*
7* Author: Arnaldo Carvalho de Melo <acme@conectiva.com.br>
8*
9* Copyright: (c) 1998-2003 Arnaldo Carvalho de Melo
10*
11* Based on wanpipe.h by Gene Kozin <genek@compuserve.com>
12*
13* This program is free software; you can redistribute it and/or
14* modify it under the terms of the GNU General Public License
15* as published by the Free Software Foundation; either version
16* 2 of the License, or (at your option) any later version.
17* ============================================================================
18* 2000/07/13 acme remove crap #if KERNEL_VERSION > blah
19* 2000/01/21 acme rename cyclomx_open to cyclomx_mod_inc_use_count
20* and cyclomx_close to cyclomx_mod_dec_use_count
21* 1999/05/19 acme wait_queue_head_t wait_stats(support for 2.3.*)
22* 1999/01/03 acme judicious use of data types
23* 1998/12/27 acme cleanup: PACKED not needed
24* 1998/08/08 acme Version 0.0.1
25*/
26
27#include <linux/wanrouter.h>
28#include <linux/spinlock.h>
29
30#ifdef __KERNEL__
31/* Kernel Interface */
32
33#include <linux/cycx_drv.h> /* Cyclom 2X support module API definitions */
34#include <linux/cycx_cfm.h> /* Cyclom 2X firmware module definitions */
35#ifdef CONFIG_CYCLOMX_X25
36#include <linux/cycx_x25.h>
37#endif
38
39/* Adapter Data Space.
40 * This structure is needed because we handle multiple cards, otherwise
41 * static data would do it.
42 */
43struct cycx_device {
44 char devname[WAN_DRVNAME_SZ + 1];/* card name */
45 struct cycx_hw hw; /* hardware configuration */
46 struct wan_device wandev; /* WAN device data space */
47 u32 state_tick; /* link state timestamp */
48 spinlock_t lock;
49 char in_isr; /* interrupt-in-service flag */
50 char buff_int_mode_unbusy; /* flag for carrying out dev_tint */
51 wait_queue_head_t wait_stats; /* to wait for the STATS indication */
52 void __iomem *mbox; /* -> mailbox */
53 void (*isr)(struct cycx_device* card); /* interrupt service routine */
54 int (*exec)(struct cycx_device* card, void* u_cmd, void* u_data);
55 union {
56#ifdef CONFIG_CYCLOMX_X25
57 struct { /* X.25 specific data */
58 u32 lo_pvc;
59 u32 hi_pvc;
60 u32 lo_svc;
61 u32 hi_svc;
62 struct cycx_x25_stats stats;
63 spinlock_t lock;
64 u32 connection_keys;
65 } x;
66#endif
67 } u;
68};
69
70/* Public Functions */
71void cycx_set_state(struct cycx_device *card, int state);
72
73#ifdef CONFIG_CYCLOMX_X25
74int cycx_x25_wan_init(struct cycx_device *card, wandev_conf_t *conf);
75#endif
76#endif /* __KERNEL__ */
77#endif /* _CYCLOMX_H */
diff --git a/include/linux/cycx_drv.h b/include/linux/cycx_drv.h
deleted file mode 100644
index 12fe6b0bfcff..000000000000
--- a/include/linux/cycx_drv.h
+++ /dev/null
@@ -1,64 +0,0 @@
1/*
2* cycx_drv.h CYCX Support Module. Kernel API Definitions.
3*
4* Author: Arnaldo Carvalho de Melo <acme@conectiva.com.br>
5*
6* Copyright: (c) 1998-2003 Arnaldo Carvalho de Melo
7*
8* Based on sdladrv.h by Gene Kozin <genek@compuserve.com>
9*
10* This program is free software; you can redistribute it and/or
11* modify it under the terms of the GNU General Public License
12* as published by the Free Software Foundation; either version
13* 2 of the License, or (at your option) any later version.
14* ============================================================================
15* 1999/10/23 acme cycxhw_t cleanup
16* 1999/01/03 acme more judicious use of data types...
17* uclong, ucchar, etc deleted, the u8, u16, u32
18* types are the portable way to go.
19* 1999/01/03 acme judicious use of data types... u16, u32, etc
20* 1998/12/26 acme FIXED_BUFFERS, CONF_OFFSET,
21* removal of cy_read{bwl}
22* 1998/08/08 acme Initial version.
23*/
24#ifndef _CYCX_DRV_H
25#define _CYCX_DRV_H
26
27#define CYCX_WINDOWSIZE 0x4000 /* default dual-port memory window size */
28#define GEN_CYCX_INTR 0x02
29#define RST_ENABLE 0x04
30#define START_CPU 0x06
31#define RST_DISABLE 0x08
32#define FIXED_BUFFERS 0x08
33#define TEST_PATTERN 0xaa55
34#define CMD_OFFSET 0x20
35#define CONF_OFFSET 0x0380
36#define RESET_OFFSET 0x3c00 /* For reset file load */
37#define DATA_OFFSET 0x0100 /* For code and data files load */
38#define START_OFFSET 0x3ff0 /* 80186 starts here */
39
40/**
41 * struct cycx_hw - Adapter hardware configuration
42 * @fwid - firmware ID
43 * @irq - interrupt request level
44 * @dpmbase - dual-port memory base
45 * @dpmsize - dual-port memory size
46 * @reserved - reserved for future use
47 */
48struct cycx_hw {
49 u32 fwid;
50 int irq;
51 void __iomem *dpmbase;
52 u32 dpmsize;
53 u32 reserved[5];
54};
55
56/* Function Prototypes */
57extern int cycx_setup(struct cycx_hw *hw, void *sfm, u32 len, unsigned long base);
58extern int cycx_down(struct cycx_hw *hw);
59extern int cycx_peek(struct cycx_hw *hw, u32 addr, void *buf, u32 len);
60extern int cycx_poke(struct cycx_hw *hw, u32 addr, void *buf, u32 len);
61extern int cycx_exec(void __iomem *addr);
62
63extern void cycx_intr(struct cycx_hw *hw);
64#endif /* _CYCX_DRV_H */
diff --git a/include/linux/etherdevice.h b/include/linux/etherdevice.h
index 243eea1e33d8..c623861964e4 100644
--- a/include/linux/etherdevice.h
+++ b/include/linux/etherdevice.h
@@ -40,6 +40,8 @@ extern int eth_header_cache(const struct neighbour *neigh, struct hh_cache *hh,
40extern void eth_header_cache_update(struct hh_cache *hh, 40extern void eth_header_cache_update(struct hh_cache *hh,
41 const struct net_device *dev, 41 const struct net_device *dev,
42 const unsigned char *haddr); 42 const unsigned char *haddr);
43extern int eth_prepare_mac_addr_change(struct net_device *dev, void *p);
44extern void eth_commit_mac_addr_change(struct net_device *dev, void *p);
43extern int eth_mac_addr(struct net_device *dev, void *p); 45extern int eth_mac_addr(struct net_device *dev, void *p);
44extern int eth_change_mtu(struct net_device *dev, int new_mtu); 46extern int eth_change_mtu(struct net_device *dev, int new_mtu);
45extern int eth_validate_addr(struct net_device *dev); 47extern int eth_validate_addr(struct net_device *dev);
@@ -192,7 +194,7 @@ static inline void eth_zero_addr(u8 *addr)
192 */ 194 */
193static inline void eth_hw_addr_random(struct net_device *dev) 195static inline void eth_hw_addr_random(struct net_device *dev)
194{ 196{
195 dev->addr_assign_type |= NET_ADDR_RANDOM; 197 dev->addr_assign_type = NET_ADDR_RANDOM;
196 eth_random_addr(dev->dev_addr); 198 eth_random_addr(dev->dev_addr);
197} 199}
198 200
diff --git a/include/linux/ieee80211.h b/include/linux/ieee80211.h
index f0859cc73861..7e24fe0cfbcd 100644
--- a/include/linux/ieee80211.h
+++ b/include/linux/ieee80211.h
@@ -151,6 +151,11 @@
151/* Mesh Control 802.11s */ 151/* Mesh Control 802.11s */
152#define IEEE80211_QOS_CTL_MESH_CONTROL_PRESENT 0x0100 152#define IEEE80211_QOS_CTL_MESH_CONTROL_PRESENT 0x0100
153 153
154/* Mesh Power Save Level */
155#define IEEE80211_QOS_CTL_MESH_PS_LEVEL 0x0200
156/* Mesh Receiver Service Period Initiated */
157#define IEEE80211_QOS_CTL_RSPI 0x0400
158
154/* U-APSD queue for WMM IEs sent by AP */ 159/* U-APSD queue for WMM IEs sent by AP */
155#define IEEE80211_WMM_IE_AP_QOSINFO_UAPSD (1<<7) 160#define IEEE80211_WMM_IE_AP_QOSINFO_UAPSD (1<<7)
156#define IEEE80211_WMM_IE_AP_QOSINFO_PARAM_SET_CNT_MASK 0x0f 161#define IEEE80211_WMM_IE_AP_QOSINFO_PARAM_SET_CNT_MASK 0x0f
@@ -180,7 +185,7 @@ struct ieee80211_hdr {
180 u8 addr3[6]; 185 u8 addr3[6];
181 __le16 seq_ctrl; 186 __le16 seq_ctrl;
182 u8 addr4[6]; 187 u8 addr4[6];
183} __attribute__ ((packed)); 188} __packed;
184 189
185struct ieee80211_hdr_3addr { 190struct ieee80211_hdr_3addr {
186 __le16 frame_control; 191 __le16 frame_control;
@@ -189,7 +194,7 @@ struct ieee80211_hdr_3addr {
189 u8 addr2[6]; 194 u8 addr2[6];
190 u8 addr3[6]; 195 u8 addr3[6];
191 __le16 seq_ctrl; 196 __le16 seq_ctrl;
192} __attribute__ ((packed)); 197} __packed;
193 198
194struct ieee80211_qos_hdr { 199struct ieee80211_qos_hdr {
195 __le16 frame_control; 200 __le16 frame_control;
@@ -199,7 +204,7 @@ struct ieee80211_qos_hdr {
199 u8 addr3[6]; 204 u8 addr3[6];
200 __le16 seq_ctrl; 205 __le16 seq_ctrl;
201 __le16 qos_ctrl; 206 __le16 qos_ctrl;
202} __attribute__ ((packed)); 207} __packed;
203 208
204/** 209/**
205 * ieee80211_has_tods - check if IEEE80211_FCTL_TODS is set 210 * ieee80211_has_tods - check if IEEE80211_FCTL_TODS is set
@@ -576,7 +581,7 @@ struct ieee80211s_hdr {
576 __le32 seqnum; 581 __le32 seqnum;
577 u8 eaddr1[6]; 582 u8 eaddr1[6];
578 u8 eaddr2[6]; 583 u8 eaddr2[6];
579} __attribute__ ((packed)); 584} __packed;
580 585
581/* Mesh flags */ 586/* Mesh flags */
582#define MESH_FLAGS_AE_A4 0x1 587#define MESH_FLAGS_AE_A4 0x1
@@ -614,7 +619,7 @@ struct ieee80211_quiet_ie {
614 u8 period; 619 u8 period;
615 __le16 duration; 620 __le16 duration;
616 __le16 offset; 621 __le16 offset;
617} __attribute__ ((packed)); 622} __packed;
618 623
619/** 624/**
620 * struct ieee80211_msrment_ie 625 * struct ieee80211_msrment_ie
@@ -626,7 +631,7 @@ struct ieee80211_msrment_ie {
626 u8 mode; 631 u8 mode;
627 u8 type; 632 u8 type;
628 u8 request[0]; 633 u8 request[0];
629} __attribute__ ((packed)); 634} __packed;
630 635
631/** 636/**
632 * struct ieee80211_channel_sw_ie 637 * struct ieee80211_channel_sw_ie
@@ -637,7 +642,7 @@ struct ieee80211_channel_sw_ie {
637 u8 mode; 642 u8 mode;
638 u8 new_ch_num; 643 u8 new_ch_num;
639 u8 count; 644 u8 count;
640} __attribute__ ((packed)); 645} __packed;
641 646
642/** 647/**
643 * struct ieee80211_tim 648 * struct ieee80211_tim
@@ -650,7 +655,7 @@ struct ieee80211_tim_ie {
650 u8 bitmap_ctrl; 655 u8 bitmap_ctrl;
651 /* variable size: 1 - 251 bytes */ 656 /* variable size: 1 - 251 bytes */
652 u8 virtual_map[1]; 657 u8 virtual_map[1];
653} __attribute__ ((packed)); 658} __packed;
654 659
655/** 660/**
656 * struct ieee80211_meshconf_ie 661 * struct ieee80211_meshconf_ie
@@ -665,7 +670,7 @@ struct ieee80211_meshconf_ie {
665 u8 meshconf_auth; 670 u8 meshconf_auth;
666 u8 meshconf_form; 671 u8 meshconf_form;
667 u8 meshconf_cap; 672 u8 meshconf_cap;
668} __attribute__ ((packed)); 673} __packed;
669 674
670/** 675/**
671 * enum mesh_config_capab_flags - Mesh Configuration IE capability field flags 676 * enum mesh_config_capab_flags - Mesh Configuration IE capability field flags
@@ -675,11 +680,14 @@ struct ieee80211_meshconf_ie {
675 * @IEEE80211_MESHCONF_CAPAB_FORWARDING: the STA forwards MSDUs 680 * @IEEE80211_MESHCONF_CAPAB_FORWARDING: the STA forwards MSDUs
676 * @IEEE80211_MESHCONF_CAPAB_TBTT_ADJUSTING: TBTT adjustment procedure 681 * @IEEE80211_MESHCONF_CAPAB_TBTT_ADJUSTING: TBTT adjustment procedure
677 * is ongoing 682 * is ongoing
683 * @IEEE80211_MESHCONF_CAPAB_POWER_SAVE_LEVEL: STA is in deep sleep mode or has
684 * neighbors in deep sleep mode
678 */ 685 */
679enum mesh_config_capab_flags { 686enum mesh_config_capab_flags {
680 IEEE80211_MESHCONF_CAPAB_ACCEPT_PLINKS = 0x01, 687 IEEE80211_MESHCONF_CAPAB_ACCEPT_PLINKS = 0x01,
681 IEEE80211_MESHCONF_CAPAB_FORWARDING = 0x08, 688 IEEE80211_MESHCONF_CAPAB_FORWARDING = 0x08,
682 IEEE80211_MESHCONF_CAPAB_TBTT_ADJUSTING = 0x20, 689 IEEE80211_MESHCONF_CAPAB_TBTT_ADJUSTING = 0x20,
690 IEEE80211_MESHCONF_CAPAB_POWER_SAVE_LEVEL = 0x40,
683}; 691};
684 692
685/** 693/**
@@ -695,12 +703,41 @@ struct ieee80211_rann_ie {
695 __le32 rann_seq; 703 __le32 rann_seq;
696 __le32 rann_interval; 704 __le32 rann_interval;
697 __le32 rann_metric; 705 __le32 rann_metric;
698} __attribute__ ((packed)); 706} __packed;
699 707
700enum ieee80211_rann_flags { 708enum ieee80211_rann_flags {
701 RANN_FLAG_IS_GATE = 1 << 0, 709 RANN_FLAG_IS_GATE = 1 << 0,
702}; 710};
703 711
712enum ieee80211_ht_chanwidth_values {
713 IEEE80211_HT_CHANWIDTH_20MHZ = 0,
714 IEEE80211_HT_CHANWIDTH_ANY = 1,
715};
716
717/**
718 * enum ieee80211_opmode_bits - VHT operating mode field bits
719 * @IEEE80211_OPMODE_NOTIF_CHANWIDTH_MASK: channel width mask
720 * @IEEE80211_OPMODE_NOTIF_CHANWIDTH_20MHZ: 20 MHz channel width
721 * @IEEE80211_OPMODE_NOTIF_CHANWIDTH_40MHZ: 40 MHz channel width
722 * @IEEE80211_OPMODE_NOTIF_CHANWIDTH_80MHZ: 80 MHz channel width
723 * @IEEE80211_OPMODE_NOTIF_CHANWIDTH_160MHZ: 160 MHz or 80+80 MHz channel width
724 * @IEEE80211_OPMODE_NOTIF_RX_NSS_MASK: number of spatial streams mask
725 * (the NSS value is the value of this field + 1)
726 * @IEEE80211_OPMODE_NOTIF_RX_NSS_SHIFT: number of spatial streams shift
727 * @IEEE80211_OPMODE_NOTIF_RX_NSS_TYPE_BF: indicates streams in SU-MIMO PPDU
728 * using a beamforming steering matrix
729 */
730enum ieee80211_vht_opmode_bits {
731 IEEE80211_OPMODE_NOTIF_CHANWIDTH_MASK = 3,
732 IEEE80211_OPMODE_NOTIF_CHANWIDTH_20MHZ = 0,
733 IEEE80211_OPMODE_NOTIF_CHANWIDTH_40MHZ = 1,
734 IEEE80211_OPMODE_NOTIF_CHANWIDTH_80MHZ = 2,
735 IEEE80211_OPMODE_NOTIF_CHANWIDTH_160MHZ = 3,
736 IEEE80211_OPMODE_NOTIF_RX_NSS_MASK = 0x70,
737 IEEE80211_OPMODE_NOTIF_RX_NSS_SHIFT = 4,
738 IEEE80211_OPMODE_NOTIF_RX_NSS_TYPE_BF = 0x80,
739};
740
704#define WLAN_SA_QUERY_TR_ID_LEN 2 741#define WLAN_SA_QUERY_TR_ID_LEN 2
705 742
706struct ieee80211_mgmt { 743struct ieee80211_mgmt {
@@ -717,33 +754,33 @@ struct ieee80211_mgmt {
717 __le16 status_code; 754 __le16 status_code;
718 /* possibly followed by Challenge text */ 755 /* possibly followed by Challenge text */
719 u8 variable[0]; 756 u8 variable[0];
720 } __attribute__ ((packed)) auth; 757 } __packed auth;
721 struct { 758 struct {
722 __le16 reason_code; 759 __le16 reason_code;
723 } __attribute__ ((packed)) deauth; 760 } __packed deauth;
724 struct { 761 struct {
725 __le16 capab_info; 762 __le16 capab_info;
726 __le16 listen_interval; 763 __le16 listen_interval;
727 /* followed by SSID and Supported rates */ 764 /* followed by SSID and Supported rates */
728 u8 variable[0]; 765 u8 variable[0];
729 } __attribute__ ((packed)) assoc_req; 766 } __packed assoc_req;
730 struct { 767 struct {
731 __le16 capab_info; 768 __le16 capab_info;
732 __le16 status_code; 769 __le16 status_code;
733 __le16 aid; 770 __le16 aid;
734 /* followed by Supported rates */ 771 /* followed by Supported rates */
735 u8 variable[0]; 772 u8 variable[0];
736 } __attribute__ ((packed)) assoc_resp, reassoc_resp; 773 } __packed assoc_resp, reassoc_resp;
737 struct { 774 struct {
738 __le16 capab_info; 775 __le16 capab_info;
739 __le16 listen_interval; 776 __le16 listen_interval;
740 u8 current_ap[6]; 777 u8 current_ap[6];
741 /* followed by SSID and Supported rates */ 778 /* followed by SSID and Supported rates */
742 u8 variable[0]; 779 u8 variable[0];
743 } __attribute__ ((packed)) reassoc_req; 780 } __packed reassoc_req;
744 struct { 781 struct {
745 __le16 reason_code; 782 __le16 reason_code;
746 } __attribute__ ((packed)) disassoc; 783 } __packed disassoc;
747 struct { 784 struct {
748 __le64 timestamp; 785 __le64 timestamp;
749 __le16 beacon_int; 786 __le16 beacon_int;
@@ -751,11 +788,11 @@ struct ieee80211_mgmt {
751 /* followed by some of SSID, Supported rates, 788 /* followed by some of SSID, Supported rates,
752 * FH Params, DS Params, CF Params, IBSS Params, TIM */ 789 * FH Params, DS Params, CF Params, IBSS Params, TIM */
753 u8 variable[0]; 790 u8 variable[0];
754 } __attribute__ ((packed)) beacon; 791 } __packed beacon;
755 struct { 792 struct {
756 /* only variable items: SSID, Supported rates */ 793 /* only variable items: SSID, Supported rates */
757 u8 variable[0]; 794 u8 variable[0];
758 } __attribute__ ((packed)) probe_req; 795 } __packed probe_req;
759 struct { 796 struct {
760 __le64 timestamp; 797 __le64 timestamp;
761 __le16 beacon_int; 798 __le16 beacon_int;
@@ -763,7 +800,7 @@ struct ieee80211_mgmt {
763 /* followed by some of SSID, Supported rates, 800 /* followed by some of SSID, Supported rates,
764 * FH Params, DS Params, CF Params, IBSS Params */ 801 * FH Params, DS Params, CF Params, IBSS Params */
765 u8 variable[0]; 802 u8 variable[0];
766 } __attribute__ ((packed)) probe_resp; 803 } __packed probe_resp;
767 struct { 804 struct {
768 u8 category; 805 u8 category;
769 union { 806 union {
@@ -772,65 +809,73 @@ struct ieee80211_mgmt {
772 u8 dialog_token; 809 u8 dialog_token;
773 u8 status_code; 810 u8 status_code;
774 u8 variable[0]; 811 u8 variable[0];
775 } __attribute__ ((packed)) wme_action; 812 } __packed wme_action;
776 struct{ 813 struct{
777 u8 action_code; 814 u8 action_code;
778 u8 element_id; 815 u8 element_id;
779 u8 length; 816 u8 length;
780 struct ieee80211_channel_sw_ie sw_elem; 817 struct ieee80211_channel_sw_ie sw_elem;
781 } __attribute__((packed)) chan_switch; 818 } __packed chan_switch;
782 struct{ 819 struct{
783 u8 action_code; 820 u8 action_code;
784 u8 dialog_token; 821 u8 dialog_token;
785 u8 element_id; 822 u8 element_id;
786 u8 length; 823 u8 length;
787 struct ieee80211_msrment_ie msr_elem; 824 struct ieee80211_msrment_ie msr_elem;
788 } __attribute__((packed)) measurement; 825 } __packed measurement;
789 struct{ 826 struct{
790 u8 action_code; 827 u8 action_code;
791 u8 dialog_token; 828 u8 dialog_token;
792 __le16 capab; 829 __le16 capab;
793 __le16 timeout; 830 __le16 timeout;
794 __le16 start_seq_num; 831 __le16 start_seq_num;
795 } __attribute__((packed)) addba_req; 832 } __packed addba_req;
796 struct{ 833 struct{
797 u8 action_code; 834 u8 action_code;
798 u8 dialog_token; 835 u8 dialog_token;
799 __le16 status; 836 __le16 status;
800 __le16 capab; 837 __le16 capab;
801 __le16 timeout; 838 __le16 timeout;
802 } __attribute__((packed)) addba_resp; 839 } __packed addba_resp;
803 struct{ 840 struct{
804 u8 action_code; 841 u8 action_code;
805 __le16 params; 842 __le16 params;
806 __le16 reason_code; 843 __le16 reason_code;
807 } __attribute__((packed)) delba; 844 } __packed delba;
808 struct { 845 struct {
809 u8 action_code; 846 u8 action_code;
810 u8 variable[0]; 847 u8 variable[0];
811 } __attribute__((packed)) self_prot; 848 } __packed self_prot;
812 struct{ 849 struct{
813 u8 action_code; 850 u8 action_code;
814 u8 variable[0]; 851 u8 variable[0];
815 } __attribute__((packed)) mesh_action; 852 } __packed mesh_action;
816 struct { 853 struct {
817 u8 action; 854 u8 action;
818 u8 trans_id[WLAN_SA_QUERY_TR_ID_LEN]; 855 u8 trans_id[WLAN_SA_QUERY_TR_ID_LEN];
819 } __attribute__ ((packed)) sa_query; 856 } __packed sa_query;
820 struct { 857 struct {
821 u8 action; 858 u8 action;
822 u8 smps_control; 859 u8 smps_control;
823 } __attribute__ ((packed)) ht_smps; 860 } __packed ht_smps;
861 struct {
862 u8 action_code;
863 u8 chanwidth;
864 } __packed ht_notify_cw;
824 struct { 865 struct {
825 u8 action_code; 866 u8 action_code;
826 u8 dialog_token; 867 u8 dialog_token;
827 __le16 capability; 868 __le16 capability;
828 u8 variable[0]; 869 u8 variable[0];
829 } __packed tdls_discover_resp; 870 } __packed tdls_discover_resp;
871 struct {
872 u8 action_code;
873 u8 operating_mode;
874 } __packed vht_opmode_notif;
830 } u; 875 } u;
831 } __attribute__ ((packed)) action; 876 } __packed action;
832 } u; 877 } u;
833} __attribute__ ((packed)); 878} __packed;
834 879
835/* Supported Rates value encodings in 802.11n-2009 7.3.2.2 */ 880/* Supported Rates value encodings in 802.11n-2009 7.3.2.2 */
836#define BSS_MEMBERSHIP_SELECTOR_HT_PHY 127 881#define BSS_MEMBERSHIP_SELECTOR_HT_PHY 127
@@ -846,7 +891,7 @@ struct ieee80211_mmie {
846 __le16 key_id; 891 __le16 key_id;
847 u8 sequence_number[6]; 892 u8 sequence_number[6];
848 u8 mic[8]; 893 u8 mic[8];
849} __attribute__ ((packed)); 894} __packed;
850 895
851struct ieee80211_vendor_ie { 896struct ieee80211_vendor_ie {
852 u8 element_id; 897 u8 element_id;
@@ -861,20 +906,20 @@ struct ieee80211_rts {
861 __le16 duration; 906 __le16 duration;
862 u8 ra[6]; 907 u8 ra[6];
863 u8 ta[6]; 908 u8 ta[6];
864} __attribute__ ((packed)); 909} __packed;
865 910
866struct ieee80211_cts { 911struct ieee80211_cts {
867 __le16 frame_control; 912 __le16 frame_control;
868 __le16 duration; 913 __le16 duration;
869 u8 ra[6]; 914 u8 ra[6];
870} __attribute__ ((packed)); 915} __packed;
871 916
872struct ieee80211_pspoll { 917struct ieee80211_pspoll {
873 __le16 frame_control; 918 __le16 frame_control;
874 __le16 aid; 919 __le16 aid;
875 u8 bssid[6]; 920 u8 bssid[6];
876 u8 ta[6]; 921 u8 ta[6];
877} __attribute__ ((packed)); 922} __packed;
878 923
879/* TDLS */ 924/* TDLS */
880 925
@@ -967,7 +1012,7 @@ struct ieee80211_bar {
967 __u8 ta[6]; 1012 __u8 ta[6];
968 __le16 control; 1013 __le16 control;
969 __le16 start_seq_num; 1014 __le16 start_seq_num;
970} __attribute__((packed)); 1015} __packed;
971 1016
972/* 802.11 BAR control masks */ 1017/* 802.11 BAR control masks */
973#define IEEE80211_BAR_CTRL_ACK_POLICY_NORMAL 0x0000 1018#define IEEE80211_BAR_CTRL_ACK_POLICY_NORMAL 0x0000
@@ -992,7 +1037,7 @@ struct ieee80211_mcs_info {
992 __le16 rx_highest; 1037 __le16 rx_highest;
993 u8 tx_params; 1038 u8 tx_params;
994 u8 reserved[3]; 1039 u8 reserved[3];
995} __attribute__((packed)); 1040} __packed;
996 1041
997/* 802.11n HT capability MSC set */ 1042/* 802.11n HT capability MSC set */
998#define IEEE80211_HT_MCS_RX_HIGHEST_MASK 0x3ff 1043#define IEEE80211_HT_MCS_RX_HIGHEST_MASK 0x3ff
@@ -1031,7 +1076,7 @@ struct ieee80211_ht_cap {
1031 __le16 extended_ht_cap_info; 1076 __le16 extended_ht_cap_info;
1032 __le32 tx_BF_cap_info; 1077 __le32 tx_BF_cap_info;
1033 u8 antenna_selection_info; 1078 u8 antenna_selection_info;
1034} __attribute__ ((packed)); 1079} __packed;
1035 1080
1036/* 802.11n HT capabilities masks (for cap_info) */ 1081/* 802.11n HT capabilities masks (for cap_info) */
1037#define IEEE80211_HT_CAP_LDPC_CODING 0x0001 1082#define IEEE80211_HT_CAP_LDPC_CODING 0x0001
@@ -1102,7 +1147,7 @@ struct ieee80211_ht_operation {
1102 __le16 operation_mode; 1147 __le16 operation_mode;
1103 __le16 stbc_param; 1148 __le16 stbc_param;
1104 u8 basic_set[16]; 1149 u8 basic_set[16];
1105} __attribute__ ((packed)); 1150} __packed;
1106 1151
1107/* for ht_param */ 1152/* for ht_param */
1108#define IEEE80211_HT_PARAM_CHA_SEC_OFFSET 0x03 1153#define IEEE80211_HT_PARAM_CHA_SEC_OFFSET 0x03
@@ -1256,6 +1301,7 @@ struct ieee80211_vht_operation {
1256#define IEEE80211_VHT_CAP_MAX_MPDU_LENGTH_11454 0x00000002 1301#define IEEE80211_VHT_CAP_MAX_MPDU_LENGTH_11454 0x00000002
1257#define IEEE80211_VHT_CAP_SUPP_CHAN_WIDTH_160MHZ 0x00000004 1302#define IEEE80211_VHT_CAP_SUPP_CHAN_WIDTH_160MHZ 0x00000004
1258#define IEEE80211_VHT_CAP_SUPP_CHAN_WIDTH_160_80PLUS80MHZ 0x00000008 1303#define IEEE80211_VHT_CAP_SUPP_CHAN_WIDTH_160_80PLUS80MHZ 0x00000008
1304#define IEEE80211_VHT_CAP_SUPP_CHAN_WIDTH_MASK 0x0000000C
1259#define IEEE80211_VHT_CAP_RXLDPC 0x00000010 1305#define IEEE80211_VHT_CAP_RXLDPC 0x00000010
1260#define IEEE80211_VHT_CAP_SHORT_GI_80 0x00000020 1306#define IEEE80211_VHT_CAP_SHORT_GI_80 0x00000020
1261#define IEEE80211_VHT_CAP_SHORT_GI_160 0x00000040 1307#define IEEE80211_VHT_CAP_SHORT_GI_160 0x00000040
@@ -1311,16 +1357,21 @@ struct ieee80211_vht_operation {
1311#define WLAN_CAPABILITY_SPECTRUM_MGMT (1<<8) 1357#define WLAN_CAPABILITY_SPECTRUM_MGMT (1<<8)
1312#define WLAN_CAPABILITY_QOS (1<<9) 1358#define WLAN_CAPABILITY_QOS (1<<9)
1313#define WLAN_CAPABILITY_SHORT_SLOT_TIME (1<<10) 1359#define WLAN_CAPABILITY_SHORT_SLOT_TIME (1<<10)
1360#define WLAN_CAPABILITY_APSD (1<<11)
1361#define WLAN_CAPABILITY_RADIO_MEASURE (1<<12)
1314#define WLAN_CAPABILITY_DSSS_OFDM (1<<13) 1362#define WLAN_CAPABILITY_DSSS_OFDM (1<<13)
1363#define WLAN_CAPABILITY_DEL_BACK (1<<14)
1364#define WLAN_CAPABILITY_IMM_BACK (1<<15)
1315 1365
1316/* DMG (60gHz) 802.11ad */ 1366/* DMG (60gHz) 802.11ad */
1317/* type - bits 0..1 */ 1367/* type - bits 0..1 */
1368#define WLAN_CAPABILITY_DMG_TYPE_MASK (3<<0)
1318#define WLAN_CAPABILITY_DMG_TYPE_IBSS (1<<0) /* Tx by: STA */ 1369#define WLAN_CAPABILITY_DMG_TYPE_IBSS (1<<0) /* Tx by: STA */
1319#define WLAN_CAPABILITY_DMG_TYPE_PBSS (2<<0) /* Tx by: PCP */ 1370#define WLAN_CAPABILITY_DMG_TYPE_PBSS (2<<0) /* Tx by: PCP */
1320#define WLAN_CAPABILITY_DMG_TYPE_AP (3<<0) /* Tx by: AP */ 1371#define WLAN_CAPABILITY_DMG_TYPE_AP (3<<0) /* Tx by: AP */
1321 1372
1322#define WLAN_CAPABILITY_DMG_CBAP_ONLY (1<<2) 1373#define WLAN_CAPABILITY_DMG_CBAP_ONLY (1<<2)
1323#define WLAN_CAPABILITY_DMG_CBAP_SOURCE (1<<3) 1374#define WLAN_CAPABILITY_DMG_CBAP_SOURCE (1<<3)
1324#define WLAN_CAPABILITY_DMG_PRIVACY (1<<4) 1375#define WLAN_CAPABILITY_DMG_PRIVACY (1<<4)
1325#define WLAN_CAPABILITY_DMG_ECPAC (1<<5) 1376#define WLAN_CAPABILITY_DMG_ECPAC (1<<5)
1326 1377
@@ -1576,6 +1627,7 @@ enum ieee80211_eid {
1576 1627
1577 WLAN_EID_VHT_CAPABILITY = 191, 1628 WLAN_EID_VHT_CAPABILITY = 191,
1578 WLAN_EID_VHT_OPERATION = 192, 1629 WLAN_EID_VHT_OPERATION = 192,
1630 WLAN_EID_OPMODE_NOTIF = 199,
1579 1631
1580 /* 802.11ad */ 1632 /* 802.11ad */
1581 WLAN_EID_NON_TX_BSSID_CAP = 83, 1633 WLAN_EID_NON_TX_BSSID_CAP = 83,
@@ -1630,6 +1682,7 @@ enum ieee80211_category {
1630 WLAN_CATEGORY_WMM = 17, 1682 WLAN_CATEGORY_WMM = 17,
1631 WLAN_CATEGORY_FST = 18, 1683 WLAN_CATEGORY_FST = 18,
1632 WLAN_CATEGORY_UNPROT_DMG = 20, 1684 WLAN_CATEGORY_UNPROT_DMG = 20,
1685 WLAN_CATEGORY_VHT = 21,
1633 WLAN_CATEGORY_VENDOR_SPECIFIC_PROTECTED = 126, 1686 WLAN_CATEGORY_VENDOR_SPECIFIC_PROTECTED = 126,
1634 WLAN_CATEGORY_VENDOR_SPECIFIC = 127, 1687 WLAN_CATEGORY_VENDOR_SPECIFIC = 127,
1635}; 1688};
@@ -1655,6 +1708,13 @@ enum ieee80211_ht_actioncode {
1655 WLAN_HT_ACTION_ASEL_IDX_FEEDBACK = 7, 1708 WLAN_HT_ACTION_ASEL_IDX_FEEDBACK = 7,
1656}; 1709};
1657 1710
1711/* VHT action codes */
1712enum ieee80211_vht_actioncode {
1713 WLAN_VHT_ACTION_COMPRESSED_BF = 0,
1714 WLAN_VHT_ACTION_GROUPID_MGMT = 1,
1715 WLAN_VHT_ACTION_OPMODE_NOTIF = 2,
1716};
1717
1658/* Self Protected Action codes */ 1718/* Self Protected Action codes */
1659enum ieee80211_self_protected_actioncode { 1719enum ieee80211_self_protected_actioncode {
1660 WLAN_SP_RESERVED = 0, 1720 WLAN_SP_RESERVED = 0,
@@ -1716,6 +1776,8 @@ enum ieee80211_tdls_actioncode {
1716#define WLAN_EXT_CAPA5_TDLS_ENABLED BIT(5) 1776#define WLAN_EXT_CAPA5_TDLS_ENABLED BIT(5)
1717#define WLAN_EXT_CAPA5_TDLS_PROHIBITED BIT(6) 1777#define WLAN_EXT_CAPA5_TDLS_PROHIBITED BIT(6)
1718 1778
1779#define WLAN_EXT_CAPA8_OPMODE_NOTIF BIT(6)
1780
1719/* TDLS specific payload type in the LLC/SNAP header */ 1781/* TDLS specific payload type in the LLC/SNAP header */
1720#define WLAN_TDLS_SNAP_RFTYPE 0x2 1782#define WLAN_TDLS_SNAP_RFTYPE 0x2
1721 1783
@@ -1834,14 +1896,14 @@ struct ieee80211_country_ie_triplet {
1834 u8 first_channel; 1896 u8 first_channel;
1835 u8 num_channels; 1897 u8 num_channels;
1836 s8 max_power; 1898 s8 max_power;
1837 } __attribute__ ((packed)) chans; 1899 } __packed chans;
1838 struct { 1900 struct {
1839 u8 reg_extension_id; 1901 u8 reg_extension_id;
1840 u8 reg_class; 1902 u8 reg_class;
1841 u8 coverage_class; 1903 u8 coverage_class;
1842 } __attribute__ ((packed)) ext; 1904 } __packed ext;
1843 }; 1905 };
1844} __attribute__ ((packed)); 1906} __packed;
1845 1907
1846enum ieee80211_timeout_interval_type { 1908enum ieee80211_timeout_interval_type {
1847 WLAN_TIMEOUT_REASSOC_DEADLINE = 1 /* 802.11r */, 1909 WLAN_TIMEOUT_REASSOC_DEADLINE = 1 /* 802.11r */,
@@ -1884,7 +1946,10 @@ enum ieee80211_sa_query_action {
1884/* AKM suite selectors */ 1946/* AKM suite selectors */
1885#define WLAN_AKM_SUITE_8021X 0x000FAC01 1947#define WLAN_AKM_SUITE_8021X 0x000FAC01
1886#define WLAN_AKM_SUITE_PSK 0x000FAC02 1948#define WLAN_AKM_SUITE_PSK 0x000FAC02
1887#define WLAN_AKM_SUITE_SAE 0x000FAC08 1949#define WLAN_AKM_SUITE_8021X_SHA256 0x000FAC05
1950#define WLAN_AKM_SUITE_PSK_SHA256 0x000FAC06
1951#define WLAN_AKM_SUITE_TDLS 0x000FAC07
1952#define WLAN_AKM_SUITE_SAE 0x000FAC08
1888#define WLAN_AKM_SUITE_FT_OVER_SAE 0x000FAC09 1953#define WLAN_AKM_SUITE_FT_OVER_SAE 0x000FAC09
1889 1954
1890#define WLAN_MAX_KEY_LEN 32 1955#define WLAN_MAX_KEY_LEN 32
@@ -2089,7 +2154,7 @@ static inline unsigned long ieee80211_tu_to_usec(unsigned long tu)
2089 * @tim_len: length of the TIM IE 2154 * @tim_len: length of the TIM IE
2090 * @aid: the AID to look for 2155 * @aid: the AID to look for
2091 */ 2156 */
2092static inline bool ieee80211_check_tim(struct ieee80211_tim_ie *tim, 2157static inline bool ieee80211_check_tim(const struct ieee80211_tim_ie *tim,
2093 u8 tim_len, u16 aid) 2158 u8 tim_len, u16 aid)
2094{ 2159{
2095 u8 mask; 2160 u8 mask;
diff --git a/include/linux/if_macvlan.h b/include/linux/if_macvlan.h
index f65e8d250f7e..84dde1dd1da4 100644
--- a/include/linux/if_macvlan.h
+++ b/include/linux/if_macvlan.h
@@ -52,6 +52,9 @@ struct macvlan_pcpu_stats {
52 */ 52 */
53#define MAX_MACVTAP_QUEUES (NR_CPUS < 16 ? NR_CPUS : 16) 53#define MAX_MACVTAP_QUEUES (NR_CPUS < 16 ? NR_CPUS : 16)
54 54
55#define MACVLAN_MC_FILTER_BITS 8
56#define MACVLAN_MC_FILTER_SZ (1 << MACVLAN_MC_FILTER_BITS)
57
55struct macvlan_dev { 58struct macvlan_dev {
56 struct net_device *dev; 59 struct net_device *dev;
57 struct list_head list; 60 struct list_head list;
@@ -59,6 +62,9 @@ struct macvlan_dev {
59 struct macvlan_port *port; 62 struct macvlan_port *port;
60 struct net_device *lowerdev; 63 struct net_device *lowerdev;
61 struct macvlan_pcpu_stats __percpu *pcpu_stats; 64 struct macvlan_pcpu_stats __percpu *pcpu_stats;
65
66 DECLARE_BITMAP(mc_filter, MACVLAN_MC_FILTER_SZ);
67
62 enum macvlan_mode mode; 68 enum macvlan_mode mode;
63 u16 flags; 69 u16 flags;
64 int (*receive)(struct sk_buff *skb); 70 int (*receive)(struct sk_buff *skb);
diff --git a/include/linux/if_team.h b/include/linux/if_team.h
index 0245def2aa93..4648d8021244 100644
--- a/include/linux/if_team.h
+++ b/include/linux/if_team.h
@@ -186,6 +186,7 @@ struct team {
186 186
187 const struct team_mode *mode; 187 const struct team_mode *mode;
188 struct team_mode_ops ops; 188 struct team_mode_ops ops;
189 bool user_carrier_enabled;
189 bool queue_override_enabled; 190 bool queue_override_enabled;
190 struct list_head *qom_lists; /* array of queue override mapping lists */ 191 struct list_head *qom_lists; /* array of queue override mapping lists */
191 long mode_priv[TEAM_MODE_PRIV_LONGS]; 192 long mode_priv[TEAM_MODE_PRIV_LONGS];
diff --git a/include/linux/in6.h b/include/linux/in6.h
index 9e2ae26fb598..34edf1f6c9a3 100644
--- a/include/linux/in6.h
+++ b/include/linux/in6.h
@@ -22,6 +22,10 @@
22 22
23#include <uapi/linux/in6.h> 23#include <uapi/linux/in6.h>
24 24
25/* IPv6 Wildcard Address (::) and Loopback Address (::1) defined in RFC2553
26 * NOTE: Be aware the IN6ADDR_* constants and in6addr_* externals are defined
27 * in network byte order, not in host byte order as are the IPv4 equivalents
28 */
25extern const struct in6_addr in6addr_any; 29extern const struct in6_addr in6addr_any;
26#define IN6ADDR_ANY_INIT { { { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 } } } 30#define IN6ADDR_ANY_INIT { { { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 } } }
27extern const struct in6_addr in6addr_loopback; 31extern const struct in6_addr in6addr_loopback;
@@ -32,4 +36,13 @@ extern const struct in6_addr in6addr_linklocal_allnodes;
32extern const struct in6_addr in6addr_linklocal_allrouters; 36extern const struct in6_addr in6addr_linklocal_allrouters;
33#define IN6ADDR_LINKLOCAL_ALLROUTERS_INIT \ 37#define IN6ADDR_LINKLOCAL_ALLROUTERS_INIT \
34 { { { 0xff,2,0,0,0,0,0,0,0,0,0,0,0,0,0,2 } } } 38 { { { 0xff,2,0,0,0,0,0,0,0,0,0,0,0,0,0,2 } } }
39extern const struct in6_addr in6addr_interfacelocal_allnodes;
40#define IN6ADDR_INTERFACELOCAL_ALLNODES_INIT \
41 { { { 0xff,1,0,0,0,0,0,0,0,0,0,0,0,0,0,1 } } }
42extern const struct in6_addr in6addr_interfacelocal_allrouters;
43#define IN6ADDR_INTERFACELOCAL_ALLROUTERS_INIT \
44 { { { 0xff,1,0,0,0,0,0,0,0,0,0,0,0,0,0,2 } } }
45extern const struct in6_addr in6addr_sitelocal_allrouters;
46#define IN6ADDR_SITELOCAL_ALLROUTERS_INIT \
47 { { { 0xff,5,0,0,0,0,0,0,0,0,0,0,0,0,0,2 } } }
35#endif 48#endif
diff --git a/include/linux/inetdevice.h b/include/linux/inetdevice.h
index a9d828976a77..ea1e3b863890 100644
--- a/include/linux/inetdevice.h
+++ b/include/linux/inetdevice.h
@@ -166,6 +166,12 @@ struct in_ifaddr {
166 unsigned char ifa_flags; 166 unsigned char ifa_flags;
167 unsigned char ifa_prefixlen; 167 unsigned char ifa_prefixlen;
168 char ifa_label[IFNAMSIZ]; 168 char ifa_label[IFNAMSIZ];
169
170 /* In seconds, relative to tstamp. Expiry is at tstamp + HZ * lft. */
171 __u32 ifa_valid_lft;
172 __u32 ifa_preferred_lft;
173 unsigned long ifa_cstamp; /* created timestamp */
174 unsigned long ifa_tstamp; /* updated timestamp */
169}; 175};
170 176
171extern int register_inetaddr_notifier(struct notifier_block *nb); 177extern int register_inetaddr_notifier(struct notifier_block *nb);
diff --git a/include/linux/ipv6.h b/include/linux/ipv6.h
index faed1e357dd6..850e95bc766c 100644
--- a/include/linux/ipv6.h
+++ b/include/linux/ipv6.h
@@ -77,11 +77,6 @@ static inline struct ipv6hdr *ipipv6_hdr(const struct sk_buff *skb)
77 return (struct ipv6hdr *)skb_transport_header(skb); 77 return (struct ipv6hdr *)skb_transport_header(skb);
78} 78}
79 79
80static inline __u8 ipv6_tclass(const struct ipv6hdr *iph)
81{
82 return (ntohl(*(__be32 *)iph) >> 20) & 0xff;
83}
84
85/* 80/*
86 This structure contains results of exthdrs parsing 81 This structure contains results of exthdrs parsing
87 as offsets from skb->nh. 82 as offsets from skb->nh.
@@ -89,7 +84,7 @@ static inline __u8 ipv6_tclass(const struct ipv6hdr *iph)
89 84
90struct inet6_skb_parm { 85struct inet6_skb_parm {
91 int iif; 86 int iif;
92 __u16 ra; 87 __be16 ra;
93 __u16 hop; 88 __u16 hop;
94 __u16 dst0; 89 __u16 dst0;
95 __u16 srcrt; 90 __u16 srcrt;
@@ -105,6 +100,7 @@ struct inet6_skb_parm {
105#define IP6SKB_XFRM_TRANSFORMED 1 100#define IP6SKB_XFRM_TRANSFORMED 1
106#define IP6SKB_FORWARDED 2 101#define IP6SKB_FORWARDED 2
107#define IP6SKB_REROUTED 4 102#define IP6SKB_REROUTED 4
103#define IP6SKB_ROUTERALERT 8
108}; 104};
109 105
110#define IP6CB(skb) ((struct inet6_skb_parm*)((skb)->cb)) 106#define IP6CB(skb) ((struct inet6_skb_parm*)((skb)->cb))
@@ -218,7 +214,7 @@ struct ipv6_pinfo {
218 214
219 struct ipv6_mc_socklist __rcu *ipv6_mc_list; 215 struct ipv6_mc_socklist __rcu *ipv6_mc_list;
220 struct ipv6_ac_socklist *ipv6_ac_list; 216 struct ipv6_ac_socklist *ipv6_ac_list;
221 struct ipv6_fl_socklist *ipv6_fl_list; 217 struct ipv6_fl_socklist __rcu *ipv6_fl_list;
222 218
223 struct ipv6_txoptions *opt; 219 struct ipv6_txoptions *opt;
224 struct sk_buff *pktoptions; 220 struct sk_buff *pktoptions;
diff --git a/include/linux/micrel_phy.h b/include/linux/micrel_phy.h
index adfe8c058f29..9dbb41a4e250 100644
--- a/include/linux/micrel_phy.h
+++ b/include/linux/micrel_phy.h
@@ -21,8 +21,15 @@
21#define PHY_ID_KSZ8021 0x00221555 21#define PHY_ID_KSZ8021 0x00221555
22#define PHY_ID_KSZ8041 0x00221510 22#define PHY_ID_KSZ8041 0x00221510
23#define PHY_ID_KSZ8051 0x00221550 23#define PHY_ID_KSZ8051 0x00221550
24/* both for ks8001 Rev. A/B, and for ks8721 Rev 3. */ 24/* same id: ks8001 Rev. A/B, and ks8721 Rev 3. */
25#define PHY_ID_KSZ8001 0x0022161A 25#define PHY_ID_KSZ8001 0x0022161A
26/* same id: KS8081, KS8091 */
27#define PHY_ID_KSZ8081 0x00221560
28#define PHY_ID_KSZ8061 0x00221570
29#define PHY_ID_KSZ9031 0x00221620
30
31#define PHY_ID_KSZ886X 0x00221430
32#define PHY_ID_KSZ8863 0x00221435
26 33
27/* struct phy_device dev_flags definitions */ 34/* struct phy_device dev_flags definitions */
28#define MICREL_PHY_50MHZ_CLK 0x00000001 35#define MICREL_PHY_50MHZ_CLK 0x00000001
diff --git a/include/linux/mlx4/device.h b/include/linux/mlx4/device.h
index 20ea939c22a6..6d48fce06b4a 100644
--- a/include/linux/mlx4/device.h
+++ b/include/linux/mlx4/device.h
@@ -150,7 +150,8 @@ enum {
150 MLX4_DEV_CAP_FLAG2_RSS = 1LL << 0, 150 MLX4_DEV_CAP_FLAG2_RSS = 1LL << 0,
151 MLX4_DEV_CAP_FLAG2_RSS_TOP = 1LL << 1, 151 MLX4_DEV_CAP_FLAG2_RSS_TOP = 1LL << 1,
152 MLX4_DEV_CAP_FLAG2_RSS_XOR = 1LL << 2, 152 MLX4_DEV_CAP_FLAG2_RSS_XOR = 1LL << 2,
153 MLX4_DEV_CAP_FLAG2_FS_EN = 1LL << 3 153 MLX4_DEV_CAP_FLAG2_FS_EN = 1LL << 3,
154 MLX4_DEV_CAP_FLAGS2_REASSIGN_MAC_EN = 1LL << 4
154}; 155};
155 156
156enum { 157enum {
@@ -955,9 +956,8 @@ int mlx4_SET_MCAST_FLTR(struct mlx4_dev *dev, u8 port, u64 mac, u64 clear, u8 mo
955 956
956int mlx4_register_mac(struct mlx4_dev *dev, u8 port, u64 mac); 957int mlx4_register_mac(struct mlx4_dev *dev, u8 port, u64 mac);
957void mlx4_unregister_mac(struct mlx4_dev *dev, u8 port, u64 mac); 958void mlx4_unregister_mac(struct mlx4_dev *dev, u8 port, u64 mac);
958int mlx4_replace_mac(struct mlx4_dev *dev, u8 port, int qpn, u64 new_mac); 959int mlx4_get_base_qpn(struct mlx4_dev *dev, u8 port);
959int mlx4_get_eth_qp(struct mlx4_dev *dev, u8 port, u64 mac, int *qpn); 960int __mlx4_replace_mac(struct mlx4_dev *dev, u8 port, int qpn, u64 new_mac);
960void mlx4_put_eth_qp(struct mlx4_dev *dev, u8 port, u64 mac, int qpn);
961void mlx4_set_stats_bitmap(struct mlx4_dev *dev, u64 *stats_bitmap); 961void mlx4_set_stats_bitmap(struct mlx4_dev *dev, u64 *stats_bitmap);
962int mlx4_SET_PORT_general(struct mlx4_dev *dev, u8 port, int mtu, 962int mlx4_SET_PORT_general(struct mlx4_dev *dev, u8 port, int mtu,
963 u8 pptx, u8 pfctx, u8 pprx, u8 pfcrx); 963 u8 pptx, u8 pfctx, u8 pprx, u8 pfcrx);
diff --git a/include/linux/mroute.h b/include/linux/mroute.h
index ea00d9162ee5..79aaa9fc1a15 100644
--- a/include/linux/mroute.h
+++ b/include/linux/mroute.h
@@ -9,7 +9,7 @@
9#ifdef CONFIG_IP_MROUTE 9#ifdef CONFIG_IP_MROUTE
10static inline int ip_mroute_opt(int opt) 10static inline int ip_mroute_opt(int opt)
11{ 11{
12 return (opt >= MRT_BASE) && (opt <= MRT_BASE + 10); 12 return (opt >= MRT_BASE) && (opt <= MRT_MAX);
13} 13}
14#else 14#else
15static inline int ip_mroute_opt(int opt) 15static inline int ip_mroute_opt(int opt)
diff --git a/include/linux/mroute6.h b/include/linux/mroute6.h
index a223561ba12e..66982e764051 100644
--- a/include/linux/mroute6.h
+++ b/include/linux/mroute6.h
@@ -10,7 +10,7 @@
10#ifdef CONFIG_IPV6_MROUTE 10#ifdef CONFIG_IPV6_MROUTE
11static inline int ip6_mroute_opt(int opt) 11static inline int ip6_mroute_opt(int opt)
12{ 12{
13 return (opt >= MRT6_BASE) && (opt <= MRT6_BASE + 10); 13 return (opt >= MRT6_BASE) && (opt <= MRT6_MAX);
14} 14}
15#else 15#else
16static inline int ip6_mroute_opt(int opt) 16static inline int ip6_mroute_opt(int opt)
diff --git a/include/linux/netdev_features.h b/include/linux/netdev_features.h
index 5ac32123035a..3dd39340430e 100644
--- a/include/linux/netdev_features.h
+++ b/include/linux/netdev_features.h
@@ -41,7 +41,7 @@ enum {
41 NETIF_F_TSO_ECN_BIT, /* ... TCP ECN support */ 41 NETIF_F_TSO_ECN_BIT, /* ... TCP ECN support */
42 NETIF_F_TSO6_BIT, /* ... TCPv6 segmentation */ 42 NETIF_F_TSO6_BIT, /* ... TCPv6 segmentation */
43 NETIF_F_FSO_BIT, /* ... FCoE segmentation */ 43 NETIF_F_FSO_BIT, /* ... FCoE segmentation */
44 NETIF_F_GSO_RESERVED1, /* ... free (fill GSO_MASK to 8 bits) */ 44 NETIF_F_GSO_GRE_BIT, /* ... GRE with TSO */
45 /**/NETIF_F_GSO_LAST, /* [can't be last bit, see GSO_MASK] */ 45 /**/NETIF_F_GSO_LAST, /* [can't be last bit, see GSO_MASK] */
46 NETIF_F_GSO_RESERVED2 /* ... free (fill GSO_MASK to 8 bits) */ 46 NETIF_F_GSO_RESERVED2 /* ... free (fill GSO_MASK to 8 bits) */
47 = NETIF_F_GSO_LAST, 47 = NETIF_F_GSO_LAST,
@@ -102,6 +102,7 @@ enum {
102#define NETIF_F_VLAN_CHALLENGED __NETIF_F(VLAN_CHALLENGED) 102#define NETIF_F_VLAN_CHALLENGED __NETIF_F(VLAN_CHALLENGED)
103#define NETIF_F_RXFCS __NETIF_F(RXFCS) 103#define NETIF_F_RXFCS __NETIF_F(RXFCS)
104#define NETIF_F_RXALL __NETIF_F(RXALL) 104#define NETIF_F_RXALL __NETIF_F(RXALL)
105#define NETIF_F_GRE_GSO __NETIF_F(GSO_GRE)
105 106
106/* Features valid for ethtool to change */ 107/* Features valid for ethtool to change */
107/* = all defined minus driver/device-class-related */ 108/* = all defined minus driver/device-class-related */
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index 9ef07d0868b6..b3d00fa4b314 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -67,6 +67,8 @@ extern void netdev_set_default_ethtool_ops(struct net_device *dev,
67#define NET_ADDR_PERM 0 /* address is permanent (default) */ 67#define NET_ADDR_PERM 0 /* address is permanent (default) */
68#define NET_ADDR_RANDOM 1 /* address is generated randomly */ 68#define NET_ADDR_RANDOM 1 /* address is generated randomly */
69#define NET_ADDR_STOLEN 2 /* address is stolen from other device */ 69#define NET_ADDR_STOLEN 2 /* address is stolen from other device */
70#define NET_ADDR_SET 3 /* address is set using
71 * dev_set_mac_address() */
70 72
71/* Backlog congestion levels */ 73/* Backlog congestion levels */
72#define NET_RX_SUCCESS 0 /* keep 'em coming, baby */ 74#define NET_RX_SUCCESS 0 /* keep 'em coming, baby */
@@ -859,8 +861,7 @@ struct netdev_fcoe_hbainfo {
859 * flow_id is a flow ID to be passed to rps_may_expire_flow() later. 861 * flow_id is a flow ID to be passed to rps_may_expire_flow() later.
860 * Return the filter ID on success, or a negative error code. 862 * Return the filter ID on success, or a negative error code.
861 * 863 *
862 * Slave management functions (for bridge, bonding, etc). User should 864 * Slave management functions (for bridge, bonding, etc).
863 * call netdev_set_master() to set dev->master properly.
864 * int (*ndo_add_slave)(struct net_device *dev, struct net_device *slave_dev); 865 * int (*ndo_add_slave)(struct net_device *dev, struct net_device *slave_dev);
865 * Called to make another netdev an underling. 866 * Called to make another netdev an underling.
866 * 867 *
@@ -883,7 +884,8 @@ struct netdev_fcoe_hbainfo {
883 * struct net_device *dev, 884 * struct net_device *dev,
884 * const unsigned char *addr, u16 flags) 885 * const unsigned char *addr, u16 flags)
885 * Adds an FDB entry to dev for addr. 886 * Adds an FDB entry to dev for addr.
886 * int (*ndo_fdb_del)(struct ndmsg *ndm, struct net_device *dev, 887 * int (*ndo_fdb_del)(struct ndmsg *ndm, struct nlattr *tb[],
888 * struct net_device *dev,
887 * const unsigned char *addr) 889 * const unsigned char *addr)
888 * Deletes the FDB entry from dev coresponding to addr. 890 * Deletes the FDB entry from dev coresponding to addr.
889 * int (*ndo_fdb_dump)(struct sk_buff *skb, struct netlink_callback *cb, 891 * int (*ndo_fdb_dump)(struct sk_buff *skb, struct netlink_callback *cb,
@@ -894,6 +896,14 @@ struct netdev_fcoe_hbainfo {
894 * int (*ndo_bridge_setlink)(struct net_device *dev, struct nlmsghdr *nlh) 896 * int (*ndo_bridge_setlink)(struct net_device *dev, struct nlmsghdr *nlh)
895 * int (*ndo_bridge_getlink)(struct sk_buff *skb, u32 pid, u32 seq, 897 * int (*ndo_bridge_getlink)(struct sk_buff *skb, u32 pid, u32 seq,
896 * struct net_device *dev) 898 * struct net_device *dev)
899 *
900 * int (*ndo_change_carrier)(struct net_device *dev, bool new_carrier);
901 * Called to change device carrier. Soft-devices (like dummy, team, etc)
902 * which do not represent real hardware may define this to allow their
903 * userspace components to manage their virtual carrier state. Devices
904 * that determine carrier state from physical hardware properties (eg
905 * network cables) or protocol-dependent mechanisms (eg
906 * USB_CDC_NOTIFY_NETWORK_CONNECTION) should NOT implement this function.
897 */ 907 */
898struct net_device_ops { 908struct net_device_ops {
899 int (*ndo_init)(struct net_device *dev); 909 int (*ndo_init)(struct net_device *dev);
@@ -999,6 +1009,7 @@ struct net_device_ops {
999 const unsigned char *addr, 1009 const unsigned char *addr,
1000 u16 flags); 1010 u16 flags);
1001 int (*ndo_fdb_del)(struct ndmsg *ndm, 1011 int (*ndo_fdb_del)(struct ndmsg *ndm,
1012 struct nlattr *tb[],
1002 struct net_device *dev, 1013 struct net_device *dev,
1003 const unsigned char *addr); 1014 const unsigned char *addr);
1004 int (*ndo_fdb_dump)(struct sk_buff *skb, 1015 int (*ndo_fdb_dump)(struct sk_buff *skb,
@@ -1010,7 +1021,12 @@ struct net_device_ops {
1010 struct nlmsghdr *nlh); 1021 struct nlmsghdr *nlh);
1011 int (*ndo_bridge_getlink)(struct sk_buff *skb, 1022 int (*ndo_bridge_getlink)(struct sk_buff *skb,
1012 u32 pid, u32 seq, 1023 u32 pid, u32 seq,
1013 struct net_device *dev); 1024 struct net_device *dev,
1025 u32 filter_mask);
1026 int (*ndo_bridge_dellink)(struct net_device *dev,
1027 struct nlmsghdr *nlh);
1028 int (*ndo_change_carrier)(struct net_device *dev,
1029 bool new_carrier);
1014}; 1030};
1015 1031
1016/* 1032/*
@@ -1161,9 +1177,7 @@ struct net_device {
1161 * avoid dirtying this cache line. 1177 * avoid dirtying this cache line.
1162 */ 1178 */
1163 1179
1164 struct net_device *master; /* Pointer to master device of a group, 1180 struct list_head upper_dev_list; /* List of upper devices */
1165 * which this device is member of.
1166 */
1167 1181
1168 /* Interface address info used in eth_type_trans() */ 1182 /* Interface address info used in eth_type_trans() */
1169 unsigned char *dev_addr; /* hw address, (before bcast 1183 unsigned char *dev_addr; /* hw address, (before bcast
@@ -1263,7 +1277,7 @@ struct net_device {
1263 void (*destructor)(struct net_device *dev); 1277 void (*destructor)(struct net_device *dev);
1264 1278
1265#ifdef CONFIG_NETPOLL 1279#ifdef CONFIG_NETPOLL
1266 struct netpoll_info *npinfo; 1280 struct netpoll_info __rcu *npinfo;
1267#endif 1281#endif
1268 1282
1269#ifdef CONFIG_NET_NS 1283#ifdef CONFIG_NET_NS
@@ -1277,9 +1291,12 @@ struct net_device {
1277 struct pcpu_lstats __percpu *lstats; /* loopback stats */ 1291 struct pcpu_lstats __percpu *lstats; /* loopback stats */
1278 struct pcpu_tstats __percpu *tstats; /* tunnel stats */ 1292 struct pcpu_tstats __percpu *tstats; /* tunnel stats */
1279 struct pcpu_dstats __percpu *dstats; /* dummy stats */ 1293 struct pcpu_dstats __percpu *dstats; /* dummy stats */
1294 struct pcpu_vstats __percpu *vstats; /* veth stats */
1280 }; 1295 };
1281 /* GARP */ 1296 /* GARP */
1282 struct garp_port __rcu *garp_port; 1297 struct garp_port __rcu *garp_port;
1298 /* MRP */
1299 struct mrp_port __rcu *mrp_port;
1283 1300
1284 /* class/net/name entry */ 1301 /* class/net/name entry */
1285 struct device dev; 1302 struct device dev;
@@ -1396,6 +1413,7 @@ static inline void netdev_for_each_tx_queue(struct net_device *dev,
1396 1413
1397extern struct netdev_queue *netdev_pick_tx(struct net_device *dev, 1414extern struct netdev_queue *netdev_pick_tx(struct net_device *dev,
1398 struct sk_buff *skb); 1415 struct sk_buff *skb);
1416extern u16 __netdev_pick_tx(struct net_device *dev, struct sk_buff *skb);
1399 1417
1400/* 1418/*
1401 * Net namespace inlines 1419 * Net namespace inlines
@@ -2095,6 +2113,18 @@ static inline void netif_wake_subqueue(struct net_device *dev, u16 queue_index)
2095 __netif_schedule(txq->qdisc); 2113 __netif_schedule(txq->qdisc);
2096} 2114}
2097 2115
2116#ifdef CONFIG_XPS
2117extern int netif_set_xps_queue(struct net_device *dev, struct cpumask *mask,
2118 u16 index);
2119#else
2120static inline int netif_set_xps_queue(struct net_device *dev,
2121 struct cpumask *mask,
2122 u16 index)
2123{
2124 return 0;
2125}
2126#endif
2127
2098/* 2128/*
2099 * Returns a Tx hash for the given packet when dev->real_num_tx_queues is used 2129 * Returns a Tx hash for the given packet when dev->real_num_tx_queues is used
2100 * as a distribution range limit for the returned value. 2130 * as a distribution range limit for the returned value.
@@ -2197,6 +2227,8 @@ extern int dev_set_mtu(struct net_device *, int);
2197extern void dev_set_group(struct net_device *, int); 2227extern void dev_set_group(struct net_device *, int);
2198extern int dev_set_mac_address(struct net_device *, 2228extern int dev_set_mac_address(struct net_device *,
2199 struct sockaddr *); 2229 struct sockaddr *);
2230extern int dev_change_carrier(struct net_device *,
2231 bool new_carrier);
2200extern int dev_hard_start_xmit(struct sk_buff *skb, 2232extern int dev_hard_start_xmit(struct sk_buff *skb,
2201 struct net_device *dev, 2233 struct net_device *dev,
2202 struct netdev_queue *txq); 2234 struct netdev_queue *txq);
@@ -2614,7 +2646,6 @@ extern void netdev_notify_peers(struct net_device *dev);
2614extern void netdev_features_change(struct net_device *dev); 2646extern void netdev_features_change(struct net_device *dev);
2615/* Load a device via the kmod */ 2647/* Load a device via the kmod */
2616extern void dev_load(struct net *net, const char *name); 2648extern void dev_load(struct net *net, const char *name);
2617extern void dev_mcast_init(void);
2618extern struct rtnl_link_stats64 *dev_get_stats(struct net_device *dev, 2649extern struct rtnl_link_stats64 *dev_get_stats(struct net_device *dev,
2619 struct rtnl_link_stats64 *storage); 2650 struct rtnl_link_stats64 *storage);
2620extern void netdev_stats_to_stats64(struct rtnl_link_stats64 *stats64, 2651extern void netdev_stats_to_stats64(struct rtnl_link_stats64 *stats64,
@@ -2624,12 +2655,30 @@ extern int netdev_max_backlog;
2624extern int netdev_tstamp_prequeue; 2655extern int netdev_tstamp_prequeue;
2625extern int weight_p; 2656extern int weight_p;
2626extern int bpf_jit_enable; 2657extern int bpf_jit_enable;
2627extern int netdev_set_master(struct net_device *dev, struct net_device *master); 2658
2628extern int netdev_set_bond_master(struct net_device *dev, 2659extern bool netdev_has_upper_dev(struct net_device *dev,
2629 struct net_device *master); 2660 struct net_device *upper_dev);
2661extern bool netdev_has_any_upper_dev(struct net_device *dev);
2662extern struct net_device *netdev_master_upper_dev_get(struct net_device *dev);
2663extern struct net_device *netdev_master_upper_dev_get_rcu(struct net_device *dev);
2664extern int netdev_upper_dev_link(struct net_device *dev,
2665 struct net_device *upper_dev);
2666extern int netdev_master_upper_dev_link(struct net_device *dev,
2667 struct net_device *upper_dev);
2668extern void netdev_upper_dev_unlink(struct net_device *dev,
2669 struct net_device *upper_dev);
2630extern int skb_checksum_help(struct sk_buff *skb); 2670extern int skb_checksum_help(struct sk_buff *skb);
2631extern struct sk_buff *skb_gso_segment(struct sk_buff *skb, 2671extern struct sk_buff *__skb_gso_segment(struct sk_buff *skb,
2632 netdev_features_t features); 2672 netdev_features_t features, bool tx_path);
2673extern struct sk_buff *skb_mac_gso_segment(struct sk_buff *skb,
2674 netdev_features_t features);
2675
2676static inline
2677struct sk_buff *skb_gso_segment(struct sk_buff *skb, netdev_features_t features)
2678{
2679 return __skb_gso_segment(skb, features, true);
2680}
2681
2633#ifdef CONFIG_BUG 2682#ifdef CONFIG_BUG
2634extern void netdev_rx_csum_fault(struct net_device *dev); 2683extern void netdev_rx_csum_fault(struct net_device *dev);
2635#else 2684#else
@@ -2642,9 +2691,9 @@ extern void net_enable_timestamp(void);
2642extern void net_disable_timestamp(void); 2691extern void net_disable_timestamp(void);
2643 2692
2644#ifdef CONFIG_PROC_FS 2693#ifdef CONFIG_PROC_FS
2645extern void *dev_seq_start(struct seq_file *seq, loff_t *pos); 2694extern int __init dev_proc_init(void);
2646extern void *dev_seq_next(struct seq_file *seq, void *v, loff_t *pos); 2695#else
2647extern void dev_seq_stop(struct seq_file *seq, void *v); 2696#define dev_proc_init() 0
2648#endif 2697#endif
2649 2698
2650extern int netdev_class_create_file(struct class_attribute *class_attr); 2699extern int netdev_class_create_file(struct class_attribute *class_attr);
@@ -2846,4 +2895,34 @@ do { \
2846}) 2895})
2847#endif 2896#endif
2848 2897
2898/*
2899 * The list of packet types we will receive (as opposed to discard)
2900 * and the routines to invoke.
2901 *
2902 * Why 16. Because with 16 the only overlap we get on a hash of the
2903 * low nibble of the protocol value is RARP/SNAP/X.25.
2904 *
2905 * NOTE: That is no longer true with the addition of VLAN tags. Not
2906 * sure which should go first, but I bet it won't make much
2907 * difference if we are running VLANs. The good news is that
2908 * this protocol won't be in the list unless compiled in, so
2909 * the average user (w/out VLANs) will not be adversely affected.
2910 * --BLG
2911 *
2912 * 0800 IP
2913 * 8100 802.1Q VLAN
2914 * 0001 802.3
2915 * 0002 AX.25
2916 * 0004 802.2
2917 * 8035 RARP
2918 * 0005 SNAP
2919 * 0805 X.25
2920 * 0806 ARP
2921 * 8137 IPX
2922 * 0009 Localtalk
2923 * 86DD IPv6
2924 */
2925#define PTYPE_HASH_SIZE (16)
2926#define PTYPE_HASH_MASK (PTYPE_HASH_SIZE - 1)
2927
2849#endif /* _LINUX_NETDEVICE_H */ 2928#endif /* _LINUX_NETDEVICE_H */
diff --git a/include/linux/netfilter/nf_conntrack_sip.h b/include/linux/netfilter/nf_conntrack_sip.h
index 387bdd02945d..ba7f571a2b1c 100644
--- a/include/linux/netfilter/nf_conntrack_sip.h
+++ b/include/linux/netfilter/nf_conntrack_sip.h
@@ -4,12 +4,15 @@
4 4
5#include <net/netfilter/nf_conntrack_expect.h> 5#include <net/netfilter/nf_conntrack_expect.h>
6 6
7#include <linux/types.h>
8
7#define SIP_PORT 5060 9#define SIP_PORT 5060
8#define SIP_TIMEOUT 3600 10#define SIP_TIMEOUT 3600
9 11
10struct nf_ct_sip_master { 12struct nf_ct_sip_master {
11 unsigned int register_cseq; 13 unsigned int register_cseq;
12 unsigned int invite_cseq; 14 unsigned int invite_cseq;
15 __be16 forced_dport;
13}; 16};
14 17
15enum sip_expectation_classes { 18enum sip_expectation_classes {
diff --git a/include/linux/netfilter/nfnetlink.h b/include/linux/netfilter/nfnetlink.h
index 4966ddec039b..ecbb8e495912 100644
--- a/include/linux/netfilter/nfnetlink.h
+++ b/include/linux/netfilter/nfnetlink.h
@@ -34,8 +34,8 @@ extern int nfnetlink_send(struct sk_buff *skb, struct net *net, u32 pid, unsigne
34extern int nfnetlink_set_err(struct net *net, u32 pid, u32 group, int error); 34extern int nfnetlink_set_err(struct net *net, u32 pid, u32 group, int error);
35extern int nfnetlink_unicast(struct sk_buff *skb, struct net *net, u_int32_t pid, int flags); 35extern int nfnetlink_unicast(struct sk_buff *skb, struct net *net, u_int32_t pid, int flags);
36 36
37extern void nfnl_lock(void); 37extern void nfnl_lock(__u8 subsys_id);
38extern void nfnl_unlock(void); 38extern void nfnl_unlock(__u8 subsys_id);
39 39
40#define MODULE_ALIAS_NFNL_SUBSYS(subsys) \ 40#define MODULE_ALIAS_NFNL_SUBSYS(subsys) \
41 MODULE_ALIAS("nfnetlink-subsys-" __stringify(subsys)) 41 MODULE_ALIAS("nfnetlink-subsys-" __stringify(subsys))
diff --git a/include/linux/netpoll.h b/include/linux/netpoll.h
index 66d5379c305e..9d7d8c64f7c8 100644
--- a/include/linux/netpoll.h
+++ b/include/linux/netpoll.h
@@ -12,28 +12,38 @@
12#include <linux/rcupdate.h> 12#include <linux/rcupdate.h>
13#include <linux/list.h> 13#include <linux/list.h>
14 14
15union inet_addr {
16 __u32 all[4];
17 __be32 ip;
18 __be32 ip6[4];
19 struct in_addr in;
20 struct in6_addr in6;
21};
22
15struct netpoll { 23struct netpoll {
16 struct net_device *dev; 24 struct net_device *dev;
17 char dev_name[IFNAMSIZ]; 25 char dev_name[IFNAMSIZ];
18 const char *name; 26 const char *name;
19 void (*rx_hook)(struct netpoll *, int, char *, int); 27 void (*rx_hook)(struct netpoll *, int, char *, int);
20 28
21 __be32 local_ip, remote_ip; 29 union inet_addr local_ip, remote_ip;
30 bool ipv6;
22 u16 local_port, remote_port; 31 u16 local_port, remote_port;
23 u8 remote_mac[ETH_ALEN]; 32 u8 remote_mac[ETH_ALEN];
24 33
25 struct list_head rx; /* rx_np list element */ 34 struct list_head rx; /* rx_np list element */
26 struct rcu_head rcu; 35 struct work_struct cleanup_work;
27}; 36};
28 37
29struct netpoll_info { 38struct netpoll_info {
30 atomic_t refcnt; 39 atomic_t refcnt;
31 40
32 int rx_flags; 41 unsigned long rx_flags;
33 spinlock_t rx_lock; 42 spinlock_t rx_lock;
43 struct mutex dev_lock;
34 struct list_head rx_np; /* netpolls that registered an rx_hook */ 44 struct list_head rx_np; /* netpolls that registered an rx_hook */
35 45
36 struct sk_buff_head arp_tx; /* list of arp requests to reply to */ 46 struct sk_buff_head neigh_tx; /* list of neigh requests to reply to */
37 struct sk_buff_head txq; 47 struct sk_buff_head txq;
38 48
39 struct delayed_work tx_work; 49 struct delayed_work tx_work;
@@ -42,6 +52,14 @@ struct netpoll_info {
42 struct rcu_head rcu; 52 struct rcu_head rcu;
43}; 53};
44 54
55#ifdef CONFIG_NETPOLL
56extern int netpoll_rx_disable(struct net_device *dev);
57extern void netpoll_rx_enable(struct net_device *dev);
58#else
59static inline int netpoll_rx_disable(struct net_device *dev) { return 0; }
60static inline void netpoll_rx_enable(struct net_device *dev) { return; }
61#endif
62
45void netpoll_send_udp(struct netpoll *np, const char *msg, int len); 63void netpoll_send_udp(struct netpoll *np, const char *msg, int len);
46void netpoll_print_options(struct netpoll *np); 64void netpoll_print_options(struct netpoll *np);
47int netpoll_parse_options(struct netpoll *np, char *opt); 65int netpoll_parse_options(struct netpoll *np, char *opt);
@@ -50,7 +68,7 @@ int netpoll_setup(struct netpoll *np);
50int netpoll_trap(void); 68int netpoll_trap(void);
51void netpoll_set_trap(int trap); 69void netpoll_set_trap(int trap);
52void __netpoll_cleanup(struct netpoll *np); 70void __netpoll_cleanup(struct netpoll *np);
53void __netpoll_free_rcu(struct netpoll *np); 71void __netpoll_free_async(struct netpoll *np);
54void netpoll_cleanup(struct netpoll *np); 72void netpoll_cleanup(struct netpoll *np);
55int __netpoll_rx(struct sk_buff *skb, struct netpoll_info *npinfo); 73int __netpoll_rx(struct sk_buff *skb, struct netpoll_info *npinfo);
56void netpoll_send_skb_on_dev(struct netpoll *np, struct sk_buff *skb, 74void netpoll_send_skb_on_dev(struct netpoll *np, struct sk_buff *skb,
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h
index 0eb65796bcb9..907e7e56fa4b 100644
--- a/include/linux/pci_ids.h
+++ b/include/linux/pci_ids.h
@@ -2127,6 +2127,7 @@
2127#define PCI_DEVICE_ID_TIGON3_5754M 0x1672 2127#define PCI_DEVICE_ID_TIGON3_5754M 0x1672
2128#define PCI_DEVICE_ID_TIGON3_5755M 0x1673 2128#define PCI_DEVICE_ID_TIGON3_5755M 0x1673
2129#define PCI_DEVICE_ID_TIGON3_5756 0x1674 2129#define PCI_DEVICE_ID_TIGON3_5756 0x1674
2130#define PCI_DEVICE_ID_TIGON3_5750 0x1676
2130#define PCI_DEVICE_ID_TIGON3_5751 0x1677 2131#define PCI_DEVICE_ID_TIGON3_5751 0x1677
2131#define PCI_DEVICE_ID_TIGON3_5715 0x1678 2132#define PCI_DEVICE_ID_TIGON3_5715 0x1678
2132#define PCI_DEVICE_ID_TIGON3_5715S 0x1679 2133#define PCI_DEVICE_ID_TIGON3_5715S 0x1679
diff --git a/include/linux/phy.h b/include/linux/phy.h
index 93b3cf77f564..33999adbf8c8 100644
--- a/include/linux/phy.h
+++ b/include/linux/phy.h
@@ -506,13 +506,13 @@ struct phy_device *get_phy_device(struct mii_bus *bus, int addr, bool is_c45);
506int phy_device_register(struct phy_device *phy); 506int phy_device_register(struct phy_device *phy);
507int phy_init_hw(struct phy_device *phydev); 507int phy_init_hw(struct phy_device *phydev);
508struct phy_device * phy_attach(struct net_device *dev, 508struct phy_device * phy_attach(struct net_device *dev,
509 const char *bus_id, u32 flags, phy_interface_t interface); 509 const char *bus_id, phy_interface_t interface);
510struct phy_device *phy_find_first(struct mii_bus *bus); 510struct phy_device *phy_find_first(struct mii_bus *bus);
511int phy_connect_direct(struct net_device *dev, struct phy_device *phydev, 511int phy_connect_direct(struct net_device *dev, struct phy_device *phydev,
512 void (*handler)(struct net_device *), u32 flags, 512 void (*handler)(struct net_device *),
513 phy_interface_t interface); 513 phy_interface_t interface);
514struct phy_device * phy_connect(struct net_device *dev, const char *bus_id, 514struct phy_device * phy_connect(struct net_device *dev, const char *bus_id,
515 void (*handler)(struct net_device *), u32 flags, 515 void (*handler)(struct net_device *),
516 phy_interface_t interface); 516 phy_interface_t interface);
517void phy_disconnect(struct phy_device *phydev); 517void phy_disconnect(struct phy_device *phydev);
518void phy_detach(struct phy_device *phydev); 518void phy_detach(struct phy_device *phydev);
diff --git a/include/linux/platform_data/cpsw.h b/include/linux/platform_data/cpsw.h
index 24368a2e8b87..798fb80b024b 100644
--- a/include/linux/platform_data/cpsw.h
+++ b/include/linux/platform_data/cpsw.h
@@ -21,6 +21,8 @@ struct cpsw_slave_data {
21 char phy_id[MII_BUS_ID_SIZE]; 21 char phy_id[MII_BUS_ID_SIZE];
22 int phy_if; 22 int phy_if;
23 u8 mac_addr[ETH_ALEN]; 23 u8 mac_addr[ETH_ALEN];
24 u16 dual_emac_res_vlan; /* Reserved VLAN for DualEMAC */
25
24}; 26};
25 27
26struct cpsw_platform_data { 28struct cpsw_platform_data {
@@ -35,6 +37,8 @@ struct cpsw_platform_data {
35 u32 bd_ram_size; /*buffer descriptor ram size */ 37 u32 bd_ram_size; /*buffer descriptor ram size */
36 u32 rx_descs; /* Number of Rx Descriptios */ 38 u32 rx_descs; /* Number of Rx Descriptios */
37 u32 mac_control; /* Mac control register */ 39 u32 mac_control; /* Mac control register */
40 u16 default_vlan; /* Def VLAN for ALE lookup in VLAN aware mode*/
41 bool dual_emac; /* Enable Dual EMAC mode */
38}; 42};
39 43
40#endif /* __CPSW_H__ */ 44#endif /* __CPSW_H__ */
diff --git a/include/linux/platform_data/microread.h b/include/linux/platform_data/microread.h
new file mode 100644
index 000000000000..cfda59b226ee
--- /dev/null
+++ b/include/linux/platform_data/microread.h
@@ -0,0 +1,35 @@
1/*
2 * Driver include for the PN544 NFC chip.
3 *
4 * Copyright (C) 2011 Tieto Poland
5 * Copyright (C) 2012 Intel Corporation. All rights reserved.
6 *
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License
9 * version 2 as published by the Free Software Foundation.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 */
20
21#ifndef _MICROREAD_H
22#define _MICROREAD_H
23
24#include <linux/i2c.h>
25
26#define MICROREAD_DRIVER_NAME "microread"
27
28/* board config platform data for microread */
29struct microread_nfc_platform_data {
30 unsigned int rst_gpio;
31 unsigned int irq_gpio;
32 unsigned int ioh_gpio;
33};
34
35#endif /* _MICROREAD_H */
diff --git a/include/linux/proc_fs.h b/include/linux/proc_fs.h
index 32676b35d2f5..d0a1f2ca1c3f 100644
--- a/include/linux/proc_fs.h
+++ b/include/linux/proc_fs.h
@@ -171,9 +171,6 @@ static inline struct proc_dir_entry *create_proc_read_entry(const char *name,
171 return res; 171 return res;
172} 172}
173 173
174extern struct proc_dir_entry *proc_net_fops_create(struct net *net,
175 const char *name, umode_t mode, const struct file_operations *fops);
176extern void proc_net_remove(struct net *net, const char *name);
177extern struct proc_dir_entry *proc_net_mkdir(struct net *net, const char *name, 174extern struct proc_dir_entry *proc_net_mkdir(struct net *net, const char *name,
178 struct proc_dir_entry *parent); 175 struct proc_dir_entry *parent);
179 176
@@ -184,21 +181,15 @@ extern int proc_alloc_inum(unsigned int *pino);
184extern void proc_free_inum(unsigned int inum); 181extern void proc_free_inum(unsigned int inum);
185#else 182#else
186 183
187#define proc_net_fops_create(net, name, mode, fops) ({ (void)(mode), NULL; })
188static inline void proc_net_remove(struct net *net, const char *name) {}
189
190static inline void proc_flush_task(struct task_struct *task) 184static inline void proc_flush_task(struct task_struct *task)
191{ 185{
192} 186}
193 187
194static inline struct proc_dir_entry *create_proc_entry(const char *name, 188static inline struct proc_dir_entry *create_proc_entry(const char *name,
195 umode_t mode, struct proc_dir_entry *parent) { return NULL; } 189 umode_t mode, struct proc_dir_entry *parent) { return NULL; }
196static inline struct proc_dir_entry *proc_create(const char *name, 190
197 umode_t mode, struct proc_dir_entry *parent, 191#define proc_create(name, mode, parent, fops) ({ (void)(mode), NULL; })
198 const struct file_operations *proc_fops) 192
199{
200 return NULL;
201}
202static inline struct proc_dir_entry *proc_create_data(const char *name, 193static inline struct proc_dir_entry *proc_create_data(const char *name,
203 umode_t mode, struct proc_dir_entry *parent, 194 umode_t mode, struct proc_dir_entry *parent,
204 const struct file_operations *proc_fops, void *data) 195 const struct file_operations *proc_fops, void *data)
diff --git a/include/linux/random.h b/include/linux/random.h
index d9846088c2c5..347ce553a306 100644
--- a/include/linux/random.h
+++ b/include/linux/random.h
@@ -74,4 +74,10 @@ static inline int arch_get_random_int(unsigned int *v)
74} 74}
75#endif 75#endif
76 76
77/* Pseudo random number generator from numerical recipes. */
78static inline u32 next_pseudo_random32(u32 seed)
79{
80 return seed * 1664525 + 1013904223;
81}
82
77#endif /* _LINUX_RANDOM_H */ 83#endif /* _LINUX_RANDOM_H */
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
index 320e976d5ab8..821c7f45d2a7 100644
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -230,6 +230,13 @@ enum {
230 230
231 /* generate wifi status information (where possible) */ 231 /* generate wifi status information (where possible) */
232 SKBTX_WIFI_STATUS = 1 << 4, 232 SKBTX_WIFI_STATUS = 1 << 4,
233
234 /* This indicates at least one fragment might be overwritten
235 * (as in vmsplice(), sendfile() ...)
236 * If we need to compute a TX checksum, we'll need to copy
237 * all frags to avoid possible bad checksum
238 */
239 SKBTX_SHARED_FRAG = 1 << 5,
233}; 240};
234 241
235/* 242/*
@@ -307,6 +314,8 @@ enum {
307 SKB_GSO_TCPV6 = 1 << 4, 314 SKB_GSO_TCPV6 = 1 << 4,
308 315
309 SKB_GSO_FCOE = 1 << 5, 316 SKB_GSO_FCOE = 1 << 5,
317
318 SKB_GSO_GRE = 1 << 6,
310}; 319};
311 320
312#if BITS_PER_LONG > 32 321#if BITS_PER_LONG > 32
@@ -797,6 +806,16 @@ static inline int skb_cloned(const struct sk_buff *skb)
797 (atomic_read(&skb_shinfo(skb)->dataref) & SKB_DATAREF_MASK) != 1; 806 (atomic_read(&skb_shinfo(skb)->dataref) & SKB_DATAREF_MASK) != 1;
798} 807}
799 808
809static inline int skb_unclone(struct sk_buff *skb, gfp_t pri)
810{
811 might_sleep_if(pri & __GFP_WAIT);
812
813 if (skb_cloned(skb))
814 return pskb_expand_head(skb, 0, 0, pri);
815
816 return 0;
817}
818
800/** 819/**
801 * skb_header_cloned - is the header a clone 820 * skb_header_cloned - is the header a clone
802 * @skb: buffer to check 821 * @skb: buffer to check
@@ -1492,6 +1511,11 @@ static inline void skb_set_inner_network_header(struct sk_buff *skb,
1492 skb->inner_network_header += offset; 1511 skb->inner_network_header += offset;
1493} 1512}
1494 1513
1514static inline bool skb_transport_header_was_set(const struct sk_buff *skb)
1515{
1516 return skb->transport_header != ~0U;
1517}
1518
1495static inline unsigned char *skb_transport_header(const struct sk_buff *skb) 1519static inline unsigned char *skb_transport_header(const struct sk_buff *skb)
1496{ 1520{
1497 return skb->head + skb->transport_header; 1521 return skb->head + skb->transport_header;
@@ -1580,6 +1604,11 @@ static inline void skb_set_inner_network_header(struct sk_buff *skb,
1580 skb->inner_network_header = skb->data + offset; 1604 skb->inner_network_header = skb->data + offset;
1581} 1605}
1582 1606
1607static inline bool skb_transport_header_was_set(const struct sk_buff *skb)
1608{
1609 return skb->transport_header != NULL;
1610}
1611
1583static inline unsigned char *skb_transport_header(const struct sk_buff *skb) 1612static inline unsigned char *skb_transport_header(const struct sk_buff *skb)
1584{ 1613{
1585 return skb->transport_header; 1614 return skb->transport_header;
@@ -1815,6 +1844,10 @@ static inline void __skb_queue_purge(struct sk_buff_head *list)
1815 kfree_skb(skb); 1844 kfree_skb(skb);
1816} 1845}
1817 1846
1847#define NETDEV_FRAG_PAGE_MAX_ORDER get_order(32768)
1848#define NETDEV_FRAG_PAGE_MAX_SIZE (PAGE_SIZE << NETDEV_FRAG_PAGE_MAX_ORDER)
1849#define NETDEV_PAGECNT_MAX_BIAS NETDEV_FRAG_PAGE_MAX_SIZE
1850
1818extern void *netdev_alloc_frag(unsigned int fragsz); 1851extern void *netdev_alloc_frag(unsigned int fragsz);
1819 1852
1820extern struct sk_buff *__netdev_alloc_skb(struct net_device *dev, 1853extern struct sk_buff *__netdev_alloc_skb(struct net_device *dev,
@@ -2191,6 +2224,19 @@ static inline int skb_linearize(struct sk_buff *skb)
2191} 2224}
2192 2225
2193/** 2226/**
2227 * skb_has_shared_frag - can any frag be overwritten
2228 * @skb: buffer to test
2229 *
2230 * Return true if the skb has at least one frag that might be modified
2231 * by an external entity (as in vmsplice()/sendfile())
2232 */
2233static inline bool skb_has_shared_frag(const struct sk_buff *skb)
2234{
2235 return skb_is_nonlinear(skb) &&
2236 skb_shinfo(skb)->tx_flags & SKBTX_SHARED_FRAG;
2237}
2238
2239/**
2194 * skb_linearize_cow - make sure skb is linear and writable 2240 * skb_linearize_cow - make sure skb is linear and writable
2195 * @skb: buffer to process 2241 * @skb: buffer to process
2196 * 2242 *
@@ -2688,6 +2734,21 @@ static inline struct sec_path *skb_sec_path(struct sk_buff *skb)
2688} 2734}
2689#endif 2735#endif
2690 2736
2737/* Keeps track of mac header offset relative to skb->head.
2738 * It is useful for TSO of Tunneling protocol. e.g. GRE.
2739 * For non-tunnel skb it points to skb_mac_header() and for
2740 * tunnel skb it points to outer mac header. */
2741struct skb_gso_cb {
2742 int mac_offset;
2743};
2744#define SKB_GSO_CB(skb) ((struct skb_gso_cb *)(skb)->cb)
2745
2746static inline int skb_tnl_header_len(const struct sk_buff *inner_skb)
2747{
2748 return (skb_mac_header(inner_skb) - inner_skb->head) -
2749 SKB_GSO_CB(inner_skb)->mac_offset;
2750}
2751
2691static inline bool skb_is_gso(const struct sk_buff *skb) 2752static inline bool skb_is_gso(const struct sk_buff *skb)
2692{ 2753{
2693 return skb_shinfo(skb)->gso_size; 2754 return skb_shinfo(skb)->gso_size;
diff --git a/include/linux/socket.h b/include/linux/socket.h
index 9a546ff853dc..2b9f74b0ffea 100644
--- a/include/linux/socket.h
+++ b/include/linux/socket.h
@@ -178,7 +178,8 @@ struct ucred {
178#define AF_CAIF 37 /* CAIF sockets */ 178#define AF_CAIF 37 /* CAIF sockets */
179#define AF_ALG 38 /* Algorithm sockets */ 179#define AF_ALG 38 /* Algorithm sockets */
180#define AF_NFC 39 /* NFC sockets */ 180#define AF_NFC 39 /* NFC sockets */
181#define AF_MAX 40 /* For now.. */ 181#define AF_VSOCK 40 /* vSockets */
182#define AF_MAX 41 /* For now.. */
182 183
183/* Protocol families, same as address families. */ 184/* Protocol families, same as address families. */
184#define PF_UNSPEC AF_UNSPEC 185#define PF_UNSPEC AF_UNSPEC
@@ -221,6 +222,7 @@ struct ucred {
221#define PF_CAIF AF_CAIF 222#define PF_CAIF AF_CAIF
222#define PF_ALG AF_ALG 223#define PF_ALG AF_ALG
223#define PF_NFC AF_NFC 224#define PF_NFC AF_NFC
225#define PF_VSOCK AF_VSOCK
224#define PF_MAX AF_MAX 226#define PF_MAX AF_MAX
225 227
226/* Maximum queue length specifiable by listen. */ 228/* Maximum queue length specifiable by listen. */
diff --git a/include/linux/ssb/ssb_driver_gige.h b/include/linux/ssb/ssb_driver_gige.h
index 6b05dcd927ff..86a12b0cb239 100644
--- a/include/linux/ssb/ssb_driver_gige.h
+++ b/include/linux/ssb/ssb_driver_gige.h
@@ -97,21 +97,16 @@ static inline bool ssb_gige_must_flush_posted_writes(struct pci_dev *pdev)
97 return 0; 97 return 0;
98} 98}
99 99
100#ifdef CONFIG_BCM47XX
101#include <asm/mach-bcm47xx/nvram.h>
102/* Get the device MAC address */ 100/* Get the device MAC address */
103static inline void ssb_gige_get_macaddr(struct pci_dev *pdev, u8 *macaddr) 101static inline int ssb_gige_get_macaddr(struct pci_dev *pdev, u8 *macaddr)
104{
105 char buf[20];
106 if (nvram_getenv("et0macaddr", buf, sizeof(buf)) < 0)
107 return;
108 nvram_parse_macaddr(buf, macaddr);
109}
110#else
111static inline void ssb_gige_get_macaddr(struct pci_dev *pdev, u8 *macaddr)
112{ 102{
103 struct ssb_gige *dev = pdev_to_ssb_gige(pdev);
104 if (!dev)
105 return -ENODEV;
106
107 memcpy(macaddr, dev->dev->bus->sprom.et0mac, 6);
108 return 0;
113} 109}
114#endif
115 110
116extern int ssb_gige_pcibios_plat_dev_init(struct ssb_device *sdev, 111extern int ssb_gige_pcibios_plat_dev_init(struct ssb_device *sdev,
117 struct pci_dev *pdev); 112 struct pci_dev *pdev);
@@ -175,6 +170,10 @@ static inline bool ssb_gige_must_flush_posted_writes(struct pci_dev *pdev)
175{ 170{
176 return 0; 171 return 0;
177} 172}
173static inline int ssb_gige_get_macaddr(struct pci_dev *pdev, u8 *macaddr)
174{
175 return -ENODEV;
176}
178 177
179#endif /* CONFIG_SSB_DRIVER_GIGE */ 178#endif /* CONFIG_SSB_DRIVER_GIGE */
180#endif /* LINUX_SSB_DRIVER_GIGE_H_ */ 179#endif /* LINUX_SSB_DRIVER_GIGE_H_ */
diff --git a/include/linux/ssb/ssb_driver_mips.h b/include/linux/ssb/ssb_driver_mips.h
index 07a9c7a2e088..afe79d40a99e 100644
--- a/include/linux/ssb/ssb_driver_mips.h
+++ b/include/linux/ssb/ssb_driver_mips.h
@@ -45,6 +45,11 @@ void ssb_mipscore_init(struct ssb_mipscore *mcore)
45{ 45{
46} 46}
47 47
48static inline unsigned int ssb_mips_irq(struct ssb_device *dev)
49{
50 return 0;
51}
52
48#endif /* CONFIG_SSB_DRIVER_MIPS */ 53#endif /* CONFIG_SSB_DRIVER_MIPS */
49 54
50#endif /* LINUX_SSB_MIPSCORE_H_ */ 55#endif /* LINUX_SSB_MIPSCORE_H_ */
diff --git a/include/linux/tcp.h b/include/linux/tcp.h
index 4e1d2283e3cc..f28408c07dc2 100644
--- a/include/linux/tcp.h
+++ b/include/linux/tcp.h
@@ -162,6 +162,8 @@ struct tcp_sock {
162 u32 rcv_tstamp; /* timestamp of last received ACK (for keepalives) */ 162 u32 rcv_tstamp; /* timestamp of last received ACK (for keepalives) */
163 u32 lsndtime; /* timestamp of last sent data packet (for restart window) */ 163 u32 lsndtime; /* timestamp of last sent data packet (for restart window) */
164 164
165 u32 tsoffset; /* timestamp offset */
166
165 struct list_head tsq_node; /* anchor in tsq_tasklet.head list */ 167 struct list_head tsq_node; /* anchor in tsq_tasklet.head list */
166 unsigned long tsq_flags; 168 unsigned long tsq_flags;
167 169
@@ -246,7 +248,6 @@ struct tcp_sock {
246 u32 sacked_out; /* SACK'd packets */ 248 u32 sacked_out; /* SACK'd packets */
247 u32 fackets_out; /* FACK'd packets */ 249 u32 fackets_out; /* FACK'd packets */
248 u32 tso_deferred; 250 u32 tso_deferred;
249 u32 bytes_acked; /* Appropriate Byte Counting - RFC3465 */
250 251
251 /* from STCP, retrans queue hinting */ 252 /* from STCP, retrans queue hinting */
252 struct sk_buff* lost_skb_hint; 253 struct sk_buff* lost_skb_hint;
@@ -354,6 +355,7 @@ struct tcp_timewait_sock {
354 u32 tw_rcv_nxt; 355 u32 tw_rcv_nxt;
355 u32 tw_snd_nxt; 356 u32 tw_snd_nxt;
356 u32 tw_rcv_wnd; 357 u32 tw_rcv_wnd;
358 u32 tw_ts_offset;
357 u32 tw_ts_recent; 359 u32 tw_ts_recent;
358 long tw_ts_recent_stamp; 360 long tw_ts_recent_stamp;
359#ifdef CONFIG_TCP_MD5SIG 361#ifdef CONFIG_TCP_MD5SIG
diff --git a/include/linux/wanrouter.h b/include/linux/wanrouter.h
index cec4b4159767..8198a63cf459 100644
--- a/include/linux/wanrouter.h
+++ b/include/linux/wanrouter.h
@@ -1,129 +1,10 @@
1/***************************************************************************** 1/*
2* wanrouter.h Definitions for the WAN Multiprotocol Router Module. 2 * wanrouter.h Legacy declarations kept around until X25 is removed
3* This module provides API and common services for WAN Link 3 */
4* Drivers and is completely hardware-independent. 4
5*
6* Author: Nenad Corbic <ncorbic@sangoma.com>
7* Gideon Hack
8* Additions: Arnaldo Melo
9*
10* Copyright: (c) 1995-2000 Sangoma Technologies Inc.
11*
12* This program is free software; you can redistribute it and/or
13* modify it under the terms of the GNU General Public License
14* as published by the Free Software Foundation; either version
15* 2 of the License, or (at your option) any later version.
16* ============================================================================
17* Jul 21, 2000 Nenad Corbic Added WAN_FT1_READY State
18* Feb 24, 2000 Nenad Corbic Added support for socket based x25api
19* Jan 28, 2000 Nenad Corbic Added support for the ASYNC protocol.
20* Oct 04, 1999 Nenad Corbic Updated for 2.1.0 release
21* Jun 02, 1999 Gideon Hack Added support for the S514 adapter.
22* May 23, 1999 Arnaldo Melo Added local_addr to wanif_conf_t
23* WAN_DISCONNECTING state added
24* Jul 20, 1998 David Fong Added Inverse ARP options to 'wanif_conf_t'
25* Jun 12, 1998 David Fong Added Cisco HDLC support.
26* Dec 16, 1997 Jaspreet Singh Moved 'enable_IPX' and 'network_number' to
27* 'wanif_conf_t'
28* Dec 05, 1997 Jaspreet Singh Added 'pap', 'chap' to 'wanif_conf_t'
29* Added 'authenticator' to 'wan_ppp_conf_t'
30* Nov 06, 1997 Jaspreet Singh Changed Router Driver version to 1.1 from 1.0
31* Oct 20, 1997 Jaspreet Singh Added 'cir','bc','be' and 'mc' to 'wanif_conf_t'
32* Added 'enable_IPX' and 'network_number' to
33* 'wan_device_t'. Also added defines for
34* UDP PACKET TYPE, Interrupt test, critical values
35* for RACE conditions.
36* Oct 05, 1997 Jaspreet Singh Added 'dlci_num' and 'dlci[100]' to
37* 'wan_fr_conf_t' to configure a list of dlci(s)
38* for a NODE
39* Jul 07, 1997 Jaspreet Singh Added 'ttl' to 'wandev_conf_t' & 'wan_device_t'
40* May 29, 1997 Jaspreet Singh Added 'tx_int_enabled' to 'wan_device_t'
41* May 21, 1997 Jaspreet Singh Added 'udp_port' to 'wan_device_t'
42* Apr 25, 1997 Farhan Thawar Added 'udp_port' to 'wandev_conf_t'
43* Jan 16, 1997 Gene Kozin router_devlist made public
44* Jan 02, 1997 Gene Kozin Initial version (based on wanpipe.h).
45*****************************************************************************/
46#ifndef _ROUTER_H 5#ifndef _ROUTER_H
47#define _ROUTER_H 6#define _ROUTER_H
48 7
49#include <uapi/linux/wanrouter.h> 8#include <uapi/linux/wanrouter.h>
50 9
51/****** Kernel Interface ****************************************************/
52
53#include <linux/fs.h> /* support for device drivers */
54#include <linux/proc_fs.h> /* proc filesystem pragmatics */
55#include <linux/netdevice.h> /* support for network drivers */
56#include <linux/spinlock.h> /* Support for SMP Locking */
57
58/*----------------------------------------------------------------------------
59 * WAN device data space.
60 */
61struct wan_device {
62 unsigned magic; /* magic number */
63 char* name; /* -> WAN device name (ASCIIZ) */
64 void* private; /* -> driver private data */
65 unsigned config_id; /* Configuration ID */
66 /****** hardware configuration ******/
67 unsigned ioport; /* adapter I/O port base #1 */
68 char S514_cpu_no[1]; /* PCI CPU Number */
69 unsigned char S514_slot_no; /* PCI Slot Number */
70 unsigned long maddr; /* dual-port memory address */
71 unsigned msize; /* dual-port memory size */
72 int irq; /* interrupt request level */
73 int dma; /* DMA request level */
74 unsigned bps; /* data transfer rate */
75 unsigned mtu; /* max physical transmit unit size */
76 unsigned udp_port; /* UDP port for management */
77 unsigned char ttl; /* Time To Live for UDP security */
78 unsigned enable_tx_int; /* Transmit Interrupt enabled or not */
79 char interface; /* RS-232/V.35, etc. */
80 char clocking; /* external/internal */
81 char line_coding; /* NRZ/NRZI/FM0/FM1, etc. */
82 char station; /* DTE/DCE, primary/secondary, etc. */
83 char connection; /* permanent/switched/on-demand */
84 char signalling; /* Signalling RS232 or V35 */
85 char read_mode; /* read mode: Polling or interrupt */
86 char new_if_cnt; /* Number of interfaces per wanpipe */
87 char del_if_cnt; /* Number of times del_if() gets called */
88 unsigned char piggyback; /* Piggibacking a port */
89 unsigned hw_opt[4]; /* other hardware options */
90 /****** status and statistics *******/
91 char state; /* device state */
92 char api_status; /* device api status */
93 struct net_device_stats stats; /* interface statistics */
94 unsigned reserved[16]; /* reserved for future use */
95 unsigned long critical; /* critical section flag */
96 spinlock_t lock; /* Support for SMP Locking */
97
98 /****** device management methods ***/
99 int (*setup) (struct wan_device *wandev, wandev_conf_t *conf);
100 int (*shutdown) (struct wan_device *wandev);
101 int (*update) (struct wan_device *wandev);
102 int (*ioctl) (struct wan_device *wandev, unsigned cmd,
103 unsigned long arg);
104 int (*new_if)(struct wan_device *wandev, struct net_device *dev,
105 wanif_conf_t *conf);
106 int (*del_if)(struct wan_device *wandev, struct net_device *dev);
107 /****** maintained by the router ****/
108 struct wan_device* next; /* -> next device */
109 struct net_device* dev; /* list of network interfaces */
110 unsigned ndev; /* number of interfaces */
111 struct proc_dir_entry *dent; /* proc filesystem entry */
112};
113
114/* Public functions available for device drivers */
115extern int register_wan_device(struct wan_device *wandev);
116extern int unregister_wan_device(char *name);
117
118/* Proc interface functions. These must not be called by the drivers! */
119extern int wanrouter_proc_init(void);
120extern void wanrouter_proc_cleanup(void);
121extern int wanrouter_proc_add(struct wan_device *wandev);
122extern int wanrouter_proc_delete(struct wan_device *wandev);
123extern long wanrouter_ioctl(struct file *file, unsigned int cmd, unsigned long arg);
124
125/* Public Data */
126/* list of registered devices */
127extern struct wan_device *wanrouter_router_devlist;
128
129#endif /* _ROUTER_H */ 10#endif /* _ROUTER_H */
diff --git a/include/linux/wl12xx.h b/include/linux/wl12xx.h
index 0d6373195d32..a54fe82e704b 100644
--- a/include/linux/wl12xx.h
+++ b/include/linux/wl12xx.h
@@ -24,6 +24,8 @@
24#ifndef _LINUX_WL12XX_H 24#ifndef _LINUX_WL12XX_H
25#define _LINUX_WL12XX_H 25#define _LINUX_WL12XX_H
26 26
27#include <linux/err.h>
28
27/* Reference clock values */ 29/* Reference clock values */
28enum { 30enum {
29 WL12XX_REFCLOCK_19 = 0, /* 19.2 MHz */ 31 WL12XX_REFCLOCK_19 = 0, /* 19.2 MHz */
@@ -55,17 +57,17 @@ struct wl12xx_platform_data {
55 int board_tcxo_clock; 57 int board_tcxo_clock;
56 unsigned long platform_quirks; 58 unsigned long platform_quirks;
57 bool pwr_in_suspend; 59 bool pwr_in_suspend;
58
59 struct wl1271_if_operations *ops;
60}; 60};
61 61
62/* Platform does not support level trigger interrupts */ 62/* Platform does not support level trigger interrupts */
63#define WL12XX_PLATFORM_QUIRK_EDGE_IRQ BIT(0) 63#define WL12XX_PLATFORM_QUIRK_EDGE_IRQ BIT(0)
64 64
65#ifdef CONFIG_WL12XX_PLATFORM_DATA 65#ifdef CONFIG_WILINK_PLATFORM_DATA
66 66
67int wl12xx_set_platform_data(const struct wl12xx_platform_data *data); 67int wl12xx_set_platform_data(const struct wl12xx_platform_data *data);
68 68
69struct wl12xx_platform_data *wl12xx_get_platform_data(void);
70
69#else 71#else
70 72
71static inline 73static inline
@@ -74,8 +76,12 @@ int wl12xx_set_platform_data(const struct wl12xx_platform_data *data)
74 return -ENOSYS; 76 return -ENOSYS;
75} 77}
76 78
77#endif 79static inline
80struct wl12xx_platform_data *wl12xx_get_platform_data(void)
81{
82 return ERR_PTR(-ENODATA);
83}
78 84
79struct wl12xx_platform_data *wl12xx_get_platform_data(void); 85#endif
80 86
81#endif 87#endif