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

irda_device.c File Reference

#include <linux/config.h>
#include <linux/string.h>
#include <linux/proc_fs.h>
#include <linux/skbuff.h>
#include <linux/if.h>
#include <linux/if_ether.h>
#include <linux/if_arp.h>
#include <linux/netdevice.h>
#include <linux/init.h>
#include <linux/tty.h>
#include <linux/kmod.h>
#include <linux/wireless.h>
#include <asm/spinlock.h>
#include <asm/ioctls.h>
#include <asm/segment.h>
#include <asm/uaccess.h>
#include <asm/dma.h>
#include <asm/io.h>
#include <net/pkt_sched.h>
#include <net/irda/irda_device.h>
#include <net/irda/irlap.h>
#include <net/irda/timer.h>
#include <net/irda/wrapper.h>

Include dependency graph for irda_device.c:

Go to the source code of this file.

Functions

int irtty_init (void)
int nsc_ircc_init (void)
int ircc_init (void)
int w83977af_init (void)
int esi_init (void)
int tekram_init (void)
int actisys_init (void)
int girbil_init (void)
int toshoboe_init (void)
int litelink_init (void)
static void __irda_task_delete (struct irda_task *task)
static void irda_task_timer_expired (void *data)
int __init irda_device_init (void)
void irda_device_cleanup (void)
void irda_device_set_media_busy (struct device *dev, 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_is_receiving (struct device *dev)
void irda_task_next_state (struct irda_task *task, TASK_STATE state)
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)
int irda_device_setup (struct device *dev)
int irda_device_txqueue_empty (struct device *dev)
dongle_tirda_device_dongle_init (struct device *dev, int type)
int irda_device_dongle_cleanup (dongle_t *dongle)
int irda_device_register_dongle (struct dongle_reg *new)
void irda_device_unregister_dongle (struct dongle_reg *dongle)
int irda_device_set_mode (struct device *dev, int mode)
void setup_dma (int channel, char *buffer, int count, int mode)

Variables

static hashbin_tdongles = NULL
static hashbin_ttasks = NULL
const char * infrared_mode []
static const char * task_state []


Function Documentation

static void __irda_task_delete struct irda_task task  )  [static]
 

Definition at line 266 of file irda_device.c.

References del_timer(), kfree(), and irda_task::timer.

Referenced by irda_device_cleanup(), and irda_task_delete().

Here is the call graph for this function:

int actisys_init void   ) 
 

Definition at line 96 of file actisys.c.

References irda_device_register_dongle(), irda_device_unregister_dongle(), and ret.

Referenced by irda_device_init().

Here is the call graph for this function:

int esi_init void   ) 
 

Definition at line 58 of file esi.c.

References irda_device_register_dongle().

Referenced by irda_device_init().

Here is the call graph for this function:

int girbil_init void   ) 
 

Definition at line 77 of file girbil.c.

References irda_device_register_dongle().

Referenced by irda_device_init().

Here is the call graph for this function:

int ircc_init void   ) 
 

Definition at line 121 of file smc-ircc.c.

References chipio_t::cfg_base, check_region, chip, CHIP_IO_EXTENT, ENODEV, chipio_t::fir_base, i, io, io2, ircc_open(), IRDA_DEBUG, smc_chip::name, smc_chip::probe, ret, and chipio_t::sir_base.

Referenced by irda_device_init().

Here is the call graph for this function:

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 __init irda_device_init void   ) 
 

Definition at line 101 of file irda_device.c.

References actisys_init(), ENOMEM, esi_init(), girbil_init(), hashbin_new(), HB_GLOBAL, ircc_init(), irtty_init(), KERN_WARNING, litelink_init(), nsc_ircc_init(), NULL, old_belkin_init(), printk, tekram_init(), toshoboe_init(), and w83977af_init().

Here is the call graph for this function:

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 new  ) 
 

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_mode struct device *  dev,
int  mode
 

Definition at line 555 of file irda_device.c.

References ERROR, IRDA_DEBUG, ret, and SIOCSMODE.

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, irda_task::finished, 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().

static void irda_task_timer_expired void *  data  )  [static]
 

Definition at line 399 of file irda_device.c.

References IRDA_DEBUG, irda_task_kick(), and task.

Referenced by irda_task_kick().

Here is the call graph for this function:

int irtty_init void   ) 
 

Definition at line 77 of file irtty.c.

References ENOMEM, ERROR, file, hashbin_new(), HB_LOCAL, irtty_close(), irtty_ioctl(), irtty_open(), irtty_receive_buf(), irtty_receive_room(), irtty_write_wakeup(), KERN_WARNING, long, memset, N_IRDA, NULL, printk, status, TTY_LDISC_MAGIC, and tty_register_ldisc().

Referenced by irda_device_init().

Here is the call graph for this function:

int litelink_init void   ) 
 

Definition at line 61 of file litelink.c.

References irda_device_register_dongle().

Referenced by irda_device_init().

Here is the call graph for this function:

int nsc_ircc_init void   ) 
 

Definition at line 157 of file nsc-ircc.c.

References apm_register_callback(), nsc_chip::cfg, cfg, check_region, chip, CHIP_IO_EXTENT, nsc_chip::cid_index, nsc_chip::cid_mask, nsc_chip::cid_value, dma, ENODEV, i, id, inb, nsc_chip::init, io, io2, ioaddr, IRDA_DEBUG, irq, memset, nsc_chip::name, nsc_ircc_open(), outb, nsc_chip::probe, reg, ret, and xff.

Here is the call graph for this function:

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:

int tekram_init void   ) 
 

Definition at line 58 of file tekram.c.

References irda_device_register_dongle().

Referenced by irda_device_init().

Here is the call graph for this function:

int toshoboe_init void   ) 
 

Definition at line 998 of file toshoboe.c.

References apm_register_callback(), ENODEV, found, KERN_WARNING, NULL, PCI_BASE_ADDRESS_IO_MASK, PCI_DEVICE_ID_FIR701, pci_find_device(), PCI_VENDOR_ID_TOSHIBA, printk, and toshoboe_open().

Referenced by irda_device_init().

Here is the call graph for this function:

int w83977af_init void   ) 
 

Definition at line 116 of file w83977af_ir.c.

References check_region, CHIP_IO_EXTENT, dma, ENODEV, i, io, ioaddr, IRDA_DEBUG, irq, and w83977af_open().

Referenced by irda_device_init().

Here is the call graph for this function:


Variable Documentation

hashbin_t* dongles = NULL [static]
 

Definition at line 71 of file irda_device.c.

const char* infrared_mode[]
 

Initial value:

 {
        "IRDA_IRLAP",
        "IRDA_RAW",
        "SHARP_ASK",
        "TV_REMOTE",
}

Definition at line 74 of file irda_device.c.

Referenced by irtty_set_mode().

const char* task_state[] [static]
 

Initial value:

 {
        "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 81 of file irda_device.c.

Referenced by get_status(), and irda_task_next_state().

hashbin_t* tasks = NULL [static]
 

Definition at line 72 of file irda_device.c.