diff options
author | David Spinadel <david.spinadel@intel.com> | 2014-02-11 06:45:41 -0500 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2014-02-11 07:00:01 -0500 |
commit | e4dcbb375cd829e1649b12e0ab7d7e5b7efcb5a5 (patch) | |
tree | 42d06509dd652edcec2418bf49064490e2d48282 /net/mac80211/scan.c | |
parent | 802ee9ecfc886c5d6ad831586e65088893c774fb (diff) |
mac80211: fix IE buffer len
Remove size of SSID IE from the IE buffer in scan and
sched scan, since this IE isn't added to this buffer.
Reviewed-by: Eliad Peller <eliad@wizery.com>
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Reviewed-by: Alexander Bondar <alexander.bondar@intel.com>
Signed-off-by: David Spinadel <david.spinadel@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/scan.c')
-rw-r--r-- | net/mac80211/scan.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/net/mac80211/scan.c b/net/mac80211/scan.c index 88c81616f8f7..b211e412511f 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, | |||
472 | if (local->ops->hw_scan) { | 472 | if (local->ops->hw_scan) { |
473 | u8 *ies; | 473 | u8 *ies; |
474 | 474 | ||
475 | local->hw_scan_ies_bufsize = 2 + IEEE80211_MAX_SSID_LEN + | 475 | local->hw_scan_ies_bufsize = local->scan_ies_len + req->ie_len; |
476 | local->scan_ies_len + | ||
477 | req->ie_len; | ||
478 | local->hw_scan_req = kmalloc( | 476 | local->hw_scan_req = kmalloc( |
479 | sizeof(*local->hw_scan_req) + | 477 | sizeof(*local->hw_scan_req) + |
480 | req->n_channels * sizeof(req->channels[0]) + | 478 | req->n_channels * sizeof(req->channels[0]) + |
@@ -979,8 +977,7 @@ int __ieee80211_request_sched_scan_start(struct ieee80211_sub_if_data *sdata, | |||
979 | struct cfg80211_chan_def chandef; | 977 | struct cfg80211_chan_def chandef; |
980 | int ret, i, iebufsz; | 978 | int ret, i, iebufsz; |
981 | 979 | ||
982 | iebufsz = 2 + IEEE80211_MAX_SSID_LEN + | 980 | iebufsz = local->scan_ies_len + req->ie_len; |
983 | local->scan_ies_len + req->ie_len; | ||
984 | 981 | ||
985 | lockdep_assert_held(&local->mtx); | 982 | lockdep_assert_held(&local->mtx); |
986 | 983 | ||