Linux Kernel
3.7.1
|
#include <linux/kernel.h>
#include <linux/uwb.h>
#include <linux/slab.h>
#include <linux/random.h>
#include <linux/export.h>
#include "uwb-internal.h"
Go to the source code of this file.
EXPORT_SYMBOL_GPL | ( | uwb_rsv_state_str | ) |
EXPORT_SYMBOL_GPL | ( | uwb_rsv_type_str | ) |
EXPORT_SYMBOL_GPL | ( | uwb_rsv_create | ) |
EXPORT_SYMBOL_GPL | ( | uwb_rsv_destroy | ) |
EXPORT_SYMBOL_GPL | ( | uwb_rsv_establish | ) |
EXPORT_SYMBOL_GPL | ( | uwb_rsv_modify | ) |
EXPORT_SYMBOL_GPL | ( | uwb_rsv_terminate | ) |
EXPORT_SYMBOL_GPL | ( | uwb_rsv_accept | ) |
EXPORT_SYMBOL_GPL | ( | uwb_rsv_get_usable_mas | ) |
void uwb_rsv_accept | ( | struct uwb_rsv * | rsv, |
uwb_rsv_cb_f | cb, | ||
void * | pal_priv | ||
) |
uwb_rsv_accept - accept a new reservation from a peer : the reservation : call back for reservation changes : data to be passed in the above call back
Reservation requests from peers are denied unless a PAL accepts it by calling this function.
The PAL call uwb_rsv_destroy() for all accepted reservations before calling uwb_pal_unregister().
uwb_rsv_create - allocate and initialize a UWB reservation structure : the radio controller : callback to use when the reservation completes or terminates : data private to the PAL to be passed in the callback
The callback is called when the state of the reservation changes from:
usb_rsv_establish - start a reservation establishment : the reservation
The PAL should fill in 's owner, target, type, max_mas, min_mas, max_interval and is_multicast fields. If the target is a uwb_dev it must be referenced.
The reservation's callback will be called when the reservation is accepted, denied or times out.
|
read |
void uwb_rsv_get_usable_mas | ( | struct uwb_rsv * | rsv, |
struct uwb_mas_bm * | mas | ||
) |
uwb_rsv_sched_update - schedule an update of the DRP IEs : the radio controller.
To improve performance and ensure correctness with [ECMA-368] the number of SET-DRP-IE commands that are done are limited.
DRP IEs update come from two sources: DRP events from the hardware which all occur at the beginning of the superframe ('syncronous' events) and reservation establishment/termination requests from PALs or timers ('asynchronous' events).
A delayed work ensures that all the synchronous events result in one SET-DRP-IE command.
Additional logic (the set_drp_ie_pending and rsv_updated_postponed flags) will prevent an asynchrous event starting a SET-DRP-IE command if one is currently awaiting a response.
FIXME: this does leave a window where an asynchrous event can delay the SET-DRP-IE for a synchronous event by one superframe.
void uwb_rsv_set_state | ( | struct uwb_rsv * | rsv, |
enum uwb_rsv_state | new_state | ||
) |
const char* uwb_rsv_state_str | ( | enum uwb_rsv_state | state | ) |
uwb_rsv_terminate - terminate an established reservation : the reservation to terminate
A reservation is terminated by removing the DRP IE from the beacon, the other end will consider the reservation to be terminated when it does not see the DRP IE for at least mMaxLostBeacons.
If applicable, the reference to the target uwb_dev will be released.
int uwb_rsv_try_move | ( | struct uwb_rsv * | rsv, |
struct uwb_mas_bm * | available | ||
) |