Skip to content

Commit

Permalink
Commit mwlwifi driver 10.3.0.17-20160530
Browse files Browse the repository at this point in the history
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 <dlin@marvell.com>
  • Loading branch information
yuhhaurlin committed May 30, 2016
1 parent 267c514 commit 608f4eb
Show file tree
Hide file tree
Showing 4 changed files with 47 additions and 9 deletions.
43 changes: 43 additions & 0 deletions debugfs.c
Expand Up @@ -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");
Expand All @@ -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)
Expand All @@ -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);
Expand Down
3 changes: 2 additions & 1 deletion dev.h
Expand Up @@ -27,7 +27,7 @@
#include <net/mac80211.h>

#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) */
Expand Down Expand Up @@ -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 {
Expand Down
4 changes: 0 additions & 4 deletions fwcmd.c
Expand Up @@ -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;
}

Expand Down
6 changes: 2 additions & 4 deletions mac80211.c
Expand Up @@ -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;
}
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 608f4eb

Please sign in to comment.