With enhanced iwspy support it is possible to define signal strength thresholds. If the signal strength of a currently spyed node exceeds the defined thresholds, the driver raises an iwspy event.
Current iwspy implementation (see also #93) does not support enhanced iwspy support:
# iwspy ath0 getthr
Interface doesn't support thresholds...
SIOCGIWTHRSPY: Operation not supported
The attached patch adds enhanced iwspy support.
Some notes to the patch:
- The patch adds adds iwspy event capability for station and ad-hoc mode.
- The check for and raise of an iwspy event (in net80211/ieee80211_input.c) is implemented as a macro. I choosed that for performance reasons. But maybe a function is ok too. At least the code would be better to read.