| .. | .. |
|---|
| 1 | | -/* SPDX-License-Identifier: GPL-2.0 */ |
|---|
| 2 | 1 | /* |
|---|
| 3 | 2 | * Header file of Broadcom Dongle Host Driver (DHD) |
|---|
| 4 | 3 | * Prefered Network Offload code and Wi-Fi Location Service(WLS) code. |
|---|
| 5 | 4 | * |
|---|
| 6 | | - * Copyright (C) 1999-2019, Broadcom Corporation |
|---|
| 7 | | - * |
|---|
| 5 | + * Portions of this code are copyright (c) 2022 Cypress Semiconductor Corporation |
|---|
| 6 | + * |
|---|
| 7 | + * Copyright (C) 1999-2017, Broadcom Corporation |
|---|
| 8 | + * |
|---|
| 8 | 9 | * Unless you and Broadcom execute a separate written software license |
|---|
| 9 | 10 | * agreement governing use of this software, this software is licensed to you |
|---|
| 10 | 11 | * under the terms of the GNU General Public License version 2 (the "GPL"), |
|---|
| 11 | 12 | * available at http://www.broadcom.com/licenses/GPLv2.php, with the |
|---|
| 12 | 13 | * following added to such license: |
|---|
| 13 | | - * |
|---|
| 14 | + * |
|---|
| 14 | 15 | * As a special exception, the copyright holders of this software give you |
|---|
| 15 | 16 | * permission to link this software with independent modules, and to copy and |
|---|
| 16 | 17 | * distribute the resulting executable under terms of your choice, provided that |
|---|
| .. | .. |
|---|
| 18 | 19 | * the license of that module. An independent module is a module which is not |
|---|
| 19 | 20 | * derived from this software. The special exception does not apply to any |
|---|
| 20 | 21 | * modifications of the software. |
|---|
| 21 | | - * |
|---|
| 22 | + * |
|---|
| 22 | 23 | * Notwithstanding the above, under no circumstances may you combine this |
|---|
| 23 | 24 | * software in any way with any other Broadcom software provided under a license |
|---|
| 24 | 25 | * other than the GPL, without Broadcom's express prior written consent. |
|---|
| .. | .. |
|---|
| 26 | 27 | * |
|---|
| 27 | 28 | * <<Broadcom-WL-IPTag/Open:>> |
|---|
| 28 | 29 | * |
|---|
| 29 | | - * $Id: dhd_pno.h 423669 2013-09-18 13:01:55Z $ |
|---|
| 30 | + * $Id: dhd_pno.h 805174 2019-02-15 17:26:01Z $ |
|---|
| 30 | 31 | */ |
|---|
| 31 | 32 | |
|---|
| 32 | 33 | #ifndef __DHD_PNO_H__ |
|---|
| 33 | 34 | #define __DHD_PNO_H__ |
|---|
| 34 | 35 | |
|---|
| 35 | | -#if defined(PNO_SUPPORT) |
|---|
| 36 | +#if defined(OEM_ANDROID) && defined(PNO_SUPPORT) |
|---|
| 36 | 37 | #define PNO_TLV_PREFIX 'S' |
|---|
| 37 | 38 | #define PNO_TLV_VERSION '1' |
|---|
| 38 | 39 | #define PNO_TLV_SUBTYPE_LEGACY_PNO '2' |
|---|
| 39 | 40 | #define PNO_TLV_RESERVED '0' |
|---|
| 41 | + |
|---|
| 40 | 42 | #define PNO_BATCHING_SET "SET" |
|---|
| 41 | 43 | #define PNO_BATCHING_GET "GET" |
|---|
| 42 | 44 | #define PNO_BATCHING_STOP "STOP" |
|---|
| 45 | + |
|---|
| 43 | 46 | #define PNO_PARAMS_DELIMETER " " |
|---|
| 44 | 47 | #define PNO_PARAM_CHANNEL_DELIMETER "," |
|---|
| 45 | 48 | #define PNO_PARAM_VALUE_DELLIMETER '=' |
|---|
| .. | .. |
|---|
| 64 | 67 | #define AP_END_MARKER "====\n" |
|---|
| 65 | 68 | #define PNO_RSSI_MARGIN_DBM 30 |
|---|
| 66 | 69 | |
|---|
| 67 | | -#ifdef GSCAN_SUPPORT |
|---|
| 70 | +#define CSCAN_COMMAND "CSCAN " |
|---|
| 71 | +#define CSCAN_TLV_PREFIX 'S' |
|---|
| 72 | +#define CSCAN_TLV_VERSION 1 |
|---|
| 73 | +#define CSCAN_TLV_SUBVERSION 0 |
|---|
| 74 | +#define CSCAN_TLV_TYPE_SSID_IE 'S' |
|---|
| 75 | +#define CSCAN_TLV_TYPE_CHANNEL_IE 'C' |
|---|
| 76 | +#define CSCAN_TLV_TYPE_NPROBE_IE 'N' |
|---|
| 77 | +#define CSCAN_TLV_TYPE_ACTIVE_IE 'A' |
|---|
| 78 | +#define CSCAN_TLV_TYPE_PASSIVE_IE 'P' |
|---|
| 79 | +#define CSCAN_TLV_TYPE_HOME_IE 'H' |
|---|
| 80 | +#define CSCAN_TLV_TYPE_STYPE_IE 'T' |
|---|
| 68 | 81 | |
|---|
| 82 | +#define WL_SCAN_PARAMS_SSID_MAX 10 |
|---|
| 83 | +#define GET_SSID "SSID=" |
|---|
| 84 | +#define GET_CHANNEL "CH=" |
|---|
| 85 | +#define GET_NPROBE "NPROBE=" |
|---|
| 86 | +#define GET_ACTIVE_ASSOC_DWELL "ACTIVE=" |
|---|
| 87 | +#define GET_PASSIVE_ASSOC_DWELL "PASSIVE=" |
|---|
| 88 | +#define GET_HOME_DWELL "HOME=" |
|---|
| 89 | +#define GET_SCAN_TYPE "TYPE=" |
|---|
| 90 | + |
|---|
| 91 | +#if defined(GSCAN_SUPPORT) || defined(DHD_GET_VALID_CHANNELS) |
|---|
| 69 | 92 | #define GSCAN_MAX_CH_BUCKETS 8 |
|---|
| 70 | 93 | #define GSCAN_MAX_CHANNELS_IN_BUCKET 32 |
|---|
| 71 | 94 | #define GSCAN_MAX_AP_CACHE_PER_SCAN 32 |
|---|
| .. | .. |
|---|
| 88 | 111 | #define DHD_EPNO_A_BAND_TRIG (1 << 1) |
|---|
| 89 | 112 | #define DHD_EPNO_BG_BAND_TRIG (1 << 2) |
|---|
| 90 | 113 | #define DHD_EPNO_STRICT_MATCH (1 << 3) |
|---|
| 114 | +#define DHD_EPNO_SAME_NETWORK (1 << 4) |
|---|
| 91 | 115 | #define DHD_PNO_USE_SSID (DHD_EPNO_HIDDEN_SSID | DHD_EPNO_STRICT_MATCH) |
|---|
| 92 | 116 | |
|---|
| 93 | 117 | /* Do not change GSCAN_BATCH_RETRIEVAL_COMPLETE */ |
|---|
| .. | .. |
|---|
| 97 | 121 | #define GSCAN_LOST_AP_WINDOW_DEFAULT 4 |
|---|
| 98 | 122 | #define GSCAN_MIN_BSSID_TIMEOUT 90 |
|---|
| 99 | 123 | #define GSCAN_BATCH_GET_MAX_WAIT 500 |
|---|
| 100 | | -#define CHANNEL_BUCKET_EMPTY_INDEX 0xFF |
|---|
| 124 | +#define CHANNEL_BUCKET_EMPTY_INDEX 0xFFFF |
|---|
| 101 | 125 | #define GSCAN_RETRY_THRESHOLD 3 |
|---|
| 102 | | -#define MAX_EPNO_SSID_NUM 32 |
|---|
| 103 | | -#endif /* GSCAN_SUPPORT */ |
|---|
| 126 | + |
|---|
| 127 | +#define MAX_EPNO_SSID_NUM 64 |
|---|
| 128 | +#endif /* GSCAN_SUPPORT || DHD_GET_VALID_CHANNELS */ |
|---|
| 104 | 129 | |
|---|
| 105 | 130 | enum scan_status { |
|---|
| 106 | 131 | /* SCAN ABORT by other scan */ |
|---|
| .. | .. |
|---|
| 127 | 152 | /* GSCAN includes hotlist scan and they do not run |
|---|
| 128 | 153 | * independent of each other |
|---|
| 129 | 154 | */ |
|---|
| 130 | | -#ifdef GSCAN_SUPPORT |
|---|
| 131 | 155 | INDEX_OF_GSCAN_PARAMS = INDEX_OF_HOTLIST_PARAMS, |
|---|
| 132 | | -#endif /* GSCAN_SUPPORT */ |
|---|
| 133 | 156 | INDEX_MODE_MAX |
|---|
| 134 | 157 | }; |
|---|
| 135 | 158 | enum dhd_pno_status { |
|---|
| .. | .. |
|---|
| 143 | 166 | char subtype; |
|---|
| 144 | 167 | char reserved; |
|---|
| 145 | 168 | } cmd_tlv_t; |
|---|
| 146 | | -#ifdef GSCAN_SUPPORT |
|---|
| 169 | +#if defined(GSCAN_SUPPORT) || defined(DHD_GET_VALID_CHANNELS) |
|---|
| 147 | 170 | typedef enum { |
|---|
| 148 | 171 | WIFI_BAND_UNSPECIFIED, |
|---|
| 149 | 172 | WIFI_BAND_BG = 1, /* 2.4 GHz */ |
|---|
| .. | .. |
|---|
| 167 | 190 | DHD_PNO_GET_CAPABILITIES, |
|---|
| 168 | 191 | DHD_PNO_GET_BATCH_RESULTS, |
|---|
| 169 | 192 | DHD_PNO_GET_CHANNEL_LIST, |
|---|
| 170 | | - DHD_PNO_GET_EPNO_SSID_ELEM, |
|---|
| 193 | + DHD_PNO_GET_NEW_EPNO_SSID_ELEM, |
|---|
| 171 | 194 | DHD_PNO_EPNO_CFG_ID, |
|---|
| 172 | | - DHD_PNO_GET_AUTOJOIN_CAPABILITIES |
|---|
| 195 | + DHD_PNO_GET_AUTOJOIN_CAPABILITIES, |
|---|
| 196 | + DHD_PNO_EPNO_PARAMS_ID |
|---|
| 173 | 197 | } dhd_pno_gscan_cmd_cfg_t; |
|---|
| 174 | 198 | |
|---|
| 175 | 199 | typedef enum dhd_pno_mode { |
|---|
| .. | .. |
|---|
| 193 | 217 | /* Wi-Fi Android Hotlist SCAN Mode */ |
|---|
| 194 | 218 | DHD_PNO_HOTLIST_MODE = (1 << (2)) |
|---|
| 195 | 219 | } dhd_pno_mode_t; |
|---|
| 196 | | -#endif /* GSCAN_SUPPORT */ |
|---|
| 197 | | -struct dhd_pno_ssid { |
|---|
| 220 | +#endif /* GSCAN_SUPPORT || DHD_GET_VALID_CHANNELS */ |
|---|
| 221 | + |
|---|
| 222 | +typedef struct dhd_pno_ssid { |
|---|
| 198 | 223 | bool hidden; |
|---|
| 199 | 224 | int8 rssi_thresh; |
|---|
| 200 | 225 | uint8 dummy; |
|---|
| 201 | 226 | uint16 SSID_len; |
|---|
| 227 | + uint32 flags; |
|---|
| 228 | + int32 wpa_auth; |
|---|
| 202 | 229 | uchar SSID[DOT11_MAX_SSID_LEN]; |
|---|
| 203 | 230 | struct list_head list; |
|---|
| 204 | | -}; |
|---|
| 231 | +} dhd_pno_ssid_t; |
|---|
| 232 | + |
|---|
| 205 | 233 | struct dhd_pno_bssid { |
|---|
| 206 | 234 | struct ether_addr macaddr; |
|---|
| 207 | 235 | /* Bit4: suppress_lost, Bit3: suppress_found */ |
|---|
| 208 | 236 | uint16 flags; |
|---|
| 209 | 237 | struct list_head list; |
|---|
| 210 | 238 | }; |
|---|
| 239 | + |
|---|
| 211 | 240 | typedef struct dhd_pno_bestnet_entry { |
|---|
| 212 | 241 | struct ether_addr BSSID; |
|---|
| 213 | 242 | uint8 SSID_len; |
|---|
| .. | .. |
|---|
| 278 | 307 | uint16 nbssid; |
|---|
| 279 | 308 | struct list_head bssid_list; |
|---|
| 280 | 309 | }; |
|---|
| 281 | | -#ifdef GSCAN_SUPPORT |
|---|
| 310 | +#if defined(GSCAN_SUPPORT) || defined(DHD_GET_VALID_CHANNELS) |
|---|
| 282 | 311 | #define DHD_PNO_REPORT_NO_BATCH (1 << 2) |
|---|
| 283 | 312 | |
|---|
| 284 | 313 | typedef struct dhd_pno_gscan_channel_bucket { |
|---|
| .. | .. |
|---|
| 294 | 323 | uint16 bucket_max_multiple; |
|---|
| 295 | 324 | uint16 chan_list[GSCAN_MAX_CHANNELS_IN_BUCKET]; |
|---|
| 296 | 325 | } dhd_pno_gscan_channel_bucket_t; |
|---|
| 297 | | - |
|---|
| 298 | 326 | |
|---|
| 299 | 327 | #define DHD_PNO_AUTH_CODE_OPEN 1 /* Open */ |
|---|
| 300 | 328 | #define DHD_PNO_AUTH_CODE_PSK 2 /* WPA_PSK or WPA2PSK */ |
|---|
| .. | .. |
|---|
| 328 | 356 | } dhd_pno_swc_evt_param_t; |
|---|
| 329 | 357 | |
|---|
| 330 | 358 | typedef struct wifi_gscan_result { |
|---|
| 331 | | - uint64 ts; /* Time of discovery */ |
|---|
| 332 | | - char ssid[DOT11_MAX_SSID_LEN+1]; /* null terminated */ |
|---|
| 333 | | - struct ether_addr macaddr; /* BSSID */ |
|---|
| 334 | | - uint32 channel; /* channel frequency in MHz */ |
|---|
| 335 | | - int32 rssi; /* in db */ |
|---|
| 336 | | - uint64 rtt; /* in nanoseconds */ |
|---|
| 337 | | - uint64 rtt_sd; /* standard deviation in rtt */ |
|---|
| 338 | | - uint16 beacon_period; /* units are Kusec */ |
|---|
| 339 | | - uint16 capability; /* Capability information */ |
|---|
| 340 | | - uint32 ie_length; /* byte length of Information Elements */ |
|---|
| 341 | | - char ie_data[1]; /* IE data to follow */ |
|---|
| 359 | + uint64 ts; /* Time of discovery */ |
|---|
| 360 | + char ssid[DOT11_MAX_SSID_LEN+1]; /* null terminated */ |
|---|
| 361 | + struct ether_addr macaddr; /* BSSID */ |
|---|
| 362 | + uint32 channel; /* channel frequency in MHz */ |
|---|
| 363 | + int32 rssi; /* in db */ |
|---|
| 364 | + uint64 rtt; /* in nanoseconds */ |
|---|
| 365 | + uint64 rtt_sd; /* standard deviation in rtt */ |
|---|
| 366 | + uint16 beacon_period; /* units are Kusec */ |
|---|
| 367 | + uint16 capability; /* Capability information */ |
|---|
| 368 | + uint32 pad; |
|---|
| 342 | 369 | } wifi_gscan_result_t; |
|---|
| 370 | + |
|---|
| 371 | +typedef struct wifi_gscan_full_result { |
|---|
| 372 | + wifi_gscan_result_t fixed; |
|---|
| 373 | + uint32 scan_ch_bucket; |
|---|
| 374 | + uint32 ie_length; /* byte length of Information Elements */ |
|---|
| 375 | + char ie_data[1]; /* IE data to follow */ |
|---|
| 376 | +} wifi_gscan_full_result_t; |
|---|
| 343 | 377 | |
|---|
| 344 | 378 | typedef struct gscan_results_cache { |
|---|
| 345 | 379 | struct gscan_results_cache *next; |
|---|
| .. | .. |
|---|
| 347 | 381 | uint8 flag; |
|---|
| 348 | 382 | uint8 tot_count; |
|---|
| 349 | 383 | uint8 tot_consumed; |
|---|
| 384 | + uint32 scan_ch_bucket; |
|---|
| 350 | 385 | wifi_gscan_result_t results[1]; |
|---|
| 351 | 386 | } gscan_results_cache_t; |
|---|
| 352 | 387 | |
|---|
| .. | .. |
|---|
| 356 | 391 | int max_ap_cache_per_scan; |
|---|
| 357 | 392 | int max_rssi_sample_size; |
|---|
| 358 | 393 | int max_scan_reporting_threshold; |
|---|
| 359 | | - int max_hotlist_aps; |
|---|
| 394 | + int max_hotlist_bssids; |
|---|
| 395 | + int max_hotlist_ssids; |
|---|
| 360 | 396 | int max_significant_wifi_change_aps; |
|---|
| 397 | + int max_bssid_history_entries; |
|---|
| 361 | 398 | int max_epno_ssid_crc32; |
|---|
| 362 | 399 | int max_epno_hidden_ssid; |
|---|
| 363 | 400 | int max_white_list_ssid; |
|---|
| 364 | 401 | } dhd_pno_gscan_capabilities_t; |
|---|
| 402 | + |
|---|
| 403 | +typedef struct dhd_epno_ssid_cfg { |
|---|
| 404 | + wl_ssid_ext_params_t params; |
|---|
| 405 | + uint32 num_epno_ssid; |
|---|
| 406 | + struct list_head epno_ssid_list; |
|---|
| 407 | +} dhd_epno_ssid_cfg_t; |
|---|
| 365 | 408 | |
|---|
| 366 | 409 | struct dhd_pno_gscan_params { |
|---|
| 367 | 410 | int32 scan_fr; |
|---|
| .. | .. |
|---|
| 378 | 421 | uint16 max_ch_bucket_freq; |
|---|
| 379 | 422 | gscan_results_cache_t *gscan_batch_cache; |
|---|
| 380 | 423 | gscan_results_cache_t *gscan_hotlist_found; |
|---|
| 381 | | - gscan_results_cache_t *gscan_hotlist_lost; |
|---|
| 424 | + gscan_results_cache_t*gscan_hotlist_lost; |
|---|
| 382 | 425 | uint16 nbssid_significant_change; |
|---|
| 383 | 426 | uint16 nbssid_hotlist; |
|---|
| 384 | | - uint16 num_epno_ssid; |
|---|
| 385 | | - uint8 num_visible_epno_ssid; |
|---|
| 386 | | - /* To keep track of visble ssid index |
|---|
| 387 | | - * across multiple FW configs i.e. config |
|---|
| 388 | | - * w/o clear in between |
|---|
| 389 | | - */ |
|---|
| 390 | | - uint8 ssid_ext_last_used_index; |
|---|
| 391 | 427 | struct dhd_pno_swc_evt_param param_significant; |
|---|
| 392 | 428 | struct dhd_pno_gscan_channel_bucket channel_bucket[GSCAN_MAX_CH_BUCKETS]; |
|---|
| 393 | 429 | struct list_head hotlist_bssid_list; |
|---|
| 394 | 430 | struct list_head significant_bssid_list; |
|---|
| 395 | | - struct list_head epno_ssid_list; |
|---|
| 431 | + dhd_epno_ssid_cfg_t epno_cfg; |
|---|
| 396 | 432 | uint32 scan_id; |
|---|
| 397 | 433 | }; |
|---|
| 398 | 434 | |
|---|
| .. | .. |
|---|
| 419 | 455 | struct bssid_t bssid[1]; /* n bssids to follow */ |
|---|
| 420 | 456 | } gscan_hotlist_scan_params_t; |
|---|
| 421 | 457 | |
|---|
| 422 | | -/* SWC (Significant WiFi Change) params */ |
|---|
| 423 | | -typedef struct gscan_swc_params { |
|---|
| 424 | | - /* Rssi averaging window size */ |
|---|
| 425 | | - uint8 rssi_window; |
|---|
| 426 | | - /* Number of scans that the AP has to be absent before |
|---|
| 427 | | - * being declared LOST |
|---|
| 428 | | - */ |
|---|
| 429 | | - uint8 lost_ap_window; |
|---|
| 430 | | - /* if x Aps have a significant change generate an event. */ |
|---|
| 431 | | - uint8 swc_threshold; |
|---|
| 432 | | - uint8 nbssid; |
|---|
| 433 | | - wl_pfn_significant_bssid_t bssid_elem_list[1]; |
|---|
| 434 | | -} gscan_swc_params_t; |
|---|
| 458 | +#endif /* GSCAN_SUPPORT || DHD_GET_VALID_CHANNELS */ |
|---|
| 435 | 459 | |
|---|
| 436 | | -typedef struct dhd_pno_significant_bssid { |
|---|
| 437 | | - struct ether_addr BSSID; |
|---|
| 438 | | - int8 rssi_low_threshold; |
|---|
| 439 | | - int8 rssi_high_threshold; |
|---|
| 440 | | - struct list_head list; |
|---|
| 441 | | -} dhd_pno_significant_bssid_t; |
|---|
| 442 | | -#endif /* GSCAN_SUPPORT */ |
|---|
| 443 | 460 | typedef union dhd_pno_params { |
|---|
| 444 | 461 | struct dhd_pno_legacy_params params_legacy; |
|---|
| 445 | 462 | struct dhd_pno_batch_params params_batch; |
|---|
| 446 | 463 | struct dhd_pno_hotlist_params params_hotlist; |
|---|
| 447 | | -#ifdef GSCAN_SUPPORT |
|---|
| 464 | +#if defined(GSCAN_SUPPORT) || defined(DHD_GET_VALID_CHANNELS) |
|---|
| 448 | 465 | struct dhd_pno_gscan_params params_gscan; |
|---|
| 449 | | -#endif /* GSCAN_SUPPORT */ |
|---|
| 466 | +#endif /* GSCAN_SUPPORT || DHD_GET_VALID_CHANNELS */ |
|---|
| 450 | 467 | } dhd_pno_params_t; |
|---|
| 468 | + |
|---|
| 451 | 469 | typedef struct dhd_pno_status_info { |
|---|
| 452 | 470 | dhd_pub_t *dhd; |
|---|
| 453 | 471 | struct work_struct work; |
|---|
| .. | .. |
|---|
| 488 | 506 | dhd_dev_pno_set_for_hotlist(struct net_device *dev, wl_pfn_bssid_t *p_pfn_bssid, |
|---|
| 489 | 507 | struct dhd_pno_hotlist_params *hotlist_params); |
|---|
| 490 | 508 | extern bool dhd_dev_is_legacy_pno_enabled(struct net_device *dev); |
|---|
| 491 | | -#ifdef GSCAN_SUPPORT |
|---|
| 492 | | -extern int |
|---|
| 493 | | -dhd_dev_pno_set_cfg_gscan(struct net_device *dev, dhd_pno_gscan_cmd_cfg_t type, |
|---|
| 494 | | - void *buf, uint8 flush); |
|---|
| 509 | +#if defined(GSCAN_SUPPORT) || defined(DHD_GET_VALID_CHANNELS) |
|---|
| 495 | 510 | extern void * |
|---|
| 496 | 511 | dhd_dev_pno_get_gscan(struct net_device *dev, dhd_pno_gscan_cmd_cfg_t type, void *info, |
|---|
| 497 | 512 | uint32 *len); |
|---|
| 513 | +#endif /* GSCAN_SUPPORT || DHD_GET_VALID_CHANNELS */ |
|---|
| 514 | +#ifdef GSCAN_SUPPORT |
|---|
| 515 | +extern int |
|---|
| 516 | +dhd_dev_pno_set_cfg_gscan(struct net_device *dev, dhd_pno_gscan_cmd_cfg_t type, |
|---|
| 517 | + void *buf, bool flush); |
|---|
| 498 | 518 | int dhd_dev_pno_lock_access_batch_results(struct net_device *dev); |
|---|
| 499 | 519 | void dhd_dev_pno_unlock_access_batch_results(struct net_device *dev); |
|---|
| 500 | 520 | extern int dhd_dev_pno_run_gscan(struct net_device *dev, bool run, bool flush); |
|---|
| 501 | 521 | extern int dhd_dev_pno_enable_full_scan_result(struct net_device *dev, bool real_time); |
|---|
| 502 | | -extern void * dhd_dev_swc_scan_event(struct net_device *dev, const void *data, |
|---|
| 503 | | - int *send_evt_bytes); |
|---|
| 504 | 522 | int dhd_retreive_batch_scan_results(dhd_pub_t *dhd); |
|---|
| 505 | 523 | extern void * dhd_dev_hotlist_scan_event(struct net_device *dev, |
|---|
| 506 | | - const void *data, int *send_evt_bytes, hotlist_type_t type); |
|---|
| 524 | + const void *data, int *send_evt_bytes, hotlist_type_t type, u32 *buf_len); |
|---|
| 507 | 525 | void * dhd_dev_process_full_gscan_result(struct net_device *dev, |
|---|
| 508 | 526 | const void *data, uint32 len, int *send_evt_bytes); |
|---|
| 509 | 527 | extern int dhd_dev_gscan_batch_cache_cleanup(struct net_device *dev); |
|---|
| 510 | 528 | extern void dhd_dev_gscan_hotlist_cache_cleanup(struct net_device *dev, hotlist_type_t type); |
|---|
| 511 | 529 | extern int dhd_dev_wait_batch_results_complete(struct net_device *dev); |
|---|
| 512 | 530 | extern void * dhd_dev_process_epno_result(struct net_device *dev, |
|---|
| 513 | | - const void *data, uint32 event, int *send_evt_bytes); |
|---|
| 531 | + const void *data, uint32 event, int *send_evt_bytes); |
|---|
| 532 | +extern int dhd_dev_set_epno(struct net_device *dev); |
|---|
| 533 | +extern int dhd_dev_flush_fw_epno(struct net_device *dev); |
|---|
| 514 | 534 | #endif /* GSCAN_SUPPORT */ |
|---|
| 515 | 535 | /* dhd pno fuctions */ |
|---|
| 516 | 536 | extern int dhd_pno_stop_for_ssid(dhd_pub_t *dhd); |
|---|
| .. | .. |
|---|
| 521 | 541 | extern int dhd_pno_set_for_batch(dhd_pub_t *dhd, struct dhd_pno_batch_params *batch_params); |
|---|
| 522 | 542 | |
|---|
| 523 | 543 | extern int dhd_pno_get_for_batch(dhd_pub_t *dhd, char *buf, int bufsize, int reason); |
|---|
| 524 | | - |
|---|
| 525 | 544 | |
|---|
| 526 | 545 | extern int dhd_pno_stop_for_batch(dhd_pub_t *dhd); |
|---|
| 527 | 546 | |
|---|
| .. | .. |
|---|
| 534 | 553 | extern int dhd_pno_init(dhd_pub_t *dhd); |
|---|
| 535 | 554 | extern int dhd_pno_deinit(dhd_pub_t *dhd); |
|---|
| 536 | 555 | extern bool dhd_is_pno_supported(dhd_pub_t *dhd); |
|---|
| 537 | | -extern int dhd_pno_set_mac_oui(dhd_pub_t *dhd, uint8 *oui); |
|---|
| 538 | 556 | extern bool dhd_is_legacy_pno_enabled(dhd_pub_t *dhd); |
|---|
| 539 | | -#ifdef GSCAN_SUPPORT |
|---|
| 540 | | -extern int dhd_pno_set_cfg_gscan(dhd_pub_t *dhd, dhd_pno_gscan_cmd_cfg_t type, |
|---|
| 541 | | - void *buf, uint8 flush); |
|---|
| 557 | +#if defined(GSCAN_SUPPORT) || defined(DHD_GET_VALID_CHANNELS) |
|---|
| 542 | 558 | extern void * dhd_pno_get_gscan(dhd_pub_t *dhd, dhd_pno_gscan_cmd_cfg_t type, void *info, |
|---|
| 543 | 559 | uint32 *len); |
|---|
| 560 | +#endif /* GSCAN_SUPPORT || DHD_GET_VALID_CHANNELS */ |
|---|
| 561 | +#ifdef GSCAN_SUPPORT |
|---|
| 562 | +extern int dhd_pno_set_cfg_gscan(dhd_pub_t *dhd, dhd_pno_gscan_cmd_cfg_t type, |
|---|
| 563 | + void *buf, bool flush); |
|---|
| 544 | 564 | extern int dhd_pno_lock_batch_results(dhd_pub_t *dhd); |
|---|
| 545 | 565 | extern void dhd_pno_unlock_batch_results(dhd_pub_t *dhd); |
|---|
| 546 | 566 | extern int dhd_pno_initiate_gscan_request(dhd_pub_t *dhd, bool run, bool flush); |
|---|
| 547 | 567 | extern int dhd_pno_enable_full_scan_result(dhd_pub_t *dhd, bool real_time_flag); |
|---|
| 548 | 568 | extern int dhd_pno_cfg_gscan(dhd_pub_t *dhd, dhd_pno_gscan_cmd_cfg_t type, void *buf); |
|---|
| 549 | 569 | extern int dhd_dev_retrieve_batch_scan(struct net_device *dev); |
|---|
| 550 | | -extern void *dhd_handle_swc_evt(dhd_pub_t *dhd, const void *event_data, int *send_evt_bytes); |
|---|
| 551 | 570 | extern void *dhd_handle_hotlist_scan_evt(dhd_pub_t *dhd, const void *event_data, |
|---|
| 552 | | - int *send_evt_bytes, hotlist_type_t type); |
|---|
| 571 | + int *send_evt_bytes, hotlist_type_t type, u32 *buf_len); |
|---|
| 553 | 572 | extern void *dhd_process_full_gscan_result(dhd_pub_t *dhd, const void *event_data, |
|---|
| 554 | 573 | uint32 len, int *send_evt_bytes); |
|---|
| 555 | 574 | extern int dhd_gscan_batch_cache_cleanup(dhd_pub_t *dhd); |
|---|
| .. | .. |
|---|
| 557 | 576 | extern int dhd_wait_batch_results_complete(dhd_pub_t *dhd); |
|---|
| 558 | 577 | extern void * dhd_pno_process_epno_result(dhd_pub_t *dhd, const void *data, |
|---|
| 559 | 578 | uint32 event, int *size); |
|---|
| 579 | +extern void dhd_pno_translate_epno_fw_flags(uint32 *flags); |
|---|
| 580 | +extern int dhd_pno_set_epno(dhd_pub_t *dhd); |
|---|
| 581 | +extern int dhd_pno_flush_fw_epno(dhd_pub_t *dhd); |
|---|
| 582 | +extern void dhd_pno_set_epno_auth_flag(uint32 *wpa_auth); |
|---|
| 560 | 583 | #endif /* GSCAN_SUPPORT */ |
|---|
| 561 | | -#endif |
|---|
| 584 | +#endif /* #if defined(OEM_ANDROID) && defined(PNO_SUPPORT) */ |
|---|
| 562 | 585 | |
|---|
| 563 | 586 | #endif /* __DHD_PNO_H__ */ |
|---|