qcacld-3.0: Add support to compile connection manager STA+STA roam API

Enable compilation of the connection manager roam files with
Kbuild changes.
Add new API to store and retrieve the firmware scan channels at
mlme. Also add initial support to post SET_PCL command through
lim, so that it is not sent before ROAM init command.

Add changes to restrict connection of the 2nd STA to
channels on the other band of the 1st STA connected band.
This is done by filling only the allowed band channels in
the scan filters for the 2nd STA connection. If only
1 STA is active, it is allowed to connect on any band.

Add header gaurds for missed header files:
wlan_cm_tgt_if_tx_api.h
target_if_cm_roam_offload.h

Change-Id: Id2bce12b9663ed635ea46164169b088461aab870
CRs-Fixed: 2720341
This commit is contained in:
Pragaspathi Thilagaraj 2020-07-04 21:10:07 +05:30 committed by nshrivas
parent 275c200717
commit 6b525a4f72
21 changed files with 359 additions and 54 deletions

13
Kbuild
View File

@ -1210,6 +1210,19 @@ MLME_OBJS := $(MLME_DIR)/core/src/wlan_mlme_main.o \
MLME_OBJS += $(MLME_DIR)/core/src/wlan_mlme_vdev_mgr_interface.o MLME_OBJS += $(MLME_DIR)/core/src/wlan_mlme_vdev_mgr_interface.o
CM_DIR := components/umac/mlme/connection_mgr
CM_TGT_IF_DIR := components/target_if/connection_mgr
CM_INC := -I$(WLAN_ROOT)/$(CM_DIR)/dispatcher/inc \
-I$(WLAN_ROOT)/$(CM_TGT_IF_DIR)/inc
MLME_INC += $(CM_INC)
CM_ROAM_OBJS := $(CM_DIR)/dispatcher/src/wlan_cm_tgt_if_tx_api.o \
$(CM_DIR)/dispatcher/src/wlan_cm_roam_api.o \
$(CM_TGT_IF_DIR)/src/target_if_cm_roam_offload.o
MLME_OBJS += $(CM_ROAM_OBJS)
####### BLACKLIST_MGR ######## ####### BLACKLIST_MGR ########

View File

@ -28,6 +28,7 @@
#include <wlan_cmn.h> #include <wlan_cmn.h>
#include <wlan_objmgr_vdev_obj.h> #include <wlan_objmgr_vdev_obj.h>
#include <wlan_objmgr_peer_obj.h> #include <wlan_objmgr_peer_obj.h>
#include "wlan_cm_roam_public_srtuct.h"
#define mlme_legacy_fatal(params...) QDF_TRACE_FATAL(QDF_MODULE_ID_MLME, params) #define mlme_legacy_fatal(params...) QDF_TRACE_FATAL(QDF_MODULE_ID_MLME, params)
#define mlme_legacy_err(params...) QDF_TRACE_ERROR(QDF_MODULE_ID_MLME, params) #define mlme_legacy_err(params...) QDF_TRACE_ERROR(QDF_MODULE_ID_MLME, params)
@ -156,6 +157,7 @@ struct wlan_mlme_roam {
* @disconnect_info: Disconnection information * @disconnect_info: Disconnection information
* @vdev_stop_type: vdev stop type request * @vdev_stop_type: vdev stop type request
* @roam_off_state: Roam offload state * @roam_off_state: Roam offload state
* @cm_roam: Roaming configuration
* @bigtk_vdev_support: BIGTK feature support for this vdev (SAP) * @bigtk_vdev_support: BIGTK feature support for this vdev (SAP)
* @sae_auth_retry: SAE auth retry information * @sae_auth_retry: SAE auth retry information
*/ */
@ -175,6 +177,7 @@ struct mlme_legacy_priv {
struct wlan_disconnect_info disconnect_info; struct wlan_disconnect_info disconnect_info;
uint32_t vdev_stop_type; uint32_t vdev_stop_type;
struct wlan_mlme_roam mlme_roam; struct wlan_mlme_roam mlme_roam;
struct wlan_cm_roam cm_roam;
bool bigtk_vdev_support; bool bigtk_vdev_support;
struct sae_auth_retry sae_retry; struct sae_auth_retry sae_retry;
}; };
@ -539,7 +542,7 @@ mlme_get_operations_bitmap(struct wlan_objmgr_psoc *psoc, uint8_t vdev_id);
*/ */
void void
mlme_set_operations_bitmap(struct wlan_objmgr_psoc *psoc, uint8_t vdev_id, mlme_set_operations_bitmap(struct wlan_objmgr_psoc *psoc, uint8_t vdev_id,
enum roam_control_requestor reqs, bool clear); enum wlan_cm_rso_control_requestor reqs, bool clear);
#define MLME_IS_ROAM_STATE_RSO_STARTED(psoc, vdev_id) \ #define MLME_IS_ROAM_STATE_RSO_STARTED(psoc, vdev_id) \
(mlme_get_roam_state(psoc, vdev_id) == ROAM_RSO_STARTED) (mlme_get_roam_state(psoc, vdev_id) == ROAM_RSO_STARTED)

View File

@ -2739,7 +2739,7 @@ mlme_get_operations_bitmap(struct wlan_objmgr_psoc *psoc, uint8_t vdev_id)
void void
mlme_set_operations_bitmap(struct wlan_objmgr_psoc *psoc, uint8_t vdev_id, mlme_set_operations_bitmap(struct wlan_objmgr_psoc *psoc, uint8_t vdev_id,
enum roam_control_requestor reqs, bool clear) enum wlan_cm_rso_control_requestor reqs, bool clear)
{ {
struct wlan_objmgr_vdev *vdev; struct wlan_objmgr_vdev *vdev;
struct mlme_legacy_priv *mlme_priv; struct mlme_legacy_priv *mlme_priv;
@ -2819,4 +2819,60 @@ void mlme_set_roam_state(struct wlan_objmgr_psoc *psoc, uint8_t vdev_id,
mlme_priv->mlme_roam.roam_sm.state = new_state; mlme_priv->mlme_roam.roam_sm.state = new_state;
wlan_objmgr_vdev_release_ref(vdev, WLAN_MLME_OBJMGR_ID); wlan_objmgr_vdev_release_ref(vdev, WLAN_MLME_OBJMGR_ID);
} }
QDF_STATUS
mlme_store_fw_scan_channels(struct wlan_objmgr_psoc *psoc,
tSirUpdateChanList *chan_list)
{
struct wlan_mlme_psoc_ext_obj *mlme_obj;
struct wlan_mlme_lfr_cfg *lfr;
uint16_t i;
mlme_obj = mlme_get_psoc_ext_obj(psoc);
if (!mlme_obj) {
mlme_legacy_err("Failed to get MLME Obj");
return QDF_STATUS_E_FAILURE;
}
lfr = &mlme_obj->cfg.lfr;
qdf_mem_zero(&lfr->saved_freq_list, sizeof(lfr->saved_freq_list));
lfr->saved_freq_list.num_channels = chan_list->numChan;
for (i = 0; i < chan_list->numChan; i++)
lfr->saved_freq_list.freq[i] = chan_list->chanParam[i].freq;
mlme_legacy_debug("ROAM: save %d channels",
chan_list->numChan);
return QDF_STATUS_SUCCESS;
}
QDF_STATUS mlme_get_fw_scan_channels(struct wlan_objmgr_psoc *psoc,
uint32_t *freq_list,
uint8_t *saved_num_chan)
{
struct wlan_mlme_psoc_ext_obj *mlme_obj;
struct wlan_mlme_lfr_cfg *lfr;
uint16_t i;
if (!freq_list) {
mlme_legacy_err("ROAM: Freq list is NULL");
*saved_num_chan = 0;
return QDF_STATUS_E_FAILURE;
}
mlme_obj = mlme_get_psoc_ext_obj(psoc);
if (!mlme_obj) {
mlme_legacy_err("Failed to get MLME Obj");
*saved_num_chan = 0;
return QDF_STATUS_E_FAILURE;
}
lfr = &mlme_obj->cfg.lfr;
*saved_num_chan = lfr->saved_freq_list.num_channels;
for (i = 0; i < lfr->saved_freq_list.num_channels; i++)
freq_list[i] = lfr->saved_freq_list.freq[i];
return QDF_STATUS_SUCCESS;
}
#endif #endif

View File

@ -2557,4 +2557,31 @@ wlan_mlme_get_dual_sta_roaming_enabled(struct wlan_objmgr_psoc *psoc)
} }
#endif #endif
/**
* mlme_store_fw_scan_channels - Update the valid channel list to mlme.
* @psoc: Pointer to global psoc object
* @chan_list: Source channel list pointer
*
* Currently the channel list is saved to wma_handle to be updated in the
* PCL command. This cannot be accesed at target_if while sending vdev
* set pcl command. So save the channel list to mlme.
*
* Return: QDF_STATUS
*/
QDF_STATUS
mlme_store_fw_scan_channels(struct wlan_objmgr_psoc *psoc,
tSirUpdateChanList *chan_list);
/**
* mlme_get_fw_scan_channels - Copy the saved valid channel
* list to the provided buffer
* @psoc: Pointer to global psoc object
* @freq_list: Pointer to the frequency list buffer to be filled
* @saved_num_chan: Number of channels filled
*
* Return: QDF_STATUS
*/
QDF_STATUS mlme_get_fw_scan_channels(struct wlan_objmgr_psoc *psoc,
uint32_t *freq_list,
uint8_t *saved_num_chan);
#endif /* _WLAN_MLME_API_H_ */ #endif /* _WLAN_MLME_API_H_ */

View File

@ -272,25 +272,6 @@ enum mlme_ts_info_ack_policy {
}; };
#if defined(WLAN_FEATURE_HOST_ROAM) || defined(WLAN_FEATURE_ROAM_OFFLOAD) #if defined(WLAN_FEATURE_HOST_ROAM) || defined(WLAN_FEATURE_ROAM_OFFLOAD)
/**
* enum roam_control_requestor - Driver disabled roaming requestor that will
* request the roam module to disable roaming based on the mlme operation
* @RSO_INVALID_REQUESTOR: invalid requestor
* @RSO_START_BSS: disable roaming temporarily due to start bss
* @RSO_CHANNEL_SWITCH: disable roaming due to STA channel switch
* @RSO_CONNECT_START: disable roaming temporarily due to connect
* @RSO_SAP_CHANNEL_CHANGE: disable roaming due to SAP channel change
* @RSO_NDP_CON_ON_NDI: disable roaming due to NDP connection on NDI
*/
enum roam_control_requestor {
RSO_INVALID_REQUESTOR,
RSO_START_BSS = BIT(0),
RSO_CHANNEL_SWITCH = BIT(1),
RSO_CONNECT_START = BIT(2),
RSO_SAP_CHANNEL_CHANGE = BIT(3),
RSO_NDP_CON_ON_NDI = BIT(4),
};
/** /**
* enum roam_offload_state - Roaming module state for each STA vdev. * enum roam_offload_state - Roaming module state for each STA vdev.
* @ROAM_DEINIT: Roaming module is not initialized at the * @ROAM_DEINIT: Roaming module is not initialized at the
@ -1456,6 +1437,16 @@ struct bss_load_trigger {
#define LFR3_STA_ROAM_DISABLE_BY_P2P BIT(0) #define LFR3_STA_ROAM_DISABLE_BY_P2P BIT(0)
#define LFR3_STA_ROAM_DISABLE_BY_NAN BIT(1) #define LFR3_STA_ROAM_DISABLE_BY_NAN BIT(1)
/**
* struct fw_scan_channels - Channel details part of VDEV set PCL command
* @num_channels: Number of channels
* @ch_freq_list: Channel Frequency list
*/
struct fw_scan_channels {
uint8_t num_channels;
uint32_t freq[NUM_CHANNELS];
};
/* /*
* @mawc_roam_enabled: Enable/Disable MAWC during roaming * @mawc_roam_enabled: Enable/Disable MAWC during roaming
* @enable_fast_roam_in_concurrency:Enable LFR roaming on STA during concurrency * @enable_fast_roam_in_concurrency:Enable LFR roaming on STA during concurrency
@ -1565,6 +1556,7 @@ struct bss_load_trigger {
* @fw_akm_bitmap: Supported Akm suites of firmware * @fw_akm_bitmap: Supported Akm suites of firmware
* @roam_full_scan_period: Idle period in seconds between two successive * @roam_full_scan_period: Idle period in seconds between two successive
* full channel roam scans * full channel roam scans
* @saved_freq_list: Valid channel list
* @sae_single_pmk_feature_enabled: Contains value of ini * @sae_single_pmk_feature_enabled: Contains value of ini
* sae_single_pmk_feature_enabled * sae_single_pmk_feature_enabled
*/ */
@ -1676,6 +1668,7 @@ struct wlan_mlme_lfr_cfg {
uint32_t roam_scan_period_after_inactivity; uint32_t roam_scan_period_after_inactivity;
uint32_t fw_akm_bitmap; uint32_t fw_akm_bitmap;
uint32_t roam_full_scan_period; uint32_t roam_full_scan_period;
struct fw_scan_channels saved_freq_list;
#if defined(WLAN_SAE_SINGLE_PMK) && defined(WLAN_FEATURE_ROAM_OFFLOAD) #if defined(WLAN_SAE_SINGLE_PMK) && defined(WLAN_FEATURE_ROAM_OFFLOAD)
bool sae_single_pmk_feature_enabled; bool sae_single_pmk_feature_enabled;
#endif #endif

View File

@ -18,6 +18,9 @@
* DOC: This file contains definitions for target_if roaming offload. * DOC: This file contains definitions for target_if roaming offload.
*/ */
#ifndef TARGET_IF_CM_ROAM_OFFLOAD_H__
#define TARGET_IF_CM_ROAM_OFFLOAD_H__
#include "wlan_cm_roam_public_srtuct.h" #include "wlan_cm_roam_public_srtuct.h"
/** /**
@ -29,3 +32,4 @@
*/ */
QDF_STATUS QDF_STATUS
target_if_cm_roam_register_tx_ops(struct wlan_cm_roam_tx_ops *tx_ops); target_if_cm_roam_register_tx_ops(struct wlan_cm_roam_tx_ops *tx_ops);
#endif

View File

@ -24,6 +24,7 @@
#include "wmi_unified_sta_api.h" #include "wmi_unified_sta_api.h"
#include "wlan_mlme_dbg.h" #include "wlan_mlme_dbg.h"
#ifdef WLAN_FEATURE_ROAM_OFFLOAD
static struct wmi_unified static struct wmi_unified
*target_if_cm_roam_get_wmi_handle_from_vdev(struct wlan_objmgr_vdev *vdev) *target_if_cm_roam_get_wmi_handle_from_vdev(struct wlan_objmgr_vdev *vdev)
{ {
@ -45,6 +46,14 @@ static struct wmi_unified
return wmi_handle; return wmi_handle;
} }
/**
* target_if_cm_roam_send_vdev_set_pcl_cmd - Send set vdev pcl
* command to wmi.
* @vdev: VDEV object pointer
* @req: Pointer to the pcl request msg
*
* Return: QDF_STATUS
*/
static QDF_STATUS static QDF_STATUS
target_if_cm_roam_send_vdev_set_pcl_cmd(struct wlan_objmgr_vdev *vdev, target_if_cm_roam_send_vdev_set_pcl_cmd(struct wlan_objmgr_vdev *vdev,
struct set_pcl_req *req) struct set_pcl_req *req)
@ -62,6 +71,17 @@ target_if_cm_roam_send_vdev_set_pcl_cmd(struct wlan_objmgr_vdev *vdev,
return wmi_unified_vdev_set_pcl_cmd(wmi_handle, &params); return wmi_unified_vdev_set_pcl_cmd(wmi_handle, &params);
} }
static void
target_if_cm_roam_register_lfr3_ops(struct wlan_cm_roam_tx_ops *tx_ops)
{
tx_ops->send_vdev_set_pcl_cmd = target_if_cm_roam_send_vdev_set_pcl_cmd;
}
#else
static inline void
target_if_cm_roam_register_lfr3_ops(struct wlan_cm_roam_tx_ops *tx_ops)
{}
#endif
QDF_STATUS target_if_cm_roam_register_tx_ops(struct wlan_cm_roam_tx_ops *tx_ops) QDF_STATUS target_if_cm_roam_register_tx_ops(struct wlan_cm_roam_tx_ops *tx_ops)
{ {
if (!tx_ops) { if (!tx_ops) {
@ -69,7 +89,7 @@ QDF_STATUS target_if_cm_roam_register_tx_ops(struct wlan_cm_roam_tx_ops *tx_ops)
return QDF_STATUS_E_INVAL; return QDF_STATUS_E_INVAL;
} }
tx_ops->send_vdev_set_pcl_cmd = target_if_cm_roam_send_vdev_set_pcl_cmd; target_if_cm_roam_register_lfr3_ops(tx_ops);
return QDF_STATUS_SUCCESS; return QDF_STATUS_SUCCESS;
} }

View File

@ -20,6 +20,9 @@
* Implementation for the Common Roaming interfaces. * Implementation for the Common Roaming interfaces.
*/ */
#ifndef WLAN_CM_ROAM_API_H__
#define WLAN_CM_ROAM_API_H__
#include "wlan_mlme_dbg.h" #include "wlan_mlme_dbg.h"
#include "wlan_cm_roam_public_srtuct.h" #include "wlan_cm_roam_public_srtuct.h"
#include "wlan_mlme_main.h" #include "wlan_mlme_main.h"
@ -56,6 +59,36 @@ void wlan_cm_roam_activate_pcl_per_vdev(struct wlan_objmgr_psoc *psoc,
*/ */
bool wlan_cm_roam_is_pcl_per_vdev_active(struct wlan_objmgr_psoc *psoc, bool wlan_cm_roam_is_pcl_per_vdev_active(struct wlan_objmgr_psoc *psoc,
uint8_t vdev_id); uint8_t vdev_id);
/**
* wlan_cm_dual_sta_is_freq_allowed - This API is used to check if the
* provided frequency is allowed for the 2nd STA vdev for connection.
* @psoc: Pointer to PSOC object
* @freq: Frequency in the given frequency list for the STA that is about to
* connect
* @opmode: Operational mode
*
* This API will be called while filling scan filter channels during connection.
*
* Return: True if this channel is allowed for connection when dual sta roaming
* is enabled
*/
bool
wlan_cm_dual_sta_is_freq_allowed(struct wlan_objmgr_psoc *psoc, uint32_t freq,
enum QDF_OPMODE opmode);
/**
* wlan_cm_dual_sta_roam_update_connect_channels - Fill the allowed channels
* for connection of the 2nd STA based on the 1st STA connected band if dual
* sta roaming is enabled.
* @psoc: Pointer to PSOC object
* @filter: Pointer to scan filter
*
* Return: None
*/
void
wlan_cm_dual_sta_roam_update_connect_channels(struct wlan_objmgr_psoc *psoc,
struct scan_filter *filter);
#else #else
static inline static inline
void wlan_cm_roam_activate_pcl_per_vdev(struct wlan_objmgr_psoc *psoc, void wlan_cm_roam_activate_pcl_per_vdev(struct wlan_objmgr_psoc *psoc,
@ -69,4 +102,17 @@ bool wlan_cm_roam_is_pcl_per_vdev_active(struct wlan_objmgr_psoc *psoc,
{ {
return false; return false;
} }
#endif
static inline bool
wlan_cm_dual_sta_is_freq_allowed(struct wlan_objmgr_psoc *psoc, uint32_t freq,
enum QDF_OPMODE opmode)
{
return true;
}
static inline void
wlan_cm_dual_sta_roam_update_connect_channels(struct wlan_objmgr_psoc *psoc,
struct scan_filter *filter)
{}
#endif /* FEATURE_ROAM_OFFLOAD */
#endif /* WLAN_CM_ROAM_API_H__ */

View File

@ -74,6 +74,7 @@ struct wlan_cm_roam_tx_ops {
/** /**
* struct wlan_cm_roam - Connection manager roam configs, state and roam * struct wlan_cm_roam - Connection manager roam configs, state and roam
* data related structure * data related structure
* @tx_ops: Roam Tx ops to send roam offload commands to firmware
* @reassoc_resp_frame: Pointer to reassoc frame received in roam synch * @reassoc_resp_frame: Pointer to reassoc frame received in roam synch
* indication * indication
* @reassoc_resp_frame_len: reassoc frame len received in roam synch indication * @reassoc_resp_frame_len: reassoc frame len received in roam synch indication
@ -81,6 +82,7 @@ struct wlan_cm_roam_tx_ops {
* sent or PDEV level PCL command needs to be sent * sent or PDEV level PCL command needs to be sent
*/ */
struct wlan_cm_roam { struct wlan_cm_roam {
struct wlan_cm_roam_tx_ops tx_ops;
uint8_t *reassoc_resp_frame; uint8_t *reassoc_resp_frame;
uint16_t reassoc_resp_frame_len; uint16_t reassoc_resp_frame_len;
bool pcl_vdev_cmd_active; bool pcl_vdev_cmd_active;

View File

@ -19,10 +19,14 @@
* *
* This file contains connection manager tx ops related functions * This file contains connection manager tx ops related functions
*/ */
#ifndef CM_TGT_IF_TX_API_H__
#define CM_TGT_IF_TX_API_H__
#include "wlan_cm_roam_public_srtuct.h" #include "wlan_cm_roam_public_srtuct.h"
#define GET_CM_ROAM_TX_OPS_FROM_VDEV(vdev) \ #define GET_CM_ROAM_TX_OPS_FROM_VDEV(vdev) \
(wlan_vdev_mlme_get_ext_hdl(vdev)->cm_roam_tx_ops) (wlan_vdev_mlme_get_ext_hdl(vdev)->cm_roam.tx_ops)
#ifdef WLAN_FEATURE_ROAM_OFFLOAD #ifdef WLAN_FEATURE_ROAM_OFFLOAD
/** /**
@ -42,4 +46,5 @@ wlan_cm_roam_send_set_vdev_pcl(struct wlan_objmgr_psoc *psoc,
{ {
return QDF_STATUS_E_FAILURE; return QDF_STATUS_E_FAILURE;
} }
#endif #endif /* WLAN_FEATURE_ROAM_OFFLOAD */
#endif /* CM_TGT_IF_TX_API_H__ */

View File

@ -78,4 +78,80 @@ bool wlan_cm_roam_is_pcl_per_vdev_active(struct wlan_objmgr_psoc *psoc,
return mlme_priv->cm_roam.pcl_vdev_cmd_active; return mlme_priv->cm_roam.pcl_vdev_cmd_active;
} }
bool
wlan_cm_dual_sta_is_freq_allowed(struct wlan_objmgr_psoc *psoc,
uint32_t freq,
enum QDF_OPMODE opmode)
{
uint32_t op_ch_freq_list[MAX_NUMBER_OF_CONC_CONNECTIONS];
uint8_t vdev_id_list[MAX_NUMBER_OF_CONC_CONNECTIONS];
enum reg_wifi_band band;
uint32_t count, connected_sta_freq;
/*
* Check if already there is 1 STA connected. If this API is
* called for 2nd STA and if dual sta roaming is enabled, then
* don't allow the intra band frequencies of the 1st sta for
* connection on 2nd STA.
*/
count = policy_mgr_get_mode_specific_conn_info(psoc, op_ch_freq_list,
vdev_id_list,
PM_STA_MODE);
if (!count || !wlan_mlme_get_dual_sta_roaming_enabled(psoc) ||
opmode != QDF_STA_MODE)
return true;
connected_sta_freq = op_ch_freq_list[0];
band = wlan_reg_freq_to_band(connected_sta_freq);
if ((band == REG_BAND_2G && WLAN_REG_IS_24GHZ_CH_FREQ(freq)) ||
(band == REG_BAND_5G && !WLAN_REG_IS_24GHZ_CH_FREQ(freq)))
return false;
return true;
}
void
wlan_cm_dual_sta_roam_update_connect_channels(struct wlan_objmgr_psoc *psoc,
struct scan_filter *filter)
{
uint32_t i, num_channels = 0;
uint32_t *channel_list;
bool is_ch_allowed;
QDF_STATUS status;
if (!wlan_mlme_get_dual_sta_roaming_enabled(psoc))
return;
channel_list = qdf_mem_malloc(NUM_CHANNELS * sizeof(uint32_t));
if (!channel_list)
return;
/*
* Get Reg domain valid channels and update to the scan filter
* if already 1st sta is in connected state. Don't allow channels
* on which the 1st STA is connected.
*/
status = policy_mgr_get_valid_chans(psoc, channel_list,
&num_channels);
if (QDF_IS_STATUS_ERROR(status)) {
mlme_legacy_err("Error in getting valid channels");
qdf_mem_free(channel_list);
return;
}
filter->num_of_channels = 0;
for (i = 0; i < num_channels; i++) {
is_ch_allowed =
wlan_cm_dual_sta_is_freq_allowed(psoc, channel_list[i],
QDF_STA_MODE);
if (!is_ch_allowed)
continue;
filter->chan_freq_list[filter->num_of_channels] =
channel_list[i];
filter->num_of_channels++;
}
qdf_mem_free(channel_list);
}
#endif #endif

View File

@ -34,7 +34,7 @@ wlan_cm_roam_send_set_vdev_pcl(struct wlan_objmgr_psoc *psoc,
struct set_pcl_req *pcl_req) struct set_pcl_req *pcl_req)
{ {
struct wlan_cm_roam_tx_ops roam_tx_ops; struct wlan_cm_roam_tx_ops roam_tx_ops;
struct saved_channels *freq_list; struct fw_scan_channels *freq_list;
struct wlan_objmgr_vdev *vdev; struct wlan_objmgr_vdev *vdev;
struct wmi_pcl_chan_weights *weights; struct wmi_pcl_chan_weights *weights;
QDF_STATUS status = QDF_STATUS_E_FAILURE; QDF_STATUS status = QDF_STATUS_E_FAILURE;
@ -73,8 +73,8 @@ wlan_cm_roam_send_set_vdev_pcl(struct wlan_objmgr_psoc *psoc,
goto end; goto end;
} }
mlme_roam_fill_saved_channels(psoc, freq_list->freq, mlme_get_fw_scan_channels(psoc, freq_list->freq,
&freq_list->num_channels); &freq_list->num_channels);
weights = &pcl_req->chan_weights; weights = &pcl_req->chan_weights;
for (i = 0; i < freq_list->num_channels; i++) for (i = 0; i < freq_list->num_channels; i++)
@ -86,7 +86,7 @@ wlan_cm_roam_send_set_vdev_pcl(struct wlan_objmgr_psoc *psoc,
qdf_mem_free(freq_list); qdf_mem_free(freq_list);
for (i = 0; i < chan_weights->saved_num_chan; i++) { for (i = 0; i < weights->saved_num_chan; i++) {
weights->weighed_valid_list[i] = weights->weighed_valid_list[i] =
wma_map_pcl_weights(weights->weighed_valid_list[i]); wma_map_pcl_weights(weights->weighed_valid_list[i]);

View File

@ -105,6 +105,7 @@
#include "wlan_mlme_ucfg_api.h" #include "wlan_mlme_ucfg_api.h"
#include "pld_common.h" #include "pld_common.h"
#include <dp_txrx.h> #include <dp_txrx.h>
#include "wlan_cm_roam_public_srtuct.h"
#ifdef WLAN_FEATURE_DP_BUS_BANDWIDTH #ifdef WLAN_FEATURE_DP_BUS_BANDWIDTH
#include "qdf_periodic_work.h" #include "qdf_periodic_work.h"
@ -3051,28 +3052,30 @@ hdd_store_nss_chains_cfg_in_vdev(struct hdd_adapter *adapter);
/** /**
* wlan_hdd_disable_roaming() - disable roaming on all STAs except the input one * wlan_hdd_disable_roaming() - disable roaming on all STAs except the input one
* @cur_adapter: Current HDD adapter passed from caller * @cur_adapter: Current HDD adapter passed from caller
* @mlme_operation_requestor: roam disable requestor * @rso_op_requestor: roam disable requestor
* *
* This function loops through all adapters and disables roaming on each STA * This function loops through all adapters and disables roaming on each STA
* mode adapter except the current adapter passed from the caller * mode adapter except the current adapter passed from the caller
* *
* Return: None * Return: None
*/ */
void wlan_hdd_disable_roaming(struct hdd_adapter *cur_adapter, void
uint32_t mlme_operation_requestor); wlan_hdd_disable_roaming(struct hdd_adapter *cur_adapter,
enum wlan_cm_rso_control_requestor rso_op_requestor);
/** /**
* wlan_hdd_enable_roaming() - enable roaming on all STAs except the input one * wlan_hdd_enable_roaming() - enable roaming on all STAs except the input one
* @cur_adapter: Current HDD adapter passed from caller * @cur_adapter: Current HDD adapter passed from caller
* @mlme_operation_requestor: roam disable requestor * @rso_op_requestor: roam disable requestor
* *
* This function loops through all adapters and enables roaming on each STA * This function loops through all adapters and enables roaming on each STA
* mode adapter except the current adapter passed from the caller * mode adapter except the current adapter passed from the caller
* *
* Return: None * Return: None
*/ */
void wlan_hdd_enable_roaming(struct hdd_adapter *cur_adapter, void
uint32_t mlme_operation_requestor); wlan_hdd_enable_roaming(struct hdd_adapter *cur_adapter,
enum wlan_cm_rso_control_requestor rso_op_requestor);
QDF_STATUS hdd_post_cds_enable_config(struct hdd_context *hdd_ctx); QDF_STATUS hdd_post_cds_enable_config(struct hdd_context *hdd_ctx);

View File

@ -14321,8 +14321,9 @@ void hdd_softap_sta_disassoc(struct hdd_adapter *adapter,
param); param);
} }
void wlan_hdd_disable_roaming(struct hdd_adapter *cur_adapter, void
uint32_t mlme_operation_requestor) wlan_hdd_disable_roaming(struct hdd_adapter *cur_adapter,
enum wlan_cm_rso_control_requestor rso_op_requestor)
{ {
struct hdd_context *hdd_ctx = WLAN_HDD_GET_CTX(cur_adapter); struct hdd_context *hdd_ctx = WLAN_HDD_GET_CTX(cur_adapter);
struct hdd_adapter *adapter = NULL; struct hdd_adapter *adapter = NULL;
@ -14343,13 +14344,14 @@ void wlan_hdd_disable_roaming(struct hdd_adapter *cur_adapter,
sme_stop_roaming(hdd_ctx->mac_handle, sme_stop_roaming(hdd_ctx->mac_handle,
adapter->vdev_id, adapter->vdev_id,
REASON_DRIVER_DISABLED, REASON_DRIVER_DISABLED,
mlme_operation_requestor); rso_op_requestor);
} }
} }
} }
void wlan_hdd_enable_roaming(struct hdd_adapter *cur_adapter, void
uint32_t mlme_operation_requestor) wlan_hdd_enable_roaming(struct hdd_adapter *cur_adapter,
enum wlan_cm_rso_control_requestor rso_op_requestor)
{ {
struct hdd_context *hdd_ctx = WLAN_HDD_GET_CTX(cur_adapter); struct hdd_context *hdd_ctx = WLAN_HDD_GET_CTX(cur_adapter);
struct hdd_adapter *adapter = NULL; struct hdd_adapter *adapter = NULL;
@ -14370,7 +14372,7 @@ void wlan_hdd_enable_roaming(struct hdd_adapter *cur_adapter,
sme_start_roaming(hdd_ctx->mac_handle, sme_start_roaming(hdd_ctx->mac_handle,
adapter->vdev_id, adapter->vdev_id,
REASON_DRIVER_ENABLED, REASON_DRIVER_ENABLED,
mlme_operation_requestor); rso_op_requestor);
} }
} }
} }

View File

@ -5648,16 +5648,6 @@ struct sir_sae_msg {
tSirMacAddr peer_mac_addr; tSirMacAddr peer_mac_addr;
}; };
/**
* struct set_pcl_req - Request message to set the PCL
* @chan_weights: PCL channel weights
* @band_mask: Supported band mask
*/
struct set_pcl_req {
struct wmi_pcl_chan_weights chan_weights;
uint32_t band_mask;
};
#ifdef WLAN_FEATURE_MOTION_DETECTION #ifdef WLAN_FEATURE_MOTION_DETECTION
/** /**
* struct sir_md_evt - motion detection event status * struct sir_md_evt - motion detection event status

View File

@ -243,7 +243,8 @@ enum eWniMsgTypes {
SIR_SME_MSG_TYPES_BEGIN + 160, SIR_SME_MSG_TYPES_BEGIN + 160,
eWNI_SME_MONITOR_MODE_VDEV_UP = SIR_SME_MSG_TYPES_BEGIN + 161, eWNI_SME_MONITOR_MODE_VDEV_UP = SIR_SME_MSG_TYPES_BEGIN + 161,
eWNI_SME_UPDATE_SESSION_EDCA_TXQ_PARAMS = SIR_SME_MSG_TYPES_BEGIN + 162, eWNI_SME_UPDATE_SESSION_EDCA_TXQ_PARAMS = SIR_SME_MSG_TYPES_BEGIN + 162,
eWNI_SME_MSG_TYPES_END = SIR_SME_MSG_TYPES_BEGIN + 163 eWNI_SME_ROAM_SEND_SET_PCL_REQ = SIR_SME_MSG_TYPES_BEGIN + 163,
eWNI_SME_MSG_TYPES_END = SIR_SME_MSG_TYPES_BEGIN + 164
}; };
typedef struct sAniCfgTxRateCtrs { typedef struct sAniCfgTxRateCtrs {

View File

@ -1759,6 +1759,7 @@ static void lim_process_messages(struct mac_context *mac_ctx,
/* fall through */ /* fall through */
case eWNI_SME_ROAM_SCAN_OFFLOAD_REQ: case eWNI_SME_ROAM_SCAN_OFFLOAD_REQ:
case eWNI_SME_ROAM_INIT_PARAM: case eWNI_SME_ROAM_INIT_PARAM:
case eWNI_SME_ROAM_SEND_SET_PCL_REQ:
case eWNI_SME_ROAM_SEND_PER_REQ: case eWNI_SME_ROAM_SEND_PER_REQ:
case eWNI_SME_SET_ADDBA_ACCEPT: case eWNI_SME_SET_ADDBA_ACCEPT:
case eWNI_SME_UPDATE_EDCA_PROFILE: case eWNI_SME_UPDATE_EDCA_PROFILE:

View File

@ -3450,6 +3450,29 @@ static void lim_send_roam_per_command(struct mac_context *mac_ctx,
qdf_mem_free(msg_buf); qdf_mem_free(msg_buf);
} }
} }
/**
* lim_send_roam_set_pcl() - Process Roam offload flag from csr
* @mac_ctx: Pointer to Global MAC structure
* @msg_buf: Pointer to SME message buffer
*
* Return: None
*/
static void lim_send_roam_set_pcl(struct mac_context *mac_ctx,
struct set_pcl_req *msg_buf)
{
struct scheduler_msg wma_msg = {0};
QDF_STATUS status;
wma_msg.type = SIR_HAL_PDEV_SET_PCL_TO_FW;
wma_msg.bodyptr = msg_buf;
status = wma_post_ctrl_msg(mac_ctx, &wma_msg);
if (QDF_STATUS_SUCCESS != status) {
pe_err("Posting WMA_ROAM_SET_PCL failed");
qdf_mem_free(msg_buf);
}
}
#else #else
static void lim_send_roam_offload_init(struct mac_context *mac_ctx, static void lim_send_roam_offload_init(struct mac_context *mac_ctx,
uint32_t *msg_buf) uint32_t *msg_buf)
@ -3462,6 +3485,12 @@ static void lim_send_roam_per_command(struct mac_context *mac_ctx,
{ {
qdf_mem_free(msg_buf); qdf_mem_free(msg_buf);
} }
static inline void lim_send_roam_set_pcl(struct mac_context *mac_ctx,
struct set_pcl_req *msg_buf)
{
qdf_mem_free(msg_buf);
}
#endif #endif
#ifdef WLAN_FEATURE_ROAM_OFFLOAD #ifdef WLAN_FEATURE_ROAM_OFFLOAD
@ -4535,6 +4564,10 @@ bool lim_process_sme_req_messages(struct mac_context *mac,
lim_send_roam_offload_init(mac, msg_buf); lim_send_roam_offload_init(mac, msg_buf);
bufConsumed = false; bufConsumed = false;
break; break;
case eWNI_SME_ROAM_SEND_SET_PCL_REQ:
lim_send_roam_set_pcl(mac, (struct set_pcl_req *)msg_buf);
bufConsumed = false;
break;
case eWNI_SME_ROAM_SEND_PER_REQ: case eWNI_SME_ROAM_SEND_PER_REQ:
lim_send_roam_per_command(mac, msg_buf); lim_send_roam_per_command(mac, msg_buf);
bufConsumed = false; bufConsumed = false;

View File

@ -72,6 +72,7 @@
#include <ol_defines.h> #include <ol_defines.h>
#include "wlan_pkt_capture_ucfg_api.h" #include "wlan_pkt_capture_ucfg_api.h"
#include "wlan_psoc_mlme_api.h" #include "wlan_psoc_mlme_api.h"
#include "wlan_cm_roam_api.h"
#define RSN_AUTH_KEY_MGMT_SAE WLAN_RSN_SEL(WLAN_AKM_SAE) #define RSN_AUTH_KEY_MGMT_SAE WLAN_RSN_SEL(WLAN_AKM_SAE)
#define MAX_PWR_FCC_CHAN_12 8 #define MAX_PWR_FCC_CHAN_12 8
@ -8320,6 +8321,14 @@ QDF_STATUS csr_roam_connect(struct mac_context *mac, uint32_t sessionId,
/* No encryption */ /* No encryption */
filter->num_of_enc_type = 1; filter->num_of_enc_type = 1;
filter->enc_type[0] = WLAN_ENCRYPT_TYPE_NONE; filter->enc_type[0] = WLAN_ENCRYPT_TYPE_NONE;
/*
* Dual STA roaming is supported only for DBS mode.
* So if dual sta roaming is enabled, fill the channels
* allowed for 2nd STA connection based on the 1st STA
* connected band.
*/
wlan_cm_dual_sta_roam_update_connect_channels(mac->psoc,
filter);
} else { } else {
/* Here is the profile we need to connect to */ /* Here is the profile we need to connect to */
status = csr_roam_get_scan_filter_from_profile(mac, pProfile, status = csr_roam_get_scan_filter_from_profile(mac, pProfile,
@ -10814,7 +10823,10 @@ csr_roam_get_scan_filter_from_profile(struct mac_context *mac_ctx,
break; break;
} }
if (csr_roam_is_channel_valid(mac_ctx, if (csr_roam_is_channel_valid(mac_ctx,
ch_info->freq_list[i])) { ch_info->freq_list[i]) &&
wlan_cm_dual_sta_is_freq_allowed(
mac_ctx->psoc, ch_info->freq_list[i],
profile->csrPersona)) {
filter->chan_freq_list[filter->num_of_channels] = filter->chan_freq_list[filter->num_of_channels] =
ch_info->freq_list[i]; ch_info->freq_list[i];
filter->num_of_channels++; filter->num_of_channels++;
@ -10823,6 +10835,15 @@ csr_roam_get_scan_filter_from_profile(struct mac_context *mac_ctx,
ch_info->freq_list[i]); ch_info->freq_list[i]);
} }
} }
} else {
/*
* Channels allowed is not present in the roam_profile.
* Update the the channels for this connection if this is
* 2nd STA, with the channels other than the 1st connected
* STA, as dual sta roaming is supported only on one band.
*/
wlan_cm_dual_sta_roam_update_connect_channels(mac_ctx->psoc,
filter);
} }
if (profile->force_rsne_override) { if (profile->force_rsne_override) {

View File

@ -46,6 +46,7 @@
#include "wma_api.h" #include "wma_api.h"
#include "wmi_unified_param.h" #include "wmi_unified_param.h"
#include "wmi.h" #include "wmi.h"
#include "wlan_cm_roam_public_srtuct.h"
/* Platform specific configuration for max. no. of fragments */ /* Platform specific configuration for max. no. of fragments */
#define QCA_OL_11AC_TX_MAX_FRAGS 2 #define QCA_OL_11AC_TX_MAX_FRAGS 2
@ -1475,6 +1476,14 @@ QDF_STATUS wma_set_rssi_monitoring(tp_wma_handle wma,
} }
#endif /* FEATURE_RSSI_MONITOR */ #endif /* FEATURE_RSSI_MONITOR */
/**
* wma_map_pcl_weights - Map WMA pcl weights to wmi pcl weights
* @pcl_weight: Input PCL weight to be converted to wmi format
*
* Return: wmi_pcl_chan_weight
*/
wmi_pcl_chan_weight wma_map_pcl_weights(uint32_t pcl_weight);
QDF_STATUS wma_send_pdev_set_pcl_cmd(tp_wma_handle wma_handle, QDF_STATUS wma_send_pdev_set_pcl_cmd(tp_wma_handle wma_handle,
struct set_pcl_req *msg); struct set_pcl_req *msg);

View File

@ -9016,7 +9016,7 @@ void wma_log_completion_timeout(void *data)
* *
* Return: Mapped channel weight of type wmi_pcl_chan_weight * Return: Mapped channel weight of type wmi_pcl_chan_weight
*/ */
static wmi_pcl_chan_weight wma_map_pcl_weights(uint32_t pcl_weight) wmi_pcl_chan_weight wma_map_pcl_weights(uint32_t pcl_weight)
{ {
switch (pcl_weight) { switch (pcl_weight) {
case WEIGHT_OF_GROUP1_PCL_CHANNELS: case WEIGHT_OF_GROUP1_PCL_CHANNELS: