Discussion:
[RFC] mac80211: don't flush when probing the AP
Emmanuel Grumbach
2014-10-16 20:25:57 UTC
Permalink
All the callers of ieee80211_mgd_probe_ap_send return right
after they call the flush() callback. This means that calling
flush() is uneeded since its meaning is to wait until the
queues of the device are empty. It is pointless to wait if
there is nothing that must ensure that the frame has left
the Tx queue.
ieee80211_mgd_probe_ap_send is called at the very end of
a worker - so flush() is not needed.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach-***@public.gmane.org>
---
net/mac80211/mlme.c | 2 --
1 file changed, 2 deletions(-)

diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index 0a39361..75df184 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -2219,8 +2219,6 @@ static void ieee80211_mgd_probe_ap_send(struct ieee80211_sub_if_data *sdata)

ifmgd->probe_timeout = jiffies + msecs_to_jiffies(probe_wait_ms);
run_again(sdata, ifmgd->probe_timeout);
- if (sdata->local->hw.flags & IEEE80211_HW_REPORTS_TX_ACK_STATUS)
- ieee80211_flush_queues(sdata->local, sdata);
}

static void ieee80211_mgd_probe_ap(struct ieee80211_sub_if_data *sdata,
--
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo-***@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Johannes Berg
2014-10-20 10:41:28 UTC
Permalink
Post by Emmanuel Grumbach
All the callers of ieee80211_mgd_probe_ap_send return right
after they call the flush() callback. This means that calling
flush() is uneeded since its meaning is to wait until the
queues of the device are empty. It is pointless to wait if
there is nothing that must ensure that the frame has left
the Tx queue.
ieee80211_mgd_probe_ap_send is called at the very end of
a worker - so flush() is not needed.
There may have been some concern that the timer/work could run again
while the packets are still on the (possibly long) queue, but I guess
this is reasonable? We might want to avoid that by tracking whether
we've sent out a frame and (not) gotten a response?

johannes

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo-***@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Grumbach, Emmanuel
2014-10-20 10:44:38 UTC
Permalink
Post by Johannes Berg
All the callers of ieee80211_mgd_probe_ap_send return right after they
call the flush() callback. This means that calling
flush() is uneeded since its meaning is to wait until the queues of
the device are empty. It is pointless to wait if there is nothing that
must ensure that the frame has left the Tx queue.
ieee80211_mgd_probe_ap_send is called at the very end of a worker - so
flush() is not needed.
There may have been some concern that the timer/work could run again
while the packets are still on the (possibly long) queue, but I guess this is
reasonable? We might want to avoid that by tracking whether we've sent out
a frame and (not) gotten a response?
Right - but the flow that checks the status is triggered but the status given by the driver anyway.
��{.n�+�������+%��lzwm��b�맲��r��zX��"��^�ȧ���ܨ}���Ơz�&j:+v����n�r��6;靫3��\
nnX��f�z��
Emmanuel Grumbach
2014-10-20 12:57:18 UTC
Permalink
All the callers of ieee80211_mgd_probe_ap_send return right
after they call the flush() callback. This means that calling
flush() is uneeded since its meaning is to wait until the
queues of the device are empty.

Devices that know how to report status on Tx will do so using
the regular path (ieee80211_tx_status) and this status will
trigger the continuation of the flow of the probe
(ieee80211_sta_tx_notify).

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach-***@public.gmane.org>
---
net/mac80211/mlme.c | 2 --
1 file changed, 2 deletions(-)

diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index 9ddd721..abba89d 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -1956,8 +1956,6 @@ static void ieee80211_mgd_probe_ap_send(struct ieee80211_sub_if_data *sdata)

ifmgd->probe_timeout = jiffies + msecs_to_jiffies(probe_wait_ms);
run_again(sdata, ifmgd->probe_timeout);
- if (sdata->local->hw.flags & IEEE80211_HW_REPORTS_TX_ACK_STATUS)
- ieee80211_flush_queues(sdata->local, sdata);
}

static void ieee80211_mgd_probe_ap(struct ieee80211_sub_if_data *sdata,
--
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo-***@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Loading...