From e97e56d01ed76ec7f9978d424b1f976d4b15f16c Mon Sep 17 00:00:00 2001 From: Bjørn Mork Date: Mon, 26 Oct 2015 23:13:42 +0100 Subject: mwlwifi: more detailed errors MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Bjørn Mork --- fwcmd.c | 4 ++-- mac80211.c | 8 +++++++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/fwcmd.c b/fwcmd.c index 9b91752..0d4d6d0 100644 --- a/fwcmd.c +++ b/fwcmd.c @@ -2770,7 +2770,7 @@ int mwl_fwcmd_check_ba(struct ieee80211_hw *hw, if (pcmd->cmd_hdr.result != 0) { spin_unlock_irqrestore(&priv->fwcmd_lock, flags); - wiphy_err(hw->wiphy, "result error"); + wiphy_err(hw->wiphy, "%s: result error: %d", __func__, pcmd->cmd_hdr.result); return -EINVAL; } @@ -2830,7 +2830,7 @@ int mwl_fwcmd_create_ba(struct ieee80211_hw *hw, if (pcmd->cmd_hdr.result != 0) { spin_unlock_irqrestore(&priv->fwcmd_lock, flags); - wiphy_err(hw->wiphy, "result error"); + wiphy_err(hw->wiphy, "%s: result error: %d", __func__, pcmd->cmd_hdr.result); return -EINVAL; } diff --git a/mac80211.c b/mac80211.c index 1a1f73e..660dcac 100644 --- a/mac80211.c +++ b/mac80211.c @@ -600,7 +600,8 @@ static int mwl_mac80211_ampdu_action(struct ieee80211_hw *hw, struct mwl_ampdu_stream *stream; u8 *addr = sta->addr, idx; struct mwl_sta *sta_info; - + bool unexpected = false; + sta_info = mwl_dev_get_sta(sta); spin_lock(&priv->stream_lock); @@ -630,6 +631,7 @@ static int mwl_mac80211_ampdu_action(struct ieee80211_hw *hw, * move on. */ stream = mwl_fwcmd_add_stream(hw, sta, tid); + unexpected = true; } if (!stream) { @@ -643,6 +645,9 @@ static int mwl_mac80211_ampdu_action(struct ieee80211_hw *hw, /* Release the lock before we do the time consuming stuff */ spin_unlock(&priv->stream_lock); + if (unexpected) + wiphy_err(hw->wiphy, " %pM unexpected stream: tid=%u", sta->addr, tid); + for (i = 0; i < MAX_AMPDU_ATTEMPTS; i++) { /* Check if link is still valid */ if (!sta_info->is_ampdu_allowed) { @@ -659,6 +664,7 @@ static int mwl_mac80211_ampdu_action(struct ieee80211_hw *hw, if (!rc) break; + wiphy_err(hw->wiphy, " %pM mwl_fwcmd_check_ba returned %d, i=%d/%d", sta->addr, rc, i, MAX_AMPDU_ATTEMPTS); mdelay(1000); } -- cgit v1.2.3