mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-16 01:33:10 -04:00
qcacld-3.0: Replace typedef tWLAN_SAPEvent
The Linux Coding Style enumerates a few special cases where typedefs are useful, but stresses "NEVER EVER use a typedef unless you can clearly match one of those rules." The tWLAN_SAPEvent typedef does not meet any of those criteria, so replace it (and the "pt" variant) with a properly named struct. Change-Id: Ie39e51a24a16f0c19b7b0fe926748a6b90d31632 CRs-Fixed: 2423729
This commit is contained in:
parent
b91e2d9eeb
commit
66fc8d2e91
4 changed files with 38 additions and 35 deletions
|
|
@ -300,7 +300,7 @@ wlansap_roam_process_ch_change_success(struct mac_context *mac_ctx,
|
|||
struct csr_roam_info *csr_roam_info,
|
||||
QDF_STATUS *ret_status)
|
||||
{
|
||||
tWLAN_SAPEvent sap_event;
|
||||
struct sap_sm_event sap_event;
|
||||
QDF_STATUS qdf_status;
|
||||
bool is_ch_dfs = false;
|
||||
/*
|
||||
|
|
@ -579,7 +579,7 @@ wlansap_roam_process_dfs_radar_found(struct mac_context *mac_ctx,
|
|||
QDF_STATUS *ret_status)
|
||||
{
|
||||
QDF_STATUS qdf_status;
|
||||
tWLAN_SAPEvent sap_event;
|
||||
struct sap_sm_event sap_event;
|
||||
|
||||
if (sap_is_dfs_cac_wait_state(sap_ctx)) {
|
||||
if (mac_ctx->mlme_cfg->dfs_cfg.dfs_disable_channel_switch) {
|
||||
|
|
@ -769,7 +769,7 @@ wlansap_roam_callback(void *ctx, struct csr_roam_info *csr_roam_info,
|
|||
/* sap_ctx value */
|
||||
struct sap_context *sap_ctx = ctx;
|
||||
/* State machine event */
|
||||
tWLAN_SAPEvent sap_event;
|
||||
struct sap_sm_event sap_event;
|
||||
QDF_STATUS qdf_status = QDF_STATUS_SUCCESS;
|
||||
QDF_STATUS qdf_ret_status = QDF_STATUS_SUCCESS;
|
||||
mac_handle_t mac_handle;
|
||||
|
|
|
|||
|
|
@ -1295,7 +1295,7 @@ static QDF_STATUS sap_goto_stopping(struct sap_context *sap_ctx)
|
|||
static QDF_STATUS sap_goto_init(struct sap_context *sap_ctx)
|
||||
{
|
||||
QDF_STATUS qdf_status = QDF_STATUS_E_FAILURE;
|
||||
tWLAN_SAPEvent sap_event;
|
||||
struct sap_sm_event sap_event;
|
||||
/* Processing has to be coded */
|
||||
|
||||
/*
|
||||
|
|
@ -2136,10 +2136,10 @@ static QDF_STATUS sap_cac_end_notify(mac_handle_t mac_handle,
|
|||
*
|
||||
* Return: QDF_STATUS
|
||||
*/
|
||||
static QDF_STATUS
|
||||
sap_goto_starting(struct sap_context *sap_ctx,
|
||||
ptWLAN_SAPEvent sap_event, struct mac_context *mac_ctx,
|
||||
mac_handle_t mac_handle)
|
||||
static QDF_STATUS sap_goto_starting(struct sap_context *sap_ctx,
|
||||
struct sap_sm_event *sap_event,
|
||||
struct mac_context *mac_ctx,
|
||||
mac_handle_t mac_handle)
|
||||
{
|
||||
QDF_STATUS qdf_status = QDF_STATUS_E_FAILURE;
|
||||
bool b_leak_chan = false;
|
||||
|
|
@ -2323,10 +2323,10 @@ static QDF_STATUS sap_fsm_cac_start(struct sap_context *sap_ctx,
|
|||
*
|
||||
* Return: QDF_STATUS
|
||||
*/
|
||||
static QDF_STATUS
|
||||
sap_fsm_state_init(struct sap_context *sap_ctx,
|
||||
ptWLAN_SAPEvent sap_event, struct mac_context *mac_ctx,
|
||||
mac_handle_t mac_handle)
|
||||
static QDF_STATUS sap_fsm_state_init(struct sap_context *sap_ctx,
|
||||
struct sap_sm_event *sap_event,
|
||||
struct mac_context *mac_ctx,
|
||||
mac_handle_t mac_handle)
|
||||
{
|
||||
uint32_t msg = sap_event->event;
|
||||
QDF_STATUS qdf_status = QDF_STATUS_E_FAILURE;
|
||||
|
|
@ -2428,7 +2428,7 @@ static QDF_STATUS sap_fsm_handle_radar_during_cac(struct sap_context *sap_ctx,
|
|||
|
||||
#ifdef CONFIG_VDEV_SM
|
||||
static QDF_STATUS sap_fsm_state_dfs_cac_wait(struct sap_context *sap_ctx,
|
||||
ptWLAN_SAPEvent sap_event,
|
||||
struct sap_sm_event *sap_event,
|
||||
struct mac_context *mac_ctx,
|
||||
mac_handle_t mac_handle)
|
||||
{
|
||||
|
|
@ -2506,8 +2506,9 @@ static QDF_STATUS sap_fsm_handle_start_failure(struct sap_context *sap_ctx,
|
|||
* Return: QDF_STATUS
|
||||
*/
|
||||
static QDF_STATUS sap_fsm_state_dfs_cac_wait(struct sap_context *sap_ctx,
|
||||
ptWLAN_SAPEvent sap_event, struct mac_context *mac_ctx,
|
||||
mac_handle_t mac_handle)
|
||||
struct sap_sm_event *sap_event,
|
||||
struct mac_context *mac_ctx,
|
||||
mac_handle_t mac_handle)
|
||||
{
|
||||
uint32_t msg = sap_event->event;
|
||||
struct csr_roam_info *roam_info =
|
||||
|
|
@ -2586,8 +2587,9 @@ static QDF_STATUS sap_fsm_handle_start_failure(struct sap_context *sap_ctx,
|
|||
* Return: QDF_STATUS
|
||||
*/
|
||||
static QDF_STATUS sap_fsm_state_starting(struct sap_context *sap_ctx,
|
||||
ptWLAN_SAPEvent sap_event, struct mac_context *mac_ctx,
|
||||
mac_handle_t mac_handle)
|
||||
struct sap_sm_event *sap_event,
|
||||
struct mac_context *mac_ctx,
|
||||
mac_handle_t mac_handle)
|
||||
{
|
||||
uint32_t msg = sap_event->event;
|
||||
struct csr_roam_info *roam_info =
|
||||
|
|
@ -2763,7 +2765,8 @@ sap_handle_csa_anouncement_start(struct mac_context *mac_ctx,
|
|||
* Return: QDF_STATUS
|
||||
*/
|
||||
static QDF_STATUS sap_fsm_state_started(struct sap_context *sap_ctx,
|
||||
ptWLAN_SAPEvent sap_event, struct mac_context *mac_ctx)
|
||||
struct sap_sm_event *sap_event,
|
||||
struct mac_context *mac_ctx)
|
||||
{
|
||||
uint32_t msg = sap_event->event;
|
||||
QDF_STATUS qdf_status = QDF_STATUS_E_FAILURE;
|
||||
|
|
@ -2844,7 +2847,8 @@ static QDF_STATUS sap_fsm_state_started(struct sap_context *sap_ctx,
|
|||
*/
|
||||
static QDF_STATUS
|
||||
sap_fsm_state_stopping(struct sap_context *sap_ctx,
|
||||
ptWLAN_SAPEvent sap_event, struct mac_context *mac_ctx,
|
||||
struct sap_sm_event *sap_event,
|
||||
struct mac_context *mac_ctx,
|
||||
mac_handle_t mac_handle)
|
||||
{
|
||||
uint32_t msg = sap_event->event;
|
||||
|
|
@ -2882,7 +2886,7 @@ sap_fsm_state_stopping(struct sap_context *sap_ctx,
|
|||
*
|
||||
* Return: QDF_STATUS
|
||||
*/
|
||||
QDF_STATUS sap_fsm(struct sap_context *sap_ctx, ptWLAN_SAPEvent sap_event)
|
||||
QDF_STATUS sap_fsm(struct sap_context *sap_ctx, struct sap_sm_event *sap_event)
|
||||
{
|
||||
/*
|
||||
* Retrieve the phy link state machine structure
|
||||
|
|
@ -3618,7 +3622,7 @@ uint8_t sap_indicate_radar(struct sap_context *sap_ctx)
|
|||
void sap_dfs_cac_timer_callback(void *data)
|
||||
{
|
||||
struct sap_context *sap_ctx;
|
||||
tWLAN_SAPEvent sap_event;
|
||||
struct sap_sm_event sap_event;
|
||||
mac_handle_t mac_handle = data;
|
||||
struct mac_context *mac;
|
||||
|
||||
|
|
|
|||
|
|
@ -203,20 +203,19 @@ struct sap_context {
|
|||
* External declarations for global context
|
||||
* -------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
* SAP state machine event definition
|
||||
* -------------------------------------------------------------------------*/
|
||||
/* The event structure */
|
||||
typedef struct sWLAN_SAPEvent {
|
||||
/* A VOID pointer type for all possible inputs */
|
||||
/**
|
||||
* struct sap_sm_event - SAP state machine event definition
|
||||
* @params: A VOID pointer type for all possible inputs
|
||||
* @event: State machine input event message
|
||||
* @u1: Introduced to handle csr_roam_complete_cb roamStatus
|
||||
* @u2: Introduced to handle csr_roam_complete_cb roamResult
|
||||
*/
|
||||
struct sap_sm_event {
|
||||
void *params;
|
||||
/* State machine input event message */
|
||||
uint32_t event;
|
||||
/* introduced to handle csr_roam_complete_cb roamStatus */
|
||||
uint32_t u1;
|
||||
/* introduced to handle csr_roam_complete_cb roamResult */
|
||||
uint32_t u2;
|
||||
} tWLAN_SAPEvent, *ptWLAN_SAPEvent;
|
||||
};
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
* Function Declarations and Documentation
|
||||
|
|
@ -263,7 +262,7 @@ sap_signal_hdd_event(struct sap_context *sap_ctx,
|
|||
struct csr_roam_info *pCsrRoamInfo,
|
||||
eSapHddEvent sapHddevent, void *);
|
||||
|
||||
QDF_STATUS sap_fsm(struct sap_context *sap_ctx, ptWLAN_SAPEvent sap_event);
|
||||
QDF_STATUS sap_fsm(struct sap_context *sap_ctx, struct sap_sm_event *sap_event);
|
||||
|
||||
eSapStatus
|
||||
sapconvert_to_csr_profile(struct sap_config *config,
|
||||
|
|
|
|||
|
|
@ -665,7 +665,7 @@ QDF_STATUS wlansap_start_bss(struct sap_context *sap_ctx,
|
|||
sap_event_cb sap_event_cb,
|
||||
struct sap_config *config, void *user_context)
|
||||
{
|
||||
tWLAN_SAPEvent sap_event; /* State machine event */
|
||||
struct sap_sm_event sap_event; /* State machine event */
|
||||
QDF_STATUS qdf_status = QDF_STATUS_SUCCESS;
|
||||
struct mac_context *pmac = NULL;
|
||||
|
||||
|
|
@ -804,7 +804,7 @@ QDF_STATUS wlansap_set_mac_acl(struct sap_context *sap_ctx,
|
|||
|
||||
QDF_STATUS wlansap_stop_bss(struct sap_context *sap_ctx)
|
||||
{
|
||||
tWLAN_SAPEvent sap_event; /* State machine event */
|
||||
struct sap_sm_event sap_event; /* State machine event */
|
||||
QDF_STATUS qdf_status;
|
||||
|
||||
if (!sap_ctx) {
|
||||
|
|
@ -1267,7 +1267,7 @@ static inline void sap_start_csa_restart(struct mac_context *mac,
|
|||
static void sap_start_csa_restart(struct mac_context *mac,
|
||||
struct sap_context *sap_ctx)
|
||||
{
|
||||
tWLAN_SAPEvent sap_event;
|
||||
struct sap_sm_event sap_event;
|
||||
|
||||
/*
|
||||
* Post the eSAP_CHANNEL_SWITCH_ANNOUNCEMENT_START
|
||||
|
|
|
|||
Loading…
Reference in a new issue