1/*
2 * Copyright (C) 2008 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 *      http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16/*-------------------------------------------------------------------*/
17#ifndef _SCANMERGE_H_
18#define _SCANMERGE_H_
19
20#include "common.h"
21#include "driver.h"
22#include "driver_ti.h"
23
24#define SCAN_MERGE_COUNT        4
25
26typedef
27#ifdef WPA_SUPPLICANT_VER_0_6_X
28    struct wpa_scan_res
29#else
30    struct wpa_scan_result
31#endif
32scan_result_t;
33
34typedef struct {
35    u8 ssid[MAX_SSID_LEN];
36    size_t ssid_len;
37} scan_ssid_t;
38
39typedef struct SCANMERGE_STRUCT {
40    unsigned long count;
41    scan_result_t scanres;
42} scan_merge_t;
43
44void scan_init( struct wpa_driver_ti_data *mydrv );
45void scan_exit( struct wpa_driver_ti_data *mydrv );
46unsigned long scan_count( struct wpa_driver_ti_data *mydrv );
47scan_ssid_t *scan_get_ssid( scan_result_t *res_ptr );
48#ifdef WPA_SUPPLICANT_VER_0_6_X
49unsigned int scan_merge( struct wpa_driver_ti_data *mydrv,
50                         scan_result_t **results, int force_flag,
51                         unsigned int number_items, unsigned int max_size );
52#else
53unsigned int scan_merge( struct wpa_driver_ti_data *mydrv,
54                         scan_result_t *results, int force_flag,
55                         unsigned int number_items, unsigned int max_size );
56#endif
57scan_result_t *scan_get_by_bssid( struct wpa_driver_ti_data *mydrv, u8 *bssid );
58#endif
59