openwrt / usteer

[MIRROR] OpenWrt AP service for client steering
https://git.openwrt.org/?p=project/usteer.git;
20 stars 7 forks source link

Channel load steering never triggered #5

Open matrach opened 1 year ago

matrach commented 1 year ago

It seems that the is_better_candidate function never returns UEV_SELECT_REASON_LOAD, because the condition is unsatisfiable. It is essentially p ∧ ¬p, unless some pointer aliasing happens in-between.

Probably the parameters were supposed to be flipped in the second call.

https://github.com/openwrt/usteer/blob/e218150979b40a1b3c59ad0aaa3bbb943814db1e/policy.c#L110-L112

AlD commented 5 months ago

Just came across the same thing. Another issue seems to be that below_load_threshold actually implements above_load_threshold.