aboutsummaryrefslogtreecommitdiffstats
path: root/include/net
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2015-05-20 02:23:53 -0400
committerDave Airlie <airlied@redhat.com>2015-05-20 02:23:53 -0400
commitbdcddf95e82b1c4e370fc1196b1f4f50f775dab4 (patch)
treeef2af2b3faee1f8e8287ca45d265809f56fbd0f6 /include/net
parent91d9f9856f91c82ac6289a0fff65dd12cfa07e34 (diff)
parente26081808edadfd257c6c9d81014e3b25e9a6118 (diff)
Backmerge v4.1-rc4 into into drm-next
We picked up a silent conflict in amdkfd with drm-fixes and drm-next, backmerge v4.1-rc5 and fix the conflicts Signed-off-by: Dave Airlie <airlied@redhat.com> Conflicts: drivers/gpu/drm/drm_irq.c
Diffstat (limited to 'include/net')
-rw-r--r--include/net/cfg802154.h2
-rw-r--r--include/net/codel.h10
-rw-r--r--include/net/mac80211.h2
-rw-r--r--include/net/mac802154.h94
-rw-r--r--include/net/tcp.h7
5 files changed, 108 insertions, 7 deletions
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;
30struct cfg802154_ops { 30struct 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/codel.h b/include/net/codel.h
index aeee28081245..1e18005f7f65 100644
--- a/include/net/codel.h
+++ b/include/net/codel.h
@@ -120,11 +120,13 @@ static inline u32 codel_time_to_us(codel_time_t val)
120 * struct codel_params - contains codel parameters 120 * struct codel_params - contains codel parameters
121 * @target: target queue size (in time units) 121 * @target: target queue size (in time units)
122 * @interval: width of moving time window 122 * @interval: width of moving time window
123 * @mtu: device mtu, or minimal queue backlog in bytes.
123 * @ecn: is Explicit Congestion Notification enabled 124 * @ecn: is Explicit Congestion Notification enabled
124 */ 125 */
125struct codel_params { 126struct codel_params {
126 codel_time_t target; 127 codel_time_t target;
127 codel_time_t interval; 128 codel_time_t interval;
129 u32 mtu;
128 bool ecn; 130 bool ecn;
129}; 131};
130 132
@@ -166,10 +168,12 @@ struct codel_stats {
166 u32 ecn_mark; 168 u32 ecn_mark;
167}; 169};
168 170
169static void codel_params_init(struct codel_params *params) 171static void codel_params_init(struct codel_params *params,
172 const struct Qdisc *sch)
170{ 173{
171 params->interval = MS2TIME(100); 174 params->interval = MS2TIME(100);
172 params->target = MS2TIME(5); 175 params->target = MS2TIME(5);
176 params->mtu = psched_mtu(qdisc_dev(sch));
173 params->ecn = false; 177 params->ecn = false;
174} 178}
175 179
@@ -180,7 +184,7 @@ static void codel_vars_init(struct codel_vars *vars)
180 184
181static void codel_stats_init(struct codel_stats *stats) 185static void codel_stats_init(struct codel_stats *stats)
182{ 186{
183 stats->maxpacket = 256; 187 stats->maxpacket = 0;
184} 188}
185 189
186/* 190/*
@@ -234,7 +238,7 @@ static bool codel_should_drop(const struct sk_buff *skb,
234 stats->maxpacket = qdisc_pkt_len(skb); 238 stats->maxpacket = qdisc_pkt_len(skb);
235 239
236 if (codel_time_before(vars->ldelay, params->target) || 240 if (codel_time_before(vars->ldelay, params->target) ||
237 sch->qstats.backlog <= stats->maxpacket) { 241 sch->qstats.backlog <= params->mtu) {
238 /* went below - stay below for at least interval */ 242 /* went below - stay below for at least interval */
239 vars->first_above_time = 0; 243 vars->first_above_time = 0;
240 return false; 244 return false;
diff --git a/include/net/mac80211.h b/include/net/mac80211.h
index b4bef1152c05..8e3668b44c29 100644
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -1666,6 +1666,8 @@ struct ieee80211_tx_control {
1666 * @sta: station table entry, %NULL for per-vif queue 1666 * @sta: station table entry, %NULL for per-vif queue
1667 * @tid: the TID for this queue (unused for per-vif queue) 1667 * @tid: the TID for this queue (unused for per-vif queue)
1668 * @ac: the AC for this queue 1668 * @ac: the AC for this queue
1669 * @drv_priv: data area for driver use, will always be aligned to
1670 * sizeof(void *).
1669 * 1671 *
1670 * The driver can obtain packets from this queue by calling 1672 * The driver can obtain packets from this queue by calling
1671 * ieee80211_tx_dequeue(). 1673 * ieee80211_tx_dequeue().
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 */
251struct ieee802154_hw * 264struct ieee802154_hw *
252ieee802154_alloc_hw(size_t priv_data_len, const struct ieee802154_ops *ops); 265ieee802154_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 */
253void ieee802154_free_hw(struct ieee802154_hw *hw); 276void 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 */
254int ieee802154_register_hw(struct ieee802154_hw *hw); 289int 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 */
255void ieee802154_unregister_hw(struct ieee802154_hw *hw); 299void 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 */
257void ieee802154_rx(struct ieee802154_hw *hw, struct sk_buff *skb); 316void 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 */
258void ieee802154_rx_irqsafe(struct ieee802154_hw *hw, struct sk_buff *skb, 328void 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 */
261void ieee802154_wake_queue(struct ieee802154_hw *hw); 336void 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 */
262void ieee802154_stop_queue(struct ieee802154_hw *hw); 344void 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 */
263void ieee802154_xmit_complete(struct ieee802154_hw *hw, struct sk_buff *skb, 353void 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 */
579void tcp_get_info(const struct sock *, struct tcp_info *); 579void 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 */
582typedef int (*sk_read_actor_t)(read_descriptor_t *, struct sk_buff *, 582typedef 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
807union tcp_cc_info;
808
807struct tcp_congestion_ops { 809struct 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;