#include <sys/types.h>
#include <sys/time.h>
#include <sys/socket.h>
#include <arpa/inet.h>
#include <unistd.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include "errno.h"
#include <pthread.h>
#include "config/compiler.h"
#include "core/include/definitions.h"
#include "core/interface/wmp_interface.h"
#include "core/include/wmp_misc.h"
#include "core/include/ml_com.h"
#include <assert.h>
#include <linux/if.h>
#include <linux/if_packet.h>
#include <linux/if_ether.h>
#include <sys/ioctl.h>
#include "module/ath5k_interface.h"
Go to the source code of this file.
Defines | |
#define | ATH5K_RATE_CODE_11M 0x18 |
#define | ATH5K_RATE_CODE_12M 0x0A |
#define | ATH5K_RATE_CODE_18M 0x0E |
#define | ATH5K_RATE_CODE_1M 0x1B |
#define | ATH5K_RATE_CODE_24M 0x09 |
#define | ATH5K_RATE_CODE_2M 0x1A |
#define | ATH5K_RATE_CODE_36M 0x0D |
#define | ATH5K_RATE_CODE_48M 0x08 |
#define | ATH5K_RATE_CODE_54M 0x0C |
#define | ATH5K_RATE_CODE_5_5M 0x19 |
#define | ATH5K_RATE_CODE_6M 0x0B |
#define | ATH5K_RATE_CODE_9M 0x0F |
#define | DEFAULT_ANTENNA_MODE AR5K_ANTMODE_DEFAULT |
#define | DEFAULT_FREQ 5200 |
#define | DEFAULT_RATE RATE_6M |
#define | DEFAULT_TXPOWER_DBM 15 |
#define | WMP_PROTO 0x6969 /* TODO: Mover a un sitio apropiado */ |
Functions | |
void * | bridge (void *) |
void | closeLowLevelCom () |
int | configure_interface (int sock, char *ifname) |
int | initLowLevelCom () |
int | iw_enum_devices (char a[10][256]) |
static char * | iw_get_ifname (char *name, int nsize, char *buf) |
int | iw_has_module (char *mod) |
int | llconfig (unsigned short freq, enum rates rate, unsigned char power, enum ath5k_ant_mode antenna_mode) |
rxInfo | llreceive (char *f, int timeout) |
int | llsend (char *f, int size) |
int | llsetPower (int f) |
int | llsetupModule (char *devi) |
void | print_packet_hex (char *msg, unsigned char *packet, int len) |
int | readllcfg () |
Variables | |
static int | antenna_mode |
static double | ath5k_rate [] |
static char | dev [20] |
static unsigned char | ethernet_frame [2500] |
static short | freq |
static char | param [256] |
static short | rate |
static unsigned short | raw_filter = WMP_PROTO |
static int | rx |
static struct timeval | tv |
static int | tx |
static unsigned char | txpower_dbm |
static char | val [256] |
#define ATH5K_RATE_CODE_11M 0x18 |
Definition at line 74 of file linux_us/hwi/ath5k_raw/ll_com.c.
#define ATH5K_RATE_CODE_12M 0x0A |
Definition at line 78 of file linux_us/hwi/ath5k_raw/ll_com.c.
#define ATH5K_RATE_CODE_18M 0x0E |
Definition at line 79 of file linux_us/hwi/ath5k_raw/ll_com.c.
#define ATH5K_RATE_CODE_1M 0x1B |
Definition at line 71 of file linux_us/hwi/ath5k_raw/ll_com.c.
#define ATH5K_RATE_CODE_24M 0x09 |
Definition at line 80 of file linux_us/hwi/ath5k_raw/ll_com.c.
#define ATH5K_RATE_CODE_2M 0x1A |
Definition at line 72 of file linux_us/hwi/ath5k_raw/ll_com.c.
#define ATH5K_RATE_CODE_36M 0x0D |
Definition at line 81 of file linux_us/hwi/ath5k_raw/ll_com.c.
#define ATH5K_RATE_CODE_48M 0x08 |
Definition at line 82 of file linux_us/hwi/ath5k_raw/ll_com.c.
#define ATH5K_RATE_CODE_54M 0x0C |
Definition at line 83 of file linux_us/hwi/ath5k_raw/ll_com.c.
#define ATH5K_RATE_CODE_5_5M 0x19 |
Definition at line 73 of file linux_us/hwi/ath5k_raw/ll_com.c.
#define ATH5K_RATE_CODE_6M 0x0B |
Definition at line 76 of file linux_us/hwi/ath5k_raw/ll_com.c.
#define ATH5K_RATE_CODE_9M 0x0F |
Definition at line 77 of file linux_us/hwi/ath5k_raw/ll_com.c.
Definition at line 69 of file linux_us/hwi/ath5k_raw/ll_com.c.
#define DEFAULT_FREQ 5200 |
Definition at line 66 of file linux_us/hwi/ath5k_raw/ll_com.c.
#define DEFAULT_RATE RATE_6M |
Definition at line 67 of file linux_us/hwi/ath5k_raw/ll_com.c.
#define DEFAULT_TXPOWER_DBM 15 |
Definition at line 68 of file linux_us/hwi/ath5k_raw/ll_com.c.
#define WMP_PROTO 0x6969 /* TODO: Mover a un sitio apropiado */ |
Definition at line 63 of file linux_us/hwi/ath5k_raw/ll_com.c.
void* bridge | ( | void * | ) |
void closeLowLevelCom | ( | void | ) |
Definition at line 197 of file linux_us/hwi/ath5k_raw/ll_com.c.
int configure_interface | ( | int | sock, |
char * | ifname | ||
) |
Definition at line 202 of file linux_us/hwi/ath5k_raw/ll_com.c.
int initLowLevelCom | ( | void | ) |
Definition at line 267 of file linux_us/hwi/ath5k_raw/ll_com.c.
int iw_enum_devices | ( | char | a[10][256] | ) |
Definition at line 546 of file linux_us/hwi/ath5k_raw/ll_com.c.
static char* iw_get_ifname | ( | char * | name, |
int | nsize, | ||
char * | buf | ||
) | [inline, static] |
Definition at line 531 of file linux_us/hwi/ath5k_raw/ll_com.c.
int iw_has_module | ( | char * | mod | ) |
Definition at line 523 of file linux_us/hwi/ath5k_raw/ll_com.c.
int llconfig | ( | unsigned short | freq, |
enum rates | rate, | ||
unsigned char | power, | ||
enum ath5k_ant_mode | antenna_mode | ||
) |
Definition at line 437 of file linux_us/hwi/ath5k_raw/ll_com.c.
Definition at line 387 of file linux_us/hwi/ath5k_raw/ll_com.c.
int llsend | ( | char * | f, |
int | size | ||
) |
Definition at line 370 of file linux_us/hwi/ath5k_raw/ll_com.c.
int llsetPower | ( | int | f | ) |
Definition at line 464 of file linux_us/hwi/ath5k_raw/ll_com.c.
int llsetupModule | ( | char * | devi | ) |
Definition at line 469 of file linux_us/hwi/ath5k_raw/ll_com.c.
void print_packet_hex | ( | char * | msg, |
unsigned char * | packet, | ||
int | len | ||
) |
Definition at line 106 of file linux_us/hwi/ath5k_raw/ll_com.c.
int readllcfg | ( | void | ) |
Definition at line 118 of file linux_us/hwi/ath5k_raw/ll_com.c.
int antenna_mode [static] |
Definition at line 95 of file linux_us/hwi/ath5k_raw/ll_com.c.
double ath5k_rate[] [static] |
{ 0, 0, 0, 0, 0, 0, 0, 0, 48, 24, 12, 6, 54, 36, 18, 9, 0, 0, 0, 0, 0, 0, 0, 0, 11, 5.5, 2, 1, 0, 0, 0, 0, 0 }
Definition at line 85 of file linux_us/hwi/ath5k_raw/ll_com.c.
char dev[20] [static] |
Definition at line 89 of file linux_us/hwi/ath5k_raw/ll_com.c.
unsigned char ethernet_frame[2500] [static] |
Definition at line 100 of file linux_us/hwi/ath5k_raw/ll_com.c.
short freq [static] |
Definition at line 92 of file linux_us/hwi/ath5k_raw/ll_com.c.
char param[256] [static] |
Definition at line 90 of file linux_us/hwi/ath5k_raw/ll_com.c.
short rate [static] |
Definition at line 93 of file linux_us/hwi/ath5k_raw/ll_com.c.
unsigned short raw_filter = WMP_PROTO [static] |
Definition at line 96 of file linux_us/hwi/ath5k_raw/ll_com.c.
int rx [static] |
Definition at line 88 of file linux_us/hwi/ath5k_raw/ll_com.c.
struct timeval tv [static] |
Definition at line 97 of file linux_us/hwi/ath5k_raw/ll_com.c.
int tx [static] |
Definition at line 88 of file linux_us/hwi/ath5k_raw/ll_com.c.
unsigned char txpower_dbm [static] |
Definition at line 94 of file linux_us/hwi/ath5k_raw/ll_com.c.
char val[256] [static] |
Definition at line 90 of file linux_us/hwi/ath5k_raw/ll_com.c.