aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/wl12xx/wl1251.h
diff options
context:
space:
mode:
authorKalle Valo <kalle.valo@nokia.com>2009-06-12 07:17:39 -0400
committerJohn W. Linville <linville@tuxdriver.com>2009-07-10 14:57:50 -0400
commit80301cdcfe44e3533175be23d7d52a9fc8c3fdb0 (patch)
tree624d018b822016a8f83d49588012519a4e9a4d16 /drivers/net/wireless/wl12xx/wl1251.h
parent1e6f172fccbf1194bad4b2aeae437ec3189a3f08 (diff)
wl1251: use wl1251 prefix everywhere
Last we can change all code prefixes from wl12xx/WL12XX to wl1251/WL1251. Signed-off-by: Kalle Valo <kalle.valo@nokia.com> Reviewed-by: Vidhya Govindan <vidhya.govindan@nokia.com> Reviewed-by: Luciano Coelho <luciano.coelho@nokia.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/wl12xx/wl1251.h')
-rw-r--r--drivers/net/wireless/wl12xx/wl1251.h102
1 files changed, 51 insertions, 51 deletions
diff --git a/drivers/net/wireless/wl12xx/wl1251.h b/drivers/net/wireless/wl12xx/wl1251.h
index c673cdb42d6c..665aca02bea9 100644
--- a/drivers/net/wireless/wl12xx/wl1251.h
+++ b/drivers/net/wireless/wl12xx/wl1251.h
@@ -1,5 +1,5 @@
1/* 1/*
2 * This file is part of wl12xx 2 * This file is part of wl1251
3 * 3 *
4 * Copyright (c) 1998-2007 Texas Instruments Incorporated 4 * Copyright (c) 1998-2007 Texas Instruments Incorporated
5 * Copyright (C) 2008-2009 Nokia Corporation 5 * Copyright (C) 2008-2009 Nokia Corporation
@@ -22,15 +22,15 @@
22 * 22 *
23 */ 23 */
24 24
25#ifndef __WL12XX_H__ 25#ifndef __WL1251_H__
26#define __WL12XX_H__ 26#define __WL1251_H__
27 27
28#include <linux/mutex.h> 28#include <linux/mutex.h>
29#include <linux/list.h> 29#include <linux/list.h>
30#include <linux/bitops.h> 30#include <linux/bitops.h>
31#include <net/mac80211.h> 31#include <net/mac80211.h>
32 32
33#define DRIVER_NAME "wl12xx" 33#define DRIVER_NAME "wl1251"
34#define DRIVER_PREFIX DRIVER_NAME ": " 34#define DRIVER_PREFIX DRIVER_NAME ": "
35 35
36enum { 36enum {
@@ -56,25 +56,25 @@ enum {
56 56
57#define DEBUG_DUMP_LIMIT 1024 57#define DEBUG_DUMP_LIMIT 1024
58 58
59#define wl12xx_error(fmt, arg...) \ 59#define wl1251_error(fmt, arg...) \
60 printk(KERN_ERR DRIVER_PREFIX "ERROR " fmt "\n", ##arg) 60 printk(KERN_ERR DRIVER_PREFIX "ERROR " fmt "\n", ##arg)
61 61
62#define wl12xx_warning(fmt, arg...) \ 62#define wl1251_warning(fmt, arg...) \
63 printk(KERN_WARNING DRIVER_PREFIX "WARNING " fmt "\n", ##arg) 63 printk(KERN_WARNING DRIVER_PREFIX "WARNING " fmt "\n", ##arg)
64 64
65#define wl12xx_notice(fmt, arg...) \ 65#define wl1251_notice(fmt, arg...) \
66 printk(KERN_INFO DRIVER_PREFIX fmt "\n", ##arg) 66 printk(KERN_INFO DRIVER_PREFIX fmt "\n", ##arg)
67 67
68#define wl12xx_info(fmt, arg...) \ 68#define wl1251_info(fmt, arg...) \
69 printk(KERN_DEBUG DRIVER_PREFIX fmt "\n", ##arg) 69 printk(KERN_DEBUG DRIVER_PREFIX fmt "\n", ##arg)
70 70
71#define wl12xx_debug(level, fmt, arg...) \ 71#define wl1251_debug(level, fmt, arg...) \
72 do { \ 72 do { \
73 if (level & DEBUG_LEVEL) \ 73 if (level & DEBUG_LEVEL) \
74 printk(KERN_DEBUG DRIVER_PREFIX fmt "\n", ##arg); \ 74 printk(KERN_DEBUG DRIVER_PREFIX fmt "\n", ##arg); \
75 } while (0) 75 } while (0)
76 76
77#define wl12xx_dump(level, prefix, buf, len) \ 77#define wl1251_dump(level, prefix, buf, len) \
78 do { \ 78 do { \
79 if (level & DEBUG_LEVEL) \ 79 if (level & DEBUG_LEVEL) \
80 print_hex_dump(KERN_DEBUG, DRIVER_PREFIX prefix, \ 80 print_hex_dump(KERN_DEBUG, DRIVER_PREFIX prefix, \
@@ -84,7 +84,7 @@ enum {
84 0); \ 84 0); \
85 } while (0) 85 } while (0)
86 86
87#define wl12xx_dump_ascii(level, prefix, buf, len) \ 87#define wl1251_dump_ascii(level, prefix, buf, len) \
88 do { \ 88 do { \
89 if (level & DEBUG_LEVEL) \ 89 if (level & DEBUG_LEVEL) \
90 print_hex_dump(KERN_DEBUG, DRIVER_PREFIX prefix, \ 90 print_hex_dump(KERN_DEBUG, DRIVER_PREFIX prefix, \
@@ -94,10 +94,10 @@ enum {
94 true); \ 94 true); \
95 } while (0) 95 } while (0)
96 96
97#define WL12XX_DEFAULT_RX_CONFIG (CFG_UNI_FILTER_EN | \ 97#define WL1251_DEFAULT_RX_CONFIG (CFG_UNI_FILTER_EN | \
98 CFG_BSSID_FILTER_EN) 98 CFG_BSSID_FILTER_EN)
99 99
100#define WL12XX_DEFAULT_RX_FILTER (CFG_RX_PRSP_EN | \ 100#define WL1251_DEFAULT_RX_FILTER (CFG_RX_PRSP_EN | \
101 CFG_RX_MGMT_EN | \ 101 CFG_RX_MGMT_EN | \
102 CFG_RX_DATA_EN | \ 102 CFG_RX_DATA_EN | \
103 CFG_RX_CTL_EN | \ 103 CFG_RX_CTL_EN | \
@@ -105,7 +105,7 @@ enum {
105 CFG_RX_AUTH_EN | \ 105 CFG_RX_AUTH_EN | \
106 CFG_RX_ASSOC_EN) 106 CFG_RX_ASSOC_EN)
107 107
108#define WL12XX_BUSY_WORD_LEN 8 108#define WL1251_BUSY_WORD_LEN 8
109 109
110struct boot_attr { 110struct boot_attr {
111 u32 radio_type; 111 u32 radio_type;
@@ -117,13 +117,13 @@ struct boot_attr {
117 u32 bugfix; 117 u32 bugfix;
118}; 118};
119 119
120enum wl12xx_state { 120enum wl1251_state {
121 WL12XX_STATE_OFF, 121 WL1251_STATE_OFF,
122 WL12XX_STATE_ON, 122 WL1251_STATE_ON,
123 WL12XX_STATE_PLT, 123 WL1251_STATE_PLT,
124}; 124};
125 125
126enum wl12xx_partition_type { 126enum wl1251_partition_type {
127 PART_DOWN, 127 PART_DOWN,
128 PART_WORK, 128 PART_WORK,
129 PART_DRPW, 129 PART_DRPW,
@@ -131,20 +131,20 @@ enum wl12xx_partition_type {
131 PART_TABLE_LEN 131 PART_TABLE_LEN
132}; 132};
133 133
134struct wl12xx_partition { 134struct wl1251_partition {
135 u32 size; 135 u32 size;
136 u32 start; 136 u32 start;
137}; 137};
138 138
139struct wl12xx_partition_set { 139struct wl1251_partition_set {
140 struct wl12xx_partition mem; 140 struct wl1251_partition mem;
141 struct wl12xx_partition reg; 141 struct wl1251_partition reg;
142}; 142};
143 143
144struct wl12xx; 144struct wl1251;
145 145
146/* FIXME: I'm not sure about this structure name */ 146/* FIXME: I'm not sure about this structure name */
147struct wl12xx_chip { 147struct wl1251_chip {
148 u32 id; 148 u32 id;
149 149
150 const char *fw_filename; 150 const char *fw_filename;
@@ -156,23 +156,23 @@ struct wl12xx_chip {
156 int intr_cmd_complete; 156 int intr_cmd_complete;
157 int intr_init_complete; 157 int intr_init_complete;
158 158
159 int (*op_upload_fw)(struct wl12xx *wl); 159 int (*op_upload_fw)(struct wl1251 *wl);
160 int (*op_upload_nvs)(struct wl12xx *wl); 160 int (*op_upload_nvs)(struct wl1251 *wl);
161 int (*op_boot)(struct wl12xx *wl); 161 int (*op_boot)(struct wl1251 *wl);
162 void (*op_set_ecpu_ctrl)(struct wl12xx *wl, u32 flag); 162 void (*op_set_ecpu_ctrl)(struct wl1251 *wl, u32 flag);
163 void (*op_target_enable_interrupts)(struct wl12xx *wl); 163 void (*op_target_enable_interrupts)(struct wl1251 *wl);
164 int (*op_hw_init)(struct wl12xx *wl); 164 int (*op_hw_init)(struct wl1251 *wl);
165 int (*op_plt_init)(struct wl12xx *wl); 165 int (*op_plt_init)(struct wl1251 *wl);
166 void (*op_tx_flush)(struct wl12xx *wl); 166 void (*op_tx_flush)(struct wl1251 *wl);
167 void (*op_fw_version)(struct wl12xx *wl); 167 void (*op_fw_version)(struct wl1251 *wl);
168 int (*op_cmd_join)(struct wl12xx *wl, u8 bss_type, u8 dtim_interval, 168 int (*op_cmd_join)(struct wl1251 *wl, u8 bss_type, u8 dtim_interval,
169 u16 beacon_interval, u8 wait); 169 u16 beacon_interval, u8 wait);
170 170
171 struct wl12xx_partition_set *p_table; 171 struct wl1251_partition_set *p_table;
172 enum wl12xx_acx_int_reg *acx_reg_table; 172 enum wl12xx_acx_int_reg *acx_reg_table;
173}; 173};
174 174
175struct wl12xx_stats { 175struct wl1251_stats {
176 struct acx_statistics *fw_stats; 176 struct acx_statistics *fw_stats;
177 unsigned long fw_stats_update; 177 unsigned long fw_stats_update;
178 178
@@ -180,7 +180,7 @@ struct wl12xx_stats {
180 unsigned int excessive_retries; 180 unsigned int excessive_retries;
181}; 181};
182 182
183struct wl12xx_debugfs { 183struct wl1251_debugfs {
184 struct dentry *rootdir; 184 struct dentry *rootdir;
185 struct dentry *fw_statistics; 185 struct dentry *fw_statistics;
186 186
@@ -281,7 +281,7 @@ struct wl12xx_debugfs {
281 struct dentry *excessive_retries; 281 struct dentry *excessive_retries;
282}; 282};
283 283
284struct wl12xx { 284struct wl1251 {
285 struct ieee80211_hw *hw; 285 struct ieee80211_hw *hw;
286 bool mac80211_registered; 286 bool mac80211_registered;
287 287
@@ -290,7 +290,7 @@ struct wl12xx {
290 void (*set_power)(bool enable); 290 void (*set_power)(bool enable);
291 int irq; 291 int irq;
292 292
293 enum wl12xx_state state; 293 enum wl1251_state state;
294 struct mutex mutex; 294 struct mutex mutex;
295 295
296 int physical_mem_addr; 296 int physical_mem_addr;
@@ -298,7 +298,7 @@ struct wl12xx {
298 int virtual_mem_addr; 298 int virtual_mem_addr;
299 int virtual_reg_addr; 299 int virtual_reg_addr;
300 300
301 struct wl12xx_chip chip; 301 struct wl1251_chip chip;
302 302
303 int cmd_box_addr; 303 int cmd_box_addr;
304 int event_box_addr; 304 int event_box_addr;
@@ -385,31 +385,31 @@ struct wl12xx {
385 /* in dBm */ 385 /* in dBm */
386 int power_level; 386 int power_level;
387 387
388 struct wl12xx_stats stats; 388 struct wl1251_stats stats;
389 struct wl12xx_debugfs debugfs; 389 struct wl1251_debugfs debugfs;
390 390
391 u32 buffer_32; 391 u32 buffer_32;
392 u32 buffer_cmd; 392 u32 buffer_cmd;
393 u8 buffer_busyword[WL12XX_BUSY_WORD_LEN]; 393 u8 buffer_busyword[WL1251_BUSY_WORD_LEN];
394 struct wl12xx_rx_descriptor *rx_descriptor; 394 struct wl1251_rx_descriptor *rx_descriptor;
395}; 395};
396 396
397int wl12xx_plt_start(struct wl12xx *wl); 397int wl1251_plt_start(struct wl1251 *wl);
398int wl12xx_plt_stop(struct wl12xx *wl); 398int wl1251_plt_stop(struct wl1251 *wl);
399 399
400#define DEFAULT_HW_GEN_MODULATION_TYPE CCK_LONG /* Long Preamble */ 400#define DEFAULT_HW_GEN_MODULATION_TYPE CCK_LONG /* Long Preamble */
401#define DEFAULT_HW_GEN_TX_RATE RATE_2MBPS 401#define DEFAULT_HW_GEN_TX_RATE RATE_2MBPS
402#define JOIN_TIMEOUT 5000 /* 5000 milliseconds to join */ 402#define JOIN_TIMEOUT 5000 /* 5000 milliseconds to join */
403 403
404#define WL12XX_DEFAULT_POWER_LEVEL 20 404#define WL1251_DEFAULT_POWER_LEVEL 20
405 405
406#define WL12XX_TX_QUEUE_MAX_LENGTH 20 406#define WL1251_TX_QUEUE_MAX_LENGTH 20
407 407
408/* Different chips need different sleep times after power on. WL1271 needs 408/* Different chips need different sleep times after power on. WL1271 needs
409 * 200ms, WL1251 needs only 10ms. By default we use 200ms, but as soon as we 409 * 200ms, WL1251 needs only 10ms. By default we use 200ms, but as soon as we
410 * know the chip ID, we change the sleep value in the wl12xx chip structure, 410 * know the chip ID, we change the sleep value in the wl1251 chip structure,
411 * so in subsequent power ons, we don't waste more time then needed. */ 411 * so in subsequent power ons, we don't waste more time then needed. */
412#define WL12XX_DEFAULT_POWER_ON_SLEEP 200 412#define WL1251_DEFAULT_POWER_ON_SLEEP 200
413 413
414#define CHIP_ID_1251_PG10 (0x7010101) 414#define CHIP_ID_1251_PG10 (0x7010101)
415#define CHIP_ID_1251_PG11 (0x7020101) 415#define CHIP_ID_1251_PG11 (0x7020101)