diff options
Diffstat (limited to 'include/linux')
31 files changed, 846 insertions, 287 deletions
diff --git a/include/linux/average.h b/include/linux/average.h new file mode 100644 index 000000000000..c6028fd742c1 --- /dev/null +++ b/include/linux/average.h | |||
| @@ -0,0 +1,30 @@ | |||
| 1 | #ifndef _LINUX_AVERAGE_H | ||
| 2 | #define _LINUX_AVERAGE_H | ||
| 3 | |||
| 4 | /* Exponentially weighted moving average (EWMA) */ | ||
| 5 | |||
| 6 | /* For more documentation see lib/average.c */ | ||
| 7 | |||
| 8 | struct ewma { | ||
| 9 | unsigned long internal; | ||
| 10 | unsigned long factor; | ||
| 11 | unsigned long weight; | ||
| 12 | }; | ||
| 13 | |||
| 14 | extern void ewma_init(struct ewma *avg, unsigned long factor, | ||
| 15 | unsigned long weight); | ||
| 16 | |||
| 17 | extern struct ewma *ewma_add(struct ewma *avg, unsigned long val); | ||
| 18 | |||
| 19 | /** | ||
| 20 | * ewma_read() - Get average value | ||
| 21 | * @avg: Average structure | ||
| 22 | * | ||
| 23 | * Returns the average value held in @avg. | ||
| 24 | */ | ||
| 25 | static inline unsigned long ewma_read(const struct ewma *avg) | ||
| 26 | { | ||
| 27 | return avg->internal >> avg->factor; | ||
| 28 | } | ||
| 29 | |||
| 30 | #endif /* _LINUX_AVERAGE_H */ | ||
diff --git a/include/linux/bitops.h b/include/linux/bitops.h index 827cc95711ef..2184c6b97aeb 100644 --- a/include/linux/bitops.h +++ b/include/linux/bitops.h | |||
| @@ -109,6 +109,17 @@ static inline __u8 ror8(__u8 word, unsigned int shift) | |||
| 109 | return (word >> shift) | (word << (8 - shift)); | 109 | return (word >> shift) | (word << (8 - shift)); |
| 110 | } | 110 | } |
| 111 | 111 | ||
| 112 | /** | ||
| 113 | * sign_extend32 - sign extend a 32-bit value using specified bit as sign-bit | ||
| 114 | * @value: value to sign extend | ||
| 115 | * @index: 0 based bit index (0<=index<32) to sign bit | ||
| 116 | */ | ||
| 117 | static inline __s32 sign_extend32(__u32 value, int index) | ||
| 118 | { | ||
| 119 | __u8 shift = 31 - index; | ||
| 120 | return (__s32)(value << shift) >> shift; | ||
| 121 | } | ||
| 122 | |||
| 112 | static inline unsigned fls_long(unsigned long l) | 123 | static inline unsigned fls_long(unsigned long l) |
| 113 | { | 124 | { |
| 114 | if (sizeof(l) == 4) | 125 | if (sizeof(l) == 4) |
diff --git a/include/linux/dcbnl.h b/include/linux/dcbnl.h index 8723491f7dfd..68cd248f6d3e 100644 --- a/include/linux/dcbnl.h +++ b/include/linux/dcbnl.h | |||
| @@ -22,6 +22,89 @@ | |||
| 22 | 22 | ||
| 23 | #include <linux/types.h> | 23 | #include <linux/types.h> |
| 24 | 24 | ||
| 25 | /* IEEE 802.1Qaz std supported values */ | ||
| 26 | #define IEEE_8021QAZ_MAX_TCS 8 | ||
| 27 | |||
| 28 | /* This structure contains the IEEE 802.1Qaz ETS managed object | ||
| 29 | * | ||
| 30 | * @willing: willing bit in ETS configuratin TLV | ||
| 31 | * @ets_cap: indicates supported capacity of ets feature | ||
| 32 | * @cbs: credit based shaper ets algorithm supported | ||
| 33 | * @tc_tx_bw: tc tx bandwidth indexed by traffic class | ||
| 34 | * @tc_rx_bw: tc rx bandwidth indexed by traffic class | ||
| 35 | * @tc_tsa: TSA Assignment table, indexed by traffic class | ||
| 36 | * @prio_tc: priority assignment table mapping 8021Qp to traffic class | ||
| 37 | * @tc_reco_bw: recommended tc bandwidth indexed by traffic class for TLV | ||
| 38 | * @tc_reco_tsa: recommended tc bandwidth indexed by traffic class for TLV | ||
| 39 | * @reco_prio_tc: recommended tc tx bandwidth indexed by traffic class for TLV | ||
| 40 | * | ||
| 41 | * Recommended values are used to set fields in the ETS recommendation TLV | ||
| 42 | * with hardware offloaded LLDP. | ||
| 43 | * | ||
| 44 | * ---- | ||
| 45 | * TSA Assignment 8 bit identifiers | ||
| 46 | * 0 strict priority | ||
| 47 | * 1 credit-based shaper | ||
| 48 | * 2 enhanced transmission selection | ||
| 49 | * 3-254 reserved | ||
| 50 | * 255 vendor specific | ||
| 51 | */ | ||
| 52 | struct ieee_ets { | ||
| 53 | __u8 willing; | ||
| 54 | __u8 ets_cap; | ||
| 55 | __u8 cbs; | ||
| 56 | __u8 tc_tx_bw[IEEE_8021QAZ_MAX_TCS]; | ||
| 57 | __u8 tc_rx_bw[IEEE_8021QAZ_MAX_TCS]; | ||
| 58 | __u8 tc_tsa[IEEE_8021QAZ_MAX_TCS]; | ||
| 59 | __u8 prio_tc[IEEE_8021QAZ_MAX_TCS]; | ||
| 60 | __u8 tc_reco_bw[IEEE_8021QAZ_MAX_TCS]; | ||
| 61 | __u8 tc_reco_tsa[IEEE_8021QAZ_MAX_TCS]; | ||
| 62 | __u8 reco_prio_tc[IEEE_8021QAZ_MAX_TCS]; | ||
| 63 | }; | ||
| 64 | |||
| 65 | /* This structure contains the IEEE 802.1Qaz PFC managed object | ||
| 66 | * | ||
| 67 | * @pfc_cap: Indicates the number of traffic classes on the local device | ||
| 68 | * that may simultaneously have PFC enabled. | ||
| 69 | * @pfc_en: bitmap indicating pfc enabled traffic classes | ||
| 70 | * @mbc: enable macsec bypass capability | ||
| 71 | * @delay: the allowance made for a round-trip propagation delay of the | ||
| 72 | * link in bits. | ||
| 73 | * @requests: count of the sent pfc frames | ||
| 74 | * @indications: count of the received pfc frames | ||
| 75 | */ | ||
| 76 | struct ieee_pfc { | ||
| 77 | __u8 pfc_cap; | ||
| 78 | __u8 pfc_en; | ||
| 79 | __u8 mbc; | ||
| 80 | __u16 delay; | ||
| 81 | __u64 requests[IEEE_8021QAZ_MAX_TCS]; | ||
| 82 | __u64 indications[IEEE_8021QAZ_MAX_TCS]; | ||
| 83 | }; | ||
| 84 | |||
| 85 | /* This structure contains the IEEE 802.1Qaz APP managed object. This | ||
| 86 | * object is also used for the CEE std as well. There is no difference | ||
| 87 | * between the objects. | ||
| 88 | * | ||
| 89 | * @selector: protocol identifier type | ||
| 90 | * @protocol: protocol of type indicated | ||
| 91 | * @priority: 3-bit unsigned integer indicating priority | ||
| 92 | * | ||
| 93 | * ---- | ||
| 94 | * Selector field values | ||
| 95 | * 0 Reserved | ||
| 96 | * 1 Ethertype | ||
| 97 | * 2 Well known port number over TCP or SCTP | ||
| 98 | * 3 Well known port number over UDP or DCCP | ||
| 99 | * 4 Well known port number over TCP, SCTP, UDP, or DCCP | ||
| 100 | * 5-7 Reserved | ||
| 101 | */ | ||
| 102 | struct dcb_app { | ||
| 103 | __u8 selector; | ||
| 104 | __u32 protocol; | ||
| 105 | __u8 priority; | ||
| 106 | }; | ||
| 107 | |||
| 25 | struct dcbmsg { | 108 | struct dcbmsg { |
| 26 | __u8 dcb_family; | 109 | __u8 dcb_family; |
| 27 | __u8 cmd; | 110 | __u8 cmd; |
| @@ -50,6 +133,12 @@ struct dcbmsg { | |||
| 50 | * @DCB_CMD_SBCN: get backward congestion notification configration. | 133 | * @DCB_CMD_SBCN: get backward congestion notification configration. |
| 51 | * @DCB_CMD_GAPP: get application protocol configuration | 134 | * @DCB_CMD_GAPP: get application protocol configuration |
| 52 | * @DCB_CMD_SAPP: set application protocol configuration | 135 | * @DCB_CMD_SAPP: set application protocol configuration |
| 136 | * @DCB_CMD_IEEE_SET: set IEEE 802.1Qaz configuration | ||
| 137 | * @DCB_CMD_IEEE_GET: get IEEE 802.1Qaz configuration | ||
| 138 | * @DCB_CMD_GDCBX: get DCBX engine configuration | ||
| 139 | * @DCB_CMD_SDCBX: set DCBX engine configuration | ||
| 140 | * @DCB_CMD_GFEATCFG: get DCBX features flags | ||
| 141 | * @DCB_CMD_SFEATCFG: set DCBX features negotiation flags | ||
| 53 | */ | 142 | */ |
| 54 | enum dcbnl_commands { | 143 | enum dcbnl_commands { |
| 55 | DCB_CMD_UNDEFINED, | 144 | DCB_CMD_UNDEFINED, |
| @@ -83,6 +172,15 @@ enum dcbnl_commands { | |||
| 83 | DCB_CMD_GAPP, | 172 | DCB_CMD_GAPP, |
| 84 | DCB_CMD_SAPP, | 173 | DCB_CMD_SAPP, |
| 85 | 174 | ||
| 175 | DCB_CMD_IEEE_SET, | ||
| 176 | DCB_CMD_IEEE_GET, | ||
| 177 | |||
| 178 | DCB_CMD_GDCBX, | ||
| 179 | DCB_CMD_SDCBX, | ||
| 180 | |||
| 181 | DCB_CMD_GFEATCFG, | ||
| 182 | DCB_CMD_SFEATCFG, | ||
| 183 | |||
| 86 | __DCB_CMD_ENUM_MAX, | 184 | __DCB_CMD_ENUM_MAX, |
| 87 | DCB_CMD_MAX = __DCB_CMD_ENUM_MAX - 1, | 185 | DCB_CMD_MAX = __DCB_CMD_ENUM_MAX - 1, |
| 88 | }; | 186 | }; |
| @@ -102,6 +200,9 @@ enum dcbnl_commands { | |||
| 102 | * @DCB_ATTR_CAP: DCB capabilities of the device (NLA_NESTED) | 200 | * @DCB_ATTR_CAP: DCB capabilities of the device (NLA_NESTED) |
| 103 | * @DCB_ATTR_NUMTCS: number of traffic classes supported (NLA_NESTED) | 201 | * @DCB_ATTR_NUMTCS: number of traffic classes supported (NLA_NESTED) |
| 104 | * @DCB_ATTR_BCN: backward congestion notification configuration (NLA_NESTED) | 202 | * @DCB_ATTR_BCN: backward congestion notification configuration (NLA_NESTED) |
| 203 | * @DCB_ATTR_IEEE: IEEE 802.1Qaz supported attributes (NLA_NESTED) | ||
| 204 | * @DCB_ATTR_DCBX: DCBX engine configuration in the device (NLA_U8) | ||
| 205 | * @DCB_ATTR_FEATCFG: DCBX features flags (NLA_NESTED) | ||
| 105 | */ | 206 | */ |
| 106 | enum dcbnl_attrs { | 207 | enum dcbnl_attrs { |
| 107 | DCB_ATTR_UNDEFINED, | 208 | DCB_ATTR_UNDEFINED, |
| @@ -119,10 +220,32 @@ enum dcbnl_attrs { | |||
| 119 | DCB_ATTR_BCN, | 220 | DCB_ATTR_BCN, |
| 120 | DCB_ATTR_APP, | 221 | DCB_ATTR_APP, |
| 121 | 222 | ||
| 223 | /* IEEE std attributes */ | ||
| 224 | DCB_ATTR_IEEE, | ||
| 225 | |||
| 226 | DCB_ATTR_DCBX, | ||
| 227 | DCB_ATTR_FEATCFG, | ||
| 228 | |||
| 122 | __DCB_ATTR_ENUM_MAX, | 229 | __DCB_ATTR_ENUM_MAX, |
| 123 | DCB_ATTR_MAX = __DCB_ATTR_ENUM_MAX - 1, | 230 | DCB_ATTR_MAX = __DCB_ATTR_ENUM_MAX - 1, |
| 124 | }; | 231 | }; |
| 125 | 232 | ||
| 233 | enum ieee_attrs { | ||
| 234 | DCB_ATTR_IEEE_UNSPEC, | ||
| 235 | DCB_ATTR_IEEE_ETS, | ||
| 236 | DCB_ATTR_IEEE_PFC, | ||
| 237 | DCB_ATTR_IEEE_APP_TABLE, | ||
| 238 | __DCB_ATTR_IEEE_MAX | ||
| 239 | }; | ||
| 240 | #define DCB_ATTR_IEEE_MAX (__DCB_ATTR_IEEE_MAX - 1) | ||
| 241 | |||
| 242 | enum ieee_attrs_app { | ||
| 243 | DCB_ATTR_IEEE_APP_UNSPEC, | ||
| 244 | DCB_ATTR_IEEE_APP, | ||
| 245 | __DCB_ATTR_IEEE_APP_MAX | ||
| 246 | }; | ||
| 247 | #define DCB_ATTR_IEEE_APP_MAX (__DCB_ATTR_IEEE_APP_MAX - 1) | ||
| 248 | |||
| 126 | /** | 249 | /** |
| 127 | * enum dcbnl_pfc_attrs - DCB Priority Flow Control user priority nested attrs | 250 | * enum dcbnl_pfc_attrs - DCB Priority Flow Control user priority nested attrs |
| 128 | * | 251 | * |
| @@ -262,6 +385,8 @@ enum dcbnl_tc_attrs { | |||
| 262 | * @DCB_CAP_ATTR_GSP: (NLA_U8) device supports group strict priority | 385 | * @DCB_CAP_ATTR_GSP: (NLA_U8) device supports group strict priority |
| 263 | * @DCB_CAP_ATTR_BCN: (NLA_U8) device supports Backwards Congestion | 386 | * @DCB_CAP_ATTR_BCN: (NLA_U8) device supports Backwards Congestion |
| 264 | * Notification | 387 | * Notification |
| 388 | * @DCB_CAP_ATTR_DCBX: (NLA_U8) device supports DCBX engine | ||
| 389 | * | ||
| 265 | */ | 390 | */ |
| 266 | enum dcbnl_cap_attrs { | 391 | enum dcbnl_cap_attrs { |
| 267 | DCB_CAP_ATTR_UNDEFINED, | 392 | DCB_CAP_ATTR_UNDEFINED, |
| @@ -273,12 +398,45 @@ enum dcbnl_cap_attrs { | |||
| 273 | DCB_CAP_ATTR_PFC_TCS, | 398 | DCB_CAP_ATTR_PFC_TCS, |
| 274 | DCB_CAP_ATTR_GSP, | 399 | DCB_CAP_ATTR_GSP, |
| 275 | DCB_CAP_ATTR_BCN, | 400 | DCB_CAP_ATTR_BCN, |
| 401 | DCB_CAP_ATTR_DCBX, | ||
| 276 | 402 | ||
| 277 | __DCB_CAP_ATTR_ENUM_MAX, | 403 | __DCB_CAP_ATTR_ENUM_MAX, |
| 278 | DCB_CAP_ATTR_MAX = __DCB_CAP_ATTR_ENUM_MAX - 1, | 404 | DCB_CAP_ATTR_MAX = __DCB_CAP_ATTR_ENUM_MAX - 1, |
| 279 | }; | 405 | }; |
| 280 | 406 | ||
| 281 | /** | 407 | /** |
| 408 | * DCBX capability flags | ||
| 409 | * | ||
| 410 | * @DCB_CAP_DCBX_HOST: DCBX negotiation is performed by the host LLDP agent. | ||
| 411 | * 'set' routines are used to configure the device with | ||
| 412 | * the negotiated parameters | ||
| 413 | * | ||
| 414 | * @DCB_CAP_DCBX_LLD_MANAGED: DCBX negotiation is not performed in the host but | ||
| 415 | * by another entity | ||
| 416 | * 'get' routines are used to retrieve the | ||
| 417 | * negotiated parameters | ||
| 418 | * 'set' routines can be used to set the initial | ||
| 419 | * negotiation configuration | ||
| 420 | * | ||
| 421 | * @DCB_CAP_DCBX_VER_CEE: for a non-host DCBX engine, indicates the engine | ||
| 422 | * supports the CEE protocol flavor | ||
| 423 | * | ||
| 424 | * @DCB_CAP_DCBX_VER_IEEE: for a non-host DCBX engine, indicates the engine | ||
| 425 | * supports the IEEE protocol flavor | ||
| 426 | * | ||
| 427 | * @DCB_CAP_DCBX_STATIC: for a non-host DCBX engine, indicates the engine | ||
| 428 | * supports static configuration (i.e no actual | ||
| 429 | * negotiation is performed negotiated parameters equal | ||
| 430 | * the initial configuration) | ||
| 431 | * | ||
| 432 | */ | ||
| 433 | #define DCB_CAP_DCBX_HOST 0x01 | ||
| 434 | #define DCB_CAP_DCBX_LLD_MANAGED 0x02 | ||
| 435 | #define DCB_CAP_DCBX_VER_CEE 0x04 | ||
| 436 | #define DCB_CAP_DCBX_VER_IEEE 0x08 | ||
| 437 | #define DCB_CAP_DCBX_STATIC 0x10 | ||
| 438 | |||
| 439 | /** | ||
| 282 | * enum dcbnl_numtcs_attrs - number of traffic classes | 440 | * enum dcbnl_numtcs_attrs - number of traffic classes |
| 283 | * | 441 | * |
| 284 | * @DCB_NUMTCS_ATTR_UNDEFINED: unspecified attribute to catch errors | 442 | * @DCB_NUMTCS_ATTR_UNDEFINED: unspecified attribute to catch errors |
| @@ -355,4 +513,30 @@ enum dcbnl_app_attrs { | |||
| 355 | DCB_APP_ATTR_MAX = __DCB_APP_ATTR_ENUM_MAX - 1, | 513 | DCB_APP_ATTR_MAX = __DCB_APP_ATTR_ENUM_MAX - 1, |
| 356 | }; | 514 | }; |
| 357 | 515 | ||
| 516 | /** | ||
| 517 | * enum dcbnl_featcfg_attrs - features conifiguration flags | ||
| 518 | * | ||
| 519 | * @DCB_FEATCFG_ATTR_UNDEFINED: unspecified attribute to catch errors | ||
| 520 | * @DCB_FEATCFG_ATTR_ALL: (NLA_FLAG) all features configuration attributes | ||
| 521 | * @DCB_FEATCFG_ATTR_PG: (NLA_U8) configuration flags for priority groups | ||
| 522 | * @DCB_FEATCFG_ATTR_PFC: (NLA_U8) configuration flags for priority | ||
| 523 | * flow control | ||
| 524 | * @DCB_FEATCFG_ATTR_APP: (NLA_U8) configuration flags for application TLV | ||
| 525 | * | ||
| 526 | */ | ||
| 527 | #define DCB_FEATCFG_ERROR 0x01 /* error in feature resolution */ | ||
| 528 | #define DCB_FEATCFG_ENABLE 0x02 /* enable feature */ | ||
| 529 | #define DCB_FEATCFG_WILLING 0x04 /* feature is willing */ | ||
| 530 | #define DCB_FEATCFG_ADVERTISE 0x08 /* advertise feature */ | ||
| 531 | enum dcbnl_featcfg_attrs { | ||
| 532 | DCB_FEATCFG_ATTR_UNDEFINED, | ||
| 533 | DCB_FEATCFG_ATTR_ALL, | ||
| 534 | DCB_FEATCFG_ATTR_PG, | ||
| 535 | DCB_FEATCFG_ATTR_PFC, | ||
| 536 | DCB_FEATCFG_ATTR_APP, | ||
| 537 | |||
| 538 | __DCB_FEATCFG_ATTR_ENUM_MAX, | ||
| 539 | DCB_FEATCFG_ATTR_MAX = __DCB_FEATCFG_ATTR_ENUM_MAX - 1, | ||
| 540 | }; | ||
| 541 | |||
| 358 | #endif /* __LINUX_DCBNL_H__ */ | 542 | #endif /* __LINUX_DCBNL_H__ */ |
diff --git a/include/linux/dccp.h b/include/linux/dccp.h index 749f01ccd26e..010e2d87ed75 100644 --- a/include/linux/dccp.h +++ b/include/linux/dccp.h | |||
| @@ -197,6 +197,21 @@ enum dccp_feature_numbers { | |||
| 197 | DCCPF_MAX_CCID_SPECIFIC = 255, | 197 | DCCPF_MAX_CCID_SPECIFIC = 255, |
| 198 | }; | 198 | }; |
| 199 | 199 | ||
| 200 | /* DCCP socket control message types for cmsg */ | ||
| 201 | enum dccp_cmsg_type { | ||
| 202 | DCCP_SCM_PRIORITY = 1, | ||
| 203 | DCCP_SCM_QPOLICY_MAX = 0xFFFF, | ||
| 204 | /* ^-- Up to here reserved exclusively for qpolicy parameters */ | ||
| 205 | DCCP_SCM_MAX | ||
| 206 | }; | ||
| 207 | |||
| 208 | /* DCCP priorities for outgoing/queued packets */ | ||
| 209 | enum dccp_packet_dequeueing_policy { | ||
| 210 | DCCPQ_POLICY_SIMPLE, | ||
| 211 | DCCPQ_POLICY_PRIO, | ||
| 212 | DCCPQ_POLICY_MAX | ||
| 213 | }; | ||
| 214 | |||
| 200 | /* DCCP socket options */ | 215 | /* DCCP socket options */ |
| 201 | #define DCCP_SOCKOPT_PACKET_SIZE 1 /* XXX deprecated, without effect */ | 216 | #define DCCP_SOCKOPT_PACKET_SIZE 1 /* XXX deprecated, without effect */ |
| 202 | #define DCCP_SOCKOPT_SERVICE 2 | 217 | #define DCCP_SOCKOPT_SERVICE 2 |
| @@ -210,6 +225,8 @@ enum dccp_feature_numbers { | |||
| 210 | #define DCCP_SOCKOPT_CCID 13 | 225 | #define DCCP_SOCKOPT_CCID 13 |
| 211 | #define DCCP_SOCKOPT_TX_CCID 14 | 226 | #define DCCP_SOCKOPT_TX_CCID 14 |
| 212 | #define DCCP_SOCKOPT_RX_CCID 15 | 227 | #define DCCP_SOCKOPT_RX_CCID 15 |
| 228 | #define DCCP_SOCKOPT_QPOLICY_ID 16 | ||
| 229 | #define DCCP_SOCKOPT_QPOLICY_TXQLEN 17 | ||
| 213 | #define DCCP_SOCKOPT_CCID_RX_INFO 128 | 230 | #define DCCP_SOCKOPT_CCID_RX_INFO 128 |
| 214 | #define DCCP_SOCKOPT_CCID_TX_INFO 192 | 231 | #define DCCP_SOCKOPT_CCID_TX_INFO 192 |
| 215 | 232 | ||
| @@ -458,10 +475,13 @@ struct dccp_ackvec; | |||
| 458 | * @dccps_hc_rx_ccid - CCID used for the receiver (or receiving half-connection) | 475 | * @dccps_hc_rx_ccid - CCID used for the receiver (or receiving half-connection) |
| 459 | * @dccps_hc_tx_ccid - CCID used for the sender (or sending half-connection) | 476 | * @dccps_hc_tx_ccid - CCID used for the sender (or sending half-connection) |
| 460 | * @dccps_options_received - parsed set of retrieved options | 477 | * @dccps_options_received - parsed set of retrieved options |
| 478 | * @dccps_qpolicy - TX dequeueing policy, one of %dccp_packet_dequeueing_policy | ||
| 479 | * @dccps_tx_qlen - maximum length of the TX queue | ||
| 461 | * @dccps_role - role of this sock, one of %dccp_role | 480 | * @dccps_role - role of this sock, one of %dccp_role |
| 462 | * @dccps_hc_rx_insert_options - receiver wants to add options when acking | 481 | * @dccps_hc_rx_insert_options - receiver wants to add options when acking |
| 463 | * @dccps_hc_tx_insert_options - sender wants to add options when sending | 482 | * @dccps_hc_tx_insert_options - sender wants to add options when sending |
| 464 | * @dccps_server_timewait - server holds timewait state on close (RFC 4340, 8.3) | 483 | * @dccps_server_timewait - server holds timewait state on close (RFC 4340, 8.3) |
| 484 | * @dccps_sync_scheduled - flag which signals "send out-of-band message soon" | ||
| 465 | * @dccps_xmitlet - tasklet scheduled by the TX CCID to dequeue data packets | 485 | * @dccps_xmitlet - tasklet scheduled by the TX CCID to dequeue data packets |
| 466 | * @dccps_xmit_timer - used by the TX CCID to delay sending (rate-based pacing) | 486 | * @dccps_xmit_timer - used by the TX CCID to delay sending (rate-based pacing) |
| 467 | * @dccps_syn_rtt - RTT sample from Request/Response exchange (in usecs) | 487 | * @dccps_syn_rtt - RTT sample from Request/Response exchange (in usecs) |
| @@ -499,10 +519,13 @@ struct dccp_sock { | |||
| 499 | struct ccid *dccps_hc_rx_ccid; | 519 | struct ccid *dccps_hc_rx_ccid; |
| 500 | struct ccid *dccps_hc_tx_ccid; | 520 | struct ccid *dccps_hc_tx_ccid; |
| 501 | struct dccp_options_received dccps_options_received; | 521 | struct dccp_options_received dccps_options_received; |
| 522 | __u8 dccps_qpolicy; | ||
| 523 | __u32 dccps_tx_qlen; | ||
| 502 | enum dccp_role dccps_role:2; | 524 | enum dccp_role dccps_role:2; |
| 503 | __u8 dccps_hc_rx_insert_options:1; | 525 | __u8 dccps_hc_rx_insert_options:1; |
| 504 | __u8 dccps_hc_tx_insert_options:1; | 526 | __u8 dccps_hc_tx_insert_options:1; |
| 505 | __u8 dccps_server_timewait:1; | 527 | __u8 dccps_server_timewait:1; |
| 528 | __u8 dccps_sync_scheduled:1; | ||
| 506 | struct tasklet_struct dccps_xmitlet; | 529 | struct tasklet_struct dccps_xmitlet; |
| 507 | struct timer_list dccps_xmit_timer; | 530 | struct timer_list dccps_xmit_timer; |
| 508 | }; | 531 | }; |
diff --git a/include/linux/ethtool.h b/include/linux/ethtool.h index 6628a507fd3b..1908929204a9 100644 --- a/include/linux/ethtool.h +++ b/include/linux/ethtool.h | |||
| @@ -691,7 +691,9 @@ struct ethtool_ops { | |||
| 691 | #define ETHTOOL_GMSGLVL 0x00000007 /* Get driver message level */ | 691 | #define ETHTOOL_GMSGLVL 0x00000007 /* Get driver message level */ |
| 692 | #define ETHTOOL_SMSGLVL 0x00000008 /* Set driver msg level. */ | 692 | #define ETHTOOL_SMSGLVL 0x00000008 /* Set driver msg level. */ |
| 693 | #define ETHTOOL_NWAY_RST 0x00000009 /* Restart autonegotiation. */ | 693 | #define ETHTOOL_NWAY_RST 0x00000009 /* Restart autonegotiation. */ |
| 694 | #define ETHTOOL_GLINK 0x0000000a /* Get link status (ethtool_value) */ | 694 | /* Get link status for host, i.e. whether the interface *and* the |
| 695 | * physical port (if there is one) are up (ethtool_value). */ | ||
| 696 | #define ETHTOOL_GLINK 0x0000000a | ||
| 695 | #define ETHTOOL_GEEPROM 0x0000000b /* Get EEPROM data */ | 697 | #define ETHTOOL_GEEPROM 0x0000000b /* Get EEPROM data */ |
| 696 | #define ETHTOOL_SEEPROM 0x0000000c /* Set EEPROM data. */ | 698 | #define ETHTOOL_SEEPROM 0x0000000c /* Set EEPROM data. */ |
| 697 | #define ETHTOOL_GCOALESCE 0x0000000e /* Get coalesce config */ | 699 | #define ETHTOOL_GCOALESCE 0x0000000e /* Get coalesce config */ |
diff --git a/include/linux/filter.h b/include/linux/filter.h index 69b43dbea6c6..45266b75409a 100644 --- a/include/linux/filter.h +++ b/include/linux/filter.h | |||
| @@ -91,54 +91,6 @@ struct sock_fprog { /* Required for SO_ATTACH_FILTER. */ | |||
| 91 | #define BPF_TAX 0x00 | 91 | #define BPF_TAX 0x00 |
| 92 | #define BPF_TXA 0x80 | 92 | #define BPF_TXA 0x80 |
| 93 | 93 | ||
| 94 | enum { | ||
| 95 | BPF_S_RET_K = 0, | ||
| 96 | BPF_S_RET_A, | ||
| 97 | BPF_S_ALU_ADD_K, | ||
| 98 | BPF_S_ALU_ADD_X, | ||
| 99 | BPF_S_ALU_SUB_K, | ||
| 100 | BPF_S_ALU_SUB_X, | ||
| 101 | BPF_S_ALU_MUL_K, | ||
| 102 | BPF_S_ALU_MUL_X, | ||
| 103 | BPF_S_ALU_DIV_X, | ||
| 104 | BPF_S_ALU_AND_K, | ||
| 105 | BPF_S_ALU_AND_X, | ||
| 106 | BPF_S_ALU_OR_K, | ||
| 107 | BPF_S_ALU_OR_X, | ||
| 108 | BPF_S_ALU_LSH_K, | ||
| 109 | BPF_S_ALU_LSH_X, | ||
| 110 | BPF_S_ALU_RSH_K, | ||
| 111 | BPF_S_ALU_RSH_X, | ||
| 112 | BPF_S_ALU_NEG, | ||
| 113 | BPF_S_LD_W_ABS, | ||
| 114 | BPF_S_LD_H_ABS, | ||
| 115 | BPF_S_LD_B_ABS, | ||
| 116 | BPF_S_LD_W_LEN, | ||
| 117 | BPF_S_LD_W_IND, | ||
| 118 | BPF_S_LD_H_IND, | ||
| 119 | BPF_S_LD_B_IND, | ||
| 120 | BPF_S_LD_IMM, | ||
| 121 | BPF_S_LDX_W_LEN, | ||
| 122 | BPF_S_LDX_B_MSH, | ||
| 123 | BPF_S_LDX_IMM, | ||
| 124 | BPF_S_MISC_TAX, | ||
| 125 | BPF_S_MISC_TXA, | ||
| 126 | BPF_S_ALU_DIV_K, | ||
| 127 | BPF_S_LD_MEM, | ||
| 128 | BPF_S_LDX_MEM, | ||
| 129 | BPF_S_ST, | ||
| 130 | BPF_S_STX, | ||
| 131 | BPF_S_JMP_JA, | ||
| 132 | BPF_S_JMP_JEQ_K, | ||
| 133 | BPF_S_JMP_JEQ_X, | ||
| 134 | BPF_S_JMP_JGE_K, | ||
| 135 | BPF_S_JMP_JGE_X, | ||
| 136 | BPF_S_JMP_JGT_K, | ||
| 137 | BPF_S_JMP_JGT_X, | ||
| 138 | BPF_S_JMP_JSET_K, | ||
| 139 | BPF_S_JMP_JSET_X, | ||
| 140 | }; | ||
| 141 | |||
| 142 | #ifndef BPF_MAXINSNS | 94 | #ifndef BPF_MAXINSNS |
| 143 | #define BPF_MAXINSNS 4096 | 95 | #define BPF_MAXINSNS 4096 |
| 144 | #endif | 96 | #endif |
| @@ -172,7 +124,9 @@ enum { | |||
| 172 | #define SKF_AD_MARK 20 | 124 | #define SKF_AD_MARK 20 |
| 173 | #define SKF_AD_QUEUE 24 | 125 | #define SKF_AD_QUEUE 24 |
| 174 | #define SKF_AD_HATYPE 28 | 126 | #define SKF_AD_HATYPE 28 |
| 175 | #define SKF_AD_MAX 32 | 127 | #define SKF_AD_RXHASH 32 |
| 128 | #define SKF_AD_CPU 36 | ||
| 129 | #define SKF_AD_MAX 40 | ||
| 176 | #define SKF_NET_OFF (-0x100000) | 130 | #define SKF_NET_OFF (-0x100000) |
| 177 | #define SKF_LL_OFF (-0x200000) | 131 | #define SKF_LL_OFF (-0x200000) |
| 178 | 132 | ||
| @@ -194,8 +148,8 @@ struct sk_buff; | |||
| 194 | struct sock; | 148 | struct sock; |
| 195 | 149 | ||
| 196 | extern int sk_filter(struct sock *sk, struct sk_buff *skb); | 150 | extern int sk_filter(struct sock *sk, struct sk_buff *skb); |
| 197 | extern unsigned int sk_run_filter(struct sk_buff *skb, | 151 | extern unsigned int sk_run_filter(const struct sk_buff *skb, |
| 198 | struct sock_filter *filter, int flen); | 152 | const struct sock_filter *filter); |
| 199 | extern int sk_attach_filter(struct sock_fprog *fprog, struct sock *sk); | 153 | extern int sk_attach_filter(struct sock_fprog *fprog, struct sock *sk); |
| 200 | extern int sk_detach_filter(struct sock *sk); | 154 | extern int sk_detach_filter(struct sock *sk); |
| 201 | extern int sk_chk_filter(struct sock_filter *filter, int flen); | 155 | extern int sk_chk_filter(struct sock_filter *filter, int flen); |
diff --git a/include/linux/ieee80211.h b/include/linux/ieee80211.h index ed5a03cbe184..6042228954a7 100644 --- a/include/linux/ieee80211.h +++ b/include/linux/ieee80211.h | |||
| @@ -122,6 +122,7 @@ | |||
| 122 | 122 | ||
| 123 | /* U-APSD queue for WMM IEs sent by AP */ | 123 | /* U-APSD queue for WMM IEs sent by AP */ |
| 124 | #define IEEE80211_WMM_IE_AP_QOSINFO_UAPSD (1<<7) | 124 | #define IEEE80211_WMM_IE_AP_QOSINFO_UAPSD (1<<7) |
| 125 | #define IEEE80211_WMM_IE_AP_QOSINFO_PARAM_SET_CNT_MASK 0x0f | ||
| 125 | 126 | ||
| 126 | /* U-APSD queues for WMM IEs sent by STA */ | 127 | /* U-APSD queues for WMM IEs sent by STA */ |
| 127 | #define IEEE80211_WMM_IE_STA_QOSINFO_AC_VO (1<<0) | 128 | #define IEEE80211_WMM_IE_STA_QOSINFO_AC_VO (1<<0) |
| @@ -535,7 +536,6 @@ struct ieee80211s_hdr { | |||
| 535 | __le32 seqnum; | 536 | __le32 seqnum; |
| 536 | u8 eaddr1[6]; | 537 | u8 eaddr1[6]; |
| 537 | u8 eaddr2[6]; | 538 | u8 eaddr2[6]; |
| 538 | u8 eaddr3[6]; | ||
| 539 | } __attribute__ ((packed)); | 539 | } __attribute__ ((packed)); |
| 540 | 540 | ||
| 541 | /* Mesh flags */ | 541 | /* Mesh flags */ |
| @@ -1223,6 +1223,9 @@ enum ieee80211_eid { | |||
| 1223 | WLAN_EID_BSS_AC_ACCESS_DELAY = 68, | 1223 | WLAN_EID_BSS_AC_ACCESS_DELAY = 68, |
| 1224 | WLAN_EID_RRM_ENABLED_CAPABILITIES = 70, | 1224 | WLAN_EID_RRM_ENABLED_CAPABILITIES = 70, |
| 1225 | WLAN_EID_MULTIPLE_BSSID = 71, | 1225 | WLAN_EID_MULTIPLE_BSSID = 71, |
| 1226 | WLAN_EID_BSS_COEX_2040 = 72, | ||
| 1227 | WLAN_EID_OVERLAP_BSS_SCAN_PARAM = 74, | ||
| 1228 | WLAN_EID_EXT_CAPABILITY = 127, | ||
| 1226 | 1229 | ||
| 1227 | WLAN_EID_MOBILITY_DOMAIN = 54, | 1230 | WLAN_EID_MOBILITY_DOMAIN = 54, |
| 1228 | WLAN_EID_FAST_BSS_TRANSITION = 55, | 1231 | WLAN_EID_FAST_BSS_TRANSITION = 55, |
| @@ -1287,6 +1290,31 @@ enum ieee80211_key_len { | |||
| 1287 | WLAN_KEY_LEN_AES_CMAC = 16, | 1290 | WLAN_KEY_LEN_AES_CMAC = 16, |
| 1288 | }; | 1291 | }; |
| 1289 | 1292 | ||
| 1293 | /** | ||
| 1294 | * enum - mesh path selection protocol identifier | ||
| 1295 | * | ||
| 1296 | * @IEEE80211_PATH_PROTOCOL_HWMP: the default path selection protocol | ||
| 1297 | * @IEEE80211_PATH_PROTOCOL_VENDOR: a vendor specific protocol that will | ||
| 1298 | * be specified in a vendor specific information element | ||
| 1299 | */ | ||
| 1300 | enum { | ||
| 1301 | IEEE80211_PATH_PROTOCOL_HWMP = 0, | ||
| 1302 | IEEE80211_PATH_PROTOCOL_VENDOR = 255, | ||
| 1303 | }; | ||
| 1304 | |||
| 1305 | /** | ||
| 1306 | * enum - mesh path selection metric identifier | ||
| 1307 | * | ||
| 1308 | * @IEEE80211_PATH_METRIC_AIRTIME: the default path selection metric | ||
| 1309 | * @IEEE80211_PATH_METRIC_VENDOR: a vendor specific metric that will be | ||
| 1310 | * specified in a vendor specific information element | ||
| 1311 | */ | ||
| 1312 | enum { | ||
| 1313 | IEEE80211_PATH_METRIC_AIRTIME = 0, | ||
| 1314 | IEEE80211_PATH_METRIC_VENDOR = 255, | ||
| 1315 | }; | ||
| 1316 | |||
| 1317 | |||
| 1290 | /* | 1318 | /* |
| 1291 | * IEEE 802.11-2007 7.3.2.9 Country information element | 1319 | * IEEE 802.11-2007 7.3.2.9 Country information element |
| 1292 | * | 1320 | * |
diff --git a/include/linux/if_bridge.h b/include/linux/if_bridge.h index 0d241a5c4909..f7e73c338c40 100644 --- a/include/linux/if_bridge.h +++ b/include/linux/if_bridge.h | |||
| @@ -102,7 +102,9 @@ struct __fdb_entry { | |||
| 102 | #include <linux/netdevice.h> | 102 | #include <linux/netdevice.h> |
| 103 | 103 | ||
| 104 | extern void brioctl_set(int (*ioctl_hook)(struct net *, unsigned int, void __user *)); | 104 | extern void brioctl_set(int (*ioctl_hook)(struct net *, unsigned int, void __user *)); |
| 105 | extern int (*br_should_route_hook)(struct sk_buff *skb); | 105 | |
| 106 | typedef int (*br_should_route_hook_t)(struct sk_buff *skb); | ||
| 107 | extern br_should_route_hook_t __rcu *br_should_route_hook; | ||
| 106 | 108 | ||
| 107 | #endif | 109 | #endif |
| 108 | 110 | ||
diff --git a/include/linux/if_ether.h b/include/linux/if_ether.h index f9c3df03db0f..be69043d2896 100644 --- a/include/linux/if_ether.h +++ b/include/linux/if_ether.h | |||
| @@ -72,6 +72,7 @@ | |||
| 72 | #define ETH_P_MPLS_UC 0x8847 /* MPLS Unicast traffic */ | 72 | #define ETH_P_MPLS_UC 0x8847 /* MPLS Unicast traffic */ |
| 73 | #define ETH_P_MPLS_MC 0x8848 /* MPLS Multicast traffic */ | 73 | #define ETH_P_MPLS_MC 0x8848 /* MPLS Multicast traffic */ |
| 74 | #define ETH_P_ATMMPOA 0x884c /* MultiProtocol Over ATM */ | 74 | #define ETH_P_ATMMPOA 0x884c /* MultiProtocol Over ATM */ |
| 75 | #define ETH_P_LINK_CTL 0x886c /* HPNA, wlan link local tunnel */ | ||
| 75 | #define ETH_P_ATMFATE 0x8884 /* Frame-based ATM Transport | 76 | #define ETH_P_ATMFATE 0x8884 /* Frame-based ATM Transport |
| 76 | * over Ethernet | 77 | * over Ethernet |
| 77 | */ | 78 | */ |
diff --git a/include/linux/if_link.h b/include/linux/if_link.h index 2fc66dd783ee..6485d2a89bec 100644 --- a/include/linux/if_link.h +++ b/include/linux/if_link.h | |||
| @@ -80,6 +80,24 @@ struct rtnl_link_ifmap { | |||
| 80 | __u8 port; | 80 | __u8 port; |
| 81 | }; | 81 | }; |
| 82 | 82 | ||
| 83 | /* | ||
| 84 | * IFLA_AF_SPEC | ||
| 85 | * Contains nested attributes for address family specific attributes. | ||
| 86 | * Each address family may create a attribute with the address family | ||
| 87 | * number as type and create its own attribute structure in it. | ||
| 88 | * | ||
| 89 | * Example: | ||
| 90 | * [IFLA_AF_SPEC] = { | ||
| 91 | * [AF_INET] = { | ||
| 92 | * [IFLA_INET_CONF] = ..., | ||
| 93 | * }, | ||
| 94 | * [AF_INET6] = { | ||
| 95 | * [IFLA_INET6_FLAGS] = ..., | ||
| 96 | * [IFLA_INET6_CONF] = ..., | ||
| 97 | * } | ||
| 98 | * } | ||
| 99 | */ | ||
| 100 | |||
| 83 | enum { | 101 | enum { |
| 84 | IFLA_UNSPEC, | 102 | IFLA_UNSPEC, |
| 85 | IFLA_ADDRESS, | 103 | IFLA_ADDRESS, |
| @@ -116,6 +134,7 @@ enum { | |||
| 116 | IFLA_STATS64, | 134 | IFLA_STATS64, |
| 117 | IFLA_VF_PORTS, | 135 | IFLA_VF_PORTS, |
| 118 | IFLA_PORT_SELF, | 136 | IFLA_PORT_SELF, |
| 137 | IFLA_AF_SPEC, | ||
| 119 | __IFLA_MAX | 138 | __IFLA_MAX |
| 120 | }; | 139 | }; |
| 121 | 140 | ||
| @@ -128,6 +147,14 @@ enum { | |||
| 128 | #define IFLA_PAYLOAD(n) NLMSG_PAYLOAD(n,sizeof(struct ifinfomsg)) | 147 | #define IFLA_PAYLOAD(n) NLMSG_PAYLOAD(n,sizeof(struct ifinfomsg)) |
| 129 | #endif | 148 | #endif |
| 130 | 149 | ||
| 150 | enum { | ||
| 151 | IFLA_INET_UNSPEC, | ||
| 152 | IFLA_INET_CONF, | ||
| 153 | __IFLA_INET_MAX, | ||
| 154 | }; | ||
| 155 | |||
| 156 | #define IFLA_INET_MAX (__IFLA_INET_MAX - 1) | ||
| 157 | |||
| 131 | /* ifi_flags. | 158 | /* ifi_flags. |
| 132 | 159 | ||
| 133 | IFF_* flags. | 160 | IFF_* flags. |
| @@ -232,6 +259,7 @@ enum macvlan_mode { | |||
| 232 | MACVLAN_MODE_PRIVATE = 1, /* don't talk to other macvlans */ | 259 | MACVLAN_MODE_PRIVATE = 1, /* don't talk to other macvlans */ |
| 233 | MACVLAN_MODE_VEPA = 2, /* talk to other ports through ext bridge */ | 260 | MACVLAN_MODE_VEPA = 2, /* talk to other ports through ext bridge */ |
| 234 | MACVLAN_MODE_BRIDGE = 4, /* talk to bridge ports directly */ | 261 | MACVLAN_MODE_BRIDGE = 4, /* talk to bridge ports directly */ |
| 262 | MACVLAN_MODE_PASSTHRU = 8,/* take over the underlying device */ | ||
| 235 | }; | 263 | }; |
| 236 | 264 | ||
| 237 | /* SR-IOV virtual function management section */ | 265 | /* SR-IOV virtual function management section */ |
diff --git a/include/linux/if_macvlan.h b/include/linux/if_macvlan.h index 8a2fd66a8b5f..e28b2e4959d4 100644 --- a/include/linux/if_macvlan.h +++ b/include/linux/if_macvlan.h | |||
| @@ -25,19 +25,25 @@ struct macvlan_port; | |||
| 25 | struct macvtap_queue; | 25 | struct macvtap_queue; |
| 26 | 26 | ||
| 27 | /** | 27 | /** |
| 28 | * struct macvlan_rx_stats - MACVLAN percpu rx stats | 28 | * struct macvlan_pcpu_stats - MACVLAN percpu stats |
| 29 | * @rx_packets: number of received packets | 29 | * @rx_packets: number of received packets |
| 30 | * @rx_bytes: number of received bytes | 30 | * @rx_bytes: number of received bytes |
| 31 | * @rx_multicast: number of received multicast packets | 31 | * @rx_multicast: number of received multicast packets |
| 32 | * @tx_packets: number of transmitted packets | ||
| 33 | * @tx_bytes: number of transmitted bytes | ||
| 32 | * @syncp: synchronization point for 64bit counters | 34 | * @syncp: synchronization point for 64bit counters |
| 33 | * @rx_errors: number of errors | 35 | * @rx_errors: number of rx errors |
| 36 | * @tx_dropped: number of tx dropped packets | ||
| 34 | */ | 37 | */ |
| 35 | struct macvlan_rx_stats { | 38 | struct macvlan_pcpu_stats { |
| 36 | u64 rx_packets; | 39 | u64 rx_packets; |
| 37 | u64 rx_bytes; | 40 | u64 rx_bytes; |
| 38 | u64 rx_multicast; | 41 | u64 rx_multicast; |
| 42 | u64 tx_packets; | ||
| 43 | u64 tx_bytes; | ||
| 39 | struct u64_stats_sync syncp; | 44 | struct u64_stats_sync syncp; |
| 40 | unsigned long rx_errors; | 45 | u32 rx_errors; |
| 46 | u32 tx_dropped; | ||
| 41 | }; | 47 | }; |
| 42 | 48 | ||
| 43 | /* | 49 | /* |
| @@ -52,7 +58,7 @@ struct macvlan_dev { | |||
| 52 | struct hlist_node hlist; | 58 | struct hlist_node hlist; |
| 53 | struct macvlan_port *port; | 59 | struct macvlan_port *port; |
| 54 | struct net_device *lowerdev; | 60 | struct net_device *lowerdev; |
| 55 | struct macvlan_rx_stats __percpu *rx_stats; | 61 | struct macvlan_pcpu_stats __percpu *pcpu_stats; |
| 56 | enum macvlan_mode mode; | 62 | enum macvlan_mode mode; |
| 57 | int (*receive)(struct sk_buff *skb); | 63 | int (*receive)(struct sk_buff *skb); |
| 58 | int (*forward)(struct net_device *dev, struct sk_buff *skb); | 64 | int (*forward)(struct net_device *dev, struct sk_buff *skb); |
| @@ -64,18 +70,18 @@ static inline void macvlan_count_rx(const struct macvlan_dev *vlan, | |||
| 64 | unsigned int len, bool success, | 70 | unsigned int len, bool success, |
| 65 | bool multicast) | 71 | bool multicast) |
| 66 | { | 72 | { |
| 67 | struct macvlan_rx_stats *rx_stats; | ||
| 68 | |||
| 69 | rx_stats = this_cpu_ptr(vlan->rx_stats); | ||
| 70 | if (likely(success)) { | 73 | if (likely(success)) { |
| 71 | u64_stats_update_begin(&rx_stats->syncp); | 74 | struct macvlan_pcpu_stats *pcpu_stats; |
| 72 | rx_stats->rx_packets++;; | 75 | |
| 73 | rx_stats->rx_bytes += len; | 76 | pcpu_stats = this_cpu_ptr(vlan->pcpu_stats); |
| 77 | u64_stats_update_begin(&pcpu_stats->syncp); | ||
| 78 | pcpu_stats->rx_packets++; | ||
| 79 | pcpu_stats->rx_bytes += len; | ||
| 74 | if (multicast) | 80 | if (multicast) |
| 75 | rx_stats->rx_multicast++; | 81 | pcpu_stats->rx_multicast++; |
| 76 | u64_stats_update_end(&rx_stats->syncp); | 82 | u64_stats_update_end(&pcpu_stats->syncp); |
| 77 | } else { | 83 | } else { |
| 78 | rx_stats->rx_errors++; | 84 | this_cpu_inc(vlan->pcpu_stats->rx_errors); |
| 79 | } | 85 | } |
| 80 | } | 86 | } |
| 81 | 87 | ||
diff --git a/include/linux/igmp.h b/include/linux/igmp.h index 93fc2449af10..74cfcff0148b 100644 --- a/include/linux/igmp.h +++ b/include/linux/igmp.h | |||
| @@ -85,9 +85,9 @@ struct igmpv3_query { | |||
| 85 | #define IGMP_DVMRP 0x13 /* DVMRP routing */ | 85 | #define IGMP_DVMRP 0x13 /* DVMRP routing */ |
| 86 | #define IGMP_PIM 0x14 /* PIM routing */ | 86 | #define IGMP_PIM 0x14 /* PIM routing */ |
| 87 | #define IGMP_TRACE 0x15 | 87 | #define IGMP_TRACE 0x15 |
| 88 | #define IGMPV2_HOST_MEMBERSHIP_REPORT 0x16 /* V2 version of 0x11 */ | 88 | #define IGMPV2_HOST_MEMBERSHIP_REPORT 0x16 /* V2 version of 0x12 */ |
| 89 | #define IGMP_HOST_LEAVE_MESSAGE 0x17 | 89 | #define IGMP_HOST_LEAVE_MESSAGE 0x17 |
| 90 | #define IGMPV3_HOST_MEMBERSHIP_REPORT 0x22 /* V3 version of 0x11 */ | 90 | #define IGMPV3_HOST_MEMBERSHIP_REPORT 0x22 /* V3 version of 0x12 */ |
| 91 | 91 | ||
| 92 | #define IGMP_MTRACE_RESP 0x1e | 92 | #define IGMP_MTRACE_RESP 0x1e |
| 93 | #define IGMP_MTRACE 0x1f | 93 | #define IGMP_MTRACE 0x1f |
| @@ -167,10 +167,10 @@ struct ip_sf_socklist { | |||
| 167 | */ | 167 | */ |
| 168 | 168 | ||
| 169 | struct ip_mc_socklist { | 169 | struct ip_mc_socklist { |
| 170 | struct ip_mc_socklist *next; | 170 | struct ip_mc_socklist __rcu *next_rcu; |
| 171 | struct ip_mreqn multi; | 171 | struct ip_mreqn multi; |
| 172 | unsigned int sfmode; /* MCAST_{INCLUDE,EXCLUDE} */ | 172 | unsigned int sfmode; /* MCAST_{INCLUDE,EXCLUDE} */ |
| 173 | struct ip_sf_socklist *sflist; | 173 | struct ip_sf_socklist __rcu *sflist; |
| 174 | struct rcu_head rcu; | 174 | struct rcu_head rcu; |
| 175 | }; | 175 | }; |
| 176 | 176 | ||
| @@ -186,11 +186,14 @@ struct ip_sf_list { | |||
| 186 | struct ip_mc_list { | 186 | struct ip_mc_list { |
| 187 | struct in_device *interface; | 187 | struct in_device *interface; |
| 188 | __be32 multiaddr; | 188 | __be32 multiaddr; |
| 189 | unsigned int sfmode; | ||
| 189 | struct ip_sf_list *sources; | 190 | struct ip_sf_list *sources; |
| 190 | struct ip_sf_list *tomb; | 191 | struct ip_sf_list *tomb; |
| 191 | unsigned int sfmode; | ||
| 192 | unsigned long sfcount[2]; | 192 | unsigned long sfcount[2]; |
| 193 | struct ip_mc_list *next; | 193 | union { |
| 194 | struct ip_mc_list *next; | ||
| 195 | struct ip_mc_list __rcu *next_rcu; | ||
| 196 | }; | ||
| 194 | struct timer_list timer; | 197 | struct timer_list timer; |
| 195 | int users; | 198 | int users; |
| 196 | atomic_t refcnt; | 199 | atomic_t refcnt; |
| @@ -201,6 +204,7 @@ struct ip_mc_list { | |||
| 201 | char loaded; | 204 | char loaded; |
| 202 | unsigned char gsquery; /* check source marks? */ | 205 | unsigned char gsquery; /* check source marks? */ |
| 203 | unsigned char crcount; | 206 | unsigned char crcount; |
| 207 | struct rcu_head rcu; | ||
| 204 | }; | 208 | }; |
| 205 | 209 | ||
| 206 | /* V3 exponential field decoding */ | 210 | /* V3 exponential field decoding */ |
| @@ -234,7 +238,7 @@ extern void ip_mc_unmap(struct in_device *); | |||
| 234 | extern void ip_mc_remap(struct in_device *); | 238 | extern void ip_mc_remap(struct in_device *); |
| 235 | extern void ip_mc_dec_group(struct in_device *in_dev, __be32 addr); | 239 | extern void ip_mc_dec_group(struct in_device *in_dev, __be32 addr); |
| 236 | extern void ip_mc_inc_group(struct in_device *in_dev, __be32 addr); | 240 | extern void ip_mc_inc_group(struct in_device *in_dev, __be32 addr); |
| 237 | extern void ip_mc_rejoin_group(struct ip_mc_list *im); | 241 | extern void ip_mc_rejoin_groups(struct in_device *in_dev); |
| 238 | 242 | ||
| 239 | #endif | 243 | #endif |
| 240 | #endif | 244 | #endif |
diff --git a/include/linux/inetdevice.h b/include/linux/inetdevice.h index ccd5b07d678d..ae8fdc54e0c0 100644 --- a/include/linux/inetdevice.h +++ b/include/linux/inetdevice.h | |||
| @@ -41,10 +41,12 @@ enum | |||
| 41 | __IPV4_DEVCONF_MAX | 41 | __IPV4_DEVCONF_MAX |
| 42 | }; | 42 | }; |
| 43 | 43 | ||
| 44 | #define IPV4_DEVCONF_MAX (__IPV4_DEVCONF_MAX - 1) | ||
| 45 | |||
| 44 | struct ipv4_devconf { | 46 | struct ipv4_devconf { |
| 45 | void *sysctl; | 47 | void *sysctl; |
| 46 | int data[__IPV4_DEVCONF_MAX - 1]; | 48 | int data[IPV4_DEVCONF_MAX]; |
| 47 | DECLARE_BITMAP(state, __IPV4_DEVCONF_MAX - 1); | 49 | DECLARE_BITMAP(state, IPV4_DEVCONF_MAX); |
| 48 | }; | 50 | }; |
| 49 | 51 | ||
| 50 | struct in_device { | 52 | struct in_device { |
| @@ -52,9 +54,8 @@ struct in_device { | |||
| 52 | atomic_t refcnt; | 54 | atomic_t refcnt; |
| 53 | int dead; | 55 | int dead; |
| 54 | struct in_ifaddr *ifa_list; /* IP ifaddr chain */ | 56 | struct in_ifaddr *ifa_list; /* IP ifaddr chain */ |
| 55 | rwlock_t mc_list_lock; | 57 | struct ip_mc_list __rcu *mc_list; /* IP multicast filter chain */ |
| 56 | struct ip_mc_list *mc_list; /* IP multicast filter chain */ | 58 | int mc_count; /* Number of installed mcasts */ |
| 57 | int mc_count; /* Number of installed mcasts */ | ||
| 58 | spinlock_t mc_tomb_lock; | 59 | spinlock_t mc_tomb_lock; |
| 59 | struct ip_mc_list *mc_tomb; | 60 | struct ip_mc_list *mc_tomb; |
| 60 | unsigned long mr_v1_seen; | 61 | unsigned long mr_v1_seen; |
| @@ -91,7 +92,7 @@ static inline void ipv4_devconf_set(struct in_device *in_dev, int index, | |||
| 91 | 92 | ||
| 92 | static inline void ipv4_devconf_setall(struct in_device *in_dev) | 93 | static inline void ipv4_devconf_setall(struct in_device *in_dev) |
| 93 | { | 94 | { |
| 94 | bitmap_fill(in_dev->cnf.state, __IPV4_DEVCONF_MAX - 1); | 95 | bitmap_fill(in_dev->cnf.state, IPV4_DEVCONF_MAX); |
| 95 | } | 96 | } |
| 96 | 97 | ||
| 97 | #define IN_DEV_CONF_GET(in_dev, attr) \ | 98 | #define IN_DEV_CONF_GET(in_dev, attr) \ |
| @@ -221,7 +222,7 @@ static inline struct in_device *in_dev_get(const struct net_device *dev) | |||
| 221 | 222 | ||
| 222 | static inline struct in_device *__in_dev_get_rtnl(const struct net_device *dev) | 223 | static inline struct in_device *__in_dev_get_rtnl(const struct net_device *dev) |
| 223 | { | 224 | { |
| 224 | return rcu_dereference_check(dev->ip_ptr, lockdep_rtnl_is_held()); | 225 | return rtnl_dereference(dev->ip_ptr); |
| 225 | } | 226 | } |
| 226 | 227 | ||
| 227 | extern void in_dev_finish_destroy(struct in_device *idev); | 228 | extern void in_dev_finish_destroy(struct in_device *idev); |
diff --git a/include/linux/ipv6.h b/include/linux/ipv6.h index 8e429d0e0405..0c997767429a 100644 --- a/include/linux/ipv6.h +++ b/include/linux/ipv6.h | |||
| @@ -364,7 +364,7 @@ struct ipv6_pinfo { | |||
| 364 | 364 | ||
| 365 | __u32 dst_cookie; | 365 | __u32 dst_cookie; |
| 366 | 366 | ||
| 367 | struct ipv6_mc_socklist *ipv6_mc_list; | 367 | struct ipv6_mc_socklist __rcu *ipv6_mc_list; |
| 368 | struct ipv6_ac_socklist *ipv6_ac_list; | 368 | struct ipv6_ac_socklist *ipv6_ac_list; |
| 369 | struct ipv6_fl_socklist *ipv6_fl_list; | 369 | struct ipv6_fl_socklist *ipv6_fl_list; |
| 370 | 370 | ||
diff --git a/include/linux/jhash.h b/include/linux/jhash.h index ced1159fa4f2..47cb09edec1a 100644 --- a/include/linux/jhash.h +++ b/include/linux/jhash.h | |||
| @@ -3,129 +3,156 @@ | |||
| 3 | 3 | ||
| 4 | /* jhash.h: Jenkins hash support. | 4 | /* jhash.h: Jenkins hash support. |
| 5 | * | 5 | * |
| 6 | * Copyright (C) 1996 Bob Jenkins (bob_jenkins@burtleburtle.net) | 6 | * Copyright (C) 2006. Bob Jenkins (bob_jenkins@burtleburtle.net) |
| 7 | * | 7 | * |
| 8 | * http://burtleburtle.net/bob/hash/ | 8 | * http://burtleburtle.net/bob/hash/ |
| 9 | * | 9 | * |
| 10 | * These are the credits from Bob's sources: | 10 | * These are the credits from Bob's sources: |
| 11 | * | 11 | * |
| 12 | * lookup2.c, by Bob Jenkins, December 1996, Public Domain. | 12 | * lookup3.c, by Bob Jenkins, May 2006, Public Domain. |
| 13 | * hash(), hash2(), hash3, and mix() are externally useful functions. | ||
| 14 | * Routines to test the hash are included if SELF_TEST is defined. | ||
| 15 | * You can use this free for any purpose. It has no warranty. | ||
| 16 | * | 13 | * |
| 17 | * Copyright (C) 2003 David S. Miller (davem@redhat.com) | 14 | * These are functions for producing 32-bit hashes for hash table lookup. |
| 15 | * hashword(), hashlittle(), hashlittle2(), hashbig(), mix(), and final() | ||
| 16 | * are externally useful functions. Routines to test the hash are included | ||
| 17 | * if SELF_TEST is defined. You can use this free for any purpose. It's in | ||
| 18 | * the public domain. It has no warranty. | ||
| 19 | * | ||
| 20 | * Copyright (C) 2009-2010 Jozsef Kadlecsik (kadlec@blackhole.kfki.hu) | ||
| 18 | * | 21 | * |
| 19 | * I've modified Bob's hash to be useful in the Linux kernel, and | 22 | * I've modified Bob's hash to be useful in the Linux kernel, and |
| 20 | * any bugs present are surely my fault. -DaveM | 23 | * any bugs present are my fault. |
| 24 | * Jozsef | ||
| 21 | */ | 25 | */ |
| 26 | #include <linux/bitops.h> | ||
| 27 | #include <linux/unaligned/packed_struct.h> | ||
| 28 | |||
| 29 | /* Best hash sizes are of power of two */ | ||
| 30 | #define jhash_size(n) ((u32)1<<(n)) | ||
| 31 | /* Mask the hash value, i.e (value & jhash_mask(n)) instead of (value % n) */ | ||
| 32 | #define jhash_mask(n) (jhash_size(n)-1) | ||
| 33 | |||
| 34 | /* __jhash_mix -- mix 3 32-bit values reversibly. */ | ||
| 35 | #define __jhash_mix(a, b, c) \ | ||
| 36 | { \ | ||
| 37 | a -= c; a ^= rol32(c, 4); c += b; \ | ||
| 38 | b -= a; b ^= rol32(a, 6); a += c; \ | ||
| 39 | c -= b; c ^= rol32(b, 8); b += a; \ | ||
| 40 | a -= c; a ^= rol32(c, 16); c += b; \ | ||
| 41 | b -= a; b ^= rol32(a, 19); a += c; \ | ||
| 42 | c -= b; c ^= rol32(b, 4); b += a; \ | ||
| 43 | } | ||
| 22 | 44 | ||
| 23 | /* NOTE: Arguments are modified. */ | 45 | /* __jhash_final - final mixing of 3 32-bit values (a,b,c) into c */ |
| 24 | #define __jhash_mix(a, b, c) \ | 46 | #define __jhash_final(a, b, c) \ |
| 25 | { \ | 47 | { \ |
| 26 | a -= b; a -= c; a ^= (c>>13); \ | 48 | c ^= b; c -= rol32(b, 14); \ |
| 27 | b -= c; b -= a; b ^= (a<<8); \ | 49 | a ^= c; a -= rol32(c, 11); \ |
| 28 | c -= a; c -= b; c ^= (b>>13); \ | 50 | b ^= a; b -= rol32(a, 25); \ |
| 29 | a -= b; a -= c; a ^= (c>>12); \ | 51 | c ^= b; c -= rol32(b, 16); \ |
| 30 | b -= c; b -= a; b ^= (a<<16); \ | 52 | a ^= c; a -= rol32(c, 4); \ |
| 31 | c -= a; c -= b; c ^= (b>>5); \ | 53 | b ^= a; b -= rol32(a, 14); \ |
| 32 | a -= b; a -= c; a ^= (c>>3); \ | 54 | c ^= b; c -= rol32(b, 24); \ |
| 33 | b -= c; b -= a; b ^= (a<<10); \ | ||
| 34 | c -= a; c -= b; c ^= (b>>15); \ | ||
| 35 | } | 55 | } |
| 36 | 56 | ||
| 37 | /* The golden ration: an arbitrary value */ | 57 | /* An arbitrary initial parameter */ |
| 38 | #define JHASH_GOLDEN_RATIO 0x9e3779b9 | 58 | #define JHASH_INITVAL 0xdeadbeef |
| 39 | 59 | ||
| 40 | /* The most generic version, hashes an arbitrary sequence | 60 | /* jhash - hash an arbitrary key |
| 41 | * of bytes. No alignment or length assumptions are made about | 61 | * @k: sequence of bytes as key |
| 42 | * the input key. | 62 | * @length: the length of the key |
| 63 | * @initval: the previous hash, or an arbitray value | ||
| 64 | * | ||
| 65 | * The generic version, hashes an arbitrary sequence of bytes. | ||
| 66 | * No alignment or length assumptions are made about the input key. | ||
| 67 | * | ||
| 68 | * Returns the hash value of the key. The result depends on endianness. | ||
| 43 | */ | 69 | */ |
| 44 | static inline u32 jhash(const void *key, u32 length, u32 initval) | 70 | static inline u32 jhash(const void *key, u32 length, u32 initval) |
| 45 | { | 71 | { |
| 46 | u32 a, b, c, len; | 72 | u32 a, b, c; |
| 47 | const u8 *k = key; | 73 | const u8 *k = key; |
| 48 | 74 | ||
| 49 | len = length; | 75 | /* Set up the internal state */ |
| 50 | a = b = JHASH_GOLDEN_RATIO; | 76 | a = b = c = JHASH_INITVAL + length + initval; |
| 51 | c = initval; | ||
| 52 | |||
| 53 | while (len >= 12) { | ||
| 54 | a += (k[0] +((u32)k[1]<<8) +((u32)k[2]<<16) +((u32)k[3]<<24)); | ||
| 55 | b += (k[4] +((u32)k[5]<<8) +((u32)k[6]<<16) +((u32)k[7]<<24)); | ||
| 56 | c += (k[8] +((u32)k[9]<<8) +((u32)k[10]<<16)+((u32)k[11]<<24)); | ||
| 57 | |||
| 58 | __jhash_mix(a,b,c); | ||
| 59 | 77 | ||
| 78 | /* All but the last block: affect some 32 bits of (a,b,c) */ | ||
| 79 | while (length > 12) { | ||
| 80 | a += __get_unaligned_cpu32(k); | ||
| 81 | b += __get_unaligned_cpu32(k + 4); | ||
| 82 | c += __get_unaligned_cpu32(k + 8); | ||
| 83 | __jhash_mix(a, b, c); | ||
| 84 | length -= 12; | ||
| 60 | k += 12; | 85 | k += 12; |
| 61 | len -= 12; | ||
| 62 | } | 86 | } |
| 63 | 87 | /* Last block: affect all 32 bits of (c) */ | |
| 64 | c += length; | 88 | /* All the case statements fall through */ |
| 65 | switch (len) { | 89 | switch (length) { |
| 66 | case 11: c += ((u32)k[10]<<24); | 90 | case 12: c += (u32)k[11]<<24; |
| 67 | case 10: c += ((u32)k[9]<<16); | 91 | case 11: c += (u32)k[10]<<16; |
| 68 | case 9 : c += ((u32)k[8]<<8); | 92 | case 10: c += (u32)k[9]<<8; |
| 69 | case 8 : b += ((u32)k[7]<<24); | 93 | case 9: c += k[8]; |
| 70 | case 7 : b += ((u32)k[6]<<16); | 94 | case 8: b += (u32)k[7]<<24; |
| 71 | case 6 : b += ((u32)k[5]<<8); | 95 | case 7: b += (u32)k[6]<<16; |
| 72 | case 5 : b += k[4]; | 96 | case 6: b += (u32)k[5]<<8; |
| 73 | case 4 : a += ((u32)k[3]<<24); | 97 | case 5: b += k[4]; |
| 74 | case 3 : a += ((u32)k[2]<<16); | 98 | case 4: a += (u32)k[3]<<24; |
| 75 | case 2 : a += ((u32)k[1]<<8); | 99 | case 3: a += (u32)k[2]<<16; |
| 76 | case 1 : a += k[0]; | 100 | case 2: a += (u32)k[1]<<8; |
| 77 | }; | 101 | case 1: a += k[0]; |
| 78 | 102 | __jhash_final(a, b, c); | |
| 79 | __jhash_mix(a,b,c); | 103 | case 0: /* Nothing left to add */ |
| 104 | break; | ||
| 105 | } | ||
| 80 | 106 | ||
| 81 | return c; | 107 | return c; |
| 82 | } | 108 | } |
| 83 | 109 | ||
| 84 | /* A special optimized version that handles 1 or more of u32s. | 110 | /* jhash2 - hash an array of u32's |
| 85 | * The length parameter here is the number of u32s in the key. | 111 | * @k: the key which must be an array of u32's |
| 112 | * @length: the number of u32's in the key | ||
| 113 | * @initval: the previous hash, or an arbitray value | ||
| 114 | * | ||
| 115 | * Returns the hash value of the key. | ||
| 86 | */ | 116 | */ |
| 87 | static inline u32 jhash2(const u32 *k, u32 length, u32 initval) | 117 | static inline u32 jhash2(const u32 *k, u32 length, u32 initval) |
| 88 | { | 118 | { |
| 89 | u32 a, b, c, len; | 119 | u32 a, b, c; |
| 90 | 120 | ||
| 91 | a = b = JHASH_GOLDEN_RATIO; | 121 | /* Set up the internal state */ |
| 92 | c = initval; | 122 | a = b = c = JHASH_INITVAL + (length<<2) + initval; |
| 93 | len = length; | ||
| 94 | 123 | ||
| 95 | while (len >= 3) { | 124 | /* Handle most of the key */ |
| 125 | while (length > 3) { | ||
| 96 | a += k[0]; | 126 | a += k[0]; |
| 97 | b += k[1]; | 127 | b += k[1]; |
| 98 | c += k[2]; | 128 | c += k[2]; |
| 99 | __jhash_mix(a, b, c); | 129 | __jhash_mix(a, b, c); |
| 100 | k += 3; len -= 3; | 130 | length -= 3; |
| 131 | k += 3; | ||
| 101 | } | 132 | } |
| 102 | 133 | ||
| 103 | c += length * 4; | 134 | /* Handle the last 3 u32's: all the case statements fall through */ |
| 104 | 135 | switch (length) { | |
| 105 | switch (len) { | 136 | case 3: c += k[2]; |
| 106 | case 2 : b += k[1]; | 137 | case 2: b += k[1]; |
| 107 | case 1 : a += k[0]; | 138 | case 1: a += k[0]; |
| 108 | }; | 139 | __jhash_final(a, b, c); |
| 109 | 140 | case 0: /* Nothing left to add */ | |
| 110 | __jhash_mix(a,b,c); | 141 | break; |
| 142 | } | ||
| 111 | 143 | ||
| 112 | return c; | 144 | return c; |
| 113 | } | 145 | } |
| 114 | 146 | ||
| 115 | 147 | ||
| 116 | /* A special ultra-optimized versions that knows they are hashing exactly | 148 | /* jhash_3words - hash exactly 3, 2 or 1 word(s) */ |
| 117 | * 3, 2 or 1 word(s). | ||
| 118 | * | ||
| 119 | * NOTE: In particular the "c += length; __jhash_mix(a,b,c);" normally | ||
| 120 | * done at the end is not done here. | ||
| 121 | */ | ||
| 122 | static inline u32 jhash_3words(u32 a, u32 b, u32 c, u32 initval) | 149 | static inline u32 jhash_3words(u32 a, u32 b, u32 c, u32 initval) |
| 123 | { | 150 | { |
| 124 | a += JHASH_GOLDEN_RATIO; | 151 | a += JHASH_INITVAL; |
| 125 | b += JHASH_GOLDEN_RATIO; | 152 | b += JHASH_INITVAL; |
| 126 | c += initval; | 153 | c += initval; |
| 127 | 154 | ||
| 128 | __jhash_mix(a, b, c); | 155 | __jhash_final(a, b, c); |
| 129 | 156 | ||
| 130 | return c; | 157 | return c; |
| 131 | } | 158 | } |
diff --git a/include/linux/mdio.h b/include/linux/mdio.h index c779b49a1fda..b1494aced217 100644 --- a/include/linux/mdio.h +++ b/include/linux/mdio.h | |||
| @@ -55,6 +55,7 @@ | |||
| 55 | #define MDIO_PCS_10GBRT_STAT2 33 /* 10GBASE-R/-T PCS status 2 */ | 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 */ | 56 | #define MDIO_AN_10GBT_CTRL 32 /* 10GBASE-T auto-negotiation control */ |
| 57 | #define MDIO_AN_10GBT_STAT 33 /* 10GBASE-T auto-negotiation status */ | 57 | #define MDIO_AN_10GBT_STAT 33 /* 10GBASE-T auto-negotiation status */ |
| 58 | #define MDIO_AN_EEE_ADV 60 /* EEE advertisement */ | ||
| 58 | 59 | ||
| 59 | /* LASI (Link Alarm Status Interrupt) registers, defined by XENPAK MSA. */ | 60 | /* 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_RXCTRL 0x9000 /* RX_ALARM control */ |
| @@ -235,6 +236,10 @@ | |||
| 235 | #define MDIO_AN_10GBT_STAT_MS 0x4000 /* Master/slave config */ | 236 | #define MDIO_AN_10GBT_STAT_MS 0x4000 /* Master/slave config */ |
| 236 | #define MDIO_AN_10GBT_STAT_MSFLT 0x8000 /* Master/slave config fault */ | 237 | #define MDIO_AN_10GBT_STAT_MSFLT 0x8000 /* Master/slave config fault */ |
| 237 | 238 | ||
| 239 | /* AN EEE Advertisement register. */ | ||
| 240 | #define MDIO_AN_EEE_ADV_100TX 0x0002 /* Advertise 100TX EEE cap */ | ||
| 241 | #define MDIO_AN_EEE_ADV_1000T 0x0004 /* Advertise 1000T EEE cap */ | ||
| 242 | |||
| 238 | /* LASI RX_ALARM control/status registers. */ | 243 | /* LASI RX_ALARM control/status registers. */ |
| 239 | #define MDIO_PMA_LASI_RX_PHYXSLFLT 0x0001 /* PHY XS RX local fault */ | 244 | #define MDIO_PMA_LASI_RX_PHYXSLFLT 0x0001 /* PHY XS RX local fault */ |
| 240 | #define MDIO_PMA_LASI_RX_PCSLFLT 0x0008 /* PCS RX local fault */ | 245 | #define MDIO_PMA_LASI_RX_PCSLFLT 0x0008 /* PCS RX local fault */ |
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index d8fd2c23a1b9..0f6b1c965815 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h | |||
| @@ -493,6 +493,8 @@ static inline void napi_synchronize(const struct napi_struct *n) | |||
| 493 | enum netdev_queue_state_t { | 493 | enum netdev_queue_state_t { |
| 494 | __QUEUE_STATE_XOFF, | 494 | __QUEUE_STATE_XOFF, |
| 495 | __QUEUE_STATE_FROZEN, | 495 | __QUEUE_STATE_FROZEN, |
| 496 | #define QUEUE_STATE_XOFF_OR_FROZEN ((1 << __QUEUE_STATE_XOFF) | \ | ||
| 497 | (1 << __QUEUE_STATE_FROZEN)) | ||
| 496 | }; | 498 | }; |
| 497 | 499 | ||
| 498 | struct netdev_queue { | 500 | struct netdev_queue { |
| @@ -503,6 +505,12 @@ struct netdev_queue { | |||
| 503 | struct Qdisc *qdisc; | 505 | struct Qdisc *qdisc; |
| 504 | unsigned long state; | 506 | unsigned long state; |
| 505 | struct Qdisc *qdisc_sleeping; | 507 | struct Qdisc *qdisc_sleeping; |
| 508 | #ifdef CONFIG_RPS | ||
| 509 | struct kobject kobj; | ||
| 510 | #endif | ||
| 511 | #if defined(CONFIG_XPS) && defined(CONFIG_NUMA) | ||
| 512 | int numa_node; | ||
| 513 | #endif | ||
| 506 | /* | 514 | /* |
| 507 | * write mostly part | 515 | * write mostly part |
| 508 | */ | 516 | */ |
| @@ -517,6 +525,22 @@ struct netdev_queue { | |||
| 517 | u64 tx_dropped; | 525 | u64 tx_dropped; |
| 518 | } ____cacheline_aligned_in_smp; | 526 | } ____cacheline_aligned_in_smp; |
| 519 | 527 | ||
| 528 | static inline int netdev_queue_numa_node_read(const struct netdev_queue *q) | ||
| 529 | { | ||
| 530 | #if defined(CONFIG_XPS) && defined(CONFIG_NUMA) | ||
| 531 | return q->numa_node; | ||
| 532 | #else | ||
| 533 | return NUMA_NO_NODE; | ||
| 534 | #endif | ||
| 535 | } | ||
| 536 | |||
| 537 | static inline void netdev_queue_numa_node_write(struct netdev_queue *q, int node) | ||
| 538 | { | ||
| 539 | #if defined(CONFIG_XPS) && defined(CONFIG_NUMA) | ||
| 540 | q->numa_node = node; | ||
| 541 | #endif | ||
| 542 | } | ||
| 543 | |||
| 520 | #ifdef CONFIG_RPS | 544 | #ifdef CONFIG_RPS |
| 521 | /* | 545 | /* |
| 522 | * This structure holds an RPS map which can be of variable length. The | 546 | * This structure holds an RPS map which can be of variable length. The |
| @@ -592,11 +616,36 @@ struct netdev_rx_queue { | |||
| 592 | struct rps_map __rcu *rps_map; | 616 | struct rps_map __rcu *rps_map; |
| 593 | struct rps_dev_flow_table __rcu *rps_flow_table; | 617 | struct rps_dev_flow_table __rcu *rps_flow_table; |
| 594 | struct kobject kobj; | 618 | struct kobject kobj; |
| 595 | struct netdev_rx_queue *first; | 619 | struct net_device *dev; |
| 596 | atomic_t count; | ||
| 597 | } ____cacheline_aligned_in_smp; | 620 | } ____cacheline_aligned_in_smp; |
| 598 | #endif /* CONFIG_RPS */ | 621 | #endif /* CONFIG_RPS */ |
| 599 | 622 | ||
| 623 | #ifdef CONFIG_XPS | ||
| 624 | /* | ||
| 625 | * This structure holds an XPS map which can be of variable length. The | ||
| 626 | * map is an array of queues. | ||
| 627 | */ | ||
| 628 | struct xps_map { | ||
| 629 | unsigned int len; | ||
| 630 | unsigned int alloc_len; | ||
| 631 | struct rcu_head rcu; | ||
| 632 | u16 queues[0]; | ||
| 633 | }; | ||
| 634 | #define XPS_MAP_SIZE(_num) (sizeof(struct xps_map) + (_num * sizeof(u16))) | ||
| 635 | #define XPS_MIN_MAP_ALLOC ((L1_CACHE_BYTES - sizeof(struct xps_map)) \ | ||
| 636 | / sizeof(u16)) | ||
| 637 | |||
| 638 | /* | ||
| 639 | * This structure holds all XPS maps for device. Maps are indexed by CPU. | ||
| 640 | */ | ||
| 641 | struct xps_dev_maps { | ||
| 642 | struct rcu_head rcu; | ||
| 643 | struct xps_map __rcu *cpu_map[0]; | ||
| 644 | }; | ||
| 645 | #define XPS_DEV_MAPS_SIZE (sizeof(struct xps_dev_maps) + \ | ||
| 646 | (nr_cpu_ids * sizeof(struct xps_map *))) | ||
| 647 | #endif /* CONFIG_XPS */ | ||
| 648 | |||
| 600 | /* | 649 | /* |
| 601 | * This structure defines the management hooks for network devices. | 650 | * This structure defines the management hooks for network devices. |
| 602 | * The following hooks can be defined; unless noted otherwise, they are | 651 | * The following hooks can be defined; unless noted otherwise, they are |
| @@ -683,7 +732,7 @@ struct netdev_rx_queue { | |||
| 683 | * neither operation. | 732 | * neither operation. |
| 684 | * | 733 | * |
| 685 | * void (*ndo_vlan_rx_register)(struct net_device *dev, struct vlan_group *grp); | 734 | * void (*ndo_vlan_rx_register)(struct net_device *dev, struct vlan_group *grp); |
| 686 | * If device support VLAN receive accleration | 735 | * If device support VLAN receive acceleration |
| 687 | * (ie. dev->features & NETIF_F_HW_VLAN_RX), then this function is called | 736 | * (ie. dev->features & NETIF_F_HW_VLAN_RX), then this function is called |
| 688 | * when vlan groups for the device changes. Note: grp is NULL | 737 | * when vlan groups for the device changes. Note: grp is NULL |
| 689 | * if no vlan's groups are being used. | 738 | * if no vlan's groups are being used. |
| @@ -951,7 +1000,7 @@ struct net_device { | |||
| 951 | #endif | 1000 | #endif |
| 952 | void *atalk_ptr; /* AppleTalk link */ | 1001 | void *atalk_ptr; /* AppleTalk link */ |
| 953 | struct in_device __rcu *ip_ptr; /* IPv4 specific data */ | 1002 | struct in_device __rcu *ip_ptr; /* IPv4 specific data */ |
| 954 | void *dn_ptr; /* DECnet specific data */ | 1003 | struct dn_dev __rcu *dn_ptr; /* DECnet specific data */ |
| 955 | struct inet6_dev __rcu *ip6_ptr; /* IPv6 specific data */ | 1004 | struct inet6_dev __rcu *ip6_ptr; /* IPv6 specific data */ |
| 956 | void *ec_ptr; /* Econet specific data */ | 1005 | void *ec_ptr; /* Econet specific data */ |
| 957 | void *ax25_ptr; /* AX.25 specific data */ | 1006 | void *ax25_ptr; /* AX.25 specific data */ |
| @@ -995,8 +1044,8 @@ struct net_device { | |||
| 995 | unsigned int real_num_rx_queues; | 1044 | unsigned int real_num_rx_queues; |
| 996 | #endif | 1045 | #endif |
| 997 | 1046 | ||
| 998 | rx_handler_func_t *rx_handler; | 1047 | rx_handler_func_t __rcu *rx_handler; |
| 999 | void *rx_handler_data; | 1048 | void __rcu *rx_handler_data; |
| 1000 | 1049 | ||
| 1001 | struct netdev_queue __rcu *ingress_queue; | 1050 | struct netdev_queue __rcu *ingress_queue; |
| 1002 | 1051 | ||
| @@ -1017,6 +1066,10 @@ struct net_device { | |||
| 1017 | unsigned long tx_queue_len; /* Max frames per queue allowed */ | 1066 | unsigned long tx_queue_len; /* Max frames per queue allowed */ |
| 1018 | spinlock_t tx_global_lock; | 1067 | spinlock_t tx_global_lock; |
| 1019 | 1068 | ||
| 1069 | #ifdef CONFIG_XPS | ||
| 1070 | struct xps_dev_maps __rcu *xps_maps; | ||
| 1071 | #endif | ||
| 1072 | |||
| 1020 | /* These may be needed for future network-power-down code. */ | 1073 | /* These may be needed for future network-power-down code. */ |
| 1021 | 1074 | ||
| 1022 | /* | 1075 | /* |
| @@ -1307,7 +1360,8 @@ static inline struct net_device *first_net_device(struct net *net) | |||
| 1307 | 1360 | ||
| 1308 | extern int netdev_boot_setup_check(struct net_device *dev); | 1361 | extern int netdev_boot_setup_check(struct net_device *dev); |
| 1309 | extern unsigned long netdev_boot_base(const char *prefix, int unit); | 1362 | extern unsigned long netdev_boot_base(const char *prefix, int unit); |
| 1310 | extern struct net_device *dev_getbyhwaddr(struct net *net, unsigned short type, char *hwaddr); | 1363 | extern struct net_device *dev_getbyhwaddr_rcu(struct net *net, unsigned short type, |
| 1364 | const char *hwaddr); | ||
| 1311 | extern struct net_device *dev_getfirstbyhwtype(struct net *net, unsigned short type); | 1365 | extern struct net_device *dev_getfirstbyhwtype(struct net *net, unsigned short type); |
| 1312 | extern struct net_device *__dev_getfirstbyhwtype(struct net *net, unsigned short type); | 1366 | extern struct net_device *__dev_getfirstbyhwtype(struct net *net, unsigned short type); |
| 1313 | extern void dev_add_pack(struct packet_type *pt); | 1367 | extern void dev_add_pack(struct packet_type *pt); |
| @@ -1600,9 +1654,9 @@ static inline int netif_queue_stopped(const struct net_device *dev) | |||
| 1600 | return netif_tx_queue_stopped(netdev_get_tx_queue(dev, 0)); | 1654 | return netif_tx_queue_stopped(netdev_get_tx_queue(dev, 0)); |
| 1601 | } | 1655 | } |
| 1602 | 1656 | ||
| 1603 | static inline int netif_tx_queue_frozen(const struct netdev_queue *dev_queue) | 1657 | static inline int netif_tx_queue_frozen_or_stopped(const struct netdev_queue *dev_queue) |
| 1604 | { | 1658 | { |
| 1605 | return test_bit(__QUEUE_STATE_FROZEN, &dev_queue->state); | 1659 | return dev_queue->state & QUEUE_STATE_XOFF_OR_FROZEN; |
| 1606 | } | 1660 | } |
| 1607 | 1661 | ||
| 1608 | /** | 1662 | /** |
| @@ -1693,6 +1747,16 @@ static inline void netif_wake_subqueue(struct net_device *dev, u16 queue_index) | |||
| 1693 | __netif_schedule(txq->qdisc); | 1747 | __netif_schedule(txq->qdisc); |
| 1694 | } | 1748 | } |
| 1695 | 1749 | ||
| 1750 | /* | ||
| 1751 | * Returns a Tx hash for the given packet when dev->real_num_tx_queues is used | ||
| 1752 | * as a distribution range limit for the returned value. | ||
| 1753 | */ | ||
| 1754 | static inline u16 skb_tx_hash(const struct net_device *dev, | ||
| 1755 | const struct sk_buff *skb) | ||
| 1756 | { | ||
| 1757 | return __skb_tx_hash(dev, skb, dev->real_num_tx_queues); | ||
| 1758 | } | ||
| 1759 | |||
| 1696 | /** | 1760 | /** |
| 1697 | * netif_is_multiqueue - test if device has multiple transmit queues | 1761 | * netif_is_multiqueue - test if device has multiple transmit queues |
| 1698 | * @dev: network device | 1762 | * @dev: network device |
| @@ -2239,6 +2303,8 @@ unsigned long netdev_fix_features(unsigned long features, const char *name); | |||
| 2239 | void netif_stacked_transfer_operstate(const struct net_device *rootdev, | 2303 | void netif_stacked_transfer_operstate(const struct net_device *rootdev, |
| 2240 | struct net_device *dev); | 2304 | struct net_device *dev); |
| 2241 | 2305 | ||
| 2306 | int netif_get_vlan_features(struct sk_buff *skb, struct net_device *dev); | ||
| 2307 | |||
| 2242 | static inline int net_gso_ok(int features, int gso_type) | 2308 | static inline int net_gso_ok(int features, int gso_type) |
| 2243 | { | 2309 | { |
| 2244 | int feature = gso_type << NETIF_F_GSO_SHIFT; | 2310 | int feature = gso_type << NETIF_F_GSO_SHIFT; |
| @@ -2254,10 +2320,7 @@ static inline int skb_gso_ok(struct sk_buff *skb, int features) | |||
| 2254 | static inline int netif_needs_gso(struct net_device *dev, struct sk_buff *skb) | 2320 | static inline int netif_needs_gso(struct net_device *dev, struct sk_buff *skb) |
| 2255 | { | 2321 | { |
| 2256 | if (skb_is_gso(skb)) { | 2322 | if (skb_is_gso(skb)) { |
| 2257 | int features = dev->features; | 2323 | int features = netif_get_vlan_features(skb, dev); |
| 2258 | |||
| 2259 | if (skb->protocol == htons(ETH_P_8021Q) || skb->vlan_tci) | ||
| 2260 | features &= dev->vlan_features; | ||
| 2261 | 2324 | ||
| 2262 | return (!skb_gso_ok(skb, features) || | 2325 | return (!skb_gso_ok(skb, features) || |
| 2263 | unlikely(skb->ip_summed != CHECKSUM_PARTIAL)); | 2326 | unlikely(skb->ip_summed != CHECKSUM_PARTIAL)); |
diff --git a/include/linux/netfilter.h b/include/linux/netfilter.h index 03317c8d4077..1893837b3966 100644 --- a/include/linux/netfilter.h +++ b/include/linux/netfilter.h | |||
| @@ -33,6 +33,8 @@ | |||
| 33 | 33 | ||
| 34 | #define NF_QUEUE_NR(x) ((((x) << NF_VERDICT_BITS) & NF_VERDICT_QMASK) | NF_QUEUE) | 34 | #define NF_QUEUE_NR(x) ((((x) << NF_VERDICT_BITS) & NF_VERDICT_QMASK) | NF_QUEUE) |
| 35 | 35 | ||
| 36 | #define NF_DROP_ERR(x) (((-x) << NF_VERDICT_BITS) | NF_DROP) | ||
| 37 | |||
| 36 | /* only for userspace compatibility */ | 38 | /* only for userspace compatibility */ |
| 37 | #ifndef __KERNEL__ | 39 | #ifndef __KERNEL__ |
| 38 | /* Generic cache responses from hook functions. | 40 | /* Generic cache responses from hook functions. |
diff --git a/include/linux/nl80211.h b/include/linux/nl80211.h index 0edb2566c14c..2b89b712565b 100644 --- a/include/linux/nl80211.h +++ b/include/linux/nl80211.h | |||
| @@ -172,10 +172,10 @@ | |||
| 172 | * to the specified ISO/IEC 3166-1 alpha2 country code. The core will | 172 | * to the specified ISO/IEC 3166-1 alpha2 country code. The core will |
| 173 | * store this as a valid request and then query userspace for it. | 173 | * store this as a valid request and then query userspace for it. |
| 174 | * | 174 | * |
| 175 | * @NL80211_CMD_GET_MESH_PARAMS: Get mesh networking properties for the | 175 | * @NL80211_CMD_GET_MESH_CONFIG: Get mesh networking properties for the |
| 176 | * interface identified by %NL80211_ATTR_IFINDEX | 176 | * interface identified by %NL80211_ATTR_IFINDEX |
| 177 | * | 177 | * |
| 178 | * @NL80211_CMD_SET_MESH_PARAMS: Set mesh networking properties for the | 178 | * @NL80211_CMD_SET_MESH_CONFIG: Set mesh networking properties for the |
| 179 | * interface identified by %NL80211_ATTR_IFINDEX | 179 | * interface identified by %NL80211_ATTR_IFINDEX |
| 180 | * | 180 | * |
| 181 | * @NL80211_CMD_SET_MGMT_EXTRA_IE: Set extra IEs for management frames. The | 181 | * @NL80211_CMD_SET_MGMT_EXTRA_IE: Set extra IEs for management frames. The |
| @@ -358,11 +358,16 @@ | |||
| 358 | * user space application). %NL80211_ATTR_FRAME is used to specify the | 358 | * user space application). %NL80211_ATTR_FRAME is used to specify the |
| 359 | * frame contents (including header). %NL80211_ATTR_WIPHY_FREQ (and | 359 | * frame contents (including header). %NL80211_ATTR_WIPHY_FREQ (and |
| 360 | * optionally %NL80211_ATTR_WIPHY_CHANNEL_TYPE) is used to indicate on | 360 | * optionally %NL80211_ATTR_WIPHY_CHANNEL_TYPE) is used to indicate on |
| 361 | * which channel the frame is to be transmitted or was received. This | 361 | * which channel the frame is to be transmitted or was received. If this |
| 362 | * channel has to be the current channel (remain-on-channel or the | 362 | * channel is not the current channel (remain-on-channel or the |
| 363 | * operational channel). When called, this operation returns a cookie | 363 | * operational channel) the device will switch to the given channel and |
| 364 | * (%NL80211_ATTR_COOKIE) that will be included with the TX status event | 364 | * transmit the frame, optionally waiting for a response for the time |
| 365 | * pertaining to the TX request. | 365 | * specified using %NL80211_ATTR_DURATION. When called, this operation |
| 366 | * returns a cookie (%NL80211_ATTR_COOKIE) that will be included with the | ||
| 367 | * TX status event pertaining to the TX request. | ||
| 368 | * @NL80211_CMD_FRAME_WAIT_CANCEL: When an off-channel TX was requested, this | ||
| 369 | * command may be used with the corresponding cookie to cancel the wait | ||
| 370 | * time if it is known that it is no longer necessary. | ||
| 366 | * @NL80211_CMD_ACTION: Alias for @NL80211_CMD_FRAME for backward compatibility. | 371 | * @NL80211_CMD_ACTION: Alias for @NL80211_CMD_FRAME for backward compatibility. |
| 367 | * @NL80211_CMD_FRAME_TX_STATUS: Report TX status of a management frame | 372 | * @NL80211_CMD_FRAME_TX_STATUS: Report TX status of a management frame |
| 368 | * transmitted with %NL80211_CMD_FRAME. %NL80211_ATTR_COOKIE identifies | 373 | * transmitted with %NL80211_CMD_FRAME. %NL80211_ATTR_COOKIE identifies |
| @@ -389,6 +394,18 @@ | |||
| 389 | * | 394 | * |
| 390 | * @NL80211_CMD_SET_WDS_PEER: Set the MAC address of the peer on a WDS interface. | 395 | * @NL80211_CMD_SET_WDS_PEER: Set the MAC address of the peer on a WDS interface. |
| 391 | * | 396 | * |
| 397 | * @NL80211_CMD_JOIN_MESH: Join a mesh. The mesh ID must be given, and initial | ||
| 398 | * mesh config parameters may be given. | ||
| 399 | * @NL80211_CMD_LEAVE_MESH: Leave the mesh network -- no special arguments, the | ||
| 400 | * network is determined by the network interface. | ||
| 401 | * | ||
| 402 | * @NL80211_CMD_UNPROT_DEAUTHENTICATE: Unprotected deauthentication frame | ||
| 403 | * notification. This event is used to indicate that an unprotected | ||
| 404 | * deauthentication frame was dropped when MFP is in use. | ||
| 405 | * @NL80211_CMD_UNPROT_DISASSOCIATE: Unprotected disassociation frame | ||
| 406 | * notification. This event is used to indicate that an unprotected | ||
| 407 | * disassociation frame was dropped when MFP is in use. | ||
| 408 | * | ||
| 392 | * @NL80211_CMD_MAX: highest used command number | 409 | * @NL80211_CMD_MAX: highest used command number |
| 393 | * @__NL80211_CMD_AFTER_LAST: internal use | 410 | * @__NL80211_CMD_AFTER_LAST: internal use |
| 394 | */ | 411 | */ |
| @@ -431,8 +448,8 @@ enum nl80211_commands { | |||
| 431 | NL80211_CMD_SET_REG, | 448 | NL80211_CMD_SET_REG, |
| 432 | NL80211_CMD_REQ_SET_REG, | 449 | NL80211_CMD_REQ_SET_REG, |
| 433 | 450 | ||
| 434 | NL80211_CMD_GET_MESH_PARAMS, | 451 | NL80211_CMD_GET_MESH_CONFIG, |
| 435 | NL80211_CMD_SET_MESH_PARAMS, | 452 | NL80211_CMD_SET_MESH_CONFIG, |
| 436 | 453 | ||
| 437 | NL80211_CMD_SET_MGMT_EXTRA_IE /* reserved; not used */, | 454 | NL80211_CMD_SET_MGMT_EXTRA_IE /* reserved; not used */, |
| 438 | 455 | ||
| @@ -493,6 +510,14 @@ enum nl80211_commands { | |||
| 493 | NL80211_CMD_SET_CHANNEL, | 510 | NL80211_CMD_SET_CHANNEL, |
| 494 | NL80211_CMD_SET_WDS_PEER, | 511 | NL80211_CMD_SET_WDS_PEER, |
| 495 | 512 | ||
| 513 | NL80211_CMD_FRAME_WAIT_CANCEL, | ||
| 514 | |||
| 515 | NL80211_CMD_JOIN_MESH, | ||
| 516 | NL80211_CMD_LEAVE_MESH, | ||
| 517 | |||
| 518 | NL80211_CMD_UNPROT_DEAUTHENTICATE, | ||
| 519 | NL80211_CMD_UNPROT_DISASSOCIATE, | ||
| 520 | |||
| 496 | /* add new commands above here */ | 521 | /* add new commands above here */ |
| 497 | 522 | ||
| 498 | /* used to define NL80211_CMD_MAX below */ | 523 | /* used to define NL80211_CMD_MAX below */ |
| @@ -513,6 +538,10 @@ enum nl80211_commands { | |||
| 513 | #define NL80211_CMD_DISASSOCIATE NL80211_CMD_DISASSOCIATE | 538 | #define NL80211_CMD_DISASSOCIATE NL80211_CMD_DISASSOCIATE |
| 514 | #define NL80211_CMD_REG_BEACON_HINT NL80211_CMD_REG_BEACON_HINT | 539 | #define NL80211_CMD_REG_BEACON_HINT NL80211_CMD_REG_BEACON_HINT |
| 515 | 540 | ||
| 541 | /* source-level API compatibility */ | ||
| 542 | #define NL80211_CMD_GET_MESH_PARAMS NL80211_CMD_GET_MESH_CONFIG | ||
| 543 | #define NL80211_CMD_SET_MESH_PARAMS NL80211_CMD_SET_MESH_CONFIG | ||
| 544 | |||
| 516 | /** | 545 | /** |
| 517 | * enum nl80211_attrs - nl80211 netlink attributes | 546 | * enum nl80211_attrs - nl80211 netlink attributes |
| 518 | * | 547 | * |
| @@ -758,6 +787,9 @@ enum nl80211_commands { | |||
| 758 | * cache, a wiphy attribute. | 787 | * cache, a wiphy attribute. |
| 759 | * | 788 | * |
| 760 | * @NL80211_ATTR_DURATION: Duration of an operation in milliseconds, u32. | 789 | * @NL80211_ATTR_DURATION: Duration of an operation in milliseconds, u32. |
| 790 | * @NL80211_ATTR_MAX_REMAIN_ON_CHANNEL_DURATION: Device attribute that | ||
| 791 | * specifies the maximum duration that can be requested with the | ||
| 792 | * remain-on-channel operation, in milliseconds, u32. | ||
| 761 | * | 793 | * |
| 762 | * @NL80211_ATTR_COOKIE: Generic 64-bit cookie to identify objects. | 794 | * @NL80211_ATTR_COOKIE: Generic 64-bit cookie to identify objects. |
| 763 | * | 795 | * |
| @@ -804,6 +836,51 @@ enum nl80211_commands { | |||
| 804 | * @NL80211_ATTR_SUPPORT_IBSS_RSN: The device supports IBSS RSN, which mostly | 836 | * @NL80211_ATTR_SUPPORT_IBSS_RSN: The device supports IBSS RSN, which mostly |
| 805 | * means support for per-station GTKs. | 837 | * means support for per-station GTKs. |
| 806 | * | 838 | * |
| 839 | * @NL80211_ATTR_WIPHY_ANTENNA_TX: Bitmap of allowed antennas for transmitting. | ||
| 840 | * This can be used to mask out antennas which are not attached or should | ||
| 841 | * not be used for transmitting. If an antenna is not selected in this | ||
| 842 | * bitmap the hardware is not allowed to transmit on this antenna. | ||
| 843 | * | ||
| 844 | * Each bit represents one antenna, starting with antenna 1 at the first | ||
| 845 | * bit. Depending on which antennas are selected in the bitmap, 802.11n | ||
| 846 | * drivers can derive which chainmasks to use (if all antennas belonging to | ||
| 847 | * a particular chain are disabled this chain should be disabled) and if | ||
| 848 | * a chain has diversity antennas wether diversity should be used or not. | ||
| 849 | * HT capabilities (STBC, TX Beamforming, Antenna selection) can be | ||
| 850 | * derived from the available chains after applying the antenna mask. | ||
| 851 | * Non-802.11n drivers can derive wether to use diversity or not. | ||
| 852 | * Drivers may reject configurations or RX/TX mask combinations they cannot | ||
| 853 | * support by returning -EINVAL. | ||
| 854 | * | ||
| 855 | * @NL80211_ATTR_WIPHY_ANTENNA_RX: Bitmap of allowed antennas for receiving. | ||
| 856 | * This can be used to mask out antennas which are not attached or should | ||
| 857 | * not be used for receiving. If an antenna is not selected in this bitmap | ||
| 858 | * the hardware should not be configured to receive on this antenna. | ||
| 859 | * For a more detailed descripton see @NL80211_ATTR_WIPHY_ANTENNA_TX. | ||
| 860 | * | ||
| 861 | * @NL80211_ATTR_WIPHY_ANTENNA_AVAIL_TX: Bitmap of antennas which are available | ||
| 862 | * for configuration as TX antennas via the above parameters. | ||
| 863 | * | ||
| 864 | * @NL80211_ATTR_WIPHY_ANTENNA_AVAIL_RX: Bitmap of antennas which are available | ||
| 865 | * for configuration as RX antennas via the above parameters. | ||
| 866 | * | ||
| 867 | * @NL80211_ATTR_MCAST_RATE: Multicast tx rate (in 100 kbps) for IBSS | ||
| 868 | * | ||
| 869 | * @NL80211_ATTR_OFFCHANNEL_TX_OK: For management frame TX, the frame may be | ||
| 870 | * transmitted on another channel when the channel given doesn't match | ||
| 871 | * the current channel. If the current channel doesn't match and this | ||
| 872 | * flag isn't set, the frame will be rejected. This is also used as an | ||
| 873 | * nl80211 capability flag. | ||
| 874 | * | ||
| 875 | * @NL80211_ATTR_BSS_HTOPMODE: HT operation mode (u16) | ||
| 876 | * | ||
| 877 | * @NL80211_ATTR_KEY_DEFAULT_TYPES: A nested attribute containing flags | ||
| 878 | * attributes, specifying what a key should be set as default as. | ||
| 879 | * See &enum nl80211_key_default_types. | ||
| 880 | * | ||
| 881 | * @NL80211_ATTR_MESH_SETUP: Optional mesh setup parameters. These cannot be | ||
| 882 | * changed once the mesh is active. | ||
| 883 | * | ||
| 807 | * @NL80211_ATTR_MAX: highest attribute number currently defined | 884 | * @NL80211_ATTR_MAX: highest attribute number currently defined |
| 808 | * @__NL80211_ATTR_AFTER_LAST: internal use | 885 | * @__NL80211_ATTR_AFTER_LAST: internal use |
| 809 | */ | 886 | */ |
| @@ -858,7 +935,7 @@ enum nl80211_attrs { | |||
| 858 | NL80211_ATTR_REG_ALPHA2, | 935 | NL80211_ATTR_REG_ALPHA2, |
| 859 | NL80211_ATTR_REG_RULES, | 936 | NL80211_ATTR_REG_RULES, |
| 860 | 937 | ||
| 861 | NL80211_ATTR_MESH_PARAMS, | 938 | NL80211_ATTR_MESH_CONFIG, |
| 862 | 939 | ||
| 863 | NL80211_ATTR_BSS_BASIC_RATES, | 940 | NL80211_ATTR_BSS_BASIC_RATES, |
| 864 | 941 | ||
| @@ -973,6 +1050,24 @@ enum nl80211_attrs { | |||
| 973 | 1050 | ||
| 974 | NL80211_ATTR_SUPPORT_IBSS_RSN, | 1051 | NL80211_ATTR_SUPPORT_IBSS_RSN, |
| 975 | 1052 | ||
| 1053 | NL80211_ATTR_WIPHY_ANTENNA_TX, | ||
| 1054 | NL80211_ATTR_WIPHY_ANTENNA_RX, | ||
| 1055 | |||
| 1056 | NL80211_ATTR_MCAST_RATE, | ||
| 1057 | |||
| 1058 | NL80211_ATTR_OFFCHANNEL_TX_OK, | ||
| 1059 | |||
| 1060 | NL80211_ATTR_BSS_HT_OPMODE, | ||
| 1061 | |||
| 1062 | NL80211_ATTR_KEY_DEFAULT_TYPES, | ||
| 1063 | |||
| 1064 | NL80211_ATTR_MAX_REMAIN_ON_CHANNEL_DURATION, | ||
| 1065 | |||
| 1066 | NL80211_ATTR_MESH_SETUP, | ||
| 1067 | |||
| 1068 | NL80211_ATTR_WIPHY_ANTENNA_AVAIL_TX, | ||
| 1069 | NL80211_ATTR_WIPHY_ANTENNA_AVAIL_RX, | ||
| 1070 | |||
| 976 | /* add attributes here, update the policy in nl80211.c */ | 1071 | /* add attributes here, update the policy in nl80211.c */ |
| 977 | 1072 | ||
| 978 | __NL80211_ATTR_AFTER_LAST, | 1073 | __NL80211_ATTR_AFTER_LAST, |
| @@ -981,6 +1076,7 @@ enum nl80211_attrs { | |||
| 981 | 1076 | ||
| 982 | /* source-level API compatibility */ | 1077 | /* source-level API compatibility */ |
| 983 | #define NL80211_ATTR_SCAN_GENERATION NL80211_ATTR_GENERATION | 1078 | #define NL80211_ATTR_SCAN_GENERATION NL80211_ATTR_GENERATION |
| 1079 | #define NL80211_ATTR_MESH_PARAMS NL80211_ATTR_MESH_CONFIG | ||
| 984 | 1080 | ||
| 985 | /* | 1081 | /* |
| 986 | * Allow user space programs to use #ifdef on new attributes by defining them | 1082 | * Allow user space programs to use #ifdef on new attributes by defining them |
| @@ -1139,6 +1235,7 @@ enum nl80211_rate_info { | |||
| 1139 | * station) | 1235 | * station) |
| 1140 | * @NL80211_STA_INFO_TX_RETRIES: total retries (u32, to this station) | 1236 | * @NL80211_STA_INFO_TX_RETRIES: total retries (u32, to this station) |
| 1141 | * @NL80211_STA_INFO_TX_FAILED: total failed packets (u32, to this station) | 1237 | * @NL80211_STA_INFO_TX_FAILED: total failed packets (u32, to this station) |
| 1238 | * @NL80211_STA_INFO_SIGNAL_AVG: signal strength average (u8, dBm) | ||
| 1142 | */ | 1239 | */ |
| 1143 | enum nl80211_sta_info { | 1240 | enum nl80211_sta_info { |
| 1144 | __NL80211_STA_INFO_INVALID, | 1241 | __NL80211_STA_INFO_INVALID, |
| @@ -1154,6 +1251,7 @@ enum nl80211_sta_info { | |||
| 1154 | NL80211_STA_INFO_TX_PACKETS, | 1251 | NL80211_STA_INFO_TX_PACKETS, |
| 1155 | NL80211_STA_INFO_TX_RETRIES, | 1252 | NL80211_STA_INFO_TX_RETRIES, |
| 1156 | NL80211_STA_INFO_TX_FAILED, | 1253 | NL80211_STA_INFO_TX_FAILED, |
| 1254 | NL80211_STA_INFO_SIGNAL_AVG, | ||
| 1157 | 1255 | ||
| 1158 | /* keep last */ | 1256 | /* keep last */ |
| 1159 | __NL80211_STA_INFO_AFTER_LAST, | 1257 | __NL80211_STA_INFO_AFTER_LAST, |
| @@ -1307,7 +1405,11 @@ enum nl80211_bitrate_attr { | |||
| 1307 | * wireless core it thinks its knows the regulatory domain we should be in. | 1405 | * wireless core it thinks its knows the regulatory domain we should be in. |
| 1308 | * @NL80211_REGDOM_SET_BY_COUNTRY_IE: the wireless core has received an | 1406 | * @NL80211_REGDOM_SET_BY_COUNTRY_IE: the wireless core has received an |
| 1309 | * 802.11 country information element with regulatory information it | 1407 | * 802.11 country information element with regulatory information it |
| 1310 | * thinks we should consider. | 1408 | * thinks we should consider. cfg80211 only processes the country |
| 1409 | * code from the IE, and relies on the regulatory domain information | ||
| 1410 | * structure pased by userspace (CRDA) from our wireless-regdb. | ||
| 1411 | * If a channel is enabled but the country code indicates it should | ||
| 1412 | * be disabled we disable the channel and re-enable it upon disassociation. | ||
| 1311 | */ | 1413 | */ |
| 1312 | enum nl80211_reg_initiator { | 1414 | enum nl80211_reg_initiator { |
| 1313 | NL80211_REGDOM_SET_BY_CORE, | 1415 | NL80211_REGDOM_SET_BY_CORE, |
| @@ -1476,7 +1578,8 @@ enum nl80211_mntr_flags { | |||
| 1476 | /** | 1578 | /** |
| 1477 | * enum nl80211_meshconf_params - mesh configuration parameters | 1579 | * enum nl80211_meshconf_params - mesh configuration parameters |
| 1478 | * | 1580 | * |
| 1479 | * Mesh configuration parameters | 1581 | * Mesh configuration parameters. These can be changed while the mesh is |
| 1582 | * active. | ||
| 1480 | * | 1583 | * |
| 1481 | * @__NL80211_MESHCONF_INVALID: internal use | 1584 | * @__NL80211_MESHCONF_INVALID: internal use |
| 1482 | * | 1585 | * |
| @@ -1525,6 +1628,9 @@ enum nl80211_mntr_flags { | |||
| 1525 | * | 1628 | * |
| 1526 | * @NL80211_MESHCONF_ROOTMODE: whether root mode is enabled or not | 1629 | * @NL80211_MESHCONF_ROOTMODE: whether root mode is enabled or not |
| 1527 | * | 1630 | * |
| 1631 | * @NL80211_MESHCONF_ELEMENT_TTL: specifies the value of TTL field set at a | ||
| 1632 | * source mesh point for path selection elements. | ||
| 1633 | * | ||
| 1528 | * @NL80211_MESHCONF_ATTR_MAX: highest possible mesh configuration attribute | 1634 | * @NL80211_MESHCONF_ATTR_MAX: highest possible mesh configuration attribute |
| 1529 | * | 1635 | * |
| 1530 | * @__NL80211_MESHCONF_ATTR_AFTER_LAST: internal use | 1636 | * @__NL80211_MESHCONF_ATTR_AFTER_LAST: internal use |
| @@ -1545,6 +1651,7 @@ enum nl80211_meshconf_params { | |||
| 1545 | NL80211_MESHCONF_HWMP_PREQ_MIN_INTERVAL, | 1651 | NL80211_MESHCONF_HWMP_PREQ_MIN_INTERVAL, |
| 1546 | NL80211_MESHCONF_HWMP_NET_DIAM_TRVS_TIME, | 1652 | NL80211_MESHCONF_HWMP_NET_DIAM_TRVS_TIME, |
| 1547 | NL80211_MESHCONF_HWMP_ROOTMODE, | 1653 | NL80211_MESHCONF_HWMP_ROOTMODE, |
| 1654 | NL80211_MESHCONF_ELEMENT_TTL, | ||
| 1548 | 1655 | ||
| 1549 | /* keep last */ | 1656 | /* keep last */ |
| 1550 | __NL80211_MESHCONF_ATTR_AFTER_LAST, | 1657 | __NL80211_MESHCONF_ATTR_AFTER_LAST, |
| @@ -1552,6 +1659,39 @@ enum nl80211_meshconf_params { | |||
| 1552 | }; | 1659 | }; |
| 1553 | 1660 | ||
| 1554 | /** | 1661 | /** |
| 1662 | * enum nl80211_mesh_setup_params - mesh setup parameters | ||
| 1663 | * | ||
| 1664 | * Mesh setup parameters. These are used to start/join a mesh and cannot be | ||
| 1665 | * changed while the mesh is active. | ||
| 1666 | * | ||
| 1667 | * @__NL80211_MESH_SETUP_INVALID: Internal use | ||
| 1668 | * | ||
| 1669 | * @NL80211_MESH_SETUP_ENABLE_VENDOR_PATH_SEL: Enable this option to use a | ||
| 1670 | * vendor specific path selection algorithm or disable it to use the default | ||
| 1671 | * HWMP. | ||
| 1672 | * | ||
| 1673 | * @NL80211_MESH_SETUP_ENABLE_VENDOR_METRIC: Enable this option to use a | ||
| 1674 | * vendor specific path metric or disable it to use the default Airtime | ||
| 1675 | * metric. | ||
| 1676 | * | ||
| 1677 | * @NL80211_MESH_SETUP_VENDOR_PATH_SEL_IE: A vendor specific information | ||
| 1678 | * element that vendors will use to identify the path selection methods and | ||
| 1679 | * metrics in use. | ||
| 1680 | * | ||
| 1681 | * @__NL80211_MESH_SETUP_ATTR_AFTER_LAST: Internal use | ||
| 1682 | */ | ||
| 1683 | enum nl80211_mesh_setup_params { | ||
| 1684 | __NL80211_MESH_SETUP_INVALID, | ||
| 1685 | NL80211_MESH_SETUP_ENABLE_VENDOR_PATH_SEL, | ||
| 1686 | NL80211_MESH_SETUP_ENABLE_VENDOR_METRIC, | ||
| 1687 | NL80211_MESH_SETUP_VENDOR_PATH_SEL_IE, | ||
| 1688 | |||
| 1689 | /* keep last */ | ||
| 1690 | __NL80211_MESH_SETUP_ATTR_AFTER_LAST, | ||
| 1691 | NL80211_MESH_SETUP_ATTR_MAX = __NL80211_MESH_SETUP_ATTR_AFTER_LAST - 1 | ||
| 1692 | }; | ||
| 1693 | |||
| 1694 | /** | ||
| 1555 | * enum nl80211_txq_attr - TX queue parameter attributes | 1695 | * enum nl80211_txq_attr - TX queue parameter attributes |
| 1556 | * @__NL80211_TXQ_ATTR_INVALID: Attribute number 0 is reserved | 1696 | * @__NL80211_TXQ_ATTR_INVALID: Attribute number 0 is reserved |
| 1557 | * @NL80211_TXQ_ATTR_QUEUE: TX queue identifier (NL80211_TXQ_Q_*) | 1697 | * @NL80211_TXQ_ATTR_QUEUE: TX queue identifier (NL80211_TXQ_Q_*) |
| @@ -1709,6 +1849,23 @@ enum nl80211_wpa_versions { | |||
| 1709 | }; | 1849 | }; |
| 1710 | 1850 | ||
| 1711 | /** | 1851 | /** |
| 1852 | * enum nl80211_key_default_types - key default types | ||
| 1853 | * @__NL80211_KEY_DEFAULT_TYPE_INVALID: invalid | ||
| 1854 | * @NL80211_KEY_DEFAULT_TYPE_UNICAST: key should be used as default | ||
| 1855 | * unicast key | ||
| 1856 | * @NL80211_KEY_DEFAULT_TYPE_MULTICAST: key should be used as default | ||
| 1857 | * multicast key | ||
| 1858 | * @NUM_NL80211_KEY_DEFAULT_TYPES: number of default types | ||
| 1859 | */ | ||
| 1860 | enum nl80211_key_default_types { | ||
| 1861 | __NL80211_KEY_DEFAULT_TYPE_INVALID, | ||
| 1862 | NL80211_KEY_DEFAULT_TYPE_UNICAST, | ||
| 1863 | NL80211_KEY_DEFAULT_TYPE_MULTICAST, | ||
| 1864 | |||
| 1865 | NUM_NL80211_KEY_DEFAULT_TYPES | ||
| 1866 | }; | ||
| 1867 | |||
| 1868 | /** | ||
| 1712 | * enum nl80211_key_attributes - key attributes | 1869 | * enum nl80211_key_attributes - key attributes |
| 1713 | * @__NL80211_KEY_INVALID: invalid | 1870 | * @__NL80211_KEY_INVALID: invalid |
| 1714 | * @NL80211_KEY_DATA: (temporal) key data; for TKIP this consists of | 1871 | * @NL80211_KEY_DATA: (temporal) key data; for TKIP this consists of |
| @@ -1724,6 +1881,9 @@ enum nl80211_wpa_versions { | |||
| 1724 | * @NL80211_KEY_TYPE: the key type from enum nl80211_key_type, if not | 1881 | * @NL80211_KEY_TYPE: the key type from enum nl80211_key_type, if not |
| 1725 | * specified the default depends on whether a MAC address was | 1882 | * specified the default depends on whether a MAC address was |
| 1726 | * given with the command using the key or not (u32) | 1883 | * given with the command using the key or not (u32) |
| 1884 | * @NL80211_KEY_DEFAULT_TYPES: A nested attribute containing flags | ||
| 1885 | * attributes, specifying what a key should be set as default as. | ||
| 1886 | * See &enum nl80211_key_default_types. | ||
| 1727 | * @__NL80211_KEY_AFTER_LAST: internal | 1887 | * @__NL80211_KEY_AFTER_LAST: internal |
| 1728 | * @NL80211_KEY_MAX: highest key attribute | 1888 | * @NL80211_KEY_MAX: highest key attribute |
| 1729 | */ | 1889 | */ |
| @@ -1736,6 +1896,7 @@ enum nl80211_key_attributes { | |||
| 1736 | NL80211_KEY_DEFAULT, | 1896 | NL80211_KEY_DEFAULT, |
| 1737 | NL80211_KEY_DEFAULT_MGMT, | 1897 | NL80211_KEY_DEFAULT_MGMT, |
| 1738 | NL80211_KEY_TYPE, | 1898 | NL80211_KEY_TYPE, |
| 1899 | NL80211_KEY_DEFAULT_TYPES, | ||
| 1739 | 1900 | ||
| 1740 | /* keep last */ | 1901 | /* keep last */ |
| 1741 | __NL80211_KEY_AFTER_LAST, | 1902 | __NL80211_KEY_AFTER_LAST, |
| @@ -1786,6 +1947,8 @@ enum nl80211_ps_state { | |||
| 1786 | * the minimum amount the RSSI level must change after an event before a | 1947 | * the minimum amount the RSSI level must change after an event before a |
| 1787 | * new event may be issued (to reduce effects of RSSI oscillation). | 1948 | * new event may be issued (to reduce effects of RSSI oscillation). |
| 1788 | * @NL80211_ATTR_CQM_RSSI_THRESHOLD_EVENT: RSSI threshold event | 1949 | * @NL80211_ATTR_CQM_RSSI_THRESHOLD_EVENT: RSSI threshold event |
| 1950 | * @NL80211_ATTR_CQM_PKT_LOSS_EVENT: a u32 value indicating that this many | ||
| 1951 | * consecutive packets were not acknowledged by the peer | ||
| 1789 | * @__NL80211_ATTR_CQM_AFTER_LAST: internal | 1952 | * @__NL80211_ATTR_CQM_AFTER_LAST: internal |
| 1790 | * @NL80211_ATTR_CQM_MAX: highest key attribute | 1953 | * @NL80211_ATTR_CQM_MAX: highest key attribute |
| 1791 | */ | 1954 | */ |
| @@ -1794,6 +1957,7 @@ enum nl80211_attr_cqm { | |||
| 1794 | NL80211_ATTR_CQM_RSSI_THOLD, | 1957 | NL80211_ATTR_CQM_RSSI_THOLD, |
| 1795 | NL80211_ATTR_CQM_RSSI_HYST, | 1958 | NL80211_ATTR_CQM_RSSI_HYST, |
| 1796 | NL80211_ATTR_CQM_RSSI_THRESHOLD_EVENT, | 1959 | NL80211_ATTR_CQM_RSSI_THRESHOLD_EVENT, |
| 1960 | NL80211_ATTR_CQM_PKT_LOSS_EVENT, | ||
| 1797 | 1961 | ||
| 1798 | /* keep last */ | 1962 | /* keep last */ |
| 1799 | __NL80211_ATTR_CQM_AFTER_LAST, | 1963 | __NL80211_ATTR_CQM_AFTER_LAST, |
diff --git a/include/linux/rfkill.h b/include/linux/rfkill.h index 08c32e4f261a..c6c608482cba 100644 --- a/include/linux/rfkill.h +++ b/include/linux/rfkill.h | |||
| @@ -354,37 +354,6 @@ static inline bool rfkill_blocked(struct rfkill *rfkill) | |||
| 354 | } | 354 | } |
| 355 | #endif /* RFKILL || RFKILL_MODULE */ | 355 | #endif /* RFKILL || RFKILL_MODULE */ |
| 356 | 356 | ||
| 357 | |||
| 358 | #ifdef CONFIG_RFKILL_LEDS | ||
| 359 | /** | ||
| 360 | * rfkill_get_led_trigger_name - Get the LED trigger name for the button's LED. | ||
| 361 | * This function might return a NULL pointer if registering of the | ||
| 362 | * LED trigger failed. Use this as "default_trigger" for the LED. | ||
| 363 | */ | ||
| 364 | const char *rfkill_get_led_trigger_name(struct rfkill *rfkill); | ||
| 365 | |||
| 366 | /** | ||
| 367 | * rfkill_set_led_trigger_name -- set the LED trigger name | ||
| 368 | * @rfkill: rfkill struct | ||
| 369 | * @name: LED trigger name | ||
| 370 | * | ||
| 371 | * This function sets the LED trigger name of the radio LED | ||
| 372 | * trigger that rfkill creates. It is optional, but if called | ||
| 373 | * must be called before rfkill_register() to be effective. | ||
| 374 | */ | ||
| 375 | void rfkill_set_led_trigger_name(struct rfkill *rfkill, const char *name); | ||
| 376 | #else | ||
| 377 | static inline const char *rfkill_get_led_trigger_name(struct rfkill *rfkill) | ||
| 378 | { | ||
| 379 | return NULL; | ||
| 380 | } | ||
| 381 | |||
| 382 | static inline void | ||
| 383 | rfkill_set_led_trigger_name(struct rfkill *rfkill, const char *name) | ||
| 384 | { | ||
| 385 | } | ||
| 386 | #endif | ||
| 387 | |||
| 388 | #endif /* __KERNEL__ */ | 357 | #endif /* __KERNEL__ */ |
| 389 | 358 | ||
| 390 | #endif /* RFKILL_H */ | 359 | #endif /* RFKILL_H */ |
diff --git a/include/linux/security.h b/include/linux/security.h index fd4d55fb8845..d47a4c24b3e4 100644 --- a/include/linux/security.h +++ b/include/linux/security.h | |||
| @@ -796,8 +796,9 @@ static inline void security_free_mnt_opts(struct security_mnt_opts *opts) | |||
| 796 | * @unix_stream_connect: | 796 | * @unix_stream_connect: |
| 797 | * Check permissions before establishing a Unix domain stream connection | 797 | * Check permissions before establishing a Unix domain stream connection |
| 798 | * between @sock and @other. | 798 | * between @sock and @other. |
| 799 | * @sock contains the socket structure. | 799 | * @sock contains the sock structure. |
| 800 | * @other contains the peer socket structure. | 800 | * @other contains the peer sock structure. |
| 801 | * @newsk contains the new sock structure. | ||
| 801 | * Return 0 if permission is granted. | 802 | * Return 0 if permission is granted. |
| 802 | * @unix_may_send: | 803 | * @unix_may_send: |
| 803 | * Check permissions before connecting or sending datagrams from @sock to | 804 | * Check permissions before connecting or sending datagrams from @sock to |
| @@ -1568,8 +1569,7 @@ struct security_operations { | |||
| 1568 | int (*inode_getsecctx)(struct inode *inode, void **ctx, u32 *ctxlen); | 1569 | int (*inode_getsecctx)(struct inode *inode, void **ctx, u32 *ctxlen); |
| 1569 | 1570 | ||
| 1570 | #ifdef CONFIG_SECURITY_NETWORK | 1571 | #ifdef CONFIG_SECURITY_NETWORK |
| 1571 | int (*unix_stream_connect) (struct socket *sock, | 1572 | int (*unix_stream_connect) (struct sock *sock, struct sock *other, struct sock *newsk); |
| 1572 | struct socket *other, struct sock *newsk); | ||
| 1573 | int (*unix_may_send) (struct socket *sock, struct socket *other); | 1573 | int (*unix_may_send) (struct socket *sock, struct socket *other); |
| 1574 | 1574 | ||
| 1575 | int (*socket_create) (int family, int type, int protocol, int kern); | 1575 | int (*socket_create) (int family, int type, int protocol, int kern); |
| @@ -2525,8 +2525,7 @@ static inline int security_inode_getsecctx(struct inode *inode, void **ctx, u32 | |||
| 2525 | 2525 | ||
| 2526 | #ifdef CONFIG_SECURITY_NETWORK | 2526 | #ifdef CONFIG_SECURITY_NETWORK |
| 2527 | 2527 | ||
| 2528 | int security_unix_stream_connect(struct socket *sock, struct socket *other, | 2528 | int security_unix_stream_connect(struct sock *sock, struct sock *other, struct sock *newsk); |
| 2529 | struct sock *newsk); | ||
| 2530 | int security_unix_may_send(struct socket *sock, struct socket *other); | 2529 | int security_unix_may_send(struct socket *sock, struct socket *other); |
| 2531 | int security_socket_create(int family, int type, int protocol, int kern); | 2530 | int security_socket_create(int family, int type, int protocol, int kern); |
| 2532 | int security_socket_post_create(struct socket *sock, int family, | 2531 | int security_socket_post_create(struct socket *sock, int family, |
| @@ -2567,8 +2566,8 @@ void security_tun_dev_post_create(struct sock *sk); | |||
| 2567 | int security_tun_dev_attach(struct sock *sk); | 2566 | int security_tun_dev_attach(struct sock *sk); |
| 2568 | 2567 | ||
| 2569 | #else /* CONFIG_SECURITY_NETWORK */ | 2568 | #else /* CONFIG_SECURITY_NETWORK */ |
| 2570 | static inline int security_unix_stream_connect(struct socket *sock, | 2569 | static inline int security_unix_stream_connect(struct sock *sock, |
| 2571 | struct socket *other, | 2570 | struct sock *other, |
| 2572 | struct sock *newsk) | 2571 | struct sock *newsk) |
| 2573 | { | 2572 | { |
| 2574 | return 0; | 2573 | return 0; |
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index e6ba898de61c..20ec0a64cb9f 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h | |||
| @@ -386,9 +386,10 @@ struct sk_buff { | |||
| 386 | #else | 386 | #else |
| 387 | __u8 deliver_no_wcard:1; | 387 | __u8 deliver_no_wcard:1; |
| 388 | #endif | 388 | #endif |
| 389 | __u8 ooo_okay:1; | ||
| 389 | kmemcheck_bitfield_end(flags2); | 390 | kmemcheck_bitfield_end(flags2); |
| 390 | 391 | ||
| 391 | /* 0/14 bit hole */ | 392 | /* 0/13 bit hole */ |
| 392 | 393 | ||
| 393 | #ifdef CONFIG_NET_DMA | 394 | #ifdef CONFIG_NET_DMA |
| 394 | dma_cookie_t dma_cookie; | 395 | dma_cookie_t dma_cookie; |
| @@ -1354,6 +1355,11 @@ static inline void skb_set_mac_header(struct sk_buff *skb, const int offset) | |||
| 1354 | } | 1355 | } |
| 1355 | #endif /* NET_SKBUFF_DATA_USES_OFFSET */ | 1356 | #endif /* NET_SKBUFF_DATA_USES_OFFSET */ |
| 1356 | 1357 | ||
| 1358 | static inline int skb_checksum_start_offset(const struct sk_buff *skb) | ||
| 1359 | { | ||
| 1360 | return skb->csum_start - skb_headroom(skb); | ||
| 1361 | } | ||
| 1362 | |||
| 1357 | static inline int skb_transport_offset(const struct sk_buff *skb) | 1363 | static inline int skb_transport_offset(const struct sk_buff *skb) |
| 1358 | { | 1364 | { |
| 1359 | return skb_transport_header(skb) - skb->data; | 1365 | return skb_transport_header(skb) - skb->data; |
| @@ -2164,8 +2170,9 @@ static inline bool skb_rx_queue_recorded(const struct sk_buff *skb) | |||
| 2164 | return skb->queue_mapping != 0; | 2170 | return skb->queue_mapping != 0; |
| 2165 | } | 2171 | } |
| 2166 | 2172 | ||
| 2167 | extern u16 skb_tx_hash(const struct net_device *dev, | 2173 | extern u16 __skb_tx_hash(const struct net_device *dev, |
| 2168 | const struct sk_buff *skb); | 2174 | const struct sk_buff *skb, |
| 2175 | unsigned int num_tx_queues); | ||
| 2169 | 2176 | ||
| 2170 | #ifdef CONFIG_XFRM | 2177 | #ifdef CONFIG_XFRM |
| 2171 | static inline struct sec_path *skb_sec_path(struct sk_buff *skb) | 2178 | static inline struct sec_path *skb_sec_path(struct sk_buff *skb) |
diff --git a/include/linux/socket.h b/include/linux/socket.h index 86b652fabf6e..5f65f14c4f44 100644 --- a/include/linux/socket.h +++ b/include/linux/socket.h | |||
| @@ -30,12 +30,10 @@ struct cred; | |||
| 30 | #define __sockaddr_check_size(size) \ | 30 | #define __sockaddr_check_size(size) \ |
| 31 | BUILD_BUG_ON(((size) > sizeof(struct __kernel_sockaddr_storage))) | 31 | BUILD_BUG_ON(((size) > sizeof(struct __kernel_sockaddr_storage))) |
| 32 | 32 | ||
| 33 | #ifdef __KERNEL__ | 33 | #ifdef CONFIG_PROC_FS |
| 34 | # ifdef CONFIG_PROC_FS | ||
| 35 | struct seq_file; | 34 | struct seq_file; |
| 36 | extern void socket_seq_show(struct seq_file *seq); | 35 | extern void socket_seq_show(struct seq_file *seq); |
| 37 | # endif | 36 | #endif |
| 38 | #endif /* __KERNEL__ */ | ||
| 39 | 37 | ||
| 40 | typedef unsigned short sa_family_t; | 38 | typedef unsigned short sa_family_t; |
| 41 | 39 | ||
| @@ -311,7 +309,6 @@ struct ucred { | |||
| 311 | /* IPX options */ | 309 | /* IPX options */ |
| 312 | #define IPX_TYPE 1 | 310 | #define IPX_TYPE 1 |
| 313 | 311 | ||
| 314 | #ifdef __KERNEL__ | ||
| 315 | extern void cred_to_ucred(struct pid *pid, const struct cred *cred, struct ucred *ucred); | 312 | extern void cred_to_ucred(struct pid *pid, const struct cred *cred, struct ucred *ucred); |
| 316 | 313 | ||
| 317 | 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); |
| @@ -333,6 +330,5 @@ struct timespec; | |||
| 333 | 330 | ||
| 334 | extern int __sys_recvmmsg(int fd, struct mmsghdr __user *mmsg, unsigned int vlen, | 331 | extern int __sys_recvmmsg(int fd, struct mmsghdr __user *mmsg, unsigned int vlen, |
| 335 | unsigned int flags, struct timespec *timeout); | 332 | unsigned int flags, struct timespec *timeout); |
| 336 | #endif | ||
| 337 | #endif /* not kernel and not glibc */ | 333 | #endif /* not kernel and not glibc */ |
| 338 | #endif /* _LINUX_SOCKET_H */ | 334 | #endif /* _LINUX_SOCKET_H */ |
diff --git a/include/linux/ssb/ssb.h b/include/linux/ssb/ssb.h index 623b704fdc42..9659eff52ca2 100644 --- a/include/linux/ssb/ssb.h +++ b/include/linux/ssb/ssb.h | |||
| @@ -55,6 +55,10 @@ struct ssb_sprom { | |||
| 55 | u8 tri5gl; /* 5.2GHz TX isolation */ | 55 | u8 tri5gl; /* 5.2GHz TX isolation */ |
| 56 | u8 tri5g; /* 5.3GHz TX isolation */ | 56 | u8 tri5g; /* 5.3GHz TX isolation */ |
| 57 | u8 tri5gh; /* 5.8GHz TX isolation */ | 57 | u8 tri5gh; /* 5.8GHz TX isolation */ |
| 58 | u8 txpid2g[4]; /* 2GHz TX power index */ | ||
| 59 | u8 txpid5gl[4]; /* 4.9 - 5.1GHz TX power index */ | ||
| 60 | u8 txpid5g[4]; /* 5.1 - 5.5GHz TX power index */ | ||
| 61 | u8 txpid5gh[4]; /* 5.5 - ...GHz TX power index */ | ||
| 58 | u8 rxpo2g; /* 2GHz RX power offset */ | 62 | u8 rxpo2g; /* 2GHz RX power offset */ |
| 59 | u8 rxpo5g; /* 5GHz RX power offset */ | 63 | u8 rxpo5g; /* 5GHz RX power offset */ |
| 60 | u8 rssisav2g; /* 2GHz RSSI params */ | 64 | u8 rssisav2g; /* 2GHz RSSI params */ |
diff --git a/include/linux/ssb/ssb_regs.h b/include/linux/ssb/ssb_regs.h index 11daf9c140e7..489f7b6d61c5 100644 --- a/include/linux/ssb/ssb_regs.h +++ b/include/linux/ssb/ssb_regs.h | |||
| @@ -299,6 +299,46 @@ | |||
| 299 | #define SSB_SPROM4_AGAIN2_SHIFT 0 | 299 | #define SSB_SPROM4_AGAIN2_SHIFT 0 |
| 300 | #define SSB_SPROM4_AGAIN3 0xFF00 /* Antenna 3 */ | 300 | #define SSB_SPROM4_AGAIN3 0xFF00 /* Antenna 3 */ |
| 301 | #define SSB_SPROM4_AGAIN3_SHIFT 8 | 301 | #define SSB_SPROM4_AGAIN3_SHIFT 8 |
| 302 | #define SSB_SPROM4_TXPID2G01 0x0062 /* TX Power Index 2GHz */ | ||
| 303 | #define SSB_SPROM4_TXPID2G0 0x00FF | ||
| 304 | #define SSB_SPROM4_TXPID2G0_SHIFT 0 | ||
| 305 | #define SSB_SPROM4_TXPID2G1 0xFF00 | ||
| 306 | #define SSB_SPROM4_TXPID2G1_SHIFT 8 | ||
| 307 | #define SSB_SPROM4_TXPID2G23 0x0064 /* TX Power Index 2GHz */ | ||
| 308 | #define SSB_SPROM4_TXPID2G2 0x00FF | ||
| 309 | #define SSB_SPROM4_TXPID2G2_SHIFT 0 | ||
| 310 | #define SSB_SPROM4_TXPID2G3 0xFF00 | ||
| 311 | #define SSB_SPROM4_TXPID2G3_SHIFT 8 | ||
| 312 | #define SSB_SPROM4_TXPID5G01 0x0066 /* TX Power Index 5GHz middle subband */ | ||
| 313 | #define SSB_SPROM4_TXPID5G0 0x00FF | ||
| 314 | #define SSB_SPROM4_TXPID5G0_SHIFT 0 | ||
| 315 | #define SSB_SPROM4_TXPID5G1 0xFF00 | ||
| 316 | #define SSB_SPROM4_TXPID5G1_SHIFT 8 | ||
| 317 | #define SSB_SPROM4_TXPID5G23 0x0068 /* TX Power Index 5GHz middle subband */ | ||
| 318 | #define SSB_SPROM4_TXPID5G2 0x00FF | ||
| 319 | #define SSB_SPROM4_TXPID5G2_SHIFT 0 | ||
| 320 | #define SSB_SPROM4_TXPID5G3 0xFF00 | ||
| 321 | #define SSB_SPROM4_TXPID5G3_SHIFT 8 | ||
| 322 | #define SSB_SPROM4_TXPID5GL01 0x006A /* TX Power Index 5GHz low subband */ | ||
| 323 | #define SSB_SPROM4_TXPID5GL0 0x00FF | ||
| 324 | #define SSB_SPROM4_TXPID5GL0_SHIFT 0 | ||
| 325 | #define SSB_SPROM4_TXPID5GL1 0xFF00 | ||
| 326 | #define SSB_SPROM4_TXPID5GL1_SHIFT 8 | ||
| 327 | #define SSB_SPROM4_TXPID5GL23 0x006C /* TX Power Index 5GHz low subband */ | ||
| 328 | #define SSB_SPROM4_TXPID5GL2 0x00FF | ||
| 329 | #define SSB_SPROM4_TXPID5GL2_SHIFT 0 | ||
| 330 | #define SSB_SPROM4_TXPID5GL3 0xFF00 | ||
| 331 | #define SSB_SPROM4_TXPID5GL3_SHIFT 8 | ||
| 332 | #define SSB_SPROM4_TXPID5GH01 0x006E /* TX Power Index 5GHz high subband */ | ||
| 333 | #define SSB_SPROM4_TXPID5GH0 0x00FF | ||
| 334 | #define SSB_SPROM4_TXPID5GH0_SHIFT 0 | ||
| 335 | #define SSB_SPROM4_TXPID5GH1 0xFF00 | ||
| 336 | #define SSB_SPROM4_TXPID5GH1_SHIFT 8 | ||
| 337 | #define SSB_SPROM4_TXPID5GH23 0x0070 /* TX Power Index 5GHz high subband */ | ||
| 338 | #define SSB_SPROM4_TXPID5GH2 0x00FF | ||
| 339 | #define SSB_SPROM4_TXPID5GH2_SHIFT 0 | ||
| 340 | #define SSB_SPROM4_TXPID5GH3 0xFF00 | ||
| 341 | #define SSB_SPROM4_TXPID5GH3_SHIFT 8 | ||
| 302 | #define SSB_SPROM4_MAXP_BG 0x0080 /* Max Power BG in path 1 */ | 342 | #define SSB_SPROM4_MAXP_BG 0x0080 /* Max Power BG in path 1 */ |
| 303 | #define SSB_SPROM4_MAXP_BG_MASK 0x00FF /* Mask for Max Power BG */ | 343 | #define SSB_SPROM4_MAXP_BG_MASK 0x00FF /* Mask for Max Power BG */ |
| 304 | #define SSB_SPROM4_ITSSI_BG 0xFF00 /* Mask for path 1 itssi_bg */ | 344 | #define SSB_SPROM4_ITSSI_BG 0xFF00 /* Mask for path 1 itssi_bg */ |
diff --git a/include/linux/stmmac.h b/include/linux/stmmac.h index d66c61774d95..e10352915698 100644 --- a/include/linux/stmmac.h +++ b/include/linux/stmmac.h | |||
| @@ -40,9 +40,9 @@ struct plat_stmmacenet_data { | |||
| 40 | int pmt; | 40 | int pmt; |
| 41 | void (*fix_mac_speed)(void *priv, unsigned int speed); | 41 | void (*fix_mac_speed)(void *priv, unsigned int speed); |
| 42 | void (*bus_setup)(void __iomem *ioaddr); | 42 | void (*bus_setup)(void __iomem *ioaddr); |
| 43 | #ifdef CONFIG_STM_DRIVERS | 43 | int (*init)(struct platform_device *pdev); |
| 44 | struct stm_pad_config *pad_config; | 44 | void (*exit)(struct platform_device *pdev); |
| 45 | #endif | 45 | void *custom_cfg; |
| 46 | void *bsp_priv; | 46 | void *bsp_priv; |
| 47 | }; | 47 | }; |
| 48 | 48 | ||
diff --git a/include/linux/tipc.h b/include/linux/tipc.h index d10614b29d59..1eefa3f6d1f4 100644 --- a/include/linux/tipc.h +++ b/include/linux/tipc.h | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * include/linux/tipc.h: Include file for TIPC socket interface | 2 | * include/linux/tipc.h: Include file for TIPC socket interface |
| 3 | * | 3 | * |
| 4 | * Copyright (c) 2003-2006, Ericsson AB | 4 | * Copyright (c) 2003-2006, Ericsson AB |
| 5 | * Copyright (c) 2005, Wind River Systems | 5 | * Copyright (c) 2005, Wind River Systems |
| 6 | * All rights reserved. | 6 | * All rights reserved. |
| @@ -42,7 +42,7 @@ | |||
| 42 | /* | 42 | /* |
| 43 | * TIPC addressing primitives | 43 | * TIPC addressing primitives |
| 44 | */ | 44 | */ |
| 45 | 45 | ||
| 46 | struct tipc_portid { | 46 | struct tipc_portid { |
| 47 | __u32 ref; | 47 | __u32 ref; |
| 48 | __u32 node; | 48 | __u32 node; |
| @@ -89,7 +89,7 @@ static inline unsigned int tipc_node(__u32 addr) | |||
| 89 | #define TIPC_TOP_SRV 1 /* topology service name type */ | 89 | #define TIPC_TOP_SRV 1 /* topology service name type */ |
| 90 | #define TIPC_RESERVED_TYPES 64 /* lowest user-publishable name type */ | 90 | #define TIPC_RESERVED_TYPES 64 /* lowest user-publishable name type */ |
| 91 | 91 | ||
| 92 | /* | 92 | /* |
| 93 | * Publication scopes when binding port names and port name sequences | 93 | * Publication scopes when binding port names and port name sequences |
| 94 | */ | 94 | */ |
| 95 | 95 | ||
| @@ -112,7 +112,7 @@ static inline unsigned int tipc_node(__u32 addr) | |||
| 112 | #define TIPC_HIGH_IMPORTANCE 2 | 112 | #define TIPC_HIGH_IMPORTANCE 2 |
| 113 | #define TIPC_CRITICAL_IMPORTANCE 3 | 113 | #define TIPC_CRITICAL_IMPORTANCE 3 |
| 114 | 114 | ||
| 115 | /* | 115 | /* |
| 116 | * Msg rejection/connection shutdown reasons | 116 | * Msg rejection/connection shutdown reasons |
| 117 | */ | 117 | */ |
| 118 | 118 | ||
| @@ -127,9 +127,9 @@ static inline unsigned int tipc_node(__u32 addr) | |||
| 127 | * TIPC topology subscription service definitions | 127 | * TIPC topology subscription service definitions |
| 128 | */ | 128 | */ |
| 129 | 129 | ||
| 130 | #define TIPC_SUB_PORTS 0x01 /* filter for port availability */ | 130 | #define TIPC_SUB_PORTS 0x01 /* filter for port availability */ |
| 131 | #define TIPC_SUB_SERVICE 0x02 /* filter for service availability */ | 131 | #define TIPC_SUB_SERVICE 0x02 /* filter for service availability */ |
| 132 | #define TIPC_SUB_CANCEL 0x04 /* cancel a subscription */ | 132 | #define TIPC_SUB_CANCEL 0x04 /* cancel a subscription */ |
| 133 | #if 0 | 133 | #if 0 |
| 134 | /* The following filter options are not currently implemented */ | 134 | /* The following filter options are not currently implemented */ |
| 135 | #define TIPC_SUB_NO_BIND_EVTS 0x04 /* filter out "publish" events */ | 135 | #define TIPC_SUB_NO_BIND_EVTS 0x04 /* filter out "publish" events */ |
| @@ -137,12 +137,12 @@ static inline unsigned int tipc_node(__u32 addr) | |||
| 137 | #define TIPC_SUB_SINGLE_EVT 0x10 /* expire after first event */ | 137 | #define TIPC_SUB_SINGLE_EVT 0x10 /* expire after first event */ |
| 138 | #endif | 138 | #endif |
| 139 | 139 | ||
| 140 | #define TIPC_WAIT_FOREVER ~0 /* timeout for permanent subscription */ | 140 | #define TIPC_WAIT_FOREVER (~0) /* timeout for permanent subscription */ |
| 141 | 141 | ||
| 142 | struct tipc_subscr { | 142 | struct tipc_subscr { |
| 143 | struct tipc_name_seq seq; /* name sequence of interest */ | 143 | struct tipc_name_seq seq; /* name sequence of interest */ |
| 144 | __u32 timeout; /* subscription duration (in ms) */ | 144 | __u32 timeout; /* subscription duration (in ms) */ |
| 145 | __u32 filter; /* bitmask of filter options */ | 145 | __u32 filter; /* bitmask of filter options */ |
| 146 | char usr_handle[8]; /* available for subscriber use */ | 146 | char usr_handle[8]; /* available for subscriber use */ |
| 147 | }; | 147 | }; |
| 148 | 148 | ||
diff --git a/include/linux/tipc_config.h b/include/linux/tipc_config.h index 9cde86c32412..7d42460a5e3c 100644 --- a/include/linux/tipc_config.h +++ b/include/linux/tipc_config.h | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * include/linux/tipc_config.h: Include file for TIPC configuration interface | 2 | * include/linux/tipc_config.h: Include file for TIPC configuration interface |
| 3 | * | 3 | * |
| 4 | * Copyright (c) 2003-2006, Ericsson AB | 4 | * Copyright (c) 2003-2006, Ericsson AB |
| 5 | * Copyright (c) 2005-2007, Wind River Systems | 5 | * Copyright (c) 2005-2007, Wind River Systems |
| 6 | * All rights reserved. | 6 | * All rights reserved. |
| @@ -54,19 +54,19 @@ | |||
| 54 | * which specify parameters or results for the operation. | 54 | * which specify parameters or results for the operation. |
| 55 | * | 55 | * |
| 56 | * For many operations, the request and reply messages have a fixed number | 56 | * For many operations, the request and reply messages have a fixed number |
| 57 | * of TLVs (usually zero or one); however, some reply messages may return | 57 | * of TLVs (usually zero or one); however, some reply messages may return |
| 58 | * a variable number of TLVs. A failed request is denoted by the presence | 58 | * a variable number of TLVs. A failed request is denoted by the presence |
| 59 | * of an "error string" TLV in the reply message instead of the TLV(s) the | 59 | * of an "error string" TLV in the reply message instead of the TLV(s) the |
| 60 | * reply should contain if the request succeeds. | 60 | * reply should contain if the request succeeds. |
| 61 | */ | 61 | */ |
| 62 | 62 | ||
| 63 | /* | 63 | /* |
| 64 | * Public commands: | 64 | * Public commands: |
| 65 | * May be issued by any process. | 65 | * May be issued by any process. |
| 66 | * Accepted by own node, or by remote node only if remote management enabled. | 66 | * Accepted by own node, or by remote node only if remote management enabled. |
| 67 | */ | 67 | */ |
| 68 | 68 | ||
| 69 | #define TIPC_CMD_NOOP 0x0000 /* tx none, rx none */ | 69 | #define TIPC_CMD_NOOP 0x0000 /* tx none, rx none */ |
| 70 | #define TIPC_CMD_GET_NODES 0x0001 /* tx net_addr, rx node_info(s) */ | 70 | #define TIPC_CMD_GET_NODES 0x0001 /* tx net_addr, rx node_info(s) */ |
| 71 | #define TIPC_CMD_GET_MEDIA_NAMES 0x0002 /* tx none, rx media_name(s) */ | 71 | #define TIPC_CMD_GET_MEDIA_NAMES 0x0002 /* tx none, rx media_name(s) */ |
| 72 | #define TIPC_CMD_GET_BEARER_NAMES 0x0003 /* tx none, rx bearer_name(s) */ | 72 | #define TIPC_CMD_GET_BEARER_NAMES 0x0003 /* tx none, rx bearer_name(s) */ |
| @@ -83,21 +83,21 @@ | |||
| 83 | #define TIPC_CMD_GET_LINK_PEER 0x000D /* tx link_name, rx ? */ | 83 | #define TIPC_CMD_GET_LINK_PEER 0x000D /* tx link_name, rx ? */ |
| 84 | #endif | 84 | #endif |
| 85 | 85 | ||
| 86 | /* | 86 | /* |
| 87 | * Protected commands: | 87 | * Protected commands: |
| 88 | * May only be issued by "network administration capable" process. | 88 | * May only be issued by "network administration capable" process. |
| 89 | * Accepted by own node, or by remote node only if remote management enabled | 89 | * Accepted by own node, or by remote node only if remote management enabled |
| 90 | * and this node is zone manager. | 90 | * and this node is zone manager. |
| 91 | */ | 91 | */ |
| 92 | 92 | ||
| 93 | #define TIPC_CMD_GET_REMOTE_MNG 0x4003 /* tx none, rx unsigned */ | 93 | #define TIPC_CMD_GET_REMOTE_MNG 0x4003 /* tx none, rx unsigned */ |
| 94 | #define TIPC_CMD_GET_MAX_PORTS 0x4004 /* tx none, rx unsigned */ | 94 | #define TIPC_CMD_GET_MAX_PORTS 0x4004 /* tx none, rx unsigned */ |
| 95 | #define TIPC_CMD_GET_MAX_PUBL 0x4005 /* tx none, rx unsigned */ | 95 | #define TIPC_CMD_GET_MAX_PUBL 0x4005 /* tx none, rx unsigned */ |
| 96 | #define TIPC_CMD_GET_MAX_SUBSCR 0x4006 /* tx none, rx unsigned */ | 96 | #define TIPC_CMD_GET_MAX_SUBSCR 0x4006 /* tx none, rx unsigned */ |
| 97 | #define TIPC_CMD_GET_MAX_ZONES 0x4007 /* tx none, rx unsigned */ | 97 | #define TIPC_CMD_GET_MAX_ZONES 0x4007 /* obsoleted */ |
| 98 | #define TIPC_CMD_GET_MAX_CLUSTERS 0x4008 /* tx none, rx unsigned */ | 98 | #define TIPC_CMD_GET_MAX_CLUSTERS 0x4008 /* obsoleted */ |
| 99 | #define TIPC_CMD_GET_MAX_NODES 0x4009 /* tx none, rx unsigned */ | 99 | #define TIPC_CMD_GET_MAX_NODES 0x4009 /* tx none, rx unsigned */ |
| 100 | #define TIPC_CMD_GET_MAX_SLAVES 0x400A /* tx none, rx unsigned */ | 100 | #define TIPC_CMD_GET_MAX_SLAVES 0x400A /* obsoleted */ |
| 101 | #define TIPC_CMD_GET_NETID 0x400B /* tx none, rx unsigned */ | 101 | #define TIPC_CMD_GET_NETID 0x400B /* tx none, rx unsigned */ |
| 102 | 102 | ||
| 103 | #define TIPC_CMD_ENABLE_BEARER 0x4101 /* tx bearer_config, rx none */ | 103 | #define TIPC_CMD_ENABLE_BEARER 0x4101 /* tx bearer_config, rx none */ |
| @@ -116,10 +116,10 @@ | |||
| 116 | #define TIPC_CMD_UNBLOCK_LINK 0x4106 /* tx link_name, rx none */ | 116 | #define TIPC_CMD_UNBLOCK_LINK 0x4106 /* tx link_name, rx none */ |
| 117 | #endif | 117 | #endif |
| 118 | 118 | ||
| 119 | /* | 119 | /* |
| 120 | * Private commands: | 120 | * Private commands: |
| 121 | * May only be issued by "network administration capable" process. | 121 | * May only be issued by "network administration capable" process. |
| 122 | * Accepted by own node only; cannot be used on a remote node. | 122 | * Accepted by own node only; cannot be used on a remote node. |
| 123 | */ | 123 | */ |
| 124 | 124 | ||
| 125 | #define TIPC_CMD_SET_NODE_ADDR 0x8001 /* tx net_addr, rx none */ | 125 | #define TIPC_CMD_SET_NODE_ADDR 0x8001 /* tx net_addr, rx none */ |
| @@ -130,10 +130,10 @@ | |||
| 130 | #define TIPC_CMD_SET_MAX_PORTS 0x8004 /* tx unsigned, rx none */ | 130 | #define TIPC_CMD_SET_MAX_PORTS 0x8004 /* tx unsigned, rx none */ |
| 131 | #define TIPC_CMD_SET_MAX_PUBL 0x8005 /* tx unsigned, rx none */ | 131 | #define TIPC_CMD_SET_MAX_PUBL 0x8005 /* tx unsigned, rx none */ |
| 132 | #define TIPC_CMD_SET_MAX_SUBSCR 0x8006 /* tx unsigned, rx none */ | 132 | #define TIPC_CMD_SET_MAX_SUBSCR 0x8006 /* tx unsigned, rx none */ |
| 133 | #define TIPC_CMD_SET_MAX_ZONES 0x8007 /* tx unsigned, rx none */ | 133 | #define TIPC_CMD_SET_MAX_ZONES 0x8007 /* obsoleted */ |
| 134 | #define TIPC_CMD_SET_MAX_CLUSTERS 0x8008 /* tx unsigned, rx none */ | 134 | #define TIPC_CMD_SET_MAX_CLUSTERS 0x8008 /* obsoleted */ |
| 135 | #define TIPC_CMD_SET_MAX_NODES 0x8009 /* tx unsigned, rx none */ | 135 | #define TIPC_CMD_SET_MAX_NODES 0x8009 /* tx unsigned, rx none */ |
| 136 | #define TIPC_CMD_SET_MAX_SLAVES 0x800A /* tx unsigned, rx none */ | 136 | #define TIPC_CMD_SET_MAX_SLAVES 0x800A /* obsoleted */ |
| 137 | #define TIPC_CMD_SET_NETID 0x800B /* tx unsigned, rx none */ | 137 | #define TIPC_CMD_SET_NETID 0x800B /* tx unsigned, rx none */ |
| 138 | 138 | ||
| 139 | /* | 139 | /* |
| @@ -156,20 +156,20 @@ | |||
| 156 | #define TIPC_TLV_ULTRA_STRING 5 /* char[32768] (max) */ | 156 | #define TIPC_TLV_ULTRA_STRING 5 /* char[32768] (max) */ |
| 157 | 157 | ||
| 158 | #define TIPC_TLV_ERROR_STRING 16 /* char[128] containing "error code" */ | 158 | #define TIPC_TLV_ERROR_STRING 16 /* char[128] containing "error code" */ |
| 159 | #define TIPC_TLV_NET_ADDR 17 /* 32-bit integer denoting <Z.C.N> */ | 159 | #define TIPC_TLV_NET_ADDR 17 /* 32-bit integer denoting <Z.C.N> */ |
| 160 | #define TIPC_TLV_MEDIA_NAME 18 /* char[TIPC_MAX_MEDIA_NAME] */ | 160 | #define TIPC_TLV_MEDIA_NAME 18 /* char[TIPC_MAX_MEDIA_NAME] */ |
| 161 | #define TIPC_TLV_BEARER_NAME 19 /* char[TIPC_MAX_BEARER_NAME] */ | 161 | #define TIPC_TLV_BEARER_NAME 19 /* char[TIPC_MAX_BEARER_NAME] */ |
| 162 | #define TIPC_TLV_LINK_NAME 20 /* char[TIPC_MAX_LINK_NAME] */ | 162 | #define TIPC_TLV_LINK_NAME 20 /* char[TIPC_MAX_LINK_NAME] */ |
| 163 | #define TIPC_TLV_NODE_INFO 21 /* struct tipc_node_info */ | 163 | #define TIPC_TLV_NODE_INFO 21 /* struct tipc_node_info */ |
| 164 | #define TIPC_TLV_LINK_INFO 22 /* struct tipc_link_info */ | 164 | #define TIPC_TLV_LINK_INFO 22 /* struct tipc_link_info */ |
| 165 | #define TIPC_TLV_BEARER_CONFIG 23 /* struct tipc_bearer_config */ | 165 | #define TIPC_TLV_BEARER_CONFIG 23 /* struct tipc_bearer_config */ |
| 166 | #define TIPC_TLV_LINK_CONFIG 24 /* struct tipc_link_config */ | 166 | #define TIPC_TLV_LINK_CONFIG 24 /* struct tipc_link_config */ |
| 167 | #define TIPC_TLV_NAME_TBL_QUERY 25 /* struct tipc_name_table_query */ | 167 | #define TIPC_TLV_NAME_TBL_QUERY 25 /* struct tipc_name_table_query */ |
| 168 | #define TIPC_TLV_PORT_REF 26 /* 32-bit port reference */ | 168 | #define TIPC_TLV_PORT_REF 26 /* 32-bit port reference */ |
| 169 | 169 | ||
| 170 | /* | 170 | /* |
| 171 | * Maximum sizes of TIPC bearer-related names (including terminating NUL) | 171 | * Maximum sizes of TIPC bearer-related names (including terminating NUL) |
| 172 | */ | 172 | */ |
| 173 | 173 | ||
| 174 | #define TIPC_MAX_MEDIA_NAME 16 /* format = media */ | 174 | #define TIPC_MAX_MEDIA_NAME 16 /* format = media */ |
| 175 | #define TIPC_MAX_IF_NAME 16 /* format = interface */ | 175 | #define TIPC_MAX_IF_NAME 16 /* format = interface */ |
| @@ -234,7 +234,7 @@ struct tipc_name_table_query { | |||
| 234 | }; | 234 | }; |
| 235 | 235 | ||
| 236 | /* | 236 | /* |
| 237 | * The error string TLV is a null-terminated string describing the cause | 237 | * The error string TLV is a null-terminated string describing the cause |
| 238 | * of the request failure. To simplify error processing (and to save space) | 238 | * of the request failure. To simplify error processing (and to save space) |
| 239 | * the first character of the string can be a special error code character | 239 | * the first character of the string can be a special error code character |
| 240 | * (lying by the range 0x80 to 0xFF) which represents a pre-defined reason. | 240 | * (lying by the range 0x80 to 0xFF) which represents a pre-defined reason. |
| @@ -254,16 +254,11 @@ struct tipc_link_create { | |||
| 254 | struct tipc_media_addr peer_addr; | 254 | struct tipc_media_addr peer_addr; |
| 255 | char bearer_name[TIPC_MAX_BEARER_NAME]; | 255 | char bearer_name[TIPC_MAX_BEARER_NAME]; |
| 256 | }; | 256 | }; |
| 257 | |||
| 258 | struct tipc_route_info { | ||
| 259 | __u32 dest; | ||
| 260 | __u32 router; | ||
| 261 | }; | ||
| 262 | #endif | 257 | #endif |
| 263 | 258 | ||
| 264 | /* | 259 | /* |
| 265 | * A TLV consists of a descriptor, followed by the TLV value. | 260 | * A TLV consists of a descriptor, followed by the TLV value. |
| 266 | * TLV descriptor fields are stored in network byte order; | 261 | * TLV descriptor fields are stored in network byte order; |
| 267 | * TLV values must also be stored in network byte order (where applicable). | 262 | * TLV values must also be stored in network byte order (where applicable). |
| 268 | * TLV descriptors must be aligned to addresses which are multiple of 4, | 263 | * TLV descriptors must be aligned to addresses which are multiple of 4, |
| 269 | * so up to 3 bytes of padding may exist at the end of the TLV value area. | 264 | * so up to 3 bytes of padding may exist at the end of the TLV value area. |
| @@ -299,7 +294,7 @@ static inline int TLV_OK(const void *tlv, __u16 space) | |||
| 299 | 294 | ||
| 300 | static inline int TLV_CHECK(const void *tlv, __u16 space, __u16 exp_type) | 295 | static inline int TLV_CHECK(const void *tlv, __u16 space, __u16 exp_type) |
| 301 | { | 296 | { |
| 302 | return TLV_OK(tlv, space) && | 297 | return TLV_OK(tlv, space) && |
| 303 | (ntohs(((struct tlv_desc *)tlv)->tlv_type) == exp_type); | 298 | (ntohs(((struct tlv_desc *)tlv)->tlv_type) == exp_type); |
| 304 | } | 299 | } |
| 305 | 300 | ||
| @@ -318,7 +313,7 @@ static inline int TLV_SET(void *tlv, __u16 type, void *data, __u16 len) | |||
| 318 | } | 313 | } |
| 319 | 314 | ||
| 320 | /* | 315 | /* |
| 321 | * A TLV list descriptor simplifies processing of messages | 316 | * A TLV list descriptor simplifies processing of messages |
| 322 | * containing multiple TLVs. | 317 | * containing multiple TLVs. |
| 323 | */ | 318 | */ |
| 324 | 319 | ||
| @@ -327,15 +322,15 @@ struct tlv_list_desc { | |||
| 327 | __u32 tlv_space; /* # bytes from curr TLV to list end */ | 322 | __u32 tlv_space; /* # bytes from curr TLV to list end */ |
| 328 | }; | 323 | }; |
| 329 | 324 | ||
| 330 | static inline void TLV_LIST_INIT(struct tlv_list_desc *list, | 325 | static inline void TLV_LIST_INIT(struct tlv_list_desc *list, |
| 331 | void *data, __u32 space) | 326 | void *data, __u32 space) |
| 332 | { | 327 | { |
| 333 | list->tlv_ptr = (struct tlv_desc *)data; | 328 | list->tlv_ptr = (struct tlv_desc *)data; |
| 334 | list->tlv_space = space; | 329 | list->tlv_space = space; |
| 335 | } | 330 | } |
| 336 | 331 | ||
| 337 | static inline int TLV_LIST_EMPTY(struct tlv_list_desc *list) | 332 | static inline int TLV_LIST_EMPTY(struct tlv_list_desc *list) |
| 338 | { | 333 | { |
| 339 | return (list->tlv_space == 0); | 334 | return (list->tlv_space == 0); |
| 340 | } | 335 | } |
| 341 | 336 | ||
| @@ -353,7 +348,7 @@ static inline void TLV_LIST_STEP(struct tlv_list_desc *list) | |||
| 353 | { | 348 | { |
| 354 | __u16 tlv_space = TLV_ALIGN(ntohs(list->tlv_ptr->tlv_len)); | 349 | __u16 tlv_space = TLV_ALIGN(ntohs(list->tlv_ptr->tlv_len)); |
| 355 | 350 | ||
| 356 | list->tlv_ptr = (struct tlv_desc *)((char *)list->tlv_ptr + tlv_space); | 351 | list->tlv_ptr = (struct tlv_desc *)((char *)list->tlv_ptr + tlv_space); |
| 357 | list->tlv_space -= tlv_space; | 352 | list->tlv_space -= tlv_space; |
| 358 | } | 353 | } |
| 359 | 354 | ||
| @@ -377,15 +372,14 @@ struct tipc_genlmsghdr { | |||
| 377 | #define TIPC_GENL_HDRLEN NLMSG_ALIGN(sizeof(struct tipc_genlmsghdr)) | 372 | #define TIPC_GENL_HDRLEN NLMSG_ALIGN(sizeof(struct tipc_genlmsghdr)) |
| 378 | 373 | ||
| 379 | /* | 374 | /* |
| 380 | * Configuration messages exchanged via TIPC sockets use the TIPC configuration | 375 | * Configuration messages exchanged via TIPC sockets use the TIPC configuration |
| 381 | * message header, which is defined below. This structure is analogous | 376 | * message header, which is defined below. This structure is analogous |
| 382 | * to the Netlink message header, but fields are stored in network byte order | 377 | * to the Netlink message header, but fields are stored in network byte order |
| 383 | * and no padding is permitted between the header and the message data | 378 | * and no padding is permitted between the header and the message data |
| 384 | * that follows. | 379 | * that follows. |
| 385 | */ | 380 | */ |
| 386 | 381 | ||
| 387 | struct tipc_cfg_msg_hdr | 382 | struct tipc_cfg_msg_hdr { |
| 388 | { | ||
| 389 | __be32 tcm_len; /* Message length (including header) */ | 383 | __be32 tcm_len; /* Message length (including header) */ |
| 390 | __be16 tcm_type; /* Command type */ | 384 | __be16 tcm_type; /* Command type */ |
| 391 | __be16 tcm_flags; /* Additional flags */ | 385 | __be16 tcm_flags; /* Additional flags */ |
diff --git a/include/linux/usb/usbnet.h b/include/linux/usb/usbnet.h index 7ae27a473818..44842c8d38c0 100644 --- a/include/linux/usb/usbnet.h +++ b/include/linux/usb/usbnet.h | |||
| @@ -97,6 +97,12 @@ struct driver_info { | |||
| 97 | 97 | ||
| 98 | #define FLAG_LINK_INTR 0x0800 /* updates link (carrier) status */ | 98 | #define FLAG_LINK_INTR 0x0800 /* updates link (carrier) status */ |
| 99 | 99 | ||
| 100 | /* | ||
| 101 | * Indicates to usbnet, that USB driver accumulates multiple IP packets. | ||
| 102 | * Affects statistic (counters) and short packet handling. | ||
| 103 | */ | ||
| 104 | #define FLAG_MULTI_PACKET 0x1000 | ||
| 105 | |||
| 100 | /* init device ... can sleep, or cause probe() failure */ | 106 | /* init device ... can sleep, or cause probe() failure */ |
| 101 | int (*bind)(struct usbnet *, struct usb_interface *); | 107 | int (*bind)(struct usbnet *, struct usb_interface *); |
| 102 | 108 | ||
diff --git a/include/linux/wl12xx.h b/include/linux/wl12xx.h index 4f902e1908aa..bebb8efea0a6 100644 --- a/include/linux/wl12xx.h +++ b/include/linux/wl12xx.h | |||
| @@ -24,6 +24,14 @@ | |||
| 24 | #ifndef _LINUX_WL12XX_H | 24 | #ifndef _LINUX_WL12XX_H |
| 25 | #define _LINUX_WL12XX_H | 25 | #define _LINUX_WL12XX_H |
| 26 | 26 | ||
| 27 | /* The board reference clock values */ | ||
| 28 | enum { | ||
| 29 | WL12XX_REFCLOCK_19 = 0, /* 19.2 MHz */ | ||
| 30 | WL12XX_REFCLOCK_26 = 1, /* 26 MHz */ | ||
| 31 | WL12XX_REFCLOCK_38 = 2, /* 38.4 MHz */ | ||
| 32 | WL12XX_REFCLOCK_54 = 3, /* 54 MHz */ | ||
| 33 | }; | ||
| 34 | |||
| 27 | struct wl12xx_platform_data { | 35 | struct wl12xx_platform_data { |
| 28 | void (*set_power)(bool enable); | 36 | void (*set_power)(bool enable); |
| 29 | /* SDIO only: IRQ number if WLAN_IRQ line is used, 0 for SDIO IRQs */ | 37 | /* SDIO only: IRQ number if WLAN_IRQ line is used, 0 for SDIO IRQs */ |
diff --git a/include/linux/xfrm.h b/include/linux/xfrm.h index b971e3848493..930fdd2de79c 100644 --- a/include/linux/xfrm.h +++ b/include/linux/xfrm.h | |||
| @@ -283,6 +283,7 @@ enum xfrm_attr_type_t { | |||
| 283 | XFRMA_KMADDRESS, /* struct xfrm_user_kmaddress */ | 283 | XFRMA_KMADDRESS, /* struct xfrm_user_kmaddress */ |
| 284 | XFRMA_ALG_AUTH_TRUNC, /* struct xfrm_algo_auth */ | 284 | XFRMA_ALG_AUTH_TRUNC, /* struct xfrm_algo_auth */ |
| 285 | XFRMA_MARK, /* struct xfrm_mark */ | 285 | XFRMA_MARK, /* struct xfrm_mark */ |
| 286 | XFRMA_TFCPAD, /* __u32 */ | ||
| 286 | __XFRMA_MAX | 287 | __XFRMA_MAX |
| 287 | 288 | ||
| 288 | #define XFRMA_MAX (__XFRMA_MAX - 1) | 289 | #define XFRMA_MAX (__XFRMA_MAX - 1) |
