aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/b43/main.c
diff options
context:
space:
mode:
authorMichael Buesch <mb@bu3sch.de>2008-02-13 08:31:08 -0500
committerJohn W. Linville <linville@tuxdriver.com>2008-02-29 15:37:08 -0500
commit35f0d354bf0b0c125ac814419202f8c551081fda (patch)
tree2eef4501002de33983ff1f4acda35acbcc1797bd /drivers/net/wireless/b43/main.c
parentd0f5afbe6de6b8c06f94a8a0b370252e3863afe7 (diff)
b43: Add HostFlags HI support
This adds support for the high 16 bits of the hostflags. No functional change. Signed-off-by: Michael Buesch <mb@bu3sch.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/b43/main.c')
-rw-r--r--drivers/net/wireless/b43/main.c20
1 files changed, 13 insertions, 7 deletions
diff --git a/drivers/net/wireless/b43/main.c b/drivers/net/wireless/b43/main.c
index 071f61437c67..f745308faaad 100644
--- a/drivers/net/wireless/b43/main.c
+++ b/drivers/net/wireless/b43/main.c
@@ -465,24 +465,30 @@ out:
465} 465}
466 466
467/* Read HostFlags */ 467/* Read HostFlags */
468u32 b43_hf_read(struct b43_wldev * dev) 468u64 b43_hf_read(struct b43_wldev * dev)
469{ 469{
470 u32 ret; 470 u64 ret;
471 471
472 ret = b43_shm_read16(dev, B43_SHM_SHARED, B43_SHM_SH_HOSTFHI); 472 ret = b43_shm_read16(dev, B43_SHM_SHARED, B43_SHM_SH_HOSTFHI);
473 ret <<= 16; 473 ret <<= 16;
474 ret |= b43_shm_read16(dev, B43_SHM_SHARED, B43_SHM_SH_HOSTFMI);
475 ret <<= 16;
474 ret |= b43_shm_read16(dev, B43_SHM_SHARED, B43_SHM_SH_HOSTFLO); 476 ret |= b43_shm_read16(dev, B43_SHM_SHARED, B43_SHM_SH_HOSTFLO);
475 477
476 return ret; 478 return ret;
477} 479}
478 480
479/* Write HostFlags */ 481/* Write HostFlags */
480void b43_hf_write(struct b43_wldev *dev, u32 value) 482void b43_hf_write(struct b43_wldev *dev, u64 value)
481{ 483{
482 b43_shm_write16(dev, B43_SHM_SHARED, 484 u16 lo, mi, hi;
483 B43_SHM_SH_HOSTFLO, (value & 0x0000FFFF)); 485
484 b43_shm_write16(dev, B43_SHM_SHARED, 486 lo = (value & 0x00000000FFFFULL);
485 B43_SHM_SH_HOSTFHI, ((value & 0xFFFF0000) >> 16)); 487 mi = (value & 0x0000FFFF0000ULL) >> 16;
488 hi = (value & 0xFFFF00000000ULL) >> 32;
489 b43_shm_write16(dev, B43_SHM_SHARED, B43_SHM_SH_HOSTFLO, lo);
490 b43_shm_write16(dev, B43_SHM_SHARED, B43_SHM_SH_HOSTFMI, mi);
491 b43_shm_write16(dev, B43_SHM_SHARED, B43_SHM_SH_HOSTFHI, hi);
486} 492}
487 493
488void b43_tsf_read(struct b43_wldev *dev, u64 * tsf) 494void b43_tsf_read(struct b43_wldev *dev, u64 * tsf)