diff options
Diffstat (limited to 'drivers/net/wireless/ath/ath6kl/init.c')
-rw-r--r-- | drivers/net/wireless/ath/ath6kl/init.c | 28 |
1 files changed, 25 insertions, 3 deletions
diff --git a/drivers/net/wireless/ath/ath6kl/init.c b/drivers/net/wireless/ath/ath6kl/init.c index 7eb0515f458a..f90b5db741cf 100644 --- a/drivers/net/wireless/ath/ath6kl/init.c +++ b/drivers/net/wireless/ath/ath6kl/init.c | |||
@@ -42,6 +42,7 @@ static const struct ath6kl_hw hw_list[] = { | |||
42 | .reserved_ram_size = 6912, | 42 | .reserved_ram_size = 6912, |
43 | .refclk_hz = 26000000, | 43 | .refclk_hz = 26000000, |
44 | .uarttx_pin = 8, | 44 | .uarttx_pin = 8, |
45 | .flags = 0, | ||
45 | 46 | ||
46 | /* hw2.0 needs override address hardcoded */ | 47 | /* hw2.0 needs override address hardcoded */ |
47 | .app_start_override_addr = 0x944C00, | 48 | .app_start_override_addr = 0x944C00, |
@@ -67,6 +68,7 @@ static const struct ath6kl_hw hw_list[] = { | |||
67 | .refclk_hz = 26000000, | 68 | .refclk_hz = 26000000, |
68 | .uarttx_pin = 8, | 69 | .uarttx_pin = 8, |
69 | .testscript_addr = 0x57ef74, | 70 | .testscript_addr = 0x57ef74, |
71 | .flags = 0, | ||
70 | 72 | ||
71 | .fw = { | 73 | .fw = { |
72 | .dir = AR6003_HW_2_1_1_FW_DIR, | 74 | .dir = AR6003_HW_2_1_1_FW_DIR, |
@@ -91,6 +93,7 @@ static const struct ath6kl_hw hw_list[] = { | |||
91 | .board_addr = 0x433900, | 93 | .board_addr = 0x433900, |
92 | .refclk_hz = 26000000, | 94 | .refclk_hz = 26000000, |
93 | .uarttx_pin = 11, | 95 | .uarttx_pin = 11, |
96 | .flags = ATH6KL_HW_FLAG_64BIT_RATES, | ||
94 | 97 | ||
95 | .fw = { | 98 | .fw = { |
96 | .dir = AR6004_HW_1_0_FW_DIR, | 99 | .dir = AR6004_HW_1_0_FW_DIR, |
@@ -110,6 +113,7 @@ static const struct ath6kl_hw hw_list[] = { | |||
110 | .board_addr = 0x43d400, | 113 | .board_addr = 0x43d400, |
111 | .refclk_hz = 40000000, | 114 | .refclk_hz = 40000000, |
112 | .uarttx_pin = 11, | 115 | .uarttx_pin = 11, |
116 | .flags = ATH6KL_HW_FLAG_64BIT_RATES, | ||
113 | 117 | ||
114 | .fw = { | 118 | .fw = { |
115 | .dir = AR6004_HW_1_1_FW_DIR, | 119 | .dir = AR6004_HW_1_1_FW_DIR, |
@@ -129,6 +133,7 @@ static const struct ath6kl_hw hw_list[] = { | |||
129 | .board_addr = 0x435c00, | 133 | .board_addr = 0x435c00, |
130 | .refclk_hz = 40000000, | 134 | .refclk_hz = 40000000, |
131 | .uarttx_pin = 11, | 135 | .uarttx_pin = 11, |
136 | .flags = ATH6KL_HW_FLAG_64BIT_RATES, | ||
132 | 137 | ||
133 | .fw = { | 138 | .fw = { |
134 | .dir = AR6004_HW_1_2_FW_DIR, | 139 | .dir = AR6004_HW_1_2_FW_DIR, |
@@ -938,6 +943,14 @@ static int ath6kl_fetch_fw_apin(struct ath6kl *ar, const char *name) | |||
938 | } | 943 | } |
939 | 944 | ||
940 | switch (ie_id) { | 945 | switch (ie_id) { |
946 | case ATH6KL_FW_IE_FW_VERSION: | ||
947 | strlcpy(ar->wiphy->fw_version, data, | ||
948 | sizeof(ar->wiphy->fw_version)); | ||
949 | |||
950 | ath6kl_dbg(ATH6KL_DBG_BOOT, | ||
951 | "found fw version %s\n", | ||
952 | ar->wiphy->fw_version); | ||
953 | break; | ||
941 | case ATH6KL_FW_IE_OTP_IMAGE: | 954 | case ATH6KL_FW_IE_OTP_IMAGE: |
942 | ath6kl_dbg(ATH6KL_DBG_BOOT, "found otp image ie (%zd B)\n", | 955 | ath6kl_dbg(ATH6KL_DBG_BOOT, "found otp image ie (%zd B)\n", |
943 | ie_len); | 956 | ie_len); |
@@ -991,9 +1004,6 @@ static int ath6kl_fetch_fw_apin(struct ath6kl *ar, const char *name) | |||
991 | ar->hw.reserved_ram_size); | 1004 | ar->hw.reserved_ram_size); |
992 | break; | 1005 | break; |
993 | case ATH6KL_FW_IE_CAPABILITIES: | 1006 | case ATH6KL_FW_IE_CAPABILITIES: |
994 | if (ie_len < DIV_ROUND_UP(ATH6KL_FW_CAPABILITY_MAX, 8)) | ||
995 | break; | ||
996 | |||
997 | ath6kl_dbg(ATH6KL_DBG_BOOT, | 1007 | ath6kl_dbg(ATH6KL_DBG_BOOT, |
998 | "found firmware capabilities ie (%zd B)\n", | 1008 | "found firmware capabilities ie (%zd B)\n", |
999 | ie_len); | 1009 | ie_len); |
@@ -1002,6 +1012,9 @@ static int ath6kl_fetch_fw_apin(struct ath6kl *ar, const char *name) | |||
1002 | index = i / 8; | 1012 | index = i / 8; |
1003 | bit = i % 8; | 1013 | bit = i % 8; |
1004 | 1014 | ||
1015 | if (index == ie_len) | ||
1016 | break; | ||
1017 | |||
1005 | if (data[index] & (1 << bit)) | 1018 | if (data[index] & (1 << bit)) |
1006 | __set_bit(i, ar->fw_capabilities); | 1019 | __set_bit(i, ar->fw_capabilities); |
1007 | } | 1020 | } |
@@ -1392,6 +1405,12 @@ static int ath6kl_init_upload(struct ath6kl *ar) | |||
1392 | ar->version.target_ver == AR6003_HW_2_1_1_VERSION) { | 1405 | ar->version.target_ver == AR6003_HW_2_1_1_VERSION) { |
1393 | ath6kl_err("temporary war to avoid sdio crc error\n"); | 1406 | ath6kl_err("temporary war to avoid sdio crc error\n"); |
1394 | 1407 | ||
1408 | param = 0x28; | ||
1409 | address = GPIO_BASE_ADDRESS + GPIO_PIN9_ADDRESS; | ||
1410 | status = ath6kl_bmi_reg_write(ar, address, param); | ||
1411 | if (status) | ||
1412 | return status; | ||
1413 | |||
1395 | param = 0x20; | 1414 | param = 0x20; |
1396 | 1415 | ||
1397 | address = GPIO_BASE_ADDRESS + GPIO_PIN10_ADDRESS; | 1416 | address = GPIO_BASE_ADDRESS + GPIO_PIN10_ADDRESS; |
@@ -1659,6 +1678,9 @@ void ath6kl_cleanup_vif(struct ath6kl_vif *vif, bool wmi_ready) | |||
1659 | cfg80211_scan_done(vif->scan_req, true); | 1678 | cfg80211_scan_done(vif->scan_req, true); |
1660 | vif->scan_req = NULL; | 1679 | vif->scan_req = NULL; |
1661 | } | 1680 | } |
1681 | |||
1682 | /* need to clean up enhanced bmiss detection fw state */ | ||
1683 | ath6kl_cfg80211_sta_bmiss_enhance(vif, false); | ||
1662 | } | 1684 | } |
1663 | 1685 | ||
1664 | void ath6kl_stop_txrx(struct ath6kl *ar) | 1686 | void ath6kl_stop_txrx(struct ath6kl *ar) |