On Sun, Apr 29, 2018 at 10:17:43AM +0200, Stefan Sperling wrote:
> I agree, even though it would be nice to understand the underlying
> packet loss issue. But I cannot reproduce the problem unforunately :(
> Have you verified that the problem only happens on this particular AP?

Unfortunately no, the signal at work is way too strong to trigger any
background scan.  I'll give it another try tomorrow, hoping it's not
going to rain. ;-)

> I have two suggestions:
> 
> I don't see a need for the debug printf. It's useful for local
> verification that your change works but it doesn't add useful
> information during regular usage.

You're right.

> Also, we could check this flag before adding the ic_bgscan_timeout
> in the first place, rather than checking it within the timeout handler.

I've moved the check to ieee80211_input() now and it seems to work.
However, when I set the bssid and it aborts the scan, the debug message
of "end background scan" appears before the actual list of APs.


Regards,
Jesper Wallin


Index: ieee80211_input.c
===================================================================
RCS file: /cvs/src/sys/net80211/ieee80211_input.c,v
retrieving revision 1.199
diff -u -p -r1.199 ieee80211_input.c
--- ieee80211_input.c   27 Apr 2018 17:03:09 -0000      1.199
+++ ieee80211_input.c   29 Apr 2018 10:00:53 -0000
@@ -270,7 +270,8 @@ ieee80211_input(struct ifnet *ifp, struc
 
                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))
+                       if (ic->ic_flags & IEEE80211_F_DESBSSID ||
+                           (*ic->ic_node_checkrssi)(ic, ni))
                                timeout_del(&ic->ic_bgscan_timeout);
                        else if (!timeout_pending(&ic->ic_bgscan_timeout) &&
                            (ic->ic_flags & IEEE80211_F_BGSCAN) == 0)

Reply via email to