aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/b43/tables.c
diff options
context:
space:
mode:
authorDavid Woodhouse <David.Woodhouse@intel.com>2008-10-13 12:13:56 -0400
committerDavid Woodhouse <David.Woodhouse@intel.com>2008-10-13 12:13:56 -0400
commite758936e02700ff88a0b08b722a3847b95283ef2 (patch)
tree50c919bef1b459a778b85159d5929de95b6c4a01 /drivers/net/wireless/b43/tables.c
parent239cfbde1f5843c4a24199f117d5f67f637d72d5 (diff)
parent4480f15b3306f43bbb0310d461142b4e897ca45b (diff)
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
Conflicts: include/asm-x86/statfs.h
Diffstat (limited to 'drivers/net/wireless/b43/tables.c')
-rw-r--r--drivers/net/wireless/b43/tables.c43
1 files changed, 22 insertions, 21 deletions
diff --git a/drivers/net/wireless/b43/tables.c b/drivers/net/wireless/b43/tables.c
index 3f5ea06bf13c..1ef9a6463ec6 100644
--- a/drivers/net/wireless/b43/tables.c
+++ b/drivers/net/wireless/b43/tables.c
@@ -27,7 +27,8 @@
27 27
28#include "b43.h" 28#include "b43.h"
29#include "tables.h" 29#include "tables.h"
30#include "phy.h" 30#include "phy_g.h"
31
31 32
32const u32 b43_tab_rotor[] = { 33const u32 b43_tab_rotor[] = {
33 0xFEB93FFD, 0xFEC63FFD, /* 0 */ 34 0xFEB93FFD, 0xFEC63FFD, /* 0 */
@@ -377,17 +378,17 @@ static inline void assert_sizes(void)
377 378
378u16 b43_ofdmtab_read16(struct b43_wldev *dev, u16 table, u16 offset) 379u16 b43_ofdmtab_read16(struct b43_wldev *dev, u16 table, u16 offset)
379{ 380{
380 struct b43_phy *phy = &dev->phy; 381 struct b43_phy_g *gphy = dev->phy.g;
381 u16 addr; 382 u16 addr;
382 383
383 addr = table + offset; 384 addr = table + offset;
384 if ((phy->ofdmtab_addr_direction != B43_OFDMTAB_DIRECTION_READ) || 385 if ((gphy->ofdmtab_addr_direction != B43_OFDMTAB_DIRECTION_READ) ||
385 (addr - 1 != phy->ofdmtab_addr)) { 386 (addr - 1 != gphy->ofdmtab_addr)) {
386 /* The hardware has a different address in memory. Update it. */ 387 /* The hardware has a different address in memory. Update it. */
387 b43_phy_write(dev, B43_PHY_OTABLECTL, addr); 388 b43_phy_write(dev, B43_PHY_OTABLECTL, addr);
388 phy->ofdmtab_addr_direction = B43_OFDMTAB_DIRECTION_READ; 389 gphy->ofdmtab_addr_direction = B43_OFDMTAB_DIRECTION_READ;
389 } 390 }
390 phy->ofdmtab_addr = addr; 391 gphy->ofdmtab_addr = addr;
391 392
392 return b43_phy_read(dev, B43_PHY_OTABLEI); 393 return b43_phy_read(dev, B43_PHY_OTABLEI);
393 394
@@ -398,34 +399,34 @@ u16 b43_ofdmtab_read16(struct b43_wldev *dev, u16 table, u16 offset)
398void b43_ofdmtab_write16(struct b43_wldev *dev, u16 table, 399void b43_ofdmtab_write16(struct b43_wldev *dev, u16 table,
399 u16 offset, u16 value) 400 u16 offset, u16 value)
400{ 401{
401 struct b43_phy *phy = &dev->phy; 402 struct b43_phy_g *gphy = dev->phy.g;
402 u16 addr; 403 u16 addr;
403 404
404 addr = table + offset; 405 addr = table + offset;
405 if ((phy->ofdmtab_addr_direction != B43_OFDMTAB_DIRECTION_WRITE) || 406 if ((gphy->ofdmtab_addr_direction != B43_OFDMTAB_DIRECTION_WRITE) ||
406 (addr - 1 != phy->ofdmtab_addr)) { 407 (addr - 1 != gphy->ofdmtab_addr)) {
407 /* The hardware has a different address in memory. Update it. */ 408 /* The hardware has a different address in memory. Update it. */
408 b43_phy_write(dev, B43_PHY_OTABLECTL, addr); 409 b43_phy_write(dev, B43_PHY_OTABLECTL, addr);
409 phy->ofdmtab_addr_direction = B43_OFDMTAB_DIRECTION_WRITE; 410 gphy->ofdmtab_addr_direction = B43_OFDMTAB_DIRECTION_WRITE;
410 } 411 }
411 phy->ofdmtab_addr = addr; 412 gphy->ofdmtab_addr = addr;
412 b43_phy_write(dev, B43_PHY_OTABLEI, value); 413 b43_phy_write(dev, B43_PHY_OTABLEI, value);
413} 414}
414 415
415u32 b43_ofdmtab_read32(struct b43_wldev *dev, u16 table, u16 offset) 416u32 b43_ofdmtab_read32(struct b43_wldev *dev, u16 table, u16 offset)
416{ 417{
417 struct b43_phy *phy = &dev->phy; 418 struct b43_phy_g *gphy = dev->phy.g;
418 u32 ret; 419 u32 ret;
419 u16 addr; 420 u16 addr;
420 421
421 addr = table + offset; 422 addr = table + offset;
422 if ((phy->ofdmtab_addr_direction != B43_OFDMTAB_DIRECTION_READ) || 423 if ((gphy->ofdmtab_addr_direction != B43_OFDMTAB_DIRECTION_READ) ||
423 (addr - 1 != phy->ofdmtab_addr)) { 424 (addr - 1 != gphy->ofdmtab_addr)) {
424 /* The hardware has a different address in memory. Update it. */ 425 /* The hardware has a different address in memory. Update it. */
425 b43_phy_write(dev, B43_PHY_OTABLECTL, addr); 426 b43_phy_write(dev, B43_PHY_OTABLECTL, addr);
426 phy->ofdmtab_addr_direction = B43_OFDMTAB_DIRECTION_READ; 427 gphy->ofdmtab_addr_direction = B43_OFDMTAB_DIRECTION_READ;
427 } 428 }
428 phy->ofdmtab_addr = addr; 429 gphy->ofdmtab_addr = addr;
429 ret = b43_phy_read(dev, B43_PHY_OTABLEQ); 430 ret = b43_phy_read(dev, B43_PHY_OTABLEQ);
430 ret <<= 16; 431 ret <<= 16;
431 ret |= b43_phy_read(dev, B43_PHY_OTABLEI); 432 ret |= b43_phy_read(dev, B43_PHY_OTABLEI);
@@ -436,17 +437,17 @@ u32 b43_ofdmtab_read32(struct b43_wldev *dev, u16 table, u16 offset)
436void b43_ofdmtab_write32(struct b43_wldev *dev, u16 table, 437void b43_ofdmtab_write32(struct b43_wldev *dev, u16 table,
437 u16 offset, u32 value) 438 u16 offset, u32 value)
438{ 439{
439 struct b43_phy *phy = &dev->phy; 440 struct b43_phy_g *gphy = dev->phy.g;
440 u16 addr; 441 u16 addr;
441 442
442 addr = table + offset; 443 addr = table + offset;
443 if ((phy->ofdmtab_addr_direction != B43_OFDMTAB_DIRECTION_WRITE) || 444 if ((gphy->ofdmtab_addr_direction != B43_OFDMTAB_DIRECTION_WRITE) ||
444 (addr - 1 != phy->ofdmtab_addr)) { 445 (addr - 1 != gphy->ofdmtab_addr)) {
445 /* The hardware has a different address in memory. Update it. */ 446 /* The hardware has a different address in memory. Update it. */
446 b43_phy_write(dev, B43_PHY_OTABLECTL, addr); 447 b43_phy_write(dev, B43_PHY_OTABLECTL, addr);
447 phy->ofdmtab_addr_direction = B43_OFDMTAB_DIRECTION_WRITE; 448 gphy->ofdmtab_addr_direction = B43_OFDMTAB_DIRECTION_WRITE;
448 } 449 }
449 phy->ofdmtab_addr = addr; 450 gphy->ofdmtab_addr = addr;
450 451
451 b43_phy_write(dev, B43_PHY_OTABLEI, value); 452 b43_phy_write(dev, B43_PHY_OTABLEI, value);
452 b43_phy_write(dev, B43_PHY_OTABLEQ, (value >> 16)); 453 b43_phy_write(dev, B43_PHY_OTABLEQ, (value >> 16));