Main Page | Alphabetical List | Data Structures | Directories | File List | Data Fields | Globals

irda_device.h File Reference

#include <linux/tty.h>
#include <linux/netdevice.h>
#include <asm/spinlock.h>
#include <linux/irda.h>
#include <net/irda/irda.h>
#include <net/irda/qos.h>
#include <net/irda/irqueue.h>
#include <net/irda/irlap_frame.h>

Include dependency graph for irda_device.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define IFF_SIR   0x0001
#define IFF_MIR   0x0002
#define IFF_FIR   0x0004
#define IFF_VFIR   0x0008
#define IFF_PIO   0x0010
#define IFF_DMA   0x0020
#define IFF_SHM   0x0040
#define IFF_DONGLE   0x0080
#define IFF_AIR   0x0100
#define IO_XMIT   0x01
#define IO_RECV   0x02
#define irda_get_mtt(skb)
#define irda_get_speed(skb)

Typedefs

typedef int(* TASK_CALLBACK )(struct irda_task *task)

Enumerations

enum  INFRARED_MODE { IRDA_IRLAP, IRDA_RAW, SHARP_ASK, TV_REMOTE }
enum  TASK_STATE {
  IRDA_TASK_INIT, IRDA_TASK_DONE, IRDA_TASK_WAIT, IRDA_TASK_WAIT1,
  IRDA_TASK_WAIT2, IRDA_TASK_WAIT3, IRDA_TASK_CHILD_INIT, IRDA_TASK_CHILD_WAIT,
  IRDA_TASK_CHILD_DONE
}

Functions

int irda_device_init (void)
void irda_device_cleanup (void)
void irda_device_set_media_busy (struct device *dev, int status)
int irda_device_is_media_busy (struct device *dev)
int irda_device_is_receiving (struct device *dev)
int irda_device_txqueue_empty (struct device *dev)
int irda_device_set_raw_mode (struct device *self, int status)
int irda_device_set_dtr_rts (struct device *dev, int dtr, int rts)
int irda_device_change_speed (struct device *dev, __u32 speed)
int irda_device_setup (struct device *dev)
void irda_device_unregister_dongle (struct dongle_reg *dongle)
int irda_device_register_dongle (struct dongle_reg *dongle)
dongle_tirda_device_dongle_init (struct device *dev, int type)
int irda_device_dongle_cleanup (dongle_t *dongle)
void setup_dma (int channel, char *buffer, int count, int mode)
void irda_task_delete (struct irda_task *task)
int irda_task_kick (struct irda_task *task)
irda_taskirda_task_execute (void *instance, TASK_CALLBACK function, TASK_CALLBACK finished, struct irda_task *parent, void *param)
void irda_task_next_state (struct irda_task *task, TASK_STATE state)

Variables

const char * infrared_mode []


Define Documentation

#define IFF_AIR   0x0100
 

Definition at line 54 of file irda_device.h.

#define IFF_DMA   0x0020
 

Definition at line 51 of file irda_device.h.

Referenced by ircc_open(), nsc_ircc_open(), toshoboe_open(), and w83977af_open().

#define IFF_DONGLE   0x0080
 

Definition at line 53 of file irda_device.h.

Referenced by nsc_ircc_open().

#define IFF_FIR   0x0004
 

Definition at line 48 of file irda_device.h.

Referenced by ircc_open(), nsc_ircc_open(), toshoboe_open(), and w83977af_open().

#define IFF_MIR   0x0002
 

Definition at line 47 of file irda_device.h.

Referenced by ircc_open(), nsc_ircc_open(), and w83977af_open().

#define IFF_PIO   0x0010
 

Definition at line 50 of file irda_device.h.

Referenced by ircc_open(), irport_open(), irtty_open(), nsc_ircc_open(), toshoboe_open(), and w83977af_open().

#define IFF_SHM   0x0040
 

Definition at line 52 of file irda_device.h.

#define IFF_SIR   0x0001
 

Definition at line 46 of file irda_device.h.

Referenced by ircc_open(), irport_open(), irtty_open(), nsc_ircc_open(), toshoboe_open(), and w83977af_open().

#define IFF_VFIR   0x0008
 

Definition at line 49 of file irda_device.h.

#define IO_RECV   0x02
 

Definition at line 57 of file irda_device.h.

Referenced by ircc_dma_receive(), ircc_interrupt(), nsc_ircc_dma_receive(), nsc_ircc_sir_interrupt(), w83977af_dma_receive(), and w83977af_sir_interrupt().

#define IO_XMIT   0x01
 

Definition at line 56 of file irda_device.h.

Referenced by ircc_dma_xmit(), nsc_ircc_dma_xmit(), nsc_ircc_fir_interrupt(), nsc_ircc_hard_xmit_fir(), nsc_ircc_sir_interrupt(), w83977af_dma_write(), w83977af_fir_interrupt(), w83977af_hard_xmit(), and w83977af_sir_interrupt().

#define irda_get_mtt skb   ) 
 

Value:

(                                                 \
        IRDA_MIN(10000,                                                     \
                  (((struct irda_skb_cb *) skb->cb)->magic == LAP_MAGIC) ?  \
                          ((struct irda_skb_cb *)(skb->cb))->mtt : 10000    \
                 )                                                          \
)

Definition at line 196 of file irda_device.h.

Referenced by ircc_hard_xmit(), nsc_ircc_hard_xmit_fir(), toshoboe_hard_xmit(), and w83977af_hard_xmit().

#define irda_get_speed skb   ) 
 

Value:

(                                               \
        (((struct irda_skb_cb*) skb->cb)->magic == LAP_MAGIC) ?         \
                  ((struct irda_skb_cb *)(skb->cb))->speed : 9600       \
)

Definition at line 225 of file irda_device.h.

Referenced by ircc_hard_xmit(), irport_hard_xmit(), irtty_hard_xmit(), nsc_ircc_hard_xmit_fir(), nsc_ircc_hard_xmit_sir(), toshoboe_hard_xmit(), and w83977af_hard_xmit().


Typedef Documentation

typedef int(* TASK_CALLBACK)(struct irda_task *task)
 

Definition at line 79 of file irda_device.h.


Enumeration Type Documentation

enum INFRARED_MODE
 

Enumeration values:
IRDA_IRLAP 
IRDA_RAW 
SHARP_ASK 
TV_REMOTE 

Definition at line 59 of file irda_device.h.

enum TASK_STATE
 

Enumeration values:
IRDA_TASK_INIT 
IRDA_TASK_DONE 
IRDA_TASK_WAIT 
IRDA_TASK_WAIT1 
IRDA_TASK_WAIT2 
IRDA_TASK_WAIT3 
IRDA_TASK_CHILD_INIT 
IRDA_TASK_CHILD_WAIT 
IRDA_TASK_CHILD_DONE 

Definition at line 66 of file irda_device.h.


Function Documentation

int irda_device_change_speed struct device *  dev,
__u32  speed
 

Definition at line 213 of file irda_device.c.

References ERROR, IRDA_DEBUG, ret, and SIOCSBANDWIDTH.

Referenced by irlap_change_speed().

void irda_device_cleanup void   ) 
 

Definition at line 157 of file irda_device.c.

References __irda_task_delete(), hashbin_delete(), IRDA_DEBUG, and NULL.

Here is the call graph for this function:

int irda_device_dongle_cleanup dongle_t dongle  ) 
 

Definition at line 500 of file irda_device.c.

References ASSERT, dongle_reg::close, dongle_t::issue, kfree(), and NULL.

Referenced by irport_close(), and irtty_close().

Here is the call graph for this function:

dongle_t* irda_device_dongle_init struct device *  dev,
int  type
 

Definition at line 461 of file irda_device.c.

References ASSERT, dongle, ERROR, hashbin_find(), kmalloc(), memset, modname, NULL, reg, request_module(), and sprintf().

Referenced by irport_net_ioctl(), irtty_ioctl(), and irtty_net_ioctl().

Here is the call graph for this function:

int irda_device_init void   ) 
 

Definition at line 101 of file irda_device.c.

Referenced by do_basic_setup(), and irda_init().

int irda_device_is_media_busy struct device *  dev  ) 
 

int irda_device_is_receiving struct device *  dev  ) 
 

Definition at line 239 of file irda_device.c.

References ERROR, IRDA_DEBUG, ret, and SIOCGRECEIVING.

Referenced by irlap_state_nrm_p(), and irlap_state_query().

int irda_device_register_dongle struct dongle_reg dongle  ) 
 

Definition at line 517 of file irda_device.c.

References hashbin_find(), hashbin_insert(), MESSAGE, NULL, and dongle_reg::type.

Referenced by actisys_init(), esi_init(), girbil_init(), litelink_init(), old_belkin_init(), and tekram_init().

Here is the call graph for this function:

int irda_device_set_dtr_rts struct device *  dev,
int  dtr,
int  rts
 

Definition at line 192 of file irda_device.c.

References ERROR, IRDA_DEBUG, ret, and SIOCSDTRRTS.

void irda_device_set_media_busy struct device *  dev,
int  status
 

Definition at line 171 of file irda_device.c.

References ASSERT, del_timer(), FALSE, IRDA_DEBUG, irlap_start_mbusy_timer(), LAP_MAGIC, NULL, and TRUE.

Referenced by irlap_apply_default_connection_parameters(), irlap_discovery_confirm(), irlap_media_busy_expired(), irlap_state_ndm(), irport_net_ioctl(), irtty_net_ioctl(), irtty_receive_buf(), nsc_ircc_net_ioctl(), state_inside_frame(), state_link_escape(), state_outside_frame(), toshoboe_net_ioctl(), and w83977af_net_ioctl().

Here is the call graph for this function:

int irda_device_set_raw_mode struct device *  self,
int  status
 

int irda_device_setup struct device *  dev  ) 
 

Definition at line 416 of file irda_device.c.

References ARPHRD_IRDA, ASSERT, dev_init_buffers(), IFF_NOARP, memset, NULL, and xff.

Referenced by irport_net_init(), irtty_net_init(), nsc_ircc_net_init(), toshoboe_net_init(), and w83977af_net_init().

Here is the call graph for this function:

int irda_device_txqueue_empty struct device *  dev  ) 
 

Definition at line 448 of file irda_device.c.

References FALSE, and TRUE.

Referenced by nsc_ircc_fir_interrupt().

void irda_device_unregister_dongle struct dongle_reg dongle  ) 
 

Definition at line 537 of file irda_device.c.

References ERROR, hashbin_remove(), NULL, and dongle_reg::type.

Referenced by actisys_cleanup(), actisys_init(), esi_cleanup(), girbil_cleanup(), litelink_cleanup(), old_belkin_cleanup(), and tekram_cleanup().

Here is the call graph for this function:

void irda_task_delete struct irda_task task  ) 
 

Definition at line 273 of file irda_device.c.

References __irda_task_delete(), hashbin_remove(), and NULL.

Referenced by irda_task_kick(), irtty_close(), and tekram_close().

Here is the call graph for this function:

struct irda_task* irda_task_execute void *  instance,
TASK_CALLBACK  function,
TASK_CALLBACK  finished,
struct irda_task parent,
void *  param
 

Definition at line 359 of file irda_device.c.

References irda_task::finished, irda_task::function, hashbin_insert(), init_timer(), irda_task::instance, IRDA_DEBUG, IRDA_TASK_INIT, irda_task_kick(), IRDA_TASK_MAGIC, kmalloc(), irda_task::magic, NULL, irda_task::param, irda_task::parent, ret, irda_task::state, task, and irda_task::timer.

Referenced by __irport_change_speed(), girbil_change_speed(), irport_net_ioctl(), irport_write_wakeup(), irtty_change_speed(), irtty_ioctl(), irtty_net_ioctl(), irtty_write_wakeup(), and tekram_change_speed().

Here is the call graph for this function:

int irda_task_kick struct irda_task task  ) 
 

Definition at line 289 of file irda_device.c.

References ASSERT, count, del_timer(), ERROR, FALSE, finished, irda_task::finished, irda_task::function, IRDA_DEBUG, irda_start_timer(), IRDA_TASK_CHILD_DONE, IRDA_TASK_CHILD_WAIT, irda_task_delete(), IRDA_TASK_DONE, irda_task_kick(), IRDA_TASK_MAGIC, irda_task_timer_expired(), irda_task::magic, NULL, irda_task::parent, irda_task::state, timeout, irda_task::timer, and TRUE.

Referenced by irda_task_execute(), irda_task_kick(), and irda_task_timer_expired().

Here is the call graph for this function:

void irda_task_next_state struct irda_task task,
TASK_STATE  state
 

Definition at line 259 of file irda_device.c.

References IRDA_DEBUG, irda_task::state, and task_state.

Referenced by __irport_change_speed(), actisys_change_speed(), actisys_reset(), esi_change_speed(), esi_reset(), girbil_change_speed(), girbil_reset(), irtty_change_speed(), litelink_change_speed(), litelink_reset(), old_belkin_change_speed(), old_belkin_reset(), tekram_change_speed(), and tekram_reset().

void setup_dma int  channel,
char *  buffer,
int  count,
int  mode
 

Definition at line 581 of file irda_device.c.

References claim_dma_lock, clear_dma_ff, disable_dma(), enable_dma(), release_dma_lock, set_dma_addr(), set_dma_count(), set_dma_mode(), and virt_to_bus.

Here is the call graph for this function:


Variable Documentation

const char* infrared_mode[]
 

Definition at line 74 of file irda_device.c.

Referenced by irtty_set_mode().