diff options
author | Rafał Miłecki <zajec5@gmail.com> | 2012-07-25 10:58:38 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2012-08-06 14:56:34 -0400 |
commit | 6e6a2cd510351502064c3e2a56f411a19530cd57 (patch) | |
tree | 28b3c0ad9361a7c585916b1e4a611cc49a3183e3 /drivers/net/wireless/b43 | |
parent | 95a96e08967fed6e64e53b2d6a5e153a4d605e11 (diff) |
b43: rename host flags defines
There are more than 3 registers on new hardware. Host flags handling has
to be rewritten, as we can't use u128 type to handle all 5 regs.
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/b43')
-rw-r--r-- | drivers/net/wireless/b43/b43.h | 8 | ||||
-rw-r--r-- | drivers/net/wireless/b43/main.c | 12 | ||||
-rw-r--r-- | drivers/net/wireless/b43/phy_common.c | 2 |
3 files changed, 12 insertions, 10 deletions
diff --git a/drivers/net/wireless/b43/b43.h b/drivers/net/wireless/b43/b43.h index 7c899fc7ddd0..56d0799e7b4b 100644 --- a/drivers/net/wireless/b43/b43.h +++ b/drivers/net/wireless/b43/b43.h | |||
@@ -241,16 +241,18 @@ enum { | |||
241 | #define B43_SHM_SH_PHYVER 0x0050 /* PHY version */ | 241 | #define B43_SHM_SH_PHYVER 0x0050 /* PHY version */ |
242 | #define B43_SHM_SH_PHYTYPE 0x0052 /* PHY type */ | 242 | #define B43_SHM_SH_PHYTYPE 0x0052 /* PHY type */ |
243 | #define B43_SHM_SH_ANTSWAP 0x005C /* Antenna swap threshold */ | 243 | #define B43_SHM_SH_ANTSWAP 0x005C /* Antenna swap threshold */ |
244 | #define B43_SHM_SH_HOSTFLO 0x005E /* Hostflags for ucode options (low) */ | 244 | #define B43_SHM_SH_HOSTF1 0x005E /* Hostflags 1 for ucode options */ |
245 | #define B43_SHM_SH_HOSTFMI 0x0060 /* Hostflags for ucode options (middle) */ | 245 | #define B43_SHM_SH_HOSTF2 0x0060 /* Hostflags 2 for ucode options */ |
246 | #define B43_SHM_SH_HOSTFHI 0x0062 /* Hostflags for ucode options (high) */ | 246 | #define B43_SHM_SH_HOSTF3 0x0062 /* Hostflags 3 for ucode options */ |
247 | #define B43_SHM_SH_RFATT 0x0064 /* Current radio attenuation value */ | 247 | #define B43_SHM_SH_RFATT 0x0064 /* Current radio attenuation value */ |
248 | #define B43_SHM_SH_RADAR 0x0066 /* Radar register */ | 248 | #define B43_SHM_SH_RADAR 0x0066 /* Radar register */ |
249 | #define B43_SHM_SH_PHYTXNOI 0x006E /* PHY noise directly after TX (lower 8bit only) */ | 249 | #define B43_SHM_SH_PHYTXNOI 0x006E /* PHY noise directly after TX (lower 8bit only) */ |
250 | #define B43_SHM_SH_RFRXSP1 0x0072 /* RF RX SP Register 1 */ | 250 | #define B43_SHM_SH_RFRXSP1 0x0072 /* RF RX SP Register 1 */ |
251 | #define B43_SHM_SH_HOSTF4 0x0078 /* Hostflags 4 for ucode options */ | ||
251 | #define B43_SHM_SH_CHAN 0x00A0 /* Current channel (low 8bit only) */ | 252 | #define B43_SHM_SH_CHAN 0x00A0 /* Current channel (low 8bit only) */ |
252 | #define B43_SHM_SH_CHAN_5GHZ 0x0100 /* Bit set, if 5 Ghz channel */ | 253 | #define B43_SHM_SH_CHAN_5GHZ 0x0100 /* Bit set, if 5 Ghz channel */ |
253 | #define B43_SHM_SH_CHAN_40MHZ 0x0200 /* Bit set, if 40 Mhz channel width */ | 254 | #define B43_SHM_SH_CHAN_40MHZ 0x0200 /* Bit set, if 40 Mhz channel width */ |
255 | #define B43_SHM_SH_HOSTF5 0x00D4 /* Hostflags 5 for ucode options */ | ||
254 | #define B43_SHM_SH_BCMCFIFOID 0x0108 /* Last posted cookie to the bcast/mcast FIFO */ | 256 | #define B43_SHM_SH_BCMCFIFOID 0x0108 /* Last posted cookie to the bcast/mcast FIFO */ |
255 | /* TSSI information */ | 257 | /* TSSI information */ |
256 | #define B43_SHM_SH_TSSI_CCK 0x0058 /* TSSI for last 4 CCK frames (32bit) */ | 258 | #define B43_SHM_SH_TSSI_CCK 0x0058 /* TSSI for last 4 CCK frames (32bit) */ |
diff --git a/drivers/net/wireless/b43/main.c b/drivers/net/wireless/b43/main.c index b80352b308d5..724c771133cc 100644 --- a/drivers/net/wireless/b43/main.c +++ b/drivers/net/wireless/b43/main.c | |||
@@ -533,11 +533,11 @@ u64 b43_hf_read(struct b43_wldev *dev) | |||
533 | { | 533 | { |
534 | u64 ret; | 534 | u64 ret; |
535 | 535 | ||
536 | ret = b43_shm_read16(dev, B43_SHM_SHARED, B43_SHM_SH_HOSTFHI); | 536 | ret = b43_shm_read16(dev, B43_SHM_SHARED, B43_SHM_SH_HOSTF3); |
537 | ret <<= 16; | 537 | ret <<= 16; |
538 | ret |= b43_shm_read16(dev, B43_SHM_SHARED, B43_SHM_SH_HOSTFMI); | 538 | ret |= b43_shm_read16(dev, B43_SHM_SHARED, B43_SHM_SH_HOSTF2); |
539 | ret <<= 16; | 539 | ret <<= 16; |
540 | ret |= b43_shm_read16(dev, B43_SHM_SHARED, B43_SHM_SH_HOSTFLO); | 540 | ret |= b43_shm_read16(dev, B43_SHM_SHARED, B43_SHM_SH_HOSTF1); |
541 | 541 | ||
542 | return ret; | 542 | return ret; |
543 | } | 543 | } |
@@ -550,9 +550,9 @@ void b43_hf_write(struct b43_wldev *dev, u64 value) | |||
550 | lo = (value & 0x00000000FFFFULL); | 550 | lo = (value & 0x00000000FFFFULL); |
551 | mi = (value & 0x0000FFFF0000ULL) >> 16; | 551 | mi = (value & 0x0000FFFF0000ULL) >> 16; |
552 | hi = (value & 0xFFFF00000000ULL) >> 32; | 552 | hi = (value & 0xFFFF00000000ULL) >> 32; |
553 | b43_shm_write16(dev, B43_SHM_SHARED, B43_SHM_SH_HOSTFLO, lo); | 553 | b43_shm_write16(dev, B43_SHM_SHARED, B43_SHM_SH_HOSTF1, lo); |
554 | b43_shm_write16(dev, B43_SHM_SHARED, B43_SHM_SH_HOSTFMI, mi); | 554 | b43_shm_write16(dev, B43_SHM_SHARED, B43_SHM_SH_HOSTF2, mi); |
555 | b43_shm_write16(dev, B43_SHM_SHARED, B43_SHM_SH_HOSTFHI, hi); | 555 | b43_shm_write16(dev, B43_SHM_SHARED, B43_SHM_SH_HOSTF3, hi); |
556 | } | 556 | } |
557 | 557 | ||
558 | /* Read the firmware capabilities bitmask (Opensource firmware only) */ | 558 | /* Read the firmware capabilities bitmask (Opensource firmware only) */ |
diff --git a/drivers/net/wireless/b43/phy_common.c b/drivers/net/wireless/b43/phy_common.c index 3f8883b14d9c..f627cef33227 100644 --- a/drivers/net/wireless/b43/phy_common.c +++ b/drivers/net/wireless/b43/phy_common.c | |||
@@ -428,7 +428,7 @@ int b43_phy_shm_tssi_read(struct b43_wldev *dev, u16 shm_offset) | |||
428 | average = (a + b + c + d + 2) / 4; | 428 | average = (a + b + c + d + 2) / 4; |
429 | if (is_ofdm) { | 429 | if (is_ofdm) { |
430 | /* Adjust for CCK-boost */ | 430 | /* Adjust for CCK-boost */ |
431 | if (b43_shm_read16(dev, B43_SHM_SHARED, B43_SHM_SH_HOSTFLO) | 431 | if (b43_shm_read16(dev, B43_SHM_SHARED, B43_SHM_SH_HOSTF1) |
432 | & B43_HF_CCKBOOST) | 432 | & B43_HF_CCKBOOST) |
433 | average = (average >= 13) ? (average - 13) : 0; | 433 | average = (average >= 13) ? (average - 13) : 0; |
434 | } | 434 | } |