* [RFC] mac80211: add debugfs file for last ack signal
@ 2012-11-26 13:57 saravanad
2012-11-26 15:15 ` Johannes Berg
0 siblings, 1 reply; 8+ messages in thread
From: saravanad @ 2012-11-26 13:57 UTC (permalink / raw)
To: johannes; +Cc: linux-wireless
Add a debugfs file showing the signal strength
of the ack frame that is received for the
currently sent tx packet.
Signed-off-by: Saravana <saravanad@posedge.com>
---
The diff file is generated from wireless-testing git tree.
net/mac80211/debugfs_sta.c | 2 ++
net/mac80211/sta_info.h | 2 ++
net/mac80211/status.c | 2 ++
3 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/net/mac80211/debugfs_sta.c b/net/mac80211/debugfs_sta.c
index 89281d2..1566941 100644
--- a/net/mac80211/debugfs_sta.c
+++ b/net/mac80211/debugfs_sta.c
@@ -53,6 +53,7 @@ static const struct file_operations sta_ ##name##
_ops = { \
STA_FILE(aid, sta.aid, D);
STA_FILE(dev, sdata->name, S);
STA_FILE(last_signal, last_signal, D);
+STA_FILE(last_ack_signal, last_ack_signal, D);
static ssize_t sta_flags_read(struct file *file, char __user *userbuf,
size_t count, loff_t *ppos)
@@ -369,6 +370,7 @@ void ieee80211_sta_debugfs_add(struct sta_info
*sta)
DEBUGFS_ADD(dev);
DEBUGFS_ADD(last_signal);
DEBUGFS_ADD(ht_capa);
+ DEBUGFS_ADD(last_ack_signal);
DEBUGFS_ADD_COUNTER(rx_packets, rx_packets);
DEBUGFS_ADD_COUNTER(tx_packets, tx_packets);
diff --git a/net/mac80211/sta_info.h b/net/mac80211/sta_info.h
index 776f3d0..e1f1fa2 100644
--- a/net/mac80211/sta_info.h
+++ b/net/mac80211/sta_info.h
@@ -249,6 +249,7 @@ struct sta_ampdu_mlme {
* @rx_dropped: number of dropped MPDUs from this STA
* @last_signal: signal of last received frame from this STA
* @avg_signal: moving average of signal of received frames from this
STA
+ * @last_ack_signal: signal of last received Ack frame from this STA
* @last_seq_ctrl: last received seq/frag number from this STA (per RX
queue)
* @tx_filtered_count: number of frames the hardware filtered for this
STA
* @tx_retry_failed: number of frames that failed retry
@@ -328,6 +329,7 @@ struct sta_info {
unsigned long rx_dropped;
int last_signal;
struct ewma avg_signal;
+ int last_ack_signal;
/* Plus 1 for non-QoS frames */
__le16 last_seq_ctrl[IEEE80211_NUM_TIDS + 1];
diff --git a/net/mac80211/status.c b/net/mac80211/status.c
index ab63237..c3c133c 100644
--- a/net/mac80211/status.c
+++ b/net/mac80211/status.c
@@ -539,6 +539,8 @@ void ieee80211_tx_status(struct ieee80211_hw *hw,
struct sk_buff *skb)
sta->lost_packets = 0;
}
}
+ if (acked)
+ sta->last_ack_signal = info->status.ack_signal;
}
rcu_read_unlock();
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [RFC] mac80211: add debugfs file for last ack signal
2012-11-26 13:57 saravanad
@ 2012-11-26 15:15 ` Johannes Berg
2012-11-28 7:08 ` Saravana
0 siblings, 1 reply; 8+ messages in thread
From: Johannes Berg @ 2012-11-26 15:15 UTC (permalink / raw)
To: saravanad; +Cc: linux-wireless
On Mon, 2012-11-26 at 05:57 -0800, saravanad@posedge.com wrote:
> Add a debugfs file showing the signal strength
> of the ack frame that is received for the
> currently sent tx packet.
This seems reasonable, but again line-wrapped.
johannes
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [RFC] mac80211: add debugfs file for last ack signal
2012-11-26 15:15 ` Johannes Berg
@ 2012-11-28 7:08 ` Saravana
0 siblings, 0 replies; 8+ messages in thread
From: Saravana @ 2012-11-28 7:08 UTC (permalink / raw)
To: Johannes Berg; +Cc: linux-wireless
On 11/26/2012 08:45 PM, Johannes Berg wrote:
> On Mon, 2012-11-26 at 05:57 -0800, saravanad@posedge.com wrote:
>> Add a debugfs file showing the signal strength
>> of the ack frame that is received for the
>> currently sent tx packet.
>
> This seems reasonable, but again line-wrapped.
>
In my e-mail client i found that wrap long line settings was set to
default value true. I have disabled the same and will re-send the patch.
The patch that i will be sending is based on mac80211-next tree.
> johannes
>
>
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* [RFC] mac80211: add debugfs file for last ack signal
@ 2012-11-28 8:23 Saravana
2012-11-28 12:33 ` Johannes Berg
0 siblings, 1 reply; 8+ messages in thread
From: Saravana @ 2012-11-28 8:23 UTC (permalink / raw)
To: Johannes Berg; +Cc: linux-wireless
Add a debugfs file showing the signal strength
of the ack frame that is received for the
currently sent tx packet
Signed-off-by: Saravana <saravanad@posedge.com>
---
net/mac80211/debugfs_sta.c | 2 ++
net/mac80211/sta_info.h | 2 ++
net/mac80211/status.c | 2 ++
3 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/net/mac80211/debugfs_sta.c b/net/mac80211/debugfs_sta.c
index 89281d2..1566941 100644
--- a/net/mac80211/debugfs_sta.c
+++ b/net/mac80211/debugfs_sta.c
@@ -53,6 +53,7 @@ static const struct file_operations sta_ ##name## _ops = { \
STA_FILE(aid, sta.aid, D);
STA_FILE(dev, sdata->name, S);
STA_FILE(last_signal, last_signal, D);
+STA_FILE(last_ack_signal, last_ack_signal, D);
static ssize_t sta_flags_read(struct file *file, char __user *userbuf,
size_t count, loff_t *ppos)
@@ -369,6 +370,7 @@ void ieee80211_sta_debugfs_add(struct sta_info *sta)
DEBUGFS_ADD(dev);
DEBUGFS_ADD(last_signal);
DEBUGFS_ADD(ht_capa);
+ DEBUGFS_ADD(last_ack_signal);
DEBUGFS_ADD_COUNTER(rx_packets, rx_packets);
DEBUGFS_ADD_COUNTER(tx_packets, tx_packets);
diff --git a/net/mac80211/sta_info.h b/net/mac80211/sta_info.h
index 6835cea..dce7693 100644
--- a/net/mac80211/sta_info.h
+++ b/net/mac80211/sta_info.h
@@ -250,6 +250,7 @@ struct sta_ampdu_mlme {
* @rx_dropped: number of dropped MPDUs from this STA
* @last_signal: signal of last received frame from this STA
* @avg_signal: moving average of signal of received frames from this STA
+ * @last_ack_signal: signal of last received Ack frame from this STA
* @last_seq_ctrl: last received seq/frag number from this STA (per RX queue)
* @tx_filtered_count: number of frames the hardware filtered for this STA
* @tx_retry_failed: number of frames that failed retry
@@ -329,6 +330,7 @@ struct sta_info {
unsigned long rx_dropped;
int last_signal;
struct ewma avg_signal;
+ int last_ack_signal;
/* Plus 1 for non-QoS frames */
__le16 last_seq_ctrl[IEEE80211_NUM_TIDS + 1];
diff --git a/net/mac80211/status.c b/net/mac80211/status.c
index 2d931ad..64dda41 100644
--- a/net/mac80211/status.c
+++ b/net/mac80211/status.c
@@ -539,6 +539,8 @@ void ieee80211_tx_status(struct ieee80211_hw *hw, struct sk_buff *skb)
sta->lost_packets = 0;
}
}
+ if (acked)
+ sta->last_ack_signal = info->status.ack_signal;
}
rcu_read_unlock();
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [RFC] mac80211: add debugfs file for last ack signal
2012-11-28 8:23 Saravana
@ 2012-11-28 12:33 ` Johannes Berg
2012-11-28 12:38 ` Saravana
0 siblings, 1 reply; 8+ messages in thread
From: Johannes Berg @ 2012-11-28 12:33 UTC (permalink / raw)
To: Saravana; +Cc: linux-wireless
On Wed, 2012-11-28 at 13:53 +0530, Saravana wrote:
> Add a debugfs file showing the signal strength
> of the ack frame that is received for the
> currently sent tx packet
>
> Signed-off-by: Saravana <saravanad@posedge.com>
> ---
> net/mac80211/debugfs_sta.c | 2 ++
> net/mac80211/sta_info.h | 2 ++
> net/mac80211/status.c | 2 ++
> 3 files changed, 6 insertions(+), 0 deletions(-)
>
> diff --git a/net/mac80211/debugfs_sta.c b/net/mac80211/debugfs_sta.c
> index 89281d2..1566941 100644
> --- a/net/mac80211/debugfs_sta.c
> +++ b/net/mac80211/debugfs_sta.c
> @@ -53,6 +53,7 @@ static const struct file_operations sta_ ##name## _ops = { \
> STA_FILE(aid, sta.aid, D);
> STA_FILE(dev, sdata->name, S);
> STA_FILE(last_signal, last_signal, D);
> +STA_FILE(last_ack_signal, last_ack_signal, D);
>
> static ssize_t sta_flags_read(struct file *file, char __user *userbuf,
> size_t count, loff_t *ppos)
> @@ -369,6 +370,7 @@ void ieee80211_sta_debugfs_add(struct sta_info *sta)
> DEBUGFS_ADD(dev);
> DEBUGFS_ADD(last_signal);
> DEBUGFS_ADD(ht_capa);
> + DEBUGFS_ADD(last_ack_signal);
>
> DEBUGFS_ADD_COUNTER(rx_packets, rx_packets);
> DEBUGFS_ADD_COUNTER(tx_packets, tx_packets);
> diff --git a/net/mac80211/sta_info.h b/net/mac80211/sta_info.h
> index 6835cea..dce7693 100644
> --- a/net/mac80211/sta_info.h
> +++ b/net/mac80211/sta_info.h
> @@ -250,6 +250,7 @@ struct sta_ampdu_mlme {
> * @rx_dropped: number of dropped MPDUs from this STA
> * @last_signal: signal of last received frame from this STA
> * @avg_signal: moving average of signal of received frames from this STA
> + * @last_ack_signal: signal of last received Ack frame from this STA
> * @last_seq_ctrl: last received seq/frag number from this STA (per RX queue)
> * @tx_filtered_count: number of frames the hardware filtered for this STA
> * @tx_retry_failed: number of frames that failed retry
> @@ -329,6 +330,7 @@ struct sta_info {
> unsigned long rx_dropped;
> int last_signal;
> struct ewma avg_signal;
> + int last_ack_signal;
> /* Plus 1 for non-QoS frames */
> __le16 last_seq_ctrl[IEEE80211_NUM_TIDS + 1];
>
> diff --git a/net/mac80211/status.c b/net/mac80211/status.c
> index 2d931ad..64dda41 100644
> --- a/net/mac80211/status.c
> +++ b/net/mac80211/status.c
> @@ -539,6 +539,8 @@ void ieee80211_tx_status(struct ieee80211_hw *hw, struct sk_buff *skb)
> sta->lost_packets = 0;
> }
> }
> + if (acked)
> + sta->last_ack_signal = info->status.ack_signal;
I'd prefer a blank line before the if
This patch was sent in a way that I could apply it. :-)
johannes
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [RFC] mac80211: add debugfs file for last ack signal
2012-11-28 12:33 ` Johannes Berg
@ 2012-11-28 12:38 ` Saravana
0 siblings, 0 replies; 8+ messages in thread
From: Saravana @ 2012-11-28 12:38 UTC (permalink / raw)
To: Johannes Berg; +Cc: linux-wireless
On 11/28/2012 06:03 PM, Johannes Berg wrote:
>> + if (acked)
>> + sta->last_ack_signal = info->status.ack_signal;
>
> I'd prefer a blank line before the if
>
> This patch was sent in a way that I could apply it. :-)
>
will re-submit the patch with the blank line inserted before the if.
> johannes
>
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* [RFC] mac80211: add debugfs file for last ack signal
@ 2012-11-28 12:48 Saravana
2012-11-28 12:54 ` Johannes Berg
0 siblings, 1 reply; 8+ messages in thread
From: Saravana @ 2012-11-28 12:48 UTC (permalink / raw)
To: Johannes Berg; +Cc: linux-wireless
Add a debugfs file showing the signal strength
of the ack frame that is received for the
currently sent tx packet
Signed-off-by: Saravana <saravanad@posedge.com>
---
net/mac80211/debugfs_sta.c | 2 ++
net/mac80211/sta_info.h | 2 ++
net/mac80211/status.c | 3 +++
3 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/net/mac80211/debugfs_sta.c b/net/mac80211/debugfs_sta.c
index 89281d2..1566941 100644
--- a/net/mac80211/debugfs_sta.c
+++ b/net/mac80211/debugfs_sta.c
@@ -53,6 +53,7 @@ static const struct file_operations sta_ ##name## _ops = { \
STA_FILE(aid, sta.aid, D);
STA_FILE(dev, sdata->name, S);
STA_FILE(last_signal, last_signal, D);
+STA_FILE(last_ack_signal, last_ack_signal, D);
static ssize_t sta_flags_read(struct file *file, char __user *userbuf,
size_t count, loff_t *ppos)
@@ -369,6 +370,7 @@ void ieee80211_sta_debugfs_add(struct sta_info *sta)
DEBUGFS_ADD(dev);
DEBUGFS_ADD(last_signal);
DEBUGFS_ADD(ht_capa);
+ DEBUGFS_ADD(last_ack_signal);
DEBUGFS_ADD_COUNTER(rx_packets, rx_packets);
DEBUGFS_ADD_COUNTER(tx_packets, tx_packets);
diff --git a/net/mac80211/sta_info.h b/net/mac80211/sta_info.h
index 6835cea..dce7693 100644
--- a/net/mac80211/sta_info.h
+++ b/net/mac80211/sta_info.h
@@ -250,6 +250,7 @@ struct sta_ampdu_mlme {
* @rx_dropped: number of dropped MPDUs from this STA
* @last_signal: signal of last received frame from this STA
* @avg_signal: moving average of signal of received frames from this STA
+ * @last_ack_signal: signal of last received Ack frame from this STA
* @last_seq_ctrl: last received seq/frag number from this STA (per RX queue)
* @tx_filtered_count: number of frames the hardware filtered for this STA
* @tx_retry_failed: number of frames that failed retry
@@ -329,6 +330,7 @@ struct sta_info {
unsigned long rx_dropped;
int last_signal;
struct ewma avg_signal;
+ int last_ack_signal;
/* Plus 1 for non-QoS frames */
__le16 last_seq_ctrl[IEEE80211_NUM_TIDS + 1];
diff --git a/net/mac80211/status.c b/net/mac80211/status.c
index 2d931ad..6400037 100644
--- a/net/mac80211/status.c
+++ b/net/mac80211/status.c
@@ -539,6 +539,9 @@ void ieee80211_tx_status(struct ieee80211_hw *hw, struct sk_buff *skb)
sta->lost_packets = 0;
}
}
+
+ if (acked)
+ sta->last_ack_signal = info->status.ack_signal;
}
rcu_read_unlock();
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [RFC] mac80211: add debugfs file for last ack signal
2012-11-28 12:48 [RFC] mac80211: add debugfs file for last ack signal Saravana
@ 2012-11-28 12:54 ` Johannes Berg
0 siblings, 0 replies; 8+ messages in thread
From: Johannes Berg @ 2012-11-28 12:54 UTC (permalink / raw)
To: Saravana; +Cc: linux-wireless
If you'd send them as [PATCH] I might even apply your patches ;)
johannes
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2012-11-28 12:54 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-28 12:48 [RFC] mac80211: add debugfs file for last ack signal Saravana
2012-11-28 12:54 ` Johannes Berg
-- strict thread matches above, loose matches on Subject: below --
2012-11-28 8:23 Saravana
2012-11-28 12:33 ` Johannes Berg
2012-11-28 12:38 ` Saravana
2012-11-26 13:57 saravanad
2012-11-26 15:15 ` Johannes Berg
2012-11-28 7:08 ` Saravana
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).