Hi Stefan,

Unfortunately, it makes no difference. :-/

With bssid specified:
  25 packets transmitted, 25 packets received, 0.0% packet loss
  round-trip min/avg/max/std-dev = 7.357/8.340/25.425/3.489 ms

Without bssid specified:
  25 packets transmitted, 20 packets received, 20.0% packet loss
  round-trip min/avg/max/std-dev = 7.344/16.816/118.988/25.672 ms

When testing for longer periods, I still see some packet loss even with
the bssid specified, but it's a lot worse without it specified and is
timed with when the background scan starts.

On Fri, May 25, 2018 at 07:47:26PM +0200, Stefan Sperling wrote:
> On Sun, Apr 29, 2018 at 03:39:07AM +0200, Jesper Wallin wrote:
> > Hi all,
> > 
> > I recently learned that my AP behaves badly and I have packet loss when
> > the background scan is running.
> 
> Hi Jesper,
> 
> Can you please check if this diff makes your AP work without
> hardcoding its bssid?
> 
> Index: if_iwm.c
> ===================================================================
> RCS file: /cvs/src/sys/dev/pci/if_iwm.c,v
> retrieving revision 1.230
> diff -u -p -r1.230 if_iwm.c
> --- if_iwm.c  23 May 2018 17:49:20 -0000      1.230
> +++ if_iwm.c  25 May 2018 17:32:41 -0000
> @@ -4719,7 +4719,7 @@ iwm_lmac_scan_fill_channels(struct iwm_s
>               chan->iter_count = htole16(1);
>               chan->iter_interval = 0;
>               chan->flags = htole32(IWM_UNIFIED_SCAN_CHANNEL_PARTIAL);
> -             if (n_ssids != 0 && !bgscan)
> +             if (n_ssids != 0)
>                       chan->flags |= htole32(1 << 1); /* select SSID 0 */
>               chan++;
>               nchan++;
> @@ -4746,7 +4746,7 @@ iwm_umac_scan_fill_channels(struct iwm_s
>               chan->channel_num = ieee80211_mhz2ieee(c->ic_freq, 0);
>               chan->iter_count = 1;
>               chan->iter_interval = htole16(0);
> -             if (n_ssids != 0 && !bgscan)
> +             if (n_ssids != 0)
>                       chan->flags = htole32(1 << 0); /* select SSID 0 */
>               chan++;
>               nchan++;
> @@ -4898,9 +4898,6 @@ iwm_lmac_scan(struct iwm_softc *sc, int 
>           IWM_LMAC_SCAN_FLAG_EXTENDED_DWELL);
>       if (ic->ic_des_esslen == 0)
>               req->scan_flags |= htole32(IWM_LMAC_SCAN_FLAG_PASSIVE);
> -     else
> -             req->scan_flags |=
> -                 htole32(IWM_LMAC_SCAN_FLAG_PRE_CONNECTION);
>       if (isset(sc->sc_enabled_capa, 
>           IWM_UCODE_TLV_CAPA_DS_PARAM_SET_IE_SUPPORT))
>               req->scan_flags |= htole32(IWM_LMAC_SCAN_FLAGS_RRM_ENABLED);
> @@ -5098,8 +5095,6 @@ iwm_umac_scan(struct iwm_softc *sc, int 
>               tail->direct_scan[0].len = ic->ic_des_esslen;
>               memcpy(tail->direct_scan[0].ssid, ic->ic_des_essid,
>                   ic->ic_des_esslen);
> -             req->general_flags |=
> -                 htole32(IWM_UMAC_SCAN_GEN_FLAGS_PRE_CONNECT);
>       } else
>               req->general_flags |= htole32(IWM_UMAC_SCAN_GEN_FLAGS_PASSIVE);
>  
> 

Reply via email to