diff options
author | Luciano Coelho <coelho@ti.com> | 2012-06-25 07:15:55 -0400 |
---|---|---|
committer | Luciano Coelho <coelho@ti.com> | 2012-06-26 13:20:17 -0400 |
commit | e59bec1628654b6dcbad4e64d43c41c1f31d216c (patch) | |
tree | d1755235a870225ea4bd130eff1af0c480c927bc /drivers/net | |
parent | 725b82775e7901dc92afaddfa45683934e75c33e (diff) |
wl18xx: deprecate PG1 support
The new PG2 version of the chip has a few differences in terms of FW
API if compared to PG1. PG1 is just a sample that shouldn't be used
in real life, so to avoid having to handle both separately, mark the
PG1 version as deprecated and bail out during probe.
Signed-off-by: Luciano Coelho <coelho@ti.com>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/wireless/ti/wl18xx/acx.h | 34 | ||||
-rw-r--r-- | drivers/net/wireless/ti/wl18xx/main.c | 45 |
2 files changed, 22 insertions, 57 deletions
diff --git a/drivers/net/wireless/ti/wl18xx/acx.h b/drivers/net/wireless/ti/wl18xx/acx.h index ebbaf611e97b..e2609a6b7341 100644 --- a/drivers/net/wireless/ti/wl18xx/acx.h +++ b/drivers/net/wireless/ti/wl18xx/acx.h | |||
@@ -32,25 +32,21 @@ enum { | |||
32 | /* numbers of bits the length field takes (add 1 for the actual number) */ | 32 | /* numbers of bits the length field takes (add 1 for the actual number) */ |
33 | #define WL18XX_HOST_IF_LEN_SIZE_FIELD 15 | 33 | #define WL18XX_HOST_IF_LEN_SIZE_FIELD 15 |
34 | 34 | ||
35 | #define WL18XX_ACX_EVENTS_VECTOR_PG1 (WL1271_ACX_INTR_WATCHDOG | \ | 35 | #define WL18XX_ACX_EVENTS_VECTOR (WL1271_ACX_INTR_WATCHDOG | \ |
36 | WL1271_ACX_INTR_INIT_COMPLETE | \ | 36 | WL1271_ACX_INTR_INIT_COMPLETE | \ |
37 | WL1271_ACX_INTR_EVENT_A | \ | 37 | WL1271_ACX_INTR_EVENT_A | \ |
38 | WL1271_ACX_INTR_EVENT_B | \ | 38 | WL1271_ACX_INTR_EVENT_B | \ |
39 | WL1271_ACX_INTR_CMD_COMPLETE | \ | 39 | WL1271_ACX_INTR_CMD_COMPLETE | \ |
40 | WL1271_ACX_INTR_HW_AVAILABLE | \ | 40 | WL1271_ACX_INTR_HW_AVAILABLE | \ |
41 | WL1271_ACX_INTR_DATA) | 41 | WL1271_ACX_INTR_DATA | \ |
42 | 42 | WL1271_ACX_SW_INTR_WATCHDOG) | |
43 | #define WL18XX_ACX_EVENTS_VECTOR_PG2 (WL18XX_ACX_EVENTS_VECTOR_PG1 | \ | 43 | |
44 | WL1271_ACX_SW_INTR_WATCHDOG) | 44 | #define WL18XX_INTR_MASK (WL1271_ACX_INTR_WATCHDOG | \ |
45 | 45 | WL1271_ACX_INTR_EVENT_A | \ | |
46 | #define WL18XX_INTR_MASK_PG1 (WL1271_ACX_INTR_WATCHDOG | \ | 46 | WL1271_ACX_INTR_EVENT_B | \ |
47 | WL1271_ACX_INTR_EVENT_A | \ | 47 | WL1271_ACX_INTR_HW_AVAILABLE | \ |
48 | WL1271_ACX_INTR_EVENT_B | \ | 48 | WL1271_ACX_INTR_DATA | \ |
49 | WL1271_ACX_INTR_HW_AVAILABLE | \ | 49 | WL1271_ACX_SW_INTR_WATCHDOG) |
50 | WL1271_ACX_INTR_DATA) | ||
51 | |||
52 | #define WL18XX_INTR_MASK_PG2 (WL18XX_INTR_MASK_PG1 | \ | ||
53 | WL1271_ACX_SW_INTR_WATCHDOG) | ||
54 | 50 | ||
55 | struct wl18xx_acx_host_config_bitmap { | 51 | struct wl18xx_acx_host_config_bitmap { |
56 | struct acx_header header; | 52 | struct acx_header header; |
diff --git a/drivers/net/wireless/ti/wl18xx/main.c b/drivers/net/wireless/ti/wl18xx/main.c index c25b960faa29..5e583be8f674 100644 --- a/drivers/net/wireless/ti/wl18xx/main.c +++ b/drivers/net/wireless/ti/wl18xx/main.c | |||
@@ -612,20 +612,11 @@ static int wl18xx_identify_chip(struct wl1271 *wl) | |||
612 | WLCORE_QUIRK_TX_PAD_LAST_FRAME; | 612 | WLCORE_QUIRK_TX_PAD_LAST_FRAME; |
613 | break; | 613 | break; |
614 | case CHIP_ID_185x_PG10: | 614 | case CHIP_ID_185x_PG10: |
615 | wl1271_debug(DEBUG_BOOT, "chip id 0x%x (185x PG10)", | 615 | wl1271_warning("chip id 0x%x (185x PG10) is deprecated", |
616 | wl->chip.id); | 616 | wl->chip.id); |
617 | wl->sr_fw_name = WL18XX_FW_NAME; | 617 | ret = -ENODEV; |
618 | /* wl18xx uses the same firmware for PLT */ | 618 | goto out; |
619 | wl->plt_fw_name = WL18XX_FW_NAME; | ||
620 | wl->quirks |= WLCORE_QUIRK_NO_ELP | | ||
621 | WLCORE_QUIRK_FWLOG_NOT_IMPLEMENTED | | ||
622 | WLCORE_QUIRK_RX_BLOCKSIZE_ALIGN | | ||
623 | WLCORE_QUIRK_TX_BLOCKSIZE_ALIGN; | ||
624 | |||
625 | /* PG 1.0 has some problems with MCS_13, so disable it */ | ||
626 | wl->ht_cap[IEEE80211_BAND_2GHZ].mcs.rx_mask[1] &= ~BIT(5); | ||
627 | 619 | ||
628 | break; | ||
629 | default: | 620 | default: |
630 | wl1271_warning("unsupported chip id: 0x%x", wl->chip.id); | 621 | wl1271_warning("unsupported chip id: 0x%x", wl->chip.id); |
631 | ret = -ENODEV; | 622 | ret = -ENODEV; |
@@ -776,21 +767,14 @@ out: | |||
776 | static int wl18xx_set_mac_and_phy(struct wl1271 *wl) | 767 | static int wl18xx_set_mac_and_phy(struct wl1271 *wl) |
777 | { | 768 | { |
778 | struct wl18xx_priv *priv = wl->priv; | 769 | struct wl18xx_priv *priv = wl->priv; |
779 | size_t len; | ||
780 | int ret; | 770 | int ret; |
781 | 771 | ||
782 | /* the parameters struct is smaller for PG1 */ | ||
783 | if (wl->chip.id == CHIP_ID_185x_PG10) | ||
784 | len = offsetof(struct wl18xx_mac_and_phy_params, psat) + 1; | ||
785 | else | ||
786 | len = sizeof(struct wl18xx_mac_and_phy_params); | ||
787 | |||
788 | ret = wlcore_set_partition(wl, &wl->ptable[PART_PHY_INIT]); | 772 | ret = wlcore_set_partition(wl, &wl->ptable[PART_PHY_INIT]); |
789 | if (ret < 0) | 773 | if (ret < 0) |
790 | goto out; | 774 | goto out; |
791 | 775 | ||
792 | ret = wlcore_write(wl, WL18XX_PHY_INIT_MEM_ADDR, (u8 *)&priv->conf.phy, | 776 | ret = wlcore_write(wl, WL18XX_PHY_INIT_MEM_ADDR, (u8 *)&priv->conf.phy, |
793 | len, false); | 777 | sizeof(struct wl18xx_mac_and_phy_params), false); |
794 | 778 | ||
795 | out: | 779 | out: |
796 | return ret; | 780 | return ret; |
@@ -801,13 +785,8 @@ static int wl18xx_enable_interrupts(struct wl1271 *wl) | |||
801 | u32 event_mask, intr_mask; | 785 | u32 event_mask, intr_mask; |
802 | int ret; | 786 | int ret; |
803 | 787 | ||
804 | if (wl->chip.id == CHIP_ID_185x_PG10) { | 788 | event_mask = WL18XX_ACX_EVENTS_VECTOR; |
805 | event_mask = WL18XX_ACX_EVENTS_VECTOR_PG1; | 789 | intr_mask = WL18XX_INTR_MASK; |
806 | intr_mask = WL18XX_INTR_MASK_PG1; | ||
807 | } else { | ||
808 | event_mask = WL18XX_ACX_EVENTS_VECTOR_PG2; | ||
809 | intr_mask = WL18XX_INTR_MASK_PG2; | ||
810 | } | ||
811 | 790 | ||
812 | ret = wlcore_write_reg(wl, REG_INTERRUPT_MASK, event_mask); | 791 | ret = wlcore_write_reg(wl, REG_INTERRUPT_MASK, event_mask); |
813 | if (ret < 0) | 792 | if (ret < 0) |
@@ -1049,16 +1028,6 @@ static u32 wl18xx_ap_get_mimo_wide_rate_mask(struct wl1271 *wl, | |||
1049 | } else if (!strcmp(ht_mode_param, "mimo")) { | 1028 | } else if (!strcmp(ht_mode_param, "mimo")) { |
1050 | wl1271_debug(DEBUG_ACX, "using MIMO rate mask"); | 1029 | wl1271_debug(DEBUG_ACX, "using MIMO rate mask"); |
1051 | 1030 | ||
1052 | /* | ||
1053 | * PG 1.0 has some problems with MCS_13, so disable it | ||
1054 | * | ||
1055 | * TODO: instead of hacking this in here, we should | ||
1056 | * make it more general and change a bit in the | ||
1057 | * wlvif->rate_set instead. | ||
1058 | */ | ||
1059 | if (wl->chip.id == CHIP_ID_185x_PG10) | ||
1060 | return CONF_TX_MIMO_RATES & ~CONF_HW_BIT_RATE_MCS_13; | ||
1061 | |||
1062 | return CONF_TX_MIMO_RATES; | 1031 | return CONF_TX_MIMO_RATES; |
1063 | } else { | 1032 | } else { |
1064 | return 0; | 1033 | return 0; |