Skip to contentSkip to conversation

mac80211: fix delayed ADDBA response

PATCH In review Victor Goldenshtein 4 participants 8 messages Jan 8, 2013 – Jan 9, 2013 mac80211

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mac80211: fix delayed ADDBA response

Block frame processing during scan might delay the ADDBA response, which eventually timeouts and significantly reduces the device throughput. Remove this constrain as it's not required for the HW scan.

---
 net/mac80211/iface.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
net/mac80211/iface.c +1 -1
index 06fac29..a26ee36 100644
@@ -1063,7 +1063,7 @@ static void ieee80211_iface_work(struct work_struct *work)
 	if (!ieee80211_sdata_running(sdata))
 		return;
 
-	if (local->scanning)
+	if (local->scanning && !local->ops->hw_scan)
 		return;
 
 	/*
Signature · 1 line
1.7.5.4
#1 lore raw
Quoted 16 lines · Victor Goldenshtein

Block frame processing during scan might delay the ADDBA response, which eventually timeouts and significantly reduces the device throughput. Remove this constrain as it's not required for the HW scan.

---
 net/mac80211/iface.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
net/mac80211/iface.c +0 -0
index 06fac29..a26ee36 100644

net/mac80211/iface.c static void ieee80211_iface_work(struct work_struct *work) · line 1066

Quoted 5 lines
net/mac80211/iface.c +1 -1
@@ -1063,7 +1063,7 @@ static void ieee80211_iface_work(struct work_struct *work)
 	if (!ieee80211_sdata_running(sdata))
 		return;
 
-	if (local->scanning)
+	if (local->scanning && !local->ops->hw_scan)

Wouldn't checking for SCAN_HW_SCANNING be better?

Seth

#2 lore raw
Quoted 20 lines · Seth Forshee
Quoted 19 lines · Victor Goldenshtein

Block frame processing during scan might delay the ADDBA response, which eventually timeouts and significantly reduces the device throughput. Remove this constrain as it's not required for the HW scan.

---
  net/mac80211/iface.c |    2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)
net/mac80211/iface.c +0 -0
index 06fac29..a26ee36 100644
@@ -1063,7 +1063,7 @@ static void ieee80211_iface_work(struct work_struct *work)
  	if (!ieee80211_sdata_running(sdata))
  		return;
 
Quoted 5 lines

net/mac80211/iface.c static void ieee80211_iface_work(struct work_struct *work) · line 1066

Quoted 2 lines
net/mac80211/iface.c +1 -1
-	if (local->scanning)
+	if (local->scanning&&  !local->ops->hw_scan)

Wouldn't checking for SCAN_HW_SCANNING be better?

IMHO it's totally the same, besides that mac80211 use this check in many other places, but lets see what Johannes thinks.

Signature · 2 lines
Thanks,
Victor.
maintainer
#3 lore raw
In reply to Victor Goldenshtein
Quoted 16 lines · Victor Goldenshtein

Block frame processing during scan might delay the ADDBA response, which eventually timeouts and significantly reduces the device throughput. Remove this constrain as it's not required for the HW scan.

---
 net/mac80211/iface.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
net/mac80211/iface.c +0 -0
index 06fac29..a26ee36 100644

net/mac80211/iface.c static void ieee80211_iface_work(struct work_struct *work) · line 1067

Quoted 6 lines
net/mac80211/iface.c +1 -1
@@ -1063,7 +1063,7 @@ static void ieee80211_iface_work(struct work_struct *work)
 	if (!ieee80211_sdata_running(sdata))
 		return;
 
-	if (local->scanning)
+	if (local->scanning && !local->ops->hw_scan)
 		return;

Regardless of whether it should check the HW scan flag (I think that'd be better), this doesn't seem right.

Do we really want to allow arbitrary changes to the interfaces while scanning? This could process a deauth frame for example, I'm worried that might break things.

johannes

#4 lore raw
Quoted 4 lines · Johannes Berg

Do we really want to allow arbitrary changes to the interfaces while scanning? This could process a deauth frame for example, I'm worried that might break things.

Can you please elaborate why we shouldn't process deauth frames during HW scan ? This fix was tested with our 18xx, don't see how it can break things, but it's up to you whether to take it..

Signature · 2 lines
Thanks,
Victor.
maintainer
#5 lore raw
Quoted 9 lines · Victor Goldenshtein
Quoted 4 lines · Johannes Berg

Do we really want to allow arbitrary changes to the interfaces while scanning? This could process a deauth frame for example, I'm worried that might break things.

Can you please elaborate why we shouldn't process deauth frames during HW scan ? This fix was tested with our 18xx, don't see how it can break things, but it's up to you whether to take it..

But did you test disassociating in the middle of the scan? I suspect that some devices at least might have trouble with reprogramming the device completely while it's scanning.

Maybe you can make this behaviour opt-in with a hardware flag?

johannes

#6 lore raw
Quoted 11 lines · Johannes Berg
Quoted 9 lines · Victor Goldenshtein
Quoted 4 lines · Johannes Berg

Do we really want to allow arbitrary changes to the interfaces while scanning? This could process a deauth frame for example, I'm worried that might break things.

Can you please elaborate why we shouldn't process deauth frames during HW scan ? This fix was tested with our 18xx, don't see how it can break things, but it's up to you whether to take it..

Quoted 6 lines

But did you test disassociating in the middle of the scan? I suspect that some devices at least might have trouble with reprogramming the device completely while it's scanning.

Maybe you can make this behaviour opt-in with a hardware flag?

This is just a speed optimization for BA session management, so I'm pretty sure the above was not tested.

Maybe we can make the "if" stricter and only allow it to pass if it's hw_scanning and mgmt->u.action.category == WLAN_CATEGORY_BACK ? Would that make sense?

maintainer
#7 lore raw
Quoted 6 lines · Arik Nemtsov

This is just a speed optimization for BA session management, so I'm pretty sure the above was not tested.

Maybe we can make the "if" stricter and only allow it to pass if it's hw_scanning and mgmt->u.action.category == WLAN_CATEGORY_BACK ? Would that make sense?

Yeah that's the other option -- making the processing loop more selective. That's more complex, but should work better.

johannes