diff options
| author | David S. Miller <davem@davemloft.net> | 2015-05-04 15:36:07 -0400 |
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2015-05-04 15:36:07 -0400 |
| commit | 73e84313ee4178cac628009103a901af9dfe8920 (patch) | |
| tree | 6328e1f97e4757dcf59d99e97eb2b70b352e62da /include | |
| parent | e2783717a71e9babfdd7c36c7e35b790d2c01022 (diff) | |
| parent | 1add15646672ff4e7fe59bec2afcb5a0c80c5e49 (diff) | |
Merge branch 'for-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next
Johan Hedberg says:
====================
pull request: bluetooth-next 2015-05-04
Here's the first bluetooth-next pull request for 4.2:
- Various fixes for at86rf230 driver
- ieee802154: trace events support for rdev->ops
- HCI UART driver refactoring
- New Realtek IDs added to btusb driver
- Off-by-one fix for rtl8723b in btusb driver
- Refactoring of btbcm driver for both UART & USB use
Please let me know if there are any issues pulling. Thanks.
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
| -rw-r--r-- | include/linux/tcp.h | 8 | ||||
| -rw-r--r-- | include/net/cfg802154.h | 2 | ||||
| -rw-r--r-- | include/net/mac802154.h | 94 | ||||
| -rw-r--r-- | include/net/tcp.h | 7 | ||||
| -rw-r--r-- | include/uapi/linux/inet_diag.h | 4 | ||||
| -rw-r--r-- | include/uapi/linux/tcp.h | 3 |
6 files changed, 114 insertions, 4 deletions
diff --git a/include/linux/tcp.h b/include/linux/tcp.h index 0caa3a2d4106..3b2911502a8c 100644 --- a/include/linux/tcp.h +++ b/include/linux/tcp.h | |||
| @@ -145,11 +145,19 @@ struct tcp_sock { | |||
| 145 | * read the code and the spec side by side (and laugh ...) | 145 | * read the code and the spec side by side (and laugh ...) |
| 146 | * See RFC793 and RFC1122. The RFC writes these in capitals. | 146 | * See RFC793 and RFC1122. The RFC writes these in capitals. |
| 147 | */ | 147 | */ |
| 148 | u64 bytes_received; /* RFC4898 tcpEStatsAppHCThruOctetsReceived | ||
| 149 | * sum(delta(rcv_nxt)), or how many bytes | ||
| 150 | * were acked. | ||
| 151 | */ | ||
| 148 | u32 rcv_nxt; /* What we want to receive next */ | 152 | u32 rcv_nxt; /* What we want to receive next */ |
| 149 | u32 copied_seq; /* Head of yet unread data */ | 153 | u32 copied_seq; /* Head of yet unread data */ |
| 150 | u32 rcv_wup; /* rcv_nxt on last window update sent */ | 154 | u32 rcv_wup; /* rcv_nxt on last window update sent */ |
| 151 | u32 snd_nxt; /* Next sequence we send */ | 155 | u32 snd_nxt; /* Next sequence we send */ |
| 152 | 156 | ||
| 157 | u64 bytes_acked; /* RFC4898 tcpEStatsAppHCThruOctetsAcked | ||
| 158 | * sum(delta(snd_una)), or how many bytes | ||
| 159 | * were acked. | ||
| 160 | */ | ||
| 153 | u32 snd_una; /* First byte we want an ack for */ | 161 | u32 snd_una; /* First byte we want an ack for */ |
| 154 | u32 snd_sml; /* Last byte of the most recently transmitted small packet */ | 162 | u32 snd_sml; /* Last byte of the most recently transmitted small packet */ |
| 155 | u32 rcv_tstamp; /* timestamp of last received ACK (for keepalives) */ | 163 | u32 rcv_tstamp; /* timestamp of last received ACK (for keepalives) */ |
diff --git a/include/net/cfg802154.h b/include/net/cfg802154.h index eeda67652766..6ea16c84293b 100644 --- a/include/net/cfg802154.h +++ b/include/net/cfg802154.h | |||
| @@ -30,11 +30,13 @@ struct wpan_phy_cca; | |||
| 30 | struct cfg802154_ops { | 30 | struct cfg802154_ops { |
| 31 | struct net_device * (*add_virtual_intf_deprecated)(struct wpan_phy *wpan_phy, | 31 | struct net_device * (*add_virtual_intf_deprecated)(struct wpan_phy *wpan_phy, |
| 32 | const char *name, | 32 | const char *name, |
| 33 | unsigned char name_assign_type, | ||
| 33 | int type); | 34 | int type); |
| 34 | void (*del_virtual_intf_deprecated)(struct wpan_phy *wpan_phy, | 35 | void (*del_virtual_intf_deprecated)(struct wpan_phy *wpan_phy, |
| 35 | struct net_device *dev); | 36 | struct net_device *dev); |
| 36 | int (*add_virtual_intf)(struct wpan_phy *wpan_phy, | 37 | int (*add_virtual_intf)(struct wpan_phy *wpan_phy, |
| 37 | const char *name, | 38 | const char *name, |
| 39 | unsigned char name_assign_type, | ||
| 38 | enum nl802154_iftype type, | 40 | enum nl802154_iftype type, |
| 39 | __le64 extended_addr); | 41 | __le64 extended_addr); |
| 40 | int (*del_virtual_intf)(struct wpan_phy *wpan_phy, | 42 | int (*del_virtual_intf)(struct wpan_phy *wpan_phy, |
diff --git a/include/net/mac802154.h b/include/net/mac802154.h index e18e7fd43f47..7df28a4c23f9 100644 --- a/include/net/mac802154.h +++ b/include/net/mac802154.h | |||
| @@ -247,19 +247,109 @@ static inline void ieee802154_le64_to_be64(void *be64_dst, const void *le64_src) | |||
| 247 | __put_unaligned_memmove64(swab64p(le64_src), be64_dst); | 247 | __put_unaligned_memmove64(swab64p(le64_src), be64_dst); |
| 248 | } | 248 | } |
| 249 | 249 | ||
| 250 | /* Basic interface to register ieee802154 device */ | 250 | /** |
| 251 | * ieee802154_alloc_hw - Allocate a new hardware device | ||
| 252 | * | ||
| 253 | * This must be called once for each hardware device. The returned pointer | ||
| 254 | * must be used to refer to this device when calling other functions. | ||
| 255 | * mac802154 allocates a private data area for the driver pointed to by | ||
| 256 | * @priv in &struct ieee802154_hw, the size of this area is given as | ||
| 257 | * @priv_data_len. | ||
| 258 | * | ||
| 259 | * @priv_data_len: length of private data | ||
| 260 | * @ops: callbacks for this device | ||
| 261 | * | ||
| 262 | * Return: A pointer to the new hardware device, or %NULL on error. | ||
| 263 | */ | ||
| 251 | struct ieee802154_hw * | 264 | struct ieee802154_hw * |
| 252 | ieee802154_alloc_hw(size_t priv_data_len, const struct ieee802154_ops *ops); | 265 | ieee802154_alloc_hw(size_t priv_data_len, const struct ieee802154_ops *ops); |
| 266 | |||
| 267 | /** | ||
| 268 | * ieee802154_free_hw - free hardware descriptor | ||
| 269 | * | ||
| 270 | * This function frees everything that was allocated, including the | ||
| 271 | * private data for the driver. You must call ieee802154_unregister_hw() | ||
| 272 | * before calling this function. | ||
| 273 | * | ||
| 274 | * @hw: the hardware to free | ||
| 275 | */ | ||
| 253 | void ieee802154_free_hw(struct ieee802154_hw *hw); | 276 | void ieee802154_free_hw(struct ieee802154_hw *hw); |
| 277 | |||
| 278 | /** | ||
| 279 | * ieee802154_register_hw - Register hardware device | ||
| 280 | * | ||
| 281 | * You must call this function before any other functions in | ||
| 282 | * mac802154. Note that before a hardware can be registered, you | ||
| 283 | * need to fill the contained wpan_phy's information. | ||
| 284 | * | ||
| 285 | * @hw: the device to register as returned by ieee802154_alloc_hw() | ||
| 286 | * | ||
| 287 | * Return: 0 on success. An error code otherwise. | ||
| 288 | */ | ||
| 254 | int ieee802154_register_hw(struct ieee802154_hw *hw); | 289 | int ieee802154_register_hw(struct ieee802154_hw *hw); |
| 290 | |||
| 291 | /** | ||
| 292 | * ieee802154_unregister_hw - Unregister a hardware device | ||
| 293 | * | ||
| 294 | * This function instructs mac802154 to free allocated resources | ||
| 295 | * and unregister netdevices from the networking subsystem. | ||
| 296 | * | ||
| 297 | * @hw: the hardware to unregister | ||
| 298 | */ | ||
| 255 | void ieee802154_unregister_hw(struct ieee802154_hw *hw); | 299 | void ieee802154_unregister_hw(struct ieee802154_hw *hw); |
| 256 | 300 | ||
| 301 | /** | ||
| 302 | * ieee802154_rx - receive frame | ||
| 303 | * | ||
| 304 | * Use this function to hand received frames to mac802154. The receive | ||
| 305 | * buffer in @skb must start with an IEEE 802.15.4 header. In case of a | ||
| 306 | * paged @skb is used, the driver is recommended to put the ieee802154 | ||
| 307 | * header of the frame on the linear part of the @skb to avoid memory | ||
| 308 | * allocation and/or memcpy by the stack. | ||
| 309 | * | ||
| 310 | * This function may not be called in IRQ context. Calls to this function | ||
| 311 | * for a single hardware must be synchronized against each other. | ||
| 312 | * | ||
| 313 | * @hw: the hardware this frame came in on | ||
| 314 | * @skb: the buffer to receive, owned by mac802154 after this call | ||
| 315 | */ | ||
| 257 | void ieee802154_rx(struct ieee802154_hw *hw, struct sk_buff *skb); | 316 | void ieee802154_rx(struct ieee802154_hw *hw, struct sk_buff *skb); |
| 317 | |||
| 318 | /** | ||
| 319 | * ieee802154_rx_irqsafe - receive frame | ||
| 320 | * | ||
| 321 | * Like ieee802154_rx() but can be called in IRQ context | ||
| 322 | * (internally defers to a tasklet.) | ||
| 323 | * | ||
| 324 | * @hw: the hardware this frame came in on | ||
| 325 | * @skb: the buffer to receive, owned by mac802154 after this call | ||
| 326 | * @lqi: link quality indicator | ||
| 327 | */ | ||
| 258 | void ieee802154_rx_irqsafe(struct ieee802154_hw *hw, struct sk_buff *skb, | 328 | void ieee802154_rx_irqsafe(struct ieee802154_hw *hw, struct sk_buff *skb, |
| 259 | u8 lqi); | 329 | u8 lqi); |
| 260 | 330 | /** | |
| 331 | * ieee802154_wake_queue - wake ieee802154 queue | ||
| 332 | * @hw: pointer as obtained from ieee802154_alloc_hw(). | ||
| 333 | * | ||
| 334 | * Drivers should use this function instead of netif_wake_queue. | ||
| 335 | */ | ||
| 261 | void ieee802154_wake_queue(struct ieee802154_hw *hw); | 336 | void ieee802154_wake_queue(struct ieee802154_hw *hw); |
| 337 | |||
| 338 | /** | ||
| 339 | * ieee802154_stop_queue - stop ieee802154 queue | ||
| 340 | * @hw: pointer as obtained from ieee802154_alloc_hw(). | ||
| 341 | * | ||
| 342 | * Drivers should use this function instead of netif_stop_queue. | ||
| 343 | */ | ||
| 262 | void ieee802154_stop_queue(struct ieee802154_hw *hw); | 344 | void ieee802154_stop_queue(struct ieee802154_hw *hw); |
| 345 | |||
| 346 | /** | ||
| 347 | * ieee802154_xmit_complete - frame transmission complete | ||
| 348 | * | ||
| 349 | * @hw: pointer as obtained from ieee802154_alloc_hw(). | ||
| 350 | * @skb: buffer for transmission | ||
| 351 | * @ifs_handling: indicate interframe space handling | ||
| 352 | */ | ||
| 263 | void ieee802154_xmit_complete(struct ieee802154_hw *hw, struct sk_buff *skb, | 353 | void ieee802154_xmit_complete(struct ieee802154_hw *hw, struct sk_buff *skb, |
| 264 | bool ifs_handling); | 354 | bool ifs_handling); |
| 265 | 355 | ||
diff --git a/include/net/tcp.h b/include/net/tcp.h index 051dc5c2802d..6d204f3f9df8 100644 --- a/include/net/tcp.h +++ b/include/net/tcp.h | |||
| @@ -576,7 +576,7 @@ static inline int tcp_bound_to_half_wnd(struct tcp_sock *tp, int pktsize) | |||
| 576 | } | 576 | } |
| 577 | 577 | ||
| 578 | /* tcp.c */ | 578 | /* tcp.c */ |
| 579 | void tcp_get_info(const struct sock *, struct tcp_info *); | 579 | void tcp_get_info(struct sock *, struct tcp_info *); |
| 580 | 580 | ||
| 581 | /* Read 'sendfile()'-style from a TCP socket */ | 581 | /* Read 'sendfile()'-style from a TCP socket */ |
| 582 | typedef int (*sk_read_actor_t)(read_descriptor_t *, struct sk_buff *, | 582 | typedef int (*sk_read_actor_t)(read_descriptor_t *, struct sk_buff *, |
| @@ -804,6 +804,8 @@ enum tcp_ca_ack_event_flags { | |||
| 804 | /* Requires ECN/ECT set on all packets */ | 804 | /* Requires ECN/ECT set on all packets */ |
| 805 | #define TCP_CONG_NEEDS_ECN 0x2 | 805 | #define TCP_CONG_NEEDS_ECN 0x2 |
| 806 | 806 | ||
| 807 | union tcp_cc_info; | ||
| 808 | |||
| 807 | struct tcp_congestion_ops { | 809 | struct tcp_congestion_ops { |
| 808 | struct list_head list; | 810 | struct list_head list; |
| 809 | u32 key; | 811 | u32 key; |
| @@ -829,7 +831,8 @@ struct tcp_congestion_ops { | |||
| 829 | /* hook for packet ack accounting (optional) */ | 831 | /* hook for packet ack accounting (optional) */ |
| 830 | void (*pkts_acked)(struct sock *sk, u32 num_acked, s32 rtt_us); | 832 | void (*pkts_acked)(struct sock *sk, u32 num_acked, s32 rtt_us); |
| 831 | /* get info for inet_diag (optional) */ | 833 | /* get info for inet_diag (optional) */ |
| 832 | int (*get_info)(struct sock *sk, u32 ext, struct sk_buff *skb); | 834 | size_t (*get_info)(struct sock *sk, u32 ext, int *attr, |
| 835 | union tcp_cc_info *info); | ||
| 833 | 836 | ||
| 834 | char name[TCP_CA_NAME_MAX]; | 837 | char name[TCP_CA_NAME_MAX]; |
| 835 | struct module *owner; | 838 | struct module *owner; |
diff --git a/include/uapi/linux/inet_diag.h b/include/uapi/linux/inet_diag.h index d65c0a09efd3..c7093c75bdd6 100644 --- a/include/uapi/linux/inet_diag.h +++ b/include/uapi/linux/inet_diag.h | |||
| @@ -143,4 +143,8 @@ struct tcp_dctcp_info { | |||
| 143 | __u32 dctcp_ab_tot; | 143 | __u32 dctcp_ab_tot; |
| 144 | }; | 144 | }; |
| 145 | 145 | ||
| 146 | union tcp_cc_info { | ||
| 147 | struct tcpvegas_info vegas; | ||
| 148 | struct tcp_dctcp_info dctcp; | ||
| 149 | }; | ||
| 146 | #endif /* _UAPI_INET_DIAG_H_ */ | 150 | #endif /* _UAPI_INET_DIAG_H_ */ |
diff --git a/include/uapi/linux/tcp.h b/include/uapi/linux/tcp.h index 3b9718328d8b..faa72f4fa547 100644 --- a/include/uapi/linux/tcp.h +++ b/include/uapi/linux/tcp.h | |||
| @@ -112,6 +112,7 @@ enum { | |||
| 112 | #define TCP_FASTOPEN 23 /* Enable FastOpen on listeners */ | 112 | #define TCP_FASTOPEN 23 /* Enable FastOpen on listeners */ |
| 113 | #define TCP_TIMESTAMP 24 | 113 | #define TCP_TIMESTAMP 24 |
| 114 | #define TCP_NOTSENT_LOWAT 25 /* limit number of unsent bytes in write queue */ | 114 | #define TCP_NOTSENT_LOWAT 25 /* limit number of unsent bytes in write queue */ |
| 115 | #define TCP_CC_INFO 26 /* Get Congestion Control (optional) info */ | ||
| 115 | 116 | ||
| 116 | struct tcp_repair_opt { | 117 | struct tcp_repair_opt { |
| 117 | __u32 opt_code; | 118 | __u32 opt_code; |
| @@ -189,6 +190,8 @@ struct tcp_info { | |||
| 189 | 190 | ||
| 190 | __u64 tcpi_pacing_rate; | 191 | __u64 tcpi_pacing_rate; |
| 191 | __u64 tcpi_max_pacing_rate; | 192 | __u64 tcpi_max_pacing_rate; |
| 193 | __u64 tcpi_bytes_acked; /* RFC4898 tcpEStatsAppHCThruOctetsAcked */ | ||
| 194 | __u64 tcpi_bytes_received; /* RFC4898 tcpEStatsAppHCThruOctetsReceived */ | ||
| 192 | }; | 195 | }; |
| 193 | 196 | ||
| 194 | /* for TCP_MD5SIG socket option */ | 197 | /* for TCP_MD5SIG socket option */ |
