/* Utility routines * * Copyright (C) 2015 Red Hat, Inc. All Rights Reserved. * Written by David Howells (dhowells@redhat.com) * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public Licence * as published by the Free Software Foundation; either version * 2 of the Licence, or (at your option) any later version. */ #include #include #include #include "ar-internal.h" /* * Fill out a peer address from a socket buffer containing a packet. */ int rxrpc_extract_addr_from_skb(struct sockaddr_rxrpc *srx, struct sk_buff *skb) { memset(srx, 0, sizeof(*srx)); switch (ntohs(skb->protocol)) { case ETH_P_IP: srx->transport_type = SOCK_DGRAM; srx->transport_len = sizeof(srx->transport.sin); srx->transport.sin.sin_family = AF_INET; srx->transport.sin.sin_port = udp_hdr(skb)->source; srx->transport.sin.sin_addr.s_addr = ip_hdr(skb)->saddr; return 0; #ifdef CONFIG_AF_RXRPC_IPV6 case ETH_P_IPV6: srx->transport_type = SOCK_DGRAM; srx->transport_len = sizeof(srx->transport.sin6); srx->transport.sin6.sin6_family = AF_INET6; srx->transport.sin6.sin6_port = udp_hdr(skb)->source; srx->transport.sin6.sin6_addr = ipv6_hdr(skb)->saddr; return 0; #endif default: pr_warn_ratelimited("AF_RXRPC: Unknown eth protocol %u\n", ntohs(skb->protocol)); return -EAFNOSUPPORT; } } ht'>Tobias Klauser
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVitaly Prosyak <vitaly.prosyak@amd.com>2016-04-14 13:34:03 -0400
committerAlex Deucher <alexander.deucher@amd.com>2016-04-27 12:27:08 -0400
commit5d5b7803c49bbb01bdf4c6e95e8314d0515b9484 (patch)
treec2a78f91ce973c99277bcc0c94d6328f9e6d98d9
parent56fc350224f16901db709cd8cba86bac751aa2a2 (diff)
drm/radeon: fix vertical bars appear on monitor (v2)
When crtc/timing is disabled on boot the dig block should be stopped in order ignore timing from crtc, reset the steering fifo otherwise we get display corruption or hung in dp sst mode. v2: agd: fix coding style Signed-off-by: Vitaly Prosyak <vitaly.prosyak@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: stable@vger.kernel.org Signed-off-by: Alex Deucher <alexander.deucher@amd.com>