Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
core.c File Reference
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/init.h>
#include <linux/workqueue.h>
#include <linux/capability.h>
#include <linux/list.h>
#include <linux/mutex.h>
#include <linux/rfkill.h>
#include <linux/sched.h>
#include <linux/spinlock.h>
#include <linux/device.h>
#include <linux/miscdevice.h>
#include <linux/wait.h>
#include <linux/poll.h>
#include <linux/fs.h>
#include <linux/slab.h>
#include "rfkill.h"

Go to the source code of this file.

Data Structures

struct  rfkill
 
struct  rfkill_int_event
 
struct  rfkill_data
 

Macros

#define POLL_INTERVAL   (5 * HZ)
 
#define RFKILL_BLOCK_HW   BIT(0)
 
#define RFKILL_BLOCK_SW   BIT(1)
 
#define RFKILL_BLOCK_SW_PREV   BIT(2)
 
#define RFKILL_BLOCK_ANY
 
#define RFKILL_BLOCK_SW_SETCALL   BIT(31)
 
#define to_rfkill(d)   container_of(d, struct rfkill, dev)
 

Functions

 MODULE_AUTHOR ("Ivo van Doorn <[email protected]>")
 
 MODULE_AUTHOR ("Johannes Berg <[email protected]>")
 
 MODULE_DESCRIPTION ("RF switch support")
 
 MODULE_LICENSE ("GPL")
 
 module_param_named (default_state, rfkill_default_state, uint, 0444)
 
 MODULE_PARM_DESC (default_state,"Default initial state for all radio types, 0 = radio off")
 
bool rfkill_set_hw_state (struct rfkill *rfkill, bool blocked)
 
 EXPORT_SYMBOL (rfkill_set_hw_state)
 
bool rfkill_set_sw_state (struct rfkill *rfkill, bool blocked)
 
 EXPORT_SYMBOL (rfkill_set_sw_state)
 
void rfkill_init_sw_state (struct rfkill *rfkill, bool blocked)
 
 EXPORT_SYMBOL (rfkill_init_sw_state)
 
void rfkill_set_states (struct rfkill *rfkill, bool sw, bool hw)
 
 EXPORT_SYMBOL (rfkill_set_states)
 
void rfkill_pause_polling (struct rfkill *rfkill)
 
 EXPORT_SYMBOL (rfkill_pause_polling)
 
void rfkill_resume_polling (struct rfkill *rfkill)
 
 EXPORT_SYMBOL (rfkill_resume_polling)
 
bool rfkill_blocked (struct rfkill *rfkill)
 
 EXPORT_SYMBOL (rfkill_blocked)
 
struct rfkill *__must_check rfkill_alloc (const char *name, struct device *parent, const enum rfkill_type type, const struct rfkill_ops *ops, void *ops_data)
 
 EXPORT_SYMBOL (rfkill_alloc)
 
int __must_check rfkill_register (struct rfkill *rfkill)
 
 EXPORT_SYMBOL (rfkill_register)
 
void rfkill_unregister (struct rfkill *rfkill)
 
 EXPORT_SYMBOL (rfkill_unregister)
 
void rfkill_destroy (struct rfkill *rfkill)
 
 EXPORT_SYMBOL (rfkill_destroy)
 
 subsys_initcall (rfkill_init)
 
 module_exit (rfkill_exit)
 

Macro Definition Documentation

#define POLL_INTERVAL   (5 * HZ)

Definition at line 41 of file core.c.

#define RFKILL_BLOCK_ANY
Value:
RFKILL_BLOCK_SW |\
RFKILL_BLOCK_SW_PREV)

Definition at line 46 of file core.c.

#define RFKILL_BLOCK_HW   BIT(0)

Definition at line 43 of file core.c.

#define RFKILL_BLOCK_SW   BIT(1)

Definition at line 44 of file core.c.

#define RFKILL_BLOCK_SW_PREV   BIT(2)

Definition at line 45 of file core.c.

#define RFKILL_BLOCK_SW_SETCALL   BIT(31)

Definition at line 49 of file core.c.

#define to_rfkill (   d)    container_of(d, struct rfkill, dev)

Definition at line 79 of file core.c.

Function Documentation

EXPORT_SYMBOL ( rfkill_set_hw_state  )
EXPORT_SYMBOL ( rfkill_set_sw_state  )
EXPORT_SYMBOL ( rfkill_init_sw_state  )
EXPORT_SYMBOL ( rfkill_set_states  )
EXPORT_SYMBOL ( rfkill_pause_polling  )
EXPORT_SYMBOL ( rfkill_resume_polling  )
EXPORT_SYMBOL ( rfkill_blocked  )
EXPORT_SYMBOL ( rfkill_alloc  )
EXPORT_SYMBOL ( rfkill_register  )
EXPORT_SYMBOL ( rfkill_unregister  )
EXPORT_SYMBOL ( rfkill_destroy  )
MODULE_AUTHOR ( "Ivo van Doorn <[email protected]>"  )
MODULE_AUTHOR ( "Johannes Berg <[email protected]>"  )
MODULE_DESCRIPTION ( "RF switch support )
module_exit ( rfkill_exit  )
MODULE_LICENSE ( "GPL"  )
module_param_named ( default_state  ,
rfkill_default_state  ,
uint  ,
0444   
)
MODULE_PARM_DESC ( default_state  ,
"Default initial state for all radio  types 
)
struct rfkill* __must_check rfkill_alloc ( const char name,
struct device parent,
const enum rfkill_type  type,
const struct rfkill_ops ops,
void ops_data 
)
read

Definition at line 851 of file core.c.

bool rfkill_blocked ( struct rfkill rfkill)

Definition at line 837 of file core.c.

void rfkill_destroy ( struct rfkill rfkill)

Definition at line 1021 of file core.c.

void rfkill_init_sw_state ( struct rfkill rfkill,
bool  blocked 
)

Definition at line 531 of file core.c.

void rfkill_pause_polling ( struct rfkill rfkill)

Definition at line 782 of file core.c.

int __must_check rfkill_register ( struct rfkill rfkill)

Definition at line 933 of file core.c.

void rfkill_resume_polling ( struct rfkill rfkill)

Definition at line 793 of file core.c.

bool rfkill_set_hw_state ( struct rfkill rfkill,
bool  blocked 
)

Definition at line 475 of file core.c.

void rfkill_set_states ( struct rfkill rfkill,
bool  sw,
bool  hw 
)

Definition at line 545 of file core.c.

bool rfkill_set_sw_state ( struct rfkill rfkill,
bool  blocked 
)

Definition at line 505 of file core.c.

void rfkill_unregister ( struct rfkill rfkill)

Definition at line 998 of file core.c.

subsys_initcall ( rfkill_init  )

Variable Documentation

bool cur

Definition at line 122 of file core.c.

bool sav

Definition at line 122 of file core.c.