mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-07 12:25:00 -04:00
qcacld-3.0: Add function typedefs for roam callbacks
Add function typedefs for csr_roam_synch_cb, pe_roam_synch_cb, stop_roaming_cb, and csr_roam_pmkid_req_cb. Update all usage of the callbacks to use the new typedef. This will prevent possible CFI errors. Change-Id: I9f5c6753098d83657ae66be4ed56a9a67b072bad CRs-fixed: 2747058
This commit is contained in:
parent
f5ce9636be
commit
747bc9c58f
4 changed files with 90 additions and 37 deletions
|
|
@ -644,9 +644,7 @@ typedef struct sAniSirLim {
|
|||
|
||||
QDF_STATUS(*sme_msg_callback)
|
||||
(struct mac_context *mac, struct scheduler_msg *msg);
|
||||
QDF_STATUS(*stop_roaming_callback)
|
||||
(mac_handle_t mac, uint8_t session_id, uint8_t reason,
|
||||
enum wlan_cm_rso_control_requestor requestor);
|
||||
stop_roaming_fn_t stop_roaming_callback;
|
||||
uint8_t retry_packet_cnt;
|
||||
uint8_t beacon_probe_rsp_cnt_per_scan;
|
||||
wlan_scan_requester req_id;
|
||||
|
|
|
|||
|
|
@ -392,16 +392,92 @@ typedef struct sSirSmeRsp {
|
|||
struct wlan_objmgr_psoc *psoc;
|
||||
} tSirSmeRsp, *tpSirSmeRsp;
|
||||
|
||||
struct bss_description;
|
||||
struct roam_offload_synch_ind;
|
||||
struct roam_pmkid_req_event;
|
||||
|
||||
/**
|
||||
* typedef csr_roam_synch_fn_t - CSR roam synch callback routine pointer
|
||||
* @mac: Global MAC context
|
||||
* @roam_synch_data: Structure with roam synch parameters
|
||||
* @bss_desc_ptr: BSS descriptor pointer
|
||||
* @reason: Reason for calling the callback
|
||||
*
|
||||
* This type is for callbacks registered with WMA and used after roaming
|
||||
* in firmware. The call to this routine completes the roam synch
|
||||
* propagation at both CSR and HDD levels. The HDD level propagation
|
||||
* is achieved through the already defined callback for assoc completion
|
||||
* handler.
|
||||
*
|
||||
* Return: Success or Failure.
|
||||
*/
|
||||
typedef QDF_STATUS
|
||||
(*csr_roam_synch_fn_t)(struct mac_context *mac,
|
||||
struct roam_offload_synch_ind *roam_synch_data,
|
||||
struct bss_description *bss_desc_ptr,
|
||||
enum sir_roam_op_code reason);
|
||||
|
||||
/**
|
||||
* typedef pe_roam_synch_fn_t - PE roam synch callback routine pointer
|
||||
* @mac_ctx: Global MAC context
|
||||
* @roam_sync_ind_ptr: Structure with roam synch parameters
|
||||
* @bss_desc_ptr: bss_description pointer for new bss to which the firmware has
|
||||
* started roaming
|
||||
* @reason: Reason for calling the callback
|
||||
*
|
||||
* This type is for callbacks registered with WMA to complete the roam synch
|
||||
* propagation at PE level. It also fills the BSS descriptor, which will be
|
||||
* helpful to complete the roam synch propagation.
|
||||
*
|
||||
* Return: Success or Failure.
|
||||
*/
|
||||
typedef QDF_STATUS
|
||||
(*pe_roam_synch_fn_t)(struct mac_context *mac_ctx,
|
||||
struct roam_offload_synch_ind *roam_sync_ind_ptr,
|
||||
struct bss_description *bss_desc_ptr,
|
||||
enum sir_roam_op_code reason);
|
||||
|
||||
/**
|
||||
* typedef stop_roaming_fn_t - Stop roaming routine pointer
|
||||
* @mac_handle: Pointer to opaque mac handle
|
||||
* @session_id: Session Identifier
|
||||
* @reason: Reason for calling the callback
|
||||
* @requestor: Requestor for disabling roaming in driver
|
||||
*
|
||||
* This type is for callbacks registered with WMA to stop roaming on the given
|
||||
* session ID
|
||||
*
|
||||
* Return: Success or Failure.
|
||||
*/
|
||||
typedef QDF_STATUS
|
||||
(*stop_roaming_fn_t)(mac_handle_t mac_handle,
|
||||
uint8_t session_id, uint8_t reason,
|
||||
enum wlan_cm_rso_control_requestor requestor);
|
||||
|
||||
/**
|
||||
* typedef csr_roam_pmkid_req_fn_t - pmkid generation fallback event pointer
|
||||
* @vdev_id: Vdev id
|
||||
* @bss_list: candidate AP bssid list
|
||||
*
|
||||
* This type is for callbacks registered with CSR to handle roam event from
|
||||
* firmware for pmkid generation fallback
|
||||
*
|
||||
* Return: Success or Failure.
|
||||
*/
|
||||
typedef QDF_STATUS
|
||||
(*csr_roam_pmkid_req_fn_t)(uint8_t vdev_id,
|
||||
struct roam_pmkid_req_event *bss_list);
|
||||
|
||||
/* / Definition for indicating all modules ready on STA */
|
||||
struct sme_ready_req {
|
||||
uint16_t messageType; /* eWNI_SME_SYS_READY_IND */
|
||||
uint16_t length;
|
||||
void *csr_roam_synch_cb;
|
||||
csr_roam_synch_fn_t csr_roam_synch_cb;
|
||||
QDF_STATUS (*csr_roam_auth_event_handle_cb)(struct mac_context *mac,
|
||||
uint8_t vdev_id,
|
||||
struct qdf_mac_addr bssid);
|
||||
void *pe_roam_synch_cb;
|
||||
void *stop_roaming_cb;
|
||||
pe_roam_synch_fn_t pe_roam_synch_cb;
|
||||
stop_roaming_fn_t stop_roaming_cb;
|
||||
QDF_STATUS (*sme_msg_cb)(struct mac_context *mac,
|
||||
struct scheduler_msg *msg);
|
||||
QDF_STATUS (*pe_disconnect_cb) (struct mac_context *mac,
|
||||
|
|
@ -409,7 +485,7 @@ struct sme_ready_req {
|
|||
uint8_t *deauth_disassoc_frame,
|
||||
uint16_t deauth_disassoc_frame_len,
|
||||
uint16_t reason_code);
|
||||
void *csr_roam_pmkid_req_cb;
|
||||
csr_roam_pmkid_req_fn_t csr_roam_pmkid_req_cb;
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -720,46 +720,32 @@ QDF_STATUS wma_register_mgmt_frm_client(void);
|
|||
QDF_STATUS wma_de_register_mgmt_frm_client(void);
|
||||
#ifdef WLAN_FEATURE_ROAM_OFFLOAD
|
||||
QDF_STATUS wma_register_roaming_callbacks(
|
||||
QDF_STATUS (*csr_roam_synch_cb)(struct mac_context *mac,
|
||||
struct roam_offload_synch_ind *roam_synch_data,
|
||||
struct bss_description *bss_desc_ptr,
|
||||
enum sir_roam_op_code reason),
|
||||
csr_roam_synch_fn_t csr_roam_synch_cb,
|
||||
QDF_STATUS (*csr_roam_auth_event_handle_cb)(
|
||||
struct mac_context *mac,
|
||||
uint8_t vdev_id,
|
||||
struct qdf_mac_addr bssid),
|
||||
QDF_STATUS (*pe_roam_synch_cb)(struct mac_context *mac,
|
||||
struct roam_offload_synch_ind *roam_synch_data,
|
||||
struct bss_description *bss_desc_ptr,
|
||||
enum sir_roam_op_code reason),
|
||||
pe_roam_synch_fn_t pe_roam_synch_cb,
|
||||
QDF_STATUS (*pe_disconnect_cb) (struct mac_context *mac,
|
||||
uint8_t vdev_id,
|
||||
uint8_t *deauth_disassoc_frame,
|
||||
uint16_t deauth_disassoc_frame_len,
|
||||
uint16_t reason_code),
|
||||
QDF_STATUS (*csr_roam_pmkid_req_cb)(uint8_t vdev_id,
|
||||
struct roam_pmkid_req_event *bss_list));
|
||||
csr_roam_pmkid_req_fn_t csr_roam_pmkid_req_cb);
|
||||
#else
|
||||
static inline QDF_STATUS wma_register_roaming_callbacks(
|
||||
QDF_STATUS (*csr_roam_synch_cb)(struct mac_context *mac,
|
||||
struct roam_offload_synch_ind *roam_synch_data,
|
||||
struct bss_description *bss_desc_ptr,
|
||||
enum sir_roam_op_code reason),
|
||||
csr_roam_synch_fn_t csr_roam_synch_cb,
|
||||
QDF_STATUS (*csr_roam_auth_event_handle_cb)(
|
||||
struct mac_context *mac,
|
||||
uint8_t vdev_id,
|
||||
struct qdf_mac_addr bssid),
|
||||
QDF_STATUS (*pe_roam_synch_cb)(struct mac_context *mac,
|
||||
struct roam_offload_synch_ind *roam_synch_data,
|
||||
struct bss_description *bss_desc_ptr,
|
||||
enum sir_roam_op_code reason),
|
||||
pe_roam_synch_fn_t pe_roam_synch_cb,
|
||||
QDF_STATUS (*pe_disconnect_cb) (struct mac_context *mac,
|
||||
uint8_t vdev_id,
|
||||
uint8_t *deauth_disassoc_frame,
|
||||
uint16_t deauth_disassoc_frame_len,
|
||||
uint16_t reason_code),
|
||||
QDF_STATUS (*csr_roam_pmkid_req_cb)(uint8_t vdev_id,
|
||||
struct roam_pmkid_req_event *bss_list))
|
||||
csr_roam_pmkid_req_fn_t csr_roam_pmkid_req_cb)
|
||||
{
|
||||
return QDF_STATUS_E_NOSUPPORT;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3715,24 +3715,17 @@ QDF_STATUS wma_de_register_mgmt_frm_client(void)
|
|||
* Return: Success or Failure Status
|
||||
*/
|
||||
QDF_STATUS wma_register_roaming_callbacks(
|
||||
QDF_STATUS (*csr_roam_synch_cb)(struct mac_context *mac,
|
||||
struct roam_offload_synch_ind *roam_synch_data,
|
||||
struct bss_description *bss_desc_ptr,
|
||||
enum sir_roam_op_code reason),
|
||||
csr_roam_synch_fn_t csr_roam_synch_cb,
|
||||
QDF_STATUS (*csr_roam_auth_event_handle_cb)(struct mac_context *mac,
|
||||
uint8_t vdev_id,
|
||||
struct qdf_mac_addr bssid),
|
||||
QDF_STATUS (*pe_roam_synch_cb)(struct mac_context *mac,
|
||||
struct roam_offload_synch_ind *roam_synch_data,
|
||||
struct bss_description *bss_desc_ptr,
|
||||
enum sir_roam_op_code reason),
|
||||
pe_roam_synch_fn_t pe_roam_synch_cb,
|
||||
QDF_STATUS (*pe_disconnect_cb) (struct mac_context *mac,
|
||||
uint8_t vdev_id,
|
||||
uint8_t *deauth_disassoc_frame,
|
||||
uint16_t deauth_disassoc_frame_len,
|
||||
uint16_t reason_code),
|
||||
QDF_STATUS (*csr_roam_pmkid_req_cb)(uint8_t vdev_id,
|
||||
struct roam_pmkid_req_event *bss_list))
|
||||
csr_roam_pmkid_req_fn_t csr_roam_pmkid_req_cb)
|
||||
{
|
||||
|
||||
tp_wma_handle wma = cds_get_context(QDF_MODULE_ID_WMA);
|
||||
|
|
|
|||
Loading…
Reference in a new issue