Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
wpan-class.c File Reference
#include <linux/slab.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/device.h>
#include <net/wpan-phy.h>
#include "ieee802154.h"

Go to the source code of this file.

Data Structures

struct  wpan_phy_iter_data
 

Macros

#define MASTER_SHOW_COMPLEX(name, format_string, args...)
 
#define MASTER_SHOW(field, format_string)   MASTER_SHOW_COMPLEX(field, format_string, phy->field)
 

Functions

 MASTER_SHOW (current_channel,"%d")
 
 MASTER_SHOW (current_page,"%d")
 
 MASTER_SHOW_COMPLEX (transmit_power,"%d +- %d dB",((signed char)(phy->transmit_power<< 2)) >> 2,(phy->transmit_power >> 6)?(phy->transmit_power >> 6)*3:1)
 
 MASTER_SHOW (cca_mode,"%d")
 
struct wpan_phywpan_phy_find (const char *str)
 
 EXPORT_SYMBOL (wpan_phy_find)
 
int wpan_phy_for_each (int(*fn)(struct wpan_phy *phy, void *data), void *data)
 
 EXPORT_SYMBOL (wpan_phy_for_each)
 
struct wpan_phywpan_phy_alloc (size_t priv_size)
 
 EXPORT_SYMBOL (wpan_phy_alloc)
 
int wpan_phy_register (struct wpan_phy *phy)
 
 EXPORT_SYMBOL (wpan_phy_register)
 
void wpan_phy_unregister (struct wpan_phy *phy)
 
 EXPORT_SYMBOL (wpan_phy_unregister)
 
void wpan_phy_free (struct wpan_phy *phy)
 
 EXPORT_SYMBOL (wpan_phy_free)
 
 subsys_initcall (wpan_phy_class_init)
 
 module_exit (wpan_phy_class_exit)
 
 MODULE_LICENSE ("GPL v2")
 
 MODULE_DESCRIPTION ("IEEE 802.15.4 configuration interface")
 
 MODULE_AUTHOR ("Dmitry Eremin-Solenikov")
 

Macro Definition Documentation

#define MASTER_SHOW (   field,
  format_string 
)    MASTER_SHOW_COMPLEX(field, format_string, phy->field)

Definition at line 41 of file wpan-class.c.

#define MASTER_SHOW_COMPLEX (   name,
  format_string,
  args... 
)
Value:
static ssize_t name ## _show(struct device *dev, \
struct device_attribute *attr, char *buf) \
{ \
int ret; \
mutex_lock(&phy->pib_lock); \
ret = snprintf(buf, PAGE_SIZE, format_string "\n", args); \
mutex_unlock(&phy->pib_lock); \
return ret; \
}

Definition at line 28 of file wpan-class.c.

Function Documentation

EXPORT_SYMBOL ( wpan_phy_find  )
EXPORT_SYMBOL ( wpan_phy_for_each  )
EXPORT_SYMBOL ( wpan_phy_alloc  )
EXPORT_SYMBOL ( wpan_phy_register  )
EXPORT_SYMBOL ( wpan_phy_unregister  )
EXPORT_SYMBOL ( wpan_phy_free  )
MASTER_SHOW ( current_channel  ,
"%d"   
)
MASTER_SHOW ( current_page  ,
"%d"   
)
MASTER_SHOW ( cca_mode  ,
"%d"   
)
MASTER_SHOW_COMPLEX ( transmit_power  ,
"%d +- %d dB"  ,
((signed char)(phy->transmit_power<< 2)) >>  2,
(phy->transmit_power >> 6)?(phy->transmit_power >> 6)*3:1   
)
MODULE_AUTHOR ( "Dmitry Eremin-Solenikov"  )
MODULE_DESCRIPTION ( "IEEE 802.15.4 configuration interface )
module_exit ( wpan_phy_class_exit  )
MODULE_LICENSE ( "GPL v2 )
subsys_initcall ( wpan_phy_class_init  )
struct wpan_phy* wpan_phy_alloc ( size_t  priv_size)
read

Definition at line 145 of file wpan-class.c.

struct wpan_phy* wpan_phy_find ( const char str)
read

Definition at line 99 of file wpan-class.c.

int wpan_phy_for_each ( int(*)(struct wpan_phy *phy, void *data fn,
void data 
)

Definition at line 127 of file wpan-class.c.

void wpan_phy_free ( struct wpan_phy phy)

Definition at line 191 of file wpan-class.c.

int wpan_phy_register ( struct wpan_phy phy)

Definition at line 179 of file wpan-class.c.

void wpan_phy_unregister ( struct wpan_phy phy)

Definition at line 185 of file wpan-class.c.