Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Enumerations | Functions | Variables
zd_mac.h File Reference
#include <linux/kernel.h>
#include <net/mac80211.h>
#include "zd_chip.h"

Go to the source code of this file.

Data Structures

struct  zd_ctrlset
 
struct  rx_length_info
 
struct  rx_status
 
struct  tx_retry_rate
 
struct  tx_status
 
struct  housekeeping
 
struct  beacon
 
struct  zd_mac
 
struct  ofdm_plcp_header
 
struct  cck_plcp_header
 

Macros

#define ZD_CS_RESERVED_SIZE   25
 
#define ZD_PURE_RATE_MASK   0x0f
 
#define ZD_MODULATION_TYPE_MASK   0x10
 
#define ZD_RATE_MASK   (ZD_PURE_RATE_MASK|ZD_MODULATION_TYPE_MASK)
 
#define ZD_PURE_RATE(modulation)   ((modulation) & ZD_PURE_RATE_MASK)
 
#define ZD_MODULATION_TYPE(modulation)   ((modulation) & ZD_MODULATION_TYPE_MASK)
 
#define ZD_RATE(modulation)   ((modulation) & ZD_RATE_MASK)
 
#define ZD_CCK   0x00
 
#define ZD_OFDM   0x10
 
#define ZD_CCK_RATE_1M   (ZD_CCK|0x00)
 
#define ZD_CCK_RATE_2M   (ZD_CCK|0x01)
 
#define ZD_CCK_RATE_5_5M   (ZD_CCK|0x02)
 
#define ZD_CCK_RATE_11M   (ZD_CCK|0x03)
 
#define ZD_OFDM_RATE_6M   (ZD_OFDM|ZD_OFDM_PLCP_RATE_6M)
 
#define ZD_OFDM_RATE_9M   (ZD_OFDM|ZD_OFDM_PLCP_RATE_9M)
 
#define ZD_OFDM_RATE_12M   (ZD_OFDM|ZD_OFDM_PLCP_RATE_12M)
 
#define ZD_OFDM_RATE_18M   (ZD_OFDM|ZD_OFDM_PLCP_RATE_18M)
 
#define ZD_OFDM_RATE_24M   (ZD_OFDM|ZD_OFDM_PLCP_RATE_24M)
 
#define ZD_OFDM_RATE_36M   (ZD_OFDM|ZD_OFDM_PLCP_RATE_36M)
 
#define ZD_OFDM_RATE_48M   (ZD_OFDM|ZD_OFDM_PLCP_RATE_48M)
 
#define ZD_OFDM_RATE_54M   (ZD_OFDM|ZD_OFDM_PLCP_RATE_54M)
 
#define ZD_CCK_PREA_LONG   0x00
 
#define ZD_CCK_PREA_SHORT   0x20
 
#define ZD_OFDM_MODE_11G   0x00
 
#define ZD_OFDM_MODE_11A   0x20
 
#define ZD_CS_NEED_RANDOM_BACKOFF   0x01
 
#define ZD_CS_NO_ACK   0x02
 
#define ZD_CS_FRAME_TYPE_MASK   0x0c
 
#define ZD_CS_DATA_FRAME   0x00
 
#define ZD_CS_PS_POLL_FRAME   0x04
 
#define ZD_CS_MANAGEMENT_FRAME   0x08
 
#define ZD_CS_NO_SEQUENCE_CTL_FRAME   0x0c
 
#define ZD_CS_WAKE_DESTINATION   0x10
 
#define ZD_CS_RTS   0x20
 
#define ZD_CS_ENCRYPT   0x40
 
#define ZD_CS_SELF_CTS   0x80
 
#define ZD_PLCP_HEADER_SIZE   5
 
#define RX_LENGTH_INFO_TAG   0x697e
 
#define ZD_RX_NO_WEP   0
 
#define ZD_RX_WEP64   1
 
#define ZD_RX_TKIP   2
 
#define ZD_RX_AES   4
 
#define ZD_RX_WEP128   5
 
#define ZD_RX_WEP256   6
 
#define ZD_RX_FRAME_MODULATION_MASK   0x01
 
#define ZD_RX_CCK   0x00
 
#define ZD_RX_OFDM   0x01
 
#define ZD_RX_TIMEOUT_ERROR   0x02
 
#define ZD_RX_FIFO_OVERRUN_ERROR   0x04
 
#define ZD_RX_DECRYPTION_ERROR   0x08
 
#define ZD_RX_CRC32_ERROR   0x10
 
#define ZD_RX_NO_ADDR1_MATCH_ERROR   0x20
 
#define ZD_RX_CRC16_ERROR   0x40
 
#define ZD_RX_ERROR   0x80
 
#define ZD_MAC_STATS_BUFFER_SIZE   16
 
#define ZD_MAC_MAX_ACK_WAITERS   50
 
#define ZD_REGDOMAIN_FCC   0x10
 
#define ZD_REGDOMAIN_IC   0x20
 
#define ZD_REGDOMAIN_ETSI   0x30
 
#define ZD_REGDOMAIN_SPAIN   0x31
 
#define ZD_REGDOMAIN_FRANCE   0x32
 
#define ZD_REGDOMAIN_JAPAN_2   0x40
 
#define ZD_REGDOMAIN_JAPAN   0x41
 
#define ZD_REGDOMAIN_JAPAN_3   0x49
 
#define ZD_PLCP_SERVICE_LENGTH_EXTENSION   0x80
 
#define ZD_OFDM_PLCP_RATE_6M   0xb
 
#define ZD_OFDM_PLCP_RATE_9M   0xf
 
#define ZD_OFDM_PLCP_RATE_12M   0xa
 
#define ZD_OFDM_PLCP_RATE_18M   0xe
 
#define ZD_OFDM_PLCP_RATE_24M   0x9
 
#define ZD_OFDM_PLCP_RATE_36M   0xd
 
#define ZD_OFDM_PLCP_RATE_48M   0x8
 
#define ZD_OFDM_PLCP_RATE_54M   0xc
 
#define ZD_CCK_PLCP_SIGNAL_1M   0x0a
 
#define ZD_CCK_PLCP_SIGNAL_2M   0x14
 
#define ZD_CCK_PLCP_SIGNAL_5M5   0x37
 
#define ZD_CCK_PLCP_SIGNAL_11M   0x6e
 
#define zd_mac_dev(mac)   (zd_chip_dev(&(mac)->chip))
 
#define zd_dump_rx_status(status)
 

Enumerations

enum  mac_flags { MAC_FIXED_CHANNEL = 0x01 }
 
enum  zd_device_flags { ZD_DEVICE_RUNNING }
 
enum  { MIN_CHANNEL24 = 1, MAX_CHANNEL24 = 14 }
 

Functions

struct ieee80211_hwzd_mac_alloc_hw (struct usb_interface *intf)
 
void zd_mac_clear (struct zd_mac *mac)
 
int zd_mac_preinit_hw (struct ieee80211_hw *hw)
 
int zd_mac_init_hw (struct ieee80211_hw *hw)
 
int zd_mac_rx (struct ieee80211_hw *hw, const u8 *buffer, unsigned int length)
 
void zd_mac_tx_failed (struct urb *urb)
 
void zd_mac_tx_to_dev (struct sk_buff *skb, int error)
 
int zd_op_start (struct ieee80211_hw *hw)
 
void zd_op_stop (struct ieee80211_hw *hw)
 
int zd_restore_settings (struct zd_mac *mac)
 

Variables

struct zd_ctrlset __packed
 

Macro Definition Documentation

#define RX_LENGTH_INFO_TAG   0x697e

Definition at line 111 of file zd_mac.h.

#define ZD_CCK   0x00

Definition at line 60 of file zd_mac.h.

#define ZD_CCK_PLCP_SIGNAL_11M   0x6e

Definition at line 284 of file zd_mac.h.

#define ZD_CCK_PLCP_SIGNAL_1M   0x0a

Definition at line 281 of file zd_mac.h.

#define ZD_CCK_PLCP_SIGNAL_2M   0x14

Definition at line 282 of file zd_mac.h.

#define ZD_CCK_PLCP_SIGNAL_5M5   0x37

Definition at line 283 of file zd_mac.h.

#define ZD_CCK_PREA_LONG   0x00

Definition at line 83 of file zd_mac.h.

#define ZD_CCK_PREA_SHORT   0x20

Definition at line 84 of file zd_mac.h.

#define ZD_CCK_RATE_11M   (ZD_CCK|0x03)

Definition at line 70 of file zd_mac.h.

#define ZD_CCK_RATE_1M   (ZD_CCK|0x00)

Definition at line 67 of file zd_mac.h.

#define ZD_CCK_RATE_2M   (ZD_CCK|0x01)

Definition at line 68 of file zd_mac.h.

#define ZD_CCK_RATE_5_5M   (ZD_CCK|0x02)

Definition at line 69 of file zd_mac.h.

#define ZD_CS_DATA_FRAME   0x00

Definition at line 93 of file zd_mac.h.

#define ZD_CS_ENCRYPT   0x40

Definition at line 100 of file zd_mac.h.

#define ZD_CS_FRAME_TYPE_MASK   0x0c

Definition at line 92 of file zd_mac.h.

#define ZD_CS_MANAGEMENT_FRAME   0x08

Definition at line 95 of file zd_mac.h.

#define ZD_CS_NEED_RANDOM_BACKOFF   0x01

Definition at line 89 of file zd_mac.h.

#define ZD_CS_NO_ACK   0x02

Definition at line 90 of file zd_mac.h.

#define ZD_CS_NO_SEQUENCE_CTL_FRAME   0x0c

Definition at line 96 of file zd_mac.h.

#define ZD_CS_PS_POLL_FRAME   0x04

Definition at line 94 of file zd_mac.h.

#define ZD_CS_RESERVED_SIZE   25

Definition at line 40 of file zd_mac.h.

#define ZD_CS_RTS   0x20

Definition at line 99 of file zd_mac.h.

#define ZD_CS_SELF_CTS   0x80

Definition at line 101 of file zd_mac.h.

#define ZD_CS_WAKE_DESTINATION   0x10

Definition at line 98 of file zd_mac.h.

#define zd_dump_rx_status (   status)

Definition at line 325 of file zd_mac.h.

#define zd_mac_dev (   mac)    (zd_chip_dev(&(mac)->chip))

Definition at line 306 of file zd_mac.h.

#define ZD_MAC_MAX_ACK_WAITERS   50

Definition at line 180 of file zd_mac.h.

#define ZD_MAC_STATS_BUFFER_SIZE   16

Definition at line 178 of file zd_mac.h.

#define ZD_MODULATION_TYPE (   modulation)    ((modulation) & ZD_MODULATION_TYPE_MASK)

Definition at line 53 of file zd_mac.h.

#define ZD_MODULATION_TYPE_MASK   0x10

Definition at line 50 of file zd_mac.h.

#define ZD_OFDM   0x10

Definition at line 61 of file zd_mac.h.

#define ZD_OFDM_MODE_11A   0x20

Definition at line 86 of file zd_mac.h.

#define ZD_OFDM_MODE_11G   0x00

Definition at line 85 of file zd_mac.h.

#define ZD_OFDM_PLCP_RATE_12M   0xa

Definition at line 255 of file zd_mac.h.

#define ZD_OFDM_PLCP_RATE_18M   0xe

Definition at line 256 of file zd_mac.h.

#define ZD_OFDM_PLCP_RATE_24M   0x9

Definition at line 257 of file zd_mac.h.

#define ZD_OFDM_PLCP_RATE_36M   0xd

Definition at line 258 of file zd_mac.h.

#define ZD_OFDM_PLCP_RATE_48M   0x8

Definition at line 259 of file zd_mac.h.

#define ZD_OFDM_PLCP_RATE_54M   0xc

Definition at line 260 of file zd_mac.h.

#define ZD_OFDM_PLCP_RATE_6M   0xb

Definition at line 253 of file zd_mac.h.

#define ZD_OFDM_PLCP_RATE_9M   0xf

Definition at line 254 of file zd_mac.h.

#define ZD_OFDM_RATE_12M   (ZD_OFDM|ZD_OFDM_PLCP_RATE_12M)

Definition at line 73 of file zd_mac.h.

#define ZD_OFDM_RATE_18M   (ZD_OFDM|ZD_OFDM_PLCP_RATE_18M)

Definition at line 74 of file zd_mac.h.

#define ZD_OFDM_RATE_24M   (ZD_OFDM|ZD_OFDM_PLCP_RATE_24M)

Definition at line 75 of file zd_mac.h.

#define ZD_OFDM_RATE_36M   (ZD_OFDM|ZD_OFDM_PLCP_RATE_36M)

Definition at line 76 of file zd_mac.h.

#define ZD_OFDM_RATE_48M   (ZD_OFDM|ZD_OFDM_PLCP_RATE_48M)

Definition at line 77 of file zd_mac.h.

#define ZD_OFDM_RATE_54M   (ZD_OFDM|ZD_OFDM_PLCP_RATE_54M)

Definition at line 78 of file zd_mac.h.

#define ZD_OFDM_RATE_6M   (ZD_OFDM|ZD_OFDM_PLCP_RATE_6M)

Definition at line 71 of file zd_mac.h.

#define ZD_OFDM_RATE_9M   (ZD_OFDM|ZD_OFDM_PLCP_RATE_9M)

Definition at line 72 of file zd_mac.h.

#define ZD_PLCP_HEADER_SIZE   5

Definition at line 104 of file zd_mac.h.

#define ZD_PLCP_SERVICE_LENGTH_EXTENSION   0x80

Definition at line 235 of file zd_mac.h.

#define ZD_PURE_RATE (   modulation)    ((modulation) & ZD_PURE_RATE_MASK)

Definition at line 52 of file zd_mac.h.

#define ZD_PURE_RATE_MASK   0x0f

Definition at line 49 of file zd_mac.h.

#define ZD_RATE (   modulation)    ((modulation) & ZD_RATE_MASK)

Definition at line 54 of file zd_mac.h.

#define ZD_RATE_MASK   (ZD_PURE_RATE_MASK|ZD_MODULATION_TYPE_MASK)

Definition at line 51 of file zd_mac.h.

#define ZD_REGDOMAIN_ETSI   0x30

Definition at line 223 of file zd_mac.h.

#define ZD_REGDOMAIN_FCC   0x10

Definition at line 221 of file zd_mac.h.

#define ZD_REGDOMAIN_FRANCE   0x32

Definition at line 225 of file zd_mac.h.

#define ZD_REGDOMAIN_IC   0x20

Definition at line 222 of file zd_mac.h.

#define ZD_REGDOMAIN_JAPAN   0x41

Definition at line 227 of file zd_mac.h.

#define ZD_REGDOMAIN_JAPAN_2   0x40

Definition at line 226 of file zd_mac.h.

#define ZD_REGDOMAIN_JAPAN_3   0x49

Definition at line 228 of file zd_mac.h.

#define ZD_REGDOMAIN_SPAIN   0x31

Definition at line 224 of file zd_mac.h.

#define ZD_RX_AES   4

Definition at line 126 of file zd_mac.h.

#define ZD_RX_CCK   0x00

Definition at line 132 of file zd_mac.h.

#define ZD_RX_CRC16_ERROR   0x40

Definition at line 140 of file zd_mac.h.

#define ZD_RX_CRC32_ERROR   0x10

Definition at line 138 of file zd_mac.h.

#define ZD_RX_DECRYPTION_ERROR   0x08

Definition at line 137 of file zd_mac.h.

#define ZD_RX_ERROR   0x80

Definition at line 141 of file zd_mac.h.

#define ZD_RX_FIFO_OVERRUN_ERROR   0x04

Definition at line 136 of file zd_mac.h.

#define ZD_RX_FRAME_MODULATION_MASK   0x01

Definition at line 131 of file zd_mac.h.

#define ZD_RX_NO_ADDR1_MATCH_ERROR   0x20

Definition at line 139 of file zd_mac.h.

#define ZD_RX_NO_WEP   0

Definition at line 123 of file zd_mac.h.

#define ZD_RX_OFDM   0x01

Definition at line 133 of file zd_mac.h.

#define ZD_RX_TIMEOUT_ERROR   0x02

Definition at line 135 of file zd_mac.h.

#define ZD_RX_TKIP   2

Definition at line 125 of file zd_mac.h.

#define ZD_RX_WEP128   5

Definition at line 127 of file zd_mac.h.

#define ZD_RX_WEP256   6

Definition at line 128 of file zd_mac.h.

#define ZD_RX_WEP64   1

Definition at line 124 of file zd_mac.h.

Enumeration Type Documentation

anonymous enum
Enumerator:
MIN_CHANNEL24 
MAX_CHANNEL24 

Definition at line 230 of file zd_mac.h.

enum mac_flags
Enumerator:
MAC_FIXED_CHANNEL 

Definition at line 158 of file zd_mac.h.

Enumerator:
ZD_DEVICE_RUNNING 

Definition at line 174 of file zd_mac.h.

Function Documentation

struct ieee80211_hw* zd_mac_alloc_hw ( struct usb_interface intf)
read

Definition at line 1374 of file zd_mac.c.

void zd_mac_clear ( struct zd_mac mac)

Definition at line 235 of file zd_mac.c.

int zd_mac_init_hw ( struct ieee80211_hw hw)

Definition at line 194 of file zd_mac.c.

int zd_mac_preinit_hw ( struct ieee80211_hw hw)

Definition at line 179 of file zd_mac.c.

int zd_mac_rx ( struct ieee80211_hw hw,
const u8 buffer,
unsigned int  length 
)

Definition at line 1032 of file zd_mac.c.

void zd_mac_tx_failed ( struct urb urb)

zd_mac_tx_failed - callback for failed frames : the mac80211 wireless device

This function is called if a frame couldn't be successfully transferred. The first frame from the tx queue, will be selected and reported as error to the upper layers.

Definition at line 500 of file zd_mac.c.

void zd_mac_tx_to_dev ( struct sk_buff skb,
int  error 
)

zd_mac_tx_to_dev - callback for USB layer : a &sk_buff pointer : error value, 0 if transmission successful

Informs the MAC layer that the frame has successfully transferred to the device. If an ACK is required and the transfer to the device has been successful, the packets are put on the with the control set removed.

Definition at line 583 of file zd_mac.c.

int zd_op_start ( struct ieee80211_hw hw)

Definition at line 283 of file zd_mac.c.

void zd_op_stop ( struct ieee80211_hw hw)

Definition at line 343 of file zd_mac.c.

int zd_restore_settings ( struct zd_mac mac)

Definition at line 371 of file zd_mac.c.

Variable Documentation