qcacld-3.0: Move rso related process to connection manager [PART 3]
Add new code to implement below functions for connection manager roam part: Propagate 'Change-Id: I49d64671f74b86c516d286c4b2aad69eda744b52' Filling below WMI cmd parameters related process: WMI_ROAM_AP_PROFILE WMI_ROAM_FILTER_CMDID Change-Id: I4870c69a0e0ca1e8cad734a591f09e402b7a32fa CRs-Fixed: 2745468
This commit is contained in:
@@ -188,11 +188,9 @@ cm_roam_update_config_req(struct wlan_objmgr_psoc *psoc,
|
||||
* process directly, generate a new function wlan_cm_roam_send_rso_cmd
|
||||
* for external usage.
|
||||
*/
|
||||
QDF_STATUS
|
||||
cm_roam_send_rso_cmd(struct wlan_objmgr_psoc *psoc,
|
||||
uint8_t vdev_id,
|
||||
uint8_t rso_command,
|
||||
uint8_t reason)
|
||||
QDF_STATUS cm_roam_send_rso_cmd(struct wlan_objmgr_psoc *psoc,
|
||||
uint8_t vdev_id, uint8_t rso_command,
|
||||
uint8_t reason)
|
||||
{
|
||||
QDF_STATUS status = QDF_STATUS_E_FAILURE;
|
||||
|
||||
@@ -279,6 +277,21 @@ cm_roam_switch_to_rso_stop(struct wlan_objmgr_pdev *pdev,
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
static void cm_roam_roam_invoke_in_progress(struct wlan_objmgr_psoc *psoc,
|
||||
uint8_t vdev_id, bool set)
|
||||
{
|
||||
struct wlan_objmgr_vdev *vdev;
|
||||
struct mlme_roam_after_data_stall *vdev_roam_params;
|
||||
|
||||
vdev = wlan_objmgr_get_vdev_by_id_from_psoc(psoc, vdev_id,
|
||||
WLAN_MLME_NB_ID);
|
||||
if (!vdev)
|
||||
return;
|
||||
vdev_roam_params = mlme_get_roam_invoke_params(vdev);
|
||||
if (vdev_roam_params)
|
||||
vdev_roam_params->roam_invoke_in_progress = set;
|
||||
wlan_objmgr_vdev_release_ref(vdev, WLAN_MLME_NB_ID);
|
||||
}
|
||||
/**
|
||||
* cm_roam_switch_to_deinit() - roam state handling for roam deinit
|
||||
* @pdev: pdev pointer
|
||||
@@ -298,6 +311,8 @@ cm_roam_switch_to_deinit(struct wlan_objmgr_pdev *pdev,
|
||||
struct wlan_objmgr_psoc *psoc = wlan_pdev_get_psoc(pdev);
|
||||
enum roam_offload_state cur_state = mlme_get_roam_state(psoc, vdev_id);
|
||||
|
||||
cm_roam_roam_invoke_in_progress(psoc, vdev_id, false);
|
||||
|
||||
switch (cur_state) {
|
||||
/*
|
||||
* If RSO stop is not done already, send RSO stop first and
|
||||
@@ -356,6 +371,8 @@ cm_roam_switch_to_init(struct wlan_objmgr_pdev *pdev,
|
||||
QDF_STATUS status;
|
||||
struct wlan_objmgr_psoc *psoc = wlan_pdev_get_psoc(pdev);
|
||||
|
||||
cm_roam_roam_invoke_in_progress(psoc, vdev_id, false);
|
||||
|
||||
dual_sta_roam_active =
|
||||
wlan_mlme_get_dual_sta_roaming_enabled(psoc);
|
||||
|
||||
|
@@ -28,22 +28,6 @@
|
||||
#include "wlan_cm_roam_public_srtuct.h"
|
||||
|
||||
#if defined(WLAN_FEATURE_HOST_ROAM) || defined(WLAN_FEATURE_ROAM_OFFLOAD)
|
||||
/**
|
||||
* cm_roam_send_rso_cmd() - Send rso command
|
||||
* @psoc: psoc pointer
|
||||
* @vdev_id: vdev id
|
||||
* @rso_command: roam scan offload command
|
||||
* @reason: reason for changing roam state for the requested vdev id
|
||||
*
|
||||
* This function is used to send rso command
|
||||
*
|
||||
* Return: QDF_STATUS
|
||||
*/
|
||||
QDF_STATUS
|
||||
cm_roam_send_rso_cmd(struct wlan_objmgr_psoc *psoc,
|
||||
uint8_t vdev_id,
|
||||
uint8_t rso_command,
|
||||
uint8_t reason);
|
||||
|
||||
/**
|
||||
* cm_roam_state_change() - Post roam state change to roam state machine
|
||||
@@ -61,5 +45,23 @@ cm_roam_state_change(struct wlan_objmgr_pdev *pdev,
|
||||
uint8_t vdev_id,
|
||||
enum roam_offload_state requested_state,
|
||||
uint8_t reason);
|
||||
|
||||
/**
|
||||
* cm_roam_send_rso_cmd() - send rso command
|
||||
* @psoc: psoc pointer
|
||||
* @vdev_id: vdev id
|
||||
* @rso_command: roam command to send
|
||||
* @reason: reason for changing roam state for the requested vdev id
|
||||
*
|
||||
* similar to csr_roam_offload_scan, will be used from many legacy
|
||||
* process directly, generate a new function wlan_cm_roam_send_rso_cmd
|
||||
* for external usage.
|
||||
*
|
||||
* Return: QDF_STATUS
|
||||
*/
|
||||
QDF_STATUS cm_roam_send_rso_cmd(struct wlan_objmgr_psoc *psoc,
|
||||
uint8_t vdev_id, uint8_t rso_command,
|
||||
uint8_t reason);
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
@@ -45,21 +45,6 @@ QDF_STATUS
|
||||
wlan_cm_enable_roaming_on_connected_sta(struct wlan_objmgr_pdev *pdev,
|
||||
uint8_t vdev_id);
|
||||
|
||||
/**
|
||||
* wlan_cm_start_roaming() - start roaming
|
||||
* @pdev: pdev pointer
|
||||
* @vdev_id: vdev id
|
||||
* @reason: reason to roam
|
||||
*
|
||||
* This function gets called to start roaming
|
||||
*
|
||||
* Return: QDF_STATUS
|
||||
*/
|
||||
QDF_STATUS
|
||||
wlan_cm_start_roaming(struct wlan_objmgr_pdev *pdev,
|
||||
uint8_t vdev_id,
|
||||
uint8_t reason);
|
||||
|
||||
/**
|
||||
* wlan_cm_roam_cmd_allowed() - check roam cmd is allowed or not
|
||||
* @psoc: pointer to psoc object
|
||||
@@ -93,22 +78,6 @@ wlan_cm_roam_fill_start_req(struct wlan_objmgr_psoc *psoc,
|
||||
uint8_t vdev_id,
|
||||
struct wlan_roam_start_config *req,
|
||||
uint8_t reason);
|
||||
|
||||
/**
|
||||
* wlan_cm_roam_send_rso_cmd() - Send rso command
|
||||
* @psoc: psoc pointer
|
||||
* @vdev_id: vdev id
|
||||
* @rso_command: roam scan offload command
|
||||
* @reason: reason for changing roam state for the requested vdev id
|
||||
*
|
||||
* This function is used to send rso command
|
||||
*
|
||||
* Return: QDF_STATUS
|
||||
*/
|
||||
QDF_STATUS wlan_cm_roam_send_rso_cmd(struct wlan_objmgr_psoc *psoc,
|
||||
uint8_t vdev_id,
|
||||
uint8_t rso_command,
|
||||
uint8_t reason);
|
||||
#else
|
||||
static inline QDF_STATUS
|
||||
wlan_cm_enable_roaming_on_connected_sta(struct wlan_objmgr_pdev *pdev,
|
||||
@@ -116,23 +85,6 @@ wlan_cm_enable_roaming_on_connected_sta(struct wlan_objmgr_pdev *pdev,
|
||||
{
|
||||
return QDF_STATUS_E_NOSUPPORT;
|
||||
}
|
||||
|
||||
static inline QDF_STATUS
|
||||
wlan_cm_start_roaming(struct wlan_objmgr_pdev *pdev,
|
||||
uint8_t vdev_id,
|
||||
uint8_t reason)
|
||||
{
|
||||
return QDF_STATUS_E_NOSUPPORT;
|
||||
}
|
||||
|
||||
static inline QDF_STATUS
|
||||
wlan_cm_roam_send_rso_cmd(struct wlan_objmgr_psoc *psoc,
|
||||
uint8_t vdev_id,
|
||||
uint8_t rso_command,
|
||||
uint8_t reason);
|
||||
{
|
||||
return QDF_STATUS_E_NOSUPPORT;
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
@@ -157,6 +109,77 @@ QDF_STATUS cm_roam_release_lock(void);
|
||||
*/
|
||||
char
|
||||
*cm_roam_get_requestor_string(enum wlan_cm_rso_control_requestor requestor);
|
||||
|
||||
/**
|
||||
* ucfg_cm_rso_init_deinit - Init or Deinit roaming module at firmware
|
||||
* @pdev: Pointer to pdev
|
||||
* @vdev_id: vdev id
|
||||
* @enable: true: Send RSO init and RSO enable
|
||||
* false: Send RSO stop
|
||||
*
|
||||
* Return: QDF_STATUS
|
||||
*/
|
||||
QDF_STATUS wlan_cm_rso_init_deinit(struct wlan_objmgr_pdev *pdev,
|
||||
uint8_t vdev_id, bool enable);
|
||||
|
||||
/**
|
||||
* wlan_cm_disable_rso - Disable roam scan offload to firmware
|
||||
* @pdev: Pointer to pdev
|
||||
* @vdev_id: vdev id
|
||||
* @requestor: RSO disable requestor
|
||||
* @reason: Reason for RSO disable
|
||||
*
|
||||
* Return: QDF_STATUS
|
||||
*/
|
||||
QDF_STATUS wlan_cm_disable_rso(struct wlan_objmgr_pdev *pdev, uint32_t vdev_id,
|
||||
enum wlan_cm_rso_control_requestor requestor,
|
||||
uint8_t reason);
|
||||
|
||||
/**
|
||||
* ucfg_cm_enable_rso - Enable roam scan offload to firmware
|
||||
* @pdev: Pointer to pdev
|
||||
* @vdev_id: vdev id
|
||||
* @requestor: RSO disable requestor
|
||||
* @reason: Reason for RSO disable
|
||||
*
|
||||
* Return: QDF_STATUS
|
||||
*/
|
||||
QDF_STATUS wlan_cm_enable_rso(struct wlan_objmgr_pdev *pdev, uint32_t vdev_id,
|
||||
enum wlan_cm_rso_control_requestor requestor,
|
||||
uint8_t reason);
|
||||
|
||||
/**
|
||||
* wlan_cm_roam_state_change() - Post roam state change to roam state machine
|
||||
* @pdev: pdev pointer
|
||||
* @vdev_id: vdev id
|
||||
* @requested_state: roam state to be set
|
||||
* @reason: reason for changing roam state for the requested vdev id
|
||||
*
|
||||
* This function posts roam state change to roam state machine handling
|
||||
*
|
||||
* Return: QDF_STATUS
|
||||
*/
|
||||
QDF_STATUS wlan_cm_roam_state_change(struct wlan_objmgr_pdev *pdev,
|
||||
uint8_t vdev_id,
|
||||
enum roam_offload_state requested_state,
|
||||
uint8_t reason);
|
||||
|
||||
/**
|
||||
* wlan_cm_roam_send_rso_cmd() - send rso command
|
||||
* @psoc: psoc pointer
|
||||
* @vdev_id: vdev id
|
||||
* @rso_command: roam command to send
|
||||
* @reason: reason for changing roam state for the requested vdev id
|
||||
*
|
||||
* similar to csr_roam_offload_scan, will be used from many legacy
|
||||
* process directly, generate a new function wlan_cm_roam_send_rso_cmd
|
||||
* for external usage.
|
||||
*
|
||||
* Return: QDF_STATUS
|
||||
*/
|
||||
QDF_STATUS wlan_cm_roam_send_rso_cmd(struct wlan_objmgr_psoc *psoc,
|
||||
uint8_t vdev_id, uint8_t rso_command,
|
||||
uint8_t reason);
|
||||
#endif
|
||||
|
||||
#ifdef WLAN_FEATURE_ROAM_OFFLOAD
|
||||
|
@@ -23,6 +23,8 @@
|
||||
|
||||
#include "wlan_objmgr_cmn.h"
|
||||
#include "reg_services_public_struct.h"
|
||||
#include "wlan_cm_bss_score_param.h"
|
||||
#include "wlan_blm_public_struct.h"
|
||||
#include "wmi_unified_param.h"
|
||||
#include "wmi_unified_sta_param.h"
|
||||
|
||||
@@ -117,6 +119,276 @@ struct wlan_roam_triggers {
|
||||
struct wlan_cm_roam_vendor_btm_params vendor_btm_param;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct ap_profile - Structure ap profile to match candidate
|
||||
* @flags: flags
|
||||
* @rssi_threshold: the value of the the candidate AP should higher by this
|
||||
* threshold than the rssi of the currrently associated AP
|
||||
* @ssid: ssid vlaue to be matched
|
||||
* @rsn_authmode: security params to be matched
|
||||
* @rsn_ucastcipherset: unicast cipher set
|
||||
* @rsn_mcastcipherset: mcast/group cipher set
|
||||
* @rsn_mcastmgmtcipherset: mcast/group management frames cipher set
|
||||
* @rssi_abs_thresh: the value of the candidate AP should higher than this
|
||||
* absolute RSSI threshold. Zero means no absolute minimum
|
||||
* RSSI is required. units are the offset from the noise
|
||||
* floor in dB
|
||||
*/
|
||||
struct ap_profile {
|
||||
uint32_t flags;
|
||||
uint32_t rssi_threshold;
|
||||
struct wlan_ssid ssid;
|
||||
uint32_t rsn_authmode;
|
||||
uint32_t rsn_ucastcipherset;
|
||||
uint32_t rsn_mcastcipherset;
|
||||
uint32_t rsn_mcastmgmtcipherset;
|
||||
uint32_t rssi_abs_thresh;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct scoring_param - scoring param to sortlist selected AP
|
||||
* @disable_bitmap: Each bit will be either allow(0)/disallow(1) to
|
||||
* considered the roam score param.
|
||||
* @rssi_weightage: RSSI weightage out of total score in %
|
||||
* @ht_weightage: HT weightage out of total score in %.
|
||||
* @vht_weightage: VHT weightage out of total score in %.
|
||||
* @he_weightaget: 11ax weightage out of total score in %.
|
||||
* @bw_weightage: Bandwidth weightage out of total score in %.
|
||||
* @band_weightage: Band(2G/5G) weightage out of total score in %.
|
||||
* @nss_weightage: NSS(1x1 / 2x2)weightage out of total score in %.
|
||||
* @esp_qbss_weightage: ESP/QBSS weightage out of total score in %.
|
||||
* @beamforming_weightage: Beamforming weightage out of total score in %.
|
||||
* @pcl_weightage: PCL weightage out of total score in %.
|
||||
* @oce_wan_weightage OCE WAN metrics weightage out of total score in %.
|
||||
* @oce_ap_tx_pwr_weightage: OCE AP TX power score in %
|
||||
* @oce_subnet_id_weightage: OCE subnet id score in %
|
||||
* @bw_index_score: channel BW scoring percentage information.
|
||||
* BITS 0-7 :- It contains scoring percentage of 20MHz BW
|
||||
* BITS 8-15 :- It contains scoring percentage of 40MHz BW
|
||||
* BITS 16-23 :- It contains scoring percentage of 80MHz BW
|
||||
* BITS 24-31 :- It contains scoring percentage of 1600MHz BW
|
||||
* The value of each index must be 0-100
|
||||
* @band_index_score: band scording percentage information.
|
||||
* BITS 0-7 :- It contains scoring percentage of 2G
|
||||
* BITS 8-15 :- It contains scoring percentage of 5G
|
||||
* BITS 16-23 :- reserved
|
||||
* BITS 24-31 :- reserved
|
||||
* The value of each index must be 0-100
|
||||
* @nss_index_score: NSS scoring percentage information.
|
||||
* BITS 0-7 :- It contains scoring percentage of 1x1
|
||||
* BITS 8-15 :- It contains scoring percentage of 2x2
|
||||
* BITS 16-23 :- It contains scoring percentage of 3x3
|
||||
* BITS 24-31 :- It contains scoring percentage of 4x4
|
||||
* The value of each index must be 0-100
|
||||
* @roam_score_delta: delta value expected over the roam score of the candidate
|
||||
* ap over the roam score of the current ap
|
||||
* @roam_trigger_bitmap: bitmap of roam triggers on which roam_score_delta
|
||||
* will be applied
|
||||
* @vendor_roam_score_algorithm: Preferred algorithm for roam candidate selection
|
||||
* @cand_min_roam_score_delta: candidate min roam score delta value
|
||||
* @rssi_scoring: RSSI scoring information.
|
||||
* @esp_qbss_scoring: ESP/QBSS scoring percentage information
|
||||
* @oce_wan_scoring: OCE WAN metrics percentage information
|
||||
*/
|
||||
struct scoring_param {
|
||||
uint32_t disable_bitmap;
|
||||
int32_t rssi_weightage;
|
||||
int32_t ht_weightage;
|
||||
int32_t vht_weightage;
|
||||
int32_t he_weightage;
|
||||
int32_t bw_weightage;
|
||||
int32_t band_weightage;
|
||||
int32_t nss_weightage;
|
||||
int32_t esp_qbss_weightage;
|
||||
int32_t beamforming_weightage;
|
||||
int32_t pcl_weightage;
|
||||
int32_t oce_wan_weightage;
|
||||
uint32_t oce_ap_tx_pwr_weightage;
|
||||
uint32_t oce_subnet_id_weightage;
|
||||
uint32_t bw_index_score;
|
||||
uint32_t band_index_score;
|
||||
uint32_t nss_index_score;
|
||||
uint32_t roam_score_delta;
|
||||
uint32_t roam_trigger_bitmap;
|
||||
uint32_t vendor_roam_score_algorithm;
|
||||
uint32_t cand_min_roam_score_delta;
|
||||
struct rssi_config_score rssi_scoring;
|
||||
struct per_slot_score esp_qbss_scoring;
|
||||
struct per_slot_score oce_wan_scoring;
|
||||
};
|
||||
|
||||
/*
|
||||
* Currently roam score delta value and min rssi values are sent
|
||||
* for 2 triggers
|
||||
*/
|
||||
#define NUM_OF_ROAM_TRIGGERS 2
|
||||
#define IDLE_ROAM_TRIGGER 0
|
||||
#define BTM_ROAM_TRIGGER 1
|
||||
|
||||
#define DEAUTH_MIN_RSSI 0
|
||||
#define BMISS_MIN_RSSI 1
|
||||
|
||||
/**
|
||||
* enum roam_trigger_reason - Reason for triggering roam
|
||||
* ROAM_TRIGGER_REASON_NONE: Roam trigger reason none
|
||||
* ROAM_TRIGGER_REASON_PER: Roam triggered due to packet error
|
||||
* ROAM_TRIGGER_REASON_BMISS: Roam triggered due to beacon miss
|
||||
* ROAM_TRIGGER_REASON_LOW_RSSI: Roam triggered due to low RSSI of current
|
||||
* connected AP.
|
||||
* ROAM_TRIGGER_REASON_HIGH_RSSI: Roam triggered because sta is connected to
|
||||
* a AP in 2.4GHz band and a better 5GHz AP is available
|
||||
* ROAM_TRIGGER_REASON_PERIODIC: Roam triggered as better AP was found during
|
||||
* periodic roam scan.
|
||||
* ROAM_TRIGGER_REASON_MAWC: Motion Aided WiFi Connectivity triggered roam.
|
||||
* ROAM_TRIGGER_REASON_DENSE: Roaming triggered due to dense environment
|
||||
* detected.
|
||||
* ROAM_TRIGGER_REASON_BACKGROUND: Roam triggered due to current AP having
|
||||
* poor rssi and scan candidate found in scan results provided by other
|
||||
* scan clients.
|
||||
* ROAM_TRIGGER_REASON_FORCED: Forced roam trigger.
|
||||
* ROAM_TRIGGER_REASON_BTM: Roam triggered due to AP sent BTM query with
|
||||
* Disassoc imminent bit set.
|
||||
* ROAM_TRIGGER_REASON_UNIT_TEST: Roam triggered due to unit test command.
|
||||
* ROAM_TRIGGER_REASON_BSS_LOAD: Roam triggered due to high channel utilization
|
||||
* in the current connected channel
|
||||
* ROAM_TRIGGER_REASON_DEAUTH: Roam triggered due to deauth received from the
|
||||
* current connected AP.
|
||||
* ROAM_TRIGGER_REASON_IDLE: Roam triggered due to inactivity of the device.
|
||||
* ROAM_TRIGGER_REASON_STA_KICKOUT: Roam triggered due to sta kickout event.
|
||||
* ROAM_TRIGGER_REASON_ESS_RSSI: Roam triggered due to ess rssi
|
||||
* ROAM_TRIGGER_REASON_WTC_BTM: Roam triggered due to WTC BTM
|
||||
* ROAM_TRIGGER_REASON_MAX: Maximum number of roam triggers
|
||||
*/
|
||||
enum roam_trigger_reason {
|
||||
ROAM_TRIGGER_REASON_NONE = 0,
|
||||
ROAM_TRIGGER_REASON_PER,
|
||||
ROAM_TRIGGER_REASON_BMISS,
|
||||
ROAM_TRIGGER_REASON_LOW_RSSI,
|
||||
ROAM_TRIGGER_REASON_HIGH_RSSI,
|
||||
ROAM_TRIGGER_REASON_PERIODIC,
|
||||
ROAM_TRIGGER_REASON_MAWC,
|
||||
ROAM_TRIGGER_REASON_DENSE,
|
||||
ROAM_TRIGGER_REASON_BACKGROUND,
|
||||
ROAM_TRIGGER_REASON_FORCED,
|
||||
ROAM_TRIGGER_REASON_BTM,
|
||||
ROAM_TRIGGER_REASON_UNIT_TEST,
|
||||
ROAM_TRIGGER_REASON_BSS_LOAD,
|
||||
ROAM_TRIGGER_REASON_DEAUTH,
|
||||
ROAM_TRIGGER_REASON_IDLE,
|
||||
ROAM_TRIGGER_REASON_STA_KICKOUT,
|
||||
ROAM_TRIGGER_REASON_ESS_RSSI,
|
||||
ROAM_TRIGGER_REASON_WTC_BTM,
|
||||
ROAM_TRIGGER_REASON_MAX,
|
||||
};
|
||||
|
||||
/**
|
||||
* struct roam_trigger_min_rssi - structure to hold minimum rssi value of
|
||||
* candidate APs for each roam trigger
|
||||
* @min_rssi: minimum RSSI of candidate AP for the trigger reason specified in
|
||||
* trigger_id
|
||||
* @trigger_reason: Roam trigger reason
|
||||
*/
|
||||
struct roam_trigger_min_rssi {
|
||||
int32_t min_rssi;
|
||||
enum roam_trigger_reason trigger_reason;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct roam_trigger_score_delta - structure to hold roam score delta value of
|
||||
* candidate APs for each roam trigger
|
||||
* @roam_score_delta: delta value in score of the candidate AP for the roam
|
||||
* trigger mentioned in the trigger_id.
|
||||
* @trigger_reason: Roam trigger reason
|
||||
*/
|
||||
struct roam_trigger_score_delta {
|
||||
uint32_t roam_score_delta;
|
||||
enum roam_trigger_reason trigger_reason;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct ap_profile_params - ap profile params
|
||||
* @vdev_id: vdev id
|
||||
* @profile: ap profile to match candidate
|
||||
* @param: scoring params to short candidate
|
||||
* @min_rssi_params: Min RSSI values for different roam triggers
|
||||
* @score_delta_params: Roam score delta values for different triggers
|
||||
*/
|
||||
struct ap_profile_params {
|
||||
uint8_t vdev_id;
|
||||
struct ap_profile profile;
|
||||
struct scoring_param param;
|
||||
struct roam_trigger_min_rssi min_rssi_params[NUM_OF_ROAM_TRIGGERS];
|
||||
struct roam_trigger_score_delta score_delta_param[NUM_OF_ROAM_TRIGGERS];
|
||||
};
|
||||
|
||||
#define MAX_SSID_ALLOWED_LIST 4
|
||||
#define MAX_BSSID_AVOID_LIST 16
|
||||
#define MAX_BSSID_FAVORED 16
|
||||
|
||||
/**
|
||||
* struct roam_scan_filter_params - Structure holding roaming scan
|
||||
* parameters
|
||||
* @op_bitmap: bitmap to determine reason of roaming
|
||||
* @vdev_id: vdev id
|
||||
* @num_bssid_black_list: The number of BSSID's that we should avoid
|
||||
* connecting to. It is like a blacklist of BSSID's.
|
||||
* @num_ssid_white_list: The number of SSID profiles that are in the
|
||||
* Whitelist. When roaming, we consider the BSSID's with
|
||||
* this SSID also for roaming apart from the connected
|
||||
* one's
|
||||
* @num_bssid_preferred_list: Number of BSSID's which have a preference over
|
||||
* others
|
||||
* @bssid_avoid_list: Blacklist SSID's
|
||||
* @ssid_allowed_list: Whitelist SSID's
|
||||
* @bssid_favored: Favorable BSSID's
|
||||
* @bssid_favored_factor: RSSI to be added to this BSSID to prefer it
|
||||
* @lca_disallow_config_present: LCA [Last Connected AP] disallow config
|
||||
* present
|
||||
* @disallow_duration: How long LCA AP will be disallowed before it can be a
|
||||
* roaming candidate again, in seconds
|
||||
* @rssi_channel_penalization: How much RSSI will be penalized if candidate(s)
|
||||
* are found in the same channel as disallowed
|
||||
* AP's, in units of db
|
||||
* @num_disallowed_aps: How many APs the target should maintain in its LCA
|
||||
* list
|
||||
* @delta_rssi: (dB units) when AB in RSSI blacklist improved by at least
|
||||
* delta_rssi,it will be removed from blacklist
|
||||
*
|
||||
* This structure holds all the key parameters related to
|
||||
* initial connection and roaming connections.
|
||||
*/
|
||||
|
||||
struct roam_scan_filter_params {
|
||||
uint32_t op_bitmap;
|
||||
uint8_t vdev_id;
|
||||
uint32_t num_bssid_black_list;
|
||||
uint32_t num_ssid_white_list;
|
||||
uint32_t num_bssid_preferred_list;
|
||||
struct qdf_mac_addr bssid_avoid_list[MAX_BSSID_AVOID_LIST];
|
||||
struct wlan_ssid ssid_allowed_list[MAX_SSID_ALLOWED_LIST];
|
||||
struct qdf_mac_addr bssid_favored[MAX_BSSID_FAVORED];
|
||||
uint8_t bssid_favored_factor[MAX_BSSID_FAVORED];
|
||||
uint8_t lca_disallow_config_present;
|
||||
uint32_t disallow_duration;
|
||||
uint32_t rssi_channel_penalization;
|
||||
uint32_t num_disallowed_aps;
|
||||
uint32_t num_rssi_rejection_ap;
|
||||
struct reject_ap_config_params
|
||||
rssi_rejection_ap[MAX_RSSI_AVOID_BSSID_LIST];
|
||||
uint32_t delta_rssi;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct wlan_roam_scan_filter_params - structure containing parameters for
|
||||
* roam scan offload filter
|
||||
* @reason: reason for changing roam state for the requested vdev id
|
||||
* @filter_params: roam scan filter parameters
|
||||
*/
|
||||
struct wlan_roam_scan_filter_params {
|
||||
uint8_t reason;
|
||||
struct roam_scan_filter_params filter_params;
|
||||
};
|
||||
|
||||
#ifdef ROAM_OFFLOAD_V1
|
||||
#define NOISE_FLOOR_DBM_DEFAULT (-96)
|
||||
#define RSSI_MIN_VALUE (-128)
|
||||
@@ -240,6 +512,8 @@ struct wlan_roam_scan_period_params {
|
||||
* @reason_vsie_enable: roam reason vsie enable parameters
|
||||
* @roam_triggers: roam triggers parameters
|
||||
* @scan_period_params: roam scan period parameters
|
||||
* @profile_params: ap profile parameters
|
||||
* @scan_filter_params: roam scan filter parameters
|
||||
*/
|
||||
struct wlan_roam_start_config {
|
||||
struct wlan_roam_offload_scan_rssi_params rssi_params;
|
||||
@@ -247,6 +521,8 @@ struct wlan_roam_start_config {
|
||||
struct wlan_roam_reason_vsie_enable reason_vsie_enable;
|
||||
struct wlan_roam_triggers roam_triggers;
|
||||
struct wlan_roam_scan_period_params scan_period_params;
|
||||
struct ap_profile_params profile_params;
|
||||
struct wlan_roam_scan_filter_params scan_filter_params;
|
||||
/* other wmi cmd structures */
|
||||
};
|
||||
|
||||
|
@@ -23,7 +23,10 @@
|
||||
#ifndef _WLAN_CM_ROAM_UCFG_API_H_
|
||||
#define _WLAN_CM_ROAM_UCFG_API_H_
|
||||
|
||||
#include "wlan_cm_roam_api.h"
|
||||
|
||||
#ifdef ROAM_OFFLOAD_V1
|
||||
|
||||
/**
|
||||
* ucfg_user_space_enable_disable_rso - Enable/Disable Roam Scan offload
|
||||
* to firmware.
|
||||
@@ -40,6 +43,17 @@ ucfg_user_space_enable_disable_rso(struct wlan_objmgr_pdev *pdev,
|
||||
uint8_t vdev_id,
|
||||
const bool is_fast_roam_enabled);
|
||||
|
||||
/*
|
||||
* ucfg_cm_abort_roam_scan() -abort current roam scan cycle by roam scan
|
||||
* offload module.
|
||||
* @pdev: Pointer to pdev
|
||||
* vdev_id - vdev Identifier
|
||||
*
|
||||
* Return QDF_STATUS
|
||||
*/
|
||||
QDF_STATUS ucfg_cm_abort_roam_scan(struct wlan_objmgr_pdev *pdev,
|
||||
uint8_t vdev_id);
|
||||
|
||||
/**
|
||||
* ucfg_cm_rso_init_deinit - Init or Deinit roaming module at firmware
|
||||
* @pdev: Pointer to pdev
|
||||
@@ -49,9 +63,12 @@ ucfg_user_space_enable_disable_rso(struct wlan_objmgr_pdev *pdev,
|
||||
*
|
||||
* Return: QDF_STATUS
|
||||
*/
|
||||
QDF_STATUS
|
||||
ucfg_cm_rso_init_deinit(struct wlan_objmgr_pdev *pdev,
|
||||
uint8_t vdev_id, bool enable);
|
||||
static inline QDF_STATUS
|
||||
ucfg_cm_rso_init_deinit(struct wlan_objmgr_pdev *pdev, uint8_t vdev_id,
|
||||
bool enable)
|
||||
{
|
||||
return wlan_cm_rso_init_deinit(pdev, vdev_id, enable);
|
||||
}
|
||||
|
||||
/**
|
||||
* ucfg_cm_disable_rso - Disable roam scan offload to firmware
|
||||
@@ -62,9 +79,13 @@ ucfg_cm_rso_init_deinit(struct wlan_objmgr_pdev *pdev,
|
||||
*
|
||||
* Return: QDF_STATUS
|
||||
*/
|
||||
static inline
|
||||
QDF_STATUS ucfg_cm_disable_rso(struct wlan_objmgr_pdev *pdev, uint32_t vdev_id,
|
||||
enum wlan_cm_rso_control_requestor requestor,
|
||||
uint8_t reason);
|
||||
uint8_t reason)
|
||||
{
|
||||
return wlan_cm_disable_rso(pdev, vdev_id, requestor, reason);
|
||||
}
|
||||
|
||||
/**
|
||||
* ucfg_cm_enable_rso - Enable roam scan offload to firmware
|
||||
@@ -75,8 +96,12 @@ QDF_STATUS ucfg_cm_disable_rso(struct wlan_objmgr_pdev *pdev, uint32_t vdev_id,
|
||||
*
|
||||
* Return: QDF_STATUS
|
||||
*/
|
||||
static inline
|
||||
QDF_STATUS ucfg_cm_enable_rso(struct wlan_objmgr_pdev *pdev, uint32_t vdev_id,
|
||||
enum wlan_cm_rso_control_requestor requestor,
|
||||
uint8_t reason);
|
||||
uint8_t reason)
|
||||
{
|
||||
return wlan_cm_enable_rso(pdev, vdev_id, requestor, reason);
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
@@ -75,23 +75,115 @@ wlan_cm_enable_roaming_on_connected_sta(struct wlan_objmgr_pdev *pdev,
|
||||
WLAN_ROAM_RSO_ENABLED,
|
||||
REASON_CTX_INIT);
|
||||
}
|
||||
#endif
|
||||
|
||||
QDF_STATUS wlan_cm_start_roaming(struct wlan_objmgr_pdev *pdev,
|
||||
uint8_t vdev_id, uint8_t reason)
|
||||
char *cm_roam_get_requestor_string(enum wlan_cm_rso_control_requestor requestor)
|
||||
{
|
||||
return cm_roam_state_change(pdev, vdev_id,
|
||||
WLAN_ROAM_RSO_ENABLED, reason);
|
||||
switch (requestor) {
|
||||
case RSO_INVALID_REQUESTOR:
|
||||
default:
|
||||
return "No requestor";
|
||||
case RSO_START_BSS:
|
||||
return "SAP start";
|
||||
case RSO_CHANNEL_SWITCH:
|
||||
return "CSA";
|
||||
case RSO_CONNECT_START:
|
||||
return "STA connection";
|
||||
case RSO_SAP_CHANNEL_CHANGE:
|
||||
return "SAP Ch switch";
|
||||
case RSO_NDP_CON_ON_NDI:
|
||||
return "NDP connection";
|
||||
case RSO_SET_PCL:
|
||||
return "Set PCL";
|
||||
}
|
||||
}
|
||||
|
||||
QDF_STATUS
|
||||
wlan_cm_rso_init_deinit(struct wlan_objmgr_pdev *pdev, uint8_t vdev_id,
|
||||
bool enable)
|
||||
{
|
||||
uint8_t reason = REASON_SUPPLICANT_DE_INIT_ROAMING;
|
||||
QDF_STATUS status;
|
||||
|
||||
status = cm_roam_acquire_lock();
|
||||
if (QDF_IS_STATUS_ERROR(status))
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
|
||||
if (enable)
|
||||
reason = REASON_SUPPLICANT_INIT_ROAMING;
|
||||
|
||||
status = cm_roam_state_change(
|
||||
pdev, vdev_id,
|
||||
enable ? WLAN_ROAM_RSO_ENABLED : WLAN_ROAM_DEINIT,
|
||||
reason);
|
||||
cm_roam_release_lock();
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
QDF_STATUS wlan_cm_disable_rso(struct wlan_objmgr_pdev *pdev, uint32_t vdev_id,
|
||||
enum wlan_cm_rso_control_requestor requestor,
|
||||
uint8_t reason)
|
||||
{
|
||||
struct wlan_objmgr_psoc *psoc = wlan_pdev_get_psoc(pdev);
|
||||
QDF_STATUS status;
|
||||
|
||||
status = cm_roam_acquire_lock();
|
||||
if (QDF_IS_STATUS_ERROR(status))
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
|
||||
if (reason == REASON_DRIVER_DISABLED && requestor)
|
||||
mlme_set_operations_bitmap(psoc, vdev_id, requestor, false);
|
||||
|
||||
mlme_debug("ROAM_CONFIG: vdev[%d] Disable roaming - requestor:%s",
|
||||
vdev_id, cm_roam_get_requestor_string(requestor));
|
||||
|
||||
status = cm_roam_state_change(pdev, vdev_id, WLAN_ROAM_RSO_STOPPED,
|
||||
REASON_DRIVER_DISABLED);
|
||||
cm_roam_release_lock();
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
QDF_STATUS wlan_cm_enable_rso(struct wlan_objmgr_pdev *pdev, uint32_t vdev_id,
|
||||
enum wlan_cm_rso_control_requestor requestor,
|
||||
uint8_t reason)
|
||||
{
|
||||
struct wlan_objmgr_psoc *psoc = wlan_pdev_get_psoc(pdev);
|
||||
QDF_STATUS status;
|
||||
|
||||
if (reason == REASON_DRIVER_DISABLED && requestor)
|
||||
mlme_set_operations_bitmap(psoc, vdev_id, requestor, true);
|
||||
|
||||
status = cm_roam_acquire_lock();
|
||||
if (QDF_IS_STATUS_ERROR(status))
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
|
||||
mlme_debug("ROAM_CONFIG: vdev[%d] Enable roaming - requestor:%s",
|
||||
vdev_id, cm_roam_get_requestor_string(requestor));
|
||||
|
||||
status = cm_roam_state_change(pdev, vdev_id, WLAN_ROAM_RSO_ENABLED,
|
||||
REASON_DRIVER_ENABLED);
|
||||
cm_roam_release_lock();
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
QDF_STATUS wlan_cm_roam_state_change(struct wlan_objmgr_pdev *pdev,
|
||||
uint8_t vdev_id,
|
||||
enum roam_offload_state requested_state,
|
||||
uint8_t reason)
|
||||
{
|
||||
return cm_roam_state_change(pdev, vdev_id, requested_state, reason);
|
||||
}
|
||||
|
||||
QDF_STATUS wlan_cm_roam_send_rso_cmd(struct wlan_objmgr_psoc *psoc,
|
||||
uint8_t vdev_id,
|
||||
uint8_t rso_command,
|
||||
uint8_t vdev_id, uint8_t rso_command,
|
||||
uint8_t reason)
|
||||
{
|
||||
return cm_roam_send_rso_cmd(psoc, vdev_id, rso_command, reason);
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef WLAN_FEATURE_ROAM_OFFLOAD
|
||||
QDF_STATUS
|
||||
@@ -142,8 +234,8 @@ void wlan_cm_roam_activate_pcl_per_vdev(struct wlan_objmgr_psoc *psoc,
|
||||
|
||||
/* value - true (vdev pcl) false - pdev pcl */
|
||||
mlme_priv->cm_roam.pcl_vdev_cmd_active = pcl_per_vdev;
|
||||
mlme_legacy_debug("CM_ROAM: vdev[%d] SET PCL cmd level - [%s]", vdev_id,
|
||||
pcl_per_vdev ? "VDEV" : "PDEV");
|
||||
mlme_debug("CM_ROAM: vdev[%d] SET PCL cmd level - [%s]", vdev_id,
|
||||
pcl_per_vdev ? "VDEV" : "PDEV");
|
||||
}
|
||||
|
||||
bool wlan_cm_roam_is_pcl_per_vdev_active(struct wlan_objmgr_psoc *psoc,
|
||||
@@ -227,7 +319,7 @@ wlan_cm_dual_sta_roam_update_connect_channels(struct wlan_objmgr_psoc *psoc,
|
||||
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");
|
||||
mlme_err("Error in getting valid channels");
|
||||
qdf_mem_free(channel_list);
|
||||
return;
|
||||
}
|
||||
@@ -329,26 +421,3 @@ wlan_cm_roam_get_vendor_btm_params(struct wlan_objmgr_psoc *psoc,
|
||||
wlan_objmgr_vdev_release_ref(vdev, WLAN_MLME_NB_ID);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef ROAM_OFFLOAD_V1
|
||||
char *cm_roam_get_requestor_string(enum wlan_cm_rso_control_requestor requestor)
|
||||
{
|
||||
switch (requestor) {
|
||||
case RSO_INVALID_REQUESTOR:
|
||||
default:
|
||||
return "No requestor";
|
||||
case RSO_START_BSS:
|
||||
return "SAP start";
|
||||
case RSO_CHANNEL_SWITCH:
|
||||
return "CSA";
|
||||
case RSO_CONNECT_START:
|
||||
return "STA connection";
|
||||
case RSO_SAP_CHANNEL_CHANGE:
|
||||
return "SAP Ch switch";
|
||||
case RSO_NDP_CON_ON_NDI:
|
||||
return "NDP connection";
|
||||
case RSO_SET_PCL:
|
||||
return "Set PCL";
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
@@ -20,7 +20,9 @@
|
||||
* Implementation for roaming ucfg public functionality.
|
||||
*/
|
||||
|
||||
#include "wlan_mlme_ucfg_api.h"
|
||||
#include "wlan_cm_roam_ucfg_api.h"
|
||||
#include "../../core/src/wlan_cm_roam_offload.h"
|
||||
|
||||
#ifdef ROAM_OFFLOAD_V1
|
||||
QDF_STATUS
|
||||
@@ -31,6 +33,8 @@ ucfg_user_space_enable_disable_rso(struct wlan_objmgr_pdev *pdev,
|
||||
bool supplicant_disabled_roaming;
|
||||
struct wlan_objmgr_psoc *psoc = wlan_pdev_get_psoc(pdev);
|
||||
QDF_STATUS status;
|
||||
bool lfr_enabled;
|
||||
enum roam_offload_state state;
|
||||
|
||||
/*
|
||||
* If the ini "FastRoamEnabled" is disabled, don't allow the
|
||||
@@ -38,7 +42,8 @@ ucfg_user_space_enable_disable_rso(struct wlan_objmgr_pdev *pdev,
|
||||
*/
|
||||
ucfg_mlme_is_lfr_enabled(psoc, &lfr_enabled);
|
||||
if (!lfr_enabled) {
|
||||
mlme_legacy_debug("ROAM_CONFIG: Fast roam ini is disabled");
|
||||
mlme_debug("ROAM_CONFIG: Fast roam ini is disabled. is_fast_roam_enabled %d",
|
||||
is_fast_roam_enabled);
|
||||
if (!is_fast_roam_enabled)
|
||||
return QDF_STATUS_SUCCESS;
|
||||
|
||||
@@ -56,7 +61,7 @@ ucfg_user_space_enable_disable_rso(struct wlan_objmgr_pdev *pdev,
|
||||
supplicant_disabled_roaming =
|
||||
mlme_get_supplicant_disabled_roaming(psoc, vdev_id);
|
||||
if (!is_fast_roam_enabled && supplicant_disabled_roaming) {
|
||||
mlme_legacy_debug("ROAM_CONFIG: RSO already disabled by supplicant");
|
||||
mlme_debug("ROAM_CONFIG: RSO already disabled by supplicant");
|
||||
return QDF_STATUS_E_ALREADY;
|
||||
}
|
||||
|
||||
@@ -71,76 +76,25 @@ ucfg_user_space_enable_disable_rso(struct wlan_objmgr_pdev *pdev,
|
||||
return status;
|
||||
}
|
||||
|
||||
/*
|
||||
* Driver internally invoked RSO operation/configuration APIs.
|
||||
*/
|
||||
QDF_STATUS
|
||||
ucfg_cm_rso_init_deinit(struct wlan_objmgr_pdev *pdev,
|
||||
uint8_t vdev_id, bool enable)
|
||||
QDF_STATUS ucfg_cm_abort_roam_scan(struct wlan_objmgr_pdev *pdev,
|
||||
uint8_t vdev_id)
|
||||
{
|
||||
struct wlan_objmgr_psoc *psoc = wlan_pdev_get_psoc(pdev);
|
||||
uint8_t reason = REASON_SUPPLICANT_DE_INIT_ROAMING;
|
||||
QDF_STATUS status;
|
||||
struct wlan_objmgr_psoc *psoc = wlan_pdev_get_psoc(pdev);
|
||||
bool roam_scan_offload_enabled;
|
||||
|
||||
ucfg_mlme_is_roam_scan_offload_enabled(psoc,
|
||||
&roam_scan_offload_enabled);
|
||||
if (!roam_scan_offload_enabled)
|
||||
return QDF_STATUS_SUCCESS;
|
||||
|
||||
status = cm_roam_acquire_lock();
|
||||
if (QDF_IS_STATUS_ERROR(status))
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
return status;
|
||||
|
||||
if (enable)
|
||||
reason = REASON_SUPPLICANT_INIT_ROAMING;
|
||||
|
||||
status = cm_roam_state_change(
|
||||
pdev, vdev_id,
|
||||
enable ? WLAN_ROAM_RSO_ENABLED : WLAN_ROAM_DEINIT,
|
||||
reason);
|
||||
cm_roam_release_lock();
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
QDF_STATUS ucfg_cm_disable_rso(struct wlan_objmgr_pdev *pdev, uint32_t vdev_id,
|
||||
enum wlan_cm_rso_control_requestor requestor,
|
||||
uint8_t reason)
|
||||
{
|
||||
struct wlan_objmgr_psoc *psoc = wlan_pdev_get_psoc(pdev);
|
||||
QDF_STATUS status;
|
||||
|
||||
status = cm_roam_acquire_lock();
|
||||
if (QDF_IS_STATUS_ERROR(status))
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
|
||||
if (reason == REASON_DRIVER_DISABLED && requestor)
|
||||
mlme_set_operations_bitmap(psoc, vdev_id, requestor, false);
|
||||
|
||||
mlme_legacy_debug("ROAM_CONFIG: vdev[%d] Disable roaming - requestor:%s",
|
||||
vdev_id, cm_roam_get_requestor_string(requestor));
|
||||
|
||||
status = cm_roam_state_change(pdev, vdev_id, WLAN_ROAM_RSO_STOPPED,
|
||||
REASON_DRIVER_DISABLED);
|
||||
cm_roam_release_lock();
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
QDF_STATUS ucfg_cm_enable_rso(struct wlan_objmgr_pdev *pdev, uint32_t vdev_id,
|
||||
enum wlan_cm_rso_control_requestor requestor,
|
||||
uint8_t reason)
|
||||
{
|
||||
struct wlan_objmgr_psoc *psoc = wlan_pdev_get_psoc(pdev);
|
||||
QDF_STATUS status;
|
||||
|
||||
if (reason == REASON_DRIVER_DISABLED && requestor)
|
||||
mlme_set_operations_bitmap(mac->psoc, vdev_id, requestor, true);
|
||||
|
||||
status = cm_roam_acquire_lock();
|
||||
if (QDF_IS_STATUS_ERROR(status))
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
|
||||
mlme_legacy_debug("ROAM_CONFIG: vdev[%d] Enable roaming - requestor:%s",
|
||||
vdev_id, cm_roam_get_requestor_string(requestor));
|
||||
|
||||
status = cm_roam_state_change(pdev, vdev_id, WLAN_ROAM_RSO_STARTED,
|
||||
REASON_DRIVER_ENABLED);
|
||||
status = cm_roam_state_change(pdev, vdev_id,
|
||||
ROAM_SCAN_OFFLOAD_ABORT_SCAN,
|
||||
REASON_ROAM_ABORT_ROAM_SCAN);
|
||||
cm_roam_release_lock();
|
||||
|
||||
return status;
|
||||
|
مرجع در شماره جدید
Block a user