Commit 38a1d47e authored by Kalle Valo's avatar Kalle Valo

ath10k: print phymode as a string

Makes it easier to read debug logs.
Signed-off-by: default avatarKalle Valo <kvalo@qca.qualcomm.com>
parent 60c3daa8
...@@ -460,6 +460,11 @@ static int ath10k_vdev_start(struct ath10k_vif *arvif) ...@@ -460,6 +460,11 @@ static int ath10k_vdev_start(struct ath10k_vif *arvif)
arg.ssid_len = arvif->vif->bss_conf.ssid_len; arg.ssid_len = arvif->vif->bss_conf.ssid_len;
} }
ath10k_dbg(ATH10K_DBG_MAC,
"mac vdev %d start center_freq %d phymode %s\n",
arg.vdev_id, arg.channel.freq,
ath10k_wmi_phymode_str(arg.channel.mode));
ret = ath10k_wmi_vdev_start(ar, &arg); ret = ath10k_wmi_vdev_start(ar, &arg);
if (ret) { if (ret) {
ath10k_warn("WMI vdev start failed: ret %d\n", ret); ath10k_warn("WMI vdev start failed: ret %d\n", ret);
...@@ -1104,8 +1109,8 @@ static void ath10k_peer_assoc_h_phymode(struct ath10k *ar, ...@@ -1104,8 +1109,8 @@ static void ath10k_peer_assoc_h_phymode(struct ath10k *ar,
break; break;
} }
ath10k_dbg(ATH10K_DBG_MAC, "mac peer %pM phymode %d\n", ath10k_dbg(ATH10K_DBG_MAC, "mac peer %pM phymode %s\n",
sta->addr, phymode); sta->addr, ath10k_wmi_phymode_str(phymode));
arg->peer_phymode = phymode; arg->peer_phymode = phymode;
WARN_ON(phymode == MODE_UNKNOWN); WARN_ON(phymode == MODE_UNKNOWN);
......
...@@ -508,6 +508,48 @@ enum wmi_phy_mode { ...@@ -508,6 +508,48 @@ enum wmi_phy_mode {
MODE_MAX = 14 MODE_MAX = 14
}; };
static inline const char *ath10k_wmi_phymode_str(enum wmi_phy_mode mode)
{
switch (mode) {
case MODE_11A:
return "11a";
case MODE_11G:
return "11g";
case MODE_11B:
return "11b";
case MODE_11GONLY:
return "11gonly";
case MODE_11NA_HT20:
return "11na-ht20";
case MODE_11NG_HT20:
return "11ng-ht20";
case MODE_11NA_HT40:
return "11na-ht40";
case MODE_11NG_HT40:
return "11ng-ht40";
case MODE_11AC_VHT20:
return "11ac-vht20";
case MODE_11AC_VHT40:
return "11ac-vht40";
case MODE_11AC_VHT80:
return "11ac-vht80";
case MODE_11AC_VHT20_2G:
return "11ac-vht20-2g";
case MODE_11AC_VHT40_2G:
return "11ac-vht40-2g";
case MODE_11AC_VHT80_2G:
return "11ac-vht80-2g";
case MODE_UNKNOWN:
/* skip */
break;
/* no default handler to allow compiler to check that the
* enum is fully handled */
};
return "<unknown>";
}
#define WMI_CHAN_LIST_TAG 0x1 #define WMI_CHAN_LIST_TAG 0x1
#define WMI_SSID_LIST_TAG 0x2 #define WMI_SSID_LIST_TAG 0x2
#define WMI_BSSID_LIST_TAG 0x3 #define WMI_BSSID_LIST_TAG 0x3
......
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