Skip to content
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

wifi-unstuck-wa: allow parametrizable values for interval and timeout #1039

Merged
merged 7 commits into from
Aug 22, 2023

Conversation

a-gave
Copy link
Contributor

@a-gave a-gave commented Aug 8, 2023

This close #1034

@codecov-commenter
Copy link

codecov-commenter commented Aug 8, 2023

Codecov Report

Merging #1039 (6d48aa7) into master (bf158a1) will increase coverage by 0.46%.
Report is 39 commits behind head on master.
The diff coverage is 100.00%.

❗ Current head 6d48aa7 differs from pull request most recent head e41d259. Consider uploading reports for the commit e41d259 to get more accurate results

❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.

@@            Coverage Diff             @@
##           master    #1039      +/-   ##
==========================================
+ Coverage   79.27%   79.74%   +0.46%     
==========================================
  Files          53       53              
  Lines        4444     4532      +88     
==========================================
+ Hits         3523     3614      +91     
+ Misses        921      918       -3     
Files Changed Coverage Δ
...ages/lime-system/files/usr/lib/lua/lime/config.lua 97.72% <100.00%> (+0.03%) ⬆️
...ges/lime-system/files/usr/lib/lua/lime/network.lua 78.39% <100.00%> (+0.20%) ⬆️
...tuck-wa/files/usr/lib/lua/lime/wifi_unstuck_wa.lua 100.00% <100.00%> (ø)
tests/fakes/iwinfo.lua 98.13% <100.00%> (+1.02%) ⬆️

... and 3 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@a-gave a-gave changed the title Allow parametrizable values for wifi-unstuck-wa (interval and timeout) Draft: Allow parametrizable values for wifi-unstuck-wa (interval and timeout) Aug 12, 2023
@pony1k
Copy link
Contributor

pony1k commented Aug 16, 2023

Instead of modifying the source code with sed inside an uci-defaults script, maybe it would be better to put the content of the hook_wireless.lua.txt file directly in wireless.lua and sourround it with something like

if utils.is_installed("wifi-unstuck-wa") then
    ...
end

? Though it moves something that conceptionally belongs to the package wifi-unstuck-wa into the lime-system package. Alternatively you could put just after the line

local modules_name = { "hardware_detection", "wireless", "network", "firewall", "system",
"generic_config" }

something like

if utils.isModuleAvailable("wifi_unstuck_wa") then
    table.insert(modules_name, "wifi_unstuck_wa")
end

and equip the wifi_unstuck_wa.lua file with a wu.configure() and a wu.cleanup() function and put the content of hook_wireless.lua.txt inside the wu.configure() function. Then move the file into /usr/lib/lua/lime. That is the cleanest solution I can think of. Just my two cents. Hope this helps!

Copy link
Member

@ilario ilario left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, but I did not find the time to test. If you tested this, please feel free to merge it :D Thanks and amazing work @a-gave and @pony1k !!!

@a-gave a-gave changed the title Draft: Allow parametrizable values for wifi-unstuck-wa (interval and timeout) wifi-unstuck-wa: allow parametrizable values for interval and timeout Aug 22, 2023
@a-gave
Copy link
Contributor Author

a-gave commented Aug 22, 2023

Tested on openwrt-22.03.5-ath79-generic-tplink_cpe510-v3

@a-gave a-gave merged commit 46e52ca into libremesh:master Aug 22, 2023
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow customization of checking frequency in wifi-unstuck-wa
4 participants