Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions
cmd.c File Reference
#include <linux/hardirq.h>
#include <linux/slab.h>
#include <linux/export.h>
#include "libertas_tf.h"

Go to the source code of this file.

Macros

#define pr_fmt(fmt)   KBUILD_MODNAME ": " fmt
 
#define CHAN_TO_IDX(chan)   ((chan) - 1)
 

Functions

int lbtf_cmd_copyback (struct lbtf_private *priv, unsigned long extra, struct cmd_header *resp)
 
 EXPORT_SYMBOL_GPL (lbtf_cmd_copyback)
 
int lbtf_update_hw_spec (struct lbtf_private *priv)
 
int lbtf_set_channel (struct lbtf_private *priv, u8 channel)
 
int lbtf_beacon_set (struct lbtf_private *priv, struct sk_buff *beacon)
 
int lbtf_beacon_ctrl (struct lbtf_private *priv, bool beacon_enable, int beacon_int)
 
void lbtf_complete_command (struct lbtf_private *priv, struct cmd_ctrl_node *cmd, int result)
 
int lbtf_cmd_set_mac_multicast_addr (struct lbtf_private *priv)
 
void lbtf_set_mode (struct lbtf_private *priv, enum lbtf_mode mode)
 
void lbtf_set_bssid (struct lbtf_private *priv, bool activate, const u8 *bssid)
 
int lbtf_set_mac_address (struct lbtf_private *priv, uint8_t *mac_addr)
 
int lbtf_set_radio_control (struct lbtf_private *priv)
 
void lbtf_set_mac_control (struct lbtf_private *priv)
 
int lbtf_allocate_cmd_buffer (struct lbtf_private *priv)
 
int lbtf_free_cmd_buffer (struct lbtf_private *priv)
 
int lbtf_execute_next_command (struct lbtf_private *priv)
 
void lbtf_cmd_async (struct lbtf_private *priv, uint16_t command, struct cmd_header *in_cmd, int in_cmd_size)
 
int __lbtf_cmd (struct lbtf_private *priv, uint16_t command, struct cmd_header *in_cmd, int in_cmd_size, int(*callback)(struct lbtf_private *, unsigned long, struct cmd_header *), unsigned long callback_arg)
 
 EXPORT_SYMBOL_GPL (__lbtf_cmd)
 
void lbtf_cmd_response_rx (struct lbtf_private *priv)
 
 EXPORT_SYMBOL_GPL (lbtf_cmd_response_rx)
 
int lbtf_process_rx_command (struct lbtf_private *priv)
 

Macro Definition Documentation

#define CHAN_TO_IDX (   chan)    ((chan) - 1)

Definition at line 58 of file cmd.c.

#define pr_fmt (   fmt)    KBUILD_MODNAME ": " fmt

Definition at line 10 of file cmd.c.

Function Documentation

int __lbtf_cmd ( struct lbtf_private priv,
uint16_t  command,
struct cmd_header in_cmd,
int  in_cmd_size,
int(*)(struct lbtf_private *, unsigned long, struct cmd_header *)  callback,
unsigned long  callback_arg 
)

Definition at line 665 of file cmd.c.

EXPORT_SYMBOL_GPL ( lbtf_cmd_copyback  )
EXPORT_SYMBOL_GPL ( __lbtf_cmd  )
EXPORT_SYMBOL_GPL ( lbtf_cmd_response_rx  )
int lbtf_allocate_cmd_buffer ( struct lbtf_private priv)

lbtf_allocate_cmd_buffer - Allocates cmd buffer, links it to free cmd queue

A pointer to struct lbtf_private structure

Returns: 0 on success.

Definition at line 445 of file cmd.c.

int lbtf_beacon_ctrl ( struct lbtf_private priv,
bool  beacon_enable,
int  beacon_int 
)

Definition at line 191 of file cmd.c.

int lbtf_beacon_set ( struct lbtf_private priv,
struct sk_buff beacon 
)

Definition at line 169 of file cmd.c.

void lbtf_cmd_async ( struct lbtf_private priv,
uint16_t  command,
struct cmd_header in_cmd,
int  in_cmd_size 
)

Definition at line 657 of file cmd.c.

int lbtf_cmd_copyback ( struct lbtf_private priv,
unsigned long  extra,
struct cmd_header resp 
)

lbtf_cmd_copyback - Simple callback that copies response back into command

A pointer to struct lbtf_private structure A pointer to the original command structure for which 'resp' is a response A pointer to the command response

Returns: 0 on success, error on failure

Definition at line 46 of file cmd.c.

void lbtf_cmd_response_rx ( struct lbtf_private priv)

Definition at line 709 of file cmd.c.

int lbtf_cmd_set_mac_multicast_addr ( struct lbtf_private priv)

Definition at line 320 of file cmd.c.

void lbtf_complete_command ( struct lbtf_private priv,
struct cmd_ctrl_node cmd,
int  result 
)

Definition at line 308 of file cmd.c.

int lbtf_execute_next_command ( struct lbtf_private priv)

lbtf_execute_next_command: execute next command in cmd pending queue.

A pointer to struct lbtf_private structure

Returns: 0 on success.

Definition at line 564 of file cmd.c.

int lbtf_free_cmd_buffer ( struct lbtf_private priv)

lbtf_free_cmd_buffer - Frees the cmd buffer.

A pointer to struct lbtf_private structure

Returns: 0

Definition at line 493 of file cmd.c.

int lbtf_process_rx_command ( struct lbtf_private priv)

Definition at line 716 of file cmd.c.

void lbtf_set_bssid ( struct lbtf_private priv,
bool  activate,
const u8 bssid 
)

Definition at line 355 of file cmd.c.

int lbtf_set_channel ( struct lbtf_private priv,
u8  channel 
)

lbtf_set_channel: Set the radio channel

A pointer to struct lbtf_private structure The desired channel, or 0 to clear a locked channel

Returns: 0 on success, error on failure

Definition at line 153 of file cmd.c.

int lbtf_set_mac_address ( struct lbtf_private priv,
uint8_t mac_addr 
)

Definition at line 369 of file cmd.c.

void lbtf_set_mac_control ( struct lbtf_private priv)

Function Prototype Declaration

Definition at line 423 of file cmd.c.

void lbtf_set_mode ( struct lbtf_private priv,
enum lbtf_mode  mode 
)

Definition at line 342 of file cmd.c.

int lbtf_set_radio_control ( struct lbtf_private priv)

Definition at line 384 of file cmd.c.

int lbtf_update_hw_spec ( struct lbtf_private priv)

lbtf_update_hw_spec: Updates the hardware details.

A pointer to struct lbtf_private structure

Returns: 0 on success, error on failure

Definition at line 83 of file cmd.c.