If the driver does not provide an ic_bgscan_start function
there is no point in scheduling ic_bgscan_timeout() since
this timeout will find that it has nothing to do.

ok?

Index: ieee80211_input.c
===================================================================
RCS file: /cvs/src/sys/net80211/ieee80211_input.c,v
retrieving revision 1.198
diff -u -p -r1.198 ieee80211_input.c
--- ieee80211_input.c   12 Dec 2017 15:57:11 -0000      1.198
+++ ieee80211_input.c   25 Apr 2018 15:54:15 -0000
@@ -268,7 +268,7 @@ ieee80211_input(struct ifnet *ifp, struc
                ni->ni_rstamp = rxi->rxi_tstamp;
                ni->ni_inact = 0;
 
-               if (ic->ic_state == IEEE80211_S_RUN) {
+               if (ic->ic_state == IEEE80211_S_RUN && ic->ic_bgscan_start) {
                        /* Cancel or start background scan based on RSSI. */
                        if ((*ic->ic_node_checkrssi)(ic, ni))
                                timeout_del(&ic->ic_bgscan_timeout);

Reply via email to