diff mbox series

[v3,2/2] ath11k: add DBG_MAC prints to track vdev events

Message ID 1587995095-7808-3-git-send-email-murugana@codeaurora.org (mailing list archive)
State Changes Requested
Delegated to: Kalle Valo
Headers show
Series ath11k: fix mgmt_tx_wmi cmd sent for deleted vdev | expand

Commit Message

Sathishkumar Muruganandam April 27, 2020, 1:44 p.m. UTC
Added DBG_MAC prints to track vdev create, delete, start and
stop events.

Signed-off-by: Sathishkumar Muruganandam <murugana@codeaurora.org>
---
 drivers/net/wireless/ath/ath11k/mac.c | 8 ++++++++
 1 file changed, 8 insertions(+)

Comments

kernel test robot April 28, 2020, 2:38 a.m. UTC | #1
Hi Sathishkumar,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on ath6kl/ath-next]
[also build test ERROR on v5.7-rc3 next-20200424]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]

url:    https://github.com/0day-ci/linux/commits/Sathishkumar-Muruganandam/ath11k-fix-mgmt_tx_wmi-cmd-sent-for-deleted-vdev/20200428-074921
base:   https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git ath-next
config: sh-allmodconfig (attached as .config)
compiler: sh4-linux-gcc (GCC) 9.3.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day GCC_VERSION=9.3.0 make.cross ARCH=sh 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

   In file included from drivers/net/wireless/ath/ath11k/mac.c:10:
   drivers/net/wireless/ath/ath11k/mac.c: In function 'ath11k_mac_vdev_stop':
>> drivers/net/wireless/ath/ath11k/mac.c:4731:13: error: 'ab' undeclared (first use in this function); did you mean 'ar'?
    4731 |  ath11k_dbg(ab, ATH11K_DBG_MAC, "vdev %pM stopped, vdev_id %d\n",
         |             ^~
   drivers/net/wireless/ath/ath11k/debug.h:301:16: note: in definition of macro 'ath11k_dbg'
     301 |   __ath11k_dbg(ar, dbg_mask, fmt, ##__VA_ARGS__); \
         |                ^~
   drivers/net/wireless/ath/ath11k/mac.c:4731:13: note: each undeclared identifier is reported only once for each function it appears in
    4731 |  ath11k_dbg(ab, ATH11K_DBG_MAC, "vdev %pM stopped, vdev_id %d\n",
         |             ^~
   drivers/net/wireless/ath/ath11k/debug.h:301:16: note: in definition of macro 'ath11k_dbg'
     301 |   __ath11k_dbg(ar, dbg_mask, fmt, ##__VA_ARGS__); \
         |                ^~

vim +4731 drivers/net/wireless/ath/ath11k/mac.c

  4697	
  4698	static int ath11k_mac_vdev_stop(struct ath11k_vif *arvif)
  4699	{
  4700		struct ath11k *ar = arvif->ar;
  4701		int ret;
  4702	
  4703		lockdep_assert_held(&ar->conf_mutex);
  4704	
  4705		reinit_completion(&ar->vdev_setup_done);
  4706	
  4707		spin_lock_bh(&ar->data_lock);
  4708	
  4709		ar->vdev_stop_status.stop_in_progress = true;
  4710		ar->vdev_stop_status.vdev_id = arvif->vdev_id;
  4711	
  4712		spin_unlock_bh(&ar->data_lock);
  4713	
  4714		ret = ath11k_wmi_vdev_stop(ar, arvif->vdev_id);
  4715		if (ret) {
  4716			ath11k_warn(ar->ab, "failed to stop WMI vdev %i: %d\n",
  4717				    arvif->vdev_id, ret);
  4718			goto err;
  4719		}
  4720	
  4721		ret = ath11k_mac_vdev_setup_sync(ar);
  4722		if (ret) {
  4723			ath11k_warn(ar->ab, "failed to synchronize setup for vdev %i: %d\n",
  4724				    arvif->vdev_id, ret);
  4725			goto err;
  4726		}
  4727	
  4728		WARN_ON(ar->num_started_vdevs == 0);
  4729	
  4730		ar->num_started_vdevs--;
> 4731		ath11k_dbg(ab, ATH11K_DBG_MAC, "vdev %pM stopped, vdev_id %d\n",
  4732			   arvif->vif->addr, arvif->vdev_id);
  4733	
  4734		if (test_bit(ATH11K_CAC_RUNNING, &ar->dev_flags)) {
  4735			clear_bit(ATH11K_CAC_RUNNING, &ar->dev_flags);
  4736			ath11k_dbg(ar->ab, ATH11K_DBG_MAC, "CAC Stopped for vdev %d\n",
  4737				   arvif->vdev_id);
  4738		}
  4739	
  4740		return 0;
  4741	err:
  4742		spin_lock_bh(&ar->data_lock);
  4743		ar->vdev_stop_status.stop_in_progress = false;
  4744		spin_unlock_bh(&ar->data_lock);
  4745	
  4746		return ret;
  4747	}
  4748	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
diff mbox series

Patch

diff --git a/drivers/net/wireless/ath/ath11k/mac.c b/drivers/net/wireless/ath/ath11k/mac.c
index 2b3a63ac216c..bfe2d20de351 100644
--- a/drivers/net/wireless/ath/ath11k/mac.c
+++ b/drivers/net/wireless/ath/ath11k/mac.c
@@ -4229,6 +4229,8 @@  static int ath11k_mac_op_add_interface(struct ieee80211_hw *hw,
 	}
 
 	ar->num_created_vdevs++;
+	ath11k_dbg(ab, ATH11K_DBG_MAC, "vdev %pM created, vdev_id %d\n",
+		   vif->addr, arvif->vdev_id);
 	ar->allocated_vdev_map |= 1LL << arvif->vdev_id;
 	ab->free_vdev_map &= ~(1LL << arvif->vdev_id);
 
@@ -4399,6 +4401,8 @@  static void ath11k_mac_op_remove_interface(struct ieee80211_hw *hw,
 			    arvif->vdev_id, ret);
 
 	ar->num_created_vdevs--;
+	ath11k_dbg(ab, ATH11K_DBG_MAC, "vdev %pM deleted, vdev_id %d\n",
+		   vif->addr, arvif->vdev_id);
 	ar->allocated_vdev_map &= ~(1LL << arvif->vdev_id);
 	ab->free_vdev_map |= 1LL << (arvif->vdev_id);
 
@@ -4664,6 +4668,8 @@  ath11k_mac_vdev_start_restart(struct ath11k_vif *arvif,
 	}
 
 	ar->num_started_vdevs++;
+	ath11k_dbg(ab, ATH11K_DBG_MAC,  "vdev %pM started, vdev_id %d\n",
+		   arvif->vif->addr, arvif->vdev_id);
 
 	/* Enable CAC Flag in the driver by checking the channel DFS cac time,
 	 * i.e dfs_cac_ms value which will be valid only for radar channels
@@ -4722,6 +4728,8 @@  static int ath11k_mac_vdev_stop(struct ath11k_vif *arvif)
 	WARN_ON(ar->num_started_vdevs == 0);
 
 	ar->num_started_vdevs--;
+	ath11k_dbg(ab, ATH11K_DBG_MAC, "vdev %pM stopped, vdev_id %d\n",
+		   arvif->vif->addr, arvif->vdev_id);
 
 	if (test_bit(ATH11K_CAC_RUNNING, &ar->dev_flags)) {
 		clear_bit(ATH11K_CAC_RUNNING, &ar->dev_flags);