Go to the documentation of this file.
12 #include <linux/device.h>
19 #define DRV_NAME "libertas_tf"
22 #define MRVL_DEFAULT_RETRIES 9
23 #define MRVL_PER_PACKET_RATE 0x10
24 #define MRVL_MAX_BCN_SIZE 440
25 #define CMD_OPTION_WAITFORRSP 0x0002
30 #define CMD_RET(cmd) (0x8000 | cmd)
33 #define CMD_GET_HW_SPEC 0x0003
34 #define CMD_802_11_RESET 0x0005
35 #define CMD_MAC_MULTICAST_ADR 0x0010
36 #define CMD_802_11_RADIO_CONTROL 0x001c
37 #define CMD_802_11_RF_CHANNEL 0x001d
38 #define CMD_802_11_RF_TX_POWER 0x001e
39 #define CMD_MAC_CONTROL 0x0028
40 #define CMD_802_11_MAC_ADDRESS 0x004d
41 #define CMD_SET_BOOT2_VER 0x00a5
42 #define CMD_802_11_BEACON_CTRL 0x00b0
43 #define CMD_802_11_BEACON_SET 0x00cb
44 #define CMD_802_11_SET_MODE 0x00cc
45 #define CMD_802_11_SET_BSSID 0x00cd
47 #define CMD_ACT_GET 0x0000
48 #define CMD_ACT_SET 0x0001
51 #define CMD_ACT_HALT 0x0003
54 #define CMD_ACT_MAC_RX_ON 0x0001
55 #define CMD_ACT_MAC_TX_ON 0x0002
56 #define CMD_ACT_MAC_MULTICAST_ENABLE 0x0020
57 #define CMD_ACT_MAC_BROADCAST_ENABLE 0x0040
58 #define CMD_ACT_MAC_PROMISCUOUS_ENABLE 0x0080
59 #define CMD_ACT_MAC_ALL_MULTICAST_ENABLE 0x0100
62 #define CMD_TYPE_AUTO_PREAMBLE 0x0001
63 #define CMD_TYPE_SHORT_PREAMBLE 0x0002
64 #define CMD_TYPE_LONG_PREAMBLE 0x0003
66 #define TURN_ON_RF 0x01
68 #define RADIO_OFF 0x00
70 #define SET_AUTO_PREAMBLE 0x05
71 #define SET_SHORT_PREAMBLE 0x03
72 #define SET_LONG_PREAMBLE 0x01
75 #define CMD_OPT_802_11_RF_CHANNEL_GET 0x00
76 #define CMD_OPT_802_11_RF_CHANNEL_SET 0x01
86 #define MACREG_INT_CODE_FIRMWARE_READY 48
101 #define MRVDRV_MAX_MULTICAST_LIST_SIZE 32
102 #define LBS_NUM_CMD_BUFFERS 10
103 #define LBS_CMD_BUFFER_SIZE (2 * 1024)
104 #define MRVDRV_MAX_CHANNEL_SIZE 14
105 #define MRVDRV_SNAP_HEADER_LEN 8
107 #define LBS_UPLD_SIZE 2312
108 #define DEV_NAME_LEN 32
113 #define MRVDRV_MAX_REGION_CODE 6
117 #define LBTF_REGDOMAIN_US 0x10
118 #define LBTF_REGDOMAIN_CA 0x20
119 #define LBTF_REGDOMAIN_EU 0x30
120 #define LBTF_REGDOMAIN_SP 0x31
121 #define LBTF_REGDOMAIN_FR 0x32
122 #define LBTF_REGDOMAIN_JP 0x40
124 #define SBI_EVENT_CAUSE_SHIFT 3
128 #define MRVDRV_RXPD_STATUS_OK 0x0001
134 #define MRVDRV_ETH_TX_PACKET_BUFFER_SIZE \
135 (ETH_FRAME_LEN + sizeof(struct txpd) + EXTRA_LEN)
137 #define MRVDRV_ETH_RX_PACKET_BUFFER_SIZE \
138 (ETH_FRAME_LEN + sizeof(struct rxpd) \
139 + MRVDRV_SNAP_HEADER_LEN + EXTRA_LEN)
141 #define CMD_F_HOSTCMD (1 << 0)
142 #define FW_CAPINFO_WPA (1 << 0)
144 #define RF_ANTENNA_1 0x1
145 #define RF_ANTENNA_2 0x2
146 #define RF_ANTENNA_AUTO 0xFFFF
148 #define LBTF_EVENT_BCN_SENT 55
500 #define lbtf_cmd(priv, cmdnr, cmd, cb, cb_arg) ({ \
501 uint16_t __sz = le16_to_cpu((cmd)->hdr.size); \
502 (cmd)->hdr.size = cpu_to_le16(sizeof(*(cmd))); \
503 __lbtf_cmd(priv, cmdnr, &(cmd)->hdr, __sz, cb, cb_arg); \
506 #define lbtf_cmd_with_response(priv, cmdnr, cmd) \
507 lbtf_cmd(priv, cmdnr, cmd, lbtf_cmd_copyback, (unsigned long) (cmd))
516 unsigned long callback_arg);