From c59ef8b5b6032d8b428e7eb02c1a98a34d29f7f0 Mon Sep 17 00:00:00 2001 From: Jeff Johnson Date: Sun, 2 Dec 2018 12:01:21 -0800 Subject: [PATCH] qcacld-3.0: Replace tpAniSirGlobal in SAP To align with the Linux coding style replace tpAniSirGlobal with struct mac_context * in: sap_api_link_cntl.c sap_ch_select.c sap_fsm.c sap_internal.h sap_module.c Change-Id: Iec4f67fc3ba08cf046d00136fb0f4edf37d65d64 CRs-Fixed: 2360297 --- core/sap/src/sap_api_link_cntl.c | 10 +++---- core/sap/src/sap_ch_select.c | 18 ++++++------- core/sap/src/sap_fsm.c | 46 ++++++++++++++++---------------- core/sap/src/sap_internal.h | 2 +- core/sap/src/sap_module.c | 20 +++++++------- 5 files changed, 48 insertions(+), 48 deletions(-) diff --git a/core/sap/src/sap_api_link_cntl.c b/core/sap/src/sap_api_link_cntl.c index 96e267147f93b..a1de3d59aaa72 100644 --- a/core/sap/src/sap_api_link_cntl.c +++ b/core/sap/src/sap_api_link_cntl.c @@ -98,7 +98,7 @@ void sap_config_acs_result(mac_handle_t mac_handle, { uint32_t channel = sap_ctx->acs_cfg->pri_ch; struct ch_params ch_params = {0}; - tpAniSirGlobal mac_ctx = MAC_CONTEXT(mac_handle); + struct mac_context *mac_ctx = MAC_CONTEXT(mac_handle); ch_params.ch_width = sap_ctx->acs_cfg->ch_width; wlan_reg_set_channel_params(mac_ctx->pdev, channel, sec_ch, @@ -295,7 +295,7 @@ close_session: * Return: void */ static void -wlansap_roam_process_ch_change_success(tpAniSirGlobal mac_ctx, +wlansap_roam_process_ch_change_success(struct mac_context *mac_ctx, struct sap_context *sap_ctx, struct csr_roam_info *csr_roam_info, QDF_STATUS *ret_status) @@ -415,7 +415,7 @@ wlansap_roam_process_dfs_chansw_update(mac_handle_t mac_handle, { uint8_t intf; QDF_STATUS qdf_status; - tpAniSirGlobal mac_ctx = MAC_CONTEXT(mac_handle); + struct mac_context *mac_ctx = MAC_CONTEXT(mac_handle); uint8_t dfs_beacon_start_req = 0; bool sap_scc_dfs; @@ -574,7 +574,7 @@ wlansap_roam_process_dfs_chansw_update(mac_handle_t mac_handle, * Return: result of operation */ static void -wlansap_roam_process_dfs_radar_found(tpAniSirGlobal mac_ctx, +wlansap_roam_process_dfs_radar_found(struct mac_context *mac_ctx, struct sap_context *sap_ctx, QDF_STATUS *ret_status) { @@ -713,7 +713,7 @@ wlansap_roam_process_infra_assoc_ind(struct sap_context *sap_ctx, return; } -static void wlansap_update_vendor_acs_chan(tpAniSirGlobal mac_ctx, +static void wlansap_update_vendor_acs_chan(struct mac_context *mac_ctx, struct sap_context *sap_ctx) { int intf; diff --git a/core/sap/src/sap_ch_select.c b/core/sap/src/sap_ch_select.c index f3f9f83040d45..c18a6f9a02cf2 100644 --- a/core/sap/src/sap_ch_select.c +++ b/core/sap/src/sap_ch_select.c @@ -332,7 +332,7 @@ static void sap_process_avoid_ie(mac_handle_t mac_handle, uint8_t i = 0; struct sAvoidChannelIE *avoid_ch_ie; tCsrScanResultInfo *node = NULL; - tpAniSirGlobal mac_ctx = NULL; + struct mac_context *mac_ctx = NULL; tSapSpectChInfo *spect_ch = NULL; mac_ctx = MAC_CONTEXT(mac_handle); @@ -413,7 +413,7 @@ void sap_update_unsafe_channel_list(mac_handle_t mac_handle, uint16_t i, j; uint16_t unsafe_channel_list[NUM_CHANNELS]; uint16_t unsafe_channel_count = 0; - tpAniSirGlobal mac_ctx = NULL; + struct mac_context *mac_ctx = NULL; qdf_device_t qdf_ctx = cds_get_context(QDF_MODULE_ID_QDF_DEVICE); @@ -521,7 +521,7 @@ uint8_t sap_select_preferred_channel_from_channel_list(uint8_t best_chnl, tSapChSelSpectInfo *spectinfo_param) { uint8_t i = 0; - tpAniSirGlobal mac_ctx = sme_get_mac_context(); + struct mac_context *mac_ctx = sme_get_mac_context(); if (NULL == mac_ctx) { QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_ERROR, @@ -575,7 +575,7 @@ static bool sap_chan_sel_init(mac_handle_t mac_handle, tSapSpectChInfo *pSpectCh = NULL; uint8_t *pChans = NULL; uint16_t channelnum = 0; - tpAniSirGlobal mac = MAC_CONTEXT(mac_handle); + struct mac_context *mac = MAC_CONTEXT(mac_handle); bool chSafe = true; #ifdef FEATURE_WLAN_CH_AVOID uint16_t i; @@ -766,7 +766,7 @@ uint32_t sapweight_rssi_count(struct sap_context *sap_ctx, int8_t rssi, * Return: chan status info */ static struct lim_channel_status *sap_get_channel_status - (tpAniSirGlobal p_mac, uint32_t channel_id) + (struct mac_context *p_mac, uint32_t channel_id) { return csr_get_channel_status(p_mac, channel_id); } @@ -777,7 +777,7 @@ static struct lim_channel_status *sap_get_channel_status * * Return: none */ -static void sap_clear_channel_status(tpAniSirGlobal p_mac) +static void sap_clear_channel_status(struct mac_context *p_mac) { csr_clear_channel_status(p_mac); } @@ -1522,7 +1522,7 @@ static void sap_compute_spect_weight(tSapChSelSpectInfo *pSpectInfoParams, uint16_t vhtSupport; uint32_t ieLen = 0; tSirProbeRespBeacon *pBeaconStruct; - tpAniSirGlobal mac = MAC_CONTEXT(mac_handle); + struct mac_context *mac = MAC_CONTEXT(mac_handle); tSapSpectChInfo *spectch_start = pSpectInfoParams->pSpectCh; tSapSpectChInfo *spectch_end = pSpectInfoParams->pSpectCh + pSpectInfoParams->numSpectChans; @@ -2539,7 +2539,7 @@ static uint8_t sap_select_channel_no_scan_result(mac_handle_t mac_handle, uint8_t i, first_safe_ch_in_range = SAP_CHANNEL_NOT_SELECTED; uint32_t start_ch_num = sap_ctx->acs_cfg->start_ch; uint32_t end_ch_num = sap_ctx->acs_cfg->end_ch; - tpAniSirGlobal mac_ctx = NULL; + struct mac_context *mac_ctx = NULL; mac_ctx = MAC_CONTEXT(mac_handle); @@ -2642,7 +2642,7 @@ uint8_t sap_select_channel(mac_handle_t mac_handle, uint8_t count; uint32_t start_ch_num, end_ch_num, tmp_ch_num, operating_band = 0; #endif - tpAniSirGlobal mac_ctx; + struct mac_context *mac_ctx; mac_ctx = MAC_CONTEXT(mac_handle); QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_INFO_HIGH, diff --git a/core/sap/src/sap_fsm.c b/core/sap/src/sap_fsm.c index 828c6e09b3d6d..df5a7358c36fb 100644 --- a/core/sap/src/sap_fsm.c +++ b/core/sap/src/sap_fsm.c @@ -557,7 +557,7 @@ void sap_dfs_set_current_channel(void *ctx) bool sap_dfs_is_channel_in_preferred_location(mac_handle_t mac_handle, uint8_t channel_id) { - tpAniSirGlobal mac; + struct mac_context *mac; mac = MAC_CONTEXT(mac_handle); if (NULL == mac) { @@ -760,7 +760,7 @@ sap_validate_chan(struct sap_context *sap_context, bool check_for_connection_update) { QDF_STATUS qdf_status = QDF_STATUS_SUCCESS; - tpAniSirGlobal mac_ctx; + struct mac_context *mac_ctx; bool is_dfs; bool is_safe; mac_handle_t mac_handle; @@ -947,7 +947,7 @@ sap_validate_chan(struct sap_context *sap_context, QDF_STATUS sap_channel_sel(struct sap_context *sap_context) { QDF_STATUS qdf_ret_status; - tpAniSirGlobal mac_ctx; + struct mac_context *mac_ctx; struct scan_start_request *req; struct wlan_objmgr_vdev *vdev; uint8_t i; @@ -1139,7 +1139,7 @@ QDF_STATUS sap_channel_sel(struct sap_context *sap_context) static struct sap_context * sap_find_valid_concurrent_session(mac_handle_t mac_handle) { - tpAniSirGlobal mac_ctx = MAC_CONTEXT(mac_handle); + struct mac_context *mac_ctx = MAC_CONTEXT(mac_handle); uint8_t intf = 0; struct sap_context *sap_ctx; @@ -1160,7 +1160,7 @@ sap_find_valid_concurrent_session(mac_handle_t mac_handle) static QDF_STATUS sap_clear_global_dfs_param(mac_handle_t mac_handle) { - tpAniSirGlobal mac_ctx = MAC_CONTEXT(mac_handle); + struct mac_context *mac_ctx = MAC_CONTEXT(mac_handle); if (NULL != sap_find_valid_concurrent_session(mac_handle)) { QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_DEBUG, @@ -1186,7 +1186,7 @@ static QDF_STATUS sap_clear_global_dfs_param(mac_handle_t mac_handle) return QDF_STATUS_SUCCESS; } -QDF_STATUS sap_acquire_vdev_ref(tpAniSirGlobal mac, +QDF_STATUS sap_acquire_vdev_ref(struct mac_context *mac, struct sap_context *sap_ctx, uint8_t session_id) { @@ -1225,7 +1225,7 @@ QDF_STATUS sap_set_session_param(mac_handle_t mac_handle, struct sap_context *sapctx, uint32_t session_id) { - tpAniSirGlobal mac_ctx = MAC_CONTEXT(mac_handle); + struct mac_context *mac_ctx = MAC_CONTEXT(mac_handle); int i; QDF_STATUS status; @@ -1264,7 +1264,7 @@ QDF_STATUS sap_clear_session_param(mac_handle_t mac_handle, struct sap_context *sapctx, uint32_t session_id) { - tpAniSirGlobal mac_ctx = MAC_CONTEXT(mac_handle); + struct mac_context *mac_ctx = MAC_CONTEXT(mac_handle); if (sapctx->sessionId >= SAP_MAX_NUM_SESSION) return QDF_STATUS_E_FAILURE; @@ -1791,7 +1791,7 @@ QDF_STATUS sap_signal_hdd_event(struct sap_context *sap_ctx, */ static struct sap_context *sap_find_cac_wait_session(mac_handle_t handle) { - tpAniSirGlobal mac = MAC_CONTEXT(handle); + struct mac_context *mac = MAC_CONTEXT(handle); uint8_t i = 0; struct sap_context *sap_ctx; @@ -1822,7 +1822,7 @@ static struct sap_context *sap_find_cac_wait_session(mac_handle_t handle) void sap_cac_reset_notify(mac_handle_t mac_handle) { uint8_t intf = 0; - tpAniSirGlobal mac = MAC_CONTEXT(mac_handle); + struct mac_context *mac = MAC_CONTEXT(mac_handle); for (intf = 0; intf < SAP_MAX_NUM_SESSION; intf++) { struct sap_context *sap_context = @@ -1849,7 +1849,7 @@ void sap_cac_reset_notify(mac_handle_t mac_handle) static QDF_STATUS sap_cac_start_notify(mac_handle_t mac_handle) { uint8_t intf = 0; - tpAniSirGlobal mac = MAC_CONTEXT(mac_handle); + struct mac_context *mac = MAC_CONTEXT(mac_handle); QDF_STATUS qdf_status = QDF_STATUS_E_FAILURE; for (intf = 0; intf < SAP_MAX_NUM_SESSION; intf++) { @@ -1899,7 +1899,7 @@ static QDF_STATUS sap_cac_start_notify(mac_handle_t mac_handle) * Return: QDF_STATUS */ static QDF_STATUS wlansap_update_pre_cac_end(struct sap_context *sap_context, - tpAniSirGlobal mac, uint8_t intf) + struct mac_context *mac, uint8_t intf) { QDF_STATUS qdf_status; @@ -1944,7 +1944,7 @@ static QDF_STATUS sap_cac_end_notify(mac_handle_t mac_handle, struct csr_roam_info *roamInfo) { uint8_t intf; - tpAniSirGlobal mac = MAC_CONTEXT(mac_handle); + struct mac_context *mac = MAC_CONTEXT(mac_handle); QDF_STATUS qdf_status = QDF_STATUS_E_FAILURE; /* @@ -2057,7 +2057,7 @@ static QDF_STATUS sap_cac_end_notify(mac_handle_t mac_handle, */ static QDF_STATUS sap_goto_starting(struct sap_context *sap_ctx, - ptWLAN_SAPEvent sap_event, tpAniSirGlobal mac_ctx, + ptWLAN_SAPEvent sap_event, struct mac_context *mac_ctx, mac_handle_t mac_handle) { QDF_STATUS qdf_status = QDF_STATUS_E_FAILURE; @@ -2193,7 +2193,7 @@ sap_goto_starting(struct sap_context *sap_ctx, */ static QDF_STATUS sap_fsm_state_init(struct sap_context *sap_ctx, - ptWLAN_SAPEvent sap_event, tpAniSirGlobal mac_ctx, + ptWLAN_SAPEvent sap_event, struct mac_context *mac_ctx, mac_handle_t mac_handle) { uint32_t msg = sap_event->event; @@ -2273,7 +2273,7 @@ exit: * Return: QDF_STATUS */ static QDF_STATUS sap_fsm_state_dfs_cac_wait(struct sap_context *sap_ctx, - ptWLAN_SAPEvent sap_event, tpAniSirGlobal mac_ctx, + ptWLAN_SAPEvent sap_event, struct mac_context *mac_ctx, mac_handle_t mac_handle) { uint32_t msg = sap_event->event; @@ -2377,7 +2377,7 @@ static QDF_STATUS sap_fsm_state_dfs_cac_wait(struct sap_context *sap_ctx, * Return: QDF_STATUS */ static QDF_STATUS sap_fsm_state_starting(struct sap_context *sap_ctx, - ptWLAN_SAPEvent sap_event, tpAniSirGlobal mac_ctx, + ptWLAN_SAPEvent sap_event, struct mac_context *mac_ctx, mac_handle_t mac_handle) { uint32_t msg = sap_event->event; @@ -2601,7 +2601,7 @@ static QDF_STATUS sap_fsm_state_starting(struct sap_context *sap_ctx, * Return: QDF_STATUS */ static QDF_STATUS sap_fsm_state_started(struct sap_context *sap_ctx, - ptWLAN_SAPEvent sap_event, tpAniSirGlobal mac_ctx) + ptWLAN_SAPEvent sap_event, struct mac_context *mac_ctx) { uint32_t msg = sap_event->event; QDF_STATUS qdf_status = QDF_STATUS_E_FAILURE; @@ -2707,7 +2707,7 @@ 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, tpAniSirGlobal mac_ctx, + ptWLAN_SAPEvent sap_event, struct mac_context *mac_ctx, mac_handle_t mac_handle) { uint32_t msg = sap_event->event; @@ -3483,7 +3483,7 @@ void sap_dfs_cac_timer_callback(void *data) struct sap_context *sapContext; tWLAN_SAPEvent sapEvent; mac_handle_t mac_handle = data; - tpAniSirGlobal mac; + struct mac_context *mac; if (NULL == mac_handle) { QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_ERROR, @@ -3676,7 +3676,7 @@ QDF_STATUS sap_init_dfs_channel_nol_list(struct sap_context *sap_ctx) */ uint8_t sap_get_total_number_sap_intf(mac_handle_t mac_handle) { - tpAniSirGlobal mac = MAC_CONTEXT(mac_handle); + struct mac_context *mac = MAC_CONTEXT(mac_handle); uint8_t intf = 0; uint8_t intf_count = 0; @@ -3706,7 +3706,7 @@ uint8_t sap_get_total_number_sap_intf(mac_handle_t mac_handle) bool is_concurrent_sap_ready_for_channel_change(mac_handle_t mac_handle, struct sap_context *sapContext) { - tpAniSirGlobal mac = MAC_CONTEXT(mac_handle); + struct mac_context *mac = MAC_CONTEXT(mac_handle); struct sap_context *sap_context; uint8_t intf = 0; @@ -3750,7 +3750,7 @@ bool is_concurrent_sap_ready_for_channel_change(mac_handle_t mac_handle, bool sap_is_conc_sap_doing_scc_dfs(mac_handle_t mac_handle, struct sap_context *given_sapctx) { - tpAniSirGlobal mac = MAC_CONTEXT(mac_handle); + struct mac_context *mac = MAC_CONTEXT(mac_handle); struct sap_context *sap_ctx; uint8_t intf = 0, scc_dfs_counter = 0; diff --git a/core/sap/src/sap_internal.h b/core/sap/src/sap_internal.h index a3544eca5f4fa..d601fa30fc1df 100644 --- a/core/sap/src/sap_internal.h +++ b/core/sap/src/sap_internal.h @@ -572,7 +572,7 @@ sap_chan_bond_dfs_sub_chan(struct sap_context *sap_context, * Return: QDF_STATUS_SUCCESS - If able to get vdev object reference * else qdf status failure codes */ -QDF_STATUS sap_acquire_vdev_ref(tpAniSirGlobal mac, +QDF_STATUS sap_acquire_vdev_ref(struct mac_context *mac, struct sap_context *sap_ctx, uint8_t session_id); diff --git a/core/sap/src/sap_module.c b/core/sap/src/sap_module.c index 54b2468a98469..b79936899c002 100644 --- a/core/sap/src/sap_module.c +++ b/core/sap/src/sap_module.c @@ -1125,7 +1125,7 @@ QDF_STATUS wlansap_modify_acl(struct sap_context *sap_ctx, QDF_STATUS wlansap_disassoc_sta(struct sap_context *sap_ctx, struct csr_del_sta_params *params) { - tpAniSirGlobal mac; + struct mac_context *mac; if (!sap_ctx) { QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_ERROR, @@ -1549,7 +1549,7 @@ QDF_STATUS wlan_sap_set_pre_cac_complete_status(struct sap_context *sap_ctx, */ bool wlan_sap_is_pre_cac_active(mac_handle_t handle) { - tpAniSirGlobal mac = NULL; + struct mac_context *mac = NULL; int i; mac = MAC_CONTEXT(handle); @@ -1579,7 +1579,7 @@ bool wlan_sap_is_pre_cac_active(mac_handle_t handle) */ QDF_STATUS wlan_sap_get_pre_cac_vdev_id(mac_handle_t handle, uint8_t *vdev_id) { - tpAniSirGlobal mac = NULL; + struct mac_context *mac = NULL; uint8_t i; mac = MAC_CONTEXT(handle); @@ -1821,7 +1821,7 @@ QDF_STATUS wlansap_dfs_send_csa_ie_request(struct sap_context *sap_ctx) QDF_STATUS wlansap_get_dfs_ignore_cac(mac_handle_t mac_handle, uint8_t *ignore_cac) { - tpAniSirGlobal mac = NULL; + struct mac_context *mac = NULL; if (NULL != mac_handle) { mac = MAC_CONTEXT(mac_handle); @@ -1838,7 +1838,7 @@ QDF_STATUS wlansap_get_dfs_ignore_cac(mac_handle_t mac_handle, QDF_STATUS wlansap_set_dfs_ignore_cac(mac_handle_t mac_handle, uint8_t ignore_cac) { - tpAniSirGlobal mac = NULL; + struct mac_context *mac = NULL; if (NULL != mac_handle) { mac = MAC_CONTEXT(mac_handle); @@ -1877,7 +1877,7 @@ QDF_STATUS wlan_sap_set_channel_avoidance(mac_handle_t mac_handle, bool sap_channel_avoidance) { - tpAniSirGlobal mac_ctx = NULL; + struct mac_context *mac_ctx = NULL; if (NULL != mac_handle) { mac_ctx = MAC_CONTEXT(mac_handle); @@ -1912,7 +1912,7 @@ wlansap_set_dfs_preferred_channel_location(mac_handle_t mac_handle, uint8_t dfs_Preferred_Channels_location) { - tpAniSirGlobal mac = NULL; + struct mac_context *mac = NULL; QDF_STATUS status; enum dfs_reg dfs_region; @@ -1956,7 +1956,7 @@ wlansap_set_dfs_preferred_channel_location(mac_handle_t mac_handle, QDF_STATUS wlansap_set_dfs_target_chnl(mac_handle_t mac_handle, uint8_t target_channel) { - tpAniSirGlobal mac = NULL; + struct mac_context *mac = NULL; if (NULL != mac_handle) { mac = MAC_CONTEXT(mac_handle); @@ -2133,7 +2133,7 @@ void wlansap_extend_to_acs_range(mac_handle_t mac_handle, #define ACS_5G_EXTEND (ACS_WLAN_20M_CH_INC * 3) uint8_t tmp_startChannelNum = 0, tmp_endChannelNum = 0; - tpAniSirGlobal mac_ctx; + struct mac_context *mac_ctx; mac_ctx = MAC_CONTEXT(mac_handle); if (!mac_ctx) { @@ -2391,7 +2391,7 @@ void wlan_sap_enable_phy_error_logs(mac_handle_t mac_handle, { int error; - tpAniSirGlobal mac_ctx = MAC_CONTEXT(mac_handle); + struct mac_context *mac_ctx = MAC_CONTEXT(mac_handle); mac_ctx->sap.enable_dfs_phy_error_logs = !!enable_log; tgt_dfs_control(mac_ctx->pdev, DFS_SET_DEBUG_LEVEL, &enable_log,