aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/mwifiex/init.c
diff options
context:
space:
mode:
authorAmitkumar Karwar <akarwar@marvell.com>2011-08-10 21:53:57 -0400
committerJohn W. Linville <linville@tuxdriver.com>2011-08-12 13:45:05 -0400
commit7c6fa2a843c5ac0f8e3e4bf679cee9c93d5e3437 (patch)
tree360b31141b176026c64631fc0a7a21c4aa3ea258 /drivers/net/wireless/mwifiex/init.c
parent9af73cf7f356801e6e5837eb338d197de5c8f37c (diff)
mwifiex: use cfg80211 dynamic scan table and cfg80211_get_bss API
Instead of maintaining static scan table in driver, scan list is sent to cfg80211 stack (after parsing each scan command response). In assoc handler (for infra and ibss network) requested BSS information is retrieved using cfg80211_get_bss() API. With the changes above some redundant code are removed. Signed-off-by: Amitkumar Karwar <akarwar@marvell.com> Signed-off-by: Yogesh Ashok Powar <yogeshp@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/mwifiex/init.c')
-rw-r--r--drivers/net/wireless/mwifiex/init.c21
1 files changed, 0 insertions, 21 deletions
diff --git a/drivers/net/wireless/mwifiex/init.c b/drivers/net/wireless/mwifiex/init.c
index a57c8de46d37..26e685a31bc0 100644
--- a/drivers/net/wireless/mwifiex/init.c
+++ b/drivers/net/wireless/mwifiex/init.c
@@ -152,19 +152,6 @@ static int mwifiex_init_priv(struct mwifiex_private *priv)
152static int mwifiex_allocate_adapter(struct mwifiex_adapter *adapter) 152static int mwifiex_allocate_adapter(struct mwifiex_adapter *adapter)
153{ 153{
154 int ret; 154 int ret;
155 u32 buf_size;
156 struct mwifiex_bssdescriptor *temp_scan_table;
157
158 /* Allocate buffer to store the BSSID list */
159 buf_size = sizeof(struct mwifiex_bssdescriptor) * MWIFIEX_MAX_AP;
160 temp_scan_table = kzalloc(buf_size, GFP_KERNEL);
161 if (!temp_scan_table) {
162 dev_err(adapter->dev, "%s: failed to alloc temp_scan_table\n",
163 __func__);
164 return -ENOMEM;
165 }
166
167 adapter->scan_table = temp_scan_table;
168 155
169 /* Allocate command buffer */ 156 /* Allocate command buffer */
170 ret = mwifiex_alloc_cmd_buffer(adapter); 157 ret = mwifiex_alloc_cmd_buffer(adapter);
@@ -222,14 +209,8 @@ static void mwifiex_init_adapter(struct mwifiex_adapter *adapter)
222 adapter->active_scan_time = MWIFIEX_ACTIVE_SCAN_CHAN_TIME; 209 adapter->active_scan_time = MWIFIEX_ACTIVE_SCAN_CHAN_TIME;
223 adapter->passive_scan_time = MWIFIEX_PASSIVE_SCAN_CHAN_TIME; 210 adapter->passive_scan_time = MWIFIEX_PASSIVE_SCAN_CHAN_TIME;
224 211
225 adapter->num_in_scan_table = 0;
226 memset(adapter->scan_table, 0,
227 (sizeof(struct mwifiex_bssdescriptor) * MWIFIEX_MAX_AP));
228 adapter->scan_probes = 1; 212 adapter->scan_probes = 1;
229 213
230 memset(adapter->bcn_buf, 0, sizeof(adapter->bcn_buf));
231 adapter->bcn_buf_end = adapter->bcn_buf;
232
233 adapter->multiple_dtim = 1; 214 adapter->multiple_dtim = 1;
234 215
235 adapter->local_listen_interval = 0; /* default value in firmware 216 adapter->local_listen_interval = 0; /* default value in firmware
@@ -326,8 +307,6 @@ mwifiex_free_adapter(struct mwifiex_adapter *adapter)
326 del_timer(&adapter->cmd_timer); 307 del_timer(&adapter->cmd_timer);
327 308
328 dev_dbg(adapter->dev, "info: free scan table\n"); 309 dev_dbg(adapter->dev, "info: free scan table\n");
329 kfree(adapter->scan_table);
330 adapter->scan_table = NULL;
331 310
332 adapter->if_ops.cleanup_if(adapter); 311 adapter->if_ops.cleanup_if(adapter);
333 312