aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorLuis R. Rodriguez <lrodriguez@atheros.com>2009-12-07 15:57:50 -0500
committerJohn W. Linville <linville@tuxdriver.com>2009-12-22 13:56:02 -0500
commit9da3e068142ec7856b2f13261dcf0660fad32b61 (patch)
tree1afb5803591d4ec5ecc7aea3c36b103056824541 /net
parent7db94e210351e8578d4a98fed3edd4df5f10ae9d (diff)
mac80211: only bother printing highest data rate on debugfs if its set
IEEE-802.11n spec says the RX highest data rate field does not specify the highest supported RX data rate if its not set. Ignore it if not set then. Refer to section 7.3.56.4 Cc: johannes@sipsolutions.net Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net')
-rw-r--r--net/mac80211/debugfs_sta.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/net/mac80211/debugfs_sta.c b/net/mac80211/debugfs_sta.c
index c833b6ce9902..0d4a759ba72c 100644
--- a/net/mac80211/debugfs_sta.c
+++ b/net/mac80211/debugfs_sta.c
@@ -218,11 +218,19 @@ static ssize_t sta_ht_capa_read(struct file *file, char __user *userbuf,
218 p += scnprintf(p, sizeof(buf)+buf-p, "ampdu factor/density: %d/%d\n", 218 p += scnprintf(p, sizeof(buf)+buf-p, "ampdu factor/density: %d/%d\n",
219 htc->ampdu_factor, htc->ampdu_density); 219 htc->ampdu_factor, htc->ampdu_density);
220 p += scnprintf(p, sizeof(buf)+buf-p, "MCS mask:"); 220 p += scnprintf(p, sizeof(buf)+buf-p, "MCS mask:");
221
221 for (i = 0; i < IEEE80211_HT_MCS_MASK_LEN; i++) 222 for (i = 0; i < IEEE80211_HT_MCS_MASK_LEN; i++)
222 p += scnprintf(p, sizeof(buf)+buf-p, " %.2x", 223 p += scnprintf(p, sizeof(buf)+buf-p, " %.2x",
223 htc->mcs.rx_mask[i]); 224 htc->mcs.rx_mask[i]);
224 p += scnprintf(p, sizeof(buf)+buf-p, "\nMCS rx highest: %d\n", 225 p += scnprintf(p, sizeof(buf)+buf-p, "\n");
225 le16_to_cpu(htc->mcs.rx_highest)); 226
227 /* If not set this is meaningless */
228 if (le16_to_cpu(htc->mcs.rx_highest)) {
229 p += scnprintf(p, sizeof(buf)+buf-p,
230 "MCS rx highest: %d Mbps\n",
231 le16_to_cpu(htc->mcs.rx_highest));
232 }
233
226 p += scnprintf(p, sizeof(buf)+buf-p, "MCS tx params: %x\n", 234 p += scnprintf(p, sizeof(buf)+buf-p, "MCS tx params: %x\n",
227 htc->mcs.tx_params); 235 htc->mcs.tx_params);
228 } 236 }