aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2012-11-15 05:35:57 -0500
committerJohannes Berg <johannes.berg@intel.com>2012-11-19 09:05:53 -0500
commit686681b066fed089d14c9cee60d9d95680da6cdb (patch)
treea585313e2f6903a2b8221c5ed06fc26d620a8f21
parentf6d497cdff2f4a8ee4387e2c01a1d107b5a25b02 (diff)
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 <emmanuel.grumbach@intel.com> Reviewed-by: Assaf Krauss <assaf.krauss@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
-rw-r--r--drivers/net/wireless/iwlwifi/dvm/mac80211.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/net/wireless/iwlwifi/dvm/mac80211.c b/drivers/net/wireless/iwlwifi/dvm/mac80211.c
index cb443d54f9b9..a275eb902b7d 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,
168 hw->flags |= IEEE80211_HW_SUPPORTS_DYNAMIC_SMPS | 168 hw->flags |= IEEE80211_HW_SUPPORTS_DYNAMIC_SMPS |
169 IEEE80211_HW_SUPPORTS_STATIC_SMPS; 169 IEEE80211_HW_SUPPORTS_STATIC_SMPS;
170 170
171 /* enable 11w if the uCode advertise */ 171 /*
172 if (capa->flags & IWL_UCODE_TLV_FLAGS_MFP) 172 * Enable 11w if advertised by firmware and software crypto
173 * is not enabled (as the firmware will interpret some mgmt
174 * packets, so enabling it with software crypto isn't safe)
175 */
176 if (priv->fw->ucode_capa.flags & IWL_UCODE_TLV_FLAGS_MFP &&
177 !iwlwifi_mod_params.sw_crypto)
173 hw->flags |= IEEE80211_HW_MFP_CAPABLE; 178 hw->flags |= IEEE80211_HW_MFP_CAPABLE;
174 179
175 hw->sta_data_size = sizeof(struct iwl_station_priv); 180 hw->sta_data_size = sizeof(struct iwl_station_priv);