mac80211: fix delayed ADDBA response
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
@@ -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
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.
Signed-off-by Victor Goldenshtein <[email protected]>--- net/mac80211/iface.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)net/mac80211/iface.c +0
-0
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
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.
Signed-off-by Victor Goldenshtein<[email protected]>--- net/mac80211/iface.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)net/mac80211/iface.c +0
-0@@ -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_SCANNINGbe 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.
Johannes Berg
maintainerQuoted 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.
Signed-off-by Victor Goldenshtein <[email protected]>--- net/mac80211/iface.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)net/mac80211/iface.c +0
-0
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
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.
Johannes Berg
maintainerQuoted 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
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?
Johannes Berg
maintainerQuoted 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_scanningandmgmt->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