aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTomas Winkler <tomas.winkler@intel.com>2008-03-12 19:58:50 -0400
committerJohn W. Linville <linville@tuxdriver.com>2008-03-25 16:41:47 -0400
commitc79dd5b5bc5a65822cdc9d571032c469ad7577d5 (patch)
tree9056b3470264641eb6d4f25fedef5cde5f1c069d
parent0a6857e70d577237bb1cd1c991e68e7d3b6f7c90 (diff)
iwlwifi: rename struct iwl4965_priv to struct iwl_priv
This patch renames iwl4965_priv to iwl_priv. iwl_priv will be shared by more hw. Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-4965-io.h58
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-4965-rs.c42
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-4965.c178
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-4965.h128
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-eeprom.c10
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-eeprom.h18
-rw-r--r--drivers/net/wireless/iwlwifi/iwl4965-base.c396
7 files changed, 415 insertions, 415 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-4965-io.h b/drivers/net/wireless/iwlwifi/iwl-4965-io.h
index 3accdfb33e56..fba7d03d4291 100644
--- a/drivers/net/wireless/iwlwifi/iwl-4965-io.h
+++ b/drivers/net/wireless/iwlwifi/iwl-4965-io.h
@@ -61,7 +61,7 @@
61 61
62#define _iwl4965_write32(priv, ofs, val) writel((val), (priv)->hw_base + (ofs)) 62#define _iwl4965_write32(priv, ofs, val) writel((val), (priv)->hw_base + (ofs))
63#ifdef CONFIG_IWLWIFI_DEBUG 63#ifdef CONFIG_IWLWIFI_DEBUG
64static inline void __iwl4965_write32(const char *f, u32 l, struct iwl4965_priv *priv, 64static inline void __iwl4965_write32(const char *f, u32 l, struct iwl_priv *priv,
65 u32 ofs, u32 val) 65 u32 ofs, u32 val)
66{ 66{
67 IWL_DEBUG_IO("write32(0x%08X, 0x%08X) - %s %d\n", ofs, val, f, l); 67 IWL_DEBUG_IO("write32(0x%08X, 0x%08X) - %s %d\n", ofs, val, f, l);
@@ -75,7 +75,7 @@ static inline void __iwl4965_write32(const char *f, u32 l, struct iwl4965_priv *
75 75
76#define _iwl4965_read32(priv, ofs) readl((priv)->hw_base + (ofs)) 76#define _iwl4965_read32(priv, ofs) readl((priv)->hw_base + (ofs))
77#ifdef CONFIG_IWLWIFI_DEBUG 77#ifdef CONFIG_IWLWIFI_DEBUG
78static inline u32 __iwl4965_read32(char *f, u32 l, struct iwl4965_priv *priv, u32 ofs) 78static inline u32 __iwl4965_read32(char *f, u32 l, struct iwl_priv *priv, u32 ofs)
79{ 79{
80 IWL_DEBUG_IO("read_direct32(0x%08X) - %s %d\n", ofs, f, l); 80 IWL_DEBUG_IO("read_direct32(0x%08X) - %s %d\n", ofs, f, l);
81 return _iwl4965_read32(priv, ofs); 81 return _iwl4965_read32(priv, ofs);
@@ -85,7 +85,7 @@ static inline u32 __iwl4965_read32(char *f, u32 l, struct iwl4965_priv *priv, u3
85#define iwl4965_read32(p, o) _iwl4965_read32(p, o) 85#define iwl4965_read32(p, o) _iwl4965_read32(p, o)
86#endif 86#endif
87 87
88static inline int _iwl4965_poll_bit(struct iwl4965_priv *priv, u32 addr, 88static inline int _iwl4965_poll_bit(struct iwl_priv *priv, u32 addr,
89 u32 bits, u32 mask, int timeout) 89 u32 bits, u32 mask, int timeout)
90{ 90{
91 int i = 0; 91 int i = 0;
@@ -101,7 +101,7 @@ static inline int _iwl4965_poll_bit(struct iwl4965_priv *priv, u32 addr,
101} 101}
102#ifdef CONFIG_IWLWIFI_DEBUG 102#ifdef CONFIG_IWLWIFI_DEBUG
103static inline int __iwl4965_poll_bit(const char *f, u32 l, 103static inline int __iwl4965_poll_bit(const char *f, u32 l,
104 struct iwl4965_priv *priv, u32 addr, 104 struct iwl_priv *priv, u32 addr,
105 u32 bits, u32 mask, int timeout) 105 u32 bits, u32 mask, int timeout)
106{ 106{
107 int ret = _iwl4965_poll_bit(priv, addr, bits, mask, timeout); 107 int ret = _iwl4965_poll_bit(priv, addr, bits, mask, timeout);
@@ -116,13 +116,13 @@ static inline int __iwl4965_poll_bit(const char *f, u32 l,
116#define iwl4965_poll_bit(p, a, b, m, t) _iwl4965_poll_bit(p, a, b, m, t) 116#define iwl4965_poll_bit(p, a, b, m, t) _iwl4965_poll_bit(p, a, b, m, t)
117#endif 117#endif
118 118
119static inline void _iwl4965_set_bit(struct iwl4965_priv *priv, u32 reg, u32 mask) 119static inline void _iwl4965_set_bit(struct iwl_priv *priv, u32 reg, u32 mask)
120{ 120{
121 _iwl4965_write32(priv, reg, _iwl4965_read32(priv, reg) | mask); 121 _iwl4965_write32(priv, reg, _iwl4965_read32(priv, reg) | mask);
122} 122}
123#ifdef CONFIG_IWLWIFI_DEBUG 123#ifdef CONFIG_IWLWIFI_DEBUG
124static inline void __iwl4965_set_bit(const char *f, u32 l, 124static inline void __iwl4965_set_bit(const char *f, u32 l,
125 struct iwl4965_priv *priv, u32 reg, u32 mask) 125 struct iwl_priv *priv, u32 reg, u32 mask)
126{ 126{
127 u32 val = _iwl4965_read32(priv, reg) | mask; 127 u32 val = _iwl4965_read32(priv, reg) | mask;
128 IWL_DEBUG_IO("set_bit(0x%08X, 0x%08X) = 0x%08X\n", reg, mask, val); 128 IWL_DEBUG_IO("set_bit(0x%08X, 0x%08X) = 0x%08X\n", reg, mask, val);
@@ -133,13 +133,13 @@ static inline void __iwl4965_set_bit(const char *f, u32 l,
133#define iwl4965_set_bit(p, r, m) _iwl4965_set_bit(p, r, m) 133#define iwl4965_set_bit(p, r, m) _iwl4965_set_bit(p, r, m)
134#endif 134#endif
135 135
136static inline void _iwl4965_clear_bit(struct iwl4965_priv *priv, u32 reg, u32 mask) 136static inline void _iwl4965_clear_bit(struct iwl_priv *priv, u32 reg, u32 mask)
137{ 137{
138 _iwl4965_write32(priv, reg, _iwl4965_read32(priv, reg) & ~mask); 138 _iwl4965_write32(priv, reg, _iwl4965_read32(priv, reg) & ~mask);
139} 139}
140#ifdef CONFIG_IWLWIFI_DEBUG 140#ifdef CONFIG_IWLWIFI_DEBUG
141static inline void __iwl4965_clear_bit(const char *f, u32 l, 141static inline void __iwl4965_clear_bit(const char *f, u32 l,
142 struct iwl4965_priv *priv, u32 reg, u32 mask) 142 struct iwl_priv *priv, u32 reg, u32 mask)
143{ 143{
144 u32 val = _iwl4965_read32(priv, reg) & ~mask; 144 u32 val = _iwl4965_read32(priv, reg) & ~mask;
145 IWL_DEBUG_IO("clear_bit(0x%08X, 0x%08X) = 0x%08X\n", reg, mask, val); 145 IWL_DEBUG_IO("clear_bit(0x%08X, 0x%08X) = 0x%08X\n", reg, mask, val);
@@ -150,7 +150,7 @@ static inline void __iwl4965_clear_bit(const char *f, u32 l,
150#define iwl4965_clear_bit(p, r, m) _iwl4965_clear_bit(p, r, m) 150#define iwl4965_clear_bit(p, r, m) _iwl4965_clear_bit(p, r, m)
151#endif 151#endif
152 152
153static inline int _iwl4965_grab_nic_access(struct iwl4965_priv *priv) 153static inline int _iwl4965_grab_nic_access(struct iwl_priv *priv)
154{ 154{
155 int ret; 155 int ret;
156 u32 gp_ctl; 156 u32 gp_ctl;
@@ -194,7 +194,7 @@ static inline int _iwl4965_grab_nic_access(struct iwl4965_priv *priv)
194 194
195#ifdef CONFIG_IWLWIFI_DEBUG 195#ifdef CONFIG_IWLWIFI_DEBUG
196static inline int __iwl4965_grab_nic_access(const char *f, u32 l, 196static inline int __iwl4965_grab_nic_access(const char *f, u32 l,
197 struct iwl4965_priv *priv) 197 struct iwl_priv *priv)
198{ 198{
199 if (atomic_read(&priv->restrict_refcnt)) 199 if (atomic_read(&priv->restrict_refcnt))
200 IWL_DEBUG_INFO("Grabbing access while already held at " 200 IWL_DEBUG_INFO("Grabbing access while already held at "
@@ -210,7 +210,7 @@ static inline int __iwl4965_grab_nic_access(const char *f, u32 l,
210 _iwl4965_grab_nic_access(priv) 210 _iwl4965_grab_nic_access(priv)
211#endif 211#endif
212 212
213static inline void _iwl4965_release_nic_access(struct iwl4965_priv *priv) 213static inline void _iwl4965_release_nic_access(struct iwl_priv *priv)
214{ 214{
215#ifdef CONFIG_IWLWIFI_DEBUG 215#ifdef CONFIG_IWLWIFI_DEBUG
216 if (atomic_dec_and_test(&priv->restrict_refcnt)) 216 if (atomic_dec_and_test(&priv->restrict_refcnt))
@@ -220,7 +220,7 @@ static inline void _iwl4965_release_nic_access(struct iwl4965_priv *priv)
220} 220}
221#ifdef CONFIG_IWLWIFI_DEBUG 221#ifdef CONFIG_IWLWIFI_DEBUG
222static inline void __iwl4965_release_nic_access(const char *f, u32 l, 222static inline void __iwl4965_release_nic_access(const char *f, u32 l,
223 struct iwl4965_priv *priv) 223 struct iwl_priv *priv)
224{ 224{
225 if (atomic_read(&priv->restrict_refcnt) <= 0) 225 if (atomic_read(&priv->restrict_refcnt) <= 0)
226 IWL_ERROR("Release unheld nic access at line %d.\n", l); 226 IWL_ERROR("Release unheld nic access at line %d.\n", l);
@@ -235,13 +235,13 @@ static inline void __iwl4965_release_nic_access(const char *f, u32 l,
235 _iwl4965_release_nic_access(priv) 235 _iwl4965_release_nic_access(priv)
236#endif 236#endif
237 237
238static inline u32 _iwl4965_read_direct32(struct iwl4965_priv *priv, u32 reg) 238static inline u32 _iwl4965_read_direct32(struct iwl_priv *priv, u32 reg)
239{ 239{
240 return _iwl4965_read32(priv, reg); 240 return _iwl4965_read32(priv, reg);
241} 241}
242#ifdef CONFIG_IWLWIFI_DEBUG 242#ifdef CONFIG_IWLWIFI_DEBUG
243static inline u32 __iwl4965_read_direct32(const char *f, u32 l, 243static inline u32 __iwl4965_read_direct32(const char *f, u32 l,
244 struct iwl4965_priv *priv, u32 reg) 244 struct iwl_priv *priv, u32 reg)
245{ 245{
246 u32 value = _iwl4965_read_direct32(priv, reg); 246 u32 value = _iwl4965_read_direct32(priv, reg);
247 if (!atomic_read(&priv->restrict_refcnt)) 247 if (!atomic_read(&priv->restrict_refcnt))
@@ -256,14 +256,14 @@ static inline u32 __iwl4965_read_direct32(const char *f, u32 l,
256#define iwl4965_read_direct32 _iwl4965_read_direct32 256#define iwl4965_read_direct32 _iwl4965_read_direct32
257#endif 257#endif
258 258
259static inline void _iwl4965_write_direct32(struct iwl4965_priv *priv, 259static inline void _iwl4965_write_direct32(struct iwl_priv *priv,
260 u32 reg, u32 value) 260 u32 reg, u32 value)
261{ 261{
262 _iwl4965_write32(priv, reg, value); 262 _iwl4965_write32(priv, reg, value);
263} 263}
264#ifdef CONFIG_IWLWIFI_DEBUG 264#ifdef CONFIG_IWLWIFI_DEBUG
265static void __iwl4965_write_direct32(u32 line, 265static void __iwl4965_write_direct32(u32 line,
266 struct iwl4965_priv *priv, u32 reg, u32 value) 266 struct iwl_priv *priv, u32 reg, u32 value)
267{ 267{
268 if (!atomic_read(&priv->restrict_refcnt)) 268 if (!atomic_read(&priv->restrict_refcnt))
269 IWL_ERROR("Nic access not held from line %d\n", line); 269 IWL_ERROR("Nic access not held from line %d\n", line);
@@ -275,7 +275,7 @@ static void __iwl4965_write_direct32(u32 line,
275#define iwl4965_write_direct32 _iwl4965_write_direct32 275#define iwl4965_write_direct32 _iwl4965_write_direct32
276#endif 276#endif
277 277
278static inline void iwl4965_write_reg_buf(struct iwl4965_priv *priv, 278static inline void iwl4965_write_reg_buf(struct iwl_priv *priv,
279 u32 reg, u32 len, u32 *values) 279 u32 reg, u32 len, u32 *values)
280{ 280{
281 u32 count = sizeof(u32); 281 u32 count = sizeof(u32);
@@ -286,7 +286,7 @@ static inline void iwl4965_write_reg_buf(struct iwl4965_priv *priv,
286 } 286 }
287} 287}
288 288
289static inline int _iwl4965_poll_direct_bit(struct iwl4965_priv *priv, 289static inline int _iwl4965_poll_direct_bit(struct iwl_priv *priv,
290 u32 addr, u32 mask, int timeout) 290 u32 addr, u32 mask, int timeout)
291{ 291{
292 int i = 0; 292 int i = 0;
@@ -303,7 +303,7 @@ static inline int _iwl4965_poll_direct_bit(struct iwl4965_priv *priv,
303 303
304#ifdef CONFIG_IWLWIFI_DEBUG 304#ifdef CONFIG_IWLWIFI_DEBUG
305static inline int __iwl4965_poll_direct_bit(const char *f, u32 l, 305static inline int __iwl4965_poll_direct_bit(const char *f, u32 l,
306 struct iwl4965_priv *priv, 306 struct iwl_priv *priv,
307 u32 addr, u32 mask, int timeout) 307 u32 addr, u32 mask, int timeout)
308{ 308{
309 int ret = _iwl4965_poll_direct_bit(priv, addr, mask, timeout); 309 int ret = _iwl4965_poll_direct_bit(priv, addr, mask, timeout);
@@ -322,13 +322,13 @@ static inline int __iwl4965_poll_direct_bit(const char *f, u32 l,
322#define iwl4965_poll_direct_bit _iwl4965_poll_direct_bit 322#define iwl4965_poll_direct_bit _iwl4965_poll_direct_bit
323#endif 323#endif
324 324
325static inline u32 _iwl4965_read_prph(struct iwl4965_priv *priv, u32 reg) 325static inline u32 _iwl4965_read_prph(struct iwl_priv *priv, u32 reg)
326{ 326{
327 _iwl4965_write_direct32(priv, HBUS_TARG_PRPH_RADDR, reg | (3 << 24)); 327 _iwl4965_write_direct32(priv, HBUS_TARG_PRPH_RADDR, reg | (3 << 24));
328 return _iwl4965_read_direct32(priv, HBUS_TARG_PRPH_RDAT); 328 return _iwl4965_read_direct32(priv, HBUS_TARG_PRPH_RDAT);
329} 329}
330#ifdef CONFIG_IWLWIFI_DEBUG 330#ifdef CONFIG_IWLWIFI_DEBUG
331static inline u32 __iwl4965_read_prph(u32 line, struct iwl4965_priv *priv, u32 reg) 331static inline u32 __iwl4965_read_prph(u32 line, struct iwl_priv *priv, u32 reg)
332{ 332{
333 if (!atomic_read(&priv->restrict_refcnt)) 333 if (!atomic_read(&priv->restrict_refcnt))
334 IWL_ERROR("Nic access not held from line %d\n", line); 334 IWL_ERROR("Nic access not held from line %d\n", line);
@@ -341,7 +341,7 @@ static inline u32 __iwl4965_read_prph(u32 line, struct iwl4965_priv *priv, u32 r
341#define iwl4965_read_prph _iwl4965_read_prph 341#define iwl4965_read_prph _iwl4965_read_prph
342#endif 342#endif
343 343
344static inline void _iwl4965_write_prph(struct iwl4965_priv *priv, 344static inline void _iwl4965_write_prph(struct iwl_priv *priv,
345 u32 addr, u32 val) 345 u32 addr, u32 val)
346{ 346{
347 _iwl4965_write_direct32(priv, HBUS_TARG_PRPH_WADDR, 347 _iwl4965_write_direct32(priv, HBUS_TARG_PRPH_WADDR,
@@ -349,7 +349,7 @@ static inline void _iwl4965_write_prph(struct iwl4965_priv *priv,
349 _iwl4965_write_direct32(priv, HBUS_TARG_PRPH_WDAT, val); 349 _iwl4965_write_direct32(priv, HBUS_TARG_PRPH_WDAT, val);
350} 350}
351#ifdef CONFIG_IWLWIFI_DEBUG 351#ifdef CONFIG_IWLWIFI_DEBUG
352static inline void __iwl4965_write_prph(u32 line, struct iwl4965_priv *priv, 352static inline void __iwl4965_write_prph(u32 line, struct iwl_priv *priv,
353 u32 addr, u32 val) 353 u32 addr, u32 val)
354{ 354{
355 if (!atomic_read(&priv->restrict_refcnt)) 355 if (!atomic_read(&priv->restrict_refcnt))
@@ -366,7 +366,7 @@ static inline void __iwl4965_write_prph(u32 line, struct iwl4965_priv *priv,
366#define _iwl4965_set_bits_prph(priv, reg, mask) \ 366#define _iwl4965_set_bits_prph(priv, reg, mask) \
367 _iwl4965_write_prph(priv, reg, (_iwl4965_read_prph(priv, reg) | mask)) 367 _iwl4965_write_prph(priv, reg, (_iwl4965_read_prph(priv, reg) | mask))
368#ifdef CONFIG_IWLWIFI_DEBUG 368#ifdef CONFIG_IWLWIFI_DEBUG
369static inline void __iwl4965_set_bits_prph(u32 line, struct iwl4965_priv *priv, 369static inline void __iwl4965_set_bits_prph(u32 line, struct iwl_priv *priv,
370 u32 reg, u32 mask) 370 u32 reg, u32 mask)
371{ 371{
372 if (!atomic_read(&priv->restrict_refcnt)) 372 if (!atomic_read(&priv->restrict_refcnt))
@@ -385,7 +385,7 @@ static inline void __iwl4965_set_bits_prph(u32 line, struct iwl4965_priv *priv,
385 385
386#ifdef CONFIG_IWLWIFI_DEBUG 386#ifdef CONFIG_IWLWIFI_DEBUG
387static inline void __iwl4965_set_bits_mask_prph(u32 line, 387static inline void __iwl4965_set_bits_mask_prph(u32 line,
388 struct iwl4965_priv *priv, u32 reg, u32 bits, u32 mask) 388 struct iwl_priv *priv, u32 reg, u32 bits, u32 mask)
389{ 389{
390 if (!atomic_read(&priv->restrict_refcnt)) 390 if (!atomic_read(&priv->restrict_refcnt))
391 IWL_ERROR("Nic access not held from line %d\n", line); 391 IWL_ERROR("Nic access not held from line %d\n", line);
@@ -397,26 +397,26 @@ static inline void __iwl4965_set_bits_mask_prph(u32 line,
397#define iwl4965_set_bits_mask_prph _iwl4965_set_bits_mask_prph 397#define iwl4965_set_bits_mask_prph _iwl4965_set_bits_mask_prph
398#endif 398#endif
399 399
400static inline void iwl4965_clear_bits_prph(struct iwl4965_priv 400static inline void iwl4965_clear_bits_prph(struct iwl_priv
401 *priv, u32 reg, u32 mask) 401 *priv, u32 reg, u32 mask)
402{ 402{
403 u32 val = _iwl4965_read_prph(priv, reg); 403 u32 val = _iwl4965_read_prph(priv, reg);
404 _iwl4965_write_prph(priv, reg, (val & ~mask)); 404 _iwl4965_write_prph(priv, reg, (val & ~mask));
405} 405}
406 406
407static inline u32 iwl4965_read_targ_mem(struct iwl4965_priv *priv, u32 addr) 407static inline u32 iwl4965_read_targ_mem(struct iwl_priv *priv, u32 addr)
408{ 408{
409 iwl4965_write_direct32(priv, HBUS_TARG_MEM_RADDR, addr); 409 iwl4965_write_direct32(priv, HBUS_TARG_MEM_RADDR, addr);
410 return iwl4965_read_direct32(priv, HBUS_TARG_MEM_RDAT); 410 return iwl4965_read_direct32(priv, HBUS_TARG_MEM_RDAT);
411} 411}
412 412
413static inline void iwl4965_write_targ_mem(struct iwl4965_priv *priv, u32 addr, u32 val) 413static inline void iwl4965_write_targ_mem(struct iwl_priv *priv, u32 addr, u32 val)
414{ 414{
415 iwl4965_write_direct32(priv, HBUS_TARG_MEM_WADDR, addr); 415 iwl4965_write_direct32(priv, HBUS_TARG_MEM_WADDR, addr);
416 iwl4965_write_direct32(priv, HBUS_TARG_MEM_WDAT, val); 416 iwl4965_write_direct32(priv, HBUS_TARG_MEM_WDAT, val);
417} 417}
418 418
419static inline void iwl4965_write_targ_mem_buf(struct iwl4965_priv *priv, u32 addr, 419static inline void iwl4965_write_targ_mem_buf(struct iwl_priv *priv, u32 addr,
420 u32 len, u32 *values) 420 u32 len, u32 *values)
421{ 421{
422 iwl4965_write_direct32(priv, HBUS_TARG_MEM_WADDR, addr); 422 iwl4965_write_direct32(priv, HBUS_TARG_MEM_WADDR, addr);
diff --git a/drivers/net/wireless/iwlwifi/iwl-4965-rs.c b/drivers/net/wireless/iwlwifi/iwl-4965-rs.c
index 7733b23d582c..02990aeabab5 100644
--- a/drivers/net/wireless/iwlwifi/iwl-4965-rs.c
+++ b/drivers/net/wireless/iwlwifi/iwl-4965-rs.c
@@ -162,11 +162,11 @@ struct iwl4965_lq_sta {
162 struct dentry *rs_sta_dbgfs_tx_agg_tid_en_file; 162 struct dentry *rs_sta_dbgfs_tx_agg_tid_en_file;
163#endif 163#endif
164 struct iwl4965_rate dbg_fixed; 164 struct iwl4965_rate dbg_fixed;
165 struct iwl4965_priv *drv; 165 struct iwl_priv *drv;
166#endif 166#endif
167}; 167};
168 168
169static void rs_rate_scale_perform(struct iwl4965_priv *priv, 169static void rs_rate_scale_perform(struct iwl_priv *priv,
170 struct net_device *dev, 170 struct net_device *dev,
171 struct ieee80211_hdr *hdr, 171 struct ieee80211_hdr *hdr,
172 struct sta_info *sta); 172 struct sta_info *sta);
@@ -229,7 +229,7 @@ static s32 expected_tpt_mimo40MHzSGI[IWL_RATE_COUNT] = {
229 0, 0, 0, 0, 131, 131, 191, 222, 242, 270, 284, 289, 293 229 0, 0, 0, 0, 131, 131, 191, 222, 242, 270, 284, 289, 293
230}; 230};
231 231
232static int iwl4965_lq_sync_callback(struct iwl4965_priv *priv, 232static int iwl4965_lq_sync_callback(struct iwl_priv *priv,
233 struct iwl4965_cmd *cmd, struct sk_buff *skb) 233 struct iwl4965_cmd *cmd, struct sk_buff *skb)
234{ 234{
235 /*We didn't cache the SKB; let the caller free it */ 235 /*We didn't cache the SKB; let the caller free it */
@@ -241,7 +241,7 @@ static inline u8 iwl4965_rate_get_rate(u32 rate_n_flags)
241 return (u8)(rate_n_flags & 0xFF); 241 return (u8)(rate_n_flags & 0xFF);
242} 242}
243 243
244static int rs_send_lq_cmd(struct iwl4965_priv *priv, 244static int rs_send_lq_cmd(struct iwl_priv *priv,
245 struct iwl4965_link_quality_cmd *lq, u8 flags) 245 struct iwl4965_link_quality_cmd *lq, u8 flags)
246{ 246{
247#ifdef CONFIG_IWLWIFI_DEBUG 247#ifdef CONFIG_IWLWIFI_DEBUG
@@ -388,7 +388,7 @@ static u32 rs_tl_get_load(struct iwl4965_lq_sta *lq_data, u8 tid)
388 return tl->total; 388 return tl->total;
389} 389}
390 390
391static void rs_tl_turn_on_agg_for_tid(struct iwl4965_priv *priv, 391static void rs_tl_turn_on_agg_for_tid(struct iwl_priv *priv,
392 struct iwl4965_lq_sta *lq_data, u8 tid, 392 struct iwl4965_lq_sta *lq_data, u8 tid,
393 struct sta_info *sta) 393 struct sta_info *sta)
394{ 394{
@@ -407,7 +407,7 @@ static void rs_tl_turn_on_agg_for_tid(struct iwl4965_priv *priv,
407 } 407 }
408} 408}
409 409
410static void rs_tl_turn_on_agg(struct iwl4965_priv *priv, u8 tid, 410static void rs_tl_turn_on_agg(struct iwl_priv *priv, u8 tid,
411 struct iwl4965_lq_sta *lq_data, 411 struct iwl4965_lq_sta *lq_data,
412 struct sta_info *sta) 412 struct sta_info *sta)
413{ 413{
@@ -658,7 +658,7 @@ static inline void rs_toggle_antenna(struct iwl4965_rate *new_rate,
658 } 658 }
659} 659}
660 660
661static inline u8 rs_use_green(struct iwl4965_priv *priv, 661static inline u8 rs_use_green(struct iwl_priv *priv,
662 struct ieee80211_conf *conf) 662 struct ieee80211_conf *conf)
663{ 663{
664#ifdef CONFIG_IWL4965_HT 664#ifdef CONFIG_IWL4965_HT
@@ -821,7 +821,7 @@ static void rs_tx_status(void *priv_rate, struct net_device *dev,
821 struct iwl4965_link_quality_cmd *table; 821 struct iwl4965_link_quality_cmd *table;
822 struct sta_info *sta; 822 struct sta_info *sta;
823 struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data; 823 struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data;
824 struct iwl4965_priv *priv = (struct iwl4965_priv *)priv_rate; 824 struct iwl_priv *priv = (struct iwl_priv *)priv_rate;
825 struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr); 825 struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr);
826 struct ieee80211_hw *hw = local_to_hw(local); 826 struct ieee80211_hw *hw = local_to_hw(local);
827 struct iwl4965_rate_scale_data *window = NULL; 827 struct iwl4965_rate_scale_data *window = NULL;
@@ -1128,7 +1128,7 @@ static void rs_get_expected_tpt_table(struct iwl4965_lq_sta *lq_sta,
1128 * to decrease to match "active" throughput. When moving from MIMO to SISO, 1128 * to decrease to match "active" throughput. When moving from MIMO to SISO,
1129 * bit rate will typically need to increase, but not if performance was bad. 1129 * bit rate will typically need to increase, but not if performance was bad.
1130 */ 1130 */
1131static s32 rs_get_best_rate(struct iwl4965_priv *priv, 1131static s32 rs_get_best_rate(struct iwl_priv *priv,
1132 struct iwl4965_lq_sta *lq_sta, 1132 struct iwl4965_lq_sta *lq_sta,
1133 struct iwl4965_scale_tbl_info *tbl, /* "search" */ 1133 struct iwl4965_scale_tbl_info *tbl, /* "search" */
1134 u16 rate_mask, s8 index, s8 rate) 1134 u16 rate_mask, s8 index, s8 rate)
@@ -1226,7 +1226,7 @@ static inline u8 rs_is_both_ant_supp(u8 valid_antenna)
1226/* 1226/*
1227 * Set up search table for MIMO 1227 * Set up search table for MIMO
1228 */ 1228 */
1229static int rs_switch_to_mimo(struct iwl4965_priv *priv, 1229static int rs_switch_to_mimo(struct iwl_priv *priv,
1230 struct iwl4965_lq_sta *lq_sta, 1230 struct iwl4965_lq_sta *lq_sta,
1231 struct ieee80211_conf *conf, 1231 struct ieee80211_conf *conf,
1232 struct sta_info *sta, 1232 struct sta_info *sta,
@@ -1291,7 +1291,7 @@ static int rs_switch_to_mimo(struct iwl4965_priv *priv,
1291/* 1291/*
1292 * Set up search table for SISO 1292 * Set up search table for SISO
1293 */ 1293 */
1294static int rs_switch_to_siso(struct iwl4965_priv *priv, 1294static int rs_switch_to_siso(struct iwl_priv *priv,
1295 struct iwl4965_lq_sta *lq_sta, 1295 struct iwl4965_lq_sta *lq_sta,
1296 struct ieee80211_conf *conf, 1296 struct ieee80211_conf *conf,
1297 struct sta_info *sta, 1297 struct sta_info *sta,
@@ -1354,7 +1354,7 @@ static int rs_switch_to_siso(struct iwl4965_priv *priv,
1354/* 1354/*
1355 * Try to switch to new modulation mode from legacy 1355 * Try to switch to new modulation mode from legacy
1356 */ 1356 */
1357static int rs_move_legacy_other(struct iwl4965_priv *priv, 1357static int rs_move_legacy_other(struct iwl_priv *priv,
1358 struct iwl4965_lq_sta *lq_sta, 1358 struct iwl4965_lq_sta *lq_sta,
1359 struct ieee80211_conf *conf, 1359 struct ieee80211_conf *conf,
1360 struct sta_info *sta, 1360 struct sta_info *sta,
@@ -1452,7 +1452,7 @@ static int rs_move_legacy_other(struct iwl4965_priv *priv,
1452/* 1452/*
1453 * Try to switch to new modulation mode from SISO 1453 * Try to switch to new modulation mode from SISO
1454 */ 1454 */
1455static int rs_move_siso_to_other(struct iwl4965_priv *priv, 1455static int rs_move_siso_to_other(struct iwl_priv *priv,
1456 struct iwl4965_lq_sta *lq_sta, 1456 struct iwl4965_lq_sta *lq_sta,
1457 struct ieee80211_conf *conf, 1457 struct ieee80211_conf *conf,
1458 struct sta_info *sta, 1458 struct sta_info *sta,
@@ -1548,7 +1548,7 @@ static int rs_move_siso_to_other(struct iwl4965_priv *priv,
1548/* 1548/*
1549 * Try to switch to new modulation mode from MIMO 1549 * Try to switch to new modulation mode from MIMO
1550 */ 1550 */
1551static int rs_move_mimo_to_other(struct iwl4965_priv *priv, 1551static int rs_move_mimo_to_other(struct iwl_priv *priv,
1552 struct iwl4965_lq_sta *lq_sta, 1552 struct iwl4965_lq_sta *lq_sta,
1553 struct ieee80211_conf *conf, 1553 struct ieee80211_conf *conf,
1554 struct sta_info *sta, 1554 struct sta_info *sta,
@@ -1728,7 +1728,7 @@ static void rs_stay_in_table(struct iwl4965_lq_sta *lq_sta)
1728/* 1728/*
1729 * Do rate scaling and search for new modulation mode. 1729 * Do rate scaling and search for new modulation mode.
1730 */ 1730 */
1731static void rs_rate_scale_perform(struct iwl4965_priv *priv, 1731static void rs_rate_scale_perform(struct iwl_priv *priv,
1732 struct net_device *dev, 1732 struct net_device *dev,
1733 struct ieee80211_hdr *hdr, 1733 struct ieee80211_hdr *hdr,
1734 struct sta_info *sta) 1734 struct sta_info *sta)
@@ -2148,7 +2148,7 @@ out:
2148} 2148}
2149 2149
2150 2150
2151static void rs_initialize_lq(struct iwl4965_priv *priv, 2151static void rs_initialize_lq(struct iwl_priv *priv,
2152 struct ieee80211_conf *conf, 2152 struct ieee80211_conf *conf,
2153 struct sta_info *sta) 2153 struct sta_info *sta)
2154{ 2154{
@@ -2213,7 +2213,7 @@ static void rs_get_rate(void *priv_rate, struct net_device *dev,
2213 struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data; 2213 struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data;
2214 struct sta_info *sta; 2214 struct sta_info *sta;
2215 u16 fc; 2215 u16 fc;
2216 struct iwl4965_priv *priv = (struct iwl4965_priv *)priv_rate; 2216 struct iwl_priv *priv = (struct iwl_priv *)priv_rate;
2217 struct iwl4965_lq_sta *lq_sta; 2217 struct iwl4965_lq_sta *lq_sta;
2218 2218
2219 IWL_DEBUG_RATE_LIMIT("rate scale calculate new rate for skb\n"); 2219 IWL_DEBUG_RATE_LIMIT("rate scale calculate new rate for skb\n");
@@ -2294,7 +2294,7 @@ static void rs_rate_init(void *priv_rate, void *priv_sta,
2294 int i, j; 2294 int i, j;
2295 struct ieee80211_conf *conf = &local->hw.conf; 2295 struct ieee80211_conf *conf = &local->hw.conf;
2296 struct ieee80211_supported_band *sband; 2296 struct ieee80211_supported_band *sband;
2297 struct iwl4965_priv *priv = (struct iwl4965_priv *)priv_rate; 2297 struct iwl_priv *priv = (struct iwl_priv *)priv_rate;
2298 struct iwl4965_lq_sta *lq_sta = priv_sta; 2298 struct iwl4965_lq_sta *lq_sta = priv_sta;
2299 2299
2300 sband = local->hw.wiphy->bands[local->hw.conf.channel->band]; 2300 sband = local->hw.wiphy->bands[local->hw.conf.channel->band];
@@ -2516,7 +2516,7 @@ static void rs_free(void *priv_rate)
2516 2516
2517static void rs_clear(void *priv_rate) 2517static void rs_clear(void *priv_rate)
2518{ 2518{
2519 struct iwl4965_priv *priv = (struct iwl4965_priv *) priv_rate; 2519 struct iwl_priv *priv = (struct iwl_priv *) priv_rate;
2520 2520
2521 IWL_DEBUG_RATE("enter\n"); 2521 IWL_DEBUG_RATE("enter\n");
2522 2522
@@ -2726,7 +2726,7 @@ static struct rate_control_ops rs_ops = {
2726int iwl4965_fill_rs_info(struct ieee80211_hw *hw, char *buf, u8 sta_id) 2726int iwl4965_fill_rs_info(struct ieee80211_hw *hw, char *buf, u8 sta_id)
2727{ 2727{
2728 struct ieee80211_local *local = hw_to_local(hw); 2728 struct ieee80211_local *local = hw_to_local(hw);
2729 struct iwl4965_priv *priv = hw->priv; 2729 struct iwl_priv *priv = hw->priv;
2730 struct iwl4965_lq_sta *lq_sta; 2730 struct iwl4965_lq_sta *lq_sta;
2731 struct sta_info *sta; 2731 struct sta_info *sta;
2732 int cnt = 0, i; 2732 int cnt = 0, i;
@@ -2816,7 +2816,7 @@ int iwl4965_fill_rs_info(struct ieee80211_hw *hw, char *buf, u8 sta_id)
2816 2816
2817void iwl4965_rate_scale_init(struct ieee80211_hw *hw, s32 sta_id) 2817void iwl4965_rate_scale_init(struct ieee80211_hw *hw, s32 sta_id)
2818{ 2818{
2819 struct iwl4965_priv *priv = hw->priv; 2819 struct iwl_priv *priv = hw->priv;
2820 2820
2821 priv->lq_mngr.lq_ready = 1; 2821 priv->lq_mngr.lq_ready = 1;
2822} 2822}
diff --git a/drivers/net/wireless/iwlwifi/iwl-4965.c b/drivers/net/wireless/iwlwifi/iwl-4965.c
index 2896af28981a..7b0ad728f927 100644
--- a/drivers/net/wireless/iwlwifi/iwl-4965.c
+++ b/drivers/net/wireless/iwlwifi/iwl-4965.c
@@ -43,7 +43,7 @@
43#include "iwl-4965.h" 43#include "iwl-4965.h"
44#include "iwl-helpers.h" 44#include "iwl-helpers.h"
45 45
46static void iwl4965_hw_card_show_info(struct iwl4965_priv *priv); 46static void iwl4965_hw_card_show_info(struct iwl_priv *priv);
47 47
48#define IWL_DECLARE_RATE_INFO(r, s, ip, in, rp, rn, pp, np) \ 48#define IWL_DECLARE_RATE_INFO(r, s, ip, in, rp, rn, pp, np) \
49 [IWL_RATE_##r##M_INDEX] = { IWL_RATE_##r##M_PLCP, \ 49 [IWL_RATE_##r##M_INDEX] = { IWL_RATE_##r##M_PLCP, \
@@ -111,7 +111,7 @@ static int is_fat_channel(__le32 rxon_flags)
111 (rxon_flags & RXON_FLG_CHANNEL_MODE_MIXED_MSK); 111 (rxon_flags & RXON_FLG_CHANNEL_MODE_MIXED_MSK);
112} 112}
113 113
114static u8 is_single_stream(struct iwl4965_priv *priv) 114static u8 is_single_stream(struct iwl_priv *priv)
115{ 115{
116#ifdef CONFIG_IWL4965_HT 116#ifdef CONFIG_IWL4965_HT
117 if (!priv->current_ht_config.is_ht || 117 if (!priv->current_ht_config.is_ht ||
@@ -155,7 +155,7 @@ int iwl4965_hwrate_to_plcp_idx(u32 rate_n_flags)
155/** 155/**
156 * translate ucode response to mac80211 tx status control values 156 * translate ucode response to mac80211 tx status control values
157 */ 157 */
158void iwl4965_hwrate_to_tx_control(struct iwl4965_priv *priv, u32 rate_n_flags, 158void iwl4965_hwrate_to_tx_control(struct iwl_priv *priv, u32 rate_n_flags,
159 struct ieee80211_tx_control *control) 159 struct ieee80211_tx_control *control)
160{ 160{
161 int rate_index; 161 int rate_index;
@@ -188,7 +188,7 @@ void iwl4965_hwrate_to_tx_control(struct iwl4965_priv *priv, u32 rate_n_flags,
188 * MIMO (dual stream) requires at least 2, but works better with 3. 188 * MIMO (dual stream) requires at least 2, but works better with 3.
189 * This does not determine *which* chains to use, just how many. 189 * This does not determine *which* chains to use, just how many.
190 */ 190 */
191static int iwl4965_get_rx_chain_counter(struct iwl4965_priv *priv, 191static int iwl4965_get_rx_chain_counter(struct iwl_priv *priv,
192 u8 *idle_state, u8 *rx_state) 192 u8 *idle_state, u8 *rx_state)
193{ 193{
194 u8 is_single = is_single_stream(priv); 194 u8 is_single = is_single_stream(priv);
@@ -217,7 +217,7 @@ static int iwl4965_get_rx_chain_counter(struct iwl4965_priv *priv,
217 return 0; 217 return 0;
218} 218}
219 219
220int iwl4965_hw_rxq_stop(struct iwl4965_priv *priv) 220int iwl4965_hw_rxq_stop(struct iwl_priv *priv)
221{ 221{
222 int rc; 222 int rc;
223 unsigned long flags; 223 unsigned long flags;
@@ -242,7 +242,7 @@ int iwl4965_hw_rxq_stop(struct iwl4965_priv *priv)
242 return 0; 242 return 0;
243} 243}
244 244
245u8 iwl4965_hw_find_station(struct iwl4965_priv *priv, const u8 *addr) 245u8 iwl4965_hw_find_station(struct iwl_priv *priv, const u8 *addr)
246{ 246{
247 int i; 247 int i;
248 int start = 0; 248 int start = 0;
@@ -274,7 +274,7 @@ u8 iwl4965_hw_find_station(struct iwl4965_priv *priv, const u8 *addr)
274 return ret; 274 return ret;
275} 275}
276 276
277static int iwl4965_nic_set_pwr_src(struct iwl4965_priv *priv, int pwr_max) 277static int iwl4965_nic_set_pwr_src(struct iwl_priv *priv, int pwr_max)
278{ 278{
279 int ret; 279 int ret;
280 unsigned long flags; 280 unsigned long flags;
@@ -307,7 +307,7 @@ static int iwl4965_nic_set_pwr_src(struct iwl4965_priv *priv, int pwr_max)
307 return ret; 307 return ret;
308} 308}
309 309
310static int iwl4965_rx_init(struct iwl4965_priv *priv, struct iwl4965_rx_queue *rxq) 310static int iwl4965_rx_init(struct iwl_priv *priv, struct iwl4965_rx_queue *rxq)
311{ 311{
312 int rc; 312 int rc;
313 unsigned long flags; 313 unsigned long flags;
@@ -360,7 +360,7 @@ static int iwl4965_rx_init(struct iwl4965_priv *priv, struct iwl4965_rx_queue *r
360} 360}
361 361
362/* Tell 4965 where to find the "keep warm" buffer */ 362/* Tell 4965 where to find the "keep warm" buffer */
363static int iwl4965_kw_init(struct iwl4965_priv *priv) 363static int iwl4965_kw_init(struct iwl_priv *priv)
364{ 364{
365 unsigned long flags; 365 unsigned long flags;
366 int rc; 366 int rc;
@@ -378,7 +378,7 @@ out:
378 return rc; 378 return rc;
379} 379}
380 380
381static int iwl4965_kw_alloc(struct iwl4965_priv *priv) 381static int iwl4965_kw_alloc(struct iwl_priv *priv)
382{ 382{
383 struct pci_dev *dev = priv->pci_dev; 383 struct pci_dev *dev = priv->pci_dev;
384 struct iwl4965_kw *kw = &priv->kw; 384 struct iwl4965_kw *kw = &priv->kw;
@@ -399,7 +399,7 @@ static int iwl4965_kw_alloc(struct iwl4965_priv *priv)
399 * 399 *
400 * Does not set up a command, or touch hardware. 400 * Does not set up a command, or touch hardware.
401 */ 401 */
402int iwl4965_set_fat_chan_info(struct iwl4965_priv *priv, 402int iwl4965_set_fat_chan_info(struct iwl_priv *priv,
403 enum ieee80211_band band, u16 channel, 403 enum ieee80211_band band, u16 channel,
404 const struct iwl4965_eeprom_channel *eeprom_ch, 404 const struct iwl4965_eeprom_channel *eeprom_ch,
405 u8 fat_extension_channel) 405 u8 fat_extension_channel)
@@ -443,7 +443,7 @@ int iwl4965_set_fat_chan_info(struct iwl4965_priv *priv,
443/** 443/**
444 * iwl4965_kw_free - Free the "keep warm" buffer 444 * iwl4965_kw_free - Free the "keep warm" buffer
445 */ 445 */
446static void iwl4965_kw_free(struct iwl4965_priv *priv) 446static void iwl4965_kw_free(struct iwl_priv *priv)
447{ 447{
448 struct pci_dev *dev = priv->pci_dev; 448 struct pci_dev *dev = priv->pci_dev;
449 struct iwl4965_kw *kw = &priv->kw; 449 struct iwl4965_kw *kw = &priv->kw;
@@ -461,7 +461,7 @@ static void iwl4965_kw_free(struct iwl4965_priv *priv)
461 * @param priv 461 * @param priv
462 * @return error code 462 * @return error code
463 */ 463 */
464static int iwl4965_txq_ctx_reset(struct iwl4965_priv *priv) 464static int iwl4965_txq_ctx_reset(struct iwl_priv *priv)
465{ 465{
466 int rc = 0; 466 int rc = 0;
467 int txq_id, slots_num; 467 int txq_id, slots_num;
@@ -523,7 +523,7 @@ static int iwl4965_txq_ctx_reset(struct iwl4965_priv *priv)
523 return rc; 523 return rc;
524} 524}
525 525
526int iwl4965_hw_nic_init(struct iwl4965_priv *priv) 526int iwl4965_hw_nic_init(struct iwl_priv *priv)
527{ 527{
528 int rc; 528 int rc;
529 unsigned long flags; 529 unsigned long flags;
@@ -668,7 +668,7 @@ int iwl4965_hw_nic_init(struct iwl4965_priv *priv)
668 return 0; 668 return 0;
669} 669}
670 670
671int iwl4965_hw_nic_stop_master(struct iwl4965_priv *priv) 671int iwl4965_hw_nic_stop_master(struct iwl_priv *priv)
672{ 672{
673 int rc = 0; 673 int rc = 0;
674 u32 reg_val; 674 u32 reg_val;
@@ -704,7 +704,7 @@ int iwl4965_hw_nic_stop_master(struct iwl4965_priv *priv)
704/** 704/**
705 * iwl4965_hw_txq_ctx_stop - Stop all Tx DMA channels, free Tx queue memory 705 * iwl4965_hw_txq_ctx_stop - Stop all Tx DMA channels, free Tx queue memory
706 */ 706 */
707void iwl4965_hw_txq_ctx_stop(struct iwl4965_priv *priv) 707void iwl4965_hw_txq_ctx_stop(struct iwl_priv *priv)
708{ 708{
709 709
710 int txq_id; 710 int txq_id;
@@ -732,7 +732,7 @@ void iwl4965_hw_txq_ctx_stop(struct iwl4965_priv *priv)
732 iwl4965_hw_txq_ctx_free(priv); 732 iwl4965_hw_txq_ctx_free(priv);
733} 733}
734 734
735int iwl4965_hw_nic_reset(struct iwl4965_priv *priv) 735int iwl4965_hw_nic_reset(struct iwl_priv *priv)
736{ 736{
737 int rc = 0; 737 int rc = 0;
738 unsigned long flags; 738 unsigned long flags;
@@ -793,7 +793,7 @@ int iwl4965_hw_nic_reset(struct iwl4965_priv *priv)
793 */ 793 */
794static void iwl4965_bg_statistics_periodic(unsigned long data) 794static void iwl4965_bg_statistics_periodic(unsigned long data)
795{ 795{
796 struct iwl4965_priv *priv = (struct iwl4965_priv *)data; 796 struct iwl_priv *priv = (struct iwl_priv *)data;
797 797
798 queue_work(priv->workqueue, &priv->statistics_work); 798 queue_work(priv->workqueue, &priv->statistics_work);
799} 799}
@@ -805,7 +805,7 @@ static void iwl4965_bg_statistics_periodic(unsigned long data)
805 */ 805 */
806static void iwl4965_bg_statistics_work(struct work_struct *work) 806static void iwl4965_bg_statistics_work(struct work_struct *work)
807{ 807{
808 struct iwl4965_priv *priv = container_of(work, struct iwl4965_priv, 808 struct iwl_priv *priv = container_of(work, struct iwl_priv,
809 statistics_work); 809 statistics_work);
810 810
811 if (test_bit(STATUS_EXIT_PENDING, &priv->status)) 811 if (test_bit(STATUS_EXIT_PENDING, &priv->status))
@@ -819,7 +819,7 @@ static void iwl4965_bg_statistics_work(struct work_struct *work)
819#define CT_LIMIT_CONST 259 819#define CT_LIMIT_CONST 259
820#define TM_CT_KILL_THRESHOLD 110 820#define TM_CT_KILL_THRESHOLD 110
821 821
822void iwl4965_rf_kill_ct_config(struct iwl4965_priv *priv) 822void iwl4965_rf_kill_ct_config(struct iwl_priv *priv)
823{ 823{
824 struct iwl4965_ct_kill_config cmd; 824 struct iwl4965_ct_kill_config cmd;
825 u32 R1, R2, R3; 825 u32 R1, R2, R3;
@@ -865,7 +865,7 @@ void iwl4965_rf_kill_ct_config(struct iwl4965_priv *priv)
865 * enough to receive all of our own network traffic, but not so 865 * enough to receive all of our own network traffic, but not so
866 * high that our DSP gets too busy trying to lock onto non-network 866 * high that our DSP gets too busy trying to lock onto non-network
867 * activity/noise. */ 867 * activity/noise. */
868static int iwl4965_sens_energy_cck(struct iwl4965_priv *priv, 868static int iwl4965_sens_energy_cck(struct iwl_priv *priv,
869 u32 norm_fa, 869 u32 norm_fa,
870 u32 rx_enable_time, 870 u32 rx_enable_time,
871 struct statistics_general_data *rx_info) 871 struct statistics_general_data *rx_info)
@@ -1056,7 +1056,7 @@ static int iwl4965_sens_energy_cck(struct iwl4965_priv *priv,
1056} 1056}
1057 1057
1058 1058
1059static int iwl4965_sens_auto_corr_ofdm(struct iwl4965_priv *priv, 1059static int iwl4965_sens_auto_corr_ofdm(struct iwl_priv *priv,
1060 u32 norm_fa, 1060 u32 norm_fa,
1061 u32 rx_enable_time) 1061 u32 rx_enable_time)
1062{ 1062{
@@ -1121,7 +1121,7 @@ static int iwl4965_sens_auto_corr_ofdm(struct iwl4965_priv *priv,
1121 return 0; 1121 return 0;
1122} 1122}
1123 1123
1124static int iwl4965_sensitivity_callback(struct iwl4965_priv *priv, 1124static int iwl4965_sensitivity_callback(struct iwl_priv *priv,
1125 struct iwl4965_cmd *cmd, struct sk_buff *skb) 1125 struct iwl4965_cmd *cmd, struct sk_buff *skb)
1126{ 1126{
1127 /* We didn't cache the SKB; let the caller free it */ 1127 /* We didn't cache the SKB; let the caller free it */
@@ -1129,7 +1129,7 @@ static int iwl4965_sensitivity_callback(struct iwl4965_priv *priv,
1129} 1129}
1130 1130
1131/* Prepare a SENSITIVITY_CMD, send to uCode if values have changed */ 1131/* Prepare a SENSITIVITY_CMD, send to uCode if values have changed */
1132static int iwl4965_sensitivity_write(struct iwl4965_priv *priv, u8 flags) 1132static int iwl4965_sensitivity_write(struct iwl_priv *priv, u8 flags)
1133{ 1133{
1134 int rc = 0; 1134 int rc = 0;
1135 struct iwl4965_sensitivity_cmd cmd ; 1135 struct iwl4965_sensitivity_cmd cmd ;
@@ -1206,7 +1206,7 @@ static int iwl4965_sensitivity_write(struct iwl4965_priv *priv, u8 flags)
1206 return 0; 1206 return 0;
1207} 1207}
1208 1208
1209void iwl4965_init_sensitivity(struct iwl4965_priv *priv, u8 flags, u8 force) 1209void iwl4965_init_sensitivity(struct iwl_priv *priv, u8 flags, u8 force)
1210{ 1210{
1211 int rc = 0; 1211 int rc = 0;
1212 int i; 1212 int i;
@@ -1264,7 +1264,7 @@ void iwl4965_init_sensitivity(struct iwl4965_priv *priv, u8 flags, u8 force)
1264/* Reset differential Rx gains in NIC to prepare for chain noise calibration. 1264/* Reset differential Rx gains in NIC to prepare for chain noise calibration.
1265 * Called after every association, but this runs only once! 1265 * Called after every association, but this runs only once!
1266 * ... once chain noise is calibrated the first time, it's good forever. */ 1266 * ... once chain noise is calibrated the first time, it's good forever. */
1267void iwl4965_chain_noise_reset(struct iwl4965_priv *priv) 1267void iwl4965_chain_noise_reset(struct iwl_priv *priv)
1268{ 1268{
1269 struct iwl4965_chain_noise_data *data = NULL; 1269 struct iwl4965_chain_noise_data *data = NULL;
1270 int rc = 0; 1270 int rc = 0;
@@ -1293,7 +1293,7 @@ void iwl4965_chain_noise_reset(struct iwl4965_priv *priv)
1293 * 1) Which antennas are connected. 1293 * 1) Which antennas are connected.
1294 * 2) Differential rx gain settings to balance the 3 receivers. 1294 * 2) Differential rx gain settings to balance the 3 receivers.
1295 */ 1295 */
1296static void iwl4965_noise_calibration(struct iwl4965_priv *priv, 1296static void iwl4965_noise_calibration(struct iwl_priv *priv,
1297 struct iwl4965_notif_statistics *stat_resp) 1297 struct iwl4965_notif_statistics *stat_resp)
1298{ 1298{
1299 struct iwl4965_chain_noise_data *data = NULL; 1299 struct iwl4965_chain_noise_data *data = NULL;
@@ -1526,7 +1526,7 @@ static void iwl4965_noise_calibration(struct iwl4965_priv *priv,
1526 return; 1526 return;
1527} 1527}
1528 1528
1529static void iwl4965_sensitivity_calibration(struct iwl4965_priv *priv, 1529static void iwl4965_sensitivity_calibration(struct iwl_priv *priv,
1530 struct iwl4965_notif_statistics *resp) 1530 struct iwl4965_notif_statistics *resp)
1531{ 1531{
1532 int rc = 0; 1532 int rc = 0;
@@ -1633,7 +1633,7 @@ static void iwl4965_sensitivity_calibration(struct iwl4965_priv *priv,
1633 1633
1634static void iwl4965_bg_sensitivity_work(struct work_struct *work) 1634static void iwl4965_bg_sensitivity_work(struct work_struct *work)
1635{ 1635{
1636 struct iwl4965_priv *priv = container_of(work, struct iwl4965_priv, 1636 struct iwl_priv *priv = container_of(work, struct iwl_priv,
1637 sensitivity_work); 1637 sensitivity_work);
1638 1638
1639 mutex_lock(&priv->mutex); 1639 mutex_lock(&priv->mutex);
@@ -1663,7 +1663,7 @@ static void iwl4965_bg_sensitivity_work(struct work_struct *work)
1663 1663
1664static void iwl4965_bg_txpower_work(struct work_struct *work) 1664static void iwl4965_bg_txpower_work(struct work_struct *work)
1665{ 1665{
1666 struct iwl4965_priv *priv = container_of(work, struct iwl4965_priv, 1666 struct iwl_priv *priv = container_of(work, struct iwl_priv,
1667 txpower_work); 1667 txpower_work);
1668 1668
1669 /* If a scan happened to start before we got here 1669 /* If a scan happened to start before we got here
@@ -1691,7 +1691,7 @@ static void iwl4965_bg_txpower_work(struct work_struct *work)
1691/* 1691/*
1692 * Acquire priv->lock before calling this function ! 1692 * Acquire priv->lock before calling this function !
1693 */ 1693 */
1694static void iwl4965_set_wr_ptrs(struct iwl4965_priv *priv, int txq_id, u32 index) 1694static void iwl4965_set_wr_ptrs(struct iwl_priv *priv, int txq_id, u32 index)
1695{ 1695{
1696 iwl4965_write_direct32(priv, HBUS_TARG_WRPTR, 1696 iwl4965_write_direct32(priv, HBUS_TARG_WRPTR,
1697 (index & 0xff) | (txq_id << 8)); 1697 (index & 0xff) | (txq_id << 8));
@@ -1705,7 +1705,7 @@ static void iwl4965_set_wr_ptrs(struct iwl4965_priv *priv, int txq_id, u32 index
1705 * 1705 *
1706 * NOTE: Acquire priv->lock before calling this function ! 1706 * NOTE: Acquire priv->lock before calling this function !
1707 */ 1707 */
1708static void iwl4965_tx_queue_set_status(struct iwl4965_priv *priv, 1708static void iwl4965_tx_queue_set_status(struct iwl_priv *priv,
1709 struct iwl4965_tx_queue *txq, 1709 struct iwl4965_tx_queue *txq,
1710 int tx_fifo_id, int scd_retry) 1710 int tx_fifo_id, int scd_retry)
1711{ 1711{
@@ -1739,17 +1739,17 @@ static const u16 default_queue_to_tx_fifo[] = {
1739 IWL_TX_FIFO_HCCA_2 1739 IWL_TX_FIFO_HCCA_2
1740}; 1740};
1741 1741
1742static inline void iwl4965_txq_ctx_activate(struct iwl4965_priv *priv, int txq_id) 1742static inline void iwl4965_txq_ctx_activate(struct iwl_priv *priv, int txq_id)
1743{ 1743{
1744 set_bit(txq_id, &priv->txq_ctx_active_msk); 1744 set_bit(txq_id, &priv->txq_ctx_active_msk);
1745} 1745}
1746 1746
1747static inline void iwl4965_txq_ctx_deactivate(struct iwl4965_priv *priv, int txq_id) 1747static inline void iwl4965_txq_ctx_deactivate(struct iwl_priv *priv, int txq_id)
1748{ 1748{
1749 clear_bit(txq_id, &priv->txq_ctx_active_msk); 1749 clear_bit(txq_id, &priv->txq_ctx_active_msk);
1750} 1750}
1751 1751
1752int iwl4965_alive_notify(struct iwl4965_priv *priv) 1752int iwl4965_alive_notify(struct iwl_priv *priv)
1753{ 1753{
1754 u32 a; 1754 u32 a;
1755 int i = 0; 1755 int i = 0;
@@ -1841,7 +1841,7 @@ int iwl4965_alive_notify(struct iwl4965_priv *priv)
1841 * 1841 *
1842 * Called when initializing driver 1842 * Called when initializing driver
1843 */ 1843 */
1844int iwl4965_hw_set_hw_setting(struct iwl4965_priv *priv) 1844int iwl4965_hw_set_hw_setting(struct iwl_priv *priv)
1845{ 1845{
1846 /* Allocate area for Tx byte count tables and Rx queue status */ 1846 /* Allocate area for Tx byte count tables and Rx queue status */
1847 priv->hw_setting.shared_virt = 1847 priv->hw_setting.shared_virt =
@@ -1876,7 +1876,7 @@ int iwl4965_hw_set_hw_setting(struct iwl4965_priv *priv)
1876 * 1876 *
1877 * Destroy all TX DMA queues and structures 1877 * Destroy all TX DMA queues and structures
1878 */ 1878 */
1879void iwl4965_hw_txq_ctx_free(struct iwl4965_priv *priv) 1879void iwl4965_hw_txq_ctx_free(struct iwl_priv *priv)
1880{ 1880{
1881 int txq_id; 1881 int txq_id;
1882 1882
@@ -1894,7 +1894,7 @@ void iwl4965_hw_txq_ctx_free(struct iwl4965_priv *priv)
1894 * Does NOT advance any TFD circular buffer read/write indexes 1894 * Does NOT advance any TFD circular buffer read/write indexes
1895 * Does NOT free the TFD itself (which is within circular buffer) 1895 * Does NOT free the TFD itself (which is within circular buffer)
1896 */ 1896 */
1897int iwl4965_hw_txq_free_tfd(struct iwl4965_priv *priv, struct iwl4965_tx_queue *txq) 1897int iwl4965_hw_txq_free_tfd(struct iwl_priv *priv, struct iwl4965_tx_queue *txq)
1898{ 1898{
1899 struct iwl4965_tfd_frame *bd_tmp = (struct iwl4965_tfd_frame *)&txq->bd[0]; 1899 struct iwl4965_tfd_frame *bd_tmp = (struct iwl4965_tfd_frame *)&txq->bd[0];
1900 struct iwl4965_tfd_frame *bd = &bd_tmp[txq->q.read_ptr]; 1900 struct iwl4965_tfd_frame *bd = &bd_tmp[txq->q.read_ptr];
@@ -1947,7 +1947,7 @@ int iwl4965_hw_txq_free_tfd(struct iwl4965_priv *priv, struct iwl4965_tx_queue *
1947 return 0; 1947 return 0;
1948} 1948}
1949 1949
1950int iwl4965_hw_reg_set_txpower(struct iwl4965_priv *priv, s8 power) 1950int iwl4965_hw_reg_set_txpower(struct iwl_priv *priv, s8 power)
1951{ 1951{
1952 IWL_ERROR("TODO: Implement iwl4965_hw_reg_set_txpower!\n"); 1952 IWL_ERROR("TODO: Implement iwl4965_hw_reg_set_txpower!\n");
1953 return -EINVAL; 1953 return -EINVAL;
@@ -2003,7 +2003,7 @@ static s32 iwl4965_get_voltage_compensation(s32 eeprom_voltage,
2003} 2003}
2004 2004
2005static const struct iwl4965_channel_info * 2005static const struct iwl4965_channel_info *
2006iwl4965_get_channel_txpower_info(struct iwl4965_priv *priv, 2006iwl4965_get_channel_txpower_info(struct iwl_priv *priv,
2007 enum ieee80211_band band, u16 channel) 2007 enum ieee80211_band band, u16 channel)
2008{ 2008{
2009 const struct iwl4965_channel_info *ch_info; 2009 const struct iwl4965_channel_info *ch_info;
@@ -2042,7 +2042,7 @@ static s32 iwl4965_get_tx_atten_grp(u16 channel)
2042 return -1; 2042 return -1;
2043} 2043}
2044 2044
2045static u32 iwl4965_get_sub_band(const struct iwl4965_priv *priv, u32 channel) 2045static u32 iwl4965_get_sub_band(const struct iwl_priv *priv, u32 channel)
2046{ 2046{
2047 s32 b = -1; 2047 s32 b = -1;
2048 2048
@@ -2078,7 +2078,7 @@ static s32 iwl4965_interpolate_value(s32 x, s32 x1, s32 y1, s32 x2, s32 y2)
2078 * differences in channel frequencies, which is proportional to differences 2078 * differences in channel frequencies, which is proportional to differences
2079 * in channel number. 2079 * in channel number.
2080 */ 2080 */
2081static int iwl4965_interpolate_chan(struct iwl4965_priv *priv, u32 channel, 2081static int iwl4965_interpolate_chan(struct iwl_priv *priv, u32 channel,
2082 struct iwl4965_eeprom_calib_ch_info *chan_info) 2082 struct iwl4965_eeprom_calib_ch_info *chan_info)
2083{ 2083{
2084 s32 s = -1; 2084 s32 s = -1;
@@ -2411,7 +2411,7 @@ static const struct gain_entry gain_table[2][108] = {
2411 } 2411 }
2412}; 2412};
2413 2413
2414static int iwl4965_fill_txpower_tbl(struct iwl4965_priv *priv, u8 band, u16 channel, 2414static int iwl4965_fill_txpower_tbl(struct iwl_priv *priv, u8 band, u16 channel,
2415 u8 is_fat, u8 ctrl_chan_high, 2415 u8 is_fat, u8 ctrl_chan_high,
2416 struct iwl4965_tx_power_db *tx_power_tbl) 2416 struct iwl4965_tx_power_db *tx_power_tbl)
2417{ 2417{
@@ -2668,7 +2668,7 @@ static int iwl4965_fill_txpower_tbl(struct iwl4965_priv *priv, u8 band, u16 chan
2668 * Uses the active RXON for channel, band, and characteristics (fat, high) 2668 * Uses the active RXON for channel, band, and characteristics (fat, high)
2669 * The power limit is taken from priv->user_txpower_limit. 2669 * The power limit is taken from priv->user_txpower_limit.
2670 */ 2670 */
2671int iwl4965_hw_reg_send_txpower(struct iwl4965_priv *priv) 2671int iwl4965_hw_reg_send_txpower(struct iwl_priv *priv)
2672{ 2672{
2673 struct iwl4965_txpowertable_cmd cmd = { 0 }; 2673 struct iwl4965_txpowertable_cmd cmd = { 0 };
2674 int rc = 0; 2674 int rc = 0;
@@ -2705,7 +2705,7 @@ int iwl4965_hw_reg_send_txpower(struct iwl4965_priv *priv)
2705 return rc; 2705 return rc;
2706} 2706}
2707 2707
2708int iwl4965_hw_channel_switch(struct iwl4965_priv *priv, u16 channel) 2708int iwl4965_hw_channel_switch(struct iwl_priv *priv, u16 channel)
2709{ 2709{
2710 int rc; 2710 int rc;
2711 u8 band = 0; 2711 u8 band = 0;
@@ -2749,7 +2749,7 @@ int iwl4965_hw_channel_switch(struct iwl4965_priv *priv, u16 channel)
2749#define RTS_HCCA_RETRY_LIMIT 3 2749#define RTS_HCCA_RETRY_LIMIT 3
2750#define RTS_DFAULT_RETRY_LIMIT 60 2750#define RTS_DFAULT_RETRY_LIMIT 60
2751 2751
2752void iwl4965_hw_build_tx_cmd_rate(struct iwl4965_priv *priv, 2752void iwl4965_hw_build_tx_cmd_rate(struct iwl_priv *priv,
2753 struct iwl4965_cmd *cmd, 2753 struct iwl4965_cmd *cmd,
2754 struct ieee80211_tx_control *ctrl, 2754 struct ieee80211_tx_control *ctrl,
2755 struct ieee80211_hdr *hdr, int sta_id, 2755 struct ieee80211_hdr *hdr, int sta_id,
@@ -2816,19 +2816,19 @@ void iwl4965_hw_build_tx_cmd_rate(struct iwl4965_priv *priv,
2816 tx->rate_n_flags = iwl4965_hw_set_rate_n_flags(rate_plcp, rate_flags); 2816 tx->rate_n_flags = iwl4965_hw_set_rate_n_flags(rate_plcp, rate_flags);
2817} 2817}
2818 2818
2819int iwl4965_hw_get_rx_read(struct iwl4965_priv *priv) 2819int iwl4965_hw_get_rx_read(struct iwl_priv *priv)
2820{ 2820{
2821 struct iwl4965_shared *shared_data = priv->hw_setting.shared_virt; 2821 struct iwl4965_shared *shared_data = priv->hw_setting.shared_virt;
2822 2822
2823 return IWL_GET_BITS(*shared_data, rb_closed_stts_rb_num); 2823 return IWL_GET_BITS(*shared_data, rb_closed_stts_rb_num);
2824} 2824}
2825 2825
2826int iwl4965_hw_get_temperature(struct iwl4965_priv *priv) 2826int iwl4965_hw_get_temperature(struct iwl_priv *priv)
2827{ 2827{
2828 return priv->temperature; 2828 return priv->temperature;
2829} 2829}
2830 2830
2831unsigned int iwl4965_hw_get_beacon_cmd(struct iwl4965_priv *priv, 2831unsigned int iwl4965_hw_get_beacon_cmd(struct iwl_priv *priv,
2832 struct iwl4965_frame *frame, u8 rate) 2832 struct iwl4965_frame *frame, u8 rate)
2833{ 2833{
2834 struct iwl4965_tx_beacon_cmd *tx_beacon_cmd; 2834 struct iwl4965_tx_beacon_cmd *tx_beacon_cmd;
@@ -2867,7 +2867,7 @@ unsigned int iwl4965_hw_get_beacon_cmd(struct iwl4965_priv *priv,
2867 * 4965 supports up to 16 Tx queues in DRAM, mapped to up to 8 Tx DMA 2867 * 4965 supports up to 16 Tx queues in DRAM, mapped to up to 8 Tx DMA
2868 * channels supported in hardware. 2868 * channels supported in hardware.
2869 */ 2869 */
2870int iwl4965_hw_tx_queue_init(struct iwl4965_priv *priv, struct iwl4965_tx_queue *txq) 2870int iwl4965_hw_tx_queue_init(struct iwl_priv *priv, struct iwl4965_tx_queue *txq)
2871{ 2871{
2872 int rc; 2872 int rc;
2873 unsigned long flags; 2873 unsigned long flags;
@@ -2895,7 +2895,7 @@ int iwl4965_hw_tx_queue_init(struct iwl4965_priv *priv, struct iwl4965_tx_queue
2895 return 0; 2895 return 0;
2896} 2896}
2897 2897
2898int iwl4965_hw_txq_attach_buf_to_tfd(struct iwl4965_priv *priv, void *ptr, 2898int iwl4965_hw_txq_attach_buf_to_tfd(struct iwl_priv *priv, void *ptr,
2899 dma_addr_t addr, u16 len) 2899 dma_addr_t addr, u16 len)
2900{ 2900{
2901 int index, is_odd; 2901 int index, is_odd;
@@ -2929,7 +2929,7 @@ int iwl4965_hw_txq_attach_buf_to_tfd(struct iwl4965_priv *priv, void *ptr,
2929 return 0; 2929 return 0;
2930} 2930}
2931 2931
2932static void iwl4965_hw_card_show_info(struct iwl4965_priv *priv) 2932static void iwl4965_hw_card_show_info(struct iwl_priv *priv)
2933{ 2933{
2934 u16 hw_version = priv->eeprom.board_revision_4965; 2934 u16 hw_version = priv->eeprom.board_revision_4965;
2935 2935
@@ -2947,7 +2947,7 @@ static void iwl4965_hw_card_show_info(struct iwl4965_priv *priv)
2947/** 2947/**
2948 * iwl4965_tx_queue_update_wr_ptr - Set up entry in Tx byte-count array 2948 * iwl4965_tx_queue_update_wr_ptr - Set up entry in Tx byte-count array
2949 */ 2949 */
2950int iwl4965_tx_queue_update_wr_ptr(struct iwl4965_priv *priv, 2950int iwl4965_tx_queue_update_wr_ptr(struct iwl_priv *priv,
2951 struct iwl4965_tx_queue *txq, u16 byte_cnt) 2951 struct iwl4965_tx_queue *txq, u16 byte_cnt)
2952{ 2952{
2953 int len; 2953 int len;
@@ -2978,7 +2978,7 @@ int iwl4965_tx_queue_update_wr_ptr(struct iwl4965_priv *priv,
2978 * Selects how many and which Rx receivers/antennas/chains to use. 2978 * Selects how many and which Rx receivers/antennas/chains to use.
2979 * This should not be used for scan command ... it puts data in wrong place. 2979 * This should not be used for scan command ... it puts data in wrong place.
2980 */ 2980 */
2981void iwl4965_set_rxon_chain(struct iwl4965_priv *priv) 2981void iwl4965_set_rxon_chain(struct iwl_priv *priv)
2982{ 2982{
2983 u8 is_single = is_single_stream(priv); 2983 u8 is_single = is_single_stream(priv);
2984 u8 idle_state, rx_state; 2984 u8 idle_state, rx_state;
@@ -3031,7 +3031,7 @@ static s32 sign_extend(u32 oper, int index)
3031 * 3031 *
3032 * A return of <0 indicates bogus data in the statistics 3032 * A return of <0 indicates bogus data in the statistics
3033 */ 3033 */
3034int iwl4965_get_temperature(const struct iwl4965_priv *priv) 3034int iwl4965_get_temperature(const struct iwl_priv *priv)
3035{ 3035{
3036 s32 temperature; 3036 s32 temperature;
3037 s32 vt; 3037 s32 vt;
@@ -3099,7 +3099,7 @@ int iwl4965_get_temperature(const struct iwl4965_priv *priv)
3099 * Assumes caller will replace priv->last_temperature once calibration 3099 * Assumes caller will replace priv->last_temperature once calibration
3100 * executed. 3100 * executed.
3101 */ 3101 */
3102static int iwl4965_is_temp_calib_needed(struct iwl4965_priv *priv) 3102static int iwl4965_is_temp_calib_needed(struct iwl_priv *priv)
3103{ 3103{
3104 int temp_diff; 3104 int temp_diff;
3105 3105
@@ -3132,7 +3132,7 @@ static int iwl4965_is_temp_calib_needed(struct iwl4965_priv *priv)
3132/* Calculate noise level, based on measurements during network silence just 3132/* Calculate noise level, based on measurements during network silence just
3133 * before arriving beacon. This measurement can be done only if we know 3133 * before arriving beacon. This measurement can be done only if we know
3134 * exactly when to expect beacons, therefore only when we're associated. */ 3134 * exactly when to expect beacons, therefore only when we're associated. */
3135static void iwl4965_rx_calc_noise(struct iwl4965_priv *priv) 3135static void iwl4965_rx_calc_noise(struct iwl_priv *priv)
3136{ 3136{
3137 struct statistics_rx_non_phy *rx_info 3137 struct statistics_rx_non_phy *rx_info
3138 = &(priv->statistics.rx.general); 3138 = &(priv->statistics.rx.general);
@@ -3169,7 +3169,7 @@ static void iwl4965_rx_calc_noise(struct iwl4965_priv *priv)
3169 priv->last_rx_noise); 3169 priv->last_rx_noise);
3170} 3170}
3171 3171
3172void iwl4965_hw_rx_statistics(struct iwl4965_priv *priv, struct iwl4965_rx_mem_buffer *rxb) 3172void iwl4965_hw_rx_statistics(struct iwl_priv *priv, struct iwl4965_rx_mem_buffer *rxb)
3173{ 3173{
3174 struct iwl4965_rx_packet *pkt = (void *)rxb->skb->data; 3174 struct iwl4965_rx_packet *pkt = (void *)rxb->skb->data;
3175 int change; 3175 int change;
@@ -3233,7 +3233,7 @@ void iwl4965_hw_rx_statistics(struct iwl4965_priv *priv, struct iwl4965_rx_mem_b
3233 queue_work(priv->workqueue, &priv->txpower_work); 3233 queue_work(priv->workqueue, &priv->txpower_work);
3234} 3234}
3235 3235
3236static void iwl4965_add_radiotap(struct iwl4965_priv *priv, 3236static void iwl4965_add_radiotap(struct iwl_priv *priv,
3237 struct sk_buff *skb, 3237 struct sk_buff *skb,
3238 struct iwl4965_rx_phy_res *rx_start, 3238 struct iwl4965_rx_phy_res *rx_start,
3239 struct ieee80211_rx_status *stats, 3239 struct ieee80211_rx_status *stats,
@@ -3337,7 +3337,7 @@ static void iwl4965_add_radiotap(struct iwl4965_priv *priv,
3337 stats->flag |= RX_FLAG_RADIOTAP; 3337 stats->flag |= RX_FLAG_RADIOTAP;
3338} 3338}
3339 3339
3340static void iwl4965_handle_data_packet(struct iwl4965_priv *priv, int is_data, 3340static void iwl4965_handle_data_packet(struct iwl_priv *priv, int is_data,
3341 int include_phy, 3341 int include_phy,
3342 struct iwl4965_rx_mem_buffer *rxb, 3342 struct iwl4965_rx_mem_buffer *rxb,
3343 struct ieee80211_rx_status *stats) 3343 struct ieee80211_rx_status *stats)
@@ -3552,7 +3552,7 @@ void iwl4965_init_ht_hw_capab(struct ieee80211_ht_info *ht_info,
3552} 3552}
3553#endif /* CONFIG_IWL4965_HT */ 3553#endif /* CONFIG_IWL4965_HT */
3554 3554
3555static void iwl4965_sta_modify_ps_wake(struct iwl4965_priv *priv, int sta_id) 3555static void iwl4965_sta_modify_ps_wake(struct iwl_priv *priv, int sta_id)
3556{ 3556{
3557 unsigned long flags; 3557 unsigned long flags;
3558 3558
@@ -3566,7 +3566,7 @@ static void iwl4965_sta_modify_ps_wake(struct iwl4965_priv *priv, int sta_id)
3566 iwl4965_send_add_station(priv, &priv->stations[sta_id].sta, CMD_ASYNC); 3566 iwl4965_send_add_station(priv, &priv->stations[sta_id].sta, CMD_ASYNC);
3567} 3567}
3568 3568
3569static void iwl4965_update_ps_mode(struct iwl4965_priv *priv, u16 ps_bit, u8 *addr) 3569static void iwl4965_update_ps_mode(struct iwl_priv *priv, u16 ps_bit, u8 *addr)
3570{ 3570{
3571 /* FIXME: need locking over ps_status ??? */ 3571 /* FIXME: need locking over ps_status ??? */
3572 u8 sta_id = iwl4965_hw_find_station(priv, addr); 3572 u8 sta_id = iwl4965_hw_find_station(priv, addr);
@@ -3595,7 +3595,7 @@ static void iwl4965_update_ps_mode(struct iwl4965_priv *priv, u16 ps_bit, u8 *ad
3595 * TODO: This was originally written for 3945, need to audit for 3595 * TODO: This was originally written for 3945, need to audit for
3596 * proper operation with 4965. 3596 * proper operation with 4965.
3597 */ 3597 */
3598static void iwl4965_dbg_report_frame(struct iwl4965_priv *priv, 3598static void iwl4965_dbg_report_frame(struct iwl_priv *priv,
3599 struct iwl4965_rx_packet *pkt, 3599 struct iwl4965_rx_packet *pkt,
3600 struct ieee80211_hdr *header, int group100) 3600 struct ieee80211_hdr *header, int group100)
3601{ 3601{
@@ -3729,7 +3729,7 @@ static void iwl4965_dbg_report_frame(struct iwl4965_priv *priv,
3729 iwl_print_hex_dump(IWL_DL_RX, data, length); 3729 iwl_print_hex_dump(IWL_DL_RX, data, length);
3730} 3730}
3731#else 3731#else
3732static inline void iwl4965_dbg_report_frame(struct iwl4965_priv *priv, 3732static inline void iwl4965_dbg_report_frame(struct iwl_priv *priv,
3733 struct iwl4965_rx_packet *pkt, 3733 struct iwl4965_rx_packet *pkt,
3734 struct ieee80211_hdr *header, 3734 struct ieee80211_hdr *header,
3735 int group100) 3735 int group100)
@@ -3742,7 +3742,7 @@ static inline void iwl4965_dbg_report_frame(struct iwl4965_priv *priv,
3742 3742
3743/* Called for REPLY_4965_RX (legacy ABG frames), or 3743/* Called for REPLY_4965_RX (legacy ABG frames), or
3744 * REPLY_RX_MPDU_CMD (HT high-throughput N frames). */ 3744 * REPLY_RX_MPDU_CMD (HT high-throughput N frames). */
3745static void iwl4965_rx_reply_rx(struct iwl4965_priv *priv, 3745static void iwl4965_rx_reply_rx(struct iwl_priv *priv,
3746 struct iwl4965_rx_mem_buffer *rxb) 3746 struct iwl4965_rx_mem_buffer *rxb)
3747{ 3747{
3748 struct ieee80211_hdr *header; 3748 struct ieee80211_hdr *header;
@@ -4004,7 +4004,7 @@ static void iwl4965_rx_reply_rx(struct iwl4965_priv *priv,
4004 4004
4005/* Cache phy data (Rx signal strength, etc) for HT frame (REPLY_RX_PHY_CMD). 4005/* Cache phy data (Rx signal strength, etc) for HT frame (REPLY_RX_PHY_CMD).
4006 * This will be used later in iwl4965_rx_reply_rx() for REPLY_RX_MPDU_CMD. */ 4006 * This will be used later in iwl4965_rx_reply_rx() for REPLY_RX_MPDU_CMD. */
4007static void iwl4965_rx_reply_rx_phy(struct iwl4965_priv *priv, 4007static void iwl4965_rx_reply_rx_phy(struct iwl_priv *priv,
4008 struct iwl4965_rx_mem_buffer *rxb) 4008 struct iwl4965_rx_mem_buffer *rxb)
4009{ 4009{
4010 struct iwl4965_rx_packet *pkt = (void *)rxb->skb->data; 4010 struct iwl4965_rx_packet *pkt = (void *)rxb->skb->data;
@@ -4013,7 +4013,7 @@ static void iwl4965_rx_reply_rx_phy(struct iwl4965_priv *priv,
4013 sizeof(struct iwl4965_rx_phy_res)); 4013 sizeof(struct iwl4965_rx_phy_res));
4014} 4014}
4015 4015
4016static void iwl4965_rx_missed_beacon_notif(struct iwl4965_priv *priv, 4016static void iwl4965_rx_missed_beacon_notif(struct iwl_priv *priv,
4017 struct iwl4965_rx_mem_buffer *rxb) 4017 struct iwl4965_rx_mem_buffer *rxb)
4018 4018
4019{ 4019{
@@ -4040,7 +4040,7 @@ static void iwl4965_rx_missed_beacon_notif(struct iwl4965_priv *priv,
4040/** 4040/**
4041 * iwl4965_sta_modify_enable_tid_tx - Enable Tx for this TID in station table 4041 * iwl4965_sta_modify_enable_tid_tx - Enable Tx for this TID in station table
4042 */ 4042 */
4043static void iwl4965_sta_modify_enable_tid_tx(struct iwl4965_priv *priv, 4043static void iwl4965_sta_modify_enable_tid_tx(struct iwl_priv *priv,
4044 int sta_id, int tid) 4044 int sta_id, int tid)
4045{ 4045{
4046 unsigned long flags; 4046 unsigned long flags;
@@ -4061,7 +4061,7 @@ static void iwl4965_sta_modify_enable_tid_tx(struct iwl4965_priv *priv,
4061 * Go through block-ack's bitmap of ACK'd frames, update driver's record of 4061 * Go through block-ack's bitmap of ACK'd frames, update driver's record of
4062 * ACK vs. not. This gets sent to mac80211, then to rate scaling algo. 4062 * ACK vs. not. This gets sent to mac80211, then to rate scaling algo.
4063 */ 4063 */
4064static int iwl4965_tx_status_reply_compressed_ba(struct iwl4965_priv *priv, 4064static int iwl4965_tx_status_reply_compressed_ba(struct iwl_priv *priv,
4065 struct iwl4965_ht_agg *agg, 4065 struct iwl4965_ht_agg *agg,
4066 struct iwl4965_compressed_ba_resp* 4066 struct iwl4965_compressed_ba_resp*
4067 ba_resp) 4067 ba_resp)
@@ -4126,7 +4126,7 @@ static int iwl4965_tx_status_reply_compressed_ba(struct iwl4965_priv *priv,
4126/** 4126/**
4127 * iwl4965_tx_queue_stop_scheduler - Stop queue, but keep configuration 4127 * iwl4965_tx_queue_stop_scheduler - Stop queue, but keep configuration
4128 */ 4128 */
4129static void iwl4965_tx_queue_stop_scheduler(struct iwl4965_priv *priv, 4129static void iwl4965_tx_queue_stop_scheduler(struct iwl_priv *priv,
4130 u16 txq_id) 4130 u16 txq_id)
4131{ 4131{
4132 /* Simply stop the queue, but don't change any configuration; 4132 /* Simply stop the queue, but don't change any configuration;
@@ -4141,7 +4141,7 @@ static void iwl4965_tx_queue_stop_scheduler(struct iwl4965_priv *priv,
4141 * txq_id must be greater than IWL_BACK_QUEUE_FIRST_ID 4141 * txq_id must be greater than IWL_BACK_QUEUE_FIRST_ID
4142 * priv->lock must be held by the caller 4142 * priv->lock must be held by the caller
4143 */ 4143 */
4144static int iwl4965_tx_queue_agg_disable(struct iwl4965_priv *priv, u16 txq_id, 4144static int iwl4965_tx_queue_agg_disable(struct iwl_priv *priv, u16 txq_id,
4145 u16 ssn_idx, u8 tx_fifo) 4145 u16 ssn_idx, u8 tx_fifo)
4146{ 4146{
4147 int ret = 0; 4147 int ret = 0;
@@ -4174,7 +4174,7 @@ static int iwl4965_tx_queue_agg_disable(struct iwl4965_priv *priv, u16 txq_id,
4174 return 0; 4174 return 0;
4175} 4175}
4176 4176
4177int iwl4965_check_empty_hw_queue(struct iwl4965_priv *priv, int sta_id, 4177int iwl4965_check_empty_hw_queue(struct iwl_priv *priv, int sta_id,
4178 u8 tid, int txq_id) 4178 u8 tid, int txq_id)
4179{ 4179{
4180 struct iwl4965_queue *q = &priv->txq[txq_id].q; 4180 struct iwl4965_queue *q = &priv->txq[txq_id].q;
@@ -4224,7 +4224,7 @@ static inline int iwl4965_queue_dec_wrap(int index, int n_bd)
4224 * Handles block-acknowledge notification from device, which reports success 4224 * Handles block-acknowledge notification from device, which reports success
4225 * of frames sent via aggregation. 4225 * of frames sent via aggregation.
4226 */ 4226 */
4227static void iwl4965_rx_reply_compressed_ba(struct iwl4965_priv *priv, 4227static void iwl4965_rx_reply_compressed_ba(struct iwl_priv *priv,
4228 struct iwl4965_rx_mem_buffer *rxb) 4228 struct iwl4965_rx_mem_buffer *rxb)
4229{ 4229{
4230 struct iwl4965_rx_packet *pkt = (void *)rxb->skb->data; 4230 struct iwl4965_rx_packet *pkt = (void *)rxb->skb->data;
@@ -4292,7 +4292,7 @@ static void iwl4965_rx_reply_compressed_ba(struct iwl4965_priv *priv,
4292/** 4292/**
4293 * iwl4965_tx_queue_set_q2ratid - Map unique receiver/tid combination to a queue 4293 * iwl4965_tx_queue_set_q2ratid - Map unique receiver/tid combination to a queue
4294 */ 4294 */
4295static int iwl4965_tx_queue_set_q2ratid(struct iwl4965_priv *priv, u16 ra_tid, 4295static int iwl4965_tx_queue_set_q2ratid(struct iwl_priv *priv, u16 ra_tid,
4296 u16 txq_id) 4296 u16 txq_id)
4297{ 4297{
4298 u32 tbl_dw_addr; 4298 u32 tbl_dw_addr;
@@ -4323,7 +4323,7 @@ static int iwl4965_tx_queue_set_q2ratid(struct iwl4965_priv *priv, u16 ra_tid,
4323 * NOTE: txq_id must be greater than IWL_BACK_QUEUE_FIRST_ID, 4323 * NOTE: txq_id must be greater than IWL_BACK_QUEUE_FIRST_ID,
4324 * i.e. it must be one of the higher queues used for aggregation 4324 * i.e. it must be one of the higher queues used for aggregation
4325 */ 4325 */
4326static int iwl4965_tx_queue_agg_enable(struct iwl4965_priv *priv, int txq_id, 4326static int iwl4965_tx_queue_agg_enable(struct iwl_priv *priv, int txq_id,
4327 int tx_fifo, int sta_id, int tid, 4327 int tx_fifo, int sta_id, int tid,
4328 u16 ssn_idx) 4328 u16 ssn_idx)
4329{ 4329{
@@ -4400,7 +4400,7 @@ static int iwl4965_tx_queue_agg_enable(struct iwl4965_priv *priv, int txq_id,
4400 * calling this function (which runs REPLY_TX_LINK_QUALITY_CMD, 4400 * calling this function (which runs REPLY_TX_LINK_QUALITY_CMD,
4401 * which requires station table entry to exist). 4401 * which requires station table entry to exist).
4402 */ 4402 */
4403void iwl4965_add_station(struct iwl4965_priv *priv, const u8 *addr, int is_ap) 4403void iwl4965_add_station(struct iwl_priv *priv, const u8 *addr, int is_ap)
4404{ 4404{
4405 int i, r; 4405 int i, r;
4406 struct iwl4965_link_quality_cmd link_cmd = { 4406 struct iwl4965_link_quality_cmd link_cmd = {
@@ -4445,7 +4445,7 @@ void iwl4965_add_station(struct iwl4965_priv *priv, const u8 *addr, int is_ap)
4445 4445
4446#ifdef CONFIG_IWL4965_HT 4446#ifdef CONFIG_IWL4965_HT
4447 4447
4448static u8 iwl4965_is_channel_extension(struct iwl4965_priv *priv, 4448static u8 iwl4965_is_channel_extension(struct iwl_priv *priv,
4449 enum ieee80211_band band, 4449 enum ieee80211_band band,
4450 u16 channel, u8 extension_chan_offset) 4450 u16 channel, u8 extension_chan_offset)
4451{ 4451{
@@ -4465,7 +4465,7 @@ static u8 iwl4965_is_channel_extension(struct iwl4965_priv *priv,
4465 return 0; 4465 return 0;
4466} 4466}
4467 4467
4468static u8 iwl4965_is_fat_tx_allowed(struct iwl4965_priv *priv, 4468static u8 iwl4965_is_fat_tx_allowed(struct iwl_priv *priv,
4469 struct ieee80211_ht_info *sta_ht_inf) 4469 struct ieee80211_ht_info *sta_ht_inf)
4470{ 4470{
4471 struct iwl_ht_info *iwl_ht_conf = &priv->current_ht_config; 4471 struct iwl_ht_info *iwl_ht_conf = &priv->current_ht_config;
@@ -4486,7 +4486,7 @@ static u8 iwl4965_is_fat_tx_allowed(struct iwl4965_priv *priv,
4486 iwl_ht_conf->extension_chan_offset)); 4486 iwl_ht_conf->extension_chan_offset));
4487} 4487}
4488 4488
4489void iwl4965_set_rxon_ht(struct iwl4965_priv *priv, struct iwl_ht_info *ht_info) 4489void iwl4965_set_rxon_ht(struct iwl_priv *priv, struct iwl_ht_info *ht_info)
4490{ 4490{
4491 struct iwl4965_rxon_cmd *rxon = &priv->staging_rxon; 4491 struct iwl4965_rxon_cmd *rxon = &priv->staging_rxon;
4492 u32 val; 4492 u32 val;
@@ -4540,7 +4540,7 @@ void iwl4965_set_rxon_ht(struct iwl4965_priv *priv, struct iwl_ht_info *ht_info)
4540 return; 4540 return;
4541} 4541}
4542 4542
4543void iwl4965_set_ht_add_station(struct iwl4965_priv *priv, u8 index, 4543void iwl4965_set_ht_add_station(struct iwl_priv *priv, u8 index,
4544 struct ieee80211_ht_info *sta_ht_inf) 4544 struct ieee80211_ht_info *sta_ht_inf)
4545{ 4545{
4546 __le32 sta_flags; 4546 __le32 sta_flags;
@@ -4585,7 +4585,7 @@ void iwl4965_set_ht_add_station(struct iwl4965_priv *priv, u8 index,
4585 return; 4585 return;
4586} 4586}
4587 4587
4588static void iwl4965_sta_modify_add_ba_tid(struct iwl4965_priv *priv, 4588static void iwl4965_sta_modify_add_ba_tid(struct iwl_priv *priv,
4589 int sta_id, int tid, u16 ssn) 4589 int sta_id, int tid, u16 ssn)
4590{ 4590{
4591 unsigned long flags; 4591 unsigned long flags;
@@ -4601,7 +4601,7 @@ static void iwl4965_sta_modify_add_ba_tid(struct iwl4965_priv *priv,
4601 iwl4965_send_add_station(priv, &priv->stations[sta_id].sta, CMD_ASYNC); 4601 iwl4965_send_add_station(priv, &priv->stations[sta_id].sta, CMD_ASYNC);
4602} 4602}
4603 4603
4604static void iwl4965_sta_modify_del_ba_tid(struct iwl4965_priv *priv, 4604static void iwl4965_sta_modify_del_ba_tid(struct iwl_priv *priv,
4605 int sta_id, int tid) 4605 int sta_id, int tid)
4606{ 4606{
4607 unsigned long flags; 4607 unsigned long flags;
@@ -4622,7 +4622,7 @@ static void iwl4965_sta_modify_del_ba_tid(struct iwl4965_priv *priv,
4622 * Should never return anything < 7, because they should already 4622 * Should never return anything < 7, because they should already
4623 * be in use as EDCA AC (0-3), Command (4), HCCA (5, 6). 4623 * be in use as EDCA AC (0-3), Command (4), HCCA (5, 6).
4624 */ 4624 */
4625static int iwl4965_txq_ctx_activate_free(struct iwl4965_priv *priv) 4625static int iwl4965_txq_ctx_activate_free(struct iwl_priv *priv)
4626{ 4626{
4627 int txq_id; 4627 int txq_id;
4628 4628
@@ -4635,7 +4635,7 @@ static int iwl4965_txq_ctx_activate_free(struct iwl4965_priv *priv)
4635static int iwl4965_mac_ht_tx_agg_start(struct ieee80211_hw *hw, const u8 *da, 4635static int iwl4965_mac_ht_tx_agg_start(struct ieee80211_hw *hw, const u8 *da,
4636 u16 tid, u16 *start_seq_num) 4636 u16 tid, u16 *start_seq_num)
4637{ 4637{
4638 struct iwl4965_priv *priv = hw->priv; 4638 struct iwl_priv *priv = hw->priv;
4639 int sta_id; 4639 int sta_id;
4640 int tx_fifo; 4640 int tx_fifo;
4641 int txq_id; 4641 int txq_id;
@@ -4695,7 +4695,7 @@ static int iwl4965_mac_ht_tx_agg_stop(struct ieee80211_hw *hw, const u8 *da,
4695 u16 tid) 4695 u16 tid)
4696{ 4696{
4697 4697
4698 struct iwl4965_priv *priv = hw->priv; 4698 struct iwl_priv *priv = hw->priv;
4699 int tx_fifo_id, txq_id, sta_id, ssn = -1; 4699 int tx_fifo_id, txq_id, sta_id, ssn = -1;
4700 struct iwl4965_tid_data *tid_data; 4700 struct iwl4965_tid_data *tid_data;
4701 int ret, write_ptr, read_ptr; 4701 int ret, write_ptr, read_ptr;
@@ -4756,7 +4756,7 @@ int iwl4965_mac_ampdu_action(struct ieee80211_hw *hw,
4756 enum ieee80211_ampdu_mlme_action action, 4756 enum ieee80211_ampdu_mlme_action action,
4757 const u8 *addr, u16 tid, u16 *ssn) 4757 const u8 *addr, u16 tid, u16 *ssn)
4758{ 4758{
4759 struct iwl4965_priv *priv = hw->priv; 4759 struct iwl_priv *priv = hw->priv;
4760 int sta_id; 4760 int sta_id;
4761 DECLARE_MAC_BUF(mac); 4761 DECLARE_MAC_BUF(mac);
4762 4762
@@ -4789,7 +4789,7 @@ int iwl4965_mac_ampdu_action(struct ieee80211_hw *hw,
4789#endif /* CONFIG_IWL4965_HT */ 4789#endif /* CONFIG_IWL4965_HT */
4790 4790
4791/* Set up 4965-specific Rx frame reply handlers */ 4791/* Set up 4965-specific Rx frame reply handlers */
4792void iwl4965_hw_rx_handler_setup(struct iwl4965_priv *priv) 4792void iwl4965_hw_rx_handler_setup(struct iwl_priv *priv)
4793{ 4793{
4794 /* Legacy Rx frames */ 4794 /* Legacy Rx frames */
4795 priv->rx_handlers[REPLY_4965_RX] = iwl4965_rx_reply_rx; 4795 priv->rx_handlers[REPLY_4965_RX] = iwl4965_rx_reply_rx;
@@ -4806,7 +4806,7 @@ void iwl4965_hw_rx_handler_setup(struct iwl4965_priv *priv)
4806#endif /* CONFIG_IWL4965_HT */ 4806#endif /* CONFIG_IWL4965_HT */
4807} 4807}
4808 4808
4809void iwl4965_hw_setup_deferred_work(struct iwl4965_priv *priv) 4809void iwl4965_hw_setup_deferred_work(struct iwl_priv *priv)
4810{ 4810{
4811 INIT_WORK(&priv->txpower_work, iwl4965_bg_txpower_work); 4811 INIT_WORK(&priv->txpower_work, iwl4965_bg_txpower_work);
4812 INIT_WORK(&priv->statistics_work, iwl4965_bg_statistics_work); 4812 INIT_WORK(&priv->statistics_work, iwl4965_bg_statistics_work);
@@ -4818,7 +4818,7 @@ void iwl4965_hw_setup_deferred_work(struct iwl4965_priv *priv)
4818 priv->statistics_periodic.function = iwl4965_bg_statistics_periodic; 4818 priv->statistics_periodic.function = iwl4965_bg_statistics_periodic;
4819} 4819}
4820 4820
4821void iwl4965_hw_cancel_deferred_work(struct iwl4965_priv *priv) 4821void iwl4965_hw_cancel_deferred_work(struct iwl_priv *priv)
4822{ 4822{
4823 del_timer_sync(&priv->statistics_periodic); 4823 del_timer_sync(&priv->statistics_periodic);
4824 4824
diff --git a/drivers/net/wireless/iwlwifi/iwl-4965.h b/drivers/net/wireless/iwlwifi/iwl-4965.h
index 4426d0f85564..60353b2645d4 100644
--- a/drivers/net/wireless/iwlwifi/iwl-4965.h
+++ b/drivers/net/wireless/iwlwifi/iwl-4965.h
@@ -315,13 +315,13 @@ enum {
315}; 315};
316 316
317struct iwl4965_cmd; 317struct iwl4965_cmd;
318struct iwl4965_priv; 318struct iwl_priv;
319 319
320struct iwl4965_cmd_meta { 320struct iwl4965_cmd_meta {
321 struct iwl4965_cmd_meta *source; 321 struct iwl4965_cmd_meta *source;
322 union { 322 union {
323 struct sk_buff *skb; 323 struct sk_buff *skb;
324 int (*callback)(struct iwl4965_priv *priv, 324 int (*callback)(struct iwl_priv *priv,
325 struct iwl4965_cmd *cmd, struct sk_buff *skb); 325 struct iwl4965_cmd *cmd, struct sk_buff *skb);
326 } __attribute__ ((packed)) u; 326 } __attribute__ ((packed)) u;
327 327
@@ -634,40 +634,40 @@ struct iwl4965_driver_hw_info {
634 * 634 *
635 *****************************************************************************/ 635 *****************************************************************************/
636struct iwl4965_addsta_cmd; 636struct iwl4965_addsta_cmd;
637extern int iwl4965_send_add_station(struct iwl4965_priv *priv, 637extern int iwl4965_send_add_station(struct iwl_priv *priv,
638 struct iwl4965_addsta_cmd *sta, u8 flags); 638 struct iwl4965_addsta_cmd *sta, u8 flags);
639extern u8 iwl4965_add_station_flags(struct iwl4965_priv *priv, const u8 *addr, 639extern u8 iwl4965_add_station_flags(struct iwl_priv *priv, const u8 *addr,
640 int is_ap, u8 flags, void *ht_data); 640 int is_ap, u8 flags, void *ht_data);
641extern int iwl4965_is_network_packet(struct iwl4965_priv *priv, 641extern int iwl4965_is_network_packet(struct iwl_priv *priv,
642 struct ieee80211_hdr *header); 642 struct ieee80211_hdr *header);
643extern int iwl4965_power_init_handle(struct iwl4965_priv *priv); 643extern int iwl4965_power_init_handle(struct iwl_priv *priv);
644extern void iwl4965_handle_data_packet_monitor(struct iwl4965_priv *priv, 644extern void iwl4965_handle_data_packet_monitor(struct iwl_priv *priv,
645 struct iwl4965_rx_mem_buffer *rxb, 645 struct iwl4965_rx_mem_buffer *rxb,
646 void *data, short len, 646 void *data, short len,
647 struct ieee80211_rx_status *stats, 647 struct ieee80211_rx_status *stats,
648 u16 phy_flags); 648 u16 phy_flags);
649extern int iwl4965_is_duplicate_packet(struct iwl4965_priv *priv, 649extern int iwl4965_is_duplicate_packet(struct iwl_priv *priv,
650 struct ieee80211_hdr *header); 650 struct ieee80211_hdr *header);
651extern int iwl4965_rx_queue_alloc(struct iwl4965_priv *priv); 651extern int iwl4965_rx_queue_alloc(struct iwl_priv *priv);
652extern void iwl4965_rx_queue_reset(struct iwl4965_priv *priv, 652extern void iwl4965_rx_queue_reset(struct iwl_priv *priv,
653 struct iwl4965_rx_queue *rxq); 653 struct iwl4965_rx_queue *rxq);
654extern int iwl4965_calc_db_from_ratio(int sig_ratio); 654extern int iwl4965_calc_db_from_ratio(int sig_ratio);
655extern int iwl4965_calc_sig_qual(int rssi_dbm, int noise_dbm); 655extern int iwl4965_calc_sig_qual(int rssi_dbm, int noise_dbm);
656extern int iwl4965_tx_queue_init(struct iwl4965_priv *priv, 656extern int iwl4965_tx_queue_init(struct iwl_priv *priv,
657 struct iwl4965_tx_queue *txq, int count, u32 id); 657 struct iwl4965_tx_queue *txq, int count, u32 id);
658extern void iwl4965_rx_replenish(void *data); 658extern void iwl4965_rx_replenish(void *data);
659extern void iwl4965_tx_queue_free(struct iwl4965_priv *priv, struct iwl4965_tx_queue *txq); 659extern void iwl4965_tx_queue_free(struct iwl_priv *priv, struct iwl4965_tx_queue *txq);
660extern int iwl4965_send_cmd_pdu(struct iwl4965_priv *priv, u8 id, u16 len, 660extern int iwl4965_send_cmd_pdu(struct iwl_priv *priv, u8 id, u16 len,
661 const void *data); 661 const void *data);
662extern int __must_check iwl4965_send_cmd(struct iwl4965_priv *priv, 662extern int __must_check iwl4965_send_cmd(struct iwl_priv *priv,
663 struct iwl4965_host_cmd *cmd); 663 struct iwl4965_host_cmd *cmd);
664extern unsigned int iwl4965_fill_beacon_frame(struct iwl4965_priv *priv, 664extern unsigned int iwl4965_fill_beacon_frame(struct iwl_priv *priv,
665 struct ieee80211_hdr *hdr, 665 struct ieee80211_hdr *hdr,
666 const u8 *dest, int left); 666 const u8 *dest, int left);
667extern int iwl4965_rx_queue_update_write_ptr(struct iwl4965_priv *priv, 667extern int iwl4965_rx_queue_update_write_ptr(struct iwl_priv *priv,
668 struct iwl4965_rx_queue *q); 668 struct iwl4965_rx_queue *q);
669extern int iwl4965_send_statistics_request(struct iwl4965_priv *priv); 669extern int iwl4965_send_statistics_request(struct iwl_priv *priv);
670extern void iwl4965_set_decrypted_flag(struct iwl4965_priv *priv, struct sk_buff *skb, 670extern void iwl4965_set_decrypted_flag(struct iwl_priv *priv, struct sk_buff *skb,
671 u32 decrypt_res, 671 u32 decrypt_res,
672 struct ieee80211_rx_status *stats); 672 struct ieee80211_rx_status *stats);
673extern __le16 *ieee80211_get_qos_ctrl(struct ieee80211_hdr *hdr); 673extern __le16 *ieee80211_get_qos_ctrl(struct ieee80211_hdr *hdr);
@@ -678,7 +678,7 @@ extern const u8 iwl4965_broadcast_addr[ETH_ALEN];
678 * Currently used by iwl-3945-rs... look at restructuring so that it doesn't 678 * Currently used by iwl-3945-rs... look at restructuring so that it doesn't
679 * call this... todo... fix that. 679 * call this... todo... fix that.
680*/ 680*/
681extern u8 iwl4965_sync_station(struct iwl4965_priv *priv, int sta_id, 681extern u8 iwl4965_sync_station(struct iwl_priv *priv, int sta_id,
682 u16 tx_rate, u8 flags); 682 u16 tx_rate, u8 flags);
683 683
684/****************************************************************************** 684/******************************************************************************
@@ -697,36 +697,36 @@ extern u8 iwl4965_sync_station(struct iwl4965_priv *priv, int sta_id,
697 * iwl4965_mac_ <-- mac80211 callback 697 * iwl4965_mac_ <-- mac80211 callback
698 * 698 *
699 ****************************************************************************/ 699 ****************************************************************************/
700extern void iwl4965_hw_rx_handler_setup(struct iwl4965_priv *priv); 700extern void iwl4965_hw_rx_handler_setup(struct iwl_priv *priv);
701extern void iwl4965_hw_setup_deferred_work(struct iwl4965_priv *priv); 701extern void iwl4965_hw_setup_deferred_work(struct iwl_priv *priv);
702extern void iwl4965_hw_cancel_deferred_work(struct iwl4965_priv *priv); 702extern void iwl4965_hw_cancel_deferred_work(struct iwl_priv *priv);
703extern int iwl4965_hw_rxq_stop(struct iwl4965_priv *priv); 703extern int iwl4965_hw_rxq_stop(struct iwl_priv *priv);
704extern int iwl4965_hw_set_hw_setting(struct iwl4965_priv *priv); 704extern int iwl4965_hw_set_hw_setting(struct iwl_priv *priv);
705extern int iwl4965_hw_nic_init(struct iwl4965_priv *priv); 705extern int iwl4965_hw_nic_init(struct iwl_priv *priv);
706extern int iwl4965_hw_nic_stop_master(struct iwl4965_priv *priv); 706extern int iwl4965_hw_nic_stop_master(struct iwl_priv *priv);
707extern void iwl4965_hw_txq_ctx_free(struct iwl4965_priv *priv); 707extern void iwl4965_hw_txq_ctx_free(struct iwl_priv *priv);
708extern void iwl4965_hw_txq_ctx_stop(struct iwl4965_priv *priv); 708extern void iwl4965_hw_txq_ctx_stop(struct iwl_priv *priv);
709extern int iwl4965_hw_nic_reset(struct iwl4965_priv *priv); 709extern int iwl4965_hw_nic_reset(struct iwl_priv *priv);
710extern int iwl4965_hw_txq_attach_buf_to_tfd(struct iwl4965_priv *priv, void *tfd, 710extern int iwl4965_hw_txq_attach_buf_to_tfd(struct iwl_priv *priv, void *tfd,
711 dma_addr_t addr, u16 len); 711 dma_addr_t addr, u16 len);
712extern int iwl4965_hw_txq_free_tfd(struct iwl4965_priv *priv, struct iwl4965_tx_queue *txq); 712extern int iwl4965_hw_txq_free_tfd(struct iwl_priv *priv, struct iwl4965_tx_queue *txq);
713extern int iwl4965_hw_get_temperature(struct iwl4965_priv *priv); 713extern int iwl4965_hw_get_temperature(struct iwl_priv *priv);
714extern int iwl4965_hw_tx_queue_init(struct iwl4965_priv *priv, 714extern int iwl4965_hw_tx_queue_init(struct iwl_priv *priv,
715 struct iwl4965_tx_queue *txq); 715 struct iwl4965_tx_queue *txq);
716extern unsigned int iwl4965_hw_get_beacon_cmd(struct iwl4965_priv *priv, 716extern unsigned int iwl4965_hw_get_beacon_cmd(struct iwl_priv *priv,
717 struct iwl4965_frame *frame, u8 rate); 717 struct iwl4965_frame *frame, u8 rate);
718extern int iwl4965_hw_get_rx_read(struct iwl4965_priv *priv); 718extern int iwl4965_hw_get_rx_read(struct iwl_priv *priv);
719extern void iwl4965_hw_build_tx_cmd_rate(struct iwl4965_priv *priv, 719extern void iwl4965_hw_build_tx_cmd_rate(struct iwl_priv *priv,
720 struct iwl4965_cmd *cmd, 720 struct iwl4965_cmd *cmd,
721 struct ieee80211_tx_control *ctrl, 721 struct ieee80211_tx_control *ctrl,
722 struct ieee80211_hdr *hdr, 722 struct ieee80211_hdr *hdr,
723 int sta_id, int tx_id); 723 int sta_id, int tx_id);
724extern int iwl4965_hw_reg_send_txpower(struct iwl4965_priv *priv); 724extern int iwl4965_hw_reg_send_txpower(struct iwl_priv *priv);
725extern int iwl4965_hw_reg_set_txpower(struct iwl4965_priv *priv, s8 power); 725extern int iwl4965_hw_reg_set_txpower(struct iwl_priv *priv, s8 power);
726extern void iwl4965_hw_rx_statistics(struct iwl4965_priv *priv, 726extern void iwl4965_hw_rx_statistics(struct iwl_priv *priv,
727 struct iwl4965_rx_mem_buffer *rxb); 727 struct iwl4965_rx_mem_buffer *rxb);
728extern void iwl4965_disable_events(struct iwl4965_priv *priv); 728extern void iwl4965_disable_events(struct iwl_priv *priv);
729extern int iwl4965_get_temperature(const struct iwl4965_priv *priv); 729extern int iwl4965_get_temperature(const struct iwl_priv *priv);
730 730
731/** 731/**
732 * iwl4965_hw_find_station - Find station id for a given BSSID 732 * iwl4965_hw_find_station - Find station id for a given BSSID
@@ -736,48 +736,48 @@ extern int iwl4965_get_temperature(const struct iwl4965_priv *priv);
736 * not yet been merged into a single common layer for managing the 736 * not yet been merged into a single common layer for managing the
737 * station tables. 737 * station tables.
738 */ 738 */
739extern u8 iwl4965_hw_find_station(struct iwl4965_priv *priv, const u8 *bssid); 739extern u8 iwl4965_hw_find_station(struct iwl_priv *priv, const u8 *bssid);
740 740
741extern int iwl4965_hw_channel_switch(struct iwl4965_priv *priv, u16 channel); 741extern int iwl4965_hw_channel_switch(struct iwl_priv *priv, u16 channel);
742extern int iwl4965_tx_queue_reclaim(struct iwl4965_priv *priv, int txq_id, int index); 742extern int iwl4965_tx_queue_reclaim(struct iwl_priv *priv, int txq_id, int index);
743extern int iwl4965_queue_space(const struct iwl4965_queue *q); 743extern int iwl4965_queue_space(const struct iwl4965_queue *q);
744struct iwl4965_priv; 744struct iwl_priv;
745 745
746/* 746/*
747 * Forward declare iwl-4965.c functions for iwl-base.c 747 * Forward declare iwl-4965.c functions for iwl-base.c
748 */ 748 */
749extern int iwl4965_tx_queue_update_wr_ptr(struct iwl4965_priv *priv, 749extern int iwl4965_tx_queue_update_wr_ptr(struct iwl_priv *priv,
750 struct iwl4965_tx_queue *txq, 750 struct iwl4965_tx_queue *txq,
751 u16 byte_cnt); 751 u16 byte_cnt);
752extern void iwl4965_add_station(struct iwl4965_priv *priv, const u8 *addr, 752extern void iwl4965_add_station(struct iwl_priv *priv, const u8 *addr,
753 int is_ap); 753 int is_ap);
754extern void iwl4965_set_rxon_chain(struct iwl4965_priv *priv); 754extern void iwl4965_set_rxon_chain(struct iwl_priv *priv);
755extern int iwl4965_alive_notify(struct iwl4965_priv *priv); 755extern int iwl4965_alive_notify(struct iwl_priv *priv);
756extern void iwl4965_update_rate_scaling(struct iwl4965_priv *priv, u8 mode); 756extern void iwl4965_update_rate_scaling(struct iwl_priv *priv, u8 mode);
757extern void iwl4965_chain_noise_reset(struct iwl4965_priv *priv); 757extern void iwl4965_chain_noise_reset(struct iwl_priv *priv);
758extern void iwl4965_init_sensitivity(struct iwl4965_priv *priv, u8 flags, 758extern void iwl4965_init_sensitivity(struct iwl_priv *priv, u8 flags,
759 u8 force); 759 u8 force);
760extern int iwl4965_set_fat_chan_info(struct iwl4965_priv *priv, 760extern int iwl4965_set_fat_chan_info(struct iwl_priv *priv,
761 enum ieee80211_band band, 761 enum ieee80211_band band,
762 u16 channel, 762 u16 channel,
763 const struct iwl4965_eeprom_channel *eeprom_ch, 763 const struct iwl4965_eeprom_channel *eeprom_ch,
764 u8 fat_extension_channel); 764 u8 fat_extension_channel);
765extern void iwl4965_rf_kill_ct_config(struct iwl4965_priv *priv); 765extern void iwl4965_rf_kill_ct_config(struct iwl_priv *priv);
766extern void iwl4965_hwrate_to_tx_control(struct iwl4965_priv *priv, 766extern void iwl4965_hwrate_to_tx_control(struct iwl_priv *priv,
767 u32 rate_n_flags, 767 u32 rate_n_flags,
768 struct ieee80211_tx_control *control); 768 struct ieee80211_tx_control *control);
769 769
770#ifdef CONFIG_IWL4965_HT 770#ifdef CONFIG_IWL4965_HT
771void iwl4965_init_ht_hw_capab(struct ieee80211_ht_info *ht_info, 771void iwl4965_init_ht_hw_capab(struct ieee80211_ht_info *ht_info,
772 enum ieee80211_band band); 772 enum ieee80211_band band);
773void iwl4965_set_rxon_ht(struct iwl4965_priv *priv, 773void iwl4965_set_rxon_ht(struct iwl_priv *priv,
774 struct iwl_ht_info *ht_info); 774 struct iwl_ht_info *ht_info);
775void iwl4965_set_ht_add_station(struct iwl4965_priv *priv, u8 index, 775void iwl4965_set_ht_add_station(struct iwl_priv *priv, u8 index,
776 struct ieee80211_ht_info *sta_ht_inf); 776 struct ieee80211_ht_info *sta_ht_inf);
777int iwl4965_mac_ampdu_action(struct ieee80211_hw *hw, 777int iwl4965_mac_ampdu_action(struct ieee80211_hw *hw,
778 enum ieee80211_ampdu_mlme_action action, 778 enum ieee80211_ampdu_mlme_action action,
779 const u8 *addr, u16 tid, u16 *ssn); 779 const u8 *addr, u16 tid, u16 *ssn);
780int iwl4965_check_empty_hw_queue(struct iwl4965_priv *priv, int sta_id, 780int iwl4965_check_empty_hw_queue(struct iwl_priv *priv, int sta_id,
781 u8 tid, int txq_id); 781 u8 tid, int txq_id);
782#else 782#else
783static inline void iwl4965_init_ht_hw_capab(struct ieee80211_ht_info *ht_info, 783static inline void iwl4965_init_ht_hw_capab(struct ieee80211_ht_info *ht_info,
@@ -966,7 +966,7 @@ enum {
966 966
967#endif 967#endif
968 968
969struct iwl4965_priv { 969struct iwl_priv {
970 970
971 /* ieee device used by generic ieee processing code */ 971 /* ieee device used by generic ieee processing code */
972 struct ieee80211_hw *hw; 972 struct ieee80211_hw *hw;
@@ -982,7 +982,7 @@ struct iwl4965_priv {
982 int alloc_rxb_skb; 982 int alloc_rxb_skb;
983 bool add_radiotap; 983 bool add_radiotap;
984 984
985 void (*rx_handlers[REPLY_MAX])(struct iwl4965_priv *priv, 985 void (*rx_handlers[REPLY_MAX])(struct iwl_priv *priv,
986 struct iwl4965_rx_mem_buffer *rxb); 986 struct iwl4965_rx_mem_buffer *rxb);
987 987
988 struct ieee80211_supported_band bands[IEEE80211_NUM_BANDS]; 988 struct ieee80211_supported_band bands[IEEE80211_NUM_BANDS];
@@ -1214,9 +1214,9 @@ struct iwl4965_priv {
1214#endif 1214#endif
1215 struct work_struct statistics_work; 1215 struct work_struct statistics_work;
1216 struct timer_list statistics_periodic; 1216 struct timer_list statistics_periodic;
1217}; /*iwl4965_priv */ 1217}; /*iwl_priv */
1218 1218
1219static inline int iwl4965_is_associated(struct iwl4965_priv *priv) 1219static inline int iwl4965_is_associated(struct iwl_priv *priv)
1220{ 1220{
1221 return (priv->active_rxon.filter_flags & RXON_FILTER_ASSOC_MSK) ? 1 : 0; 1221 return (priv->active_rxon.filter_flags & RXON_FILTER_ASSOC_MSK) ? 1 : 0;
1222} 1222}
@@ -1259,9 +1259,9 @@ static inline int is_channel_ibss(const struct iwl4965_channel_info *ch)
1259} 1259}
1260 1260
1261extern const struct iwl4965_channel_info *iwl4965_get_channel_info( 1261extern const struct iwl4965_channel_info *iwl4965_get_channel_info(
1262 const struct iwl4965_priv *priv, enum ieee80211_band band, u16 channel); 1262 const struct iwl_priv *priv, enum ieee80211_band band, u16 channel);
1263 1263
1264/* Requires full declaration of iwl4965_priv before including */ 1264/* Requires full declaration of iwl_priv before including */
1265#include "iwl-4965-io.h" 1265#include "iwl-4965-io.h"
1266 1266
1267#endif /* __iwl4965_4965_h__ */ 1267#endif /* __iwl4965_4965_h__ */
diff --git a/drivers/net/wireless/iwlwifi/iwl-eeprom.c b/drivers/net/wireless/iwlwifi/iwl-eeprom.c
index 4fd1b362d2ed..ccacd489ae80 100644
--- a/drivers/net/wireless/iwlwifi/iwl-eeprom.c
+++ b/drivers/net/wireless/iwlwifi/iwl-eeprom.c
@@ -81,7 +81,7 @@
81 * 81 *
82******************************************************************************/ 82******************************************************************************/
83 83
84int iwlcore_eeprom_verify_signature(struct iwl4965_priv *priv) 84int iwlcore_eeprom_verify_signature(struct iwl_priv *priv)
85{ 85{
86 u32 gp = iwl4965_read32(priv, CSR_EEPROM_GP); 86 u32 gp = iwl4965_read32(priv, CSR_EEPROM_GP);
87 if ((gp & CSR_EEPROM_GP_VALID_MSK) == CSR_EEPROM_GP_BAD_SIGNATURE) { 87 if ((gp & CSR_EEPROM_GP_VALID_MSK) == CSR_EEPROM_GP_BAD_SIGNATURE) {
@@ -98,7 +98,7 @@ EXPORT_SYMBOL(iwlcore_eeprom_verify_signature);
98 * EEPROM chip, not a single event, so even reads could conflict if they 98 * EEPROM chip, not a single event, so even reads could conflict if they
99 * weren't arbitrated by the semaphore. 99 * weren't arbitrated by the semaphore.
100 */ 100 */
101int iwlcore_eeprom_acquire_semaphore(struct iwl4965_priv *priv) 101int iwlcore_eeprom_acquire_semaphore(struct iwl_priv *priv)
102{ 102{
103 u16 count; 103 u16 count;
104 int ret; 104 int ret;
@@ -124,7 +124,7 @@ int iwlcore_eeprom_acquire_semaphore(struct iwl4965_priv *priv)
124} 124}
125EXPORT_SYMBOL(iwlcore_eeprom_acquire_semaphore); 125EXPORT_SYMBOL(iwlcore_eeprom_acquire_semaphore);
126 126
127void iwlcore_eeprom_release_semaphore(struct iwl4965_priv *priv) 127void iwlcore_eeprom_release_semaphore(struct iwl_priv *priv)
128{ 128{
129 iwl4965_clear_bit(priv, CSR_HW_IF_CONFIG_REG, 129 iwl4965_clear_bit(priv, CSR_HW_IF_CONFIG_REG,
130 CSR_HW_IF_CONFIG_REG_BIT_EEPROM_OWN_SEM); 130 CSR_HW_IF_CONFIG_REG_BIT_EEPROM_OWN_SEM);
@@ -140,7 +140,7 @@ EXPORT_SYMBOL(iwlcore_eeprom_release_semaphore);
140 * 140 *
141 * NOTE: This routine uses the non-debug IO access functions. 141 * NOTE: This routine uses the non-debug IO access functions.
142 */ 142 */
143int iwl_eeprom_init(struct iwl4965_priv *priv) 143int iwl_eeprom_init(struct iwl_priv *priv)
144{ 144{
145 u16 *e = (u16 *)&priv->eeprom; 145 u16 *e = (u16 *)&priv->eeprom;
146 u32 gp = iwl4965_read32(priv, CSR_EEPROM_GP); 146 u32 gp = iwl4965_read32(priv, CSR_EEPROM_GP);
@@ -197,7 +197,7 @@ done:
197EXPORT_SYMBOL(iwl_eeprom_init); 197EXPORT_SYMBOL(iwl_eeprom_init);
198 198
199 199
200void iwl_eeprom_get_mac(const struct iwl4965_priv *priv, u8 *mac) 200void iwl_eeprom_get_mac(const struct iwl_priv *priv, u8 *mac)
201{ 201{
202 memcpy(mac, priv->eeprom.mac_address, 6); 202 memcpy(mac, priv->eeprom.mac_address, 6);
203} 203}
diff --git a/drivers/net/wireless/iwlwifi/iwl-eeprom.h b/drivers/net/wireless/iwlwifi/iwl-eeprom.h
index 7827566dcc8b..ad486fe7a96c 100644
--- a/drivers/net/wireless/iwlwifi/iwl-eeprom.h
+++ b/drivers/net/wireless/iwlwifi/iwl-eeprom.h
@@ -63,7 +63,7 @@
63#ifndef __iwl_eeprom_h__ 63#ifndef __iwl_eeprom_h__
64#define __iwl_eeprom_h__ 64#define __iwl_eeprom_h__
65 65
66struct iwl4965_priv; 66struct iwl_priv;
67 67
68/* 68/*
69 * EEPROM access time values: 69 * EEPROM access time values:
@@ -383,17 +383,17 @@ struct iwl4965_eeprom {
383/* End of EEPROM */ 383/* End of EEPROM */
384 384
385struct iwl_eeprom_ops { 385struct iwl_eeprom_ops {
386 int (*verify_signature) (struct iwl4965_priv *priv); 386 int (*verify_signature) (struct iwl_priv *priv);
387 int (*acquire_semaphore) (struct iwl4965_priv *priv); 387 int (*acquire_semaphore) (struct iwl_priv *priv);
388 void (*release_semaphore) (struct iwl4965_priv *priv); 388 void (*release_semaphore) (struct iwl_priv *priv);
389}; 389};
390 390
391 391
392void iwl_eeprom_get_mac(const struct iwl4965_priv *priv, u8 *mac); 392void iwl_eeprom_get_mac(const struct iwl_priv *priv, u8 *mac);
393int iwl_eeprom_init(struct iwl4965_priv *priv); 393int iwl_eeprom_init(struct iwl_priv *priv);
394 394
395int iwlcore_eeprom_verify_signature(struct iwl4965_priv *priv); 395int iwlcore_eeprom_verify_signature(struct iwl_priv *priv);
396int iwlcore_eeprom_acquire_semaphore(struct iwl4965_priv *priv); 396int iwlcore_eeprom_acquire_semaphore(struct iwl_priv *priv);
397void iwlcore_eeprom_release_semaphore(struct iwl4965_priv *priv); 397void iwlcore_eeprom_release_semaphore(struct iwl_priv *priv);
398 398
399#endif /* __iwl_eeprom_h__ */ 399#endif /* __iwl_eeprom_h__ */
diff --git a/drivers/net/wireless/iwlwifi/iwl4965-base.c b/drivers/net/wireless/iwlwifi/iwl4965-base.c
index e05bc902ee6e..4e899ce81b32 100644
--- a/drivers/net/wireless/iwlwifi/iwl4965-base.c
+++ b/drivers/net/wireless/iwlwifi/iwl4965-base.c
@@ -50,7 +50,7 @@
50#include "iwl-4965.h" 50#include "iwl-4965.h"
51#include "iwl-helpers.h" 51#include "iwl-helpers.h"
52 52
53static int iwl4965_tx_queue_update_write_ptr(struct iwl4965_priv *priv, 53static int iwl4965_tx_queue_update_write_ptr(struct iwl_priv *priv,
54 struct iwl4965_tx_queue *txq); 54 struct iwl4965_tx_queue *txq);
55 55
56/****************************************************************************** 56/******************************************************************************
@@ -107,7 +107,7 @@ __le16 *ieee80211_get_qos_ctrl(struct ieee80211_hdr *hdr)
107} 107}
108 108
109static const struct ieee80211_supported_band *iwl4965_get_hw_mode( 109static const struct ieee80211_supported_band *iwl4965_get_hw_mode(
110 struct iwl4965_priv *priv, enum ieee80211_band band) 110 struct iwl_priv *priv, enum ieee80211_band band)
111{ 111{
112 return priv->hw->wiphy->bands[band]; 112 return priv->hw->wiphy->bands[band];
113} 113}
@@ -216,7 +216,7 @@ static inline u8 get_cmd_index(struct iwl4965_queue *q, u32 index, int is_huge)
216/** 216/**
217 * iwl4965_queue_init - Initialize queue's high/low-water and read/write indexes 217 * iwl4965_queue_init - Initialize queue's high/low-water and read/write indexes
218 */ 218 */
219static int iwl4965_queue_init(struct iwl4965_priv *priv, struct iwl4965_queue *q, 219static int iwl4965_queue_init(struct iwl_priv *priv, struct iwl4965_queue *q,
220 int count, int slots_num, u32 id) 220 int count, int slots_num, u32 id)
221{ 221{
222 q->n_bd = count; 222 q->n_bd = count;
@@ -247,7 +247,7 @@ static int iwl4965_queue_init(struct iwl4965_priv *priv, struct iwl4965_queue *q
247/** 247/**
248 * iwl4965_tx_queue_alloc - Alloc driver data and TFD CB for one Tx/cmd queue 248 * iwl4965_tx_queue_alloc - Alloc driver data and TFD CB for one Tx/cmd queue
249 */ 249 */
250static int iwl4965_tx_queue_alloc(struct iwl4965_priv *priv, 250static int iwl4965_tx_queue_alloc(struct iwl_priv *priv,
251 struct iwl4965_tx_queue *txq, u32 id) 251 struct iwl4965_tx_queue *txq, u32 id)
252{ 252{
253 struct pci_dev *dev = priv->pci_dev; 253 struct pci_dev *dev = priv->pci_dev;
@@ -292,7 +292,7 @@ static int iwl4965_tx_queue_alloc(struct iwl4965_priv *priv,
292/** 292/**
293 * iwl4965_tx_queue_init - Allocate and initialize one tx/cmd queue 293 * iwl4965_tx_queue_init - Allocate and initialize one tx/cmd queue
294 */ 294 */
295int iwl4965_tx_queue_init(struct iwl4965_priv *priv, 295int iwl4965_tx_queue_init(struct iwl_priv *priv,
296 struct iwl4965_tx_queue *txq, int slots_num, u32 txq_id) 296 struct iwl4965_tx_queue *txq, int slots_num, u32 txq_id)
297{ 297{
298 struct pci_dev *dev = priv->pci_dev; 298 struct pci_dev *dev = priv->pci_dev;
@@ -344,7 +344,7 @@ int iwl4965_tx_queue_init(struct iwl4965_priv *priv,
344 * Free all buffers. 344 * Free all buffers.
345 * 0-fill, but do not free "txq" descriptor structure. 345 * 0-fill, but do not free "txq" descriptor structure.
346 */ 346 */
347void iwl4965_tx_queue_free(struct iwl4965_priv *priv, struct iwl4965_tx_queue *txq) 347void iwl4965_tx_queue_free(struct iwl_priv *priv, struct iwl4965_tx_queue *txq)
348{ 348{
349 struct iwl4965_queue *q = &txq->q; 349 struct iwl4965_queue *q = &txq->q;
350 struct pci_dev *dev = priv->pci_dev; 350 struct pci_dev *dev = priv->pci_dev;
@@ -395,7 +395,7 @@ const u8 iwl4965_broadcast_addr[ETH_ALEN] = { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF
395 * 395 *
396 * NOTE: This does not remove station from device's station table. 396 * NOTE: This does not remove station from device's station table.
397 */ 397 */
398static u8 iwl4965_remove_station(struct iwl4965_priv *priv, const u8 *addr, int is_ap) 398static u8 iwl4965_remove_station(struct iwl_priv *priv, const u8 *addr, int is_ap)
399{ 399{
400 int index = IWL_INVALID_STATION; 400 int index = IWL_INVALID_STATION;
401 int i; 401 int i;
@@ -437,7 +437,7 @@ out:
437 * 437 *
438 * NOTE: This does not clear or otherwise alter the device's station table. 438 * NOTE: This does not clear or otherwise alter the device's station table.
439 */ 439 */
440static void iwl4965_clear_stations_table(struct iwl4965_priv *priv) 440static void iwl4965_clear_stations_table(struct iwl_priv *priv)
441{ 441{
442 unsigned long flags; 442 unsigned long flags;
443 443
@@ -452,7 +452,7 @@ static void iwl4965_clear_stations_table(struct iwl4965_priv *priv)
452/** 452/**
453 * iwl4965_add_station_flags - Add station to tables in driver and device 453 * iwl4965_add_station_flags - Add station to tables in driver and device
454 */ 454 */
455u8 iwl4965_add_station_flags(struct iwl4965_priv *priv, const u8 *addr, 455u8 iwl4965_add_station_flags(struct iwl_priv *priv, const u8 *addr,
456 int is_ap, u8 flags, void *ht_data) 456 int is_ap, u8 flags, void *ht_data)
457{ 457{
458 int i; 458 int i;
@@ -524,7 +524,7 @@ u8 iwl4965_add_station_flags(struct iwl4965_priv *priv, const u8 *addr,
524 524
525/*************** DRIVER STATUS FUNCTIONS *****/ 525/*************** DRIVER STATUS FUNCTIONS *****/
526 526
527static inline int iwl4965_is_ready(struct iwl4965_priv *priv) 527static inline int iwl4965_is_ready(struct iwl_priv *priv)
528{ 528{
529 /* The adapter is 'ready' if READY and GEO_CONFIGURED bits are 529 /* The adapter is 'ready' if READY and GEO_CONFIGURED bits are
530 * set but EXIT_PENDING is not */ 530 * set but EXIT_PENDING is not */
@@ -533,23 +533,23 @@ static inline int iwl4965_is_ready(struct iwl4965_priv *priv)
533 !test_bit(STATUS_EXIT_PENDING, &priv->status); 533 !test_bit(STATUS_EXIT_PENDING, &priv->status);
534} 534}
535 535
536static inline int iwl4965_is_alive(struct iwl4965_priv *priv) 536static inline int iwl4965_is_alive(struct iwl_priv *priv)
537{ 537{
538 return test_bit(STATUS_ALIVE, &priv->status); 538 return test_bit(STATUS_ALIVE, &priv->status);
539} 539}
540 540
541static inline int iwl4965_is_init(struct iwl4965_priv *priv) 541static inline int iwl4965_is_init(struct iwl_priv *priv)
542{ 542{
543 return test_bit(STATUS_INIT, &priv->status); 543 return test_bit(STATUS_INIT, &priv->status);
544} 544}
545 545
546static inline int iwl4965_is_rfkill(struct iwl4965_priv *priv) 546static inline int iwl4965_is_rfkill(struct iwl_priv *priv)
547{ 547{
548 return test_bit(STATUS_RF_KILL_HW, &priv->status) || 548 return test_bit(STATUS_RF_KILL_HW, &priv->status) ||
549 test_bit(STATUS_RF_KILL_SW, &priv->status); 549 test_bit(STATUS_RF_KILL_SW, &priv->status);
550} 550}
551 551
552static inline int iwl4965_is_ready_rf(struct iwl4965_priv *priv) 552static inline int iwl4965_is_ready_rf(struct iwl_priv *priv)
553{ 553{
554 554
555 if (iwl4965_is_rfkill(priv)) 555 if (iwl4965_is_rfkill(priv))
@@ -628,7 +628,7 @@ static const char *get_cmd_string(u8 cmd)
628 * failed. On success, it turns the index (> 0) of command in the 628 * failed. On success, it turns the index (> 0) of command in the
629 * command queue. 629 * command queue.
630 */ 630 */
631static int iwl4965_enqueue_hcmd(struct iwl4965_priv *priv, struct iwl4965_host_cmd *cmd) 631static int iwl4965_enqueue_hcmd(struct iwl_priv *priv, struct iwl4965_host_cmd *cmd)
632{ 632{
633 struct iwl4965_tx_queue *txq = &priv->txq[IWL_CMD_QUEUE_NUM]; 633 struct iwl4965_tx_queue *txq = &priv->txq[IWL_CMD_QUEUE_NUM];
634 struct iwl4965_queue *q = &txq->q; 634 struct iwl4965_queue *q = &txq->q;
@@ -703,7 +703,7 @@ static int iwl4965_enqueue_hcmd(struct iwl4965_priv *priv, struct iwl4965_host_c
703 return ret ? ret : idx; 703 return ret ? ret : idx;
704} 704}
705 705
706static int iwl4965_send_cmd_async(struct iwl4965_priv *priv, struct iwl4965_host_cmd *cmd) 706static int iwl4965_send_cmd_async(struct iwl_priv *priv, struct iwl4965_host_cmd *cmd)
707{ 707{
708 int ret; 708 int ret;
709 709
@@ -727,7 +727,7 @@ static int iwl4965_send_cmd_async(struct iwl4965_priv *priv, struct iwl4965_host
727 return 0; 727 return 0;
728} 728}
729 729
730static int iwl4965_send_cmd_sync(struct iwl4965_priv *priv, struct iwl4965_host_cmd *cmd) 730static int iwl4965_send_cmd_sync(struct iwl_priv *priv, struct iwl4965_host_cmd *cmd)
731{ 731{
732 int cmd_idx; 732 int cmd_idx;
733 int ret; 733 int ret;
@@ -815,7 +815,7 @@ out:
815 return ret; 815 return ret;
816} 816}
817 817
818int iwl4965_send_cmd(struct iwl4965_priv *priv, struct iwl4965_host_cmd *cmd) 818int iwl4965_send_cmd(struct iwl_priv *priv, struct iwl4965_host_cmd *cmd)
819{ 819{
820 if (cmd->meta.flags & CMD_ASYNC) 820 if (cmd->meta.flags & CMD_ASYNC)
821 return iwl4965_send_cmd_async(priv, cmd); 821 return iwl4965_send_cmd_async(priv, cmd);
@@ -823,7 +823,7 @@ int iwl4965_send_cmd(struct iwl4965_priv *priv, struct iwl4965_host_cmd *cmd)
823 return iwl4965_send_cmd_sync(priv, cmd); 823 return iwl4965_send_cmd_sync(priv, cmd);
824} 824}
825 825
826int iwl4965_send_cmd_pdu(struct iwl4965_priv *priv, u8 id, u16 len, const void *data) 826int iwl4965_send_cmd_pdu(struct iwl_priv *priv, u8 id, u16 len, const void *data)
827{ 827{
828 struct iwl4965_host_cmd cmd = { 828 struct iwl4965_host_cmd cmd = {
829 .id = id, 829 .id = id,
@@ -834,7 +834,7 @@ int iwl4965_send_cmd_pdu(struct iwl4965_priv *priv, u8 id, u16 len, const void *
834 return iwl4965_send_cmd_sync(priv, &cmd); 834 return iwl4965_send_cmd_sync(priv, &cmd);
835} 835}
836 836
837static int __must_check iwl4965_send_cmd_u32(struct iwl4965_priv *priv, u8 id, u32 val) 837static int __must_check iwl4965_send_cmd_u32(struct iwl_priv *priv, u8 id, u32 val)
838{ 838{
839 struct iwl4965_host_cmd cmd = { 839 struct iwl4965_host_cmd cmd = {
840 .id = id, 840 .id = id,
@@ -845,7 +845,7 @@ static int __must_check iwl4965_send_cmd_u32(struct iwl4965_priv *priv, u8 id, u
845 return iwl4965_send_cmd_sync(priv, &cmd); 845 return iwl4965_send_cmd_sync(priv, &cmd);
846} 846}
847 847
848int iwl4965_send_statistics_request(struct iwl4965_priv *priv) 848int iwl4965_send_statistics_request(struct iwl_priv *priv)
849{ 849{
850 return iwl4965_send_cmd_u32(priv, REPLY_STATISTICS_CMD, 0); 850 return iwl4965_send_cmd_u32(priv, REPLY_STATISTICS_CMD, 0);
851} 851}
@@ -856,7 +856,7 @@ int iwl4965_send_statistics_request(struct iwl4965_priv *priv)
856 * there is only one AP station with id= IWL_AP_ID 856 * there is only one AP station with id= IWL_AP_ID
857 * NOTE: mutex must be held before calling this fnction 857 * NOTE: mutex must be held before calling this fnction
858 */ 858 */
859static int iwl4965_rxon_add_station(struct iwl4965_priv *priv, 859static int iwl4965_rxon_add_station(struct iwl_priv *priv,
860 const u8 *addr, int is_ap) 860 const u8 *addr, int is_ap)
861{ 861{
862 u8 sta_id; 862 u8 sta_id;
@@ -892,7 +892,7 @@ static int iwl4965_rxon_add_station(struct iwl4965_priv *priv,
892 * NOTE: Does not commit to the hardware; it sets appropriate bit fields 892 * NOTE: Does not commit to the hardware; it sets appropriate bit fields
893 * in the staging RXON flag structure based on the phymode 893 * in the staging RXON flag structure based on the phymode
894 */ 894 */
895static int iwl4965_set_rxon_channel(struct iwl4965_priv *priv, 895static int iwl4965_set_rxon_channel(struct iwl_priv *priv,
896 enum ieee80211_band band, 896 enum ieee80211_band band,
897 u16 channel) 897 u16 channel)
898{ 898{
@@ -1000,7 +1000,7 @@ static int iwl4965_check_rxon_cmd(struct iwl4965_rxon_cmd *rxon)
1000 * or is clearing the RXON_FILTER_ASSOC_MSK, then return 1 to indicate that 1000 * or is clearing the RXON_FILTER_ASSOC_MSK, then return 1 to indicate that
1001 * a new tune (full RXON command, rather than RXON_ASSOC cmd) is required. 1001 * a new tune (full RXON command, rather than RXON_ASSOC cmd) is required.
1002 */ 1002 */
1003static int iwl4965_full_rxon_required(struct iwl4965_priv *priv) 1003static int iwl4965_full_rxon_required(struct iwl_priv *priv)
1004{ 1004{
1005 1005
1006 /* These items are only settable from the full RXON command */ 1006 /* These items are only settable from the full RXON command */
@@ -1040,7 +1040,7 @@ static int iwl4965_full_rxon_required(struct iwl4965_priv *priv)
1040 return 0; 1040 return 0;
1041} 1041}
1042 1042
1043static int iwl4965_send_rxon_assoc(struct iwl4965_priv *priv) 1043static int iwl4965_send_rxon_assoc(struct iwl_priv *priv)
1044{ 1044{
1045 int rc = 0; 1045 int rc = 0;
1046 struct iwl4965_rx_packet *res = NULL; 1046 struct iwl4965_rx_packet *res = NULL;
@@ -1102,7 +1102,7 @@ static int iwl4965_send_rxon_assoc(struct iwl4965_priv *priv)
1102 * function correctly transitions out of the RXON_ASSOC_MSK state if 1102 * function correctly transitions out of the RXON_ASSOC_MSK state if
1103 * a HW tune is required based on the RXON structure changes. 1103 * a HW tune is required based on the RXON structure changes.
1104 */ 1104 */
1105static int iwl4965_commit_rxon(struct iwl4965_priv *priv) 1105static int iwl4965_commit_rxon(struct iwl_priv *priv)
1106{ 1106{
1107 /* cast away the const for active_rxon in this function */ 1107 /* cast away the const for active_rxon in this function */
1108 struct iwl4965_rxon_cmd *active_rxon = (void *)&priv->active_rxon; 1108 struct iwl4965_rxon_cmd *active_rxon = (void *)&priv->active_rxon;
@@ -1230,7 +1230,7 @@ static int iwl4965_commit_rxon(struct iwl4965_priv *priv)
1230 return 0; 1230 return 0;
1231} 1231}
1232 1232
1233static int iwl4965_send_bt_config(struct iwl4965_priv *priv) 1233static int iwl4965_send_bt_config(struct iwl_priv *priv)
1234{ 1234{
1235 struct iwl4965_bt_cmd bt_cmd = { 1235 struct iwl4965_bt_cmd bt_cmd = {
1236 .flags = 3, 1236 .flags = 3,
@@ -1244,7 +1244,7 @@ static int iwl4965_send_bt_config(struct iwl4965_priv *priv)
1244 sizeof(struct iwl4965_bt_cmd), &bt_cmd); 1244 sizeof(struct iwl4965_bt_cmd), &bt_cmd);
1245} 1245}
1246 1246
1247static int iwl4965_send_scan_abort(struct iwl4965_priv *priv) 1247static int iwl4965_send_scan_abort(struct iwl_priv *priv)
1248{ 1248{
1249 int rc = 0; 1249 int rc = 0;
1250 struct iwl4965_rx_packet *res; 1250 struct iwl4965_rx_packet *res;
@@ -1285,7 +1285,7 @@ static int iwl4965_send_scan_abort(struct iwl4965_priv *priv)
1285 return rc; 1285 return rc;
1286} 1286}
1287 1287
1288static int iwl4965_card_state_sync_callback(struct iwl4965_priv *priv, 1288static int iwl4965_card_state_sync_callback(struct iwl_priv *priv,
1289 struct iwl4965_cmd *cmd, 1289 struct iwl4965_cmd *cmd,
1290 struct sk_buff *skb) 1290 struct sk_buff *skb)
1291{ 1291{
@@ -1302,7 +1302,7 @@ static int iwl4965_card_state_sync_callback(struct iwl4965_priv *priv,
1302 * When in the 'halt' state, the card is shut down and must be fully 1302 * When in the 'halt' state, the card is shut down and must be fully
1303 * restarted to come back on. 1303 * restarted to come back on.
1304 */ 1304 */
1305static int iwl4965_send_card_state(struct iwl4965_priv *priv, u32 flags, u8 meta_flag) 1305static int iwl4965_send_card_state(struct iwl_priv *priv, u32 flags, u8 meta_flag)
1306{ 1306{
1307 struct iwl4965_host_cmd cmd = { 1307 struct iwl4965_host_cmd cmd = {
1308 .id = REPLY_CARD_STATE_CMD, 1308 .id = REPLY_CARD_STATE_CMD,
@@ -1317,7 +1317,7 @@ static int iwl4965_send_card_state(struct iwl4965_priv *priv, u32 flags, u8 meta
1317 return iwl4965_send_cmd(priv, &cmd); 1317 return iwl4965_send_cmd(priv, &cmd);
1318} 1318}
1319 1319
1320static int iwl4965_add_sta_sync_callback(struct iwl4965_priv *priv, 1320static int iwl4965_add_sta_sync_callback(struct iwl_priv *priv,
1321 struct iwl4965_cmd *cmd, struct sk_buff *skb) 1321 struct iwl4965_cmd *cmd, struct sk_buff *skb)
1322{ 1322{
1323 struct iwl4965_rx_packet *res = NULL; 1323 struct iwl4965_rx_packet *res = NULL;
@@ -1345,7 +1345,7 @@ static int iwl4965_add_sta_sync_callback(struct iwl4965_priv *priv,
1345 return 1; 1345 return 1;
1346} 1346}
1347 1347
1348int iwl4965_send_add_station(struct iwl4965_priv *priv, 1348int iwl4965_send_add_station(struct iwl_priv *priv,
1349 struct iwl4965_addsta_cmd *sta, u8 flags) 1349 struct iwl4965_addsta_cmd *sta, u8 flags)
1350{ 1350{
1351 struct iwl4965_rx_packet *res = NULL; 1351 struct iwl4965_rx_packet *res = NULL;
@@ -1392,7 +1392,7 @@ int iwl4965_send_add_station(struct iwl4965_priv *priv,
1392 return rc; 1392 return rc;
1393} 1393}
1394 1394
1395static int iwl4965_update_sta_key_info(struct iwl4965_priv *priv, 1395static int iwl4965_update_sta_key_info(struct iwl_priv *priv,
1396 struct ieee80211_key_conf *keyconf, 1396 struct ieee80211_key_conf *keyconf,
1397 u8 sta_id) 1397 u8 sta_id)
1398{ 1398{
@@ -1430,7 +1430,7 @@ static int iwl4965_update_sta_key_info(struct iwl4965_priv *priv,
1430 return 0; 1430 return 0;
1431} 1431}
1432 1432
1433static int iwl4965_clear_sta_key_info(struct iwl4965_priv *priv, u8 sta_id) 1433static int iwl4965_clear_sta_key_info(struct iwl_priv *priv, u8 sta_id)
1434{ 1434{
1435 unsigned long flags; 1435 unsigned long flags;
1436 1436
@@ -1447,7 +1447,7 @@ static int iwl4965_clear_sta_key_info(struct iwl4965_priv *priv, u8 sta_id)
1447 return 0; 1447 return 0;
1448} 1448}
1449 1449
1450static void iwl4965_clear_free_frames(struct iwl4965_priv *priv) 1450static void iwl4965_clear_free_frames(struct iwl_priv *priv)
1451{ 1451{
1452 struct list_head *element; 1452 struct list_head *element;
1453 1453
@@ -1468,7 +1468,7 @@ static void iwl4965_clear_free_frames(struct iwl4965_priv *priv)
1468 } 1468 }
1469} 1469}
1470 1470
1471static struct iwl4965_frame *iwl4965_get_free_frame(struct iwl4965_priv *priv) 1471static struct iwl4965_frame *iwl4965_get_free_frame(struct iwl_priv *priv)
1472{ 1472{
1473 struct iwl4965_frame *frame; 1473 struct iwl4965_frame *frame;
1474 struct list_head *element; 1474 struct list_head *element;
@@ -1488,13 +1488,13 @@ static struct iwl4965_frame *iwl4965_get_free_frame(struct iwl4965_priv *priv)
1488 return list_entry(element, struct iwl4965_frame, list); 1488 return list_entry(element, struct iwl4965_frame, list);
1489} 1489}
1490 1490
1491static void iwl4965_free_frame(struct iwl4965_priv *priv, struct iwl4965_frame *frame) 1491static void iwl4965_free_frame(struct iwl_priv *priv, struct iwl4965_frame *frame)
1492{ 1492{
1493 memset(frame, 0, sizeof(*frame)); 1493 memset(frame, 0, sizeof(*frame));
1494 list_add(&frame->list, &priv->free_frames); 1494 list_add(&frame->list, &priv->free_frames);
1495} 1495}
1496 1496
1497unsigned int iwl4965_fill_beacon_frame(struct iwl4965_priv *priv, 1497unsigned int iwl4965_fill_beacon_frame(struct iwl_priv *priv,
1498 struct ieee80211_hdr *hdr, 1498 struct ieee80211_hdr *hdr,
1499 const u8 *dest, int left) 1499 const u8 *dest, int left)
1500{ 1500{
@@ -1525,7 +1525,7 @@ static u8 iwl4965_rate_get_lowest_plcp(int rate_mask)
1525 return IWL_RATE_INVALID; 1525 return IWL_RATE_INVALID;
1526} 1526}
1527 1527
1528static int iwl4965_send_beacon_cmd(struct iwl4965_priv *priv) 1528static int iwl4965_send_beacon_cmd(struct iwl_priv *priv)
1529{ 1529{
1530 struct iwl4965_frame *frame; 1530 struct iwl4965_frame *frame;
1531 unsigned int frame_size; 1531 unsigned int frame_size;
@@ -1567,7 +1567,7 @@ static int iwl4965_send_beacon_cmd(struct iwl4965_priv *priv)
1567 * 1567 *
1568 ******************************************************************************/ 1568 ******************************************************************************/
1569 1569
1570static void iwl4965_unset_hw_setting(struct iwl4965_priv *priv) 1570static void iwl4965_unset_hw_setting(struct iwl_priv *priv)
1571{ 1571{
1572 if (priv->hw_setting.shared_virt) 1572 if (priv->hw_setting.shared_virt)
1573 pci_free_consistent(priv->pci_dev, 1573 pci_free_consistent(priv->pci_dev,
@@ -1608,7 +1608,7 @@ static u16 iwl4965_supported_rate_to_ie(u8 *ie, u16 supported_rate,
1608/** 1608/**
1609 * iwl4965_fill_probe_req - fill in all required fields and IE for probe request 1609 * iwl4965_fill_probe_req - fill in all required fields and IE for probe request
1610 */ 1610 */
1611static u16 iwl4965_fill_probe_req(struct iwl4965_priv *priv, 1611static u16 iwl4965_fill_probe_req(struct iwl_priv *priv,
1612 enum ieee80211_band band, 1612 enum ieee80211_band band,
1613 struct ieee80211_mgmt *frame, 1613 struct ieee80211_mgmt *frame,
1614 int left, int is_direct) 1614 int left, int is_direct)
@@ -1726,7 +1726,7 @@ static u16 iwl4965_fill_probe_req(struct iwl4965_priv *priv,
1726/* 1726/*
1727 * QoS support 1727 * QoS support
1728*/ 1728*/
1729static int iwl4965_send_qos_params_command(struct iwl4965_priv *priv, 1729static int iwl4965_send_qos_params_command(struct iwl_priv *priv,
1730 struct iwl4965_qosparam_cmd *qos) 1730 struct iwl4965_qosparam_cmd *qos)
1731{ 1731{
1732 1732
@@ -1734,7 +1734,7 @@ static int iwl4965_send_qos_params_command(struct iwl4965_priv *priv,
1734 sizeof(struct iwl4965_qosparam_cmd), qos); 1734 sizeof(struct iwl4965_qosparam_cmd), qos);
1735} 1735}
1736 1736
1737static void iwl4965_reset_qos(struct iwl4965_priv *priv) 1737static void iwl4965_reset_qos(struct iwl_priv *priv)
1738{ 1738{
1739 u16 cw_min = 15; 1739 u16 cw_min = 15;
1740 u16 cw_max = 1023; 1740 u16 cw_max = 1023;
@@ -1821,7 +1821,7 @@ static void iwl4965_reset_qos(struct iwl4965_priv *priv)
1821 spin_unlock_irqrestore(&priv->lock, flags); 1821 spin_unlock_irqrestore(&priv->lock, flags);
1822} 1822}
1823 1823
1824static void iwl4965_activate_qos(struct iwl4965_priv *priv, u8 force) 1824static void iwl4965_activate_qos(struct iwl_priv *priv, u8 force)
1825{ 1825{
1826 unsigned long flags; 1826 unsigned long flags;
1827 1827
@@ -1899,7 +1899,7 @@ static struct iwl4965_power_vec_entry range_1[IWL_POWER_AC] = {
1899 SLP_VEC(4, 7, 10, 10, 0xFF)}, 0} 1899 SLP_VEC(4, 7, 10, 10, 0xFF)}, 0}
1900}; 1900};
1901 1901
1902int iwl4965_power_init_handle(struct iwl4965_priv *priv) 1902int iwl4965_power_init_handle(struct iwl_priv *priv)
1903{ 1903{
1904 int rc = 0, i; 1904 int rc = 0, i;
1905 struct iwl4965_power_mgr *pow_data; 1905 struct iwl4965_power_mgr *pow_data;
@@ -1938,7 +1938,7 @@ int iwl4965_power_init_handle(struct iwl4965_priv *priv)
1938 return rc; 1938 return rc;
1939} 1939}
1940 1940
1941static int iwl4965_update_power_cmd(struct iwl4965_priv *priv, 1941static int iwl4965_update_power_cmd(struct iwl_priv *priv,
1942 struct iwl4965_powertable_cmd *cmd, u32 mode) 1942 struct iwl4965_powertable_cmd *cmd, u32 mode)
1943{ 1943{
1944 int rc = 0, i; 1944 int rc = 0, i;
@@ -2002,7 +2002,7 @@ static int iwl4965_update_power_cmd(struct iwl4965_priv *priv,
2002 return rc; 2002 return rc;
2003} 2003}
2004 2004
2005static int iwl4965_send_power_mode(struct iwl4965_priv *priv, u32 mode) 2005static int iwl4965_send_power_mode(struct iwl_priv *priv, u32 mode)
2006{ 2006{
2007 u32 uninitialized_var(final_mode); 2007 u32 uninitialized_var(final_mode);
2008 int rc; 2008 int rc;
@@ -2037,7 +2037,7 @@ static int iwl4965_send_power_mode(struct iwl4965_priv *priv, u32 mode)
2037 return rc; 2037 return rc;
2038} 2038}
2039 2039
2040int iwl4965_is_network_packet(struct iwl4965_priv *priv, struct ieee80211_hdr *header) 2040int iwl4965_is_network_packet(struct iwl_priv *priv, struct ieee80211_hdr *header)
2041{ 2041{
2042 /* Filter incoming packets to determine if they are targeted toward 2042 /* Filter incoming packets to determine if they are targeted toward
2043 * this network, discarding packets coming from ourselves */ 2043 * this network, discarding packets coming from ourselves */
@@ -2098,7 +2098,7 @@ static const char *iwl4965_get_tx_fail_reason(u32 status)
2098 * 2098 *
2099 * NOTE: priv->mutex is not required before calling this function 2099 * NOTE: priv->mutex is not required before calling this function
2100 */ 2100 */
2101static int iwl4965_scan_cancel(struct iwl4965_priv *priv) 2101static int iwl4965_scan_cancel(struct iwl_priv *priv)
2102{ 2102{
2103 if (!test_bit(STATUS_SCAN_HW, &priv->status)) { 2103 if (!test_bit(STATUS_SCAN_HW, &priv->status)) {
2104 clear_bit(STATUS_SCANNING, &priv->status); 2104 clear_bit(STATUS_SCANNING, &priv->status);
@@ -2126,7 +2126,7 @@ static int iwl4965_scan_cancel(struct iwl4965_priv *priv)
2126 * 2126 *
2127 * NOTE: priv->mutex must be held before calling this function 2127 * NOTE: priv->mutex must be held before calling this function
2128 */ 2128 */
2129static int iwl4965_scan_cancel_timeout(struct iwl4965_priv *priv, unsigned long ms) 2129static int iwl4965_scan_cancel_timeout(struct iwl_priv *priv, unsigned long ms)
2130{ 2130{
2131 unsigned long now = jiffies; 2131 unsigned long now = jiffies;
2132 int ret; 2132 int ret;
@@ -2145,7 +2145,7 @@ static int iwl4965_scan_cancel_timeout(struct iwl4965_priv *priv, unsigned long
2145 return ret; 2145 return ret;
2146} 2146}
2147 2147
2148static void iwl4965_sequence_reset(struct iwl4965_priv *priv) 2148static void iwl4965_sequence_reset(struct iwl_priv *priv)
2149{ 2149{
2150 /* Reset ieee stats */ 2150 /* Reset ieee stats */
2151 2151
@@ -2175,7 +2175,7 @@ static __le16 iwl4965_adjust_beacon_interval(u16 beacon_val)
2175 return cpu_to_le16(new_val); 2175 return cpu_to_le16(new_val);
2176} 2176}
2177 2177
2178static void iwl4965_setup_rxon_timing(struct iwl4965_priv *priv) 2178static void iwl4965_setup_rxon_timing(struct iwl_priv *priv)
2179{ 2179{
2180 u64 interval_tm_unit; 2180 u64 interval_tm_unit;
2181 u64 tsf, result; 2181 u64 tsf, result;
@@ -2231,7 +2231,7 @@ static void iwl4965_setup_rxon_timing(struct iwl4965_priv *priv)
2231 le16_to_cpu(priv->rxon_timing.atim_window)); 2231 le16_to_cpu(priv->rxon_timing.atim_window));
2232} 2232}
2233 2233
2234static int iwl4965_scan_initiate(struct iwl4965_priv *priv) 2234static int iwl4965_scan_initiate(struct iwl_priv *priv)
2235{ 2235{
2236 if (priv->iw_mode == IEEE80211_IF_TYPE_AP) { 2236 if (priv->iw_mode == IEEE80211_IF_TYPE_AP) {
2237 IWL_ERROR("APs don't scan.\n"); 2237 IWL_ERROR("APs don't scan.\n");
@@ -2265,7 +2265,7 @@ static int iwl4965_scan_initiate(struct iwl4965_priv *priv)
2265 return 0; 2265 return 0;
2266} 2266}
2267 2267
2268static int iwl4965_set_rxon_hwcrypto(struct iwl4965_priv *priv, int hw_decrypt) 2268static int iwl4965_set_rxon_hwcrypto(struct iwl_priv *priv, int hw_decrypt)
2269{ 2269{
2270 struct iwl4965_rxon_cmd *rxon = &priv->staging_rxon; 2270 struct iwl4965_rxon_cmd *rxon = &priv->staging_rxon;
2271 2271
@@ -2277,7 +2277,7 @@ static int iwl4965_set_rxon_hwcrypto(struct iwl4965_priv *priv, int hw_decrypt)
2277 return 0; 2277 return 0;
2278} 2278}
2279 2279
2280static void iwl4965_set_flags_for_phymode(struct iwl4965_priv *priv, 2280static void iwl4965_set_flags_for_phymode(struct iwl_priv *priv,
2281 enum ieee80211_band band) 2281 enum ieee80211_band band)
2282{ 2282{
2283 if (band == IEEE80211_BAND_5GHZ) { 2283 if (band == IEEE80211_BAND_5GHZ) {
@@ -2304,7 +2304,7 @@ static void iwl4965_set_flags_for_phymode(struct iwl4965_priv *priv,
2304/* 2304/*
2305 * initialize rxon structure with default values from eeprom 2305 * initialize rxon structure with default values from eeprom
2306 */ 2306 */
2307static void iwl4965_connection_init_rx_config(struct iwl4965_priv *priv) 2307static void iwl4965_connection_init_rx_config(struct iwl_priv *priv)
2308{ 2308{
2309 const struct iwl4965_channel_info *ch_info; 2309 const struct iwl4965_channel_info *ch_info;
2310 2310
@@ -2376,7 +2376,7 @@ static void iwl4965_connection_init_rx_config(struct iwl4965_priv *priv)
2376 iwl4965_set_rxon_chain(priv); 2376 iwl4965_set_rxon_chain(priv);
2377} 2377}
2378 2378
2379static int iwl4965_set_mode(struct iwl4965_priv *priv, int mode) 2379static int iwl4965_set_mode(struct iwl_priv *priv, int mode)
2380{ 2380{
2381 if (mode == IEEE80211_IF_TYPE_IBSS) { 2381 if (mode == IEEE80211_IF_TYPE_IBSS) {
2382 const struct iwl4965_channel_info *ch_info; 2382 const struct iwl4965_channel_info *ch_info;
@@ -2415,7 +2415,7 @@ static int iwl4965_set_mode(struct iwl4965_priv *priv, int mode)
2415 return 0; 2415 return 0;
2416} 2416}
2417 2417
2418static void iwl4965_build_tx_cmd_hwcrypto(struct iwl4965_priv *priv, 2418static void iwl4965_build_tx_cmd_hwcrypto(struct iwl_priv *priv,
2419 struct ieee80211_tx_control *ctl, 2419 struct ieee80211_tx_control *ctl,
2420 struct iwl4965_cmd *cmd, 2420 struct iwl4965_cmd *cmd,
2421 struct sk_buff *skb_frag, 2421 struct sk_buff *skb_frag,
@@ -2466,7 +2466,7 @@ static void iwl4965_build_tx_cmd_hwcrypto(struct iwl4965_priv *priv,
2466/* 2466/*
2467 * handle build REPLY_TX command notification. 2467 * handle build REPLY_TX command notification.
2468 */ 2468 */
2469static void iwl4965_build_tx_cmd_basic(struct iwl4965_priv *priv, 2469static void iwl4965_build_tx_cmd_basic(struct iwl_priv *priv,
2470 struct iwl4965_cmd *cmd, 2470 struct iwl4965_cmd *cmd,
2471 struct ieee80211_tx_control *ctrl, 2471 struct ieee80211_tx_control *ctrl,
2472 struct ieee80211_hdr *hdr, 2472 struct ieee80211_hdr *hdr,
@@ -2535,7 +2535,7 @@ static void iwl4965_build_tx_cmd_basic(struct iwl4965_priv *priv,
2535 * 2535 *
2536 * If new IBSS station, create new entry in station table 2536 * If new IBSS station, create new entry in station table
2537 */ 2537 */
2538static int iwl4965_get_sta_id(struct iwl4965_priv *priv, 2538static int iwl4965_get_sta_id(struct iwl_priv *priv,
2539 struct ieee80211_hdr *hdr) 2539 struct ieee80211_hdr *hdr)
2540{ 2540{
2541 int sta_id; 2541 int sta_id;
@@ -2590,7 +2590,7 @@ static int iwl4965_get_sta_id(struct iwl4965_priv *priv,
2590/* 2590/*
2591 * start REPLY_TX command process 2591 * start REPLY_TX command process
2592 */ 2592 */
2593static int iwl4965_tx_skb(struct iwl4965_priv *priv, 2593static int iwl4965_tx_skb(struct iwl_priv *priv,
2594 struct sk_buff *skb, struct ieee80211_tx_control *ctl) 2594 struct sk_buff *skb, struct ieee80211_tx_control *ctl)
2595{ 2595{
2596 struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data; 2596 struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data;
@@ -2829,7 +2829,7 @@ drop:
2829 return -1; 2829 return -1;
2830} 2830}
2831 2831
2832static void iwl4965_set_rate(struct iwl4965_priv *priv) 2832static void iwl4965_set_rate(struct iwl_priv *priv)
2833{ 2833{
2834 const struct ieee80211_supported_band *hw = NULL; 2834 const struct ieee80211_supported_band *hw = NULL;
2835 struct ieee80211_rate *rate; 2835 struct ieee80211_rate *rate;
@@ -2876,7 +2876,7 @@ static void iwl4965_set_rate(struct iwl4965_priv *priv)
2876 (IWL_OFDM_BASIC_RATES_MASK >> IWL_FIRST_OFDM_RATE) & 0xFF; 2876 (IWL_OFDM_BASIC_RATES_MASK >> IWL_FIRST_OFDM_RATE) & 0xFF;
2877} 2877}
2878 2878
2879static void iwl4965_radio_kill_sw(struct iwl4965_priv *priv, int disable_radio) 2879static void iwl4965_radio_kill_sw(struct iwl_priv *priv, int disable_radio)
2880{ 2880{
2881 unsigned long flags; 2881 unsigned long flags;
2882 2882
@@ -2925,7 +2925,7 @@ static void iwl4965_radio_kill_sw(struct iwl4965_priv *priv, int disable_radio)
2925 return; 2925 return;
2926} 2926}
2927 2927
2928void iwl4965_set_decrypted_flag(struct iwl4965_priv *priv, struct sk_buff *skb, 2928void iwl4965_set_decrypted_flag(struct iwl_priv *priv, struct sk_buff *skb,
2929 u32 decrypt_res, struct ieee80211_rx_status *stats) 2929 u32 decrypt_res, struct ieee80211_rx_status *stats)
2930{ 2930{
2931 u16 fc = 2931 u16 fc =
@@ -2960,7 +2960,7 @@ void iwl4965_set_decrypted_flag(struct iwl4965_priv *priv, struct sk_buff *skb,
2960 2960
2961#define IWL_PACKET_RETRY_TIME HZ 2961#define IWL_PACKET_RETRY_TIME HZ
2962 2962
2963int iwl4965_is_duplicate_packet(struct iwl4965_priv *priv, struct ieee80211_hdr *header) 2963int iwl4965_is_duplicate_packet(struct iwl_priv *priv, struct ieee80211_hdr *header)
2964{ 2964{
2965 u16 sc = le16_to_cpu(header->seq_ctrl); 2965 u16 sc = le16_to_cpu(header->seq_ctrl);
2966 u16 seq = (sc & IEEE80211_SCTL_SEQ) >> 4; 2966 u16 seq = (sc & IEEE80211_SCTL_SEQ) >> 4;
@@ -3077,7 +3077,7 @@ static __le32 iwl4965_add_beacon_time(u32 base, u32 addon, u32 beacon_interval)
3077 return cpu_to_le32(res); 3077 return cpu_to_le32(res);
3078} 3078}
3079 3079
3080static int iwl4965_get_measurement(struct iwl4965_priv *priv, 3080static int iwl4965_get_measurement(struct iwl_priv *priv,
3081 struct ieee80211_measurement_params *params, 3081 struct ieee80211_measurement_params *params,
3082 u8 type) 3082 u8 type)
3083{ 3083{
@@ -3157,7 +3157,7 @@ static int iwl4965_get_measurement(struct iwl4965_priv *priv,
3157} 3157}
3158#endif 3158#endif
3159 3159
3160static void iwl4965_txstatus_to_ieee(struct iwl4965_priv *priv, 3160static void iwl4965_txstatus_to_ieee(struct iwl_priv *priv,
3161 struct iwl4965_tx_info *tx_sta) 3161 struct iwl4965_tx_info *tx_sta)
3162{ 3162{
3163 3163
@@ -3183,7 +3183,7 @@ static void iwl4965_txstatus_to_ieee(struct iwl4965_priv *priv,
3183 * need to be reclaimed. As result, some free space forms. If there is 3183 * need to be reclaimed. As result, some free space forms. If there is
3184 * enough free space (> low mark), wake the stack that feeds us. 3184 * enough free space (> low mark), wake the stack that feeds us.
3185 */ 3185 */
3186int iwl4965_tx_queue_reclaim(struct iwl4965_priv *priv, int txq_id, int index) 3186int iwl4965_tx_queue_reclaim(struct iwl_priv *priv, int txq_id, int index)
3187{ 3187{
3188 struct iwl4965_tx_queue *txq = &priv->txq[txq_id]; 3188 struct iwl4965_tx_queue *txq = &priv->txq[txq_id];
3189 struct iwl4965_queue *q = &txq->q; 3189 struct iwl4965_queue *q = &txq->q;
@@ -3234,7 +3234,7 @@ static int iwl4965_is_tx_success(u32 status)
3234 ******************************************************************************/ 3234 ******************************************************************************/
3235#ifdef CONFIG_IWL4965_HT 3235#ifdef CONFIG_IWL4965_HT
3236 3236
3237static inline int iwl4965_get_ra_sta_id(struct iwl4965_priv *priv, 3237static inline int iwl4965_get_ra_sta_id(struct iwl_priv *priv,
3238 struct ieee80211_hdr *hdr) 3238 struct ieee80211_hdr *hdr)
3239{ 3239{
3240 if (priv->iw_mode == IEEE80211_IF_TYPE_STA) 3240 if (priv->iw_mode == IEEE80211_IF_TYPE_STA)
@@ -3246,7 +3246,7 @@ static inline int iwl4965_get_ra_sta_id(struct iwl4965_priv *priv,
3246} 3246}
3247 3247
3248static struct ieee80211_hdr *iwl4965_tx_queue_get_hdr( 3248static struct ieee80211_hdr *iwl4965_tx_queue_get_hdr(
3249 struct iwl4965_priv *priv, int txq_id, int idx) 3249 struct iwl_priv *priv, int txq_id, int idx)
3250{ 3250{
3251 if (priv->txq[txq_id].txb[idx].skb[0]) 3251 if (priv->txq[txq_id].txb[idx].skb[0])
3252 return (struct ieee80211_hdr *)priv->txq[txq_id]. 3252 return (struct ieee80211_hdr *)priv->txq[txq_id].
@@ -3265,7 +3265,7 @@ static inline u32 iwl4965_get_scd_ssn(struct iwl4965_tx_resp *tx_resp)
3265/** 3265/**
3266 * iwl4965_tx_status_reply_tx - Handle Tx rspnse for frames in aggregation queue 3266 * iwl4965_tx_status_reply_tx - Handle Tx rspnse for frames in aggregation queue
3267 */ 3267 */
3268static int iwl4965_tx_status_reply_tx(struct iwl4965_priv *priv, 3268static int iwl4965_tx_status_reply_tx(struct iwl_priv *priv,
3269 struct iwl4965_ht_agg *agg, 3269 struct iwl4965_ht_agg *agg,
3270 struct iwl4965_tx_resp_agg *tx_resp, 3270 struct iwl4965_tx_resp_agg *tx_resp,
3271 u16 start_idx) 3271 u16 start_idx)
@@ -3386,7 +3386,7 @@ static int iwl4965_tx_status_reply_tx(struct iwl4965_priv *priv,
3386/** 3386/**
3387 * iwl4965_rx_reply_tx - Handle standard (non-aggregation) Tx response 3387 * iwl4965_rx_reply_tx - Handle standard (non-aggregation) Tx response
3388 */ 3388 */
3389static void iwl4965_rx_reply_tx(struct iwl4965_priv *priv, 3389static void iwl4965_rx_reply_tx(struct iwl_priv *priv,
3390 struct iwl4965_rx_mem_buffer *rxb) 3390 struct iwl4965_rx_mem_buffer *rxb)
3391{ 3391{
3392 struct iwl4965_rx_packet *pkt = (void *)rxb->skb->data; 3392 struct iwl4965_rx_packet *pkt = (void *)rxb->skb->data;
@@ -3497,7 +3497,7 @@ static void iwl4965_rx_reply_tx(struct iwl4965_priv *priv,
3497} 3497}
3498 3498
3499 3499
3500static void iwl4965_rx_reply_alive(struct iwl4965_priv *priv, 3500static void iwl4965_rx_reply_alive(struct iwl_priv *priv,
3501 struct iwl4965_rx_mem_buffer *rxb) 3501 struct iwl4965_rx_mem_buffer *rxb)
3502{ 3502{
3503 struct iwl4965_rx_packet *pkt = (void *)rxb->skb->data; 3503 struct iwl4965_rx_packet *pkt = (void *)rxb->skb->data;
@@ -3533,7 +3533,7 @@ static void iwl4965_rx_reply_alive(struct iwl4965_priv *priv,
3533 IWL_WARNING("uCode did not respond OK.\n"); 3533 IWL_WARNING("uCode did not respond OK.\n");
3534} 3534}
3535 3535
3536static void iwl4965_rx_reply_add_sta(struct iwl4965_priv *priv, 3536static void iwl4965_rx_reply_add_sta(struct iwl_priv *priv,
3537 struct iwl4965_rx_mem_buffer *rxb) 3537 struct iwl4965_rx_mem_buffer *rxb)
3538{ 3538{
3539 struct iwl4965_rx_packet *pkt = (void *)rxb->skb->data; 3539 struct iwl4965_rx_packet *pkt = (void *)rxb->skb->data;
@@ -3542,7 +3542,7 @@ static void iwl4965_rx_reply_add_sta(struct iwl4965_priv *priv,
3542 return; 3542 return;
3543} 3543}
3544 3544
3545static void iwl4965_rx_reply_error(struct iwl4965_priv *priv, 3545static void iwl4965_rx_reply_error(struct iwl_priv *priv,
3546 struct iwl4965_rx_mem_buffer *rxb) 3546 struct iwl4965_rx_mem_buffer *rxb)
3547{ 3547{
3548 struct iwl4965_rx_packet *pkt = (void *)rxb->skb->data; 3548 struct iwl4965_rx_packet *pkt = (void *)rxb->skb->data;
@@ -3558,7 +3558,7 @@ static void iwl4965_rx_reply_error(struct iwl4965_priv *priv,
3558 3558
3559#define TX_STATUS_ENTRY(x) case TX_STATUS_FAIL_ ## x: return #x 3559#define TX_STATUS_ENTRY(x) case TX_STATUS_FAIL_ ## x: return #x
3560 3560
3561static void iwl4965_rx_csa(struct iwl4965_priv *priv, struct iwl4965_rx_mem_buffer *rxb) 3561static void iwl4965_rx_csa(struct iwl_priv *priv, struct iwl4965_rx_mem_buffer *rxb)
3562{ 3562{
3563 struct iwl4965_rx_packet *pkt = (void *)rxb->skb->data; 3563 struct iwl4965_rx_packet *pkt = (void *)rxb->skb->data;
3564 struct iwl4965_rxon_cmd *rxon = (void *)&priv->active_rxon; 3564 struct iwl4965_rxon_cmd *rxon = (void *)&priv->active_rxon;
@@ -3569,7 +3569,7 @@ static void iwl4965_rx_csa(struct iwl4965_priv *priv, struct iwl4965_rx_mem_buff
3569 priv->staging_rxon.channel = csa->channel; 3569 priv->staging_rxon.channel = csa->channel;
3570} 3570}
3571 3571
3572static void iwl4965_rx_spectrum_measure_notif(struct iwl4965_priv *priv, 3572static void iwl4965_rx_spectrum_measure_notif(struct iwl_priv *priv,
3573 struct iwl4965_rx_mem_buffer *rxb) 3573 struct iwl4965_rx_mem_buffer *rxb)
3574{ 3574{
3575#ifdef CONFIG_IWL4965_SPECTRUM_MEASUREMENT 3575#ifdef CONFIG_IWL4965_SPECTRUM_MEASUREMENT
@@ -3587,7 +3587,7 @@ static void iwl4965_rx_spectrum_measure_notif(struct iwl4965_priv *priv,
3587#endif 3587#endif
3588} 3588}
3589 3589
3590static void iwl4965_rx_pm_sleep_notif(struct iwl4965_priv *priv, 3590static void iwl4965_rx_pm_sleep_notif(struct iwl_priv *priv,
3591 struct iwl4965_rx_mem_buffer *rxb) 3591 struct iwl4965_rx_mem_buffer *rxb)
3592{ 3592{
3593#ifdef CONFIG_IWLWIFI_DEBUG 3593#ifdef CONFIG_IWLWIFI_DEBUG
@@ -3598,7 +3598,7 @@ static void iwl4965_rx_pm_sleep_notif(struct iwl4965_priv *priv,
3598#endif 3598#endif
3599} 3599}
3600 3600
3601static void iwl4965_rx_pm_debug_statistics_notif(struct iwl4965_priv *priv, 3601static void iwl4965_rx_pm_debug_statistics_notif(struct iwl_priv *priv,
3602 struct iwl4965_rx_mem_buffer *rxb) 3602 struct iwl4965_rx_mem_buffer *rxb)
3603{ 3603{
3604 struct iwl4965_rx_packet *pkt = (void *)rxb->skb->data; 3604 struct iwl4965_rx_packet *pkt = (void *)rxb->skb->data;
@@ -3610,8 +3610,8 @@ static void iwl4965_rx_pm_debug_statistics_notif(struct iwl4965_priv *priv,
3610 3610
3611static void iwl4965_bg_beacon_update(struct work_struct *work) 3611static void iwl4965_bg_beacon_update(struct work_struct *work)
3612{ 3612{
3613 struct iwl4965_priv *priv = 3613 struct iwl_priv *priv =
3614 container_of(work, struct iwl4965_priv, beacon_update); 3614 container_of(work, struct iwl_priv, beacon_update);
3615 struct sk_buff *beacon; 3615 struct sk_buff *beacon;
3616 3616
3617 /* Pull updated AP beacon from mac80211. will fail if not in AP mode */ 3617 /* Pull updated AP beacon from mac80211. will fail if not in AP mode */
@@ -3633,7 +3633,7 @@ static void iwl4965_bg_beacon_update(struct work_struct *work)
3633 iwl4965_send_beacon_cmd(priv); 3633 iwl4965_send_beacon_cmd(priv);
3634} 3634}
3635 3635
3636static void iwl4965_rx_beacon_notif(struct iwl4965_priv *priv, 3636static void iwl4965_rx_beacon_notif(struct iwl_priv *priv,
3637 struct iwl4965_rx_mem_buffer *rxb) 3637 struct iwl4965_rx_mem_buffer *rxb)
3638{ 3638{
3639#ifdef CONFIG_IWLWIFI_DEBUG 3639#ifdef CONFIG_IWLWIFI_DEBUG
@@ -3656,7 +3656,7 @@ static void iwl4965_rx_beacon_notif(struct iwl4965_priv *priv,
3656} 3656}
3657 3657
3658/* Service response to REPLY_SCAN_CMD (0x80) */ 3658/* Service response to REPLY_SCAN_CMD (0x80) */
3659static void iwl4965_rx_reply_scan(struct iwl4965_priv *priv, 3659static void iwl4965_rx_reply_scan(struct iwl_priv *priv,
3660 struct iwl4965_rx_mem_buffer *rxb) 3660 struct iwl4965_rx_mem_buffer *rxb)
3661{ 3661{
3662#ifdef CONFIG_IWLWIFI_DEBUG 3662#ifdef CONFIG_IWLWIFI_DEBUG
@@ -3669,7 +3669,7 @@ static void iwl4965_rx_reply_scan(struct iwl4965_priv *priv,
3669} 3669}
3670 3670
3671/* Service SCAN_START_NOTIFICATION (0x82) */ 3671/* Service SCAN_START_NOTIFICATION (0x82) */
3672static void iwl4965_rx_scan_start_notif(struct iwl4965_priv *priv, 3672static void iwl4965_rx_scan_start_notif(struct iwl_priv *priv,
3673 struct iwl4965_rx_mem_buffer *rxb) 3673 struct iwl4965_rx_mem_buffer *rxb)
3674{ 3674{
3675 struct iwl4965_rx_packet *pkt = (void *)rxb->skb->data; 3675 struct iwl4965_rx_packet *pkt = (void *)rxb->skb->data;
@@ -3686,7 +3686,7 @@ static void iwl4965_rx_scan_start_notif(struct iwl4965_priv *priv,
3686} 3686}
3687 3687
3688/* Service SCAN_RESULTS_NOTIFICATION (0x83) */ 3688/* Service SCAN_RESULTS_NOTIFICATION (0x83) */
3689static void iwl4965_rx_scan_results_notif(struct iwl4965_priv *priv, 3689static void iwl4965_rx_scan_results_notif(struct iwl_priv *priv,
3690 struct iwl4965_rx_mem_buffer *rxb) 3690 struct iwl4965_rx_mem_buffer *rxb)
3691{ 3691{
3692 struct iwl4965_rx_packet *pkt = (void *)rxb->skb->data; 3692 struct iwl4965_rx_packet *pkt = (void *)rxb->skb->data;
@@ -3711,7 +3711,7 @@ static void iwl4965_rx_scan_results_notif(struct iwl4965_priv *priv,
3711} 3711}
3712 3712
3713/* Service SCAN_COMPLETE_NOTIFICATION (0x84) */ 3713/* Service SCAN_COMPLETE_NOTIFICATION (0x84) */
3714static void iwl4965_rx_scan_complete_notif(struct iwl4965_priv *priv, 3714static void iwl4965_rx_scan_complete_notif(struct iwl_priv *priv,
3715 struct iwl4965_rx_mem_buffer *rxb) 3715 struct iwl4965_rx_mem_buffer *rxb)
3716{ 3716{
3717 struct iwl4965_rx_packet *pkt = (void *)rxb->skb->data; 3717 struct iwl4965_rx_packet *pkt = (void *)rxb->skb->data;
@@ -3769,7 +3769,7 @@ reschedule:
3769 3769
3770/* Handle notification from uCode that card's power state is changing 3770/* Handle notification from uCode that card's power state is changing
3771 * due to software, hardware, or critical temperature RFKILL */ 3771 * due to software, hardware, or critical temperature RFKILL */
3772static void iwl4965_rx_card_state_notif(struct iwl4965_priv *priv, 3772static void iwl4965_rx_card_state_notif(struct iwl_priv *priv,
3773 struct iwl4965_rx_mem_buffer *rxb) 3773 struct iwl4965_rx_mem_buffer *rxb)
3774{ 3774{
3775 struct iwl4965_rx_packet *pkt = (void *)rxb->skb->data; 3775 struct iwl4965_rx_packet *pkt = (void *)rxb->skb->data;
@@ -3847,7 +3847,7 @@ static void iwl4965_rx_card_state_notif(struct iwl4965_priv *priv,
3847 * This function chains into the hardware specific files for them to setup 3847 * This function chains into the hardware specific files for them to setup
3848 * any hardware specific handlers as well. 3848 * any hardware specific handlers as well.
3849 */ 3849 */
3850static void iwl4965_setup_rx_handlers(struct iwl4965_priv *priv) 3850static void iwl4965_setup_rx_handlers(struct iwl_priv *priv)
3851{ 3851{
3852 priv->rx_handlers[REPLY_ALIVE] = iwl4965_rx_reply_alive; 3852 priv->rx_handlers[REPLY_ALIVE] = iwl4965_rx_reply_alive;
3853 priv->rx_handlers[REPLY_ADD_STA] = iwl4965_rx_reply_add_sta; 3853 priv->rx_handlers[REPLY_ADD_STA] = iwl4965_rx_reply_add_sta;
@@ -3889,7 +3889,7 @@ static void iwl4965_setup_rx_handlers(struct iwl4965_priv *priv)
3889 * will be executed. The attached skb (if present) will only be freed 3889 * will be executed. The attached skb (if present) will only be freed
3890 * if the callback returns 1 3890 * if the callback returns 1
3891 */ 3891 */
3892static void iwl4965_tx_cmd_complete(struct iwl4965_priv *priv, 3892static void iwl4965_tx_cmd_complete(struct iwl_priv *priv,
3893 struct iwl4965_rx_mem_buffer *rxb) 3893 struct iwl4965_rx_mem_buffer *rxb)
3894{ 3894{
3895 struct iwl4965_rx_packet *pkt = (struct iwl4965_rx_packet *)rxb->skb->data; 3895 struct iwl4965_rx_packet *pkt = (struct iwl4965_rx_packet *)rxb->skb->data;
@@ -4012,7 +4012,7 @@ static int iwl4965_rx_queue_space(const struct iwl4965_rx_queue *q)
4012/** 4012/**
4013 * iwl4965_rx_queue_update_write_ptr - Update the write pointer for the RX queue 4013 * iwl4965_rx_queue_update_write_ptr - Update the write pointer for the RX queue
4014 */ 4014 */
4015int iwl4965_rx_queue_update_write_ptr(struct iwl4965_priv *priv, struct iwl4965_rx_queue *q) 4015int iwl4965_rx_queue_update_write_ptr(struct iwl_priv *priv, struct iwl4965_rx_queue *q)
4016{ 4016{
4017 u32 reg = 0; 4017 u32 reg = 0;
4018 int rc = 0; 4018 int rc = 0;
@@ -4058,7 +4058,7 @@ int iwl4965_rx_queue_update_write_ptr(struct iwl4965_priv *priv, struct iwl4965_
4058/** 4058/**
4059 * iwl4965_dma_addr2rbd_ptr - convert a DMA address to a uCode read buffer ptr 4059 * iwl4965_dma_addr2rbd_ptr - convert a DMA address to a uCode read buffer ptr
4060 */ 4060 */
4061static inline __le32 iwl4965_dma_addr2rbd_ptr(struct iwl4965_priv *priv, 4061static inline __le32 iwl4965_dma_addr2rbd_ptr(struct iwl_priv *priv,
4062 dma_addr_t dma_addr) 4062 dma_addr_t dma_addr)
4063{ 4063{
4064 return cpu_to_le32((u32)(dma_addr >> 8)); 4064 return cpu_to_le32((u32)(dma_addr >> 8));
@@ -4076,7 +4076,7 @@ static inline __le32 iwl4965_dma_addr2rbd_ptr(struct iwl4965_priv *priv,
4076 * also updates the memory address in the firmware to reference the new 4076 * also updates the memory address in the firmware to reference the new
4077 * target buffer. 4077 * target buffer.
4078 */ 4078 */
4079static int iwl4965_rx_queue_restock(struct iwl4965_priv *priv) 4079static int iwl4965_rx_queue_restock(struct iwl_priv *priv)
4080{ 4080{
4081 struct iwl4965_rx_queue *rxq = &priv->rxq; 4081 struct iwl4965_rx_queue *rxq = &priv->rxq;
4082 struct list_head *element; 4082 struct list_head *element;
@@ -4128,7 +4128,7 @@ static int iwl4965_rx_queue_restock(struct iwl4965_priv *priv)
4128 * Also restock the Rx queue via iwl4965_rx_queue_restock. 4128 * Also restock the Rx queue via iwl4965_rx_queue_restock.
4129 * This is called as a scheduled work item (except for during initialization) 4129 * This is called as a scheduled work item (except for during initialization)
4130 */ 4130 */
4131static void iwl4965_rx_allocate(struct iwl4965_priv *priv) 4131static void iwl4965_rx_allocate(struct iwl_priv *priv)
4132{ 4132{
4133 struct iwl4965_rx_queue *rxq = &priv->rxq; 4133 struct iwl4965_rx_queue *rxq = &priv->rxq;
4134 struct list_head *element; 4134 struct list_head *element;
@@ -4170,7 +4170,7 @@ static void iwl4965_rx_allocate(struct iwl4965_priv *priv)
4170*/ 4170*/
4171static void __iwl4965_rx_replenish(void *data) 4171static void __iwl4965_rx_replenish(void *data)
4172{ 4172{
4173 struct iwl4965_priv *priv = data; 4173 struct iwl_priv *priv = data;
4174 4174
4175 iwl4965_rx_allocate(priv); 4175 iwl4965_rx_allocate(priv);
4176 iwl4965_rx_queue_restock(priv); 4176 iwl4965_rx_queue_restock(priv);
@@ -4179,7 +4179,7 @@ static void __iwl4965_rx_replenish(void *data)
4179 4179
4180void iwl4965_rx_replenish(void *data) 4180void iwl4965_rx_replenish(void *data)
4181{ 4181{
4182 struct iwl4965_priv *priv = data; 4182 struct iwl_priv *priv = data;
4183 unsigned long flags; 4183 unsigned long flags;
4184 4184
4185 iwl4965_rx_allocate(priv); 4185 iwl4965_rx_allocate(priv);
@@ -4194,7 +4194,7 @@ void iwl4965_rx_replenish(void *data)
4194 * This free routine walks the list of POOL entries and if SKB is set to 4194 * This free routine walks the list of POOL entries and if SKB is set to
4195 * non NULL it is unmapped and freed 4195 * non NULL it is unmapped and freed
4196 */ 4196 */
4197static void iwl4965_rx_queue_free(struct iwl4965_priv *priv, struct iwl4965_rx_queue *rxq) 4197static void iwl4965_rx_queue_free(struct iwl_priv *priv, struct iwl4965_rx_queue *rxq)
4198{ 4198{
4199 int i; 4199 int i;
4200 for (i = 0; i < RX_QUEUE_SIZE + RX_FREE_BUFFERS; i++) { 4200 for (i = 0; i < RX_QUEUE_SIZE + RX_FREE_BUFFERS; i++) {
@@ -4212,7 +4212,7 @@ static void iwl4965_rx_queue_free(struct iwl4965_priv *priv, struct iwl4965_rx_q
4212 rxq->bd = NULL; 4212 rxq->bd = NULL;
4213} 4213}
4214 4214
4215int iwl4965_rx_queue_alloc(struct iwl4965_priv *priv) 4215int iwl4965_rx_queue_alloc(struct iwl_priv *priv)
4216{ 4216{
4217 struct iwl4965_rx_queue *rxq = &priv->rxq; 4217 struct iwl4965_rx_queue *rxq = &priv->rxq;
4218 struct pci_dev *dev = priv->pci_dev; 4218 struct pci_dev *dev = priv->pci_dev;
@@ -4239,7 +4239,7 @@ int iwl4965_rx_queue_alloc(struct iwl4965_priv *priv)
4239 return 0; 4239 return 0;
4240} 4240}
4241 4241
4242void iwl4965_rx_queue_reset(struct iwl4965_priv *priv, struct iwl4965_rx_queue *rxq) 4242void iwl4965_rx_queue_reset(struct iwl_priv *priv, struct iwl4965_rx_queue *rxq)
4243{ 4243{
4244 unsigned long flags; 4244 unsigned long flags;
4245 int i; 4245 int i;
@@ -4354,7 +4354,7 @@ int iwl4965_calc_sig_qual(int rssi_dbm, int noise_dbm)
4354 * the appropriate handlers, including command responses, 4354 * the appropriate handlers, including command responses,
4355 * frame-received notifications, and other notifications. 4355 * frame-received notifications, and other notifications.
4356 */ 4356 */
4357static void iwl4965_rx_handle(struct iwl4965_priv *priv) 4357static void iwl4965_rx_handle(struct iwl_priv *priv)
4358{ 4358{
4359 struct iwl4965_rx_mem_buffer *rxb; 4359 struct iwl4965_rx_mem_buffer *rxb;
4360 struct iwl4965_rx_packet *pkt; 4360 struct iwl4965_rx_packet *pkt;
@@ -4467,7 +4467,7 @@ static void iwl4965_rx_handle(struct iwl4965_priv *priv)
4467/** 4467/**
4468 * iwl4965_tx_queue_update_write_ptr - Send new write index to hardware 4468 * iwl4965_tx_queue_update_write_ptr - Send new write index to hardware
4469 */ 4469 */
4470static int iwl4965_tx_queue_update_write_ptr(struct iwl4965_priv *priv, 4470static int iwl4965_tx_queue_update_write_ptr(struct iwl_priv *priv,
4471 struct iwl4965_tx_queue *txq) 4471 struct iwl4965_tx_queue *txq)
4472{ 4472{
4473 u32 reg = 0; 4473 u32 reg = 0;
@@ -4533,14 +4533,14 @@ static void iwl4965_print_rx_config_cmd(struct iwl4965_rxon_cmd *rxon)
4533} 4533}
4534#endif 4534#endif
4535 4535
4536static void iwl4965_enable_interrupts(struct iwl4965_priv *priv) 4536static void iwl4965_enable_interrupts(struct iwl_priv *priv)
4537{ 4537{
4538 IWL_DEBUG_ISR("Enabling interrupts\n"); 4538 IWL_DEBUG_ISR("Enabling interrupts\n");
4539 set_bit(STATUS_INT_ENABLED, &priv->status); 4539 set_bit(STATUS_INT_ENABLED, &priv->status);
4540 iwl4965_write32(priv, CSR_INT_MASK, CSR_INI_SET_MASK); 4540 iwl4965_write32(priv, CSR_INT_MASK, CSR_INI_SET_MASK);
4541} 4541}
4542 4542
4543static inline void iwl4965_disable_interrupts(struct iwl4965_priv *priv) 4543static inline void iwl4965_disable_interrupts(struct iwl_priv *priv)
4544{ 4544{
4545 clear_bit(STATUS_INT_ENABLED, &priv->status); 4545 clear_bit(STATUS_INT_ENABLED, &priv->status);
4546 4546
@@ -4577,7 +4577,7 @@ static const char *desc_lookup(int i)
4577#define ERROR_START_OFFSET (1 * sizeof(u32)) 4577#define ERROR_START_OFFSET (1 * sizeof(u32))
4578#define ERROR_ELEM_SIZE (7 * sizeof(u32)) 4578#define ERROR_ELEM_SIZE (7 * sizeof(u32))
4579 4579
4580static void iwl4965_dump_nic_error_log(struct iwl4965_priv *priv) 4580static void iwl4965_dump_nic_error_log(struct iwl_priv *priv)
4581{ 4581{
4582 u32 data2, line; 4582 u32 data2, line;
4583 u32 desc, time, count, base, data1; 4583 u32 desc, time, count, base, data1;
@@ -4632,7 +4632,7 @@ static void iwl4965_dump_nic_error_log(struct iwl4965_priv *priv)
4632 * 4632 *
4633 * NOTE: Must be called with iwl4965_grab_nic_access() already obtained! 4633 * NOTE: Must be called with iwl4965_grab_nic_access() already obtained!
4634 */ 4634 */
4635static void iwl4965_print_event_log(struct iwl4965_priv *priv, u32 start_idx, 4635static void iwl4965_print_event_log(struct iwl_priv *priv, u32 start_idx,
4636 u32 num_events, u32 mode) 4636 u32 num_events, u32 mode)
4637{ 4637{
4638 u32 i; 4638 u32 i;
@@ -4670,7 +4670,7 @@ static void iwl4965_print_event_log(struct iwl4965_priv *priv, u32 start_idx,
4670 } 4670 }
4671} 4671}
4672 4672
4673static void iwl4965_dump_nic_event_log(struct iwl4965_priv *priv) 4673static void iwl4965_dump_nic_event_log(struct iwl_priv *priv)
4674{ 4674{
4675 int rc; 4675 int rc;
4676 u32 base; /* SRAM byte address of event log header */ 4676 u32 base; /* SRAM byte address of event log header */
@@ -4725,7 +4725,7 @@ static void iwl4965_dump_nic_event_log(struct iwl4965_priv *priv)
4725/** 4725/**
4726 * iwl4965_irq_handle_error - called for HW or SW error interrupt from card 4726 * iwl4965_irq_handle_error - called for HW or SW error interrupt from card
4727 */ 4727 */
4728static void iwl4965_irq_handle_error(struct iwl4965_priv *priv) 4728static void iwl4965_irq_handle_error(struct iwl_priv *priv)
4729{ 4729{
4730 /* Set the FW error flag -- cleared on iwl4965_down */ 4730 /* Set the FW error flag -- cleared on iwl4965_down */
4731 set_bit(STATUS_FW_ERROR, &priv->status); 4731 set_bit(STATUS_FW_ERROR, &priv->status);
@@ -4760,7 +4760,7 @@ static void iwl4965_irq_handle_error(struct iwl4965_priv *priv)
4760 } 4760 }
4761} 4761}
4762 4762
4763static void iwl4965_error_recovery(struct iwl4965_priv *priv) 4763static void iwl4965_error_recovery(struct iwl_priv *priv)
4764{ 4764{
4765 unsigned long flags; 4765 unsigned long flags;
4766 4766
@@ -4777,7 +4777,7 @@ static void iwl4965_error_recovery(struct iwl4965_priv *priv)
4777 spin_unlock_irqrestore(&priv->lock, flags); 4777 spin_unlock_irqrestore(&priv->lock, flags);
4778} 4778}
4779 4779
4780static void iwl4965_irq_tasklet(struct iwl4965_priv *priv) 4780static void iwl4965_irq_tasklet(struct iwl_priv *priv)
4781{ 4781{
4782 u32 inta, handled = 0; 4782 u32 inta, handled = 0;
4783 u32 inta_fh; 4783 u32 inta_fh;
@@ -4939,7 +4939,7 @@ static void iwl4965_irq_tasklet(struct iwl4965_priv *priv)
4939 4939
4940static irqreturn_t iwl4965_isr(int irq, void *data) 4940static irqreturn_t iwl4965_isr(int irq, void *data)
4941{ 4941{
4942 struct iwl4965_priv *priv = data; 4942 struct iwl_priv *priv = data;
4943 u32 inta, inta_mask; 4943 u32 inta, inta_mask;
4944 u32 inta_fh; 4944 u32 inta_fh;
4945 if (!priv) 4945 if (!priv)
@@ -4999,7 +4999,7 @@ static irqreturn_t iwl4965_isr(int irq, void *data)
4999 * EEPROM contents to the specific channel number supported for each 4999 * EEPROM contents to the specific channel number supported for each
5000 * band. 5000 * band.
5001 * 5001 *
5002 * For example, iwl4965_priv->eeprom.band_3_channels[4] from the band_3 5002 * For example, iwl_priv->eeprom.band_3_channels[4] from the band_3
5003 * definition below maps to physical channel 42 in the 5.2GHz spectrum. 5003 * definition below maps to physical channel 42 in the 5.2GHz spectrum.
5004 * The specific geography and calibration information for that channel 5004 * The specific geography and calibration information for that channel
5005 * is contained in the eeprom map itself. 5005 * is contained in the eeprom map itself.
@@ -5054,7 +5054,7 @@ static u8 iwl4965_eeprom_band_7[] = { /* 5.2 FAT channel */
5054 36, 44, 52, 60, 100, 108, 116, 124, 132, 149, 157 5054 36, 44, 52, 60, 100, 108, 116, 124, 132, 149, 157
5055}; 5055};
5056 5056
5057static void iwl4965_init_band_reference(const struct iwl4965_priv *priv, 5057static void iwl4965_init_band_reference(const struct iwl_priv *priv,
5058 int band, 5058 int band,
5059 int *eeprom_ch_count, 5059 int *eeprom_ch_count,
5060 const struct iwl4965_eeprom_channel 5060 const struct iwl4965_eeprom_channel
@@ -5108,7 +5108,7 @@ static void iwl4965_init_band_reference(const struct iwl4965_priv *priv,
5108 * 5108 *
5109 * Based on band and channel number. 5109 * Based on band and channel number.
5110 */ 5110 */
5111const struct iwl4965_channel_info *iwl4965_get_channel_info(const struct iwl4965_priv *priv, 5111const struct iwl4965_channel_info *iwl4965_get_channel_info(const struct iwl_priv *priv,
5112 enum ieee80211_band band, u16 channel) 5112 enum ieee80211_band band, u16 channel)
5113{ 5113{
5114 int i; 5114 int i;
@@ -5137,7 +5137,7 @@ const struct iwl4965_channel_info *iwl4965_get_channel_info(const struct iwl4965
5137/** 5137/**
5138 * iwl4965_init_channel_map - Set up driver's info for all possible channels 5138 * iwl4965_init_channel_map - Set up driver's info for all possible channels
5139 */ 5139 */
5140static int iwl4965_init_channel_map(struct iwl4965_priv *priv) 5140static int iwl4965_init_channel_map(struct iwl_priv *priv)
5141{ 5141{
5142 int eeprom_ch_count = 0; 5142 int eeprom_ch_count = 0;
5143 const u8 *eeprom_ch_index = NULL; 5143 const u8 *eeprom_ch_index = NULL;
@@ -5289,7 +5289,7 @@ static int iwl4965_init_channel_map(struct iwl4965_priv *priv)
5289/* 5289/*
5290 * iwl4965_free_channel_map - undo allocations in iwl4965_init_channel_map 5290 * iwl4965_free_channel_map - undo allocations in iwl4965_init_channel_map
5291 */ 5291 */
5292static void iwl4965_free_channel_map(struct iwl4965_priv *priv) 5292static void iwl4965_free_channel_map(struct iwl_priv *priv)
5293{ 5293{
5294 kfree(priv->channel_info); 5294 kfree(priv->channel_info);
5295 priv->channel_count = 0; 5295 priv->channel_count = 0;
@@ -5318,7 +5318,7 @@ static void iwl4965_free_channel_map(struct iwl4965_priv *priv)
5318#define IWL_PASSIVE_DWELL_BASE (100) 5318#define IWL_PASSIVE_DWELL_BASE (100)
5319#define IWL_CHANNEL_TUNE_TIME 5 5319#define IWL_CHANNEL_TUNE_TIME 5
5320 5320
5321static inline u16 iwl4965_get_active_dwell_time(struct iwl4965_priv *priv, 5321static inline u16 iwl4965_get_active_dwell_time(struct iwl_priv *priv,
5322 enum ieee80211_band band) 5322 enum ieee80211_band band)
5323{ 5323{
5324 if (band == IEEE80211_BAND_5GHZ) 5324 if (band == IEEE80211_BAND_5GHZ)
@@ -5327,7 +5327,7 @@ static inline u16 iwl4965_get_active_dwell_time(struct iwl4965_priv *priv,
5327 return IWL_ACTIVE_DWELL_TIME_24; 5327 return IWL_ACTIVE_DWELL_TIME_24;
5328} 5328}
5329 5329
5330static u16 iwl4965_get_passive_dwell_time(struct iwl4965_priv *priv, 5330static u16 iwl4965_get_passive_dwell_time(struct iwl_priv *priv,
5331 enum ieee80211_band band) 5331 enum ieee80211_band band)
5332{ 5332{
5333 u16 active = iwl4965_get_active_dwell_time(priv, band); 5333 u16 active = iwl4965_get_active_dwell_time(priv, band);
@@ -5351,7 +5351,7 @@ static u16 iwl4965_get_passive_dwell_time(struct iwl4965_priv *priv,
5351 return passive; 5351 return passive;
5352} 5352}
5353 5353
5354static int iwl4965_get_channels_for_scan(struct iwl4965_priv *priv, 5354static int iwl4965_get_channels_for_scan(struct iwl_priv *priv,
5355 enum ieee80211_band band, 5355 enum ieee80211_band band,
5356 u8 is_active, u8 direct_mask, 5356 u8 is_active, u8 direct_mask,
5357 struct iwl4965_scan_channel *scan_ch) 5357 struct iwl4965_scan_channel *scan_ch)
@@ -5438,7 +5438,7 @@ static int iwl4965_get_channels_for_scan(struct iwl4965_priv *priv,
5438 return added; 5438 return added;
5439} 5439}
5440 5440
5441static void iwl4965_init_hw_rates(struct iwl4965_priv *priv, 5441static void iwl4965_init_hw_rates(struct iwl_priv *priv,
5442 struct ieee80211_rate *rates) 5442 struct ieee80211_rate *rates)
5443{ 5443{
5444 int i; 5444 int i;
@@ -5462,7 +5462,7 @@ static void iwl4965_init_hw_rates(struct iwl4965_priv *priv,
5462/** 5462/**
5463 * iwl4965_init_geos - Initialize mac80211's geo/channel info based from eeprom 5463 * iwl4965_init_geos - Initialize mac80211's geo/channel info based from eeprom
5464 */ 5464 */
5465static int iwl4965_init_geos(struct iwl4965_priv *priv) 5465static int iwl4965_init_geos(struct iwl_priv *priv)
5466{ 5466{
5467 struct iwl4965_channel_info *ch; 5467 struct iwl4965_channel_info *ch;
5468 struct ieee80211_supported_band *sband; 5468 struct ieee80211_supported_band *sband;
@@ -5584,7 +5584,7 @@ static int iwl4965_init_geos(struct iwl4965_priv *priv)
5584/* 5584/*
5585 * iwl4965_free_geos - undo allocations in iwl4965_init_geos 5585 * iwl4965_free_geos - undo allocations in iwl4965_init_geos
5586 */ 5586 */
5587static void iwl4965_free_geos(struct iwl4965_priv *priv) 5587static void iwl4965_free_geos(struct iwl_priv *priv)
5588{ 5588{
5589 kfree(priv->ieee_channels); 5589 kfree(priv->ieee_channels);
5590 kfree(priv->ieee_rates); 5590 kfree(priv->ieee_rates);
@@ -5597,7 +5597,7 @@ static void iwl4965_free_geos(struct iwl4965_priv *priv)
5597 * 5597 *
5598 ******************************************************************************/ 5598 ******************************************************************************/
5599 5599
5600static void iwl4965_dealloc_ucode_pci(struct iwl4965_priv *priv) 5600static void iwl4965_dealloc_ucode_pci(struct iwl_priv *priv)
5601{ 5601{
5602 iwl_free_fw_desc(priv->pci_dev, &priv->ucode_code); 5602 iwl_free_fw_desc(priv->pci_dev, &priv->ucode_code);
5603 iwl_free_fw_desc(priv->pci_dev, &priv->ucode_data); 5603 iwl_free_fw_desc(priv->pci_dev, &priv->ucode_data);
@@ -5611,7 +5611,7 @@ static void iwl4965_dealloc_ucode_pci(struct iwl4965_priv *priv)
5611 * iwl4965_verify_inst_full - verify runtime uCode image in card vs. host, 5611 * iwl4965_verify_inst_full - verify runtime uCode image in card vs. host,
5612 * looking at all data. 5612 * looking at all data.
5613 */ 5613 */
5614static int iwl4965_verify_inst_full(struct iwl4965_priv *priv, __le32 *image, 5614static int iwl4965_verify_inst_full(struct iwl_priv *priv, __le32 *image,
5615 u32 len) 5615 u32 len)
5616{ 5616{
5617 u32 val; 5617 u32 val;
@@ -5659,7 +5659,7 @@ static int iwl4965_verify_inst_full(struct iwl4965_priv *priv, __le32 *image,
5659 * using sample data 100 bytes apart. If these sample points are good, 5659 * using sample data 100 bytes apart. If these sample points are good,
5660 * it's a pretty good bet that everything between them is good, too. 5660 * it's a pretty good bet that everything between them is good, too.
5661 */ 5661 */
5662static int iwl4965_verify_inst_sparse(struct iwl4965_priv *priv, __le32 *image, u32 len) 5662static int iwl4965_verify_inst_sparse(struct iwl_priv *priv, __le32 *image, u32 len)
5663{ 5663{
5664 u32 val; 5664 u32 val;
5665 int rc = 0; 5665 int rc = 0;
@@ -5702,7 +5702,7 @@ static int iwl4965_verify_inst_sparse(struct iwl4965_priv *priv, __le32 *image,
5702 * iwl4965_verify_ucode - determine which instruction image is in SRAM, 5702 * iwl4965_verify_ucode - determine which instruction image is in SRAM,
5703 * and verify its contents 5703 * and verify its contents
5704 */ 5704 */
5705static int iwl4965_verify_ucode(struct iwl4965_priv *priv) 5705static int iwl4965_verify_ucode(struct iwl_priv *priv)
5706{ 5706{
5707 __le32 *image; 5707 __le32 *image;
5708 u32 len; 5708 u32 len;
@@ -5749,7 +5749,7 @@ static int iwl4965_verify_ucode(struct iwl4965_priv *priv)
5749 5749
5750 5750
5751/* check contents of special bootstrap uCode SRAM */ 5751/* check contents of special bootstrap uCode SRAM */
5752static int iwl4965_verify_bsm(struct iwl4965_priv *priv) 5752static int iwl4965_verify_bsm(struct iwl_priv *priv)
5753{ 5753{
5754 __le32 *image = priv->ucode_boot.v_addr; 5754 __le32 *image = priv->ucode_boot.v_addr;
5755 u32 len = priv->ucode_boot.len; 5755 u32 len = priv->ucode_boot.len;
@@ -5811,7 +5811,7 @@ static int iwl4965_verify_bsm(struct iwl4965_priv *priv)
5811 * the runtime uCode instructions and the backup data cache into SRAM, 5811 * the runtime uCode instructions and the backup data cache into SRAM,
5812 * and re-launches the runtime uCode from where it left off. 5812 * and re-launches the runtime uCode from where it left off.
5813 */ 5813 */
5814static int iwl4965_load_bsm(struct iwl4965_priv *priv) 5814static int iwl4965_load_bsm(struct iwl_priv *priv)
5815{ 5815{
5816 __le32 *image = priv->ucode_boot.v_addr; 5816 __le32 *image = priv->ucode_boot.v_addr;
5817 u32 len = priv->ucode_boot.len; 5817 u32 len = priv->ucode_boot.len;
@@ -5897,7 +5897,7 @@ static int iwl4965_load_bsm(struct iwl4965_priv *priv)
5897 return 0; 5897 return 0;
5898} 5898}
5899 5899
5900static void iwl4965_nic_start(struct iwl4965_priv *priv) 5900static void iwl4965_nic_start(struct iwl_priv *priv)
5901{ 5901{
5902 /* Remove all resets to allow NIC to operate */ 5902 /* Remove all resets to allow NIC to operate */
5903 iwl4965_write32(priv, CSR_RESET, 0); 5903 iwl4965_write32(priv, CSR_RESET, 0);
@@ -5909,7 +5909,7 @@ static void iwl4965_nic_start(struct iwl4965_priv *priv)
5909 * 5909 *
5910 * Copy into buffers for card to fetch via bus-mastering 5910 * Copy into buffers for card to fetch via bus-mastering
5911 */ 5911 */
5912static int iwl4965_read_ucode(struct iwl4965_priv *priv) 5912static int iwl4965_read_ucode(struct iwl_priv *priv)
5913{ 5913{
5914 struct iwl4965_ucode *ucode; 5914 struct iwl4965_ucode *ucode;
5915 int ret; 5915 int ret;
@@ -6110,7 +6110,7 @@ static int iwl4965_read_ucode(struct iwl4965_priv *priv)
6110 * We need to replace them to load runtime uCode inst and data, 6110 * We need to replace them to load runtime uCode inst and data,
6111 * and to save runtime data when powering down. 6111 * and to save runtime data when powering down.
6112 */ 6112 */
6113static int iwl4965_set_ucode_ptrs(struct iwl4965_priv *priv) 6113static int iwl4965_set_ucode_ptrs(struct iwl_priv *priv)
6114{ 6114{
6115 dma_addr_t pinst; 6115 dma_addr_t pinst;
6116 dma_addr_t pdata; 6116 dma_addr_t pdata;
@@ -6159,7 +6159,7 @@ static int iwl4965_set_ucode_ptrs(struct iwl4965_priv *priv)
6159 * 6159 *
6160 * Tell "initialize" uCode to go ahead and load the runtime uCode. 6160 * Tell "initialize" uCode to go ahead and load the runtime uCode.
6161*/ 6161*/
6162static void iwl4965_init_alive_start(struct iwl4965_priv *priv) 6162static void iwl4965_init_alive_start(struct iwl_priv *priv)
6163{ 6163{
6164 /* Check alive response for "valid" sign from uCode */ 6164 /* Check alive response for "valid" sign from uCode */
6165 if (priv->card_alive_init.is_valid != UCODE_VALID_OK) { 6165 if (priv->card_alive_init.is_valid != UCODE_VALID_OK) {
@@ -6204,7 +6204,7 @@ static void iwl4965_init_alive_start(struct iwl4965_priv *priv)
6204 * from protocol/runtime uCode (initialization uCode's 6204 * from protocol/runtime uCode (initialization uCode's
6205 * Alive gets handled by iwl4965_init_alive_start()). 6205 * Alive gets handled by iwl4965_init_alive_start()).
6206 */ 6206 */
6207static void iwl4965_alive_start(struct iwl4965_priv *priv) 6207static void iwl4965_alive_start(struct iwl_priv *priv)
6208{ 6208{
6209 int rc = 0; 6209 int rc = 0;
6210 6210
@@ -6289,9 +6289,9 @@ static void iwl4965_alive_start(struct iwl4965_priv *priv)
6289 queue_work(priv->workqueue, &priv->restart); 6289 queue_work(priv->workqueue, &priv->restart);
6290} 6290}
6291 6291
6292static void iwl4965_cancel_deferred_work(struct iwl4965_priv *priv); 6292static void iwl4965_cancel_deferred_work(struct iwl_priv *priv);
6293 6293
6294static void __iwl4965_down(struct iwl4965_priv *priv) 6294static void __iwl4965_down(struct iwl_priv *priv)
6295{ 6295{
6296 unsigned long flags; 6296 unsigned long flags;
6297 int exit_pending = test_bit(STATUS_EXIT_PENDING, &priv->status); 6297 int exit_pending = test_bit(STATUS_EXIT_PENDING, &priv->status);
@@ -6383,7 +6383,7 @@ static void __iwl4965_down(struct iwl4965_priv *priv)
6383 iwl4965_clear_free_frames(priv); 6383 iwl4965_clear_free_frames(priv);
6384} 6384}
6385 6385
6386static void iwl4965_down(struct iwl4965_priv *priv) 6386static void iwl4965_down(struct iwl_priv *priv)
6387{ 6387{
6388 mutex_lock(&priv->mutex); 6388 mutex_lock(&priv->mutex);
6389 __iwl4965_down(priv); 6389 __iwl4965_down(priv);
@@ -6394,7 +6394,7 @@ static void iwl4965_down(struct iwl4965_priv *priv)
6394 6394
6395#define MAX_HW_RESTARTS 5 6395#define MAX_HW_RESTARTS 5
6396 6396
6397static int __iwl4965_up(struct iwl4965_priv *priv) 6397static int __iwl4965_up(struct iwl_priv *priv)
6398{ 6398{
6399 int rc, i; 6399 int rc, i;
6400 6400
@@ -6497,8 +6497,8 @@ static int __iwl4965_up(struct iwl4965_priv *priv)
6497 6497
6498static void iwl4965_bg_init_alive_start(struct work_struct *data) 6498static void iwl4965_bg_init_alive_start(struct work_struct *data)
6499{ 6499{
6500 struct iwl4965_priv *priv = 6500 struct iwl_priv *priv =
6501 container_of(data, struct iwl4965_priv, init_alive_start.work); 6501 container_of(data, struct iwl_priv, init_alive_start.work);
6502 6502
6503 if (test_bit(STATUS_EXIT_PENDING, &priv->status)) 6503 if (test_bit(STATUS_EXIT_PENDING, &priv->status))
6504 return; 6504 return;
@@ -6510,8 +6510,8 @@ static void iwl4965_bg_init_alive_start(struct work_struct *data)
6510 6510
6511static void iwl4965_bg_alive_start(struct work_struct *data) 6511static void iwl4965_bg_alive_start(struct work_struct *data)
6512{ 6512{
6513 struct iwl4965_priv *priv = 6513 struct iwl_priv *priv =
6514 container_of(data, struct iwl4965_priv, alive_start.work); 6514 container_of(data, struct iwl_priv, alive_start.work);
6515 6515
6516 if (test_bit(STATUS_EXIT_PENDING, &priv->status)) 6516 if (test_bit(STATUS_EXIT_PENDING, &priv->status))
6517 return; 6517 return;
@@ -6523,7 +6523,7 @@ static void iwl4965_bg_alive_start(struct work_struct *data)
6523 6523
6524static void iwl4965_bg_rf_kill(struct work_struct *work) 6524static void iwl4965_bg_rf_kill(struct work_struct *work)
6525{ 6525{
6526 struct iwl4965_priv *priv = container_of(work, struct iwl4965_priv, rf_kill); 6526 struct iwl_priv *priv = container_of(work, struct iwl_priv, rf_kill);
6527 6527
6528 wake_up_interruptible(&priv->wait_command_queue); 6528 wake_up_interruptible(&priv->wait_command_queue);
6529 6529
@@ -6555,8 +6555,8 @@ static void iwl4965_bg_rf_kill(struct work_struct *work)
6555 6555
6556static void iwl4965_bg_scan_check(struct work_struct *data) 6556static void iwl4965_bg_scan_check(struct work_struct *data)
6557{ 6557{
6558 struct iwl4965_priv *priv = 6558 struct iwl_priv *priv =
6559 container_of(data, struct iwl4965_priv, scan_check.work); 6559 container_of(data, struct iwl_priv, scan_check.work);
6560 6560
6561 if (test_bit(STATUS_EXIT_PENDING, &priv->status)) 6561 if (test_bit(STATUS_EXIT_PENDING, &priv->status))
6562 return; 6562 return;
@@ -6576,8 +6576,8 @@ static void iwl4965_bg_scan_check(struct work_struct *data)
6576 6576
6577static void iwl4965_bg_request_scan(struct work_struct *data) 6577static void iwl4965_bg_request_scan(struct work_struct *data)
6578{ 6578{
6579 struct iwl4965_priv *priv = 6579 struct iwl_priv *priv =
6580 container_of(data, struct iwl4965_priv, request_scan); 6580 container_of(data, struct iwl_priv, request_scan);
6581 struct iwl4965_host_cmd cmd = { 6581 struct iwl4965_host_cmd cmd = {
6582 .id = REPLY_SCAN_CMD, 6582 .id = REPLY_SCAN_CMD,
6583 .len = sizeof(struct iwl4965_scan_cmd), 6583 .len = sizeof(struct iwl4965_scan_cmd),
@@ -6788,7 +6788,7 @@ static void iwl4965_bg_request_scan(struct work_struct *data)
6788 6788
6789static void iwl4965_bg_up(struct work_struct *data) 6789static void iwl4965_bg_up(struct work_struct *data)
6790{ 6790{
6791 struct iwl4965_priv *priv = container_of(data, struct iwl4965_priv, up); 6791 struct iwl_priv *priv = container_of(data, struct iwl_priv, up);
6792 6792
6793 if (test_bit(STATUS_EXIT_PENDING, &priv->status)) 6793 if (test_bit(STATUS_EXIT_PENDING, &priv->status))
6794 return; 6794 return;
@@ -6800,7 +6800,7 @@ static void iwl4965_bg_up(struct work_struct *data)
6800 6800
6801static void iwl4965_bg_restart(struct work_struct *data) 6801static void iwl4965_bg_restart(struct work_struct *data)
6802{ 6802{
6803 struct iwl4965_priv *priv = container_of(data, struct iwl4965_priv, restart); 6803 struct iwl_priv *priv = container_of(data, struct iwl_priv, restart);
6804 6804
6805 if (test_bit(STATUS_EXIT_PENDING, &priv->status)) 6805 if (test_bit(STATUS_EXIT_PENDING, &priv->status))
6806 return; 6806 return;
@@ -6811,8 +6811,8 @@ static void iwl4965_bg_restart(struct work_struct *data)
6811 6811
6812static void iwl4965_bg_rx_replenish(struct work_struct *data) 6812static void iwl4965_bg_rx_replenish(struct work_struct *data)
6813{ 6813{
6814 struct iwl4965_priv *priv = 6814 struct iwl_priv *priv =
6815 container_of(data, struct iwl4965_priv, rx_replenish); 6815 container_of(data, struct iwl_priv, rx_replenish);
6816 6816
6817 if (test_bit(STATUS_EXIT_PENDING, &priv->status)) 6817 if (test_bit(STATUS_EXIT_PENDING, &priv->status))
6818 return; 6818 return;
@@ -6826,7 +6826,7 @@ static void iwl4965_bg_rx_replenish(struct work_struct *data)
6826 6826
6827static void iwl4965_bg_post_associate(struct work_struct *data) 6827static void iwl4965_bg_post_associate(struct work_struct *data)
6828{ 6828{
6829 struct iwl4965_priv *priv = container_of(data, struct iwl4965_priv, 6829 struct iwl_priv *priv = container_of(data, struct iwl_priv,
6830 post_associate.work); 6830 post_associate.work);
6831 6831
6832 int rc = 0; 6832 int rc = 0;
@@ -6940,7 +6940,7 @@ static void iwl4965_bg_post_associate(struct work_struct *data)
6940 6940
6941static void iwl4965_bg_abort_scan(struct work_struct *work) 6941static void iwl4965_bg_abort_scan(struct work_struct *work)
6942{ 6942{
6943 struct iwl4965_priv *priv = container_of(work, struct iwl4965_priv, abort_scan); 6943 struct iwl_priv *priv = container_of(work, struct iwl_priv, abort_scan);
6944 6944
6945 if (!iwl4965_is_ready(priv)) 6945 if (!iwl4965_is_ready(priv))
6946 return; 6946 return;
@@ -6957,8 +6957,8 @@ static int iwl4965_mac_config(struct ieee80211_hw *hw, struct ieee80211_conf *co
6957 6957
6958static void iwl4965_bg_scan_completed(struct work_struct *work) 6958static void iwl4965_bg_scan_completed(struct work_struct *work)
6959{ 6959{
6960 struct iwl4965_priv *priv = 6960 struct iwl_priv *priv =
6961 container_of(work, struct iwl4965_priv, scan_completed); 6961 container_of(work, struct iwl_priv, scan_completed);
6962 6962
6963 IWL_DEBUG(IWL_DL_INFO | IWL_DL_SCAN, "SCAN complete scan\n"); 6963 IWL_DEBUG(IWL_DL_INFO | IWL_DL_SCAN, "SCAN complete scan\n");
6964 6964
@@ -6987,7 +6987,7 @@ static void iwl4965_bg_scan_completed(struct work_struct *work)
6987 6987
6988static int iwl4965_mac_start(struct ieee80211_hw *hw) 6988static int iwl4965_mac_start(struct ieee80211_hw *hw)
6989{ 6989{
6990 struct iwl4965_priv *priv = hw->priv; 6990 struct iwl_priv *priv = hw->priv;
6991 int ret; 6991 int ret;
6992 6992
6993 IWL_DEBUG_MAC80211("enter\n"); 6993 IWL_DEBUG_MAC80211("enter\n");
@@ -7064,7 +7064,7 @@ out_disable_msi:
7064 7064
7065static void iwl4965_mac_stop(struct ieee80211_hw *hw) 7065static void iwl4965_mac_stop(struct ieee80211_hw *hw)
7066{ 7066{
7067 struct iwl4965_priv *priv = hw->priv; 7067 struct iwl_priv *priv = hw->priv;
7068 7068
7069 IWL_DEBUG_MAC80211("enter\n"); 7069 IWL_DEBUG_MAC80211("enter\n");
7070 7070
@@ -7099,7 +7099,7 @@ static void iwl4965_mac_stop(struct ieee80211_hw *hw)
7099static int iwl4965_mac_tx(struct ieee80211_hw *hw, struct sk_buff *skb, 7099static int iwl4965_mac_tx(struct ieee80211_hw *hw, struct sk_buff *skb,
7100 struct ieee80211_tx_control *ctl) 7100 struct ieee80211_tx_control *ctl)
7101{ 7101{
7102 struct iwl4965_priv *priv = hw->priv; 7102 struct iwl_priv *priv = hw->priv;
7103 7103
7104 IWL_DEBUG_MAC80211("enter\n"); 7104 IWL_DEBUG_MAC80211("enter\n");
7105 7105
@@ -7121,7 +7121,7 @@ static int iwl4965_mac_tx(struct ieee80211_hw *hw, struct sk_buff *skb,
7121static int iwl4965_mac_add_interface(struct ieee80211_hw *hw, 7121static int iwl4965_mac_add_interface(struct ieee80211_hw *hw,
7122 struct ieee80211_if_init_conf *conf) 7122 struct ieee80211_if_init_conf *conf)
7123{ 7123{
7124 struct iwl4965_priv *priv = hw->priv; 7124 struct iwl_priv *priv = hw->priv;
7125 unsigned long flags; 7125 unsigned long flags;
7126 DECLARE_MAC_BUF(mac); 7126 DECLARE_MAC_BUF(mac);
7127 7127
@@ -7162,7 +7162,7 @@ static int iwl4965_mac_add_interface(struct ieee80211_hw *hw,
7162 */ 7162 */
7163static int iwl4965_mac_config(struct ieee80211_hw *hw, struct ieee80211_conf *conf) 7163static int iwl4965_mac_config(struct ieee80211_hw *hw, struct ieee80211_conf *conf)
7164{ 7164{
7165 struct iwl4965_priv *priv = hw->priv; 7165 struct iwl_priv *priv = hw->priv;
7166 const struct iwl4965_channel_info *ch_info; 7166 const struct iwl4965_channel_info *ch_info;
7167 unsigned long flags; 7167 unsigned long flags;
7168 int ret = 0; 7168 int ret = 0;
@@ -7257,7 +7257,7 @@ out:
7257 return ret; 7257 return ret;
7258} 7258}
7259 7259
7260static void iwl4965_config_ap(struct iwl4965_priv *priv) 7260static void iwl4965_config_ap(struct iwl_priv *priv)
7261{ 7261{
7262 int rc = 0; 7262 int rc = 0;
7263 7263
@@ -7321,7 +7321,7 @@ static int iwl4965_mac_config_interface(struct ieee80211_hw *hw,
7321 struct ieee80211_vif *vif, 7321 struct ieee80211_vif *vif,
7322 struct ieee80211_if_conf *conf) 7322 struct ieee80211_if_conf *conf)
7323{ 7323{
7324 struct iwl4965_priv *priv = hw->priv; 7324 struct iwl_priv *priv = hw->priv;
7325 DECLARE_MAC_BUF(mac); 7325 DECLARE_MAC_BUF(mac);
7326 unsigned long flags; 7326 unsigned long flags;
7327 int rc; 7327 int rc;
@@ -7439,7 +7439,7 @@ static void iwl4965_configure_filter(struct ieee80211_hw *hw,
7439static void iwl4965_mac_remove_interface(struct ieee80211_hw *hw, 7439static void iwl4965_mac_remove_interface(struct ieee80211_hw *hw,
7440 struct ieee80211_if_init_conf *conf) 7440 struct ieee80211_if_init_conf *conf)
7441{ 7441{
7442 struct iwl4965_priv *priv = hw->priv; 7442 struct iwl_priv *priv = hw->priv;
7443 7443
7444 IWL_DEBUG_MAC80211("enter\n"); 7444 IWL_DEBUG_MAC80211("enter\n");
7445 7445
@@ -7468,7 +7468,7 @@ static void iwl4965_bss_info_changed(struct ieee80211_hw *hw,
7468 struct ieee80211_bss_conf *bss_conf, 7468 struct ieee80211_bss_conf *bss_conf,
7469 u32 changes) 7469 u32 changes)
7470{ 7470{
7471 struct iwl4965_priv *priv = hw->priv; 7471 struct iwl_priv *priv = hw->priv;
7472 7472
7473 if (changes & BSS_CHANGED_ERP_PREAMBLE) { 7473 if (changes & BSS_CHANGED_ERP_PREAMBLE) {
7474 if (bss_conf->use_short_preamble) 7474 if (bss_conf->use_short_preamble)
@@ -7499,7 +7499,7 @@ static int iwl4965_mac_hw_scan(struct ieee80211_hw *hw, u8 *ssid, size_t len)
7499{ 7499{
7500 int rc = 0; 7500 int rc = 0;
7501 unsigned long flags; 7501 unsigned long flags;
7502 struct iwl4965_priv *priv = hw->priv; 7502 struct iwl_priv *priv = hw->priv;
7503 7503
7504 IWL_DEBUG_MAC80211("enter\n"); 7504 IWL_DEBUG_MAC80211("enter\n");
7505 7505
@@ -7556,7 +7556,7 @@ static int iwl4965_mac_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd,
7556 const u8 *local_addr, const u8 *addr, 7556 const u8 *local_addr, const u8 *addr,
7557 struct ieee80211_key_conf *key) 7557 struct ieee80211_key_conf *key)
7558{ 7558{
7559 struct iwl4965_priv *priv = hw->priv; 7559 struct iwl_priv *priv = hw->priv;
7560 DECLARE_MAC_BUF(mac); 7560 DECLARE_MAC_BUF(mac);
7561 int rc = 0; 7561 int rc = 0;
7562 u8 sta_id; 7562 u8 sta_id;
@@ -7615,7 +7615,7 @@ static int iwl4965_mac_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd,
7615static int iwl4965_mac_conf_tx(struct ieee80211_hw *hw, int queue, 7615static int iwl4965_mac_conf_tx(struct ieee80211_hw *hw, int queue,
7616 const struct ieee80211_tx_queue_params *params) 7616 const struct ieee80211_tx_queue_params *params)
7617{ 7617{
7618 struct iwl4965_priv *priv = hw->priv; 7618 struct iwl_priv *priv = hw->priv;
7619 unsigned long flags; 7619 unsigned long flags;
7620 int q; 7620 int q;
7621 7621
@@ -7666,7 +7666,7 @@ static int iwl4965_mac_conf_tx(struct ieee80211_hw *hw, int queue,
7666static int iwl4965_mac_get_tx_stats(struct ieee80211_hw *hw, 7666static int iwl4965_mac_get_tx_stats(struct ieee80211_hw *hw,
7667 struct ieee80211_tx_queue_stats *stats) 7667 struct ieee80211_tx_queue_stats *stats)
7668{ 7668{
7669 struct iwl4965_priv *priv = hw->priv; 7669 struct iwl_priv *priv = hw->priv;
7670 int i, avail; 7670 int i, avail;
7671 struct iwl4965_tx_queue *txq; 7671 struct iwl4965_tx_queue *txq;
7672 struct iwl4965_queue *q; 7672 struct iwl4965_queue *q;
@@ -7717,7 +7717,7 @@ static u64 iwl4965_mac_get_tsf(struct ieee80211_hw *hw)
7717 7717
7718static void iwl4965_mac_reset_tsf(struct ieee80211_hw *hw) 7718static void iwl4965_mac_reset_tsf(struct ieee80211_hw *hw)
7719{ 7719{
7720 struct iwl4965_priv *priv = hw->priv; 7720 struct iwl_priv *priv = hw->priv;
7721 unsigned long flags; 7721 unsigned long flags;
7722 7722
7723 mutex_lock(&priv->mutex); 7723 mutex_lock(&priv->mutex);
@@ -7789,7 +7789,7 @@ static void iwl4965_mac_reset_tsf(struct ieee80211_hw *hw)
7789static int iwl4965_mac_beacon_update(struct ieee80211_hw *hw, struct sk_buff *skb, 7789static int iwl4965_mac_beacon_update(struct ieee80211_hw *hw, struct sk_buff *skb,
7790 struct ieee80211_tx_control *control) 7790 struct ieee80211_tx_control *control)
7791{ 7791{
7792 struct iwl4965_priv *priv = hw->priv; 7792 struct iwl_priv *priv = hw->priv;
7793 unsigned long flags; 7793 unsigned long flags;
7794 7794
7795 mutex_lock(&priv->mutex); 7795 mutex_lock(&priv->mutex);
@@ -7831,7 +7831,7 @@ static int iwl4965_mac_beacon_update(struct ieee80211_hw *hw, struct sk_buff *sk
7831#ifdef CONFIG_IWL4965_HT 7831#ifdef CONFIG_IWL4965_HT
7832 7832
7833static void iwl4965_ht_info_fill(struct ieee80211_conf *conf, 7833static void iwl4965_ht_info_fill(struct ieee80211_conf *conf,
7834 struct iwl4965_priv *priv) 7834 struct iwl_priv *priv)
7835{ 7835{
7836 struct iwl_ht_info *iwl_conf = &priv->current_ht_config; 7836 struct iwl_ht_info *iwl_conf = &priv->current_ht_config;
7837 struct ieee80211_ht_info *ht_conf = &conf->ht_conf; 7837 struct ieee80211_ht_info *ht_conf = &conf->ht_conf;
@@ -7885,7 +7885,7 @@ static void iwl4965_ht_info_fill(struct ieee80211_conf *conf,
7885static int iwl4965_mac_conf_ht(struct ieee80211_hw *hw, 7885static int iwl4965_mac_conf_ht(struct ieee80211_hw *hw,
7886 struct ieee80211_conf *conf) 7886 struct ieee80211_conf *conf)
7887{ 7887{
7888 struct iwl4965_priv *priv = hw->priv; 7888 struct iwl_priv *priv = hw->priv;
7889 7889
7890 IWL_DEBUG_MAC80211("enter: \n"); 7890 IWL_DEBUG_MAC80211("enter: \n");
7891 7891
@@ -7960,7 +7960,7 @@ static ssize_t show_rf_kill(struct device *d,
7960 * 2 - HW based RF kill active 7960 * 2 - HW based RF kill active
7961 * 3 - Both HW and SW based RF kill active 7961 * 3 - Both HW and SW based RF kill active
7962 */ 7962 */
7963 struct iwl4965_priv *priv = (struct iwl4965_priv *)d->driver_data; 7963 struct iwl_priv *priv = (struct iwl_priv *)d->driver_data;
7964 int val = (test_bit(STATUS_RF_KILL_SW, &priv->status) ? 0x1 : 0x0) | 7964 int val = (test_bit(STATUS_RF_KILL_SW, &priv->status) ? 0x1 : 0x0) |
7965 (test_bit(STATUS_RF_KILL_HW, &priv->status) ? 0x2 : 0x0); 7965 (test_bit(STATUS_RF_KILL_HW, &priv->status) ? 0x2 : 0x0);
7966 7966
@@ -7971,7 +7971,7 @@ static ssize_t store_rf_kill(struct device *d,
7971 struct device_attribute *attr, 7971 struct device_attribute *attr,
7972 const char *buf, size_t count) 7972 const char *buf, size_t count)
7973{ 7973{
7974 struct iwl4965_priv *priv = (struct iwl4965_priv *)d->driver_data; 7974 struct iwl_priv *priv = (struct iwl_priv *)d->driver_data;
7975 7975
7976 mutex_lock(&priv->mutex); 7976 mutex_lock(&priv->mutex);
7977 iwl4965_radio_kill_sw(priv, buf[0] == '1'); 7977 iwl4965_radio_kill_sw(priv, buf[0] == '1');
@@ -7985,7 +7985,7 @@ static DEVICE_ATTR(rf_kill, S_IWUSR | S_IRUGO, show_rf_kill, store_rf_kill);
7985static ssize_t show_temperature(struct device *d, 7985static ssize_t show_temperature(struct device *d,
7986 struct device_attribute *attr, char *buf) 7986 struct device_attribute *attr, char *buf)
7987{ 7987{
7988 struct iwl4965_priv *priv = (struct iwl4965_priv *)d->driver_data; 7988 struct iwl_priv *priv = (struct iwl_priv *)d->driver_data;
7989 7989
7990 if (!iwl4965_is_alive(priv)) 7990 if (!iwl4965_is_alive(priv))
7991 return -EAGAIN; 7991 return -EAGAIN;
@@ -7999,7 +7999,7 @@ static ssize_t show_rs_window(struct device *d,
7999 struct device_attribute *attr, 7999 struct device_attribute *attr,
8000 char *buf) 8000 char *buf)
8001{ 8001{
8002 struct iwl4965_priv *priv = d->driver_data; 8002 struct iwl_priv *priv = d->driver_data;
8003 return iwl4965_fill_rs_info(priv->hw, buf, IWL_AP_ID); 8003 return iwl4965_fill_rs_info(priv->hw, buf, IWL_AP_ID);
8004} 8004}
8005static DEVICE_ATTR(rs_window, S_IRUGO, show_rs_window, NULL); 8005static DEVICE_ATTR(rs_window, S_IRUGO, show_rs_window, NULL);
@@ -8007,7 +8007,7 @@ static DEVICE_ATTR(rs_window, S_IRUGO, show_rs_window, NULL);
8007static ssize_t show_tx_power(struct device *d, 8007static ssize_t show_tx_power(struct device *d,
8008 struct device_attribute *attr, char *buf) 8008 struct device_attribute *attr, char *buf)
8009{ 8009{
8010 struct iwl4965_priv *priv = (struct iwl4965_priv *)d->driver_data; 8010 struct iwl_priv *priv = (struct iwl_priv *)d->driver_data;
8011 return sprintf(buf, "%d\n", priv->user_txpower_limit); 8011 return sprintf(buf, "%d\n", priv->user_txpower_limit);
8012} 8012}
8013 8013
@@ -8015,7 +8015,7 @@ static ssize_t store_tx_power(struct device *d,
8015 struct device_attribute *attr, 8015 struct device_attribute *attr,
8016 const char *buf, size_t count) 8016 const char *buf, size_t count)
8017{ 8017{
8018 struct iwl4965_priv *priv = (struct iwl4965_priv *)d->driver_data; 8018 struct iwl_priv *priv = (struct iwl_priv *)d->driver_data;
8019 char *p = (char *)buf; 8019 char *p = (char *)buf;
8020 u32 val; 8020 u32 val;
8021 8021
@@ -8034,7 +8034,7 @@ static DEVICE_ATTR(tx_power, S_IWUSR | S_IRUGO, show_tx_power, store_tx_power);
8034static ssize_t show_flags(struct device *d, 8034static ssize_t show_flags(struct device *d,
8035 struct device_attribute *attr, char *buf) 8035 struct device_attribute *attr, char *buf)
8036{ 8036{
8037 struct iwl4965_priv *priv = (struct iwl4965_priv *)d->driver_data; 8037 struct iwl_priv *priv = (struct iwl_priv *)d->driver_data;
8038 8038
8039 return sprintf(buf, "0x%04X\n", priv->active_rxon.flags); 8039 return sprintf(buf, "0x%04X\n", priv->active_rxon.flags);
8040} 8040}
@@ -8043,7 +8043,7 @@ static ssize_t store_flags(struct device *d,
8043 struct device_attribute *attr, 8043 struct device_attribute *attr,
8044 const char *buf, size_t count) 8044 const char *buf, size_t count)
8045{ 8045{
8046 struct iwl4965_priv *priv = (struct iwl4965_priv *)d->driver_data; 8046 struct iwl_priv *priv = (struct iwl_priv *)d->driver_data;
8047 u32 flags = simple_strtoul(buf, NULL, 0); 8047 u32 flags = simple_strtoul(buf, NULL, 0);
8048 8048
8049 mutex_lock(&priv->mutex); 8049 mutex_lock(&priv->mutex);
@@ -8068,7 +8068,7 @@ static DEVICE_ATTR(flags, S_IWUSR | S_IRUGO, show_flags, store_flags);
8068static ssize_t show_filter_flags(struct device *d, 8068static ssize_t show_filter_flags(struct device *d,
8069 struct device_attribute *attr, char *buf) 8069 struct device_attribute *attr, char *buf)
8070{ 8070{
8071 struct iwl4965_priv *priv = (struct iwl4965_priv *)d->driver_data; 8071 struct iwl_priv *priv = (struct iwl_priv *)d->driver_data;
8072 8072
8073 return sprintf(buf, "0x%04X\n", 8073 return sprintf(buf, "0x%04X\n",
8074 le32_to_cpu(priv->active_rxon.filter_flags)); 8074 le32_to_cpu(priv->active_rxon.filter_flags));
@@ -8078,7 +8078,7 @@ static ssize_t store_filter_flags(struct device *d,
8078 struct device_attribute *attr, 8078 struct device_attribute *attr,
8079 const char *buf, size_t count) 8079 const char *buf, size_t count)
8080{ 8080{
8081 struct iwl4965_priv *priv = (struct iwl4965_priv *)d->driver_data; 8081 struct iwl_priv *priv = (struct iwl_priv *)d->driver_data;
8082 u32 filter_flags = simple_strtoul(buf, NULL, 0); 8082 u32 filter_flags = simple_strtoul(buf, NULL, 0);
8083 8083
8084 mutex_lock(&priv->mutex); 8084 mutex_lock(&priv->mutex);
@@ -8107,7 +8107,7 @@ static DEVICE_ATTR(filter_flags, S_IWUSR | S_IRUGO, show_filter_flags,
8107static ssize_t show_measurement(struct device *d, 8107static ssize_t show_measurement(struct device *d,
8108 struct device_attribute *attr, char *buf) 8108 struct device_attribute *attr, char *buf)
8109{ 8109{
8110 struct iwl4965_priv *priv = dev_get_drvdata(d); 8110 struct iwl_priv *priv = dev_get_drvdata(d);
8111 struct iwl4965_spectrum_notification measure_report; 8111 struct iwl4965_spectrum_notification measure_report;
8112 u32 size = sizeof(measure_report), len = 0, ofs = 0; 8112 u32 size = sizeof(measure_report), len = 0, ofs = 0;
8113 u8 *data = (u8 *) & measure_report; 8113 u8 *data = (u8 *) & measure_report;
@@ -8140,7 +8140,7 @@ static ssize_t store_measurement(struct device *d,
8140 struct device_attribute *attr, 8140 struct device_attribute *attr,
8141 const char *buf, size_t count) 8141 const char *buf, size_t count)
8142{ 8142{
8143 struct iwl4965_priv *priv = dev_get_drvdata(d); 8143 struct iwl_priv *priv = dev_get_drvdata(d);
8144 struct ieee80211_measurement_params params = { 8144 struct ieee80211_measurement_params params = {
8145 .channel = le16_to_cpu(priv->active_rxon.channel), 8145 .channel = le16_to_cpu(priv->active_rxon.channel),
8146 .start_time = cpu_to_le64(priv->last_tsf), 8146 .start_time = cpu_to_le64(priv->last_tsf),
@@ -8179,7 +8179,7 @@ static ssize_t store_retry_rate(struct device *d,
8179 struct device_attribute *attr, 8179 struct device_attribute *attr,
8180 const char *buf, size_t count) 8180 const char *buf, size_t count)
8181{ 8181{
8182 struct iwl4965_priv *priv = dev_get_drvdata(d); 8182 struct iwl_priv *priv = dev_get_drvdata(d);
8183 8183
8184 priv->retry_rate = simple_strtoul(buf, NULL, 0); 8184 priv->retry_rate = simple_strtoul(buf, NULL, 0);
8185 if (priv->retry_rate <= 0) 8185 if (priv->retry_rate <= 0)
@@ -8191,7 +8191,7 @@ static ssize_t store_retry_rate(struct device *d,
8191static ssize_t show_retry_rate(struct device *d, 8191static ssize_t show_retry_rate(struct device *d,
8192 struct device_attribute *attr, char *buf) 8192 struct device_attribute *attr, char *buf)
8193{ 8193{
8194 struct iwl4965_priv *priv = dev_get_drvdata(d); 8194 struct iwl_priv *priv = dev_get_drvdata(d);
8195 return sprintf(buf, "%d", priv->retry_rate); 8195 return sprintf(buf, "%d", priv->retry_rate);
8196} 8196}
8197 8197
@@ -8202,7 +8202,7 @@ static ssize_t store_power_level(struct device *d,
8202 struct device_attribute *attr, 8202 struct device_attribute *attr,
8203 const char *buf, size_t count) 8203 const char *buf, size_t count)
8204{ 8204{
8205 struct iwl4965_priv *priv = dev_get_drvdata(d); 8205 struct iwl_priv *priv = dev_get_drvdata(d);
8206 int rc; 8206 int rc;
8207 int mode; 8207 int mode;
8208 8208
@@ -8256,7 +8256,7 @@ static const s32 period_duration[] = {
8256static ssize_t show_power_level(struct device *d, 8256static ssize_t show_power_level(struct device *d,
8257 struct device_attribute *attr, char *buf) 8257 struct device_attribute *attr, char *buf)
8258{ 8258{
8259 struct iwl4965_priv *priv = dev_get_drvdata(d); 8259 struct iwl_priv *priv = dev_get_drvdata(d);
8260 int level = IWL_POWER_LEVEL(priv->power_mode); 8260 int level = IWL_POWER_LEVEL(priv->power_mode);
8261 char *p = buf; 8261 char *p = buf;
8262 8262
@@ -8300,7 +8300,7 @@ static DEVICE_ATTR(channels, S_IRUSR, show_channels, NULL);
8300static ssize_t show_statistics(struct device *d, 8300static ssize_t show_statistics(struct device *d,
8301 struct device_attribute *attr, char *buf) 8301 struct device_attribute *attr, char *buf)
8302{ 8302{
8303 struct iwl4965_priv *priv = dev_get_drvdata(d); 8303 struct iwl_priv *priv = dev_get_drvdata(d);
8304 u32 size = sizeof(struct iwl4965_notif_statistics); 8304 u32 size = sizeof(struct iwl4965_notif_statistics);
8305 u32 len = 0, ofs = 0; 8305 u32 len = 0, ofs = 0;
8306 u8 *data = (u8 *) & priv->statistics; 8306 u8 *data = (u8 *) & priv->statistics;
@@ -8338,7 +8338,7 @@ static DEVICE_ATTR(statistics, S_IRUGO, show_statistics, NULL);
8338static ssize_t show_antenna(struct device *d, 8338static ssize_t show_antenna(struct device *d,
8339 struct device_attribute *attr, char *buf) 8339 struct device_attribute *attr, char *buf)
8340{ 8340{
8341 struct iwl4965_priv *priv = dev_get_drvdata(d); 8341 struct iwl_priv *priv = dev_get_drvdata(d);
8342 8342
8343 if (!iwl4965_is_alive(priv)) 8343 if (!iwl4965_is_alive(priv))
8344 return -EAGAIN; 8344 return -EAGAIN;
@@ -8351,7 +8351,7 @@ static ssize_t store_antenna(struct device *d,
8351 const char *buf, size_t count) 8351 const char *buf, size_t count)
8352{ 8352{
8353 int ant; 8353 int ant;
8354 struct iwl4965_priv *priv = dev_get_drvdata(d); 8354 struct iwl_priv *priv = dev_get_drvdata(d);
8355 8355
8356 if (count == 0) 8356 if (count == 0)
8357 return 0; 8357 return 0;
@@ -8376,7 +8376,7 @@ static DEVICE_ATTR(antenna, S_IWUSR | S_IRUGO, show_antenna, store_antenna);
8376static ssize_t show_status(struct device *d, 8376static ssize_t show_status(struct device *d,
8377 struct device_attribute *attr, char *buf) 8377 struct device_attribute *attr, char *buf)
8378{ 8378{
8379 struct iwl4965_priv *priv = (struct iwl4965_priv *)d->driver_data; 8379 struct iwl_priv *priv = (struct iwl_priv *)d->driver_data;
8380 if (!iwl4965_is_alive(priv)) 8380 if (!iwl4965_is_alive(priv))
8381 return -EAGAIN; 8381 return -EAGAIN;
8382 return sprintf(buf, "0x%08x\n", (int)priv->status); 8382 return sprintf(buf, "0x%08x\n", (int)priv->status);
@@ -8391,7 +8391,7 @@ static ssize_t dump_error_log(struct device *d,
8391 char *p = (char *)buf; 8391 char *p = (char *)buf;
8392 8392
8393 if (p[0] == '1') 8393 if (p[0] == '1')
8394 iwl4965_dump_nic_error_log((struct iwl4965_priv *)d->driver_data); 8394 iwl4965_dump_nic_error_log((struct iwl_priv *)d->driver_data);
8395 8395
8396 return strnlen(buf, count); 8396 return strnlen(buf, count);
8397} 8397}
@@ -8405,7 +8405,7 @@ static ssize_t dump_event_log(struct device *d,
8405 char *p = (char *)buf; 8405 char *p = (char *)buf;
8406 8406
8407 if (p[0] == '1') 8407 if (p[0] == '1')
8408 iwl4965_dump_nic_event_log((struct iwl4965_priv *)d->driver_data); 8408 iwl4965_dump_nic_event_log((struct iwl_priv *)d->driver_data);
8409 8409
8410 return strnlen(buf, count); 8410 return strnlen(buf, count);
8411} 8411}
@@ -8418,7 +8418,7 @@ static DEVICE_ATTR(dump_events, S_IWUSR, NULL, dump_event_log);
8418 * 8418 *
8419 *****************************************************************************/ 8419 *****************************************************************************/
8420 8420
8421static void iwl4965_setup_deferred_work(struct iwl4965_priv *priv) 8421static void iwl4965_setup_deferred_work(struct iwl_priv *priv)
8422{ 8422{
8423 priv->workqueue = create_workqueue(DRV_NAME); 8423 priv->workqueue = create_workqueue(DRV_NAME);
8424 8424
@@ -8443,7 +8443,7 @@ static void iwl4965_setup_deferred_work(struct iwl4965_priv *priv)
8443 iwl4965_irq_tasklet, (unsigned long)priv); 8443 iwl4965_irq_tasklet, (unsigned long)priv);
8444} 8444}
8445 8445
8446static void iwl4965_cancel_deferred_work(struct iwl4965_priv *priv) 8446static void iwl4965_cancel_deferred_work(struct iwl_priv *priv)
8447{ 8447{
8448 iwl4965_hw_cancel_deferred_work(priv); 8448 iwl4965_hw_cancel_deferred_work(priv);
8449 8449
@@ -8508,7 +8508,7 @@ static struct ieee80211_ops iwl4965_hw_ops = {
8508static int iwl4965_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) 8508static int iwl4965_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
8509{ 8509{
8510 int err = 0; 8510 int err = 0;
8511 struct iwl4965_priv *priv; 8511 struct iwl_priv *priv;
8512 struct ieee80211_hw *hw; 8512 struct ieee80211_hw *hw;
8513 struct iwl_cfg *cfg = (struct iwl_cfg *)(ent->driver_data); 8513 struct iwl_cfg *cfg = (struct iwl_cfg *)(ent->driver_data);
8514 int i; 8514 int i;
@@ -8531,7 +8531,7 @@ static int iwl4965_pci_probe(struct pci_dev *pdev, const struct pci_device_id *e
8531 8531
8532 /* mac80211 allocates memory for this device instance, including 8532 /* mac80211 allocates memory for this device instance, including
8533 * space for this driver's private structure */ 8533 * space for this driver's private structure */
8534 hw = ieee80211_alloc_hw(sizeof(struct iwl4965_priv), &iwl4965_hw_ops); 8534 hw = ieee80211_alloc_hw(sizeof(struct iwl_priv), &iwl4965_hw_ops);
8535 if (hw == NULL) { 8535 if (hw == NULL) {
8536 IWL_ERROR("Can not allocate network device\n"); 8536 IWL_ERROR("Can not allocate network device\n");
8537 err = -ENOMEM; 8537 err = -ENOMEM;
@@ -8758,7 +8758,7 @@ static int iwl4965_pci_probe(struct pci_dev *pdev, const struct pci_device_id *e
8758 8758
8759static void iwl4965_pci_remove(struct pci_dev *pdev) 8759static void iwl4965_pci_remove(struct pci_dev *pdev)
8760{ 8760{
8761 struct iwl4965_priv *priv = pci_get_drvdata(pdev); 8761 struct iwl_priv *priv = pci_get_drvdata(pdev);
8762 struct list_head *p, *q; 8762 struct list_head *p, *q;
8763 int i; 8763 int i;
8764 8764
@@ -8822,7 +8822,7 @@ static void iwl4965_pci_remove(struct pci_dev *pdev)
8822 8822
8823static int iwl4965_pci_suspend(struct pci_dev *pdev, pm_message_t state) 8823static int iwl4965_pci_suspend(struct pci_dev *pdev, pm_message_t state)
8824{ 8824{
8825 struct iwl4965_priv *priv = pci_get_drvdata(pdev); 8825 struct iwl_priv *priv = pci_get_drvdata(pdev);
8826 8826
8827 if (priv->is_open) { 8827 if (priv->is_open) {
8828 set_bit(STATUS_IN_SUSPEND, &priv->status); 8828 set_bit(STATUS_IN_SUSPEND, &priv->status);
@@ -8837,7 +8837,7 @@ static int iwl4965_pci_suspend(struct pci_dev *pdev, pm_message_t state)
8837 8837
8838static int iwl4965_pci_resume(struct pci_dev *pdev) 8838static int iwl4965_pci_resume(struct pci_dev *pdev)
8839{ 8839{
8840 struct iwl4965_priv *priv = pci_get_drvdata(pdev); 8840 struct iwl_priv *priv = pci_get_drvdata(pdev);
8841 8841
8842 pci_set_power_state(pdev, PCI_D0); 8842 pci_set_power_state(pdev, PCI_D0);
8843 8843