Linux Kernel
3.7.1
|
#include <linux/kernel.h>
#include <linux/err.h>
#include <linux/slab.h>
#include <linux/delay.h>
#include <linux/export.h>
#include "uwb-internal.h"
Go to the source code of this file.
Data Structures | |
struct | uwb_rc_cmd_done_params |
Functions | |
const char * | uwb_rc_strerror (unsigned code) |
int | uwb_rc_cmd_async (struct uwb_rc *rc, const char *cmd_name, struct uwb_rccb *cmd, size_t cmd_size, u8 expected_type, u16 expected_event, uwb_rc_cmd_cb_f cb, void *arg) |
EXPORT_SYMBOL_GPL (uwb_rc_cmd_async) | |
ssize_t | uwb_rc_cmd (struct uwb_rc *rc, const char *cmd_name, struct uwb_rccb *cmd, size_t cmd_size, struct uwb_rceb *reply, size_t reply_size) |
EXPORT_SYMBOL_GPL (uwb_rc_cmd) | |
ssize_t | uwb_rc_vcmd (struct uwb_rc *rc, const char *cmd_name, struct uwb_rccb *cmd, size_t cmd_size, u8 expected_type, u16 expected_event, struct uwb_rceb **preply) |
EXPORT_SYMBOL_GPL (uwb_rc_vcmd) | |
int | uwb_rc_reset (struct uwb_rc *rc) |
int | uwbd_msg_handle_reset (struct uwb_event *evt) |
void | uwb_rc_reset_all (struct uwb_rc *rc) |
EXPORT_SYMBOL_GPL (uwb_rc_reset_all) | |
void | uwb_rc_pre_reset (struct uwb_rc *rc) |
EXPORT_SYMBOL_GPL (uwb_rc_pre_reset) | |
int | uwb_rc_post_reset (struct uwb_rc *rc) |
EXPORT_SYMBOL_GPL (uwb_rc_post_reset) | |
EXPORT_SYMBOL_GPL | ( | uwb_rc_cmd_async | ) |
EXPORT_SYMBOL_GPL | ( | uwb_rc_cmd | ) |
EXPORT_SYMBOL_GPL | ( | uwb_rc_vcmd | ) |
EXPORT_SYMBOL_GPL | ( | uwb_rc_reset_all | ) |
EXPORT_SYMBOL_GPL | ( | uwb_rc_pre_reset | ) |
EXPORT_SYMBOL_GPL | ( | uwb_rc_post_reset | ) |
ssize_t uwb_rc_cmd | ( | struct uwb_rc * | rc, |
const char * | cmd_name, | ||
struct uwb_rccb * | cmd, | ||
size_t | cmd_size, | ||
struct uwb_rceb * | reply, | ||
size_t | reply_size | ||
) |
Generic function for issuing commands to the Radio Control Interface
: UWB Radio Control descriptor : Name of the command being issued (for error messages) : Pointer to rccb structure containing the command; normally you embed this structure as the first member of the full command structure. : Size of the whole command buffer pointed to by . : Pointer to the beginning of the confirmation event buffer. Normally bigger than an 'struct hwarc_rceb'. You need to fill out reply->bEventType and reply->wEvent (in cpu order) as the function will use them to verify the confirmation event. : Size of the reply buffer
The function checks that the length returned in the reply is at least as big as ; if not, it will be deemed an error and -EIO returned.
needs to be referenced
Reset a UWB Host Controller (and all radio settings)
: Host Controller descriptor
We put the command on kmalloc'ed memory as some arches cannot do USB from the stack. The reply event is copied from an stage buffer, so it can be in the stack. See WUSB1.0[8.6.2.4] for more details.
ssize_t uwb_rc_vcmd | ( | struct uwb_rc * | rc, |
const char * | cmd_name, | ||
struct uwb_rccb * | cmd, | ||
size_t | cmd_size, | ||
u8 | expected_type, | ||
u16 | expected_event, | ||
struct uwb_rceb ** | preply | ||
) |
Generic function for issuing commands to the Radio Control Interface that return an unknown amount of data
: UWB Radio Control descriptor : Name of the command being issued (for error messages) : Pointer to rccb structure containing the command; normally you embed this structure as the first member of the full command structure. : Size of the whole command buffer pointed to by . : Expected type in the return event : Expected event code in the return event : Here a pointer to where the event data is received will be stored. Once done with the data, free with kfree().
The function checks that the length returned in the reply is at least as big as a 'struct uwb_rceb *'; if not, it will be deemed an error and -EIO returned.
needs to be referenced