aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAvinash Patil <patila@marvell.com>2012-06-28 23:30:27 -0400
committerJohn W. Linville <linville@tuxdriver.com>2012-07-09 16:35:59 -0400
commitbd6aa0302506b48bb40c59abd916d543707a1a93 (patch)
tree0d2fba0c603cae15a2279cb5fb95eaf52ea29ea8
parentea4c12f02b826221510d3040469f3f8bca921d6a (diff)
mwifiex: overwrite earlier IE buffers for new set IE request
All IE buffers are freshly supplied. In such case, there is no need to preserve earlier buffers with same management mask and index. Signed-off-by: Avinash Patil <patila@marvell.com> Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r--drivers/net/wireless/mwifiex/ie.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/net/wireless/mwifiex/ie.c b/drivers/net/wireless/mwifiex/ie.c
index 018ae4a1b544..1f2d4b9a0ca5 100644
--- a/drivers/net/wireless/mwifiex/ie.c
+++ b/drivers/net/wireless/mwifiex/ie.c
@@ -51,8 +51,7 @@ mwifiex_ie_get_autoidx(struct mwifiex_private *priv, u16 subtype_mask,
51 51
52 for (i = 0; i < priv->adapter->max_mgmt_ie_index; i++) { 52 for (i = 0; i < priv->adapter->max_mgmt_ie_index; i++) {
53 mask = le16_to_cpu(priv->mgmt_ie[i].mgmt_subtype_mask); 53 mask = le16_to_cpu(priv->mgmt_ie[i].mgmt_subtype_mask);
54 len = le16_to_cpu(priv->mgmt_ie[i].ie_length) + 54 len = le16_to_cpu(ie->ie_length);
55 le16_to_cpu(ie->ie_length);
56 55
57 if (mask == MWIFIEX_AUTO_IDX_MASK) 56 if (mask == MWIFIEX_AUTO_IDX_MASK)
58 continue; 57 continue;
@@ -108,10 +107,8 @@ mwifiex_update_autoindex_ies(struct mwifiex_private *priv,
108 return -1; 107 return -1;
109 108
110 tmp = (u8 *)&priv->mgmt_ie[index].ie_buffer; 109 tmp = (u8 *)&priv->mgmt_ie[index].ie_buffer;
111 tmp += le16_to_cpu(priv->mgmt_ie[index].ie_length);
112 memcpy(tmp, &ie->ie_buffer, le16_to_cpu(ie->ie_length)); 110 memcpy(tmp, &ie->ie_buffer, le16_to_cpu(ie->ie_length));
113 le16_add_cpu(&priv->mgmt_ie[index].ie_length, 111 priv->mgmt_ie[index].ie_length = ie->ie_length;
114 le16_to_cpu(ie->ie_length));
115 priv->mgmt_ie[index].ie_index = cpu_to_le16(index); 112 priv->mgmt_ie[index].ie_index = cpu_to_le16(index);
116 priv->mgmt_ie[index].mgmt_subtype_mask = 113 priv->mgmt_ie[index].mgmt_subtype_mask =
117 cpu_to_le16(mask); 114 cpu_to_le16(mask);