Commit b9b6ee60 authored by Kalle Valo's avatar Kalle Valo

ath6kl: improve wmi debug messages

Add a new debug level ATH6KL_DBG_WMI_DUMP and other minor
improvements to the wmi debug messages.
Signed-off-by: default avatarKalle Valo <kvalo@qca.qualcomm.com>
parent 6bc36431
...@@ -34,11 +34,12 @@ enum ATH6K_DEBUG_MASK { ...@@ -34,11 +34,12 @@ enum ATH6K_DEBUG_MASK {
ATH6KL_DBG_TRC = BIT(11), /* generic func tracing */ ATH6KL_DBG_TRC = BIT(11), /* generic func tracing */
ATH6KL_DBG_SCATTER = BIT(12), /* hif scatter tracing */ ATH6KL_DBG_SCATTER = BIT(12), /* hif scatter tracing */
ATH6KL_DBG_WLAN_CFG = BIT(13), /* cfg80211 i/f file tracing */ ATH6KL_DBG_WLAN_CFG = BIT(13), /* cfg80211 i/f file tracing */
ATH6KL_DBG_RAW_BYTES = BIT(14), /* dump tx/rx and wmi frames */ ATH6KL_DBG_RAW_BYTES = BIT(14), /* dump tx/rx frames */
ATH6KL_DBG_AGGR = BIT(15), /* aggregation */ ATH6KL_DBG_AGGR = BIT(15), /* aggregation */
ATH6KL_DBG_SDIO = BIT(16), ATH6KL_DBG_SDIO = BIT(16),
ATH6KL_DBG_SDIO_DUMP = BIT(17), ATH6KL_DBG_SDIO_DUMP = BIT(17),
ATH6KL_DBG_BOOT = BIT(18), /* driver init and fw boot */ ATH6KL_DBG_BOOT = BIT(18), /* driver init and fw boot */
ATH6KL_DBG_WMI_DUMP = BIT(19),
ATH6KL_DBG_ANY = 0xffffffff /* enable all logs */ ATH6KL_DBG_ANY = 0xffffffff /* enable all logs */
}; };
......
...@@ -721,8 +721,12 @@ static int ath6kl_wmi_connect_event_rx(struct wmi *wmi, u8 *datap, int len) ...@@ -721,8 +721,12 @@ static int ath6kl_wmi_connect_event_rx(struct wmi *wmi, u8 *datap, int len)
/* STA/IBSS mode connection event */ /* STA/IBSS mode connection event */
ath6kl_dbg(ATH6KL_DBG_WMI, "%s: freq %d bssid %pM\n", ath6kl_dbg(ATH6KL_DBG_WMI,
__func__, le16_to_cpu(ev->u.sta.ch), ev->u.sta.bssid); "wmi event connect freq %d bssid %pM listen_intvl %d beacon_intvl %d type %d\n",
le16_to_cpu(ev->u.sta.ch), ev->u.sta.bssid,
le16_to_cpu(ev->u.sta.listen_intvl),
le16_to_cpu(ev->u.sta.beacon_intvl),
le32_to_cpu(ev->u.sta.nw_type));
/* Start of assoc rsp IEs */ /* Start of assoc rsp IEs */
pie = ev->assoc_info + ev->beacon_ie_len + pie = ev->assoc_info + ev->beacon_ie_len +
...@@ -822,7 +826,7 @@ static void ath6kl_wmi_regdomain_event(struct wmi *wmi, u8 *datap, int len) ...@@ -822,7 +826,7 @@ static void ath6kl_wmi_regdomain_event(struct wmi *wmi, u8 *datap, int len)
regpair = ath6kl_get_regpair((u16) reg_code); regpair = ath6kl_get_regpair((u16) reg_code);
country = ath6kl_regd_find_country_by_rd((u16) reg_code); country = ath6kl_regd_find_country_by_rd((u16) reg_code);
ath6kl_dbg(ATH6KL_DBG_WMI, "ath6kl: Regpair used: 0x%0x\n", ath6kl_dbg(ATH6KL_DBG_WMI, "Regpair used: 0x%0x\n",
regpair->regDmnEnum); regpair->regDmnEnum);
} }
...@@ -832,7 +836,7 @@ static void ath6kl_wmi_regdomain_event(struct wmi *wmi, u8 *datap, int len) ...@@ -832,7 +836,7 @@ static void ath6kl_wmi_regdomain_event(struct wmi *wmi, u8 *datap, int len)
regulatory_hint(wmi->parent_dev->wdev->wiphy, alpha2); regulatory_hint(wmi->parent_dev->wdev->wiphy, alpha2);
ath6kl_dbg(ATH6KL_DBG_WMI, "ath6kl: Country alpha2 being used: %c%c\n", ath6kl_dbg(ATH6KL_DBG_WMI, "Country alpha2 being used: %c%c\n",
alpha2[0], alpha2[1]); alpha2[0], alpha2[1]);
} }
} }
...@@ -847,6 +851,11 @@ static int ath6kl_wmi_disconnect_event_rx(struct wmi *wmi, u8 *datap, int len) ...@@ -847,6 +851,11 @@ static int ath6kl_wmi_disconnect_event_rx(struct wmi *wmi, u8 *datap, int len)
ev = (struct wmi_disconnect_event *) datap; ev = (struct wmi_disconnect_event *) datap;
ath6kl_dbg(ATH6KL_DBG_WMI,
"wmi event disconnect proto_reason %d bssid %pM wmi_reason %d assoc_resp_len %d\n",
le16_to_cpu(ev->proto_reason_status), ev->bssid,
ev->disconn_reason, ev->assoc_resp_len);
wmi->is_wmm_enabled = false; wmi->is_wmm_enabled = false;
wmi->pair_crypto_type = NONE_CRYPT; wmi->pair_crypto_type = NONE_CRYPT;
wmi->grp_crypto_type = NONE_CRYPT; wmi->grp_crypto_type = NONE_CRYPT;
...@@ -1526,11 +1535,14 @@ int ath6kl_wmi_cmd_send(struct wmi *wmi, struct sk_buff *skb, ...@@ -1526,11 +1535,14 @@ int ath6kl_wmi_cmd_send(struct wmi *wmi, struct sk_buff *skb,
enum htc_endpoint_id ep_id = wmi->ep_id; enum htc_endpoint_id ep_id = wmi->ep_id;
int ret; int ret;
ath6kl_dbg(ATH6KL_DBG_WMI, "%s: cmd_id=%d\n", __func__, cmd_id);
if (WARN_ON(skb == NULL)) if (WARN_ON(skb == NULL))
return -EINVAL; return -EINVAL;
ath6kl_dbg(ATH6KL_DBG_WMI, "wmi tx id %d len %d flag %d\n",
cmd_id, skb->len, sync_flag);
ath6kl_dbg_dump(ATH6KL_DBG_WMI_DUMP, NULL, "wmi tx ",
skb->data, skb->len);
if (sync_flag >= END_WMIFLAG) { if (sync_flag >= END_WMIFLAG) {
dev_kfree_skb(skb); dev_kfree_skb(skb);
return -EINVAL; return -EINVAL;
...@@ -1589,6 +1601,13 @@ int ath6kl_wmi_connect_cmd(struct wmi *wmi, enum network_type nw_type, ...@@ -1589,6 +1601,13 @@ int ath6kl_wmi_connect_cmd(struct wmi *wmi, enum network_type nw_type,
struct wmi_connect_cmd *cc; struct wmi_connect_cmd *cc;
int ret; int ret;
ath6kl_dbg(ATH6KL_DBG_WMI,
"wmi connect bssid %pM freq %d flags 0x%x ssid_len %d "
"type %d dot11_auth %d auth %d pairwise %d group %d\n",
bssid, channel, ctrl_flags, ssid_len, nw_type,
dot11_auth_mode, auth_mode, pairwise_crypto, group_crypto);
ath6kl_dbg_dump(ATH6KL_DBG_WMI, NULL, "ssid ", ssid, ssid_len);
wmi->traffic_class = 100; wmi->traffic_class = 100;
if ((pairwise_crypto == NONE_CRYPT) && (group_crypto != NONE_CRYPT)) if ((pairwise_crypto == NONE_CRYPT) && (group_crypto != NONE_CRYPT))
...@@ -1634,6 +1653,9 @@ int ath6kl_wmi_reconnect_cmd(struct wmi *wmi, u8 *bssid, u16 channel) ...@@ -1634,6 +1653,9 @@ int ath6kl_wmi_reconnect_cmd(struct wmi *wmi, u8 *bssid, u16 channel)
struct wmi_reconnect_cmd *cc; struct wmi_reconnect_cmd *cc;
int ret; int ret;
ath6kl_dbg(ATH6KL_DBG_WMI, "wmi reconnect bssid %pM freq %d\n",
bssid, channel);
wmi->traffic_class = 100; wmi->traffic_class = 100;
skb = ath6kl_wmi_get_new_buf(sizeof(struct wmi_reconnect_cmd)); skb = ath6kl_wmi_get_new_buf(sizeof(struct wmi_reconnect_cmd));
...@@ -1656,6 +1678,8 @@ int ath6kl_wmi_disconnect_cmd(struct wmi *wmi) ...@@ -1656,6 +1678,8 @@ int ath6kl_wmi_disconnect_cmd(struct wmi *wmi)
{ {
int ret; int ret;
ath6kl_dbg(ATH6KL_DBG_WMI, "wmi disconnect\n");
wmi->traffic_class = 100; wmi->traffic_class = 100;
/* Disconnect command does not need to do a SYNC before. */ /* Disconnect command does not need to do a SYNC before. */
...@@ -2808,12 +2832,14 @@ static int ath6kl_wmi_control_rx_xtnd(struct wmi *wmi, struct sk_buff *skb) ...@@ -2808,12 +2832,14 @@ static int ath6kl_wmi_control_rx_xtnd(struct wmi *wmi, struct sk_buff *skb)
switch (id) { switch (id) {
case WMIX_HB_CHALLENGE_RESP_EVENTID: case WMIX_HB_CHALLENGE_RESP_EVENTID:
ath6kl_dbg(ATH6KL_DBG_WMI, "wmi event hb challenge resp\n");
break; break;
case WMIX_DBGLOG_EVENTID: case WMIX_DBGLOG_EVENTID:
ath6kl_dbg(ATH6KL_DBG_WMI, "wmi event dbglog len %d\n", len);
ath6kl_debug_fwlog_event(wmi->parent_dev, datap, len); ath6kl_debug_fwlog_event(wmi->parent_dev, datap, len);
break; break;
default: default:
ath6kl_err("unknown cmd id 0x%x\n", id); ath6kl_warn("unknown cmd id 0x%x\n", id);
wmi->stat.cmd_id_err++; wmi->stat.cmd_id_err++;
ret = -EINVAL; ret = -EINVAL;
break; break;
...@@ -2849,8 +2875,8 @@ int ath6kl_wmi_control_rx(struct wmi *wmi, struct sk_buff *skb) ...@@ -2849,8 +2875,8 @@ int ath6kl_wmi_control_rx(struct wmi *wmi, struct sk_buff *skb)
datap = skb->data; datap = skb->data;
len = skb->len; len = skb->len;
ath6kl_dbg(ATH6KL_DBG_WMI, "%s: wmi id: %d\n", __func__, id); ath6kl_dbg(ATH6KL_DBG_WMI, "wmi rx id %d len %d\n", id, len);
ath6kl_dbg_dump(ATH6KL_DBG_RAW_BYTES, "msg payload ", "wmi rx ", ath6kl_dbg_dump(ATH6KL_DBG_WMI_DUMP, NULL, "wmi rx ",
datap, len); datap, len);
switch (id) { switch (id) {
......
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