aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/cfg80211.h
diff options
context:
space:
mode:
authorJohannes Berg <johannes@sipsolutions.net>2009-08-07 11:54:07 -0400
committerJohn W. Linville <linville@tuxdriver.com>2009-08-14 09:13:44 -0400
commit5ba63533bbf653631faab60f6988506160ec6ba4 (patch)
tree8d9ef2670cd3b2f50fe3581820fba5aca365634d /include/net/cfg80211.h
parentad5351db89681515681c5d5659ddf4c69e3cc6f5 (diff)
cfg80211: fix alignment problem in scan request
The memory layout for scan requests was rather wrong, we put the scan SSIDs before the channels which could lead to the channel pointers being unaligned in memory. It turns out that using a pointer to the channel array isn't necessary anyway since we can embed a zero-length array into the struct. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'include/net/cfg80211.h')
-rw-r--r--include/net/cfg80211.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h
index de7d116acc3d..d5756c9fe3d3 100644
--- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h
@@ -559,7 +559,6 @@ struct cfg80211_ssid {
559struct cfg80211_scan_request { 559struct cfg80211_scan_request {
560 struct cfg80211_ssid *ssids; 560 struct cfg80211_ssid *ssids;
561 int n_ssids; 561 int n_ssids;
562 struct ieee80211_channel **channels;
563 u32 n_channels; 562 u32 n_channels;
564 const u8 *ie; 563 const u8 *ie;
565 size_t ie_len; 564 size_t ie_len;
@@ -568,6 +567,9 @@ struct cfg80211_scan_request {
568 struct wiphy *wiphy; 567 struct wiphy *wiphy;
569 struct net_device *dev; 568 struct net_device *dev;
570 bool aborted; 569 bool aborted;
570
571 /* keep last */
572 struct ieee80211_channel *channels[0];
571}; 573};
572 574
573/** 575/**