From 608f4eb0d2ca67f9bae686b8de25e4f627e3af7c Mon Sep 17 00:00:00 2001 From: David Lin Date: Mon, 30 May 2016 15:25:50 +0800 Subject: Commit mwlwifi driver 10.3.0.17-20160530 1. Removed debug messages related to failure of ba checking. 2. Added variable "check_ba_failed" to log this kind of debug information. Signed-off-by: David Lin --- debugfs.c | 43 +++++++++++++++++++++++++++++++++++++++++++ dev.h | 3 ++- fwcmd.c | 4 ---- mac80211.c | 6 ++---- 4 files changed, 47 insertions(+), 9 deletions(-) diff --git a/debugfs.c b/debugfs.c index 8920ea2..aa90645 100644 --- a/debugfs.c +++ b/debugfs.c @@ -240,6 +240,32 @@ static ssize_t mwl_debugfs_sta_read(struct file *file, char __user *ubuf, "amsdu cap: 0x%02x\n", sta_info->amsdu_ctrl.cap); } + if (sta->ht_cap.ht_supported) { + len += scnprintf(p + len, size - len, + "ht_cap: 0x%04x, ampdu: %02x, %02x\n", + sta->ht_cap.cap, + sta->ht_cap.ampdu_factor, + sta->ht_cap.ampdu_density); + len += scnprintf(p + len, size - len, + "rx_mask: 0x%02x, %02x, %02x, %02x\n", + sta->ht_cap.mcs.rx_mask[0], + sta->ht_cap.mcs.rx_mask[1], + sta->ht_cap.mcs.rx_mask[2], + sta->ht_cap.mcs.rx_mask[3]); + } + if (sta->vht_cap.vht_supported) { + len += scnprintf(p + len, size - len, + "vht_cap: 0x%08x, mcs: %02x, %02x\n", + sta->vht_cap.cap, + sta->vht_cap.vht_mcs.rx_mcs_map, + sta->vht_cap.vht_mcs.tx_mcs_map); + } + len += scnprintf(p + len, size - len, "rx_bw: %d, rx_nss: %d\n", + sta->bandwidth, sta->rx_nss); + len += scnprintf(p + len, size - len, "tdls: %d, tdls_init: %d\n", + sta->tdls, sta->tdls_initiator); + len += scnprintf(p + len, size - len, "wme: %d, mfp: %d\n", + sta->wme, sta->mfp); len += scnprintf(p + len, size - len, "IV: %08x%04x\n", sta_info->iv32, sta_info->iv16); len += scnprintf(p + len, size - len, "\n"); @@ -261,6 +287,8 @@ static ssize_t mwl_debugfs_ampdu_read(struct file *file, char __user *ubuf, int len = 0, size = PAGE_SIZE; struct mwl_ampdu_stream *stream; int i; + struct mwl_sta *sta_info; + struct ieee80211_sta *sta; ssize_t ret; if (!p) @@ -283,6 +311,21 @@ static ssize_t mwl_debugfs_ampdu_read(struct file *file, char __user *ubuf, } } spin_unlock_bh(&priv->stream_lock); + spin_lock_bh(&priv->sta_lock); + list_for_each_entry(sta_info, &priv->sta_list, list) { + for (i = 0; i < MWL_MAX_TID; i++) { + if (sta_info->check_ba_failed[i]) { + sta = container_of((char *)sta_info, + struct ieee80211_sta, + drv_priv[0]); + len += scnprintf(p + len, size - len, + "%pM(%d): %d\n", + sta->addr, i, + sta_info->check_ba_failed[i]); + } + } + } + spin_unlock_bh(&priv->sta_lock); len += scnprintf(p + len, size - len, "\n"); ret = simple_read_from_buffer(ubuf, count, ppos, p, len); diff --git a/dev.h b/dev.h index 37504b9..5527e68 100644 --- a/dev.h +++ b/dev.h @@ -27,7 +27,7 @@ #include #define MWL_DRV_NAME KBUILD_MODNAME -#define MWL_DRV_VERSION "10.3.0.17-20160523" +#define MWL_DRV_VERSION "10.3.0.17-20160530" /* Map to 0x80000000 (Bus control) on BAR0 */ #define MACREG_REG_H2A_INTERRUPT_EVENTS 0x00000C18 /* (From host to ARM) */ @@ -467,6 +467,7 @@ struct mwl_sta { bool is_mesh_node; bool is_ampdu_allowed; struct mwl_tx_info tx_stats[MWL_MAX_TID]; + u32 check_ba_failed[MWL_MAX_TID]; bool is_amsdu_allowed; /* for amsdu aggregation */ struct { diff --git a/fwcmd.c b/fwcmd.c index e159304..b252ff7 100644 --- a/fwcmd.c +++ b/fwcmd.c @@ -2393,10 +2393,6 @@ int mwl_fwcmd_check_ba(struct ieee80211_hw *hw, if (pcmd->cmd_hdr.result != 0) { mutex_unlock(&priv->fwcmd_mutex); - if (printk_ratelimit()) - wiphy_debug(hw->wiphy, "check ba result err %d(%pM)\n", - le16_to_cpu(pcmd->cmd_hdr.result), - stream->sta->addr); return -EINVAL; } diff --git a/mac80211.c b/mac80211.c index 47f60c6..9dc563b 100644 --- a/mac80211.c +++ b/mac80211.c @@ -649,10 +649,7 @@ static int mwl_mac80211_ampdu_action(struct ieee80211_hw *hw, spin_lock_bh(&priv->stream_lock); if (rc) { mwl_fwcmd_remove_stream(hw, stream); - if (printk_ratelimit()) - wiphy_debug(hw->wiphy, - "ampdu start error code: %d(%pM)\n", - rc, addr); + sta_info->check_ba_failed[tid]++; rc = -EPERM; break; } @@ -691,6 +688,7 @@ static int mwl_mac80211_ampdu_action(struct ieee80211_hw *hw, if (!rc) { stream->state = AMPDU_STREAM_ACTIVE; + sta_info->check_ba_failed[tid] = 0; } else { idx = stream->idx; spin_unlock_bh(&priv->stream_lock); -- cgit v1.2.3