From 107ef97a170dec95893f34614edd92eb8cb9b5d0 Mon Sep 17 00:00:00 2001 From: Stanislaw Gruszka Date: Wed, 12 Oct 2011 10:16:35 +0200 Subject: [PATCH] iwlagn: fix priv->cfg->ht_params NULL pointer dereference This fix regression introduced by commit: commit 15b3f3b006b42a678523cad989bfd60b76bf4403 Author: Wey-Yi Guy Date: Fri Jun 3 07:54:13 2011 -0700 iwlagn: set smps mode after assoc for 1000 device Also remove unneeded brackets on the way. Address: https://bugzilla.redhat.com/show_bug.cgi?id=744155 Cc: stable@kernel.org # 3.1+ Signed-off-by: Stanislaw Gruszka Acked-by: Wey-Yi Guy Signed-off-by: John W. Linville --- drivers/net/wireless/iwlwifi/iwl-agn-rxon.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-rxon.c b/drivers/net/wireless/iwlwifi/iwl-agn-rxon.c index a580efefd4b4..58a381c01c89 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn-rxon.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn-rxon.c @@ -294,8 +294,8 @@ static int iwlagn_rxon_connect(struct iwl_priv *priv, return ret; } - if ((ctx->vif && ctx->vif->type == NL80211_IFTYPE_STATION) && - priv->cfg->ht_params->smps_mode) + if (ctx->vif && ctx->vif->type == NL80211_IFTYPE_STATION && + priv->cfg->ht_params && priv->cfg->ht_params->smps_mode) ieee80211_request_smps(ctx->vif, priv->cfg->ht_params->smps_mode); -- 2.39.5