Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Functions
ie.c File Reference
#include <linux/slab.h>
#include <linux/export.h>
#include "uwb-internal.h"

Go to the source code of this file.

Functions

struct uwb_ie_hdruwb_ie_next (void **ptr, size_t *len)
 
 EXPORT_SYMBOL_GPL (uwb_ie_next)
 
int uwb_ie_dump_hex (const struct uwb_ie_hdr *ies, size_t len, char *buf, size_t size)
 
int uwb_rc_set_ie (struct uwb_rc *rc, struct uwb_rc_cmd_set_ie *cmd)
 
void uwb_rc_ie_init (struct uwb_rc *uwb_rc)
 
int uwb_rc_ie_setup (struct uwb_rc *uwb_rc)
 
void uwb_rc_ie_release (struct uwb_rc *uwb_rc)
 
int uwb_rc_ie_add (struct uwb_rc *uwb_rc, const struct uwb_ie_hdr *ies, size_t size)
 
 EXPORT_SYMBOL_GPL (uwb_rc_ie_add)
 
int uwb_rc_ie_rm (struct uwb_rc *uwb_rc, enum uwb_ie element_id)
 
 EXPORT_SYMBOL_GPL (uwb_rc_ie_rm)
 

Function Documentation

EXPORT_SYMBOL_GPL ( uwb_ie_next  )
EXPORT_SYMBOL_GPL ( uwb_rc_ie_add  )
EXPORT_SYMBOL_GPL ( uwb_rc_ie_rm  )
int uwb_ie_dump_hex ( const struct uwb_ie_hdr ies,
size_t  len,
char buf,
size_t  size 
)

uwb_ie_dump_hex - print IEs to a character buffer : the IEs to print. : length of all the IEs. : the destination buffer. : size of .

Returns the number of characters written.

Definition at line 72 of file ie.c.

struct uwb_ie_hdr* uwb_ie_next ( void **  ptr,
size_t len 
)
read

uwb_ie_next - get the next IE in a buffer : start of the buffer containing the IE data : length of the buffer

Both and are updated so subsequent calls to uwb_ie_next() will get the next IE.

NULL is returned (and and will not be updated) if there are no more IEs in the buffer or the buffer is too short.

Definition at line 42 of file ie.c.

int uwb_rc_ie_add ( struct uwb_rc uwb_rc,
const struct uwb_ie_hdr ies,
size_t  size 
)

uwb_rc_ie_add - add new IEs to the radio controller's beacon : the radio controller. : the buffer containing the new IE or IEs to be added to the device's beacon. : length of all the IEs.

According to WHCI 0.95 [4.13.6] the driver will only receive the RCEB after the device sent the first beacon that includes the IEs specified in the SET IE command. We thus cannot send this command if the device is not beaconing. Instead, a SET IE command will be sent later right after we start beaconing.

Setting an IE on the device will overwrite all current IEs in device. So we take the current IEs being transmitted by the device, insert the new one, and call SET IE with all the IEs needed.

Returns 0 on success; or -ENOMEM.

Definition at line 285 of file ie.c.

void uwb_rc_ie_init ( struct uwb_rc uwb_rc)

Definition at line 184 of file ie.c.

void uwb_rc_ie_release ( struct uwb_rc uwb_rc)

Definition at line 223 of file ie.c.

int uwb_rc_ie_rm ( struct uwb_rc uwb_rc,
enum uwb_ie  element_id 
)

uwb_rc_ie_rm - remove an IE from the radio controller's beacon : the radio controller. : the element ID of the IE to remove.

Only IEs previously added with uwb_rc_ie_add() may be removed.

Returns 0 on success; or -ve the SET-IE command to the radio controller failed.

Definition at line 365 of file ie.c.

int uwb_rc_ie_setup ( struct uwb_rc uwb_rc)

uwb_rc_ie_setup - setup a radio controller's IE manager : the radio controller.

The current set of IEs are obtained from the hardware with a GET-IE command (since the radio controller is not yet beaconing this will be just the hardware's MAC and PHY Capability IEs).

Returns 0 on success; -ve on an error.

Definition at line 200 of file ie.c.

int uwb_rc_set_ie ( struct uwb_rc rc,
struct uwb_rc_cmd_set_ie cmd 
)

Replace all IEs currently being transmitted by a device

: pointer to the SET-IE command with the IEs to set : size of

Definition at line 155 of file ie.c.