From: Johannes Berg <johannes@sipsolutions.net>
To: Tomas Winkler <tomasw@gmail.com>
Cc: linville@tuxdriver.com, yi.zhu@intel.com, linux-wireless@vger.kernel.org
Subject: Re: [RFC PATCH 0/3] mac80211 dissasociation
Date: Mon, 08 Sep 2008 11:37:03 +0200 [thread overview]
Message-ID: <1220866623.31304.53.camel@johannes.berg> (raw)
In-Reply-To: <1ba2fa240809080232n42d6caefs6c3a1f5afef46cb4@mail.gmail.com> (sfid-20080908_113216_032675_8751A8F4)
On Mon, 2008-09-08 at 12:32 +0300, Tomas Winkler wrote:
> I want to test your stopping queue stuff in my environment but I get
> to the lab only very late today.
Ok, sure, works for me. I decided to do the stopping in a separate patch
as I have verified that it was already "wrong" before your changes,
patch inlined below (it's more a cosmetic thing, but still wrong).
Subject: mac80211: stop queues before carrier off
During testing of the disassociation fixes, Tomas noticed that it
was possible to run into a situation where you'd suddenly get a
few "wlan0: dropped frame to <AP> (unauthorized port)" messages
and I found this to be due to the AP's sta_info having been
removed but netif_carrier_off not having removed/stopped traffic
yet. To avoid that, stop the queue for the interface (and avoid
bringing them up when another vif scans when they weren't up.)
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
---
net/mac80211/mlme.c | 26 +++++++++++++++++---------
1 file changed, 17 insertions(+), 9 deletions(-)
--- everything.orig/net/mac80211/mlme.c 2008-09-08 11:27:39.000000000 +0200
+++ everything/net/mac80211/mlme.c 2008-09-08 11:30:41.000000000 +0200
@@ -574,6 +574,7 @@ static void ieee80211_set_associated(str
sdata->bss_conf.assoc = 1;
ieee80211_bss_info_change_notify(sdata, changed);
+ netif_tx_start_all_queues(sdata->dev);
netif_carrier_on(sdata->dev);
ieee80211_sta_send_apinfo(sdata, ifsta);
@@ -995,6 +996,7 @@ static void ieee80211_set_disassoc(struc
ifsta->assoc_scan_tries = 0;
ifsta->assoc_tries = 0;
+ netif_tx_stop_all_queues(sdata->dev);
netif_carrier_off(sdata->dev);
ieee80211_sta_tear_down_BA_sessions(sdata, sta->addr);
@@ -3413,6 +3415,7 @@ static void ieee80211_sta_reset_auth(str
ifsta->direct_probe_tries = 0;
ifsta->auth_tries = 0;
ifsta->assoc_tries = 0;
+ netif_tx_stop_all_queues(sdata->dev);
netif_carrier_off(sdata->dev);
}
@@ -3889,13 +3892,15 @@ void ieee80211_scan_completed(struct iee
rcu_read_lock();
list_for_each_entry_rcu(sdata, &local->interfaces, list) {
/* Tell AP we're back */
- if (sdata->vif.type == IEEE80211_IF_TYPE_STA &&
- sdata->u.sta.flags & IEEE80211_STA_ASSOCIATED)
- ieee80211_send_nullfunc(local, sdata, 0);
+ if (sdata->vif.type == IEEE80211_IF_TYPE_STA) {
+ if (sdata->u.sta.flags & IEEE80211_STA_ASSOCIATED) {
+ ieee80211_send_nullfunc(local, sdata, 0);
+ netif_tx_wake_all_queues(sdata->dev);
+ }
+ } else
+ netif_tx_wake_all_queues(sdata->dev);
ieee80211_restart_sta_timer(sdata);
-
- netif_wake_queue(sdata->dev);
}
rcu_read_unlock();
@@ -4053,10 +4058,13 @@ static int ieee80211_sta_start_scan(stru
rcu_read_lock();
list_for_each_entry_rcu(sdata, &local->interfaces, list) {
- netif_stop_queue(sdata->dev);
- if (sdata->vif.type == IEEE80211_IF_TYPE_STA &&
- (sdata->u.sta.flags & IEEE80211_STA_ASSOCIATED))
- ieee80211_send_nullfunc(local, sdata, 1);
+ if (sdata->vif.type == IEEE80211_IF_TYPE_STA) {
+ if (sdata->u.sta.flags & IEEE80211_STA_ASSOCIATED) {
+ netif_tx_stop_all_queues(sdata->dev);
+ ieee80211_send_nullfunc(local, sdata, 1);
+ }
+ } else
+ netif_tx_stop_all_queues(sdata->dev);
}
rcu_read_unlock();
prev parent reply other threads:[~2008-09-08 9:37 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-09-06 22:14 [RFC PATCH 0/3] mac80211 dissasociation Tomas Winkler
2008-09-06 22:14 ` [RFC PATCH 1/3] mac80211: restructure disassoc/deauth flows Tomas Winkler
2008-09-06 22:14 ` [RFC PATCH 2/3] mac80211: disassociate when moving to new BSS Tomas Winkler
2008-09-06 22:14 ` [RFC PATCH 3/3] mac80211: remove disassociation code from ieee80211_set_associated Tomas Winkler
2008-09-06 22:30 ` Johannes Berg
2008-09-06 22:33 ` Tomas Winkler
2008-09-06 22:26 ` [RFC PATCH 2/3] mac80211: disassociate when moving to new BSS Johannes Berg
2008-09-06 22:25 ` [RFC PATCH 1/3] mac80211: restructure disassoc/deauth flows Johannes Berg
2008-09-06 22:27 ` Johannes Berg
2008-09-06 22:32 ` Tomas Winkler
2008-09-06 22:42 ` Johannes Berg
2008-09-06 23:24 ` Tomas Winkler
2008-09-06 23:34 ` Johannes Berg
2008-09-08 8:23 ` Johannes Berg
2008-09-08 8:55 ` Tomas Winkler
2008-09-08 9:02 ` Johannes Berg
2008-09-07 1:08 ` [RFC PATCH 0/3] mac80211 dissasociation Marcel Holtmann
2008-09-07 5:41 ` Tomas Winkler
2008-09-07 13:39 ` Johannes Berg
2008-09-07 14:24 ` Tomas Winkler
2008-09-07 14:40 ` Johannes Berg
2008-09-07 14:50 ` Tomas Winkler
2008-09-07 23:14 ` Tomas Winkler
2008-09-08 7:44 ` Johannes Berg
2008-09-08 7:58 ` Johannes Berg
2008-09-08 8:18 ` Tomas Winkler
2008-09-08 8:30 ` Johannes Berg
2008-09-08 8:31 ` Johannes Berg
2008-09-08 8:38 ` Johannes Berg
2008-09-08 8:46 ` Tomas Winkler
2008-09-08 8:58 ` Johannes Berg
2008-09-08 9:06 ` Tomas Winkler
2008-09-08 9:11 ` Johannes Berg
2008-09-08 9:24 ` Johannes Berg
2008-09-08 9:32 ` Tomas Winkler
2008-09-08 9:37 ` Johannes Berg [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1220866623.31304.53.camel@johannes.berg \
--to=johannes@sipsolutions.net \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
--cc=tomasw@gmail.com \
--cc=yi.zhu@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox