qcacld-3.0: Add extscan feature flag

Add config flag to enable / disable extscan feature

Change-Id: Icb5087619964b729041e18127baba1b2796ed911
CRs-Fixed: 2226549
This commit is contained in:
Wen Gong 2018-04-18 11:27:23 +08:00 • committed by nshrivas
commit 7952fbd708
7 changed files with 87 additions and 91 deletions

View file

@ -73,9 +73,7 @@
#include <wlan_cfg80211_scan.h>
#include <wlan_cfg80211_ftm.h>
#ifdef FEATURE_WLAN_EXTSCAN
#include "wlan_hdd_ext_scan.h"
#endif
#ifdef WLAN_FEATURE_LINK_LAYER_STATS
#include "wlan_hdd_stats.h"

View file

@ -361,8 +361,12 @@ int wlan_hdd_send_avoid_freq_for_dnbs(struct hdd_context *hdd_ctx,
#ifdef FEATURE_WLAN_EXTSCAN
void wlan_hdd_cfg80211_extscan_callback(void *ctx,
const uint16_t evType, void *pMsg);
#else
static inline void wlan_hdd_cfg80211_extscan_callback(void *ctx,
const uint16_t evType, void *pMsg)
{
}
#endif /* FEATURE_WLAN_EXTSCAN */
/**
* wlan_hdd_rso_cmd_status_cb() - HDD callback to read RSO command status
* @ctx: void pointer to hdd context

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2012-2014, 2017 The Linux Foundation. All rights reserved.
* Copyright (c) 2012-2014, 2017-2018 The Linux Foundation. All rights reserved.
*
* Permission to use, copy, modify, and/or distribute this software for
* any purpose with or without fee is hereby granted, provided that the
@ -28,6 +28,8 @@
struct hdd_context;
#define EXTSCAN_EVENT_BUF_SIZE 4096
#ifdef FEATURE_WLAN_EXTSCAN
#include "wlan_hdd_main.h"
@ -39,8 +41,6 @@ struct hdd_context;
* on the limit based on the data requirements.
*/
#define EXTSCAN_EVENT_BUF_SIZE 4096
int wlan_hdd_cfg80211_extscan_start(struct wiphy *wiphy,
struct wireless_dev *wdev,
const void *data, int data_len);
@ -104,7 +104,7 @@ void wlan_hdd_cfg80211_extscan_init(struct hdd_context *hdd_ctx);
#else /* FEATURE_WLAN_EXTSCAN */
static void wlan_hdd_cfg80211_extscan_init(struct hdd_context *hdd_ctx)
static inline void wlan_hdd_cfg80211_extscan_init(struct hdd_context *hdd_ctx)
{
}

View file

@ -90,13 +90,6 @@ typedef uint8_t tSirVersionString[SIR_VERSION_STRING_LEN];
#define MAXNUM_PERIODIC_TX_PTRNS 6
#define WIFI_SCANNING_MAC_OUI_LENGTH 3
#ifdef FEATURE_WLAN_EXTSCAN
#define WLAN_EXTSCAN_MAX_CHANNELS 36
#define WLAN_EXTSCAN_MAX_BUCKETS 16
#define WLAN_EXTSCAN_MAX_HOTLIST_APS 128
#define WLAN_EXTSCAN_MAX_SIGNIFICANT_CHANGE_APS 64
/* This should not be greater than MAX_NUMBER_OF_CONC_CONNECTIONS */
#define MAX_VDEV_SUPPORTED 4
@ -122,34 +115,6 @@ typedef uint8_t tSirVersionString[SIR_VERSION_STRING_LEN];
/* Maximum number of peers for SAP */
#define SIR_SAP_MAX_NUM_PEERS 32
typedef enum {
eSIR_EXTSCAN_INVALID,
eSIR_EXTSCAN_START_RSP,
eSIR_EXTSCAN_STOP_RSP,
eSIR_EXTSCAN_CACHED_RESULTS_RSP,
eSIR_EXTSCAN_SET_BSSID_HOTLIST_RSP,
eSIR_EXTSCAN_RESET_BSSID_HOTLIST_RSP,
eSIR_EXTSCAN_SET_SIGNIFICANT_WIFI_CHANGE_RSP,
eSIR_EXTSCAN_RESET_SIGNIFICANT_WIFI_CHANGE_RSP,
eSIR_EXTSCAN_GET_CAPABILITIES_IND,
eSIR_EXTSCAN_HOTLIST_MATCH_IND,
eSIR_EXTSCAN_SIGNIFICANT_WIFI_CHANGE_RESULTS_IND,
eSIR_EXTSCAN_CACHED_RESULTS_IND,
eSIR_EXTSCAN_SCAN_RES_AVAILABLE_IND,
eSIR_EXTSCAN_SCAN_PROGRESS_EVENT_IND,
eSIR_EXTSCAN_FULL_SCAN_RESULT_IND,
eSIR_EPNO_NETWORK_FOUND_IND,
eSIR_PASSPOINT_NETWORK_FOUND_IND,
eSIR_EXTSCAN_SET_SSID_HOTLIST_RSP,
eSIR_EXTSCAN_RESET_SSID_HOTLIST_RSP,
/* Keep this last */
eSIR_EXTSCAN_CALLBACK_TYPE_MAX,
} tSirExtScanCallbackType;
#endif /* FEATURE_WLAN_EXTSCAN */
#define SIR_KRK_KEY_LEN 16
#define SIR_BTK_KEY_LEN 32
#define SIR_KCK_KEY_LEN 16
@ -3923,8 +3888,49 @@ struct roam_offload_synch_fail {
#endif
/**
* struct sir_wisa_params - WISA Mode Parameters
* @mode: WISA mode
* @session_id: Session ID of vdev
*/
struct sir_wisa_params {
bool mode;
uint8_t vdev_id;
};
#ifdef FEATURE_WLAN_EXTSCAN
#define WLAN_EXTSCAN_MAX_CHANNELS 36
#define WLAN_EXTSCAN_MAX_BUCKETS 16
#define WLAN_EXTSCAN_MAX_HOTLIST_APS 128
#define WLAN_EXTSCAN_MAX_SIGNIFICANT_CHANGE_APS 64
typedef enum {
eSIR_EXTSCAN_INVALID,
eSIR_EXTSCAN_START_RSP,
eSIR_EXTSCAN_STOP_RSP,
eSIR_EXTSCAN_CACHED_RESULTS_RSP,
eSIR_EXTSCAN_SET_BSSID_HOTLIST_RSP,
eSIR_EXTSCAN_RESET_BSSID_HOTLIST_RSP,
eSIR_EXTSCAN_SET_SIGNIFICANT_WIFI_CHANGE_RSP,
eSIR_EXTSCAN_RESET_SIGNIFICANT_WIFI_CHANGE_RSP,
eSIR_EXTSCAN_GET_CAPABILITIES_IND,
eSIR_EXTSCAN_HOTLIST_MATCH_IND,
eSIR_EXTSCAN_SIGNIFICANT_WIFI_CHANGE_RESULTS_IND,
eSIR_EXTSCAN_CACHED_RESULTS_IND,
eSIR_EXTSCAN_SCAN_RES_AVAILABLE_IND,
eSIR_EXTSCAN_SCAN_PROGRESS_EVENT_IND,
eSIR_EXTSCAN_FULL_SCAN_RESULT_IND,
eSIR_EPNO_NETWORK_FOUND_IND,
eSIR_PASSPOINT_NETWORK_FOUND_IND,
eSIR_EXTSCAN_SET_SSID_HOTLIST_RSP,
eSIR_EXTSCAN_RESET_SSID_HOTLIST_RSP,
/* Keep this last */
eSIR_EXTSCAN_CALLBACK_TYPE_MAX,
} tSirExtScanCallbackType;
/**
* typedef enum wifi_scan_flags - wifi scan flags
* @WIFI_SCAN_FLAG_INTERRUPTED: Indicates that scan results are not complete
@ -4335,16 +4341,6 @@ typedef struct {
} tSirExtScanResetBssidHotlistReqParams,
*tpSirExtScanResetBssidHotlistReqParams;
/**
* struct sir_wisa_params - WISA Mode Parameters
* @mode: WISA mode
* @session_id: Session ID of vdev
*/
struct sir_wisa_params {
bool mode;
uint8_t vdev_id;
};
typedef struct {
uint32_t requestId;
uint8_t sessionId;

View file

@ -11382,39 +11382,6 @@ QDF_STATUS sme_reset_bss_hotlist(tHalHandle hHal,
return status;
}
/**
* sme_send_wisa_params(): Pass WISA mode to WMA
* @hal: HAL context
* @wisa_params: pointer to WISA params struct
* @sessionId: SME session id
*
* Pass WISA params to WMA
*
* Return: QDF_STATUS
*/
QDF_STATUS sme_set_wisa_params(tHalHandle hal,
struct sir_wisa_params *wisa_params)
{
QDF_STATUS status = QDF_STATUS_SUCCESS;
tpAniSirGlobal mac = PMAC_STRUCT(hal);
struct scheduler_msg message = {0};
struct sir_wisa_params *cds_msg_wisa_params;
cds_msg_wisa_params = qdf_mem_malloc(sizeof(struct sir_wisa_params));
if (!cds_msg_wisa_params)
return QDF_STATUS_E_NOMEM;
*cds_msg_wisa_params = *wisa_params;
status = sme_acquire_global_lock(&mac->sme);
if (QDF_IS_STATUS_SUCCESS(status)) {
message.bodyptr = cds_msg_wisa_params;
message.type = WMA_SET_WISA_PARAMS;
status = scheduler_post_msg(QDF_MODULE_ID_WMA, &message);
sme_release_global_lock(&mac->sme);
}
return status;
}
/*
* sme_set_significant_change() -
* SME API to set significant change
@ -11726,6 +11693,39 @@ QDF_STATUS sme_ext_scan_register_callback(tHalHandle hHal,
}
#endif /* FEATURE_WLAN_EXTSCAN */
/**
* sme_send_wisa_params(): Pass WISA mode to WMA
* @hal: HAL context
* @wisa_params: pointer to WISA params struct
* @sessionId: SME session id
*
* Pass WISA params to WMA
*
* Return: QDF_STATUS
*/
QDF_STATUS sme_set_wisa_params(tHalHandle hal,
struct sir_wisa_params *wisa_params)
{
QDF_STATUS status = QDF_STATUS_SUCCESS;
tpAniSirGlobal mac = PMAC_STRUCT(hal);
struct scheduler_msg message = {0};
struct sir_wisa_params *cds_msg_wisa_params;
cds_msg_wisa_params = qdf_mem_malloc(sizeof(struct sir_wisa_params));
if (!cds_msg_wisa_params)
return QDF_STATUS_E_NOMEM;
*cds_msg_wisa_params = *wisa_params;
status = sme_acquire_global_lock(&mac->sme);
if (QDF_IS_STATUS_SUCCESS(status)) {
message.bodyptr = cds_msg_wisa_params;
message.type = WMA_SET_WISA_PARAMS;
status = scheduler_post_msg(QDF_MODULE_ID_WMA, &message);
sme_release_global_lock(&mac->sme);
}
return status;
}
#ifdef WLAN_FEATURE_LINK_LAYER_STATS
/*

View file

@ -138,6 +138,7 @@ struct index_vht_data_rate_type {
uint16_t ht80_rate[2];
};
struct tSirWifiScanCmdReqParams;
/*
* wma_main.c functions declarations
*/
@ -348,9 +349,11 @@ int wma_passpoint_match_event_handler(void *handle,
#endif
#ifdef FEATURE_WLAN_EXTSCAN
int wma_extscan_wow_event_callback(void *handle, void *event, uint32_t len);
void wma_register_extscan_event_handler(tp_wma_handle wma_handle);
#ifdef FEATURE_WLAN_EXTSCAN
QDF_STATUS wma_get_buf_extscan_start_cmd(tp_wma_handle wma_handle,
tSirWifiScanCmdReqParams *pstart,
wmi_buf_t *buf, int *buf_len);
@ -562,8 +565,6 @@ int wma_beacon_swba_handler(void *handle, uint8_t *event, uint32_t len);
int wma_peer_sta_kickout_event_handler(void *handle, u8 *event, u32 len);
int wma_extscan_wow_event_callback(void *handle, void *event, uint32_t len);
int wma_unified_bcntx_status_event_handler(void *handle,
uint8_t *cmd_param_info,
uint32_t len);

View file

@ -3290,7 +3290,6 @@ int wma_extscan_wow_event_callback(void *handle, void *event, uint32_t len)
return 0;
}
}
#endif
/**
* wma_register_extscan_event_handler() - register extscan event handler
@ -3346,8 +3345,6 @@ void wma_register_extscan_event_handler(tp_wma_handle wma_handle)
WMA_RX_SERIALIZER_CTX);
}
#ifdef FEATURE_WLAN_EXTSCAN
/**
* wma_extscan_start_stop_event_handler() - extscan start/stop event handler
* @handle: wma handle