-
Notifications
You must be signed in to change notification settings - Fork 0
[PW_SID:953435] Improve roam scan strategy #459
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: workflow
Are you sure you want to change the base?
Conversation
This is taken care of by the individual cache items and if none exist, tar fails.
Return the number of freqs in a scan_freq_set, useful for knowing how big the set is.
This is a hashmap where the keys are freqs and the values are timestamps. When a freq has been scanned, the timestamp for that freq is updated to "now". The function scan_get_freq_age can be used for getting the age of a freq, which is how long time ago it was last scanned. This is useful for deciding if a certain freq should be scanned, or if it's better to spend that time on scanning another freq.
When IWD decides to roam, it scans either neighbor freqs or known freqs (if neighbors are not available). If it fails to roam after getting the scan results, it scans ALL freqs. In my testing there's a high chance that both neighbor and/or known scans fail to roam and we end up scanning all freqs. This is very slow and if you're already moving away from the current BSS, there's a high chance you will lose connection completely before the scan is finished. Instead of scanning all freqs at once, split them up into prioritized subsets. Each subset contains a handful of freqs each, a lower index for the subset means that its freqs are more common. So subset 0 has the most common freqs and subset 3 has the least common freqs. The first two subsets also contain no DFS channels, speeding up scanning even more. In order to make this efficient, use the "scan_freq_map" to avoid scanning freqs that were recently scanned. When a roam scan is triggered, add the most prioritized freqs to the list of freqs that should be scanned. The order of priority is: 1. Neighbor freqs 2. Known freqs 3. Subsets, starting with index 0 and incrementing if the subset is exhausted For each freq candidate, check the scan_freq_map to see how long time ago this freq was last scanned, this is denoted as its "age". If its age is above a threshold, add the freq to the list, otherwise discard it. Once the list has a certain size, start the scan. If no roaming occurs after the scan is completed, run the same function again. It will now pick new freqs since the previous freqs have been updated in scan_freq_map. This approach results in more scans, but fewer freqs per scan, leading to shorter delays between scan results. It also avoids scanning the same freqs back-to-back, which is generally not very useful. In combination with the freq priority, this increases the chance of finding a good BSS early.
|
Fetch PR Prep - Setup ELL Make Distcheck Build - Configure Make Check Output: Make Check w/Valgrind Output: Incremental Build with patches Output: |
|
Fetch PR GitLint Prep - Setup ELL Make Distcheck Build - Configure Make Check Output: Make Check w/Valgrind Output: Incremental Build with patches Output: Autotest Runner Output: Clang Build Output: |
a2c9985 to
624cea8
Compare
f77997d to
bc55824
Compare
bc55824 to
1d29908
Compare
0e6ebfd to
9ab928a
Compare
2123adf to
d37ddb0
Compare
d37ddb0 to
ba43a37
Compare
ba43a37 to
5d04e8d
Compare
5d04e8d to
b29a924
Compare
e4aa359 to
0e452d2
Compare
0e452d2 to
d035ebb
Compare
d035ebb to
25a40e4
Compare
Return the number of freqs in a scan_freq_set, useful for knowing how
big the set is.
src/util.c | 11 +++++++++++
src/util.h | 1 +
2 files changed, 12 insertions(+)