iwlwifi: mvm: correctly set schedule scan profiles
authorAyala Beker <ayala.beker@intel.com>
Sun, 19 Dec 2021 11:28:27 +0000 (13:28 +0200)
committerLuca Coelho <luciano.coelho@intel.com>
Tue, 21 Dec 2021 10:35:07 +0000 (12:35 +0200)
Set scan offload profiles auth algorithms with valid
algorithms only.

Signed-off-by: Ayala Beker <ayala.beker@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Link: https://lore.kernel.org/r/iwlwifi.20211219132536.525f2d468d22.I4d497d6a0a14ffb833f7edc7e980d26bbf8d7527@changeid
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
drivers/net/wireless/intel/iwlwifi/fw/api/scan.h
drivers/net/wireless/intel/iwlwifi/mvm/scan.c

index 175e2ce..6806438 100644 (file)
@@ -82,6 +82,16 @@ enum iwl_scan_offload_band_selection {
        IWL_SCAN_OFFLOAD_SELECT_ANY     = 0xc,
 };
 
+enum iwl_scan_offload_auth_alg {
+       IWL_AUTH_ALGO_UNSUPPORTED  = 0x00,
+       IWL_AUTH_ALGO_NONE         = 0x01,
+       IWL_AUTH_ALGO_PSK          = 0x02,
+       IWL_AUTH_ALGO_8021X        = 0x04,
+       IWL_AUTH_ALGO_SAE          = 0x08,
+       IWL_AUTH_ALGO_8021X_SHA384 = 0x10,
+       IWL_AUTH_ALGO_OWE          = 0x20,
+};
+
 /**
  * struct iwl_scan_offload_profile - SCAN_OFFLOAD_PROFILE_S
  * @ssid_index:                index to ssid list in fixed part
index 68ee577..5f92a09 100644 (file)
@@ -579,7 +579,9 @@ iwl_mvm_config_sched_scan_profiles(struct iwl_mvm *mvm,
                profile->ssid_index = i;
                /* Support any cipher and auth algorithm */
                profile->unicast_cipher = 0xff;
-               profile->auth_alg = 0xff;
+               profile->auth_alg = IWL_AUTH_ALGO_UNSUPPORTED |
+                       IWL_AUTH_ALGO_NONE | IWL_AUTH_ALGO_PSK | IWL_AUTH_ALGO_8021X |
+                       IWL_AUTH_ALGO_SAE | IWL_AUTH_ALGO_8021X_SHA384 | IWL_AUTH_ALGO_OWE;
                profile->network_type = IWL_NETWORK_TYPE_ANY;
                profile->band_selection = IWL_SCAN_OFFLOAD_SELECT_ANY;
                profile->client_bitmap = SCAN_CLIENT_SCHED_SCAN;