diff mbox

mac80211: fix IE buffer len

Message ID 1392119141-27279-1-git-send-email-emmanuel.grumbach@intel.com (mailing list archive)
State Not Applicable, archived
Headers show

Commit Message

Emmanuel Grumbach Feb. 11, 2014, 11:45 a.m. UTC
From: David Spinadel <david.spinadel@intel.com>

Remove size of SSID IE from the IE buffer in scan and
sched scan, since this IE isn't added to this buffer.

Change-Id: Ic381cd50566529907c3a37f6aaa02d9132fd99da
Signed-off-by: David Spinadel <david.spinadel@intel.com>
Reviewed-on: https://gerrit.rds.intel.com/30710
Tested-by: IWL Jenkins
Reviewed-by: EliadX Peller <eliad@wizery.com>
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Reviewed-by: Alexander Bondar <alexander.bondar@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
---
 net/mac80211/scan.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

Comments

Johannes Berg Feb. 11, 2014, noon UTC | #1
On Tue, 2014-02-11 at 13:45 +0200, Emmanuel Grumbach wrote:
> From: David Spinadel <david.spinadel@intel.com>
> 
> Remove size of SSID IE from the IE buffer in scan and
> sched scan, since this IE isn't added to this buffer.

Applied

> Change-Id: Ic381cd50566529907c3a37f6aaa02d9132fd99da

with all that junk removed :)

johannes

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/net/mac80211/scan.c b/net/mac80211/scan.c
index 88c8161..b211e41 100644
--- a/net/mac80211/scan.c
+++ b/net/mac80211/scan.c
@@ -472,9 +472,7 @@  static int __ieee80211_start_scan(struct ieee80211_sub_if_data *sdata,
 	if (local->ops->hw_scan) {
 		u8 *ies;
 
-		local->hw_scan_ies_bufsize = 2 + IEEE80211_MAX_SSID_LEN +
-					     local->scan_ies_len +
-					     req->ie_len;
+		local->hw_scan_ies_bufsize = local->scan_ies_len + req->ie_len;
 		local->hw_scan_req = kmalloc(
 				sizeof(*local->hw_scan_req) +
 				req->n_channels * sizeof(req->channels[0]) +
@@ -979,8 +977,7 @@  int __ieee80211_request_sched_scan_start(struct ieee80211_sub_if_data *sdata,
 	struct cfg80211_chan_def chandef;
 	int ret, i, iebufsz;
 
-	iebufsz = 2 + IEEE80211_MAX_SSID_LEN +
-		  local->scan_ies_len + req->ie_len;
+	iebufsz = local->scan_ies_len + req->ie_len;
 
 	lockdep_assert_held(&local->mtx);