Commit 9cf10d62 authored by Vladimir Kondratiev's avatar Vladimir Kondratiev Committed by John W. Linville

wil6210: add more debug printouts

added misc printouts in some init/uninit functions for better traceability
Signed-off-by: default avatarDedy Lansky <qca_dlansky@qca.qualcomm.com>
Signed-off-by: default avatarVladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent f772ebfb
...@@ -782,7 +782,7 @@ static void wil_wiphy_init(struct wiphy *wiphy) ...@@ -782,7 +782,7 @@ static void wil_wiphy_init(struct wiphy *wiphy)
*/ */
wiphy->flags |= WIPHY_FLAG_HAVE_AP_SME | wiphy->flags |= WIPHY_FLAG_HAVE_AP_SME |
WIPHY_FLAG_AP_PROBE_RESP_OFFLOAD; WIPHY_FLAG_AP_PROBE_RESP_OFFLOAD;
dev_warn(wiphy_dev(wiphy), "%s : flags = 0x%08x\n", dev_dbg(wiphy_dev(wiphy), "%s : flags = 0x%08x\n",
__func__, wiphy->flags); __func__, wiphy->flags);
wiphy->probe_resp_offload = wiphy->probe_resp_offload =
NL80211_PROBE_RESP_OFFLOAD_SUPPORT_WPS | NL80211_PROBE_RESP_OFFLOAD_SUPPORT_WPS |
...@@ -804,6 +804,8 @@ struct wireless_dev *wil_cfg80211_init(struct device *dev) ...@@ -804,6 +804,8 @@ struct wireless_dev *wil_cfg80211_init(struct device *dev)
int rc = 0; int rc = 0;
struct wireless_dev *wdev; struct wireless_dev *wdev;
dev_dbg(dev, "%s()\n", __func__);
wdev = kzalloc(sizeof(*wdev), GFP_KERNEL); wdev = kzalloc(sizeof(*wdev), GFP_KERNEL);
if (!wdev) if (!wdev)
return ERR_PTR(-ENOMEM); return ERR_PTR(-ENOMEM);
...@@ -836,6 +838,8 @@ void wil_wdev_free(struct wil6210_priv *wil) ...@@ -836,6 +838,8 @@ void wil_wdev_free(struct wil6210_priv *wil)
{ {
struct wireless_dev *wdev = wil_to_wdev(wil); struct wireless_dev *wdev = wil_to_wdev(wil);
dev_dbg(wil_to_dev(wil), "%s()\n", __func__);
if (!wdev) if (!wdev)
return; return;
......
...@@ -528,6 +528,9 @@ void wil6210_clear_irq(struct wil6210_priv *wil) ...@@ -528,6 +528,9 @@ void wil6210_clear_irq(struct wil6210_priv *wil)
int wil6210_init_irq(struct wil6210_priv *wil, int irq) int wil6210_init_irq(struct wil6210_priv *wil, int irq)
{ {
int rc; int rc;
wil_dbg_misc(wil, "%s() n_msi=%d\n", __func__, wil->n_msi);
if (wil->n_msi == 3) if (wil->n_msi == 3)
rc = wil6210_request_3msi(wil, irq); rc = wil6210_request_3msi(wil, irq);
else else
...@@ -545,6 +548,8 @@ int wil6210_init_irq(struct wil6210_priv *wil, int irq) ...@@ -545,6 +548,8 @@ int wil6210_init_irq(struct wil6210_priv *wil, int irq)
void wil6210_fini_irq(struct wil6210_priv *wil, int irq) void wil6210_fini_irq(struct wil6210_priv *wil, int irq)
{ {
wil_dbg_misc(wil, "%s()\n", __func__);
wil6210_disable_irq(wil); wil6210_disable_irq(wil);
free_irq(irq, wil); free_irq(irq, wil);
if (wil->n_msi == 3) { if (wil->n_msi == 3) {
......
...@@ -301,12 +301,16 @@ int wil_priv_init(struct wil6210_priv *wil) ...@@ -301,12 +301,16 @@ int wil_priv_init(struct wil6210_priv *wil)
void wil6210_disconnect(struct wil6210_priv *wil, const u8 *bssid) void wil6210_disconnect(struct wil6210_priv *wil, const u8 *bssid)
{ {
wil_dbg_misc(wil, "%s()\n", __func__);
del_timer_sync(&wil->connect_timer); del_timer_sync(&wil->connect_timer);
_wil6210_disconnect(wil, bssid); _wil6210_disconnect(wil, bssid);
} }
void wil_priv_deinit(struct wil6210_priv *wil) void wil_priv_deinit(struct wil6210_priv *wil)
{ {
wil_dbg_misc(wil, "%s()\n", __func__);
del_timer_sync(&wil->scan_timer); del_timer_sync(&wil->scan_timer);
cancel_work_sync(&wil->disconnect_worker); cancel_work_sync(&wil->disconnect_worker);
cancel_work_sync(&wil->fw_error_worker); cancel_work_sync(&wil->fw_error_worker);
...@@ -457,6 +461,8 @@ int wil_reset(struct wil6210_priv *wil) ...@@ -457,6 +461,8 @@ int wil_reset(struct wil6210_priv *wil)
{ {
int rc; int rc;
wil_dbg_misc(wil, "%s()\n", __func__);
WARN_ON(!mutex_is_locked(&wil->mutex)); WARN_ON(!mutex_is_locked(&wil->mutex));
cancel_work_sync(&wil->disconnect_worker); cancel_work_sync(&wil->disconnect_worker);
...@@ -614,6 +620,8 @@ int wil_up(struct wil6210_priv *wil) ...@@ -614,6 +620,8 @@ int wil_up(struct wil6210_priv *wil)
{ {
int rc; int rc;
wil_dbg_misc(wil, "%s()\n", __func__);
mutex_lock(&wil->mutex); mutex_lock(&wil->mutex);
rc = __wil_up(wil); rc = __wil_up(wil);
mutex_unlock(&wil->mutex); mutex_unlock(&wil->mutex);
...@@ -650,6 +658,8 @@ int wil_down(struct wil6210_priv *wil) ...@@ -650,6 +658,8 @@ int wil_down(struct wil6210_priv *wil)
{ {
int rc; int rc;
wil_dbg_misc(wil, "%s()\n", __func__);
mutex_lock(&wil->mutex); mutex_lock(&wil->mutex);
rc = __wil_down(wil); rc = __wil_down(wil);
mutex_unlock(&wil->mutex); mutex_unlock(&wil->mutex);
......
...@@ -22,6 +22,8 @@ static int wil_open(struct net_device *ndev) ...@@ -22,6 +22,8 @@ static int wil_open(struct net_device *ndev)
{ {
struct wil6210_priv *wil = ndev_to_wil(ndev); struct wil6210_priv *wil = ndev_to_wil(ndev);
wil_dbg_misc(wil, "%s()\n", __func__);
return wil_up(wil); return wil_up(wil);
} }
...@@ -29,6 +31,8 @@ static int wil_stop(struct net_device *ndev) ...@@ -29,6 +31,8 @@ static int wil_stop(struct net_device *ndev)
{ {
struct wil6210_priv *wil = ndev_to_wil(ndev); struct wil6210_priv *wil = ndev_to_wil(ndev);
wil_dbg_misc(wil, "%s()\n", __func__);
return wil_down(wil); return wil_down(wil);
} }
...@@ -121,6 +125,8 @@ void *wil_if_alloc(struct device *dev, void __iomem *csr) ...@@ -121,6 +125,8 @@ void *wil_if_alloc(struct device *dev, void __iomem *csr)
wil->csr = csr; wil->csr = csr;
wil->wdev = wdev; wil->wdev = wdev;
wil_dbg_misc(wil, "%s()\n", __func__);
rc = wil_priv_init(wil); rc = wil_priv_init(wil);
if (rc) { if (rc) {
dev_err(dev, "wil_priv_init failed\n"); dev_err(dev, "wil_priv_init failed\n");
...@@ -169,6 +175,8 @@ void wil_if_free(struct wil6210_priv *wil) ...@@ -169,6 +175,8 @@ void wil_if_free(struct wil6210_priv *wil)
{ {
struct net_device *ndev = wil_to_ndev(wil); struct net_device *ndev = wil_to_ndev(wil);
wil_dbg_misc(wil, "%s()\n", __func__);
if (!ndev) if (!ndev)
return; return;
...@@ -185,6 +193,8 @@ int wil_if_add(struct wil6210_priv *wil) ...@@ -185,6 +193,8 @@ int wil_if_add(struct wil6210_priv *wil)
struct net_device *ndev = wil_to_ndev(wil); struct net_device *ndev = wil_to_ndev(wil);
int rc; int rc;
wil_dbg_misc(wil, "%s()\n", __func__);
rc = register_netdev(ndev); rc = register_netdev(ndev);
if (rc < 0) { if (rc < 0) {
dev_err(&ndev->dev, "Failed to register netdev: %d\n", rc); dev_err(&ndev->dev, "Failed to register netdev: %d\n", rc);
...@@ -200,5 +210,7 @@ void wil_if_remove(struct wil6210_priv *wil) ...@@ -200,5 +210,7 @@ void wil_if_remove(struct wil6210_priv *wil)
{ {
struct net_device *ndev = wil_to_ndev(wil); struct net_device *ndev = wil_to_ndev(wil);
wil_dbg_misc(wil, "%s()\n", __func__);
unregister_netdev(ndev); unregister_netdev(ndev);
} }
...@@ -41,6 +41,8 @@ static int wil_if_pcie_enable(struct wil6210_priv *wil) ...@@ -41,6 +41,8 @@ static int wil_if_pcie_enable(struct wil6210_priv *wil)
*/ */
int msi_only = pdev->msi_enabled; int msi_only = pdev->msi_enabled;
wil_dbg_misc(wil, "%s()\n", __func__);
pdev->msi_enabled = 0; pdev->msi_enabled = 0;
pci_set_master(pdev); pci_set_master(pdev);
...@@ -107,6 +109,8 @@ static int wil_if_pcie_disable(struct wil6210_priv *wil) ...@@ -107,6 +109,8 @@ static int wil_if_pcie_disable(struct wil6210_priv *wil)
{ {
struct pci_dev *pdev = wil->pdev; struct pci_dev *pdev = wil->pdev;
wil_dbg_misc(wil, "%s()\n", __func__);
pci_clear_master(pdev); pci_clear_master(pdev);
/* disable and release IRQ */ /* disable and release IRQ */
wil6210_fini_irq(wil, pdev->irq); wil6210_fini_irq(wil, pdev->irq);
...@@ -226,6 +230,8 @@ static void wil_pcie_remove(struct pci_dev *pdev) ...@@ -226,6 +230,8 @@ static void wil_pcie_remove(struct pci_dev *pdev)
struct wil6210_priv *wil = pci_get_drvdata(pdev); struct wil6210_priv *wil = pci_get_drvdata(pdev);
void __iomem *csr = wil->csr; void __iomem *csr = wil->csr;
wil_dbg_misc(wil, "%s()\n", __func__);
wil6210_debugfs_remove(wil); wil6210_debugfs_remove(wil);
wil_if_pcie_disable(wil); wil_if_pcie_disable(wil);
wil_if_remove(wil); wil_if_remove(wil);
......
...@@ -87,6 +87,8 @@ static int wil_vring_alloc(struct wil6210_priv *wil, struct vring *vring) ...@@ -87,6 +87,8 @@ static int wil_vring_alloc(struct wil6210_priv *wil, struct vring *vring)
size_t sz = vring->size * sizeof(vring->va[0]); size_t sz = vring->size * sizeof(vring->va[0]);
uint i; uint i;
wil_dbg_misc(wil, "%s()\n", __func__);
BUILD_BUG_ON(sizeof(vring->va[0]) != 32); BUILD_BUG_ON(sizeof(vring->va[0]) != 32);
vring->swhead = 0; vring->swhead = 0;
...@@ -599,6 +601,8 @@ int wil_rx_init(struct wil6210_priv *wil) ...@@ -599,6 +601,8 @@ int wil_rx_init(struct wil6210_priv *wil)
struct vring *vring = &wil->vring_rx; struct vring *vring = &wil->vring_rx;
int rc; int rc;
wil_dbg_misc(wil, "%s()\n", __func__);
if (vring->va) { if (vring->va) {
wil_err(wil, "Rx ring already allocated\n"); wil_err(wil, "Rx ring already allocated\n");
return -EINVAL; return -EINVAL;
...@@ -628,6 +632,8 @@ void wil_rx_fini(struct wil6210_priv *wil) ...@@ -628,6 +632,8 @@ void wil_rx_fini(struct wil6210_priv *wil)
{ {
struct vring *vring = &wil->vring_rx; struct vring *vring = &wil->vring_rx;
wil_dbg_misc(wil, "%s()\n", __func__);
if (vring->va) if (vring->va)
wil_vring_free(wil, vring, 0); wil_vring_free(wil, vring, 0);
} }
...@@ -662,6 +668,8 @@ int wil_vring_init_tx(struct wil6210_priv *wil, int id, int size, ...@@ -662,6 +668,8 @@ int wil_vring_init_tx(struct wil6210_priv *wil, int id, int size,
struct vring *vring = &wil->vring_tx[id]; struct vring *vring = &wil->vring_tx[id];
struct vring_tx_data *txdata = &wil->vring_tx_data[id]; struct vring_tx_data *txdata = &wil->vring_tx_data[id];
wil_dbg_misc(wil, "%s()\n", __func__);
if (vring->va) { if (vring->va) {
wil_err(wil, "Tx ring [%d] already allocated\n", id); wil_err(wil, "Tx ring [%d] already allocated\n", id);
rc = -EINVAL; rc = -EINVAL;
...@@ -711,6 +719,8 @@ void wil_vring_fini_tx(struct wil6210_priv *wil, int id) ...@@ -711,6 +719,8 @@ void wil_vring_fini_tx(struct wil6210_priv *wil, int id)
if (!vring->va) if (!vring->va)
return; return;
wil_dbg_misc(wil, "%s() id=%d\n", __func__, id);
/* make sure NAPI won't touch this vring */ /* make sure NAPI won't touch this vring */
wil->vring_tx_data[id].enabled = 0; wil->vring_tx_data[id].enabled = 0;
if (test_bit(wil_status_napi_en, &wil->status)) if (test_bit(wil_status_napi_en, &wil->status))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment