/* * Ultra Wide Band * IE Received notification handling. * * Copyright (C) 2008 Cambridge Silicon Radio Ltd. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License version * 2 as published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #include #include #include #include #include "uwb-internal.h" /* * Process an incoming IE Received notification. */ int uwbd_evt_handle_rc_ie_rcv(struct uwb_event *evt) { int result = -EINVAL; struct device *dev = &evt->rc->uwb_dev.dev; struct uwb_rc_evt_ie_rcv *iercv; /* Is there enough data to decode it? */ if (evt->notif.size < sizeof(*iercv)) { dev_err(dev, "IE Received notification: Not enough data to " "decode (%zu vs %zu bytes needed)\n", evt->notif.size, sizeof(*iercv)); goto error; } iercv = container_of(evt->notif.rceb, struct uwb_rc_evt_ie_rcv, rceb); dev_dbg(dev, "IE received, element ID=%d\n", iercv->IEData[0]); if (iercv->IEData[0] == UWB_RELINQUISH_REQUEST_IE) { dev_warn(dev, "unhandled Relinquish Request IE\n"); } return 0; error: return result; } ias Klauser
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2017-01-24 12:38:43 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2017-01-24 12:38:43 -0800
commit0263d4ebd94b36280608e296cba39b924b6e832b (patch)
tree6e21b4b3d8e8fb12cdfcfd185d46992487265a9b /net/batman-adv/multicast.h
parent19ca2c8fecb1592d623fe5e82d6796f8d446268d (diff)
parent7b9e1d89e1b6a3b99a8fdd949aa0f98dd5bf2f6b (diff)
Merge tag 'platform-drivers-x86-v4.10-4' of git://git.infradead.org/linux-platform-drivers-x86
Pull x86 platform-driver fixes from Andy Shevchenko: "This is my first pull request since I become a co-maintainer of Platform Drivers x86 subsystem. It's a bit bigger than usual due to material collected for almost two weeks in a row. MAINTAINERS: - Add myself to X86 PLATFORM DRIVERS as a co-maintainer ideapad-laptop: - handle ACPI event 1 intel_mid_powerbtn: - Set IRQ_ONESHOT surface3-wmi: - fix uninitialized symbol - Shut up unused-function warning mlx-platform: - free first dev on error" * tag 'platform-drivers-x86-v4.10-4' of git://git.infradead.org/linux-platform-drivers-x86: MAINTAINERS: Add myself to X86 PLATFORM DRIVERS as a co-maintainer platform/x86: ideapad-laptop: handle ACPI event 1 platform/x86: intel_mid_powerbtn: Set IRQ_ONESHOT platform/x86: surface3-wmi: fix uninitialized symbol platform/x86: surface3-wmi: Shut up unused-function warning platform/x86: mlx-platform: free first dev on error
Diffstat (limited to 'net/batman-adv/multicast.h')