qcacld-3.0: wma to target_if migration of wmi_roam_event
Currently, wmi_roam_event_id data is extracted and processing is also done in wma. This is not inline with component model where target_if takes care of data extraction and handover the extracted data to corresponding component(connection mgr in this case). Add changes to support the same. As the legacy CSR/LIM is not yet converged, have a wrapper from connection mgr to wma to call these legacy APIs. Change-Id: I0e22bbccfe21200b90771a01f9ee7454f4ecb119 CRs-Fixed: 2990355
This commit is contained in:

committed by
Madan Koyyalamudi

parent
a011a54fee
commit
78cb3008e6
@@ -903,6 +903,30 @@ void wlan_cm_get_psk_pmk(struct wlan_objmgr_pdev *pdev,
|
||||
QDF_STATUS
|
||||
cm_akm_roam_allowed(struct wlan_objmgr_psoc *psoc,
|
||||
struct wlan_objmgr_vdev *vdev);
|
||||
|
||||
#ifdef ROAM_TARGET_IF_CONVERGENCE
|
||||
|
||||
/**
|
||||
* cm_invalid_roam_reason_handler() - Handler for invalid roam reason
|
||||
* @vdev_id: vdev id
|
||||
* @notif: roam notification of type enum cm_roam_notif
|
||||
*
|
||||
* Return: QDF_STATUS
|
||||
*/
|
||||
void cm_invalid_roam_reason_handler(uint32_t vdev_id, enum cm_roam_notif notif);
|
||||
|
||||
/**
|
||||
* cm_handle_roam_reason_ho_failed() - Handler for roam due to ho failure
|
||||
* @vdev_id: vdev id
|
||||
* @bssid: carries the BSSID mac address
|
||||
* @hw_mode_trans_ind: hw_mode transition indication
|
||||
*
|
||||
* Return: None
|
||||
*/
|
||||
void
|
||||
cm_handle_roam_reason_ho_failed(uint8_t vdev_id, struct qdf_mac_addr bssid,
|
||||
struct cm_hw_mode_trans_ind *hw_mode_trans_ind);
|
||||
#endif
|
||||
#else
|
||||
static inline
|
||||
void wlan_cm_roam_activate_pcl_per_vdev(struct wlan_objmgr_psoc *psoc,
|
||||
@@ -1017,5 +1041,92 @@ cm_akm_roam_allowed(struct wlan_objmgr_psoc *psoc,
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
#ifdef ROAM_TARGET_IF_CONVERGENCE
|
||||
static inline void
|
||||
cm_handle_roam_reason_ho_failed(uint8_t vdev_id, struct qdf_mac_addr bssid,
|
||||
struct cm_hw_mode_trans_ind *hw_mode_trans_ind)
|
||||
{}
|
||||
#endif
|
||||
#endif /* FEATURE_ROAM_OFFLOAD */
|
||||
|
||||
#ifdef ROAM_TARGET_IF_CONVERGENCE
|
||||
/**
|
||||
* cm_rso_cmd_status_event_handler() - Handler for rso cmd status
|
||||
* @vdev_id: vdev id
|
||||
* @notif: roam notification of type enum cm_roam_notif
|
||||
*
|
||||
* Return: QDF_STATUS
|
||||
*/
|
||||
int cm_rso_cmd_status_event_handler(uint8_t vdev_id, enum cm_roam_notif notif);
|
||||
|
||||
/**
|
||||
* cm_handle_roam_reason_invoke_roam_fail() - Handler for roam invoke fail event
|
||||
* @vdev_id: vdev id
|
||||
* @notif_params: contains roam invoke fail reason from wmi_roam_invoke_error_t
|
||||
* @trans_ind: hw_mode transition indication
|
||||
*
|
||||
* Return: None
|
||||
*/
|
||||
void
|
||||
cm_handle_roam_reason_invoke_roam_fail(uint8_t vdev_id, uint32_t notif_params,
|
||||
struct cm_hw_mode_trans_ind *trans_ind);
|
||||
|
||||
/**
|
||||
* cm_handle_roam_reason_deauth() - Handler for roam due to deauth from AP
|
||||
* @vdev_id: vdev id
|
||||
* @notif_params: contains roam invoke fail reason from wmi_roam_invoke_error_t
|
||||
* @deauth_disassoc_frame: Disassoc or deauth frame
|
||||
* @frame_len: Contains the length of @deauth_disassoc_frame
|
||||
*
|
||||
* Return: None
|
||||
*/
|
||||
void cm_handle_roam_reason_deauth(uint8_t vdev_id, uint32_t notif_params,
|
||||
uint8_t *deauth_disassoc_frame,
|
||||
uint32_t frame_len);
|
||||
|
||||
/**
|
||||
* cm_handle_roam_reason_btm() - Handler for roam due to btm from AP
|
||||
* @vdev_id: vdev id
|
||||
*
|
||||
* Return: None
|
||||
*/
|
||||
void cm_handle_roam_reason_btm(uint8_t vdev_id);
|
||||
|
||||
/**
|
||||
* cm_handle_roam_reason_bmiss() - Handler for roam due to bmiss
|
||||
* @vdev_id: vdev id
|
||||
* @rssi: RSSI value
|
||||
*
|
||||
* Return: None
|
||||
*/
|
||||
void cm_handle_roam_reason_bmiss(uint8_t vdev_id, uint32_t rssi);
|
||||
|
||||
/**
|
||||
* cm_handle_roam_reason_better_ap() - Handler for roam due to better AP
|
||||
* @vdev_id: vdev id
|
||||
* @rssi: RSSI value
|
||||
*
|
||||
* Return: None
|
||||
*/
|
||||
void cm_handle_roam_reason_better_ap(uint8_t vdev_id, uint32_t rssi);
|
||||
|
||||
/**
|
||||
* cm_handle_roam_reason_suitable_ap() - Handler for roam due to suitable AP
|
||||
* @vdev_id: vdev id
|
||||
* @rssi: RSSI value
|
||||
*
|
||||
* Return: None
|
||||
*/
|
||||
void cm_handle_roam_reason_suitable_ap(uint8_t vdev_id, uint32_t rssi);
|
||||
|
||||
/**
|
||||
* cm_roam_event_handler() - Carries extracted roam info
|
||||
* @roam_event: data carried by roam event
|
||||
*
|
||||
* Return: QDF_STATUS
|
||||
*/
|
||||
QDF_STATUS
|
||||
cm_roam_event_handler(struct roam_offload_roam_event roam_event);
|
||||
#endif
|
||||
#endif /* WLAN_CM_ROAM_API_H__ */
|
||||
|
@@ -1707,6 +1707,101 @@ struct roam_invoke_req {
|
||||
bool forced_roaming;
|
||||
};
|
||||
|
||||
/**
|
||||
* enum cm_roam_notif: roaming notification
|
||||
* @CM_ROAM_NOTIF_INVALID: invalid notification. Do not interpret notif field
|
||||
* @CM_ROAM_NOTIF_ROAM_START: indicate that roaming is started. sent only in
|
||||
non WOW state
|
||||
* @CM_ROAM_NOTIF_ROAM_ABORT: indicate that roaming is aborted. sent only in
|
||||
non WOW state
|
||||
* @CM_ROAM_NOTIF_ROAM_REASSOC: indicate that reassociation is done. sent only
|
||||
in non WOW state
|
||||
* @CM_ROAM_NOTIF_SCAN_MODE_SUCCESS: indicate that roaming scan mode is
|
||||
successful
|
||||
* @CM_ROAM_NOTIF_SCAN_MODE_FAIL: indicate that roaming scan mode is failed due
|
||||
to internal roaming state
|
||||
* @CM_ROAM_NOTIF_DISCONNECT: indicate that roaming not allowed due BTM req
|
||||
* @CM_ROAM_NOTIF_SUBNET_CHANGED: indicate that subnet has changed
|
||||
* @CM_ROAM_NOTIF_SCAN_START: indicate roam scan start, notif_params to be sent
|
||||
as WMI_ROAM_TRIGGER_REASON_ID
|
||||
* @CM_ROAM_NOTIF_DEAUTH_RECV: indicate deauth received, notif_params to be sent
|
||||
as reason code, notif_params1 to be sent as
|
||||
frame length
|
||||
* @CM_ROAM_NOTIF_DISASSOC_RECV: indicate disassoc received, notif_params to be
|
||||
sent as reason code, notif_params1 to be sent
|
||||
as frame length
|
||||
*/
|
||||
enum cm_roam_notif {
|
||||
CM_ROAM_NOTIF_INVALID = 0,
|
||||
CM_ROAM_NOTIF_ROAM_START,
|
||||
CM_ROAM_NOTIF_ROAM_ABORT,
|
||||
CM_ROAM_NOTIF_ROAM_REASSOC,
|
||||
CM_ROAM_NOTIF_SCAN_MODE_SUCCESS,
|
||||
CM_ROAM_NOTIF_SCAN_MODE_FAIL,
|
||||
CM_ROAM_NOTIF_DISCONNECT,
|
||||
CM_ROAM_NOTIF_SUBNET_CHANGED,
|
||||
CM_ROAM_NOTIF_SCAN_START,
|
||||
CM_ROAM_NOTIF_DEAUTH_RECV,
|
||||
CM_ROAM_NOTIF_DISASSOC_RECV,
|
||||
};
|
||||
|
||||
/**
|
||||
* enum roam_reason: Roam reason
|
||||
* @ROAM_REASON_INVALID: invalid reason. Do not interpret reason field
|
||||
* @ROAM_REASON_BETTER_AP: found a better AP
|
||||
* @ROAM_REASON_BMISS: beacon miss detected
|
||||
* @ROAM_REASON_LOW_RSSI: connected AP's low rssi condition detected
|
||||
* @ROAM_REASON_SUITABLE_AP: found another AP that matches SSID and Security
|
||||
* profile in WMI_ROAM_AP_PROFILE, found during scan triggered upon FINAL_BMISS
|
||||
* @ROAM_REASON_HO_FAILED: LFR3.0 roaming failed, indicate the disconnection
|
||||
* to host
|
||||
* @ROAM_REASON_INVOKE_ROAM_FAIL: Result code of WMI_ROAM_INVOKE_CMDID. Any
|
||||
* roaming failure before reassociation will be indicated to host with this
|
||||
* reason. Any roaming failure after reassociation will be indicated to host
|
||||
* with WMI_ROAM_REASON_HO_FAILED no matter WMI_ROAM_INVOKE_CMDID is
|
||||
* called or not.
|
||||
* @ROAM_REASON_RSO_STATUS
|
||||
* @ROAM_REASON_BTM: Roaming because of BTM request received
|
||||
* @ROAM_REASON_DEAUTH: deauth/disassoc received
|
||||
*/
|
||||
enum roam_reason {
|
||||
ROAM_REASON_INVALID,
|
||||
ROAM_REASON_BETTER_AP,
|
||||
ROAM_REASON_BMISS,
|
||||
ROAM_REASON_LOW_RSSI,
|
||||
ROAM_REASON_SUITABLE_AP,
|
||||
ROAM_REASON_HO_FAILED,
|
||||
ROAM_REASON_INVOKE_ROAM_FAIL,
|
||||
ROAM_REASON_RSO_STATUS,
|
||||
ROAM_REASON_BTM,
|
||||
ROAM_REASON_DEAUTH,
|
||||
};
|
||||
|
||||
/**
|
||||
* struct roam_offload_roam_event: Data carried by roam event
|
||||
* @vdev_id: vdev id
|
||||
* @reason: reason for roam event of type @enum roam_reason
|
||||
* @rssi: associated AP's rssi calculated by FW when reason code
|
||||
* is WMI_ROAM_REASON_LOW_RSSI
|
||||
* @notif: roam notification
|
||||
* @notif_params: Contains roam invoke fail reason from wmi_roam_invoke_error_t
|
||||
* if reason is WMI_ROAM_REASON_INVOKE_ROAM_FAIL.
|
||||
* @notif_params1: notif_params1 is exact frame length of deauth or disassoc if
|
||||
* reason is WMI_ROAM_REASON_DEAUTH.
|
||||
* @hw_mode_trans_ind: HW mode transition indication
|
||||
* @deauth_disassoc_frame: Deauth/disassoc frame received from AP
|
||||
*/
|
||||
struct roam_offload_roam_event {
|
||||
uint8_t vdev_id;
|
||||
enum roam_reason reason;
|
||||
uint32_t rssi;
|
||||
enum cm_roam_notif notif;
|
||||
uint32_t notif_params;
|
||||
uint32_t notif_params1;
|
||||
struct cm_hw_mode_trans_ind *hw_mode_trans_ind;
|
||||
uint8_t *deauth_disassoc_frame;
|
||||
};
|
||||
|
||||
/**
|
||||
* wlan_cm_roam_tx_ops - structure of tx function pointers for
|
||||
* roaming related commands
|
||||
@@ -1752,6 +1847,7 @@ struct wlan_cm_roam_tx_ops {
|
||||
* roaming related commands
|
||||
* @roam_sync_event: RX ops function pointer for roam sync event
|
||||
* @roam_sync_frame_event: Rx ops function pointer for roam sync frame event
|
||||
* @roam_event_rx: Rx ops function pointer for roam info event
|
||||
*/
|
||||
struct wlan_cm_roam_rx_ops {
|
||||
QDF_STATUS (*roam_sync_event)(struct wlan_objmgr_psoc *psoc,
|
||||
@@ -1760,6 +1856,7 @@ struct wlan_cm_roam_rx_ops {
|
||||
uint8_t vdev_id);
|
||||
QDF_STATUS (*roam_sync_frame_event)(struct wlan_objmgr_psoc *psoc,
|
||||
struct roam_synch_frame_ind *frm);
|
||||
QDF_STATUS (*roam_event_rx)(struct roam_offload_roam_event roam_event);
|
||||
};
|
||||
|
||||
/**
|
||||
|
@@ -29,6 +29,7 @@
|
||||
#include "wlan_crypto_global_api.h"
|
||||
#include <wlan_cm_api.h>
|
||||
#include "connection_mgr/core/src/wlan_cm_roam.h"
|
||||
#include "wlan_cm_roam_api.h"
|
||||
|
||||
/* Support for "Fast roaming" (i.e., ESE, LFR, or 802.11r.) */
|
||||
#define BG_SCAN_OCCUPIED_CHANNEL_LIST_LEN 15
|
||||
@@ -1965,3 +1966,87 @@ uint32_t wlan_cm_get_roam_states(struct wlan_objmgr_psoc *psoc, uint8_t vdev_id,
|
||||
return roam_states;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef ROAM_TARGET_IF_CONVERGENCE
|
||||
#ifdef WLAN_FEATURE_ROAM_OFFLOAD
|
||||
static void
|
||||
cm_handle_roam_offload_events(struct roam_offload_roam_event roam_event)
|
||||
{
|
||||
switch (roam_event.reason) {
|
||||
case ROAM_REASON_HO_FAILED: {
|
||||
struct qdf_mac_addr bssid;
|
||||
|
||||
bssid.bytes[0] = roam_event.notif_params >> 0 & 0xFF;
|
||||
bssid.bytes[1] = roam_event.notif_params >> 8 & 0xFF;
|
||||
bssid.bytes[2] = roam_event.notif_params >> 16 & 0xFF;
|
||||
bssid.bytes[3] = roam_event.notif_params >> 24 & 0xFF;
|
||||
bssid.bytes[4] = roam_event.notif_params1 >> 0 & 0xFF;
|
||||
bssid.bytes[5] = roam_event.notif_params1 >> 8 & 0xFF;
|
||||
cm_handle_roam_reason_ho_failed(roam_event.vdev_id, bssid,
|
||||
roam_event.hw_mode_trans_ind);
|
||||
}
|
||||
break;
|
||||
case ROAM_REASON_INVALID:
|
||||
cm_invalid_roam_reason_handler(roam_event.vdev_id,
|
||||
roam_event.notif);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
#else
|
||||
static void
|
||||
cm_handle_roam_offload_events(struct roam_offload_roam_event roam_event)
|
||||
{
|
||||
mlme_debug("Unhandled roam event with reason 0x%x for vdev_id %u",
|
||||
roam_event.reason, roam_event.vdev_id);
|
||||
}
|
||||
#endif
|
||||
|
||||
QDF_STATUS
|
||||
cm_roam_event_handler(struct roam_offload_roam_event roam_event)
|
||||
{
|
||||
switch (roam_event.reason) {
|
||||
case ROAM_REASON_BTM:
|
||||
cm_handle_roam_reason_btm(roam_event.vdev_id);
|
||||
break;
|
||||
case ROAM_REASON_BMISS:
|
||||
cm_handle_roam_reason_bmiss(roam_event.vdev_id,
|
||||
roam_event.rssi);
|
||||
break;
|
||||
case ROAM_REASON_BETTER_AP:
|
||||
cm_handle_roam_reason_better_ap(roam_event.vdev_id,
|
||||
roam_event.rssi);
|
||||
break;
|
||||
case ROAM_REASON_SUITABLE_AP:
|
||||
cm_handle_roam_reason_suitable_ap(roam_event.vdev_id,
|
||||
roam_event.rssi);
|
||||
break;
|
||||
case ROAM_REASON_HO_FAILED:
|
||||
case ROAM_REASON_INVALID:
|
||||
cm_handle_roam_offload_events(roam_event);
|
||||
break;
|
||||
case ROAM_REASON_RSO_STATUS:
|
||||
cm_rso_cmd_status_event_handler(roam_event.vdev_id,
|
||||
roam_event.notif);
|
||||
break;
|
||||
case ROAM_REASON_INVOKE_ROAM_FAIL:
|
||||
cm_handle_roam_reason_invoke_roam_fail(roam_event.vdev_id,
|
||||
roam_event.notif_params,
|
||||
roam_event.hw_mode_trans_ind);
|
||||
break;
|
||||
case ROAM_REASON_DEAUTH:
|
||||
cm_handle_roam_reason_deauth(roam_event.vdev_id,
|
||||
roam_event.notif_params,
|
||||
roam_event.deauth_disassoc_frame,
|
||||
roam_event.notif_params1);
|
||||
break;
|
||||
default:
|
||||
mlme_debug("Unhandled roam event with reason 0x%x for vdev_id %u",
|
||||
roam_event.reason, roam_event.vdev_id);
|
||||
break;
|
||||
}
|
||||
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user