qcacmn: Replace void pointers with appropriate/common structure types

Void pointer usage may lead to memory corruption due to
wrong pointer is typecasted. Hence define structure for all, and modules
internally typecasting based on their type

Change-Id: I6271ed8aa3f94254fd85f41962f23ea36895154e
CRs-Fixed: 2182452
This commit is contained in:
Akshay Kosigi
2018-02-06 16:02:25 +05:30
committad av nshrivas
förälder e4430b559d
incheckning 2a216edab0
17 ändrade filer med 256 tillägg och 137 borttagningar

Visa fil

@@ -38,7 +38,7 @@ static inline uint32_t get_chan_list_cc_event_id(void)
static bool tgt_if_regulatory_is_11d_offloaded(struct wlan_objmgr_psoc
*psoc)
{
wmi_unified_t wmi_handle = GET_WMI_HDL_FROM_PSOC(psoc);
wmi_unified_t wmi_handle = get_wmi_unified_hdl_from_psoc(psoc);
return wmi_service_enabled(wmi_handle,
wmi_service_11d_offload);
@@ -47,7 +47,7 @@ static bool tgt_if_regulatory_is_11d_offloaded(struct wlan_objmgr_psoc
static bool tgt_if_regulatory_is_regdb_offloaded(struct wlan_objmgr_psoc
*psoc)
{
wmi_unified_t wmi_handle = GET_WMI_HDL_FROM_PSOC(psoc);
wmi_unified_t wmi_handle = get_wmi_unified_hdl_from_psoc(psoc);
return wmi_service_enabled(wmi_handle,
wmi_service_regulatory_db);
@@ -56,7 +56,7 @@ static bool tgt_if_regulatory_is_regdb_offloaded(struct wlan_objmgr_psoc
static bool tgt_if_regulatory_is_there_serv_ready_extn(struct wlan_objmgr_psoc
*psoc)
{
wmi_unified_t wmi_handle = GET_WMI_HDL_FROM_PSOC(psoc);
wmi_unified_t wmi_handle = get_wmi_unified_hdl_from_psoc(psoc);
return wmi_service_enabled(wmi_handle,
wmi_service_ext_msg);
@@ -236,7 +236,7 @@ static int tgt_reg_ch_avoid_event_handler(ol_scn_t handle,
static QDF_STATUS tgt_if_regulatory_register_master_list_handler(
struct wlan_objmgr_psoc *psoc, void *arg)
{
wmi_unified_t wmi_handle = GET_WMI_HDL_FROM_PSOC(psoc);
wmi_unified_t wmi_handle = get_wmi_unified_hdl_from_psoc(psoc);
return wmi_unified_register_event_handler(wmi_handle,
wmi_reg_chan_list_cc_event_id,
@@ -248,7 +248,7 @@ static QDF_STATUS tgt_if_regulatory_register_master_list_handler(
static QDF_STATUS tgt_if_regulatory_unregister_master_list_handler(
struct wlan_objmgr_psoc *psoc, void *arg)
{
wmi_unified_t wmi_handle = GET_WMI_HDL_FROM_PSOC(psoc);
wmi_unified_t wmi_handle = get_wmi_unified_hdl_from_psoc(psoc);
return wmi_unified_unregister_event_handler(wmi_handle,
wmi_reg_chan_list_cc_event_id);
@@ -257,7 +257,7 @@ static QDF_STATUS tgt_if_regulatory_unregister_master_list_handler(
static QDF_STATUS tgt_if_regulatory_set_country_code(
struct wlan_objmgr_psoc *psoc, void *arg)
{
wmi_unified_t wmi_handle = GET_WMI_HDL_FROM_PSOC(psoc);
wmi_unified_t wmi_handle = get_wmi_unified_hdl_from_psoc(psoc);
return wmi_unified_set_country_cmd_send(wmi_handle, arg);
@@ -266,7 +266,7 @@ static QDF_STATUS tgt_if_regulatory_set_country_code(
static QDF_STATUS tgt_if_regulatory_set_user_country_code(
struct wlan_objmgr_psoc *psoc, uint8_t pdev_id, struct cc_regdmn_s *rd)
{
wmi_unified_t wmi_handle = GET_WMI_HDL_FROM_PSOC(psoc);
wmi_unified_t wmi_handle = get_wmi_unified_hdl_from_psoc(psoc);
if (wmi_unified_set_user_country_code_cmd_send(wmi_handle, pdev_id,
rd) != QDF_STATUS_SUCCESS) {
@@ -280,7 +280,7 @@ static QDF_STATUS tgt_if_regulatory_set_user_country_code(
static QDF_STATUS tgt_if_regulatory_register_11d_new_cc_handler(
struct wlan_objmgr_psoc *psoc, void *arg)
{
wmi_unified_t wmi_handle = GET_WMI_HDL_FROM_PSOC(psoc);
wmi_unified_t wmi_handle = get_wmi_unified_hdl_from_psoc(psoc);
return wmi_unified_register_event(wmi_handle,
wmi_11d_new_country_event_id,
@@ -290,7 +290,7 @@ static QDF_STATUS tgt_if_regulatory_register_11d_new_cc_handler(
static QDF_STATUS tgt_if_regulatory_unregister_11d_new_cc_handler(
struct wlan_objmgr_psoc *psoc, void *arg)
{
wmi_unified_t wmi_handle = GET_WMI_HDL_FROM_PSOC(psoc);
wmi_unified_t wmi_handle = get_wmi_unified_hdl_from_psoc(psoc);
return wmi_unified_unregister_event(wmi_handle,
wmi_11d_new_country_event_id);
@@ -299,7 +299,7 @@ static QDF_STATUS tgt_if_regulatory_unregister_11d_new_cc_handler(
static QDF_STATUS tgt_if_regulatory_register_ch_avoid_event_handler(
struct wlan_objmgr_psoc *psoc, void *arg)
{
wmi_unified_t wmi_handle = GET_WMI_HDL_FROM_PSOC(psoc);
wmi_unified_t wmi_handle = get_wmi_unified_hdl_from_psoc(psoc);
return wmi_unified_register_event(wmi_handle,
wmi_wlan_freq_avoid_event_id,
@@ -309,7 +309,7 @@ static QDF_STATUS tgt_if_regulatory_register_ch_avoid_event_handler(
static QDF_STATUS tgt_if_regulatory_unregister_ch_avoid_event_handler(
struct wlan_objmgr_psoc *psoc, void *arg)
{
wmi_unified_t wmi_handle = GET_WMI_HDL_FROM_PSOC(psoc);
wmi_unified_t wmi_handle = get_wmi_unified_hdl_from_psoc(psoc);
return wmi_unified_unregister_event(wmi_handle,
wmi_wlan_freq_avoid_event_id);
@@ -318,7 +318,7 @@ static QDF_STATUS tgt_if_regulatory_start_11d_scan(
struct wlan_objmgr_psoc *psoc,
struct reg_start_11d_scan_req *reg_start_11d_scan_req)
{
wmi_unified_t wmi_handle = GET_WMI_HDL_FROM_PSOC(psoc);
wmi_unified_t wmi_handle = get_wmi_unified_hdl_from_psoc(psoc);
return wmi_unified_send_start_11d_scan_cmd(wmi_handle,
reg_start_11d_scan_req);
@@ -328,7 +328,7 @@ static QDF_STATUS tgt_if_regulatory_stop_11d_scan(
struct wlan_objmgr_psoc *psoc,
struct reg_stop_11d_scan_req *reg_stop_11d_scan_req)
{
wmi_unified_t wmi_handle = GET_WMI_HDL_FROM_PSOC(psoc);
wmi_unified_t wmi_handle = get_wmi_unified_hdl_from_psoc(psoc);
return wmi_unified_send_stop_11d_scan_cmd(wmi_handle,
reg_stop_11d_scan_req);