diff options
Diffstat (limited to 'drivers/net')
| -rw-r--r-- | drivers/net/wireless/ath/ath10k/ahb.c | 3 | ||||
| -rw-r--r-- | drivers/net/wireless/ath/ath10k/core.c | 2 | ||||
| -rw-r--r-- | drivers/net/wireless/ath/ath10k/hif.h | 7 | ||||
| -rw-r--r-- | drivers/net/wireless/ath/ath10k/mac.c | 2 | ||||
| -rw-r--r-- | drivers/net/wireless/ath/ath10k/pci.c | 3 | ||||
| -rw-r--r-- | drivers/net/wireless/ath/ath10k/sdio.c | 3 | ||||
| -rw-r--r-- | drivers/net/wireless/ath/ath10k/snoc.c | 20 | ||||
| -rw-r--r-- | drivers/net/wireless/ath/ath10k/testmode.c | 2 | ||||
| -rw-r--r-- | drivers/net/wireless/ath/ath10k/usb.c | 3 |
9 files changed, 31 insertions, 14 deletions
diff --git a/drivers/net/wireless/ath/ath10k/ahb.c b/drivers/net/wireless/ath/ath10k/ahb.c index 4cd69aca75e2..66b7ca9ced17 100644 --- a/drivers/net/wireless/ath/ath10k/ahb.c +++ b/drivers/net/wireless/ath/ath10k/ahb.c | |||
| @@ -661,7 +661,8 @@ static void ath10k_ahb_hif_stop(struct ath10k *ar) | |||
| 661 | ath10k_pci_flush(ar); | 661 | ath10k_pci_flush(ar); |
| 662 | } | 662 | } |
| 663 | 663 | ||
| 664 | static int ath10k_ahb_hif_power_up(struct ath10k *ar) | 664 | static int ath10k_ahb_hif_power_up(struct ath10k *ar, |
| 665 | enum ath10k_firmware_mode fw_mode) | ||
| 665 | { | 666 | { |
| 666 | int ret; | 667 | int ret; |
| 667 | 668 | ||
diff --git a/drivers/net/wireless/ath/ath10k/core.c b/drivers/net/wireless/ath/ath10k/core.c index f64008b5da0d..ca6085076c68 100644 --- a/drivers/net/wireless/ath/ath10k/core.c +++ b/drivers/net/wireless/ath/ath10k/core.c | |||
| @@ -2780,7 +2780,7 @@ static int ath10k_core_probe_fw(struct ath10k *ar) | |||
| 2780 | struct bmi_target_info target_info; | 2780 | struct bmi_target_info target_info; |
| 2781 | int ret = 0; | 2781 | int ret = 0; |
| 2782 | 2782 | ||
| 2783 | ret = ath10k_hif_power_up(ar); | 2783 | ret = ath10k_hif_power_up(ar, ATH10K_FIRMWARE_MODE_NORMAL); |
| 2784 | if (ret) { | 2784 | if (ret) { |
| 2785 | ath10k_err(ar, "could not power on hif bus (%d)\n", ret); | 2785 | ath10k_err(ar, "could not power on hif bus (%d)\n", ret); |
| 2786 | return ret; | 2786 | return ret; |
diff --git a/drivers/net/wireless/ath/ath10k/hif.h b/drivers/net/wireless/ath/ath10k/hif.h index 5f7f1e08866f..04320d792c88 100644 --- a/drivers/net/wireless/ath/ath10k/hif.h +++ b/drivers/net/wireless/ath/ath10k/hif.h | |||
| @@ -83,7 +83,7 @@ struct ath10k_hif_ops { | |||
| 83 | void (*write32)(struct ath10k *ar, u32 address, u32 value); | 83 | void (*write32)(struct ath10k *ar, u32 address, u32 value); |
| 84 | 84 | ||
| 85 | /* Power up the device and enter BMI transfer mode for FW download */ | 85 | /* Power up the device and enter BMI transfer mode for FW download */ |
| 86 | int (*power_up)(struct ath10k *ar); | 86 | int (*power_up)(struct ath10k *ar, enum ath10k_firmware_mode fw_mode); |
| 87 | 87 | ||
| 88 | /* Power down the device and free up resources. stop() must be called | 88 | /* Power down the device and free up resources. stop() must be called |
| 89 | * before this if start() was called earlier | 89 | * before this if start() was called earlier |
| @@ -174,9 +174,10 @@ static inline u16 ath10k_hif_get_free_queue_number(struct ath10k *ar, | |||
| 174 | return ar->hif.ops->get_free_queue_number(ar, pipe_id); | 174 | return ar->hif.ops->get_free_queue_number(ar, pipe_id); |
| 175 | } | 175 | } |
| 176 | 176 | ||
| 177 | static inline int ath10k_hif_power_up(struct ath10k *ar) | 177 | static inline int ath10k_hif_power_up(struct ath10k *ar, |
| 178 | enum ath10k_firmware_mode fw_mode) | ||
| 178 | { | 179 | { |
| 179 | return ar->hif.ops->power_up(ar); | 180 | return ar->hif.ops->power_up(ar, fw_mode); |
| 180 | } | 181 | } |
| 181 | 182 | ||
| 182 | static inline void ath10k_hif_power_down(struct ath10k *ar) | 183 | static inline void ath10k_hif_power_down(struct ath10k *ar) |
diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c index 6c66a3435d57..c8af35ff2019 100644 --- a/drivers/net/wireless/ath/ath10k/mac.c +++ b/drivers/net/wireless/ath/ath10k/mac.c | |||
| @@ -4705,7 +4705,7 @@ static int ath10k_start(struct ieee80211_hw *hw) | |||
| 4705 | goto err; | 4705 | goto err; |
| 4706 | } | 4706 | } |
| 4707 | 4707 | ||
| 4708 | ret = ath10k_hif_power_up(ar); | 4708 | ret = ath10k_hif_power_up(ar, ATH10K_FIRMWARE_MODE_NORMAL); |
| 4709 | if (ret) { | 4709 | if (ret) { |
| 4710 | ath10k_err(ar, "Could not init hif: %d\n", ret); | 4710 | ath10k_err(ar, "Could not init hif: %d\n", ret); |
| 4711 | goto err_off; | 4711 | goto err_off; |
diff --git a/drivers/net/wireless/ath/ath10k/pci.c b/drivers/net/wireless/ath/ath10k/pci.c index 600ddaad8845..71d854e2f9fc 100644 --- a/drivers/net/wireless/ath/ath10k/pci.c +++ b/drivers/net/wireless/ath/ath10k/pci.c | |||
| @@ -2794,7 +2794,8 @@ static int ath10k_pci_chip_reset(struct ath10k *ar) | |||
| 2794 | return ar_pci->pci_hard_reset(ar); | 2794 | return ar_pci->pci_hard_reset(ar); |
| 2795 | } | 2795 | } |
| 2796 | 2796 | ||
| 2797 | static int ath10k_pci_hif_power_up(struct ath10k *ar) | 2797 | static int ath10k_pci_hif_power_up(struct ath10k *ar, |
| 2798 | enum ath10k_firmware_mode fw_mode) | ||
| 2798 | { | 2799 | { |
| 2799 | struct ath10k_pci *ar_pci = ath10k_pci_priv(ar); | 2800 | struct ath10k_pci *ar_pci = ath10k_pci_priv(ar); |
| 2800 | int ret; | 2801 | int ret; |
diff --git a/drivers/net/wireless/ath/ath10k/sdio.c b/drivers/net/wireless/ath/ath10k/sdio.c index f3b2e148e6ce..7654536b830b 100644 --- a/drivers/net/wireless/ath/ath10k/sdio.c +++ b/drivers/net/wireless/ath/ath10k/sdio.c | |||
| @@ -1381,7 +1381,8 @@ static int ath10k_sdio_hif_disable_intrs(struct ath10k *ar) | |||
| 1381 | return ret; | 1381 | return ret; |
| 1382 | } | 1382 | } |
| 1383 | 1383 | ||
| 1384 | static int ath10k_sdio_hif_power_up(struct ath10k *ar) | 1384 | static int ath10k_sdio_hif_power_up(struct ath10k *ar, |
| 1385 | enum ath10k_firmware_mode fw_mode) | ||
| 1385 | { | 1386 | { |
| 1386 | struct ath10k_sdio *ar_sdio = ath10k_sdio_priv(ar); | 1387 | struct ath10k_sdio *ar_sdio = ath10k_sdio_priv(ar); |
| 1387 | struct sdio_func *func = ar_sdio->func; | 1388 | struct sdio_func *func = ar_sdio->func; |
diff --git a/drivers/net/wireless/ath/ath10k/snoc.c b/drivers/net/wireless/ath/ath10k/snoc.c index eff19fd543c8..b81b02ae384f 100644 --- a/drivers/net/wireless/ath/ath10k/snoc.c +++ b/drivers/net/wireless/ath/ath10k/snoc.c | |||
| @@ -957,7 +957,8 @@ static int ath10k_snoc_init_pipes(struct ath10k *ar) | |||
| 957 | return 0; | 957 | return 0; |
| 958 | } | 958 | } |
| 959 | 959 | ||
| 960 | static int ath10k_snoc_wlan_enable(struct ath10k *ar) | 960 | static int ath10k_snoc_wlan_enable(struct ath10k *ar, |
| 961 | enum ath10k_firmware_mode fw_mode) | ||
| 961 | { | 962 | { |
| 962 | struct ath10k_tgt_pipe_cfg tgt_cfg[CE_COUNT_MAX]; | 963 | struct ath10k_tgt_pipe_cfg tgt_cfg[CE_COUNT_MAX]; |
| 963 | struct ath10k_qmi_wlan_enable_cfg cfg; | 964 | struct ath10k_qmi_wlan_enable_cfg cfg; |
| @@ -991,7 +992,17 @@ static int ath10k_snoc_wlan_enable(struct ath10k *ar) | |||
| 991 | cfg.shadow_reg_cfg = (struct ath10k_shadow_reg_cfg *) | 992 | cfg.shadow_reg_cfg = (struct ath10k_shadow_reg_cfg *) |
| 992 | &target_shadow_reg_cfg_map; | 993 | &target_shadow_reg_cfg_map; |
| 993 | 994 | ||
| 994 | mode = QMI_WLFW_MISSION_V01; | 995 | switch (fw_mode) { |
| 996 | case ATH10K_FIRMWARE_MODE_NORMAL: | ||
| 997 | mode = QMI_WLFW_MISSION_V01; | ||
| 998 | break; | ||
| 999 | case ATH10K_FIRMWARE_MODE_UTF: | ||
| 1000 | mode = QMI_WLFW_FTM_V01; | ||
| 1001 | break; | ||
| 1002 | default: | ||
| 1003 | ath10k_err(ar, "invalid firmware mode %d\n", fw_mode); | ||
| 1004 | return -EINVAL; | ||
| 1005 | } | ||
| 995 | 1006 | ||
| 996 | return ath10k_qmi_wlan_enable(ar, &cfg, mode, | 1007 | return ath10k_qmi_wlan_enable(ar, &cfg, mode, |
| 997 | NULL); | 1008 | NULL); |
| @@ -1020,14 +1031,15 @@ static void ath10k_snoc_hif_power_down(struct ath10k *ar) | |||
| 1020 | ath10k_ce_free_rri(ar); | 1031 | ath10k_ce_free_rri(ar); |
| 1021 | } | 1032 | } |
| 1022 | 1033 | ||
| 1023 | static int ath10k_snoc_hif_power_up(struct ath10k *ar) | 1034 | static int ath10k_snoc_hif_power_up(struct ath10k *ar, |
| 1035 | enum ath10k_firmware_mode fw_mode) | ||
| 1024 | { | 1036 | { |
| 1025 | int ret; | 1037 | int ret; |
| 1026 | 1038 | ||
| 1027 | ath10k_dbg(ar, ATH10K_DBG_SNOC, "%s:WCN3990 driver state = %d\n", | 1039 | ath10k_dbg(ar, ATH10K_DBG_SNOC, "%s:WCN3990 driver state = %d\n", |
| 1028 | __func__, ar->state); | 1040 | __func__, ar->state); |
| 1029 | 1041 | ||
| 1030 | ret = ath10k_snoc_wlan_enable(ar); | 1042 | ret = ath10k_snoc_wlan_enable(ar, fw_mode); |
| 1031 | if (ret) { | 1043 | if (ret) { |
| 1032 | ath10k_err(ar, "failed to enable wcn3990: %d\n", ret); | 1044 | ath10k_err(ar, "failed to enable wcn3990: %d\n", ret); |
| 1033 | return ret; | 1045 | return ret; |
diff --git a/drivers/net/wireless/ath/ath10k/testmode.c b/drivers/net/wireless/ath/ath10k/testmode.c index c24ee616833c..67faafecaf06 100644 --- a/drivers/net/wireless/ath/ath10k/testmode.c +++ b/drivers/net/wireless/ath/ath10k/testmode.c | |||
| @@ -270,7 +270,7 @@ static int ath10k_tm_cmd_utf_start(struct ath10k *ar, struct nlattr *tb[]) | |||
| 270 | ath10k_dbg(ar, ATH10K_DBG_TESTMODE, "testmode wmi version %d\n", | 270 | ath10k_dbg(ar, ATH10K_DBG_TESTMODE, "testmode wmi version %d\n", |
| 271 | ar->testmode.utf_mode_fw.fw_file.wmi_op_version); | 271 | ar->testmode.utf_mode_fw.fw_file.wmi_op_version); |
| 272 | 272 | ||
| 273 | ret = ath10k_hif_power_up(ar); | 273 | ret = ath10k_hif_power_up(ar, ATH10K_FIRMWARE_MODE_UTF); |
| 274 | if (ret) { | 274 | if (ret) { |
| 275 | ath10k_err(ar, "failed to power up hif (testmode): %d\n", ret); | 275 | ath10k_err(ar, "failed to power up hif (testmode): %d\n", ret); |
| 276 | ar->state = ATH10K_STATE_OFF; | 276 | ar->state = ATH10K_STATE_OFF; |
diff --git a/drivers/net/wireless/ath/ath10k/usb.c b/drivers/net/wireless/ath/ath10k/usb.c index f731d35ee76d..d3677765f96c 100644 --- a/drivers/net/wireless/ath/ath10k/usb.c +++ b/drivers/net/wireless/ath/ath10k/usb.c | |||
| @@ -706,7 +706,8 @@ static void ath10k_usb_hif_send_complete_check(struct ath10k *ar, | |||
| 706 | { | 706 | { |
| 707 | } | 707 | } |
| 708 | 708 | ||
| 709 | static int ath10k_usb_hif_power_up(struct ath10k *ar) | 709 | static int ath10k_usb_hif_power_up(struct ath10k *ar, |
| 710 | enum ath10k_firmware_mode fw_mode) | ||
| 710 | { | 711 | { |
| 711 | return 0; | 712 | return 0; |
| 712 | } | 713 | } |
