Linux Kernel
3.7.1
|
#include <linux/kernel.h>
#include <linux/slab.h>
#include <linux/device.h>
#include <linux/export.h>
#include <linux/err.h>
#include <linux/kdev_t.h>
#include <linux/random.h>
#include <linux/stat.h>
#include "uwb-internal.h"
Go to the source code of this file.
Functions | |
int | uwb_notifs_register (struct uwb_rc *rc, struct uwb_notifs_handler *new) |
EXPORT_SYMBOL_GPL (uwb_notifs_register) | |
int | uwb_notifs_deregister (struct uwb_rc *rc, struct uwb_notifs_handler *entry) |
EXPORT_SYMBOL_GPL (uwb_notifs_deregister) | |
void | uwb_notify (struct uwb_rc *rc, struct uwb_dev *uwb_dev, enum uwb_notifs event) |
void | uwb_dev_init (struct uwb_dev *uwb_dev) |
int | uwb_dev_add (struct uwb_dev *uwb_dev, struct device *parent_dev, struct uwb_rc *parent_rc) |
void | uwb_dev_rm (struct uwb_dev *uwb_dev) |
struct uwb_dev * | uwb_dev_try_get (struct uwb_rc *rc, struct uwb_dev *uwb_dev) |
EXPORT_SYMBOL_GPL (uwb_dev_try_get) | |
int | __uwb_dev_offair (struct uwb_dev *uwb_dev, struct uwb_rc *rc) |
void | uwbd_dev_offair (struct uwb_beca_e *bce) |
void | uwbd_dev_onair (struct uwb_rc *rc, struct uwb_beca_e *bce) |
int | uwb_dev_for_each (struct uwb_rc *rc, uwb_dev_for_each_f function, void *priv) |
EXPORT_SYMBOL_GPL (uwb_dev_for_each) | |
EXPORT_SYMBOL_GPL | ( | uwb_notifs_register | ) |
EXPORT_SYMBOL_GPL | ( | uwb_notifs_deregister | ) |
EXPORT_SYMBOL_GPL | ( | uwb_dev_try_get | ) |
EXPORT_SYMBOL_GPL | ( | uwb_dev_for_each | ) |
Register and initialize a new UWB device
Did you call uwb_dev_init() on it?
: is the parent radio controller who has the link to the device. When registering the UWB device that is a UWB Radio Controller, we point back to it.
If registering the device that is part of a radio, caller has set rc->uwb_dev->dev. Otherwise it is to be left NULL–a new one will be allocated.
int uwb_dev_for_each | ( | struct uwb_rc * | rc, |
uwb_dev_for_each_f | function, | ||
void * | priv | ||
) |
Iterate over the list of UWB devices, calling a on each
See docs for bus_for_each()....
: radio controller for the devices. : function to call. : data to pass to .
int uwb_notifs_deregister | ( | struct uwb_rc * | rc, |
struct uwb_notifs_handler * | entry | ||
) |
int uwb_notifs_register | ( | struct uwb_rc * | rc, |
struct uwb_notifs_handler * | new | ||
) |
void uwbd_dev_offair | ( | struct uwb_beca_e * | bce | ) |
A device went off the air, clean up after it!
This is called by the UWB Daemon (through the beacon purge function uwb_bcn_cache_purge) when it is detected that a device has been in radio silence for a while.
If this device is actually a local radio controller we don't need to go through the offair process, as it is not registered as that.
NOTE: uwb_bcn_cache.mutex is held!
void uwbd_dev_onair | ( | struct uwb_rc * | rc, |
struct uwb_beca_e * | bce | ||
) |
A device went on the air, start it up!
This is called by the UWB Daemon when it is detected that a device has popped up in the radio range of the radio controller.
It will just create the freaking device, register the beacon and stuff and yatla, done.
NOTE: uwb_beca.mutex is held, bce->mutex is held