diff options
author | Rafał Miłecki <zajec5@gmail.com> | 2013-03-19 13:12:00 -0400 |
---|---|---|
committer | Rafał Miłecki <zajec5@gmail.com> | 2013-04-23 06:27:56 -0400 |
commit | 2d551f14101d12402779a0872b842e9f0b2da61a (patch) | |
tree | cce8544d8cedb84ddeea3486262564c27aa7abae /drivers/net/wireless/b43 | |
parent | 418e8b680516d3ff7f27a0094fe461cfc8a3e3c4 (diff) |
b43: HT-PHY: use enum for RSSI types
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Diffstat (limited to 'drivers/net/wireless/b43')
-rw-r--r-- | drivers/net/wireless/b43/phy_ht.c | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/drivers/net/wireless/b43/phy_ht.c b/drivers/net/wireless/b43/phy_ht.c index 355651a1099e..5d6833f18498 100644 --- a/drivers/net/wireless/b43/phy_ht.c +++ b/drivers/net/wireless/b43/phy_ht.c | |||
@@ -30,6 +30,17 @@ | |||
30 | #include "radio_2059.h" | 30 | #include "radio_2059.h" |
31 | #include "main.h" | 31 | #include "main.h" |
32 | 32 | ||
33 | /* Force values to keep compatibility with wl */ | ||
34 | enum ht_rssi_type { | ||
35 | HT_RSSI_W1 = 0, | ||
36 | HT_RSSI_W2 = 1, | ||
37 | HT_RSSI_NB = 2, | ||
38 | HT_RSSI_IQ = 3, | ||
39 | HT_RSSI_TSSI_2G = 4, | ||
40 | HT_RSSI_TSSI_5G = 5, | ||
41 | HT_RSSI_TBD = 6, | ||
42 | }; | ||
43 | |||
33 | /************************************************** | 44 | /************************************************** |
34 | * Radio 2059. | 45 | * Radio 2059. |
35 | **************************************************/ | 46 | **************************************************/ |
@@ -383,7 +394,7 @@ static void b43_phy_ht_tx_tone(struct b43_wldev *dev) | |||
383 | **************************************************/ | 394 | **************************************************/ |
384 | 395 | ||
385 | static void b43_phy_ht_rssi_select(struct b43_wldev *dev, u8 core_sel, | 396 | static void b43_phy_ht_rssi_select(struct b43_wldev *dev, u8 core_sel, |
386 | u8 rssi_type) | 397 | enum ht_rssi_type rssi_type) |
387 | { | 398 | { |
388 | static const u16 ctl_regs[3][2] = { | 399 | static const u16 ctl_regs[3][2] = { |
389 | { B43_PHY_HT_AFE_C1, B43_PHY_HT_AFE_C1_OVER, }, | 400 | { B43_PHY_HT_AFE_C1, B43_PHY_HT_AFE_C1_OVER, }, |
@@ -404,7 +415,7 @@ static void b43_phy_ht_rssi_select(struct b43_wldev *dev, u8 core_sel, | |||
404 | continue; | 415 | continue; |
405 | 416 | ||
406 | switch (rssi_type) { | 417 | switch (rssi_type) { |
407 | case 4: | 418 | case HT_RSSI_TSSI_2G: |
408 | b43_phy_set(dev, ctl_regs[core][0], 0x3 << 8); | 419 | b43_phy_set(dev, ctl_regs[core][0], 0x3 << 8); |
409 | b43_phy_set(dev, ctl_regs[core][0], 0x3 << 10); | 420 | b43_phy_set(dev, ctl_regs[core][0], 0x3 << 10); |
410 | b43_phy_set(dev, ctl_regs[core][1], 0x1 << 9); | 421 | b43_phy_set(dev, ctl_regs[core][1], 0x1 << 9); |
@@ -422,8 +433,8 @@ static void b43_phy_ht_rssi_select(struct b43_wldev *dev, u8 core_sel, | |||
422 | } | 433 | } |
423 | } | 434 | } |
424 | 435 | ||
425 | static void b43_phy_ht_poll_rssi(struct b43_wldev *dev, u8 type, s32 *buf, | 436 | static void b43_phy_ht_poll_rssi(struct b43_wldev *dev, enum ht_rssi_type type, |
426 | u8 nsamp) | 437 | s32 *buf, u8 nsamp) |
427 | { | 438 | { |
428 | u16 phy_regs_values[12]; | 439 | u16 phy_regs_values[12]; |
429 | static const u16 phy_regs_to_save[] = { | 440 | static const u16 phy_regs_to_save[] = { |
@@ -549,7 +560,7 @@ static void b43_phy_ht_tx_power_ctl_idle_tssi(struct b43_wldev *dev) | |||
549 | 560 | ||
550 | b43_phy_ht_tx_tone(dev); | 561 | b43_phy_ht_tx_tone(dev); |
551 | udelay(20); | 562 | udelay(20); |
552 | b43_phy_ht_poll_rssi(dev, 4, rssi_buf, 1); | 563 | b43_phy_ht_poll_rssi(dev, HT_RSSI_TSSI_2G, rssi_buf, 1); |
553 | b43_phy_ht_stop_playback(dev); | 564 | b43_phy_ht_stop_playback(dev); |
554 | b43_phy_ht_reset_cca(dev); | 565 | b43_phy_ht_reset_cca(dev); |
555 | 566 | ||