diff options
Diffstat (limited to 'include/linux')
57 files changed, 1856 insertions, 377 deletions
diff --git a/include/linux/Kbuild b/include/linux/Kbuild index b3afd2219ad2..a2df7030d49d 100644 --- a/include/linux/Kbuild +++ b/include/linux/Kbuild | |||
@@ -311,6 +311,7 @@ unifdef-y += ppp-comp.h | |||
311 | unifdef-y += ptrace.h | 311 | unifdef-y += ptrace.h |
312 | unifdef-y += quota.h | 312 | unifdef-y += quota.h |
313 | unifdef-y += random.h | 313 | unifdef-y += random.h |
314 | unifdef-y += rfkill.h | ||
314 | unifdef-y += irqnr.h | 315 | unifdef-y += irqnr.h |
315 | unifdef-y += reboot.h | 316 | unifdef-y += reboot.h |
316 | unifdef-y += reiserfs_fs.h | 317 | unifdef-y += reiserfs_fs.h |
diff --git a/include/linux/can/Kbuild b/include/linux/can/Kbuild index eff898aac02b..8cb05aae661c 100644 --- a/include/linux/can/Kbuild +++ b/include/linux/can/Kbuild | |||
@@ -1,3 +1,4 @@ | |||
1 | header-y += raw.h | 1 | header-y += raw.h |
2 | header-y += bcm.h | 2 | header-y += bcm.h |
3 | header-y += error.h | 3 | header-y += error.h |
4 | header-y += netlink.h | ||
diff --git a/include/linux/can/dev.h b/include/linux/can/dev.h new file mode 100644 index 000000000000..4a37a56f6cdd --- /dev/null +++ b/include/linux/can/dev.h | |||
@@ -0,0 +1,70 @@ | |||
1 | /* | ||
2 | * linux/can/dev.h | ||
3 | * | ||
4 | * Definitions for the CAN network device driver interface | ||
5 | * | ||
6 | * Copyright (C) 2006 Andrey Volkov <avolkov@varma-el.com> | ||
7 | * Varma Electronics Oy | ||
8 | * | ||
9 | * Copyright (C) 2008 Wolfgang Grandegger <wg@grandegger.com> | ||
10 | * | ||
11 | * Send feedback to <socketcan-users@lists.berlios.de> | ||
12 | */ | ||
13 | |||
14 | #ifndef CAN_DEV_H | ||
15 | #define CAN_DEV_H | ||
16 | |||
17 | #include <linux/can/netlink.h> | ||
18 | #include <linux/can/error.h> | ||
19 | |||
20 | /* | ||
21 | * CAN mode | ||
22 | */ | ||
23 | enum can_mode { | ||
24 | CAN_MODE_STOP = 0, | ||
25 | CAN_MODE_START, | ||
26 | CAN_MODE_SLEEP | ||
27 | }; | ||
28 | |||
29 | /* | ||
30 | * CAN common private data | ||
31 | */ | ||
32 | #define CAN_ECHO_SKB_MAX 4 | ||
33 | |||
34 | struct can_priv { | ||
35 | struct can_device_stats can_stats; | ||
36 | |||
37 | struct can_bittiming bittiming; | ||
38 | struct can_bittiming_const *bittiming_const; | ||
39 | struct can_clock clock; | ||
40 | |||
41 | enum can_state state; | ||
42 | u32 ctrlmode; | ||
43 | |||
44 | int restart_ms; | ||
45 | struct timer_list restart_timer; | ||
46 | |||
47 | struct sk_buff *echo_skb[CAN_ECHO_SKB_MAX]; | ||
48 | |||
49 | int (*do_set_bittiming)(struct net_device *dev); | ||
50 | int (*do_set_mode)(struct net_device *dev, enum can_mode mode); | ||
51 | int (*do_get_state)(const struct net_device *dev, | ||
52 | enum can_state *state); | ||
53 | }; | ||
54 | |||
55 | struct net_device *alloc_candev(int sizeof_priv); | ||
56 | void free_candev(struct net_device *dev); | ||
57 | |||
58 | int open_candev(struct net_device *dev); | ||
59 | void close_candev(struct net_device *dev); | ||
60 | |||
61 | int register_candev(struct net_device *dev); | ||
62 | void unregister_candev(struct net_device *dev); | ||
63 | |||
64 | int can_restart_now(struct net_device *dev); | ||
65 | void can_bus_off(struct net_device *dev); | ||
66 | |||
67 | void can_put_echo_skb(struct sk_buff *skb, struct net_device *dev, int idx); | ||
68 | void can_get_echo_skb(struct net_device *dev, int idx); | ||
69 | |||
70 | #endif /* CAN_DEV_H */ | ||
diff --git a/include/linux/can/netlink.h b/include/linux/can/netlink.h new file mode 100644 index 000000000000..9ecbb7871c0e --- /dev/null +++ b/include/linux/can/netlink.h | |||
@@ -0,0 +1,113 @@ | |||
1 | /* | ||
2 | * linux/can/netlink.h | ||
3 | * | ||
4 | * Definitions for the CAN netlink interface | ||
5 | * | ||
6 | * Copyright (c) 2009 Wolfgang Grandegger <wg@grandegger.com> | ||
7 | * | ||
8 | * Send feedback to <socketcan-users@lists.berlios.de> | ||
9 | * | ||
10 | */ | ||
11 | |||
12 | #ifndef CAN_NETLINK_H | ||
13 | #define CAN_NETLINK_H | ||
14 | |||
15 | #include <linux/types.h> | ||
16 | |||
17 | /* | ||
18 | * CAN bit-timing parameters | ||
19 | * | ||
20 | * For futher information, please read chapter "8 BIT TIMING | ||
21 | * REQUIREMENTS" of the "Bosch CAN Specification version 2.0" | ||
22 | * at http://www.semiconductors.bosch.de/pdf/can2spec.pdf. | ||
23 | */ | ||
24 | struct can_bittiming { | ||
25 | __u32 bitrate; /* Bit-rate in bits/second */ | ||
26 | __u32 sample_point; /* Sample point in one-tenth of a percent */ | ||
27 | __u32 tq; /* Time quanta (TQ) in nanoseconds */ | ||
28 | __u32 prop_seg; /* Propagation segment in TQs */ | ||
29 | __u32 phase_seg1; /* Phase buffer segment 1 in TQs */ | ||
30 | __u32 phase_seg2; /* Phase buffer segment 2 in TQs */ | ||
31 | __u32 sjw; /* Synchronisation jump width in TQs */ | ||
32 | __u32 brp; /* Bit-rate prescaler */ | ||
33 | }; | ||
34 | |||
35 | /* | ||
36 | * CAN harware-dependent bit-timing constant | ||
37 | * | ||
38 | * Used for calculating and checking bit-timing parameters | ||
39 | */ | ||
40 | struct can_bittiming_const { | ||
41 | char name[16]; /* Name of the CAN controller hardware */ | ||
42 | __u32 tseg1_min; /* Time segement 1 = prop_seg + phase_seg1 */ | ||
43 | __u32 tseg1_max; | ||
44 | __u32 tseg2_min; /* Time segement 2 = phase_seg2 */ | ||
45 | __u32 tseg2_max; | ||
46 | __u32 sjw_max; /* Synchronisation jump width */ | ||
47 | __u32 brp_min; /* Bit-rate prescaler */ | ||
48 | __u32 brp_max; | ||
49 | __u32 brp_inc; | ||
50 | }; | ||
51 | |||
52 | /* | ||
53 | * CAN clock parameters | ||
54 | */ | ||
55 | struct can_clock { | ||
56 | __u32 freq; /* CAN system clock frequency in Hz */ | ||
57 | }; | ||
58 | |||
59 | /* | ||
60 | * CAN operational and error states | ||
61 | */ | ||
62 | enum can_state { | ||
63 | CAN_STATE_ERROR_ACTIVE = 0, /* RX/TX error count < 96 */ | ||
64 | CAN_STATE_ERROR_WARNING, /* RX/TX error count < 128 */ | ||
65 | CAN_STATE_ERROR_PASSIVE, /* RX/TX error count < 256 */ | ||
66 | CAN_STATE_BUS_OFF, /* RX/TX error count >= 256 */ | ||
67 | CAN_STATE_STOPPED, /* Device is stopped */ | ||
68 | CAN_STATE_SLEEPING, /* Device is sleeping */ | ||
69 | CAN_STATE_MAX | ||
70 | }; | ||
71 | |||
72 | /* | ||
73 | * CAN controller mode | ||
74 | */ | ||
75 | struct can_ctrlmode { | ||
76 | __u32 mask; | ||
77 | __u32 flags; | ||
78 | }; | ||
79 | |||
80 | #define CAN_CTRLMODE_LOOPBACK 0x1 /* Loopback mode */ | ||
81 | #define CAN_CTRLMODE_LISTENONLY 0x2 /* Listen-only mode */ | ||
82 | #define CAN_CTRLMODE_3_SAMPLES 0x4 /* Triple sampling mode */ | ||
83 | |||
84 | /* | ||
85 | * CAN device statistics | ||
86 | */ | ||
87 | struct can_device_stats { | ||
88 | __u32 bus_error; /* Bus errors */ | ||
89 | __u32 error_warning; /* Changes to error warning state */ | ||
90 | __u32 error_passive; /* Changes to error passive state */ | ||
91 | __u32 bus_off; /* Changes to bus off state */ | ||
92 | __u32 arbitration_lost; /* Arbitration lost errors */ | ||
93 | __u32 restarts; /* CAN controller re-starts */ | ||
94 | }; | ||
95 | |||
96 | /* | ||
97 | * CAN netlink interface | ||
98 | */ | ||
99 | enum { | ||
100 | IFLA_CAN_UNSPEC, | ||
101 | IFLA_CAN_BITTIMING, | ||
102 | IFLA_CAN_BITTIMING_CONST, | ||
103 | IFLA_CAN_CLOCK, | ||
104 | IFLA_CAN_STATE, | ||
105 | IFLA_CAN_CTRLMODE, | ||
106 | IFLA_CAN_RESTART_MS, | ||
107 | IFLA_CAN_RESTART, | ||
108 | __IFLA_CAN_MAX | ||
109 | }; | ||
110 | |||
111 | #define IFLA_CAN_MAX (__IFLA_CAN_MAX - 1) | ||
112 | |||
113 | #endif /* CAN_NETLINK_H */ | ||
diff --git a/include/linux/can/platform/sja1000.h b/include/linux/can/platform/sja1000.h new file mode 100644 index 000000000000..01ee2aeb048d --- /dev/null +++ b/include/linux/can/platform/sja1000.h | |||
@@ -0,0 +1,35 @@ | |||
1 | #ifndef _CAN_PLATFORM_SJA1000_H_ | ||
2 | #define _CAN_PLATFORM_SJA1000_H_ | ||
3 | |||
4 | /* clock divider register */ | ||
5 | #define CDR_CLKOUT_MASK 0x07 | ||
6 | #define CDR_CLK_OFF 0x08 /* Clock off (CLKOUT pin) */ | ||
7 | #define CDR_RXINPEN 0x20 /* TX1 output is RX irq output */ | ||
8 | #define CDR_CBP 0x40 /* CAN input comparator bypass */ | ||
9 | #define CDR_PELICAN 0x80 /* PeliCAN mode */ | ||
10 | |||
11 | /* output control register */ | ||
12 | #define OCR_MODE_BIPHASE 0x00 | ||
13 | #define OCR_MODE_TEST 0x01 | ||
14 | #define OCR_MODE_NORMAL 0x02 | ||
15 | #define OCR_MODE_CLOCK 0x03 | ||
16 | #define OCR_MODE_MASK 0x07 | ||
17 | #define OCR_TX0_INVERT 0x04 | ||
18 | #define OCR_TX0_PULLDOWN 0x08 | ||
19 | #define OCR_TX0_PULLUP 0x10 | ||
20 | #define OCR_TX0_PUSHPULL 0x18 | ||
21 | #define OCR_TX1_INVERT 0x20 | ||
22 | #define OCR_TX1_PULLDOWN 0x40 | ||
23 | #define OCR_TX1_PULLUP 0x80 | ||
24 | #define OCR_TX1_PUSHPULL 0xc0 | ||
25 | #define OCR_TX_MASK 0xfc | ||
26 | #define OCR_TX_SHIFT 2 | ||
27 | |||
28 | struct sja1000_platform_data { | ||
29 | u32 clock; /* CAN bus oscillator frequency in Hz */ | ||
30 | |||
31 | u8 ocr; /* output control register */ | ||
32 | u8 cdr; /* clock divider register */ | ||
33 | }; | ||
34 | |||
35 | #endif /* !_CAN_PLATFORM_SJA1000_H_ */ | ||
diff --git a/include/linux/etherdevice.h b/include/linux/etherdevice.h index a1f17abba7dc..3d7a6687d247 100644 --- a/include/linux/etherdevice.h +++ b/include/linux/etherdevice.h | |||
@@ -182,6 +182,33 @@ static inline unsigned compare_ether_addr_64bits(const u8 addr1[6+2], | |||
182 | return compare_ether_addr(addr1, addr2); | 182 | return compare_ether_addr(addr1, addr2); |
183 | #endif | 183 | #endif |
184 | } | 184 | } |
185 | |||
186 | /** | ||
187 | * is_etherdev_addr - Tell if given Ethernet address belongs to the device. | ||
188 | * @dev: Pointer to a device structure | ||
189 | * @addr: Pointer to a six-byte array containing the Ethernet address | ||
190 | * | ||
191 | * Compare passed address with all addresses of the device. Return true if the | ||
192 | * address if one of the device addresses. | ||
193 | * | ||
194 | * Note that this function calls compare_ether_addr_64bits() so take care of | ||
195 | * the right padding. | ||
196 | */ | ||
197 | static inline bool is_etherdev_addr(const struct net_device *dev, | ||
198 | const u8 addr[6 + 2]) | ||
199 | { | ||
200 | struct netdev_hw_addr *ha; | ||
201 | int res = 1; | ||
202 | |||
203 | rcu_read_lock(); | ||
204 | for_each_dev_addr(dev, ha) { | ||
205 | res = compare_ether_addr_64bits(addr, ha->addr); | ||
206 | if (!res) | ||
207 | break; | ||
208 | } | ||
209 | rcu_read_unlock(); | ||
210 | return !res; | ||
211 | } | ||
185 | #endif /* __KERNEL__ */ | 212 | #endif /* __KERNEL__ */ |
186 | 213 | ||
187 | /** | 214 | /** |
diff --git a/include/linux/ethtool.h b/include/linux/ethtool.h index 131b127b70f8..9b660bd2e2b3 100644 --- a/include/linux/ethtool.h +++ b/include/linux/ethtool.h | |||
@@ -26,11 +26,14 @@ struct ethtool_cmd { | |||
26 | __u8 phy_address; | 26 | __u8 phy_address; |
27 | __u8 transceiver; /* Which transceiver to use */ | 27 | __u8 transceiver; /* Which transceiver to use */ |
28 | __u8 autoneg; /* Enable or disable autonegotiation */ | 28 | __u8 autoneg; /* Enable or disable autonegotiation */ |
29 | __u8 mdio_support; | ||
29 | __u32 maxtxpkt; /* Tx pkts before generating tx int */ | 30 | __u32 maxtxpkt; /* Tx pkts before generating tx int */ |
30 | __u32 maxrxpkt; /* Rx pkts before generating rx int */ | 31 | __u32 maxrxpkt; /* Rx pkts before generating rx int */ |
31 | __u16 speed_hi; | 32 | __u16 speed_hi; |
32 | __u16 reserved2; | 33 | __u8 eth_tp_mdix; |
33 | __u32 reserved[3]; | 34 | __u8 reserved2; |
35 | __u32 lp_advertising; /* Features the link partner advertises */ | ||
36 | __u32 reserved[2]; | ||
34 | }; | 37 | }; |
35 | 38 | ||
36 | static inline void ethtool_cmd_speed_set(struct ethtool_cmd *ep, | 39 | static inline void ethtool_cmd_speed_set(struct ethtool_cmd *ep, |
@@ -563,6 +566,11 @@ struct ethtool_ops { | |||
563 | #define SUPPORTED_Pause (1 << 13) | 566 | #define SUPPORTED_Pause (1 << 13) |
564 | #define SUPPORTED_Asym_Pause (1 << 14) | 567 | #define SUPPORTED_Asym_Pause (1 << 14) |
565 | #define SUPPORTED_2500baseX_Full (1 << 15) | 568 | #define SUPPORTED_2500baseX_Full (1 << 15) |
569 | #define SUPPORTED_Backplane (1 << 16) | ||
570 | #define SUPPORTED_1000baseKX_Full (1 << 17) | ||
571 | #define SUPPORTED_10000baseKX4_Full (1 << 18) | ||
572 | #define SUPPORTED_10000baseKR_Full (1 << 19) | ||
573 | #define SUPPORTED_10000baseR_FEC (1 << 20) | ||
566 | 574 | ||
567 | /* Indicates what features are advertised by the interface. */ | 575 | /* Indicates what features are advertised by the interface. */ |
568 | #define ADVERTISED_10baseT_Half (1 << 0) | 576 | #define ADVERTISED_10baseT_Half (1 << 0) |
@@ -581,6 +589,11 @@ struct ethtool_ops { | |||
581 | #define ADVERTISED_Pause (1 << 13) | 589 | #define ADVERTISED_Pause (1 << 13) |
582 | #define ADVERTISED_Asym_Pause (1 << 14) | 590 | #define ADVERTISED_Asym_Pause (1 << 14) |
583 | #define ADVERTISED_2500baseX_Full (1 << 15) | 591 | #define ADVERTISED_2500baseX_Full (1 << 15) |
592 | #define ADVERTISED_Backplane (1 << 16) | ||
593 | #define ADVERTISED_1000baseKX_Full (1 << 17) | ||
594 | #define ADVERTISED_10000baseKX4_Full (1 << 18) | ||
595 | #define ADVERTISED_10000baseKR_Full (1 << 19) | ||
596 | #define ADVERTISED_10000baseR_FEC (1 << 20) | ||
584 | 597 | ||
585 | /* The following are all involved in forcing a particular link | 598 | /* The following are all involved in forcing a particular link |
586 | * mode for the device for setting things. When getting the | 599 | * mode for the device for setting things. When getting the |
@@ -605,6 +618,7 @@ struct ethtool_ops { | |||
605 | #define PORT_MII 0x02 | 618 | #define PORT_MII 0x02 |
606 | #define PORT_FIBRE 0x03 | 619 | #define PORT_FIBRE 0x03 |
607 | #define PORT_BNC 0x04 | 620 | #define PORT_BNC 0x04 |
621 | #define PORT_OTHER 0xff | ||
608 | 622 | ||
609 | /* Which transceiver to use. */ | 623 | /* Which transceiver to use. */ |
610 | #define XCVR_INTERNAL 0x00 | 624 | #define XCVR_INTERNAL 0x00 |
@@ -619,6 +633,11 @@ struct ethtool_ops { | |||
619 | #define AUTONEG_DISABLE 0x00 | 633 | #define AUTONEG_DISABLE 0x00 |
620 | #define AUTONEG_ENABLE 0x01 | 634 | #define AUTONEG_ENABLE 0x01 |
621 | 635 | ||
636 | /* Mode MDI or MDI-X */ | ||
637 | #define ETH_TP_MDI_INVALID 0x00 | ||
638 | #define ETH_TP_MDI 0x01 | ||
639 | #define ETH_TP_MDI_X 0x02 | ||
640 | |||
622 | /* Wake-On-Lan options. */ | 641 | /* Wake-On-Lan options. */ |
623 | #define WAKE_PHY (1 << 0) | 642 | #define WAKE_PHY (1 << 0) |
624 | #define WAKE_UCAST (1 << 1) | 643 | #define WAKE_UCAST (1 << 1) |
diff --git a/include/linux/fs_enet_pd.h b/include/linux/fs_enet_pd.h index 8300cab30f9a..51b793466ff3 100644 --- a/include/linux/fs_enet_pd.h +++ b/include/linux/fs_enet_pd.h | |||
@@ -17,6 +17,7 @@ | |||
17 | #define FS_ENET_PD_H | 17 | #define FS_ENET_PD_H |
18 | 18 | ||
19 | #include <linux/string.h> | 19 | #include <linux/string.h> |
20 | #include <linux/of_mdio.h> | ||
20 | #include <asm/types.h> | 21 | #include <asm/types.h> |
21 | 22 | ||
22 | #define FS_ENET_NAME "fs_enet" | 23 | #define FS_ENET_NAME "fs_enet" |
@@ -130,10 +131,7 @@ struct fs_platform_info { | |||
130 | 131 | ||
131 | u32 device_flags; | 132 | u32 device_flags; |
132 | 133 | ||
133 | int phy_addr; /* the phy address (-1 no phy) */ | 134 | struct device_node *phy_node; |
134 | char bus_id[16]; | ||
135 | int phy_irq; /* the phy irq (if it exists) */ | ||
136 | |||
137 | const struct fs_mii_bus_info *bus_info; | 135 | const struct fs_mii_bus_info *bus_info; |
138 | 136 | ||
139 | int rx_ring, tx_ring; /* number of buffers on rx */ | 137 | int rx_ring, tx_ring; /* number of buffers on rx */ |
diff --git a/include/linux/ieee80211.h b/include/linux/ieee80211.h index 4b501b48ce86..a9173d5434d1 100644 --- a/include/linux/ieee80211.h +++ b/include/linux/ieee80211.h | |||
@@ -493,6 +493,7 @@ struct ieee80211s_hdr { | |||
493 | /* Mesh flags */ | 493 | /* Mesh flags */ |
494 | #define MESH_FLAGS_AE_A4 0x1 | 494 | #define MESH_FLAGS_AE_A4 0x1 |
495 | #define MESH_FLAGS_AE_A5_A6 0x2 | 495 | #define MESH_FLAGS_AE_A5_A6 0x2 |
496 | #define MESH_FLAGS_AE 0x3 | ||
496 | #define MESH_FLAGS_PS_DEEP 0x4 | 497 | #define MESH_FLAGS_PS_DEEP 0x4 |
497 | 498 | ||
498 | /** | 499 | /** |
@@ -540,10 +541,10 @@ struct ieee80211_tim_ie { | |||
540 | u8 dtim_period; | 541 | u8 dtim_period; |
541 | u8 bitmap_ctrl; | 542 | u8 bitmap_ctrl; |
542 | /* variable size: 1 - 251 bytes */ | 543 | /* variable size: 1 - 251 bytes */ |
543 | u8 virtual_map[0]; | 544 | u8 virtual_map[1]; |
544 | } __attribute__ ((packed)); | 545 | } __attribute__ ((packed)); |
545 | 546 | ||
546 | #define WLAN_SA_QUERY_TR_ID_LEN 16 | 547 | #define WLAN_SA_QUERY_TR_ID_LEN 2 |
547 | 548 | ||
548 | struct ieee80211_mgmt { | 549 | struct ieee80211_mgmt { |
549 | __le16 frame_control; | 550 | __le16 frame_control; |
@@ -1068,8 +1069,12 @@ enum ieee80211_category { | |||
1068 | WLAN_CATEGORY_DLS = 2, | 1069 | WLAN_CATEGORY_DLS = 2, |
1069 | WLAN_CATEGORY_BACK = 3, | 1070 | WLAN_CATEGORY_BACK = 3, |
1070 | WLAN_CATEGORY_PUBLIC = 4, | 1071 | WLAN_CATEGORY_PUBLIC = 4, |
1072 | WLAN_CATEGORY_HT = 7, | ||
1071 | WLAN_CATEGORY_SA_QUERY = 8, | 1073 | WLAN_CATEGORY_SA_QUERY = 8, |
1074 | WLAN_CATEGORY_PROTECTED_DUAL_OF_ACTION = 9, | ||
1072 | WLAN_CATEGORY_WMM = 17, | 1075 | WLAN_CATEGORY_WMM = 17, |
1076 | WLAN_CATEGORY_VENDOR_SPECIFIC_PROTECTED = 126, | ||
1077 | WLAN_CATEGORY_VENDOR_SPECIFIC = 127, | ||
1073 | }; | 1078 | }; |
1074 | 1079 | ||
1075 | /* SPECTRUM_MGMT action code */ | 1080 | /* SPECTRUM_MGMT action code */ |
@@ -1081,6 +1086,15 @@ enum ieee80211_spectrum_mgmt_actioncode { | |||
1081 | WLAN_ACTION_SPCT_CHL_SWITCH = 4, | 1086 | WLAN_ACTION_SPCT_CHL_SWITCH = 4, |
1082 | }; | 1087 | }; |
1083 | 1088 | ||
1089 | /* Security key length */ | ||
1090 | enum ieee80211_key_len { | ||
1091 | WLAN_KEY_LEN_WEP40 = 5, | ||
1092 | WLAN_KEY_LEN_WEP104 = 13, | ||
1093 | WLAN_KEY_LEN_CCMP = 16, | ||
1094 | WLAN_KEY_LEN_TKIP = 32, | ||
1095 | WLAN_KEY_LEN_AES_CMAC = 16, | ||
1096 | }; | ||
1097 | |||
1084 | /* | 1098 | /* |
1085 | * IEEE 802.11-2007 7.3.2.9 Country information element | 1099 | * IEEE 802.11-2007 7.3.2.9 Country information element |
1086 | * | 1100 | * |
@@ -1261,7 +1275,9 @@ static inline bool ieee80211_is_robust_mgmt_frame(struct ieee80211_hdr *hdr) | |||
1261 | if (ieee80211_has_protected(hdr->frame_control)) | 1275 | if (ieee80211_has_protected(hdr->frame_control)) |
1262 | return true; | 1276 | return true; |
1263 | category = ((u8 *) hdr) + 24; | 1277 | category = ((u8 *) hdr) + 24; |
1264 | return *category != WLAN_CATEGORY_PUBLIC; | 1278 | return *category != WLAN_CATEGORY_PUBLIC && |
1279 | *category != WLAN_CATEGORY_HT && | ||
1280 | *category != WLAN_CATEGORY_VENDOR_SPECIFIC; | ||
1265 | } | 1281 | } |
1266 | 1282 | ||
1267 | return false; | 1283 | return false; |
@@ -1383,4 +1399,43 @@ static inline int ieee80211_freq_to_ofdm_chan(int s_freq, int freq) | |||
1383 | return -1; | 1399 | return -1; |
1384 | } | 1400 | } |
1385 | 1401 | ||
1402 | /** | ||
1403 | * ieee80211_tu_to_usec - convert time units (TU) to microseconds | ||
1404 | * @tu: the TUs | ||
1405 | */ | ||
1406 | static inline unsigned long ieee80211_tu_to_usec(unsigned long tu) | ||
1407 | { | ||
1408 | return 1024 * tu; | ||
1409 | } | ||
1410 | |||
1411 | /** | ||
1412 | * ieee80211_check_tim - check if AID bit is set in TIM | ||
1413 | * @tim: the TIM IE | ||
1414 | * @tim_len: length of the TIM IE | ||
1415 | * @aid: the AID to look for | ||
1416 | */ | ||
1417 | static inline bool ieee80211_check_tim(struct ieee80211_tim_ie *tim, | ||
1418 | u8 tim_len, u16 aid) | ||
1419 | { | ||
1420 | u8 mask; | ||
1421 | u8 index, indexn1, indexn2; | ||
1422 | |||
1423 | if (unlikely(!tim || tim_len < sizeof(*tim))) | ||
1424 | return false; | ||
1425 | |||
1426 | aid &= 0x3fff; | ||
1427 | index = aid / 8; | ||
1428 | mask = 1 << (aid & 7); | ||
1429 | |||
1430 | indexn1 = tim->bitmap_ctrl & 0xfe; | ||
1431 | indexn2 = tim_len + indexn1 - 4; | ||
1432 | |||
1433 | if (index < indexn1 || index > indexn2) | ||
1434 | return false; | ||
1435 | |||
1436 | index -= indexn1; | ||
1437 | |||
1438 | return !!(tim->virtual_map[index] & mask); | ||
1439 | } | ||
1440 | |||
1386 | #endif /* LINUX_IEEE80211_H */ | 1441 | #endif /* LINUX_IEEE80211_H */ |
diff --git a/include/linux/if.h b/include/linux/if.h index 1108f3e099e3..b9a6229f3be7 100644 --- a/include/linux/if.h +++ b/include/linux/if.h | |||
@@ -67,6 +67,9 @@ | |||
67 | #define IFF_ISATAP 0x80 /* ISATAP interface (RFC4214) */ | 67 | #define IFF_ISATAP 0x80 /* ISATAP interface (RFC4214) */ |
68 | #define IFF_MASTER_ARPMON 0x100 /* bonding master, ARP mon in use */ | 68 | #define IFF_MASTER_ARPMON 0x100 /* bonding master, ARP mon in use */ |
69 | #define IFF_WAN_HDLC 0x200 /* WAN HDLC device */ | 69 | #define IFF_WAN_HDLC 0x200 /* WAN HDLC device */ |
70 | #define IFF_XMIT_DST_RELEASE 0x400 /* dev_hard_start_xmit() is allowed to | ||
71 | * release skb->dst | ||
72 | */ | ||
70 | 73 | ||
71 | #define IF_GET_IFACE 0x0001 /* for querying only */ | 74 | #define IF_GET_IFACE 0x0001 /* for querying only */ |
72 | #define IF_GET_PROTO 0x0002 | 75 | #define IF_GET_PROTO 0x0002 |
diff --git a/include/linux/if_arp.h b/include/linux/if_arp.h index 5ff89809a581..b554300ef8bf 100644 --- a/include/linux/if_arp.h +++ b/include/linux/if_arp.h | |||
@@ -86,6 +86,8 @@ | |||
86 | #define ARPHRD_IEEE80211 801 /* IEEE 802.11 */ | 86 | #define ARPHRD_IEEE80211 801 /* IEEE 802.11 */ |
87 | #define ARPHRD_IEEE80211_PRISM 802 /* IEEE 802.11 + Prism2 header */ | 87 | #define ARPHRD_IEEE80211_PRISM 802 /* IEEE 802.11 + Prism2 header */ |
88 | #define ARPHRD_IEEE80211_RADIOTAP 803 /* IEEE 802.11 + radiotap header */ | 88 | #define ARPHRD_IEEE80211_RADIOTAP 803 /* IEEE 802.11 + radiotap header */ |
89 | #define ARPHRD_IEEE802154 804 | ||
90 | #define ARPHRD_IEEE802154_PHY 805 | ||
89 | 91 | ||
90 | #define ARPHRD_PHONET 820 /* PhoNet media type */ | 92 | #define ARPHRD_PHONET 820 /* PhoNet media type */ |
91 | #define ARPHRD_PHONET_PIPE 821 /* PhoNet pipe header */ | 93 | #define ARPHRD_PHONET_PIPE 821 /* PhoNet pipe header */ |
diff --git a/include/linux/if_ether.h b/include/linux/if_ether.h index 60e8934d10b5..ae3a1871413d 100644 --- a/include/linux/if_ether.h +++ b/include/linux/if_ether.h | |||
@@ -107,6 +107,7 @@ | |||
107 | #define ETH_P_DSA 0x001B /* Distributed Switch Arch. */ | 107 | #define ETH_P_DSA 0x001B /* Distributed Switch Arch. */ |
108 | #define ETH_P_TRAILER 0x001C /* Trailer switch tagging */ | 108 | #define ETH_P_TRAILER 0x001C /* Trailer switch tagging */ |
109 | #define ETH_P_PHONET 0x00F5 /* Nokia Phonet frames */ | 109 | #define ETH_P_PHONET 0x00F5 /* Nokia Phonet frames */ |
110 | #define ETH_P_IEEE802154 0x00F6 /* IEEE802.15.4 frame */ | ||
110 | 111 | ||
111 | /* | 112 | /* |
112 | * This is an Ethernet frame header. | 113 | * This is an Ethernet frame header. |
diff --git a/include/linux/if_packet.h b/include/linux/if_packet.h index 18db0668065a..dea7d6b7cf98 100644 --- a/include/linux/if_packet.h +++ b/include/linux/if_packet.h | |||
@@ -46,6 +46,8 @@ struct sockaddr_ll | |||
46 | #define PACKET_VERSION 10 | 46 | #define PACKET_VERSION 10 |
47 | #define PACKET_HDRLEN 11 | 47 | #define PACKET_HDRLEN 11 |
48 | #define PACKET_RESERVE 12 | 48 | #define PACKET_RESERVE 12 |
49 | #define PACKET_TX_RING 13 | ||
50 | #define PACKET_LOSS 14 | ||
49 | 51 | ||
50 | struct tpacket_stats | 52 | struct tpacket_stats |
51 | { | 53 | { |
@@ -63,14 +65,22 @@ struct tpacket_auxdata | |||
63 | __u16 tp_vlan_tci; | 65 | __u16 tp_vlan_tci; |
64 | }; | 66 | }; |
65 | 67 | ||
68 | /* Rx ring - header status */ | ||
69 | #define TP_STATUS_KERNEL 0x0 | ||
70 | #define TP_STATUS_USER 0x1 | ||
71 | #define TP_STATUS_COPY 0x2 | ||
72 | #define TP_STATUS_LOSING 0x4 | ||
73 | #define TP_STATUS_CSUMNOTREADY 0x8 | ||
74 | |||
75 | /* Tx ring - header status */ | ||
76 | #define TP_STATUS_AVAILABLE 0x0 | ||
77 | #define TP_STATUS_SEND_REQUEST 0x1 | ||
78 | #define TP_STATUS_SENDING 0x2 | ||
79 | #define TP_STATUS_WRONG_FORMAT 0x4 | ||
80 | |||
66 | struct tpacket_hdr | 81 | struct tpacket_hdr |
67 | { | 82 | { |
68 | unsigned long tp_status; | 83 | unsigned long tp_status; |
69 | #define TP_STATUS_KERNEL 0 | ||
70 | #define TP_STATUS_USER 1 | ||
71 | #define TP_STATUS_COPY 2 | ||
72 | #define TP_STATUS_LOSING 4 | ||
73 | #define TP_STATUS_CSUMNOTREADY 8 | ||
74 | unsigned int tp_len; | 84 | unsigned int tp_len; |
75 | unsigned int tp_snaplen; | 85 | unsigned int tp_snaplen; |
76 | unsigned short tp_mac; | 86 | unsigned short tp_mac; |
@@ -135,5 +145,6 @@ struct packet_mreq | |||
135 | #define PACKET_MR_MULTICAST 0 | 145 | #define PACKET_MR_MULTICAST 0 |
136 | #define PACKET_MR_PROMISC 1 | 146 | #define PACKET_MR_PROMISC 1 |
137 | #define PACKET_MR_ALLMULTI 2 | 147 | #define PACKET_MR_ALLMULTI 2 |
148 | #define PACKET_MR_UNICAST 3 | ||
138 | 149 | ||
139 | #endif | 150 | #endif |
diff --git a/include/linux/if_tun.h b/include/linux/if_tun.h index 049d6c9428db..915ba5789f0e 100644 --- a/include/linux/if_tun.h +++ b/include/linux/if_tun.h | |||
@@ -55,6 +55,7 @@ | |||
55 | #define IFF_NO_PI 0x1000 | 55 | #define IFF_NO_PI 0x1000 |
56 | #define IFF_ONE_QUEUE 0x2000 | 56 | #define IFF_ONE_QUEUE 0x2000 |
57 | #define IFF_VNET_HDR 0x4000 | 57 | #define IFF_VNET_HDR 0x4000 |
58 | #define IFF_TUN_EXCL 0x8000 | ||
58 | 59 | ||
59 | /* Features for GSO (TUNSETOFFLOAD). */ | 60 | /* Features for GSO (TUNSETOFFLOAD). */ |
60 | #define TUN_F_CSUM 0x01 /* You can hand me unchecksummed packets. */ | 61 | #define TUN_F_CSUM 0x01 /* You can hand me unchecksummed packets. */ |
diff --git a/include/linux/if_tunnel.h b/include/linux/if_tunnel.h index 5a9aae4adb44..5eb9b0f857e0 100644 --- a/include/linux/if_tunnel.h +++ b/include/linux/if_tunnel.h | |||
@@ -44,7 +44,7 @@ struct ip_tunnel_prl { | |||
44 | __u16 flags; | 44 | __u16 flags; |
45 | __u16 __reserved; | 45 | __u16 __reserved; |
46 | __u32 datalen; | 46 | __u32 datalen; |
47 | __u32 __reserved2; | 47 | __u32 rs_delay; |
48 | /* data follows */ | 48 | /* data follows */ |
49 | }; | 49 | }; |
50 | 50 | ||
diff --git a/include/linux/if_vlan.h b/include/linux/if_vlan.h index e1ff5b14310e..7ff9af1d0f05 100644 --- a/include/linux/if_vlan.h +++ b/include/linux/if_vlan.h | |||
@@ -118,8 +118,7 @@ extern int vlan_hwaccel_do_receive(struct sk_buff *skb); | |||
118 | extern int vlan_gro_receive(struct napi_struct *napi, struct vlan_group *grp, | 118 | extern int vlan_gro_receive(struct napi_struct *napi, struct vlan_group *grp, |
119 | unsigned int vlan_tci, struct sk_buff *skb); | 119 | unsigned int vlan_tci, struct sk_buff *skb); |
120 | extern int vlan_gro_frags(struct napi_struct *napi, struct vlan_group *grp, | 120 | extern int vlan_gro_frags(struct napi_struct *napi, struct vlan_group *grp, |
121 | unsigned int vlan_tci, | 121 | unsigned int vlan_tci); |
122 | struct napi_gro_fraginfo *info); | ||
123 | 122 | ||
124 | #else | 123 | #else |
125 | static inline struct net_device *vlan_dev_real_dev(const struct net_device *dev) | 124 | static inline struct net_device *vlan_dev_real_dev(const struct net_device *dev) |
@@ -154,8 +153,7 @@ static inline int vlan_gro_receive(struct napi_struct *napi, | |||
154 | } | 153 | } |
155 | 154 | ||
156 | static inline int vlan_gro_frags(struct napi_struct *napi, | 155 | static inline int vlan_gro_frags(struct napi_struct *napi, |
157 | struct vlan_group *grp, unsigned int vlan_tci, | 156 | struct vlan_group *grp, unsigned int vlan_tci) |
158 | struct napi_gro_fraginfo *info) | ||
159 | { | 157 | { |
160 | return NET_RX_DROP; | 158 | return NET_RX_DROP; |
161 | } | 159 | } |
diff --git a/include/linux/in.h b/include/linux/in.h index d60122a3a088..cf196da04ec9 100644 --- a/include/linux/in.h +++ b/include/linux/in.h | |||
@@ -107,6 +107,7 @@ struct in_addr { | |||
107 | #define MCAST_JOIN_SOURCE_GROUP 46 | 107 | #define MCAST_JOIN_SOURCE_GROUP 46 |
108 | #define MCAST_LEAVE_SOURCE_GROUP 47 | 108 | #define MCAST_LEAVE_SOURCE_GROUP 47 |
109 | #define MCAST_MSFILTER 48 | 109 | #define MCAST_MSFILTER 48 |
110 | #define IP_MULTICAST_ALL 49 | ||
110 | 111 | ||
111 | #define MCAST_EXCLUDE 0 | 112 | #define MCAST_EXCLUDE 0 |
112 | #define MCAST_INCLUDE 1 | 113 | #define MCAST_INCLUDE 1 |
diff --git a/include/linux/ipv6.h b/include/linux/ipv6.h index 476d9464ac82..c662efa68289 100644 --- a/include/linux/ipv6.h +++ b/include/linux/ipv6.h | |||
@@ -169,6 +169,12 @@ struct ipv6_devconf { | |||
169 | __s32 accept_dad; | 169 | __s32 accept_dad; |
170 | void *sysctl; | 170 | void *sysctl; |
171 | }; | 171 | }; |
172 | |||
173 | struct ipv6_params { | ||
174 | __s32 disable_ipv6; | ||
175 | __s32 autoconf; | ||
176 | }; | ||
177 | extern struct ipv6_params ipv6_defaults; | ||
172 | #endif | 178 | #endif |
173 | 179 | ||
174 | /* index values for the variables in ipv6_devconf */ | 180 | /* index values for the variables in ipv6_devconf */ |
diff --git a/include/linux/isdn/capilli.h b/include/linux/isdn/capilli.h index 35e9b0fd014b..7acb87a44872 100644 --- a/include/linux/isdn/capilli.h +++ b/include/linux/isdn/capilli.h | |||
@@ -79,7 +79,7 @@ int attach_capi_ctr(struct capi_ctr *); | |||
79 | int detach_capi_ctr(struct capi_ctr *); | 79 | int detach_capi_ctr(struct capi_ctr *); |
80 | 80 | ||
81 | void capi_ctr_ready(struct capi_ctr * card); | 81 | void capi_ctr_ready(struct capi_ctr * card); |
82 | void capi_ctr_reseted(struct capi_ctr * card); | 82 | void capi_ctr_down(struct capi_ctr * card); |
83 | void capi_ctr_suspend_output(struct capi_ctr * card); | 83 | void capi_ctr_suspend_output(struct capi_ctr * card); |
84 | void capi_ctr_resume_output(struct capi_ctr * card); | 84 | void capi_ctr_resume_output(struct capi_ctr * card); |
85 | void capi_ctr_handle_message(struct capi_ctr * card, u16 appl, struct sk_buff *skb); | 85 | void capi_ctr_handle_message(struct capi_ctr * card, u16 appl, struct sk_buff *skb); |
diff --git a/include/linux/list_nulls.h b/include/linux/list_nulls.h index 93150ecf3ea4..5d10ae364b5e 100644 --- a/include/linux/list_nulls.h +++ b/include/linux/list_nulls.h | |||
@@ -56,6 +56,18 @@ static inline int hlist_nulls_empty(const struct hlist_nulls_head *h) | |||
56 | return is_a_nulls(h->first); | 56 | return is_a_nulls(h->first); |
57 | } | 57 | } |
58 | 58 | ||
59 | static inline void hlist_nulls_add_head(struct hlist_nulls_node *n, | ||
60 | struct hlist_nulls_head *h) | ||
61 | { | ||
62 | struct hlist_nulls_node *first = h->first; | ||
63 | |||
64 | n->next = first; | ||
65 | n->pprev = &h->first; | ||
66 | h->first = n; | ||
67 | if (!is_a_nulls(first)) | ||
68 | first->pprev = &n->next; | ||
69 | } | ||
70 | |||
59 | static inline void __hlist_nulls_del(struct hlist_nulls_node *n) | 71 | static inline void __hlist_nulls_del(struct hlist_nulls_node *n) |
60 | { | 72 | { |
61 | struct hlist_nulls_node *next = n->next; | 73 | struct hlist_nulls_node *next = n->next; |
@@ -65,6 +77,12 @@ static inline void __hlist_nulls_del(struct hlist_nulls_node *n) | |||
65 | next->pprev = pprev; | 77 | next->pprev = pprev; |
66 | } | 78 | } |
67 | 79 | ||
80 | static inline void hlist_nulls_del(struct hlist_nulls_node *n) | ||
81 | { | ||
82 | __hlist_nulls_del(n); | ||
83 | n->pprev = LIST_POISON2; | ||
84 | } | ||
85 | |||
68 | /** | 86 | /** |
69 | * hlist_nulls_for_each_entry - iterate over list of given type | 87 | * hlist_nulls_for_each_entry - iterate over list of given type |
70 | * @tpos: the type * to use as a loop cursor. | 88 | * @tpos: the type * to use as a loop cursor. |
diff --git a/include/linux/mISDNdsp.h b/include/linux/mISDNdsp.h index 6b71d2dce508..41d1eeb9b3bd 100644 --- a/include/linux/mISDNdsp.h +++ b/include/linux/mISDNdsp.h | |||
@@ -12,7 +12,8 @@ struct mISDN_dsp_element { | |||
12 | void *(*new)(const char *arg); | 12 | void *(*new)(const char *arg); |
13 | void (*free)(void *p); | 13 | void (*free)(void *p); |
14 | void (*process_tx)(void *p, unsigned char *data, int len); | 14 | void (*process_tx)(void *p, unsigned char *data, int len); |
15 | void (*process_rx)(void *p, unsigned char *data, int len); | 15 | void (*process_rx)(void *p, unsigned char *data, int len, |
16 | unsigned int txlen); | ||
16 | int num_args; | 17 | int num_args; |
17 | struct mISDN_dsp_element_arg | 18 | struct mISDN_dsp_element_arg |
18 | *args; | 19 | *args; |
@@ -24,6 +25,7 @@ extern void mISDN_dsp_element_unregister(struct mISDN_dsp_element *elem); | |||
24 | struct dsp_features { | 25 | struct dsp_features { |
25 | int hfc_id; /* unique id to identify the chip (or -1) */ | 26 | int hfc_id; /* unique id to identify the chip (or -1) */ |
26 | int hfc_dtmf; /* set if HFCmulti card supports dtmf */ | 27 | int hfc_dtmf; /* set if HFCmulti card supports dtmf */ |
28 | int hfc_conf; /* set if HFCmulti card supports conferences */ | ||
27 | int hfc_loops; /* set if card supports tone loops */ | 29 | int hfc_loops; /* set if card supports tone loops */ |
28 | int hfc_echocanhw; /* set if card supports echocancelation*/ | 30 | int hfc_echocanhw; /* set if card supports echocancelation*/ |
29 | int pcm_id; /* unique id to identify the pcm bus (or -1) */ | 31 | int pcm_id; /* unique id to identify the pcm bus (or -1) */ |
diff --git a/include/linux/mISDNhw.h b/include/linux/mISDNhw.h index 97ffdc1d3442..7f9831da847f 100644 --- a/include/linux/mISDNhw.h +++ b/include/linux/mISDNhw.h | |||
@@ -89,11 +89,6 @@ struct dchannel { | |||
89 | void (*phfunc) (struct dchannel *); | 89 | void (*phfunc) (struct dchannel *); |
90 | u_int state; | 90 | u_int state; |
91 | void *l1; | 91 | void *l1; |
92 | /* HW access */ | ||
93 | u_char (*read_reg) (void *, u_char); | ||
94 | void (*write_reg) (void *, u_char, u_char); | ||
95 | void (*read_fifo) (void *, u_char *, int); | ||
96 | void (*write_fifo) (void *, u_char *, int); | ||
97 | void *hw; | 92 | void *hw; |
98 | int slot; /* multiport card channel slot */ | 93 | int slot; /* multiport card channel slot */ |
99 | struct timer_list timer; | 94 | struct timer_list timer; |
@@ -151,11 +146,6 @@ struct bchannel { | |||
151 | u_long Flags; | 146 | u_long Flags; |
152 | struct work_struct workq; | 147 | struct work_struct workq; |
153 | u_int state; | 148 | u_int state; |
154 | /* HW access */ | ||
155 | u_char (*read_reg) (void *, u_char); | ||
156 | void (*write_reg) (void *, u_char, u_char); | ||
157 | void (*read_fifo) (void *, u_char *, int); | ||
158 | void (*write_fifo) (void *, u_char *, int); | ||
159 | void *hw; | 149 | void *hw; |
160 | int slot; /* multiport card channel slot */ | 150 | int slot; /* multiport card channel slot */ |
161 | struct timer_list timer; | 151 | struct timer_list timer; |
@@ -185,7 +175,7 @@ extern int dchannel_senddata(struct dchannel *, struct sk_buff *); | |||
185 | extern int bchannel_senddata(struct bchannel *, struct sk_buff *); | 175 | extern int bchannel_senddata(struct bchannel *, struct sk_buff *); |
186 | extern void recv_Dchannel(struct dchannel *); | 176 | extern void recv_Dchannel(struct dchannel *); |
187 | extern void recv_Echannel(struct dchannel *, struct dchannel *); | 177 | extern void recv_Echannel(struct dchannel *, struct dchannel *); |
188 | extern void recv_Bchannel(struct bchannel *); | 178 | extern void recv_Bchannel(struct bchannel *, unsigned int id); |
189 | extern void recv_Dchannel_skb(struct dchannel *, struct sk_buff *); | 179 | extern void recv_Dchannel_skb(struct dchannel *, struct sk_buff *); |
190 | extern void recv_Bchannel_skb(struct bchannel *, struct sk_buff *); | 180 | extern void recv_Bchannel_skb(struct bchannel *, struct sk_buff *); |
191 | extern void confirm_Bsend(struct bchannel *bch); | 181 | extern void confirm_Bsend(struct bchannel *bch); |
diff --git a/include/linux/mISDNif.h b/include/linux/mISDNif.h index 5da3d95b27f1..45100b39a7cf 100644 --- a/include/linux/mISDNif.h +++ b/include/linux/mISDNif.h | |||
@@ -229,6 +229,7 @@ | |||
229 | #define OPTION_L2_PTP 2 | 229 | #define OPTION_L2_PTP 2 |
230 | #define OPTION_L2_FIXEDTEI 3 | 230 | #define OPTION_L2_FIXEDTEI 3 |
231 | #define OPTION_L2_CLEANUP 4 | 231 | #define OPTION_L2_CLEANUP 4 |
232 | #define OPTION_L1_HOLD 5 | ||
232 | 233 | ||
233 | /* should be in sync with linux/kobject.h:KOBJ_NAME_LEN */ | 234 | /* should be in sync with linux/kobject.h:KOBJ_NAME_LEN */ |
234 | #define MISDN_MAX_IDLEN 20 | 235 | #define MISDN_MAX_IDLEN 20 |
@@ -291,19 +292,19 @@ struct mISDN_devrename { | |||
291 | 292 | ||
292 | /* MPH_INFORMATION_REQ payload */ | 293 | /* MPH_INFORMATION_REQ payload */ |
293 | struct ph_info_ch { | 294 | struct ph_info_ch { |
294 | __u32 protocol; | 295 | __u32 protocol; |
295 | __u64 Flags; | 296 | __u64 Flags; |
296 | }; | 297 | }; |
297 | 298 | ||
298 | struct ph_info_dch { | 299 | struct ph_info_dch { |
299 | struct ph_info_ch ch; | 300 | struct ph_info_ch ch; |
300 | __u16 state; | 301 | __u16 state; |
301 | __u16 num_bch; | 302 | __u16 num_bch; |
302 | }; | 303 | }; |
303 | 304 | ||
304 | struct ph_info { | 305 | struct ph_info { |
305 | struct ph_info_dch dch; | 306 | struct ph_info_dch dch; |
306 | struct ph_info_ch bch[]; | 307 | struct ph_info_ch bch[]; |
307 | }; | 308 | }; |
308 | 309 | ||
309 | /* timer device ioctl */ | 310 | /* timer device ioctl */ |
@@ -317,6 +318,7 @@ struct ph_info { | |||
317 | #define IMCTRLREQ _IOR('I', 69, int) | 318 | #define IMCTRLREQ _IOR('I', 69, int) |
318 | #define IMCLEAR_L2 _IOR('I', 70, int) | 319 | #define IMCLEAR_L2 _IOR('I', 70, int) |
319 | #define IMSETDEVNAME _IOR('I', 71, struct mISDN_devrename) | 320 | #define IMSETDEVNAME _IOR('I', 71, struct mISDN_devrename) |
321 | #define IMHOLD_L1 _IOR('I', 72, int) | ||
320 | 322 | ||
321 | static inline int | 323 | static inline int |
322 | test_channelmap(u_int nr, u_char *map) | 324 | test_channelmap(u_int nr, u_char *map) |
@@ -362,7 +364,8 @@ clear_channelmap(u_int nr, u_char *map) | |||
362 | #define MISDN_CTRL_HFC_RECEIVE_ON 0x4006 | 364 | #define MISDN_CTRL_HFC_RECEIVE_ON 0x4006 |
363 | #define MISDN_CTRL_HFC_ECHOCAN_ON 0x4007 | 365 | #define MISDN_CTRL_HFC_ECHOCAN_ON 0x4007 |
364 | #define MISDN_CTRL_HFC_ECHOCAN_OFF 0x4008 | 366 | #define MISDN_CTRL_HFC_ECHOCAN_OFF 0x4008 |
365 | 367 | #define MISDN_CTRL_HFC_WD_INIT 0x4009 | |
368 | #define MISDN_CTRL_HFC_WD_RESET 0x400A | ||
366 | 369 | ||
367 | /* socket options */ | 370 | /* socket options */ |
368 | #define MISDN_TIME_STAMP 0x0001 | 371 | #define MISDN_TIME_STAMP 0x0001 |
diff --git a/include/linux/mdio.h b/include/linux/mdio.h new file mode 100644 index 000000000000..cfdf1df2875e --- /dev/null +++ b/include/linux/mdio.h | |||
@@ -0,0 +1,356 @@ | |||
1 | /* | ||
2 | * linux/mdio.h: definitions for MDIO (clause 45) transceivers | ||
3 | * Copyright 2006-2009 Solarflare Communications Inc. | ||
4 | * | ||
5 | * This program is free software; you can redistribute it and/or modify it | ||
6 | * under the terms of the GNU General Public License version 2 as published | ||
7 | * by the Free Software Foundation, incorporated herein by reference. | ||
8 | */ | ||
9 | |||
10 | #ifndef __LINUX_MDIO_H__ | ||
11 | #define __LINUX_MDIO_H__ | ||
12 | |||
13 | #include <linux/mii.h> | ||
14 | |||
15 | /* MDIO Manageable Devices (MMDs). */ | ||
16 | #define MDIO_MMD_PMAPMD 1 /* Physical Medium Attachment/ | ||
17 | * Physical Medium Dependent */ | ||
18 | #define MDIO_MMD_WIS 2 /* WAN Interface Sublayer */ | ||
19 | #define MDIO_MMD_PCS 3 /* Physical Coding Sublayer */ | ||
20 | #define MDIO_MMD_PHYXS 4 /* PHY Extender Sublayer */ | ||
21 | #define MDIO_MMD_DTEXS 5 /* DTE Extender Sublayer */ | ||
22 | #define MDIO_MMD_TC 6 /* Transmission Convergence */ | ||
23 | #define MDIO_MMD_AN 7 /* Auto-Negotiation */ | ||
24 | #define MDIO_MMD_C22EXT 29 /* Clause 22 extension */ | ||
25 | #define MDIO_MMD_VEND1 30 /* Vendor specific 1 */ | ||
26 | #define MDIO_MMD_VEND2 31 /* Vendor specific 2 */ | ||
27 | |||
28 | /* Generic MDIO registers. */ | ||
29 | #define MDIO_CTRL1 MII_BMCR | ||
30 | #define MDIO_STAT1 MII_BMSR | ||
31 | #define MDIO_DEVID1 MII_PHYSID1 | ||
32 | #define MDIO_DEVID2 MII_PHYSID2 | ||
33 | #define MDIO_SPEED 4 /* Speed ability */ | ||
34 | #define MDIO_DEVS1 5 /* Devices in package */ | ||
35 | #define MDIO_DEVS2 6 | ||
36 | #define MDIO_CTRL2 7 /* 10G control 2 */ | ||
37 | #define MDIO_STAT2 8 /* 10G status 2 */ | ||
38 | #define MDIO_PMA_TXDIS 9 /* 10G PMA/PMD transmit disable */ | ||
39 | #define MDIO_PMA_RXDET 10 /* 10G PMA/PMD receive signal detect */ | ||
40 | #define MDIO_PMA_EXTABLE 11 /* 10G PMA/PMD extended ability */ | ||
41 | #define MDIO_PKGID1 14 /* Package identifier */ | ||
42 | #define MDIO_PKGID2 15 | ||
43 | #define MDIO_AN_ADVERTISE 16 /* AN advertising (base page) */ | ||
44 | #define MDIO_AN_LPA 19 /* AN LP abilities (base page) */ | ||
45 | #define MDIO_PHYXS_LNSTAT 24 /* PHY XGXS lane state */ | ||
46 | |||
47 | /* Media-dependent registers. */ | ||
48 | #define MDIO_PMA_10GBT_SWAPPOL 130 /* 10GBASE-T pair swap & polarity */ | ||
49 | #define MDIO_PMA_10GBT_TXPWR 131 /* 10GBASE-T TX power control */ | ||
50 | #define MDIO_PMA_10GBT_SNR 133 /* 10GBASE-T SNR margin, lane A. | ||
51 | * Lanes B-D are numbered 134-136. */ | ||
52 | #define MDIO_PMA_10GBR_FECABLE 170 /* 10GBASE-R FEC ability */ | ||
53 | #define MDIO_PCS_10GBX_STAT1 24 /* 10GBASE-X PCS status 1 */ | ||
54 | #define MDIO_PCS_10GBRT_STAT1 32 /* 10GBASE-R/-T PCS status 1 */ | ||
55 | #define MDIO_PCS_10GBRT_STAT2 33 /* 10GBASE-R/-T PCS status 2 */ | ||
56 | #define MDIO_AN_10GBT_CTRL 32 /* 10GBASE-T auto-negotiation control */ | ||
57 | #define MDIO_AN_10GBT_STAT 33 /* 10GBASE-T auto-negotiation status */ | ||
58 | |||
59 | /* LASI (Link Alarm Status Interrupt) registers, defined by XENPAK MSA. */ | ||
60 | #define MDIO_PMA_LASI_RXCTRL 0x9000 /* RX_ALARM control */ | ||
61 | #define MDIO_PMA_LASI_TXCTRL 0x9001 /* TX_ALARM control */ | ||
62 | #define MDIO_PMA_LASI_CTRL 0x9002 /* LASI control */ | ||
63 | #define MDIO_PMA_LASI_RXSTAT 0x9003 /* RX_ALARM status */ | ||
64 | #define MDIO_PMA_LASI_TXSTAT 0x9004 /* TX_ALARM status */ | ||
65 | #define MDIO_PMA_LASI_STAT 0x9005 /* LASI status */ | ||
66 | |||
67 | /* Control register 1. */ | ||
68 | /* Enable extended speed selection */ | ||
69 | #define MDIO_CTRL1_SPEEDSELEXT (BMCR_SPEED1000 | BMCR_SPEED100) | ||
70 | /* All speed selection bits */ | ||
71 | #define MDIO_CTRL1_SPEEDSEL (MDIO_CTRL1_SPEEDSELEXT | 0x003c) | ||
72 | #define MDIO_CTRL1_FULLDPLX BMCR_FULLDPLX | ||
73 | #define MDIO_CTRL1_LPOWER BMCR_PDOWN | ||
74 | #define MDIO_CTRL1_RESET BMCR_RESET | ||
75 | #define MDIO_PMA_CTRL1_LOOPBACK 0x0001 | ||
76 | #define MDIO_PMA_CTRL1_SPEED1000 BMCR_SPEED1000 | ||
77 | #define MDIO_PMA_CTRL1_SPEED100 BMCR_SPEED100 | ||
78 | #define MDIO_PCS_CTRL1_LOOPBACK BMCR_LOOPBACK | ||
79 | #define MDIO_PHYXS_CTRL1_LOOPBACK BMCR_LOOPBACK | ||
80 | #define MDIO_AN_CTRL1_RESTART BMCR_ANRESTART | ||
81 | #define MDIO_AN_CTRL1_ENABLE BMCR_ANENABLE | ||
82 | #define MDIO_AN_CTRL1_XNP 0x2000 /* Enable extended next page */ | ||
83 | |||
84 | /* 10 Gb/s */ | ||
85 | #define MDIO_CTRL1_SPEED10G (MDIO_CTRL1_SPEEDSELEXT | 0x00) | ||
86 | /* 10PASS-TS/2BASE-TL */ | ||
87 | #define MDIO_CTRL1_SPEED10P2B (MDIO_CTRL1_SPEEDSELEXT | 0x04) | ||
88 | |||
89 | /* Status register 1. */ | ||
90 | #define MDIO_STAT1_LPOWERABLE 0x0002 /* Low-power ability */ | ||
91 | #define MDIO_STAT1_LSTATUS BMSR_LSTATUS | ||
92 | #define MDIO_STAT1_FAULT 0x0080 /* Fault */ | ||
93 | #define MDIO_AN_STAT1_LPABLE 0x0001 /* Link partner AN ability */ | ||
94 | #define MDIO_AN_STAT1_ABLE BMSR_ANEGCAPABLE | ||
95 | #define MDIO_AN_STAT1_RFAULT BMSR_RFAULT | ||
96 | #define MDIO_AN_STAT1_COMPLETE BMSR_ANEGCOMPLETE | ||
97 | #define MDIO_AN_STAT1_PAGE 0x0040 /* Page received */ | ||
98 | #define MDIO_AN_STAT1_XNP 0x0080 /* Extended next page status */ | ||
99 | |||
100 | /* Speed register. */ | ||
101 | #define MDIO_SPEED_10G 0x0001 /* 10G capable */ | ||
102 | #define MDIO_PMA_SPEED_2B 0x0002 /* 2BASE-TL capable */ | ||
103 | #define MDIO_PMA_SPEED_10P 0x0004 /* 10PASS-TS capable */ | ||
104 | #define MDIO_PMA_SPEED_1000 0x0010 /* 1000M capable */ | ||
105 | #define MDIO_PMA_SPEED_100 0x0020 /* 100M capable */ | ||
106 | #define MDIO_PMA_SPEED_10 0x0040 /* 10M capable */ | ||
107 | #define MDIO_PCS_SPEED_10P2B 0x0002 /* 10PASS-TS/2BASE-TL capable */ | ||
108 | |||
109 | /* Device present registers. */ | ||
110 | #define MDIO_DEVS_PRESENT(devad) (1 << (devad)) | ||
111 | #define MDIO_DEVS_PMAPMD MDIO_DEVS_PRESENT(MDIO_MMD_PMAPMD) | ||
112 | #define MDIO_DEVS_WIS MDIO_DEVS_PRESENT(MDIO_MMD_WIS) | ||
113 | #define MDIO_DEVS_PCS MDIO_DEVS_PRESENT(MDIO_MMD_PCS) | ||
114 | #define MDIO_DEVS_PHYXS MDIO_DEVS_PRESENT(MDIO_MMD_PHYXS) | ||
115 | #define MDIO_DEVS_DTEXS MDIO_DEVS_PRESENT(MDIO_MMD_DTEXS) | ||
116 | #define MDIO_DEVS_TC MDIO_DEVS_PRESENT(MDIO_MMD_TC) | ||
117 | #define MDIO_DEVS_AN MDIO_DEVS_PRESENT(MDIO_MMD_AN) | ||
118 | #define MDIO_DEVS_C22EXT MDIO_DEVS_PRESENT(MDIO_MMD_C22EXT) | ||
119 | |||
120 | /* Control register 2. */ | ||
121 | #define MDIO_PMA_CTRL2_TYPE 0x000f /* PMA/PMD type selection */ | ||
122 | #define MDIO_PMA_CTRL2_10GBCX4 0x0000 /* 10GBASE-CX4 type */ | ||
123 | #define MDIO_PMA_CTRL2_10GBEW 0x0001 /* 10GBASE-EW type */ | ||
124 | #define MDIO_PMA_CTRL2_10GBLW 0x0002 /* 10GBASE-LW type */ | ||
125 | #define MDIO_PMA_CTRL2_10GBSW 0x0003 /* 10GBASE-SW type */ | ||
126 | #define MDIO_PMA_CTRL2_10GBLX4 0x0004 /* 10GBASE-LX4 type */ | ||
127 | #define MDIO_PMA_CTRL2_10GBER 0x0005 /* 10GBASE-ER type */ | ||
128 | #define MDIO_PMA_CTRL2_10GBLR 0x0006 /* 10GBASE-LR type */ | ||
129 | #define MDIO_PMA_CTRL2_10GBSR 0x0007 /* 10GBASE-SR type */ | ||
130 | #define MDIO_PMA_CTRL2_10GBLRM 0x0008 /* 10GBASE-LRM type */ | ||
131 | #define MDIO_PMA_CTRL2_10GBT 0x0009 /* 10GBASE-T type */ | ||
132 | #define MDIO_PMA_CTRL2_10GBKX4 0x000a /* 10GBASE-KX4 type */ | ||
133 | #define MDIO_PMA_CTRL2_10GBKR 0x000b /* 10GBASE-KR type */ | ||
134 | #define MDIO_PMA_CTRL2_1000BT 0x000c /* 1000BASE-T type */ | ||
135 | #define MDIO_PMA_CTRL2_1000BKX 0x000d /* 1000BASE-KX type */ | ||
136 | #define MDIO_PMA_CTRL2_100BTX 0x000e /* 100BASE-TX type */ | ||
137 | #define MDIO_PMA_CTRL2_10BT 0x000f /* 10BASE-T type */ | ||
138 | #define MDIO_PCS_CTRL2_TYPE 0x0003 /* PCS type selection */ | ||
139 | #define MDIO_PCS_CTRL2_10GBR 0x0000 /* 10GBASE-R type */ | ||
140 | #define MDIO_PCS_CTRL2_10GBX 0x0001 /* 10GBASE-X type */ | ||
141 | #define MDIO_PCS_CTRL2_10GBW 0x0002 /* 10GBASE-W type */ | ||
142 | #define MDIO_PCS_CTRL2_10GBT 0x0003 /* 10GBASE-T type */ | ||
143 | |||
144 | /* Status register 2. */ | ||
145 | #define MDIO_STAT2_RXFAULT 0x0400 /* Receive fault */ | ||
146 | #define MDIO_STAT2_TXFAULT 0x0800 /* Transmit fault */ | ||
147 | #define MDIO_STAT2_DEVPRST 0xc000 /* Device present */ | ||
148 | #define MDIO_STAT2_DEVPRST_VAL 0x8000 /* Device present value */ | ||
149 | #define MDIO_PMA_STAT2_LBABLE 0x0001 /* PMA loopback ability */ | ||
150 | #define MDIO_PMA_STAT2_10GBEW 0x0002 /* 10GBASE-EW ability */ | ||
151 | #define MDIO_PMA_STAT2_10GBLW 0x0004 /* 10GBASE-LW ability */ | ||
152 | #define MDIO_PMA_STAT2_10GBSW 0x0008 /* 10GBASE-SW ability */ | ||
153 | #define MDIO_PMA_STAT2_10GBLX4 0x0010 /* 10GBASE-LX4 ability */ | ||
154 | #define MDIO_PMA_STAT2_10GBER 0x0020 /* 10GBASE-ER ability */ | ||
155 | #define MDIO_PMA_STAT2_10GBLR 0x0040 /* 10GBASE-LR ability */ | ||
156 | #define MDIO_PMA_STAT2_10GBSR 0x0080 /* 10GBASE-SR ability */ | ||
157 | #define MDIO_PMD_STAT2_TXDISAB 0x0100 /* PMD TX disable ability */ | ||
158 | #define MDIO_PMA_STAT2_EXTABLE 0x0200 /* Extended abilities */ | ||
159 | #define MDIO_PMA_STAT2_RXFLTABLE 0x1000 /* Receive fault ability */ | ||
160 | #define MDIO_PMA_STAT2_TXFLTABLE 0x2000 /* Transmit fault ability */ | ||
161 | #define MDIO_PCS_STAT2_10GBR 0x0001 /* 10GBASE-R capable */ | ||
162 | #define MDIO_PCS_STAT2_10GBX 0x0002 /* 10GBASE-X capable */ | ||
163 | #define MDIO_PCS_STAT2_10GBW 0x0004 /* 10GBASE-W capable */ | ||
164 | #define MDIO_PCS_STAT2_RXFLTABLE 0x1000 /* Receive fault ability */ | ||
165 | #define MDIO_PCS_STAT2_TXFLTABLE 0x2000 /* Transmit fault ability */ | ||
166 | |||
167 | /* Transmit disable register. */ | ||
168 | #define MDIO_PMD_TXDIS_GLOBAL 0x0001 /* Global PMD TX disable */ | ||
169 | #define MDIO_PMD_TXDIS_0 0x0002 /* PMD TX disable 0 */ | ||
170 | #define MDIO_PMD_TXDIS_1 0x0004 /* PMD TX disable 1 */ | ||
171 | #define MDIO_PMD_TXDIS_2 0x0008 /* PMD TX disable 2 */ | ||
172 | #define MDIO_PMD_TXDIS_3 0x0010 /* PMD TX disable 3 */ | ||
173 | |||
174 | /* Receive signal detect register. */ | ||
175 | #define MDIO_PMD_RXDET_GLOBAL 0x0001 /* Global PMD RX signal detect */ | ||
176 | #define MDIO_PMD_RXDET_0 0x0002 /* PMD RX signal detect 0 */ | ||
177 | #define MDIO_PMD_RXDET_1 0x0004 /* PMD RX signal detect 1 */ | ||
178 | #define MDIO_PMD_RXDET_2 0x0008 /* PMD RX signal detect 2 */ | ||
179 | #define MDIO_PMD_RXDET_3 0x0010 /* PMD RX signal detect 3 */ | ||
180 | |||
181 | /* Extended abilities register. */ | ||
182 | #define MDIO_PMA_EXTABLE_10GCX4 0x0001 /* 10GBASE-CX4 ability */ | ||
183 | #define MDIO_PMA_EXTABLE_10GBLRM 0x0002 /* 10GBASE-LRM ability */ | ||
184 | #define MDIO_PMA_EXTABLE_10GBT 0x0004 /* 10GBASE-T ability */ | ||
185 | #define MDIO_PMA_EXTABLE_10GBKX4 0x0008 /* 10GBASE-KX4 ability */ | ||
186 | #define MDIO_PMA_EXTABLE_10GBKR 0x0010 /* 10GBASE-KR ability */ | ||
187 | #define MDIO_PMA_EXTABLE_1000BT 0x0020 /* 1000BASE-T ability */ | ||
188 | #define MDIO_PMA_EXTABLE_1000BKX 0x0040 /* 1000BASE-KX ability */ | ||
189 | #define MDIO_PMA_EXTABLE_100BTX 0x0080 /* 100BASE-TX ability */ | ||
190 | #define MDIO_PMA_EXTABLE_10BT 0x0100 /* 10BASE-T ability */ | ||
191 | |||
192 | /* PHY XGXS lane state register. */ | ||
193 | #define MDIO_PHYXS_LNSTAT_SYNC0 0x0001 | ||
194 | #define MDIO_PHYXS_LNSTAT_SYNC1 0x0002 | ||
195 | #define MDIO_PHYXS_LNSTAT_SYNC2 0x0004 | ||
196 | #define MDIO_PHYXS_LNSTAT_SYNC3 0x0008 | ||
197 | #define MDIO_PHYXS_LNSTAT_ALIGN 0x1000 | ||
198 | |||
199 | /* PMA 10GBASE-T pair swap & polarity */ | ||
200 | #define MDIO_PMA_10GBT_SWAPPOL_ABNX 0x0001 /* Pair A/B uncrossed */ | ||
201 | #define MDIO_PMA_10GBT_SWAPPOL_CDNX 0x0002 /* Pair C/D uncrossed */ | ||
202 | #define MDIO_PMA_10GBT_SWAPPOL_AREV 0x0100 /* Pair A polarity reversed */ | ||
203 | #define MDIO_PMA_10GBT_SWAPPOL_BREV 0x0200 /* Pair B polarity reversed */ | ||
204 | #define MDIO_PMA_10GBT_SWAPPOL_CREV 0x0400 /* Pair C polarity reversed */ | ||
205 | #define MDIO_PMA_10GBT_SWAPPOL_DREV 0x0800 /* Pair D polarity reversed */ | ||
206 | |||
207 | /* PMA 10GBASE-T TX power register. */ | ||
208 | #define MDIO_PMA_10GBT_TXPWR_SHORT 0x0001 /* Short-reach mode */ | ||
209 | |||
210 | /* PMA 10GBASE-T SNR registers. */ | ||
211 | /* Value is SNR margin in dB, clamped to range [-127, 127], plus 0x8000. */ | ||
212 | #define MDIO_PMA_10GBT_SNR_BIAS 0x8000 | ||
213 | #define MDIO_PMA_10GBT_SNR_MAX 127 | ||
214 | |||
215 | /* PMA 10GBASE-R FEC ability register. */ | ||
216 | #define MDIO_PMA_10GBR_FECABLE_ABLE 0x0001 /* FEC ability */ | ||
217 | #define MDIO_PMA_10GBR_FECABLE_ERRABLE 0x0002 /* FEC error indic. ability */ | ||
218 | |||
219 | /* PCS 10GBASE-R/-T status register 1. */ | ||
220 | #define MDIO_PCS_10GBRT_STAT1_BLKLK 0x0001 /* Block lock attained */ | ||
221 | |||
222 | /* PCS 10GBASE-R/-T status register 2. */ | ||
223 | #define MDIO_PCS_10GBRT_STAT2_ERR 0x00ff | ||
224 | #define MDIO_PCS_10GBRT_STAT2_BER 0x3f00 | ||
225 | |||
226 | /* AN 10GBASE-T control register. */ | ||
227 | #define MDIO_AN_10GBT_CTRL_ADV10G 0x1000 /* Advertise 10GBASE-T */ | ||
228 | |||
229 | /* AN 10GBASE-T status register. */ | ||
230 | #define MDIO_AN_10GBT_STAT_LPTRR 0x0200 /* LP training reset req. */ | ||
231 | #define MDIO_AN_10GBT_STAT_LPLTABLE 0x0400 /* LP loop timing ability */ | ||
232 | #define MDIO_AN_10GBT_STAT_LP10G 0x0800 /* LP is 10GBT capable */ | ||
233 | #define MDIO_AN_10GBT_STAT_REMOK 0x1000 /* Remote OK */ | ||
234 | #define MDIO_AN_10GBT_STAT_LOCOK 0x2000 /* Local OK */ | ||
235 | #define MDIO_AN_10GBT_STAT_MS 0x4000 /* Master/slave config */ | ||
236 | #define MDIO_AN_10GBT_STAT_MSFLT 0x8000 /* Master/slave config fault */ | ||
237 | |||
238 | /* LASI RX_ALARM control/status registers. */ | ||
239 | #define MDIO_PMA_LASI_RX_PHYXSLFLT 0x0001 /* PHY XS RX local fault */ | ||
240 | #define MDIO_PMA_LASI_RX_PCSLFLT 0x0008 /* PCS RX local fault */ | ||
241 | #define MDIO_PMA_LASI_RX_PMALFLT 0x0010 /* PMA/PMD RX local fault */ | ||
242 | #define MDIO_PMA_LASI_RX_OPTICPOWERFLT 0x0020 /* RX optical power fault */ | ||
243 | #define MDIO_PMA_LASI_RX_WISLFLT 0x0200 /* WIS local fault */ | ||
244 | |||
245 | /* LASI TX_ALARM control/status registers. */ | ||
246 | #define MDIO_PMA_LASI_TX_PHYXSLFLT 0x0001 /* PHY XS TX local fault */ | ||
247 | #define MDIO_PMA_LASI_TX_PCSLFLT 0x0008 /* PCS TX local fault */ | ||
248 | #define MDIO_PMA_LASI_TX_PMALFLT 0x0010 /* PMA/PMD TX local fault */ | ||
249 | #define MDIO_PMA_LASI_TX_LASERPOWERFLT 0x0080 /* Laser output power fault */ | ||
250 | #define MDIO_PMA_LASI_TX_LASERTEMPFLT 0x0100 /* Laser temperature fault */ | ||
251 | #define MDIO_PMA_LASI_TX_LASERBICURRFLT 0x0200 /* Laser bias current fault */ | ||
252 | |||
253 | /* LASI control/status registers. */ | ||
254 | #define MDIO_PMA_LASI_LSALARM 0x0001 /* LS_ALARM enable/status */ | ||
255 | #define MDIO_PMA_LASI_TXALARM 0x0002 /* TX_ALARM enable/status */ | ||
256 | #define MDIO_PMA_LASI_RXALARM 0x0004 /* RX_ALARM enable/status */ | ||
257 | |||
258 | /* Mapping between MDIO PRTAD/DEVAD and mii_ioctl_data::phy_id */ | ||
259 | |||
260 | #define MDIO_PHY_ID_C45 0x8000 | ||
261 | #define MDIO_PHY_ID_PRTAD 0x03e0 | ||
262 | #define MDIO_PHY_ID_DEVAD 0x001f | ||
263 | #define MDIO_PHY_ID_C45_MASK \ | ||
264 | (MDIO_PHY_ID_C45 | MDIO_PHY_ID_PRTAD | MDIO_PHY_ID_DEVAD) | ||
265 | |||
266 | static inline __u16 mdio_phy_id_c45(int prtad, int devad) | ||
267 | { | ||
268 | return MDIO_PHY_ID_C45 | (prtad << 5) | devad; | ||
269 | } | ||
270 | |||
271 | static inline bool mdio_phy_id_is_c45(int phy_id) | ||
272 | { | ||
273 | return (phy_id & MDIO_PHY_ID_C45) && !(phy_id & ~MDIO_PHY_ID_C45_MASK); | ||
274 | } | ||
275 | |||
276 | static inline __u16 mdio_phy_id_prtad(int phy_id) | ||
277 | { | ||
278 | return (phy_id & MDIO_PHY_ID_PRTAD) >> 5; | ||
279 | } | ||
280 | |||
281 | static inline __u16 mdio_phy_id_devad(int phy_id) | ||
282 | { | ||
283 | return phy_id & MDIO_PHY_ID_DEVAD; | ||
284 | } | ||
285 | |||
286 | #define MDIO_SUPPORTS_C22 1 | ||
287 | #define MDIO_SUPPORTS_C45 2 | ||
288 | |||
289 | #ifdef __KERNEL__ | ||
290 | |||
291 | /** | ||
292 | * struct mdio_if_info - Ethernet controller MDIO interface | ||
293 | * @prtad: PRTAD of the PHY (%MDIO_PRTAD_NONE if not present/unknown) | ||
294 | * @mmds: Mask of MMDs expected to be present in the PHY. This must be | ||
295 | * non-zero unless @prtad = %MDIO_PRTAD_NONE. | ||
296 | * @mode_support: MDIO modes supported. If %MDIO_SUPPORTS_C22 is set then | ||
297 | * MII register access will be passed through with @devad = | ||
298 | * %MDIO_DEVAD_NONE. If %MDIO_EMULATE_C22 is set then access to | ||
299 | * commonly used clause 22 registers will be translated into | ||
300 | * clause 45 registers. | ||
301 | * @dev: Net device structure | ||
302 | * @mdio_read: Register read function; returns value or negative error code | ||
303 | * @mdio_write: Register write function; returns 0 or negative error code | ||
304 | */ | ||
305 | struct mdio_if_info { | ||
306 | int prtad; | ||
307 | u32 __bitwise mmds; | ||
308 | unsigned mode_support; | ||
309 | |||
310 | struct net_device *dev; | ||
311 | int (*mdio_read)(struct net_device *dev, int prtad, int devad, | ||
312 | u16 addr); | ||
313 | int (*mdio_write)(struct net_device *dev, int prtad, int devad, | ||
314 | u16 addr, u16 val); | ||
315 | }; | ||
316 | |||
317 | #define MDIO_PRTAD_NONE (-1) | ||
318 | #define MDIO_DEVAD_NONE (-1) | ||
319 | #define MDIO_EMULATE_C22 4 | ||
320 | |||
321 | struct ethtool_cmd; | ||
322 | struct ethtool_pauseparam; | ||
323 | extern int mdio45_probe(struct mdio_if_info *mdio, int prtad); | ||
324 | extern int mdio_set_flag(const struct mdio_if_info *mdio, | ||
325 | int prtad, int devad, u16 addr, int mask, | ||
326 | bool sense); | ||
327 | extern int mdio45_links_ok(const struct mdio_if_info *mdio, u32 mmds); | ||
328 | extern int mdio45_nway_restart(const struct mdio_if_info *mdio); | ||
329 | extern void mdio45_ethtool_gset_npage(const struct mdio_if_info *mdio, | ||
330 | struct ethtool_cmd *ecmd, | ||
331 | u32 npage_adv, u32 npage_lpa); | ||
332 | extern void | ||
333 | mdio45_ethtool_spauseparam_an(const struct mdio_if_info *mdio, | ||
334 | const struct ethtool_pauseparam *ecmd); | ||
335 | |||
336 | /** | ||
337 | * mdio45_ethtool_gset - get settings for ETHTOOL_GSET | ||
338 | * @mdio: MDIO interface | ||
339 | * @ecmd: Ethtool request structure | ||
340 | * | ||
341 | * Since the CSRs for auto-negotiation using next pages are not fully | ||
342 | * standardised, this function does not attempt to decode them. Use | ||
343 | * mdio45_ethtool_gset_npage() to specify advertisement bits from next | ||
344 | * pages. | ||
345 | */ | ||
346 | static inline void mdio45_ethtool_gset(const struct mdio_if_info *mdio, | ||
347 | struct ethtool_cmd *ecmd) | ||
348 | { | ||
349 | mdio45_ethtool_gset_npage(mdio, ecmd, 0, 0); | ||
350 | } | ||
351 | |||
352 | extern int mdio_mii_ioctl(const struct mdio_if_info *mdio, | ||
353 | struct mii_ioctl_data *mii_data, int cmd); | ||
354 | |||
355 | #endif /* __KERNEL__ */ | ||
356 | #endif /* __LINUX_MDIO_H__ */ | ||
diff --git a/include/linux/mii.h b/include/linux/mii.h index ad748588faf1..359fba880274 100644 --- a/include/linux/mii.h +++ b/include/linux/mii.h | |||
@@ -240,6 +240,22 @@ static inline unsigned int mii_duplex (unsigned int duplex_lock, | |||
240 | } | 240 | } |
241 | 241 | ||
242 | /** | 242 | /** |
243 | * mii_advertise_flowctrl - get flow control advertisement flags | ||
244 | * @cap: Flow control capabilities (FLOW_CTRL_RX, FLOW_CTRL_TX or both) | ||
245 | */ | ||
246 | static inline u16 mii_advertise_flowctrl(int cap) | ||
247 | { | ||
248 | u16 adv = 0; | ||
249 | |||
250 | if (cap & FLOW_CTRL_RX) | ||
251 | adv = ADVERTISE_PAUSE_CAP | ADVERTISE_PAUSE_ASYM; | ||
252 | if (cap & FLOW_CTRL_TX) | ||
253 | adv ^= ADVERTISE_PAUSE_ASYM; | ||
254 | |||
255 | return adv; | ||
256 | } | ||
257 | |||
258 | /** | ||
243 | * mii_resolve_flowctrl_fdx | 259 | * mii_resolve_flowctrl_fdx |
244 | * @lcladv: value of MII ADVERTISE register | 260 | * @lcladv: value of MII ADVERTISE register |
245 | * @rmtadv: value of MII LPA register | 261 | * @rmtadv: value of MII LPA register |
@@ -250,18 +266,12 @@ static inline u8 mii_resolve_flowctrl_fdx(u16 lcladv, u16 rmtadv) | |||
250 | { | 266 | { |
251 | u8 cap = 0; | 267 | u8 cap = 0; |
252 | 268 | ||
253 | if (lcladv & ADVERTISE_PAUSE_CAP) { | 269 | if (lcladv & rmtadv & ADVERTISE_PAUSE_CAP) { |
254 | if (lcladv & ADVERTISE_PAUSE_ASYM) { | 270 | cap = FLOW_CTRL_TX | FLOW_CTRL_RX; |
255 | if (rmtadv & LPA_PAUSE_CAP) | 271 | } else if (lcladv & rmtadv & ADVERTISE_PAUSE_ASYM) { |
256 | cap = FLOW_CTRL_TX | FLOW_CTRL_RX; | 272 | if (lcladv & ADVERTISE_PAUSE_CAP) |
257 | else if (rmtadv & LPA_PAUSE_ASYM) | 273 | cap = FLOW_CTRL_RX; |
258 | cap = FLOW_CTRL_RX; | 274 | else if (rmtadv & ADVERTISE_PAUSE_CAP) |
259 | } else { | ||
260 | if (rmtadv & LPA_PAUSE_CAP) | ||
261 | cap = FLOW_CTRL_TX | FLOW_CTRL_RX; | ||
262 | } | ||
263 | } else if (lcladv & ADVERTISE_PAUSE_ASYM) { | ||
264 | if ((rmtadv & LPA_PAUSE_CAP) && (rmtadv & LPA_PAUSE_ASYM)) | ||
265 | cap = FLOW_CTRL_TX; | 275 | cap = FLOW_CTRL_TX; |
266 | } | 276 | } |
267 | 277 | ||
diff --git a/include/linux/mmc/sdio_ids.h b/include/linux/mmc/sdio_ids.h index ea1bf5ba092f..c7211ab6dd4b 100644 --- a/include/linux/mmc/sdio_ids.h +++ b/include/linux/mmc/sdio_ids.h | |||
@@ -25,5 +25,7 @@ | |||
25 | 25 | ||
26 | #define SDIO_VENDOR_ID_MARVELL 0x02df | 26 | #define SDIO_VENDOR_ID_MARVELL 0x02df |
27 | #define SDIO_DEVICE_ID_MARVELL_LIBERTAS 0x9103 | 27 | #define SDIO_DEVICE_ID_MARVELL_LIBERTAS 0x9103 |
28 | #define SDIO_DEVICE_ID_MARVELL_8688WLAN 0x9104 | ||
29 | #define SDIO_DEVICE_ID_MARVELL_8688BT 0x9105 | ||
28 | 30 | ||
29 | #endif | 31 | #endif |
diff --git a/include/linux/net_dropmon.h b/include/linux/net_dropmon.h index 0e2e100c44a2..3ceb0cc1bc78 100644 --- a/include/linux/net_dropmon.h +++ b/include/linux/net_dropmon.h | |||
@@ -3,12 +3,20 @@ | |||
3 | 3 | ||
4 | #include <linux/types.h> | 4 | #include <linux/types.h> |
5 | #include <linux/netlink.h> | 5 | #include <linux/netlink.h> |
6 | #include <linux/types.h> | ||
6 | 7 | ||
7 | struct net_dm_drop_point { | 8 | struct net_dm_drop_point { |
8 | __u8 pc[8]; | 9 | __u8 pc[8]; |
9 | __u32 count; | 10 | __u32 count; |
10 | }; | 11 | }; |
11 | 12 | ||
13 | #define is_drop_point_hw(x) do {\ | ||
14 | int ____i, ____j;\ | ||
15 | for (____i = 0; ____i < 8; i ____i++)\ | ||
16 | ____j |= x[____i];\ | ||
17 | ____j;\ | ||
18 | } while (0) | ||
19 | |||
12 | #define NET_DM_CFG_VERSION 0 | 20 | #define NET_DM_CFG_VERSION 0 |
13 | #define NET_DM_CFG_ALERT_COUNT 1 | 21 | #define NET_DM_CFG_ALERT_COUNT 1 |
14 | #define NET_DM_CFG_ALERT_DELAY 2 | 22 | #define NET_DM_CFG_ALERT_DELAY 2 |
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index 5a96a1a406e9..9ea8d6dfe540 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h | |||
@@ -39,9 +39,11 @@ | |||
39 | 39 | ||
40 | #include <linux/device.h> | 40 | #include <linux/device.h> |
41 | #include <linux/percpu.h> | 41 | #include <linux/percpu.h> |
42 | #include <linux/rculist.h> | ||
42 | #include <linux/dmaengine.h> | 43 | #include <linux/dmaengine.h> |
43 | #include <linux/workqueue.h> | 44 | #include <linux/workqueue.h> |
44 | 45 | ||
46 | #include <linux/ethtool.h> | ||
45 | #include <net/net_namespace.h> | 47 | #include <net/net_namespace.h> |
46 | #include <net/dsa.h> | 48 | #include <net/dsa.h> |
47 | #ifdef CONFIG_DCB | 49 | #ifdef CONFIG_DCB |
@@ -49,7 +51,6 @@ | |||
49 | #endif | 51 | #endif |
50 | 52 | ||
51 | struct vlan_group; | 53 | struct vlan_group; |
52 | struct ethtool_ops; | ||
53 | struct netpoll_info; | 54 | struct netpoll_info; |
54 | /* 802.11 specific */ | 55 | /* 802.11 specific */ |
55 | struct wireless_dev; | 56 | struct wireless_dev; |
@@ -210,6 +211,19 @@ struct dev_addr_list | |||
210 | #define dmi_users da_users | 211 | #define dmi_users da_users |
211 | #define dmi_gusers da_gusers | 212 | #define dmi_gusers da_gusers |
212 | 213 | ||
214 | struct netdev_hw_addr { | ||
215 | struct list_head list; | ||
216 | unsigned char addr[MAX_ADDR_LEN]; | ||
217 | unsigned char type; | ||
218 | #define NETDEV_HW_ADDR_T_LAN 1 | ||
219 | #define NETDEV_HW_ADDR_T_SAN 2 | ||
220 | #define NETDEV_HW_ADDR_T_SLAVE 3 | ||
221 | #define NETDEV_HW_ADDR_T_UNICAST 4 | ||
222 | int refcount; | ||
223 | bool synced; | ||
224 | struct rcu_head rcu_head; | ||
225 | }; | ||
226 | |||
213 | struct hh_cache | 227 | struct hh_cache |
214 | { | 228 | { |
215 | struct hh_cache *hh_next; /* Next entry */ | 229 | struct hh_cache *hh_next; /* Next entry */ |
@@ -447,12 +461,25 @@ enum netdev_queue_state_t | |||
447 | }; | 461 | }; |
448 | 462 | ||
449 | struct netdev_queue { | 463 | struct netdev_queue { |
464 | /* | ||
465 | * read mostly part | ||
466 | */ | ||
450 | struct net_device *dev; | 467 | struct net_device *dev; |
451 | struct Qdisc *qdisc; | 468 | struct Qdisc *qdisc; |
452 | unsigned long state; | 469 | unsigned long state; |
453 | spinlock_t _xmit_lock; | ||
454 | int xmit_lock_owner; | ||
455 | struct Qdisc *qdisc_sleeping; | 470 | struct Qdisc *qdisc_sleeping; |
471 | /* | ||
472 | * write mostly part | ||
473 | */ | ||
474 | spinlock_t _xmit_lock ____cacheline_aligned_in_smp; | ||
475 | int xmit_lock_owner; | ||
476 | /* | ||
477 | * please use this field instead of dev->trans_start | ||
478 | */ | ||
479 | unsigned long trans_start; | ||
480 | unsigned long tx_bytes; | ||
481 | unsigned long tx_packets; | ||
482 | unsigned long tx_dropped; | ||
456 | } ____cacheline_aligned_in_smp; | 483 | } ____cacheline_aligned_in_smp; |
457 | 484 | ||
458 | 485 | ||
@@ -670,7 +697,9 @@ struct net_device | |||
670 | #define NETIF_F_GRO 16384 /* Generic receive offload */ | 697 | #define NETIF_F_GRO 16384 /* Generic receive offload */ |
671 | #define NETIF_F_LRO 32768 /* large receive offload */ | 698 | #define NETIF_F_LRO 32768 /* large receive offload */ |
672 | 699 | ||
700 | /* the GSO_MASK reserves bits 16 through 23 */ | ||
673 | #define NETIF_F_FCOE_CRC (1 << 24) /* FCoE CRC32 */ | 701 | #define NETIF_F_FCOE_CRC (1 << 24) /* FCoE CRC32 */ |
702 | #define NETIF_F_SCTP_CSUM (1 << 25) /* SCTP checksum offload */ | ||
674 | 703 | ||
675 | /* Segmentation offload features */ | 704 | /* Segmentation offload features */ |
676 | #define NETIF_F_GSO_SHIFT 16 | 705 | #define NETIF_F_GSO_SHIFT 16 |
@@ -747,10 +776,11 @@ struct net_device | |||
747 | unsigned char addr_len; /* hardware address length */ | 776 | unsigned char addr_len; /* hardware address length */ |
748 | unsigned short dev_id; /* for shared network cards */ | 777 | unsigned short dev_id; /* for shared network cards */ |
749 | 778 | ||
750 | spinlock_t addr_list_lock; | 779 | struct list_head uc_list; /* Secondary unicast mac |
751 | struct dev_addr_list *uc_list; /* Secondary unicast mac addresses */ | 780 | addresses */ |
752 | int uc_count; /* Number of installed ucasts */ | 781 | int uc_count; /* Number of installed ucasts */ |
753 | int uc_promisc; | 782 | int uc_promisc; |
783 | spinlock_t addr_list_lock; | ||
754 | struct dev_addr_list *mc_list; /* Multicast mac addresses */ | 784 | struct dev_addr_list *mc_list; /* Multicast mac addresses */ |
755 | int mc_count; /* Number of installed mcasts */ | 785 | int mc_count; /* Number of installed mcasts */ |
756 | unsigned int promiscuity; | 786 | unsigned int promiscuity; |
@@ -776,8 +806,11 @@ struct net_device | |||
776 | */ | 806 | */ |
777 | unsigned long last_rx; /* Time of last Rx */ | 807 | unsigned long last_rx; /* Time of last Rx */ |
778 | /* Interface address info used in eth_type_trans() */ | 808 | /* Interface address info used in eth_type_trans() */ |
779 | unsigned char dev_addr[MAX_ADDR_LEN]; /* hw address, (before bcast | 809 | unsigned char *dev_addr; /* hw address, (before bcast |
780 | because most packets are unicast) */ | 810 | because most packets are |
811 | unicast) */ | ||
812 | |||
813 | struct list_head dev_addr_list; /* list of device hw addresses */ | ||
781 | 814 | ||
782 | unsigned char broadcast[MAX_ADDR_LEN]; /* hw bcast add */ | 815 | unsigned char broadcast[MAX_ADDR_LEN]; /* hw bcast add */ |
783 | 816 | ||
@@ -797,6 +830,11 @@ struct net_device | |||
797 | * One part is mostly used on xmit path (device) | 830 | * One part is mostly used on xmit path (device) |
798 | */ | 831 | */ |
799 | /* These may be needed for future network-power-down code. */ | 832 | /* These may be needed for future network-power-down code. */ |
833 | |||
834 | /* | ||
835 | * trans_start here is expensive for high speed devices on SMP, | ||
836 | * please use netdev_queue->trans_start instead. | ||
837 | */ | ||
800 | unsigned long trans_start; /* Time (in jiffies) of last Tx */ | 838 | unsigned long trans_start; /* Time (in jiffies) of last Tx */ |
801 | 839 | ||
802 | int watchdog_timeo; /* used by dev_watchdog() */ | 840 | int watchdog_timeo; /* used by dev_watchdog() */ |
@@ -867,49 +905,10 @@ struct net_device | |||
867 | /* max exchange id for FCoE LRO by ddp */ | 905 | /* max exchange id for FCoE LRO by ddp */ |
868 | unsigned int fcoe_ddp_xid; | 906 | unsigned int fcoe_ddp_xid; |
869 | #endif | 907 | #endif |
870 | |||
871 | #ifdef CONFIG_COMPAT_NET_DEV_OPS | ||
872 | struct { | ||
873 | int (*init)(struct net_device *dev); | ||
874 | void (*uninit)(struct net_device *dev); | ||
875 | int (*open)(struct net_device *dev); | ||
876 | int (*stop)(struct net_device *dev); | ||
877 | int (*hard_start_xmit) (struct sk_buff *skb, | ||
878 | struct net_device *dev); | ||
879 | u16 (*select_queue)(struct net_device *dev, | ||
880 | struct sk_buff *skb); | ||
881 | void (*change_rx_flags)(struct net_device *dev, | ||
882 | int flags); | ||
883 | void (*set_rx_mode)(struct net_device *dev); | ||
884 | void (*set_multicast_list)(struct net_device *dev); | ||
885 | int (*set_mac_address)(struct net_device *dev, | ||
886 | void *addr); | ||
887 | int (*validate_addr)(struct net_device *dev); | ||
888 | int (*do_ioctl)(struct net_device *dev, | ||
889 | struct ifreq *ifr, int cmd); | ||
890 | int (*set_config)(struct net_device *dev, | ||
891 | struct ifmap *map); | ||
892 | int (*change_mtu)(struct net_device *dev, int new_mtu); | ||
893 | int (*neigh_setup)(struct net_device *dev, | ||
894 | struct neigh_parms *); | ||
895 | void (*tx_timeout) (struct net_device *dev); | ||
896 | struct net_device_stats* (*get_stats)(struct net_device *dev); | ||
897 | void (*vlan_rx_register)(struct net_device *dev, | ||
898 | struct vlan_group *grp); | ||
899 | void (*vlan_rx_add_vid)(struct net_device *dev, | ||
900 | unsigned short vid); | ||
901 | void (*vlan_rx_kill_vid)(struct net_device *dev, | ||
902 | unsigned short vid); | ||
903 | #ifdef CONFIG_NET_POLL_CONTROLLER | ||
904 | void (*poll_controller)(struct net_device *dev); | ||
905 | #endif | ||
906 | }; | ||
907 | #endif | ||
908 | }; | 908 | }; |
909 | #define to_net_dev(d) container_of(d, struct net_device, dev) | 909 | #define to_net_dev(d) container_of(d, struct net_device, dev) |
910 | 910 | ||
911 | #define NETDEV_ALIGN 32 | 911 | #define NETDEV_ALIGN 32 |
912 | #define NETDEV_ALIGN_CONST (NETDEV_ALIGN - 1) | ||
913 | 912 | ||
914 | static inline | 913 | static inline |
915 | struct netdev_queue *netdev_get_tx_queue(const struct net_device *dev, | 914 | struct netdev_queue *netdev_get_tx_queue(const struct net_device *dev, |
@@ -980,9 +979,7 @@ static inline bool netdev_uses_trailer_tags(struct net_device *dev) | |||
980 | */ | 979 | */ |
981 | static inline void *netdev_priv(const struct net_device *dev) | 980 | static inline void *netdev_priv(const struct net_device *dev) |
982 | { | 981 | { |
983 | return (char *)dev + ((sizeof(struct net_device) | 982 | return (char *)dev + ALIGN(sizeof(struct net_device), NETDEV_ALIGN); |
984 | + NETDEV_ALIGN_CONST) | ||
985 | & ~NETDEV_ALIGN_CONST); | ||
986 | } | 983 | } |
987 | 984 | ||
988 | /* Set the sysfs physical device reference for the network logical device | 985 | /* Set the sysfs physical device reference for the network logical device |
@@ -1012,6 +1009,12 @@ void netif_napi_add(struct net_device *dev, struct napi_struct *napi, | |||
1012 | void netif_napi_del(struct napi_struct *napi); | 1009 | void netif_napi_del(struct napi_struct *napi); |
1013 | 1010 | ||
1014 | struct napi_gro_cb { | 1011 | struct napi_gro_cb { |
1012 | /* Virtual address of skb_shinfo(skb)->frags[0].page + offset. */ | ||
1013 | void *frag0; | ||
1014 | |||
1015 | /* Length of frag0. */ | ||
1016 | unsigned int frag0_len; | ||
1017 | |||
1015 | /* This indicates where we are processing relative to skb->data. */ | 1018 | /* This indicates where we are processing relative to skb->data. */ |
1016 | int data_offset; | 1019 | int data_offset; |
1017 | 1020 | ||
@@ -1047,14 +1050,6 @@ struct packet_type { | |||
1047 | struct list_head list; | 1050 | struct list_head list; |
1048 | }; | 1051 | }; |
1049 | 1052 | ||
1050 | struct napi_gro_fraginfo { | ||
1051 | skb_frag_t frags[MAX_SKB_FRAGS]; | ||
1052 | unsigned int nr_frags; | ||
1053 | unsigned int ip_summed; | ||
1054 | unsigned int len; | ||
1055 | __wsum csum; | ||
1056 | }; | ||
1057 | |||
1058 | #include <linux/interrupt.h> | 1053 | #include <linux/interrupt.h> |
1059 | #include <linux/notifier.h> | 1054 | #include <linux/notifier.h> |
1060 | 1055 | ||
@@ -1119,9 +1114,9 @@ extern int dev_restart(struct net_device *dev); | |||
1119 | #ifdef CONFIG_NETPOLL_TRAP | 1114 | #ifdef CONFIG_NETPOLL_TRAP |
1120 | extern int netpoll_trap(void); | 1115 | extern int netpoll_trap(void); |
1121 | #endif | 1116 | #endif |
1122 | extern void *skb_gro_header(struct sk_buff *skb, unsigned int hlen); | ||
1123 | extern int skb_gro_receive(struct sk_buff **head, | 1117 | extern int skb_gro_receive(struct sk_buff **head, |
1124 | struct sk_buff *skb); | 1118 | struct sk_buff *skb); |
1119 | extern void skb_gro_reset_offset(struct sk_buff *skb); | ||
1125 | 1120 | ||
1126 | static inline unsigned int skb_gro_offset(const struct sk_buff *skb) | 1121 | static inline unsigned int skb_gro_offset(const struct sk_buff *skb) |
1127 | { | 1122 | { |
@@ -1138,16 +1133,34 @@ static inline void skb_gro_pull(struct sk_buff *skb, unsigned int len) | |||
1138 | NAPI_GRO_CB(skb)->data_offset += len; | 1133 | NAPI_GRO_CB(skb)->data_offset += len; |
1139 | } | 1134 | } |
1140 | 1135 | ||
1141 | static inline void skb_gro_reset_offset(struct sk_buff *skb) | 1136 | static inline void *skb_gro_header_fast(struct sk_buff *skb, |
1137 | unsigned int offset) | ||
1142 | { | 1138 | { |
1143 | NAPI_GRO_CB(skb)->data_offset = 0; | 1139 | return NAPI_GRO_CB(skb)->frag0 + offset; |
1140 | } | ||
1141 | |||
1142 | static inline int skb_gro_header_hard(struct sk_buff *skb, unsigned int hlen) | ||
1143 | { | ||
1144 | return NAPI_GRO_CB(skb)->frag0_len < hlen; | ||
1145 | } | ||
1146 | |||
1147 | static inline void *skb_gro_header_slow(struct sk_buff *skb, unsigned int hlen, | ||
1148 | unsigned int offset) | ||
1149 | { | ||
1150 | NAPI_GRO_CB(skb)->frag0 = NULL; | ||
1151 | NAPI_GRO_CB(skb)->frag0_len = 0; | ||
1152 | return pskb_may_pull(skb, hlen) ? skb->data + offset : NULL; | ||
1144 | } | 1153 | } |
1145 | 1154 | ||
1146 | static inline void *skb_gro_mac_header(struct sk_buff *skb) | 1155 | static inline void *skb_gro_mac_header(struct sk_buff *skb) |
1147 | { | 1156 | { |
1148 | return skb_mac_header(skb) < skb->data ? skb_mac_header(skb) : | 1157 | return NAPI_GRO_CB(skb)->frag0 ?: skb_mac_header(skb); |
1149 | page_address(skb_shinfo(skb)->frags[0].page) + | 1158 | } |
1150 | skb_shinfo(skb)->frags[0].page_offset; | 1159 | |
1160 | static inline void *skb_gro_network_header(struct sk_buff *skb) | ||
1161 | { | ||
1162 | return (NAPI_GRO_CB(skb)->frag0 ?: skb->data) + | ||
1163 | skb_network_offset(skb); | ||
1151 | } | 1164 | } |
1152 | 1165 | ||
1153 | static inline int dev_hard_header(struct sk_buff *skb, struct net_device *dev, | 1166 | static inline int dev_hard_header(struct sk_buff *skb, struct net_device *dev, |
@@ -1442,12 +1455,18 @@ extern int napi_gro_receive(struct napi_struct *napi, | |||
1442 | struct sk_buff *skb); | 1455 | struct sk_buff *skb); |
1443 | extern void napi_reuse_skb(struct napi_struct *napi, | 1456 | extern void napi_reuse_skb(struct napi_struct *napi, |
1444 | struct sk_buff *skb); | 1457 | struct sk_buff *skb); |
1445 | extern struct sk_buff * napi_fraginfo_skb(struct napi_struct *napi, | 1458 | extern struct sk_buff * napi_get_frags(struct napi_struct *napi); |
1446 | struct napi_gro_fraginfo *info); | ||
1447 | extern int napi_frags_finish(struct napi_struct *napi, | 1459 | extern int napi_frags_finish(struct napi_struct *napi, |
1448 | struct sk_buff *skb, int ret); | 1460 | struct sk_buff *skb, int ret); |
1449 | extern int napi_gro_frags(struct napi_struct *napi, | 1461 | extern struct sk_buff * napi_frags_skb(struct napi_struct *napi); |
1450 | struct napi_gro_fraginfo *info); | 1462 | extern int napi_gro_frags(struct napi_struct *napi); |
1463 | |||
1464 | static inline void napi_free_frags(struct napi_struct *napi) | ||
1465 | { | ||
1466 | kfree_skb(napi->skb); | ||
1467 | napi->skb = NULL; | ||
1468 | } | ||
1469 | |||
1451 | extern void netif_nit_deliver(struct sk_buff *skb); | 1470 | extern void netif_nit_deliver(struct sk_buff *skb); |
1452 | extern int dev_valid_name(const char *name); | 1471 | extern int dev_valid_name(const char *name); |
1453 | extern int dev_ioctl(struct net *net, unsigned int cmd, void __user *); | 1472 | extern int dev_ioctl(struct net *net, unsigned int cmd, void __user *); |
@@ -1514,6 +1533,8 @@ static inline int netif_carrier_ok(const struct net_device *dev) | |||
1514 | return !test_bit(__LINK_STATE_NOCARRIER, &dev->state); | 1533 | return !test_bit(__LINK_STATE_NOCARRIER, &dev->state); |
1515 | } | 1534 | } |
1516 | 1535 | ||
1536 | extern unsigned long dev_trans_start(struct net_device *dev); | ||
1537 | |||
1517 | extern void __netdev_watchdog_up(struct net_device *dev); | 1538 | extern void __netdev_watchdog_up(struct net_device *dev); |
1518 | 1539 | ||
1519 | extern void netif_carrier_on(struct net_device *dev); | 1540 | extern void netif_carrier_on(struct net_device *dev); |
@@ -1671,6 +1692,12 @@ static inline void __netif_tx_unlock_bh(struct netdev_queue *txq) | |||
1671 | spin_unlock_bh(&txq->_xmit_lock); | 1692 | spin_unlock_bh(&txq->_xmit_lock); |
1672 | } | 1693 | } |
1673 | 1694 | ||
1695 | static inline void txq_trans_update(struct netdev_queue *txq) | ||
1696 | { | ||
1697 | if (txq->xmit_lock_owner != -1) | ||
1698 | txq->trans_start = jiffies; | ||
1699 | } | ||
1700 | |||
1674 | /** | 1701 | /** |
1675 | * netif_tx_lock - grab network device transmit lock | 1702 | * netif_tx_lock - grab network device transmit lock |
1676 | * @dev: network device | 1703 | * @dev: network device |
@@ -1778,6 +1805,13 @@ static inline void netif_addr_unlock_bh(struct net_device *dev) | |||
1778 | spin_unlock_bh(&dev->addr_list_lock); | 1805 | spin_unlock_bh(&dev->addr_list_lock); |
1779 | } | 1806 | } |
1780 | 1807 | ||
1808 | /* | ||
1809 | * dev_addr_list walker. Should be used only for read access. Call with | ||
1810 | * rcu_read_lock held. | ||
1811 | */ | ||
1812 | #define for_each_dev_addr(dev, ha) \ | ||
1813 | list_for_each_entry_rcu(ha, &dev->dev_addr_list, list) | ||
1814 | |||
1781 | /* These functions live elsewhere (drivers/net/net_init.c, but related) */ | 1815 | /* These functions live elsewhere (drivers/net/net_init.c, but related) */ |
1782 | 1816 | ||
1783 | extern void ether_setup(struct net_device *dev); | 1817 | extern void ether_setup(struct net_device *dev); |
@@ -1790,11 +1824,24 @@ extern struct net_device *alloc_netdev_mq(int sizeof_priv, const char *name, | |||
1790 | alloc_netdev_mq(sizeof_priv, name, setup, 1) | 1824 | alloc_netdev_mq(sizeof_priv, name, setup, 1) |
1791 | extern int register_netdev(struct net_device *dev); | 1825 | extern int register_netdev(struct net_device *dev); |
1792 | extern void unregister_netdev(struct net_device *dev); | 1826 | extern void unregister_netdev(struct net_device *dev); |
1827 | |||
1828 | /* Functions used for device addresses handling */ | ||
1829 | extern int dev_addr_add(struct net_device *dev, unsigned char *addr, | ||
1830 | unsigned char addr_type); | ||
1831 | extern int dev_addr_del(struct net_device *dev, unsigned char *addr, | ||
1832 | unsigned char addr_type); | ||
1833 | extern int dev_addr_add_multiple(struct net_device *to_dev, | ||
1834 | struct net_device *from_dev, | ||
1835 | unsigned char addr_type); | ||
1836 | extern int dev_addr_del_multiple(struct net_device *to_dev, | ||
1837 | struct net_device *from_dev, | ||
1838 | unsigned char addr_type); | ||
1839 | |||
1793 | /* Functions used for secondary unicast and multicast support */ | 1840 | /* Functions used for secondary unicast and multicast support */ |
1794 | extern void dev_set_rx_mode(struct net_device *dev); | 1841 | extern void dev_set_rx_mode(struct net_device *dev); |
1795 | extern void __dev_set_rx_mode(struct net_device *dev); | 1842 | extern void __dev_set_rx_mode(struct net_device *dev); |
1796 | extern int dev_unicast_delete(struct net_device *dev, void *addr, int alen); | 1843 | extern int dev_unicast_delete(struct net_device *dev, void *addr); |
1797 | extern int dev_unicast_add(struct net_device *dev, void *addr, int alen); | 1844 | extern int dev_unicast_add(struct net_device *dev, void *addr); |
1798 | extern int dev_unicast_sync(struct net_device *to, struct net_device *from); | 1845 | extern int dev_unicast_sync(struct net_device *to, struct net_device *from); |
1799 | extern void dev_unicast_unsync(struct net_device *to, struct net_device *from); | 1846 | extern void dev_unicast_unsync(struct net_device *to, struct net_device *from); |
1800 | extern int dev_mc_delete(struct net_device *dev, void *addr, int alen, int all); | 1847 | extern int dev_mc_delete(struct net_device *dev, void *addr, int alen, int all); |
@@ -1856,15 +1903,14 @@ static inline int net_gso_ok(int features, int gso_type) | |||
1856 | 1903 | ||
1857 | static inline int skb_gso_ok(struct sk_buff *skb, int features) | 1904 | static inline int skb_gso_ok(struct sk_buff *skb, int features) |
1858 | { | 1905 | { |
1859 | return net_gso_ok(features, skb_shinfo(skb)->gso_type); | 1906 | return net_gso_ok(features, skb_shinfo(skb)->gso_type) && |
1907 | (!skb_has_frags(skb) || (features & NETIF_F_FRAGLIST)); | ||
1860 | } | 1908 | } |
1861 | 1909 | ||
1862 | static inline int netif_needs_gso(struct net_device *dev, struct sk_buff *skb) | 1910 | static inline int netif_needs_gso(struct net_device *dev, struct sk_buff *skb) |
1863 | { | 1911 | { |
1864 | return skb_is_gso(skb) && | 1912 | return skb_is_gso(skb) && |
1865 | (!skb_gso_ok(skb, dev->features) || | 1913 | (!skb_gso_ok(skb, dev->features) || |
1866 | (skb_shinfo(skb)->frag_list && | ||
1867 | !(dev->features & NETIF_F_FRAGLIST)) || | ||
1868 | unlikely(skb->ip_summed != CHECKSUM_PARTIAL)); | 1914 | unlikely(skb->ip_summed != CHECKSUM_PARTIAL)); |
1869 | } | 1915 | } |
1870 | 1916 | ||
@@ -1874,6 +1920,16 @@ static inline void netif_set_gso_max_size(struct net_device *dev, | |||
1874 | dev->gso_max_size = size; | 1920 | dev->gso_max_size = size; |
1875 | } | 1921 | } |
1876 | 1922 | ||
1923 | static inline void skb_bond_set_mac_by_master(struct sk_buff *skb, | ||
1924 | struct net_device *master) | ||
1925 | { | ||
1926 | if (skb->pkt_type == PACKET_HOST) { | ||
1927 | u16 *dest = (u16 *) eth_hdr(skb)->h_dest; | ||
1928 | |||
1929 | memcpy(dest, master->dev_addr, ETH_ALEN); | ||
1930 | } | ||
1931 | } | ||
1932 | |||
1877 | /* On bonding slaves other than the currently active slave, suppress | 1933 | /* On bonding slaves other than the currently active slave, suppress |
1878 | * duplicates except for 802.3ad ETH_P_SLOW, alb non-mcast/bcast, and | 1934 | * duplicates except for 802.3ad ETH_P_SLOW, alb non-mcast/bcast, and |
1879 | * ARP on active-backup slaves with arp_validate enabled. | 1935 | * ARP on active-backup slaves with arp_validate enabled. |
@@ -1887,6 +1943,14 @@ static inline int skb_bond_should_drop(struct sk_buff *skb) | |||
1887 | if (master->priv_flags & IFF_MASTER_ARPMON) | 1943 | if (master->priv_flags & IFF_MASTER_ARPMON) |
1888 | dev->last_rx = jiffies; | 1944 | dev->last_rx = jiffies; |
1889 | 1945 | ||
1946 | if ((master->priv_flags & IFF_MASTER_ALB) && master->br_port) { | ||
1947 | /* Do address unmangle. The local destination address | ||
1948 | * will be always the one master has. Provides the right | ||
1949 | * functionality in a bridge. | ||
1950 | */ | ||
1951 | skb_bond_set_mac_by_master(skb, master); | ||
1952 | } | ||
1953 | |||
1890 | if (dev->priv_flags & IFF_SLAVE_INACTIVE) { | 1954 | if (dev->priv_flags & IFF_SLAVE_INACTIVE) { |
1891 | if ((dev->priv_flags & IFF_SLAVE_NEEDARP) && | 1955 | if ((dev->priv_flags & IFF_SLAVE_NEEDARP) && |
1892 | skb->protocol == __cpu_to_be16(ETH_P_ARP)) | 1956 | skb->protocol == __cpu_to_be16(ETH_P_ARP)) |
@@ -1908,6 +1972,28 @@ static inline int skb_bond_should_drop(struct sk_buff *skb) | |||
1908 | } | 1972 | } |
1909 | 1973 | ||
1910 | extern struct pernet_operations __net_initdata loopback_net_ops; | 1974 | extern struct pernet_operations __net_initdata loopback_net_ops; |
1975 | |||
1976 | static inline int dev_ethtool_get_settings(struct net_device *dev, | ||
1977 | struct ethtool_cmd *cmd) | ||
1978 | { | ||
1979 | if (!dev->ethtool_ops || !dev->ethtool_ops->get_settings) | ||
1980 | return -EOPNOTSUPP; | ||
1981 | return dev->ethtool_ops->get_settings(dev, cmd); | ||
1982 | } | ||
1983 | |||
1984 | static inline u32 dev_ethtool_get_rx_csum(struct net_device *dev) | ||
1985 | { | ||
1986 | if (!dev->ethtool_ops || !dev->ethtool_ops->get_rx_csum) | ||
1987 | return 0; | ||
1988 | return dev->ethtool_ops->get_rx_csum(dev); | ||
1989 | } | ||
1990 | |||
1991 | static inline u32 dev_ethtool_get_flags(struct net_device *dev) | ||
1992 | { | ||
1993 | if (!dev->ethtool_ops || !dev->ethtool_ops->get_flags) | ||
1994 | return 0; | ||
1995 | return dev->ethtool_ops->get_flags(dev); | ||
1996 | } | ||
1911 | #endif /* __KERNEL__ */ | 1997 | #endif /* __KERNEL__ */ |
1912 | 1998 | ||
1913 | #endif /* _LINUX_DEV_H */ | 1999 | #endif /* _LINUX_NETDEVICE_H */ |
diff --git a/include/linux/netfilter/Kbuild b/include/linux/netfilter/Kbuild index af9d2fb97212..2aea50399c0b 100644 --- a/include/linux/netfilter/Kbuild +++ b/include/linux/netfilter/Kbuild | |||
@@ -33,6 +33,7 @@ header-y += xt_limit.h | |||
33 | header-y += xt_mac.h | 33 | header-y += xt_mac.h |
34 | header-y += xt_mark.h | 34 | header-y += xt_mark.h |
35 | header-y += xt_multiport.h | 35 | header-y += xt_multiport.h |
36 | header-y += xt_osf.h | ||
36 | header-y += xt_owner.h | 37 | header-y += xt_owner.h |
37 | header-y += xt_pkttype.h | 38 | header-y += xt_pkttype.h |
38 | header-y += xt_quota.h | 39 | header-y += xt_quota.h |
diff --git a/include/linux/netfilter/nf_conntrack_common.h b/include/linux/netfilter/nf_conntrack_common.h index 885cbe282260..a8248ee422b7 100644 --- a/include/linux/netfilter/nf_conntrack_common.h +++ b/include/linux/netfilter/nf_conntrack_common.h | |||
@@ -75,75 +75,6 @@ enum ip_conntrack_status { | |||
75 | IPS_FIXED_TIMEOUT = (1 << IPS_FIXED_TIMEOUT_BIT), | 75 | IPS_FIXED_TIMEOUT = (1 << IPS_FIXED_TIMEOUT_BIT), |
76 | }; | 76 | }; |
77 | 77 | ||
78 | /* Connection tracking event bits */ | ||
79 | enum ip_conntrack_events | ||
80 | { | ||
81 | /* New conntrack */ | ||
82 | IPCT_NEW_BIT = 0, | ||
83 | IPCT_NEW = (1 << IPCT_NEW_BIT), | ||
84 | |||
85 | /* Expected connection */ | ||
86 | IPCT_RELATED_BIT = 1, | ||
87 | IPCT_RELATED = (1 << IPCT_RELATED_BIT), | ||
88 | |||
89 | /* Destroyed conntrack */ | ||
90 | IPCT_DESTROY_BIT = 2, | ||
91 | IPCT_DESTROY = (1 << IPCT_DESTROY_BIT), | ||
92 | |||
93 | /* Timer has been refreshed */ | ||
94 | IPCT_REFRESH_BIT = 3, | ||
95 | IPCT_REFRESH = (1 << IPCT_REFRESH_BIT), | ||
96 | |||
97 | /* Status has changed */ | ||
98 | IPCT_STATUS_BIT = 4, | ||
99 | IPCT_STATUS = (1 << IPCT_STATUS_BIT), | ||
100 | |||
101 | /* Update of protocol info */ | ||
102 | IPCT_PROTOINFO_BIT = 5, | ||
103 | IPCT_PROTOINFO = (1 << IPCT_PROTOINFO_BIT), | ||
104 | |||
105 | /* Volatile protocol info */ | ||
106 | IPCT_PROTOINFO_VOLATILE_BIT = 6, | ||
107 | IPCT_PROTOINFO_VOLATILE = (1 << IPCT_PROTOINFO_VOLATILE_BIT), | ||
108 | |||
109 | /* New helper for conntrack */ | ||
110 | IPCT_HELPER_BIT = 7, | ||
111 | IPCT_HELPER = (1 << IPCT_HELPER_BIT), | ||
112 | |||
113 | /* Update of helper info */ | ||
114 | IPCT_HELPINFO_BIT = 8, | ||
115 | IPCT_HELPINFO = (1 << IPCT_HELPINFO_BIT), | ||
116 | |||
117 | /* Volatile helper info */ | ||
118 | IPCT_HELPINFO_VOLATILE_BIT = 9, | ||
119 | IPCT_HELPINFO_VOLATILE = (1 << IPCT_HELPINFO_VOLATILE_BIT), | ||
120 | |||
121 | /* NAT info */ | ||
122 | IPCT_NATINFO_BIT = 10, | ||
123 | IPCT_NATINFO = (1 << IPCT_NATINFO_BIT), | ||
124 | |||
125 | /* Counter highest bit has been set, unused */ | ||
126 | IPCT_COUNTER_FILLING_BIT = 11, | ||
127 | IPCT_COUNTER_FILLING = (1 << IPCT_COUNTER_FILLING_BIT), | ||
128 | |||
129 | /* Mark is set */ | ||
130 | IPCT_MARK_BIT = 12, | ||
131 | IPCT_MARK = (1 << IPCT_MARK_BIT), | ||
132 | |||
133 | /* NAT sequence adjustment */ | ||
134 | IPCT_NATSEQADJ_BIT = 13, | ||
135 | IPCT_NATSEQADJ = (1 << IPCT_NATSEQADJ_BIT), | ||
136 | |||
137 | /* Secmark is set */ | ||
138 | IPCT_SECMARK_BIT = 14, | ||
139 | IPCT_SECMARK = (1 << IPCT_SECMARK_BIT), | ||
140 | }; | ||
141 | |||
142 | enum ip_conntrack_expect_events { | ||
143 | IPEXP_NEW_BIT = 0, | ||
144 | IPEXP_NEW = (1 << IPEXP_NEW_BIT), | ||
145 | }; | ||
146 | |||
147 | #ifdef __KERNEL__ | 78 | #ifdef __KERNEL__ |
148 | struct ip_conntrack_stat | 79 | struct ip_conntrack_stat |
149 | { | 80 | { |
diff --git a/include/linux/netfilter/nf_conntrack_tcp.h b/include/linux/netfilter/nf_conntrack_tcp.h index b2f384d42611..4352feed2377 100644 --- a/include/linux/netfilter/nf_conntrack_tcp.h +++ b/include/linux/netfilter/nf_conntrack_tcp.h | |||
@@ -15,7 +15,8 @@ enum tcp_conntrack { | |||
15 | TCP_CONNTRACK_LAST_ACK, | 15 | TCP_CONNTRACK_LAST_ACK, |
16 | TCP_CONNTRACK_TIME_WAIT, | 16 | TCP_CONNTRACK_TIME_WAIT, |
17 | TCP_CONNTRACK_CLOSE, | 17 | TCP_CONNTRACK_CLOSE, |
18 | TCP_CONNTRACK_LISTEN, | 18 | TCP_CONNTRACK_LISTEN, /* obsolete */ |
19 | #define TCP_CONNTRACK_SYN_SENT2 TCP_CONNTRACK_LISTEN | ||
19 | TCP_CONNTRACK_MAX, | 20 | TCP_CONNTRACK_MAX, |
20 | TCP_CONNTRACK_IGNORE | 21 | TCP_CONNTRACK_IGNORE |
21 | }; | 22 | }; |
diff --git a/include/linux/netfilter/nfnetlink.h b/include/linux/netfilter/nfnetlink.h index c600083cbdf5..bff4d5741d98 100644 --- a/include/linux/netfilter/nfnetlink.h +++ b/include/linux/netfilter/nfnetlink.h | |||
@@ -46,7 +46,8 @@ struct nfgenmsg { | |||
46 | #define NFNL_SUBSYS_CTNETLINK_EXP 2 | 46 | #define NFNL_SUBSYS_CTNETLINK_EXP 2 |
47 | #define NFNL_SUBSYS_QUEUE 3 | 47 | #define NFNL_SUBSYS_QUEUE 3 |
48 | #define NFNL_SUBSYS_ULOG 4 | 48 | #define NFNL_SUBSYS_ULOG 4 |
49 | #define NFNL_SUBSYS_COUNT 5 | 49 | #define NFNL_SUBSYS_OSF 5 |
50 | #define NFNL_SUBSYS_COUNT 6 | ||
50 | 51 | ||
51 | #ifdef __KERNEL__ | 52 | #ifdef __KERNEL__ |
52 | 53 | ||
@@ -75,7 +76,7 @@ extern int nfnetlink_subsys_unregister(const struct nfnetlink_subsystem *n); | |||
75 | 76 | ||
76 | extern int nfnetlink_has_listeners(unsigned int group); | 77 | extern int nfnetlink_has_listeners(unsigned int group); |
77 | extern int nfnetlink_send(struct sk_buff *skb, u32 pid, unsigned group, | 78 | extern int nfnetlink_send(struct sk_buff *skb, u32 pid, unsigned group, |
78 | int echo); | 79 | int echo, gfp_t flags); |
79 | extern void nfnetlink_set_err(u32 pid, u32 group, int error); | 80 | extern void nfnetlink_set_err(u32 pid, u32 group, int error); |
80 | extern int nfnetlink_unicast(struct sk_buff *skb, u_int32_t pid, int flags); | 81 | extern int nfnetlink_unicast(struct sk_buff *skb, u_int32_t pid, int flags); |
81 | 82 | ||
diff --git a/include/linux/netfilter/nfnetlink_conntrack.h b/include/linux/netfilter/nfnetlink_conntrack.h index 1a865e48b8eb..ed4ef8d0b11b 100644 --- a/include/linux/netfilter/nfnetlink_conntrack.h +++ b/include/linux/netfilter/nfnetlink_conntrack.h | |||
@@ -101,6 +101,7 @@ enum ctattr_protoinfo_dccp { | |||
101 | CTA_PROTOINFO_DCCP_UNSPEC, | 101 | CTA_PROTOINFO_DCCP_UNSPEC, |
102 | CTA_PROTOINFO_DCCP_STATE, | 102 | CTA_PROTOINFO_DCCP_STATE, |
103 | CTA_PROTOINFO_DCCP_ROLE, | 103 | CTA_PROTOINFO_DCCP_ROLE, |
104 | CTA_PROTOINFO_DCCP_HANDSHAKE_SEQ, | ||
104 | __CTA_PROTOINFO_DCCP_MAX, | 105 | __CTA_PROTOINFO_DCCP_MAX, |
105 | }; | 106 | }; |
106 | #define CTA_PROTOINFO_DCCP_MAX (__CTA_PROTOINFO_DCCP_MAX - 1) | 107 | #define CTA_PROTOINFO_DCCP_MAX (__CTA_PROTOINFO_DCCP_MAX - 1) |
diff --git a/include/linux/netfilter/x_tables.h b/include/linux/netfilter/x_tables.h index c9efe039dc57..1030b7593898 100644 --- a/include/linux/netfilter/x_tables.h +++ b/include/linux/netfilter/x_tables.h | |||
@@ -184,9 +184,10 @@ struct xt_counters_info | |||
184 | * @matchinfo: per-match data | 184 | * @matchinfo: per-match data |
185 | * @fragoff: packet is a fragment, this is the data offset | 185 | * @fragoff: packet is a fragment, this is the data offset |
186 | * @thoff: position of transport header relative to skb->data | 186 | * @thoff: position of transport header relative to skb->data |
187 | * @hotdrop: drop packet if we had inspection problems | 187 | * @hook: hook number given packet came from |
188 | * @family: Actual NFPROTO_* through which the function is invoked | 188 | * @family: Actual NFPROTO_* through which the function is invoked |
189 | * (helpful when match->family == NFPROTO_UNSPEC) | 189 | * (helpful when match->family == NFPROTO_UNSPEC) |
190 | * @hotdrop: drop packet if we had inspection problems | ||
190 | */ | 191 | */ |
191 | struct xt_match_param { | 192 | struct xt_match_param { |
192 | const struct net_device *in, *out; | 193 | const struct net_device *in, *out; |
@@ -194,8 +195,9 @@ struct xt_match_param { | |||
194 | const void *matchinfo; | 195 | const void *matchinfo; |
195 | int fragoff; | 196 | int fragoff; |
196 | unsigned int thoff; | 197 | unsigned int thoff; |
197 | bool *hotdrop; | 198 | unsigned int hooknum; |
198 | u_int8_t family; | 199 | u_int8_t family; |
200 | bool *hotdrop; | ||
199 | }; | 201 | }; |
200 | 202 | ||
201 | /** | 203 | /** |
diff --git a/include/linux/netfilter/xt_NFQUEUE.h b/include/linux/netfilter/xt_NFQUEUE.h index 982a89f78272..2584f4a777de 100644 --- a/include/linux/netfilter/xt_NFQUEUE.h +++ b/include/linux/netfilter/xt_NFQUEUE.h | |||
@@ -15,4 +15,9 @@ struct xt_NFQ_info { | |||
15 | __u16 queuenum; | 15 | __u16 queuenum; |
16 | }; | 16 | }; |
17 | 17 | ||
18 | struct xt_NFQ_info_v1 { | ||
19 | __u16 queuenum; | ||
20 | __u16 queues_total; | ||
21 | }; | ||
22 | |||
18 | #endif /* _XT_NFQ_TARGET_H */ | 23 | #endif /* _XT_NFQ_TARGET_H */ |
diff --git a/include/linux/netfilter/xt_osf.h b/include/linux/netfilter/xt_osf.h new file mode 100644 index 000000000000..fd2272e0959a --- /dev/null +++ b/include/linux/netfilter/xt_osf.h | |||
@@ -0,0 +1,133 @@ | |||
1 | /* | ||
2 | * Copyright (c) 2003+ Evgeniy Polyakov <johnpol@2ka.mxt.ru> | ||
3 | * | ||
4 | * | ||
5 | * This program is free software; you can redistribute it and/or modify | ||
6 | * it under the terms of the GNU General Public License as published by | ||
7 | * the Free Software Foundation; either version 2 of the License, or | ||
8 | * (at your option) any later version. | ||
9 | * | ||
10 | * This program is distributed in the hope that it will be useful, | ||
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
13 | * GNU General Public License for more details. | ||
14 | * | ||
15 | * You should have received a copy of the GNU General Public License | ||
16 | * along with this program; if not, write to the Free Software | ||
17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
18 | */ | ||
19 | |||
20 | #ifndef _XT_OSF_H | ||
21 | #define _XT_OSF_H | ||
22 | |||
23 | #define MAXGENRELEN 32 | ||
24 | |||
25 | #define XT_OSF_GENRE (1<<0) | ||
26 | #define XT_OSF_TTL (1<<1) | ||
27 | #define XT_OSF_LOG (1<<2) | ||
28 | #define XT_OSF_INVERT (1<<3) | ||
29 | |||
30 | #define XT_OSF_LOGLEVEL_ALL 0 /* log all matched fingerprints */ | ||
31 | #define XT_OSF_LOGLEVEL_FIRST 1 /* log only the first matced fingerprint */ | ||
32 | #define XT_OSF_LOGLEVEL_ALL_KNOWN 2 /* do not log unknown packets */ | ||
33 | |||
34 | #define XT_OSF_TTL_TRUE 0 /* True ip and fingerprint TTL comparison */ | ||
35 | #define XT_OSF_TTL_LESS 1 /* Check if ip TTL is less than fingerprint one */ | ||
36 | #define XT_OSF_TTL_NOCHECK 2 /* Do not compare ip and fingerprint TTL at all */ | ||
37 | |||
38 | struct xt_osf_info { | ||
39 | char genre[MAXGENRELEN]; | ||
40 | __u32 len; | ||
41 | __u32 flags; | ||
42 | __u32 loglevel; | ||
43 | __u32 ttl; | ||
44 | }; | ||
45 | |||
46 | /* | ||
47 | * Wildcard MSS (kind of). | ||
48 | * It is used to implement a state machine for the different wildcard values | ||
49 | * of the MSS and window sizes. | ||
50 | */ | ||
51 | struct xt_osf_wc { | ||
52 | __u32 wc; | ||
53 | __u32 val; | ||
54 | }; | ||
55 | |||
56 | /* | ||
57 | * This struct represents IANA options | ||
58 | * http://www.iana.org/assignments/tcp-parameters | ||
59 | */ | ||
60 | struct xt_osf_opt { | ||
61 | __u16 kind, length; | ||
62 | struct xt_osf_wc wc; | ||
63 | }; | ||
64 | |||
65 | struct xt_osf_user_finger { | ||
66 | struct xt_osf_wc wss; | ||
67 | |||
68 | __u8 ttl, df; | ||
69 | __u16 ss, mss; | ||
70 | __u16 opt_num; | ||
71 | |||
72 | char genre[MAXGENRELEN]; | ||
73 | char version[MAXGENRELEN]; | ||
74 | char subtype[MAXGENRELEN]; | ||
75 | |||
76 | /* MAX_IPOPTLEN is maximum if all options are NOPs or EOLs */ | ||
77 | struct xt_osf_opt opt[MAX_IPOPTLEN]; | ||
78 | }; | ||
79 | |||
80 | struct xt_osf_nlmsg { | ||
81 | struct xt_osf_user_finger f; | ||
82 | struct iphdr ip; | ||
83 | struct tcphdr tcp; | ||
84 | }; | ||
85 | |||
86 | /* Defines for IANA option kinds */ | ||
87 | |||
88 | enum iana_options { | ||
89 | OSFOPT_EOL = 0, /* End of options */ | ||
90 | OSFOPT_NOP, /* NOP */ | ||
91 | OSFOPT_MSS, /* Maximum segment size */ | ||
92 | OSFOPT_WSO, /* Window scale option */ | ||
93 | OSFOPT_SACKP, /* SACK permitted */ | ||
94 | OSFOPT_SACK, /* SACK */ | ||
95 | OSFOPT_ECHO, | ||
96 | OSFOPT_ECHOREPLY, | ||
97 | OSFOPT_TS, /* Timestamp option */ | ||
98 | OSFOPT_POCP, /* Partial Order Connection Permitted */ | ||
99 | OSFOPT_POSP, /* Partial Order Service Profile */ | ||
100 | |||
101 | /* Others are not used in the current OSF */ | ||
102 | OSFOPT_EMPTY = 255, | ||
103 | }; | ||
104 | |||
105 | /* | ||
106 | * Initial window size option state machine: multiple of mss, mtu or | ||
107 | * plain numeric value. Can also be made as plain numeric value which | ||
108 | * is not a multiple of specified value. | ||
109 | */ | ||
110 | enum xt_osf_window_size_options { | ||
111 | OSF_WSS_PLAIN = 0, | ||
112 | OSF_WSS_MSS, | ||
113 | OSF_WSS_MTU, | ||
114 | OSF_WSS_MODULO, | ||
115 | OSF_WSS_MAX, | ||
116 | }; | ||
117 | |||
118 | /* | ||
119 | * Add/remove fingerprint from the kernel. | ||
120 | */ | ||
121 | enum xt_osf_msg_types { | ||
122 | OSF_MSG_ADD, | ||
123 | OSF_MSG_REMOVE, | ||
124 | OSF_MSG_MAX, | ||
125 | }; | ||
126 | |||
127 | enum xt_osf_attr_type { | ||
128 | OSF_ATTR_UNSPEC, | ||
129 | OSF_ATTR_FINGER, | ||
130 | OSF_ATTR_MAX, | ||
131 | }; | ||
132 | |||
133 | #endif /* _XT_OSF_H */ | ||
diff --git a/include/linux/netfilter/xt_socket.h b/include/linux/netfilter/xt_socket.h new file mode 100644 index 000000000000..6f475b8ff34b --- /dev/null +++ b/include/linux/netfilter/xt_socket.h | |||
@@ -0,0 +1,12 @@ | |||
1 | #ifndef _XT_SOCKET_H | ||
2 | #define _XT_SOCKET_H | ||
3 | |||
4 | enum { | ||
5 | XT_SOCKET_TRANSPARENT = 1 << 0, | ||
6 | }; | ||
7 | |||
8 | struct xt_socket_mtinfo1 { | ||
9 | __u8 flags; | ||
10 | }; | ||
11 | |||
12 | #endif /* _XT_SOCKET_H */ | ||
diff --git a/include/linux/nl80211.h b/include/linux/nl80211.h index cbe8ce3bf486..dbea93b694e5 100644 --- a/include/linux/nl80211.h +++ b/include/linux/nl80211.h | |||
@@ -7,7 +7,7 @@ | |||
7 | * Copyright 2008 Michael Wu <flamingice@sourmilk.net> | 7 | * Copyright 2008 Michael Wu <flamingice@sourmilk.net> |
8 | * Copyright 2008 Luis Carlos Cobo <luisca@cozybit.com> | 8 | * Copyright 2008 Luis Carlos Cobo <luisca@cozybit.com> |
9 | * Copyright 2008 Michael Buesch <mb@bu3sch.de> | 9 | * Copyright 2008 Michael Buesch <mb@bu3sch.de> |
10 | * Copyright 2008 Luis R. Rodriguez <lrodriguez@atheros.com> | 10 | * Copyright 2008, 2009 Luis R. Rodriguez <lrodriguez@atheros.com> |
11 | * Copyright 2008 Jouni Malinen <jouni.malinen@atheros.com> | 11 | * Copyright 2008 Jouni Malinen <jouni.malinen@atheros.com> |
12 | * Copyright 2008 Colin McCabe <colin@cozybit.com> | 12 | * Copyright 2008 Colin McCabe <colin@cozybit.com> |
13 | * | 13 | * |
@@ -25,6 +25,8 @@ | |||
25 | * | 25 | * |
26 | */ | 26 | */ |
27 | 27 | ||
28 | #include <linux/types.h> | ||
29 | |||
28 | /** | 30 | /** |
29 | * DOC: Station handling | 31 | * DOC: Station handling |
30 | * | 32 | * |
@@ -46,8 +48,10 @@ | |||
46 | * to get a list of all present wiphys. | 48 | * to get a list of all present wiphys. |
47 | * @NL80211_CMD_SET_WIPHY: set wiphy parameters, needs %NL80211_ATTR_WIPHY or | 49 | * @NL80211_CMD_SET_WIPHY: set wiphy parameters, needs %NL80211_ATTR_WIPHY or |
48 | * %NL80211_ATTR_IFINDEX; can be used to set %NL80211_ATTR_WIPHY_NAME, | 50 | * %NL80211_ATTR_IFINDEX; can be used to set %NL80211_ATTR_WIPHY_NAME, |
49 | * %NL80211_ATTR_WIPHY_TXQ_PARAMS, %NL80211_ATTR_WIPHY_FREQ, and/or | 51 | * %NL80211_ATTR_WIPHY_TXQ_PARAMS, %NL80211_ATTR_WIPHY_FREQ, |
50 | * %NL80211_ATTR_WIPHY_CHANNEL_TYPE. | 52 | * %NL80211_ATTR_WIPHY_CHANNEL_TYPE, %NL80211_ATTR_WIPHY_RETRY_SHORT, |
53 | * %NL80211_ATTR_WIPHY_RETRY_LONG, %NL80211_ATTR_WIPHY_FRAG_THRESHOLD, | ||
54 | * and/or %NL80211_ATTR_WIPHY_RTS_THRESHOLD. | ||
51 | * @NL80211_CMD_NEW_WIPHY: Newly created wiphy, response to get request | 55 | * @NL80211_CMD_NEW_WIPHY: Newly created wiphy, response to get request |
52 | * or rename notification. Has attributes %NL80211_ATTR_WIPHY and | 56 | * or rename notification. Has attributes %NL80211_ATTR_WIPHY and |
53 | * %NL80211_ATTR_WIPHY_NAME. | 57 | * %NL80211_ATTR_WIPHY_NAME. |
@@ -75,8 +79,8 @@ | |||
75 | * @NL80211_CMD_SET_KEY: Set key attributes %NL80211_ATTR_KEY_DEFAULT, | 79 | * @NL80211_CMD_SET_KEY: Set key attributes %NL80211_ATTR_KEY_DEFAULT, |
76 | * %NL80211_ATTR_KEY_DEFAULT_MGMT, or %NL80211_ATTR_KEY_THRESHOLD. | 80 | * %NL80211_ATTR_KEY_DEFAULT_MGMT, or %NL80211_ATTR_KEY_THRESHOLD. |
77 | * @NL80211_CMD_NEW_KEY: add a key with given %NL80211_ATTR_KEY_DATA, | 81 | * @NL80211_CMD_NEW_KEY: add a key with given %NL80211_ATTR_KEY_DATA, |
78 | * %NL80211_ATTR_KEY_IDX, %NL80211_ATTR_MAC and %NL80211_ATTR_KEY_CIPHER | 82 | * %NL80211_ATTR_KEY_IDX, %NL80211_ATTR_MAC, %NL80211_ATTR_KEY_CIPHER, |
79 | * attributes. | 83 | * and %NL80211_ATTR_KEY_SEQ attributes. |
80 | * @NL80211_CMD_DEL_KEY: delete a key identified by %NL80211_ATTR_KEY_IDX | 84 | * @NL80211_CMD_DEL_KEY: delete a key identified by %NL80211_ATTR_KEY_IDX |
81 | * or %NL80211_ATTR_MAC. | 85 | * or %NL80211_ATTR_MAC. |
82 | * | 86 | * |
@@ -166,6 +170,22 @@ | |||
166 | * set (%NL80211_ATTR_REG_TYPE), if the type of regulatory domain is | 170 | * set (%NL80211_ATTR_REG_TYPE), if the type of regulatory domain is |
167 | * %NL80211_REG_TYPE_COUNTRY the alpha2 to which we have moved on | 171 | * %NL80211_REG_TYPE_COUNTRY the alpha2 to which we have moved on |
168 | * to (%NL80211_ATTR_REG_ALPHA2). | 172 | * to (%NL80211_ATTR_REG_ALPHA2). |
173 | * @NL80211_CMD_REG_BEACON_HINT: indicates to userspace that an AP beacon | ||
174 | * has been found while world roaming thus enabling active scan or | ||
175 | * any mode of operation that initiates TX (beacons) on a channel | ||
176 | * where we would not have been able to do either before. As an example | ||
177 | * if you are world roaming (regulatory domain set to world or if your | ||
178 | * driver is using a custom world roaming regulatory domain) and while | ||
179 | * doing a passive scan on the 5 GHz band you find an AP there (if not | ||
180 | * on a DFS channel) you will now be able to actively scan for that AP | ||
181 | * or use AP mode on your card on that same channel. Note that this will | ||
182 | * never be used for channels 1-11 on the 2 GHz band as they are always | ||
183 | * enabled world wide. This beacon hint is only sent if your device had | ||
184 | * either disabled active scanning or beaconing on a channel. We send to | ||
185 | * userspace the wiphy on which we removed a restriction from | ||
186 | * (%NL80211_ATTR_WIPHY) and the channel on which this occurred | ||
187 | * before (%NL80211_ATTR_FREQ_BEFORE) and after (%NL80211_ATTR_FREQ_AFTER) | ||
188 | * the beacon hint was processed. | ||
169 | * | 189 | * |
170 | * @NL80211_CMD_AUTHENTICATE: authentication request and notification. | 190 | * @NL80211_CMD_AUTHENTICATE: authentication request and notification. |
171 | * This command is used both as a command (request to authenticate) and | 191 | * This command is used both as a command (request to authenticate) and |
@@ -185,8 +205,12 @@ | |||
185 | * frame, i.e., it was for the local STA and was received in correct | 205 | * frame, i.e., it was for the local STA and was received in correct |
186 | * state. This is similar to MLME-AUTHENTICATE.confirm primitive in the | 206 | * state. This is similar to MLME-AUTHENTICATE.confirm primitive in the |
187 | * MLME SAP interface (kernel providing MLME, userspace SME). The | 207 | * MLME SAP interface (kernel providing MLME, userspace SME). The |
188 | * included NL80211_ATTR_FRAME attribute contains the management frame | 208 | * included %NL80211_ATTR_FRAME attribute contains the management frame |
189 | * (including both the header and frame body, but not FCS). | 209 | * (including both the header and frame body, but not FCS). This event is |
210 | * also used to indicate if the authentication attempt timed out. In that | ||
211 | * case the %NL80211_ATTR_FRAME attribute is replaced with a | ||
212 | * %NL80211_ATTR_TIMED_OUT flag (and %NL80211_ATTR_MAC to indicate which | ||
213 | * pending authentication timed out). | ||
190 | * @NL80211_CMD_ASSOCIATE: association request and notification; like | 214 | * @NL80211_CMD_ASSOCIATE: association request and notification; like |
191 | * NL80211_CMD_AUTHENTICATE but for Association and Reassociation | 215 | * NL80211_CMD_AUTHENTICATE but for Association and Reassociation |
192 | * (similar to MLME-ASSOCIATE.request, MLME-REASSOCIATE.request, | 216 | * (similar to MLME-ASSOCIATE.request, MLME-REASSOCIATE.request, |
@@ -199,6 +223,25 @@ | |||
199 | * NL80211_CMD_AUTHENTICATE but for Disassociation frames (similar to | 223 | * NL80211_CMD_AUTHENTICATE but for Disassociation frames (similar to |
200 | * MLME-DISASSOCIATE.request and MLME-DISASSOCIATE.indication primitives). | 224 | * MLME-DISASSOCIATE.request and MLME-DISASSOCIATE.indication primitives). |
201 | * | 225 | * |
226 | * @NL80211_CMD_MICHAEL_MIC_FAILURE: notification of a locally detected Michael | ||
227 | * MIC (part of TKIP) failure; sent on the "mlme" multicast group; the | ||
228 | * event includes %NL80211_ATTR_MAC to describe the source MAC address of | ||
229 | * the frame with invalid MIC, %NL80211_ATTR_KEY_TYPE to show the key | ||
230 | * type, %NL80211_ATTR_KEY_IDX to indicate the key identifier, and | ||
231 | * %NL80211_ATTR_KEY_SEQ to indicate the TSC value of the frame; this | ||
232 | * event matches with MLME-MICHAELMICFAILURE.indication() primitive | ||
233 | * | ||
234 | * @NL80211_CMD_JOIN_IBSS: Join a new IBSS -- given at least an SSID and a | ||
235 | * FREQ attribute (for the initial frequency if no peer can be found) | ||
236 | * and optionally a MAC (as BSSID) and FREQ_FIXED attribute if those | ||
237 | * should be fixed rather than automatically determined. Can only be | ||
238 | * executed on a network interface that is UP, and fixed BSSID/FREQ | ||
239 | * may be rejected. Another optional parameter is the beacon interval, | ||
240 | * given in the %NL80211_ATTR_BEACON_INTERVAL attribute, which if not | ||
241 | * given defaults to 100 TU (102.4ms). | ||
242 | * @NL80211_CMD_LEAVE_IBSS: Leave the IBSS -- no special arguments, the IBSS is | ||
243 | * determined by the network interface. | ||
244 | * | ||
202 | * @NL80211_CMD_MAX: highest used command number | 245 | * @NL80211_CMD_MAX: highest used command number |
203 | * @__NL80211_CMD_AFTER_LAST: internal use | 246 | * @__NL80211_CMD_AFTER_LAST: internal use |
204 | */ | 247 | */ |
@@ -260,6 +303,13 @@ enum nl80211_commands { | |||
260 | NL80211_CMD_DEAUTHENTICATE, | 303 | NL80211_CMD_DEAUTHENTICATE, |
261 | NL80211_CMD_DISASSOCIATE, | 304 | NL80211_CMD_DISASSOCIATE, |
262 | 305 | ||
306 | NL80211_CMD_MICHAEL_MIC_FAILURE, | ||
307 | |||
308 | NL80211_CMD_REG_BEACON_HINT, | ||
309 | |||
310 | NL80211_CMD_JOIN_IBSS, | ||
311 | NL80211_CMD_LEAVE_IBSS, | ||
312 | |||
263 | /* add new commands above here */ | 313 | /* add new commands above here */ |
264 | 314 | ||
265 | /* used to define NL80211_CMD_MAX below */ | 315 | /* used to define NL80211_CMD_MAX below */ |
@@ -278,6 +328,7 @@ enum nl80211_commands { | |||
278 | #define NL80211_CMD_ASSOCIATE NL80211_CMD_ASSOCIATE | 328 | #define NL80211_CMD_ASSOCIATE NL80211_CMD_ASSOCIATE |
279 | #define NL80211_CMD_DEAUTHENTICATE NL80211_CMD_DEAUTHENTICATE | 329 | #define NL80211_CMD_DEAUTHENTICATE NL80211_CMD_DEAUTHENTICATE |
280 | #define NL80211_CMD_DISASSOCIATE NL80211_CMD_DISASSOCIATE | 330 | #define NL80211_CMD_DISASSOCIATE NL80211_CMD_DISASSOCIATE |
331 | #define NL80211_CMD_REG_BEACON_HINT NL80211_CMD_REG_BEACON_HINT | ||
281 | 332 | ||
282 | /** | 333 | /** |
283 | * enum nl80211_attrs - nl80211 netlink attributes | 334 | * enum nl80211_attrs - nl80211 netlink attributes |
@@ -296,6 +347,18 @@ enum nl80211_commands { | |||
296 | * NL80211_CHAN_HT20 = HT20 only | 347 | * NL80211_CHAN_HT20 = HT20 only |
297 | * NL80211_CHAN_HT40MINUS = secondary channel is below the primary channel | 348 | * NL80211_CHAN_HT40MINUS = secondary channel is below the primary channel |
298 | * NL80211_CHAN_HT40PLUS = secondary channel is above the primary channel | 349 | * NL80211_CHAN_HT40PLUS = secondary channel is above the primary channel |
350 | * @NL80211_ATTR_WIPHY_RETRY_SHORT: TX retry limit for frames whose length is | ||
351 | * less than or equal to the RTS threshold; allowed range: 1..255; | ||
352 | * dot11ShortRetryLimit; u8 | ||
353 | * @NL80211_ATTR_WIPHY_RETRY_LONG: TX retry limit for frames whose length is | ||
354 | * greater than the RTS threshold; allowed range: 1..255; | ||
355 | * dot11ShortLongLimit; u8 | ||
356 | * @NL80211_ATTR_WIPHY_FRAG_THRESHOLD: fragmentation threshold, i.e., maximum | ||
357 | * length in octets for frames; allowed range: 256..8000, disable | ||
358 | * fragmentation with (u32)-1; dot11FragmentationThreshold; u32 | ||
359 | * @NL80211_ATTR_WIPHY_RTS_THRESHOLD: RTS threshold (TX frames with length | ||
360 | * larger than or equal to this use RTS/CTS handshake); allowed range: | ||
361 | * 0..65536, disable with (u32)-1; dot11RTSThreshold; u32 | ||
299 | * | 362 | * |
300 | * @NL80211_ATTR_IFINDEX: network interface index of the device to operate on | 363 | * @NL80211_ATTR_IFINDEX: network interface index of the device to operate on |
301 | * @NL80211_ATTR_IFNAME: network interface name | 364 | * @NL80211_ATTR_IFNAME: network interface name |
@@ -319,7 +382,7 @@ enum nl80211_commands { | |||
319 | * | 382 | * |
320 | * @NL80211_ATTR_STA_AID: Association ID for the station (u16) | 383 | * @NL80211_ATTR_STA_AID: Association ID for the station (u16) |
321 | * @NL80211_ATTR_STA_FLAGS: flags, nested element with NLA_FLAG attributes of | 384 | * @NL80211_ATTR_STA_FLAGS: flags, nested element with NLA_FLAG attributes of |
322 | * &enum nl80211_sta_flags. | 385 | * &enum nl80211_sta_flags (deprecated, use %NL80211_ATTR_STA_FLAGS2) |
323 | * @NL80211_ATTR_STA_LISTEN_INTERVAL: listen interval as defined by | 386 | * @NL80211_ATTR_STA_LISTEN_INTERVAL: listen interval as defined by |
324 | * IEEE 802.11 7.3.1.6 (u16). | 387 | * IEEE 802.11 7.3.1.6 (u16). |
325 | * @NL80211_ATTR_STA_SUPPORTED_RATES: supported rates, array of supported | 388 | * @NL80211_ATTR_STA_SUPPORTED_RATES: supported rates, array of supported |
@@ -380,6 +443,8 @@ enum nl80211_commands { | |||
380 | * | 443 | * |
381 | * @NL80211_ATTR_MAX_NUM_SCAN_SSIDS: number of SSIDs you can scan with | 444 | * @NL80211_ATTR_MAX_NUM_SCAN_SSIDS: number of SSIDs you can scan with |
382 | * a single scan request, a wiphy attribute. | 445 | * a single scan request, a wiphy attribute. |
446 | * @NL80211_ATTR_MAX_SCAN_IE_LEN: maximum length of information elements | ||
447 | * that can be added to a scan request | ||
383 | * | 448 | * |
384 | * @NL80211_ATTR_SCAN_FREQUENCIES: nested attribute with frequencies (in MHz) | 449 | * @NL80211_ATTR_SCAN_FREQUENCIES: nested attribute with frequencies (in MHz) |
385 | * @NL80211_ATTR_SCAN_SSIDS: nested attribute with SSIDs, leave out for passive | 450 | * @NL80211_ATTR_SCAN_SSIDS: nested attribute with SSIDs, leave out for passive |
@@ -408,6 +473,44 @@ enum nl80211_commands { | |||
408 | * @NL80211_ATTR_REASON_CODE: ReasonCode for %NL80211_CMD_DEAUTHENTICATE and | 473 | * @NL80211_ATTR_REASON_CODE: ReasonCode for %NL80211_CMD_DEAUTHENTICATE and |
409 | * %NL80211_CMD_DISASSOCIATE, u16 | 474 | * %NL80211_CMD_DISASSOCIATE, u16 |
410 | * | 475 | * |
476 | * @NL80211_ATTR_KEY_TYPE: Key Type, see &enum nl80211_key_type, represented as | ||
477 | * a u32 | ||
478 | * | ||
479 | * @NL80211_ATTR_FREQ_BEFORE: A channel which has suffered a regulatory change | ||
480 | * due to considerations from a beacon hint. This attribute reflects | ||
481 | * the state of the channel _before_ the beacon hint processing. This | ||
482 | * attributes consists of a nested attribute containing | ||
483 | * NL80211_FREQUENCY_ATTR_* | ||
484 | * @NL80211_ATTR_FREQ_AFTER: A channel which has suffered a regulatory change | ||
485 | * due to considerations from a beacon hint. This attribute reflects | ||
486 | * the state of the channel _after_ the beacon hint processing. This | ||
487 | * attributes consists of a nested attribute containing | ||
488 | * NL80211_FREQUENCY_ATTR_* | ||
489 | * | ||
490 | * @NL80211_ATTR_CIPHER_SUITES: a set of u32 values indicating the supported | ||
491 | * cipher suites | ||
492 | * | ||
493 | * @NL80211_ATTR_FREQ_FIXED: a flag indicating the IBSS should not try to look | ||
494 | * for other networks on different channels | ||
495 | * | ||
496 | * @NL80211_ATTR_TIMED_OUT: a flag indicating than an operation timed out; this | ||
497 | * is used, e.g., with %NL80211_CMD_AUTHENTICATE event | ||
498 | * | ||
499 | * @NL80211_ATTR_USE_MFP: Whether management frame protection (IEEE 802.11w) is | ||
500 | * used for the association (&enum nl80211_mfp, represented as a u32); | ||
501 | * this attribute can be used | ||
502 | * with %NL80211_CMD_ASSOCIATE request | ||
503 | * | ||
504 | * @NL80211_ATTR_STA_FLAGS2: Attribute containing a | ||
505 | * &struct nl80211_sta_flag_update. | ||
506 | * | ||
507 | * @NL80211_ATTR_CONTROL_PORT: A flag indicating whether user space controls | ||
508 | * IEEE 802.1X port, i.e., sets/clears %NL80211_STA_FLAG_AUTHORIZED, in | ||
509 | * station mode. If the flag is included in %NL80211_CMD_ASSOCIATE | ||
510 | * request, the driver will assume that the port is unauthorized until | ||
511 | * authorized by user space. Otherwise, port is marked authorized by | ||
512 | * default in station mode. | ||
513 | * | ||
411 | * @NL80211_ATTR_MAX: highest attribute number currently defined | 514 | * @NL80211_ATTR_MAX: highest attribute number currently defined |
412 | * @__NL80211_ATTR_AFTER_LAST: internal use | 515 | * @__NL80211_ATTR_AFTER_LAST: internal use |
413 | */ | 516 | */ |
@@ -492,6 +595,30 @@ enum nl80211_attrs { | |||
492 | NL80211_ATTR_AUTH_TYPE, | 595 | NL80211_ATTR_AUTH_TYPE, |
493 | NL80211_ATTR_REASON_CODE, | 596 | NL80211_ATTR_REASON_CODE, |
494 | 597 | ||
598 | NL80211_ATTR_KEY_TYPE, | ||
599 | |||
600 | NL80211_ATTR_MAX_SCAN_IE_LEN, | ||
601 | NL80211_ATTR_CIPHER_SUITES, | ||
602 | |||
603 | NL80211_ATTR_FREQ_BEFORE, | ||
604 | NL80211_ATTR_FREQ_AFTER, | ||
605 | |||
606 | NL80211_ATTR_FREQ_FIXED, | ||
607 | |||
608 | |||
609 | NL80211_ATTR_WIPHY_RETRY_SHORT, | ||
610 | NL80211_ATTR_WIPHY_RETRY_LONG, | ||
611 | NL80211_ATTR_WIPHY_FRAG_THRESHOLD, | ||
612 | NL80211_ATTR_WIPHY_RTS_THRESHOLD, | ||
613 | |||
614 | NL80211_ATTR_TIMED_OUT, | ||
615 | |||
616 | NL80211_ATTR_USE_MFP, | ||
617 | |||
618 | NL80211_ATTR_STA_FLAGS2, | ||
619 | |||
620 | NL80211_ATTR_CONTROL_PORT, | ||
621 | |||
495 | /* add attributes here, update the policy in nl80211.c */ | 622 | /* add attributes here, update the policy in nl80211.c */ |
496 | 623 | ||
497 | __NL80211_ATTR_AFTER_LAST, | 624 | __NL80211_ATTR_AFTER_LAST, |
@@ -581,6 +708,18 @@ enum nl80211_sta_flags { | |||
581 | }; | 708 | }; |
582 | 709 | ||
583 | /** | 710 | /** |
711 | * struct nl80211_sta_flag_update - station flags mask/set | ||
712 | * @mask: mask of station flags to set | ||
713 | * @set: which values to set them to | ||
714 | * | ||
715 | * Both mask and set contain bits as per &enum nl80211_sta_flags. | ||
716 | */ | ||
717 | struct nl80211_sta_flag_update { | ||
718 | __u32 mask; | ||
719 | __u32 set; | ||
720 | } __attribute__((packed)); | ||
721 | |||
722 | /** | ||
584 | * enum nl80211_rate_info - bitrate information | 723 | * enum nl80211_rate_info - bitrate information |
585 | * | 724 | * |
586 | * These attribute types are used with %NL80211_STA_INFO_TXRATE | 725 | * These attribute types are used with %NL80211_STA_INFO_TXRATE |
@@ -1062,4 +1201,27 @@ enum nl80211_auth_type { | |||
1062 | NL80211_AUTHTYPE_FT, | 1201 | NL80211_AUTHTYPE_FT, |
1063 | NL80211_AUTHTYPE_NETWORK_EAP, | 1202 | NL80211_AUTHTYPE_NETWORK_EAP, |
1064 | }; | 1203 | }; |
1204 | |||
1205 | /** | ||
1206 | * enum nl80211_key_type - Key Type | ||
1207 | * @NL80211_KEYTYPE_GROUP: Group (broadcast/multicast) key | ||
1208 | * @NL80211_KEYTYPE_PAIRWISE: Pairwise (unicast/individual) key | ||
1209 | * @NL80211_KEYTYPE_PEERKEY: PeerKey (DLS) | ||
1210 | */ | ||
1211 | enum nl80211_key_type { | ||
1212 | NL80211_KEYTYPE_GROUP, | ||
1213 | NL80211_KEYTYPE_PAIRWISE, | ||
1214 | NL80211_KEYTYPE_PEERKEY, | ||
1215 | }; | ||
1216 | |||
1217 | /** | ||
1218 | * enum nl80211_mfp - Management frame protection state | ||
1219 | * @NL80211_MFP_NO: Management frame protection not used | ||
1220 | * @NL80211_MFP_REQUIRED: Management frame protection required | ||
1221 | */ | ||
1222 | enum nl80211_mfp { | ||
1223 | NL80211_MFP_NO, | ||
1224 | NL80211_MFP_REQUIRED, | ||
1225 | }; | ||
1226 | |||
1065 | #endif /* __LINUX_NL80211_H */ | 1227 | #endif /* __LINUX_NL80211_H */ |
diff --git a/include/linux/nl802154.h b/include/linux/nl802154.h new file mode 100644 index 000000000000..2cda00ccfcca --- /dev/null +++ b/include/linux/nl802154.h | |||
@@ -0,0 +1,119 @@ | |||
1 | /* | ||
2 | * nl802154.h | ||
3 | * | ||
4 | * Copyright (C) 2007, 2008, 2009 Siemens AG | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License version 2 | ||
8 | * as published by the Free Software Foundation. | ||
9 | * | ||
10 | * This program is distributed in the hope that it will be useful, | ||
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
13 | * GNU General Public License for more details. | ||
14 | * | ||
15 | * You should have received a copy of the GNU General Public License along | ||
16 | * with this program; if not, write to the Free Software Foundation, Inc., | ||
17 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | ||
18 | * | ||
19 | */ | ||
20 | |||
21 | #ifndef NL802154_H | ||
22 | #define NL802154_H | ||
23 | |||
24 | #define IEEE802154_NL_NAME "802.15.4 MAC" | ||
25 | #define IEEE802154_MCAST_COORD_NAME "coordinator" | ||
26 | #define IEEE802154_MCAST_BEACON_NAME "beacon" | ||
27 | |||
28 | enum { | ||
29 | __IEEE802154_ATTR_INVALID, | ||
30 | |||
31 | IEEE802154_ATTR_DEV_NAME, | ||
32 | IEEE802154_ATTR_DEV_INDEX, | ||
33 | |||
34 | IEEE802154_ATTR_STATUS, | ||
35 | |||
36 | IEEE802154_ATTR_SHORT_ADDR, | ||
37 | IEEE802154_ATTR_HW_ADDR, | ||
38 | IEEE802154_ATTR_PAN_ID, | ||
39 | |||
40 | IEEE802154_ATTR_CHANNEL, | ||
41 | |||
42 | IEEE802154_ATTR_COORD_SHORT_ADDR, | ||
43 | IEEE802154_ATTR_COORD_HW_ADDR, | ||
44 | IEEE802154_ATTR_COORD_PAN_ID, | ||
45 | |||
46 | IEEE802154_ATTR_SRC_SHORT_ADDR, | ||
47 | IEEE802154_ATTR_SRC_HW_ADDR, | ||
48 | IEEE802154_ATTR_SRC_PAN_ID, | ||
49 | |||
50 | IEEE802154_ATTR_DEST_SHORT_ADDR, | ||
51 | IEEE802154_ATTR_DEST_HW_ADDR, | ||
52 | IEEE802154_ATTR_DEST_PAN_ID, | ||
53 | |||
54 | IEEE802154_ATTR_CAPABILITY, | ||
55 | IEEE802154_ATTR_REASON, | ||
56 | IEEE802154_ATTR_SCAN_TYPE, | ||
57 | IEEE802154_ATTR_CHANNELS, | ||
58 | IEEE802154_ATTR_DURATION, | ||
59 | IEEE802154_ATTR_ED_LIST, | ||
60 | IEEE802154_ATTR_BCN_ORD, | ||
61 | IEEE802154_ATTR_SF_ORD, | ||
62 | IEEE802154_ATTR_PAN_COORD, | ||
63 | IEEE802154_ATTR_BAT_EXT, | ||
64 | IEEE802154_ATTR_COORD_REALIGN, | ||
65 | IEEE802154_ATTR_SEC, | ||
66 | |||
67 | __IEEE802154_ATTR_MAX, | ||
68 | }; | ||
69 | |||
70 | #define IEEE802154_ATTR_MAX (__IEEE802154_ATTR_MAX - 1) | ||
71 | |||
72 | extern struct nla_policy ieee802154_policy[]; | ||
73 | |||
74 | /* commands */ | ||
75 | /* REQ should be responded with CONF | ||
76 | * and INDIC with RESP | ||
77 | */ | ||
78 | enum { | ||
79 | __IEEE802154_COMMAND_INVALID, | ||
80 | |||
81 | IEEE802154_ASSOCIATE_REQ, | ||
82 | IEEE802154_ASSOCIATE_CONF, | ||
83 | IEEE802154_DISASSOCIATE_REQ, | ||
84 | IEEE802154_DISASSOCIATE_CONF, | ||
85 | IEEE802154_GET_REQ, | ||
86 | IEEE802154_GET_CONF, | ||
87 | IEEE802154_RESET_REQ, | ||
88 | IEEE802154_RESET_CONF, | ||
89 | IEEE802154_SCAN_REQ, | ||
90 | IEEE802154_SCAN_CONF, | ||
91 | IEEE802154_SET_REQ, | ||
92 | IEEE802154_SET_CONF, | ||
93 | IEEE802154_START_REQ, | ||
94 | IEEE802154_START_CONF, | ||
95 | IEEE802154_SYNC_REQ, | ||
96 | IEEE802154_POLL_REQ, | ||
97 | IEEE802154_POLL_CONF, | ||
98 | |||
99 | IEEE802154_ASSOCIATE_INDIC, | ||
100 | IEEE802154_ASSOCIATE_RESP, | ||
101 | IEEE802154_DISASSOCIATE_INDIC, | ||
102 | IEEE802154_BEACON_NOTIFY_INDIC, | ||
103 | IEEE802154_ORPHAN_INDIC, | ||
104 | IEEE802154_ORPHAN_RESP, | ||
105 | IEEE802154_COMM_STATUS_INDIC, | ||
106 | IEEE802154_SYNC_LOSS_INDIC, | ||
107 | |||
108 | IEEE802154_GTS_REQ, /* Not supported yet */ | ||
109 | IEEE802154_GTS_INDIC, /* Not supported yet */ | ||
110 | IEEE802154_GTS_CONF, /* Not supported yet */ | ||
111 | IEEE802154_RX_ENABLE_REQ, /* Not supported yet */ | ||
112 | IEEE802154_RX_ENABLE_CONF, /* Not supported yet */ | ||
113 | |||
114 | __IEEE802154_CMD_MAX, | ||
115 | }; | ||
116 | |||
117 | #define IEEE802154_CMD_MAX (__IEEE802154_CMD_MAX - 1) | ||
118 | |||
119 | #endif | ||
diff --git a/include/linux/notifier.h b/include/linux/notifier.h index b86fa2ffca0c..81bc252dc8ac 100644 --- a/include/linux/notifier.h +++ b/include/linux/notifier.h | |||
@@ -198,6 +198,7 @@ static inline int notifier_to_errno(int ret) | |||
198 | #define NETDEV_CHANGENAME 0x000A | 198 | #define NETDEV_CHANGENAME 0x000A |
199 | #define NETDEV_FEAT_CHANGE 0x000B | 199 | #define NETDEV_FEAT_CHANGE 0x000B |
200 | #define NETDEV_BONDING_FAILOVER 0x000C | 200 | #define NETDEV_BONDING_FAILOVER 0x000C |
201 | #define NETDEV_PRE_UP 0x000D | ||
201 | 202 | ||
202 | #define SYS_DOWN 0x0001 /* Notify of system down */ | 203 | #define SYS_DOWN 0x0001 /* Notify of system down */ |
203 | #define SYS_RESTART SYS_DOWN | 204 | #define SYS_RESTART SYS_DOWN |
diff --git a/include/linux/of.h b/include/linux/of.h index 6a7efa242f5e..7be2d1043c16 100644 --- a/include/linux/of.h +++ b/include/linux/of.h | |||
@@ -77,6 +77,9 @@ extern int of_n_size_cells(struct device_node *np); | |||
77 | extern const struct of_device_id *of_match_node( | 77 | extern const struct of_device_id *of_match_node( |
78 | const struct of_device_id *matches, const struct device_node *node); | 78 | const struct of_device_id *matches, const struct device_node *node); |
79 | extern int of_modalias_node(struct device_node *node, char *modalias, int len); | 79 | extern int of_modalias_node(struct device_node *node, char *modalias, int len); |
80 | extern struct device_node *of_parse_phandle(struct device_node *np, | ||
81 | const char *phandle_name, | ||
82 | int index); | ||
80 | extern int of_parse_phandles_with_args(struct device_node *np, | 83 | extern int of_parse_phandles_with_args(struct device_node *np, |
81 | const char *list_name, const char *cells_name, int index, | 84 | const char *list_name, const char *cells_name, int index, |
82 | struct device_node **out_node, const void **out_args); | 85 | struct device_node **out_node, const void **out_args); |
diff --git a/include/linux/of_mdio.h b/include/linux/of_mdio.h new file mode 100644 index 000000000000..c9663c690303 --- /dev/null +++ b/include/linux/of_mdio.h | |||
@@ -0,0 +1,22 @@ | |||
1 | /* | ||
2 | * OF helpers for the MDIO (Ethernet PHY) API | ||
3 | * | ||
4 | * Copyright (c) 2009 Secret Lab Technologies, Ltd. | ||
5 | * | ||
6 | * This file is released under the GPLv2 | ||
7 | */ | ||
8 | |||
9 | #ifndef __LINUX_OF_MDIO_H | ||
10 | #define __LINUX_OF_MDIO_H | ||
11 | |||
12 | #include <linux/phy.h> | ||
13 | #include <linux/of.h> | ||
14 | |||
15 | extern int of_mdiobus_register(struct mii_bus *mdio, struct device_node *np); | ||
16 | extern struct phy_device *of_phy_find_device(struct device_node *phy_np); | ||
17 | extern struct phy_device *of_phy_connect(struct net_device *dev, | ||
18 | struct device_node *phy_np, | ||
19 | void (*hndlr)(struct net_device *), | ||
20 | u32 flags, phy_interface_t iface); | ||
21 | |||
22 | #endif /* __LINUX_OF_MDIO_H */ | ||
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h index 9f36e1cdbf01..3435c1f3effa 100644 --- a/include/linux/pci_ids.h +++ b/include/linux/pci_ids.h | |||
@@ -1067,8 +1067,6 @@ | |||
1067 | #define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP04_SMBUS 0x0034 | 1067 | #define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP04_SMBUS 0x0034 |
1068 | #define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP04_IDE 0x0035 | 1068 | #define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP04_IDE 0x0035 |
1069 | #define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP04_SATA 0x0036 | 1069 | #define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP04_SATA 0x0036 |
1070 | #define PCI_DEVICE_ID_NVIDIA_NVENET_10 0x0037 | ||
1071 | #define PCI_DEVICE_ID_NVIDIA_NVENET_11 0x0038 | ||
1072 | #define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP04_SATA2 0x003e | 1070 | #define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP04_SATA2 0x003e |
1073 | #define PCI_DEVICE_ID_NVIDIA_GEFORCE_6800_ULTRA 0x0040 | 1071 | #define PCI_DEVICE_ID_NVIDIA_GEFORCE_6800_ULTRA 0x0040 |
1074 | #define PCI_DEVICE_ID_NVIDIA_GEFORCE_6800 0x0041 | 1072 | #define PCI_DEVICE_ID_NVIDIA_GEFORCE_6800 0x0041 |
@@ -1079,21 +1077,16 @@ | |||
1079 | #define PCI_DEVICE_ID_NVIDIA_NFORCE_CK804_IDE 0x0053 | 1077 | #define PCI_DEVICE_ID_NVIDIA_NFORCE_CK804_IDE 0x0053 |
1080 | #define PCI_DEVICE_ID_NVIDIA_NFORCE_CK804_SATA 0x0054 | 1078 | #define PCI_DEVICE_ID_NVIDIA_NFORCE_CK804_SATA 0x0054 |
1081 | #define PCI_DEVICE_ID_NVIDIA_NFORCE_CK804_SATA2 0x0055 | 1079 | #define PCI_DEVICE_ID_NVIDIA_NFORCE_CK804_SATA2 0x0055 |
1082 | #define PCI_DEVICE_ID_NVIDIA_NVENET_8 0x0056 | ||
1083 | #define PCI_DEVICE_ID_NVIDIA_NVENET_9 0x0057 | ||
1084 | #define PCI_DEVICE_ID_NVIDIA_CK804_AUDIO 0x0059 | 1080 | #define PCI_DEVICE_ID_NVIDIA_CK804_AUDIO 0x0059 |
1085 | #define PCI_DEVICE_ID_NVIDIA_CK804_PCIE 0x005d | 1081 | #define PCI_DEVICE_ID_NVIDIA_CK804_PCIE 0x005d |
1086 | #define PCI_DEVICE_ID_NVIDIA_NFORCE2_SMBUS 0x0064 | 1082 | #define PCI_DEVICE_ID_NVIDIA_NFORCE2_SMBUS 0x0064 |
1087 | #define PCI_DEVICE_ID_NVIDIA_NFORCE2_IDE 0x0065 | 1083 | #define PCI_DEVICE_ID_NVIDIA_NFORCE2_IDE 0x0065 |
1088 | #define PCI_DEVICE_ID_NVIDIA_NVENET_2 0x0066 | ||
1089 | #define PCI_DEVICE_ID_NVIDIA_MCP2_MODEM 0x0069 | 1084 | #define PCI_DEVICE_ID_NVIDIA_MCP2_MODEM 0x0069 |
1090 | #define PCI_DEVICE_ID_NVIDIA_MCP2_AUDIO 0x006a | 1085 | #define PCI_DEVICE_ID_NVIDIA_MCP2_AUDIO 0x006a |
1091 | #define PCI_DEVICE_ID_NVIDIA_NFORCE2S_SMBUS 0x0084 | 1086 | #define PCI_DEVICE_ID_NVIDIA_NFORCE2S_SMBUS 0x0084 |
1092 | #define PCI_DEVICE_ID_NVIDIA_NFORCE2S_IDE 0x0085 | 1087 | #define PCI_DEVICE_ID_NVIDIA_NFORCE2S_IDE 0x0085 |
1093 | #define PCI_DEVICE_ID_NVIDIA_NVENET_4 0x0086 | ||
1094 | #define PCI_DEVICE_ID_NVIDIA_MCP2S_MODEM 0x0089 | 1088 | #define PCI_DEVICE_ID_NVIDIA_MCP2S_MODEM 0x0089 |
1095 | #define PCI_DEVICE_ID_NVIDIA_CK8_AUDIO 0x008a | 1089 | #define PCI_DEVICE_ID_NVIDIA_CK8_AUDIO 0x008a |
1096 | #define PCI_DEVICE_ID_NVIDIA_NVENET_5 0x008c | ||
1097 | #define PCI_DEVICE_ID_NVIDIA_NFORCE2S_SATA 0x008e | 1090 | #define PCI_DEVICE_ID_NVIDIA_NFORCE2S_SATA 0x008e |
1098 | #define PCI_DEVICE_ID_NVIDIA_GEFORCE_7800_GT 0x0090 | 1091 | #define PCI_DEVICE_ID_NVIDIA_GEFORCE_7800_GT 0x0090 |
1099 | #define PCI_DEVICE_ID_NVIDIA_GEFORCE_7800_GTX 0x0091 | 1092 | #define PCI_DEVICE_ID_NVIDIA_GEFORCE_7800_GTX 0x0091 |
@@ -1109,15 +1102,12 @@ | |||
1109 | #define PCI_DEVICE_ID_NVIDIA_NFORCE3 0x00d1 | 1102 | #define PCI_DEVICE_ID_NVIDIA_NFORCE3 0x00d1 |
1110 | #define PCI_DEVICE_ID_NVIDIA_NFORCE3_SMBUS 0x00d4 | 1103 | #define PCI_DEVICE_ID_NVIDIA_NFORCE3_SMBUS 0x00d4 |
1111 | #define PCI_DEVICE_ID_NVIDIA_NFORCE3_IDE 0x00d5 | 1104 | #define PCI_DEVICE_ID_NVIDIA_NFORCE3_IDE 0x00d5 |
1112 | #define PCI_DEVICE_ID_NVIDIA_NVENET_3 0x00d6 | ||
1113 | #define PCI_DEVICE_ID_NVIDIA_MCP3_MODEM 0x00d9 | 1105 | #define PCI_DEVICE_ID_NVIDIA_MCP3_MODEM 0x00d9 |
1114 | #define PCI_DEVICE_ID_NVIDIA_MCP3_AUDIO 0x00da | 1106 | #define PCI_DEVICE_ID_NVIDIA_MCP3_AUDIO 0x00da |
1115 | #define PCI_DEVICE_ID_NVIDIA_NVENET_7 0x00df | ||
1116 | #define PCI_DEVICE_ID_NVIDIA_NFORCE3S 0x00e1 | 1107 | #define PCI_DEVICE_ID_NVIDIA_NFORCE3S 0x00e1 |
1117 | #define PCI_DEVICE_ID_NVIDIA_NFORCE3S_SATA 0x00e3 | 1108 | #define PCI_DEVICE_ID_NVIDIA_NFORCE3S_SATA 0x00e3 |
1118 | #define PCI_DEVICE_ID_NVIDIA_NFORCE3S_SMBUS 0x00e4 | 1109 | #define PCI_DEVICE_ID_NVIDIA_NFORCE3S_SMBUS 0x00e4 |
1119 | #define PCI_DEVICE_ID_NVIDIA_NFORCE3S_IDE 0x00e5 | 1110 | #define PCI_DEVICE_ID_NVIDIA_NFORCE3S_IDE 0x00e5 |
1120 | #define PCI_DEVICE_ID_NVIDIA_NVENET_6 0x00e6 | ||
1121 | #define PCI_DEVICE_ID_NVIDIA_CK8S_AUDIO 0x00ea | 1111 | #define PCI_DEVICE_ID_NVIDIA_CK8S_AUDIO 0x00ea |
1122 | #define PCI_DEVICE_ID_NVIDIA_NFORCE3S_SATA2 0x00ee | 1112 | #define PCI_DEVICE_ID_NVIDIA_NFORCE3S_SATA2 0x00ee |
1123 | #define PCIE_DEVICE_ID_NVIDIA_GEFORCE_6800_ALT1 0x00f0 | 1113 | #define PCIE_DEVICE_ID_NVIDIA_GEFORCE_6800_ALT1 0x00f0 |
@@ -1177,7 +1167,6 @@ | |||
1177 | #define PCI_DEVICE_ID_NVIDIA_NFORCE_SMBUS 0x01b4 | 1167 | #define PCI_DEVICE_ID_NVIDIA_NFORCE_SMBUS 0x01b4 |
1178 | #define PCI_DEVICE_ID_NVIDIA_NFORCE_IDE 0x01bc | 1168 | #define PCI_DEVICE_ID_NVIDIA_NFORCE_IDE 0x01bc |
1179 | #define PCI_DEVICE_ID_NVIDIA_MCP1_MODEM 0x01c1 | 1169 | #define PCI_DEVICE_ID_NVIDIA_MCP1_MODEM 0x01c1 |
1180 | #define PCI_DEVICE_ID_NVIDIA_NVENET_1 0x01c3 | ||
1181 | #define PCI_DEVICE_ID_NVIDIA_NFORCE2 0x01e0 | 1170 | #define PCI_DEVICE_ID_NVIDIA_NFORCE2 0x01e0 |
1182 | #define PCI_DEVICE_ID_NVIDIA_GEFORCE3 0x0200 | 1171 | #define PCI_DEVICE_ID_NVIDIA_GEFORCE3 0x0200 |
1183 | #define PCI_DEVICE_ID_NVIDIA_GEFORCE3_1 0x0201 | 1172 | #define PCI_DEVICE_ID_NVIDIA_GEFORCE3_1 0x0201 |
@@ -1200,8 +1189,6 @@ | |||
1200 | #define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP55_IDE 0x036E | 1189 | #define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP55_IDE 0x036E |
1201 | #define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP55_SATA 0x037E | 1190 | #define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP55_SATA 0x037E |
1202 | #define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP55_SATA2 0x037F | 1191 | #define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP55_SATA2 0x037F |
1203 | #define PCI_DEVICE_ID_NVIDIA_NVENET_12 0x0268 | ||
1204 | #define PCI_DEVICE_ID_NVIDIA_NVENET_13 0x0269 | ||
1205 | #define PCI_DEVICE_ID_NVIDIA_GEFORCE4_TI_4800 0x0280 | 1192 | #define PCI_DEVICE_ID_NVIDIA_GEFORCE4_TI_4800 0x0280 |
1206 | #define PCI_DEVICE_ID_NVIDIA_GEFORCE4_TI_4800_8X 0x0281 | 1193 | #define PCI_DEVICE_ID_NVIDIA_GEFORCE4_TI_4800_8X 0x0281 |
1207 | #define PCI_DEVICE_ID_NVIDIA_GEFORCE4_TI_4800SE 0x0282 | 1194 | #define PCI_DEVICE_ID_NVIDIA_GEFORCE4_TI_4800SE 0x0282 |
@@ -1248,46 +1235,21 @@ | |||
1248 | #define PCI_DEVICE_ID_NVIDIA_GEFORCE_FX_GO5700_2 0x0348 | 1235 | #define PCI_DEVICE_ID_NVIDIA_GEFORCE_FX_GO5700_2 0x0348 |
1249 | #define PCI_DEVICE_ID_NVIDIA_QUADRO_FX_GO1000 0x034C | 1236 | #define PCI_DEVICE_ID_NVIDIA_QUADRO_FX_GO1000 0x034C |
1250 | #define PCI_DEVICE_ID_NVIDIA_QUADRO_FX_1100 0x034E | 1237 | #define PCI_DEVICE_ID_NVIDIA_QUADRO_FX_1100 0x034E |
1251 | #define PCI_DEVICE_ID_NVIDIA_NVENET_14 0x0372 | ||
1252 | #define PCI_DEVICE_ID_NVIDIA_NVENET_15 0x0373 | 1238 | #define PCI_DEVICE_ID_NVIDIA_NVENET_15 0x0373 |
1253 | #define PCI_DEVICE_ID_NVIDIA_NVENET_16 0x03E5 | ||
1254 | #define PCI_DEVICE_ID_NVIDIA_NVENET_17 0x03E6 | ||
1255 | #define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP61_SATA 0x03E7 | 1239 | #define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP61_SATA 0x03E7 |
1256 | #define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP61_SMBUS 0x03EB | 1240 | #define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP61_SMBUS 0x03EB |
1257 | #define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP61_IDE 0x03EC | 1241 | #define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP61_IDE 0x03EC |
1258 | #define PCI_DEVICE_ID_NVIDIA_NVENET_18 0x03EE | ||
1259 | #define PCI_DEVICE_ID_NVIDIA_NVENET_19 0x03EF | ||
1260 | #define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP61_SATA2 0x03F6 | 1242 | #define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP61_SATA2 0x03F6 |
1261 | #define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP61_SATA3 0x03F7 | 1243 | #define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP61_SATA3 0x03F7 |
1262 | #define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP65_SMBUS 0x0446 | 1244 | #define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP65_SMBUS 0x0446 |
1263 | #define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP65_IDE 0x0448 | 1245 | #define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP65_IDE 0x0448 |
1264 | #define PCI_DEVICE_ID_NVIDIA_NVENET_20 0x0450 | ||
1265 | #define PCI_DEVICE_ID_NVIDIA_NVENET_21 0x0451 | ||
1266 | #define PCI_DEVICE_ID_NVIDIA_NVENET_22 0x0452 | ||
1267 | #define PCI_DEVICE_ID_NVIDIA_NVENET_23 0x0453 | ||
1268 | #define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP67_SMBUS 0x0542 | 1246 | #define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP67_SMBUS 0x0542 |
1269 | #define PCI_DEVICE_ID_NVIDIA_NVENET_24 0x054C | ||
1270 | #define PCI_DEVICE_ID_NVIDIA_NVENET_25 0x054D | ||
1271 | #define PCI_DEVICE_ID_NVIDIA_NVENET_26 0x054E | ||
1272 | #define PCI_DEVICE_ID_NVIDIA_NVENET_27 0x054F | ||
1273 | #define PCI_DEVICE_ID_NVIDIA_NVENET_28 0x07DC | ||
1274 | #define PCI_DEVICE_ID_NVIDIA_NVENET_29 0x07DD | ||
1275 | #define PCI_DEVICE_ID_NVIDIA_NVENET_30 0x07DE | ||
1276 | #define PCI_DEVICE_ID_NVIDIA_NVENET_31 0x07DF | ||
1277 | #define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP67_IDE 0x0560 | 1247 | #define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP67_IDE 0x0560 |
1278 | #define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP73_IDE 0x056C | 1248 | #define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP73_IDE 0x056C |
1279 | #define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP78S_SMBUS 0x0752 | 1249 | #define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP78S_SMBUS 0x0752 |
1280 | #define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP77_IDE 0x0759 | 1250 | #define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP77_IDE 0x0759 |
1281 | #define PCI_DEVICE_ID_NVIDIA_NVENET_32 0x0760 | ||
1282 | #define PCI_DEVICE_ID_NVIDIA_NVENET_33 0x0761 | ||
1283 | #define PCI_DEVICE_ID_NVIDIA_NVENET_34 0x0762 | ||
1284 | #define PCI_DEVICE_ID_NVIDIA_NVENET_35 0x0763 | ||
1285 | #define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP73_SMBUS 0x07D8 | 1251 | #define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP73_SMBUS 0x07D8 |
1286 | #define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP79_SMBUS 0x0AA2 | 1252 | #define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP79_SMBUS 0x0AA2 |
1287 | #define PCI_DEVICE_ID_NVIDIA_NVENET_36 0x0AB0 | ||
1288 | #define PCI_DEVICE_ID_NVIDIA_NVENET_37 0x0AB1 | ||
1289 | #define PCI_DEVICE_ID_NVIDIA_NVENET_38 0x0AB2 | ||
1290 | #define PCI_DEVICE_ID_NVIDIA_NVENET_39 0x0AB3 | ||
1291 | 1253 | ||
1292 | #define PCI_VENDOR_ID_IMS 0x10e0 | 1254 | #define PCI_VENDOR_ID_IMS 0x10e0 |
1293 | #define PCI_DEVICE_ID_IMS_TT128 0x9128 | 1255 | #define PCI_DEVICE_ID_IMS_TT128 0x9128 |
@@ -1926,6 +1888,8 @@ | |||
1926 | #define PCI_SUBDEVICE_ID_CCD_SWYX4S 0xB540 | 1888 | #define PCI_SUBDEVICE_ID_CCD_SWYX4S 0xB540 |
1927 | #define PCI_SUBDEVICE_ID_CCD_JH4S20 0xB550 | 1889 | #define PCI_SUBDEVICE_ID_CCD_JH4S20 0xB550 |
1928 | #define PCI_SUBDEVICE_ID_CCD_IOB8ST_1 0xB552 | 1890 | #define PCI_SUBDEVICE_ID_CCD_IOB8ST_1 0xB552 |
1891 | #define PCI_SUBDEVICE_ID_CCD_JHSE1 0xB553 | ||
1892 | #define PCI_SUBDEVICE_ID_CCD_JH8S 0xB55B | ||
1929 | #define PCI_SUBDEVICE_ID_CCD_BN4S 0xB560 | 1893 | #define PCI_SUBDEVICE_ID_CCD_BN4S 0xB560 |
1930 | #define PCI_SUBDEVICE_ID_CCD_BN8S 0xB562 | 1894 | #define PCI_SUBDEVICE_ID_CCD_BN8S 0xB562 |
1931 | #define PCI_SUBDEVICE_ID_CCD_BNE1 0xB563 | 1895 | #define PCI_SUBDEVICE_ID_CCD_BNE1 0xB563 |
@@ -2328,6 +2292,8 @@ | |||
2328 | 2292 | ||
2329 | #define PCI_VENDOR_ID_QMI 0x1a32 | 2293 | #define PCI_VENDOR_ID_QMI 0x1a32 |
2330 | 2294 | ||
2295 | #define PCI_VENDOR_ID_AZWAVE 0x1a3b | ||
2296 | |||
2331 | #define PCI_VENDOR_ID_TEKRAM 0x1de1 | 2297 | #define PCI_VENDOR_ID_TEKRAM 0x1de1 |
2332 | #define PCI_DEVICE_ID_TEKRAM_DC290 0xdc29 | 2298 | #define PCI_DEVICE_ID_TEKRAM_DC290 0xdc29 |
2333 | 2299 | ||
diff --git a/include/linux/phy.h b/include/linux/phy.h index 97e40cb6b588..b1368b8f6572 100644 --- a/include/linux/phy.h +++ b/include/linux/phy.h | |||
@@ -79,7 +79,7 @@ typedef enum { | |||
79 | * Need to be a little smaller than phydev->dev.bus_id to leave room | 79 | * Need to be a little smaller than phydev->dev.bus_id to leave room |
80 | * for the ":%02x" | 80 | * for the ":%02x" |
81 | */ | 81 | */ |
82 | #define MII_BUS_ID_SIZE (BUS_ID_SIZE - 3) | 82 | #define MII_BUS_ID_SIZE (20 - 3) |
83 | 83 | ||
84 | /* | 84 | /* |
85 | * The Bus class for PHYs. Devices which provide access to | 85 | * The Bus class for PHYs. Devices which provide access to |
@@ -407,7 +407,7 @@ struct phy_driver { | |||
407 | /* A Structure for boards to register fixups with the PHY Lib */ | 407 | /* A Structure for boards to register fixups with the PHY Lib */ |
408 | struct phy_fixup { | 408 | struct phy_fixup { |
409 | struct list_head list; | 409 | struct list_head list; |
410 | char bus_id[BUS_ID_SIZE]; | 410 | char bus_id[20]; |
411 | u32 phy_uid; | 411 | u32 phy_uid; |
412 | u32 phy_uid_mask; | 412 | u32 phy_uid_mask; |
413 | int (*run)(struct phy_device *phydev); | 413 | int (*run)(struct phy_device *phydev); |
@@ -444,10 +444,16 @@ static inline int phy_write(struct phy_device *phydev, u16 regnum, u16 val) | |||
444 | 444 | ||
445 | int get_phy_id(struct mii_bus *bus, int addr, u32 *phy_id); | 445 | int get_phy_id(struct mii_bus *bus, int addr, u32 *phy_id); |
446 | struct phy_device* get_phy_device(struct mii_bus *bus, int addr); | 446 | struct phy_device* get_phy_device(struct mii_bus *bus, int addr); |
447 | int phy_device_register(struct phy_device *phy); | ||
447 | int phy_clear_interrupt(struct phy_device *phydev); | 448 | int phy_clear_interrupt(struct phy_device *phydev); |
448 | int phy_config_interrupt(struct phy_device *phydev, u32 interrupts); | 449 | int phy_config_interrupt(struct phy_device *phydev, u32 interrupts); |
450 | int phy_attach_direct(struct net_device *dev, struct phy_device *phydev, | ||
451 | u32 flags, phy_interface_t interface); | ||
449 | struct phy_device * phy_attach(struct net_device *dev, | 452 | struct phy_device * phy_attach(struct net_device *dev, |
450 | const char *bus_id, u32 flags, phy_interface_t interface); | 453 | const char *bus_id, u32 flags, phy_interface_t interface); |
454 | int phy_connect_direct(struct net_device *dev, struct phy_device *phydev, | ||
455 | void (*handler)(struct net_device *), u32 flags, | ||
456 | phy_interface_t interface); | ||
451 | struct phy_device * phy_connect(struct net_device *dev, const char *bus_id, | 457 | struct phy_device * phy_connect(struct net_device *dev, const char *bus_id, |
452 | void (*handler)(struct net_device *), u32 flags, | 458 | void (*handler)(struct net_device *), u32 flags, |
453 | phy_interface_t interface); | 459 | phy_interface_t interface); |
diff --git a/include/linux/rfkill.h b/include/linux/rfkill.h index 164332cbb77c..16e39c7a67fc 100644 --- a/include/linux/rfkill.h +++ b/include/linux/rfkill.h | |||
@@ -4,6 +4,7 @@ | |||
4 | /* | 4 | /* |
5 | * Copyright (C) 2006 - 2007 Ivo van Doorn | 5 | * Copyright (C) 2006 - 2007 Ivo van Doorn |
6 | * Copyright (C) 2007 Dmitry Torokhov | 6 | * Copyright (C) 2007 Dmitry Torokhov |
7 | * Copyright 2009 Johannes Berg <johannes@sipsolutions.net> | ||
7 | * | 8 | * |
8 | * This program is free software; you can redistribute it and/or modify | 9 | * This program is free software; you can redistribute it and/or modify |
9 | * it under the terms of the GNU General Public License as published by | 10 | * it under the terms of the GNU General Public License as published by |
@@ -22,131 +23,331 @@ | |||
22 | */ | 23 | */ |
23 | 24 | ||
24 | #include <linux/types.h> | 25 | #include <linux/types.h> |
25 | #include <linux/kernel.h> | 26 | |
26 | #include <linux/list.h> | 27 | /* define userspace visible states */ |
27 | #include <linux/mutex.h> | 28 | #define RFKILL_STATE_SOFT_BLOCKED 0 |
28 | #include <linux/device.h> | 29 | #define RFKILL_STATE_UNBLOCKED 1 |
29 | #include <linux/leds.h> | 30 | #define RFKILL_STATE_HARD_BLOCKED 2 |
30 | 31 | ||
31 | /** | 32 | /** |
32 | * enum rfkill_type - type of rfkill switch. | 33 | * enum rfkill_type - type of rfkill switch. |
33 | * RFKILL_TYPE_WLAN: switch is on a 802.11 wireless network device. | 34 | * |
34 | * RFKILL_TYPE_BLUETOOTH: switch is on a bluetooth device. | 35 | * @RFKILL_TYPE_ALL: toggles all switches (userspace only) |
35 | * RFKILL_TYPE_UWB: switch is on a ultra wideband device. | 36 | * @RFKILL_TYPE_WLAN: switch is on a 802.11 wireless network device. |
36 | * RFKILL_TYPE_WIMAX: switch is on a WiMAX device. | 37 | * @RFKILL_TYPE_BLUETOOTH: switch is on a bluetooth device. |
37 | * RFKILL_TYPE_WWAN: switch is on a wireless WAN device. | 38 | * @RFKILL_TYPE_UWB: switch is on a ultra wideband device. |
39 | * @RFKILL_TYPE_WIMAX: switch is on a WiMAX device. | ||
40 | * @RFKILL_TYPE_WWAN: switch is on a wireless WAN device. | ||
41 | * @NUM_RFKILL_TYPES: number of defined rfkill types | ||
38 | */ | 42 | */ |
39 | enum rfkill_type { | 43 | enum rfkill_type { |
40 | RFKILL_TYPE_WLAN , | 44 | RFKILL_TYPE_ALL = 0, |
45 | RFKILL_TYPE_WLAN, | ||
41 | RFKILL_TYPE_BLUETOOTH, | 46 | RFKILL_TYPE_BLUETOOTH, |
42 | RFKILL_TYPE_UWB, | 47 | RFKILL_TYPE_UWB, |
43 | RFKILL_TYPE_WIMAX, | 48 | RFKILL_TYPE_WIMAX, |
44 | RFKILL_TYPE_WWAN, | 49 | RFKILL_TYPE_WWAN, |
45 | RFKILL_TYPE_MAX, | 50 | NUM_RFKILL_TYPES, |
46 | }; | 51 | }; |
47 | 52 | ||
48 | enum rfkill_state { | 53 | /** |
49 | RFKILL_STATE_SOFT_BLOCKED = 0, /* Radio output blocked */ | 54 | * enum rfkill_operation - operation types |
50 | RFKILL_STATE_UNBLOCKED = 1, /* Radio output allowed */ | 55 | * @RFKILL_OP_ADD: a device was added |
51 | RFKILL_STATE_HARD_BLOCKED = 2, /* Output blocked, non-overrideable */ | 56 | * @RFKILL_OP_DEL: a device was removed |
52 | RFKILL_STATE_MAX, /* marker for last valid state */ | 57 | * @RFKILL_OP_CHANGE: a device's state changed -- userspace changes one device |
58 | * @RFKILL_OP_CHANGE_ALL: userspace changes all devices (of a type, or all) | ||
59 | */ | ||
60 | enum rfkill_operation { | ||
61 | RFKILL_OP_ADD = 0, | ||
62 | RFKILL_OP_DEL, | ||
63 | RFKILL_OP_CHANGE, | ||
64 | RFKILL_OP_CHANGE_ALL, | ||
53 | }; | 65 | }; |
54 | 66 | ||
55 | /* | 67 | /** |
56 | * These are DEPRECATED, drivers using them should be verified to | 68 | * struct rfkill_event - events for userspace on /dev/rfkill |
57 | * comply with the rfkill usage guidelines in Documentation/rfkill.txt | 69 | * @idx: index of dev rfkill |
58 | * and then converted to use the new names for rfkill_state | 70 | * @type: type of the rfkill struct |
59 | */ | 71 | * @op: operation code |
60 | #define RFKILL_STATE_OFF RFKILL_STATE_SOFT_BLOCKED | 72 | * @hard: hard state (0/1) |
61 | #define RFKILL_STATE_ON RFKILL_STATE_UNBLOCKED | 73 | * @soft: soft state (0/1) |
62 | 74 | * | |
63 | /** | 75 | * Structure used for userspace communication on /dev/rfkill, |
64 | * struct rfkill - rfkill control structure. | 76 | * used for events from the kernel and control to the kernel. |
65 | * @name: Name of the switch. | 77 | */ |
66 | * @type: Radio type which the button controls, the value stored | 78 | struct rfkill_event { |
67 | * here should be a value from enum rfkill_type. | 79 | __u32 idx; |
68 | * @state: State of the switch, "UNBLOCKED" means radio can operate. | 80 | __u8 type; |
69 | * @user_claim_unsupported: Whether the hardware supports exclusive | 81 | __u8 op; |
70 | * RF-kill control by userspace. Set this before registering. | 82 | __u8 soft, hard; |
71 | * @user_claim: Set when the switch is controlled exlusively by userspace. | 83 | } __packed; |
72 | * @mutex: Guards switch state transitions. It serializes callbacks | ||
73 | * and also protects the state. | ||
74 | * @data: Pointer to the RF button drivers private data which will be | ||
75 | * passed along when toggling radio state. | ||
76 | * @toggle_radio(): Mandatory handler to control state of the radio. | ||
77 | * only RFKILL_STATE_SOFT_BLOCKED and RFKILL_STATE_UNBLOCKED are | ||
78 | * valid parameters. | ||
79 | * @get_state(): handler to read current radio state from hardware, | ||
80 | * may be called from atomic context, should return 0 on success. | ||
81 | * Either this handler OR judicious use of rfkill_force_state() is | ||
82 | * MANDATORY for any driver capable of RFKILL_STATE_HARD_BLOCKED. | ||
83 | * @led_trigger: A LED trigger for this button's LED. | ||
84 | * @dev: Device structure integrating the switch into device tree. | ||
85 | * @node: Used to place switch into list of all switches known to the | ||
86 | * the system. | ||
87 | * | ||
88 | * This structure represents a RF switch located on a network device. | ||
89 | */ | ||
90 | struct rfkill { | ||
91 | const char *name; | ||
92 | enum rfkill_type type; | ||
93 | |||
94 | bool user_claim_unsupported; | ||
95 | bool user_claim; | ||
96 | |||
97 | /* the mutex serializes callbacks and also protects | ||
98 | * the state */ | ||
99 | struct mutex mutex; | ||
100 | enum rfkill_state state; | ||
101 | void *data; | ||
102 | int (*toggle_radio)(void *data, enum rfkill_state state); | ||
103 | int (*get_state)(void *data, enum rfkill_state *state); | ||
104 | 84 | ||
105 | #ifdef CONFIG_RFKILL_LEDS | 85 | /* ioctl for turning off rfkill-input (if present) */ |
106 | struct led_trigger led_trigger; | 86 | #define RFKILL_IOC_MAGIC 'R' |
107 | #endif | 87 | #define RFKILL_IOC_NOINPUT 1 |
88 | #define RFKILL_IOCTL_NOINPUT _IO(RFKILL_IOC_MAGIC, RFKILL_IOC_NOINPUT) | ||
89 | |||
90 | /* and that's all userspace gets */ | ||
91 | #ifdef __KERNEL__ | ||
92 | /* don't allow anyone to use these in the kernel */ | ||
93 | enum rfkill_user_states { | ||
94 | RFKILL_USER_STATE_SOFT_BLOCKED = RFKILL_STATE_SOFT_BLOCKED, | ||
95 | RFKILL_USER_STATE_UNBLOCKED = RFKILL_STATE_UNBLOCKED, | ||
96 | RFKILL_USER_STATE_HARD_BLOCKED = RFKILL_STATE_HARD_BLOCKED, | ||
97 | }; | ||
98 | #undef RFKILL_STATE_SOFT_BLOCKED | ||
99 | #undef RFKILL_STATE_UNBLOCKED | ||
100 | #undef RFKILL_STATE_HARD_BLOCKED | ||
101 | |||
102 | #include <linux/types.h> | ||
103 | #include <linux/kernel.h> | ||
104 | #include <linux/list.h> | ||
105 | #include <linux/mutex.h> | ||
106 | #include <linux/device.h> | ||
107 | #include <linux/leds.h> | ||
108 | #include <linux/err.h> | ||
109 | |||
110 | /* this is opaque */ | ||
111 | struct rfkill; | ||
108 | 112 | ||
109 | struct device dev; | 113 | /** |
110 | struct list_head node; | 114 | * struct rfkill_ops - rfkill driver methods |
111 | enum rfkill_state state_for_resume; | 115 | * |
116 | * @poll: poll the rfkill block state(s) -- only assign this method | ||
117 | * when you need polling. When called, simply call one of the | ||
118 | * rfkill_set{,_hw,_sw}_state family of functions. If the hw | ||
119 | * is getting unblocked you need to take into account the return | ||
120 | * value of those functions to make sure the software block is | ||
121 | * properly used. | ||
122 | * @query: query the rfkill block state(s) and call exactly one of the | ||
123 | * rfkill_set{,_hw,_sw}_state family of functions. Assign this | ||
124 | * method if input events can cause hardware state changes to make | ||
125 | * the rfkill core query your driver before setting a requested | ||
126 | * block. | ||
127 | * @set_block: turn the transmitter on (blocked == false) or off | ||
128 | * (blocked == true) -- ignore and return 0 when hard blocked. | ||
129 | * This callback must be assigned. | ||
130 | */ | ||
131 | struct rfkill_ops { | ||
132 | void (*poll)(struct rfkill *rfkill, void *data); | ||
133 | void (*query)(struct rfkill *rfkill, void *data); | ||
134 | int (*set_block)(void *data, bool blocked); | ||
112 | }; | 135 | }; |
113 | #define to_rfkill(d) container_of(d, struct rfkill, dev) | ||
114 | 136 | ||
115 | struct rfkill * __must_check rfkill_allocate(struct device *parent, | 137 | #if defined(CONFIG_RFKILL) || defined(CONFIG_RFKILL_MODULE) |
116 | enum rfkill_type type); | 138 | /** |
117 | void rfkill_free(struct rfkill *rfkill); | 139 | * rfkill_alloc - allocate rfkill structure |
140 | * @name: name of the struct -- the string is not copied internally | ||
141 | * @parent: device that has rf switch on it | ||
142 | * @type: type of the switch (RFKILL_TYPE_*) | ||
143 | * @ops: rfkill methods | ||
144 | * @ops_data: data passed to each method | ||
145 | * | ||
146 | * This function should be called by the transmitter driver to allocate an | ||
147 | * rfkill structure. Returns %NULL on failure. | ||
148 | */ | ||
149 | struct rfkill * __must_check rfkill_alloc(const char *name, | ||
150 | struct device *parent, | ||
151 | const enum rfkill_type type, | ||
152 | const struct rfkill_ops *ops, | ||
153 | void *ops_data); | ||
154 | |||
155 | /** | ||
156 | * rfkill_register - Register a rfkill structure. | ||
157 | * @rfkill: rfkill structure to be registered | ||
158 | * | ||
159 | * This function should be called by the transmitter driver to register | ||
160 | * the rfkill structure. Before calling this function the driver needs | ||
161 | * to be ready to service method calls from rfkill. | ||
162 | * | ||
163 | * If the software blocked state is not set before registration, | ||
164 | * set_block will be called to initialize it to a default value. | ||
165 | * | ||
166 | * If the hardware blocked state is not set before registration, | ||
167 | * it is assumed to be unblocked. | ||
168 | */ | ||
118 | int __must_check rfkill_register(struct rfkill *rfkill); | 169 | int __must_check rfkill_register(struct rfkill *rfkill); |
170 | |||
171 | /** | ||
172 | * rfkill_pause_polling(struct rfkill *rfkill) | ||
173 | * | ||
174 | * Pause polling -- say transmitter is off for other reasons. | ||
175 | * NOTE: not necessary for suspend/resume -- in that case the | ||
176 | * core stops polling anyway | ||
177 | */ | ||
178 | void rfkill_pause_polling(struct rfkill *rfkill); | ||
179 | |||
180 | /** | ||
181 | * rfkill_resume_polling(struct rfkill *rfkill) | ||
182 | * | ||
183 | * Pause polling -- say transmitter is off for other reasons. | ||
184 | * NOTE: not necessary for suspend/resume -- in that case the | ||
185 | * core stops polling anyway | ||
186 | */ | ||
187 | void rfkill_resume_polling(struct rfkill *rfkill); | ||
188 | |||
189 | |||
190 | /** | ||
191 | * rfkill_unregister - Unregister a rfkill structure. | ||
192 | * @rfkill: rfkill structure to be unregistered | ||
193 | * | ||
194 | * This function should be called by the network driver during device | ||
195 | * teardown to destroy rfkill structure. Until it returns, the driver | ||
196 | * needs to be able to service method calls. | ||
197 | */ | ||
119 | void rfkill_unregister(struct rfkill *rfkill); | 198 | void rfkill_unregister(struct rfkill *rfkill); |
120 | 199 | ||
121 | int rfkill_force_state(struct rfkill *rfkill, enum rfkill_state state); | 200 | /** |
122 | int rfkill_set_default(enum rfkill_type type, enum rfkill_state state); | 201 | * rfkill_destroy - free rfkill structure |
202 | * @rfkill: rfkill structure to be destroyed | ||
203 | * | ||
204 | * Destroys the rfkill structure. | ||
205 | */ | ||
206 | void rfkill_destroy(struct rfkill *rfkill); | ||
207 | |||
208 | /** | ||
209 | * rfkill_set_hw_state - Set the internal rfkill hardware block state | ||
210 | * @rfkill: pointer to the rfkill class to modify. | ||
211 | * @state: the current hardware block state to set | ||
212 | * | ||
213 | * rfkill drivers that get events when the hard-blocked state changes | ||
214 | * use this function to notify the rfkill core (and through that also | ||
215 | * userspace) of the current state. They should also use this after | ||
216 | * resume if the state could have changed. | ||
217 | * | ||
218 | * You need not (but may) call this function if poll_state is assigned. | ||
219 | * | ||
220 | * This function can be called in any context, even from within rfkill | ||
221 | * callbacks. | ||
222 | * | ||
223 | * The function returns the combined block state (true if transmitter | ||
224 | * should be blocked) so that drivers need not keep track of the soft | ||
225 | * block state -- which they might not be able to. | ||
226 | */ | ||
227 | bool __must_check rfkill_set_hw_state(struct rfkill *rfkill, bool blocked); | ||
228 | |||
229 | /** | ||
230 | * rfkill_set_sw_state - Set the internal rfkill software block state | ||
231 | * @rfkill: pointer to the rfkill class to modify. | ||
232 | * @state: the current software block state to set | ||
233 | * | ||
234 | * rfkill drivers that get events when the soft-blocked state changes | ||
235 | * (yes, some platforms directly act on input but allow changing again) | ||
236 | * use this function to notify the rfkill core (and through that also | ||
237 | * userspace) of the current state. It is not necessary to notify on | ||
238 | * resume; since hibernation can always change the soft-blocked state, | ||
239 | * the rfkill core will unconditionally restore the previous state. | ||
240 | * | ||
241 | * This function can be called in any context, even from within rfkill | ||
242 | * callbacks. | ||
243 | * | ||
244 | * The function returns the combined block state (true if transmitter | ||
245 | * should be blocked). | ||
246 | */ | ||
247 | bool rfkill_set_sw_state(struct rfkill *rfkill, bool blocked); | ||
248 | |||
249 | /** | ||
250 | * rfkill_set_states - Set the internal rfkill block states | ||
251 | * @rfkill: pointer to the rfkill class to modify. | ||
252 | * @sw: the current software block state to set | ||
253 | * @hw: the current hardware block state to set | ||
254 | * | ||
255 | * This function can be called in any context, even from within rfkill | ||
256 | * callbacks. | ||
257 | */ | ||
258 | void rfkill_set_states(struct rfkill *rfkill, bool sw, bool hw); | ||
123 | 259 | ||
124 | /** | 260 | /** |
125 | * rfkill_state_complement - return complementar state | 261 | * rfkill_blocked - query rfkill block |
126 | * @state: state to return the complement of | ||
127 | * | 262 | * |
128 | * Returns RFKILL_STATE_SOFT_BLOCKED if @state is RFKILL_STATE_UNBLOCKED, | 263 | * @rfkill: rfkill struct to query |
129 | * returns RFKILL_STATE_UNBLOCKED otherwise. | ||
130 | */ | 264 | */ |
131 | static inline enum rfkill_state rfkill_state_complement(enum rfkill_state state) | 265 | bool rfkill_blocked(struct rfkill *rfkill); |
266 | #else /* !RFKILL */ | ||
267 | static inline struct rfkill * __must_check | ||
268 | rfkill_alloc(const char *name, | ||
269 | struct device *parent, | ||
270 | const enum rfkill_type type, | ||
271 | const struct rfkill_ops *ops, | ||
272 | void *ops_data) | ||
273 | { | ||
274 | return ERR_PTR(-ENODEV); | ||
275 | } | ||
276 | |||
277 | static inline int __must_check rfkill_register(struct rfkill *rfkill) | ||
278 | { | ||
279 | if (rfkill == ERR_PTR(-ENODEV)) | ||
280 | return 0; | ||
281 | return -EINVAL; | ||
282 | } | ||
283 | |||
284 | static inline void rfkill_pause_polling(struct rfkill *rfkill) | ||
285 | { | ||
286 | } | ||
287 | |||
288 | static inline void rfkill_resume_polling(struct rfkill *rfkill) | ||
289 | { | ||
290 | } | ||
291 | |||
292 | static inline void rfkill_unregister(struct rfkill *rfkill) | ||
293 | { | ||
294 | } | ||
295 | |||
296 | static inline void rfkill_destroy(struct rfkill *rfkill) | ||
297 | { | ||
298 | } | ||
299 | |||
300 | static inline bool rfkill_set_hw_state(struct rfkill *rfkill, bool blocked) | ||
301 | { | ||
302 | return blocked; | ||
303 | } | ||
304 | |||
305 | static inline bool rfkill_set_sw_state(struct rfkill *rfkill, bool blocked) | ||
132 | { | 306 | { |
133 | return (state == RFKILL_STATE_UNBLOCKED) ? | 307 | return blocked; |
134 | RFKILL_STATE_SOFT_BLOCKED : RFKILL_STATE_UNBLOCKED; | ||
135 | } | 308 | } |
136 | 309 | ||
310 | static inline void rfkill_set_states(struct rfkill *rfkill, bool sw, bool hw) | ||
311 | { | ||
312 | } | ||
313 | |||
314 | static inline bool rfkill_blocked(struct rfkill *rfkill) | ||
315 | { | ||
316 | return false; | ||
317 | } | ||
318 | #endif /* RFKILL || RFKILL_MODULE */ | ||
319 | |||
320 | |||
321 | #ifdef CONFIG_RFKILL_LEDS | ||
137 | /** | 322 | /** |
138 | * rfkill_get_led_name - Get the LED trigger name for the button's LED. | 323 | * rfkill_get_led_trigger_name - Get the LED trigger name for the button's LED. |
139 | * This function might return a NULL pointer if registering of the | 324 | * This function might return a NULL pointer if registering of the |
140 | * LED trigger failed. | 325 | * LED trigger failed. Use this as "default_trigger" for the LED. |
141 | * Use this as "default_trigger" for the LED. | ||
142 | */ | 326 | */ |
143 | static inline char *rfkill_get_led_name(struct rfkill *rfkill) | 327 | const char *rfkill_get_led_trigger_name(struct rfkill *rfkill); |
144 | { | 328 | |
145 | #ifdef CONFIG_RFKILL_LEDS | 329 | /** |
146 | return (char *)(rfkill->led_trigger.name); | 330 | * rfkill_set_led_trigger_name -- set the LED trigger name |
331 | * @rfkill: rfkill struct | ||
332 | * @name: LED trigger name | ||
333 | * | ||
334 | * This function sets the LED trigger name of the radio LED | ||
335 | * trigger that rfkill creates. It is optional, but if called | ||
336 | * must be called before rfkill_register() to be effective. | ||
337 | */ | ||
338 | void rfkill_set_led_trigger_name(struct rfkill *rfkill, const char *name); | ||
147 | #else | 339 | #else |
340 | static inline const char *rfkill_get_led_trigger_name(struct rfkill *rfkill) | ||
341 | { | ||
148 | return NULL; | 342 | return NULL; |
149 | #endif | ||
150 | } | 343 | } |
151 | 344 | ||
345 | static inline void | ||
346 | rfkill_set_led_trigger_name(struct rfkill *rfkill, const char *name) | ||
347 | { | ||
348 | } | ||
349 | #endif | ||
350 | |||
351 | #endif /* __KERNEL__ */ | ||
352 | |||
152 | #endif /* RFKILL_H */ | 353 | #endif /* RFKILL_H */ |
diff --git a/include/linux/sched.h b/include/linux/sched.h index 4896fdfec913..fea9d188dbff 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
@@ -2212,6 +2212,12 @@ static inline int test_tsk_need_resched(struct task_struct *tsk) | |||
2212 | return unlikely(test_tsk_thread_flag(tsk,TIF_NEED_RESCHED)); | 2212 | return unlikely(test_tsk_thread_flag(tsk,TIF_NEED_RESCHED)); |
2213 | } | 2213 | } |
2214 | 2214 | ||
2215 | static inline int restart_syscall(void) | ||
2216 | { | ||
2217 | set_tsk_thread_flag(current, TIF_SIGPENDING); | ||
2218 | return -ERESTARTNOINTR; | ||
2219 | } | ||
2220 | |||
2215 | static inline int signal_pending(struct task_struct *p) | 2221 | static inline int signal_pending(struct task_struct *p) |
2216 | { | 2222 | { |
2217 | return unlikely(test_tsk_thread_flag(p,TIF_SIGPENDING)); | 2223 | return unlikely(test_tsk_thread_flag(p,TIF_SIGPENDING)); |
diff --git a/include/linux/sctp.h b/include/linux/sctp.h index c2731bfe04d8..b464b9d3d242 100644 --- a/include/linux/sctp.h +++ b/include/linux/sctp.h | |||
@@ -487,17 +487,17 @@ typedef enum { | |||
487 | * | 487 | * |
488 | * Value Cause Code | 488 | * Value Cause Code |
489 | * --------- ---------------- | 489 | * --------- ---------------- |
490 | * 0x0100 Request to Delete Last Remaining IP Address. | 490 | * 0x00A0 Request to Delete Last Remaining IP Address. |
491 | * 0x0101 Operation Refused Due to Resource Shortage. | 491 | * 0x00A1 Operation Refused Due to Resource Shortage. |
492 | * 0x0102 Request to Delete Source IP Address. | 492 | * 0x00A2 Request to Delete Source IP Address. |
493 | * 0x0103 Association Aborted due to illegal ASCONF-ACK | 493 | * 0x00A3 Association Aborted due to illegal ASCONF-ACK |
494 | * 0x0104 Request refused - no authorization. | 494 | * 0x00A4 Request refused - no authorization. |
495 | */ | 495 | */ |
496 | SCTP_ERROR_DEL_LAST_IP = cpu_to_be16(0x0100), | 496 | SCTP_ERROR_DEL_LAST_IP = cpu_to_be16(0x00A0), |
497 | SCTP_ERROR_RSRC_LOW = cpu_to_be16(0x0101), | 497 | SCTP_ERROR_RSRC_LOW = cpu_to_be16(0x00A1), |
498 | SCTP_ERROR_DEL_SRC_IP = cpu_to_be16(0x0102), | 498 | SCTP_ERROR_DEL_SRC_IP = cpu_to_be16(0x00A2), |
499 | SCTP_ERROR_ASCONF_ACK = cpu_to_be16(0x0103), | 499 | SCTP_ERROR_ASCONF_ACK = cpu_to_be16(0x00A3), |
500 | SCTP_ERROR_REQ_REFUSED = cpu_to_be16(0x0104), | 500 | SCTP_ERROR_REQ_REFUSED = cpu_to_be16(0x00A4), |
501 | 501 | ||
502 | /* AUTH Section 4. New Error Cause | 502 | /* AUTH Section 4. New Error Cause |
503 | * | 503 | * |
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index 5fd389162f01..fa51293f2708 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h | |||
@@ -189,20 +189,23 @@ struct skb_shared_info { | |||
189 | atomic_t dataref; | 189 | atomic_t dataref; |
190 | unsigned short nr_frags; | 190 | unsigned short nr_frags; |
191 | unsigned short gso_size; | 191 | unsigned short gso_size; |
192 | #ifdef CONFIG_HAS_DMA | ||
193 | dma_addr_t dma_head; | ||
194 | #endif | ||
192 | /* Warning: this field is not always filled in (UFO)! */ | 195 | /* Warning: this field is not always filled in (UFO)! */ |
193 | unsigned short gso_segs; | 196 | unsigned short gso_segs; |
194 | unsigned short gso_type; | 197 | unsigned short gso_type; |
195 | __be32 ip6_frag_id; | 198 | __be32 ip6_frag_id; |
196 | union skb_shared_tx tx_flags; | 199 | union skb_shared_tx tx_flags; |
197 | #ifdef CONFIG_HAS_DMA | ||
198 | unsigned int num_dma_maps; | ||
199 | #endif | ||
200 | struct sk_buff *frag_list; | 200 | struct sk_buff *frag_list; |
201 | struct skb_shared_hwtstamps hwtstamps; | 201 | struct skb_shared_hwtstamps hwtstamps; |
202 | skb_frag_t frags[MAX_SKB_FRAGS]; | 202 | skb_frag_t frags[MAX_SKB_FRAGS]; |
203 | #ifdef CONFIG_HAS_DMA | 203 | #ifdef CONFIG_HAS_DMA |
204 | dma_addr_t dma_maps[MAX_SKB_FRAGS + 1]; | 204 | dma_addr_t dma_maps[MAX_SKB_FRAGS]; |
205 | #endif | 205 | #endif |
206 | /* Intermediate layers must ensure that destructor_arg | ||
207 | * remains valid until skb destructor */ | ||
208 | void * destructor_arg; | ||
206 | }; | 209 | }; |
207 | 210 | ||
208 | /* We divide dataref into two halves. The higher 16 bits hold references | 211 | /* We divide dataref into two halves. The higher 16 bits hold references |
@@ -301,9 +304,6 @@ typedef unsigned char *sk_buff_data_t; | |||
301 | * @tc_verd: traffic control verdict | 304 | * @tc_verd: traffic control verdict |
302 | * @ndisc_nodetype: router type (from link layer) | 305 | * @ndisc_nodetype: router type (from link layer) |
303 | * @do_not_encrypt: set to prevent encryption of this frame | 306 | * @do_not_encrypt: set to prevent encryption of this frame |
304 | * @requeue: set to indicate that the wireless core should attempt | ||
305 | * a software retry on this frame if we failed to | ||
306 | * receive an ACK for it | ||
307 | * @dma_cookie: a cookie to one of several possible DMA operations | 307 | * @dma_cookie: a cookie to one of several possible DMA operations |
308 | * done by skb DMA functions | 308 | * done by skb DMA functions |
309 | * @secmark: security marking | 309 | * @secmark: security marking |
@@ -319,10 +319,7 @@ struct sk_buff { | |||
319 | ktime_t tstamp; | 319 | ktime_t tstamp; |
320 | struct net_device *dev; | 320 | struct net_device *dev; |
321 | 321 | ||
322 | union { | 322 | unsigned long _skb_dst; |
323 | struct dst_entry *dst; | ||
324 | struct rtable *rtable; | ||
325 | }; | ||
326 | #ifdef CONFIG_XFRM | 323 | #ifdef CONFIG_XFRM |
327 | struct sec_path *sp; | 324 | struct sec_path *sp; |
328 | #endif | 325 | #endif |
@@ -380,7 +377,6 @@ struct sk_buff { | |||
380 | #endif | 377 | #endif |
381 | #if defined(CONFIG_MAC80211) || defined(CONFIG_MAC80211_MODULE) | 378 | #if defined(CONFIG_MAC80211) || defined(CONFIG_MAC80211_MODULE) |
382 | __u8 do_not_encrypt:1; | 379 | __u8 do_not_encrypt:1; |
383 | __u8 requeue:1; | ||
384 | #endif | 380 | #endif |
385 | /* 0/13/14 bit hole */ | 381 | /* 0/13/14 bit hole */ |
386 | 382 | ||
@@ -423,6 +419,21 @@ extern void skb_dma_unmap(struct device *dev, struct sk_buff *skb, | |||
423 | enum dma_data_direction dir); | 419 | enum dma_data_direction dir); |
424 | #endif | 420 | #endif |
425 | 421 | ||
422 | static inline struct dst_entry *skb_dst(const struct sk_buff *skb) | ||
423 | { | ||
424 | return (struct dst_entry *)skb->_skb_dst; | ||
425 | } | ||
426 | |||
427 | static inline void skb_dst_set(struct sk_buff *skb, struct dst_entry *dst) | ||
428 | { | ||
429 | skb->_skb_dst = (unsigned long)dst; | ||
430 | } | ||
431 | |||
432 | static inline struct rtable *skb_rtable(const struct sk_buff *skb) | ||
433 | { | ||
434 | return (struct rtable *)skb_dst(skb); | ||
435 | } | ||
436 | |||
426 | extern void kfree_skb(struct sk_buff *skb); | 437 | extern void kfree_skb(struct sk_buff *skb); |
427 | extern void consume_skb(struct sk_buff *skb); | 438 | extern void consume_skb(struct sk_buff *skb); |
428 | extern void __kfree_skb(struct sk_buff *skb); | 439 | extern void __kfree_skb(struct sk_buff *skb); |
@@ -1062,7 +1073,7 @@ extern void skb_add_rx_frag(struct sk_buff *skb, int i, struct page *page, | |||
1062 | int off, int size); | 1073 | int off, int size); |
1063 | 1074 | ||
1064 | #define SKB_PAGE_ASSERT(skb) BUG_ON(skb_shinfo(skb)->nr_frags) | 1075 | #define SKB_PAGE_ASSERT(skb) BUG_ON(skb_shinfo(skb)->nr_frags) |
1065 | #define SKB_FRAG_ASSERT(skb) BUG_ON(skb_shinfo(skb)->frag_list) | 1076 | #define SKB_FRAG_ASSERT(skb) BUG_ON(skb_has_frags(skb)) |
1066 | #define SKB_LINEAR_ASSERT(skb) BUG_ON(skb_is_nonlinear(skb)) | 1077 | #define SKB_LINEAR_ASSERT(skb) BUG_ON(skb_is_nonlinear(skb)) |
1067 | 1078 | ||
1068 | #ifdef NET_SKBUFF_DATA_USES_OFFSET | 1079 | #ifdef NET_SKBUFF_DATA_USES_OFFSET |
@@ -1701,6 +1712,25 @@ static inline int pskb_trim_rcsum(struct sk_buff *skb, unsigned int len) | |||
1701 | skb = skb->prev) | 1712 | skb = skb->prev) |
1702 | 1713 | ||
1703 | 1714 | ||
1715 | static inline bool skb_has_frags(const struct sk_buff *skb) | ||
1716 | { | ||
1717 | return skb_shinfo(skb)->frag_list != NULL; | ||
1718 | } | ||
1719 | |||
1720 | static inline void skb_frag_list_init(struct sk_buff *skb) | ||
1721 | { | ||
1722 | skb_shinfo(skb)->frag_list = NULL; | ||
1723 | } | ||
1724 | |||
1725 | static inline void skb_frag_add_head(struct sk_buff *skb, struct sk_buff *frag) | ||
1726 | { | ||
1727 | frag->next = skb_shinfo(skb)->frag_list; | ||
1728 | skb_shinfo(skb)->frag_list = frag; | ||
1729 | } | ||
1730 | |||
1731 | #define skb_walk_frags(skb, iter) \ | ||
1732 | for (iter = skb_shinfo(skb)->frag_list; iter; iter = iter->next) | ||
1733 | |||
1704 | extern struct sk_buff *__skb_recv_datagram(struct sock *sk, unsigned flags, | 1734 | extern struct sk_buff *__skb_recv_datagram(struct sock *sk, unsigned flags, |
1705 | int *peeked, int *err); | 1735 | int *peeked, int *err); |
1706 | extern struct sk_buff *skb_recv_datagram(struct sock *sk, unsigned flags, | 1736 | extern struct sk_buff *skb_recv_datagram(struct sock *sk, unsigned flags, |
@@ -1715,8 +1745,14 @@ extern int skb_copy_and_csum_datagram_iovec(struct sk_buff *skb, | |||
1715 | struct iovec *iov); | 1745 | struct iovec *iov); |
1716 | extern int skb_copy_datagram_from_iovec(struct sk_buff *skb, | 1746 | extern int skb_copy_datagram_from_iovec(struct sk_buff *skb, |
1717 | int offset, | 1747 | int offset, |
1718 | struct iovec *from, | 1748 | const struct iovec *from, |
1749 | int from_offset, | ||
1719 | int len); | 1750 | int len); |
1751 | extern int skb_copy_datagram_const_iovec(const struct sk_buff *from, | ||
1752 | int offset, | ||
1753 | const struct iovec *to, | ||
1754 | int to_offset, | ||
1755 | int size); | ||
1720 | extern void skb_free_datagram(struct sock *sk, struct sk_buff *skb); | 1756 | extern void skb_free_datagram(struct sock *sk, struct sk_buff *skb); |
1721 | extern int skb_kill_datagram(struct sock *sk, struct sk_buff *skb, | 1757 | extern int skb_kill_datagram(struct sock *sk, struct sk_buff *skb, |
1722 | unsigned int flags); | 1758 | unsigned int flags); |
diff --git a/include/linux/smsc911x.h b/include/linux/smsc911x.h index b32725075d71..5241e4fb4eca 100644 --- a/include/linux/smsc911x.h +++ b/include/linux/smsc911x.h | |||
@@ -47,4 +47,14 @@ struct smsc911x_platform_config { | |||
47 | #define SMSC911X_FORCE_EXTERNAL_PHY (BIT(3)) | 47 | #define SMSC911X_FORCE_EXTERNAL_PHY (BIT(3)) |
48 | #define SMSC911X_SAVE_MAC_ADDRESS (BIT(4)) | 48 | #define SMSC911X_SAVE_MAC_ADDRESS (BIT(4)) |
49 | 49 | ||
50 | /* | ||
51 | * SMSC911X_SWAP_FIFO: | ||
52 | * Enables software byte swap for fifo data. Should only be used as a | ||
53 | * "last resort" in the case of big endian mode on boards with incorrectly | ||
54 | * routed data bus to older devices such as LAN9118. Newer devices such as | ||
55 | * LAN9221 can handle this in hardware, there are registers to control | ||
56 | * this swapping but the driver doesn't currently use them. | ||
57 | */ | ||
58 | #define SMSC911X_SWAP_FIFO (BIT(5)) | ||
59 | |||
50 | #endif /* __LINUX_SMSC911X_H__ */ | 60 | #endif /* __LINUX_SMSC911X_H__ */ |
diff --git a/include/linux/snmp.h b/include/linux/snmp.h index aee3f1e1d1ce..0f953fe40413 100644 --- a/include/linux/snmp.h +++ b/include/linux/snmp.h | |||
@@ -18,7 +18,7 @@ | |||
18 | enum | 18 | enum |
19 | { | 19 | { |
20 | IPSTATS_MIB_NUM = 0, | 20 | IPSTATS_MIB_NUM = 0, |
21 | IPSTATS_MIB_INRECEIVES, /* InReceives */ | 21 | IPSTATS_MIB_INPKTS, /* InReceives */ |
22 | IPSTATS_MIB_INHDRERRORS, /* InHdrErrors */ | 22 | IPSTATS_MIB_INHDRERRORS, /* InHdrErrors */ |
23 | IPSTATS_MIB_INTOOBIGERRORS, /* InTooBigErrors */ | 23 | IPSTATS_MIB_INTOOBIGERRORS, /* InTooBigErrors */ |
24 | IPSTATS_MIB_INNOROUTES, /* InNoRoutes */ | 24 | IPSTATS_MIB_INNOROUTES, /* InNoRoutes */ |
@@ -28,7 +28,7 @@ enum | |||
28 | IPSTATS_MIB_INDISCARDS, /* InDiscards */ | 28 | IPSTATS_MIB_INDISCARDS, /* InDiscards */ |
29 | IPSTATS_MIB_INDELIVERS, /* InDelivers */ | 29 | IPSTATS_MIB_INDELIVERS, /* InDelivers */ |
30 | IPSTATS_MIB_OUTFORWDATAGRAMS, /* OutForwDatagrams */ | 30 | IPSTATS_MIB_OUTFORWDATAGRAMS, /* OutForwDatagrams */ |
31 | IPSTATS_MIB_OUTREQUESTS, /* OutRequests */ | 31 | IPSTATS_MIB_OUTPKTS, /* OutRequests */ |
32 | IPSTATS_MIB_OUTDISCARDS, /* OutDiscards */ | 32 | IPSTATS_MIB_OUTDISCARDS, /* OutDiscards */ |
33 | IPSTATS_MIB_OUTNOROUTES, /* OutNoRoutes */ | 33 | IPSTATS_MIB_OUTNOROUTES, /* OutNoRoutes */ |
34 | IPSTATS_MIB_REASMTIMEOUT, /* ReasmTimeout */ | 34 | IPSTATS_MIB_REASMTIMEOUT, /* ReasmTimeout */ |
@@ -42,6 +42,12 @@ enum | |||
42 | IPSTATS_MIB_OUTMCASTPKTS, /* OutMcastPkts */ | 42 | IPSTATS_MIB_OUTMCASTPKTS, /* OutMcastPkts */ |
43 | IPSTATS_MIB_INBCASTPKTS, /* InBcastPkts */ | 43 | IPSTATS_MIB_INBCASTPKTS, /* InBcastPkts */ |
44 | IPSTATS_MIB_OUTBCASTPKTS, /* OutBcastPkts */ | 44 | IPSTATS_MIB_OUTBCASTPKTS, /* OutBcastPkts */ |
45 | IPSTATS_MIB_INOCTETS, /* InOctets */ | ||
46 | IPSTATS_MIB_OUTOCTETS, /* OutOctets */ | ||
47 | IPSTATS_MIB_INMCASTOCTETS, /* InMcastOctets */ | ||
48 | IPSTATS_MIB_OUTMCASTOCTETS, /* OutMcastOctets */ | ||
49 | IPSTATS_MIB_INBCASTOCTETS, /* InBcastOctets */ | ||
50 | IPSTATS_MIB_OUTBCASTOCTETS, /* OutBcastOctets */ | ||
45 | __IPSTATS_MIB_MAX | 51 | __IPSTATS_MIB_MAX |
46 | }; | 52 | }; |
47 | 53 | ||
diff --git a/include/linux/socket.h b/include/linux/socket.h index 421afb4d29b0..3b461dffe244 100644 --- a/include/linux/socket.h +++ b/include/linux/socket.h | |||
@@ -194,7 +194,8 @@ struct ucred { | |||
194 | #define AF_RXRPC 33 /* RxRPC sockets */ | 194 | #define AF_RXRPC 33 /* RxRPC sockets */ |
195 | #define AF_ISDN 34 /* mISDN sockets */ | 195 | #define AF_ISDN 34 /* mISDN sockets */ |
196 | #define AF_PHONET 35 /* Phonet sockets */ | 196 | #define AF_PHONET 35 /* Phonet sockets */ |
197 | #define AF_MAX 36 /* For now.. */ | 197 | #define AF_IEEE802154 36 /* IEEE802154 sockets */ |
198 | #define AF_MAX 37 /* For now.. */ | ||
198 | 199 | ||
199 | /* Protocol families, same as address families. */ | 200 | /* Protocol families, same as address families. */ |
200 | #define PF_UNSPEC AF_UNSPEC | 201 | #define PF_UNSPEC AF_UNSPEC |
@@ -233,6 +234,7 @@ struct ucred { | |||
233 | #define PF_RXRPC AF_RXRPC | 234 | #define PF_RXRPC AF_RXRPC |
234 | #define PF_ISDN AF_ISDN | 235 | #define PF_ISDN AF_ISDN |
235 | #define PF_PHONET AF_PHONET | 236 | #define PF_PHONET AF_PHONET |
237 | #define PF_IEEE802154 AF_IEEE802154 | ||
236 | #define PF_MAX AF_MAX | 238 | #define PF_MAX AF_MAX |
237 | 239 | ||
238 | /* Maximum queue length specifiable by listen. */ | 240 | /* Maximum queue length specifiable by listen. */ |
@@ -303,14 +305,15 @@ struct ucred { | |||
303 | #define SOL_BLUETOOTH 274 | 305 | #define SOL_BLUETOOTH 274 |
304 | #define SOL_PNPIPE 275 | 306 | #define SOL_PNPIPE 275 |
305 | #define SOL_RDS 276 | 307 | #define SOL_RDS 276 |
308 | #define SOL_IUCV 277 | ||
306 | 309 | ||
307 | /* IPX options */ | 310 | /* IPX options */ |
308 | #define IPX_TYPE 1 | 311 | #define IPX_TYPE 1 |
309 | 312 | ||
310 | #ifdef __KERNEL__ | 313 | #ifdef __KERNEL__ |
311 | extern int memcpy_fromiovec(unsigned char *kdata, struct iovec *iov, int len); | 314 | extern int memcpy_fromiovec(unsigned char *kdata, struct iovec *iov, int len); |
312 | extern int memcpy_fromiovecend(unsigned char *kdata, struct iovec *iov, | 315 | extern int memcpy_fromiovecend(unsigned char *kdata, const struct iovec *iov, |
313 | int offset, int len); | 316 | int offset, int len); |
314 | extern int csum_partial_copy_fromiovecend(unsigned char *kdata, | 317 | extern int csum_partial_copy_fromiovecend(unsigned char *kdata, |
315 | struct iovec *iov, | 318 | struct iovec *iov, |
316 | int offset, | 319 | int offset, |
@@ -318,6 +321,8 @@ extern int csum_partial_copy_fromiovecend(unsigned char *kdata, | |||
318 | 321 | ||
319 | extern int verify_iovec(struct msghdr *m, struct iovec *iov, struct sockaddr *address, int mode); | 322 | extern int verify_iovec(struct msghdr *m, struct iovec *iov, struct sockaddr *address, int mode); |
320 | extern int memcpy_toiovec(struct iovec *v, unsigned char *kdata, int len); | 323 | extern int memcpy_toiovec(struct iovec *v, unsigned char *kdata, int len); |
324 | extern int memcpy_toiovecend(const struct iovec *v, unsigned char *kdata, | ||
325 | int offset, int len); | ||
321 | extern int move_addr_to_user(struct sockaddr *kaddr, int klen, void __user *uaddr, int __user *ulen); | 326 | extern int move_addr_to_user(struct sockaddr *kaddr, int klen, void __user *uaddr, int __user *ulen); |
322 | extern int move_addr_to_kernel(void __user *uaddr, int ulen, struct sockaddr *kaddr); | 327 | extern int move_addr_to_kernel(void __user *uaddr, int ulen, struct sockaddr *kaddr); |
323 | extern int put_cmsg(struct msghdr*, int level, int type, int len, void *data); | 328 | extern int put_cmsg(struct msghdr*, int level, int type, int len, void *data); |
diff --git a/include/linux/spi/libertas_spi.h b/include/linux/spi/libertas_spi.h index 79506f5f9e67..1b5d5384fcd3 100644 --- a/include/linux/spi/libertas_spi.h +++ b/include/linux/spi/libertas_spi.h | |||
@@ -22,9 +22,6 @@ struct libertas_spi_platform_data { | |||
22 | * speed, you may want to use 0 here. */ | 22 | * speed, you may want to use 0 here. */ |
23 | u16 use_dummy_writes; | 23 | u16 use_dummy_writes; |
24 | 24 | ||
25 | /* GPIO number to use as chip select */ | ||
26 | u16 gpio_cs; | ||
27 | |||
28 | /* Board specific setup/teardown */ | 25 | /* Board specific setup/teardown */ |
29 | int (*setup)(struct spi_device *spi); | 26 | int (*setup)(struct spi_device *spi); |
30 | int (*teardown)(struct spi_device *spi); | 27 | int (*teardown)(struct spi_device *spi); |
diff --git a/include/linux/spi/wl12xx.h b/include/linux/spi/wl12xx.h new file mode 100644 index 000000000000..11430cab2aad --- /dev/null +++ b/include/linux/spi/wl12xx.h | |||
@@ -0,0 +1,31 @@ | |||
1 | /* | ||
2 | * This file is part of wl12xx | ||
3 | * | ||
4 | * Copyright (C) 2009 Nokia Corporation | ||
5 | * | ||
6 | * Contact: Kalle Valo <kalle.valo@nokia.com> | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or | ||
9 | * modify it under the terms of the GNU General Public License | ||
10 | * version 2 as published by the Free Software Foundation. | ||
11 | * | ||
12 | * This program is distributed in the hope that it will be useful, but | ||
13 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
15 | * General Public License for more details. | ||
16 | * | ||
17 | * You should have received a copy of the GNU General Public License | ||
18 | * along with this program; if not, write to the Free Software | ||
19 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA | ||
20 | * 02110-1301 USA | ||
21 | * | ||
22 | */ | ||
23 | |||
24 | #ifndef _LINUX_SPI_WL12XX_H | ||
25 | #define _LINUX_SPI_WL12XX_H | ||
26 | |||
27 | struct wl12xx_platform_data { | ||
28 | void (*set_power)(bool enable); | ||
29 | }; | ||
30 | |||
31 | #endif | ||
diff --git a/include/linux/tcp.h b/include/linux/tcp.h index 9d5078bd23a3..8afac76cd748 100644 --- a/include/linux/tcp.h +++ b/include/linux/tcp.h | |||
@@ -377,7 +377,7 @@ struct tcp_sock { | |||
377 | unsigned int keepalive_time; /* time before keep alive takes place */ | 377 | unsigned int keepalive_time; /* time before keep alive takes place */ |
378 | unsigned int keepalive_intvl; /* time interval between keep alive probes */ | 378 | unsigned int keepalive_intvl; /* time interval between keep alive probes */ |
379 | 379 | ||
380 | unsigned long last_synq_overflow; | 380 | int linger2; |
381 | 381 | ||
382 | /* Receiver side RTT estimation */ | 382 | /* Receiver side RTT estimation */ |
383 | struct { | 383 | struct { |
@@ -406,8 +406,6 @@ struct tcp_sock { | |||
406 | /* TCP MD5 Signagure Option information */ | 406 | /* TCP MD5 Signagure Option information */ |
407 | struct tcp_md5sig_info *md5sig_info; | 407 | struct tcp_md5sig_info *md5sig_info; |
408 | #endif | 408 | #endif |
409 | |||
410 | int linger2; | ||
411 | }; | 409 | }; |
412 | 410 | ||
413 | static inline struct tcp_sock *tcp_sk(const struct sock *sk) | 411 | static inline struct tcp_sock *tcp_sk(const struct sock *sk) |
diff --git a/include/linux/usb/usbnet.h b/include/linux/usb/usbnet.h index 36fabb95c7d3..5d44059f6d63 100644 --- a/include/linux/usb/usbnet.h +++ b/include/linux/usb/usbnet.h | |||
@@ -183,6 +183,7 @@ extern void usbnet_tx_timeout (struct net_device *net); | |||
183 | extern int usbnet_change_mtu (struct net_device *net, int new_mtu); | 183 | extern int usbnet_change_mtu (struct net_device *net, int new_mtu); |
184 | 184 | ||
185 | extern int usbnet_get_endpoints(struct usbnet *, struct usb_interface *); | 185 | extern int usbnet_get_endpoints(struct usbnet *, struct usb_interface *); |
186 | extern int usbnet_get_ethernet_addr(struct usbnet *, int); | ||
186 | extern void usbnet_defer_kevent (struct usbnet *, int); | 187 | extern void usbnet_defer_kevent (struct usbnet *, int); |
187 | extern void usbnet_skb_return (struct usbnet *, struct sk_buff *); | 188 | extern void usbnet_skb_return (struct usbnet *, struct sk_buff *); |
188 | extern void usbnet_unlink_rx_urbs(struct usbnet *); | 189 | extern void usbnet_unlink_rx_urbs(struct usbnet *); |
diff --git a/include/linux/wimax.h b/include/linux/wimax.h index c89de7f4e5b9..4fdcc5635518 100644 --- a/include/linux/wimax.h +++ b/include/linux/wimax.h | |||
@@ -59,7 +59,7 @@ enum { | |||
59 | * M - Major: change if removing or modifying an existing call. | 59 | * M - Major: change if removing or modifying an existing call. |
60 | * m - minor: change when adding a new call | 60 | * m - minor: change when adding a new call |
61 | */ | 61 | */ |
62 | WIMAX_GNL_VERSION = 00, | 62 | WIMAX_GNL_VERSION = 01, |
63 | /* Generic NetLink attributes */ | 63 | /* Generic NetLink attributes */ |
64 | WIMAX_GNL_ATTR_INVALID = 0x00, | 64 | WIMAX_GNL_ATTR_INVALID = 0x00, |
65 | WIMAX_GNL_ATTR_MAX = 10, | 65 | WIMAX_GNL_ATTR_MAX = 10, |
@@ -78,6 +78,7 @@ enum { | |||
78 | WIMAX_GNL_OP_RFKILL, /* Run wimax_rfkill() */ | 78 | WIMAX_GNL_OP_RFKILL, /* Run wimax_rfkill() */ |
79 | WIMAX_GNL_OP_RESET, /* Run wimax_rfkill() */ | 79 | WIMAX_GNL_OP_RESET, /* Run wimax_rfkill() */ |
80 | WIMAX_GNL_RE_STATE_CHANGE, /* Report: status change */ | 80 | WIMAX_GNL_RE_STATE_CHANGE, /* Report: status change */ |
81 | WIMAX_GNL_OP_STATE_GET, /* Request for current state */ | ||
81 | }; | 82 | }; |
82 | 83 | ||
83 | 84 | ||
@@ -113,6 +114,10 @@ enum { | |||
113 | WIMAX_GNL_RESET_IFIDX = 1, | 114 | WIMAX_GNL_RESET_IFIDX = 1, |
114 | }; | 115 | }; |
115 | 116 | ||
117 | /* Atributes for wimax_state_get() */ | ||
118 | enum { | ||
119 | WIMAX_GNL_STGET_IFIDX = 1, | ||
120 | }; | ||
116 | 121 | ||
117 | /* | 122 | /* |
118 | * Attributes for the Report State Change | 123 | * Attributes for the Report State Change |
diff --git a/include/linux/wimax/i2400m.h b/include/linux/wimax/i2400m.h index d5148a7889a6..433693ef2bb0 100644 --- a/include/linux/wimax/i2400m.h +++ b/include/linux/wimax/i2400m.h | |||
@@ -266,7 +266,7 @@ enum i2400m_ro_type { | |||
266 | 266 | ||
267 | /* Misc constants */ | 267 | /* Misc constants */ |
268 | enum { | 268 | enum { |
269 | I2400M_PL_PAD = 16, /* Payload data size alignment */ | 269 | I2400M_PL_ALIGN = 16, /* Payload data size alignment */ |
270 | I2400M_PL_SIZE_MAX = 0x3EFF, | 270 | I2400M_PL_SIZE_MAX = 0x3EFF, |
271 | I2400M_MAX_PLS_IN_MSG = 60, | 271 | I2400M_MAX_PLS_IN_MSG = 60, |
272 | /* protocol barkers: sync sequences; for notifications they | 272 | /* protocol barkers: sync sequences; for notifications they |