diff options
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r-- | drivers/net/wireless/mwifiex/cfg80211.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/drivers/net/wireless/mwifiex/cfg80211.c b/drivers/net/wireless/mwifiex/cfg80211.c index 261d7c548a5e..1f4bd67dffa7 100644 --- a/drivers/net/wireless/mwifiex/cfg80211.c +++ b/drivers/net/wireless/mwifiex/cfg80211.c | |||
@@ -1704,8 +1704,9 @@ mwifiex_cfg80211_scan(struct wiphy *wiphy, | |||
1704 | { | 1704 | { |
1705 | struct net_device *dev = request->wdev->netdev; | 1705 | struct net_device *dev = request->wdev->netdev; |
1706 | struct mwifiex_private *priv = mwifiex_netdev_get_priv(dev); | 1706 | struct mwifiex_private *priv = mwifiex_netdev_get_priv(dev); |
1707 | int i; | 1707 | int i, offset; |
1708 | struct ieee80211_channel *chan; | 1708 | struct ieee80211_channel *chan; |
1709 | struct ieee_types_header *ie; | ||
1709 | 1710 | ||
1710 | wiphy_dbg(wiphy, "info: received scan request on %s\n", dev->name); | 1711 | wiphy_dbg(wiphy, "info: received scan request on %s\n", dev->name); |
1711 | 1712 | ||
@@ -1728,13 +1729,17 @@ mwifiex_cfg80211_scan(struct wiphy *wiphy, | |||
1728 | priv->user_scan_cfg->ssid_list = request->ssids; | 1729 | priv->user_scan_cfg->ssid_list = request->ssids; |
1729 | 1730 | ||
1730 | if (request->ie && request->ie_len) { | 1731 | if (request->ie && request->ie_len) { |
1732 | offset = 0; | ||
1731 | for (i = 0; i < MWIFIEX_MAX_VSIE_NUM; i++) { | 1733 | for (i = 0; i < MWIFIEX_MAX_VSIE_NUM; i++) { |
1732 | if (priv->vs_ie[i].mask != MWIFIEX_VSIE_MASK_CLEAR) | 1734 | if (priv->vs_ie[i].mask != MWIFIEX_VSIE_MASK_CLEAR) |
1733 | continue; | 1735 | continue; |
1734 | priv->vs_ie[i].mask = MWIFIEX_VSIE_MASK_SCAN; | 1736 | priv->vs_ie[i].mask = MWIFIEX_VSIE_MASK_SCAN; |
1735 | memcpy(&priv->vs_ie[i].ie, request->ie, | 1737 | ie = (struct ieee_types_header *)(request->ie + offset); |
1736 | request->ie_len); | 1738 | memcpy(&priv->vs_ie[i].ie, ie, sizeof(*ie) + ie->len); |
1737 | break; | 1739 | offset += sizeof(*ie) + ie->len; |
1740 | |||
1741 | if (offset >= request->ie_len) | ||
1742 | break; | ||
1738 | } | 1743 | } |
1739 | } | 1744 | } |
1740 | 1745 | ||