linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mac80211:  Add rate-control name to station debugfs.
@ 2013-10-11 21:04 greearb
  2013-10-11 21:29 ` Felix Fietkau
  0 siblings, 1 reply; 3+ messages in thread
From: greearb @ 2013-10-11 21:04 UTC (permalink / raw)
  To: linux-wireless; +Cc: Ben Greear

From: Ben Greear <greearb@candelatech.com>

Nice to see what algorithm it's actually using.

Signed-off-by: Ben Greear <greearb@candelatech.com>
---
 net/mac80211/debugfs_sta.c |   17 +++++++++++++++++
 1 files changed, 17 insertions(+), 0 deletions(-)

diff --git a/net/mac80211/debugfs_sta.c b/net/mac80211/debugfs_sta.c
index 19c54a4..472f544 100644
--- a/net/mac80211/debugfs_sta.c
+++ b/net/mac80211/debugfs_sta.c
@@ -15,6 +15,7 @@
 #include "debugfs_sta.h"
 #include "sta_info.h"
 #include "driver-ops.h"
+#include "rate.h"
 
 /* sta attributtes */
 
@@ -371,6 +372,21 @@ static ssize_t sta_current_tx_rate_read(struct file *file, char __user *userbuf,
 }
 STA_OPS(current_tx_rate);
 
+static ssize_t sta_rc_name_read(struct file *file, char __user *userbuf,
+				size_t count, loff_t *ppos)
+{
+	struct sta_info *sta = file->private_data;
+	struct rate_control_ref *ref = sta->rate_ctrl;
+	if (ref && ref->ops && ref->ops->name)
+		return mac80211_format_buffer(userbuf, count, ppos,
+					      "%s\n",
+					      ref->ops->name);
+	else
+		return mac80211_format_buffer(userbuf, count, ppos,
+					      "Unknown\n");
+}
+STA_OPS(rc_name);
+
 static ssize_t sta_last_rx_rate_read(struct file *file, char __user *userbuf,
 				     size_t count, loff_t *ppos)
 {
@@ -441,6 +457,7 @@ void ieee80211_sta_debugfs_add(struct sta_info *sta)
 	DEBUGFS_ADD(last_ack_signal);
 	DEBUGFS_ADD(current_tx_rate);
 	DEBUGFS_ADD(last_rx_rate);
+	DEBUGFS_ADD(rc_name);
 
 	DEBUGFS_ADD_COUNTER(rx_packets, rx_packets);
 	DEBUGFS_ADD_COUNTER(tx_packets, tx_packets);
-- 
1.7.3.4


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] mac80211:  Add rate-control name to station debugfs.
  2013-10-11 21:04 [PATCH] mac80211: Add rate-control name to station debugfs greearb
@ 2013-10-11 21:29 ` Felix Fietkau
  2013-10-11 21:40   ` Ben Greear
  0 siblings, 1 reply; 3+ messages in thread
From: Felix Fietkau @ 2013-10-11 21:29 UTC (permalink / raw)
  To: greearb; +Cc: linux-wireless

On 2013-10-11 11:04 PM, greearb@candelatech.com wrote:
> From: Ben Greear <greearb@candelatech.com>
> 
> Nice to see what algorithm it's actually using.
No need for that, you can use this:
# cat /sys/kernel/debug/ieee80211/phy0/rc/name

- Felix


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] mac80211:  Add rate-control name to station debugfs.
  2013-10-11 21:29 ` Felix Fietkau
@ 2013-10-11 21:40   ` Ben Greear
  0 siblings, 0 replies; 3+ messages in thread
From: Ben Greear @ 2013-10-11 21:40 UTC (permalink / raw)
  To: Felix Fietkau; +Cc: linux-wireless

On 10/11/2013 02:29 PM, Felix Fietkau wrote:
> On 2013-10-11 11:04 PM, greearb@candelatech.com wrote:
>> From: Ben Greear <greearb@candelatech.com>
>>
>> Nice to see what algorithm it's actually using.
> No need for that, you can use this:
> # cat /sys/kernel/debug/ieee80211/phy0/rc/name

Ok, that should work for me.  But, is there any reason we cannot
have a different rate control alg for different stations on same
phy?

I am thinking of allowing such configuration if possible...the
better to compare various rate ctrl algorithms...

Thanks,
Ben

>
> - Felix
>


-- 
Ben Greear <greearb@candelatech.com>
Candela Technologies Inc  http://www.candelatech.com


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-10-11 21:40 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-11 21:04 [PATCH] mac80211: Add rate-control name to station debugfs greearb
2013-10-11 21:29 ` Felix Fietkau
2013-10-11 21:40   ` Ben Greear

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).