diff options
author | Stone Piao <piaoyun@marvell.com> | 2012-09-25 23:23:38 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2012-09-28 13:54:04 -0400 |
commit | ea021f56009207e8023c1c4ac4939be3dbe80dbf (patch) | |
tree | e9a64898926fc93a4f4f6fda6af30e59519b65bf /drivers/net/wireless | |
parent | eab1c76bfc40904ddc9edc4f076ff7749696870a (diff) |
mwifiex: append each IE into a seperate IE buffer
When scan is triggered from cfg80211, the request contains some IEs
and we should parse all the IEs and append each IE into a seperate
IE buffer.
Signed-off-by: Stone Piao <piaoyun@marvell.com>
Signed-off-by: Kiran Divekar <dkiran@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
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 | ||