Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 1 addition & 32 deletions drivers/net/wireless/ath/ath12k/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -1764,29 +1764,6 @@ int ath12k_core_pre_init(struct ath12k_base *ab)
return 0;
}

static int ath12k_core_panic_handler(struct notifier_block *nb,
unsigned long action, void *data)
{
struct ath12k_base *ab = container_of(nb, struct ath12k_base,
panic_nb);

return ath12k_hif_panic_handler(ab);
}

static int ath12k_core_panic_notifier_register(struct ath12k_base *ab)
{
ab->panic_nb.notifier_call = ath12k_core_panic_handler;

return atomic_notifier_chain_register(&panic_notifier_list,
&ab->panic_nb);
}

static void ath12k_core_panic_notifier_unregister(struct ath12k_base *ab)
{
atomic_notifier_chain_unregister(&panic_notifier_list,
&ab->panic_nb);
}

static inline
bool ath12k_core_hw_group_create_ready(struct ath12k_hw_group *ag)
{
Expand Down Expand Up @@ -2183,18 +2160,13 @@ int ath12k_core_init(struct ath12k_base *ab)
struct ath12k_hw_group *ag;
int ret;

ret = ath12k_core_panic_notifier_register(ab);
if (ret)
ath12k_warn(ab, "failed to register panic handler: %d\n", ret);

mutex_lock(&ath12k_hw_group_mutex);

ag = ath12k_core_hw_group_assign(ab);
if (!ag) {
mutex_unlock(&ath12k_hw_group_mutex);
ath12k_warn(ab, "unable to get hw group\n");
ret = -ENODEV;
goto err_unregister_notifier;
return -ENODEV;
}

mutex_unlock(&ath12k_hw_group_mutex);
Expand All @@ -2219,8 +2191,6 @@ int ath12k_core_init(struct ath12k_base *ab)

err_unassign_hw_group:
ath12k_core_hw_group_unassign(ab);
err_unregister_notifier:
ath12k_core_panic_notifier_unregister(ab);

return ret;
}
Expand All @@ -2229,7 +2199,6 @@ void ath12k_core_deinit(struct ath12k_base *ab)
{
ath12k_core_hw_group_destroy(ab->ag);
ath12k_core_hw_group_unassign(ab);
ath12k_core_panic_notifier_unregister(ab);
}

void ath12k_core_free(struct ath12k_base *ab)
Expand Down
3 changes: 0 additions & 3 deletions drivers/net/wireless/ath/ath12k/core.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
#include <linux/ctype.h>
#include <linux/firmware.h>
#include <linux/of_reserved_mem.h>
#include <linux/panic_notifier.h>
#include <linux/average.h>
#include <linux/of.h>
#include <linux/rhashtable.h>
Expand Down Expand Up @@ -1115,8 +1114,6 @@ struct ath12k_base {

#endif /* CONFIG_ACPI */

struct notifier_block panic_nb;

struct ath12k_hw_group *ag;
struct ath12k_wsi_info wsi_info;
enum ath12k_firmware_mode fw_mode;
Expand Down
9 changes: 0 additions & 9 deletions drivers/net/wireless/ath/ath12k/hif.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ struct ath12k_hif_ops {
void (*ce_irq_enable)(struct ath12k_base *ab);
void (*ce_irq_disable)(struct ath12k_base *ab);
void (*get_ce_msi_idx)(struct ath12k_base *ab, u32 ce_id, u32 *msi_idx);
int (*panic_handler)(struct ath12k_base *ab);
void (*coredump_download)(struct ath12k_base *ab);
};

Expand Down Expand Up @@ -149,14 +148,6 @@ static inline void ath12k_hif_power_down(struct ath12k_base *ab, bool is_suspend
ab->hif.ops->power_down(ab, is_suspend);
}

static inline int ath12k_hif_panic_handler(struct ath12k_base *ab)
{
if (!ab->hif.ops->panic_handler)
return NOTIFY_DONE;

return ab->hif.ops->panic_handler(ab);
}

static inline void ath12k_hif_coredump_download(struct ath12k_base *ab)
{
if (ab->hif.ops->coredump_download)
Expand Down
8 changes: 0 additions & 8 deletions drivers/net/wireless/ath/ath12k/pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -1478,13 +1478,6 @@ void ath12k_pci_power_down(struct ath12k_base *ab, bool is_suspend)
ath12k_pci_sw_reset(ab_pci->ab, false);
}

static int ath12k_pci_panic_handler(struct ath12k_base *ab)
{
ath12k_pci_sw_reset(ab, false);

return NOTIFY_OK;
}

static const struct ath12k_hif_ops ath12k_pci_hif_ops = {
.start = ath12k_pci_start,
.stop = ath12k_pci_stop,
Expand All @@ -1502,7 +1495,6 @@ static const struct ath12k_hif_ops ath12k_pci_hif_ops = {
.ce_irq_enable = ath12k_pci_hif_ce_irq_enable,
.ce_irq_disable = ath12k_pci_hif_ce_irq_disable,
.get_ce_msi_idx = ath12k_pci_get_ce_msi_idx,
.panic_handler = ath12k_pci_panic_handler,
#ifdef CONFIG_ATH12K_COREDUMP
.coredump_download = ath12k_pci_coredump_download,
#endif
Expand Down