aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-scan.c
diff options
context:
space:
mode:
authorStanislaw Gruszka <sgruszka@redhat.com>2010-04-16 09:46:41 -0400
committerJohn W. Linville <linville@tuxdriver.com>2010-04-16 15:47:15 -0400
commiteb2ec0fb3c2fe85d42b2d5131e526daa0e298b9e (patch)
treed40bf385d54cd7899543dbbac1518d0b34762665 /drivers/net/wireless/iwlwifi/iwl-scan.c
parenta02a2956809d88b42b9a1f8003d60a343353b5ea (diff)
iwlwifi: check scan request ie_len
In mac80211 we always check both scan_req->ie and scan_req->ie_len against zero before usage, in iwlwifi we should do the same. Remove not needed "left -= ie_len" while at it. Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> Acked-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-scan.c')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-scan.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-scan.c b/drivers/net/wireless/iwlwifi/iwl-scan.c
index d817c9c184a5..83e62917e0bf 100644
--- a/drivers/net/wireless/iwlwifi/iwl-scan.c
+++ b/drivers/net/wireless/iwlwifi/iwl-scan.c
@@ -644,10 +644,10 @@ u16 iwl_fill_probe_req(struct iwl_priv *priv, struct ieee80211_mgmt *frame,
644 if (WARN_ON(left < ie_len)) 644 if (WARN_ON(left < ie_len))
645 return len; 645 return len;
646 646
647 if (ies) 647 if (ies && ie_len) {
648 memcpy(pos, ies, ie_len); 648 memcpy(pos, ies, ie_len);
649 len += ie_len; 649 len += ie_len;
650 left -= ie_len; 650 }
651 651
652 return (u16)len; 652 return (u16)len;
653} 653}