-/* $OpenBSD: if_iwm.c,v 1.349 2021/07/09 11:21:31 stsp Exp $ */
+/* $OpenBSD: if_iwm.c,v 1.350 2021/07/09 11:24:55 stsp Exp $ */
/*
* Copyright (c) 2014, 2016 genua gmbh <info@genua.de>
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))
+ IWM_UCODE_TLV_CAPA_DS_PARAM_SET_IE_SUPPORT) &&
+ isset(sc->sc_enabled_capa,
+ IWM_UCODE_TLV_CAPA_WFA_TPC_REP_IE_SUPPORT))
req->scan_flags |= htole32(IWM_LMAC_SCAN_FLAGS_RRM_ENABLED);
req->flags = htole32(IWM_PHY_BAND_24);
req->v1.passive_dwell = 110;
req->v1.fragmented_dwell = 44;
req->v1.extended_dwell = 90;
+
+ req->v1.scan_priority = htole32(IWM_SCAN_PRIORITY_HIGH);
}
if (bgscan) {
}
}
- req->v1.scan_priority = htole32(IWM_SCAN_PRIORITY_HIGH);
req->ooc_priority = htole32(IWM_SCAN_PRIORITY_HIGH);
cmd_data = iwm_get_scan_req_umac_data(sc, req);
req->general_flags = htole32(IWM_UMAC_SCAN_GEN_FLAGS_PASS_ALL |
IWM_UMAC_SCAN_GEN_FLAGS_ITER_COMPLETE);
+ if (isset(sc->sc_ucode_api, IWM_UCODE_TLV_API_ADAPTIVE_DWELL_V2)) {
+ req->v8.general_flags2 =
+ IWM_UMAC_SCAN_GEN_FLAGS2_ALLOW_CHNL_REORDER;
+ }
/* Check if we're doing an active directed scan. */
if (ic->ic_des_esslen != 0) {
req->general_flags |= htole32(IWM_UMAC_SCAN_GEN_FLAGS_PASSIVE);
if (isset(sc->sc_enabled_capa,
- IWM_UCODE_TLV_CAPA_DS_PARAM_SET_IE_SUPPORT))
+ IWM_UCODE_TLV_CAPA_DS_PARAM_SET_IE_SUPPORT) &&
+ isset(sc->sc_enabled_capa,
+ IWM_UCODE_TLV_CAPA_WFA_TPC_REP_IE_SUPPORT))
req->general_flags |=
htole32(IWM_UMAC_SCAN_GEN_FLAGS_RRM_ENABLED);
-/* $OpenBSD: if_iwmreg.h,v 1.63 2021/07/08 17:14:08 stsp Exp $ */
+/* $OpenBSD: if_iwmreg.h,v 1.64 2021/07/09 11:24:55 stsp Exp $ */
/******************************************************************************
*
#define IWM_UMAC_SCAN_GEN_FLAGS_MAX_CHNL_TIME (1 << 14)
#define IWM_UMAC_SCAN_GEN_FLAGS_PROB_REQ_HIGH_TX_RATE (1 << 15)
+/**
+ * UMAC scan general flags #2
+ * @IWM_UMAC_SCAN_GEN_FLAGS2_NOTIF_PER_CHNL: Whether to send a complete
+ * notification per channel or not.
+ * @IWM_UMAC_SCAN_GEN_FLAGS2_ALLOW_CHNL_REORDER: Whether to allow channel
+ * reorder optimization or not.
+ */
+#define IWM_UMAC_SCAN_GEN_FLAGS2_NOTIF_PER_CHNL (1 << 0)
+#define IWM_UMAC_SCAN_GEN_FLAGS2_ALLOW_CHNL_REORDER (1 << 1)
+
/**
* struct iwm_scan_channel_cfg_umac
* @flags: bitmap - 0-19: directed scan to i'th ssid.