From: Johannes Berg Date: Thu, 15 Nov 2012 10:35:57 +0000 (+0100) Subject: iwlwifi: disallow MFP with software crypto X-Git-Tag: v3.8-rc1~139^2~17^2~1^2~16 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=686681b066fed089d14c9cee60d9d95680da6cdb;p=platform%2Fkernel%2Flinux-exynos.git iwlwifi: disallow MFP with software crypto When software crypto is enabled, it isn't safe to enable MFP since the firmware interprets some management packets, and with MFP it would do so without proper validation. Reviewed-by: Emmanuel Grumbach Reviewed-by: Assaf Krauss Signed-off-by: Johannes Berg --- diff --git a/drivers/net/wireless/iwlwifi/dvm/mac80211.c b/drivers/net/wireless/iwlwifi/dvm/mac80211.c index cb443d5..a275eb9 100644 --- a/drivers/net/wireless/iwlwifi/dvm/mac80211.c +++ b/drivers/net/wireless/iwlwifi/dvm/mac80211.c @@ -168,8 +168,13 @@ int iwlagn_mac_setup_register(struct iwl_priv *priv, hw->flags |= IEEE80211_HW_SUPPORTS_DYNAMIC_SMPS | IEEE80211_HW_SUPPORTS_STATIC_SMPS; - /* enable 11w if the uCode advertise */ - if (capa->flags & IWL_UCODE_TLV_FLAGS_MFP) + /* + * Enable 11w if advertised by firmware and software crypto + * is not enabled (as the firmware will interpret some mgmt + * packets, so enabling it with software crypto isn't safe) + */ + if (priv->fw->ucode_capa.flags & IWL_UCODE_TLV_FLAGS_MFP && + !iwlwifi_mod_params.sw_crypto) hw->flags |= IEEE80211_HW_MFP_CAPABLE; hw->sta_data_size = sizeof(struct iwl_station_priv);