mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-09 13:49:24 -04:00
qcacld-3.0: Clean up usage of con_mode
Separate con_mode from adapter mode definition and clean up usage of con_mode. CRs-fixed: 917959 Change-Id: Ia058826cdb873558ab8703fcd4f80d37d3f782df
This commit is contained in:
parent
05ac7ee559
commit
f5d60c8524
45 changed files with 599 additions and 609 deletions
|
|
@ -81,7 +81,7 @@ static int ol_check_fw_hash(const u8 *data, u32 fw_size, ATH_BIN_FILE file)
|
|||
break;
|
||||
case ATH_FIRMWARE_FILE:
|
||||
#ifdef QCA_WIFI_FTM
|
||||
if (cds_get_conparam() == CDF_FTM_MODE) {
|
||||
if (cds_get_conparam() == CDF_GLOBAL_FTM_MODE) {
|
||||
hash = fw_hash.utf;
|
||||
break;
|
||||
}
|
||||
|
|
@ -173,7 +173,7 @@ static int __ol_transfer_bin_file(struct ol_softc *scn, ATH_BIN_FILE file,
|
|||
break;
|
||||
}
|
||||
#ifdef QCA_WIFI_FTM
|
||||
if (cds_get_conparam() == CDF_FTM_MODE) {
|
||||
if (cds_get_conparam() == CDF_GLOBAL_FTM_MODE) {
|
||||
#if defined(CONFIG_CNSS)
|
||||
filename = scn->fw_files.utf_file;
|
||||
#else
|
||||
|
|
@ -201,7 +201,7 @@ static int __ol_transfer_bin_file(struct ol_softc *scn, ATH_BIN_FILE file,
|
|||
return 0;
|
||||
case ATH_BOARD_DATA_FILE:
|
||||
#ifdef QCA_WIFI_FTM
|
||||
if (cds_get_conparam() == CDF_FTM_MODE) {
|
||||
if (cds_get_conparam() == CDF_GLOBAL_FTM_MODE) {
|
||||
#if defined(CONFIG_CNSS)
|
||||
filename = scn->fw_files.utf_board_data;
|
||||
#else
|
||||
|
|
@ -225,7 +225,7 @@ static int __ol_transfer_bin_file(struct ol_softc *scn, ATH_BIN_FILE file,
|
|||
#endif
|
||||
break;
|
||||
case ATH_SETUP_FILE:
|
||||
if (cds_get_conparam() != CDF_FTM_MODE &&
|
||||
if (cds_get_conparam() != CDF_GLOBAL_FTM_MODE &&
|
||||
!WLAN_IS_EPPING_ENABLED(cds_get_conparam())) {
|
||||
#ifdef CONFIG_CNSS
|
||||
BMI_INFO("%s: no Setup file defined", __func__);
|
||||
|
|
|
|||
|
|
@ -266,7 +266,7 @@ typedef enum {
|
|||
#define cdf_snprint __cdf_snprint
|
||||
|
||||
/**
|
||||
* typedef enum tCDF_CON_MODE - Concurrency role.
|
||||
* enum tCDF_ADAPTER_MODE - adapter role.
|
||||
*
|
||||
* @CDF_STA_MODE: STA mode
|
||||
* @CDF_SAP_MODE: SAP mode
|
||||
|
|
@ -282,18 +282,35 @@ typedef enum {
|
|||
* These are generic IDs that identify the various roles
|
||||
* in the software system
|
||||
*/
|
||||
typedef enum {
|
||||
enum tCDF_ADAPTER_MODE {
|
||||
CDF_STA_MODE = 0,
|
||||
CDF_SAP_MODE = 1,
|
||||
CDF_P2P_CLIENT_MODE,
|
||||
CDF_P2P_GO_MODE,
|
||||
CDF_FTM_MODE = 5,
|
||||
CDF_FTM_MODE,
|
||||
CDF_IBSS_MODE,
|
||||
CDF_P2P_DEVICE_MODE,
|
||||
CDF_EPPING_MODE,
|
||||
CDF_OCB_MODE,
|
||||
CDF_MAX_NO_OF_MODE
|
||||
} tCDF_CON_MODE;
|
||||
};
|
||||
|
||||
/**
|
||||
* enum tCDF_GLOBAL_CON_MODE - global config mode when
|
||||
* driver is loaded.
|
||||
*
|
||||
* @CDF_GLOBAL_MISSION_MODE: mission mode (STA, SAP...)
|
||||
* @CDF_GLOBAL_FTM_MODE: FTM mode
|
||||
* @CDF_GLOBAL_EPPING_MODE: EPPING mode
|
||||
* @CDF_GLOBAL_MAX_MODE: Max place holder
|
||||
*/
|
||||
enum tCDF_GLOBAL_CON_MODE {
|
||||
CDF_GLOBAL_MISSION_MODE,
|
||||
CDF_GLOBAL_FTM_MODE = 5,
|
||||
CDF_GLOBAL_EPPING_MODE = 8,
|
||||
CDF_GLOBAL_MAX_MODE
|
||||
};
|
||||
|
||||
|
||||
#ifdef WLAN_OPEN_P2P_INTERFACE
|
||||
/* This should match with WLAN_MAX_INTERFACES */
|
||||
|
|
|
|||
|
|
@ -90,7 +90,7 @@ CDF_STATUS cds_alloc_context(void *p_cds_context, CDF_MODULE_ID moduleID,
|
|||
CDF_STATUS cds_free_context(void *p_cds_context, CDF_MODULE_ID moduleID,
|
||||
void *pModuleContext);
|
||||
|
||||
CDF_STATUS cds_get_vdev_types(tCDF_CON_MODE mode, uint32_t *type,
|
||||
CDF_STATUS cds_get_vdev_types(enum tCDF_ADAPTER_MODE mode, uint32_t *type,
|
||||
uint32_t *subType);
|
||||
|
||||
void cds_flush_work(void *work);
|
||||
|
|
|
|||
|
|
@ -465,9 +465,10 @@ struct cds_conc_connection_info {
|
|||
|
||||
bool cds_is_connection_in_progress(hdd_context_t *hdd_ctx);
|
||||
void cds_dump_concurrency_info(hdd_context_t *pHddCtx);
|
||||
void cds_set_concurrency_mode(hdd_context_t *pHddCtx, tCDF_CON_MODE mode);
|
||||
void cds_set_concurrency_mode(hdd_context_t *hdd_ctx,
|
||||
enum tCDF_ADAPTER_MODE mode);
|
||||
void cds_clear_concurrency_mode(hdd_context_t *pHddCtx,
|
||||
tCDF_CON_MODE mode);
|
||||
enum tCDF_ADAPTER_MODE mode);
|
||||
uint32_t cds_get_connection_count(hdd_context_t *hdd_ctx);
|
||||
/**
|
||||
* cds_is_sta_connection_pending() - This function will check if sta connection
|
||||
|
|
@ -659,12 +660,14 @@ static inline void cds_check_and_restart_sap_with_non_dfs_acs(
|
|||
|
||||
}
|
||||
#endif /* FEATURE_WLAN_STA_AP_MODE_DFS_DISABLE */
|
||||
void cds_incr_active_session(hdd_context_t *pHddCtx, tCDF_CON_MODE mode,
|
||||
void cds_incr_active_session(hdd_context_t *pHddCtx,
|
||||
enum tCDF_ADAPTER_MODE mode,
|
||||
uint8_t sessionId);
|
||||
void cds_decr_active_session(hdd_context_t *pHddCtx, tCDF_CON_MODE mode,
|
||||
void cds_decr_active_session(hdd_context_t *pHddCtx,
|
||||
enum tCDF_ADAPTER_MODE mode,
|
||||
uint8_t sessionId);
|
||||
void cds_decr_session_set_pcl(hdd_context_t *hdd_ctx,
|
||||
tCDF_CON_MODE mode,
|
||||
enum tCDF_ADAPTER_MODE mode,
|
||||
uint8_t session_id);
|
||||
CDF_STATUS cds_init_policy_mgr(hdd_context_t *hdd_ctx);
|
||||
CDF_STATUS cds_get_pcl(hdd_context_t *hdd_ctx, enum cds_con_mode mode,
|
||||
|
|
@ -769,11 +772,11 @@ void cds_soc_set_dual_mac_cfg_cb(enum set_hw_mode_status status,
|
|||
uint32_t scan_config,
|
||||
uint32_t fw_mode_config);
|
||||
bool cds_map_concurrency_mode(hdd_context_t *hdd_ctx,
|
||||
tCDF_CON_MODE *old_mode, enum cds_con_mode *new_mode);
|
||||
enum tCDF_ADAPTER_MODE *old_mode, enum cds_con_mode *new_mode);
|
||||
CDF_STATUS cds_get_channel_from_scan_result(hdd_adapter_t *adapter,
|
||||
tCsrRoamProfile *roam_profile, uint8_t *channel);
|
||||
|
||||
tCDF_CON_MODE cds_get_conparam(void);
|
||||
enum tCDF_GLOBAL_CON_MODE cds_get_conparam(void);
|
||||
bool cds_concurrent_open_sessions_running(void);
|
||||
bool cds_max_concurrent_connections_reached(void);
|
||||
void cds_clear_concurrent_session_count(void);
|
||||
|
|
|
|||
|
|
@ -1548,7 +1548,7 @@ CDF_STATUS cds_shutdown(v_CONTEXT_t cds_context)
|
|||
*
|
||||
* Return: WMI vdev type
|
||||
*/
|
||||
CDF_STATUS cds_get_vdev_types(tCDF_CON_MODE mode, uint32_t *type,
|
||||
CDF_STATUS cds_get_vdev_types(enum tCDF_ADAPTER_MODE mode, uint32_t *type,
|
||||
uint32_t *sub_type)
|
||||
{
|
||||
CDF_STATUS status = CDF_STATUS_SUCCESS;
|
||||
|
|
|
|||
|
|
@ -3232,13 +3232,14 @@ void cds_dump_concurrency_info(hdd_context_t *hdd_ctx)
|
|||
/**
|
||||
* cds_set_concurrency_mode() - To set concurrency mode
|
||||
* @hdd_ctx: HDD context
|
||||
* @mode: Concurrency mode
|
||||
* @mode: adapter mode
|
||||
*
|
||||
* This routine is called to set the concurrency mode
|
||||
*
|
||||
* Return: NONE
|
||||
*/
|
||||
void cds_set_concurrency_mode(hdd_context_t *hdd_ctx, tCDF_CON_MODE mode)
|
||||
void cds_set_concurrency_mode(hdd_context_t *hdd_ctx,
|
||||
enum tCDF_ADAPTER_MODE mode)
|
||||
{
|
||||
switch (mode) {
|
||||
case CDF_STA_MODE:
|
||||
|
|
@ -3260,14 +3261,14 @@ void cds_set_concurrency_mode(hdd_context_t *hdd_ctx, tCDF_CON_MODE mode)
|
|||
/**
|
||||
* cds_clear_concurrency_mode() - To clear concurrency mode
|
||||
* @hdd_ctx: HDD context
|
||||
* @mode: Concurrency mode
|
||||
* @mode: adapter mode
|
||||
*
|
||||
* This routine is called to clear the concurrency mode
|
||||
*
|
||||
* Return: NONE
|
||||
*/
|
||||
void cds_clear_concurrency_mode(hdd_context_t *hdd_ctx,
|
||||
tCDF_CON_MODE mode)
|
||||
enum tCDF_ADAPTER_MODE mode)
|
||||
{
|
||||
switch (mode) {
|
||||
case CDF_STA_MODE:
|
||||
|
|
@ -3289,7 +3290,7 @@ void cds_clear_concurrency_mode(hdd_context_t *hdd_ctx,
|
|||
/**
|
||||
* cds_soc_set_pcl() - Sets PCL to FW
|
||||
* @hdd_ctx: HDD context
|
||||
* @mode: Connection mode
|
||||
* @mode: adapter mode
|
||||
*
|
||||
* Fetches the PCL and sends the PCL to SME
|
||||
* module which in turn will send the WMI
|
||||
|
|
@ -3297,7 +3298,7 @@ void cds_clear_concurrency_mode(hdd_context_t *hdd_ctx,
|
|||
*
|
||||
* Return: None
|
||||
*/
|
||||
static void cds_soc_set_pcl(hdd_context_t *hdd_ctx, tCDF_CON_MODE mode)
|
||||
static void cds_soc_set_pcl(hdd_context_t *hdd_ctx, enum tCDF_ADAPTER_MODE mode)
|
||||
{
|
||||
CDF_STATUS status;
|
||||
enum cds_con_mode con_mode;
|
||||
|
|
@ -3344,7 +3345,7 @@ static void cds_soc_set_pcl(hdd_context_t *hdd_ctx, tCDF_CON_MODE mode)
|
|||
/**
|
||||
* cds_incr_active_session() - increments the number of active sessions
|
||||
* @hdd_ctx: HDD Context
|
||||
* @mode: Device mode
|
||||
* @mode: Adapter mode
|
||||
* @session_id: session ID for the connection session
|
||||
*
|
||||
* This function increments the number of active sessions maintained per device
|
||||
|
|
@ -3353,8 +3354,9 @@ static void cds_soc_set_pcl(hdd_context_t *hdd_ctx, tCDF_CON_MODE mode)
|
|||
*
|
||||
* Return: None
|
||||
*/
|
||||
void cds_incr_active_session(hdd_context_t *hdd_ctx, tCDF_CON_MODE mode,
|
||||
uint8_t session_id)
|
||||
void cds_incr_active_session(hdd_context_t *hdd_ctx,
|
||||
enum tCDF_ADAPTER_MODE mode,
|
||||
uint8_t session_id)
|
||||
{
|
||||
/*
|
||||
* Need to aquire mutex as entire functionality in this function
|
||||
|
|
@ -3460,7 +3462,7 @@ static void cds_set_pcl_for_existing_combo(hdd_context_t *hdd_ctx,
|
|||
enum cds_con_mode mode)
|
||||
{
|
||||
struct cds_conc_connection_info info;
|
||||
tCDF_CON_MODE pcl_mode;
|
||||
enum tCDF_ADAPTER_MODE pcl_mode;
|
||||
|
||||
switch (mode) {
|
||||
case CDS_STA_MODE:
|
||||
|
|
@ -3499,7 +3501,7 @@ static void cds_set_pcl_for_existing_combo(hdd_context_t *hdd_ctx,
|
|||
/**
|
||||
* cds_decr_session_set_pcl() - Decrement session count and set PCL
|
||||
* @hdd_ctx: HDD context
|
||||
* @mode: Connection mode
|
||||
* @mode: Adapter mode
|
||||
* @session_id: Session id
|
||||
*
|
||||
* Decrements the active session count and sets the PCL if a STA connection
|
||||
|
|
@ -3508,7 +3510,7 @@ static void cds_set_pcl_for_existing_combo(hdd_context_t *hdd_ctx,
|
|||
* Return: None
|
||||
*/
|
||||
void cds_decr_session_set_pcl(hdd_context_t *hdd_ctx,
|
||||
tCDF_CON_MODE mode,
|
||||
enum tCDF_ADAPTER_MODE mode,
|
||||
uint8_t session_id)
|
||||
{
|
||||
CDF_STATUS cdf_status;
|
||||
|
|
@ -3549,8 +3551,8 @@ void cds_decr_session_set_pcl(hdd_context_t *hdd_ctx,
|
|||
|
||||
/**
|
||||
* cds_decr_active_session() - decrements the number of active sessions
|
||||
* @hdd_ctx: HDD Context
|
||||
* @mode: Device mode
|
||||
* @hdd_ctx: HDD Context
|
||||
* @mode: Adapter mode
|
||||
* @session_id: session ID for the connection session
|
||||
*
|
||||
* This function decrements the number of active sessions maintained per device
|
||||
|
|
@ -3559,7 +3561,8 @@ void cds_decr_session_set_pcl(hdd_context_t *hdd_ctx,
|
|||
*
|
||||
* Return: None
|
||||
*/
|
||||
void cds_decr_active_session(hdd_context_t *hdd_ctx, tCDF_CON_MODE mode,
|
||||
void cds_decr_active_session(hdd_context_t *hdd_ctx,
|
||||
enum tCDF_ADAPTER_MODE mode,
|
||||
uint8_t session_id)
|
||||
{
|
||||
/*
|
||||
|
|
@ -4306,7 +4309,7 @@ CDF_STATUS cds_get_channel_list(hdd_context_t *hdd_ctx,
|
|||
/**
|
||||
* cds_map_concurrency_mode() - to map concurrency mode between sme and hdd
|
||||
* @hdd_ctx: hdd context
|
||||
* @old_mode: sme provided concurrency mode
|
||||
* @old_mode: sme provided adapter mode
|
||||
* @new_mode: hdd provided concurrency mode
|
||||
*
|
||||
* This routine will map concurrency mode between sme and hdd
|
||||
|
|
@ -4314,7 +4317,7 @@ CDF_STATUS cds_get_channel_list(hdd_context_t *hdd_ctx,
|
|||
* Return: true or false
|
||||
*/
|
||||
bool cds_map_concurrency_mode(hdd_context_t *hdd_ctx,
|
||||
tCDF_CON_MODE *old_mode, enum cds_con_mode *new_mode)
|
||||
enum tCDF_ADAPTER_MODE *old_mode, enum cds_con_mode *new_mode)
|
||||
{
|
||||
bool status = true;
|
||||
|
||||
|
|
@ -5719,7 +5722,7 @@ static int __cds_cfg80211_get_concurrency_matrix(struct wiphy *wiphy,
|
|||
|
||||
ENTER();
|
||||
|
||||
if (CDF_FTM_MODE == hdd_get_conparam()) {
|
||||
if (CDF_GLOBAL_FTM_MODE == hdd_get_conparam()) {
|
||||
cds_err("Command not allowed in FTM mode");
|
||||
return -EPERM;
|
||||
}
|
||||
|
|
@ -6773,7 +6776,7 @@ CDF_STATUS cds_change_mcc_go_beacon_interval(hdd_adapter_t *pHostapdAdapter)
|
|||
|
||||
cds_info("UPDATE Beacon Params");
|
||||
|
||||
if (CDF_SAP_MODE == cds_get_conparam()) {
|
||||
if (WLAN_HDD_SOFTAP == pHostapdAdapter->device_mode) {
|
||||
hHal = WLAN_HDD_GET_HAL_CTX(pHostapdAdapter);
|
||||
if (NULL == hHal) {
|
||||
cds_err("Hal ctx is null");
|
||||
|
|
@ -7277,11 +7280,11 @@ enum cds_con_mode cds_convert_device_mode_to_hdd_type(
|
|||
* Return the connection mode parameter set by insmod or set during statically
|
||||
* linked driver
|
||||
*
|
||||
* Return: tCDF_CON_MODE
|
||||
* Return: enum tCDF_GLOBAL_CON_MODE
|
||||
*/
|
||||
tCDF_CON_MODE cds_get_conparam(void)
|
||||
enum tCDF_GLOBAL_CON_MODE cds_get_conparam(void)
|
||||
{
|
||||
tCDF_CON_MODE con_mode;
|
||||
enum tCDF_GLOBAL_CON_MODE con_mode;
|
||||
con_mode = hdd_get_conparam();
|
||||
return con_mode;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -530,14 +530,23 @@ typedef struct beacon_data_s {
|
|||
int dtim_period;
|
||||
} beacon_data_t;
|
||||
|
||||
/* MAINTAIN 1 - 1 CORRESPONDENCE WITH tCDF_CON_MODE */
|
||||
/**
|
||||
* enum device_mode: Maintain one to one correspondence with tCDF_ADAPTER_MODE
|
||||
* @WLAN_HDD_INFRA_STATION: station mode
|
||||
* @WLAN_HDD_SOFTAP: sap mode
|
||||
* @WLAN_HDD_P2P_CLIENT: p2p client mode
|
||||
* @WLAN_HDD_P2P_GO: p2p go mode
|
||||
* @WLAN_HDD_FTM: ftm mode
|
||||
* @WLAN_HDD_IBSS: ibss mode
|
||||
* @WLAN_HDD_P2P_DEVICE: p2p device mode
|
||||
* @WLAN_HDD_OCB: ocb mode
|
||||
*/
|
||||
typedef enum device_mode {
|
||||
WLAN_HDD_INFRA_STATION,
|
||||
WLAN_HDD_SOFTAP,
|
||||
WLAN_HDD_P2P_CLIENT,
|
||||
WLAN_HDD_P2P_GO,
|
||||
/* Mode 5 is reserved for FTM */
|
||||
WLAN_HDD_FTM = 5,
|
||||
WLAN_HDD_FTM,
|
||||
WLAN_HDD_IBSS,
|
||||
WLAN_HDD_P2P_DEVICE,
|
||||
WLAN_HDD_OCB
|
||||
|
|
@ -1388,7 +1397,7 @@ void wlan_hdd_release_intf_addr(hdd_context_t *pHddCtx, uint8_t *releaseAddr);
|
|||
uint8_t hdd_get_operating_channel(hdd_context_t *pHddCtx, device_mode_t mode);
|
||||
|
||||
void hdd_set_conparam(uint32_t con_param);
|
||||
tCDF_CON_MODE hdd_get_conparam(void);
|
||||
enum tCDF_GLOBAL_CON_MODE hdd_get_conparam(void);
|
||||
|
||||
void hdd_abort_mac_scan(hdd_context_t *pHddCtx, uint8_t sessionId,
|
||||
eCsrAbortReason reason);
|
||||
|
|
|
|||
|
|
@ -6516,9 +6516,7 @@ CDF_STATUS hdd_set_sme_config(hdd_context_t *pHddCtx)
|
|||
smeConfig->csrConfig.fFirstScanOnly2GChnl =
|
||||
pConfig->enableFirstScan2GOnly;
|
||||
|
||||
/* FIXME 11d config is hardcoded */
|
||||
if (CDF_SAP_MODE != hdd_get_conparam())
|
||||
smeConfig->csrConfig.Csr11dinfo.Channels.numChannels = 0;
|
||||
smeConfig->csrConfig.Csr11dinfo.Channels.numChannels = 0;
|
||||
|
||||
hdd_set_power_save_offload_config(pHddCtx);
|
||||
|
||||
|
|
|
|||
|
|
@ -680,7 +680,7 @@ static int __wlan_hdd_cfg80211_get_tdls_capabilities(struct wiphy *wiphy,
|
|||
struct sk_buff *skb;
|
||||
uint32_t set = 0;
|
||||
|
||||
if (CDF_FTM_MODE == hdd_get_conparam()) {
|
||||
if (CDF_GLOBAL_FTM_MODE == hdd_get_conparam()) {
|
||||
hdd_err("Command not allowed in FTM mode");
|
||||
return -EPERM;
|
||||
}
|
||||
|
|
@ -1115,7 +1115,7 @@ static int __is_driver_dfs_capable(struct wiphy *wiphy,
|
|||
if (ret_val)
|
||||
return ret_val;
|
||||
|
||||
if (CDF_FTM_MODE == hdd_get_conparam()) {
|
||||
if (CDF_GLOBAL_FTM_MODE == hdd_get_conparam()) {
|
||||
hdd_err("Command not allowed in FTM mode");
|
||||
return -EPERM;
|
||||
}
|
||||
|
|
@ -1422,7 +1422,7 @@ static int __wlan_hdd_cfg80211_do_acs(struct wiphy *wiphy,
|
|||
* [QCA_WLAN_VENDOR_ATTR_ACS_CH_LIST] = { .type = NLA_NESTED },
|
||||
*/
|
||||
|
||||
if (CDF_FTM_MODE == hdd_get_conparam()) {
|
||||
if (CDF_GLOBAL_FTM_MODE == hdd_get_conparam()) {
|
||||
hdd_err("Command not allowed in FTM mode");
|
||||
return -EPERM;
|
||||
}
|
||||
|
|
@ -1811,7 +1811,7 @@ __wlan_hdd_cfg80211_get_supported_features(struct wiphy *wiphy,
|
|||
|
||||
ENTER();
|
||||
|
||||
if (CDF_FTM_MODE == hdd_get_conparam()) {
|
||||
if (CDF_GLOBAL_FTM_MODE == hdd_get_conparam()) {
|
||||
hdd_err("Command not allowed in FTM mode");
|
||||
return -EPERM;
|
||||
}
|
||||
|
|
@ -1952,7 +1952,7 @@ __wlan_hdd_cfg80211_set_scanning_mac_oui(struct wiphy *wiphy,
|
|||
|
||||
ENTER();
|
||||
|
||||
if (CDF_FTM_MODE == hdd_get_conparam()) {
|
||||
if (CDF_GLOBAL_FTM_MODE == hdd_get_conparam()) {
|
||||
hdd_err("Command not allowed in FTM mode");
|
||||
return -EPERM;
|
||||
}
|
||||
|
|
@ -2077,7 +2077,7 @@ __wlan_hdd_cfg80211_get_features(struct wiphy *wiphy,
|
|||
if (ret_val)
|
||||
return ret_val;
|
||||
|
||||
if (CDF_FTM_MODE == hdd_get_conparam()) {
|
||||
if (CDF_GLOBAL_FTM_MODE == hdd_get_conparam()) {
|
||||
hdd_err("Command not allowed in FTM mode");
|
||||
return -EPERM;
|
||||
}
|
||||
|
|
@ -2196,7 +2196,7 @@ __wlan_hdd_cfg80211_set_ext_roam_params(struct wiphy *wiphy,
|
|||
uint32_t buf_len = 0;
|
||||
int ret;
|
||||
|
||||
if (CDF_FTM_MODE == hdd_get_conparam()) {
|
||||
if (CDF_GLOBAL_FTM_MODE == hdd_get_conparam()) {
|
||||
hdd_err("Command not allowed in FTM mode");
|
||||
return -EPERM;
|
||||
}
|
||||
|
|
@ -2726,7 +2726,7 @@ static int __wlan_hdd_cfg80211_keymgmt_set_key(struct wiphy *wiphy,
|
|||
hdd_context_t *hdd_ctx_ptr;
|
||||
int status;
|
||||
|
||||
if (CDF_FTM_MODE == hdd_get_conparam()) {
|
||||
if (CDF_GLOBAL_FTM_MODE == hdd_get_conparam()) {
|
||||
hdd_err("Command not allowed in FTM mode");
|
||||
return -EPERM;
|
||||
}
|
||||
|
|
@ -2815,7 +2815,7 @@ __wlan_hdd_cfg80211_get_wifi_info(struct wiphy *wiphy,
|
|||
int status;
|
||||
struct sk_buff *reply_skb = NULL;
|
||||
|
||||
if (CDF_FTM_MODE == hdd_get_conparam()) {
|
||||
if (CDF_GLOBAL_FTM_MODE == hdd_get_conparam()) {
|
||||
hdd_err("Command not allowed in FTM mode");
|
||||
return -EPERM;
|
||||
}
|
||||
|
|
@ -2912,7 +2912,7 @@ __wlan_hdd_cfg80211_get_logger_supp_feature(struct wiphy *wiphy,
|
|||
uint32_t features;
|
||||
struct sk_buff *reply_skb = NULL;
|
||||
|
||||
if (CDF_FTM_MODE == hdd_get_conparam()) {
|
||||
if (CDF_GLOBAL_FTM_MODE == hdd_get_conparam()) {
|
||||
hdd_err("Command not allowed in FTM mode");
|
||||
return -EPERM;
|
||||
}
|
||||
|
|
@ -3146,7 +3146,7 @@ __wlan_hdd_cfg80211_wifi_configuration_set(struct wiphy *wiphy,
|
|||
u32 guard_time;
|
||||
CDF_STATUS status;
|
||||
|
||||
if (CDF_FTM_MODE == hdd_get_conparam()) {
|
||||
if (CDF_GLOBAL_FTM_MODE == hdd_get_conparam()) {
|
||||
hdd_err("Command not allowed in FTM mode");
|
||||
return -EPERM;
|
||||
}
|
||||
|
|
@ -3265,7 +3265,7 @@ static int __wlan_hdd_cfg80211_wifi_logger_start(struct wiphy *wiphy,
|
|||
struct nlattr *tb[QCA_WLAN_VENDOR_ATTR_WIFI_LOGGER_START_MAX + 1];
|
||||
struct sir_wifi_start_log start_log;
|
||||
|
||||
if (CDF_FTM_MODE == hdd_get_conparam()) {
|
||||
if (CDF_GLOBAL_FTM_MODE == hdd_get_conparam()) {
|
||||
hdd_err("Command not allowed in FTM mode");
|
||||
return -EPERM;
|
||||
}
|
||||
|
|
@ -3389,7 +3389,7 @@ static int __wlan_hdd_cfg80211_wifi_logger_get_ring_data(struct wiphy *wiphy,
|
|||
struct nlattr *tb
|
||||
[QCA_WLAN_VENDOR_ATTR_WIFI_LOGGER_GET_RING_DATA_MAX + 1];
|
||||
|
||||
if (CDF_FTM_MODE == hdd_get_conparam()) {
|
||||
if (CDF_GLOBAL_FTM_MODE == hdd_get_conparam()) {
|
||||
hdd_err("Command not allowed in FTM mode");
|
||||
return -EPERM;
|
||||
}
|
||||
|
|
@ -3783,7 +3783,7 @@ __wlan_hdd_cfg80211_offloaded_packets(struct wiphy *wiphy,
|
|||
|
||||
ENTER();
|
||||
|
||||
if (CDF_FTM_MODE == hdd_get_conparam()) {
|
||||
if (CDF_GLOBAL_FTM_MODE == hdd_get_conparam()) {
|
||||
hdd_err("Command not allowed in FTM mode");
|
||||
return -EPERM;
|
||||
}
|
||||
|
|
@ -4336,7 +4336,7 @@ static int __wlan_hdd_cfg80211_get_link_properties(struct wiphy *wiphy,
|
|||
|
||||
ENTER();
|
||||
|
||||
if (CDF_FTM_MODE == hdd_get_conparam()) {
|
||||
if (CDF_GLOBAL_FTM_MODE == hdd_get_conparam()) {
|
||||
hdd_err("Command not allowed in FTM mode");
|
||||
return -EPERM;
|
||||
}
|
||||
|
|
@ -4519,7 +4519,7 @@ static int __wlan_hdd_cfg80211_set_ota_test(struct wiphy *wiphy,
|
|||
CDF_STATUS status;
|
||||
uint32_t current_roam_state;
|
||||
|
||||
if (CDF_FTM_MODE == hdd_get_conparam()) {
|
||||
if (CDF_GLOBAL_FTM_MODE == hdd_get_conparam()) {
|
||||
hdd_err("Command not allowed in FTM mode");
|
||||
return -EPERM;
|
||||
}
|
||||
|
|
@ -5208,7 +5208,7 @@ int wlan_hdd_cfg80211_init(struct device *dev,
|
|||
#endif /*FEATURE_WLAN_SCAN_PNO */
|
||||
|
||||
#if defined QCA_WIFI_FTM
|
||||
if (cds_get_conparam() != CDF_FTM_MODE) {
|
||||
if (cds_get_conparam() != CDF_GLOBAL_FTM_MODE) {
|
||||
#endif
|
||||
|
||||
/* even with WIPHY_FLAG_CUSTOM_REGULATORY,
|
||||
|
|
@ -5313,7 +5313,7 @@ int wlan_hdd_cfg80211_init(struct device *dev,
|
|||
wiphy->signal_type = CFG80211_SIGNAL_TYPE_MBM;
|
||||
wiphy->max_remain_on_channel_duration = MAX_REMAIN_ON_CHANNEL_DURATION;
|
||||
|
||||
if (cds_get_conparam() != CDF_FTM_MODE) {
|
||||
if (cds_get_conparam() != CDF_GLOBAL_FTM_MODE) {
|
||||
wiphy->n_vendor_commands =
|
||||
ARRAY_SIZE(hdd_wiphy_vendor_commands);
|
||||
wiphy->vendor_commands = hdd_wiphy_vendor_commands;
|
||||
|
|
@ -5698,7 +5698,7 @@ static int __wlan_hdd_cfg80211_change_bss(struct wiphy *wiphy,
|
|||
|
||||
ENTER();
|
||||
|
||||
if (CDF_FTM_MODE == hdd_get_conparam()) {
|
||||
if (CDF_GLOBAL_FTM_MODE == hdd_get_conparam()) {
|
||||
hddLog(LOGE, FL("Command not allowed in FTM mode"));
|
||||
return -EINVAL;
|
||||
}
|
||||
|
|
@ -5790,9 +5790,6 @@ static int wlan_hdd_change_iface_to_sta_mode(struct net_device *ndev,
|
|||
WLAN_HDD_INFRA_STATION : WLAN_HDD_P2P_CLIENT;
|
||||
}
|
||||
|
||||
/* set con_mode to STA only when no SAP concurrency mode */
|
||||
if (!(cds_get_concurrency_mode() & (CDF_SAP_MASK | CDF_P2P_GO_MASK)))
|
||||
hdd_set_conparam(0);
|
||||
memset(&pAdapter->sessionCtx, 0, sizeof(pAdapter->sessionCtx));
|
||||
hdd_set_station_ops(pAdapter->dev);
|
||||
status = hdd_init_station_mode(pAdapter);
|
||||
|
|
@ -5850,7 +5847,7 @@ static int __wlan_hdd_cfg80211_change_iface(struct wiphy *wiphy,
|
|||
|
||||
ENTER();
|
||||
|
||||
if (CDF_FTM_MODE == hdd_get_conparam()) {
|
||||
if (CDF_GLOBAL_FTM_MODE == hdd_get_conparam()) {
|
||||
hddLog(LOGE, FL("Command not allowed in FTM mode"));
|
||||
return -EINVAL;
|
||||
}
|
||||
|
|
@ -5969,7 +5966,6 @@ static int __wlan_hdd_cfg80211_change_iface(struct wiphy *wiphy,
|
|||
("Error initializing the ap mode"));
|
||||
return -EINVAL;
|
||||
}
|
||||
hdd_set_conparam(1);
|
||||
|
||||
hdd_register_tx_flow_control(pAdapter,
|
||||
hdd_softap_tx_resume_timer_expired_handler,
|
||||
|
|
@ -6140,7 +6136,7 @@ static int __wlan_hdd_change_station(struct wiphy *wiphy,
|
|||
|
||||
ENTER();
|
||||
|
||||
if (CDF_FTM_MODE == hdd_get_conparam()) {
|
||||
if (CDF_GLOBAL_FTM_MODE == hdd_get_conparam()) {
|
||||
hddLog(LOGE, FL("Command not allowed in FTM mode"));
|
||||
return -EINVAL;
|
||||
}
|
||||
|
|
@ -6423,7 +6419,7 @@ static int __wlan_hdd_cfg80211_add_key(struct wiphy *wiphy,
|
|||
|
||||
ENTER();
|
||||
|
||||
if (CDF_FTM_MODE == hdd_get_conparam()) {
|
||||
if (CDF_GLOBAL_FTM_MODE == hdd_get_conparam()) {
|
||||
hddLog(LOGE, FL("Command not allowed in FTM mode"));
|
||||
return -EINVAL;
|
||||
}
|
||||
|
|
@ -6757,7 +6753,7 @@ static int __wlan_hdd_cfg80211_get_key(struct wiphy *wiphy,
|
|||
|
||||
ENTER();
|
||||
|
||||
if (CDF_FTM_MODE == hdd_get_conparam()) {
|
||||
if (CDF_GLOBAL_FTM_MODE == hdd_get_conparam()) {
|
||||
hddLog(LOGE, FL("Command not allowed in FTM mode"));
|
||||
return -EINVAL;
|
||||
}
|
||||
|
|
@ -6909,7 +6905,7 @@ static int __wlan_hdd_cfg80211_set_default_key(struct wiphy *wiphy,
|
|||
|
||||
ENTER();
|
||||
|
||||
if (CDF_FTM_MODE == hdd_get_conparam()) {
|
||||
if (CDF_GLOBAL_FTM_MODE == hdd_get_conparam()) {
|
||||
hddLog(LOGE, FL("Command not allowed in FTM mode"));
|
||||
return -EINVAL;
|
||||
}
|
||||
|
|
@ -8630,7 +8626,7 @@ static int __wlan_hdd_cfg80211_connect(struct wiphy *wiphy,
|
|||
|
||||
ENTER();
|
||||
|
||||
if (CDF_FTM_MODE == hdd_get_conparam()) {
|
||||
if (CDF_GLOBAL_FTM_MODE == hdd_get_conparam()) {
|
||||
hddLog(LOGE, FL("Command not allowed in FTM mode"));
|
||||
return -EINVAL;
|
||||
}
|
||||
|
|
@ -8891,7 +8887,7 @@ static int __wlan_hdd_cfg80211_disconnect(struct wiphy *wiphy,
|
|||
|
||||
ENTER();
|
||||
|
||||
if (CDF_FTM_MODE == hdd_get_conparam()) {
|
||||
if (CDF_GLOBAL_FTM_MODE == hdd_get_conparam()) {
|
||||
hddLog(LOGE, FL("Command not allowed in FTM mode"));
|
||||
return -EINVAL;
|
||||
}
|
||||
|
|
@ -9126,7 +9122,7 @@ static int __wlan_hdd_cfg80211_join_ibss(struct wiphy *wiphy,
|
|||
|
||||
ENTER();
|
||||
|
||||
if (CDF_FTM_MODE == hdd_get_conparam()) {
|
||||
if (CDF_GLOBAL_FTM_MODE == hdd_get_conparam()) {
|
||||
hddLog(LOGE, FL("Command not allowed in FTM mode"));
|
||||
return -EINVAL;
|
||||
}
|
||||
|
|
@ -9337,7 +9333,7 @@ static int __wlan_hdd_cfg80211_leave_ibss(struct wiphy *wiphy,
|
|||
|
||||
ENTER();
|
||||
|
||||
if (CDF_FTM_MODE == hdd_get_conparam()) {
|
||||
if (CDF_GLOBAL_FTM_MODE == hdd_get_conparam()) {
|
||||
hddLog(LOGE, FL("Command not allowed in FTM mode"));
|
||||
return -EINVAL;
|
||||
}
|
||||
|
|
@ -9434,7 +9430,7 @@ static int __wlan_hdd_cfg80211_set_wiphy_params(struct wiphy *wiphy,
|
|||
|
||||
ENTER();
|
||||
|
||||
if (CDF_FTM_MODE == hdd_get_conparam()) {
|
||||
if (CDF_GLOBAL_FTM_MODE == hdd_get_conparam()) {
|
||||
hddLog(LOGE, FL("Command not allowed in FTM mode"));
|
||||
return -EINVAL;
|
||||
}
|
||||
|
|
@ -9650,7 +9646,7 @@ int __wlan_hdd_cfg80211_del_station(struct wiphy *wiphy,
|
|||
|
||||
ENTER();
|
||||
|
||||
if (CDF_FTM_MODE == hdd_get_conparam()) {
|
||||
if (CDF_GLOBAL_FTM_MODE == hdd_get_conparam()) {
|
||||
hddLog(LOGE, FL("Command not allowed in FTM mode"));
|
||||
return -EINVAL;
|
||||
}
|
||||
|
|
@ -9870,7 +9866,7 @@ static int __wlan_hdd_cfg80211_add_station(struct wiphy *wiphy,
|
|||
|
||||
ENTER();
|
||||
|
||||
if (CDF_FTM_MODE == hdd_get_conparam()) {
|
||||
if (CDF_GLOBAL_FTM_MODE == hdd_get_conparam()) {
|
||||
hddLog(LOGE, FL("Command not allowed in FTM mode"));
|
||||
return -EINVAL;
|
||||
}
|
||||
|
|
@ -9950,7 +9946,7 @@ static int __wlan_hdd_cfg80211_set_pmksa(struct wiphy *wiphy,
|
|||
|
||||
ENTER();
|
||||
|
||||
if (CDF_FTM_MODE == hdd_get_conparam()) {
|
||||
if (CDF_GLOBAL_FTM_MODE == hdd_get_conparam()) {
|
||||
hddLog(LOGE, FL("Command not allowed in FTM mode"));
|
||||
return -EINVAL;
|
||||
}
|
||||
|
|
@ -10031,7 +10027,7 @@ static int __wlan_hdd_cfg80211_del_pmksa(struct wiphy *wiphy,
|
|||
|
||||
ENTER();
|
||||
|
||||
if (CDF_FTM_MODE == hdd_get_conparam()) {
|
||||
if (CDF_GLOBAL_FTM_MODE == hdd_get_conparam()) {
|
||||
hddLog(LOGE, FL("Command not allowed in FTM mode"));
|
||||
return -EINVAL;
|
||||
}
|
||||
|
|
@ -10111,7 +10107,7 @@ static int __wlan_hdd_cfg80211_flush_pmksa(struct wiphy *wiphy,
|
|||
|
||||
ENTER();
|
||||
|
||||
if (CDF_FTM_MODE == hdd_get_conparam()) {
|
||||
if (CDF_GLOBAL_FTM_MODE == hdd_get_conparam()) {
|
||||
hddLog(LOGE, FL("Command not allowed in FTM mode"));
|
||||
return -EINVAL;
|
||||
}
|
||||
|
|
@ -10183,7 +10179,7 @@ __wlan_hdd_cfg80211_update_ft_ies(struct wiphy *wiphy,
|
|||
if (status)
|
||||
return status;
|
||||
|
||||
if (CDF_FTM_MODE == hdd_get_conparam()) {
|
||||
if (CDF_GLOBAL_FTM_MODE == hdd_get_conparam()) {
|
||||
hddLog(LOGE, FL("Command not allowed in FTM mode"));
|
||||
return -EINVAL;
|
||||
}
|
||||
|
|
@ -10316,7 +10312,7 @@ int __wlan_hdd_cfg80211_set_rekey_data(struct wiphy *wiphy,
|
|||
|
||||
ENTER();
|
||||
|
||||
if (CDF_FTM_MODE == hdd_get_conparam()) {
|
||||
if (CDF_GLOBAL_FTM_MODE == hdd_get_conparam()) {
|
||||
hddLog(LOGE, FL("Command not allowed in FTM mode"));
|
||||
return -EINVAL;
|
||||
}
|
||||
|
|
@ -10428,7 +10424,7 @@ static int __wlan_hdd_cfg80211_set_mac_acl(struct wiphy *wiphy,
|
|||
|
||||
ENTER();
|
||||
|
||||
if (CDF_FTM_MODE == hdd_get_conparam()) {
|
||||
if (CDF_GLOBAL_FTM_MODE == hdd_get_conparam()) {
|
||||
hddLog(LOGE, FL("Command not allowed in FTM mode"));
|
||||
return -EINVAL;
|
||||
}
|
||||
|
|
@ -10820,7 +10816,7 @@ __wlan_hdd_cfg80211_set_ap_channel_width(struct wiphy *wiphy,
|
|||
tSmeConfigParams sme_config;
|
||||
bool cbModeChange;
|
||||
|
||||
if (CDF_FTM_MODE == hdd_get_conparam()) {
|
||||
if (CDF_GLOBAL_FTM_MODE == hdd_get_conparam()) {
|
||||
hddLog(LOGE, FL("Command not allowed in FTM mode"));
|
||||
return -EINVAL;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -316,7 +316,7 @@ static void wlan_hdd_shutdown(void)
|
|||
/* this is for cases, where shutdown invoked from CNSS */
|
||||
cds_set_logp_in_progress(true);
|
||||
|
||||
if (cds_get_conparam() != CDF_FTM_MODE &&
|
||||
if (cds_get_conparam() != CDF_GLOBAL_FTM_MODE &&
|
||||
!WLAN_IS_EPPING_ENABLED(cds_get_conparam()))
|
||||
hif_pktlogmod_exit(hif_ctx);
|
||||
|
||||
|
|
|
|||
|
|
@ -1718,7 +1718,7 @@ static int __wlan_hdd_cfg80211_extscan_get_capabilities(struct wiphy *wiphy,
|
|||
|
||||
ENTER();
|
||||
|
||||
if (CDF_FTM_MODE == hdd_get_conparam()) {
|
||||
if (CDF_GLOBAL_FTM_MODE == hdd_get_conparam()) {
|
||||
hdd_err("Command not allowed in FTM mode");
|
||||
return -EPERM;
|
||||
}
|
||||
|
|
@ -1852,7 +1852,7 @@ static int __wlan_hdd_cfg80211_extscan_get_cached_results(struct wiphy *wiphy,
|
|||
|
||||
ENTER();
|
||||
|
||||
if (CDF_FTM_MODE == hdd_get_conparam()) {
|
||||
if (CDF_GLOBAL_FTM_MODE == hdd_get_conparam()) {
|
||||
hdd_err("Command not allowed in FTM mode");
|
||||
return -EPERM;
|
||||
}
|
||||
|
|
@ -2000,7 +2000,7 @@ __wlan_hdd_cfg80211_extscan_set_bssid_hotlist(struct wiphy *wiphy,
|
|||
|
||||
ENTER();
|
||||
|
||||
if (CDF_FTM_MODE == hdd_get_conparam()) {
|
||||
if (CDF_GLOBAL_FTM_MODE == hdd_get_conparam()) {
|
||||
hdd_err("Command not allowed in FTM mode");
|
||||
return -EPERM;
|
||||
}
|
||||
|
|
@ -2197,7 +2197,7 @@ __wlan_hdd_cfg80211_extscan_set_significant_change(struct wiphy *wiphy,
|
|||
|
||||
ENTER();
|
||||
|
||||
if (CDF_FTM_MODE == hdd_get_conparam()) {
|
||||
if (CDF_GLOBAL_FTM_MODE == hdd_get_conparam()) {
|
||||
hdd_err("Command not allowed in FTM mode");
|
||||
return -EPERM;
|
||||
}
|
||||
|
|
@ -2479,7 +2479,7 @@ __wlan_hdd_cfg80211_extscan_get_valid_channels(struct wiphy *wiphy,
|
|||
|
||||
ENTER();
|
||||
|
||||
if (CDF_FTM_MODE == hdd_get_conparam()) {
|
||||
if (CDF_GLOBAL_FTM_MODE == hdd_get_conparam()) {
|
||||
hdd_err("Command not allowed in FTM mode");
|
||||
return -EPERM;
|
||||
}
|
||||
|
|
@ -3144,7 +3144,7 @@ __wlan_hdd_cfg80211_extscan_start(struct wiphy *wiphy,
|
|||
|
||||
ENTER();
|
||||
|
||||
if (CDF_FTM_MODE == hdd_get_conparam()) {
|
||||
if (CDF_GLOBAL_FTM_MODE == hdd_get_conparam()) {
|
||||
hdd_err("Command not allowed in FTM mode");
|
||||
return -EPERM;
|
||||
}
|
||||
|
|
@ -3354,7 +3354,7 @@ __wlan_hdd_cfg80211_extscan_stop(struct wiphy *wiphy,
|
|||
|
||||
ENTER();
|
||||
|
||||
if (CDF_FTM_MODE == hdd_get_conparam()) {
|
||||
if (CDF_GLOBAL_FTM_MODE == hdd_get_conparam()) {
|
||||
hdd_err("Command not allowed in FTM mode");
|
||||
return -EPERM;
|
||||
}
|
||||
|
|
@ -3481,7 +3481,7 @@ __wlan_hdd_cfg80211_extscan_reset_bssid_hotlist(struct wiphy *wiphy,
|
|||
|
||||
ENTER();
|
||||
|
||||
if (CDF_FTM_MODE == hdd_get_conparam()) {
|
||||
if (CDF_GLOBAL_FTM_MODE == hdd_get_conparam()) {
|
||||
hdd_err("Command not allowed in FTM mode");
|
||||
return -EPERM;
|
||||
}
|
||||
|
|
@ -3606,7 +3606,7 @@ __wlan_hdd_cfg80211_extscan_reset_significant_change(struct wiphy
|
|||
|
||||
ENTER();
|
||||
|
||||
if (CDF_FTM_MODE == hdd_get_conparam()) {
|
||||
if (CDF_GLOBAL_FTM_MODE == hdd_get_conparam()) {
|
||||
hdd_err("Command not allowed in FTM mode");
|
||||
return -EPERM;
|
||||
}
|
||||
|
|
@ -3822,7 +3822,7 @@ static int __wlan_hdd_cfg80211_set_epno_list(struct wiphy *wiphy,
|
|||
if (ret_val)
|
||||
return ret_val;
|
||||
|
||||
if (CDF_FTM_MODE == hdd_get_conparam()) {
|
||||
if (CDF_GLOBAL_FTM_MODE == hdd_get_conparam()) {
|
||||
hdd_err("Command not allowed in FTM mode");
|
||||
return -EPERM;
|
||||
}
|
||||
|
|
@ -4028,7 +4028,7 @@ static int __wlan_hdd_cfg80211_set_passpoint_list(struct wiphy *wiphy,
|
|||
if (ret)
|
||||
return ret;
|
||||
|
||||
if (CDF_FTM_MODE == hdd_get_conparam()) {
|
||||
if (CDF_GLOBAL_FTM_MODE == hdd_get_conparam()) {
|
||||
hdd_err("Command not allowed in FTM mode");
|
||||
return -EPERM;
|
||||
}
|
||||
|
|
@ -4144,7 +4144,7 @@ static int __wlan_hdd_cfg80211_reset_passpoint_list(struct wiphy *wiphy,
|
|||
if (ret)
|
||||
return ret;
|
||||
|
||||
if (CDF_FTM_MODE == hdd_get_conparam()) {
|
||||
if (CDF_GLOBAL_FTM_MODE == hdd_get_conparam()) {
|
||||
hdd_err("Command not allowed in FTM mode");
|
||||
return -EPERM;
|
||||
}
|
||||
|
|
@ -4270,7 +4270,7 @@ __wlan_hdd_cfg80211_extscan_set_ssid_hotlist(struct wiphy *wiphy,
|
|||
|
||||
ENTER();
|
||||
|
||||
if (CDF_FTM_MODE == hdd_get_conparam()) {
|
||||
if (CDF_GLOBAL_FTM_MODE == hdd_get_conparam()) {
|
||||
hdd_err("Command not allowed in FTM mode");
|
||||
return -EPERM;
|
||||
}
|
||||
|
|
@ -4490,7 +4490,7 @@ __wlan_hdd_cfg80211_extscan_reset_ssid_hotlist(struct wiphy *wiphy,
|
|||
|
||||
ENTER();
|
||||
|
||||
if (CDF_FTM_MODE == hdd_get_conparam()) {
|
||||
if (CDF_GLOBAL_FTM_MODE == hdd_get_conparam()) {
|
||||
hdd_err("Command not allowed in FTM mode");
|
||||
return -EPERM;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7774,7 +7774,7 @@ static int __wlan_hdd_cfg80211_stop_ap(struct wiphy *wiphy,
|
|||
|
||||
ENTER();
|
||||
|
||||
if (CDF_FTM_MODE == hdd_get_conparam()) {
|
||||
if (CDF_GLOBAL_FTM_MODE == hdd_get_conparam()) {
|
||||
hddLog(LOGE, FL("Command not allowed in FTM mode"));
|
||||
return -EINVAL;
|
||||
}
|
||||
|
|
@ -8003,7 +8003,7 @@ static int __wlan_hdd_cfg80211_start_ap(struct wiphy *wiphy,
|
|||
|
||||
ENTER();
|
||||
|
||||
if (CDF_FTM_MODE == hdd_get_conparam()) {
|
||||
if (CDF_GLOBAL_FTM_MODE == hdd_get_conparam()) {
|
||||
hddLog(LOGE, FL("Command not allowed in FTM mode"));
|
||||
return -EINVAL;
|
||||
}
|
||||
|
|
@ -8161,7 +8161,7 @@ static int __wlan_hdd_cfg80211_change_beacon(struct wiphy *wiphy,
|
|||
|
||||
ENTER();
|
||||
|
||||
if (CDF_FTM_MODE == hdd_get_conparam()) {
|
||||
if (CDF_GLOBAL_FTM_MODE == hdd_get_conparam()) {
|
||||
hddLog(LOGE, FL("Command not allowed in FTM mode"));
|
||||
return -EINVAL;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6137,7 +6137,7 @@ static int hdd_driver_command(hdd_adapter_t *adapter,
|
|||
|
||||
ENTER();
|
||||
|
||||
if (CDF_FTM_MODE == hdd_get_conparam()) {
|
||||
if (CDF_GLOBAL_FTM_MODE == hdd_get_conparam()) {
|
||||
hddLog(LOGE, FL("Command not allowed in FTM mode"));
|
||||
return -EINVAL;
|
||||
}
|
||||
|
|
@ -6275,7 +6275,7 @@ static int __hdd_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
|
|||
goto exit;
|
||||
}
|
||||
#if defined(QCA_WIFI_FTM) && defined(LINUX_QCMBR)
|
||||
if (CDF_FTM_MODE == hdd_get_conparam()) {
|
||||
if (CDF_GLOBAL_FTM_MODE == hdd_get_conparam()) {
|
||||
if (SIOCIOCTLTX99 == cmd) {
|
||||
ret = wlan_hdd_qcmbr_unified_ioctl(adapter, ifr);
|
||||
goto exit;
|
||||
|
|
|
|||
|
|
@ -1619,7 +1619,7 @@ static void __hdd_set_multicast_list(struct net_device *dev)
|
|||
static const uint8_t ipv6_router_solicitation[]
|
||||
= {0x33, 0x33, 0x00, 0x00, 0x00, 0x02};
|
||||
|
||||
if (CDF_FTM_MODE == hdd_get_conparam())
|
||||
if (CDF_GLOBAL_FTM_MODE == hdd_get_conparam())
|
||||
return;
|
||||
|
||||
ENTER();
|
||||
|
|
@ -2117,12 +2117,6 @@ void hdd_deinit_adapter(hdd_context_t *hdd_ctx, hdd_adapter_t *adapter,
|
|||
|
||||
hdd_unregister_hostapd(adapter, rtnl_held);
|
||||
|
||||
/* set con_mode to STA only when no SAP concurrency mode */
|
||||
if (!
|
||||
(cds_get_concurrency_mode() &
|
||||
(CDF_SAP_MASK | CDF_P2P_GO_MASK)))
|
||||
hdd_set_conparam(0);
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
@ -2343,8 +2337,6 @@ hdd_adapter_t *hdd_open_adapter(hdd_context_t *hdd_ctx, uint8_t session_type,
|
|||
WLAN_NETIF_TX_DISABLE_N_CARRIER,
|
||||
WLAN_CONTROL_PATH);
|
||||
|
||||
hdd_set_conparam(1);
|
||||
|
||||
break;
|
||||
}
|
||||
case WLAN_HDD_FTM:
|
||||
|
|
@ -2431,7 +2423,7 @@ hdd_adapter_t *hdd_open_adapter(hdd_context_t *hdd_ctx, uint8_t session_type,
|
|||
cds_check_and_restart_sap_with_non_dfs_acs(hdd_ctx);
|
||||
}
|
||||
|
||||
if ((cds_get_conparam() != CDF_FTM_MODE)
|
||||
if ((cds_get_conparam() != CDF_GLOBAL_FTM_MODE)
|
||||
&& (!hdd_ctx->config->enable2x2)) {
|
||||
#define HDD_DTIM_1CHAIN_RX_ID 0x5
|
||||
#define HDD_SMPS_PARAM_VALUE_S 29
|
||||
|
|
@ -2477,7 +2469,7 @@ hdd_adapter_t *hdd_open_adapter(hdd_context_t *hdd_ctx, uint8_t session_type,
|
|||
#undef HDD_SMPS_PARAM_VALUE_S
|
||||
}
|
||||
|
||||
if (CDF_FTM_MODE != cds_get_conparam()) {
|
||||
if (CDF_GLOBAL_FTM_MODE != cds_get_conparam()) {
|
||||
ret = wma_cli_set_command(adapter->sessionId,
|
||||
WMI_PDEV_PARAM_HYST_EN,
|
||||
hdd_ctx->config->enableMemDeepSleep,
|
||||
|
|
@ -2494,7 +2486,7 @@ hdd_adapter_t *hdd_open_adapter(hdd_context_t *hdd_ctx, uint8_t session_type,
|
|||
#ifdef CONFIG_FW_LOGS_BASED_ON_INI
|
||||
|
||||
/* Enable FW logs based on INI configuration */
|
||||
if ((CDF_FTM_MODE != cds_get_conparam()) &&
|
||||
if ((CDF_GLOBAL_FTM_MODE != cds_get_conparam()) &&
|
||||
(hdd_ctx->config->enablefwlog)) {
|
||||
uint8_t count = 0;
|
||||
uint32_t value = 0;
|
||||
|
|
@ -3389,7 +3381,7 @@ void hdd_wlan_exit(hdd_context_t *hdd_ctx)
|
|||
|
||||
hdd_unregister_wext_all_adapters(hdd_ctx);
|
||||
|
||||
if (CDF_FTM_MODE == hdd_get_conparam()) {
|
||||
if (CDF_GLOBAL_FTM_MODE == hdd_get_conparam()) {
|
||||
hddLog(CDF_TRACE_LEVEL_INFO, FL("FTM MODE"));
|
||||
#if defined(QCA_WIFI_FTM)
|
||||
if (hdd_ftm_stop(hdd_ctx)) {
|
||||
|
|
@ -4877,7 +4869,7 @@ int hdd_wlan_startup(struct device *dev, void *hif_sc)
|
|||
|
||||
hdd_cfg_print(hdd_ctx);
|
||||
|
||||
if (CDF_FTM_MODE == hdd_get_conparam())
|
||||
if (CDF_GLOBAL_FTM_MODE == hdd_get_conparam())
|
||||
goto ftm_processing;
|
||||
|
||||
hdd_ctx->isLogpInProgress = false;
|
||||
|
|
@ -5028,7 +5020,7 @@ int hdd_wlan_startup(struct device *dev, void *hif_sc)
|
|||
#endif /* QCA_PKT_PROTO_TRACE */
|
||||
|
||||
ftm_processing:
|
||||
if (CDF_FTM_MODE == hdd_get_conparam()) {
|
||||
if (CDF_GLOBAL_FTM_MODE == hdd_get_conparam()) {
|
||||
if (CDF_STATUS_SUCCESS != wlan_hdd_ftm_open(hdd_ctx)) {
|
||||
hddLog(CDF_TRACE_LEVEL_FATAL,
|
||||
FL("wlan_hdd_ftm_open Failed"));
|
||||
|
|
@ -5250,13 +5242,11 @@ ftm_processing:
|
|||
if (cds_is_multicast_logging())
|
||||
wlan_logging_set_log_level();
|
||||
|
||||
if (CDF_SAP_MODE != hdd_get_conparam()) {
|
||||
/*
|
||||
* Action frame registered in one adapter which will
|
||||
* applicable to all interfaces
|
||||
*/
|
||||
wlan_hdd_cfg80211_register_frames(adapter);
|
||||
}
|
||||
/*
|
||||
* Action frame registered in one adapter which will
|
||||
* applicable to all interfaces
|
||||
*/
|
||||
wlan_hdd_cfg80211_register_frames(adapter);
|
||||
|
||||
mutex_init(&hdd_ctx->sap_lock);
|
||||
|
||||
|
|
@ -5485,7 +5475,7 @@ err_cds_close:
|
|||
|
||||
err_cds_open:
|
||||
|
||||
if (CDF_FTM_MODE == hdd_get_conparam()) {
|
||||
if (CDF_GLOBAL_FTM_MODE == hdd_get_conparam()) {
|
||||
#if defined(QCA_WIFI_FTM)
|
||||
err_free_ftm_open:
|
||||
wlan_hdd_ftm_close(hdd_ctx);
|
||||
|
|
@ -5876,7 +5866,7 @@ void wlan_hdd_send_status_pkg(hdd_adapter_t *adapter,
|
|||
int ret = 0;
|
||||
struct wlan_status_data data;
|
||||
|
||||
if (CDF_FTM_MODE == hdd_get_conparam())
|
||||
if (CDF_GLOBAL_FTM_MODE == hdd_get_conparam())
|
||||
return;
|
||||
|
||||
memset(&data, 0, sizeof(struct wlan_status_data));
|
||||
|
|
@ -5908,7 +5898,7 @@ void wlan_hdd_send_version_pkg(uint32_t fw_version,
|
|||
return;
|
||||
#endif
|
||||
|
||||
if (CDF_FTM_MODE == hdd_get_conparam())
|
||||
if (CDF_GLOBAL_FTM_MODE == hdd_get_conparam())
|
||||
return;
|
||||
|
||||
memset(&data, 0, sizeof(struct wlan_version_data));
|
||||
|
|
@ -6297,6 +6287,11 @@ void wlan_hdd_start_sap(hdd_adapter_t *ap_adapter)
|
|||
return;
|
||||
}
|
||||
|
||||
if (WLAN_HDD_SOFTAP != ap_adapter->device_mode) {
|
||||
hdd_err("SoftAp role has not been enabled");
|
||||
return;
|
||||
}
|
||||
|
||||
hdd_ctx = WLAN_HDD_GET_CTX(ap_adapter);
|
||||
hdd_ap_ctx = WLAN_HDD_GET_AP_CTX_PTR(ap_adapter);
|
||||
hostapd_state = WLAN_HDD_GET_HOSTAP_STATE_PTR(ap_adapter);
|
||||
|
|
@ -6611,11 +6606,11 @@ static int con_mode_handler(const char *kmessage, struct kernel_param *kp)
|
|||
*
|
||||
* This is the driver exit point (invoked when module is unloaded using rmmod)
|
||||
*
|
||||
* Return: tCDF_CON_MODE
|
||||
* Return: enum tCDF_GLOBAL_CON_MODE
|
||||
*/
|
||||
tCDF_CON_MODE hdd_get_conparam(void)
|
||||
enum tCDF_GLOBAL_CON_MODE hdd_get_conparam(void)
|
||||
{
|
||||
return (tCDF_CON_MODE) curr_con_mode;
|
||||
return (enum tCDF_GLOBAL_CON_MODE) curr_con_mode;
|
||||
}
|
||||
|
||||
void hdd_set_conparam(uint32_t con_param)
|
||||
|
|
|
|||
|
|
@ -548,7 +548,7 @@ int memdump_init(void)
|
|||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (CDF_FTM_MODE == hdd_get_conparam()) {
|
||||
if (CDF_GLOBAL_FTM_MODE == hdd_get_conparam()) {
|
||||
hddLog(LOGE, FL("Not initializing memdump in FTM mode"));
|
||||
return -EINVAL;
|
||||
}
|
||||
|
|
@ -602,7 +602,7 @@ void memdump_deinit(void)
|
|||
return;
|
||||
}
|
||||
|
||||
if (CDF_FTM_MODE == hdd_get_conparam()) {
|
||||
if (CDF_GLOBAL_FTM_MODE == hdd_get_conparam()) {
|
||||
hddLog(LOGE, FL("Not deinitializing memdump in FTM mode"));
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -65,7 +65,7 @@ static int __wlan_hdd_cfg80211_nan_request(struct wiphy *wiphy,
|
|||
if (ret_val)
|
||||
return ret_val;
|
||||
|
||||
if (CDF_FTM_MODE == hdd_get_conparam()) {
|
||||
if (CDF_GLOBAL_FTM_MODE == hdd_get_conparam()) {
|
||||
hdd_err("Command not allowed in FTM mode");
|
||||
return -EPERM;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -950,7 +950,7 @@ int __wlan_hdd_cfg80211_remain_on_channel(struct wiphy *wiphy,
|
|||
if (0 != ret)
|
||||
return ret;
|
||||
|
||||
if (CDF_FTM_MODE == hdd_get_conparam()) {
|
||||
if (CDF_GLOBAL_FTM_MODE == hdd_get_conparam()) {
|
||||
hddLog(LOGE, FL("Command not allowed in FTM mode"));
|
||||
return -EINVAL;
|
||||
}
|
||||
|
|
@ -1094,7 +1094,7 @@ int __wlan_hdd_cfg80211_cancel_remain_on_channel(struct wiphy *wiphy,
|
|||
|
||||
ENTER();
|
||||
|
||||
if (CDF_FTM_MODE == hdd_get_conparam()) {
|
||||
if (CDF_GLOBAL_FTM_MODE == hdd_get_conparam()) {
|
||||
hddLog(LOGE, FL("Command not allowed in FTM mode"));
|
||||
return -EINVAL;
|
||||
}
|
||||
|
|
@ -1255,7 +1255,7 @@ int __wlan_hdd_mgmt_tx(struct wiphy *wiphy, struct wireless_dev *wdev,
|
|||
|
||||
ENTER();
|
||||
|
||||
if (CDF_FTM_MODE == hdd_get_conparam()) {
|
||||
if (CDF_GLOBAL_FTM_MODE == hdd_get_conparam()) {
|
||||
hddLog(LOGE, FL("Command not allowed in FTM mode"));
|
||||
return -EINVAL;
|
||||
}
|
||||
|
|
@ -1952,7 +1952,7 @@ struct wireless_dev *__wlan_hdd_add_virtual_intf(struct wiphy *wiphy,
|
|||
|
||||
ENTER();
|
||||
|
||||
if (CDF_FTM_MODE == hdd_get_conparam()) {
|
||||
if (CDF_GLOBAL_FTM_MODE == hdd_get_conparam()) {
|
||||
hddLog(LOGE, FL("Command not allowed in FTM mode"));
|
||||
return ERR_PTR(-EINVAL);
|
||||
}
|
||||
|
|
@ -2048,7 +2048,7 @@ int __wlan_hdd_del_virtual_intf(struct wiphy *wiphy, struct wireless_dev *wdev)
|
|||
int status;
|
||||
ENTER();
|
||||
|
||||
if (CDF_FTM_MODE == hdd_get_conparam()) {
|
||||
if (CDF_GLOBAL_FTM_MODE == hdd_get_conparam()) {
|
||||
hddLog(LOGE, FL("Command not allowed in FTM mode"));
|
||||
return -EINVAL;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1742,7 +1742,7 @@ static int __wlan_hdd_cfg80211_resume_wlan(struct wiphy *wiphy)
|
|||
|
||||
ENTER();
|
||||
|
||||
if (CDF_FTM_MODE == hdd_get_conparam()) {
|
||||
if (CDF_GLOBAL_FTM_MODE == hdd_get_conparam()) {
|
||||
hddLog(LOGE, FL("Command not allowed in FTM mode"));
|
||||
return -EINVAL;
|
||||
}
|
||||
|
|
@ -1878,7 +1878,7 @@ static int __wlan_hdd_cfg80211_suspend_wlan(struct wiphy *wiphy,
|
|||
|
||||
ENTER();
|
||||
|
||||
if (CDF_FTM_MODE == hdd_get_conparam()) {
|
||||
if (CDF_GLOBAL_FTM_MODE == hdd_get_conparam()) {
|
||||
hddLog(LOGE, FL("Command not allowed in FTM mode"));
|
||||
return -EINVAL;
|
||||
}
|
||||
|
|
@ -2098,7 +2098,7 @@ static int __wlan_hdd_cfg80211_set_power_mgmt(struct wiphy *wiphy,
|
|||
|
||||
ENTER();
|
||||
|
||||
if (CDF_FTM_MODE == hdd_get_conparam()) {
|
||||
if (CDF_GLOBAL_FTM_MODE == hdd_get_conparam()) {
|
||||
hddLog(LOGE, FL("Command not allowed in FTM mode"));
|
||||
return -EINVAL;
|
||||
}
|
||||
|
|
@ -2191,7 +2191,7 @@ static int __wlan_hdd_cfg80211_set_txpower(struct wiphy *wiphy,
|
|||
|
||||
ENTER();
|
||||
|
||||
if (CDF_FTM_MODE == hdd_get_conparam()) {
|
||||
if (CDF_GLOBAL_FTM_MODE == hdd_get_conparam()) {
|
||||
hddLog(LOGE, FL("Command not allowed in FTM mode"));
|
||||
return -EINVAL;
|
||||
}
|
||||
|
|
@ -2283,7 +2283,7 @@ static int __wlan_hdd_cfg80211_get_txpower(struct wiphy *wiphy,
|
|||
|
||||
ENTER();
|
||||
|
||||
if (CDF_FTM_MODE == hdd_get_conparam()) {
|
||||
if (CDF_GLOBAL_FTM_MODE == hdd_get_conparam()) {
|
||||
hddLog(LOGE, FL("Command not allowed in FTM mode"));
|
||||
return -EINVAL;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1241,7 +1241,7 @@ static int __wlan_hdd_cfg80211_scan(struct wiphy *wiphy,
|
|||
|
||||
ENTER();
|
||||
|
||||
if (CDF_FTM_MODE == hdd_get_conparam()) {
|
||||
if (CDF_GLOBAL_FTM_MODE == hdd_get_conparam()) {
|
||||
hddLog(LOGE, FL("Command not allowed in FTM mode"));
|
||||
return -EINVAL;
|
||||
}
|
||||
|
|
@ -2027,7 +2027,7 @@ static int __wlan_hdd_cfg80211_sched_scan_start(struct wiphy *wiphy,
|
|||
|
||||
ENTER();
|
||||
|
||||
if (CDF_FTM_MODE == hdd_get_conparam()) {
|
||||
if (CDF_GLOBAL_FTM_MODE == hdd_get_conparam()) {
|
||||
hddLog(LOGE, FL("Command not allowed in FTM mode"));
|
||||
return -EINVAL;
|
||||
}
|
||||
|
|
@ -2302,7 +2302,7 @@ static int __wlan_hdd_cfg80211_sched_scan_stop(struct wiphy *wiphy,
|
|||
|
||||
ENTER();
|
||||
|
||||
if (CDF_FTM_MODE == hdd_get_conparam()) {
|
||||
if (CDF_GLOBAL_FTM_MODE == hdd_get_conparam()) {
|
||||
hddLog(LOGE, FL("Command not allowed in FTM mode"));
|
||||
return -EINVAL;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1144,7 +1144,7 @@ __wlan_hdd_cfg80211_ll_stats_set(struct wiphy *wiphy,
|
|||
|
||||
ENTER();
|
||||
|
||||
if (CDF_FTM_MODE == hdd_get_conparam()) {
|
||||
if (CDF_GLOBAL_FTM_MODE == hdd_get_conparam()) {
|
||||
hdd_err("Command not allowed in FTM mode");
|
||||
return -EPERM;
|
||||
}
|
||||
|
|
@ -1270,7 +1270,7 @@ __wlan_hdd_cfg80211_ll_stats_get(struct wiphy *wiphy,
|
|||
|
||||
ENTER();
|
||||
|
||||
if (CDF_FTM_MODE == hdd_get_conparam()) {
|
||||
if (CDF_GLOBAL_FTM_MODE == hdd_get_conparam()) {
|
||||
hdd_err("Command not allowed in FTM mode");
|
||||
return -EPERM;
|
||||
}
|
||||
|
|
@ -1401,7 +1401,7 @@ __wlan_hdd_cfg80211_ll_stats_clear(struct wiphy *wiphy,
|
|||
|
||||
ENTER();
|
||||
|
||||
if (CDF_FTM_MODE == hdd_get_conparam()) {
|
||||
if (CDF_GLOBAL_FTM_MODE == hdd_get_conparam()) {
|
||||
hdd_err("Command not allowed in FTM mode");
|
||||
return -EPERM;
|
||||
}
|
||||
|
|
@ -1546,7 +1546,7 @@ static int __wlan_hdd_cfg80211_stats_ext_request(struct wiphy *wiphy,
|
|||
if (ret_val)
|
||||
return ret_val;
|
||||
|
||||
if (CDF_FTM_MODE == hdd_get_conparam()) {
|
||||
if (CDF_GLOBAL_FTM_MODE == hdd_get_conparam()) {
|
||||
hdd_err("Command not allowed in FTM mode");
|
||||
return -EPERM;
|
||||
}
|
||||
|
|
@ -1723,7 +1723,7 @@ static int __wlan_hdd_cfg80211_get_station(struct wiphy *wiphy,
|
|||
|
||||
ENTER();
|
||||
|
||||
if (CDF_FTM_MODE == hdd_get_conparam()) {
|
||||
if (CDF_GLOBAL_FTM_MODE == hdd_get_conparam()) {
|
||||
hddLog(LOGE, FL("Command not allowed in FTM mode"));
|
||||
return -EINVAL;
|
||||
}
|
||||
|
|
@ -2230,7 +2230,7 @@ static int __wlan_hdd_cfg80211_dump_survey(struct wiphy *wiphy,
|
|||
|
||||
ENTER();
|
||||
|
||||
if (CDF_FTM_MODE == hdd_get_conparam()) {
|
||||
if (CDF_GLOBAL_FTM_MODE == hdd_get_conparam()) {
|
||||
hddLog(LOGE, FL("Command not allowed in FTM mode"));
|
||||
return -EINVAL;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3049,7 +3049,7 @@ __wlan_hdd_cfg80211_exttdls_get_status(struct wiphy *wiphy,
|
|||
|
||||
ENTER();
|
||||
|
||||
if (CDF_FTM_MODE == hdd_get_conparam()) {
|
||||
if (CDF_GLOBAL_FTM_MODE == hdd_get_conparam()) {
|
||||
hdd_err("Command not allowed in FTM mode");
|
||||
return -EPERM;
|
||||
}
|
||||
|
|
@ -3228,7 +3228,7 @@ __wlan_hdd_cfg80211_exttdls_enable(struct wiphy *wiphy,
|
|||
|
||||
ENTER();
|
||||
|
||||
if (CDF_FTM_MODE == hdd_get_conparam()) {
|
||||
if (CDF_GLOBAL_FTM_MODE == hdd_get_conparam()) {
|
||||
hdd_err("Command not allowed in FTM mode");
|
||||
return -EPERM;
|
||||
}
|
||||
|
|
@ -3347,7 +3347,7 @@ static int __wlan_hdd_cfg80211_exttdls_disable(struct wiphy *wiphy,
|
|||
struct nlattr *tb[QCA_WLAN_VENDOR_ATTR_TDLS_DISABLE_MAX + 1];
|
||||
CDF_STATUS status;
|
||||
|
||||
if (CDF_FTM_MODE == hdd_get_conparam()) {
|
||||
if (CDF_GLOBAL_FTM_MODE == hdd_get_conparam()) {
|
||||
hdd_err("Command not allowed in FTM mode");
|
||||
return -EPERM;
|
||||
}
|
||||
|
|
@ -3668,7 +3668,7 @@ static int __wlan_hdd_cfg80211_tdls_mgmt(struct wiphy *wiphy,
|
|||
#endif
|
||||
#endif
|
||||
|
||||
if (CDF_FTM_MODE == hdd_get_conparam()) {
|
||||
if (CDF_GLOBAL_FTM_MODE == hdd_get_conparam()) {
|
||||
hddLog(LOGE, FL("Command not allowed in FTM mode"));
|
||||
return -EINVAL;
|
||||
}
|
||||
|
|
@ -4148,7 +4148,7 @@ static int __wlan_hdd_cfg80211_tdls_oper(struct wiphy *wiphy,
|
|||
|
||||
ENTER();
|
||||
|
||||
if (CDF_FTM_MODE == hdd_get_conparam()) {
|
||||
if (CDF_GLOBAL_FTM_MODE == hdd_get_conparam()) {
|
||||
hddLog(LOGE, FL("Command not allowed in FTM mode"));
|
||||
return -EINVAL;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -305,7 +305,7 @@ int hdd_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
|
|||
#endif /* QCA_PKT_PROTO_TRACE */
|
||||
|
||||
#ifdef QCA_WIFI_FTM
|
||||
if (hdd_get_conparam() == CDF_FTM_MODE) {
|
||||
if (hdd_get_conparam() == CDF_GLOBAL_FTM_MODE) {
|
||||
kfree_skb(skb);
|
||||
return NETDEV_TX_OK;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1806,17 +1806,13 @@ static int hif_wlan_enable(void)
|
|||
cfg.num_shadow_reg_cfg = shadow_cfg_sz / sizeof(struct shadow_reg_cfg);
|
||||
cfg.shadow_reg_cfg = (struct icnss_shadow_reg_cfg *) target_shadow_reg_cfg;
|
||||
|
||||
switch (con_mode) {
|
||||
case CDF_FTM_MODE:
|
||||
if (CDF_GLOBAL_FTM_MODE == con_mode)
|
||||
mode = ICNSS_FTM;
|
||||
break;
|
||||
case CDF_EPPING_MODE:
|
||||
else if (WLAN_IS_EPPING_ENABLED(cds_get_conparam()))
|
||||
mode = ICNSS_EPPING;
|
||||
break;
|
||||
default:
|
||||
else
|
||||
mode = ICNSS_MISSION;
|
||||
break;
|
||||
}
|
||||
|
||||
return icnss_wlan_enable(&cfg, mode, QWLAN_VERSIONSTR);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -652,7 +652,7 @@ void hif_pktlogmod_exit(void *hif_ctx)
|
|||
{
|
||||
struct ol_softc *scn = hif_ctx;
|
||||
|
||||
if (scn && cds_get_conparam() != CDF_FTM_MODE &&
|
||||
if (scn && cds_get_conparam() != CDF_GLOBAL_FTM_MODE &&
|
||||
!WLAN_IS_EPPING_ENABLED(cds_get_conparam()) && scn->pkt_log_init) {
|
||||
pktlogmod_exit(scn);
|
||||
scn->pkt_log_init = false;
|
||||
|
|
@ -684,17 +684,12 @@ void hif_wlan_disable(void)
|
|||
enum icnss_driver_mode mode;
|
||||
uint32_t con_mode = cds_get_conparam();
|
||||
|
||||
switch (con_mode) {
|
||||
case CDF_FTM_MODE:
|
||||
if (CDF_GLOBAL_FTM_MODE == con_mode)
|
||||
mode = ICNSS_FTM;
|
||||
break;
|
||||
case CDF_EPPING_MODE:
|
||||
else if (WLAN_IS_EPPING_ENABLED(cds_get_conparam()))
|
||||
mode = ICNSS_EPPING;
|
||||
break;
|
||||
default:
|
||||
else
|
||||
mode = ICNSS_MISSION;
|
||||
break;
|
||||
}
|
||||
|
||||
icnss_wlan_disable(mode);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -97,7 +97,7 @@
|
|||
{ \
|
||||
ol_txrx_pdev_handle pdev_txrx_handle; \
|
||||
pdev_txrx_handle = cds_get_context(CDF_MODULE_ID_TXRX); \
|
||||
if (cds_get_conparam() != CDF_FTM_MODE && \
|
||||
if (cds_get_conparam() != CDF_GLOBAL_FTM_MODE && \
|
||||
!WLAN_IS_EPPING_ENABLED(cds_get_conparam())) { \
|
||||
ol_pl_sethandle(&pdev_txrx_handle->pl_dev, ol_sc); \
|
||||
if (pktlogmod_init(ol_sc)) \
|
||||
|
|
|
|||
|
|
@ -586,7 +586,7 @@ typedef struct sSirSmeStartBssReq {
|
|||
uint32_t dtimPeriod;
|
||||
uint8_t wps_state;
|
||||
uint8_t isCoalesingInIBSSAllowed; /* Coalesing on/off knob */
|
||||
tCDF_CON_MODE bssPersona;
|
||||
enum tCDF_ADAPTER_MODE bssPersona;
|
||||
|
||||
uint8_t txLdpcIniFeatureEnabled;
|
||||
|
||||
|
|
@ -914,7 +914,7 @@ typedef struct sSirSmeJoinReq {
|
|||
#ifdef FEATURE_WLAN_MCC_TO_SCC_SWITCH
|
||||
uint8_t cc_switch_mode;
|
||||
#endif
|
||||
tCDF_CON_MODE staPersona; /* Persona */
|
||||
enum tCDF_ADAPTER_MODE staPersona; /* Persona */
|
||||
ePhyChanBondState cbMode; /* Pass CB mode value in Join. */
|
||||
|
||||
/*This contains the UAPSD Flag for all 4 AC
|
||||
|
|
@ -3695,7 +3695,7 @@ typedef struct {
|
|||
typedef struct sSirRateUpdateInd {
|
||||
uint8_t nss; /* 0: 1x1, 1: 2x2 */
|
||||
struct cdf_mac_addr bssid;
|
||||
tCDF_CON_MODE dev_mode;
|
||||
enum tCDF_ADAPTER_MODE dev_mode;
|
||||
int32_t bcastDataRate; /* bcast rate unit Mbpsx10, -1:not used */
|
||||
/*
|
||||
* 0 implies RA, positive value implies fixed rate, -1 implies ignore
|
||||
|
|
|
|||
|
|
@ -276,7 +276,7 @@ typedef struct sPESession /* Added to Support BT-AMP */
|
|||
uint32_t lim11hEnable;
|
||||
|
||||
tPowerdBm maxTxPower; /* MIN (Regulatory and local power constraint) */
|
||||
tCDF_CON_MODE pePersona;
|
||||
enum tCDF_ADAPTER_MODE pePersona;
|
||||
#if defined WLAN_FEATURE_VOWIFI
|
||||
tPowerdBm txMgmtPower;
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -655,7 +655,7 @@ void lim_cleanup(tpAniSirGlobal pMac)
|
|||
|
||||
struct mgmt_frm_reg_info *pLimMgmtRegistration = NULL;
|
||||
|
||||
if (CDF_FTM_MODE != cds_get_conparam()) {
|
||||
if (CDF_GLOBAL_FTM_MODE != cds_get_conparam()) {
|
||||
cdf_mutex_acquire(&pMac->lim.lim_frame_register_lock);
|
||||
while (cdf_list_remove_front(
|
||||
&pMac->lim.gLimMgmtFrameRegistratinQueue,
|
||||
|
|
|
|||
|
|
@ -539,7 +539,7 @@ typedef struct sap_Config {
|
|||
uint32_t ap_table_max_size;
|
||||
uint32_t ap_table_expiration_time;
|
||||
uint32_t ht_op_mode_fixed;
|
||||
tCDF_CON_MODE persona; /* Tells us which persona its GO or AP for now */
|
||||
enum tCDF_ADAPTER_MODE persona; /* Tells us which persona, GO or AP */
|
||||
uint8_t disableDFSChSwitch;
|
||||
bool enOverLapCh;
|
||||
#ifdef WLAN_FEATURE_11W
|
||||
|
|
@ -671,7 +671,7 @@ typedef struct sSapDfsInfo {
|
|||
typedef struct tagSapCtxList {
|
||||
uint8_t sessionID;
|
||||
void *pSapContext;
|
||||
tCDF_CON_MODE sapPersona;
|
||||
enum tCDF_ADAPTER_MODE sapPersona;
|
||||
} tSapCtxList, tpSapCtxList;
|
||||
|
||||
typedef struct tagSapStruct {
|
||||
|
|
|
|||
|
|
@ -526,9 +526,7 @@ wlansap_set_scan_acs_channel_params(tsap_Config_t *pconfig,
|
|||
*/
|
||||
psap_ctx->csr_roamProfile.BSSIDs.numOfBSSIDs = 1;
|
||||
|
||||
/*
|
||||
* Save a copy to SAP context
|
||||
*/
|
||||
/* Save a copy to SAP context */
|
||||
cdf_mem_copy(psap_ctx->csr_roamProfile.BSSIDs.bssid,
|
||||
pconfig->self_macaddr.bytes, CDF_MAC_ADDR_SIZE);
|
||||
cdf_mem_copy(psap_ctx->self_mac_addr,
|
||||
|
|
@ -540,11 +538,11 @@ wlansap_set_scan_acs_channel_params(tsap_Config_t *pconfig,
|
|||
"%s: Invalid MAC context from pvosGCtx", __func__);
|
||||
} else {
|
||||
/*
|
||||
* If concurrent session is running that is already associated
|
||||
* then we just follow that sessions country info (whether
|
||||
* present or not doesn't maater as we have to follow whatever
|
||||
* STA session does)
|
||||
*/
|
||||
* If concurrent session is running that is already associated
|
||||
* then we just follow that sessions country info (whether
|
||||
* present or not doesn't maater as we have to follow whatever
|
||||
* STA session does)
|
||||
*/
|
||||
if ((0 == sme_get_concurrent_operation_channel(h_hal)) &&
|
||||
pconfig->ieee80211d) {
|
||||
/* Setting the region/country information */
|
||||
|
|
@ -660,106 +658,102 @@ CDF_STATUS wlansap_start_bss(void *pCtx, /* pwextCtx */
|
|||
Sanity check
|
||||
Extract SAP control block
|
||||
------------------------------------------------------------------------*/
|
||||
if (CDF_SAP_MODE == cds_get_conparam()) {
|
||||
pSapCtx = CDS_GET_SAP_CB(pCtx);
|
||||
pSapCtx = CDS_GET_SAP_CB(pCtx);
|
||||
|
||||
CDF_TRACE(CDF_MODULE_ID_SAP, CDF_TRACE_LEVEL_INFO_HIGH,
|
||||
"wlansap_start_bss: sapContext=%p", pSapCtx);
|
||||
|
||||
if (NULL == pSapCtx) {
|
||||
CDF_TRACE(CDF_MODULE_ID_SAP, CDF_TRACE_LEVEL_INFO_HIGH,
|
||||
"wlansap_start_bss: sapContext=%p", pSapCtx);
|
||||
|
||||
if (NULL == pSapCtx) {
|
||||
CDF_TRACE(CDF_MODULE_ID_SAP, CDF_TRACE_LEVEL_INFO_HIGH,
|
||||
"%s: Invalid SAP pointer from pCtx",
|
||||
__func__);
|
||||
return CDF_STATUS_E_FAULT;
|
||||
}
|
||||
pSapCtx->sapsMachine = eSAP_DISCONNECTED;
|
||||
|
||||
/* Channel selection is auto or configured */
|
||||
pSapCtx->channel = pConfig->channel;
|
||||
pSapCtx->ch_params.ch_width = pConfig->ch_params.ch_width;
|
||||
pSapCtx->ch_params.center_freq_seg0 =
|
||||
pConfig->ch_params.center_freq_seg0;
|
||||
pSapCtx->ch_params.center_freq_seg1 =
|
||||
pConfig->ch_params.center_freq_seg1;
|
||||
pSapCtx->ch_params.sec_ch_offset =
|
||||
pConfig->ch_params.sec_ch_offset;
|
||||
pSapCtx->ch_width_orig = pConfig->ch_width_orig;
|
||||
#ifdef FEATURE_WLAN_MCC_TO_SCC_SWITCH
|
||||
pSapCtx->cc_switch_mode = pConfig->cc_switch_mode;
|
||||
#endif
|
||||
pSapCtx->pUsrContext = pUsrContext;
|
||||
pSapCtx->enableOverLapCh = pConfig->enOverLapCh;
|
||||
pSapCtx->acs_cfg = &pConfig->acs_cfg;
|
||||
/* Set the BSSID to your "self MAC Addr" read the mac address from Configuation ITEM received from HDD */
|
||||
pSapCtx->csr_roamProfile.BSSIDs.numOfBSSIDs = 1;
|
||||
cdf_mem_copy(pSapCtx->csr_roamProfile.BSSIDs.bssid,
|
||||
pSapCtx->self_mac_addr, sizeof(struct cdf_mac_addr));
|
||||
|
||||
/* Save a copy to SAP context */
|
||||
cdf_mem_copy(pSapCtx->csr_roamProfile.BSSIDs.bssid,
|
||||
pConfig->self_macaddr.bytes, CDF_MAC_ADDR_SIZE);
|
||||
cdf_mem_copy(pSapCtx->self_mac_addr,
|
||||
pConfig->self_macaddr.bytes, CDF_MAC_ADDR_SIZE);
|
||||
|
||||
/* copy the configuration items to csrProfile */
|
||||
sapconvert_to_csr_profile(pConfig, eCSR_BSS_TYPE_INFRA_AP,
|
||||
&pSapCtx->csr_roamProfile);
|
||||
hHal = (tHalHandle) CDS_GET_HAL_CB(pSapCtx->p_cds_gctx);
|
||||
if (NULL == hHal) {
|
||||
CDF_TRACE(CDF_MODULE_ID_SAP, CDF_TRACE_LEVEL_INFO_HIGH,
|
||||
"%s: Invalid MAC context from p_cds_gctx",
|
||||
__func__);
|
||||
return CDF_STATUS_E_FAULT;
|
||||
} else {
|
||||
/* If concurrent session is running that is already associated */
|
||||
/* then we just follow that sessions country info (whether */
|
||||
/* present or not doesn't maater as we have to follow whatever */
|
||||
/* STA session does) */
|
||||
if ((0 == sme_get_concurrent_operation_channel(hHal)) &&
|
||||
pConfig->ieee80211d) {
|
||||
/* Setting the region/country information */
|
||||
sme_set_reg_info(hHal, pConfig->countryCode);
|
||||
sme_apply_channel_power_info_to_fw(hHal);
|
||||
}
|
||||
}
|
||||
|
||||
pmac = PMAC_STRUCT(hHal);
|
||||
if (NULL == pmac) {
|
||||
CDF_TRACE(CDF_MODULE_ID_SAP, CDF_TRACE_LEVEL_INFO_HIGH,
|
||||
"%s: Invalid MAC context from p_cds_gctx",
|
||||
__func__);
|
||||
return CDF_STATUS_E_FAULT;
|
||||
}
|
||||
/*
|
||||
* Copy the DFS Test Mode setting to pmac for
|
||||
* access in lower layers
|
||||
*/
|
||||
pmac->sap.SapDfsInfo.disable_dfs_ch_switch =
|
||||
pConfig->disableDFSChSwitch;
|
||||
|
||||
/* Copy MAC filtering settings to sap context */
|
||||
pSapCtx->eSapMacAddrAclMode = pConfig->SapMacaddr_acl;
|
||||
cdf_mem_copy(pSapCtx->acceptMacList, pConfig->accept_mac,
|
||||
sizeof(pConfig->accept_mac));
|
||||
pSapCtx->nAcceptMac = pConfig->num_accept_mac;
|
||||
sap_sort_mac_list(pSapCtx->acceptMacList, pSapCtx->nAcceptMac);
|
||||
cdf_mem_copy(pSapCtx->denyMacList, pConfig->deny_mac,
|
||||
sizeof(pConfig->deny_mac));
|
||||
pSapCtx->nDenyMac = pConfig->num_deny_mac;
|
||||
sap_sort_mac_list(pSapCtx->denyMacList, pSapCtx->nDenyMac);
|
||||
/* Fill in the event structure for FSM */
|
||||
sapEvent.event = eSAP_HDD_START_INFRA_BSS;
|
||||
sapEvent.params = 0; /* pSapPhysLinkCreate */
|
||||
|
||||
/* Store the HDD callback in SAP context */
|
||||
pSapCtx->pfnSapEventCallback = pSapEventCallback;
|
||||
|
||||
/* Handle event */
|
||||
cdf_status = sap_fsm(pSapCtx, &sapEvent);
|
||||
} else {
|
||||
CDF_TRACE(CDF_MODULE_ID_SAP, CDF_TRACE_LEVEL_ERROR,
|
||||
"SoftAp role has not been enabled");
|
||||
"%s: Invalid SAP pointer from pCtx",
|
||||
__func__);
|
||||
return CDF_STATUS_E_FAULT;
|
||||
}
|
||||
pSapCtx->sapsMachine = eSAP_DISCONNECTED;
|
||||
|
||||
/* Channel selection is auto or configured */
|
||||
pSapCtx->channel = pConfig->channel;
|
||||
pSapCtx->ch_params.ch_width = pConfig->ch_params.ch_width;
|
||||
pSapCtx->ch_params.center_freq_seg0 =
|
||||
pConfig->ch_params.center_freq_seg0;
|
||||
pSapCtx->ch_params.center_freq_seg1 =
|
||||
pConfig->ch_params.center_freq_seg1;
|
||||
pSapCtx->ch_params.sec_ch_offset =
|
||||
pConfig->ch_params.sec_ch_offset;
|
||||
pSapCtx->ch_width_orig = pConfig->ch_width_orig;
|
||||
#ifdef FEATURE_WLAN_MCC_TO_SCC_SWITCH
|
||||
pSapCtx->cc_switch_mode = pConfig->cc_switch_mode;
|
||||
#endif
|
||||
pSapCtx->pUsrContext = pUsrContext;
|
||||
pSapCtx->enableOverLapCh = pConfig->enOverLapCh;
|
||||
pSapCtx->acs_cfg = &pConfig->acs_cfg;
|
||||
/* Set the BSSID to your "self MAC Addr" read the mac address
|
||||
from Configuation ITEM received from HDD */
|
||||
pSapCtx->csr_roamProfile.BSSIDs.numOfBSSIDs = 1;
|
||||
cdf_mem_copy(pSapCtx->csr_roamProfile.BSSIDs.bssid,
|
||||
pSapCtx->self_mac_addr, sizeof(struct cdf_mac_addr));
|
||||
|
||||
/* Save a copy to SAP context */
|
||||
cdf_mem_copy(pSapCtx->csr_roamProfile.BSSIDs.bssid,
|
||||
pConfig->self_macaddr.bytes, CDF_MAC_ADDR_SIZE);
|
||||
cdf_mem_copy(pSapCtx->self_mac_addr,
|
||||
pConfig->self_macaddr.bytes, CDF_MAC_ADDR_SIZE);
|
||||
|
||||
/* copy the configuration items to csrProfile */
|
||||
sapconvert_to_csr_profile(pConfig, eCSR_BSS_TYPE_INFRA_AP,
|
||||
&pSapCtx->csr_roamProfile);
|
||||
hHal = (tHalHandle) CDS_GET_HAL_CB(pSapCtx->p_cds_gctx);
|
||||
if (NULL == hHal) {
|
||||
CDF_TRACE(CDF_MODULE_ID_SAP, CDF_TRACE_LEVEL_INFO_HIGH,
|
||||
"%s: Invalid MAC context from p_cds_gctx",
|
||||
__func__);
|
||||
return CDF_STATUS_E_FAULT;
|
||||
} else {
|
||||
/* If concurrent session is running that is already associated
|
||||
* then we just follow that sessions country info (whether
|
||||
* present or not doesn't maater as we have to follow whatever
|
||||
* STA session does) */
|
||||
if ((0 == sme_get_concurrent_operation_channel(hHal)) &&
|
||||
pConfig->ieee80211d) {
|
||||
/* Setting the region/country information */
|
||||
sme_set_reg_info(hHal, pConfig->countryCode);
|
||||
sme_apply_channel_power_info_to_fw(hHal);
|
||||
}
|
||||
}
|
||||
|
||||
pmac = PMAC_STRUCT(hHal);
|
||||
if (NULL == pmac) {
|
||||
CDF_TRACE(CDF_MODULE_ID_SAP, CDF_TRACE_LEVEL_INFO_HIGH,
|
||||
"%s: Invalid MAC context from p_cds_gctx",
|
||||
__func__);
|
||||
return CDF_STATUS_E_FAULT;
|
||||
}
|
||||
/*
|
||||
* Copy the DFS Test Mode setting to pmac for
|
||||
* access in lower layers
|
||||
*/
|
||||
pmac->sap.SapDfsInfo.disable_dfs_ch_switch =
|
||||
pConfig->disableDFSChSwitch;
|
||||
|
||||
/* Copy MAC filtering settings to sap context */
|
||||
pSapCtx->eSapMacAddrAclMode = pConfig->SapMacaddr_acl;
|
||||
cdf_mem_copy(pSapCtx->acceptMacList, pConfig->accept_mac,
|
||||
sizeof(pConfig->accept_mac));
|
||||
pSapCtx->nAcceptMac = pConfig->num_accept_mac;
|
||||
sap_sort_mac_list(pSapCtx->acceptMacList, pSapCtx->nAcceptMac);
|
||||
cdf_mem_copy(pSapCtx->denyMacList, pConfig->deny_mac,
|
||||
sizeof(pConfig->deny_mac));
|
||||
pSapCtx->nDenyMac = pConfig->num_deny_mac;
|
||||
sap_sort_mac_list(pSapCtx->denyMacList, pSapCtx->nDenyMac);
|
||||
/* Fill in the event structure for FSM */
|
||||
sapEvent.event = eSAP_HDD_START_INFRA_BSS;
|
||||
sapEvent.params = 0; /* pSapPhysLinkCreate */
|
||||
|
||||
/* Store the HDD callback in SAP context */
|
||||
pSapCtx->pfnSapEventCallback = pSapEventCallback;
|
||||
|
||||
/* Handle event */
|
||||
cdf_status = sap_fsm(pSapCtx, &sapEvent);
|
||||
|
||||
return cdf_status;
|
||||
} /* wlansap_start_bss */
|
||||
|
|
@ -787,36 +781,30 @@ CDF_STATUS wlansap_set_mac_acl(void *pCtx, /* pwextCtx */
|
|||
CDF_TRACE(CDF_MODULE_ID_SAP, CDF_TRACE_LEVEL_INFO_HIGH,
|
||||
"wlansap_set_mac_acl");
|
||||
|
||||
if (CDF_SAP_MODE == cds_get_conparam()) {
|
||||
pSapCtx = CDS_GET_SAP_CB(pCtx);
|
||||
if (NULL == pSapCtx) {
|
||||
CDF_TRACE(CDF_MODULE_ID_SAP, CDF_TRACE_LEVEL_INFO_HIGH,
|
||||
"%s: Invalid SAP pointer from pCtx",
|
||||
__func__);
|
||||
return CDF_STATUS_E_FAULT;
|
||||
}
|
||||
/* Copy MAC filtering settings to sap context */
|
||||
pSapCtx->eSapMacAddrAclMode = pConfig->SapMacaddr_acl;
|
||||
|
||||
if (eSAP_DENY_UNLESS_ACCEPTED == pSapCtx->eSapMacAddrAclMode) {
|
||||
cdf_mem_copy(pSapCtx->acceptMacList,
|
||||
pConfig->accept_mac,
|
||||
sizeof(pConfig->accept_mac));
|
||||
pSapCtx->nAcceptMac = pConfig->num_accept_mac;
|
||||
sap_sort_mac_list(pSapCtx->acceptMacList,
|
||||
pSapCtx->nAcceptMac);
|
||||
} else if (eSAP_ACCEPT_UNLESS_DENIED ==
|
||||
pSapCtx->eSapMacAddrAclMode) {
|
||||
cdf_mem_copy(pSapCtx->denyMacList, pConfig->deny_mac,
|
||||
sizeof(pConfig->deny_mac));
|
||||
pSapCtx->nDenyMac = pConfig->num_deny_mac;
|
||||
sap_sort_mac_list(pSapCtx->denyMacList, pSapCtx->nDenyMac);
|
||||
}
|
||||
} else {
|
||||
CDF_TRACE(CDF_MODULE_ID_SAP, CDF_TRACE_LEVEL_ERROR,
|
||||
"%s : SoftAp role has not been enabled", __func__);
|
||||
pSapCtx = CDS_GET_SAP_CB(pCtx);
|
||||
if (NULL == pSapCtx) {
|
||||
CDF_TRACE(CDF_MODULE_ID_SAP, CDF_TRACE_LEVEL_INFO_HIGH,
|
||||
"%s: Invalid SAP pointer from pCtx",
|
||||
__func__);
|
||||
return CDF_STATUS_E_FAULT;
|
||||
}
|
||||
/* Copy MAC filtering settings to sap context */
|
||||
pSapCtx->eSapMacAddrAclMode = pConfig->SapMacaddr_acl;
|
||||
|
||||
if (eSAP_DENY_UNLESS_ACCEPTED == pSapCtx->eSapMacAddrAclMode) {
|
||||
cdf_mem_copy(pSapCtx->acceptMacList,
|
||||
pConfig->accept_mac,
|
||||
sizeof(pConfig->accept_mac));
|
||||
pSapCtx->nAcceptMac = pConfig->num_accept_mac;
|
||||
sap_sort_mac_list(pSapCtx->acceptMacList,
|
||||
pSapCtx->nAcceptMac);
|
||||
} else if (eSAP_ACCEPT_UNLESS_DENIED ==
|
||||
pSapCtx->eSapMacAddrAclMode) {
|
||||
cdf_mem_copy(pSapCtx->denyMacList, pConfig->deny_mac,
|
||||
sizeof(pConfig->deny_mac));
|
||||
pSapCtx->nDenyMac = pConfig->num_deny_mac;
|
||||
sap_sort_mac_list(pSapCtx->denyMacList, pSapCtx->nDenyMac);
|
||||
}
|
||||
|
||||
return cdf_status;
|
||||
} /* wlansap_set_mac_acl */
|
||||
|
|
@ -1727,31 +1715,27 @@ CDF_STATUS wlansap_set_key_sta(void *pCtx, tCsrRoamSetKey *pSetKeyInfo)
|
|||
CDF_STATUS cdf_ret_status = CDF_STATUS_E_FAILURE;
|
||||
uint32_t roamId = 0xFF;
|
||||
|
||||
if (CDF_SAP_MODE == cds_get_conparam()) {
|
||||
pSapCtx = CDS_GET_SAP_CB(pCtx);
|
||||
if (NULL == pSapCtx) {
|
||||
CDF_TRACE(CDF_MODULE_ID_SAP, CDF_TRACE_LEVEL_ERROR,
|
||||
"%s: Invalid SAP pointer from pCtx",
|
||||
__func__);
|
||||
return CDF_STATUS_E_FAULT;
|
||||
}
|
||||
hHal = CDS_GET_HAL_CB(pSapCtx->p_cds_gctx);
|
||||
if (NULL == hHal) {
|
||||
CDF_TRACE(CDF_MODULE_ID_SAP, CDF_TRACE_LEVEL_ERROR,
|
||||
"%s: Invalid HAL pointer from p_cds_gctx",
|
||||
__func__);
|
||||
return CDF_STATUS_E_FAULT;
|
||||
}
|
||||
cdf_ret_status =
|
||||
sme_roam_set_key(hHal, pSapCtx->sessionId, pSetKeyInfo,
|
||||
&roamId);
|
||||
pSapCtx = CDS_GET_SAP_CB(pCtx);
|
||||
if (NULL == pSapCtx) {
|
||||
CDF_TRACE(CDF_MODULE_ID_SAP, CDF_TRACE_LEVEL_ERROR,
|
||||
"%s: Invalid SAP pointer from pCtx",
|
||||
__func__);
|
||||
return CDF_STATUS_E_FAULT;
|
||||
}
|
||||
hHal = CDS_GET_HAL_CB(pSapCtx->p_cds_gctx);
|
||||
if (NULL == hHal) {
|
||||
CDF_TRACE(CDF_MODULE_ID_SAP, CDF_TRACE_LEVEL_ERROR,
|
||||
"%s: Invalid HAL pointer from p_cds_gctx",
|
||||
__func__);
|
||||
return CDF_STATUS_E_FAULT;
|
||||
}
|
||||
cdf_ret_status =
|
||||
sme_roam_set_key(hHal, pSapCtx->sessionId, pSetKeyInfo,
|
||||
&roamId);
|
||||
|
||||
if (cdf_ret_status == CDF_STATUS_SUCCESS) {
|
||||
cdf_status = CDF_STATUS_SUCCESS;
|
||||
} else {
|
||||
cdf_status = CDF_STATUS_E_FAULT;
|
||||
}
|
||||
} else
|
||||
if (cdf_ret_status == CDF_STATUS_SUCCESS)
|
||||
cdf_status = CDF_STATUS_SUCCESS;
|
||||
else
|
||||
cdf_status = CDF_STATUS_E_FAULT;
|
||||
|
||||
return cdf_status;
|
||||
|
|
@ -1775,15 +1759,6 @@ wlan_sap_getstation_ie_information
|
|||
CDF_STATUS cdf_status = CDF_STATUS_E_FAILURE;
|
||||
ptSapContext sap_ctx = NULL;
|
||||
uint32_t ie_len = 0;
|
||||
tCDF_CON_MODE mode;
|
||||
|
||||
mode = cds_get_conparam();
|
||||
if (CDF_SAP_MODE != mode) {
|
||||
CDF_TRACE(CDF_MODULE_ID_SAP, CDF_TRACE_LEVEL_ERROR,
|
||||
"%d: called in wrong mode ",
|
||||
mode);
|
||||
return CDF_STATUS_E_FAULT;
|
||||
}
|
||||
|
||||
sap_ctx = CDS_GET_SAP_CB(ctx);
|
||||
if (NULL == sap_ctx) {
|
||||
|
|
@ -1831,44 +1806,41 @@ CDF_STATUS wlansap_set_wps_ie(void *pCtx, tSap_WPSIE *pSap_WPSIe)
|
|||
CDF_TRACE(CDF_MODULE_ID_SAP, CDF_TRACE_LEVEL_INFO,
|
||||
"%s, %d", __func__, __LINE__);
|
||||
|
||||
if (CDF_SAP_MODE == cds_get_conparam()) {
|
||||
pSapCtx = CDS_GET_SAP_CB(pCtx);
|
||||
if (NULL == pSapCtx) {
|
||||
CDF_TRACE(CDF_MODULE_ID_SAP, CDF_TRACE_LEVEL_ERROR,
|
||||
"%s: Invalid SAP pointer from pCtx",
|
||||
__func__);
|
||||
return CDF_STATUS_E_FAULT;
|
||||
}
|
||||
pSapCtx = CDS_GET_SAP_CB(pCtx);
|
||||
if (NULL == pSapCtx) {
|
||||
CDF_TRACE(CDF_MODULE_ID_SAP, CDF_TRACE_LEVEL_ERROR,
|
||||
"%s: Invalid SAP pointer from pCtx",
|
||||
__func__);
|
||||
return CDF_STATUS_E_FAULT;
|
||||
}
|
||||
|
||||
hHal = CDS_GET_HAL_CB(pSapCtx->p_cds_gctx);
|
||||
if (NULL == hHal) {
|
||||
CDF_TRACE(CDF_MODULE_ID_SAP, CDF_TRACE_LEVEL_ERROR,
|
||||
"%s: Invalid HAL pointer from p_cds_gctx",
|
||||
__func__);
|
||||
return CDF_STATUS_E_FAULT;
|
||||
}
|
||||
hHal = CDS_GET_HAL_CB(pSapCtx->p_cds_gctx);
|
||||
if (NULL == hHal) {
|
||||
CDF_TRACE(CDF_MODULE_ID_SAP, CDF_TRACE_LEVEL_ERROR,
|
||||
"%s: Invalid HAL pointer from p_cds_gctx",
|
||||
__func__);
|
||||
return CDF_STATUS_E_FAULT;
|
||||
}
|
||||
|
||||
if (sap_acquire_global_lock(pSapCtx) == CDF_STATUS_SUCCESS) {
|
||||
if (pSap_WPSIe->sapWPSIECode == eSAP_WPS_BEACON_IE) {
|
||||
cdf_mem_copy(&pSapCtx->APWPSIEs.SirWPSBeaconIE,
|
||||
&pSap_WPSIe->sapwpsie.
|
||||
sapWPSBeaconIE,
|
||||
sizeof(tSap_WPSBeaconIE));
|
||||
} else if (pSap_WPSIe->sapWPSIECode ==
|
||||
eSAP_WPS_PROBE_RSP_IE) {
|
||||
cdf_mem_copy(&pSapCtx->APWPSIEs.
|
||||
SirWPSProbeRspIE,
|
||||
&pSap_WPSIe->sapwpsie.
|
||||
sapWPSProbeRspIE,
|
||||
sizeof(tSap_WPSProbeRspIE));
|
||||
} else {
|
||||
sap_release_global_lock(pSapCtx);
|
||||
return CDF_STATUS_E_FAULT;
|
||||
}
|
||||
if (sap_acquire_global_lock(pSapCtx) == CDF_STATUS_SUCCESS) {
|
||||
if (pSap_WPSIe->sapWPSIECode == eSAP_WPS_BEACON_IE) {
|
||||
cdf_mem_copy(&pSapCtx->APWPSIEs.SirWPSBeaconIE,
|
||||
&pSap_WPSIe->sapwpsie.
|
||||
sapWPSBeaconIE,
|
||||
sizeof(tSap_WPSBeaconIE));
|
||||
} else if (pSap_WPSIe->sapWPSIECode ==
|
||||
eSAP_WPS_PROBE_RSP_IE) {
|
||||
cdf_mem_copy(&pSapCtx->APWPSIEs.
|
||||
SirWPSProbeRspIE,
|
||||
&pSap_WPSIe->sapwpsie.
|
||||
sapWPSProbeRspIE,
|
||||
sizeof(tSap_WPSProbeRspIE));
|
||||
} else {
|
||||
sap_release_global_lock(pSapCtx);
|
||||
return CDF_STATUS_SUCCESS;
|
||||
} else
|
||||
return CDF_STATUS_E_FAULT;
|
||||
}
|
||||
sap_release_global_lock(pSapCtx);
|
||||
return CDF_STATUS_SUCCESS;
|
||||
} else
|
||||
return CDF_STATUS_E_FAULT;
|
||||
}
|
||||
|
|
@ -1894,35 +1866,31 @@ CDF_STATUS wlansap_update_wps_ie(void *pCtx)
|
|||
CDF_TRACE(CDF_MODULE_ID_SAP, CDF_TRACE_LEVEL_ERROR,
|
||||
"%s, %d", __func__, __LINE__);
|
||||
|
||||
if (CDF_SAP_MODE == cds_get_conparam()) {
|
||||
pSapCtx = CDS_GET_SAP_CB(pCtx);
|
||||
if (NULL == pSapCtx) {
|
||||
CDF_TRACE(CDF_MODULE_ID_SAP, CDF_TRACE_LEVEL_ERROR,
|
||||
"%s: Invalid SAP pointer from pCtx",
|
||||
__func__);
|
||||
return CDF_STATUS_E_FAULT;
|
||||
}
|
||||
|
||||
hHal = CDS_GET_HAL_CB(pSapCtx->p_cds_gctx);
|
||||
if (NULL == hHal) {
|
||||
CDF_TRACE(CDF_MODULE_ID_SAP, CDF_TRACE_LEVEL_ERROR,
|
||||
"%s: Invalid HAL pointer from p_cds_gctx",
|
||||
__func__);
|
||||
return CDF_STATUS_E_FAULT;
|
||||
}
|
||||
|
||||
cdf_ret_status =
|
||||
sme_roam_update_apwpsie(hHal, pSapCtx->sessionId,
|
||||
&pSapCtx->APWPSIEs);
|
||||
|
||||
if (cdf_ret_status == CDF_STATUS_SUCCESS) {
|
||||
cdf_status = CDF_STATUS_SUCCESS;
|
||||
} else {
|
||||
cdf_status = CDF_STATUS_E_FAULT;
|
||||
}
|
||||
|
||||
pSapCtx = CDS_GET_SAP_CB(pCtx);
|
||||
if (NULL == pSapCtx) {
|
||||
CDF_TRACE(CDF_MODULE_ID_SAP, CDF_TRACE_LEVEL_ERROR,
|
||||
"%s: Invalid SAP pointer from pCtx",
|
||||
__func__);
|
||||
return CDF_STATUS_E_FAULT;
|
||||
}
|
||||
|
||||
hHal = CDS_GET_HAL_CB(pSapCtx->p_cds_gctx);
|
||||
if (NULL == hHal) {
|
||||
CDF_TRACE(CDF_MODULE_ID_SAP, CDF_TRACE_LEVEL_ERROR,
|
||||
"%s: Invalid HAL pointer from p_cds_gctx",
|
||||
__func__);
|
||||
return CDF_STATUS_E_FAULT;
|
||||
}
|
||||
|
||||
cdf_ret_status =
|
||||
sme_roam_update_apwpsie(hHal, pSapCtx->sessionId,
|
||||
&pSapCtx->APWPSIEs);
|
||||
|
||||
if (cdf_ret_status == CDF_STATUS_SUCCESS)
|
||||
cdf_status = CDF_STATUS_SUCCESS;
|
||||
else
|
||||
cdf_status = CDF_STATUS_E_FAULT;
|
||||
|
||||
return cdf_status;
|
||||
}
|
||||
|
||||
|
|
@ -1947,37 +1915,33 @@ CDF_STATUS wlansap_get_wps_state(void *pCtx, bool *bWPSState)
|
|||
CDF_TRACE(CDF_MODULE_ID_SAP, CDF_TRACE_LEVEL_INFO,
|
||||
"%s, %d", __func__, __LINE__);
|
||||
|
||||
if (CDF_SAP_MODE == cds_get_conparam()) {
|
||||
pSapCtx = CDS_GET_SAP_CB(pCtx);
|
||||
if (NULL == pSapCtx) {
|
||||
CDF_TRACE(CDF_MODULE_ID_SAP, CDF_TRACE_LEVEL_ERROR,
|
||||
"%s: Invalid SAP pointer from pCtx",
|
||||
__func__);
|
||||
return CDF_STATUS_E_FAULT;
|
||||
}
|
||||
|
||||
pSapCtx = CDS_GET_SAP_CB(pCtx);
|
||||
if (NULL == pSapCtx) {
|
||||
CDF_TRACE(CDF_MODULE_ID_SAP, CDF_TRACE_LEVEL_ERROR,
|
||||
"%s: Invalid SAP pointer from pCtx",
|
||||
__func__);
|
||||
return CDF_STATUS_E_FAULT;
|
||||
}
|
||||
hHal = CDS_GET_HAL_CB(pSapCtx->p_cds_gctx);
|
||||
if (NULL == hHal) {
|
||||
CDF_TRACE(CDF_MODULE_ID_SAP, CDF_TRACE_LEVEL_ERROR,
|
||||
"%s: Invalid HAL pointer from p_cds_gctx",
|
||||
__func__);
|
||||
return CDF_STATUS_E_FAULT;
|
||||
}
|
||||
|
||||
hHal = CDS_GET_HAL_CB(pSapCtx->p_cds_gctx);
|
||||
if (NULL == hHal) {
|
||||
CDF_TRACE(CDF_MODULE_ID_SAP, CDF_TRACE_LEVEL_ERROR,
|
||||
"%s: Invalid HAL pointer from p_cds_gctx",
|
||||
__func__);
|
||||
return CDF_STATUS_E_FAULT;
|
||||
}
|
||||
if (sap_acquire_global_lock(pSapCtx) == CDF_STATUS_SUCCESS) {
|
||||
if (pSapCtx->APWPSIEs.SirWPSProbeRspIE.
|
||||
FieldPresent &
|
||||
SIR_WPS_PROBRSP_SELECTEDREGISTRA_PRESENT)
|
||||
*bWPSState = true;
|
||||
else
|
||||
*bWPSState = false;
|
||||
|
||||
if (sap_acquire_global_lock(pSapCtx) == CDF_STATUS_SUCCESS) {
|
||||
if (pSapCtx->APWPSIEs.SirWPSProbeRspIE.
|
||||
FieldPresent &
|
||||
SIR_WPS_PROBRSP_SELECTEDREGISTRA_PRESENT)
|
||||
*bWPSState = true;
|
||||
else
|
||||
*bWPSState = false;
|
||||
sap_release_global_lock(pSapCtx);
|
||||
|
||||
sap_release_global_lock(pSapCtx);
|
||||
|
||||
return CDF_STATUS_SUCCESS;
|
||||
} else
|
||||
return CDF_STATUS_E_FAULT;
|
||||
return CDF_STATUS_SUCCESS;
|
||||
} else
|
||||
return CDF_STATUS_E_FAULT;
|
||||
|
||||
|
|
@ -2025,38 +1989,35 @@ CDF_STATUS wlansap_set_wparsn_ies
|
|||
CDF_STATUS cdf_ret_status = CDF_STATUS_E_FAILURE;
|
||||
void *hHal = NULL;
|
||||
|
||||
if (CDF_SAP_MODE == cds_get_conparam()) {
|
||||
pSapCtx = CDS_GET_SAP_CB(pCtx);
|
||||
if (NULL == pSapCtx) {
|
||||
CDF_TRACE(CDF_MODULE_ID_SAP, CDF_TRACE_LEVEL_ERROR,
|
||||
"%s: Invalid SAP pointer from pCtx",
|
||||
__func__);
|
||||
return CDF_STATUS_E_FAULT;
|
||||
}
|
||||
|
||||
hHal = CDS_GET_HAL_CB(pSapCtx->p_cds_gctx);
|
||||
if (NULL == hHal) {
|
||||
CDF_TRACE(CDF_MODULE_ID_SAP, CDF_TRACE_LEVEL_ERROR,
|
||||
"%s: Invalid HAL pointer from p_cds_gctx",
|
||||
__func__);
|
||||
return CDF_STATUS_E_FAULT;
|
||||
}
|
||||
|
||||
pSapCtx->APWPARSNIEs.length = (uint16_t) WPARSNIEsLen;
|
||||
cdf_mem_copy(pSapCtx->APWPARSNIEs.rsnIEdata, pWPARSNIEs,
|
||||
WPARSNIEsLen);
|
||||
|
||||
cdf_ret_status =
|
||||
sme_roam_update_apwparsni_es(hHal, pSapCtx->sessionId,
|
||||
&pSapCtx->APWPARSNIEs);
|
||||
|
||||
if (cdf_ret_status == CDF_STATUS_SUCCESS) {
|
||||
return CDF_STATUS_SUCCESS;
|
||||
} else {
|
||||
return CDF_STATUS_E_FAULT;
|
||||
}
|
||||
pSapCtx = CDS_GET_SAP_CB(pCtx);
|
||||
if (NULL == pSapCtx) {
|
||||
CDF_TRACE(CDF_MODULE_ID_SAP, CDF_TRACE_LEVEL_ERROR,
|
||||
"%s: Invalid SAP pointer from pCtx",
|
||||
__func__);
|
||||
return CDF_STATUS_E_FAULT;
|
||||
}
|
||||
|
||||
hHal = CDS_GET_HAL_CB(pSapCtx->p_cds_gctx);
|
||||
if (NULL == hHal) {
|
||||
CDF_TRACE(CDF_MODULE_ID_SAP, CDF_TRACE_LEVEL_ERROR,
|
||||
"%s: Invalid HAL pointer from p_cds_gctx",
|
||||
__func__);
|
||||
return CDF_STATUS_E_FAULT;
|
||||
}
|
||||
|
||||
pSapCtx->APWPARSNIEs.length = (uint16_t) WPARSNIEsLen;
|
||||
cdf_mem_copy(pSapCtx->APWPARSNIEs.rsnIEdata, pWPARSNIEs,
|
||||
WPARSNIEsLen);
|
||||
|
||||
cdf_ret_status =
|
||||
sme_roam_update_apwparsni_es(hHal, pSapCtx->sessionId,
|
||||
&pSapCtx->APWPARSNIEs);
|
||||
|
||||
if (cdf_ret_status == CDF_STATUS_SUCCESS)
|
||||
return CDF_STATUS_SUCCESS;
|
||||
else
|
||||
return CDF_STATUS_E_FAULT;
|
||||
|
||||
return CDF_STATUS_E_FAULT;
|
||||
}
|
||||
|
||||
|
|
@ -2080,29 +2041,27 @@ CDF_STATUS wlansap_send_action(void *pCtx, const uint8_t *pBuf,
|
|||
void *hHal = NULL;
|
||||
CDF_STATUS cdf_ret_status = CDF_STATUS_E_FAILURE;
|
||||
|
||||
if (CDF_SAP_MODE == cds_get_conparam()) {
|
||||
pSapCtx = CDS_GET_SAP_CB(pCtx);
|
||||
if (NULL == pSapCtx) {
|
||||
CDF_TRACE(CDF_MODULE_ID_SAP, CDF_TRACE_LEVEL_ERROR,
|
||||
"%s: Invalid SAP pointer from pCtx",
|
||||
__func__);
|
||||
return CDF_STATUS_E_FAULT;
|
||||
}
|
||||
hHal = CDS_GET_HAL_CB(pSapCtx->p_cds_gctx);
|
||||
if ((NULL == hHal) || (eSAP_TRUE != pSapCtx->isSapSessionOpen)) {
|
||||
CDF_TRACE(CDF_MODULE_ID_SAP, CDF_TRACE_LEVEL_ERROR,
|
||||
"%s: HAL pointer (%p) NULL OR SME session is not open (%d)",
|
||||
__func__, hHal, pSapCtx->isSapSessionOpen);
|
||||
return CDF_STATUS_E_FAULT;
|
||||
}
|
||||
pSapCtx = CDS_GET_SAP_CB(pCtx);
|
||||
if (NULL == pSapCtx) {
|
||||
CDF_TRACE(CDF_MODULE_ID_SAP, CDF_TRACE_LEVEL_ERROR,
|
||||
"%s: Invalid SAP pointer from pCtx",
|
||||
__func__);
|
||||
return CDF_STATUS_E_FAULT;
|
||||
}
|
||||
hHal = CDS_GET_HAL_CB(pSapCtx->p_cds_gctx);
|
||||
if ((NULL == hHal) || (eSAP_TRUE != pSapCtx->isSapSessionOpen)) {
|
||||
CDF_TRACE(CDF_MODULE_ID_SAP, CDF_TRACE_LEVEL_ERROR,
|
||||
"%s: HAL pointer (%p) NULL OR SME session is not open (%d)",
|
||||
__func__, hHal, pSapCtx->isSapSessionOpen);
|
||||
return CDF_STATUS_E_FAULT;
|
||||
}
|
||||
|
||||
cdf_ret_status =
|
||||
sme_send_action(hHal, pSapCtx->sessionId, pBuf, len, 0,
|
||||
0, channel_freq);
|
||||
cdf_ret_status =
|
||||
sme_send_action(hHal, pSapCtx->sessionId, pBuf, len, 0,
|
||||
0, channel_freq);
|
||||
|
||||
if (CDF_STATUS_SUCCESS == cdf_ret_status) {
|
||||
return CDF_STATUS_SUCCESS;
|
||||
}
|
||||
if (CDF_STATUS_SUCCESS == cdf_ret_status) {
|
||||
return CDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
CDF_TRACE(CDF_MODULE_ID_SAP, CDF_TRACE_LEVEL_ERROR,
|
||||
|
|
@ -2136,29 +2095,27 @@ CDF_STATUS wlansap_remain_on_channel(void *pCtx,
|
|||
void *hHal = NULL;
|
||||
CDF_STATUS cdf_ret_status = CDF_STATUS_E_FAILURE;
|
||||
|
||||
if (CDF_SAP_MODE == cds_get_conparam()) {
|
||||
pSapCtx = CDS_GET_SAP_CB(pCtx);
|
||||
if (NULL == pSapCtx) {
|
||||
CDF_TRACE(CDF_MODULE_ID_SAP, CDF_TRACE_LEVEL_ERROR,
|
||||
"%s: Invalid SAP pointer from pCtx",
|
||||
__func__);
|
||||
return CDF_STATUS_E_FAULT;
|
||||
}
|
||||
hHal = CDS_GET_HAL_CB(pSapCtx->p_cds_gctx);
|
||||
if ((NULL == hHal) || (eSAP_TRUE != pSapCtx->isSapSessionOpen)) {
|
||||
CDF_TRACE(CDF_MODULE_ID_SAP, CDF_TRACE_LEVEL_ERROR,
|
||||
"%s: HAL pointer (%p) NULL OR SME session is not open (%d)",
|
||||
__func__, hHal, pSapCtx->isSapSessionOpen);
|
||||
return CDF_STATUS_E_FAULT;
|
||||
}
|
||||
pSapCtx = CDS_GET_SAP_CB(pCtx);
|
||||
if (NULL == pSapCtx) {
|
||||
CDF_TRACE(CDF_MODULE_ID_SAP, CDF_TRACE_LEVEL_ERROR,
|
||||
"%s: Invalid SAP pointer from pCtx",
|
||||
__func__);
|
||||
return CDF_STATUS_E_FAULT;
|
||||
}
|
||||
hHal = CDS_GET_HAL_CB(pSapCtx->p_cds_gctx);
|
||||
if ((NULL == hHal) || (eSAP_TRUE != pSapCtx->isSapSessionOpen)) {
|
||||
CDF_TRACE(CDF_MODULE_ID_SAP, CDF_TRACE_LEVEL_ERROR,
|
||||
"%s: HAL pointer (%p) NULL OR SME session is not open (%d)",
|
||||
__func__, hHal, pSapCtx->isSapSessionOpen);
|
||||
return CDF_STATUS_E_FAULT;
|
||||
}
|
||||
|
||||
cdf_ret_status = sme_remain_on_channel(hHal, pSapCtx->sessionId,
|
||||
channel, duration, callback, pContext,
|
||||
true, scan_id);
|
||||
cdf_ret_status = sme_remain_on_channel(hHal, pSapCtx->sessionId,
|
||||
channel, duration, callback, pContext,
|
||||
true, scan_id);
|
||||
|
||||
if (CDF_STATUS_SUCCESS == cdf_ret_status) {
|
||||
return CDF_STATUS_SUCCESS;
|
||||
}
|
||||
if (CDF_STATUS_SUCCESS == cdf_ret_status) {
|
||||
return CDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
CDF_TRACE(CDF_MODULE_ID_SAP, CDF_TRACE_LEVEL_ERROR,
|
||||
|
|
@ -2185,30 +2142,28 @@ CDF_STATUS wlansap_cancel_remain_on_channel(void *pCtx,
|
|||
void *hHal = NULL;
|
||||
CDF_STATUS cdf_ret_status = CDF_STATUS_E_FAILURE;
|
||||
|
||||
if (CDF_SAP_MODE == cds_get_conparam()) {
|
||||
pSapCtx = CDS_GET_SAP_CB(pCtx);
|
||||
if (NULL == pSapCtx) {
|
||||
CDF_TRACE(CDF_MODULE_ID_SAP, CDF_TRACE_LEVEL_ERROR,
|
||||
"%s: Invalid SAP pointer from pCtx",
|
||||
__func__);
|
||||
return CDF_STATUS_E_FAULT;
|
||||
}
|
||||
hHal = CDS_GET_HAL_CB(pSapCtx->p_cds_gctx);
|
||||
if ((NULL == hHal) ||
|
||||
(eSAP_TRUE != pSapCtx->isSapSessionOpen)) {
|
||||
CDF_TRACE(CDF_MODULE_ID_SAP, CDF_TRACE_LEVEL_ERROR,
|
||||
"%s: HAL pointer (%p) NULL OR SME session is not open (%d)",
|
||||
__func__, hHal, pSapCtx->isSapSessionOpen);
|
||||
return CDF_STATUS_E_FAULT;
|
||||
}
|
||||
pSapCtx = CDS_GET_SAP_CB(pCtx);
|
||||
if (NULL == pSapCtx) {
|
||||
CDF_TRACE(CDF_MODULE_ID_SAP, CDF_TRACE_LEVEL_ERROR,
|
||||
"%s: Invalid SAP pointer from pCtx",
|
||||
__func__);
|
||||
return CDF_STATUS_E_FAULT;
|
||||
}
|
||||
hHal = CDS_GET_HAL_CB(pSapCtx->p_cds_gctx);
|
||||
if ((NULL == hHal) ||
|
||||
(eSAP_TRUE != pSapCtx->isSapSessionOpen)) {
|
||||
CDF_TRACE(CDF_MODULE_ID_SAP, CDF_TRACE_LEVEL_ERROR,
|
||||
"%s: HAL pointer (%p) NULL OR SME session is not open (%d)",
|
||||
__func__, hHal, pSapCtx->isSapSessionOpen);
|
||||
return CDF_STATUS_E_FAULT;
|
||||
}
|
||||
|
||||
cdf_ret_status =
|
||||
sme_cancel_remain_on_channel(hHal, pSapCtx->sessionId,
|
||||
scan_id);
|
||||
cdf_ret_status =
|
||||
sme_cancel_remain_on_channel(hHal, pSapCtx->sessionId,
|
||||
scan_id);
|
||||
|
||||
if (CDF_STATUS_SUCCESS == cdf_ret_status) {
|
||||
return CDF_STATUS_SUCCESS;
|
||||
}
|
||||
if (CDF_STATUS_SUCCESS == cdf_ret_status) {
|
||||
return CDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
CDF_TRACE(CDF_MODULE_ID_SAP, CDF_TRACE_LEVEL_ERROR,
|
||||
|
|
@ -2238,29 +2193,27 @@ CDF_STATUS wlansap_register_mgmt_frame
|
|||
void *hHal = NULL;
|
||||
CDF_STATUS cdf_ret_status = CDF_STATUS_E_FAILURE;
|
||||
|
||||
if (CDF_SAP_MODE == cds_get_conparam()) {
|
||||
pSapCtx = CDS_GET_SAP_CB(pCtx);
|
||||
if (NULL == pSapCtx) {
|
||||
CDF_TRACE(CDF_MODULE_ID_SAP, CDF_TRACE_LEVEL_ERROR,
|
||||
"%s: Invalid SAP pointer from pCtx",
|
||||
__func__);
|
||||
return CDF_STATUS_E_FAULT;
|
||||
}
|
||||
hHal = CDS_GET_HAL_CB(pSapCtx->p_cds_gctx);
|
||||
if ((NULL == hHal) || (eSAP_TRUE != pSapCtx->isSapSessionOpen)) {
|
||||
CDF_TRACE(CDF_MODULE_ID_SAP, CDF_TRACE_LEVEL_ERROR,
|
||||
"%s: HAL pointer (%p) NULL OR SME session is not open (%d)",
|
||||
__func__, hHal, pSapCtx->isSapSessionOpen);
|
||||
return CDF_STATUS_E_FAULT;
|
||||
}
|
||||
pSapCtx = CDS_GET_SAP_CB(pCtx);
|
||||
if (NULL == pSapCtx) {
|
||||
CDF_TRACE(CDF_MODULE_ID_SAP, CDF_TRACE_LEVEL_ERROR,
|
||||
"%s: Invalid SAP pointer from pCtx",
|
||||
__func__);
|
||||
return CDF_STATUS_E_FAULT;
|
||||
}
|
||||
hHal = CDS_GET_HAL_CB(pSapCtx->p_cds_gctx);
|
||||
if ((NULL == hHal) || (eSAP_TRUE != pSapCtx->isSapSessionOpen)) {
|
||||
CDF_TRACE(CDF_MODULE_ID_SAP, CDF_TRACE_LEVEL_ERROR,
|
||||
"%s: HAL pointer (%p) NULL OR SME session is not open (%d)",
|
||||
__func__, hHal, pSapCtx->isSapSessionOpen);
|
||||
return CDF_STATUS_E_FAULT;
|
||||
}
|
||||
|
||||
cdf_ret_status = sme_register_mgmt_frame(hHal, pSapCtx->sessionId,
|
||||
frameType, matchData,
|
||||
matchLen);
|
||||
cdf_ret_status = sme_register_mgmt_frame(hHal, pSapCtx->sessionId,
|
||||
frameType, matchData,
|
||||
matchLen);
|
||||
|
||||
if (CDF_STATUS_SUCCESS == cdf_ret_status) {
|
||||
return CDF_STATUS_SUCCESS;
|
||||
}
|
||||
if (CDF_STATUS_SUCCESS == cdf_ret_status) {
|
||||
return CDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
CDF_TRACE(CDF_MODULE_ID_SAP, CDF_TRACE_LEVEL_ERROR,
|
||||
|
|
@ -2290,29 +2243,27 @@ CDF_STATUS wlansap_de_register_mgmt_frame
|
|||
void *hHal = NULL;
|
||||
CDF_STATUS cdf_ret_status = CDF_STATUS_E_FAILURE;
|
||||
|
||||
if (CDF_SAP_MODE == cds_get_conparam()) {
|
||||
pSapCtx = CDS_GET_SAP_CB(pCtx);
|
||||
if (NULL == pSapCtx) {
|
||||
CDF_TRACE(CDF_MODULE_ID_SAP, CDF_TRACE_LEVEL_ERROR,
|
||||
"%s: Invalid SAP pointer from pCtx",
|
||||
__func__);
|
||||
return CDF_STATUS_E_FAULT;
|
||||
}
|
||||
hHal = CDS_GET_HAL_CB(pSapCtx->p_cds_gctx);
|
||||
if ((NULL == hHal) || (eSAP_TRUE != pSapCtx->isSapSessionOpen)) {
|
||||
CDF_TRACE(CDF_MODULE_ID_SAP, CDF_TRACE_LEVEL_ERROR,
|
||||
"%s: HAL pointer (%p) NULL OR SME session is not open (%d)",
|
||||
__func__, hHal, pSapCtx->isSapSessionOpen);
|
||||
return CDF_STATUS_E_FAULT;
|
||||
}
|
||||
pSapCtx = CDS_GET_SAP_CB(pCtx);
|
||||
if (NULL == pSapCtx) {
|
||||
CDF_TRACE(CDF_MODULE_ID_SAP, CDF_TRACE_LEVEL_ERROR,
|
||||
"%s: Invalid SAP pointer from pCtx",
|
||||
__func__);
|
||||
return CDF_STATUS_E_FAULT;
|
||||
}
|
||||
hHal = CDS_GET_HAL_CB(pSapCtx->p_cds_gctx);
|
||||
if ((NULL == hHal) || (eSAP_TRUE != pSapCtx->isSapSessionOpen)) {
|
||||
CDF_TRACE(CDF_MODULE_ID_SAP, CDF_TRACE_LEVEL_ERROR,
|
||||
"%s: HAL pointer (%p) NULL OR SME session is not open (%d)",
|
||||
__func__, hHal, pSapCtx->isSapSessionOpen);
|
||||
return CDF_STATUS_E_FAULT;
|
||||
}
|
||||
|
||||
cdf_ret_status =
|
||||
sme_deregister_mgmt_frame(hHal, pSapCtx->sessionId, frameType,
|
||||
matchData, matchLen);
|
||||
cdf_ret_status =
|
||||
sme_deregister_mgmt_frame(hHal, pSapCtx->sessionId, frameType,
|
||||
matchData, matchLen);
|
||||
|
||||
if (CDF_STATUS_SUCCESS == cdf_ret_status) {
|
||||
return CDF_STATUS_SUCCESS;
|
||||
}
|
||||
if (CDF_STATUS_SUCCESS == cdf_ret_status) {
|
||||
return CDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
CDF_TRACE(CDF_MODULE_ID_SAP, CDF_TRACE_LEVEL_ERROR,
|
||||
|
|
|
|||
|
|
@ -408,7 +408,7 @@ typedef struct tagCsrScanResultFilter {
|
|||
*/
|
||||
uint8_t scan_filter_for_roam;
|
||||
struct sCsrChannel_ pcl_channels;
|
||||
tCDF_CON_MODE csrPersona;
|
||||
enum tCDF_ADAPTER_MODE csrPersona;
|
||||
} tCsrScanResultFilter;
|
||||
|
||||
typedef struct sCsrChnPower_ {
|
||||
|
|
@ -951,7 +951,7 @@ typedef struct tagCsrRoamProfile {
|
|||
#ifdef WLAN_FEATURE_VOWIFI_11R
|
||||
tCsrMobilityDomainInfo MDID;
|
||||
#endif
|
||||
tCDF_CON_MODE csrPersona;
|
||||
enum tCDF_ADAPTER_MODE csrPersona;
|
||||
uint8_t disableDFSChSwitch;
|
||||
/* addIe params */
|
||||
tSirAddIeParams addIeParams;
|
||||
|
|
|
|||
|
|
@ -346,7 +346,7 @@ typedef struct tagCsrRoamStartBssParams {
|
|||
uint8_t ApUapsdEnable;
|
||||
uint8_t ssidHidden;
|
||||
uint8_t wps_state;
|
||||
tCDF_CON_MODE bssPersona;
|
||||
enum tCDF_ADAPTER_MODE bssPersona;
|
||||
uint16_t nRSNIELength; /* If 0, pRSNIE is ignored. */
|
||||
uint8_t *pRSNIE; /* If not null, it has IE byte stream for RSN */
|
||||
/* Flag used to indicate update beaconInterval */
|
||||
|
|
@ -429,7 +429,7 @@ typedef struct tagWmStatusChangeCmd {
|
|||
typedef struct tagAddStaForSessionCmd {
|
||||
/* Session self mac addr */
|
||||
tSirMacAddr selfMacAddr;
|
||||
tCDF_CON_MODE currDeviceMode;
|
||||
enum tCDF_ADAPTER_MODE currDeviceMode;
|
||||
uint32_t type;
|
||||
uint32_t subType;
|
||||
uint8_t sessionId;
|
||||
|
|
@ -1405,4 +1405,6 @@ CDF_STATUS csr_scan_process_single_bssdescr(tpAniSirGlobal pMac,
|
|||
|
||||
bool csr_wait_for_connection_update(tpAniSirGlobal mac,
|
||||
bool do_release_reacquire_lock);
|
||||
enum tCDF_ADAPTER_MODE csr_get_session_persona(tpAniSirGlobal pmac,
|
||||
uint32_t session_id);
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -356,11 +356,11 @@ CDF_STATUS csr_reassoc(tpAniSirGlobal pMac, uint32_t sessionId,
|
|||
uint32_t *pRoamId, bool fForce);
|
||||
|
||||
CDF_STATUS csr_isconcurrentsession_valid(tpAniSirGlobal pMac,
|
||||
uint32_t cursessionId, tCDF_CON_MODE currBssPersona);
|
||||
uint32_t cursessionId, enum tCDF_ADAPTER_MODE currBssPersona);
|
||||
/* BeaconInterval validation for MCC support */
|
||||
CDF_STATUS csr_validate_mcc_beacon_interval(tpAniSirGlobal pMac, uint8_t channelId,
|
||||
uint16_t *beaconInterval, uint32_t cursessionId,
|
||||
tCDF_CON_MODE currBssPersona);
|
||||
enum tCDF_ADAPTER_MODE currBssPersona);
|
||||
#ifdef WLAN_FEATURE_VOWIFI_11R
|
||||
bool csr_is_profile11r(tCsrRoamProfile *pProfile);
|
||||
bool csr_is_auth_type11r(eCsrAuthType AuthType, uint8_t mdiePresent);
|
||||
|
|
|
|||
|
|
@ -233,7 +233,8 @@ CDF_STATUS sme_open_session(tHalHandle hHal, csr_roam_completeCallback callback,
|
|||
void *pContext, uint8_t *pSelfMacAddr,
|
||||
uint8_t *pbSessionId, uint32_t type,
|
||||
uint32_t subType);
|
||||
void sme_set_curr_device_mode(tHalHandle hHal, tCDF_CON_MODE currDeviceMode);
|
||||
void sme_set_curr_device_mode(tHalHandle hHal,
|
||||
enum tCDF_ADAPTER_MODE currDeviceMode);
|
||||
CDF_STATUS sme_close_session(tHalHandle hHal, uint8_t sessionId,
|
||||
csr_roamSessionCloseCallback callback,
|
||||
void *pContext);
|
||||
|
|
@ -558,7 +559,7 @@ CDF_STATUS sme_set_max_tx_power(tHalHandle hHal, struct cdf_mac_addr pBssid,
|
|||
CDF_STATUS sme_set_max_tx_power_per_band(eCsrBand band, int8_t db);
|
||||
CDF_STATUS sme_set_tx_power(tHalHandle hHal, uint8_t sessionId,
|
||||
struct cdf_mac_addr bssid,
|
||||
tCDF_CON_MODE dev_mode, int power);
|
||||
enum tCDF_ADAPTER_MODE dev_mode, int power);
|
||||
CDF_STATUS sme_set_custom_mac_addr(tSirMacAddr customMacAddr);
|
||||
CDF_STATUS sme_hide_ssid(tHalHandle hHal, uint8_t sessionId,
|
||||
uint8_t ssidHidden);
|
||||
|
|
|
|||
|
|
@ -148,7 +148,7 @@ typedef struct tagSmeStruct {
|
|||
tDblLinkList smeCmdActiveList;
|
||||
tDblLinkList smeCmdPendingList;
|
||||
tDblLinkList smeCmdFreeList; /* preallocated roam cmd list */
|
||||
tCDF_CON_MODE currDeviceMode;
|
||||
enum tCDF_ADAPTER_MODE currDeviceMode;
|
||||
#ifdef FEATURE_WLAN_LPHB
|
||||
void (*pLphbIndCb)(void *pHddCtx, tSirLPHBInd *indParam);
|
||||
#endif /* FEATURE_WLAN_LPHB */
|
||||
|
|
|
|||
|
|
@ -7822,8 +7822,8 @@ CDF_STATUS sme_set_custom_mac_addr(tSirMacAddr customMacAddr)
|
|||
\- return CDF_STATUS
|
||||
---------------------------------------------------------------------------*/
|
||||
CDF_STATUS sme_set_tx_power(tHalHandle hHal, uint8_t sessionId,
|
||||
struct cdf_mac_addr pBSSId,
|
||||
tCDF_CON_MODE dev_mode, int dBm)
|
||||
struct cdf_mac_addr pBSSId,
|
||||
enum tCDF_ADAPTER_MODE dev_mode, int dBm)
|
||||
{
|
||||
cds_msg_t msg;
|
||||
tpMaxTxPowerParams pTxParams = NULL;
|
||||
|
|
@ -10428,7 +10428,8 @@ ePhyChanBondState sme_get_cb_phy_state_from_cb_ini_value(uint32_t cb_ini_value)
|
|||
\param currDeviceMode - Current operating device mode.
|
||||
--------------------------------------------------------------------------*/
|
||||
|
||||
void sme_set_curr_device_mode(tHalHandle hHal, tCDF_CON_MODE currDeviceMode)
|
||||
void sme_set_curr_device_mode(tHalHandle hHal,
|
||||
enum tCDF_ADAPTER_MODE currDeviceMode)
|
||||
{
|
||||
tpAniSirGlobal pMac = PMAC_STRUCT(hHal);
|
||||
pMac->sme.currDeviceMode = currDeviceMode;
|
||||
|
|
|
|||
|
|
@ -263,7 +263,8 @@ void csr_roam_remove_entry_from_pe_stats_req_list(tpAniSirGlobal pMac,
|
|||
tListElem *csr_roam_find_in_pe_stats_req_list(tpAniSirGlobal pMac, uint32_t statsMask);
|
||||
CDF_STATUS csr_roam_dereg_statistics_req(tpAniSirGlobal pMac);
|
||||
static uint32_t csr_find_ibss_session(tpAniSirGlobal pMac);
|
||||
static uint32_t csr_find_session_by_type(tpAniSirGlobal, tCDF_CON_MODE);
|
||||
static uint32_t csr_find_session_by_type(tpAniSirGlobal,
|
||||
enum tCDF_ADAPTER_MODE);
|
||||
static bool csr_is_conn_allow_2g_band(tpAniSirGlobal pMac, uint32_t chnl);
|
||||
static bool csr_is_conn_allow_5g_band(tpAniSirGlobal pMac, uint32_t chnl);
|
||||
static CDF_STATUS csr_roam_start_wds(tpAniSirGlobal pMac, uint32_t sessionId,
|
||||
|
|
@ -4162,8 +4163,11 @@ CDF_STATUS csr_roam_set_bss_config_cfg(tpAniSirGlobal pMac, uint32_t sessionId,
|
|||
/* Make sure we have the domain info for the BSS we try to connect to. */
|
||||
/* Do we need to worry about sequence for OSs that are not Windows?? */
|
||||
if (pBssDesc) {
|
||||
if (csr_learn_11dcountry_information(pMac, pBssDesc, pIes, true)) {
|
||||
csr_apply_country_information(pMac);
|
||||
if ((CDF_SAP_MODE !=
|
||||
csr_get_session_persona(pMac, sessionId)) &&
|
||||
csr_learn_11dcountry_information(
|
||||
pMac, pBssDesc, pIes, true)) {
|
||||
csr_apply_country_information(pMac);
|
||||
}
|
||||
if ((csr_is11d_supported(pMac)) && pIes) {
|
||||
if (!pIes->Country.present) {
|
||||
|
|
@ -18545,7 +18549,7 @@ void csr_init_operating_classes(tHalHandle hHal)
|
|||
* Return: session id for give session type.
|
||||
**/
|
||||
static uint32_t
|
||||
csr_find_session_by_type(tpAniSirGlobal mac_ctx, tCDF_CON_MODE type)
|
||||
csr_find_session_by_type(tpAniSirGlobal mac_ctx, enum tCDF_ADAPTER_MODE type)
|
||||
{
|
||||
uint32_t i, session_id = CSR_SESSION_ID_INVALID;
|
||||
tCsrRoamSession *session_ptr;
|
||||
|
|
|
|||
|
|
@ -3559,9 +3559,6 @@ bool csr_learn_11dcountry_information(tpAniSirGlobal pMac,
|
|||
tDot11fBeaconIEs *pIesLocal = pIes;
|
||||
bool useVoting = false;
|
||||
|
||||
if (CDF_SAP_MODE == cds_get_conparam())
|
||||
return CDF_STATUS_SUCCESS;
|
||||
|
||||
if ((NULL == pSirBssDesc) && (NULL == pIes))
|
||||
useVoting = true;
|
||||
|
||||
|
|
|
|||
|
|
@ -451,7 +451,7 @@ uint8_t csr_get_concurrent_operation_channel(tpAniSirGlobal mac_ctx)
|
|||
{
|
||||
tCsrRoamSession *session = NULL;
|
||||
uint8_t i = 0;
|
||||
tCDF_CON_MODE persona;
|
||||
enum tCDF_ADAPTER_MODE persona;
|
||||
|
||||
for (i = 0; i < CSR_ROAM_SESSION_MAX; i++) {
|
||||
if (!CSR_IS_SESSION_VALID(mac_ctx, i))
|
||||
|
|
@ -855,7 +855,7 @@ bool csr_is_p2p_session_connected(tpAniSirGlobal pMac)
|
|||
{
|
||||
uint32_t i;
|
||||
tCsrRoamSession *pSession = NULL;
|
||||
tCDF_CON_MODE persona;
|
||||
enum tCDF_ADAPTER_MODE persona;
|
||||
|
||||
for (i = 0; i < CSR_ROAM_SESSION_MAX; i++) {
|
||||
if (CSR_IS_SESSION_VALID(pMac, i)
|
||||
|
|
@ -1888,10 +1888,10 @@ bool csr_is_profile_rsn(tCsrRoamProfile *pProfile)
|
|||
*/
|
||||
CDF_STATUS
|
||||
csr_isconcurrentsession_valid(tpAniSirGlobal mac_ctx, uint32_t cur_sessionid,
|
||||
tCDF_CON_MODE cur_bss_persona)
|
||||
enum tCDF_ADAPTER_MODE cur_bss_persona)
|
||||
{
|
||||
uint32_t sessionid = 0;
|
||||
tCDF_CON_MODE bss_persona;
|
||||
enum tCDF_ADAPTER_MODE bss_persona;
|
||||
eCsrConnectState connect_state, temp;
|
||||
tCsrRoamSession *roam_session;
|
||||
|
||||
|
|
@ -2096,10 +2096,11 @@ uint16_t csr_calculate_mcc_beacon_interval(tpAniSirGlobal pMac, uint16_t sta_bi,
|
|||
return go_fbi;
|
||||
}
|
||||
|
||||
CDF_STATUS csr_validate_mcc_beacon_interval(tpAniSirGlobal pMac, uint8_t channelId,
|
||||
uint16_t *beaconInterval,
|
||||
uint32_t cursessionId,
|
||||
tCDF_CON_MODE currBssPersona)
|
||||
CDF_STATUS csr_validate_mcc_beacon_interval(tpAniSirGlobal pMac,
|
||||
uint8_t channelId,
|
||||
uint16_t *beaconInterval,
|
||||
uint32_t cursessionId,
|
||||
enum tCDF_ADAPTER_MODE currBssPersona)
|
||||
{
|
||||
uint32_t sessionId = 0;
|
||||
uint16_t new_beaconInterval = 0;
|
||||
|
|
@ -5717,3 +5718,24 @@ bool csr_wait_for_connection_update(tpAniSirGlobal mac,
|
|||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* csr_get_session_persona() - get persona of a session
|
||||
* @pmac: pointer to global MAC context
|
||||
* @session_id: session id
|
||||
*
|
||||
* This function is to return the persona of a session
|
||||
*
|
||||
* Reture: enum tCDF_ADAPTER_MODE persona
|
||||
*/
|
||||
enum tCDF_ADAPTER_MODE csr_get_session_persona(tpAniSirGlobal pmac,
|
||||
uint32_t session_id)
|
||||
{
|
||||
tCsrRoamSession *session = NULL;
|
||||
|
||||
session = CSR_GET_SESSION(pmac, session_id);
|
||||
if (NULL == session || NULL == session->pCurRoamProfile)
|
||||
return CDF_MAX_NO_OF_MODE;
|
||||
|
||||
return session->pCurRoamProfile->csrPersona;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -135,7 +135,7 @@ typedef enum {
|
|||
|
||||
typedef struct epping_adapter_s {
|
||||
epping_context_t *pEpping_ctx;
|
||||
tCDF_CON_MODE device_mode;
|
||||
enum tCDF_ADAPTER_MODE device_mode;
|
||||
/** Handle to the network device */
|
||||
struct net_device *dev;
|
||||
struct cdf_mac_addr macAddressCurrent;
|
||||
|
|
@ -183,7 +183,7 @@ void epping_refill(void *ctx, HTC_ENDPOINT_ID Endpoint);
|
|||
/* epping_txrx signatures */
|
||||
epping_adapter_t *epping_add_adapter(epping_context_t *pEpping_ctx,
|
||||
tSirMacAddr macAddr,
|
||||
tCDF_CON_MODE device_mode);
|
||||
enum tCDF_ADAPTER_MODE device_mode);
|
||||
void epping_destroy_adapter(epping_adapter_t *pAdapter);
|
||||
int epping_connect_service(epping_context_t *pEpping_ctx);
|
||||
#ifdef HIF_PCI
|
||||
|
|
|
|||
|
|
@ -342,7 +342,7 @@ static struct net_device_ops epping_drv_ops = {
|
|||
|
||||
epping_adapter_t *epping_add_adapter(epping_context_t *pEpping_ctx,
|
||||
tSirMacAddr macAddr,
|
||||
tCDF_CON_MODE device_mode)
|
||||
enum tCDF_ADAPTER_MODE device_mode)
|
||||
{
|
||||
struct net_device *dev;
|
||||
epping_adapter_t *pAdapter;
|
||||
|
|
|
|||
|
|
@ -1161,7 +1161,7 @@ typedef struct sMaxTxPowerParams {
|
|||
* power == tx power used for management frames.
|
||||
*/
|
||||
tPowerdBm power;
|
||||
tCDF_CON_MODE dev_mode;
|
||||
enum tCDF_ADAPTER_MODE dev_mode;
|
||||
} tMaxTxPowerParams, *tpMaxTxPowerParams;
|
||||
|
||||
/**
|
||||
|
|
@ -1185,7 +1185,7 @@ typedef struct sMaxTxPowerPerBandParams {
|
|||
*/
|
||||
struct add_sta_self_params {
|
||||
tSirMacAddr self_mac_addr;
|
||||
tCDF_CON_MODE curr_device_mode;
|
||||
enum tCDF_ADAPTER_MODE curr_device_mode;
|
||||
uint32_t type;
|
||||
uint32_t sub_type;
|
||||
uint8_t session_id;
|
||||
|
|
|
|||
|
|
@ -1558,7 +1558,7 @@ CDF_STATUS wma_open(void *cds_context,
|
|||
|
||||
cdf_mem_zero(wma_handle, sizeof(t_wma_handle));
|
||||
|
||||
if (cds_get_conparam() != CDF_FTM_MODE) {
|
||||
if (cds_get_conparam() != CDF_GLOBAL_FTM_MODE) {
|
||||
#ifdef FEATURE_WLAN_SCAN_PNO
|
||||
cdf_wake_lock_init(&wma_handle->pno_wake_lock, "wlan_pno_wl");
|
||||
#endif /* FEATURE_WLAN_SCAN_PNO */
|
||||
|
|
@ -1645,7 +1645,7 @@ CDF_STATUS wma_open(void *cds_context,
|
|||
goto err_wmi_handle;
|
||||
}
|
||||
#if defined(QCA_WIFI_FTM)
|
||||
if (cds_get_conparam() == CDF_FTM_MODE)
|
||||
if (cds_get_conparam() == CDF_GLOBAL_FTM_MODE)
|
||||
wma_utf_attach(wma_handle);
|
||||
#endif /* QCA_WIFI_FTM */
|
||||
|
||||
|
|
@ -1951,7 +1951,7 @@ err_wmi_handle:
|
|||
|
||||
err_wma_handle:
|
||||
|
||||
if (cds_get_conparam() != CDF_FTM_MODE) {
|
||||
if (cds_get_conparam() != CDF_GLOBAL_FTM_MODE) {
|
||||
#ifdef FEATURE_WLAN_SCAN_PNO
|
||||
cdf_wake_lock_destroy(&wma_handle->pno_wake_lock);
|
||||
#endif /* FEATURE_WLAN_SCAN_PNO */
|
||||
|
|
@ -2676,7 +2676,7 @@ CDF_STATUS wma_start(void *cds_ctx)
|
|||
* Tx mgmt attach requires TXRX context which is not created
|
||||
* in FTM mode. So skip the TX mgmt attach.
|
||||
*/
|
||||
if (cds_get_conparam() == CDF_FTM_MODE)
|
||||
if (cds_get_conparam() == CDF_GLOBAL_FTM_MODE)
|
||||
goto end;
|
||||
#endif /* QCA_WIFI_FTM */
|
||||
|
||||
|
|
@ -2779,7 +2779,7 @@ CDF_STATUS wma_stop(void *cds_ctx, uint8_t reason)
|
|||
* Tx mgmt detach requires TXRX context which is not created
|
||||
* in FTM mode. So skip the TX mgmt detach.
|
||||
*/
|
||||
if (cds_get_conparam() == CDF_FTM_MODE) {
|
||||
if (cds_get_conparam() == CDF_GLOBAL_FTM_MODE) {
|
||||
cdf_status = CDF_STATUS_SUCCESS;
|
||||
goto end;
|
||||
}
|
||||
|
|
@ -3044,7 +3044,7 @@ CDF_STATUS wma_close(void *cds_ctx)
|
|||
wma_handle->saved_wmi_init_cmd.buf = NULL;
|
||||
}
|
||||
|
||||
if (cds_get_conparam() != CDF_FTM_MODE) {
|
||||
if (cds_get_conparam() != CDF_GLOBAL_FTM_MODE) {
|
||||
#ifdef FEATURE_WLAN_SCAN_PNO
|
||||
cdf_wake_lock_destroy(&wma_handle->pno_wake_lock);
|
||||
#endif /* FEATURE_WLAN_SCAN_PNO */
|
||||
|
|
@ -3083,7 +3083,7 @@ CDF_STATUS wma_close(void *cds_ctx)
|
|||
|
||||
#if defined(QCA_WIFI_FTM)
|
||||
/* Detach UTF and unregister the handler */
|
||||
if (cds_get_conparam() == CDF_FTM_MODE)
|
||||
if (cds_get_conparam() == CDF_GLOBAL_FTM_MODE)
|
||||
wma_utf_detach(wma_handle);
|
||||
#endif /* QCA_WIFI_FTM */
|
||||
|
||||
|
|
|
|||
|
|
@ -3297,7 +3297,7 @@ CDF_STATUS wma_de_register_mgmt_frm_client(void *cds_ctx)
|
|||
tp_wma_handle wma_handle;
|
||||
|
||||
#ifdef QCA_WIFI_FTM
|
||||
if (cds_get_conparam() == CDF_FTM_MODE)
|
||||
if (cds_get_conparam() == CDF_GLOBAL_FTM_MODE)
|
||||
return CDF_STATUS_SUCCESS;
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -2550,7 +2550,7 @@ wma_process_ftm_command(tp_wma_handle wma_handle,
|
|||
if (!msg_buffer)
|
||||
return CDF_STATUS_E_INVAL;
|
||||
|
||||
if (cds_get_conparam() != CDF_FTM_MODE) {
|
||||
if (cds_get_conparam() != CDF_GLOBAL_FTM_MODE) {
|
||||
WMA_LOGE("FTM command issued in non-FTM mode");
|
||||
cdf_mem_free(msg_buffer->data);
|
||||
cdf_mem_free(msg_buffer);
|
||||
|
|
|
|||
Loading…
Reference in a new issue