Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions | Variables
wusbhc.h File Reference
#include <linux/usb.h>
#include <linux/list.h>
#include <linux/mutex.h>
#include <linux/kref.h>
#include <linux/workqueue.h>
#include <linux/usb/hcd.h>
#include <linux/uwb.h>
#include <linux/usb/wusb.h>

Go to the source code of this file.

Data Structures

struct  wusb_dev
 
struct  wusb_port
 
struct  wusbhc
 

Macros

#define WUSB_CHANNEL_STOP_DELAY_MS   8
 
#define WUSB_DEV_ADDR_UNAUTH   0x80
 
#define usb_hcd_to_wusbhc(u)   container_of((u), struct wusbhc, usb_hcd)
 

Functions

void wusb_dev_destroy (struct kref *_wusb_dev)
 
int wusbhc_create (struct wusbhc *)
 
int wusbhc_b_create (struct wusbhc *)
 
void wusbhc_b_destroy (struct wusbhc *)
 
void wusbhc_destroy (struct wusbhc *)
 
int wusb_dev_sysfs_add (struct wusbhc *, struct usb_device *, struct wusb_dev *)
 
void wusb_dev_sysfs_rm (struct wusb_dev *)
 
int wusbhc_sec_create (struct wusbhc *)
 
int wusbhc_sec_start (struct wusbhc *)
 
void wusbhc_sec_stop (struct wusbhc *)
 
void wusbhc_sec_destroy (struct wusbhc *)
 
void wusbhc_giveback_urb (struct wusbhc *wusbhc, struct urb *urb, int status)
 
void wusbhc_reset_all (struct wusbhc *wusbhc)
 
int wusbhc_pal_register (struct wusbhc *wusbhc)
 
void wusbhc_pal_unregister (struct wusbhc *wusbhc)
 
int wusbhc_start (struct wusbhc *wusbhc)
 
void wusbhc_stop (struct wusbhc *wusbhc)
 
int wusbhc_chid_set (struct wusbhc *, const struct wusb_ckhdid *)
 
int wusbhc_devconnect_create (struct wusbhc *)
 
void wusbhc_devconnect_destroy (struct wusbhc *)
 
int wusbhc_devconnect_start (struct wusbhc *wusbhc)
 
void wusbhc_devconnect_stop (struct wusbhc *wusbhc)
 
void wusbhc_handle_dn (struct wusbhc *, u8 srcaddr, struct wusb_dn_hdr *dn_hdr, size_t size)
 
void __wusbhc_dev_disable (struct wusbhc *wusbhc, u8 port)
 
int wusb_usb_ncb (struct notifier_block *nb, unsigned long val, void *priv)
 
int wusb_set_dev_addr (struct wusbhc *wusbhc, struct wusb_dev *wusb_dev, u8 addr)
 
int wusbhc_rh_create (struct wusbhc *)
 
void wusbhc_rh_destroy (struct wusbhc *)
 
int wusbhc_rh_status_data (struct usb_hcd *, char *)
 
int wusbhc_rh_control (struct usb_hcd *, u16, u16, u16, char *, u16)
 
int wusbhc_rh_suspend (struct usb_hcd *)
 
int wusbhc_rh_resume (struct usb_hcd *)
 
int wusbhc_rh_start_port_reset (struct usb_hcd *, unsigned)
 
int wusbhc_mmcie_create (struct wusbhc *)
 
void wusbhc_mmcie_destroy (struct wusbhc *)
 
int wusbhc_mmcie_set (struct wusbhc *, u8 interval, u8 repeat_cnt, struct wuie_hdr *)
 
void wusbhc_mmcie_rm (struct wusbhc *, struct wuie_hdr *)
 
int wusbhc_rsv_establish (struct wusbhc *wusbhc)
 
void wusbhc_rsv_terminate (struct wusbhc *wusbhc)
 
int wusb_dev_sec_add (struct wusbhc *, struct usb_device *, struct wusb_dev *)
 
void wusb_dev_sec_rm (struct wusb_dev *)
 
int wusb_dev_4way_handshake (struct wusbhc *, struct wusb_dev *, struct wusb_ckhdid *ck)
 
void wusbhc_gtk_rekey (struct wusbhc *wusbhc)
 
int wusb_dev_update_address (struct wusbhc *wusbhc, struct wusb_dev *wusb_dev)
 
u8 wusb_cluster_id_get (void)
 
void wusb_cluster_id_put (u8)
 
struct wusb_dev__wusb_dev_get_by_usb_dev (struct wusbhc *, struct usb_device *)
 

Variables

struct usb_key_descriptor descr
 
u8 data [16]
 
struct workqueue_structwusbd
 

Macro Definition Documentation

#define usb_hcd_to_wusbhc (   u)    container_of((u), struct wusbhc, usb_hcd)

Definition at line 300 of file wusbhc.h.

#define WUSB_CHANNEL_STOP_DELAY_MS   8

Definition at line 71 of file wusbhc.h.

#define WUSB_DEV_ADDR_UNAUTH   0x80

Definition at line 113 of file wusbhc.h.

Function Documentation

struct wusb_dev* __wusb_dev_get_by_usb_dev ( struct wusbhc ,
struct usb_device *   
)
read

Definition at line 996 of file devconnect.c.

void __wusbhc_dev_disable ( struct wusbhc wusbhc,
u8  port 
)

Definition at line 673 of file devconnect.c.

u8 wusb_cluster_id_get ( void  )

Definition at line 318 of file wusbhc.c.

void wusb_cluster_id_put ( u8  )

Definition at line 341 of file wusbhc.c.

int wusb_dev_4way_handshake ( struct wusbhc ,
struct wusb_dev ,
struct wusb_ckhdid ck 
)

Definition at line 344 of file security.c.

void wusb_dev_destroy ( struct kref _wusb_dev)

Definition at line 1011 of file devconnect.c.

int wusb_dev_sec_add ( struct wusbhc ,
struct usb_device *  ,
struct wusb_dev  
)

Definition at line 200 of file security.c.

void wusb_dev_sec_rm ( struct wusb_dev )

Definition at line 282 of file security.c.

int wusb_dev_sysfs_add ( struct wusbhc ,
struct usb_device *  ,
struct wusb_dev  
)

Definition at line 122 of file dev-sysfs.c.

void wusb_dev_sysfs_rm ( struct wusb_dev )

Definition at line 134 of file dev-sysfs.c.

int wusb_dev_update_address ( struct wusbhc wusbhc,
struct wusb_dev wusb_dev 
)

Update the address of an unauthenticated WUSB device

Once we have successfully authenticated, we take it to addr0 state and then to a normal address.

Before the device's address (as known by it) was usb_dev->devnum | 0x80 (unauthenticated address). With this we update it to usb_dev->devnum.

Definition at line 296 of file security.c.

int wusb_set_dev_addr ( struct wusbhc wusbhc,
struct wusb_dev wusb_dev,
u8  addr 
)

Definition at line 1117 of file devconnect.c.

int wusb_usb_ncb ( struct notifier_block nb,
unsigned long  val,
void priv 
)

Definition at line 970 of file devconnect.c.

int wusbhc_b_create ( struct wusbhc )

Definition at line 253 of file wusbhc.c.

void wusbhc_b_destroy ( struct wusbhc )

Definition at line 276 of file wusbhc.c.

int wusbhc_chid_set ( struct wusbhc ,
const struct wusb_ckhdid  
)

Definition at line 264 of file mmc.c.

int wusbhc_create ( struct wusbhc )

Definition at line 205 of file wusbhc.c.

void wusbhc_destroy ( struct wusbhc )

Definition at line 283 of file wusbhc.c.

int wusbhc_devconnect_create ( struct wusbhc )

Definition at line 1026 of file devconnect.c.

void wusbhc_devconnect_destroy ( struct wusbhc )

Definition at line 1042 of file devconnect.c.

int wusbhc_devconnect_start ( struct wusbhc wusbhc)

Definition at line 1056 of file devconnect.c.

void wusbhc_devconnect_stop ( struct wusbhc wusbhc)

Definition at line 1094 of file devconnect.c.

void wusbhc_giveback_urb ( struct wusbhc wusbhc,
struct urb urb,
int  status 
)

wusbhc_giveback_urb - return an URB to the USB core : the host controller the URB is from. : the URB. : the URB's status.

Return an URB to the USB core doing some additional WUSB specific processing.

  • After a successful transfer, update the trust timeout timestamp for the WUSB device.
  • [WUSB] sections 4.13 and 7.5.1 specifies the stop retrasmittion condition for the WCONNECTACK_IE is that the host has observed the associated device responding to a control transfer.

Definition at line 368 of file wusbhc.c.

void wusbhc_gtk_rekey ( struct wusbhc wusbhc)

wusbhc_gtk_rekey - generate and distribute a new GTK : the WUSB host controller

Generate a new GTK and distribute it to all connected and authenticated devices. When all devices have the new GTK, the host starts using it.

This must be called after every device disconnect (see [WUSB] section 6.2.11.2).

Definition at line 554 of file security.c.

void wusbhc_handle_dn ( struct wusbhc ,
u8  srcaddr,
struct wusb_dn_hdr dn_hdr,
size_t  size 
)

Definition at line 610 of file devconnect.c.

int wusbhc_mmcie_create ( struct wusbhc )

Definition at line 45 of file mmc.c.

void wusbhc_mmcie_destroy ( struct wusbhc )

Definition at line 56 of file mmc.c.

void wusbhc_mmcie_rm ( struct wusbhc ,
struct wuie_hdr  
)

Definition at line 141 of file mmc.c.

int wusbhc_mmcie_set ( struct wusbhc ,
u8  interval,
u8  repeat_cnt,
struct wuie_hdr  
)

Definition at line 94 of file mmc.c.

int wusbhc_pal_register ( struct wusbhc wusbhc)

wusbhc_pal_register - register the WUSB HC as a UWB PAL : the WUSB HC

Definition at line 35 of file pal.c.

void wusbhc_pal_unregister ( struct wusbhc wusbhc)

wusbhc_pal_register - unregister the WUSB HC as a UWB PAL : the WUSB HC

Definition at line 51 of file pal.c.

void wusbhc_reset_all ( struct wusbhc wusbhc)

wusbhc_reset_all - reset the HC hardware : the host controller to reset.

Request a full hardware reset of the chip. This will also reset the radio controller and any other PALs.

Definition at line 394 of file wusbhc.c.

int wusbhc_rh_control ( struct usb_hcd *  ,
u16  ,
u16  ,
u16  ,
char ,
u16   
)

Definition at line 352 of file rh.c.

int wusbhc_rh_create ( struct wusbhc )

Definition at line 434 of file rh.c.

void wusbhc_rh_destroy ( struct wusbhc )

Definition at line 449 of file rh.c.

int wusbhc_rh_resume ( struct usb_hcd *  )

Definition at line 406 of file rh.c.

int wusbhc_rh_start_port_reset ( struct usb_hcd *  ,
unsigned   
)

Definition at line 416 of file rh.c.

int wusbhc_rh_status_data ( struct usb_hcd *  ,
char  
)

Definition at line 141 of file rh.c.

int wusbhc_rh_suspend ( struct usb_hcd *  )

Definition at line 396 of file rh.c.

int wusbhc_rsv_establish ( struct wusbhc wusbhc)

wusbhc_rsv_establish - establish a reservation for the cluster : the WUSB HC requesting a bandwidth reservation

Definition at line 76 of file reservation.c.

void wusbhc_rsv_terminate ( struct wusbhc wusbhc)

wusbhc_rsv_terminate - terminate the cluster reservation : the WUSB host whose reservation is to be terminated

Definition at line 111 of file reservation.c.

int wusbhc_sec_create ( struct wusbhc )

Definition at line 35 of file security.c.

void wusbhc_sec_destroy ( struct wusbhc )

Definition at line 51 of file security.c.

int wusbhc_sec_start ( struct wusbhc wusbhc)

wusbhc_sec_start - start the security management process : the WUSB host controller

Generate and set an initial GTK on the host controller.

Called when the HC is started.

Definition at line 108 of file security.c.

void wusbhc_sec_stop ( struct wusbhc wusbhc)

wusbhc_sec_stop - stop the security management process : the WUSB host controller

Wait for any pending GTK rekeys to stop.

Definition at line 130 of file security.c.

int wusbhc_start ( struct wusbhc wusbhc)

Definition at line 192 of file mmc.c.

void wusbhc_stop ( struct wusbhc wusbhc)

Definition at line 249 of file mmc.c.

Variable Documentation

u8 data[16]

Definition at line 293 of file wusbhc.h.

Definition at line 292 of file wusbhc.h.

Definition at line 292 of file wusbhc.c.