Using average of previous average and the next value is highly
imprecise. E.g. for values 20, 20, 20, 180 it would result in /average/
of 100 (instead of 60). Fix it by storing & using an info of how many
samples were used for the previous calculation.
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Extend the nl82011_wait() function to accept multiple command numbers.
This is useful to wait for different possible results, e.g. either
NL80211_CMD_NEW_SCAN_RESULTS or NL80211_CMD_SCAN_ABORTED.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>