diff options
author | Lior David <liord@codeaurora.org> | 2018-01-21 04:14:42 -0500 |
---|---|---|
committer | Kalle Valo <kvalo@codeaurora.org> | 2018-01-25 00:32:30 -0500 |
commit | 54fca595d1eec3d7d008b322a53a1ebed7f78193 (patch) | |
tree | 75f8a65a7fb1450f2040de7f82dee16f331a1f7c | |
parent | 70bcc658c0b13d9e89033e1981daf0f431f39522 (diff) |
wil6210: enlarge FW mac_rgf_ext section for Sparrow D0
Sparrow D0 chips have slightly larger mac_rgf_ext section
in order to support extra features such as multiple virtual
interfaces.
Signed-off-by: Lior David <liord@codeaurora.org>
Signed-off-by: Maya Erez <merez@codeaurora.org>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
-rw-r--r-- | drivers/net/wireless/ath/wil6210/pcie_bus.c | 12 | ||||
-rw-r--r-- | drivers/net/wireless/ath/wil6210/wil6210.h | 1 | ||||
-rw-r--r-- | drivers/net/wireless/ath/wil6210/wmi.c | 8 |
3 files changed, 18 insertions, 3 deletions
diff --git a/drivers/net/wireless/ath/wil6210/pcie_bus.c b/drivers/net/wireless/ath/wil6210/pcie_bus.c index 750c34edd3f5..809092a49192 100644 --- a/drivers/net/wireless/ath/wil6210/pcie_bus.c +++ b/drivers/net/wireless/ath/wil6210/pcie_bus.c | |||
@@ -43,7 +43,7 @@ int wil_set_capabilities(struct wil6210_priv *wil) | |||
43 | u8 chip_revision = (wil_r(wil, RGF_USER_REVISION_ID) & | 43 | u8 chip_revision = (wil_r(wil, RGF_USER_REVISION_ID) & |
44 | RGF_USER_REVISION_ID_MASK); | 44 | RGF_USER_REVISION_ID_MASK); |
45 | int platform_capa; | 45 | int platform_capa; |
46 | struct fw_map *iccm_section; | 46 | struct fw_map *iccm_section, *sct; |
47 | 47 | ||
48 | bitmap_zero(wil->hw_capa, hw_capa_last); | 48 | bitmap_zero(wil->hw_capa, hw_capa_last); |
49 | bitmap_zero(wil->fw_capabilities, WMI_FW_CAPABILITY_MAX); | 49 | bitmap_zero(wil->fw_capabilities, WMI_FW_CAPABILITY_MAX); |
@@ -54,6 +54,8 @@ int wil_set_capabilities(struct wil6210_priv *wil) | |||
54 | 54 | ||
55 | switch (jtag_id) { | 55 | switch (jtag_id) { |
56 | case JTAG_DEV_ID_SPARROW: | 56 | case JTAG_DEV_ID_SPARROW: |
57 | memcpy(fw_mapping, sparrow_fw_mapping, | ||
58 | sizeof(sparrow_fw_mapping)); | ||
57 | switch (chip_revision) { | 59 | switch (chip_revision) { |
58 | case REVISION_ID_SPARROW_D0: | 60 | case REVISION_ID_SPARROW_D0: |
59 | wil->hw_name = "Sparrow D0"; | 61 | wil->hw_name = "Sparrow D0"; |
@@ -63,6 +65,12 @@ int wil_set_capabilities(struct wil6210_priv *wil) | |||
63 | 65 | ||
64 | if (wil_fw_verify_file_exists(wil, wil_fw_name)) | 66 | if (wil_fw_verify_file_exists(wil, wil_fw_name)) |
65 | wil->wil_fw_name = wil_fw_name; | 67 | wil->wil_fw_name = wil_fw_name; |
68 | sct = wil_find_fw_mapping("mac_rgf_ext"); | ||
69 | if (!sct) { | ||
70 | wil_err(wil, "mac_rgf_ext section not found in fw_mapping\n"); | ||
71 | return -EINVAL; | ||
72 | } | ||
73 | memcpy(sct, &sparrow_d0_mac_rgf_ext, sizeof(*sct)); | ||
66 | break; | 74 | break; |
67 | case REVISION_ID_SPARROW_B0: | 75 | case REVISION_ID_SPARROW_B0: |
68 | wil->hw_name = "Sparrow B0"; | 76 | wil->hw_name = "Sparrow B0"; |
@@ -73,8 +81,6 @@ int wil_set_capabilities(struct wil6210_priv *wil) | |||
73 | wil->hw_version = HW_VER_UNKNOWN; | 81 | wil->hw_version = HW_VER_UNKNOWN; |
74 | break; | 82 | break; |
75 | } | 83 | } |
76 | memcpy(fw_mapping, sparrow_fw_mapping, | ||
77 | sizeof(sparrow_fw_mapping)); | ||
78 | wil->rgf_fw_assert_code_addr = SPARROW_RGF_FW_ASSERT_CODE; | 84 | wil->rgf_fw_assert_code_addr = SPARROW_RGF_FW_ASSERT_CODE; |
79 | wil->rgf_ucode_assert_code_addr = SPARROW_RGF_UCODE_ASSERT_CODE; | 85 | wil->rgf_ucode_assert_code_addr = SPARROW_RGF_UCODE_ASSERT_CODE; |
80 | break; | 86 | break; |
diff --git a/drivers/net/wireless/ath/wil6210/wil6210.h b/drivers/net/wireless/ath/wil6210/wil6210.h index 5f9bcfb9bb86..836122afb091 100644 --- a/drivers/net/wireless/ath/wil6210/wil6210.h +++ b/drivers/net/wireless/ath/wil6210/wil6210.h | |||
@@ -355,6 +355,7 @@ struct fw_map { | |||
355 | 355 | ||
356 | /* array size should be in sync with actual definition in the wmi.c */ | 356 | /* array size should be in sync with actual definition in the wmi.c */ |
357 | extern const struct fw_map sparrow_fw_mapping[SPARROW_FW_MAPPING_TABLE_SIZE]; | 357 | extern const struct fw_map sparrow_fw_mapping[SPARROW_FW_MAPPING_TABLE_SIZE]; |
358 | extern const struct fw_map sparrow_d0_mac_rgf_ext; | ||
358 | extern const struct fw_map talyn_fw_mapping[TALYN_FW_MAPPING_TABLE_SIZE]; | 359 | extern const struct fw_map talyn_fw_mapping[TALYN_FW_MAPPING_TABLE_SIZE]; |
359 | extern struct fw_map fw_mapping[MAX_FW_MAPPING_TABLE_SIZE]; | 360 | extern struct fw_map fw_mapping[MAX_FW_MAPPING_TABLE_SIZE]; |
360 | 361 | ||
diff --git a/drivers/net/wireless/ath/wil6210/wmi.c b/drivers/net/wireless/ath/wil6210/wmi.c index 43c5803a35af..b31e2514f8c2 100644 --- a/drivers/net/wireless/ath/wil6210/wmi.c +++ b/drivers/net/wireless/ath/wil6210/wmi.c | |||
@@ -114,6 +114,14 @@ const struct fw_map sparrow_fw_mapping[] = { | |||
114 | }; | 114 | }; |
115 | 115 | ||
116 | /** | 116 | /** |
117 | * @sparrow_d0_mac_rgf_ext - mac_rgf_ext section for Sparrow D0 | ||
118 | * it is a bit larger to support extra features | ||
119 | */ | ||
120 | const struct fw_map sparrow_d0_mac_rgf_ext = { | ||
121 | 0x88c000, 0x88c500, 0x88c000, "mac_rgf_ext", true | ||
122 | }; | ||
123 | |||
124 | /** | ||
117 | * @talyn_fw_mapping provides memory remapping table for Talyn | 125 | * @talyn_fw_mapping provides memory remapping table for Talyn |
118 | * | 126 | * |
119 | * array size should be in sync with the declaration in the wil6210.h | 127 | * array size should be in sync with the declaration in the wil6210.h |