diff options
| author | Jeff Johnson <jjohnson@qca.qualcomm.com> | 2014-02-18 16:00:43 -0800 |
|---|---|---|
| committer | Akash Patel <c_akashp@qca.qualcomm.com> | 2014-02-28 01:47:13 -0800 |
| commit | c76cdd7143f8b2577f92e993baaa2df84fa59f6c (patch) | |
| tree | d4d2c1d2ce05278d832faca5305c82d010552f78 | |
| parent | 711b0c38b421a841c997d092995f4f1880859060 (diff) | |
qcacld: CORE/VOSS cleanfile
Run CORE/VOSS through kernel/scripts/cleanfile to remove whitespace
that is inconsistent with the Linux Kernel coding standard
Change-Id: I708b6e8c231e1c38d287117c58f7f648452c9f8f
CRs-fixed: 619495
42 files changed, 3001 insertions, 3007 deletions
diff --git a/CORE/VOSS/inc/event_defs.h b/CORE/VOSS/inc/event_defs.h index a23e81698a6b..be029188d049 100644 --- a/CORE/VOSS/inc/event_defs.h +++ b/CORE/VOSS/inc/event_defs.h @@ -42,36 +42,36 @@ typedef enum EVENT_PZID_CHANGE, /* Includes PZID as payload */ EVENT_PDE_SESSION_END, /* No payload */ EVENT_OP_MODE_CHANGE, /* Includes operation mode as payload */ - EVENT_MESSAGE_RECEIVED, /* Includes channel and message ID as + EVENT_MESSAGE_RECEIVED, /* Includes channel and message ID as payload */ - EVENT_MESSAGE_TRANSMITTED, /* Includes channel and message ID as + EVENT_MESSAGE_TRANSMITTED, /* Includes channel and message ID as payload */ EVENT_TIMER_EXPIRED, /* Includes timer ID as payload */ EVENT_COUNTER_THRESHOLD, /* Includes counter ID as payload */ EVENT_CALL_PROCESSING_STATE_CHANGE, /* Includes new state and old state as - payload */ + payload */ EVENT_CALL_CONTROL_INSTANTIATED, /* Includes con_ref as payload */ EVENT_CALL_CONTROL_STATE_CHANGE, /* Includes con_ref, old substate and new substate as payload */ EVENT_CALL_CONTROL_TERMINATED, /* Includes con_ref as payload */ - EVENT_REG_ZONE_CHANGE, /* Includes reg_zone as payload */ + EVENT_REG_ZONE_CHANGE, /* Includes reg_zone as payload */ EVENT_SLOTTED_MODE_OPERATION, /* Includes enter/exit bit as payload */ EVENT_QPCH_IN_USE, /* Includes enable/disable bit as payload */ EVENT_IDLE_HANDOFF, /* Includes pn_offset as payload */ EVENT_ACCESS_HANDOFF, /* Includes pn_offset as payload */ EVENT_ACCESS_PROBE_HANDOFF, /* Includes pn_offset as payload */ - EVENT_SOFT_HANDOFF, - /* Includes pn_offsets of each BS in aset and indicators whether BS in SCH - aset*/ - EVENT_HARD_HANDOFF_FREQ_CHANGE, - /* Includes pn_offsets of each BS in aset and indicators whether BS in SCH - aset*/ - EVENT_HARD_HANDOFF_FRAME_OFFSET_CHANGE, - /* Includes pn_offsets of each BS in aset and indicators whether BS in SCH - aset*/ + EVENT_SOFT_HANDOFF, + /* Includes pn_offsets of each BS in aset and indicators whether BS in SCH + aset*/ + EVENT_HARD_HANDOFF_FREQ_CHANGE, + /* Includes pn_offsets of each BS in aset and indicators whether BS in SCH + aset*/ + EVENT_HARD_HANDOFF_FRAME_OFFSET_CHANGE, + /* Includes pn_offsets of each BS in aset and indicators whether BS in SCH + aset*/ EVENT_HARD_HANDOFF_DISJOINT_ASET, - /* Includes pn_offsets of each BS in aset and indicators whether BS in SCH - aset*/ + /* Includes pn_offsets of each BS in aset and indicators whether BS in SCH + aset*/ EVENT_UNSUCCESSFUL_HARD_HANDOFF, /* No payload */ EVENT_TMSI_ASSIGNED, /* Includes TMSI as payload */ EVENT_SERVICE_NEGOTIATION_COMPLETED,/* No payload */ @@ -95,12 +95,12 @@ typedef enum EVENT_ACCESS_ATTEMPT_FAIL_LOSS_OF_PC_OR_FCCC, /* No payload */ EVENT_PCH_ACQUIRED, /* Includes pagech and pn_offset as payload */ - EVENT_BCCH_ACQUIRED, /* Includes walsh code for BCCH and + EVENT_BCCH_ACQUIRED, /* Includes walsh code for BCCH and pn_offset as payload */ EVENT_FFCH_ACQUIRED, /* Payload: 14 bytes */ EVENT_FDCCH_ACQUIRED, /* Payload: 14 bytes */ EVENT_FFCH_PLUS_DCCH_ACQUIRED, /* No payload */ - EVENT_REGISTRATION_PERFORMED, /* Includes reg_type as payload */ + EVENT_REGISTRATION_PERFORMED, /* Includes reg_type as payload */ EVENT_NEW_SYSTEM_IDLE_HANDOFF, /* No payload */ EVENT_SYSTEM_RESELECTION, /* Includes ecio and ps as payload */ EVENT_RESCAN, /* No payload */ @@ -125,7 +125,7 @@ typedef enum EVENT_HDR_RXMSG_IGNORED_STATE, /* protocol, msg- 3 bytes */ EVENT_HDR_RXMSG_IGNORED_SEQ, /* protocol, msg- 3 bytes */ EVENT_HDR_TXMSG_ACKED, /* protocol, msg- 3 bytes */ - EVENT_HDR_TXMSG_DROPPED, /* protocol, msg- 3 bytes */ + EVENT_HDR_TXMSG_DROPPED, /* protocol, msg- 3 bytes */ EVENT_HDR_STATE_CHANGE, /* protocol, from, to - 5 bytes */ EVENT_HDR_ALMP_OBEYING_REDIRECTION, /* No payload */ EVENT_HDR_ALMP_CONNECTION_CLOSED, /* No payload */ @@ -306,7 +306,7 @@ typedef enum EVENT_MT_SMS_NOTIFY, /* Payload: 1 byte mem_type, 4 byte msg_index */ EVENT_SMS_SLOT_WAKEUP, /* Payload: 1 byte slot_mask */ EVENT_MO_SMS_STATUS, /* Payload: 4 byte transaction_id, 1 byte mem_type, - 4 byte msg_index, 1 byte report_status, + 4 byte msg_index, 1 byte report_status, 1 byte case_code */ EVENT_GPRS_SURROUND_SEARCH_START, EVENT_GPRS_SURROUND_SEARCH_END, @@ -323,7 +323,7 @@ typedef enum EVENT_GPRS_SMGMM_MSG_RECEIVED, /* Payload: 3 bytes giving message identity and channel */ EVENT_CP_MATCHED_MSG, /* Payload: 1 byte */ - EVENT_PREF_SYS_RESEL, /* Payload: none */ + EVENT_PREF_SYS_RESEL, /* Payload: none */ EVENT_WCDMA_LAYER1_PRACH, /* Payload: 4 bytes */ EVENT_WCDMA_LAYER1_MEASUREMENT, /* Payload: Unspecified */ @@ -404,18 +404,18 @@ typedef enum EVENT_GPS_SRCH_END, /* No Payload */ EVENT_GPS_PPM_PAUSE, /* Payload: pause_reason (1 byte) */ EVENT_GPS_PPM_RESUME, /* No Payload */ - EVENT_GPS_SA_RECEIVED, /* Payload: REF_BIT_NUM (2 bytes), - DR_SIZE (1byte) + EVENT_GPS_SA_RECEIVED, /* Payload: REF_BIT_NUM (2 bytes), + DR_SIZE (1byte) */ EVENT_GPS_CLK_ON, /* No Payload */ EVENT_GPS_CLK_OFF, /* No Payload */ - EVENT_GPS_VISIT_REQUEST, /* No Payload */ + EVENT_GPS_VISIT_REQUEST, /* No Payload */ EVENT_GPS_VISIT_RESPONSE, /* Payload: response_result (1 byte) - */ + */ EVENT_GPS_TA_START, /* No Payload */ EVENT_GPS_DSP_READY, /* No Payload */ - EVENT_GPS_DSP_CHANNEL_START, /* Payload: SV_ID (1 byte), - SRCH_MODE (1 byte), + EVENT_GPS_DSP_CHANNEL_START, /* Payload: SV_ID (1 byte), + SRCH_MODE (1 byte), CHANNEL_NUM (1 byte), RESERVED (1 byte) */ @@ -426,7 +426,7 @@ typedef enum EVENT_GPS_SRCH_LARGE_DOPP_WIN, /* Payload: sv_prn_num (1 byte), srch_mode (1 byte), dopp_wind (2 byte) - */ + */ EVENT_GPS_SRCH_EXCEPTION, /* Payload: grid_log_id (2 byte), exception_type (1 byte) */ @@ -450,7 +450,7 @@ typedef enum - EVENT_GPS_PD_FIX_START, /* Payload: event_log_cnt (2 byte), + EVENT_GPS_PD_FIX_START, /* Payload: event_log_cnt (2 byte), operation_mode (1 byte) */ EVENT_GPS_PD_FIX_END, /* Payload: end_status (1 byte) */ @@ -1126,16 +1126,16 @@ typedef enum EVENT_HDR_IDLE_SET_SLEEP_DURATION, /* 2 byte payload */ EVENT_HDR_SCM_SESSION_CHANGED, /* 1 byte payload */ - EVENT_UMTS_TO_CDMA_DATA_HANDOVER, /* No payload */ - EVENT_UMTS_TO_CDMA_VOICE_HANDOVER, /* 18 byte payload */ + EVENT_UMTS_TO_CDMA_DATA_HANDOVER, /* No payload */ + EVENT_UMTS_TO_CDMA_VOICE_HANDOVER, /* 18 byte payload */ - EVENT_MO_SMS_RETRY_ATTEMPT, /* 14 byte payload */ + EVENT_MO_SMS_RETRY_ATTEMPT, /* 14 byte payload */ - EVENT_HDR_LMAC_UPDATE_QSM_STATUS, /* 1 byte payload */ + EVENT_HDR_LMAC_UPDATE_QSM_STATUS, /* 1 byte payload */ - EVENT_CM_CELL_SRV_IND, /* 5 byte payload */ + EVENT_CM_CELL_SRV_IND, /* 5 byte payload */ - EVENT_RLP_NAK_ABORT, /* 9 byte payload */ + EVENT_RLP_NAK_ABORT, /* 9 byte payload */ EVENT_DRM_RIGHTS_OPERATION, /* 2 byte payload */ @@ -1176,11 +1176,11 @@ typedef enum EVENT_PM_APP_OTG_PERI_MODE_SET_REM_A_DEV_INFO, /* 3 byte payload */ EVENT_PM_APP_OTG_STATE_TRANSITION, /* 2 byte payload */ - EVENT_DTV_TABLE_ACQ_SUCCESS, /* 10 byte payload */ - EVENT_DTV_TABLE_ACQ_FAIL, /* 5 byte payload */ + EVENT_DTV_TABLE_ACQ_SUCCESS, /* 10 byte payload */ + EVENT_DTV_TABLE_ACQ_FAIL, /* 5 byte payload */ EVENT_DTV_DVBH_SEL_PLTFM_REQ_RCVD, /* 4 byte payload */ EVENT_DTV_DVBH_PLTFM_ACQ_SUCCESS, /* 4 byte payload */ - EVENT_DTV_DVBH_PLTFM_ACQ_FAIL, /* 4 byte payload */ + EVENT_DTV_DVBH_PLTFM_ACQ_FAIL, /* 4 byte payload */ EVENT_DTV_DVBH_TBL_MGR_STATE_CHANGED, /* 2 byte payload */ EVENT_DTV_DVBH_CE_STATE_CHANGED, /* 2 byte payload */ EVENT_DTV_DVBH_MCAST_JOIN_REQ_RCVD, /* 18 byte payload */ @@ -1218,12 +1218,12 @@ typedef enum EVENT_FLUTE_FDT_INST_EXPIRED, /* 8 byte payload */ EVENT_FLUTE_JOIN_SESSION_REQ_RCVD, /* 24 byte payload */ EVENT_FLUTE_LEAVE_SESSION_REQ_RCVD, /* 4 byte payload */ - EVENT_FLUTE_SESSION_CLOSED, /* 5 byte payload */ - EVENT_FLUTE_SESSION_CLOSED_BY_APP, /* 4 byte payload */ - EVENT_FLUTE_B_FLAG_RCVD, /* 8 byte payload */ - EVENT_FLUTE_GET_FILE_REQUEST_RCVD, /* 8 byte payload */ - EVENT_FLUTE_JOIN_SESSION_RSP, /* 6 byte payload */ - EVENT_FLUTE_FILE_STATUS_RSP, /* 16 byte payload */ + EVENT_FLUTE_SESSION_CLOSED, /* 5 byte payload */ + EVENT_FLUTE_SESSION_CLOSED_BY_APP, /* 4 byte payload */ + EVENT_FLUTE_B_FLAG_RCVD, /* 8 byte payload */ + EVENT_FLUTE_GET_FILE_REQUEST_RCVD, /* 8 byte payload */ + EVENT_FLUTE_JOIN_SESSION_RSP, /* 6 byte payload */ + EVENT_FLUTE_FILE_STATUS_RSP, /* 16 byte payload */ EVENT_FLUTE_CANCEL_FILE_REQ_RCVD, /* 8 byte payload */ EVENT_DTV_DVBH_DEINIT_REQ_RCVD, /* No payload */ @@ -1298,7 +1298,7 @@ typedef enum EVENT_MOBILEVIEW_RESERVED4, /* TBD */ EVENT_MOBILEVIEW_RESERVED5, /* TBD */ - EVENT_HDR_DOS_MO_DOS_STATUS, /* 3 byte payload */ + EVENT_HDR_DOS_MO_DOS_STATUS, /* 3 byte payload */ EVENT_GPSONEXTRA_START_DOWNLOAD, /* 4 byte payload */ EVENT_GPSONEXTRA_END_DOWNLOAD, /* 4 byte payload */ @@ -1310,7 +1310,7 @@ typedef enum EVENT_SNSD_EVENT_COND_MET, /* 8 byte payload */ EVENT_SNSD_DEVICE_DOWN, /* 8 byte payload */ EVENT_SNSD_ERROR, /* 8 byte payload */ - + EVENT_CM_COUNTRY_SELECTED, /* 2 byte payload */ EVENT_CM_SELECT_COUNTRY, /* 7 byte payload */ @@ -1334,12 +1334,12 @@ typedef enum EVENT_MOBILEVIEW_RESERVED31, /* EVENT TO BE REPLACED */ EVENT_MOBILEVIEW_RESERVED32, /* EVENT TO BE REPLACED */ - EVENT_GPS_DCME_MEAS_CYCLE_START, /* No payload */ - EVENT_GPS_DCME_MEAS_CYCLE_END, /* No payload */ - EVENT_GPS_CME_ENGAGED, /* No payload */ - EVENT_GPS_CME_NOT_ENGAGED, /* No payload */ - EVENT_GPS_DCME_ENGAGED, /* No payload */ - EVENT_GPS_DCME_NOT_ENGAGED, /* No payload */ + EVENT_GPS_DCME_MEAS_CYCLE_START, /* No payload */ + EVENT_GPS_DCME_MEAS_CYCLE_END, /* No payload */ + EVENT_GPS_CME_ENGAGED, /* No payload */ + EVENT_GPS_CME_NOT_ENGAGED, /* No payload */ + EVENT_GPS_DCME_ENGAGED, /* No payload */ + EVENT_GPS_DCME_NOT_ENGAGED, /* No payload */ EVENT_HS_USB_DEVICE_ATTACHED, /* No payload */ EVENT_HS_USB_HID_DISCONECT, /* No payload */ @@ -1520,13 +1520,13 @@ typedef enum EVENT_MSG_FATAL, /* 32 byte payload */ EVENT_GAN_START_TU3910, /* No payload */ - EVENT_GAN_STOP_TU3910, /* No payload */ + EVENT_GAN_STOP_TU3910, /* No payload */ EVENT_GAN_EXPIRY_TU3910, /* No payload */ EVENT_GAN_START_TU3920, /* No payload */ EVENT_GAN_STOP_TU3920, /* No payload */ EVENT_GAN_EXPIRY_TU3920, /* No payload */ - EVENT_GAN_START_TU3906, /* No payload */ - EVENT_GAN_STOP_TU3906, /* No payload */ + EVENT_GAN_START_TU3906, /* No payload */ + EVENT_GAN_STOP_TU3906, /* No payload */ EVENT_GAN_EXPIRY_TU3906, /* No payload */ EVENT_GAN_URR_REGISTER_UPDATE, /* 1 byte payload */ @@ -1538,7 +1538,7 @@ typedef enum EVENT_IPSEC_IKE_EAP_START, /* No payload */ EVENT_IPSEC_IKE_EAP_FINISH, /* 1 byte payload */ EVENT_IPSEC_CHILD_SA_ESTABLISHED, /* 8 bytes payload */ - EVENT_IPSEC_IKE_INFO_MSG_SENT, /* 16 bytes payload */ + EVENT_IPSEC_IKE_INFO_MSG_SENT, /* 16 bytes payload */ EVENT_IPSEC_IKE_INFO_MSG_RECV, /* 16 bytes payload */ EVENT_IPSEC_CREATE_CHILD_SA_SENT, /* 16 bytes payload */ EVENT_IPSEC_CREATE_CHILD_SA_RECV, /* 16 bytes payload */ @@ -1575,7 +1575,7 @@ typedef enum EVENT_LTE_RRC_STATE_CHANGE, /* 1 byte payload */ EVENT_LTE_RRC_OUT_OF_SERVICE, /* 2 byte payload */ EVENT_LTE_RRC_RADIO_LINK_FAILURE, /* 2 byte payload */ - EVENT_LTE_RRC_DL_MSG, /* 2 byte payload */ + EVENT_LTE_RRC_DL_MSG, /* 2 byte payload */ EVENT_LTE_RRC_UL_MSG, /* 2 byte payload */ EVENT_LTE_RRC_NEW_CELL_IND, /* 5 byte payload */ EVENT_LTE_RRC_CELL_RESEL_FAILURE, /* 5 byte payload */ @@ -1594,7 +1594,7 @@ typedef enum EVENT_MBP_RF_ANALOG_JD_INT, /* 4 byte payload */ EVENT_CGPS_QWIP_SYSD_TRANSITION, /* 4 byte payload */ - + EVENT_HPLMN_TIMER_EXPIRED, /* No Payload */ EVENT_GSDI_GET_FEATURE_INDICATOR_DATA, /* 6 byte payload */ @@ -1627,14 +1627,14 @@ typedef enum EVENT_SNS_DRIVER_STATE_CHANGE, /* 9 byte payload */ - EVENT_WCDMA_TIMER_DISCARD_EXPIRY, /* 3 byte payload */ + EVENT_WCDMA_TIMER_DISCARD_EXPIRY, /* 3 byte payload */ + + EVENT_NAS_CB_PAGE_RECEIVED, /* 5 byte payload */ - EVENT_NAS_CB_PAGE_RECEIVED, /* 5 byte payload */ + EVENT_WCDMA_RLC_RESET, /* 1 byte payload */ - EVENT_WCDMA_RLC_RESET, /* 1 byte payload */ + EVENT_HDR_MRLP_EHRPD_PERSONALITY_IS_ACTIVE, /* 1 byte payload */ - EVENT_HDR_MRLP_EHRPD_PERSONALITY_IS_ACTIVE, /* 1 byte payload */ - EVENT_WLAN_SECURITY, /* 13 byte payload */ EVENT_WLAN_STATUS, /* 15 byte payload */ EVENT_WLAN_HANDOFF, /* 15 byte payload */ @@ -1703,14 +1703,14 @@ typedef enum EVENT_WLAN_PE_FRAME, /* 16 byte payload */ - EVENT_SNS_VCPS_HEADING_COMPUTED, /* 12 byte payload */ - EVENT_SNS_VCPS_TRACKED_CAL_SET_SAVED, /* 22 byte payload */ + EVENT_SNS_VCPS_HEADING_COMPUTED, /* 12 byte payload */ + EVENT_SNS_VCPS_TRACKED_CAL_SET_SAVED, /* 22 byte payload */ - EVENT_GNSS_PRESC_DWELL_COMPLETE, /* 2 byte payload */ + EVENT_GNSS_PRESC_DWELL_COMPLETE, /* 2 byte payload */ - EVENT_LTE_MAC_RESET, /* 1 byte payload */ - EVENT_LTE_BSR_SR_REQUEST, /* 1 byte payload */ - EVENT_LTE_MAC_TIMER, /* 2 byte payload */ + EVENT_LTE_MAC_RESET, /* 1 byte payload */ + EVENT_LTE_BSR_SR_REQUEST, /* 1 byte payload */ + EVENT_LTE_MAC_TIMER, /* 2 byte payload */ EVENT_CM_DS_OPERATIONAL_MODE, /* 2 byte payload */ EVENT_CM_DS_MODE_PREF, /* 5 byte payload */ @@ -1739,22 +1739,22 @@ typedef enum EVENT_CM_DS_USS_RESPONSE_NOTIFY_IND, /* 4 byte payload */ EVENT_CM_DS_LCS_MOLR_CONF, /* 2 byte payload */ - EVENT_DS_NAS_MESSAGE_SENT, /* 5 byte payload */ - EVENT_DS_NAS_MESSAGE_RECEIVED, /* 5 byte payload */ - EVENT_DS_MM_STATE, /* 3 byte payload */ - EVENT_DS_GMM_STATE, /* 3 byte payload */ - EVENT_DS_PLMN_INFORMATION, /* 10 byte payload */ + EVENT_DS_NAS_MESSAGE_SENT, /* 5 byte payload */ + EVENT_DS_NAS_MESSAGE_RECEIVED, /* 5 byte payload */ + EVENT_DS_MM_STATE, /* 3 byte payload */ + EVENT_DS_GMM_STATE, /* 3 byte payload */ + EVENT_DS_PLMN_INFORMATION, /* 10 byte payload */ - EVENT_DIAG_STRESS_TEST_COMPLETED, /* 4 byte payload */ + EVENT_DIAG_STRESS_TEST_COMPLETED, /* 4 byte payload */ - EVENT_GNSS_CC_STATUS, /* 2 byte payload */ + EVENT_GNSS_CC_STATUS, /* 2 byte payload */ - EVENT_SNS_USER_STATE_CHANGE, /* 6 byte payload */ + EVENT_SNS_USER_STATE_CHANGE, /* 6 byte payload */ - EVENT_DS_HPLMN_TIMER_EXPIRED, /* 1 byte payload */ - EVENT_DS_RAT_CHANGE, /* 2 byte payload */ + EVENT_DS_HPLMN_TIMER_EXPIRED, /* 1 byte payload */ + EVENT_DS_RAT_CHANGE, /* 2 byte payload */ - EVENT_DTV_CMMB_API_CALL_ACTIVATE, /*9 byte payload*/ /*ID=1757*/ + EVENT_DTV_CMMB_API_CALL_ACTIVATE, /*9 byte payload*/ /*ID=1757*/ EVENT_DTV_CMMB_API_CALL_DEACTIVATE, /*9 byte payload*/ EVENT_DTV_CMMB_API_CALL_TUNE, /*13 byte payload*/ EVENT_DTV_CMMB_API_CALL_SELECT_SERVICE, /*11 byte payload*/ @@ -1772,7 +1772,7 @@ typedef enum EVENT_DTV_CMMB_API_CALL_DEREGISTER_FROM_CONTROL_NOTIFICATIONS, /*9 byte payload*/ EVENT_DTV_CMMB_API_NOTIFICATION_ACTIVATE, /*9 byte payload*/ EVENT_DTV_CMMB_API_NOTIFICATION_DEACTIVATE, /*9 byte payload*/ - EVENT_DTV_CMMB_API_NOTIFICATION_TUNE, /*13 byte payload*/ + EVENT_DTV_CMMB_API_NOTIFICATION_TUNE, /*13 byte payload*/ EVENT_DTV_CMMB_API_NOTIFICATION_SELECT_SERVICE, /*11 byte payload*/ EVENT_DTV_CMMB_API_NOTIFICATION_DESELECT_SERVICE, /*11 byte payload*/ EVENT_DTV_CMMB_API_NOTIFICATION_TABLE_UPDATE, /*6 byte payload*/ @@ -1796,9 +1796,9 @@ typedef enum EVENT_DTV_CMMB_CAS_INITIALIZED, /*9 byte payload*/ EVENT_DTV_CMMB_CAS_EMM_RECEIVED_AND_PROCESSED, /*9 byte payload*/ EVENT_DTV_CMMB_CAS_ECM_RECEIVED_AND_PROCESSED, /*11 byte payload*/ /*ID=1798*/ - - EVENT_ECALL_START, /*3 byte payload*/ - EVENT_ECALL_STOP, /*1 byte payload*/ + + EVENT_ECALL_START, /*3 byte payload*/ + EVENT_ECALL_STOP, /*1 byte payload*/ EVENT_ECALL_SESSION_START, /*1 byte payload*/ EVENT_ECALL_SESSION_FAILURE, /*1 byte payload*/ EVENT_ECALL_SESSION_COMPLETE, /*3 byte payload*/ diff --git a/CORE/VOSS/inc/i_vos_diag_core_event.h b/CORE/VOSS/inc/i_vos_diag_core_event.h index 9138ea7fe8fe..265485ab744d 100644 --- a/CORE/VOSS/inc/i_vos_diag_core_event.h +++ b/CORE/VOSS/inc/i_vos_diag_core_event.h @@ -29,11 +29,11 @@ #define __I_VOS_DIAG_CORE_EVENT_H /**========================================================================= - + \file i_vos_diag_core_event.h - + \brief Android specific definitions for vOSS DIAG events - + ========================================================================*/ /* $Header$ */ @@ -46,7 +46,7 @@ #include <event_defs.h> #endif -/*-------------------------------------------------------------------------- +/*-------------------------------------------------------------------------- Preprocessor definitions and constants ------------------------------------------------------------------------*/ @@ -61,7 +61,7 @@ void vos_event_report_payload(v_U16_t event_Id, v_U16_t length, v_VOID_t *pPaylo Allocate an event payload holder ---------------------------------------------------------------------------*/ #define WLAN_VOS_DIAG_EVENT_DEF( payload_name, payload_type ) \ - payload_type(payload_name) + payload_type(payload_name) /*--------------------------------------------------------------------------- Report the event @@ -77,13 +77,13 @@ void vos_event_report_payload(v_U16_t event_Id, v_U16_t length, v_VOID_t *pPaylo #else /* FEATURE_WLAN_DIAG_SUPPORT */ -#define WLAN_VOS_DIAG_EVENT_DEF( payload_name, payload_type ) -#define WLAN_VOS_DIAG_EVENT_REPORT( payload_ptr, ev_id ) +#define WLAN_VOS_DIAG_EVENT_DEF( payload_name, payload_type ) +#define WLAN_VOS_DIAG_EVENT_REPORT( payload_ptr, ev_id ) #endif /* FEATURE_WLAN_DIAG_SUPPORT */ -/*------------------------------------------------------------------------- +/*------------------------------------------------------------------------- Function declarations and documenation ------------------------------------------------------------------------*/ diff --git a/CORE/VOSS/inc/i_vos_diag_core_log.h b/CORE/VOSS/inc/i_vos_diag_core_log.h index a85af7c933c1..04f4c349d3a3 100644 --- a/CORE/VOSS/inc/i_vos_diag_core_log.h +++ b/CORE/VOSS/inc/i_vos_diag_core_log.h @@ -29,11 +29,11 @@ #define __I_VOS_DIAG_CORE_LOG_H /**========================================================================= - + \file i_vos_diag_core_event.h - + \brief android-specific definitions for vOSS DIAG logs - + ========================================================================*/ /* $Header$ */ @@ -48,22 +48,22 @@ #include <log_codes.h> #endif -/*-------------------------------------------------------------------------- +/*-------------------------------------------------------------------------- Preprocessor definitions and constants ------------------------------------------------------------------------*/ //FIXME To be removed when DIAG support is added. This definiton should be -//picked from log.h file above. +//picked from log.h file above. typedef struct { /* Specifies the length, in bytes of the entry, including this header. */ v_U16_t len; - + /* Specifies the log code for the entry*/ - v_U16_t code; + v_U16_t code; /*Time Stamp lo*/ v_U32_t ts_lo; - + /*Time Stamp hi*/ v_U32_t ts_hi; }__packed log_hdr_type; @@ -108,7 +108,7 @@ void vos_log_submit(v_VOID_t *plog_hdr_ptr); vos_mem_free(payload_ptr); \ } \ } while (0) - + /*--------------------------------------------------------------------------- Free the payload ---------------------------------------------------------------------------*/ @@ -120,18 +120,18 @@ void vos_log_submit(v_VOID_t *plog_hdr_ptr); vos_mem_free(payload_ptr); \ } \ } while (0) - + #else /* FEATURE_WLAN_DIAG_SUPPORT */ -#define WLAN_VOS_DIAG_LOG_ALLOC( payload_ptr, payload_type, log_code ) -#define WLAN_VOS_DIAG_LOG_REPORT( payload_ptr ) +#define WLAN_VOS_DIAG_LOG_ALLOC( payload_ptr, payload_type, log_code ) +#define WLAN_VOS_DIAG_LOG_REPORT( payload_ptr ) #define WLAN_VOS_DIAG_LOG_FREE( payload_ptr ) #endif /* FEATURE_WLAN_DIAG_SUPPORT */ -/*------------------------------------------------------------------------- +/*------------------------------------------------------------------------- Function declarations and documenation ------------------------------------------------------------------------*/ diff --git a/CORE/VOSS/inc/i_vos_list.h b/CORE/VOSS/inc/i_vos_list.h index 9561cbfd9e7f..119531c78c3a 100644 --- a/CORE/VOSS/inc/i_vos_list.h +++ b/CORE/VOSS/inc/i_vos_list.h @@ -29,11 +29,11 @@ #define __I_VOS_LIST_H /**========================================================================= - + \file i_vos_list.h - + \brief Linux-specific definitions for vOSS lists - + ========================================================================*/ /* $Header$ */ @@ -48,14 +48,14 @@ #include <linux/mutex.h> #include <linux/kernel.h> -/*-------------------------------------------------------------------------- +/*-------------------------------------------------------------------------- Preprocessor definitions and constants ------------------------------------------------------------------------*/ #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ -/*-------------------------------------------------------------------------- +/*-------------------------------------------------------------------------- Type declarations ------------------------------------------------------------------------*/ typedef struct vos_linux_list_s diff --git a/CORE/VOSS/inc/i_vos_lock.h b/CORE/VOSS/inc/i_vos_lock.h index a1db57838617..2418fdacb0c1 100644 --- a/CORE/VOSS/inc/i_vos_lock.h +++ b/CORE/VOSS/inc/i_vos_lock.h @@ -29,11 +29,11 @@ #define __I_VOS_LOCK_H /**========================================================================= - + \file i_vos_lock.h - + \brief Linux-specific definitions for vOSS Locks - + ========================================================================*/ /* $Header$ */ @@ -50,14 +50,14 @@ #include <linux/wakelock.h> #endif -/*-------------------------------------------------------------------------- +/*-------------------------------------------------------------------------- Preprocessor definitions and constants ------------------------------------------------------------------------*/ #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ -/*-------------------------------------------------------------------------- +/*-------------------------------------------------------------------------- Type declarations ------------------------------------------------------------------------*/ typedef struct vos_lock_s @@ -79,7 +79,7 @@ typedef struct wake_lock vos_wake_lock_t; typedef int vos_wake_lock_t; #endif -/*------------------------------------------------------------------------- +/*------------------------------------------------------------------------- Function declarations and documenation ------------------------------------------------------------------------*/ diff --git a/CORE/VOSS/inc/i_vos_timer.h b/CORE/VOSS/inc/i_vos_timer.h index f8f66bd93e0d..0c5f797dd2b0 100644 --- a/CORE/VOSS/inc/i_vos_timer.h +++ b/CORE/VOSS/inc/i_vos_timer.h @@ -29,11 +29,11 @@ #define __I_VOS_TIMER_H /**========================================================================= - + \file i_vos_timer.h - + \brief Linux-specific definitions for vOSS packets - + ========================================================================*/ /* $Header$ */ @@ -47,30 +47,30 @@ #include <linux/time.h> #include <linux/jiffies.h> -/*-------------------------------------------------------------------------- +/*-------------------------------------------------------------------------- Preprocessor definitions and constants ------------------------------------------------------------------------*/ #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ -/*-------------------------------------------------------------------------- +/*-------------------------------------------------------------------------- Type declarations ------------------------------------------------------------------------*/ typedef struct vos_timer_platform_s { struct timer_list Timer; - int threadID; + int threadID; v_U32_t cookie; spinlock_t spinlock; } vos_timer_platform_t; /* - * TODOs: Need to add deferred timer implementation + * TODOs: Need to add deferred timer implementation * -*/ +*/ #ifdef __cplusplus diff --git a/CORE/VOSS/inc/i_vos_trace.h b/CORE/VOSS/inc/i_vos_trace.h index 275da00ffd89..ce75a27bf824 100644 --- a/CORE/VOSS/inc/i_vos_trace.h +++ b/CORE/VOSS/inc/i_vos_trace.h @@ -33,11 +33,11 @@ #endif /**========================================================================= - + \file i_vos_trace.h - + \brief Linux-specific definitions for VOSS trace - + ========================================================================*/ /* $Header$ */ @@ -47,27 +47,27 @@ ------------------------------------------------------------------------*/ /**---------------------------------------------------------------------------- - + \brief VOS_TRACE() / vos_trace_msg() - Trace / logging API - - Users wishing to add tracing information to their code should use + + Users wishing to add tracing information to their code should use VOS_TRACE. VOS_TRACE() will compile into a call to vos_trace_msg() when tracing is enabled. - + \param module - module identifier. A member of the VOS_MODULE_ID enumeration that identifies the module issuing the trace message. - - \param level - trace level. A member of the VOS_TRACE_LEVEL + + \param level - trace level. A member of the VOS_TRACE_LEVEL enumeration indicating the severity of the condition causing the - trace message to be issued. More severe conditions are more + trace message to be issued. More severe conditions are more likely to be logged. - + \param strFormat - format string. The message to be logged. This format string contains printf-like replacement parameters, which follow - this parameter in the variable argument list. - + this parameter in the variable argument list. + \return nothing - + --------------------------------------------------------------------------*/ void __printf(3,4) vos_trace_msg( VOS_MODULE_ID module, VOS_TRACE_LEVEL level, char *strFormat, ... ); @@ -80,9 +80,9 @@ void vos_trace_display(void); void vos_trace_setValue( VOS_MODULE_ID module, VOS_TRACE_LEVEL level, v_U8_t on ); -// VOS_TRACE is the macro invoked to add trace messages to code. See the +// VOS_TRACE is the macro invoked to add trace messages to code. See the // documenation for vos_trace_msg() for the parameters etc. for this function. -// +// // NOTE: Code VOS_TRACE() macros into the source code. Do not code directly // to the vos_trace_msg() function. // @@ -113,13 +113,13 @@ void __printf(3,4) vos_snprintf(char *strBuffer, unsigned int size, } \ } while(0) -#else +#else // This code will be used for compilation if tracing is to be compiled out // of the code so these functions/macros are 'do nothing' VOS_INLINE_FN void vos_trace_msg( VOS_MODULE_ID module, ... ){} - + #define VOS_ASSERT( _condition ) #endif diff --git a/CORE/VOSS/inc/i_vos_types.h b/CORE/VOSS/inc/i_vos_types.h index 35735440a88b..e4cde703e78a 100644 --- a/CORE/VOSS/inc/i_vos_types.h +++ b/CORE/VOSS/inc/i_vos_types.h @@ -38,13 +38,13 @@ #include <asm/div64.h> /**========================================================================= - + \file i_vos_Types.h - + \brief virtual Operating System Servies (vOSS) Types - + Linux specific basic type definitions - + ========================================================================*/ /* $Header$ */ @@ -53,14 +53,14 @@ Include Files ------------------------------------------------------------------------*/ -/*-------------------------------------------------------------------------- +/*-------------------------------------------------------------------------- Preprocessor definitions and constants ------------------------------------------------------------------------*/ /* * 1. GNU C/C++ Compiler * * How to detect gcc : __GNUC__ - * How to detect gcc version : + * How to detect gcc version : * major version : __GNUC__ (2 = 2.x, 3 = 3.x, 4 = 4.x) * minor version : __GNUC_MINOR__ * @@ -71,10 +71,10 @@ * _MSC_VER (1200 = MSVC 6.0, 1300 = MSVC 7.0, ...) * */ - -// MACROs to help with compiler and OS specifics. + +// MACROs to help with compiler and OS specifics. // \note: may need to get a little more sophisticated than this and define -// these to specific 'VERSIONS' of the compiler and OS. Until we have a +// these to specific 'VERSIONS' of the compiler and OS. Until we have a // need for that, lets go with this. #if defined( _MSC_VER ) @@ -89,26 +89,26 @@ #endif -// VOS definitions (compiler specific) for Packing structures. Note that the -// Windows compiler defines a way to pack a 'range' of code in a file. To +// VOS definitions (compiler specific) for Packing structures. Note that the +// Windows compiler defines a way to pack a 'range' of code in a file. To // accomodate this, we have to include a file that has the packing #pragmas // These files are called // vos_pack_range_n_start.h where "n" is the packing aligment. For example, -// vos_pack_range_2_start.h is included in the file where you want to +// vos_pack_range_2_start.h is included in the file where you want to // start packing on a 2 byte alignment. vos_pack_range_end.h is included // in the file where you want to stop the packing. // // Other compilers allow packing individual strucutres so we have a series // of macros that are added to the structure to define the packing attributes. -// For example, VOS_PACK_STRUCT_2 will add the attributes to pack an -// individual structure on a 2 byte boundary. +// For example, VOS_PACK_STRUCT_2 will add the attributes to pack an +// individual structure on a 2 byte boundary. // // So what does a coder have to do to properly pack a structure for all the -// supported compilers? You have to add two includes around *all* the -// structures you want packed the same way and you also have to add the -// VOS_PACK_STRUCT_n macros to the individual structures. +// supported compilers? You have to add two includes around *all* the +// structures you want packed the same way and you also have to add the +// VOS_PACK_STRUCT_n macros to the individual structures. // -// For example to properly pack myStruct on a 2 byte boundary for all +// For example to properly pack myStruct on a 2 byte boundary for all // voss supported compilers, the following needs coded... // // @@ -121,7 +121,7 @@ // } myStruct VOS_PACK_STRUCT_2; // // -// note... you can include other structure definitions in here that have the +// note... you can include other structure definitions in here that have the // same 2 byte packing // // #include <vos_pack_range_end.h> @@ -130,7 +130,7 @@ // /todo: not sure what the flag is to identify the Microsoft compiler for WinMobile // Let's leave this out for now and just include the defintions for WinMobile. Need // to address this when we move to support other operating systems. Probably best to -// define some of our own 'types' or preprocessor flags like VOS_COMPILER_TYPE, +// define some of our own 'types' or preprocessor flags like VOS_COMPILER_TYPE, // VOS_OS_TYPE, etc. and then all our code can base on those flags/types independent // of the operating system, compiler, etc. #if defined( VOS_COMPILER_MSC ) @@ -138,7 +138,7 @@ #define VOS_INLINE_FN __inline -// does nothing on Windows. packing individual structs is not +// does nothing on Windows. packing individual structs is not // supported on the Windows compiler. #define VOS_PACK_STRUCT_1 #define VOS_PACK_STRUCT_2 @@ -154,9 +154,9 @@ #error "Compiling with an unknown compiler!!" #endif - -/*-------------------------------------------------------------------------- + +/*-------------------------------------------------------------------------- Type declarations ------------------------------------------------------------------------*/ @@ -194,7 +194,7 @@ typedef signed long v_SLONG_t; /// signed integer types typedef signed int v_SINT_t; - + /// Boolean types typedef unsigned char v_BOOL_t; diff --git a/CORE/VOSS/inc/log_codes.h b/CORE/VOSS/inc/log_codes.h index 509dc8e28cb7..8b351db03538 100644 --- a/CORE/VOSS/inc/log_codes.h +++ b/CORE/VOSS/inc/log_codes.h @@ -39,7 +39,7 @@ General Description /* DO NOT MODIFY THIS FILE WITHOUT PRIOR APPROVAL ** -** Log codes, by design, are a tightly controlled set of values. +** Log codes, by design, are a tightly controlled set of values. ** Developers may not create log codes at will. ** ** Request new logs using the following process: @@ -55,11 +55,11 @@ General Description Edit History $Header: //source/qcom/qct/core/services/diag/api/inc/main/latest/log_codes.h#9 $ - + when who what, where, why -------- --- ---------------------------------------------------------- 07/30/09 dhao Consolidate log_codes_apps.h -07/30/09 dhao Add Last log code definition for Equip ID 11 +07/30/09 dhao Add Last log code definition for Equip ID 11 06/26/09 dhao Update format the macro 06/24/09 sar Reverted last change. 06/24/09 sar Added log code for LOG_MC_STM_C. @@ -72,7 +72,7 @@ when who what, where, why 05/16/01 sfh Reserved log code 155. 05/08/01 sfh Reserved log codes 150 - 154. 04/06/01 lad Added definitions of base IDs (such as LOG_WCDMA_BASE_C). - This is currently using temporary ID values in the 0x1000 + This is currently using temporary ID values in the 0x1000 range. 02/23/01 lad Created file from DMSS log.h. Log codes only @@ -86,10 +86,10 @@ when who what, where, why /* ------------------------------------------------------------------------- * Log equipment IDs. * The most significant 4 bits of the 16 bit log code is the equipment ID. - * Orignally, the mobile was to have an ID, and base stations and other + * Orignally, the mobile was to have an ID, and base stations and other * IDs. As QCT technology diversifies, new equipment IDs are assigned to new - * technology areas. 0x2000 and 0x3000 are reserved for legacy reasons, so - * the first + * technology areas. 0x2000 and 0x3000 are reserved for legacy reasons, so + * the first * addition starts at 0x4000. * ------------------------------------------------------------------------- */ @@ -108,15 +108,15 @@ when who what, where, why #define LOG_TOOLS_BASE_C ((v_U16_t) 0xF000) -/* LOG_BASE_C is what was used before expanding the use of the equipment ID. +/* LOG_BASE_C is what was used before expanding the use of the equipment ID. * TODO: Once all targets are using the "core" diag system, this should be * ommitted. */ -#define LOG_BASE_C LOG_1X_BASE_C +#define LOG_BASE_C LOG_1X_BASE_C /* ------------------------------------------------------------------------- * Log Codes - * These codes identify the kind of information contained in a log entry. - * They are used in conjunction with the 'code' field of the log entry + * These codes identify the kind of information contained in a log entry. + * They are used in conjunction with the 'code' field of the log entry * header. The data types associated with each code are defined below. * ------------------------------------------------------------------------- */ @@ -140,11 +140,11 @@ when who what, where, why /* 5 Reverse link traffic channel message entry */ #define LOG_R_TC_MSG_C (0x5 + LOG_1X_BASE_C) - + /* 6 Sync channel message entry */ #define LOG_SC_MSG_C (0x6 + LOG_1X_BASE_C) -/* 7 Paging channel message entry */ +/* 7 Paging channel message entry */ #define LOG_PC_MSG_C (0x7 + LOG_1X_BASE_C) /* 8 Forward link traffic channel message entry */ @@ -191,7 +191,7 @@ when who what, where, why /* 22 Sparse (20ms) AGC / closed loop power control entry */ #define LOG_S_AGC_PCTL_C (0x16 + LOG_1X_BASE_C) - + /* 23 Notification of a band class change */ #define LOG_BAND_CHANGE_C (0x17 + LOG_1X_BASE_C) @@ -204,8 +204,8 @@ when who what, where, why /* 26 General temporal analyzer w/supplemental channels */ #define LOG_GENRL_TA_SUP_CH_C (0x1A + LOG_1X_BASE_C) -/* Featurization Removal requested by CMI -#ifdef FEATURE_PLT +/* Featurization Removal requested by CMI +#ifdef FEATURE_PLT */ /* 27 Decoder raw bits logging */ @@ -213,9 +213,9 @@ when who what, where, why /* Featurization Removal requested by CMI #else -27 EFS Usage Info - No implementation as yet +27 EFS Usage Info - No implementation as yet #define LOG_EFS_INFO_C (0x1B + LOG_1X_BASE_C) -#endif +#endif */ /* 28 Analog Forward Channel */ @@ -229,7 +229,7 @@ when who what, where, why /* 31 FM Slot Statistis entry */ #define LOG_ANALOG_FMSLOT_C (0x1F + LOG_1X_BASE_C) - + /* 32 FOCC Word Sync Count entry */ #define LOG_ANALOG_WS_COUNT_C (0x20 + LOG_1X_BASE_C) @@ -246,10 +246,10 @@ when who what, where, why #define LOG_FNBDT_MESSAGE_LOG_C (0x24 + LOG_1X_BASE_C) /* Begin IS-2000 LOG features */ - -/* 37 RLP RX Frames logging */ + +/* 37 RLP RX Frames logging */ #define LOG_RLP_RX_FRAMES_C (0x25 + LOG_1X_BASE_C) - + /* 38 RLP TX Frames logging */ #define LOG_RLP_TX_FRAMES_C (0x26 + LOG_1X_BASE_C) @@ -261,10 +261,10 @@ when who what, where, why /* 41 Forward Link Frame Types logging */ #define LOG_FWD_FRAME_TYPES_C (0x29 + LOG_1X_BASE_C) - + /* 42 Reverse Link Frame Types logging */ #define LOG_REV_FRAME_TYPES_C (0x2A + LOG_1X_BASE_C) - + /* 43 Fast Forward Power Control Parameters logging */ #define LOG_FFWD_PCTRL_C (0x2B + LOG_1X_BASE_C) @@ -273,10 +273,10 @@ when who what, where, why /* 45 Searcher and Finger Information logging */ #define LOG_SRCH_FING_INFO_C (0x2D + LOG_1X_BASE_C) - + /* 46 Service Configuration logging */ #define LOG_SVC_CONFIG_C (0x2E + LOG_1X_BASE_C) - + /* 47 Active Set Configuration logging */ #define LOG_ASET_CONFIG_C (0x2F + LOG_1X_BASE_C) @@ -341,7 +341,7 @@ when who what, where, why /* 144 IS2000 DCCH Forward link channel */ #define LOG_FOR_DCCH_MSG_C (0x90 + LOG_1X_BASE_C) #define LOG_DCCH_FWD_C LOG_FOR_DCCH_MSG_C - + /* 145 IS2000 DCCH Forward link channel */ #define LOG_REV_DCCH_MSG_C (0x91 + LOG_1X_BASE_C) #define LOG_DCCH_REV_C LOG_REV_DCCH_MSG_C @@ -794,7 +794,7 @@ when who what, where, why /* GPS Decoded Ephemeris */ #define LOG_GPS_DECODED_EPHEMERIS_C (0x2E6 + LOG_1X_BASE_C) - + /* GPS Decoded Almanac */ #define LOG_GPS_DECODED_ALMANAC_C (0x2E7 + LOG_1X_BASE_C) @@ -1640,7 +1640,7 @@ when who what, where, why #define LOG_DTV_DVBH_SEC_SC_HTTP_DIGEST_REQ_C (0x462 + LOG_1X_BASE_C) /* DTV DVBH Security SmartCard HTTP Digest Response Info */ -#define LOG_DTV_DVBH_SEC_SC_HTTP_DIGEST_RSP_C (0x463 + LOG_1X_BASE_C) +#define LOG_DTV_DVBH_SEC_SC_HTTP_DIGEST_RSP_C (0x463 + LOG_1X_BASE_C) /* DTV DVBH Security SmartCard Services Registration Request Info */ #define LOG_DTV_DVBH_SEC_SC_SVC_REG_REQ_C (0x464 + LOG_1X_BASE_C) @@ -1652,13 +1652,13 @@ when who what, where, why #define LOG_DTV_DVBH_SEC_SC_SVC_DEREG_REQ_C (0x466 + LOG_1X_BASE_C) /* DTV DVBH Security SmartCard Services Deregistration Complete Info */ -#define LOG_DTV_DVBH_SEC_SC_SVC_DEREG_COMPLETE_C (0x467 + LOG_1X_BASE_C) +#define LOG_DTV_DVBH_SEC_SC_SVC_DEREG_COMPLETE_C (0x467 + LOG_1X_BASE_C) /* DTV DVBH Security SmartCard LTKM Request Info */ #define LOG_DTV_DVBH_SEC_SC_LTKM_REQ_C (0x468 + LOG_1X_BASE_C) /* DTV DVBH Security SmartCard LTKM Request Complete Info */ -#define LOG_DTV_DVBH_SEC_SC_LTKM_REQ_COMPLETE_C (0x469 + LOG_1X_BASE_C) +#define LOG_DTV_DVBH_SEC_SC_LTKM_REQ_COMPLETE_C (0x469 + LOG_1X_BASE_C) /* DTV DVBH Security SmartCard Program Selection Info */ #define LOG_DTV_DVBH_SEC_SC_PROG_SEL_C (0x46A + LOG_1X_BASE_C) @@ -1667,10 +1667,10 @@ when who what, where, why #define LOG_DTV_DVBH_SEC_SC_PROG_SEL_COMPLETE_C (0x46B + LOG_1X_BASE_C) /* DTV DVBH Security SmartCard LTKM */ -#define LOG_DTV_DVBH_SEC_SC_LTKM_C (0x46C + LOG_1X_BASE_C) +#define LOG_DTV_DVBH_SEC_SC_LTKM_C (0x46C + LOG_1X_BASE_C) /* DTV DVBH Security SmartCard LTKM Verification Message */ -#define LOG_DTV_DVBH_SEC_SC_LTKM_VERIFICATION_C (0x46D + LOG_1X_BASE_C) +#define LOG_DTV_DVBH_SEC_SC_LTKM_VERIFICATION_C (0x46D + LOG_1X_BASE_C) /* DTV DVBH Security SmartCard Parental Control Message */ #define LOG_DTV_DVBH_SEC_SC_PARENTAL_CTRL_C (0x46E + LOG_1X_BASE_C) @@ -1691,52 +1691,52 @@ when who what, where, why #define LOG_MCS_QTF_C (0x473 + LOG_1X_BASE_C) /* Sensors Stationary Detector Output */ -#define LOG_STATIONARY_DETECTOR_OUTPUT_C (0x474 + LOG_1X_BASE_C) +#define LOG_STATIONARY_DETECTOR_OUTPUT_C (0x474 + LOG_1X_BASE_C) /* Print out the ppm data portion */ -#define LOG_CGPS_PDSM_EXT_STATUS_MEAS_REPORT_PPM_C (0x475 + LOG_1X_BASE_C) +#define LOG_CGPS_PDSM_EXT_STATUS_MEAS_REPORT_PPM_C (0x475 + LOG_1X_BASE_C) /* GNSS Position Report */ -#define LOG_GNSS_POSITION_REPORT_C (0x476 + LOG_1X_BASE_C) +#define LOG_GNSS_POSITION_REPORT_C (0x476 + LOG_1X_BASE_C) /* GNSS GPS Measurement Report */ -#define LOG_GNSS_GPS_MEASUREMENT_REPORT_C (0x477 + LOG_1X_BASE_C) +#define LOG_GNSS_GPS_MEASUREMENT_REPORT_C (0x477 + LOG_1X_BASE_C) /* GNSS Clock Report */ -#define LOG_GNSS_CLOCK_REPORT_C (0x478 + LOG_1X_BASE_C) +#define LOG_GNSS_CLOCK_REPORT_C (0x478 + LOG_1X_BASE_C) /* GNSS Demod Soft Decision */ -#define LOG_GNSS_DEMOD_SOFT_DECISIONS_C (0x479 + LOG_1X_BASE_C) +#define LOG_GNSS_DEMOD_SOFT_DECISIONS_C (0x479 + LOG_1X_BASE_C) /* GNSS ME 5MS IQ sum */ -#define LOG_GNSS_ME_5MS_IQ_SUMS_C (0x47A + LOG_1X_BASE_C) +#define LOG_GNSS_ME_5MS_IQ_SUMS_C (0x47A + LOG_1X_BASE_C) /* GNSS CD DB report */ -#define LOG_GNSS_CD_DB_REPORT_C (0x47B + LOG_1X_BASE_C) +#define LOG_GNSS_CD_DB_REPORT_C (0x47B + LOG_1X_BASE_C) /* GNSS PE WLS position report */ -#define LOG_GNSS_PE_WLS_POSITION_REPORT_C (0x47C + LOG_1X_BASE_C) +#define LOG_GNSS_PE_WLS_POSITION_REPORT_C (0x47C + LOG_1X_BASE_C) /* GNSS PE KF position report */ -#define LOG_GNSS_PE_KF_POSITION_REPORT_C (0x47D + LOG_1X_BASE_C) +#define LOG_GNSS_PE_KF_POSITION_REPORT_C (0x47D + LOG_1X_BASE_C) /* GNSS PRX RF HW status report */ -#define LOG_GNSS_PRX_RF_HW_STATUS_REPORT_C (0x47E + LOG_1X_BASE_C) +#define LOG_GNSS_PRX_RF_HW_STATUS_REPORT_C (0x47E + LOG_1X_BASE_C) /* GNSS DRX RF HW status report */ -#define LOG_GNSS_DRX_RF_HW_STATUS_REPORT_C (0x47F + LOG_1X_BASE_C) +#define LOG_GNSS_DRX_RF_HW_STATUS_REPORT_C (0x47F + LOG_1X_BASE_C) /* GNSS Glonass Measurement report */ -#define LOG_GNSS_GLONASS_MEASUREMENT_REPORT_C (0x480 + LOG_1X_BASE_C) +#define LOG_GNSS_GLONASS_MEASUREMENT_REPORT_C (0x480 + LOG_1X_BASE_C) /* GNSS GPS HBW RXD measurement */ -#define LOG_GNSS_GPS_HBW_RXD_MEASUREMENT_C (0x481 + LOG_1X_BASE_C) +#define LOG_GNSS_GPS_HBW_RXD_MEASUREMENT_C (0x481 + LOG_1X_BASE_C) /* GNSS PDSM position report callback */ #define LOG_GNSS_PDSM_POSITION_REPORT_CALLBACK_C (0x482 + LOG_1X_BASE_C) /* ISense Request String */ -#define LOG_ISENSE_REQUEST_STR_C (0x483 + LOG_1X_BASE_C) +#define LOG_ISENSE_REQUEST_STR_C (0x483 + LOG_1X_BASE_C) /* ISense Response String */ #define LOG_ISENSE_RESPONSE_STR_C (0x484 + LOG_1X_BASE_C) @@ -1836,7 +1836,7 @@ when who what, where, why /* PMIC Vreg Level */ #define LOG_PM_VREG_LEVEL_C (0x4A4 + LOG_1X_BASE_C) - + /* PMIC Vreg State */ #define LOG_PM_VREG_STATE_C (0x4A5 + LOG_1X_BASE_C) @@ -1890,7 +1890,7 @@ when who what, where, why /* Motion State Hard Decision */ #define LOG_MOTION_STATE_HARD_DECISION_C (0x4B6 + LOG_1X_BASE_C) - + /* Motion State Soft Decision */ #define LOG_MOTION_STATE_SOFT_DECISION_C (0x4B7 + LOG_1X_BASE_C) @@ -2057,23 +2057,23 @@ typedef enum { #define LOG_EQUIP_ID_MAX 0xF /* The equipment ID is 4 bits */ -/* Note that these are the official values and are used by default in +/* Note that these are the official values and are used by default in diagtune.h. */ -#define LOG_EQUIP_ID_0_LAST_CODE_DEFAULT 0 +#define LOG_EQUIP_ID_0_LAST_CODE_DEFAULT 0 #define LOG_EQUIP_ID_1_LAST_CODE_DEFAULT LOG_1X_LAST_C -#define LOG_EQUIP_ID_2_LAST_CODE_DEFAULT 0 -#define LOG_EQUIP_ID_3_LAST_CODE_DEFAULT 0 +#define LOG_EQUIP_ID_2_LAST_CODE_DEFAULT 0 +#define LOG_EQUIP_ID_3_LAST_CODE_DEFAULT 0 #define LOG_EQUIP_ID_4_LAST_CODE_DEFAULT 0 #define LOG_EQUIP_ID_5_LAST_CODE_DEFAULT 0 -#define LOG_EQUIP_ID_6_LAST_CODE_DEFAULT 0 +#define LOG_EQUIP_ID_6_LAST_CODE_DEFAULT 0 #define LOG_EQUIP_ID_7_LAST_CODE_DEFAULT 0 #define LOG_EQUIP_ID_8_LAST_CODE_DEFAULT 0 -#define LOG_EQUIP_ID_9_LAST_CODE_DEFAULT 0 -#define LOG_EQUIP_ID_10_LAST_CODE_DEFAULT 0 -#define LOG_EQUIP_ID_11_LAST_CODE_DEFAULT LOG_LTE_LAST_C -#define LOG_EQUIP_ID_12_LAST_CODE_DEFAULT 0 -#define LOG_EQUIP_ID_13_LAST_CODE_DEFAULT 0 +#define LOG_EQUIP_ID_9_LAST_CODE_DEFAULT 0 +#define LOG_EQUIP_ID_10_LAST_CODE_DEFAULT 0 +#define LOG_EQUIP_ID_11_LAST_CODE_DEFAULT LOG_LTE_LAST_C +#define LOG_EQUIP_ID_12_LAST_CODE_DEFAULT 0 +#define LOG_EQUIP_ID_13_LAST_CODE_DEFAULT 0 #define LOG_EQUIP_ID_14_LAST_CODE_DEFAULT 0 #define LOG_EQUIP_ID_15_LAST_CODE_DEFAULT 0 diff --git a/CORE/VOSS/inc/vos_api.h b/CORE/VOSS/inc/vos_api.h index 5056b3304a7b..856bd63df26d 100644 --- a/CORE/VOSS/inc/vos_api.h +++ b/CORE/VOSS/inc/vos_api.h @@ -29,30 +29,30 @@ #define __VOS_API_H /**========================================================================= - + \file vos_Api.h - + \brief virtual Operating System Services (vOSS) API - + Header file that inludes all the vOSS API definitions. - + ========================================================================*/ - /*=========================================================================== - - EDIT HISTORY FOR FILE - - - This section contains comments describing changes made to the module. - Notice that changes are listed in reverse chronological order. - - - $Header:$ $DateTime: $ $Author: $ - - - when who what, where, why + /*=========================================================================== + + EDIT HISTORY FOR FILE + + + This section contains comments describing changes made to the module. + Notice that changes are listed in reverse chronological order. + + + $Header:$ $DateTime: $ $Author: $ + + + when who what, where, why -------- --- -------------------------------------------------------- 06/23/08 hba Added vos_preOpen() - 05/18/08 lac Created module. + 05/18/08 lac Created module. ===========================================================================*/ /*-------------------------------------------------------------------------- @@ -74,31 +74,31 @@ #include <vos_timer.h> #include <vos_pack_align.h> -/*------------------------------------------------------------------------- +/*------------------------------------------------------------------------- Function declarations and documenation ------------------------------------------------------------------------*/ /**-------------------------------------------------------------------------- - - \brief vos_preOpen() - PreOpen the vOSS Module - - The \a vos_preOpen() function allocates the Vos Context, but do not + + \brief vos_preOpen() - PreOpen the vOSS Module + + The \a vos_preOpen() function allocates the Vos Context, but do not initialize all the members. This overal initialization will happen at vos_Open(). - The reason why we need vos_preOpen() is to get a minimum context + The reason why we need vos_preOpen() is to get a minimum context where to store BAL and SAL relative data, which happens before vos_Open() is called. - - \param pVosContext: A pointer to where to store the VOS Context - - - \return VOS_STATUS_SUCCESS - Scheduler was successfully initialized and + + \param pVosContext: A pointer to where to store the VOS Context + + + \return VOS_STATUS_SUCCESS - Scheduler was successfully initialized and is ready to be used. - - VOS_STATUS_E_FAILURE - Failure to initialize the scheduler/ - + + VOS_STATUS_E_FAILURE - Failure to initialize the scheduler/ + \sa vos_open() - + ---------------------------------------------------------------------------*/ VOS_STATUS vos_preOpen ( v_CONTEXT_t *pVosContext ); @@ -112,7 +112,7 @@ VOS_STATUS vos_open( v_CONTEXT_t *pVosContext, v_SIZE_t hddContextSize ); -VOS_STATUS vos_start( v_CONTEXT_t vosContext ); +VOS_STATUS vos_start( v_CONTEXT_t vosContext ); VOS_STATUS vos_stop( v_CONTEXT_t vosContext ); @@ -125,45 +125,45 @@ VOS_STATUS vos_shutdown( v_CONTEXT_t vosContext ); VOS_STATUS vos_wda_shutdown( v_CONTEXT_t vosContext ); /**--------------------------------------------------------------------------- - + \brief vos_get_context() - get context data area - + Each module in the system has a context / data area that is allocated - and maanged by voss. This API allows any user to get a pointer to its - allocated context data area from the VOSS global context. + and maanged by voss. This API allows any user to get a pointer to its + allocated context data area from the VOSS global context. + + \param vosContext - the VOSS Global Context. - \param vosContext - the VOSS Global Context. - \param moduleId - the module ID, who's context data are is being retrived. - + \return - pointer to the context data area. - + - NULL if the context data is not allocated for the module ID - specified - + specified + --------------------------------------------------------------------------*/ -v_VOID_t *vos_get_context( VOS_MODULE_ID moduleId, +v_VOID_t *vos_get_context( VOS_MODULE_ID moduleId, v_CONTEXT_t vosContext ); /**--------------------------------------------------------------------------- - + \brief vos_get_global_context() - get VOSS global Context - + This API allows any user to get the VOS Global Context pointer from a - module context data area. - + module context data area. + \param moduleContext - the input module context pointer - - \param moduleId - the module ID who's context pointer is input in + + \param moduleId - the module ID who's context pointer is input in moduleContext. - + \return - pointer to the VOSS global context - - - NULL if the function is unable to retreive the VOSS context. - + + - NULL if the function is unable to retreive the VOSS context. + --------------------------------------------------------------------------*/ -v_CONTEXT_t vos_get_global_context( VOS_MODULE_ID moduleId, +v_CONTEXT_t vos_get_global_context( VOS_MODULE_ID moduleId, v_VOID_t *moduleContext ); v_U8_t vos_is_logp_in_progress(VOS_MODULE_ID moduleId, v_VOID_t *moduleContext); @@ -176,81 +176,81 @@ v_U8_t vos_is_reinit_in_progress(VOS_MODULE_ID moduleId, v_VOID_t *moduleContext void vos_set_reinit_in_progress(VOS_MODULE_ID moduleId, v_U8_t value); /**--------------------------------------------------------------------------- - + \brief vos_alloc_context() - allocate a context within the VOSS global Context - - This API allows any user to allocate a user context area within the - VOS Global Context. - + + This API allows any user to allocate a user context area within the + VOS Global Context. + \param pVosContext - pointer to the global Vos context - + \param moduleId - the module ID who's context area is being allocated. - - \param ppModuleContext - pointer to location where the pointer to the - allocated context is returned. Note this + + \param ppModuleContext - pointer to location where the pointer to the + allocated context is returned. Note this output pointer is valid only if the API returns VOS_STATUS_SUCCESS - + \param size - the size of the context area to be allocated. - - \return - VOS_STATUS_SUCCESS - the context for the module ID has been + + \return - VOS_STATUS_SUCCESS - the context for the module ID has been allocated successfully. The pointer to the context area - can be found in *ppModuleContext. - \note This function returns VOS_STATUS_SUCCESS if the - module context was already allocated and the size + can be found in *ppModuleContext. + \note This function returns VOS_STATUS_SUCCESS if the + module context was already allocated and the size allocated matches the size on this call. - VOS_STATUS_E_INVAL - the moduleId is not a valid or does + VOS_STATUS_E_INVAL - the moduleId is not a valid or does not identify a module that can have a context allocated. - VOS_STATUS_E_EXISTS - vos could allocate the requested context + VOS_STATUS_E_EXISTS - vos could allocate the requested context because a context for this module ID already exists and it is a *different* size that specified on this call. - - VOS_STATUS_E_NOMEM - vos could not allocate memory for the - requested context area. - + + VOS_STATUS_E_NOMEM - vos could not allocate memory for the + requested context area. + \sa vos_get_context(), vos_free_context() - + --------------------------------------------------------------------------*/ -VOS_STATUS vos_alloc_context( v_VOID_t *pVosContext, VOS_MODULE_ID moduleID, +VOS_STATUS vos_alloc_context( v_VOID_t *pVosContext, VOS_MODULE_ID moduleID, v_VOID_t **ppModuleContext, v_SIZE_t size ); /**--------------------------------------------------------------------------- - - \brief vos_free_context() - free an allocated a context within the + + \brief vos_free_context() - free an allocated a context within the VOSS global Context - - This API allows a user to free the user context area within the - VOS Global Context. - + + This API allows a user to free the user context area within the + VOS Global Context. + \param pVosContext - pointer to the global Vos context - + \param moduleId - the module ID who's context area is being free - + \param pModuleContext - pointer to module context area to be free'd. - - \return - VOS_STATUS_SUCCESS - the context for the module ID has been - free'd. The pointer to the context area is not longer + + \return - VOS_STATUS_SUCCESS - the context for the module ID has been + free'd. The pointer to the context area is not longer available. - - VOS_STATUS_E_FAULT - pVosContext or pModuleContext are not + + VOS_STATUS_E_FAULT - pVosContext or pModuleContext are not valid pointers. - - VOS_STATUS_E_INVAL - the moduleId is not a valid or does + + VOS_STATUS_E_INVAL - the moduleId is not a valid or does not identify a module that can have a context free'd. - - VOS_STATUS_E_EXISTS - vos could not free the requested + + VOS_STATUS_E_EXISTS - vos could not free the requested context area because a context for this module ID does not exist in the global vos context. - - \sa vos_get_context() - + + \sa vos_get_context() + --------------------------------------------------------------------------*/ VOS_STATUS vos_free_context( v_VOID_t *pVosContext, VOS_MODULE_ID moduleID, v_VOID_t *pModuleContext ); - + v_BOOL_t vos_is_apps_power_collapse_allowed(void* pHddCtx); void vos_abort_mac_scan(tANI_U8 sessionId); @@ -296,7 +296,7 @@ VOS_STATUS vos_get_vdev_types(tVOS_CON_MODE mode, tANI_U32 *type, /** @brief vos_wlanRestart() - This API will reload WLAN driver. - This function is called if driver detects any fatal state which + This function is called if driver detects any fatal state which can be recovered by a WLAN module reload ( Android framwork initiated ). Note that this API will not initiate any RIVA subsystem restart. diff --git a/CORE/VOSS/inc/vos_diag_core_event.h b/CORE/VOSS/inc/vos_diag_core_event.h index aecb81f2f803..5fa0526fb0bb 100644 --- a/CORE/VOSS/inc/vos_diag_core_event.h +++ b/CORE/VOSS/inc/vos_diag_core_event.h @@ -29,13 +29,13 @@ #define __VOS_DIAG_CORE_EVENT_H /**========================================================================= - + \file vos_event.h - + \brief virtual Operating System Services (vOSS) DIAG Events - + Definitions for vOSS Events - + ========================================================================*/ /* $Header$ */ @@ -47,14 +47,14 @@ #include "vos_pack_align.h" #include "i_vos_diag_core_event.h" -/*-------------------------------------------------------------------------- +/*-------------------------------------------------------------------------- Preprocessor definitions and constants ------------------------------------------------------------------------*/ #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ -/*------------------------------------------------------------------------- +/*------------------------------------------------------------------------- Event ID: EVENT_WLAN_SECURITY ------------------------------------------------------------------------*/ typedef struct @@ -69,7 +69,7 @@ typedef struct v_U8_t status; } vos_event_wlan_security_payload_type; -/*------------------------------------------------------------------------- +/*------------------------------------------------------------------------- Event ID: EVENT_WLAN_STATUS ------------------------------------------------------------------------*/ typedef struct @@ -86,7 +86,7 @@ typedef struct v_U8_t reasonDisconnect; } vos_event_wlan_status_payload_type; -/*------------------------------------------------------------------------- +/*------------------------------------------------------------------------- Event ID: EVENT_WLAN_HANDOFF ------------------------------------------------------------------------*/ typedef struct @@ -98,7 +98,7 @@ typedef struct v_U8_t candidateApRssi; } vos_event_wlan_handoff_payload_type; -/*------------------------------------------------------------------------- +/*------------------------------------------------------------------------- Event ID: EVENT_WLAN_VCC ------------------------------------------------------------------------*/ typedef struct @@ -110,7 +110,7 @@ typedef struct int linkQuality; } vos_event_wlan_vcc_payload_type; -/*------------------------------------------------------------------------- +/*------------------------------------------------------------------------- Event ID: EVENT_WLAN_QOS ------------------------------------------------------------------------*/ typedef struct @@ -119,7 +119,7 @@ typedef struct v_U8_t reasonCode; } vos_event_wlan_qos_payload_type; -/*------------------------------------------------------------------------- +/*------------------------------------------------------------------------- Event ID: EVENT_WLAN_PE ------------------------------------------------------------------------*/ typedef struct @@ -129,10 +129,10 @@ typedef struct v_U16_t sme_state; v_U16_t mlm_state; v_U16_t status; - v_U16_t reason_code; + v_U16_t reason_code; } vos_event_wlan_pe_payload_type; -/*------------------------------------------------------------------------- +/*------------------------------------------------------------------------- Event ID: EVENT_WLAN_ADD_BLOCK_ACK_SUCCESS ------------------------------------------------------------------------*/ typedef struct @@ -141,51 +141,51 @@ typedef struct v_U8_t ucBaTid; v_U8_t ucBaBufferSize; v_U16_t usBaSSN; - v_U8_t fInitiator; + v_U8_t fInitiator; } vos_event_wlan_add_block_ack_success_payload_type; -/*------------------------------------------------------------------------- +/*------------------------------------------------------------------------- Event ID: EVENT_WLAN_ADD_BLOCK_ACK_FAILED ------------------------------------------------------------------------*/ typedef struct { - char ucBaPeerMac[6]; + char ucBaPeerMac[6]; v_U8_t ucBaTid; v_U8_t ucReasonCode; - v_U8_t fInitiator; + v_U8_t fInitiator; } vos_event_wlan_add_block_ack_failed_payload_type; -/*------------------------------------------------------------------------- +/*------------------------------------------------------------------------- Event ID: EVENT_WLAN_DELETE_BLOCK_ACK_SUCCESS ------------------------------------------------------------------------*/ typedef struct { - char ucBaPeerMac[6]; + char ucBaPeerMac[6]; v_U8_t ucBaTid; - v_U8_t ucDeleteReasonCode; + v_U8_t ucDeleteReasonCode; } vos_event_wlan_add_block_ack_deleted_payload_type; -/*------------------------------------------------------------------------- +/*------------------------------------------------------------------------- Event ID: EVENT_WLAN_DELETE_BLOCK_ACK_FAILED ------------------------------------------------------------------------*/ typedef struct { - char ucBaPeerMac[6]; + char ucBaPeerMac[6]; v_U8_t ucBaTid; - v_U8_t ucDeleteReasonCode; + v_U8_t ucDeleteReasonCode; v_U8_t ucFailReasonCode; } vos_event_wlan_add_block_ack_delete_failed_payload_type; -/*------------------------------------------------------------------------- +/*------------------------------------------------------------------------- Event ID: EVENT_WLAN_BSS_PROTECTION ------------------------------------------------------------------------*/ typedef struct { v_U8_t event_type; - v_U8_t prot_type; + v_U8_t prot_type; } vos_event_wlan_bss_prot_payload_type; -/*------------------------------------------------------------------------- +/*------------------------------------------------------------------------- Event ID: EVENT_WLAN_BRINGUP_STATUS ------------------------------------------------------------------------*/ typedef struct @@ -196,7 +196,7 @@ typedef struct VOS_PACK_START -/*------------------------------------------------------------------------- +/*------------------------------------------------------------------------- Event ID: EVENT_WLAN_POWERSAVE_GENERIC ------------------------------------------------------------------------*/ typedef VOS_PACK_PRE struct @@ -215,7 +215,7 @@ typedef VOS_PACK_PRE struct VOS_PACK_END -/*------------------------------------------------------------------------- +/*------------------------------------------------------------------------- Event ID: EVENT_WLAN_POWERSAVE_WOW ------------------------------------------------------------------------*/ typedef struct @@ -228,7 +228,7 @@ typedef struct v_U8_t wow_wakeup_cause_pbm_ptrn_id; } vos_event_wlan_powersave_wow_payload_type; -/*------------------------------------------------------------------------- +/*------------------------------------------------------------------------- Event ID: EVENT_WLAN_BTC ------------------------------------------------------------------------*/ typedef struct @@ -245,7 +245,7 @@ typedef struct } vos_event_wlan_btc_type; -/*------------------------------------------------------------------------- +/*------------------------------------------------------------------------- Function declarations and documenation ------------------------------------------------------------------------*/ diff --git a/CORE/VOSS/inc/vos_diag_core_log.h b/CORE/VOSS/inc/vos_diag_core_log.h index dab27c2141f9..af887f34c92d 100644 --- a/CORE/VOSS/inc/vos_diag_core_log.h +++ b/CORE/VOSS/inc/vos_diag_core_log.h @@ -29,13 +29,13 @@ #define __VOS_DIAG_CORE_LOG_H /**========================================================================= - + \file vos_event.h - + \brief virtual Operating System Services (vOSS) DIAG logs - + Definitions for vOSS Events - + ========================================================================*/ /* $Header$ */ @@ -46,14 +46,14 @@ #include "vos_types.h" #include "i_vos_diag_core_log.h" -/*-------------------------------------------------------------------------- +/*-------------------------------------------------------------------------- Preprocessor definitions and constants ------------------------------------------------------------------------*/ #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ -/*-------------------------------------------------------------------------- +/*-------------------------------------------------------------------------- Preprocessor definitions and constants ------------------------------------------------------------------------*/ #define VOS_LOG_MAX_NUM_SSID 21 @@ -66,9 +66,9 @@ extern "C" { #define VOS_LOG_MAX_WOW_PTRN_MASK_SIZE 16 /*--------------------------------------------------------------------------- - This packet contains the scan results of the recent scan operation - LOG_WLAN_SCAN_C 0x1496 ----------------------------------------------------------------------------*/ + This packet contains the scan results of the recent scan operation + LOG_WLAN_SCAN_C 0x1496 +---------------------------------------------------------------------------*/ typedef struct { log_hdr_type hdr; @@ -87,10 +87,10 @@ typedef struct } vos_log_scan_pkt_type; /*--------------------------------------------------------------------------- - This packet contains the information related to IBSS connection setup - LOG_WLAN_IBSS_C 0x1497 ----------------------------------------------------------------------------*/ -typedef struct + This packet contains the information related to IBSS connection setup + LOG_WLAN_IBSS_C 0x1497 +---------------------------------------------------------------------------*/ +typedef struct { log_hdr_type hdr; v_U8_t eventId; @@ -104,9 +104,9 @@ typedef struct } vos_log_ibss_pkt_type; /*--------------------------------------------------------------------------- - This packet contains the information related to 802.11D - LOG_WLAN_80211D_C 0x1498 ----------------------------------------------------------------------------*/ + This packet contains the information related to 802.11D + LOG_WLAN_80211D_C 0x1498 +---------------------------------------------------------------------------*/ typedef struct { log_hdr_type hdr; @@ -124,7 +124,7 @@ This is a log packet which contains below handoff information: - Candidate AP + RSSI (before association and when the list is updated) - For each BSSID in candidate list, provide RSSI, QoS and security compatibility LOG_WLAN_HANDOFF_C 0x1499 ----------------------------------------------------------------------------*/ +---------------------------------------------------------------------------*/ typedef struct { v_U8_t ssid[9]; @@ -148,7 +148,7 @@ typedef struct } vos_log_ho_pkt_type; /*--------------------------------------------------------------------------- - This packet contains the information related to the EDCA parameters + This packet contains the information related to the EDCA parameters advertised by the AP LOG_WLAN_QOS_EDCA_C 0x149A ---------------------------------------------------------------------------*/ @@ -170,7 +170,7 @@ typedef struct } vos_log_qos_edca_pkt_type; /*--------------------------------------------------------------------------- - This packet contains the total number of beacon received value + This packet contains the total number of beacon received value LOG_WLAN_BEACON_UPDATE_C 0x149B ---------------------------------------------------------------------------*/ typedef struct @@ -181,7 +181,7 @@ typedef struct /*--------------------------------------------------------------------------- This packet contains the information related to a WoW patern value when set - LOG_WLAN_POWERSAVE_WOW_ADD_PTRN_C 0x149C + LOG_WLAN_POWERSAVE_WOW_ADD_PTRN_C 0x149C ---------------------------------------------------------------------------*/ typedef struct { @@ -304,9 +304,9 @@ typedef struct } vos_log_statistics_pkt_type; /*--------------------------------------------------------------------------- - This packet contains the Tspec info negotiated with the AP for the - specific AC - LOG_WLAN_QOS_TSPEC_C 0x14A2 + This packet contains the Tspec info negotiated with the AP for the + specific AC + LOG_WLAN_QOS_TSPEC_C 0x14A2 ---------------------------------------------------------------------------*/ typedef struct { @@ -366,7 +366,7 @@ typedef struct v_S7_t rssi; } vos_log_rssi_pkt_type; -/*------------------------------------------------------------------------- +/*------------------------------------------------------------------------- Function declarations and documenation ------------------------------------------------------------------------*/ diff --git a/CORE/VOSS/inc/vos_event.h b/CORE/VOSS/inc/vos_event.h index a3c5483eb478..ca8ec334e916 100644 --- a/CORE/VOSS/inc/vos_event.h +++ b/CORE/VOSS/inc/vos_event.h @@ -29,13 +29,13 @@ #define __VOS_EVENT_H /**========================================================================= - + \file vos_event.h - + \brief virtual Operating System Services (vOSS) Events - + Definitions for vOSS Events - + ========================================================================*/ /* $Header$ */ @@ -47,220 +47,220 @@ #include "vos_types.h" #include "i_vos_event.h" -/*-------------------------------------------------------------------------- +/*-------------------------------------------------------------------------- Preprocessor definitions and constants ------------------------------------------------------------------------*/ #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ -/*-------------------------------------------------------------------------- +/*-------------------------------------------------------------------------- Type declarations ------------------------------------------------------------------------*/ -/*------------------------------------------------------------------------- +/*------------------------------------------------------------------------- Function declarations and documenation ------------------------------------------------------------------------*/ /*------------------------------------------------------------------------- - + \brief vos_event_init() - initialize a vOSS event - - The \a vos_lock_event() function initializes the specified event. Upon - successful initialization, the state of the event becomes initialized + + The \a vos_lock_event() function initializes the specified event. Upon + successful initialization, the state of the event becomes initialized and not 'signaled. - An event must be initialized before it may be used in any other lock - functions. - - Attempting to initialize an already initialized event results in + An event must be initialized before it may be used in any other lock + functions. + + Attempting to initialize an already initialized event results in a failure. - + \param lock - pointer to the opaque event object to initialize - - \return VOS_STATUS_SUCCESS - event was successfully initialized and + + \return VOS_STATUS_SUCCESS - event was successfully initialized and is ready to be used. - - VOS_STATUS_E_RESOURCES - System resources (other than memory) + + VOS_STATUS_E_RESOURCES - System resources (other than memory) are unavailable to initilize the event - VOS_STATUS_E_NOMEM - insufficient memory exists to initialize + VOS_STATUS_E_NOMEM - insufficient memory exists to initialize the event - VOS_STATUS_E_BUSY - The implementation has detected an attempt - to reinitialize the object referenced by event, a previously + VOS_STATUS_E_BUSY - The implementation has detected an attempt + to reinitialize the object referenced by event, a previously initialized, but not yet destroyed, event. - VOS_STATUS_E_FAULT - event is an invalid pointer. + VOS_STATUS_E_FAULT - event is an invalid pointer. \sa - + -------------------------------------------------------------------------*/ VOS_STATUS vos_event_init( vos_event_t *event ); /*-------------------------------------------------------------------------- - + \brief vos_event_set() - set a vOSS event - The state of the specified event is set to 'signalled by calling - \a vos_event_set(). The state of the event remains signalled until an - explicit call to vos_event_reset(). - - Any threads waiting on the event as a result of a vos_event_wait() will + The state of the specified event is set to 'signalled by calling + \a vos_event_set(). The state of the event remains signalled until an + explicit call to vos_event_reset(). + + Any threads waiting on the event as a result of a vos_event_wait() will be unblocked and available to be scheduled for execution when the event - is signaled by a call to \a vos_event_set(). - + is signaled by a call to \a vos_event_set(). + \param event - the event to set to the signalled state - + \return VOS_STATUS_SUCCESS - the event was successfully signalled. - - VOS_STATUS_E_INVAL - The value specified by event does not refer + + VOS_STATUS_E_INVAL - The value specified by event does not refer to an initialized event object. - - VOS_STATUS_E_FAULT - event is an invalid pointer. - + + VOS_STATUS_E_FAULT - event is an invalid pointer. + \sa - + -------------------------------------------------------------------------*/ VOS_STATUS vos_event_set( vos_event_t * event ); /*-------------------------------------------------------------------------- - + \brief vos_event_reset() - reset a vOSS event - The state of the specified event is set to 'NOT signalled' by calling - \a vos_event_reset(). The state of the event remains NOT signalled until an - explicit call to vos_event_set(). - - This function sets the event to a NOT signalled state even if the event was + The state of the specified event is set to 'NOT signalled' by calling + \a vos_event_reset(). The state of the event remains NOT signalled until an + explicit call to vos_event_set(). + + This function sets the event to a NOT signalled state even if the event was signalled multiple times before being signaled. - + \param event - the event to set to the NOT signalled state - - \return VOS_STATUS_SUCCESS - the event state was successfully change to + + \return VOS_STATUS_SUCCESS - the event state was successfully change to NOT signalled. - - VOS_STATUS_E_INVAL - The value specified by event does not refer + + VOS_STATUS_E_INVAL - The value specified by event does not refer to an initialized event object. - - VOS_STATUS_E_FAULT - event is an invalid pointer. - + + VOS_STATUS_E_FAULT - event is an invalid pointer. + \sa - + -------------------------------------------------------------------------*/ VOS_STATUS vos_event_reset( vos_event_t * event ); /*-------------------------------------------------------------------------- - + \brief vos_event_destroy() - Destroy a vOSS event - The \a vos_event_destroy() function shall destroy the event object + The \a vos_event_destroy() function shall destroy the event object referenced by event. After a successful return from \a vos_event_destroy() the event object becomes, in effect, uninitialized. - - A destroyed event object can be reinitialized using vos_event_init(); - the results of otherwise referencing the object after it has been destroyed + + A destroyed event object can be reinitialized using vos_event_init(); + the results of otherwise referencing the object after it has been destroyed are undefined. Calls to vOSS event functions to manipulate the lock such - as vos_event_set() will fail if the event is destroyed. Therefore, - don't use the event after it has been destroyed until it has + as vos_event_set() will fail if the event is destroyed. Therefore, + don't use the event after it has been destroyed until it has been re-initialized. - + \param event - the event object to be destroyed. - + \return VOS_STATUS_SUCCESS - event was successfully destroyed. - - VOS_STATUS_E_BUSY - The implementation has detected an attempt + + VOS_STATUS_E_BUSY - The implementation has detected an attempt to destroy the object referenced by event while it is still being - referenced (there are threads waiting on this event) + referenced (there are threads waiting on this event) VOS_STATUS_E_INVAL - The value specified by event is invalid. - - VOS_STATUS_E_FAULT - event is an invalid pointer. + + VOS_STATUS_E_FAULT - event is an invalid pointer. \sa - + -------------------------------------------------------------------------*/ VOS_STATUS vos_event_destroy( vos_event_t *event ); -// TODO: this is being removed and a stub exists currently to avoid +// TODO: this is being removed and a stub exists currently to avoid // compiler errors VOS_STATUS vos_wait_events( vos_event_t *events, v_U8_t numEvents, v_U32_t timeout, v_U8_t *pEventIndex ); /*---------------------------------------------------------------------------- - + \brief vos_wait_single_event() - Waits for a single event to be set. This API waits for the event to be set. - + \param pEvent - pointer to an event to wait on. - + \param timeout - Timeout value (in milliseconds). This function returns - if this interval elapses, regardless if any of the events have - been set. An input value of 0 for this timeout parameter means + if this interval elapses, regardless if any of the events have + been set. An input value of 0 for this timeout parameter means to wait infinitely, meaning a timeout will never occur. - + \return VOS_STATUS_SUCCESS - the wait was satisifed by the event being - set. - + set. + VOS_STATUS_E_TIMEOUT - the timeout interval elapsed before the event was set. - + VOS_STATUS_E_INVAL - The value specified by event is invalid. - - VOS_STATUS_E_FAULT - pEvent is an invalid pointer. - + + VOS_STATUS_E_FAULT - pEvent is an invalid pointer. + \sa vos_wait_multiple_events() - + --------------------------------------------------------------------------*/ VOS_STATUS vos_wait_single_event( vos_event_t *pEvent, v_U32_t timeout ); /*---------------------------------------------------------------------------- - + \brief vos_wait_multiple_events() - Waits for event(s) to be set. This API waits for any event in the input array of events to be - set. The caller is blocked waiting any event in the array to be - set or for the timeout to occur. - + set. The caller is blocked waiting any event in the array to be + set or for the timeout to occur. + If multiple events in the array are set, only one event is identified in the return from this call as satisfying the wait condition. The caller is responsible for calling \a vos_wait_events() again to find the other events that are set. - + \param pEventList - pointer to an array of event pointers - + \param numEvents - Number of events - + \param timeout - Timeout value (in milliseconds). This function returns - if this interval elapses, regardless if any of the events have - been set. An input value of 0 for this timeout parameter means + if this interval elapses, regardless if any of the events have + been set. An input value of 0 for this timeout parameter means to wait infinitely, meaning a timeout will never occur. - - \param pEventIndex - This is a pointer to the location where the index of - the event in the event array that satisfied the wait because - the event was set. - + + \param pEventIndex - This is a pointer to the location where the index of + the event in the event array that satisfied the wait because + the event was set. + \return VOS_STATUS_SUCCESS - the wait was satisifed by one of the events - in the event array being set. The index into the event arry + in the event array being set. The index into the event arry that satisfied the wait can be found at *pEventIndex. - - VOS_STATUS_E_TIMEOUT - the timeout interval elapsed before any of + + VOS_STATUS_E_TIMEOUT - the timeout interval elapsed before any of the events were set. - - VOS_STATUS_E_INVAL - At least one of the values specified in the + + VOS_STATUS_E_INVAL - At least one of the values specified in the event array refers to an uninitialized event object. The invalid event is identified by the index in *pEventIndex. Note that only - the first uninitialized event is detected when this error is + the first uninitialized event is detected when this error is returned. - + VOS_STATUS_E_EMPTY - the events array is empty. This condition is detected by numEvents being 0 on input. - - VOS_STATUS_E_FAULT - event or pEventIndex is an invalid pointer. - + + VOS_STATUS_E_FAULT - event or pEventIndex is an invalid pointer. + \sa vos_wait_single_events() - + --------------------------------------------------------------------------*/ VOS_STATUS vos_wait_multiple_events( vos_event_t **pEventList, v_U8_t numEvents, v_U32_t timeout, v_U8_t *pEventIndex ); diff --git a/CORE/VOSS/inc/vos_getBin.h b/CORE/VOSS/inc/vos_getBin.h index a2f1d00c8ec7..15c4508d9c2a 100644 --- a/CORE/VOSS/inc/vos_getBin.h +++ b/CORE/VOSS/inc/vos_getBin.h @@ -34,9 +34,9 @@ \brief virtual Operating System Services (vOSS) binary APIs - Binary retrieval definitions and APIs. + Binary retrieval definitions and APIs. - These APIs allow components to retrieve binary contents (firmware, + These APIs allow components to retrieve binary contents (firmware, configuration data, etc.) from a storage medium on the platform. ========================================================================*/ @@ -49,19 +49,19 @@ #include <vos_types.h> #include <vos_status.h> -/*-------------------------------------------------------------------------- +/*-------------------------------------------------------------------------- Preprocessor definitions and constants ------------------------------------------------------------------------*/ -/*-------------------------------------------------------------------------- +/*-------------------------------------------------------------------------- Type declarations ------------------------------------------------------------------------*/ -/// Binary IDs +/// Binary IDs typedef enum { /// Binary ID for firmware VOS_BINARY_ID_FIRMWARE, - + /// Binary ID for Configuration data VOS_BINARY_ID_CONFIG, @@ -73,63 +73,63 @@ typedef enum /// Binary ID for Dictionary Configuration data VOS_BINARY_ID_DICT_CONFIG - + } VOS_BINARY_ID; -/*------------------------------------------------------------------------- +/*------------------------------------------------------------------------- Function declarations and documenation ------------------------------------------------------------------------*/ - + /**--------------------------------------------------------------------------- - + \brief vos_get_binary_blob() - get binary data from platform This API allows components to get binary data from the platform independent of where the data is stored on the device. - + <ul> <li> Firmware <li> Configuration Data - </ul> - + </ul> + \param binaryId - identifies the binary data to return to the caller. - - \param pBuffer - a pointer to the buffer where the binary data will be - retrieved. Memory for this buffer is allocated by the caller - and free'd by the caller. vOSS will fill this buffer with + + \param pBuffer - a pointer to the buffer where the binary data will be + retrieved. Memory for this buffer is allocated by the caller + and free'd by the caller. vOSS will fill this buffer with raw binary data and update the *pBufferSize with the exact size of the data that has been retreived. - - Input value of NULL is valid and will cause the API to return + + Input value of NULL is valid and will cause the API to return the size of the binary data in *pBufferSize. - - \param pBufferSize - pointer to a variable that upon input contains the + + \param pBufferSize - pointer to a variable that upon input contains the size of the data buffer available at pBuffer. Upon success, this - variable is updated with the size of the binary data that was + variable is updated with the size of the binary data that was retreived and written to the buffer at pBuffer. - + Input value of 0 is valid and will cause the API to return the size of the binary data in *pBufferSize. - - \return VOS_STATUS_SUCCESS - the binary data has been successfully + + \return VOS_STATUS_SUCCESS - the binary data has been successfully retreived and written to the buffer. - - VOS_STATUS_E_INVAL - The value specified by binaryId does not + + VOS_STATUS_E_INVAL - The value specified by binaryId does not refer to a valid VOS Binary ID. - - VOS_STATUS_E_FAULT - pBufferSize is not a valid pointer to a + + VOS_STATUS_E_FAULT - pBufferSize is not a valid pointer to a variable that the API can write to. - - VOS_STATUS_E_NOMEM - the memory referred to by pBuffer and + + VOS_STATUS_E_NOMEM - the memory referred to by pBuffer and *pBufferSize is not big enough to contain the binary. \sa - + --------------------------------------------------------------------------*/ -VOS_STATUS vos_get_binary_blob( VOS_BINARY_ID binaryId, +VOS_STATUS vos_get_binary_blob( VOS_BINARY_ID binaryId, v_VOID_t *pBuffer, v_SIZE_t *pBufferSize ); /**---------------------------------------------------------------------------- diff --git a/CORE/VOSS/inc/vos_list.h b/CORE/VOSS/inc/vos_list.h index 07a2461d6ab6..98893c8adfd3 100644 --- a/CORE/VOSS/inc/vos_list.h +++ b/CORE/VOSS/inc/vos_list.h @@ -29,21 +29,21 @@ #define __VOS_LIST_H /**========================================================================= - + \file vos_list.h - + \brief virtual Operating System Services (vOSS) List APIs - + Definitions for vOSS Linked Lists API - - Lists are implemented as a doubly linked list. An item in a list can - be of any type as long as the datatype contains a field of type + + Lists are implemented as a doubly linked list. An item in a list can + be of any type as long as the datatype contains a field of type vos_link_t. - In general, a list is a doubly linked list of items with a pointer + In general, a list is a doubly linked list of items with a pointer to the front of the list and a pointer to the end of the list. The list items contain a forward and back link. - + List Nodes ============= =========================== +-------+ @@ -60,7 +60,7 @@ This linked list API is implemented with appropriate locking mechanisms to assure operations on the list are thread safe. - + ========================================================================*/ /* $Header$ */ @@ -72,511 +72,511 @@ #include <vos_status.h> #include <i_vos_list.h> -/*-------------------------------------------------------------------------- +/*-------------------------------------------------------------------------- Preprocessor definitions and constants ------------------------------------------------------------------------*/ -/*-------------------------------------------------------------------------- +/*-------------------------------------------------------------------------- Type declarations ------------------------------------------------------------------------*/ -/*------------------------------------------------------------------------- +/*------------------------------------------------------------------------- Function declarations and documenation ------------------------------------------------------------------------*/ - + /**--------------------------------------------------------------------------- - - \brief vos_list_init() - initialize a vOS Linked List - + + \brief vos_list_init() - initialize a vOS Linked List + The \a vos_list_init() function initializes the specified linked list - 'object'. Upon successful initialization, the state of the list + 'object'. Upon successful initialization, the state of the list becomes initialized and available for use through the other vos_list_xxx APIs. - A list must be initialized by calling vos_list_init() before it - may be used in any other lock functions. - - Attempting to initialize an already initialized list results in + A list must be initialized by calling vos_list_init() before it + may be used in any other lock functions. + + Attempting to initialize an already initialized list results in a failure. - + \param pList - pointer to the opaque list object to initialize - - \return VOS_STATUS_SUCCESS - list was successfully initialized and + + \return VOS_STATUS_SUCCESS - list was successfully initialized and is ready to be used. - - VOS_STATUS_E_RESOURCES - System resources (other than memory) + + VOS_STATUS_E_RESOURCES - System resources (other than memory) are unavailable to initilize the list - VOS_STATUS_E_NOMEM - insufficient memory exists to initialize + VOS_STATUS_E_NOMEM - insufficient memory exists to initialize the list - VOS_STATUS_E_BUSY - The implementation has detected an attempt - to reinitialize the object referenced by list, a previously + VOS_STATUS_E_BUSY - The implementation has detected an attempt + to reinitialize the object referenced by list, a previously initialized, but not yet destroyed, list. - VOS_STATUS_E_FAULT - pList is an invalid pointer. - + VOS_STATUS_E_FAULT - pList is an invalid pointer. + \sa vos_list_destroy() - + --------------------------------------------------------------------------*/ VOS_STATUS vos_list_init( vos_list_t *pList ); /**------------------------------------------------------------------------- - + \brief vos_list_destroy() - Destroy a vOSS List - The \a vos_list_destroy() function shall destroy the list object + The \a vos_list_destroy() function shall destroy the list object referenced by pList. After a successful return from \a vos_list_destroy() the list object becomes, in effect, uninitialized. - - A destroyed lock object can be reinitialized using vos_list_init(); - the results of otherwise referencing the object after it has been destroyed + + A destroyed lock object can be reinitialized using vos_list_init(); + the results of otherwise referencing the object after it has been destroyed are undefined. Calls to vOSS list functions to manipulate the list such - will fail if the list or has not been initialized or is destroyed. - Therefore, don't use the list after it has been destroyed until it has + will fail if the list or has not been initialized or is destroyed. + Therefore, don't use the list after it has been destroyed until it has been re-initialized. - + \param pLlist - pointer to the list object to be destroyed. - + \return VOS_STATUS_SUCCESS - list was successfully destroyed. - - VOS_STATUS_E_BUSY - The implementation has detected an attempt + + VOS_STATUS_E_BUSY - The implementation has detected an attempt to destroy the object referenced by pList that is still has - nodes. The list must be empty before it can be destroyed. + nodes. The list must be empty before it can be destroyed. VOS_STATUS_E_INVAL - The value specified by pList is not a valid, initialized list object. - - VOS_STATUS_E_FAULT - pList is an invalid pointer. + + VOS_STATUS_E_FAULT - pList is an invalid pointer. \sa - + ----------------------------------------------------------------------------*/ VOS_STATUS vos_list_destroy( vos_list_t *pList ); /*-------------------------------------------------------------------------- - + \brief vos_list_lock() - Lock a vOSS List The \a vos_list_lock() function shall lock the list object to prevent other tasks from operating on this list. The list remains locked until a call to vos_list_unlock() is made. - - Each list function already operate within a critical section. - However it is sometimes necessary to lock a list over a series of list - function calls. - - For example, when one needs to search a node on a list and insert another - node after it, one would want to lock this list for the entire process + + Each list function already operate within a critical section. + However it is sometimes necessary to lock a list over a series of list + function calls. + + For example, when one needs to search a node on a list and insert another + node after it, one would want to lock this list for the entire process in case another task attempts to manipulate this list. \param pLlist - pointer to the list object to be locked. - + \return VOS_STATUS_SUCCESS - list was successfully locked. - - VOS_STATUS_E_FAULT - pList is an invalid pointer. + + VOS_STATUS_E_FAULT - pList is an invalid pointer. \sa vos_list_unlock() - + ----------------------------------------------------------------------------*/ VOS_STATUS vos_list_lock( vos_list_t *pList ); /*-------------------------------------------------------------------------- - + \brief vos_list_unlock() - Unlock a vOSS List - The \a vos_list_unlock() function shall unlock the list object to allow - other tasks to use this list. This function is only called when - the vos_list_lock() is previously called in the current task. - + The \a vos_list_unlock() function shall unlock the list object to allow + other tasks to use this list. This function is only called when + the vos_list_lock() is previously called in the current task. + \param pLlist - pointer to the list object to be unlocked. - + \return VOS_STATUS_SUCCESS - list was successfully unlocked. - - VOS_STATUS_E_FAULT - pList is an invalid pointer. + + VOS_STATUS_E_FAULT - pList is an invalid pointer. \sa vos_list_lock() - + ----------------------------------------------------------------------------*/ VOS_STATUS vos_list_unlock( vos_list_t *pList ); /**--------------------------------------------------------------------------- - - \brief vos_list_insert_front() - insert node at front of a linked list + + \brief vos_list_insert_front() - insert node at front of a linked list The vos_list_insert_front() API will insert a node at the front of - a properly initialized vOS List object. - + a properly initialized vOS List object. + \param pList - Pointer to list object where the node will be inserted - + \param pNode - Pointer to the list node to be inserted into the list. - - \return VOS_STATUS_SUCCESS - list node was successfully inserted onto + + \return VOS_STATUS_SUCCESS - list node was successfully inserted onto the front of the list. VOS_STATUS_E_INVAL - The value specified by pList is not a valid, initialized list object. - + VOS_STATUS_E_FAULT - pList is an invalid pointer or pNode is an invalid pointer. - + \sa - + --------------------------------------------------------------------------*/ VOS_STATUS vos_list_insert_front( vos_list_t *pList, vos_list_node_t *pNode ); /**--------------------------------------------------------------------------- - - \brief vos_list_insert_back() - insert node at back of a linked list + + \brief vos_list_insert_back() - insert node at back of a linked list The vos_list_insert_back() API will insert a node at the back of - a properly initialized vOS List object. - + a properly initialized vOS List object. + \param pList - Pointer to list object where the node will be inserted - + \param pNode - Pointer to the list node to be inserted into the list. - - \return VOS_STATUS_SUCCESS - list node was successfully inserted onto + + \return VOS_STATUS_SUCCESS - list node was successfully inserted onto the back of the list. VOS_STATUS_E_INVAL - The value specified by pList is not a valid, initialized list object. - + VOS_STATUS_E_FAULT - pList is an invalid pointer or pNode is an invalid pointer. - + \sa - + --------------------------------------------------------------------------*/ VOS_STATUS vos_list_insert_back( vos_list_t *pList, vos_list_node_t *pNode ); /**--------------------------------------------------------------------------- - + \brief vos_list_insert_back_size() - insert node at back of a linked list and - return the size AFTER the enqueue. This size is determined in a race free + return the size AFTER the enqueue. This size is determined in a race free manner i.e. while the list is locked for the enqueue operation The vos_list_insert_back_size() API will insert a node at the back of - a properly initialized vOS List object. - + a properly initialized vOS List object. + \param pList - Pointer to list object where the node will be inserted - + \param pNode - Pointer to the list node to be inserted into the list. - \param pSize - Pointer to a size variable, where the size of the + \param pSize - Pointer to a size variable, where the size of the list will be returned. - - \return VOS_STATUS_SUCCESS - list node was successfully inserted onto + + \return VOS_STATUS_SUCCESS - list node was successfully inserted onto the back of the list. VOS_STATUS_E_INVAL - The value specified by pList is not a valid, initialized list object. - + VOS_STATUS_E_FAULT - pList is an invalid pointer or pNode is an invalid pointer. - + \sa - + --------------------------------------------------------------------------*/ VOS_STATUS vos_list_insert_back_size( vos_list_t *pList, vos_list_node_t *pNode, v_SIZE_t *pSize ); /**--------------------------------------------------------------------------- - - \brief vos_list_remove_front() - remove node at front of a linked list + + \brief vos_list_remove_front() - remove node at front of a linked list The vos_list_remove_front() API will remove a node at the front of - a properly initialized vOS List object. - + a properly initialized vOS List object. + \param pList - Pointer to list object where the node will be removed - - \param ppNode - Pointer to a pointer to the list node to be removed + + \param ppNode - Pointer to a pointer to the list node to be removed from the list. - - \return VOS_STATUS_SUCCESS - list node was successfully removed from + + \return VOS_STATUS_SUCCESS - list node was successfully removed from the front of the list. VOS_STATUS_E_INVAL - The value specified by pList is not a valid, initialized list object. - VOS_STATUS_E_EMPTY - The specified is empty so nodes cannot be + VOS_STATUS_E_EMPTY - The specified is empty so nodes cannot be removed. - + VOS_STATUS_E_FAULT - pList is an invalid pointer or ppNode is an invalid pointer. - + \sa vos_list_remove_back() - + --------------------------------------------------------------------------*/ VOS_STATUS vos_list_remove_front( vos_list_t *pList, vos_list_node_t **ppNode ); /**--------------------------------------------------------------------------- - - \brief vos_list_remove_back() - remove node at back of a linked list + + \brief vos_list_remove_back() - remove node at back of a linked list The vos_list_remove_back() API will remove a node at the back of - a properly initialized vOS List object. - + a properly initialized vOS List object. + \param pList - Pointer to list object where the node will be removed - - \param ppNode - Pointer to a pointer to the list node to be removed + + \param ppNode - Pointer to a pointer to the list node to be removed from the list. - - \return VOS_STATUS_SUCCESS - list node was successfully removed from + + \return VOS_STATUS_SUCCESS - list node was successfully removed from the back of the list. VOS_STATUS_E_INVAL - The value specified by pList is not a valid, initialized list object. - VOS_STATUS_E_EMPTY - The specified is empty so nodes cannot be + VOS_STATUS_E_EMPTY - The specified is empty so nodes cannot be removed. - + VOS_STATUS_E_FAULT - pList is an invalid pointer or ppNode is an invalid pointer. - + \sa vos_list_remove_back() - - --------------------------------------------------------------------------*/ + + --------------------------------------------------------------------------*/ VOS_STATUS vos_list_remove_back( vos_list_t *pList, vos_list_node_t **ppNode ); /*---------------------------------------------------------------------------- - - \brief vos_list_size() - return the size of of a linked list - The vos_list_size() API will return the number of nodes on the - given vOS List object. - + \brief vos_list_size() - return the size of of a linked list + + The vos_list_size() API will return the number of nodes on the + given vOS List object. + \param pList - Pointer to list object where the node will be counted - - \param pSize - Pointer to a size variable, where the size of the + + \param pSize - Pointer to a size variable, where the size of the list will be returned. - - \return VOS_STATUS_SUCCESS - list size of the properly initialized + + \return VOS_STATUS_SUCCESS - list size of the properly initialized vos list object has been returned. VOS_STATUS_E_INVAL - The value specified by pList is not a valid, initialized list object. - + VOS_STATUS_E_FAULT - pList or pSize are not valid pointers - + \sa - - --------------------------------------------------------------------------*/ + + --------------------------------------------------------------------------*/ VOS_STATUS vos_list_size( vos_list_t *pList, v_SIZE_t *pSize ); /**--------------------------------------------------------------------------- - - \brief vos_list_peek_front() - peek at the node at front of a linked list - The vos_list_peek_front() API will return a pointer to the node at the + \brief vos_list_peek_front() - peek at the node at front of a linked list + + The vos_list_peek_front() API will return a pointer to the node at the front of a properly initialized vOS List object. The node will *not* be removed from the list. - - \param pList - Pointer to list object of the list to be 'peeked' - + + \param pList - Pointer to list object of the list to be 'peeked' + \param ppNode - Pointer to a pointer to the list node that exists at the front of the list. - - \return VOS_STATUS_SUCCESS - list node at the front of the list was + + \return VOS_STATUS_SUCCESS - list node at the front of the list was successfully returned. VOS_STATUS_E_INVAL - The value specified by pList is not a valid, initialized list object. - VOS_STATUS_E_EMPTY - The specified is empty so nodes cannot be + VOS_STATUS_E_EMPTY - The specified is empty so nodes cannot be removed. - + VOS_STATUS_E_FAULT - pList or or ppNode is an invalid pointer. - + \sa vos_list_remove_back() - - --------------------------------------------------------------------------*/ + + --------------------------------------------------------------------------*/ VOS_STATUS vos_list_peek_front( vos_list_t *pList, vos_list_node_t **ppNode ); /**--------------------------------------------------------------------------- - - \brief vos_list_peek_back() - peek at the node at back of a linked list - The vos_list_peek_back() API will return a pointer to the node at the + \brief vos_list_peek_back() - peek at the node at back of a linked list + + The vos_list_peek_back() API will return a pointer to the node at the back of a properly initialized vOS List object. The node will *not* be removed from the list. - - \param pList - Pointer to list object of the list to be 'peeked' - + + \param pList - Pointer to list object of the list to be 'peeked' + \param ppNode - Pointer to a pointer to the list node that exists at the back of the list. - - \return VOS_STATUS_SUCCESS - list node at the back of the list was + + \return VOS_STATUS_SUCCESS - list node at the back of the list was successfully returned. VOS_STATUS_E_INVAL - The value specified by pList is not a valid, initialized list object. - VOS_STATUS_E_EMPTY - The specified is empty so nodes cannot be + VOS_STATUS_E_EMPTY - The specified is empty so nodes cannot be removed. - + VOS_STATUS_E_FAULT - pList or or ppNode is an invalid pointer. - - \sa vos_list_peek_back(), vos_list_remove_back(), vos_list_peek_front(), + + \sa vos_list_peek_back(), vos_list_remove_back(), vos_list_peek_front(), vos_list_remove_front() - - --------------------------------------------------------------------------*/ + + --------------------------------------------------------------------------*/ VOS_STATUS vos_list_peek_back( vos_list_t *pList, vos_list_node_t **ppNode ); /**--------------------------------------------------------------------------- - - \brief vos_list_peek_next() - peek at the node after the specified node + + \brief vos_list_peek_next() - peek at the node after the specified node The vos_list_peek_next() API will return a pointer to the node following the - specified node on a properly initialized vOS List object. The node will + specified node on a properly initialized vOS List object. The node will *not* be removed from the list. - - \param pList - Pointer to list object of the list to be 'peeked' - + + \param pList - Pointer to list object of the list to be 'peeked' + \param pNode - Pointer to the node that is being 'peeked' - + \param ppNode - Pointer to a pointer to the list node that follows the pNode node on the list. - - \return VOS_STATUS_SUCCESS - list node following pNode on the properly + + \return VOS_STATUS_SUCCESS - list node following pNode on the properly initialized list is successfully returned. VOS_STATUS_E_INVAL - The value specified by pList is not a valid, initialized list object. - VOS_STATUS_E_EMPTY - The specified is empty so nodes cannot be + VOS_STATUS_E_EMPTY - The specified is empty so nodes cannot be removed. - + VOS_STATUS_E_FAULT - pList, pNode or ppNode is an invalid pointer. - + \sa vos_list_remove_back() - - --------------------------------------------------------------------------*/ -VOS_STATUS vos_list_peek_next( vos_list_t *pList, vos_list_node_t *pNode, + + --------------------------------------------------------------------------*/ +VOS_STATUS vos_list_peek_next( vos_list_t *pList, vos_list_node_t *pNode, vos_list_node_t **ppNode ); /**--------------------------------------------------------------------------- - - \brief vos_list_peek_prev() - peek at the node before the specified node + + \brief vos_list_peek_prev() - peek at the node before the specified node The vos_list_peek_prev() API will return a pointer to the node before the - specified node on a properly initialized vOS List object. The node will + specified node on a properly initialized vOS List object. The node will *not* be removed from the list. - - \param pList - Pointer to list object of the list to be 'peeked' - + + \param pList - Pointer to list object of the list to be 'peeked' + \param pNode - Pointer to the node that is being 'peeked' - + \param ppNode - Pointer to a pointer to the list node before the pNode node on the list. - - \return VOS_STATUS_SUCCESS - list node before pNode on the properly + + \return VOS_STATUS_SUCCESS - list node before pNode on the properly initialized list is successfully returned. VOS_STATUS_E_INVAL - The value specified by pList is not a valid, initialized list object. - - VOS_STATUS_E_EMPTY - The specified is empty so nodes cannot be + + VOS_STATUS_E_EMPTY - The specified is empty so nodes cannot be removed. - + VOS_STATUS_E_FAULT - pList, pNode or ppNode is an invalid pointer. - + \sa vos_list_remove_back() - - --------------------------------------------------------------------------*/ -VOS_STATUS vos_list_peek_prev( vos_list_t *pList, vos_list_node_t *pNode, + + --------------------------------------------------------------------------*/ +VOS_STATUS vos_list_peek_prev( vos_list_t *pList, vos_list_node_t *pNode, vos_list_node_t **ppNode ); /**--------------------------------------------------------------------------- - + \brief vos_list_insert_before() - insert node at front of a specified - list node + list node - The vos_list_insert_before() API will insert a node onto a properly + The vos_list_insert_before() API will insert a node onto a properly initialized vOS List object in front of the specified list node. - + \param pList - Pointer to list object where the node will be inserted - + \param pNodeToInsert - Pointer to the list node to be inserted into the list. - + \param pNode - Pointer to the list node where pNodeToInsert will be inserted in front of. - - \return VOS_STATUS_SUCCESS - list node was successfully inserted onto + + \return VOS_STATUS_SUCCESS - list node was successfully inserted onto the front of the list. VOS_STATUS_E_INVAL - The value specified by pList is not a valid, initialized list object. - + VOS_STATUS_E_FAULT - pList, pNodeToInsert, or pNode are invalid pointer(s) - + \sa - + --------------------------------------------------------------------------*/ -VOS_STATUS vos_list_insert_before( vos_list_t *pList, vos_list_node_t *pNodeToInsert, +VOS_STATUS vos_list_insert_before( vos_list_t *pList, vos_list_node_t *pNodeToInsert, vos_list_node_t *pNode ); /**--------------------------------------------------------------------------- - - \brief vos_list_insert_after() - insert node behind a specified list node - The vos_list_insert_after() API will insert a node onto a properly + \brief vos_list_insert_after() - insert node behind a specified list node + + The vos_list_insert_after() API will insert a node onto a properly initialized vOS List object after the specified list node. - + \param pList - Pointer to list object where the node will be inserted - + \param pNodeToInsert - Pointer to the list node to be inserted into the list. - + \param pNode - Pointer to the list node where pNodeToInsert will be inserted after. - - \return VOS_STATUS_SUCCESS - list node was successfully inserted onto + + \return VOS_STATUS_SUCCESS - list node was successfully inserted onto the front of the list. VOS_STATUS_E_INVAL - The value specified by pList is not a valid, initialized list object. - + VOS_STATUS_E_FAULT - pList, pNodeToInsert, or pNode are invalid pointer(s) - + \sa - - --------------------------------------------------------------------------*/ -VOS_STATUS vos_list_insert_after( vos_list_t *pList, vos_list_node_t *pNodeToInsert, - vos_list_node_t *pNode ); + + --------------------------------------------------------------------------*/ +VOS_STATUS vos_list_insert_after( vos_list_t *pList, vos_list_node_t *pNodeToInsert, + vos_list_node_t *pNode ); /**--------------------------------------------------------------------------- - - \brief vos_list_remove_node() - remove specified node from vOS list list - The vos_list_remove_node() API will remove a specified node from the - properly initialized vOS List object. - + \brief vos_list_remove_node() - remove specified node from vOS list list + + The vos_list_remove_node() API will remove a specified node from the + properly initialized vOS List object. + \param pList - Pointer to list object where the node will be removed - + \param ppNode - Pointer to the node to be removed from the list. - - \return VOS_STATUS_SUCCESS - list node was successfully removed from + + \return VOS_STATUS_SUCCESS - list node was successfully removed from the list. VOS_STATUS_E_INVAL - The value specified by pList is not a valid, initialized list object. - - VOS_STATUS_E_EMPTY - The specified is empty so nodes cannot be + + VOS_STATUS_E_EMPTY - The specified is empty so nodes cannot be removed. - - + + VOS_STATUS_E_FAULT - pList or pNodeToRemove is not a valid pointer - + \sa - - --------------------------------------------------------------------------*/ + + --------------------------------------------------------------------------*/ VOS_STATUS vos_list_remove_node( vos_list_t *pList, vos_list_node_t *pNodeToRemove ); diff --git a/CORE/VOSS/inc/vos_lock.h b/CORE/VOSS/inc/vos_lock.h index 2ae20771dbb3..e26819b181a8 100644 --- a/CORE/VOSS/inc/vos_lock.h +++ b/CORE/VOSS/inc/vos_lock.h @@ -29,13 +29,13 @@ #define __VOS_LOCK_H /**========================================================================= - + \file vos_lock.h - + \brief virtual Operating System Servies (vOS) Locks - + Definitions for vOSS Locks - + ========================================================================*/ /* $Header$ */ @@ -46,203 +46,203 @@ #include "vos_status.h" #include "i_vos_lock.h" -/*-------------------------------------------------------------------------- +/*-------------------------------------------------------------------------- Preprocessor definitions and constants ------------------------------------------------------------------------*/ -/*-------------------------------------------------------------------------- +/*-------------------------------------------------------------------------- Type declarations ------------------------------------------------------------------------*/ -/*------------------------------------------------------------------------- +/*------------------------------------------------------------------------- Function declarations and documenation ------------------------------------------------------------------------*/ /*-------------------------------------------------------------------------- - + \brief vos_lock_init() - initialize a vOSS lock - - The \a vos_lock_init() function initializes the specified lock. Upon - successful initialization, the state of the lock becomes initialized + + The \a vos_lock_init() function initializes the specified lock. Upon + successful initialization, the state of the lock becomes initialized and unlocked. - A lock must be initialized by calling vos_lock_init() before it - may be used in any other lock functions. - - Attempting to initialize an already initialized lock results in + A lock must be initialized by calling vos_lock_init() before it + may be used in any other lock functions. + + Attempting to initialize an already initialized lock results in a failure. - + \param lock - pointer to the opaque lock object to initialize - - \return VOS_STATUS_SUCCESS - lock was successfully initialized and + + \return VOS_STATUS_SUCCESS - lock was successfully initialized and is ready to be used. - - VOS_STATUS_E_RESOURCES - System resources (other than memory) + + VOS_STATUS_E_RESOURCES - System resources (other than memory) are unavailable to initilize the lock - VOS_STATUS_E_NOMEM - insufficient memory exists to initialize + VOS_STATUS_E_NOMEM - insufficient memory exists to initialize the lock - VOS_STATUS_E_BUSY - The implementation has detected an attempt - to reinitialize the object referenced by lock, a previously + VOS_STATUS_E_BUSY - The implementation has detected an attempt + to reinitialize the object referenced by lock, a previously initialized, but not yet destroyed, lock. - VOS_STATUS_E_FAULT - lock is an invalid pointer. + VOS_STATUS_E_FAULT - lock is an invalid pointer. \sa - + --------------------------------------------------------------------------*/ VOS_STATUS vos_lock_init( vos_lock_t *lock ); /*-------------------------------------------------------------------------- - + \brief vos_lock_acquire() - acquire a lock - A lock object is acquired by calling \a vos_lock_acquire(). If the lock - is already locked, the calling thread shall block until the lock becomes - available. This operation shall return with the lock object referenced by - lock in the locked state with the calling thread as its owner. - + A lock object is acquired by calling \a vos_lock_acquire(). If the lock + is already locked, the calling thread shall block until the lock becomes + available. This operation shall return with the lock object referenced by + lock in the locked state with the calling thread as its owner. + \param lock - the lock object to acquire - - \return VOS_STATUS_SUCCESS - the lock was successfully acquired by + + \return VOS_STATUS_SUCCESS - the lock was successfully acquired by the calling thread. - - VOS_STATUS_E_INVAL - The value specified by lock does not refer + + VOS_STATUS_E_INVAL - The value specified by lock does not refer to an initialized lock object. - - VOS_STATUS_E_FAULT - lock is an invalid pointer. - + + VOS_STATUS_E_FAULT - lock is an invalid pointer. + \sa - + ------------------------------------------------------------------------*/ VOS_STATUS vos_lock_acquire( vos_lock_t * lock ); /*-------------------------------------------------------------------------- - + \brief vos_lock_release() - release a lock - The \a vos_lock_release() function shall release the lock object - referenced by 'lock'. + The \a vos_lock_release() function shall release the lock object + referenced by 'lock'. If a thread attempts to release a lock that it unlocked or is not - initialized, an error is returned. + initialized, an error is returned. \param lock - the lock to release - + \return VOS_STATUS_SUCCESS - the lock was successfully released - - VOS_STATUS_E_INVAL - The value specified by lock does not refer + + VOS_STATUS_E_INVAL - The value specified by lock does not refer to an initialized lock object. - - VOS_STATUS_E_FAULT - The value specified by lock does not refer + + VOS_STATUS_E_FAULT - The value specified by lock does not refer to an initialized lock object. - - VOS_STATUS_E_PERM - Operation is not permitted. The calling - thread does not own the lock. - + + VOS_STATUS_E_PERM - Operation is not permitted. The calling + thread does not own the lock. + \sa - + ------------------------------------------------------------------------*/ VOS_STATUS vos_lock_release( vos_lock_t *lock ); /*-------------------------------------------------------------------------- - + \brief vos_lock_destroy() - Destroy a vOSS Lock - The \a vos_lock_destroy() function shall destroy the lock object + The \a vos_lock_destroy() function shall destroy the lock object referenced by lock. After a successful return from \a vos_lock_destroy() the lock object becomes, in effect, uninitialized. - - A destroyed lock object can be reinitialized using vos_lock_init(); - the results of otherwise referencing the object after it has been destroyed + + A destroyed lock object can be reinitialized using vos_lock_init(); + the results of otherwise referencing the object after it has been destroyed are undefined. Calls to vOSS lock functions to manipulate the lock such - as vos_lock_acquire() will fail if the lock is destroyed. Therefore, - don't use the lock after it has been destroyed until it has + as vos_lock_acquire() will fail if the lock is destroyed. Therefore, + don't use the lock after it has been destroyed until it has been re-initialized. - + \param lock - the lock object to be destroyed. - + \return VOS_STATUS_SUCCESS - lock was successfully destroyed. - - VOS_STATUS_E_BUSY - The implementation has detected an attempt - to destroy the object referenced by lock while it is locked - or still referenced. + + VOS_STATUS_E_BUSY - The implementation has detected an attempt + to destroy the object referenced by lock while it is locked + or still referenced. VOS_STATUS_E_INVAL - The value specified by lock is invalid. - - VOS_STATUS_E_FAULT - lock is an invalid pointer. + + VOS_STATUS_E_FAULT - lock is an invalid pointer. \sa - + ------------------------------------------------------------------------*/ VOS_STATUS vos_lock_destroy( vos_lock_t *lock ); /*-------------------------------------------------------------------------- - + \brief vos_spin_lock_init() - initializes a vOSS spin lock - - The vos_spin_lock_init() function initializes the specified spin lock. Upon - successful initialization, the state of the lock becomes initialized + + The vos_spin_lock_init() function initializes the specified spin lock. Upon + successful initialization, the state of the lock becomes initialized and unlocked. - A lock must be initialized by calling vos_spin_lock_init() before it - may be used in any other lock functions. - - Attempting to initialize an already initialized lock results in + A lock must be initialized by calling vos_spin_lock_init() before it + may be used in any other lock functions. + + Attempting to initialize an already initialized lock results in a failure. - + \param pLock - pointer to the opaque lock object to initialize - - \return VOS_STATUS_SUCCESS - spin lock was successfully initialized and + + \return VOS_STATUS_SUCCESS - spin lock was successfully initialized and is ready to be used. --------------------------------------------------------------------------*/ VOS_STATUS vos_spin_lock_init(vos_spin_lock_t *pLock); /*-------------------------------------------------------------------------- - + \brief vos_spin_lock_acquire() - acquires a spin lock - A lock object is acquired by calling \a vos_spin_lock_acquire(). If the lock - is already locked, the calling thread shall spin until the lock becomes - available. This operation shall return with the lock object referenced by - lock in the locked state with the calling thread as its owner. - + A lock object is acquired by calling \a vos_spin_lock_acquire(). If the lock + is already locked, the calling thread shall spin until the lock becomes + available. This operation shall return with the lock object referenced by + lock in the locked state with the calling thread as its owner. + \param pLock - the lock object to acquire - - \return VOS_STATUS_SUCCESS - the lock was successfully acquired by + + \return VOS_STATUS_SUCCESS - the lock was successfully acquired by the calling thread. - + \sa ------------------------------------------------------------------------*/ VOS_STATUS vos_spin_lock_acquire(vos_spin_lock_t *pLock); /*-------------------------------------------------------------------------- - + \brief vos_spin_lock_release() - releases a lock - The \a vos_lock_release() function shall release the spin lock object - referenced by 'lock'. + The \a vos_lock_release() function shall release the spin lock object + referenced by 'lock'. If a thread attempts to release a lock that it unlocked or is not - initialized, an error is returned. + initialized, an error is returned. \param pLock - the lock to release - + \return VOS_STATUS_SUCCESS - the lock was successfully released - + \sa ------------------------------------------------------------------------*/ VOS_STATUS vos_spin_lock_release(vos_spin_lock_t *pLock); /*-------------------------------------------------------------------------- - + \brief vos_spin_lock_destroy() - releases resource of a lock \param pLock - pointer to a lock to release - + \return VOS_STATUS_SUCCESS - the lock was successfully released - + \sa ------------------------------------------------------------------------*/ VOS_STATUS vos_spin_lock_destroy(vos_spin_lock_t *pLock); diff --git a/CORE/VOSS/inc/vos_memory.h b/CORE/VOSS/inc/vos_memory.h index f79288f679db..7b8d6a7b182d 100644 --- a/CORE/VOSS/inc/vos_memory.h +++ b/CORE/VOSS/inc/vos_memory.h @@ -27,15 +27,15 @@ #if !defined( __VOS_MEMORY_H ) #define __VOS_MEMORY_H - + /**========================================================================= - + \file vos_memory.h - + \brief virtual Operating System Servies (vOSS) - + Memory management functions - + ========================================================================*/ /* $Header$ */ @@ -45,7 +45,7 @@ ------------------------------------------------------------------------*/ #include <vos_types.h> -/*-------------------------------------------------------------------------- +/*-------------------------------------------------------------------------- Preprocessor definitions and constants ------------------------------------------------------------------------*/ @@ -55,30 +55,30 @@ v_VOID_t vos_mem_exit(v_VOID_t); void vos_mem_clean(void); #endif -/*-------------------------------------------------------------------------- +/*-------------------------------------------------------------------------- Type declarations ------------------------------------------------------------------------*/ -/*------------------------------------------------------------------------- +/*------------------------------------------------------------------------- Function declarations and documenation ------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------- - + \brief vos_mem_malloc() - vOSS Memory Allocation - This function will dynamicallly allocate the specified number of bytes of + This function will dynamicallly allocate the specified number of bytes of memory. - - \param size - the number of bytes of memory to allocate. - - \return Upon successful allocate, returns a non-NULL pointer to the - allocated memory. If this function is unable to allocate the amount of + + \param size - the number of bytes of memory to allocate. + + \return Upon successful allocate, returns a non-NULL pointer to the + allocated memory. If this function is unable to allocate the amount of memory specified (for any reason) it returns NULL. - + \sa - + --------------------------------------------------------------------------*/ #ifdef MEMORY_DEBUG #define vos_mem_malloc(size) vos_mem_malloc_debug(size, __FILE__, __LINE__) @@ -89,18 +89,18 @@ v_VOID_t * vos_mem_malloc( v_SIZE_t size ); /*---------------------------------------------------------------------------- - + \brief vos_mem_free() - vOSS Free Memory This function will free the memory pointed to by 'ptr'. - - \param ptr - pointer to the starting address of the memory to be - free'd. - + + \param ptr - pointer to the starting address of the memory to be + free'd. + \return Nothing - + \sa - + --------------------------------------------------------------------------*/ v_VOID_t vos_mem_free( v_VOID_t *ptr ); @@ -108,17 +108,17 @@ v_VOID_t vos_mem_free( v_VOID_t *ptr ); /*---------------------------------------------------------------------------- \fn vos_mem_set() - set (fill) memory with a specified byte value. - + \param pMemory - pointer to memory that will be set - + \param numBytes - the number of bytes to be set - + \param value - the byte set in memory - - \return - Nothing. - + + \return - Nothing. + \sa vos_mem_zero() - + --------------------------------------------------------------------------*/ v_VOID_t vos_mem_set( v_VOID_t *ptr, v_SIZE_t numBytes, v_BYTE_t value ); @@ -126,29 +126,29 @@ v_VOID_t vos_mem_set( v_VOID_t *ptr, v_SIZE_t numBytes, v_BYTE_t value ); /*---------------------------------------------------------------------------- \fn vos_mem_zero() - zero out memory - + This function sets the memory location to all zeros, essentially clearing the memory. - + \param pMemory - pointer to memory that will be set to zero - + \param numBytes - the number of bytes zero - + \param value - the byte set in memory - - \return - Nothing. - + + \return - Nothing. + \sa vos_mem_set() - + --------------------------------------------------------------------------*/ v_VOID_t vos_mem_zero( v_VOID_t *ptr, v_SIZE_t numBytes ); /*---------------------------------------------------------------------------- - + \brief vos_mem_copy() - Copy memory - Copy host memory from one location to another, similar to memcpy in + Copy host memory from one location to another, similar to memcpy in standard C. Note this function does not specifically handle overlapping source and destination memory locations. Calling this function with overlapping source and destination memory locations will result in @@ -156,37 +156,37 @@ v_VOID_t vos_mem_zero( v_VOID_t *ptr, v_SIZE_t numBytes ); for the source and destination are overlapping (or could be overlapping!) \param pDst - pointer to destination memory location (to copy to) - + \param pSrc - pointer to source memory location (to copy from) - + \param numBytes - number of bytes to copy. - + \return - Nothing - + \sa vos_mem_move() - + --------------------------------------------------------------------------*/ v_VOID_t vos_mem_copy( v_VOID_t *pDst, const v_VOID_t *pSrc, v_SIZE_t numBytes ); /*---------------------------------------------------------------------------- - + \brief vos_mem_move() - Move memory - Move host memory from one location to another, similar to memmove in + Move host memory from one location to another, similar to memmove in standard C. Note this function *does* handle overlapping source and destination memory locations. \param pDst - pointer to destination memory location (to move to) - + \param pSrc - pointer to source memory location (to move from) - + \param numBytes - number of bytes to move. - + \return - Nothing - + \sa vos_mem_move() - + --------------------------------------------------------------------------*/ v_VOID_t vos_mem_move( v_VOID_t *pDst, const v_VOID_t *pSrc, v_SIZE_t numBytes ); @@ -195,21 +195,21 @@ v_VOID_t vos_mem_move( v_VOID_t *pDst, const v_VOID_t *pSrc, v_SIZE_t numBytes ) \fn vos_mem_compare() \brief vos_mem_compare() - Memory compare - - Function to compare two pieces of memory, similar to memcmp function + + Function to compare two pieces of memory, similar to memcmp function in standard C. - + \param pMemory1 - pointer to one location in memory to compare. \param pMemory2 - pointer to second location in memory to compare. - + \param numBytes - the number of bytes to compare. - + \return v_BOOL_t - returns a boolean value that tells if the memory - locations are equal or not equal. - + locations are equal or not equal. + -------------------------------------------------------------------------------*/ -v_BOOL_t vos_mem_compare( v_VOID_t *pMemory1, v_VOID_t *pMemory2, v_U32_t numBytes ); +v_BOOL_t vos_mem_compare( v_VOID_t *pMemory1, v_VOID_t *pMemory2, v_U32_t numBytes ); /** --------------------------------------------------------------------------- @@ -217,46 +217,46 @@ v_BOOL_t vos_mem_compare( v_VOID_t *pMemory1, v_VOID_t *pMemory2, v_U32_t numByt \fn vos_mem_compare2() \brief vos_mem_compare2() - Memory compare - - Function to compare two pieces of memory, similar to memcmp function + + Function to compare two pieces of memory, similar to memcmp function in standard C. \param pMemory1 - pointer to one location in memory to compare. \param pMemory2 - pointer to second location in memory to compare. - + \param numBytes - the number of bytes to compare. - + \return v_SINT_t - returns a boolean value that tells if the memory - locations are equal or not equal. + locations are equal or not equal. 0 -- equal < 0 -- *pMemory1 is less than *pMemory2 > 0 -- *pMemory1 is bigger than *pMemory2 - + -------------------------------------------------------------------------------*/ v_SINT_t vos_mem_compare2( v_VOID_t *pMemory1, v_VOID_t *pMemory2, v_U32_t numBytes ); /*---------------------------------------------------------------------------- - + \brief vos_mem_dma_malloc() - vOSS DMA Memory Allocation - This function will dynamicallly allocate the specified number of bytes of + This function will dynamicallly allocate the specified number of bytes of memory. This memory will have special attributes making it DMA friendly i.e. - it will exist in contiguous, 32-byte aligned uncached memory. A normal - vos_mem_malloc does not yield memory with these attributes. + it will exist in contiguous, 32-byte aligned uncached memory. A normal + vos_mem_malloc does not yield memory with these attributes. NOTE: the special DMA friendly memory is very scarce and this API must be used sparingly - - \param size - the number of bytes of memory to allocate. - - \return Upon successful allocate, returns a non-NULL pointer to the - allocated memory. If this function is unable to allocate the amount of + + \param size - the number of bytes of memory to allocate. + + \return Upon successful allocate, returns a non-NULL pointer to the + allocated memory. If this function is unable to allocate the amount of memory specified (for any reason) it returns NULL. - + \sa - + --------------------------------------------------------------------------*/ #ifdef MEMORY_DEBUG #define vos_mem_dma_malloc(size) vos_mem_dma_malloc_debug(size, __FILE__, __LINE__) @@ -267,36 +267,36 @@ v_VOID_t * vos_mem_dma_malloc( v_SIZE_t size ); /*---------------------------------------------------------------------------- - + \brief vos_mem_dma_free() - vOSS DMA Free Memory This function will free special DMA friendly memory pointed to by 'ptr'. - - \param ptr - pointer to the starting address of the memory to be - free'd. - + + \param ptr - pointer to the starting address of the memory to be + free'd. + \return Nothing - + \sa - + --------------------------------------------------------------------------*/ v_VOID_t vos_mem_dma_free( v_VOID_t *ptr ); #ifdef DMA_DIRECT_ACCESS /*---------------------------------------------------------------------------- - + \brief vos_mem_set_dma_ptr() - vOSS DMA memory poiter set by SAL This function will set DMA Physical memory pointer. - - \param dmaBuffer - pointer to the starting address of the memory to be - free'd. - + + \param dmaBuffer - pointer to the starting address of the memory to be + free'd. + \return Nothing - + \sa - + --------------------------------------------------------------------------*/ v_VOID_t vos_mem_set_dma_ptr(unsigned char *dmaBuffer); #endif /* DMA_DIRECT_ACCESS */ diff --git a/CORE/VOSS/inc/vos_mq.h b/CORE/VOSS/inc/vos_mq.h index 78ad7022b3cc..58302c6200da 100644 --- a/CORE/VOSS/inc/vos_mq.h +++ b/CORE/VOSS/inc/vos_mq.h @@ -46,20 +46,20 @@ #include <vos_types.h> #include <vos_status.h> -/*-------------------------------------------------------------------------- +/*-------------------------------------------------------------------------- Preprocessor definitions and constants ------------------------------------------------------------------------*/ -/*-------------------------------------------------------------------------- +/*-------------------------------------------------------------------------- Type declarations ------------------------------------------------------------------------*/ - -/// vos Message Type. + +/// vos Message Type. /// This represnets a message that can be posted to another module through -/// the voss Message Queues. +/// the voss Message Queues. /// /// \note This is mapped directly to the tSirMsgQ for backward -/// compatibility with the legacy MAC code. +/// compatibility with the legacy MAC code. typedef struct vos_msg_s { @@ -74,7 +74,7 @@ typedef struct vos_msg_s * memory or bodyval as a 32 bit data is used. * bodyptr: is always a freeable pointer, one should always * make sure that bodyptr is always freeable. - * + * * Messages should use either bodyptr or bodyval; not both !!!. */ void *bodyptr; @@ -124,80 +124,80 @@ typedef enum /**--------------------------------------------------------------------------- - + \brief vos_mq_post_message() - post a message to a message queue This API allows messages to be posted to a specific message queue. Messages can be posted to the following message queues: - + <ul> <li> SME <li> PE <li> HAL <li> TL - </ul> - + </ul> + \param msgQueueId - identifies the message queue upon which the message will be posted. - - \param message - a pointer to a message buffer. Memory for this message + + \param message - a pointer to a message buffer. Memory for this message buffer is allocated by the caller and free'd by the vOSS after the - message is posted to the message queue. If the consumer of the + message is posted to the message queue. If the consumer of the message needs anything in this message, it needs to copy the contents before returning from the message queue handler. - + \return VOS_STATUS_SUCCESS - the message has been successfully posted to the message queue. - - VOS_STATUS_E_INVAL - The value specified by msgQueueId does not + + VOS_STATUS_E_INVAL - The value specified by msgQueueId does not refer to a valid Message Queue Id. - - VOS_STATUS_E_FAULT - message is an invalid pointer. - + + VOS_STATUS_E_FAULT - message is an invalid pointer. + VOS_STATUS_E_FAILURE - the message queue handler has reported an unknown failure. \sa - + --------------------------------------------------------------------------*/ VOS_STATUS vos_mq_post_message( VOS_MQ_ID msgQueueId, vos_msg_t *message ); /**--------------------------------------------------------------------------- - + \brief vos_tx_mq_serialize() - serialize a message to the Tx execution flow - This API allows messages to be posted to a specific message queue in the - Tx excution flow. Messages for the Tx execution flow can be posted only + This API allows messages to be posted to a specific message queue in the + Tx excution flow. Messages for the Tx execution flow can be posted only to the following queue. - + <ul> <li> TL <li> WDI/SSC </ul> - + \param msgQueueId - identifies the message queue upon which the message will be posted. - - \param message - a pointer to a message buffer. Body memory for this message + + \param message - a pointer to a message buffer. Body memory for this message buffer is allocated by the caller and free'd by the vOSS after the - message is dispacthed to the appropriate component. If the consumer - of the message needs to keep anything in the body, it needs to copy + message is dispacthed to the appropriate component. If the consumer + of the message needs to keep anything in the body, it needs to copy the contents before returning from the message handler. - + \return VOS_STATUS_SUCCESS - the message has been successfully posted to the message queue. - - VOS_STATUS_E_INVAL - The value specified by msgQueueId does not + + VOS_STATUS_E_INVAL - The value specified by msgQueueId does not refer to a valid Message Queue Id. - - VOS_STATUS_E_FAULT - message is an invalid pointer. - + + VOS_STATUS_E_FAULT - message is an invalid pointer. + VOS_STATUS_E_FAILURE - the message queue handler has reported an unknown failure. \sa - + --------------------------------------------------------------------------*/ VOS_STATUS vos_tx_mq_serialize( VOS_MQ_ID msgQueueId, vos_msg_t *message ); diff --git a/CORE/VOSS/inc/vos_pack_align.h b/CORE/VOSS/inc/vos_pack_align.h index 27c1f90457d8..7da83bd8af20 100644 --- a/CORE/VOSS/inc/vos_pack_align.h +++ b/CORE/VOSS/inc/vos_pack_align.h @@ -29,52 +29,52 @@ #define __VOS_PACK_ALIGN_H /**========================================================================= - + \file vos_pack_align.h - + \brief virtual Operating System Servies (vOS) pack and align primitives - + Definitions for platform independent means of packing and aligning data structures - + ========================================================================*/ /* - - Place the macro VOS_PACK_START above a structure declaration to pack. We - are not going to allow modifying the pack size because pack size cannot be - specified in AMSS and GNU. Place the macro VOS_PACK_END below a structure + + Place the macro VOS_PACK_START above a structure declaration to pack. We + are not going to allow modifying the pack size because pack size cannot be + specified in AMSS and GNU. Place the macro VOS_PACK_END below a structure declaration to stop the pack. This requirement is necessitated by Windows which need pragma based prolog and epilog. Pack-size > 1-byte is not supported since gcc and arm do not support that. - + Here are some examples - - 1. Pack-size 1-byte foo_t across all platforms - + + 1. Pack-size 1-byte foo_t across all platforms + VOS_PACK_START - typedef VOS_PACK_PRE struct foo_s { ... } VOS_PACK_POST foo_t; + typedef VOS_PACK_PRE struct foo_s { ... } VOS_PACK_POST foo_t; VOS_PACK_END - + 2. 2-byte alignment for foo_t across all platforms - - typedef VOS_ALIGN_PRE(2) struct foo_s { ... } VOS_ALIGN_POST(2) foo_t; + + typedef VOS_ALIGN_PRE(2) struct foo_s { ... } VOS_ALIGN_POST(2) foo_t; 3. Pack-size 1-byte and 2-byte alignment for foo_t across all platforms VOS_PACK_START - typedef VOS_PACK_PRE VOS_ALIGN_PRE(2) struct foo_s { ... } VOS_ALIGN_POST(2) VOS_PACK_POST foo_t; + typedef VOS_PACK_PRE VOS_ALIGN_PRE(2) struct foo_s { ... } VOS_ALIGN_POST(2) VOS_PACK_POST foo_t; VOS_PACK_END - + */ #if defined __GNUC__ - #define VOS_PACK_START - #define VOS_PACK_END + #define VOS_PACK_START + #define VOS_PACK_END - #define VOS_PACK_PRE + #define VOS_PACK_PRE #define VOS_PACK_POST __attribute__((__packed__)) #define VOS_ALIGN_PRE(__value) @@ -82,8 +82,8 @@ #elif defined __arm - #define VOS_PACK_START - #define VOS_PACK_END + #define VOS_PACK_START + #define VOS_PACK_END #define VOS_PACK_PRE __packed #define VOS_PACK_POST @@ -96,7 +96,7 @@ #define VOS_PACK_START __pragma(pack(push,1)) #define VOS_PACK_END __pragma(pack(pop)) - #define VOS_PACK_PRE + #define VOS_PACK_PRE #define VOS_PACK_POST #define VOS_ALIGN_PRE(__value) __declspec(align(__value)) diff --git a/CORE/VOSS/inc/vos_packet.h b/CORE/VOSS/inc/vos_packet.h index 3695179842c3..48e01c75ad73 100644 --- a/CORE/VOSS/inc/vos_packet.h +++ b/CORE/VOSS/inc/vos_packet.h @@ -29,13 +29,13 @@ #define __VOS_PKT_H /**========================================================================= - + \file vos_packet.h - + \brief virtual Operating System Services (vOSS) network Packet APIs - + Network Protocol packet/buffer support interfaces - + ========================================================================*/ /* $Header$ */ @@ -46,11 +46,11 @@ #include <vos_types.h> #include <vos_status.h> -/*-------------------------------------------------------------------------- +/*-------------------------------------------------------------------------- Preprocessor definitions and constants ------------------------------------------------------------------------*/ -/*-------------------------------------------------------------------------- +/*-------------------------------------------------------------------------- Type declarations ------------------------------------------------------------------------*/ struct vos_pkt_t; @@ -171,13 +171,13 @@ VOS_STATUS vos_pkt_extract_data( vos_pkt_t *pPacket, #else /// data vector typedef struct -{ +{ /// address of data v_VOID_t *pData; - + /// number of bytes at address v_U32_t numBytes; - + } vos_pkt_data_vector_t; @@ -187,13 +187,13 @@ typedef enum { /// voss Packet is used to transmit 802.11 Management frames. VOS_PKT_TYPE_TX_802_11_MGMT, - + /// voss Packet is used to transmit 802.11 Data frames. VOS_PKT_TYPE_TX_802_11_DATA, - + /// voss Packet is used to transmit 802.3 Data frames. VOS_PKT_TYPE_TX_802_3_DATA, - + /// voss Packet contains Received data of an unknown frame type VOS_PKT_TYPE_RX_RAW, @@ -206,36 +206,36 @@ typedef enum /// to identify the user area in the voss Packet. typedef enum { - VOS_PKT_USER_DATA_ID_TL =0, - VOS_PKT_USER_DATA_ID_BAL, - VOS_PKT_USER_DATA_ID_WDA, + VOS_PKT_USER_DATA_ID_TL =0, + VOS_PKT_USER_DATA_ID_BAL, + VOS_PKT_USER_DATA_ID_WDA, VOS_PKT_USER_DATA_ID_HDD, VOS_PKT_USER_DATA_ID_BAP, VOS_PKT_USER_DATA_ID_BSL, VOS_PKT_USER_DATA_ID_MAX - + } VOS_PKT_USER_DATA_ID; /**------------------------------------------------------------------------ - + \brief voss asynchronous get_packet callback function This is a callback function invoked when vos_pkt_get_packet() cannot - get the requested packet and the caller specified a callback to be - invoked when packets are available. - - \param pPacket - the packet obtained by voss for the caller. - - \param userData - the userData field given on the vos_pkt_get_packet() + get the requested packet and the caller specified a callback to be + invoked when packets are available. + + \param pPacket - the packet obtained by voss for the caller. + + \param userData - the userData field given on the vos_pkt_get_packet() call - + \return - + \sa - + ------------------------------------------------------------------------*/ -typedef VOS_STATUS ( *vos_pkt_get_packet_callback )( vos_pkt_t *pPacket, +typedef VOS_STATUS ( *vos_pkt_get_packet_callback )( vos_pkt_t *pPacket, v_VOID_t *userData ); /* @@ -245,622 +245,622 @@ typedef VOS_STATUS ( *vos_pkt_get_packet_callback )( vos_pkt_t *pPacket, */ #include "i_vos_packet.h" -/*------------------------------------------------------------------------- +/*------------------------------------------------------------------------- Function declarations and documenation ------------------------------------------------------------------------*/ - + /**-------------------------------------------------------------------------- - + \brief vos_pkt_get_packet() - Get a voss Packets - Gets a voss Packets from an internally managed packet pool. - - \param ppPacket - pointer to location where the voss Packet pointer is - returned. If multiple packets are requested, they - will be chained onto this first packet. - + Gets a voss Packets from an internally managed packet pool. + + \param ppPacket - pointer to location where the voss Packet pointer is + returned. If multiple packets are requested, they + will be chained onto this first packet. + \param pktType - the packet type to be retreived. Valid packet types are: <ul> - <li> VOS_PKT_TYPE_TX_802_11_MGMT - voss packet is for Transmitting 802.11 + <li> VOS_PKT_TYPE_TX_802_11_MGMT - voss packet is for Transmitting 802.11 Management frames. - - <li> VOS_PKT_TYPE_RX_RAW - voss Packet contains a buffer for Receiving - raw frames of unknown type. + + <li> VOS_PKT_TYPE_RX_RAW - voss Packet contains a buffer for Receiving + raw frames of unknown type. </ul> - + \param dataSize - the Data size needed in the voss Packet. - - \param numPackets - the number of packets requested. - + + \param numPackets - the number of packets requested. + \param zeroBuffer - parameter that tells the API to zero the data buffer - in this voss Packet. - <ul> + in this voss Packet. + <ul> <li> VOS_TRUE - the API will zero out the entire data buffer. - - <li> VOS_FALSE - the API will not zero out the data buffer. + + <li> VOS_FALSE - the API will not zero out the data buffer. </ul> - - \note If enough room for headers to transmit or receive the packet is not + + \note If enough room for headers to transmit or receive the packet is not available, this API will fail. - - \param callback - This callback function, if provided, is invoked in the - case when resources are not available at the time of the call to - get packets. This callback function is invoked when packets are - available. - - \param userData - This user data is passed back to the caller in the + + \param callback - This callback function, if provided, is invoked in the + case when resources are not available at the time of the call to + get packets. This callback function is invoked when packets are + available. + + \param userData - This user data is passed back to the caller in the callback function, if the callback is invoked. - + \return VOS_STATUS_SUCCESS - the API was able to get a vos_packet for the requested type. *ppPacket contains a pointer to the packet. - - VOS_STATUS_E_INVAL - pktType is not a valid packet type. This - API only supports getting vos packets for 802_11_MGMT and - RX_RAW packet types. This status is also returned if the + + VOS_STATUS_E_INVAL - pktType is not a valid packet type. This + API only supports getting vos packets for 802_11_MGMT and + RX_RAW packet types. This status is also returned if the numPackets or dataSize are invalid. - + VOS_STATUS_E_RESOURCES - unable to get resources needed to get - a vos packet. If a callback function is specified and this - status is returned from the API, the callback will be called + a vos packet. If a callback function is specified and this + status is returned from the API, the callback will be called when resources are available to fulfill the original request. - + Note that the low resources condition is indicated to the caller - by returning VOS_STATUS_E_RESOURCES. This status is the only + by returning VOS_STATUS_E_RESOURCES. This status is the only non-success status that indicates to the caller that the callback will be called when resources are available. All other status - indicate failures that are not recoverable and the 'callback' + indicate failures that are not recoverable and the 'callback' will not be called. - VOS_STATUS_E_FAILURE - The API returns this status when unable + VOS_STATUS_E_FAILURE - The API returns this status when unable to get a packet from the packet pool because the pool is depleted and the caller did not specify a low resource callback. - + VOS_STATUS_E_ALREADY - This status is returned when the VOS - packet pool is in a 'low resource' condition and cannot - accomodate any more calls to retrieve packets from that + packet pool is in a 'low resource' condition and cannot + accomodate any more calls to retrieve packets from that pool. Note this is a FAILURE and the 'low resource' callback will *not* be called. - - VOS_STATUS_E_FAULT - ppPacket does not specify a valid pointer. - + + VOS_STATUS_E_FAULT - ppPacket does not specify a valid pointer. + \sa - - ------------------------------------------------------------------------*/ -VOS_STATUS vos_pkt_get_packet( vos_pkt_t **ppPacket, VOS_PKT_TYPE pktType, + + ------------------------------------------------------------------------*/ +VOS_STATUS vos_pkt_get_packet( vos_pkt_t **ppPacket, VOS_PKT_TYPE pktType, v_SIZE_t dataSize, v_SIZE_t numPackets, v_BOOL_t zeroBuffer, vos_pkt_get_packet_callback callback, v_VOID_t *userData ); - + /**-------------------------------------------------------------------------- - + \brief vos_pkt_wrap_data_packets() - Wrap an OS provided data packet in a vos packet. - Takes as input an OS provided data packet and 'wraps' that packet in a - vos_packet, returning the vos_packet to the caller. - + Takes as input an OS provided data packet and 'wraps' that packet in a + vos_packet, returning the vos_packet to the caller. + This function is intended to be called from the HDD to wrap Tx data packets from the OS into vos_packets before sending them to TL for transmission. - - \param ppPacket - pointer to location where the voss Packet pointer is - returned. If multiple packets are requested, they - will be chained onto this first packet. - + + \param ppPacket - pointer to location where the voss Packet pointer is + returned. If multiple packets are requested, they + will be chained onto this first packet. + \param pktType - the packet type to be retreived. Valid packet types are: <ul> - <li> VOS_PKT_TYPE_802_3_DATA - voss packet is for Transmitting 802.3 + <li> VOS_PKT_TYPE_802_3_DATA - voss packet is for Transmitting 802.3 data frames. - + <li> VOS_PKT_TYPE_802_11_DATA - voss Packet is for Transmitting 802.11 - data frames. + data frames. </ul> - + \param pOSPacket - a pointer to the Transmit packet provided by the OS. This - OS provided packet will be wrapped into a vos_packet_t. Note this + OS provided packet will be wrapped into a vos_packet_t. Note this OS packet pointer can be NULL. The OS packet pointer can be inserted - into a VOS packet of type VOS_PKT_TYPE_802_3_DATA or + into a VOS packet of type VOS_PKT_TYPE_802_3_DATA or VOS_PKT_TYPE_802_11_DATA through vos_pkt_set_os_packet(). - - \note If enough room for headers to transmit or receive the packet is not + + \note If enough room for headers to transmit or receive the packet is not available, this API will fail. - - \param callback - This callback function, if provided, is invoked in the - case where packets are not available at the time of the call to + + \param callback - This callback function, if provided, is invoked in the + case where packets are not available at the time of the call to return the packets to the caller (a 'low resource' condition). - + When packets become available, the callback callback function is - invoked to return a VOS packet to the caller. Note that the + invoked to return a VOS packet to the caller. Note that the OS Packet is *not* inserted into the VOS packet when it is returned to the low resource callback. It is up to the caller to insert the OS packet into the VOS packet by calling vos_pkt_set_os_packet() - - \param userData - This user data is passed back to the caller in the + + \param userData - This user data is passed back to the caller in the callback function, if the callback is invoked. - + \return VOS_STATUS_SUCCESS - the API was able to get a vos_packet for the requested type. *ppPacket contains a pointer to the packet. - - VOS_STATUS_E_INVAL - pktType is not a valid packet type. This - API only supports getting vos packets for 802_11_MGMT and - RX_RAW packet types. - + + VOS_STATUS_E_INVAL - pktType is not a valid packet type. This + API only supports getting vos packets for 802_11_MGMT and + RX_RAW packet types. + VOS_STATUS_E_RESOURCES - unable to get resources needed to get - a vos packet. If a callback function is specified and this - status is returned from the API, the callback will be called + a vos packet. If a callback function is specified and this + status is returned from the API, the callback will be called when resources are available to fulfill the original request. - + Note that the low resources condition is indicated to the caller - by returning VOS_STATUS_E_RESOURCES. This status is the only + by returning VOS_STATUS_E_RESOURCES. This status is the only non-success status that indicates to the caller that the callback will be called when resources are available. All other status - indicate failures that are not recoverable and the 'callback' - will not be called. - - VOS_STATUS_E_FAILURE - The API returns this status when unable + indicate failures that are not recoverable and the 'callback' + will not be called. + + VOS_STATUS_E_FAILURE - The API returns this status when unable to get a packet from the packet pool because the pool is depleted and the caller did not specify a low resource callback. - + VOS_STATUS_E_ALREADY - This status is returned when the VOS - packet pool is in a 'low resource' condition and cannot - accomodate any more calls to retrieve packets from that + packet pool is in a 'low resource' condition and cannot + accomodate any more calls to retrieve packets from that pool. Note this is a FAILURE and the 'low resource' callback will *not* be called. - + VOS_STATUS_E_FAULT - ppPacket or pOSPacket do not specify valid - pointers. - + pointers. + \sa vos_pkt_set_os_packet() - - ------------------------------------------------------------------------*/ -VOS_STATUS vos_pkt_wrap_data_packet( vos_pkt_t **ppPacket, VOS_PKT_TYPE pktType, + + ------------------------------------------------------------------------*/ +VOS_STATUS vos_pkt_wrap_data_packet( vos_pkt_t **ppPacket, VOS_PKT_TYPE pktType, v_VOID_t *pOSPacket, vos_pkt_get_packet_callback callback, v_VOID_t *userData ); /*--------------------------------------------------------------------------- - + \brief vos_pkt_set_os_packet() - set the OS packet in a VOS data packet This API inserts an OS packet into a previously retreived VOS packet. This API only applies to VOS packets of type VOS_PKT_TYPE_802_3_DATA or - VOS_PKT_TYPE_802_11_DATA. - - There are cases where a user will need to get a VOS data packet without + VOS_PKT_TYPE_802_11_DATA. + + There are cases where a user will need to get a VOS data packet without having the OS packet to insert/wrap into the data packet. This could happen - if the user calls vos_pkt_wrap_data_packet() without the OS packet. - - Also, when the user hit a 'low resource' situation for data packets, the + if the user calls vos_pkt_wrap_data_packet() without the OS packet. + + Also, when the user hit a 'low resource' situation for data packets, the low resource callback is going to return a VOS packet without an OS packet attached to it. The caller who gets the packet through the low resource - callback uses this API to insert an OS packet into the VOS packet that + callback uses this API to insert an OS packet into the VOS packet that was returned through the low resource callback. - + \param pPacket - the voss Packet to insert the OS packet into. - + \param pOSPacket - a pointer to the Transmit packet provided by the OS. This - OS provided packet will be wrapped into a vos_packet_t. Note this + OS provided packet will be wrapped into a vos_packet_t. Note this OS packet pointer can be NULL. The OS packet pointer can be inserted - into a VOS packet of type VOS_PKT_TYPE_802_3_DATA or + into a VOS packet of type VOS_PKT_TYPE_802_3_DATA or VOS_PKT_TYPE_802_11_DATA through vos_pkt_set_os_packet(). - - Caller beware. If there is a valid OS packet wrapped into this + + Caller beware. If there is a valid OS packet wrapped into this VOS packet already, this API will blindly overwrite the OS packet with the new one specified on this API call. If you need to determine - or retreive the current OS packet from a VOS packet, call + or retreive the current OS packet from a VOS packet, call vos_pkt_get_os_packet() first. - + \return VOS_STATUS_SUCCESS - the API was able to insert the OS packet into - the vos_packet. - - VOS_STATUS_E_INVAL - pktType is not a valid packet type. This - API only supports getting vos packets of type - VOS_PKT_TYPE_802_3_DATA or VOS_PKT_TYPE_802_11_DATA. - - VOS_STATUS_E_FAULT - pPacket does not specify a valid pointer. - + the vos_packet. + + VOS_STATUS_E_INVAL - pktType is not a valid packet type. This + API only supports getting vos packets of type + VOS_PKT_TYPE_802_3_DATA or VOS_PKT_TYPE_802_11_DATA. + + VOS_STATUS_E_FAULT - pPacket does not specify a valid pointer. + \sa vos_pkt_get_os_packet() - + ----------------------------------------------------------------------------*/ VOS_STATUS vos_pkt_set_os_packet( vos_pkt_t *pPacket, v_VOID_t *pOSPacket ); /*--------------------------------------------------------------------------- - + \brief vos_pkt_get_os_packet() - get the OS packet in a VOS data packet This API returns the OS packet that is inserted in a VOS packet. This API only applies to VOS packets of type VOS_PKT_TYPE_802_3_DATA or - VOS_PKT_TYPE_802_11_DATA. - + VOS_PKT_TYPE_802_11_DATA. + \param pPacket - the voss Packet to return the OS packet from. - - \param ppOSPacket - a pointer to the location where the OS packet pointer + + \param ppOSPacket - a pointer to the location where the OS packet pointer retreived from the VOS packet will be returned. Note this OS packet pointer can be NULL, meaning there is no OS packet attached to this VOS data packet. - + \param clearOSPacket - a boolean value that tells the API to clear out the OS packet pointer from the VOS packet. Setting this to 'true' will essentially remove the OS packet from the VOS packet. 'false' means - the OS packet remains chained to the VOS packet. In either case, + the OS packet remains chained to the VOS packet. In either case, the OS packet pointer is returned to the caller. - - \return VOS_STATUS_SUCCESS - the API was able to retreive the OS packet - pointer from the VOS packet and return it to the caller in - *ppOsPacket - - VOS_STATUS_E_INVAL - pktType is not a valid packet type. This - API only supports getting vos packets of type - VOS_PKT_TYPE_802_3_DATA or VOS_PKT_TYPE_802_11_DATA. - + + \return VOS_STATUS_SUCCESS - the API was able to retreive the OS packet + pointer from the VOS packet and return it to the caller in + *ppOsPacket + + VOS_STATUS_E_INVAL - pktType is not a valid packet type. This + API only supports getting vos packets of type + VOS_PKT_TYPE_802_3_DATA or VOS_PKT_TYPE_802_11_DATA. + VOS_STATUS_E_FAULT - pPacket or ppOsPacket does not specify a valid pointers. - + \sa vos_pkt_set_os_packet(), vos_pkt_wrap_data_packet(), vos_pkt_return_packet() - + ----------------------------------------------------------------------------*/ -VOS_STATUS vos_pkt_get_os_packet( vos_pkt_t *pPacket, v_VOID_t **ppOSPacket, +VOS_STATUS vos_pkt_get_os_packet( vos_pkt_t *pPacket, v_VOID_t **ppOSPacket, v_BOOL_t clearOSPacket ); /**-------------------------------------------------------------------------- - + \brief vos_pkt_get_user_data_ptr() - return a pointer to user data area of a voss Packet - This API returns a pointer to a specified user Data area in the voss - Packet. User data areas are uniqua areas of the voss Packet that can - be used by specific components to store private data. These areas are + This API returns a pointer to a specified user Data area in the voss + Packet. User data areas are uniqua areas of the voss Packet that can + be used by specific components to store private data. These areas are identified by a user "ID" and should only be accessed by the component specified. - + \param pPacket - the voss Packet to retreive the user data pointer from. - + \param userID - the identifier for the user data area in the voss Packet to get. - - User IDs and user data areas in the voss Packet are + + User IDs and user data areas in the voss Packet are available for: - Transport Layer (TL) - Bus Abstraction Layer (BAL) - SDIO Services Component (SSC) - Host Device Driver (HDD) - - \param ppUserData - pointer to location to return the pointer to the user + + \param ppUserData - pointer to location to return the pointer to the user data. - + \return - Nothing. - + \sa - + ----------------------------------------------------------------------------*/ v_VOID_t vos_pkt_get_user_data_ptr( vos_pkt_t *pPacket, VOS_PKT_USER_DATA_ID userID, v_VOID_t **ppUserData ); /**-------------------------------------------------------------------------- - + \brief vos_pkt_set_user_data_ptr() - set the user data pointer of a voss Packet - This API sets a pointer in the specified user Data area in the voss - Packet. User data areas are uniqua areas of the voss Packet that can - be used by specific components to store private data. These areas are + This API sets a pointer in the specified user Data area in the voss + Packet. User data areas are uniqua areas of the voss Packet that can + be used by specific components to store private data. These areas are identified by a user "ID" and should only be accessed by the component specified. - + Note: The size of the user data areas in the voss Packet are fixed. The size of a single pointer is available in each user area. - + \param pPacket - the voss Packet to set the user pointer. - + \param userID - the identifier for the user data area in the voss Packet to set. - - User IDs and user data areas in the voss Packet are + + User IDs and user data areas in the voss Packet are available for: - Transport Layer (TL) - Bus Abstraction Layer (BAL) - SDIO Services Component (SSC) - Host Device Driver (HDD) - - \param pUserData - pointer value to set in the user data area of the voss + + \param pUserData - pointer value to set in the user data area of the voss packet.. - + \return - Nothing. - + \sa - + ----------------------------------------------------------------------------*/ v_VOID_t vos_pkt_set_user_data_ptr( vos_pkt_t *pPacket, VOS_PKT_USER_DATA_ID userID, v_VOID_t *pUserData ); /**-------------------------------------------------------------------------- - + \brief vos_pkt_return_packet() - Return a voss Packet (chain) to vOSS - This API returns a voss Packet to the internally managed packet pool. - - Note: If there are multiple packets chained to this packet, the entire - packet chain is returned to vOSS. The caller must unchain the - packets throgh vos_pkt_get_next_packet() and return them individually + This API returns a voss Packet to the internally managed packet pool. + + Note: If there are multiple packets chained to this packet, the entire + packet chain is returned to vOSS. The caller must unchain the + packets throgh vos_pkt_get_next_packet() and return them individually if all packets in the packet chain are not to be returned. - + \param pPacket - the voss Packet(s) to return. Note all packets chained to this packet are returned to vOSS. - + \return - + \sa - + ----------------------------------------------------------------------------*/ VOS_STATUS vos_pkt_return_packet( vos_pkt_t *pPacket ); /**-------------------------------------------------------------------------- - - \brief vos_pkt_chain_packet() - chain a voss Packet to another packet + + \brief vos_pkt_chain_packet() - chain a voss Packet to another packet This API chains a voss Packet to another voss Packet, creating a packet chain. Packets can be chained before or after the current packet in the packet chain. - - \param pPacket - pointer to a voss packet to chain to - + + \param pPacket - pointer to a voss packet to chain to + \param pChainPacket - pointer to packet to chain - - \param chainAfter - boolean to specify to chain packet after or before + + \param chainAfter - boolean to specify to chain packet after or before the input packet - <ul> + <ul> <li> true - chain packet AFTER pPacket (chain behind) - <li> false - chain packet BEFORE pPacket (chain in front) + <li> false - chain packet BEFORE pPacket (chain in front) </ul> - + \return - + \sa - + ----------------------------------------------------------------------------*/ -VOS_STATUS vos_pkt_chain_packet( vos_pkt_t *pPacket, vos_pkt_t *pChainPacket, +VOS_STATUS vos_pkt_chain_packet( vos_pkt_t *pPacket, vos_pkt_t *pChainPacket, v_BOOL_t chainAfter ); /**-------------------------------------------------------------------------- - - \brief vos_pkt_walk_packet_chain() - Walk packet chain and (possibly) + + \brief vos_pkt_walk_packet_chain() - Walk packet chain and (possibly) unchain packets - This API will walk the voss Packet and unchain the packet from the chain, - if specified. The 'next' packet in the packet chain is returned as the - packet chain is traversed. - - \param pPacket - input vos_packet walk - - \param ppChainedPacket - pointer to location to return the 'next' voss - packet pointer in the packet chain. + This API will walk the voss Packet and unchain the packet from the chain, + if specified. The 'next' packet in the packet chain is returned as the + packet chain is traversed. + + \param pPacket - input vos_packet walk + + \param ppChainedPacket - pointer to location to return the 'next' voss + packet pointer in the packet chain. NULL means there is was not packet chained to this packet. - + \param unchainPacket - Flag that specifies if the caller wants the packet - to be removed from the packet chain. This is + to be removed from the packet chain. This is provided to allow the caller to walk the packet chain - with or without breaking the chain. - + with or without breaking the chain. + <ul> - <li> true - when set 'true' the API will return - the 'next' packet pointer in the voss Packte chain and + <li> true - when set 'true' the API will return + the 'next' packet pointer in the voss Packte chain and *WILL* unchain the input packet from the packet chain. - - <li> NOT false - when set 'false' the API will return + + <li> NOT false - when set 'false' the API will return the 'next' packet pointer in the voss Packet chain but *WILL NOT* unchain the packet chain. This option gives - the caller the ability to walk the packet chain without + the caller the ability to walk the packet chain without modifying it in the process. </ul> - + \note Having the packets chained has an implicaiton on how the return - packet API (vos_pkt_return_packet() ) operates. - + packet API (vos_pkt_return_packet() ) operates. + \return - + \sa - + ----------------------------------------------------------------------------*/ VOS_STATUS vos_pkt_walk_packet_chain( vos_pkt_t *pPacket, vos_pkt_t **ppChainedPacket, v_BOOL_t unchainPacket ); /**-------------------------------------------------------------------------- - + \brief vos_pkt_get_data_vector() - Get data vectors from a voss Packet - This API gets the complete set of Vectors (pointer / length pairs) that + This API gets the complete set of Vectors (pointer / length pairs) that describe all of the data that makes up the voss Packet. - \param pPacket - pointer to the vOSS Packet to get the pointer/length + \param pPacket - pointer to the vOSS Packet to get the pointer/length vector from - + \param pVector - pointer to the vector array where the vectors are returned. - - \param pNumVectors - Number of vector's in the vector array (at pVector). - On successful return, *pNumVectors is updated with the - number of pointer/length vectors at pVector populated + + \param pNumVectors - Number of vector's in the vector array (at pVector). + On successful return, *pNumVectors is updated with the + number of pointer/length vectors at pVector populated with valid vectors. - - Call with NULL pVector or 0 vectorSize, will return the size of vector + + Call with NULL pVector or 0 vectorSize, will return the size of vector needed (in *pNumVectors) - + Caller allocates and frees the vector memory. - + \return - + \sa - + ----------------------------------------------------------------------------*/ -VOS_STATUS vos_pkt_get_data_vector( vos_pkt_t *pPacket, vos_pkt_data_vector_t *pVector, +VOS_STATUS vos_pkt_get_data_vector( vos_pkt_t *pPacket, vos_pkt_data_vector_t *pVector, v_SIZE_t *pNumVectors ); /**-------------------------------------------------------------------------- - + \brief vos_pkt_extract_data() - Extract data from the voss Packet. - This API extracts data from a voss Packet, copying the data into the + This API extracts data from a voss Packet, copying the data into the supplied output buffer. Note the data is copied from the vos packet but the data remains in the vos packet and the size is unaffected. - + \param pPacket - the voss Packet to get the data from. - - \param pktOffset - the offset from the start of the voss Packet to get the + + \param pktOffset - the offset from the start of the voss Packet to get the data. (i.e. 0 would be the beginning of the voss Packet). - + \param pOutputBuffer - Pointer to the location where the voss Packet data will be copied. - + \param pOutputBufferSize - on input, contains the amount of data to extract into the output buffer. Upon return, contains the amount of data - extracted into the output buffer. - - Note: an input of 0 in *pOutputBufferSize, means to copy *all* - data in the voss Packet into the output buffer. The caller is + extracted into the output buffer. + + Note: an input of 0 in *pOutputBufferSize, means to copy *all* + data in the voss Packet into the output buffer. The caller is responsible for assuring the output buffer size is big enough since the size of the buffer is not being passed in! - + \return - + \sa - + ----------------------------------------------------------------------------*/ -VOS_STATUS vos_pkt_extract_data( vos_pkt_t *pPacket, v_SIZE_t pktOffset, +VOS_STATUS vos_pkt_extract_data( vos_pkt_t *pPacket, v_SIZE_t pktOffset, v_VOID_t *pOutputBuffer, v_SIZE_t *pOutputBufferSize ); /**-------------------------------------------------------------------------- - + \brief vos_pkt_extract_data_chain() - Extract data from a voss Packet chain. - This API extracts *all* the data from a voss Packet chain, copying the - data into the supplied output buffer. Note the data is copied from - the vos packet chain but the data remains in the vos packet and the + This API extracts *all* the data from a voss Packet chain, copying the + data into the supplied output buffer. Note the data is copied from + the vos packet chain but the data remains in the vos packet and the size of the vos packets are unaffected. - - \param pPacket - the first voss Packet in the voss packet chain to + + \param pPacket - the first voss Packet in the voss packet chain to extract data. - + \param pOutputBuffer - Pointer to the location where the voss Packet data will be copied. - - \param pOutputBufferSize - on input, contains the maximum amount of data + + \param pOutputBufferSize - on input, contains the maximum amount of data that can be extracted into the output buffer. Upon return, contains - the amount of data extracted from the packet chain. - - \return VOS_STATUS_SUCCESS - the data from the entire packet chain is + the amount of data extracted from the packet chain. + + \return VOS_STATUS_SUCCESS - the data from the entire packet chain is extracted and found at *pOutputBuffer. *pOutputBufferSize bytes were extracted. - + VOS_STATUS_E_FAULT - pPacket, pOutputBuffer, or pOutputBufferSize is not a valid pointer. - + VOS_STATUS_E_NOMEM - there is not enough room to extract the data - from the entire packet chain. *pOutputBufferSize has been updated - with the size needed to extract the entier packet chain. - + from the entire packet chain. *pOutputBufferSize has been updated + with the size needed to extract the entier packet chain. + \sa vos_pkt_extract_data() - + ----------------------------------------------------------------------------*/ -VOS_STATUS vos_pkt_extract_data_chain( vos_pkt_t *pPacket, v_VOID_t *pOutputBuffer, +VOS_STATUS vos_pkt_extract_data_chain( vos_pkt_t *pPacket, v_VOID_t *pOutputBuffer, v_SIZE_t *pOutputBufferSize ); /**-------------------------------------------------------------------------- - - \brief vos_pkt_peek_data() - peek into voss Packet at given offset - - This API provides a pointer to a specified offset into a voss Packet, - allowing the caller to peek at a given number of bytes in the voss Packet. - Upon successful return, the caller can access "numBytes" of data at - "pPacketData". - - This API will fail if the data length requested to peek at is not in - contiguous memory in the voss Packet. In this case, the caller should + + \brief vos_pkt_peek_data() - peek into voss Packet at given offset + + This API provides a pointer to a specified offset into a voss Packet, + allowing the caller to peek at a given number of bytes in the voss Packet. + Upon successful return, the caller can access "numBytes" of data at + "pPacketData". + + This API will fail if the data length requested to peek at is not in + contiguous memory in the voss Packet. In this case, the caller should use vos_pkt_extract_data() to have the data copied into a caller supplied buffer. - + \param pPacket - the vOSS Packet to peek into - + \param pktOffset - the offset into the voss Packet data to peek into. - + \param ppPacketData - pointer to the location where the pointer to the packet data at pktOffset will be returned. - - \param numBytes - the number of bytes the caller wishes to peek at. - + + \param numBytes - the number of bytes the caller wishes to peek at. + \return - + \sa - + ----------------------------------------------------------------------------*/ VOS_STATUS vos_pkt_peek_data( vos_pkt_t *pPacket, v_SIZE_t pktOffset, v_VOID_t **ppPacketData, v_SIZE_t numBytes ); - - + + /**-------------------------------------------------------------------------- - - \brief vos_pkt_get_packet_type() - Get packet type for a voss Packet - This API returns the packet Type for a voss Packet. - + \brief vos_pkt_get_packet_type() - Get packet type for a voss Packet + + This API returns the packet Type for a voss Packet. + \param pPacket - the voss Packet to get the packet type from. - + \param pPacketType - location to return the packet type for the voss Packet - + \return - + \sa - + ----------------------------------------------------------------------------*/ VOS_STATUS vos_pkt_get_packet_type( vos_pkt_t *pPacket, VOS_PKT_TYPE *pPacketType ); /**-------------------------------------------------------------------------- - - \brief vos_pkt_get_packet_length() - Get packet length for a voss Packet - This API returns the total length of the data in a voss Packet. - + \brief vos_pkt_get_packet_length() - Get packet length for a voss Packet + + This API returns the total length of the data in a voss Packet. + \param pPacket - the voss Packet to get the packet length from. - + \param pPacketSize - location to return the total size of the data contained - in the voss Packet. + in the voss Packet. \return - + \sa - + ----------------------------------------------------------------------------*/ VOS_STATUS vos_pkt_get_packet_length( vos_pkt_t *pPacket, v_U16_t *pPacketSize ); /**-------------------------------------------------------------------------- - - \brief vos_pkt_get_packet_chain_length() - Get length of a vos packet chain + + \brief vos_pkt_get_packet_chain_length() - Get length of a vos packet chain This API returns the total length of the data in a voss Packet chain. - + \param pPacket - the voss Packet at the start of the packet chain. This API - will calculate the length of data in the packet chain stating with + will calculate the length of data in the packet chain stating with this packet. - + \param pPacketSize - location to return the total size of the data contained - in the voss Packet. + in the voss Packet. \return - + \sa - + ----------------------------------------------------------------------------*/ VOS_STATUS vos_pkt_get_packet_chain_length( vos_pkt_t *pPacketChain, v_SIZE_t *pPacketChainSize ); @@ -868,304 +868,304 @@ VOS_STATUS vos_pkt_get_packet_chain_length( vos_pkt_t *pPacketChain, v_SIZE_t *p /**-------------------------------------------------------------------------- - - \brief vos_pkt_push_head() - push data on the front a of a voss Packet - This API will push data onto the front of a voss Packet. The data will be + \brief vos_pkt_push_head() - push data on the front a of a voss Packet + + This API will push data onto the front of a voss Packet. The data will be appended in front of any data already contained in the voss Packet. - + \param pPacket - the voss Packet to modify. - + \param pData - pointer to the data to push onto the head of the voss Packet. - - \param dataSize - the size of the data to put onto the head of the voss Packet. - + + \param dataSize - the size of the data to put onto the head of the voss Packet. + \return - + \sa - - ----------------------------------------------------------------------------*/ + + ----------------------------------------------------------------------------*/ VOS_STATUS vos_pkt_push_head( vos_pkt_t *pPacket, v_VOID_t *pData, v_SIZE_t dataSize ); /**-------------------------------------------------------------------------- - - \brief vos_pkt_reserve_head() - Reserve space at the front of a voss Packet - This API will reserve space at the front of a voss Packet. The caller can - then copy data into this reserved space using memcpy() like functions. This + \brief vos_pkt_reserve_head() - Reserve space at the front of a voss Packet + + This API will reserve space at the front of a voss Packet. The caller can + then copy data into this reserved space using memcpy() like functions. This allows the caller to reserve space and build headers directly in this reserved space in the voss Packet. - - Upon successful return, the length of the voss Packet is increased by + + Upon successful return, the length of the voss Packet is increased by dataSize. - - < put a before / after picture here> - + + < put a before / after picture here> + \param pPacket - the voss Packet to modify. - - \param ppData - pointer to the location where the pointer to the reserved - space is returned. Upon successful return, the caller has + + \param ppData - pointer to the location where the pointer to the reserved + space is returned. Upon successful return, the caller has write / read access to the data space at *ppData for length dataSize to build headers, etc. - - \param dataSize - the size of the data to reserve at the head of the voss + + \param dataSize - the size of the data to reserve at the head of the voss Packet. Upon successful return, the length of the voss - Packet is increased by dataSize. - + Packet is increased by dataSize. + \return - + \sa - - ----------------------------------------------------------------------------*/ -VOS_STATUS vos_pkt_reserve_head( vos_pkt_t *pPacket, v_VOID_t **ppData, + + ----------------------------------------------------------------------------*/ +VOS_STATUS vos_pkt_reserve_head( vos_pkt_t *pPacket, v_VOID_t **ppData, v_SIZE_t dataSize ); /**-------------------------------------------------------------------------- - - \brief vos_pkt_reserve_head_fast()- Reserve space at the front of a voss Pkt - This API will reserve space at the front of a voss Packet. The caller can - then copy data into this reserved space using memcpy() like functions. This + \brief vos_pkt_reserve_head_fast()- Reserve space at the front of a voss Pkt + + This API will reserve space at the front of a voss Packet. The caller can + then copy data into this reserved space using memcpy() like functions. This allows the caller to reserve space and build headers directly in this reserved space in the voss Packet. - - Upon successful return, the length of the voss Packet is increased by + + Upon successful return, the length of the voss Packet is increased by dataSize. - + Same as above API but no memset to 0. - - < put a before / after picture here> - + + < put a before / after picture here> + \param pPacket - the voss Packet to modify. - - \param ppData - pointer to the location where the pointer to the reserved - space is returned. Upon successful return, the caller has + + \param ppData - pointer to the location where the pointer to the reserved + space is returned. Upon successful return, the caller has write / read access to the data space at *ppData for length dataSize to build headers, etc. - - \param dataSize - the size of the data to reserve at the head of the voss + + \param dataSize - the size of the data to reserve at the head of the voss Packet. Upon successful return, the length of the voss - Packet is increased by dataSize. - + Packet is increased by dataSize. + \return - + \sa - - ----------------------------------------------------------------------------*/ + + ----------------------------------------------------------------------------*/ VOS_STATUS vos_pkt_reserve_head_fast( vos_pkt_t *pPacket, v_VOID_t **ppData, v_SIZE_t dataSize ); /**-------------------------------------------------------------------------- - - \brief vos_pkt_pop_head() - Remove data from the front of the voss Packet - This API removes data from the front of a voss Packet. The data is + \brief vos_pkt_pop_head() - Remove data from the front of the voss Packet + + This API removes data from the front of a voss Packet. The data is copied into the output buffer described by pData and pDataSize - + \param pPacket - the voss Packet to operate on. - - \param pData - pointer to the data buffer where the data removed from the + + \param pData - pointer to the data buffer where the data removed from the voss Packet is placed. - + \param dataSize - The amount of space to remove from the head of the voss Packet. The output buffer (at *pData) must contain at least this amount of space. - + \return - + \sa - + ----------------------------------------------------------------------------*/ VOS_STATUS vos_pkt_pop_head( vos_pkt_t *pPacket, v_VOID_t *pData, v_SIZE_t dataSize ); /**-------------------------------------------------------------------------- - - \brief vos_pkt_trim_head() - Skip over bytes at the front of a voss Packet - This API moves the pointers at the head of a voss Packet to essentially + \brief vos_pkt_trim_head() - Skip over bytes at the front of a voss Packet + + This API moves the pointers at the head of a voss Packet to essentially skip over data at the front of a voss Packet. Upon successful return, the - length of the voss Packet is reduced by dataSize and the starting pointer + length of the voss Packet is reduced by dataSize and the starting pointer to the voss Packet is adjusted to eliminate the data from the start of the - voss Packet. - + voss Packet. + This API has the opposite effect of \a vos_pkt_reserve_head(). - + \param pPacket - the voss Packet to operate on. - + \param dataSize - The amount of space to skip at the start of the voss Packet. - - Note that upon return, the data skipped over is + + Note that upon return, the data skipped over is inaccessible to the caller. If the caller needs access - to the head data, use vos_pkt_pop_head() or + to the head data, use vos_pkt_pop_head() or vos_pkt_extract_data() to get a copy of the data. - + \return - + \sa - + ----------------------------------------------------------------------------*/ VOS_STATUS vos_pkt_trim_head( vos_pkt_t *pPacket, v_SIZE_t dataSize ); /**-------------------------------------------------------------------------- - - \brief vos_pkt_push_tail() - push data on the end a of a voss Packet - This API will push data onto the end of a voss Packet. The data will be + \brief vos_pkt_push_tail() - push data on the end a of a voss Packet + + This API will push data onto the end of a voss Packet. The data will be appended to the end of any data already contained in the voss Packet. - + \param pPacket - the voss Packet to modify. - + \param pData - pointer to the data to push onto the tail of the voss Packet. - - \param dataSize - the size of the data to put onto the tail of the voss Packet. - + + \param dataSize - the size of the data to put onto the tail of the voss Packet. + \return - + \sa - - ----------------------------------------------------------------------------*/ + + ----------------------------------------------------------------------------*/ VOS_STATUS vos_pkt_push_tail( vos_pkt_t *pPacket, v_VOID_t *pData, v_SIZE_t dataSize ); /**-------------------------------------------------------------------------- - - \brief vos_pkt_reserve_tail() - Reserve space at the end of a voss Packet - This API will reserve space at the end of a voss Packet. The caller can - then copy data into this reserved space using memcpy() like functions. This + \brief vos_pkt_reserve_tail() - Reserve space at the end of a voss Packet + + This API will reserve space at the end of a voss Packet. The caller can + then copy data into this reserved space using memcpy() like functions. This allows the caller to reserve space and build headers directly in this reserved space in the voss Packet. - - Upon successful return, the length of the voss Packet is increased by + + Upon successful return, the length of the voss Packet is increased by dataSize. - + \param pPacket - the voss Packet to modify. - - \param ppData - pointer to the location where the pointer to the reserved - space is returned. Upon successful return, the caller has + + \param ppData - pointer to the location where the pointer to the reserved + space is returned. Upon successful return, the caller has write / read access to the data space at *ppData for length dataSize to build headers, etc. - - \param dataSize - the size of the data to reserve at the head of the voss + + \param dataSize - the size of the data to reserve at the head of the voss Packet. Upon successful return, the length of the voss - Packet is increased by dataSize. - + Packet is increased by dataSize. + \return - + \sa - + ----------------------------------------------------------------------------*/ -VOS_STATUS vos_pkt_reserve_tail( vos_pkt_t *pPacket, v_VOID_t **ppData, +VOS_STATUS vos_pkt_reserve_tail( vos_pkt_t *pPacket, v_VOID_t **ppData, v_SIZE_t dataSize ); /**-------------------------------------------------------------------------- - - \brief vos_pkt_pop_tail() - Remove data from the end of the voss Packet - This API removes data from the end of a voss Packet. The data is + \brief vos_pkt_pop_tail() - Remove data from the end of the voss Packet + + This API removes data from the end of a voss Packet. The data is copied into the output buffer described by pData and pDataSize - + \param pPacket - the voss Packet to operate on. - - \param pData - pointer to the data buffer where the data removed from the + + \param pData - pointer to the data buffer where the data removed from the voss Packet is placed. - + \param dataSize - The amount of space to remove from the end of the voss Packet. The output buffer (at *pData) must contain at least this amount of space. - + \return - + \sa - + ----------------------------------------------------------------------------*/ VOS_STATUS vos_pkt_pop_tail( vos_pkt_t *pPacket, v_VOID_t *pData, v_SIZE_t dataSize ); /**-------------------------------------------------------------------------- - - \brief vos_pkt_trim_tail() - Skip over bytes at the end of a voss Packet - This API moves the pointers at the head of a voss Packet to essentially + \brief vos_pkt_trim_tail() - Skip over bytes at the end of a voss Packet + + This API moves the pointers at the head of a voss Packet to essentially skip over data at the end of a voss Packet. Upon successful return, the - length of the voss Packet is reduced by dataSize and voss Packet is - adjusted to eliminate the data from the end of the voss Packet. - + length of the voss Packet is reduced by dataSize and voss Packet is + adjusted to eliminate the data from the end of the voss Packet. + This API has the opposite effect of \a vos_pkt_reserve_tail(). - + \param pPacket - the voss Packet to operate on. - + \param dataSize - The amount of space to remove at the end of the voss Packet. - - Note that upon return, the data skipped over is + + Note that upon return, the data skipped over is inaccessible to the caller. If the caller needs access - to the tail data, use vos_pkt_pop_tail() or + to the tail data, use vos_pkt_pop_tail() or vos_pkt_extract_data() to get a copy of the data. - + \return - + \sa - + ----------------------------------------------------------------------------*/ VOS_STATUS vos_pkt_trim_tail( vos_pkt_t *pPacket, v_SIZE_t dataSize ); /**-------------------------------------------------------------------------- - + \brief vos_pkt_get_timestamp() - Retrive the timestamp attribute from the specified VOSS packet - \param pPacket - the voss Packet to operate on. + \param pPacket - the voss Packet to operate on. + + \param pTstamp - the timestamp will be returned here. - \param pTstamp - the timestamp will be returned here. - \return VOS_STATUS_E_FAULT - invalid parameter(s) specified VOS_STATUS_SUCCESS - timestamp retrived successfully - + \sa - + ----------------------------------------------------------------------------*/ VOS_STATUS vos_pkt_get_timestamp( vos_pkt_t *pPacket, v_TIME_t* pTstamp ); /**-------------------------------------------------------------------------- - + \brief vos_pkt_flatten_rx_pkt() - Transform a platform based RX VOSS - packet into a flat buffer based VOSS packet if needed. This is needed in cases + packet into a flat buffer based VOSS packet if needed. This is needed in cases where for reasons of efficiency we want the RX packets to be very platform specific (for e.g. DSM based on AMSS, etc). However platform independent code may rely on making calls on the VOSS packet which can only be supported by the flat buffer - based implementation of a RX packet. This API will allocate a new VOSS packet - with flat buffer, extract the data from the input VOSS packet and then release + based implementation of a RX packet. This API will allocate a new VOSS packet + with flat buffer, extract the data from the input VOSS packet and then release the input VOSS packet. The new VOSS packet will be returned from this call. - + \param ppPacket - the voss Packet to operate on. on input contains the platform based packet. On output contains the flat buffer based packet. Any applicable resources are freed as part of this call. - + \return VOS_STATUS_E_FAULT - invalid parameter specified - VOS_STATUS_E_INVAL - packet type not RX_RAW + VOS_STATUS_E_INVAL - packet type not RX_RAW VOS_STATUS_SUCCESS - transform successful other VOSS status - other errors encountered - + \sa - + ----------------------------------------------------------------------------*/ VOS_STATUS vos_pkt_flatten_rx_pkt( vos_pkt_t **ppPacket ); /**-------------------------------------------------------------------------- - - \brief vos_pkt_set_rx_length() - Set the length of a received packet + + \brief vos_pkt_set_rx_length() - Set the length of a received packet This API set the length of the data inside the packet after a DMA has occurred on rx, it will also set the tail pointer to the end of the data. @@ -1183,11 +1183,11 @@ VOS_STATUS vos_pkt_flatten_rx_pkt( vos_pkt_t **ppPacket ); VOS_STATUS vos_pkt_set_rx_length( vos_pkt_t *pPacket, v_SIZE_t pktLen ); /**-------------------------------------------------------------------------- - + \brief vos_pkt_get_available_buffer_pool() - Get avaliable VOS packet size VOSS Packet pool is limitted resource VOSS Client need to know how many packet pool is still avaliable to control the flow - + \param pktType - Packet type want to know free buffer count VOS_PKT_TYPE_TX_802_11_MGMT, management free buffer count, VOS_PKT_TYPE_TX_802_11_DATA @@ -1195,13 +1195,13 @@ VOS_STATUS vos_pkt_set_rx_length( vos_pkt_t *pPacket, v_SIZE_t pktLen ); VOS_PKT_TYPE_RX_RAW, RX free buffer count vosFreeBuffer - free frame buffer size - + \return VOS_STATUS_E_INVAL - invalid input parameter VOS_STATUS_SUCCESS - Get size success - + \sa - + ----------------------------------------------------------------------------*/ VOS_STATUS vos_pkt_get_available_buffer_pool ( diff --git a/CORE/VOSS/inc/vos_power.h b/CORE/VOSS/inc/vos_power.h index fc0278097233..8b620b1a6d50 100644 --- a/CORE/VOSS/inc/vos_power.h +++ b/CORE/VOSS/inc/vos_power.h @@ -33,8 +33,8 @@ vos_power.h @brief - This is the interface to VOSS power APIs using for power management - of the WLAN Libra module from the MSM PMIC. These implementation of + This is the interface to VOSS power APIs using for power management + of the WLAN Libra module from the MSM PMIC. These implementation of these APIs is very target dependent, also these APIs should only be used when the WLAN Libra module is powered from the MSM PMIC and not from an external independent power source @@ -79,13 +79,13 @@ typedef enum typedef enum { VOS_CALL_SYNC, /* operation is synchronous */ - VOS_CALL_ASYNC /* operation is asynchronous */ + VOS_CALL_ASYNC /* operation is asynchronous */ } vos_call_status_type; typedef v_VOID_t (*vos_power_cb_type) ( - v_PVOID_t user_data, /* user cookie */ + v_PVOID_t user_data, /* user cookie */ VOS_STATUS result /* result of operation: VOS_STATUS_SUCCESS for success VOS_STATUS_E_FAILURE for failure */ @@ -101,8 +101,8 @@ typedef v_VOID_t (*vos_power_cb_type) @brief vos_chipPowerUp() - This API will power up the Libra chip This operation may be asynchronous. If so, the supplied callback will - be invoked when operation is complete with the result. The callback will - be called with the user supplied data. If the operation is known to be + be invoked when operation is complete with the result. The callback will + be called with the user supplied data. If the operation is known to be sync, there is no need to supply a callback and user data. The Libra SDIO core will have been initialized if the operation completes @@ -112,14 +112,14 @@ typedef v_VOID_t (*vos_power_cb_type) @param callback [in] : user supplied callback invoked when operation completes @param user_data [in] : user supplied context callback is called with - @return - VOS_STATUS_E_INVAL - status is NULL - VOS_STATUS_E_FAULT - the operation needs to complete async and a callback + @return + VOS_STATUS_E_INVAL - status is NULL + VOS_STATUS_E_FAULT - the operation needs to complete async and a callback and user_data has not been specified (status will be - set to VOS_CALL_ASYNC) + set to VOS_CALL_ASYNC) VOS_STATUS_E_ALREADY - operation needs to complete async but another request - is already in progress (status will be set to VOS_CALL_ASYNC) - VOS_STATUS_E_FAILURE - operation failed (status will be set appropriately) + is already in progress (status will be set to VOS_CALL_ASYNC) + VOS_STATUS_E_FAILURE - operation failed (status will be set appropriately) VOS_STATUS_SUCCESS - operation completed successfully if status is SYNC (will be set) OR operation started successfully if status is ASYNC (will be set) @@ -135,22 +135,22 @@ VOS_STATUS vos_chipPowerUp @brief vos_chipPowerDown() - This API will power down the Libra chip This operation may be asynchronous. If so, the supplied callback will - be invoked when operation is complete with the result. The callback will - be called with the user supplied data. If the operation is known to be + be invoked when operation is complete with the result. The callback will + be called with the user supplied data. If the operation is known to be sync, there is no need to supply a callback and user data. @param status [out] : whether this operation will complete sync or async @param callback [in] : user supplied callback invoked when operation completes @param user_data [in] : user supplied context callback is called with - @return - VOS_STATUS_E_INVAL - status is NULL - VOS_STATUS_E_FAULT - the operation needs to complete async and a callback + @return + VOS_STATUS_E_INVAL - status is NULL + VOS_STATUS_E_FAULT - the operation needs to complete async and a callback and user_data has not been specified (status will be - set to VOS_CALL_ASYNC) + set to VOS_CALL_ASYNC) VOS_STATUS_E_ALREADY - operation needs to complete async but another request - is already in progress (status will be set to VOS_CALL_ASYNC) - VOS_STATUS_E_FAILURE - operation failed (status will be set appropriately) + is already in progress (status will be set to VOS_CALL_ASYNC) + VOS_STATUS_E_FAILURE - operation failed (status will be set appropriately) VOS_STATUS_SUCCESS - operation completed successfully if status is SYNC (will be set) OR operation started successfully if status is ASYNC (will be set) @@ -166,8 +166,8 @@ VOS_STATUS vos_chipPowerDown @brief vos_chipReset() - This API will reset the Libra chip This operation may be asynchronous. If so, the supplied callback will - be invoked when operation is complete with the result. The callback will - be called with the user supplied data. If the operation is known to be + be invoked when operation is complete with the result. The callback will + be called with the user supplied data. If the operation is known to be sync, there is no need to supply a callback and user data. A hard reset will involve a powerDown followed by a PowerUp; a soft reset @@ -177,20 +177,20 @@ VOS_STATUS vos_chipPowerDown successfully @param status [out] : whether this operation will complete sync or async - @param soft [in] : VOS_TRUE if a soft reset is desired + @param soft [in] : VOS_TRUE if a soft reset is desired VOS_FALSE for a hard reset i.e. powerDown followed by powerUp @param callback [in] : user supplied callback invoked when operation completes @param user_data [in] : user supplied context callback is called with - @return - VOS_STATUS_E_INVAL - status is NULL + @return + VOS_STATUS_E_INVAL - status is NULL VOS_STATUS_E_NOSUPPORT - soft reset asked for but not supported - VOS_STATUS_E_FAULT - the operation needs to complete async and a callback + VOS_STATUS_E_FAULT - the operation needs to complete async and a callback and user_data has not been specified (status will be - set to VOS_CALL_ASYNC) + set to VOS_CALL_ASYNC) VOS_STATUS_E_ALREADY - operation needs to complete async but another request - is already in progress (status will be set to VOS_CALL_ASYNC) - VOS_STATUS_E_FAILURE - operation failed (status will be set appropriately) + is already in progress (status will be set to VOS_CALL_ASYNC) + VOS_STATUS_E_FAILURE - operation failed (status will be set appropriately) VOS_STATUS_SUCCESS - operation completed successfully if status is SYNC (will be set) OR operation started successfully if status is ASYNC (will be set) @@ -208,22 +208,22 @@ VOS_STATUS vos_chipReset @brief vos_chipVoteOnPASupply() - This API will power up the PA supply This operation may be asynchronous. If so, the supplied callback will - be invoked when operation is complete with the result. The callback will - be called with the user supplied data. If the operation is known to be + be invoked when operation is complete with the result. The callback will + be called with the user supplied data. If the operation is known to be sync, there is no need to supply a callback and user data. @param status [out] : whether this operation will complete sync or async @param callback [in] : user supplied callback invoked when operation completes @param user_data [in] : user supplied context callback is called with - @return - VOS_STATUS_E_INVAL - status is NULL - VOS_STATUS_E_FAULT - the operation needs to complete async and a callback + @return + VOS_STATUS_E_INVAL - status is NULL + VOS_STATUS_E_FAULT - the operation needs to complete async and a callback and user_data has not been specified (status will be - set to VOS_CALL_ASYNC) + set to VOS_CALL_ASYNC) VOS_STATUS_E_ALREADY - operation needs to complete async but another request - is already in progress (status will be set to VOS_CALL_ASYNC) - VOS_STATUS_E_FAILURE - operation failed (status will be set appropriately) + is already in progress (status will be set to VOS_CALL_ASYNC) + VOS_STATUS_E_FAILURE - operation failed (status will be set appropriately) VOS_STATUS_SUCCESS - operation completed successfully if status is SYNC (will be set) OR operation started successfully if status is ASYNC (will be set) @@ -236,28 +236,28 @@ VOS_STATUS vos_chipVoteOnPASupply ); /** - @brief vos_chipVoteOffPASupply() - This API will vote to turn off the - PA supply. Even if we succeed in voting, there is a chance PA supply will not + @brief vos_chipVoteOffPASupply() - This API will vote to turn off the + PA supply. Even if we succeed in voting, there is a chance PA supply will not be turned off. This will be treated the same as a failure. This operation may be asynchronous. If so, the supplied callback will - be invoked when operation is complete with the result. The callback will - be called with the user supplied data. If the operation is known to be + be invoked when operation is complete with the result. The callback will + be called with the user supplied data. If the operation is known to be sync, there is no need to supply a callback and user data. @param status [out] : whether this operation will complete sync or async @param callback [in] : user supplied callback invoked when operation completes @param user_data [in] : user supplied context callback is called with - @return - VOS_STATUS_E_INVAL - status is NULL - VOS_STATUS_E_FAULT - the operation needs to complete async and a callback + @return + VOS_STATUS_E_INVAL - status is NULL + VOS_STATUS_E_FAULT - the operation needs to complete async and a callback and user_data has not been specified (status will be - set to VOS_CALL_ASYNC) + set to VOS_CALL_ASYNC) VOS_STATUS_E_ALREADY - operation needs to complete async but another request - is already in progress (status will be set to VOS_CALL_ASYNC) - VOS_STATUS_E_FAILURE - operation failed (status will be set appropriately) could be - because the voting algorithm decided not to power down PA + is already in progress (status will be set to VOS_CALL_ASYNC) + VOS_STATUS_E_FAILURE - operation failed (status will be set appropriately) could be + because the voting algorithm decided not to power down PA VOS_STATUS_SUCCESS - operation completed successfully if status is SYNC (will be set) OR operation started successfully if status is ASYNC (will be set) @@ -270,26 +270,26 @@ VOS_STATUS vos_chipVoteOffPASupply ); /** - @brief vos_chipAssertDeepSleep() - This API will assert the deep + @brief vos_chipAssertDeepSleep() - This API will assert the deep sleep signal to Libra This operation may be asynchronous. If so, the supplied callback will - be invoked when operation is complete with the result. The callback will - be called with the user supplied data. If the operation is known to be + be invoked when operation is complete with the result. The callback will + be called with the user supplied data. If the operation is known to be sync, there is no need to supply a callback and user data. @param status [out] : whether this operation will complete sync or async @param callback [in] : user supplied callback invoked when operation completes @param user_data [in] : user supplied context callback is called with - @return - VOS_STATUS_E_INVAL - status is NULL - VOS_STATUS_E_FAULT - the operation needs to complete async and a callback + @return + VOS_STATUS_E_INVAL - status is NULL + VOS_STATUS_E_FAULT - the operation needs to complete async and a callback and user_data has not been specified (status will be - set to VOS_CALL_ASYNC) + set to VOS_CALL_ASYNC) VOS_STATUS_E_ALREADY - operation needs to complete async but another request - is already in progress (status will be set to VOS_CALL_ASYNC) - VOS_STATUS_E_FAILURE - operation failed (status will be set appropriately) + is already in progress (status will be set to VOS_CALL_ASYNC) + VOS_STATUS_E_FAILURE - operation failed (status will be set appropriately) VOS_STATUS_SUCCESS - operation completed successfully if status is SYNC (will be set) OR operation started successfully if status is ASYNC (will be set) @@ -306,22 +306,22 @@ VOS_STATUS vos_chipAssertDeepSleep signal to Libra This operation may be asynchronous. If so, the supplied callback will - be invoked when operation is complete with the result. The callback will - be called with the user supplied data. If the operation is known to be + be invoked when operation is complete with the result. The callback will + be called with the user supplied data. If the operation is known to be sync, there is no need to supply a callback and user data. @param status [out] : whether this operation will complete sync or async @param callback [in] : user supplied callback invoked when operation completes @param user_data [in] : user supplied context callback is called with - @return - VOS_STATUS_E_INVAL - status is NULL - VOS_STATUS_E_FAULT - the operation needs to complete async and a callback + @return + VOS_STATUS_E_INVAL - status is NULL + VOS_STATUS_E_FAULT - the operation needs to complete async and a callback and user_data has not been specified (status will be - set to VOS_CALL_ASYNC) + set to VOS_CALL_ASYNC) VOS_STATUS_E_ALREADY - operation needs to complete async but another request - is already in progress (status will be set to VOS_CALL_ASYNC) - VOS_STATUS_E_FAILURE - operation failed (status will be set appropriately) + is already in progress (status will be set to VOS_CALL_ASYNC) + VOS_STATUS_E_FAILURE - operation failed (status will be set appropriately) VOS_STATUS_SUCCESS - operation completed successfully if status is SYNC (will be set) OR operation started successfully if status is ASYNC (will be set) @@ -337,22 +337,22 @@ VOS_STATUS vos_chipDeAssertDeepSleep @brief vos_chipVoteOnRFSupply() - This API will power up the RF supply This operation may be asynchronous. If so, the supplied callback will - be invoked when operation is complete with the result. The callback will - be called with the user supplied data. If the operation is known to be + be invoked when operation is complete with the result. The callback will + be called with the user supplied data. If the operation is known to be sync, there is no need to supply a callback and user data. @param status [out] : whether this operation will complete sync or async @param callback [in] : user supplied callback invoked when operation completes @param user_data [in] : user supplied context callback is called with - @return - VOS_STATUS_E_INVAL - status is NULL - VOS_STATUS_E_FAULT - the operation needs to complete async and a callback + @return + VOS_STATUS_E_INVAL - status is NULL + VOS_STATUS_E_FAULT - the operation needs to complete async and a callback and user_data has not been specified (status will be - set to VOS_CALL_ASYNC) + set to VOS_CALL_ASYNC) VOS_STATUS_E_ALREADY - operation needs to complete async but another request - is already in progress (status will be set to VOS_CALL_ASYNC) - VOS_STATUS_E_FAILURE - operation failed (status will be set appropriately) + is already in progress (status will be set to VOS_CALL_ASYNC) + VOS_STATUS_E_FAILURE - operation failed (status will be set appropriately) VOS_STATUS_SUCCESS - operation completed successfully if status is SYNC (will be set) OR operation started successfully if status is ASYNC (will be set) @@ -365,28 +365,28 @@ VOS_STATUS vos_chipVoteOnRFSupply ); /** - @brief vos_chipVoteOffRFSupply() - This API will vote to turn off the - RF supply. Even if we succeed in voting, there is a chance RF supply will not + @brief vos_chipVoteOffRFSupply() - This API will vote to turn off the + RF supply. Even if we succeed in voting, there is a chance RF supply will not be turned off as RF rails could be shared with other modules (outside WLAN) This operation may be asynchronous. If so, the supplied callback will - be invoked when operation is complete with the result. The callback will - be called with the user supplied data. If the operation is known to be + be invoked when operation is complete with the result. The callback will + be called with the user supplied data. If the operation is known to be sync, there is no need to supply a callback and user data. @param status [out] : whether this operation will complete sync or async @param callback [in] : user supplied callback invoked when operation completes @param user_data [in] : user supplied context callback is called with - @return - VOS_STATUS_E_INVAL - status is NULL - VOS_STATUS_E_FAULT - the operation needs to complete async and a callback + @return + VOS_STATUS_E_INVAL - status is NULL + VOS_STATUS_E_FAULT - the operation needs to complete async and a callback and user_data has not been specified (status will be - set to VOS_CALL_ASYNC) + set to VOS_CALL_ASYNC) VOS_STATUS_E_ALREADY - operation needs to complete async but another request - is already in progress (status will be set to VOS_CALL_ASYNC) - VOS_STATUS_E_FAILURE - operation failed (status will be set appropriately) could be - because the voting algorithm decided not to power down PA + is already in progress (status will be set to VOS_CALL_ASYNC) + VOS_STATUS_E_FAILURE - operation failed (status will be set appropriately) could be + because the voting algorithm decided not to power down PA VOS_STATUS_SUCCESS - operation completed successfully if status is SYNC (will be set) OR operation started successfully if status is ASYNC (will be set) @@ -402,22 +402,22 @@ VOS_STATUS vos_chipVoteOffRFSupply used by Base band Analog. This operation may be asynchronous. If so, the supplied callback will - be invoked when operation is complete with the result. The callback will - be called with the user supplied data. If the operation is known to be + be invoked when operation is complete with the result. The callback will + be called with the user supplied data. If the operation is known to be sync, there is no need to supply a callback and user data. @param status [out] : whether this operation will complete sync or async @param callback [in] : user supplied callback invoked when operation completes @param user_data [in] : user supplied context callback is called with - @return - VOS_STATUS_E_INVAL - status is NULL - VOS_STATUS_E_FAULT - the operation needs to complete async and a callback + @return + VOS_STATUS_E_INVAL - status is NULL + VOS_STATUS_E_FAULT - the operation needs to complete async and a callback and user_data has not been specified (status will be - set to VOS_CALL_ASYNC) + set to VOS_CALL_ASYNC) VOS_STATUS_E_ALREADY - operation needs to complete async but another request - is already in progress (status will be set to VOS_CALL_ASYNC) - VOS_STATUS_E_FAILURE - operation failed (status will be set appropriately) + is already in progress (status will be set to VOS_CALL_ASYNC) + VOS_STATUS_E_FAILURE - operation failed (status will be set appropriately) VOS_STATUS_SUCCESS - operation completed successfully if status is SYNC (will be set) OR operation started successfully if status is ASYNC (will be set) @@ -433,23 +433,23 @@ VOS_STATUS vos_chipVoteOnBBAnalogSupply @brief vos_chipVoteOffBBAnalogSupply() - This API will vote off the BB Analog supply. This operation may be asynchronous. If so, the supplied callback will - be invoked when operation is complete with the result. The callback will - be called with the user supplied data. If the operation is known to be + be invoked when operation is complete with the result. The callback will + be called with the user supplied data. If the operation is known to be sync, there is no need to supply a callback and user data. @param status [out] : whether this operation will complete sync or async @param callback [in] : user supplied callback invoked when operation completes @param user_data [in] : user supplied context callback is called with - @return - VOS_STATUS_E_INVAL - status is NULL - VOS_STATUS_E_FAULT - the operation needs to complete async and a callback + @return + VOS_STATUS_E_INVAL - status is NULL + VOS_STATUS_E_FAULT - the operation needs to complete async and a callback and user_data has not been specified (status will be - set to VOS_CALL_ASYNC) + set to VOS_CALL_ASYNC) VOS_STATUS_E_ALREADY - operation needs to complete async but another request - is already in progress (status will be set to VOS_CALL_ASYNC) - VOS_STATUS_E_FAILURE - operation failed (status will be set appropriately) could be - because the voting algorithm decided not to power down PA + is already in progress (status will be set to VOS_CALL_ASYNC) + VOS_STATUS_E_FAILURE - operation failed (status will be set appropriately) could be + because the voting algorithm decided not to power down PA VOS_STATUS_SUCCESS - operation completed successfully if status is SYNC (will be set) OR operation started successfully if status is ASYNC (will be set) @@ -465,22 +465,22 @@ VOS_STATUS vos_chipVoteOffBBAnalogSupply PMIC. This API will be used when Libra uses the TCXO from PMIC on the MSM This operation may be asynchronous. If so, the supplied callback will - be invoked when operation is complete with the result. The callback will - be called with the user supplied data. If the operation is known to be + be invoked when operation is complete with the result. The callback will + be called with the user supplied data. If the operation is known to be sync, there is no need to supply a callback and user data. @param status [out] : whether this operation will complete sync or async @param callback [in] : user supplied callback invoked when operation completes @param user_data [in] : user supplied context callback is called with - @return - VOS_STATUS_E_INVAL - status is NULL - VOS_STATUS_E_FAULT - the operation needs to complete async and a callback + @return + VOS_STATUS_E_INVAL - status is NULL + VOS_STATUS_E_FAULT - the operation needs to complete async and a callback and user_data has not been specified (status will be - set to VOS_CALL_ASYNC) + set to VOS_CALL_ASYNC) VOS_STATUS_E_ALREADY - operation needs to complete async but another request - is already in progress (status will be set to VOS_CALL_ASYNC) - VOS_STATUS_E_FAILURE - operation failed (status will be set appropriately) + is already in progress (status will be set to VOS_CALL_ASYNC) + VOS_STATUS_E_FAILURE - operation failed (status will be set appropriately) VOS_STATUS_SUCCESS - operation completed successfully if status is SYNC (will be set) OR operation started successfully if status is ASYNC (will be set) @@ -496,23 +496,23 @@ VOS_STATUS vos_chipVoteOnXOBuffer @brief vos_chipVoteOffXOBuffer() - This API will vote off PMIC XO buffer. This operation may be asynchronous. If so, the supplied callback will - be invoked when operation is complete with the result. The callback will - be called with the user supplied data. If the operation is known to be + be invoked when operation is complete with the result. The callback will + be called with the user supplied data. If the operation is known to be sync, there is no need to supply a callback and user data. @param status [out] : whether this operation will complete sync or async @param callback [in] : user supplied callback invoked when operation completes @param user_data [in] : user supplied context callback is called with - @return - VOS_STATUS_E_INVAL - status is NULL - VOS_STATUS_E_FAULT - the operation needs to complete async and a callback + @return + VOS_STATUS_E_INVAL - status is NULL + VOS_STATUS_E_FAULT - the operation needs to complete async and a callback and user_data has not been specified (status will be - set to VOS_CALL_ASYNC) + set to VOS_CALL_ASYNC) VOS_STATUS_E_ALREADY - operation needs to complete async but another request - is already in progress (status will be set to VOS_CALL_ASYNC) - VOS_STATUS_E_FAILURE - operation failed (status will be set appropriately) could be - because the voting algorithm decided not to power down PA + is already in progress (status will be set to VOS_CALL_ASYNC) + VOS_STATUS_E_FAILURE - operation failed (status will be set appropriately) could be + because the voting algorithm decided not to power down PA VOS_STATUS_SUCCESS - operation completed successfully if status is SYNC (will be set) OR operation started successfully if status is ASYNC (will be set) @@ -528,8 +528,8 @@ VOS_STATUS vos_chipVoteOffXOBuffer @brief vos_chipVoteXOCore() - This API will FORCE vote ON PMIC XO CORE. This operation may be asynchronous. If so, the supplied callback will - be invoked when operation is complete with the result. The callback will - be called with the user supplied data. If the operation is known to be + be invoked when operation is complete with the result. The callback will + be called with the user supplied data. If the operation is known to be sync, there is no need to supply a callback and user data. @param status [out] : whether this operation will complete sync or async @@ -537,15 +537,15 @@ VOS_STATUS vos_chipVoteOffXOBuffer @param user_data [in] : user supplied context callback is called with @param force_enable[in] : user supplied input for turning ON/OFF Xo Core - @return - VOS_STATUS_E_INVAL - status is NULL - VOS_STATUS_E_FAULT - the operation needs to complete async and a callback + @return + VOS_STATUS_E_INVAL - status is NULL + VOS_STATUS_E_FAULT - the operation needs to complete async and a callback and user_data has not been specified (status will be - set to VOS_CALL_ASYNC) + set to VOS_CALL_ASYNC) VOS_STATUS_E_ALREADY - operation needs to complete async but another request - is already in progress (status will be set to VOS_CALL_ASYNC) - VOS_STATUS_E_FAILURE - operation failed (status will be set appropriately) could be - because the voting algorithm decided not to power down PA + is already in progress (status will be set to VOS_CALL_ASYNC) + VOS_STATUS_E_FAILURE - operation failed (status will be set appropriately) could be + because the voting algorithm decided not to power down PA VOS_STATUS_SUCCESS - operation completed successfully if status is SYNC (will be set) OR operation started successfully if status is ASYNC (will be set) @@ -561,30 +561,30 @@ VOS_STATUS vos_chipVoteXOCore /** @brief vos_chipVoteFreqFor1p3VSupply() - This API will vote for frequency for 1.3V RF supply. - + This operation may be asynchronous. If so, the supplied callback will - be invoked when operation is complete with the result. The callback will - be called with the user supplied data. If the operation is known to be + be invoked when operation is complete with the result. The callback will + be called with the user supplied data. If the operation is known to be sync, there is no need to supply a callback and user data. EVM issue is observed with 1.6Mhz freq for 1.3V supply in wlan standalone case. - During concurrent operation (e.g. WLAN and WCDMA) this issue is not observed. + During concurrent operation (e.g. WLAN and WCDMA) this issue is not observed. To workaround, wlan will vote for 3.2Mhz during startup and will vote for 1.6Mhz during exit. - + @param status [out] : whether this operation will complete sync or async @param callback [in] : user supplied callback invoked when operation completes @param user_data [in] : user supplied context callback is called with @param freq [in] : Frequency for 1.3V Supply for which WLAN driver needs to vote for. - @return - VOS_STATUS_E_INVAL - status is NULL - VOS_STATUS_E_FAULT - the operation needs to complete async and a callback + @return + VOS_STATUS_E_INVAL - status is NULL + VOS_STATUS_E_FAULT - the operation needs to complete async and a callback and user_data has not been specified (status will be - set to VOS_CALL_ASYNC) + set to VOS_CALL_ASYNC) VOS_STATUS_E_ALREADY - operation needs to complete async but another request - is already in progress (status will be set to VOS_CALL_ASYNC) - VOS_STATUS_E_FAILURE - operation failed (status will be set appropriately) could be - because the voting algorithm decided not to power down PA + is already in progress (status will be set to VOS_CALL_ASYNC) + VOS_STATUS_E_FAILURE - operation failed (status will be set appropriately) could be + because the voting algorithm decided not to power down PA VOS_STATUS_SUCCESS - operation completed successfully if status is SYNC (will be set) OR operation started successfully if status is ASYNC (will be set) diff --git a/CORE/VOSS/inc/vos_status.h b/CORE/VOSS/inc/vos_status.h index 754c61efd516..663d626fb151 100644 --- a/CORE/VOSS/inc/vos_status.h +++ b/CORE/VOSS/inc/vos_status.h @@ -29,13 +29,13 @@ #define __VOS_STATUS_H /**========================================================================= - + \file vos_Status.h - + \brief virtual Operating System Services (vOSS) Status codes - + Basic status codes/definitions used by vOSS - + ========================================================================*/ /* $Header$ */ @@ -44,12 +44,12 @@ Include Files ------------------------------------------------------------------------*/ -/*-------------------------------------------------------------------------- +/*-------------------------------------------------------------------------- Preprocessor definitions and constants ------------------------------------------------------------------------*/ -/*-------------------------------------------------------------------------- +/*-------------------------------------------------------------------------- Type declarations ------------------------------------------------------------------------*/ @@ -57,36 +57,36 @@ typedef enum { /// Request succeeded! VOS_STATUS_SUCCESS, - - /// Request failed because system resources (other than memory) to - /// fulfill request are not available. + + /// Request failed because system resources (other than memory) to + /// fulfill request are not available. VOS_STATUS_E_RESOURCES, - - /// Request failed because not enough memory is available to + + /// Request failed because not enough memory is available to /// fulfill the request. - VOS_STATUS_E_NOMEM, - + VOS_STATUS_E_NOMEM, + /// Request could not be fulfilled at this time. Try again later. VOS_STATUS_E_AGAIN, - - /// Request failed because there of an invalid request. This is + + /// Request failed because there of an invalid request. This is /// typically the result of invalid parameters on the request. VOS_STATUS_E_INVAL, - - /// Request failed because handling the request would cause a - /// system fault. This error is typically returned when an + + /// Request failed because handling the request would cause a + /// system fault. This error is typically returned when an /// invalid pointer to memory is detected. VOS_STATUS_E_FAULT, - /// Request refused becayse a request is already in progress and + /// Request refused becayse a request is already in progress and /// another cannot be handled currently. VOS_STATUS_E_ALREADY, - + /// Request failed because the message (type) is bad, invalid, or /// not properly formatted. VOS_STATUS_E_BADMSG, - /// Request failed because device or resource is busy. + /// Request failed because device or resource is busy. VOS_STATUS_E_BUSY, /// Request did not complete because it was canceled. @@ -94,33 +94,33 @@ typedef enum /// Request did not complete because it was aborted. VOS_STATUS_E_ABORTED, - + /// Request failed because the request is valid, though not supported /// by the entity processing the request. VOS_STATUS_E_NOSUPPORT, - + /// Operation is not permitted. VOS_STATUS_E_PERM, - + /// Request failed because of an empty condition VOS_STATUS_E_EMPTY, - + /// Existance failure. Operation could not be completed because - /// something exists or does not exist. + /// something exists or does not exist. VOS_STATUS_E_EXISTS, - + /// Operation timed out VOS_STATUS_E_TIMEOUT, - + /// Request failed for some unknown reason. Note don't use this /// status unless nothing else applies - VOS_STATUS_E_FAILURE + VOS_STATUS_E_FAILURE } VOS_STATUS; /// Macro to determine if a VOS_STATUS type is success. All callers -/// wanting to interpret VOS_STATUS should use this macro to check -/// for success to protect against the VOS_STATUS definitions +/// wanting to interpret VOS_STATUS should use this macro to check +/// for success to protect against the VOS_STATUS definitions /// changing. /// /// Use like this... diff --git a/CORE/VOSS/inc/vos_threads.h b/CORE/VOSS/inc/vos_threads.h index b0974ca43d2d..613152e1d0b3 100644 --- a/CORE/VOSS/inc/vos_threads.h +++ b/CORE/VOSS/inc/vos_threads.h @@ -29,11 +29,11 @@ #define __VOS_THREADS_H /**========================================================================= - + \file vos_threads.h - + \brief virtual Operating System Services (vOSS) Threading APIs - + ========================================================================*/ /* $Header$ */ @@ -43,69 +43,69 @@ ------------------------------------------------------------------------*/ #include <vos_types.h> -/*-------------------------------------------------------------------------- +/*-------------------------------------------------------------------------- Preprocessor definitions and constants ------------------------------------------------------------------------*/ -/*-------------------------------------------------------------------------- +/*-------------------------------------------------------------------------- Type declarations ------------------------------------------------------------------------*/ -/*------------------------------------------------------------------------- +/*------------------------------------------------------------------------- Function declarations and documenation ------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------- - + \brief vos_sleep() - sleep The \a vos_sleep() function suspends the execution of the current thread until the specified time out interval elapses. - + \param msInterval - the number of milliseconds to suspend the current thread. A value of 0 may or may not cause the current thread to yield. - + \return Nothing. - + \sa - + --------------------------------------------------------------------------*/ v_VOID_t vos_sleep( v_U32_t msInterval ); /*---------------------------------------------------------------------------- - + \brief vos_sleep_us() - sleep The \a vos_sleep_us() function suspends the execution of the current thread until the specified time out interval elapses. - + \param usInterval - the number of microseconds to suspend the current thread. A value of 0 may or may not cause the current thread to yield. - + \return Nothing. - + \sa - + --------------------------------------------------------------------------*/ v_VOID_t vos_sleep_us( v_U32_t usInterval ); /*---------------------------------------------------------------------------- - + \brief vos_busy_wait() - busy wait The \a vos_busy_wait() function places the current thread in busy wait until the specified time out interval elapses. If the interval is greater than 50us on WM, the behaviour is undefined. - - \param usInterval - the number of microseconds to busy wait. - + + \param usInterval - the number of microseconds to busy wait. + \return Nothing. - + \sa - + --------------------------------------------------------------------------*/ v_VOID_t vos_busy_wait( v_U32_t usInterval ); diff --git a/CORE/VOSS/inc/vos_timer.h b/CORE/VOSS/inc/vos_timer.h index ed8ee58526f8..98ee433f998b 100644 --- a/CORE/VOSS/inc/vos_timer.h +++ b/CORE/VOSS/inc/vos_timer.h @@ -29,13 +29,13 @@ #define __VOS_TIMER_H /**========================================================================= - + \file vos_timer.h - + \brief virtual Operating System Servies (vOS) - + Definitions for vOSS Timer services - + ========================================================================*/ /* $Header$ */ @@ -52,15 +52,15 @@ #include "wlan_hdd_dp_utils.h" #endif -/*-------------------------------------------------------------------------- +/*-------------------------------------------------------------------------- Preprocessor definitions and constants ------------------------------------------------------------------------*/ #define VOS_TIMER_STATE_COOKIE 0x12 -/*-------------------------------------------------------------------------- +/*-------------------------------------------------------------------------- Type declarations ------------------------------------------------------------------------*/ -/// vos Timer callback function prototype (well, actually a prototype for +/// vos Timer callback function prototype (well, actually a prototype for /// a pointer to this callback function) typedef v_VOID_t ( *vos_timer_callback_t )( v_PVOID_t userData ); @@ -69,7 +69,7 @@ typedef enum /// pure software timer. No guarantee the apps processor will /// awaken when these timers expire. VOS_TIMER_TYPE_SW, - + /// These timers can awaken the Apps processor from power collapse /// when these timers expire. /// \todo I really dont like this name :-) @@ -110,7 +110,7 @@ typedef struct vos_timer_s VOS_TIMER_STATE state; } vos_timer_t; -/*------------------------------------------------------------------------- +/*------------------------------------------------------------------------- Function declarations and documenation ------------------------------------------------------------------------*/ #ifdef TIMER_MANAGER @@ -119,44 +119,44 @@ void vos_timer_exit(void); #endif /*--------------------------------------------------------------------------- - + \brief vos_timer_getCurrentState() - Get the current state of the timer \param pTimer - the timer object - + \return timer state - + \sa - + ---------------------------------------------------------------------------*/ VOS_TIMER_STATE vos_timer_getCurrentState( vos_timer_t *pTimer ); /*-------------------------------------------------------------------------- - + \brief vos_timer_init() - Initialize a vOSS timer. - This API initializes a vOS Timer object. - - The \a vos_timer_init() initializes a vOS Timer object. A timer must be - initialized by calling vos_timer_initialize() before it may be used in - any other timer functions. - - Attempting to initialize timer that is already initialized results in + This API initializes a vOS Timer object. + + The \a vos_timer_init() initializes a vOS Timer object. A timer must be + initialized by calling vos_timer_initialize() before it may be used in + any other timer functions. + + Attempting to initialize timer that is already initialized results in a failure. A destroyed timer object can be re-initialized with a call to - \a vos_timer_init(). The results of otherwise referencing the object - after it has been destroyed are undefined. - + \a vos_timer_init(). The results of otherwise referencing the object + after it has been destroyed are undefined. + Calls to vOSS timer functions to manipulate the timer such as vos_timer_set() will fail if the timer is not initialized or has - been destroyed. Therefore, don't use the timer after it has been + been destroyed. Therefore, don't use the timer after it has been destroyed until it has been re-initialized. - - All callback will be executed within the VOS main thread unless it is + + All callback will be executed within the VOS main thread unless it is initialized from the Tx thread flow, in which case it will be executed within the tx thread flow. - + \param timer - pointer to the opaque timer object to initialize - + \param timerType - specifies the type of timer. We have two different timer types. <ol> @@ -164,166 +164,166 @@ VOS_TIMER_STATE vos_timer_getCurrentState( vos_timer_t *pTimer ); may not be awoken when this timer expires. <li> VOS_TIMER_TYPE_WAKE_APPS - The Apps processor will be awoken from power collapse when this type of timer expires. - </ol> - + </ol> + \param callback - the callback function to be called when the timer expires. - - \param userData - a user data (or context) that is returned to the - callback function as a parameter when the timer expires. - - \return VOS_STATUS_SUCCESS - timer was successfully initialized and + + \param userData - a user data (or context) that is returned to the + callback function as a parameter when the timer expires. + + \return VOS_STATUS_SUCCESS - timer was successfully initialized and is ready to be used. - - VOS_STATUS_E_RESOURCES - System resources (other than memory) + + VOS_STATUS_E_RESOURCES - System resources (other than memory) are unavailable to initialize the timer - VOS_STATUS_E_NOMEM - insufficient memory exists to initialize + VOS_STATUS_E_NOMEM - insufficient memory exists to initialize the timer - VOS_STATUS_E_BUSY - The implementation has detected an attempt - to initialize the object referenced by timer, a previously + VOS_STATUS_E_BUSY - The implementation has detected an attempt + to initialize the object referenced by timer, a previously initialized but not yet destroyed timer. - VOS_STATUS_E_FAULT - timer is an invalid pointer. + VOS_STATUS_E_FAULT - timer is an invalid pointer. \sa - + ---------------------------------------------------------------------------*/ #ifdef TIMER_MANAGER #define vos_timer_init(timer, timerType, callback, userdata) \ vos_timer_init_debug(timer, timerType, callback, userdata, __FILE__, __LINE__) - -VOS_STATUS vos_timer_init_debug( vos_timer_t *timer, VOS_TIMER_TYPE timerType, - vos_timer_callback_t callback, v_PVOID_t userData, - char* fileName, v_U32_t lineNum ); + +VOS_STATUS vos_timer_init_debug( vos_timer_t *timer, VOS_TIMER_TYPE timerType, + vos_timer_callback_t callback, v_PVOID_t userData, + char* fileName, v_U32_t lineNum ); #else -VOS_STATUS vos_timer_init( vos_timer_t *timer, VOS_TIMER_TYPE timerType, +VOS_STATUS vos_timer_init( vos_timer_t *timer, VOS_TIMER_TYPE timerType, vos_timer_callback_t callback, v_PVOID_t userData ); #endif /*--------------------------------------------------------------------------- - + \brief vos_timer_destroy() - Destroy a vOSS Timer object The \a vos_timer_destroy() function shall destroy the timer object. - After a successful return from \a vos_timer_destroy() the timer + After a successful return from \a vos_timer_destroy() the timer object becomes, in effect, uninitialized. - + A destroyed timer object can be re-initialized by calling - vos_timer_init(). The results of otherwise referencing the object - after it has been destroyed are undefined. - + vos_timer_init(). The results of otherwise referencing the object + after it has been destroyed are undefined. + Calls to vOSS timer functions to manipulate the timer, such - as vos_timer_set() will fail if the lock is destroyed. Therefore, - don't use the timer after it has been destroyed until it has + as vos_timer_set() will fail if the lock is destroyed. Therefore, + don't use the timer after it has been destroyed until it has been re-initialized. - + \param timer - the timer object to be destroyed. - + \return VOS_STATUS_SUCCESS - timer was successfully destroyed. - - VOS_STATUS_E_BUSY - The implementation has detected an attempt - to destroy the object referenced by timer while it is still - still referenced. The timer must be stopped before it can be + + VOS_STATUS_E_BUSY - The implementation has detected an attempt + to destroy the object referenced by timer while it is still + still referenced. The timer must be stopped before it can be destroyed. VOS_STATUS_E_INVAL - The value specified by timer is invalid. - - VOS_STATUS_E_FAULT - timer is an invalid pointer. + + VOS_STATUS_E_FAULT - timer is an invalid pointer. \sa - + ---------------------------------------------------------------------------*/ VOS_STATUS vos_timer_destroy( vos_timer_t *timer ); /*-------------------------------------------------------------------------- - + \brief vos_timer_start() - Start a vOSS Timer object - The \a vos_timer_start() function starts a timer to expire after the - specified interval, thus running the timer callback function when + The \a vos_timer_start() function starts a timer to expire after the + specified interval, thus running the timer callback function when the interval expires. - - A timer only runs once (a one-shot timer). To re-start the - timer, vos_timer_start() has to be called after the timer runs + + A timer only runs once (a one-shot timer). To re-start the + timer, vos_timer_start() has to be called after the timer runs or has been cancelled. - + \param timer - the timer object to be started - + \param expirationTime - expiration time for the timer (in milliseconds) The expiration time cannot be less than 10 ms. - + \return VOS_STATUS_SUCCESS - timer was successfully started. - - VOS_STATUS_E_ALREADY - The implementation has detected an attempt - to start a timer while it is already started. The timer must + + VOS_STATUS_E_ALREADY - The implementation has detected an attempt + to start a timer while it is already started. The timer must be stopped or expire before it can be started again. VOS_STATUS_E_INVAL - The value specified by timer is invalid. - - VOS_STATUS_E_FAULT - timer is an invalid pointer. + + VOS_STATUS_E_FAULT - timer is an invalid pointer. \sa - + -------------------------------------------------------------------------*/ VOS_STATUS vos_timer_start( vos_timer_t *timer, v_U32_t expirationTime ); /*-------------------------------------------------------------------------- - + \brief vos_timer_stop() - Stop a vOSS Timer The \a vos_timer_stop() function stops a timer that has been started but has not expired, essentially cancelling the 'start' request. - + After a timer is stopped, it goes back to the state it was in after it was created and can be started again via a call to vos_timer_start(). - + \param timer - the timer object to be stopped - + \return VOS_STATUS_SUCCESS - timer was successfully stopped. - - VOS_STATUS_E_EMPTY - The implementation has detected an attempt - to stop a timer that has not been started or has already + + VOS_STATUS_E_EMPTY - The implementation has detected an attempt + to stop a timer that has not been started or has already expired. VOS_STATUS_E_INVAL - The value specified by timer is invalid. - - VOS_STATUS_E_FAULT - timer is an invalid pointer. + + VOS_STATUS_E_FAULT - timer is an invalid pointer. \sa - + ------------------------------------------------------------------------*/ VOS_STATUS vos_timer_stop( vos_timer_t *timer ); /*-------------------------------------------------------------------------- - + \brief vos_timer_get_system_ticks() - Get the system time in 10ms ticks The \a vos_timer_get_system_ticks() function returns the current number of timer ticks in 10msec intervals. This function is suitable timestamping - and calculating time intervals by calculating the difference between two + and calculating time intervals by calculating the difference between two timestamps. - - \returns - The current system tick count (in 10msec intervals). This + + \returns - The current system tick count (in 10msec intervals). This function cannot fail. - + \sa - + ------------------------------------------------------------------------*/ v_TIME_t vos_timer_get_system_ticks( v_VOID_t ); /*-------------------------------------------------------------------------- - + \brief vos_timer_get_system_time() - Get the system time in milliseconds - The \a vos_timer_get_system_time() function returns the number of milliseconds + The \a vos_timer_get_system_time() function returns the number of milliseconds that have elapsed since the system was started - + \returns - The current system time in milliseconds. - + \sa - + ------------------------------------------------------------------------*/ v_TIME_t vos_timer_get_system_time( v_VOID_t ); diff --git a/CORE/VOSS/inc/vos_trace.h b/CORE/VOSS/inc/vos_trace.h index 5bd618b61af3..b53a7cb81233 100644 --- a/CORE/VOSS/inc/vos_trace.h +++ b/CORE/VOSS/inc/vos_trace.h @@ -29,13 +29,13 @@ #define __VOS_TRACE_H /**========================================================================= - + \file vos_trace.h - + \brief virtual Operating System Servies (vOS) - + Trace, logging, and debugging definitions and APIs - + ========================================================================*/ /* $Header$ */ @@ -46,92 +46,92 @@ #include <vos_types.h> // For VOS_MODULE_ID... #include <stdarg.h> // For va_list... -/*-------------------------------------------------------------------------- - Type declarations +/*-------------------------------------------------------------------------- + Type declarations ------------------------------------------------------------------------*/ -typedef enum +typedef enum { - // NONE means NO traces will be logged. This value is in place for the + // NONE means NO traces will be logged. This value is in place for the // vos_trace_setlevel() to allow the user to turn off all traces. VOS_TRACE_LEVEL_NONE = 0, - + // the following trace levels are the ones that 'callers' of VOS_TRACE() // can specify in for the VOS_TRACE_LEVEL parameter. Traces are classified - // by severity (FATAL being more serious than INFO for example). + // by severity (FATAL being more serious than INFO for example). VOS_TRACE_LEVEL_FATAL, - VOS_TRACE_LEVEL_ERROR, - VOS_TRACE_LEVEL_WARN, + VOS_TRACE_LEVEL_ERROR, + VOS_TRACE_LEVEL_WARN, VOS_TRACE_LEVEL_INFO, VOS_TRACE_LEVEL_INFO_HIGH, VOS_TRACE_LEVEL_INFO_MED, VOS_TRACE_LEVEL_INFO_LOW, VOS_TRACE_LEVEL_DEBUG, - // ALL means all trace levels will be active. This value is in place for the + // ALL means all trace levels will be active. This value is in place for the // vos_trace_setlevel() to allow the user to turn ON all traces. - VOS_TRACE_LEVEL_ALL, + VOS_TRACE_LEVEL_ALL, + - - // not a real level. Used to identify the maximum number of + // not a real level. Used to identify the maximum number of // VOS_TRACE_LEVELs defined. - VOS_TRACE_LEVEL_MAX - + VOS_TRACE_LEVEL_MAX + } VOS_TRACE_LEVEL; -/*-------------------------------------------------------------------------- +/*-------------------------------------------------------------------------- Preprocessor definitions and constants ------------------------------------------------------------------------*/ #define ASSERT_BUFFER_SIZE ( 512 ) // below definition is obsolete and is no longer being used in BMP and WM // TODO: remove this once this is not used on Android -#define VOS_ENABLE_TRACING +#define VOS_ENABLE_TRACING #define WCONN_TRACE_KMSG_LOG_BUFF -#include <i_vos_trace.h> +#include <i_vos_trace.h> -/*------------------------------------------------------------------------- +/*------------------------------------------------------------------------- Function declarations and documenation ------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------- - + \brief vos_trace_setLevel() - Set the trace level for a particular module - + This is an external API that allows trace levels to be set for each module. - - \param level - trace level. A member of the VOS_TRACE_LEVEL + + \param level - trace level. A member of the VOS_TRACE_LEVEL enumeration indicating the severity of the condition causing the - trace message to be issued. More severe conditions are more + trace message to be issued. More severe conditions are more likely to be logged. - + \return nothing - + \sa --------------------------------------------------------------------------*/ void vos_trace_setLevel( VOS_MODULE_ID module, VOS_TRACE_LEVEL level ); /**---------------------------------------------------------------------------- - + \brief vos_trace_getLevel() - Get the trace level - - This is an external API that returns a boolean value to signify if a + + This is an external API that returns a boolean value to signify if a particular trace level is set for the specified module. - - \param level - trace level. A member of the VOS_TRACE_LEVEL enumeration - indicating the severity of the condition causing the trace + + \param level - trace level. A member of the VOS_TRACE_LEVEL enumeration + indicating the severity of the condition causing the trace message to be issued. - + Note that individual trace levels are the only valid values for this API. VOS_TRACE_LEVEL_NONE and VOS_TRACE_LEVEL_ALL are not valid input and will return FALSE - \return VOS_FALSE - the specified trace level for the specified module is OFF - + \return VOS_FALSE - the specified trace level for the specified module is OFF + VOS_TRUE - the specified trace level for the specified module is ON - + \sa vos_trace_setLevel() --------------------------------------------------------------------------*/ v_BOOL_t vos_trace_getLevel( VOS_MODULE_ID module, VOS_TRACE_LEVEL level ); diff --git a/CORE/VOSS/inc/vos_types.h b/CORE/VOSS/inc/vos_types.h index 0c90a11d71ab..2a27f6a5351a 100644 --- a/CORE/VOSS/inc/vos_types.h +++ b/CORE/VOSS/inc/vos_types.h @@ -43,14 +43,14 @@ #include "i_vos_types.h" #include <string.h> -/*-------------------------------------------------------------------------- +/*-------------------------------------------------------------------------- Preprocessor definitions and constants ------------------------------------------------------------------------*/ // macro to get maximum of two values. -#define VOS_MAX( _x, _y ) ( ( (_x) > (_y) ) ? (_x) : (_y) ) +#define VOS_MAX( _x, _y ) ( ( (_x) > (_y) ) ? (_x) : (_y) ) // macro to get minimum of two values -#define VOS_MIN( _x, _y ) ( ( (_x) < (_y) ) ? (_x) : (_y) ) +#define VOS_MIN( _x, _y ) ( ( (_x) < (_y) ) ? (_x) : (_y) ) // macro to get the ceiling of an integer division operation... #define VOS_CEIL_DIV( _a, _b ) (( 0 != (_a) % (_b) ) ? ( (_a) / (_b) + 1 ) : ( (_a) / (_b) )) @@ -135,8 +135,8 @@ typedef enum /// in the software system. typedef enum { /*ON linux maintain 1-1 corespondence with device_mode_t in hdd*/ - VOS_STA_MODE=0, - VOS_STA_SAP_MODE=1, //to support softAp mode . This is misleading. It means AP MODE only. + VOS_STA_MODE=0, + VOS_STA_SAP_MODE=1, //to support softAp mode . This is misleading. It means AP MODE only. //The constant name has historical reason VOS_P2P_CLIENT_MODE, VOS_P2P_GO_MODE, @@ -154,14 +154,14 @@ typedef enum //bit 3 - p2p go mode typedef enum { - VOS_STA=1, + VOS_STA=1, VOS_SAP=2, VOS_STA_SAP=3, //to support sta, softAp mode . This means STA+AP mode VOS_P2P_CLIENT=4, VOS_P2P_GO=8, VOS_MAX_CONCURRENCY_PERSONA=4 } tVOS_CONCURRENCY_MODE; - + #if !defined( NULL ) #ifdef __cplusplus #define NULL 0 @@ -172,14 +172,14 @@ typedef enum enum { - VOS_FALSE = 0, + VOS_FALSE = 0, VOS_TRUE = ( !VOS_FALSE ) }; /// pointer to void types typedef v_VOID_t *v_PVOID_t; -/// "Size" type... +/// "Size" type... typedef v_UINT_t v_SIZE_t; /// 'Time' type @@ -189,20 +189,20 @@ typedef v_ULONG_t v_TIME_t; typedef v_VOID_t *v_CONTEXT_t; -/// MAC address data type and corresponding macros/functions to +/// MAC address data type and corresponding macros/functions to /// manipulate MAC addresses... /// Macro defining the size of a MAC Address... #define VOS_MAC_ADDR_SIZE ( 6 ) typedef struct { - /// the bytes that make up the macAddress. + /// the bytes that make up the macAddress. v_BYTE_t bytes[ VOS_MAC_ADDR_SIZE ]; - + } v_MACADDR_t; -/// This macro is used to initialize a vOSS MacAddress to the +/// This macro is used to initialize a vOSS MacAddress to the /// broadcast MacAddress. It is used like this... /// v_MACADDR_t macAddress = VOS_MAC_ADDR_BROADCAST_INITIALIZER; #define VOS_MAC_ADDR_BROADCAST_INITIALIZER { { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff } } @@ -215,22 +215,22 @@ typedef struct #define VOS_IPV4_ADDR_SIZE ( 4 ) /*---------------------------------------------------------------------------- - + \brief vos_is_macaddr_equal() - compare two vOSS MacAddress - This function returns a boolean that tells if a two vOSS MacAddress' + This function returns a boolean that tells if a two vOSS MacAddress' are equivalent. - + \param pMacAddr1 - pointer to one voss MacAddress to compare \param pMacAddr2 - pointer to the other voss MacAddress to compare - + \return true - the MacAddress's are equal not true - the MacAddress's are not equal - + \sa - + --------------------------------------------------------------------------*/ -VOS_INLINE_FN v_BOOL_t vos_is_macaddr_equal( v_MACADDR_t *pMacAddr1, +VOS_INLINE_FN v_BOOL_t vos_is_macaddr_equal( v_MACADDR_t *pMacAddr1, v_MACADDR_t *pMacAddr2 ) { return ( 0 == memcmp( pMacAddr1, pMacAddr2, VOS_MAC_ADDR_SIZE ) ); @@ -239,40 +239,40 @@ VOS_INLINE_FN v_BOOL_t vos_is_macaddr_equal( v_MACADDR_t *pMacAddr1, /*---------------------------------------------------------------------------- - - \brief vos_is_macaddr_zero() - check for a MacAddress of all zeros. + + \brief vos_is_macaddr_zero() - check for a MacAddress of all zeros. This function returns a boolean that tells if a MacAddress is made up of all zeros. - + \param pMacAddr - pointer to the v_MACADDR_t to check. - + \return true - the MacAddress is all Zeros not true - the MacAddress is not all Zeros. - + \sa - + --------------------------------------------------------------------------*/ VOS_INLINE_FN v_BOOL_t vos_is_macaddr_zero( v_MACADDR_t *pMacAddr ) { v_MACADDR_t zeroMacAddr = VOS_MAC_ADDR_ZERO_INITIALIZER; - + return( vos_is_macaddr_equal( pMacAddr, &zeroMacAddr ) ); } /*---------------------------------------------------------------------------- - + \brief vos_zero_macaddr() - zero out a MacAddress This function zeros out a vOSS MacAddress type. - + \param pMacAddr - pointer to the v_MACADDR_t to zero. - + \return nothing - + \sa - + --------------------------------------------------------------------------*/ VOS_INLINE_FN v_VOID_t vos_zero_macaddr( v_MACADDR_t *pMacAddr ) { @@ -281,21 +281,21 @@ VOS_INLINE_FN v_VOID_t vos_zero_macaddr( v_MACADDR_t *pMacAddr ) /*---------------------------------------------------------------------------- - - \brief vos_is_macaddr_group() - check for a MacAddress is a 'group' address + + \brief vos_is_macaddr_group() - check for a MacAddress is a 'group' address This function returns a boolean that tells if a the input vOSS MacAddress is a "group" address. Group addresses have the 'group address bit' turned - on in the MacAddress. Group addresses are made up of Broadcast and + on in the MacAddress. Group addresses are made up of Broadcast and Multicast addresses. - + \param pMacAddr1 - pointer to the voss MacAddress to check - + \return true - the input MacAddress is a Group address not true - the input MacAddress is not a Group address - + \sa - + --------------------------------------------------------------------------*/ VOS_INLINE_FN v_BOOL_t vos_is_macaddr_group( v_MACADDR_t *pMacAddr ) { @@ -304,41 +304,41 @@ VOS_INLINE_FN v_BOOL_t vos_is_macaddr_group( v_MACADDR_t *pMacAddr ) /*---------------------------------------------------------------------------- - - \brief vos_is_macaddr_broadcast() - check for a MacAddress is a broadcast address + + \brief vos_is_macaddr_broadcast() - check for a MacAddress is a broadcast address This function returns a boolean that tells if a the input vOSS MacAddress is a "broadcast" address. - + \param pMacAddr - pointer to the voss MacAddress to check - + \return true - the input MacAddress is a broadcast address not true - the input MacAddress is not a broadcast address - + \sa - + --------------------------------------------------------------------------*/ VOS_INLINE_FN v_BOOL_t vos_is_macaddr_broadcast( v_MACADDR_t *pMacAddr ) { v_MACADDR_t broadcastMacAddr = VOS_MAC_ADDR_BROADCAST_INITIALIZER; - + return( vos_is_macaddr_equal( pMacAddr, &broadcastMacAddr ) ); } /*---------------------------------------------------------------------------- - - \brief vos_is_macaddr_multicast() - check for a MacAddress is a multicast address + + \brief vos_is_macaddr_multicast() - check for a MacAddress is a multicast address This function returns a boolean that tells if a the input vOSS MacAddress is a "Multicast" address. - + \param pMacAddr - pointer to the voss MacAddress to check - + \return true - the input MacAddress is a Multicast address not true - the input MacAddress is not a Multicast address - + \sa - + --------------------------------------------------------------------------*/ VOS_INLINE_FN v_BOOL_t vos_is_macaddr_multicast( v_MACADDR_t *pMacAddr ) { @@ -349,19 +349,19 @@ VOS_INLINE_FN v_BOOL_t vos_is_macaddr_multicast( v_MACADDR_t *pMacAddr ) /*---------------------------------------------------------------------------- - - \brief vos_is_macaddr_directed() - check for a MacAddress is a directed address + + \brief vos_is_macaddr_directed() - check for a MacAddress is a directed address This function returns a boolean that tells if a the input vOSS MacAddress is a "directed" address. - + \param pMacAddr - pointer to the voss MacAddress to check - + \return true - the input MacAddress is a directed address not true - the input MacAddress is not a directed address - + \sa - + --------------------------------------------------------------------------*/ VOS_INLINE_FN v_BOOL_t vos_is_macaddr_directed( v_MACADDR_t *pMacAddr ) { @@ -369,38 +369,38 @@ VOS_INLINE_FN v_BOOL_t vos_is_macaddr_directed( v_MACADDR_t *pMacAddr ) } /*---------------------------------------------------------------------------- - + \brief vos_copy_macaddr() - copy a vOSS MacAddress This function copies a vOSS MacAddress into another vOSS MacAddress. - + \param pDst - pointer to the voss MacAddress to copy TO (the destination) \param pSrc - pointer to the voss MacAddress to copy FROM (the source) - + \return nothing - + \sa - + --------------------------------------------------------------------------*/ VOS_INLINE_FN v_VOID_t vos_copy_macaddr( v_MACADDR_t *pDst, v_MACADDR_t *pSrc ) { *pDst = *pSrc; -} +} /*---------------------------------------------------------------------------- - - \brief vos_set_macaddr_broadcast() - set a vOSS MacAddress to the 'broadcast' - + + \brief vos_set_macaddr_broadcast() - set a vOSS MacAddress to the 'broadcast' + This function sets a vOSS MacAddress to the 'broadcast' MacAddress. Broadcast MacAddress contains all 0xFF bytes. - + \param pMacAddr - pointer to the voss MacAddress to set to broadcast - + \return nothing - + \sa - + --------------------------------------------------------------------------*/ VOS_INLINE_FN v_VOID_t vos_set_macaddr_broadcast( v_MACADDR_t *pMacAddr ) { @@ -408,19 +408,19 @@ VOS_INLINE_FN v_VOID_t vos_set_macaddr_broadcast( v_MACADDR_t *pMacAddr ) } /*---------------------------------------------------------------------------- - - \brief vos_atomic_set_U32() - set a U32 variable atomically - + + \brief vos_atomic_set_U32() - set a U32 variable atomically + \param pTarget - pointer to the v_U32_t to set. - + \param value - the value to set in the v_U32_t variable. - + \return This function returns the value previously in the v_U32_t before the new value is set. - + \sa vos_atomic_increment_U32(), vos_atomic_decrement_U32() - - --------------------------------------------------------------------------*/ + + --------------------------------------------------------------------------*/ v_U32_t vos_atomic_set_U32( v_U32_t *pTarget, v_U32_t value ); @@ -437,70 +437,70 @@ VOS_INLINE_FN v_U8_t vos_atomic_set_U8( v_U8_t *pVariable, v_U8_t value ) } /*---------------------------------------------------------------------------- - - \brief vos_atomic_increment_U32() - Increment a U32 variable atomically - + + \brief vos_atomic_increment_U32() - Increment a U32 variable atomically + \param pTarget - pointer to the v_U32_t to increment. - - \return This function returns the value of the variable after the + + \return This function returns the value of the variable after the increment occurs. - + \sa vos_atomic_decrement_U32(), vos_atomic_set_U32() - - --------------------------------------------------------------------------*/ + + --------------------------------------------------------------------------*/ v_U32_t vos_atomic_increment_U32( v_U32_t *pTarget ); /*---------------------------------------------------------------------------- - - \brief vos_atomic_decrement_U32() - Decrement a U32 variable atomically - + + \brief vos_atomic_decrement_U32() - Decrement a U32 variable atomically + \param pTarget - pointer to the v_U32_t to decrement. - - \return This function returns the value of the variable after the + + \return This function returns the value of the variable after the decrement occurs. - + \sa vos_atomic_increment_U32(), vos_atomic_set_U32() - - --------------------------------------------------------------------------*/ + + --------------------------------------------------------------------------*/ v_U32_t vos_atomic_decrement_U32( v_U32_t *pTarget ); /*---------------------------------------------------------------------------- - + \brief vos_atomic_increment_U32_by_value() - Increment a U32 variable atomically by a given value - + \param pTarget - pointer to the v_U32_t to decrement. \param value - the value that needs to be added to target - - \return This function returns the value of the variable after the + + \return This function returns the value of the variable after the decrement occurs. - + \sa vos_atomic_increment_U32(), vos_atomic_set_U32() - - --------------------------------------------------------------------------*/ + + --------------------------------------------------------------------------*/ v_U32_t vos_atomic_increment_U32_by_value( v_U32_t *pTarget, v_U32_t value ); /*---------------------------------------------------------------------------- - + \brief vos_atomic_decrement_U32_by_value() - Decrement a U32 variable atomically by a given value - + \param pTarget - pointer to the v_U32_t to decrement. \param value - the value that needs to be substracted from target - - \return This function returns the value of the variable after the + + \return This function returns the value of the variable after the decrement occurs. - + \sa vos_atomic_increment_U32(), vos_atomic_set_U32() - - --------------------------------------------------------------------------*/ + + --------------------------------------------------------------------------*/ v_U32_t vos_atomic_decrement_U32_by_value( v_U32_t *pTarget, v_U32_t value ); -v_U32_t vos_get_skip_ssid_check(void); +v_U32_t vos_get_skip_ssid_check(void); -v_U32_t vos_get_skip_11e_check(void); +v_U32_t vos_get_skip_11e_check(void); diff --git a/CORE/VOSS/inc/vos_utils.h b/CORE/VOSS/inc/vos_utils.h index 744c39f43177..63dc656d709e 100644 --- a/CORE/VOSS/inc/vos_utils.h +++ b/CORE/VOSS/inc/vos_utils.h @@ -28,15 +28,15 @@ #if !defined( __VOS_UTILS_H ) #define __VOS_UTILS_H - + /**========================================================================= - + \file vos_utils.h - + \brief virtual Operating System Services (vOSS) utility APIs - + Various utility functions - + ========================================================================*/ /* $Header$ */ @@ -48,7 +48,7 @@ #include <vos_status.h> //#include <Wincrypt.h> -/*-------------------------------------------------------------------------- +/*-------------------------------------------------------------------------- Preprocessor definitions and constants ------------------------------------------------------------------------*/ #define VOS_DIGEST_SHA1_SIZE 20 @@ -64,12 +64,12 @@ #define VOS_CHAN_14_FREQ 2484 #define VOS_CHAN_15_FREQ 2512 -/*-------------------------------------------------------------------------- +/*-------------------------------------------------------------------------- Type declarations ------------------------------------------------------------------------*/ -/*------------------------------------------------------------------------- +/*------------------------------------------------------------------------- Function declarations and documenation ------------------------------------------------------------------------*/ @@ -89,7 +89,7 @@ VOS_STATUS vos_crypto_deinit( v_U32_t hCryptProv ); * @param pbBuf - the caller allocated location where the bytes should be copied * @param numBytes the number of bytes that should be generated and * copied - * + * * @return VOS_STATUS_SUCCSS if the operation succeeds */ VOS_STATUS vos_rand_get_bytes( v_U32_t handle, v_U8_t *pbBuf, v_U32_t numBytes ); diff --git a/CORE/VOSS/inc/wlan_hdd_misc.h b/CORE/VOSS/inc/wlan_hdd_misc.h index 232161f64c5b..056cfa1af834 100644 --- a/CORE/VOSS/inc/wlan_hdd_misc.h +++ b/CORE/VOSS/inc/wlan_hdd_misc.h @@ -88,4 +88,3 @@ VOS_STATUS hdd_read_cfg_file(v_VOID_t *pCtx, char *pFileName, v_VOID_t *pBuffer, tVOS_CONCURRENCY_MODE hdd_get_concurrency_mode ( void ); #endif /* WLAN_HDD_MISC_H */ - diff --git a/CORE/VOSS/inc/wlan_nv_parser_internal.h b/CORE/VOSS/inc/wlan_nv_parser_internal.h index 2bc63d63d25d..00cdf73a6a1c 100644 --- a/CORE/VOSS/inc/wlan_nv_parser_internal.h +++ b/CORE/VOSS/inc/wlan_nv_parser_internal.h @@ -89,5 +89,3 @@ typedef int (*pF_NumElemBasedOnStorageType)(_NV_TEMPLATE_TABLE *pTableEntry, int nvBin); #endif - - diff --git a/CORE/VOSS/src/vos_api.c b/CORE/VOSS/src/vos_api.c index acf1aaaecc19..694d451587d3 100644 --- a/CORE/VOSS/src/vos_api.c +++ b/CORE/VOSS/src/vos_api.c @@ -34,19 +34,19 @@ ========================================================================*/ /*=========================================================================== - EDIT HISTORY FOR FILE - - - This section contains comments describing changes made to the module. - Notice that changes are listed in reverse chronological order. - - - $Header:$ $DateTime: $ $Author: $ - - - when who what, where, why + EDIT HISTORY FOR FILE + + + This section contains comments describing changes made to the module. + Notice that changes are listed in reverse chronological order. + + + $Header:$ $DateTime: $ $Author: $ + + + when who what, where, why -------- --- -------------------------------------------------------- - 03/29/09 kanand Created module. + 03/29/09 kanand Created module. ===========================================================================*/ /*-------------------------------------------------------------------------- @@ -104,7 +104,7 @@ #define VOS_WDA_TIMEOUT 15000 /* Approximate amount of time to wait for WDA to stop WDI */ -#define VOS_WDA_STOP_TIMEOUT WDA_STOP_TIMEOUT +#define VOS_WDA_STOP_TIMEOUT WDA_STOP_TIMEOUT /* Approximate amount of time to wait for WDA to issue a DUMP req */ #define VOS_WDA_RESP_TIMEOUT WDA_STOP_TIMEOUT @@ -122,31 +122,31 @@ v_VOID_t vos_sys_probe_thread_cback ( v_VOID_t *pUserData ); v_VOID_t vos_core_return_msg(v_PVOID_t pVContext, pVosMsgWrapper pMsgWrapper); -v_VOID_t vos_fetch_tl_cfg_parms ( WLANTL_ConfigInfoType *pTLConfig, +v_VOID_t vos_fetch_tl_cfg_parms ( WLANTL_ConfigInfoType *pTLConfig, hdd_config_t * pConfig ); /*--------------------------------------------------------------------------- - - \brief vos_preOpen() - PreOpen the vOSS Module - - The \a vos_preOpen() function allocates the Vos Context, but do not + + \brief vos_preOpen() - PreOpen the vOSS Module + + The \a vos_preOpen() function allocates the Vos Context, but do not initialize all the members. This overal initialization will happen at vos_Open(). - The reason why we need vos_preOpen() is to get a minimum context + The reason why we need vos_preOpen() is to get a minimum context where to store BAL and SAL relative data, which happens before vos_Open() is called. - - \param pVosContext: A pointer to where to store the VOS Context - - - \return VOS_STATUS_SUCCESS - Scheduler was successfully initialized and + + \param pVosContext: A pointer to where to store the VOS Context + + + \return VOS_STATUS_SUCCESS - Scheduler was successfully initialized and is ready to be used. - - VOS_STATUS_E_FAILURE - Failure to initialize the scheduler/ - + + VOS_STATUS_E_FAILURE - Failure to initialize the scheduler/ + \sa vos_Open() - + ---------------------------------------------------------------------------*/ VOS_STATUS vos_preOpen ( v_CONTEXT_t *pVosContext ) { @@ -174,19 +174,19 @@ VOS_STATUS vos_preOpen ( v_CONTEXT_t *pVosContext ) } /* vos_preOpen()*/ - + /*--------------------------------------------------------------------------- - - \brief vos_preClose() - PreClose the vOSS Module - + + \brief vos_preClose() - PreClose the vOSS Module + The \a vos_preClose() function frees the Vos Context. - - \param pVosContext: A pointer to where the VOS Context was stored - - + + \param pVosContext: A pointer to where the VOS Context was stored + + \return VOS_STATUS_SUCCESS - Always successful - - + + \sa vos_preClose() \sa vos_close() ---------------------------------------------------------------------------*/ @@ -196,7 +196,7 @@ VOS_STATUS vos_preClose( v_CONTEXT_t *pVosContext ) VOS_TRACE( VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_INFO, "%s: De-allocating the VOS Context", __func__); - if (( pVosContext == NULL) || (*pVosContext == NULL)) + if (( pVosContext == NULL) || (*pVosContext == NULL)) { VOS_TRACE( VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_ERROR, "%s: vOS Context is Null", __func__); @@ -217,34 +217,34 @@ VOS_STATUS vos_preClose( v_CONTEXT_t *pVosContext ) } /* vos_preClose()*/ /*--------------------------------------------------------------------------- - - \brief vos_open() - Open the vOSS Module - + + \brief vos_open() - Open the vOSS Module + The \a vos_open() function opens the vOSS Scheduler Upon successful initialization: - + - All VOS submodules should have been initialized - + - The VOS scheduler should have opened - + - All the WLAN SW components should have been opened. This includes SYS, MAC, SME, WDA and TL. - - + + \param hddContextSize: Size of the HDD context to allocate. - - - \return VOS_STATUS_SUCCESS - Scheduler was successfully initialized and + + + \return VOS_STATUS_SUCCESS - Scheduler was successfully initialized and is ready to be used. - - VOS_STATUS_E_RESOURCES - System resources (other than memory) + + VOS_STATUS_E_RESOURCES - System resources (other than memory) are unavailable to initilize the scheduler - - VOS_STATUS_E_FAILURE - Failure to initialize the scheduler/ - + + VOS_STATUS_E_FAILURE - Failure to initialize the scheduler/ + \sa vos_preOpen() - + ---------------------------------------------------------------------------*/ VOS_STATUS vos_open( v_CONTEXT_t *pVosContext, v_SIZE_t hddContextSize ) @@ -291,7 +291,7 @@ VOS_STATUS vos_open( v_CONTEXT_t *pVosContext, v_SIZE_t hddContextSize ) VOS_TRACE( VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_FATAL, "%s: Unable to init wdaCompleteEvent", __func__); VOS_ASSERT(0); - + goto err_probe_event; } @@ -309,8 +309,8 @@ VOS_STATUS vos_open( v_CONTEXT_t *pVosContext, v_SIZE_t hddContextSize ) for (iter = 0; iter < VOS_CORE_MAX_MESSAGES; iter++) { - (gpVosContext->aMsgWrappers[iter]).pVosMsg = - &(gpVosContext->aMsgBuffers[iter]); + (gpVosContext->aMsgWrappers[iter]).pVosMsg = + &(gpVosContext->aMsgBuffers[iter]); INIT_LIST_HEAD(&gpVosContext->aMsgWrappers[iter].msgNode); vos_mq_put(&gpVosContext->freeVosMq, &(gpVosContext->aMsgWrappers[iter])); } @@ -503,7 +503,7 @@ VOS_STATUS vos_open( v_CONTEXT_t *pVosContext, v_SIZE_t hddContextSize ) #endif /* If we arrive here, both threads dispacthing messages correctly */ - + /* Now proceed to open the MAC */ /* UMA is supported in hardware for performing the @@ -512,7 +512,7 @@ VOS_STATUS vos_open( v_CONTEXT_t *pVosContext, v_SIZE_t hddContextSize ) sirStatus = macOpen(&(gpVosContext->pMACContext), gpVosContext->pHDDContext, &macOpenParms); - + if (eSIR_SUCCESS != sirStatus) { /* Critical Error ... Cannot proceed further */ @@ -534,7 +534,7 @@ VOS_STATUS vos_open( v_CONTEXT_t *pVosContext, v_SIZE_t hddContextSize ) } /* Now proceed to open TL. Read TL config first */ - vos_fetch_tl_cfg_parms ( &TLConfig, + vos_fetch_tl_cfg_parms ( &TLConfig, ((hdd_context_t*)(gpVosContext->pHDDContext))->cfg_ini); vStatus = WLANTL_Open(gpVosContext, &TLConfig); @@ -676,8 +676,8 @@ VOS_STATUS vos_preStart( v_CONTEXT_t vosContext ) ccmStart(gpVosContext->pMACContext); /* Reset wda wait event */ - vos_event_reset(&gpVosContext->wdaCompleteEvent); - + vos_event_reset(&gpVosContext->wdaCompleteEvent); + /*call WDA pre start*/ vStatus = WDA_preStart(gpVosContext); @@ -749,37 +749,37 @@ VOS_STATUS vos_preStart( v_CONTEXT_t vosContext ) } /*--------------------------------------------------------------------------- - - \brief vos_start() - Start the Libra SW Modules - + + \brief vos_start() - Start the Libra SW Modules + The \a vos_start() function starts all the components of the Libra SW including: - SAL/BAL, which in turn starts SSC - + - the MAC (HAL and PE) - + - SME - + - TL - + - SYS: triggers the CFG download - - + + \param pVosContext: The VOS context - - - \return VOS_STATUS_SUCCESS - Scheduler was successfully initialized and + + + \return VOS_STATUS_SUCCESS - Scheduler was successfully initialized and is ready to be used. - - VOS_STATUS_E_RESOURCES - System resources (other than memory) + + VOS_STATUS_E_RESOURCES - System resources (other than memory) are unavailable to initilize the scheduler - - VOS_STATUS_E_FAILURE - Failure to initialize the scheduler/ - + + VOS_STATUS_E_FAILURE - Failure to initialize the scheduler/ + \sa vos_preStart() \sa vos_open() - + ---------------------------------------------------------------------------*/ VOS_STATUS vos_start( v_CONTEXT_t vosContext ) { @@ -803,20 +803,20 @@ VOS_STATUS vos_start( v_CONTEXT_t vosContext ) || ( pVosContext->pTLContext == NULL)) { if (pVosContext->pWDAContext == NULL) - VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_ERROR, + VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_ERROR, "%s: WDA NULL context", __func__); else if (pVosContext->pMACContext == NULL) - VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_ERROR, + VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_ERROR, "%s: MAC NULL context", __func__); else - VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_ERROR, + VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_ERROR, "%s: TL NULL context", __func__); - + return VOS_STATUS_E_FAILURE; } #ifdef QCA_WIFI_ISOC - /* WDA_Start will be called after NV image download because the + /* WDA_Start will be called after NV image download because the NV image data has to be updated at HAL before HAL_Start gets executed*/ /* Start the NV Image Download */ @@ -884,7 +884,7 @@ VOS_STATUS vos_start( v_CONTEXT_t vosContext ) "%s: Failed to start MAC", __func__); goto err_wda_stop; } - + VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_INFO, "%s: MAC correctly started", __func__); @@ -920,11 +920,11 @@ VOS_STATUS vos_start( v_CONTEXT_t vosContext ) err_sme_stop: sme_Stop(pVosContext->pMACContext, HAL_STOP_TYPE_SYS_RESET); - + err_mac_stop: macStop( pVosContext->pMACContext, HAL_STOP_TYPE_SYS_RESET ); -err_wda_stop: +err_wda_stop: vos_event_reset( &(gpVosContext->wdaCompleteEvent) ); vStatus = WDA_stop( pVosContext, HAL_STOP_TYPE_RF_KILL); if (!VOS_IS_STATUS_SUCCESS(vStatus)) @@ -957,7 +957,7 @@ err_wda_stop: } return VOS_STATUS_E_FAILURE; - + } /* vos_start() */ @@ -966,7 +966,7 @@ VOS_STATUS vos_stop( v_CONTEXT_t vosContext ) { VOS_STATUS vosStatus; - /* WDA_Stop is called before the SYS so that the processing of Riva + /* WDA_Stop is called before the SYS so that the processing of Riva pending responces will not be handled during uninitialization of WLAN driver */ vos_event_reset( &(gpVosContext->wdaCompleteEvent) ); @@ -1053,7 +1053,7 @@ VOS_STATUS vos_close( v_CONTEXT_t vosContext ) "%s: Failed to close TL", __func__); VOS_ASSERT( VOS_IS_STATUS_SUCCESS( vosStatus ) ); } - + vosStatus = sme_Close( ((pVosContextType)vosContext)->pMACContext); if (!VOS_IS_STATUS_SUCCESS(vosStatus)) { @@ -1104,8 +1104,8 @@ VOS_STATUS vos_close( v_CONTEXT_t vosContext ) "%s: Failed to shutdown WDA", __func__ ); VOS_ASSERT( VOS_IS_STATUS_SUCCESS( vosStatus ) ); } - } - else + } + else { vosStatus = WDA_close( vosContext ); if (!VOS_IS_STATUS_SUCCESS(vosStatus)) @@ -1165,27 +1165,27 @@ VOS_STATUS vos_close( v_CONTEXT_t vosContext ) return VOS_STATUS_SUCCESS; } - + /**--------------------------------------------------------------------------- - + \brief vos_get_context() - get context data area - + Each module in the system has a context / data area that is allocated - and maanged by voss. This API allows any user to get a pointer to its - allocated context data area from the VOSS global context. + and maanged by voss. This API allows any user to get a pointer to its + allocated context data area from the VOSS global context. + + \param vosContext - the VOSS Global Context. - \param vosContext - the VOSS Global Context. - \param moduleId - the module ID, who's context data are is being retrived. - + \return - pointer to the context data area. - + - NULL if the context data is not allocated for the module ID - specified - + specified + --------------------------------------------------------------------------*/ -v_VOID_t* vos_get_context( VOS_MODULE_ID moduleId, +v_VOID_t* vos_get_context( VOS_MODULE_ID moduleId, v_CONTEXT_t pVosContext ) { v_PVOID_t pModContext = NULL; @@ -1199,14 +1199,14 @@ v_VOID_t* vos_get_context( VOS_MODULE_ID moduleId, if (gpVosContext != pVosContext) { - VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_ERROR, + VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_ERROR, "%s: pVosContext != gpVosContext", __func__); return NULL; } switch(moduleId) { - case VOS_MODULE_ID_TL: + case VOS_MODULE_ID_TL: { pModContext = gpVosContext->pTLContext; break; @@ -1217,7 +1217,7 @@ v_VOID_t* vos_get_context( VOS_MODULE_ID moduleId, { pModContext = gpVosContext->pBAPContext; break; - } + } #endif //WLAN_BTAMP_FEATURE case VOS_MODULE_ID_SAP: @@ -1242,7 +1242,7 @@ v_VOID_t* vos_get_context( VOS_MODULE_ID moduleId, case VOS_MODULE_ID_PE: case VOS_MODULE_ID_PMC: { - /* + /* ** In all these cases, we just return the MAC Context */ pModContext = gpVosContext->pMACContext; @@ -1319,28 +1319,28 @@ v_VOID_t* vos_get_context( VOS_MODULE_ID moduleId, /**--------------------------------------------------------------------------- - + \brief vos_get_global_context() - get VOSS global Context - + This API allows any user to get the VOS Global Context pointer from a - module context data area. - + module context data area. + \param moduleContext - the input module context pointer - - \param moduleId - the module ID who's context pointer is input in + + \param moduleId - the module ID who's context pointer is input in moduleContext. - + \return - pointer to the VOSS global context - - - NULL if the function is unable to retreive the VOSS context. - + + - NULL if the function is unable to retreive the VOSS context. + --------------------------------------------------------------------------*/ -v_CONTEXT_t vos_get_global_context( VOS_MODULE_ID moduleId, +v_CONTEXT_t vos_get_global_context( VOS_MODULE_ID moduleId, v_VOID_t *moduleContext ) { if (gpVosContext == NULL) { - VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_ERROR, + VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_ERROR, "%s: global voss context is NULL", __func__); } @@ -1353,7 +1353,7 @@ v_U8_t vos_is_logp_in_progress(VOS_MODULE_ID moduleId, v_VOID_t *moduleContext) { if (gpVosContext == NULL) { - VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_ERROR, + VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_ERROR, "%s: global voss context is NULL", __func__); return 1; } @@ -1365,7 +1365,7 @@ void vos_set_logp_in_progress(VOS_MODULE_ID moduleId, v_U8_t value) { if (gpVosContext == NULL) { - VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_ERROR, + VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_ERROR, "%s: global voss context is NULL", __func__); return; } @@ -1377,9 +1377,9 @@ v_U8_t vos_is_load_unload_in_progress(VOS_MODULE_ID moduleId, v_VOID_t *moduleCo { if (gpVosContext == NULL) { - VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_ERROR, + VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_ERROR, "%s: global voss context is NULL", __func__); - return 0; + return 0; } return gpVosContext->isLoadUnloadInProgress; @@ -1389,7 +1389,7 @@ void vos_set_load_unload_in_progress(VOS_MODULE_ID moduleId, v_U8_t value) { if (gpVosContext == NULL) { - VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_ERROR, + VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_ERROR, "%s: global voss context is NULL", __func__); return; } @@ -1423,65 +1423,65 @@ void vos_set_reinit_in_progress(VOS_MODULE_ID moduleId, v_U8_t value) /**--------------------------------------------------------------------------- - + \brief vos_alloc_context() - allocate a context within the VOSS global Context - - This API allows any user to allocate a user context area within the - VOS Global Context. - + + This API allows any user to allocate a user context area within the + VOS Global Context. + \param pVosContext - pointer to the global Vos context - + \param moduleId - the module ID who's context area is being allocated. - - \param ppModuleContext - pointer to location where the pointer to the - allocated context is returned. Note this + + \param ppModuleContext - pointer to location where the pointer to the + allocated context is returned. Note this output pointer is valid only if the API returns VOS_STATUS_SUCCESS - + \param size - the size of the context area to be allocated. - - \return - VOS_STATUS_SUCCESS - the context for the module ID has been + + \return - VOS_STATUS_SUCCESS - the context for the module ID has been allocated successfully. The pointer to the context area - can be found in *ppModuleContext. - \note This function returns VOS_STATUS_SUCCESS if the - module context was already allocated and the size + can be found in *ppModuleContext. + \note This function returns VOS_STATUS_SUCCESS if the + module context was already allocated and the size allocated matches the size on this call. - VOS_STATUS_E_INVAL - the moduleId is not a valid or does + VOS_STATUS_E_INVAL - the moduleId is not a valid or does not identify a module that can have a context allocated. - VOS_STATUS_E_EXISTS - vos could allocate the requested context + VOS_STATUS_E_EXISTS - vos could allocate the requested context because a context for this module ID already exists and it is a *different* size that specified on this call. - - VOS_STATUS_E_NOMEM - vos could not allocate memory for the - requested context area. - + + VOS_STATUS_E_NOMEM - vos could not allocate memory for the + requested context area. + \sa vos_get_context(), vos_free_context() - + --------------------------------------------------------------------------*/ -VOS_STATUS vos_alloc_context( v_VOID_t *pVosContext, VOS_MODULE_ID moduleID, +VOS_STATUS vos_alloc_context( v_VOID_t *pVosContext, VOS_MODULE_ID moduleID, v_VOID_t **ppModuleContext, v_SIZE_t size ) { v_VOID_t ** pGpModContext = NULL; if ( pVosContext == NULL) { - VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_ERROR, + VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_ERROR, "%s: vos context is null", __func__); return VOS_STATUS_E_FAILURE; } if (( gpVosContext != pVosContext) || ( ppModuleContext == NULL)) { - VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_ERROR, + VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_ERROR, "%s: context mismatch or null param passed", __func__); return VOS_STATUS_E_FAILURE; } switch(moduleID) { - case VOS_MODULE_ID_TL: + case VOS_MODULE_ID_TL: { - pGpModContext = &(gpVosContext->pTLContext); + pGpModContext = &(gpVosContext->pTLContext); break; } @@ -1490,7 +1490,7 @@ VOS_STATUS vos_alloc_context( v_VOID_t *pVosContext, VOS_MODULE_ID moduleID, { pGpModContext = &(gpVosContext->pBAPContext); break; - } + } #endif //WLAN_BTAMP_FEATURE case VOS_MODULE_ID_SAP: @@ -1510,7 +1510,7 @@ VOS_STATUS vos_alloc_context( v_VOID_t *pVosContext, VOS_MODULE_ID moduleID, case VOS_MODULE_ID_HDD: case VOS_MODULE_ID_HDD_SOFTAP: default: - { + { VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_ERROR, "%s: Module ID %i " "does not have its context allocated by VOSS", __func__, moduleID); VOS_ASSERT(0); @@ -1529,14 +1529,14 @@ VOS_STATUS vos_alloc_context( v_VOID_t *pVosContext, VOS_MODULE_ID moduleID, __func__, moduleID); return VOS_STATUS_E_EXISTS; } - + /* ** Dynamically allocate the context for module */ - + *ppModuleContext = kmalloc(size, GFP_KERNEL); - + if ( *ppModuleContext == NULL) { VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_ERROR,"%s: Failed to " @@ -1544,7 +1544,7 @@ VOS_STATUS vos_alloc_context( v_VOID_t *pVosContext, VOS_MODULE_ID moduleID, VOS_ASSERT(0); return VOS_STATUS_E_NOMEM; } - + if (moduleID==VOS_MODULE_ID_TL) { vos_mem_zero(*ppModuleContext, size); @@ -1558,35 +1558,35 @@ VOS_STATUS vos_alloc_context( v_VOID_t *pVosContext, VOS_MODULE_ID moduleID, /**--------------------------------------------------------------------------- - - \brief vos_free_context() - free an allocated a context within the + + \brief vos_free_context() - free an allocated a context within the VOSS global Context - - This API allows a user to free the user context area within the - VOS Global Context. - + + This API allows a user to free the user context area within the + VOS Global Context. + \param pVosContext - pointer to the global Vos context - + \param moduleId - the module ID who's context area is being free - + \param pModuleContext - pointer to module context area to be free'd. - - \return - VOS_STATUS_SUCCESS - the context for the module ID has been - free'd. The pointer to the context area is not longer + + \return - VOS_STATUS_SUCCESS - the context for the module ID has been + free'd. The pointer to the context area is not longer available. - - VOS_STATUS_E_FAULT - pVosContext or pModuleContext are not + + VOS_STATUS_E_FAULT - pVosContext or pModuleContext are not valid pointers. - - VOS_STATUS_E_INVAL - the moduleId is not a valid or does + + VOS_STATUS_E_INVAL - the moduleId is not a valid or does not identify a module that can have a context free'd. - - VOS_STATUS_E_EXISTS - vos could not free the requested + + VOS_STATUS_E_EXISTS - vos could not free the requested context area because a context for this module ID does not exist in the global vos context. - - \sa vos_get_context() - + + \sa vos_get_context() + --------------------------------------------------------------------------*/ VOS_STATUS vos_free_context( v_VOID_t *pVosContext, VOS_MODULE_ID moduleID, v_VOID_t *pModuleContext ) @@ -1600,13 +1600,13 @@ VOS_STATUS vos_free_context( v_VOID_t *pVosContext, VOS_MODULE_ID moduleID, "%s: Null params or context mismatch", __func__); return VOS_STATUS_E_FAILURE; } - + switch(moduleID) { - case VOS_MODULE_ID_TL: + case VOS_MODULE_ID_TL: { - pGpModContext = &(gpVosContext->pTLContext); + pGpModContext = &(gpVosContext->pTLContext); break; } @@ -1617,10 +1617,10 @@ VOS_STATUS vos_free_context( v_VOID_t *pVosContext, VOS_MODULE_ID moduleID, break; } #endif //WLAN_BTAMP_FEATURE - + case VOS_MODULE_ID_SAP: { - pGpModContext = &(gpVosContext->pSAPContext); + pGpModContext = &(gpVosContext->pSAPContext); break; } @@ -1635,7 +1635,7 @@ VOS_STATUS vos_free_context( v_VOID_t *pVosContext, VOS_MODULE_ID moduleID, case VOS_MODULE_ID_PMC: case VOS_MODULE_ID_HDD_SOFTAP: default: - { + { VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_ERROR, "%s: Module ID %i " "does not have its context allocated by VOSS", __func__, moduleID); VOS_ASSERT(0); @@ -1652,14 +1652,14 @@ VOS_STATUS vos_free_context( v_VOID_t *pVosContext, VOS_MODULE_ID moduleID, "context has not been allocated or freed already", __func__,moduleID); return VOS_STATUS_E_FAILURE; } - + if (*pGpModContext != pModuleContext) { - VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_ERROR, + VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_ERROR, "%s: pGpModContext != pModuleContext", __func__); return VOS_STATUS_E_FAILURE; - } - + } + if(pModuleContext != NULL) kfree(pModuleContext); @@ -1668,44 +1668,44 @@ VOS_STATUS vos_free_context( v_VOID_t *pVosContext, VOS_MODULE_ID moduleID, return VOS_STATUS_SUCCESS; } /* vos_free_context() */ - + /**--------------------------------------------------------------------------- - + \brief vos_mq_post_message() - post a message to a message queue This API allows messages to be posted to a specific message queue. Messages can be posted to the following message queues: - + <ul> <li> SME <li> PE <li> HAL <li> TL - </ul> - + </ul> + \param msgQueueId - identifies the message queue upon which the message will be posted. - - \param message - a pointer to a message buffer. Memory for this message + + \param message - a pointer to a message buffer. Memory for this message buffer is allocated by the caller and free'd by the vOSS after the - message is posted to the message queue. If the consumer of the + message is posted to the message queue. If the consumer of the message needs anything in this message, it needs to copy the contents before returning from the message queue handler. - + \return VOS_STATUS_SUCCESS - the message has been successfully posted to the message queue. - - VOS_STATUS_E_INVAL - The value specified by msgQueueId does not + + VOS_STATUS_E_INVAL - The value specified by msgQueueId does not refer to a valid Message Queue Id. - - VOS_STATUS_E_FAULT - message is an invalid pointer. - + + VOS_STATUS_E_FAULT - message is an invalid pointer. + VOS_STATUS_E_FAILURE - the message queue handler has reported an unknown failure. \sa - + --------------------------------------------------------------------------*/ VOS_STATUS vos_mq_post_message( VOS_MQ_ID msgQueueId, vos_msg_t *pMsg ) { @@ -1723,21 +1723,21 @@ VOS_STATUS vos_mq_post_message( VOS_MQ_ID msgQueueId, vos_msg_t *pMsg ) switch (msgQueueId) { /// Message Queue ID for messages bound for SME - case VOS_MQ_ID_SME: + case VOS_MQ_ID_SME: { pTargetMq = &(gpVosContext->vosSched.smeMcMq); break; } /// Message Queue ID for messages bound for PE - case VOS_MQ_ID_PE: + case VOS_MQ_ID_PE: { pTargetMq = &(gpVosContext->vosSched.peMcMq); break; } /// Message Queue ID for messages bound for WDA - case VOS_MQ_ID_WDA: + case VOS_MQ_ID_WDA: { pTargetMq = &(gpVosContext->vosSched.wdaMcMq); break; @@ -1751,7 +1751,7 @@ VOS_STATUS vos_mq_post_message( VOS_MQ_ID msgQueueId, vos_msg_t *pMsg ) } /// Message Queue ID for messages bound for TL - case VOS_MQ_ID_TL: + case VOS_MQ_ID_TL: { pTargetMq = &(gpVosContext->vosSched.tlMcMq); break; @@ -1785,10 +1785,10 @@ VOS_STATUS vos_mq_post_message( VOS_MQ_ID msgQueueId, vos_msg_t *pMsg ) VOS_ASSERT(NULL !=pTargetMq); if (pTargetMq == NULL) { - VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_ERROR, + VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_ERROR, "%s: pTargetMq == NULL", __func__); return VOS_STATUS_E_FAILURE; - } + } /* ** Try and get a free Msg wrapper @@ -1802,11 +1802,11 @@ VOS_STATUS vos_mq_post_message( VOS_MQ_ID msgQueueId, vos_msg_t *pMsg ) return VOS_STATUS_E_RESOURCES; } - + /* ** Copy the message now */ - vos_mem_copy( (v_VOID_t*)pMsgWrapper->pVosMsg, + vos_mem_copy( (v_VOID_t*)pMsgWrapper->pVosMsg, (v_VOID_t*)pMsg, sizeof(vos_msg_t)); vos_mq_put(pTargetMq, pMsgWrapper); @@ -1820,40 +1820,40 @@ VOS_STATUS vos_mq_post_message( VOS_MQ_ID msgQueueId, vos_msg_t *pMsg ) /**--------------------------------------------------------------------------- - + \brief vos_tx_mq_serialize() - serialize a message to the Tx execution flow - This API allows messages to be posted to a specific message queue in the - Tx excution flow. Messages for the Tx execution flow can be posted only + This API allows messages to be posted to a specific message queue in the + Tx excution flow. Messages for the Tx execution flow can be posted only to the following queue. - + <ul> <li> TL <li> SSC/WDI </ul> - + \param msgQueueId - identifies the message queue upon which the message will be posted. - - \param message - a pointer to a message buffer. Body memory for this message + + \param message - a pointer to a message buffer. Body memory for this message buffer is allocated by the caller and free'd by the vOSS after the - message is dispacthed to the appropriate component. If the consumer - of the message needs to keep anything in the body, it needs to copy + message is dispacthed to the appropriate component. If the consumer + of the message needs to keep anything in the body, it needs to copy the contents before returning from the message handler. - + \return VOS_STATUS_SUCCESS - the message has been successfully posted to the message queue. - - VOS_STATUS_E_INVAL - The value specified by msgQueueId does not + + VOS_STATUS_E_INVAL - The value specified by msgQueueId does not refer to a valid Message Queue Id. - - VOS_STATUS_E_FAULT - message is an invalid pointer. - + + VOS_STATUS_E_FAULT - message is an invalid pointer. + VOS_STATUS_E_FAILURE - the message queue handler has reported an unknown failure. \sa - + --------------------------------------------------------------------------*/ VOS_STATUS vos_tx_mq_serialize( VOS_MQ_ID msgQueueId, vos_msg_t *pMsg ) { @@ -1871,19 +1871,19 @@ VOS_STATUS vos_tx_mq_serialize( VOS_MQ_ID msgQueueId, vos_msg_t *pMsg ) switch (msgQueueId) { /// Message Queue ID for messages bound for SME - case VOS_MQ_ID_TL: + case VOS_MQ_ID_TL: { pTargetMq = &(gpVosContext->vosSched.tlTxMq); break; } /// Message Queue ID for messages bound for SSC - case VOS_MQ_ID_WDI: + case VOS_MQ_ID_WDI: { pTargetMq = &(gpVosContext->vosSched.wdiTxMq); break; } - + /// Message Queue ID for messages bound for the SYS module case VOS_MQ_ID_SYS: { @@ -1902,11 +1902,11 @@ VOS_STATUS vos_tx_mq_serialize( VOS_MQ_ID msgQueueId, vos_msg_t *pMsg ) if (pTargetMq == NULL) { - VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_ERROR, + VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_ERROR, "%s: pTargetMq == NULL", __func__); return VOS_STATUS_E_FAILURE; - } - + } + /* ** Try and get a free Msg wrapper @@ -1924,7 +1924,7 @@ VOS_STATUS vos_tx_mq_serialize( VOS_MQ_ID msgQueueId, vos_msg_t *pMsg ) /* ** Copy the message now */ - vos_mem_copy( (v_VOID_t*)pMsgWrapper->pVosMsg, + vos_mem_copy( (v_VOID_t*)pMsgWrapper->pVosMsg, (v_VOID_t*)pMsg, sizeof(vos_msg_t)); vos_mq_put(pTargetMq, pMsgWrapper); @@ -2046,22 +2046,22 @@ VOS_STATUS vos_rx_mq_serialize( VOS_MQ_ID msgQueueId, vos_msg_t *pMsg ) } /* vos_rx_mq_serialize()*/ -v_VOID_t -vos_sys_probe_thread_cback -( - v_VOID_t *pUserData +v_VOID_t +vos_sys_probe_thread_cback +( + v_VOID_t *pUserData ) { if (gpVosContext != pUserData) { - VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_ERROR, + VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_ERROR, "%s: gpVosContext != pUserData", __func__); return; - } + } if (vos_event_set(&gpVosContext->ProbeEvent)!= VOS_STATUS_SUCCESS) { - VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_ERROR, + VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_ERROR, "%s: vos_event_set failed", __func__); return; } @@ -2092,30 +2092,30 @@ v_VOID_t vos_WDAComplete_cback v_VOID_t vos_core_return_msg ( - v_PVOID_t pVContext, + v_PVOID_t pVContext, pVosMsgWrapper pMsgWrapper ) { pVosContextType pVosContext = (pVosContextType) pVContext; - + VOS_ASSERT( gpVosContext == pVosContext); if (gpVosContext != pVosContext) { - VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_ERROR, + VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_ERROR, "%s: gpVosContext != pVosContext", __func__); return; - } + } VOS_ASSERT( NULL !=pMsgWrapper ); if (pMsgWrapper == NULL) { - VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_ERROR, + VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_ERROR, "%s: pMsgWrapper == NULL in function", __func__); return; - } - + } + /* ** Return the message on the free message queue */ @@ -2128,16 +2128,16 @@ v_VOID_t vos_core_return_msg /** @brief vos_fetch_tl_cfg_parms() - this function will attempt to read the TL config params from the registry - + @param pAdapter : [inout] pointer to TL config block - @return + @return None */ -v_VOID_t -vos_fetch_tl_cfg_parms -( +v_VOID_t +vos_fetch_tl_cfg_parms +( WLANTL_ConfigInfoType *pTLConfig, hdd_config_t * pConfig ) @@ -2175,7 +2175,7 @@ void vos_abort_mac_scan(v_U8_t sessionId) hddLog(VOS_TRACE_LEVEL_FATAL, "%s: Global VOS context is Null", __func__); return; } - + /* Get the HDD context */ pHddCtx = (hdd_context_t *)vos_get_context(VOS_MODULE_ID_HDD, pVosContext ); if(!pHddCtx) { @@ -2396,7 +2396,7 @@ VOS_STATUS vos_wlanReInit(void) /** @brief vos_wlanRestart() - This API will reload WLAN driver. - This function is called if driver detects any fatal state which + This function is called if driver detects any fatal state which can be recovered by a WLAN module reload ( Android framwork initiated ). Note that this API will not initiate any RIVA subsystem restart. @@ -2419,9 +2419,9 @@ VOS_STATUS vos_wlanRestart(void) v_CONTEXT_t pVosContext = NULL; /* Check whether driver load unload is in progress */ - if(vos_is_load_unload_in_progress( VOS_MODULE_ID_VOSS, NULL)) + if(vos_is_load_unload_in_progress( VOS_MODULE_ID_VOSS, NULL)) { - VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_ERROR, + VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_ERROR, "%s: Driver load/unload is in progress, retry later.", __func__); return VOS_STATUS_E_AGAIN; } @@ -2429,15 +2429,15 @@ VOS_STATUS vos_wlanRestart(void) /* Get the Global VOSS Context */ pVosContext = vos_get_global_context(VOS_MODULE_ID_VOSS, NULL); if(!pVosContext) { - VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_FATAL, + VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_FATAL, "%s: Global VOS context is Null", __func__); return VOS_STATUS_E_FAILURE; } - + /* Get the HDD context */ pHddCtx = (hdd_context_t *)vos_get_context(VOS_MODULE_ID_HDD, pVosContext ); if(!pHddCtx) { - VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_FATAL, + VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_FATAL, "%s: HDD context is Null", __func__); return VOS_STATUS_E_FAILURE; } diff --git a/CORE/VOSS/src/vos_diag.c b/CORE/VOSS/src/vos_diag.c index cf0973ec8129..8578752e3044 100644 --- a/CORE/VOSS/src/vos_diag.c +++ b/CORE/VOSS/src/vos_diag.c @@ -45,7 +45,7 @@ #define PTT_MSG_DIAG_CMDS_TYPE 0x5050 -#define DIAG_TYPE_LOGS 1 +#define DIAG_TYPE_LOGS 1 #define DIAG_TYPE_EVENTS 2 #define DIAG_SWAP16(A) ((((tANI_U16)(A) & 0xff00) >> 8) | (((tANI_U16)(A) & 0x00ff) << 8)) @@ -61,15 +61,15 @@ typedef struct event_report_s /**--------------------------------------------------------------------------- - - \brief vos_log_set_code() - - This function sets the logging code in the given log record. + \brief vos_log_set_code() - + + This function sets the logging code in the given log record. \param - ptr - Pointer to the log header type. - code - log code. \return - None - + --------------------------------------------------------------------------*/ void vos_log_set_code (v_VOID_t *ptr, v_U16_t code) @@ -80,19 +80,19 @@ void vos_log_set_code (v_VOID_t *ptr, v_U16_t code) ((log_hdr_type *) ptr)->code = code; } -} +} /**--------------------------------------------------------------------------- - - \brief vos_log_set_length() - + + \brief vos_log_set_length() - This function sets the length field in the given log record. \param - ptr - Pointer to the log header type. - length - log length. - + \return - None - + --------------------------------------------------------------------------*/ void vos_log_set_length (v_VOID_t *ptr, v_U16_t length) @@ -102,18 +102,18 @@ void vos_log_set_length (v_VOID_t *ptr, v_U16_t length) /* All log packets are required to start with 'log_header_type'. */ ((log_hdr_type *) ptr)->len = (v_U16_t) length; } -} +} /**--------------------------------------------------------------------------- - - \brief vos_log_submit() - + + \brief vos_log_submit() - This function sends the log data to the ptt socket app only if it is registered with the driver. \param - ptr - Pointer to the log header type. - + \return - None - + --------------------------------------------------------------------------*/ void vos_log_submit(v_VOID_t *plog_hdr_ptr) @@ -147,33 +147,33 @@ void vos_log_submit(v_VOID_t *plog_hdr_ptr) if(pHddCtx->ptt_pid) { data_len = pHdr->len; - + total_len = sizeof(tAniHdr)+sizeof(v_U32_t)+data_len; - + pBuf = (v_U8_t*)vos_mem_malloc(total_len); - + if(!pBuf) { VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR, "vos_mem_malloc failed"); return; } - + vos_mem_zero((v_VOID_t*)pBuf,total_len); - + wmsg = (tAniHdr*)pBuf; wmsg->type = PTT_MSG_DIAG_CMDS_TYPE; wmsg->length = total_len; wmsg->length = DIAG_SWAP16(wmsg->length); pBuf += sizeof(tAniHdr); - - + + /* Diag Type events or log */ *(v_U32_t*)pBuf = DIAG_TYPE_LOGS; pBuf += sizeof(v_U32_t); - - + + memcpy(pBuf, pHdr,data_len); - + if(pHddCtx->ptt_pid) { if( ptt_sock_send_msg_to_app(wmsg, 0, ANI_NL_MSG_PUMAC, pHddCtx->ptt_pid) < 0) { @@ -182,7 +182,7 @@ void vos_log_submit(v_VOID_t *plog_hdr_ptr) vos_mem_free((v_VOID_t *)wmsg); return; } - + } vos_mem_free((v_VOID_t*)wmsg); } @@ -190,19 +190,19 @@ void vos_log_submit(v_VOID_t *plog_hdr_ptr) } /**--------------------------------------------------------------------------- - - \brief vos_event_report_payload() - + + \brief vos_event_report_payload() - This function sends the event data to the ptt socket app only if it is registered with the driver. \param - ptr - Pointer to the log header type. - + \return - None - + --------------------------------------------------------------------------*/ void vos_event_report_payload(v_U16_t event_Id, v_U16_t length, v_VOID_t *pPayload) -{ +{ tAniHdr *wmsg = NULL; @@ -225,14 +225,14 @@ void vos_event_report_payload(v_U16_t event_Id, v_U16_t length, v_VOID_t *pPaylo nl_srv_nl_ready_indication(); } #endif /* WLAN_KD_READY_NOTIFIER */ - + /* Send the log data to the ptt app only if it is registered with the wlan driver*/ if(pHddCtx->ptt_pid) { total_len = sizeof(tAniHdr)+sizeof(event_report_t)+length; - + pBuf = (v_U8_t*)vos_mem_malloc(total_len); - + if(!pBuf) { VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR, "vos_mem_malloc failed"); @@ -243,26 +243,26 @@ void vos_event_report_payload(v_U16_t event_Id, v_U16_t length, v_VOID_t *pPaylo wmsg->length = total_len; wmsg->length = DIAG_SWAP16(wmsg->length); pBuf += sizeof(tAniHdr); - + pEvent_report = (event_report_t*)pBuf; pEvent_report->diag_type = DIAG_TYPE_EVENTS; pEvent_report->event_id = event_Id; pEvent_report->length = length; - - pBuf += sizeof(event_report_t); - + + pBuf += sizeof(event_report_t); + memcpy(pBuf, pPayload,length); - + if( ptt_sock_send_msg_to_app(wmsg, 0, ANI_NL_MSG_PUMAC, pHddCtx->ptt_pid) < 0) { VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR, ("Ptt Socket error sending message to the app!!")); vos_mem_free((v_VOID_t*)wmsg); return; } - + vos_mem_free((v_VOID_t*)wmsg); } - + return; - + } diff --git a/CORE/VOSS/src/vos_getBin.c b/CORE/VOSS/src/vos_getBin.c index 2e7c05ce1329..f38a1a834b2f 100644 --- a/CORE/VOSS/src/vos_getBin.c +++ b/CORE/VOSS/src/vos_getBin.c @@ -162,4 +162,3 @@ v_BOOL_t vos_concurrent_sessions_running(void) return (j>1); } - diff --git a/CORE/VOSS/src/vos_lock.c b/CORE/VOSS/src/vos_lock.c index 8a66d9ba1c06..75e74c4e63c9 100644 --- a/CORE/VOSS/src/vos_lock.c +++ b/CORE/VOSS/src/vos_lock.c @@ -29,7 +29,7 @@ FILE: vos_lock.c OVERVIEW: This source file contains definitions for vOS lock APIs - The four APIs mentioned in this file are used for + The four APIs mentioned in this file are used for initializing , acquiring, releasing and destroying a lock. the lock are implemented using critical sections @@ -82,40 +82,40 @@ enum * -------------------------------------------------------------------------*/ /*-------------------------------------------------------------------------- - + \brief vos_lock_init() - initializes a vOSS lock - - The vos_lock_init() function initializes the specified lock. Upon - successful initialization, the state of the lock becomes initialized + + The vos_lock_init() function initializes the specified lock. Upon + successful initialization, the state of the lock becomes initialized and unlocked. - A lock must be initialized by calling vos_lock_init() before it - may be used in any other lock functions. - - Attempting to initialize an already initialized lock results in + A lock must be initialized by calling vos_lock_init() before it + may be used in any other lock functions. + + Attempting to initialize an already initialized lock results in a failure. - + \param lock - pointer to the opaque lock object to initialize - - \return VOS_STATUS_SUCCESS - lock was successfully initialized and + + \return VOS_STATUS_SUCCESS - lock was successfully initialized and is ready to be used. - VOS_STATUS_E_NOMEM - insufficient memory exists to initialize + VOS_STATUS_E_NOMEM - insufficient memory exists to initialize the lock - VOS_STATUS_E_BUSY - The implementation has detected an attempt - to reinitialize the object referenced by lock, a previously + VOS_STATUS_E_BUSY - The implementation has detected an attempt + to reinitialize the object referenced by lock, a previously initialized, but not yet destroyed, lock. - VOS_STATUS_E_FAULT - lock is an invalid pointer. + VOS_STATUS_E_FAULT - lock is an invalid pointer. - VOS_STATUS_E_FAILURE - default return value if it fails due to + VOS_STATUS_E_FAILURE - default return value if it fails due to unknown reasons - ***VOS_STATUS_E_RESOURCES - System resources (other than memory) + ***VOS_STATUS_E_RESOURCES - System resources (other than memory) are unavailable to initilize the lock \sa - + ( *** return value not considered yet ) --------------------------------------------------------------------------*/ VOS_STATUS vos_lock_init ( vos_lock_t *lock ) @@ -125,7 +125,7 @@ VOS_STATUS vos_lock_init ( vos_lock_t *lock ) if ( lock == NULL) { VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_ERROR, "%s: NULL pointer passed in",__func__); - return VOS_STATUS_E_FAULT; + return VOS_STATUS_E_FAULT; } // check for 'already initialized' lock if ( LINUX_LOCK_COOKIE == lock->cookie ) @@ -133,45 +133,45 @@ VOS_STATUS vos_lock_init ( vos_lock_t *lock ) VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_ERROR, "%s: already initialized lock",__func__); return VOS_STATUS_E_BUSY; } - + if (in_interrupt()) { VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_ERROR, "%s cannot be called from interrupt context!!!", __func__); - return VOS_STATUS_E_FAULT; + return VOS_STATUS_E_FAULT; } - - // initialize new lock - mutex_init( &lock->m_lock ); + + // initialize new lock + mutex_init( &lock->m_lock ); lock->cookie = LINUX_LOCK_COOKIE; lock->state = LOCK_RELEASED; lock->processID = 0; lock->refcount = 0; - + return VOS_STATUS_SUCCESS; } /*-------------------------------------------------------------------------- - + \brief vos_lock_acquire() - acquires a lock - A lock object is acquired by calling \a vos_lock_acquire(). If the lock - is already locked, the calling thread shall block until the lock becomes - available. This operation shall return with the lock object referenced by - lock in the locked state with the calling thread as its owner. - + A lock object is acquired by calling \a vos_lock_acquire(). If the lock + is already locked, the calling thread shall block until the lock becomes + available. This operation shall return with the lock object referenced by + lock in the locked state with the calling thread as its owner. + \param lock - the lock object to acquire - - \return VOS_STATUS_SUCCESS - the lock was successfully acquired by + + \return VOS_STATUS_SUCCESS - the lock was successfully acquired by the calling thread. - - VOS_STATUS_E_INVAL - The value specified by lock does not refer + + VOS_STATUS_E_INVAL - The value specified by lock does not refer to an initialized lock object. - - VOS_STATUS_E_FAULT - lock is an invalid pointer. - VOS_STATUS_E_FAILURE - default return value if it fails due to + VOS_STATUS_E_FAULT - lock is an invalid pointer. + + VOS_STATUS_E_FAILURE - default return value if it fails due to unknown reasons - + \sa ------------------------------------------------------------------------*/ VOS_STATUS vos_lock_acquire ( vos_lock_t* lock ) @@ -196,9 +196,9 @@ VOS_STATUS vos_lock_acquire ( vos_lock_t* lock ) { VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_ERROR, "%s cannot be called from interrupt context!!!", __func__); VOS_ASSERT(0); - return VOS_STATUS_E_FAULT; + return VOS_STATUS_E_FAULT; } - if ((lock->processID == current->pid) && + if ((lock->processID == current->pid) && (lock->state == LOCK_ACQUIRED)) { lock->refcount++; @@ -217,12 +217,12 @@ VOS_STATUS vos_lock_acquire ( vos_lock_t* lock ) VOS_ASSERT(0); return VOS_STATUS_E_FAILURE; } - - + + #ifdef VOS_NESTED_LOCK_DEBUG VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_INFO,"%s: %x %d", __func__, lock, current->pid); #endif - if ( LOCK_DESTROYED != lock->state ) + if ( LOCK_DESTROYED != lock->state ) { lock->processID = current->pid; lock->refcount++; @@ -241,31 +241,31 @@ VOS_STATUS vos_lock_acquire ( vos_lock_t* lock ) /*-------------------------------------------------------------------------- - + \brief vos_lock_release() - releases a lock - The \a vos_lock_release() function shall release the lock object - referenced by 'lock'. + The \a vos_lock_release() function shall release the lock object + referenced by 'lock'. If a thread attempts to release a lock that it unlocked or is not - initialized, an error is returned. + initialized, an error is returned. \param lock - the lock to release - + \return VOS_STATUS_SUCCESS - the lock was successfully released - - VOS_STATUS_E_INVAL - The value specified by lock does not refer + + VOS_STATUS_E_INVAL - The value specified by lock does not refer to an initialized lock object. - - VOS_STATUS_E_FAULT - The value specified by lock does not refer + + VOS_STATUS_E_FAULT - The value specified by lock does not refer to an initialized lock object. - - VOS_STATUS_E_PERM - Operation is not permitted. The calling - thread does not own the lock. - VOS_STATUS_E_FAILURE - default return value if it fails due to + VOS_STATUS_E_PERM - Operation is not permitted. The calling + thread does not own the lock. + + VOS_STATUS_E_FAILURE - default return value if it fails due to unknown reasons - + \sa ------------------------------------------------------------------------*/ VOS_STATUS vos_lock_release ( vos_lock_t *lock ) @@ -290,10 +290,10 @@ VOS_STATUS vos_lock_release ( vos_lock_t *lock ) { VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_ERROR, "%s cannot be called from interrupt context!!!", __func__); VOS_ASSERT(0); - return VOS_STATUS_E_FAULT; + return VOS_STATUS_E_FAULT; } - // CurrentThread = GetCurrentThreadId(); + // CurrentThread = GetCurrentThreadId(); // Check thread ID of caller against thread ID // of the thread which acquire the lock if ( lock->processID != current->pid ) @@ -306,7 +306,7 @@ VOS_STATUS vos_lock_release ( vos_lock_t *lock ) VOS_ASSERT(0); return VOS_STATUS_E_PERM; } - if ((lock->processID == current->pid) && + if ((lock->processID == current->pid) && (lock->state == LOCK_ACQUIRED)) { if (lock->refcount > 0) lock->refcount--; @@ -315,11 +315,11 @@ VOS_STATUS vos_lock_release ( vos_lock_t *lock ) VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_INFO,"%s: %x %d %d", __func__, lock, lock->processID, lock->refcount); #endif if (lock->refcount) return VOS_STATUS_SUCCESS; - + lock->processID = 0; lock->refcount = 0; lock->state = LOCK_RELEASED; - // Release a Lock + // Release a Lock mutex_unlock( &lock->m_lock ); #ifdef VOS_NESTED_LOCK_DEBUG VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_INFO,"%s: Freeing lock %x %d %d", lock, lock->processID, lock->refcount); @@ -328,35 +328,35 @@ VOS_STATUS vos_lock_release ( vos_lock_t *lock ) } /*-------------------------------------------------------------------------- - + \brief vos_lock_destroy() - Destroys a vOSS Lock - probably not required for Linux. It may not be required for the caller to destroy a lock after usage. - The \a vos_lock_destroy() function shall destroy the lock object + The \a vos_lock_destroy() function shall destroy the lock object referenced by lock. After a successful return from \a vos_lock_destroy() the lock object becomes, in effect, uninitialized. - - A destroyed lock object can be reinitialized using vos_lock_init(); - the results of otherwise referencing the object after it has been destroyed + + A destroyed lock object can be reinitialized using vos_lock_init(); + the results of otherwise referencing the object after it has been destroyed are undefined. Calls to vOSS lock functions to manipulate the lock such - as vos_lock_acquire() will fail if the lock is destroyed. Therefore, - don't use the lock after it has been destroyed until it has + as vos_lock_acquire() will fail if the lock is destroyed. Therefore, + don't use the lock after it has been destroyed until it has been re-initialized. - + \param lock - the lock object to be destroyed. - + \return VOS_STATUS_SUCCESS - lock was successfully destroyed. - - VOS_STATUS_E_BUSY - The implementation has detected an attempt - to destroy the object referenced by lock while it is locked - or still referenced. + + VOS_STATUS_E_BUSY - The implementation has detected an attempt + to destroy the object referenced by lock while it is locked + or still referenced. VOS_STATUS_E_INVAL - The value specified by lock is invalid. - - VOS_STATUS_E_FAULT - lock is an invalid pointer. - VOS_STATUS_E_FAILURE - default return value if it fails due to + VOS_STATUS_E_FAULT - lock is an invalid pointer. + + VOS_STATUS_E_FAILURE - default return value if it fails due to unknown reasons \sa ------------------------------------------------------------------------*/ @@ -366,7 +366,7 @@ VOS_STATUS vos_lock_destroy( vos_lock_t *lock ) if ( NULL == lock ) { VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_ERROR, "%s: NULL pointer passed in", __func__); - return VOS_STATUS_E_FAULT; + return VOS_STATUS_E_FAULT; } if ( LINUX_LOCK_COOKIE != lock->cookie ) @@ -378,7 +378,7 @@ VOS_STATUS vos_lock_destroy( vos_lock_t *lock ) if (in_interrupt()) { VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_ERROR, "%s cannot be called from interrupt context!!!", __func__); - return VOS_STATUS_E_FAULT; + return VOS_STATUS_E_FAULT; } // check if lock is released @@ -394,52 +394,52 @@ VOS_STATUS vos_lock_destroy( vos_lock_t *lock ) mutex_unlock(&lock->m_lock); - + return VOS_STATUS_SUCCESS; } /*-------------------------------------------------------------------------- - + \brief vos_spin_lock_init() - initializes a vOSS spin lock - - The vos_spin_lock_init() function initializes the specified spin lock. Upon - successful initialization, the state of the lock becomes initialized + + The vos_spin_lock_init() function initializes the specified spin lock. Upon + successful initialization, the state of the lock becomes initialized and unlocked. - A lock must be initialized by calling vos_spin_lock_init() before it - may be used in any other lock functions. - - Attempting to initialize an already initialized lock results in + A lock must be initialized by calling vos_spin_lock_init() before it + may be used in any other lock functions. + + Attempting to initialize an already initialized lock results in a failure. - + \param pLock - pointer to the opaque lock object to initialize - - \return VOS_STATUS_SUCCESS - spin lock was successfully initialized and + + \return VOS_STATUS_SUCCESS - spin lock was successfully initialized and is ready to be used. --------------------------------------------------------------------------*/ VOS_STATUS vos_spin_lock_init(vos_spin_lock_t *pLock) { spin_lock_init(pLock); - + return VOS_STATUS_SUCCESS; } /*-------------------------------------------------------------------------- - + \brief vos_spin_lock_acquire() - acquires a spin lock - A lock object is acquired by calling \a vos_spin_lock_acquire(). If the lock - is already locked, the calling thread shall spin until the lock becomes - available. This operation shall return with the lock object referenced by - lock in the locked state with the calling thread as its owner. - + A lock object is acquired by calling \a vos_spin_lock_acquire(). If the lock + is already locked, the calling thread shall spin until the lock becomes + available. This operation shall return with the lock object referenced by + lock in the locked state with the calling thread as its owner. + \param pLock - the lock object to acquire - - \return VOS_STATUS_SUCCESS - the lock was successfully acquired by + + \return VOS_STATUS_SUCCESS - the lock was successfully acquired by the calling thread. - + \sa ------------------------------------------------------------------------*/ VOS_STATUS vos_spin_lock_acquire(vos_spin_lock_t *pLock) @@ -448,19 +448,19 @@ VOS_STATUS vos_spin_lock_acquire(vos_spin_lock_t *pLock) return VOS_STATUS_SUCCESS; } /*-------------------------------------------------------------------------- - + \brief vos_spin_lock_release() - releases a lock - The \a vos_lock_release() function shall release the spin lock object - referenced by 'lock'. + The \a vos_lock_release() function shall release the spin lock object + referenced by 'lock'. If a thread attempts to release a lock that it unlocked or is not - initialized, an error is returned. + initialized, an error is returned. \param pLock - the lock to release - + \return VOS_STATUS_SUCCESS - the lock was successfully released - + \sa ------------------------------------------------------------------------*/ VOS_STATUS vos_spin_lock_release(vos_spin_lock_t *pLock) @@ -471,13 +471,13 @@ VOS_STATUS vos_spin_lock_release(vos_spin_lock_t *pLock) /*-------------------------------------------------------------------------- - + \brief vos_spin_lock_destroy() - releases resource of a lock \param pLock - the pointer to a lock to release - + \return VOS_STATUS_SUCCESS - the lock was successfully released - + \sa ------------------------------------------------------------------------*/ VOS_STATUS vos_spin_lock_destroy(vos_spin_lock_t *pLock) diff --git a/CORE/VOSS/src/vos_memory.c b/CORE/VOSS/src/vos_memory.c index 4d14f1e5e1bb..edc4817a3c9f 100644 --- a/CORE/VOSS/src/vos_memory.c +++ b/CORE/VOSS/src/vos_memory.c @@ -46,7 +46,7 @@ when who what, where, why -------- --- -------------------------------------------------------- -===========================================================================*/ +===========================================================================*/ /*--------------------------------------------------------------------------- * Include Files @@ -84,7 +84,7 @@ struct s_vos_mem_struct /*--------------------------------------------------------------------------- * Type Declarations * ------------------------------------------------------------------------*/ - + /*--------------------------------------------------------------------------- * Data definitions * ------------------------------------------------------------------------*/ @@ -96,8 +96,8 @@ struct s_vos_mem_struct void vos_mem_init() { /* Initalizing the list with maximum size of 60000 */ - hdd_list_init(&vosMemList, 60000); - return; + hdd_list_init(&vosMemList, 60000); + return; } void vos_mem_clean() @@ -115,7 +115,7 @@ void vos_mem_clean() unsigned int prev_mleak_lineNum = 0; unsigned int prev_mleak_sz = 0; unsigned int mleak_cnt = 0; - + VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_ERROR, "%s: List is not Empty. listSize %d ", __func__, (int)listSize); @@ -170,7 +170,7 @@ void vos_mem_clean() void vos_mem_exit() { - vos_mem_clean(); + vos_mem_clean(); hdd_list_destroy(&vosMemList); } @@ -186,7 +186,7 @@ v_VOID_t * vos_mem_malloc_debug( v_SIZE_t size, char* fileName, v_U32_t lineNum) if (size > (1024*1024)) { VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_ERROR, - "%s: called with arg > 1024K; passed in %d !!!", __func__,size); + "%s: called with arg > 1024K; passed in %d !!!", __func__,size); return NULL; } @@ -195,7 +195,7 @@ v_VOID_t * vos_mem_malloc_debug( v_SIZE_t size, char* fileName, v_U32_t lineNum) flags = GFP_ATOMIC; } - new_size = size + sizeof(struct s_vos_mem_struct) + 8; + new_size = size + sizeof(struct s_vos_mem_struct) + 8; memStruct = (struct s_vos_mem_struct*)kmalloc(new_size, flags); @@ -215,11 +215,11 @@ v_VOID_t * vos_mem_malloc_debug( v_SIZE_t size, char* fileName, v_U32_t lineNum) spin_unlock_irqrestore(&vosMemList.lock, IrqFlags); if(VOS_STATUS_SUCCESS != vosStatus) { - VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_ERROR, + VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_ERROR, "%s: Unable to insert node into List vosStatus %d", __func__, vosStatus); } - memPtr = (v_VOID_t*)(memStruct + 1); + memPtr = (v_VOID_t*)(memStruct + 1); } return memPtr; } @@ -241,14 +241,14 @@ v_VOID_t vos_mem_free( v_VOID_t *ptr ) { if(0 == vos_mem_compare(memStruct->header, &WLAN_MEM_HEADER[0], sizeof(WLAN_MEM_HEADER)) ) { - VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_FATAL, - "Memory Header is corrupted. MemInfo: Filename %s, LineNum %d", + VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_FATAL, + "Memory Header is corrupted. MemInfo: Filename %s, LineNum %d", memStruct->fileName, (int)memStruct->lineNum); } if(0 == vos_mem_compare( (v_U8_t*)ptr + memStruct->size, &WLAN_MEM_TAIL[0], sizeof(WLAN_MEM_TAIL ) ) ) { - VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_FATAL, - "Memory Trailer is corrupted. MemInfo: Filename %s, LineNum %d", + VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_FATAL, + "Memory Trailer is corrupted. MemInfo: Filename %s, LineNum %d", memStruct->fileName, (int)memStruct->lineNum); } kfree((v_VOID_t*)memStruct); @@ -267,10 +267,10 @@ v_VOID_t * vos_mem_malloc( v_SIZE_t size ) int flags = GFP_KERNEL; #ifdef CONFIG_WCNSS_MEM_PRE_ALLOC v_VOID_t* pmem; -#endif +#endif if (size > (1024*1024)) { - VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_ERROR, "%s: called with arg > 1024K; passed in %d !!!", __func__,size); + VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_ERROR, "%s: called with arg > 1024K; passed in %d !!!", __func__,size); return NULL; } if (in_interrupt() || irqs_disabled()) @@ -281,12 +281,12 @@ v_VOID_t * vos_mem_malloc( v_SIZE_t size ) if(size > WCNSS_PRE_ALLOC_GET_THRESHOLD) { pmem = wcnss_prealloc_get(size); - if(NULL != pmem) + if(NULL != pmem) return pmem; } #endif return kmalloc(size, flags); -} +} v_VOID_t vos_mem_free( v_VOID_t *ptr ) { @@ -334,7 +334,7 @@ v_VOID_t vos_mem_zero( v_VOID_t *ptr, v_SIZE_t numBytes ) return; } memset(ptr, 0, numBytes); - + } @@ -384,7 +384,7 @@ v_VOID_t vos_mem_move( v_VOID_t *pDst, const v_VOID_t *pSrc, v_SIZE_t numBytes ) } v_BOOL_t vos_mem_compare( v_VOID_t *pMemory1, v_VOID_t *pMemory2, v_U32_t numBytes ) -{ +{ if (0 == numBytes) { // special case where pMemory1 or pMemory2 can be NULL @@ -400,38 +400,38 @@ v_BOOL_t vos_mem_compare( v_VOID_t *pMemory1, v_VOID_t *pMemory2, v_U32_t numByt return VOS_FALSE; } return (memcmp(pMemory1, pMemory2, numBytes)?VOS_FALSE:VOS_TRUE); -} +} v_SINT_t vos_mem_compare2( v_VOID_t *pMemory1, v_VOID_t *pMemory2, v_U32_t numBytes ) -{ +{ return( (v_SINT_t) memcmp( pMemory1, pMemory2, numBytes ) ); } /*---------------------------------------------------------------------------- - + \brief vos_mem_dma_malloc() - vOSS DMA Memory Allocation - This function will dynamicallly allocate the specified number of bytes of + This function will dynamicallly allocate the specified number of bytes of memory. This memory will have special attributes making it DMA friendly i.e. - it will exist in contiguous, 32-byte aligned uncached memory. A normal - vos_mem_malloc does not yield memory with these attributes. + it will exist in contiguous, 32-byte aligned uncached memory. A normal + vos_mem_malloc does not yield memory with these attributes. NOTE: the special DMA friendly memory is very scarce and this API must be used sparingly - On WM, there is nothing special about this memory. SDHC allocates the + On WM, there is nothing special about this memory. SDHC allocates the DMA friendly buffer and copies the data into it - - \param size - the number of bytes of memory to allocate. - - \return Upon successful allocate, returns a non-NULL pointer to the - allocated memory. If this function is unable to allocate the amount of + + \param size - the number of bytes of memory to allocate. + + \return Upon successful allocate, returns a non-NULL pointer to the + allocated memory. If this function is unable to allocate the amount of memory specified (for any reason) it returns NULL. - + \sa - + --------------------------------------------------------------------------*/ #ifdef MEMORY_DEBUG v_VOID_t * vos_mem_dma_malloc_debug( v_SIZE_t size, char* fileName, v_U32_t lineNum) @@ -446,7 +446,7 @@ v_VOID_t * vos_mem_dma_malloc_debug( v_SIZE_t size, char* fileName, v_U32_t line return NULL; } - new_size = size + sizeof(struct s_vos_mem_struct) + 8; + new_size = size + sizeof(struct s_vos_mem_struct) + 8; memStruct = (struct s_vos_mem_struct*)kmalloc(new_size,GFP_KERNEL); @@ -466,11 +466,11 @@ v_VOID_t * vos_mem_dma_malloc_debug( v_SIZE_t size, char* fileName, v_U32_t line spin_unlock(&vosMemList.lock); if(VOS_STATUS_SUCCESS != vosStatus) { - VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_ERROR, + VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_ERROR, "%s: Unable to insert node into List vosStatus %d", __func__, vosStatus); } - memPtr = (v_VOID_t*)(memStruct + 1); + memPtr = (v_VOID_t*)(memStruct + 1); } return memPtr; @@ -491,14 +491,14 @@ v_VOID_t vos_mem_dma_free( v_VOID_t *ptr ) { if(0 == vos_mem_compare(memStruct->header, &WLAN_MEM_HEADER[0], sizeof(WLAN_MEM_HEADER)) ) { - VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_FATAL, - "Memory Header is corrupted. MemInfo: Filename %s, LineNum %d", + VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_FATAL, + "Memory Header is corrupted. MemInfo: Filename %s, LineNum %d", memStruct->fileName, (int)memStruct->lineNum); } if(0 == vos_mem_compare( (v_U8_t*)ptr + memStruct->size, &WLAN_MEM_TAIL[0], sizeof(WLAN_MEM_TAIL ) ) ) { - VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_FATAL, - "Memory Trailer is corrupted. MemInfo: Filename %s, LineNum %d", + VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_FATAL, + "Memory Trailer is corrupted. MemInfo: Filename %s, LineNum %d", memStruct->fileName, (int)memStruct->lineNum); } kfree((v_VOID_t*)memStruct); @@ -517,21 +517,21 @@ v_VOID_t* vos_mem_dma_malloc( v_SIZE_t size ) } /*---------------------------------------------------------------------------- - + \brief vos_mem_dma_free() - vOSS DMA Free Memory This function will free special DMA friendly memory pointed to by 'ptr'. On WM, there is nothing special about the memory being free'd. SDHC will take care of free'ing the DMA friendly buffer - - \param ptr - pointer to the starting address of the memory to be - free'd. - + + \param ptr - pointer to the starting address of the memory to be + free'd. + \return Nothing - + \sa - + --------------------------------------------------------------------------*/ v_VOID_t vos_mem_dma_free( v_VOID_t *ptr ) { diff --git a/CORE/VOSS/src/vos_mq.c b/CORE/VOSS/src/vos_mq.c index 6553aedebbda..b585064f39fb 100644 --- a/CORE/VOSS/src/vos_mq.c +++ b/CORE/VOSS/src/vos_mq.c @@ -26,13 +26,13 @@ */ /**========================================================================= - + \file vos_mq.c - + \brief virtual Operating System Services (vOSS) message queue APIs - + Message Queue Definitions and API - + ========================================================================*/ /* $Header$ */ @@ -44,46 +44,46 @@ #include "vos_sched.h" #include <vos_api.h> -/*-------------------------------------------------------------------------- +/*-------------------------------------------------------------------------- Preprocessor definitions and constants ------------------------------------------------------------------------*/ -/*-------------------------------------------------------------------------- +/*-------------------------------------------------------------------------- Type declarations ------------------------------------------------------------------------*/ - -/*------------------------------------------------------------------------- + +/*------------------------------------------------------------------------- Function declarations and documenation ------------------------------------------------------------------------*/ - + /*--------------------------------------------------------------------------- - - \brief vos_mq_init() - Initialize the vOSS Scheduler - + + \brief vos_mq_init() - Initialize the vOSS Scheduler + The \a vos_mq_init() function initializes the Message queue. - + \param pMq - pointer to the message queue - - \return VOS_STATUS_SUCCESS - Message queue was successfully initialized and + + \return VOS_STATUS_SUCCESS - Message queue was successfully initialized and is ready to be used. - + VOS_STATUS_E_RESOURCES - Invalid parameter passed to the message queue initialize function. - + \sa vos_mq_init() - + ---------------------------------------------------------------------------*/ __inline VOS_STATUS vos_mq_init(pVosMqType pMq) { /* Some quick sanity check*/ if (pMq == NULL) { - VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_ERROR, + VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_ERROR, "%s: NULL pointer passed",__func__); return VOS_STATUS_E_FAILURE; } - /* + /* ** Now initialize the lock */ spin_lock_init(&pMq->mqLock); @@ -94,29 +94,29 @@ __inline VOS_STATUS vos_mq_init(pVosMqType pMq) INIT_LIST_HEAD(&pMq->mqList); return VOS_STATUS_SUCCESS; - + } /* vos_mq_init()*/ /*--------------------------------------------------------------------------- - - \brief vos_mq_deinit() - DeInitialize the vOSS Scheduler - + + \brief vos_mq_deinit() - DeInitialize the vOSS Scheduler + The \a vos_mq_init() function de-initializes the Message queue. - + \param pMq - pointer to the message queue - + \return None - + \sa vos_mq_deinit() - + ---------------------------------------------------------------------------*/ __inline void vos_mq_deinit(pVosMqType pMq) { - /* + /* ** Some quick sanity check */ if (pMq == NULL) { - VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_ERROR, + VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_ERROR, "%s: NULL pointer passed",__func__); return ; } @@ -127,29 +127,29 @@ __inline void vos_mq_deinit(pVosMqType pMq) /*--------------------------------------------------------------------------- - - \brief vos_mq_put() - Add a message to the message queue - + + \brief vos_mq_put() - Add a message to the message queue + The \a vos_mq_put() function add a message to the Message queue. - + \param pMq - pointer to the message queue - + \param pMsgWrapper - Msg Wrapper containing the message - + \return None - + \sa vos_mq_put() - + ---------------------------------------------------------------------------*/ __inline void vos_mq_put(pVosMqType pMq, pVosMsgWrapper pMsgWrapper) { unsigned long flags; - /* + /* ** Some quick sanity check */ if ((pMq == NULL) || (pMsgWrapper == NULL)) { - VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_ERROR, + VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_ERROR, "%s: NULL pointer passed",__func__); return ; } @@ -164,35 +164,35 @@ __inline void vos_mq_put(pVosMqType pMq, pVosMsgWrapper pMsgWrapper) /*--------------------------------------------------------------------------- - - \brief vos_mq_get() - Get a message with its wrapper from a message queue - - The \a vos_mq_get() function retrieve a message with its wrapper from + + \brief vos_mq_get() - Get a message with its wrapper from a message queue + + The \a vos_mq_get() function retrieve a message with its wrapper from the Message queue. - + \param pMq - pointer to the message queue - + \return pointer to the Message Wrapper - + \sa vos_mq_get() - + ---------------------------------------------------------------------------*/ __inline pVosMsgWrapper vos_mq_get(pVosMqType pMq) { pVosMsgWrapper pMsgWrapper = NULL; - /* + /* ** Some quick sanity check */ struct list_head * listptr; unsigned long flags; - + if (pMq == NULL) { - VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_ERROR, + VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_ERROR, "%s: NULL pointer passed",__func__); return NULL; } - + spin_lock_irqsave(&pMq->mqLock, flags); if( list_empty(&pMq->mqList) ) @@ -215,29 +215,29 @@ __inline pVosMsgWrapper vos_mq_get(pVosMqType pMq) /*--------------------------------------------------------------------------- - + \brief vos_is_mq_empty() - Return if the MQ is empty - + The \a vos_is_mq_empty() returns true if the queue is empty - + \param pMq - pointer to the message queue - + \return pointer to the Message Wrapper - + \sa vos_mq_get() - + ---------------------------------------------------------------------------*/ __inline v_BOOL_t vos_is_mq_empty(pVosMqType pMq) { v_BOOL_t state = VOS_FALSE; unsigned long flags; - /* + /* ** Some quick sanity check */ if (pMq == NULL) { - VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_ERROR, + VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_ERROR, "%s: NULL pointer passed",__func__); return VOS_STATUS_E_FAILURE; } @@ -249,5 +249,3 @@ __inline v_BOOL_t vos_is_mq_empty(pVosMqType pMq) return state; } /* vos_mq_get() */ - - diff --git a/CORE/VOSS/src/vos_packet.c b/CORE/VOSS/src/vos_packet.c index c7d527eb9ee3..78c556469739 100644 --- a/CORE/VOSS/src/vos_packet.c +++ b/CORE/VOSS/src/vos_packet.c @@ -44,7 +44,7 @@ #include <i_vos_packet.h> #include <vos_timer.h> #include <vos_trace.h> -#include <wlan_hdd_main.h> +#include <wlan_hdd_main.h> #ifdef QCA_WIFI_2_0 #include "adf_nbuf.h" #include "vos_memory.h" @@ -281,7 +281,7 @@ static VOS_STATUS vos_pkti_list_destroy( struct list_head *pList ) if (unlikely(NULL == pList)) { - // something is fishy -- don't even bother trying + // something is fishy -- don't even bother trying // clean up this list since it is apparently hosed VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_FATAL, "VPKT [%d]: NULL pList", __LINE__); @@ -437,15 +437,15 @@ static char *vos_pkti_packet_type_str(VOS_PKT_TYPE pktType) case VOS_PKT_TYPE_TX_802_11_MGMT: return "TX_802_11_MGMT"; break; - + case VOS_PKT_TYPE_TX_802_11_DATA: return "TX_802_11_DATA"; break; - + case VOS_PKT_TYPE_TX_802_3_DATA: return "TX_802_3_DATA"; break; - + case VOS_PKT_TYPE_RX_RAW: return "RX_RAW"; break; @@ -453,7 +453,7 @@ static char *vos_pkti_packet_type_str(VOS_PKT_TYPE pktType) default: return "UNKNOWN"; break; - } + } } #endif // defined( WLAN_DEBUG ) @@ -564,7 +564,7 @@ VOS_STATUS vos_packet_open( v_VOID_t *pVosContext, WPAL_PACKET_SET_METAINFO_POINTER(&(pPkt->palPacket), (void*)&pVosPacketContext->rxMetaInfo[idx]); - WPAL_PACKET_SET_TYPE(&(pPkt->palPacket), + WPAL_PACKET_SET_TYPE(&(pPkt->palPacket), eWLAN_PAL_PKT_TYPE_RX_RAW); if (VOS_STATUS_SUCCESS != vosStatus) @@ -595,7 +595,7 @@ VOS_STATUS vos_packet_open( v_VOID_t *pVosContext, vosStatus = vos_pkti_packet_init(pPkt, VOS_PKT_TYPE_TX_802_3_DATA); WPAL_PACKET_SET_METAINFO_POINTER(&(pPkt->palPacket), (void*)&pVosPacketContext->txDataMetaInfo[idx]); - WPAL_PACKET_SET_TYPE(&(pPkt->palPacket), + WPAL_PACKET_SET_TYPE(&(pPkt->palPacket), eWLAN_PAL_PKT_TYPE_TX_802_3_DATA); if (VOS_STATUS_SUCCESS != vosStatus) { @@ -627,7 +627,7 @@ VOS_STATUS vos_packet_open( v_VOID_t *pVosContext, WPAL_PACKET_SET_METAINFO_POINTER(&(pPkt->palPacket), (void*)&pVosPacketContext->txMgmtMetaInfo[idx]); - WPAL_PACKET_SET_TYPE(&(pPkt->palPacket), + WPAL_PACKET_SET_TYPE(&(pPkt->palPacket), eWLAN_PAL_PKT_TYPE_TX_802_11_MGMT); if (VOS_STATUS_SUCCESS != vosStatus) @@ -1208,7 +1208,7 @@ VOS_STATUS vos_pkt_set_os_packet( vos_pkt_t *pPacket, // attach pPacket->pSkb = (struct sk_buff *) pOSPacket; - + return VOS_STATUS_SUCCESS; } @@ -1474,7 +1474,7 @@ VOS_STATUS vos_pkt_return_packet( vos_pkt_t *pPacket ) return VOS_STATUS_E_INVAL; } - //If an skb is attached then reset the pointers + //If an skb is attached then reset the pointers if (pPacket->pSkb) { pPacket->pSkb->len = 0; @@ -1509,7 +1509,7 @@ VOS_STATUS vos_pkt_return_packet( vos_pkt_t *pPacket ) break; case VOS_PKT_TYPE_TX_802_11_MGMT: - + pPktFreeList = &gpVosPacketContext->txMgmtFreeList; pLowResourceInfo = &gpVosPacketContext->txMgmtLowResourceInfo; mlock = &gpVosPacketContext->txMgmtFreeListLock; @@ -1536,7 +1536,7 @@ VOS_STATUS vos_pkt_return_packet( vos_pkt_t *pPacket ) // is there a low resource condition pending for this packet type? if (pLowResourceInfo && pLowResourceInfo->callback) { - // pLowResourceInfo->callback is modified from threads (different CPU's). + // pLowResourceInfo->callback is modified from threads (different CPU's). // So a mutex is enough to protect is against a race condition. // mutex is SMP safe mutex_lock(mlock); @@ -1572,7 +1572,7 @@ VOS_STATUS vos_pkt_return_packet( vos_pkt_t *pPacket ) lowResource = VOS_TRUE; } } - + if(!lowResource) { @@ -1600,7 +1600,7 @@ VOS_STATUS vos_pkt_return_packet( vos_pkt_t *pPacket ) // see if we need to replenish the Rx Raw pool if (VOS_PKT_TYPE_RX_RAW == packetType) { - vos_pkti_replenish_raw_pool(); + vos_pkti_replenish_raw_pool(); } return VOS_STATUS_SUCCESS; } @@ -1860,10 +1860,10 @@ VOS_STATUS vos_pkt_extract_data( vos_pkt_t *pPacket, // get number of bytes requested len = *pOutputBufferSize; - // if 0 is input in the *pOutputBufferSize, then the user wants us to - // extract *all* the data in the buffer. Otherwise, the user has - // specified the output buffer size in *pOutputBufferSize. In the - // case where the output buffer size is specified, let's validate that + // if 0 is input in the *pOutputBufferSize, then the user wants us to + // extract *all* the data in the buffer. Otherwise, the user has + // specified the output buffer size in *pOutputBufferSize. In the + // case where the output buffer size is specified, let's validate that // it is big enough. // // \note: i'm not crazy about this. we should enforce the output @@ -2376,7 +2376,7 @@ VOS_STATUS vos_pkt_reserve_head( vos_pkt_t *pPacket, "VPKT [%d]: Insufficient headroom, " "head[%p], data[%p], req[%d]", __LINE__, skb->head, skb->data, dataSize); - + if ((newskb = skb_realloc_headroom(skb, dataSize)) == NULL) { VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_FATAL, "VPKT [%d]: Failed to realloc headroom", __LINE__); @@ -2410,9 +2410,9 @@ VOS_STATUS vos_pkt_reserve_head( vos_pkt_t *pPacket, Upon successful return, the length of the voss Packet is increased by dataSize. - + Same as above APi but no memset to 0 at the end. - + < put a before / after picture here> \param pPacket - the voss Packet to modify. @@ -2458,7 +2458,7 @@ VOS_STATUS vos_pkt_reserve_head_fast( vos_pkt_t *pPacket, "VPKT [%d]: Insufficient headroom, " "head[%p], data[%p], req[%d]", __LINE__, skb->head, skb->data, dataSize); - + if ((newskb = skb_realloc_headroom(skb, dataSize)) == NULL) { VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_FATAL, "VPKT [%d]: Failed to realloc headroom", __LINE__); @@ -3003,8 +3003,8 @@ VOS_STATUS vos_pkt_flatten_rx_pkt( vos_pkt_t **ppPacket ) } /**-------------------------------------------------------------------------- - - \brief vos_pkt_set_rx_length() - Set the length of a received packet + + \brief vos_pkt_set_rx_length() - Set the length of a received packet This API set the length of the data inside the packet after a DMA has occurred on rx, it will also set the tail pointer to the end of the data. @@ -3052,20 +3052,20 @@ VOS_STATUS vos_pkt_set_rx_length( vos_pkt_t *pPacket, } // adjust pointers (there isn't a native Linux API for this) - // ?? - is this sufficient? + // ?? - is this sufficient? skb_set_tail_pointer(skb, pktLen); skb->len = pktLen; - return VOS_STATUS_SUCCESS; + return VOS_STATUS_SUCCESS; } /**-------------------------------------------------------------------------- - + \brief vos_pkt_get_available_buffer_pool() - Get avaliable VOS packet size VOSS Packet pool is limitted resource VOSS Client need to know how many packet pool is still avaliable to control the flow - + \param pktType - Packet type want to know free buffer count VOS_PKT_TYPE_TX_802_11_MGMT, management free buffer count, VOS_PKT_TYPE_TX_802_11_DATA @@ -3073,13 +3073,13 @@ VOS_STATUS vos_pkt_set_rx_length( vos_pkt_t *pPacket, VOS_PKT_TYPE_RX_RAW, RX free buffer count vosFreeBuffer - free frame buffer size - + \return VOS_STATUS_E_INVAL - invalid input parameter VOS_STATUS_SUCCESS - Get size success - + \sa - + ----------------------------------------------------------------------------*/ VOS_STATUS vos_pkt_get_available_buffer_pool (VOS_PKT_TYPE pktType, v_SIZE_t *vosFreeBuffer) @@ -3105,7 +3105,7 @@ VOS_STATUS vos_pkt_get_available_buffer_pool (VOS_PKT_TYPE pktType, case VOS_PKT_TYPE_TX_802_3_DATA: if (VOS_STA_SAP_MODE == hdd_get_conparam()) { - *vosFreeBuffer = gpVosPacketContext->uctxDataFreeListCount; + *vosFreeBuffer = gpVosPacketContext->uctxDataFreeListCount; return VOS_STATUS_SUCCESS; } else diff --git a/CORE/VOSS/src/vos_power.c b/CORE/VOSS/src/vos_power.c index eafd72daa79e..f1e13e6d9a09 100644 --- a/CORE/VOSS/src/vos_power.c +++ b/CORE/VOSS/src/vos_power.c @@ -30,8 +30,8 @@ vos_power.c @brief - This is the interface to VOSS power APIs using for power management - of the WLAN Libra module from the MSM PMIC. These implementation of + This is the interface to VOSS power APIs using for power management + of the WLAN Libra module from the MSM PMIC. These implementation of these APIs is very target dependent, also these APIs should only be used when the WLAN Libra module is powered from the MSM PMIC and not from an external independent power source @@ -98,8 +98,8 @@ when who what, where, why @brief vos_chipPowerUp() - This API will power up the Libra chip This operation may be asynchronous. If so, the supplied callback will - be invoked when operation is complete with the result. The callback will - be called with the user supplied data. If the operation is known to be + be invoked when operation is complete with the result. The callback will + be called with the user supplied data. If the operation is known to be sync, there is no need to supply a callback and user data. The Libra SDIO core will have been initialized if the operation completes @@ -109,14 +109,14 @@ when who what, where, why @param callback [in] : user supplied callback invoked when operation completes @param user_data [in] : user supplied context callback is called with - @return - VOS_STATUS_E_INVAL - status is NULL - VOS_STATUS_E_FAULT - the operation needs to complete async and a callback + @return + VOS_STATUS_E_INVAL - status is NULL + VOS_STATUS_E_FAULT - the operation needs to complete async and a callback and user_data has not been specified (status will be - set to VOS_CALL_ASYNC) + set to VOS_CALL_ASYNC) VOS_STATUS_E_ALREADY - operation needs to complete async but another request - is already in progress (status will be set to VOS_CALL_ASYNC) - VOS_STATUS_E_FAILURE - operation failed (status will be set appropriately) + is already in progress (status will be set to VOS_CALL_ASYNC) + VOS_STATUS_E_FAILURE - operation failed (status will be set appropriately) VOS_STATUS_SUCCESS - operation completed successfully if status is SYNC (will be set) OR operation started successfully if status is ASYNC (will be set) @@ -135,22 +135,22 @@ VOS_STATUS vos_chipPowerUp @brief vos_chipPowerDown() - This API will power down the Libra chip This operation may be asynchronous. If so, the supplied callback will - be invoked when operation is complete with the result. The callback will - be called with the user supplied data. If the operation is known to be + be invoked when operation is complete with the result. The callback will + be called with the user supplied data. If the operation is known to be sync, there is no need to supply a callback and user data. @param status [out] : whether this operation will complete sync or async @param callback [in] : user supplied callback invoked when operation completes @param user_data [in] : user supplied context callback is called with - @return - VOS_STATUS_E_INVAL - status is NULL - VOS_STATUS_E_FAULT - the operation needs to complete async and a callback + @return + VOS_STATUS_E_INVAL - status is NULL + VOS_STATUS_E_FAULT - the operation needs to complete async and a callback and user_data has not been specified (status will be - set to VOS_CALL_ASYNC) + set to VOS_CALL_ASYNC) VOS_STATUS_E_ALREADY - operation needs to complete async but another request - is already in progress (status will be set to VOS_CALL_ASYNC) - VOS_STATUS_E_FAILURE - operation failed (status will be set appropriately) + is already in progress (status will be set to VOS_CALL_ASYNC) + VOS_STATUS_E_FAILURE - operation failed (status will be set appropriately) VOS_STATUS_SUCCESS - operation completed successfully if status is SYNC (will be set) OR operation started successfully if status is ASYNC (will be set) @@ -169,8 +169,8 @@ VOS_STATUS vos_chipPowerDown @brief vos_chipReset() - This API will reset the Libra chip This operation may be asynchronous. If so, the supplied callback will - be invoked when operation is complete with the result. The callback will - be called with the user supplied data. If the operation is known to be + be invoked when operation is complete with the result. The callback will + be called with the user supplied data. If the operation is known to be sync, there is no need to supply a callback and user data. A hard reset will involve a powerDown followed by a PowerUp; a soft reset @@ -180,20 +180,20 @@ VOS_STATUS vos_chipPowerDown successfully @param status [out] : whether this operation will complete sync or async - @param soft [in] : VOS_TRUE if a soft reset is desired + @param soft [in] : VOS_TRUE if a soft reset is desired VOS_FALSE for a hard reset i.e. powerDown followed by powerUp @param callback [in] : user supplied callback invoked when operation completes @param user_data [in] : user supplied context callback is called with - @return - VOS_STATUS_E_INVAL - status is NULL + @return + VOS_STATUS_E_INVAL - status is NULL VOS_STATUS_E_NOSUPPORT - soft reset asked for but not supported - VOS_STATUS_E_FAULT - the operation needs to complete async and a callback + VOS_STATUS_E_FAULT - the operation needs to complete async and a callback and user_data has not been specified (status will be - set to VOS_CALL_ASYNC) + set to VOS_CALL_ASYNC) VOS_STATUS_E_ALREADY - operation needs to complete async but another request - is already in progress (status will be set to VOS_CALL_ASYNC) - VOS_STATUS_E_FAILURE - operation failed (status will be set appropriately) + is already in progress (status will be set to VOS_CALL_ASYNC) + VOS_STATUS_E_FAILURE - operation failed (status will be set appropriately) VOS_STATUS_SUCCESS - operation completed successfully if status is SYNC (will be set) OR operation started successfully if status is ASYNC (will be set) @@ -217,22 +217,22 @@ VOS_STATUS vos_chipReset @brief vos_chipVoteOnPASupply() - This API will power up the PA supply This operation may be asynchronous. If so, the supplied callback will - be invoked when operation is complete with the result. The callback will - be called with the user supplied data. If the operation is known to be + be invoked when operation is complete with the result. The callback will + be called with the user supplied data. If the operation is known to be sync, there is no need to supply a callback and user data. @param status [out] : whether this operation will complete sync or async @param callback [in] : user supplied callback invoked when operation completes @param user_data [in] : user supplied context callback is called with - @return - VOS_STATUS_E_INVAL - status is NULL - VOS_STATUS_E_FAULT - the operation needs to complete async and a callback + @return + VOS_STATUS_E_INVAL - status is NULL + VOS_STATUS_E_FAULT - the operation needs to complete async and a callback and user_data has not been specified (status will be - set to VOS_CALL_ASYNC) + set to VOS_CALL_ASYNC) VOS_STATUS_E_ALREADY - operation needs to complete async but another request - is already in progress (status will be set to VOS_CALL_ASYNC) - VOS_STATUS_E_FAILURE - operation failed (status will be set appropriately) + is already in progress (status will be set to VOS_CALL_ASYNC) + VOS_STATUS_E_FAILURE - operation failed (status will be set appropriately) VOS_STATUS_SUCCESS - operation completed successfully if status is SYNC (will be set) OR operation started successfully if status is ASYNC (will be set) @@ -249,28 +249,28 @@ VOS_STATUS vos_chipVoteOnPASupply /** - @brief vos_chipVoteOffPASupply() - This API will vote to turn off the - PA supply. Even if we succeed in voting, there is a chance PA supply will not + @brief vos_chipVoteOffPASupply() - This API will vote to turn off the + PA supply. Even if we succeed in voting, there is a chance PA supply will not be turned off. This will be treated the same as a failure. This operation may be asynchronous. If so, the supplied callback will - be invoked when operation is complete with the result. The callback will - be called with the user supplied data. If the operation is known to be + be invoked when operation is complete with the result. The callback will + be called with the user supplied data. If the operation is known to be sync, there is no need to supply a callback and user data. @param status [out] : whether this operation will complete sync or async @param callback [in] : user supplied callback invoked when operation completes @param user_data [in] : user supplied context callback is called with - @return - VOS_STATUS_E_INVAL - status is NULL - VOS_STATUS_E_FAULT - the operation needs to complete async and a callback + @return + VOS_STATUS_E_INVAL - status is NULL + VOS_STATUS_E_FAULT - the operation needs to complete async and a callback and user_data has not been specified (status will be - set to VOS_CALL_ASYNC) + set to VOS_CALL_ASYNC) VOS_STATUS_E_ALREADY - operation needs to complete async but another request - is already in progress (status will be set to VOS_CALL_ASYNC) - VOS_STATUS_E_FAILURE - operation failed (status will be set appropriately) could be - because the voting algorithm decided not to power down PA + is already in progress (status will be set to VOS_CALL_ASYNC) + VOS_STATUS_E_FAILURE - operation failed (status will be set appropriately) could be + because the voting algorithm decided not to power down PA VOS_STATUS_SUCCESS - operation completed successfully if status is SYNC (will be set) OR operation started successfully if status is ASYNC (will be set) @@ -287,26 +287,26 @@ VOS_STATUS vos_chipVoteOffPASupply /** - @brief vos_chipAssertDeepSleep() - This API will assert the deep + @brief vos_chipAssertDeepSleep() - This API will assert the deep sleep signal to Libra This operation may be asynchronous. If so, the supplied callback will - be invoked when operation is complete with the result. The callback will - be called with the user supplied data. If the operation is known to be + be invoked when operation is complete with the result. The callback will + be called with the user supplied data. If the operation is known to be sync, there is no need to supply a callback and user data. @param status [out] : whether this operation will complete sync or async @param callback [in] : user supplied callback invoked when operation completes @param user_data [in] : user supplied context callback is called with - @return - VOS_STATUS_E_INVAL - status is NULL - VOS_STATUS_E_FAULT - the operation needs to complete async and a callback + @return + VOS_STATUS_E_INVAL - status is NULL + VOS_STATUS_E_FAULT - the operation needs to complete async and a callback and user_data has not been specified (status will be - set to VOS_CALL_ASYNC) + set to VOS_CALL_ASYNC) VOS_STATUS_E_ALREADY - operation needs to complete async but another request - is already in progress (status will be set to VOS_CALL_ASYNC) - VOS_STATUS_E_FAILURE - operation failed (status will be set appropriately) + is already in progress (status will be set to VOS_CALL_ASYNC) + VOS_STATUS_E_FAILURE - operation failed (status will be set appropriately) VOS_STATUS_SUCCESS - operation completed successfully if status is SYNC (will be set) OR operation started successfully if status is ASYNC (will be set) @@ -327,22 +327,22 @@ VOS_STATUS vos_chipAssertDeepSleep signal to Libra This operation may be asynchronous. If so, the supplied callback will - be invoked when operation is complete with the result. The callback will - be called with the user supplied data. If the operation is known to be + be invoked when operation is complete with the result. The callback will + be called with the user supplied data. If the operation is known to be sync, there is no need to supply a callback and user data. @param status [out] : whether this operation will complete sync or async @param callback [in] : user supplied callback invoked when operation completes @param user_data [in] : user supplied context callback is called with - @return - VOS_STATUS_E_INVAL - status is NULL - VOS_STATUS_E_FAULT - the operation needs to complete async and a callback + @return + VOS_STATUS_E_INVAL - status is NULL + VOS_STATUS_E_FAULT - the operation needs to complete async and a callback and user_data has not been specified (status will be - set to VOS_CALL_ASYNC) + set to VOS_CALL_ASYNC) VOS_STATUS_E_ALREADY - operation needs to complete async but another request - is already in progress (status will be set to VOS_CALL_ASYNC) - VOS_STATUS_E_FAILURE - operation failed (status will be set appropriately) + is already in progress (status will be set to VOS_CALL_ASYNC) + VOS_STATUS_E_FAILURE - operation failed (status will be set appropriately) VOS_STATUS_SUCCESS - operation completed successfully if status is SYNC (will be set) OR operation started successfully if status is ASYNC (will be set) @@ -362,22 +362,22 @@ VOS_STATUS vos_chipDeAssertDeepSleep after exit from deep sleep. This operation may be asynchronous. If so, the supplied callback will - be invoked when operation is complete with the result. The callback will - be called with the user supplied data. If the operation is known to be + be invoked when operation is complete with the result. The callback will + be called with the user supplied data. If the operation is known to be sync, there is no need to supply a callback and user data. @param status [out] : whether this operation will complete sync or async @param callback [in] : user supplied callback invoked when operation completes @param user_data [in] : user supplied context callback is called with - @return - VOS_STATUS_E_INVAL - status is NULL - VOS_STATUS_E_FAULT - the operation needs to complete async and a callback + @return + VOS_STATUS_E_INVAL - status is NULL + VOS_STATUS_E_FAULT - the operation needs to complete async and a callback and user_data has not been specified (status will be - set to VOS_CALL_ASYNC) + set to VOS_CALL_ASYNC) VOS_STATUS_E_ALREADY - operation needs to complete async but another request - is already in progress (status will be set to VOS_CALL_ASYNC) - VOS_STATUS_E_FAILURE - operation failed (status will be set appropriately) + is already in progress (status will be set to VOS_CALL_ASYNC) + VOS_STATUS_E_FAILURE - operation failed (status will be set appropriately) VOS_STATUS_SUCCESS - operation completed successfully if status is SYNC (will be set) OR operation started successfully if status is ASYNC (will be set) @@ -396,22 +396,22 @@ VOS_STATUS vos_chipExitDeepSleepVREGHandler @brief vos_chipVoteOnRFSupply() - This API will power up the RF supply This operation may be asynchronous. If so, the supplied callback will - be invoked when operation is complete with the result. The callback will - be called with the user supplied data. If the operation is known to be + be invoked when operation is complete with the result. The callback will + be called with the user supplied data. If the operation is known to be sync, there is no need to supply a callback and user data. @param status [out] : whether this operation will complete sync or async @param callback [in] : user supplied callback invoked when operation completes @param user_data [in] : user supplied context callback is called with - @return - VOS_STATUS_E_INVAL - status is NULL - VOS_STATUS_E_FAULT - the operation needs to complete async and a callback + @return + VOS_STATUS_E_INVAL - status is NULL + VOS_STATUS_E_FAULT - the operation needs to complete async and a callback and user_data has not been specified (status will be - set to VOS_CALL_ASYNC) + set to VOS_CALL_ASYNC) VOS_STATUS_E_ALREADY - operation needs to complete async but another request - is already in progress (status will be set to VOS_CALL_ASYNC) - VOS_STATUS_E_FAILURE - operation failed (status will be set appropriately) + is already in progress (status will be set to VOS_CALL_ASYNC) + VOS_STATUS_E_FAILURE - operation failed (status will be set appropriately) VOS_STATUS_SUCCESS - operation completed successfully if status is SYNC (will be set) OR operation started successfully if status is ASYNC (will be set) @@ -427,28 +427,28 @@ VOS_STATUS vos_chipVoteOnRFSupply } /** - @brief vos_chipVoteOffRFSupply() - This API will vote to turn off the - RF supply. Even if we succeed in voting, there is a chance RF supply will not + @brief vos_chipVoteOffRFSupply() - This API will vote to turn off the + RF supply. Even if we succeed in voting, there is a chance RF supply will not be turned off as RF rails could be shared with other modules (outside WLAN) This operation may be asynchronous. If so, the supplied callback will - be invoked when operation is complete with the result. The callback will - be called with the user supplied data. If the operation is known to be + be invoked when operation is complete with the result. The callback will + be called with the user supplied data. If the operation is known to be sync, there is no need to supply a callback and user data. @param status [out] : whether this operation will complete sync or async @param callback [in] : user supplied callback invoked when operation completes @param user_data [in] : user supplied context callback is called with - @return - VOS_STATUS_E_INVAL - status is NULL - VOS_STATUS_E_FAULT - the operation needs to complete async and a callback + @return + VOS_STATUS_E_INVAL - status is NULL + VOS_STATUS_E_FAULT - the operation needs to complete async and a callback and user_data has not been specified (status will be - set to VOS_CALL_ASYNC) + set to VOS_CALL_ASYNC) VOS_STATUS_E_ALREADY - operation needs to complete async but another request - is already in progress (status will be set to VOS_CALL_ASYNC) - VOS_STATUS_E_FAILURE - operation failed (status will be set appropriately) could be - because the voting algorithm decided not to power down PA + is already in progress (status will be set to VOS_CALL_ASYNC) + VOS_STATUS_E_FAILURE - operation failed (status will be set appropriately) could be + because the voting algorithm decided not to power down PA VOS_STATUS_SUCCESS - operation completed successfully if status is SYNC (will be set) OR operation started successfully if status is ASYNC (will be set) @@ -468,22 +468,22 @@ VOS_STATUS vos_chipVoteOffRFSupply used by Base band Analog. This operation may be asynchronous. If so, the supplied callback will - be invoked when operation is complete with the result. The callback will - be called with the user supplied data. If the operation is known to be + be invoked when operation is complete with the result. The callback will + be called with the user supplied data. If the operation is known to be sync, there is no need to supply a callback and user data. @param status [out] : whether this operation will complete sync or async @param callback [in] : user supplied callback invoked when operation completes @param user_data [in] : user supplied context callback is called with - @return - VOS_STATUS_E_INVAL - status is NULL - VOS_STATUS_E_FAULT - the operation needs to complete async and a callback + @return + VOS_STATUS_E_INVAL - status is NULL + VOS_STATUS_E_FAULT - the operation needs to complete async and a callback and user_data has not been specified (status will be - set to VOS_CALL_ASYNC) + set to VOS_CALL_ASYNC) VOS_STATUS_E_ALREADY - operation needs to complete async but another request - is already in progress (status will be set to VOS_CALL_ASYNC) - VOS_STATUS_E_FAILURE - operation failed (status will be set appropriately) + is already in progress (status will be set to VOS_CALL_ASYNC) + VOS_STATUS_E_FAILURE - operation failed (status will be set appropriately) VOS_STATUS_SUCCESS - operation completed successfully if status is SYNC (will be set) OR operation started successfully if status is ASYNC (will be set) @@ -502,23 +502,23 @@ VOS_STATUS vos_chipVoteOnBBAnalogSupply @brief vos_chipVoteOffBBAnalogSupply() - This API will vote off the BB Analog supply. This operation may be asynchronous. If so, the supplied callback will - be invoked when operation is complete with the result. The callback will - be called with the user supplied data. If the operation is known to be + be invoked when operation is complete with the result. The callback will + be called with the user supplied data. If the operation is known to be sync, there is no need to supply a callback and user data. @param status [out] : whether this operation will complete sync or async @param callback [in] : user supplied callback invoked when operation completes @param user_data [in] : user supplied context callback is called with - @return - VOS_STATUS_E_INVAL - status is NULL - VOS_STATUS_E_FAULT - the operation needs to complete async and a callback + @return + VOS_STATUS_E_INVAL - status is NULL + VOS_STATUS_E_FAULT - the operation needs to complete async and a callback and user_data has not been specified (status will be - set to VOS_CALL_ASYNC) + set to VOS_CALL_ASYNC) VOS_STATUS_E_ALREADY - operation needs to complete async but another request - is already in progress (status will be set to VOS_CALL_ASYNC) - VOS_STATUS_E_FAILURE - operation failed (status will be set appropriately) could be - because the voting algorithm decided not to power down PA + is already in progress (status will be set to VOS_CALL_ASYNC) + VOS_STATUS_E_FAILURE - operation failed (status will be set appropriately) could be + because the voting algorithm decided not to power down PA VOS_STATUS_SUCCESS - operation completed successfully if status is SYNC (will be set) OR operation started successfully if status is ASYNC (will be set) @@ -538,22 +538,22 @@ VOS_STATUS vos_chipVoteOffBBAnalogSupply PMIC. This API will be used when Libra uses the TCXO from PMIC on the MSM This operation may be asynchronous. If so, the supplied callback will - be invoked when operation is complete with the result. The callback will - be called with the user supplied data. If the operation is known to be + be invoked when operation is complete with the result. The callback will + be called with the user supplied data. If the operation is known to be sync, there is no need to supply a callback and user data. @param status [out] : whether this operation will complete sync or async @param callback [in] : user supplied callback invoked when operation completes @param user_data [in] : user supplied context callback is called with - @return - VOS_STATUS_E_INVAL - status is NULL - VOS_STATUS_E_FAULT - the operation needs to complete async and a callback + @return + VOS_STATUS_E_INVAL - status is NULL + VOS_STATUS_E_FAULT - the operation needs to complete async and a callback and user_data has not been specified (status will be - set to VOS_CALL_ASYNC) + set to VOS_CALL_ASYNC) VOS_STATUS_E_ALREADY - operation needs to complete async but another request - is already in progress (status will be set to VOS_CALL_ASYNC) - VOS_STATUS_E_FAILURE - operation failed (status will be set appropriately) + is already in progress (status will be set to VOS_CALL_ASYNC) + VOS_STATUS_E_FAILURE - operation failed (status will be set appropriately) VOS_STATUS_SUCCESS - operation completed successfully if status is SYNC (will be set) OR operation started successfully if status is ASYNC (will be set) @@ -572,23 +572,23 @@ VOS_STATUS vos_chipVoteOnXOBuffer @brief vos_chipVoteOffXOBuffer() - This API will vote off PMIC XO buffer. This operation may be asynchronous. If so, the supplied callback will - be invoked when operation is complete with the result. The callback will - be called with the user supplied data. If the operation is known to be + be invoked when operation is complete with the result. The callback will + be called with the user supplied data. If the operation is known to be sync, there is no need to supply a callback and user data. @param status [out] : whether this operation will complete sync or async @param callback [in] : user supplied callback invoked when operation completes @param user_data [in] : user supplied context callback is called with - @return - VOS_STATUS_E_INVAL - status is NULL - VOS_STATUS_E_FAULT - the operation needs to complete async and a callback + @return + VOS_STATUS_E_INVAL - status is NULL + VOS_STATUS_E_FAULT - the operation needs to complete async and a callback and user_data has not been specified (status will be - set to VOS_CALL_ASYNC) + set to VOS_CALL_ASYNC) VOS_STATUS_E_ALREADY - operation needs to complete async but another request - is already in progress (status will be set to VOS_CALL_ASYNC) - VOS_STATUS_E_FAILURE - operation failed (status will be set appropriately) could be - because the voting algorithm decided not to power down PA + is already in progress (status will be set to VOS_CALL_ASYNC) + VOS_STATUS_E_FAILURE - operation failed (status will be set appropriately) could be + because the voting algorithm decided not to power down PA VOS_STATUS_SUCCESS - operation completed successfully if status is SYNC (will be set) OR operation started successfully if status is ASYNC (will be set) @@ -607,8 +607,8 @@ VOS_STATUS vos_chipVoteOffXOBuffer @brief vos_chipVoteXOCore - This API will vote PMIC XO Core. This operation may be asynchronous. If so, the supplied callback will - be invoked when operation is complete with the result. The callback will - be called with the user supplied data. If the operation is known to be + be invoked when operation is complete with the result. The callback will + be called with the user supplied data. If the operation is known to be sync, there is no need to supply a callback and user data. @param status [out] : whether this operation will complete sync or async @@ -616,15 +616,15 @@ VOS_STATUS vos_chipVoteOffXOBuffer @param user_data [in] : user supplied context callback is called with @param force_enable [in] : Force enable XO CORE or not - @return - VOS_STATUS_E_INVAL - status is NULL - VOS_STATUS_E_FAULT - the operation needs to complete async and a callback + @return + VOS_STATUS_E_INVAL - status is NULL + VOS_STATUS_E_FAULT - the operation needs to complete async and a callback and user_data has not been specified (status will be - set to VOS_CALL_ASYNC) + set to VOS_CALL_ASYNC) VOS_STATUS_E_ALREADY - operation needs to complete async but another request - is already in progress (status will be set to VOS_CALL_ASYNC) - VOS_STATUS_E_FAILURE - operation failed (status will be set appropriately) could be - because the voting algorithm decided not to power down PA + is already in progress (status will be set to VOS_CALL_ASYNC) + VOS_STATUS_E_FAILURE - operation failed (status will be set appropriately) could be + because the voting algorithm decided not to power down PA VOS_STATUS_SUCCESS - operation completed successfully if status is SYNC (will be set) OR operation started successfully if status is ASYNC (will be set) @@ -644,30 +644,30 @@ VOS_STATUS vos_chipVoteXOCore /** @brief vos_chipVoteFreqFor1p3VSupply() - This API will vote for frequency for 1.3V RF supply. - + This operation may be asynchronous. If so, the supplied callback will - be invoked when operation is complete with the result. The callback will - be called with the user supplied data. If the operation is known to be + be invoked when operation is complete with the result. The callback will + be called with the user supplied data. If the operation is known to be sync, there is no need to supply a callback and user data. EVM issue is observed with 1.6Mhz freq for 1.3V supply in wlan standalone case. - During concurrent operation (e.g. WLAN and WCDMA) this issue is not observed. + During concurrent operation (e.g. WLAN and WCDMA) this issue is not observed. To workaround, wlan will vote for 3.2Mhz during startup and will vote for 1.6Mhz during exit. - + @param status [out] : whether this operation will complete sync or async @param callback [in] : user supplied callback invoked when operation completes @param user_data [in] : user supplied context callback is called with @param freq [in] : Frequency for 1.3V Supply for which WLAN driver needs to vote for. - @return - VOS_STATUS_E_INVAL - status is NULL - VOS_STATUS_E_FAULT - the operation needs to complete async and a callback + @return + VOS_STATUS_E_INVAL - status is NULL + VOS_STATUS_E_FAULT - the operation needs to complete async and a callback and user_data has not been specified (status will be - set to VOS_CALL_ASYNC) + set to VOS_CALL_ASYNC) VOS_STATUS_E_ALREADY - operation needs to complete async but another request - is already in progress (status will be set to VOS_CALL_ASYNC) - VOS_STATUS_E_FAILURE - operation failed (status will be set appropriately) could be - because the voting algorithm decided not to power down PA + is already in progress (status will be set to VOS_CALL_ASYNC) + VOS_STATUS_E_FAILURE - operation failed (status will be set appropriately) could be + because the voting algorithm decided not to power down PA VOS_STATUS_SUCCESS - operation completed successfully if status is SYNC (will be set) OR operation started successfully if status is ASYNC (will be set) diff --git a/CORE/VOSS/src/vos_sched.c b/CORE/VOSS/src/vos_sched.c index 4109c5877ab6..ef0eebcfe5a7 100644 --- a/CORE/VOSS/src/vos_sched.c +++ b/CORE/VOSS/src/vos_sched.c @@ -281,7 +281,7 @@ vos_sched_open //Create the VOSS Main Controller thread pSchedContext->McThread = kthread_create(VosMCThread, pSchedContext, "VosMCThread"); - if (IS_ERR(pSchedContext->McThread)) + if (IS_ERR(pSchedContext->McThread)) { VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_FATAL, "%s: Could not Create VOSS Main Thread Controller",__func__); @@ -293,7 +293,7 @@ vos_sched_open pSchedContext->TxThread = kthread_create(VosTXThread, pSchedContext, "VosTXThread"); - if (IS_ERR(pSchedContext->TxThread)) + if (IS_ERR(pSchedContext->TxThread)) { VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_FATAL, "%s: Could not Create VOSS TX Thread",__func__); @@ -305,7 +305,7 @@ vos_sched_open pSchedContext->RxThread = kthread_create(VosRXThread, pSchedContext, "VosRXThread"); - if (IS_ERR(pSchedContext->RxThread)) + if (IS_ERR(pSchedContext->RxThread)) { VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_FATAL, @@ -428,13 +428,13 @@ VOS_STATUS vos_watchdog_open //Create the Watchdog thread pWdContext->WdThread = kthread_create(VosWDThread, pWdContext,"VosWDThread"); - - if (IS_ERR(pWdContext->WdThread)) + + if (IS_ERR(pWdContext->WdThread)) { VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_FATAL, "%s: Could not Create Watchdog thread",__func__); return VOS_STATUS_E_RESOURCES; - } + } else { wake_up_process(pWdContext->WdThread); @@ -509,7 +509,7 @@ VosMCThread { // This implements the execution model algorithm retWaitStatus = wait_event_interruptible(pSchedContext->mcWaitQueue, - test_bit(MC_POST_EVENT_MASK, &pSchedContext->mcEventFlag) || + test_bit(MC_POST_EVENT_MASK, &pSchedContext->mcEventFlag) || test_bit(MC_SUSPEND_EVENT_MASK, &pSchedContext->mcEventFlag)); if(retWaitStatus == -ERESTARTSYS) @@ -532,7 +532,7 @@ VosMCThread if(test_bit(MC_SUSPEND_EVENT_MASK, &pSchedContext->mcEventFlag)) { clear_bit(MC_SUSPEND_EVENT_MASK, &pSchedContext->mcEventFlag); - + /* Unblock anyone waiting on suspend */ complete(&pHddCtx->mc_sus_event_var); } @@ -573,7 +573,7 @@ VosMCThread pWdiMsg->callback(pWdiMsg); - /* + /* ** return message to the Core */ vos_core_return_msg(pSchedContext->pVContext, pMsgWrapper); @@ -943,7 +943,7 @@ static int VosTXThread ( void * Arg ) v_CONTEXT_t pVosContext = NULL; set_user_nice(current, -1); - + #ifdef WLAN_FEATURE_11AC_HIGH_TP set_wake_up_idle(true); #endif @@ -986,7 +986,7 @@ static int VosTXThread ( void * Arg ) { // This implements the execution model algorithm retWaitStatus = wait_event_interruptible(pSchedContext->txWaitQueue, - test_bit(TX_POST_EVENT_MASK, &pSchedContext->txEventFlag) || + test_bit(TX_POST_EVENT_MASK, &pSchedContext->txEventFlag) || test_bit(TX_SUSPEND_EVENT_MASK, &pSchedContext->txEventFlag)); @@ -1009,7 +1009,7 @@ static int VosTXThread ( void * Arg ) if(test_bit(TX_SUSPEND_EVENT_MASK, &pSchedContext->txEventFlag)) { clear_bit(TX_SUSPEND_EVENT_MASK, &pSchedContext->txEventFlag); - + /* Unblock anyone waiting on suspend */ complete(&pHddCtx->tx_sus_event_var); } @@ -1091,7 +1091,7 @@ static int VosTXThread ( void * Arg ) VOS_ASSERT(0); break; } - + pWdiMsg->callback(pWdiMsg); // return message to the Core @@ -1144,7 +1144,7 @@ static int VosRXThread ( void * Arg ) VOS_STATUS vStatus = VOS_STATUS_SUCCESS; set_user_nice(current, -1); - + #ifdef WLAN_FEATURE_11AC_HIGH_TP set_wake_up_idle(true); #endif @@ -1186,7 +1186,7 @@ static int VosRXThread ( void * Arg ) { // This implements the execution model algorithm retWaitStatus = wait_event_interruptible(pSchedContext->rxWaitQueue, - test_bit(RX_POST_EVENT_MASK, &pSchedContext->rxEventFlag) || + test_bit(RX_POST_EVENT_MASK, &pSchedContext->rxEventFlag) || test_bit(RX_SUSPEND_EVENT_MASK, &pSchedContext->rxEventFlag)); @@ -1209,7 +1209,7 @@ static int VosRXThread ( void * Arg ) if(test_bit(RX_SUSPEND_EVENT_MASK, &pSchedContext->rxEventFlag)) { clear_bit(RX_SUSPEND_EVENT_MASK, &pSchedContext->rxEventFlag); - + /* Unblock anyone waiting on suspend */ complete(&pHddCtx->rx_sus_event_var); } @@ -1938,7 +1938,7 @@ void vos_sched_flush_mc_mqs ( pVosSchedContext pSchedContext ) /* Flush the WDA Mq */ while( NULL != (pMsgWrapper = vos_mq_get(&pSchedContext->wdaMcMq) )) { - if(pMsgWrapper->pVosMsg != NULL) + if(pMsgWrapper->pVosMsg != NULL) { VOS_TRACE( VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_INFO, "%s: Freeing MC WDA MSG message type %d", @@ -2238,7 +2238,7 @@ VOS_STATUS vos_watchdog_wlan_shutdown(void) /* Release the lock here */ spin_unlock(&gpVosWatchdogContext->wdLock); return VOS_STATUS_E_FAILURE; - } + } /* Set the flags so that all future CMD53 and Wext commands get blocked right away */ vos_set_logp_in_progress(VOS_MODULE_ID_VOSS, TRUE); diff --git a/CORE/VOSS/src/vos_sched.h b/CORE/VOSS/src/vos_sched.h index 78480b5a97ec..39cbf1d26916 100644 --- a/CORE/VOSS/src/vos_sched.h +++ b/CORE/VOSS/src/vos_sched.h @@ -43,24 +43,24 @@ ========================================================================*/ -/*=========================================================================== - - EDIT HISTORY FOR FILE - - - This section contains comments describing changes made to the module. - Notice that changes are listed in reverse chronological order. - - - $Header:$ $DateTime: $ $Author: $ - - - when who what, where, why +/*=========================================================================== + + EDIT HISTORY FOR FILE + + + This section contains comments describing changes made to the module. + Notice that changes are listed in reverse chronological order. + + + $Header:$ $DateTime: $ $Author: $ + + + when who what, where, why -------- --- -------------------------------------------------------- 09/15/08 lac Removed hardcoded #define for VOS_TRACE. - 06/12/08 hba Created module. - -===========================================================================*/ + 06/12/08 hba Created module. + +===========================================================================*/ /*-------------------------------------------------------------------------- Include Files @@ -92,12 +92,12 @@ #define WD_WLAN_SHUTDOWN_EVENT_MASK 0x008 #define WD_WLAN_REINIT_EVENT_MASK 0x010 - - + + /* ** Maximum number of messages in the system -** These are buffers to account for all current messages -** with some accounting of what we think is a +** These are buffers to account for all current messages +** with some accounting of what we think is a ** worst-case scenario. Must be able to handle all ** incoming frames, as well as overhead for internal ** messaging @@ -156,12 +156,12 @@ typedef struct VosTlshimPkt ** ** the messages queues ** ** the handle to the tread ** ** pointer to the events that gracefully shutdown the MC and Tx threads -** +** */ typedef struct _VosSchedContext { - /* Place holder to the VOSS Context */ - v_PVOID_t pVContext; + /* Place holder to the VOSS Context */ + v_PVOID_t pVContext; /* WDA Message queue on the Main thread*/ VosMqType wdaMcMq; @@ -212,7 +212,7 @@ typedef struct _VosSchedContext struct task_struct* McThread; /* TX Thread handle */ - + struct task_struct* TxThread; /* RX Thread handle */ @@ -220,10 +220,10 @@ typedef struct _VosSchedContext /* completion object for MC thread shutdown */ - struct completion McShutdown; + struct completion McShutdown; /* completion object for Tx thread shutdown */ - struct completion TxShutdown; + struct completion TxShutdown; /* completion object for Rx thread shutdown */ struct completion RxShutdown; @@ -242,7 +242,7 @@ typedef struct _VosSchedContext wait_queue_head_t rxWaitQueue; unsigned long rxEventFlag; - + /* Completion object to resume Mc thread */ struct completion ResumeMcEvent; @@ -303,23 +303,23 @@ typedef struct _VosSchedContext ** The watchdog context contains the following: ** The messages queues and events ** The handle to the thread -** +** */ typedef struct _VosWatchdogContext { - /* Place holder to the VOSS Context */ - v_PVOID_t pVContext; + /* Place holder to the VOSS Context */ + v_PVOID_t pVContext; /* Handle of Event for Watchdog thread to signal startup */ struct completion WdStartEvent; /* Watchdog Thread handle */ - + struct task_struct* WdThread; /* completion object for Watchdog thread shutdown */ - struct completion WdShutdown; + struct completion WdShutdown; /* Wait queue for Watchdog thread */ wait_queue_head_t wdWaitQueue; @@ -354,12 +354,12 @@ typedef struct _VosMsgWrapper typedef struct _VosContextType -{ +{ /* Messages buffers */ vos_msg_t aMsgBuffers[VOS_CORE_MAX_MESSAGES]; VosMsgWrapper aMsgWrappers[VOS_CORE_MAX_MESSAGES]; - + /* Free Message queue*/ VosMqType freeVosMq; @@ -386,7 +386,7 @@ typedef struct _VosContextType /* SAP Context */ v_VOID_t *pSAPContext; - + vos_event_t ProbeEvent; volatile v_U8_t isLogpInProgress; @@ -428,10 +428,10 @@ typedef struct _VosContextType -/*--------------------------------------------------------------------------- +/*--------------------------------------------------------------------------- Function declarations and documenation ---------------------------------------------------------------------------*/ - + #ifdef QCA_CONFIG_SMP /*--------------------------------------------------------------------------- \brief vos_drop_rxpkt_by_staid() - API to drop pending Rx packets for a sta @@ -497,76 +497,76 @@ void vos_free_tlshim_pkt_freeq(pVosSchedContext pSchedContext); int vos_sched_is_tx_thread(int threadID); int vos_sched_is_rx_thread(int threadID); /*--------------------------------------------------------------------------- - - \brief vos_sched_open() - initialize the vOSS Scheduler - + + \brief vos_sched_open() - initialize the vOSS Scheduler + The \a vos_sched_open() function initializes the vOSS Scheduler Upon successful initialization: - + - All the message queues are initialized - + - The Main Controller thread is created and ready to receive and dispatch messages. - + - The Tx thread is created and ready to receive and dispatch messages - - + + \param pVosContext - pointer to the global vOSS Context - + \param pVosSchedContext - pointer to a previously allocated buffer big - enough to hold a scheduler context. + enough to hold a scheduler context. \ - - \return VOS_STATUS_SUCCESS - Scheduler was successfully initialized and + + \return VOS_STATUS_SUCCESS - Scheduler was successfully initialized and is ready to be used. - - VOS_STATUS_E_RESOURCES - System resources (other than memory) + + VOS_STATUS_E_RESOURCES - System resources (other than memory) are unavailable to initilize the scheduler - VOS_STATUS_E_NOMEM - insufficient memory exists to initialize + VOS_STATUS_E_NOMEM - insufficient memory exists to initialize the scheduler - + VOS_STATUS_E_INVAL - Invalid parameter passed to the scheduler Open - function - - VOS_STATUS_E_FAILURE - Failure to initialize the scheduler/ - + function + + VOS_STATUS_E_FAILURE - Failure to initialize the scheduler/ + \sa vos_sched_open() - + -------------------------------------------------------------------------*/ -VOS_STATUS vos_sched_open( v_PVOID_t pVosContext, +VOS_STATUS vos_sched_open( v_PVOID_t pVosContext, pVosSchedContext pSchedCxt, v_SIZE_t SchedCtxSize); /*--------------------------------------------------------------------------- - - \brief vos_watchdog_open() - initialize the vOSS watchdog - - The \a vos_watchdog_open() function initializes the vOSS watchdog. Upon successful + + \brief vos_watchdog_open() - initialize the vOSS watchdog + + The \a vos_watchdog_open() function initializes the vOSS watchdog. Upon successful initialization, the watchdog thread is created and ready to receive and process messages. - - + + \param pVosContext - pointer to the global vOSS Context - + \param pWdContext - pointer to a previously allocated buffer big - enough to hold a watchdog context. + enough to hold a watchdog context. - \return VOS_STATUS_SUCCESS - Watchdog was successfully initialized and + \return VOS_STATUS_SUCCESS - Watchdog was successfully initialized and is ready to be used. - - VOS_STATUS_E_RESOURCES - System resources (other than memory) + + VOS_STATUS_E_RESOURCES - System resources (other than memory) are unavailable to initilize the Watchdog - VOS_STATUS_E_NOMEM - insufficient memory exists to initialize + VOS_STATUS_E_NOMEM - insufficient memory exists to initialize the Watchdog - + VOS_STATUS_E_INVAL - Invalid parameter passed to the Watchdog Open - function - - VOS_STATUS_E_FAILURE - Failure to initialize the Watchdog/ + function + + VOS_STATUS_E_FAILURE - Failure to initialize the Watchdog/ \sa vos_watchdog_open() - + -------------------------------------------------------------------------*/ VOS_STATUS vos_watchdog_open @@ -578,55 +578,55 @@ VOS_STATUS vos_watchdog_open ); /*--------------------------------------------------------------------------- - - \brief vos_sched_close() - Close the vOSS Scheduler - + + \brief vos_sched_close() - Close the vOSS Scheduler + The \a vos_sched_closes() function closes the vOSS Scheduler Upon successful closing: - + - All the message queues are flushed - + - The Main Controller thread is closed - + - The Tx thread is closed - - + + \param pVosContext - pointer to the global vOSS Context - - \return VOS_STATUS_SUCCESS - Scheduler was successfully initialized and + + \return VOS_STATUS_SUCCESS - Scheduler was successfully initialized and is ready to be used. - + VOS_STATUS_E_INVAL - Invalid parameter passed to the scheduler Open - function - - VOS_STATUS_E_FAILURE - Failure to initialize the scheduler/ - + function + + VOS_STATUS_E_FAILURE - Failure to initialize the scheduler/ + \sa vos_sched_close() - + ---------------------------------------------------------------------------*/ VOS_STATUS vos_sched_close( v_PVOID_t pVosContext); /*--------------------------------------------------------------------------- - - \brief vos_watchdog_close() - Close the vOSS Watchdog - + + \brief vos_watchdog_close() - Close the vOSS Watchdog + The \a vos_watchdog_close() function closes the vOSS Watchdog Upon successful closing: - + - The Watchdog thread is closed - - + + \param pVosContext - pointer to the global vOSS Context - - \return VOS_STATUS_SUCCESS - Watchdog was successfully initialized and + + \return VOS_STATUS_SUCCESS - Watchdog was successfully initialized and is ready to be used. - - VOS_STATUS_E_INVAL - Invalid parameter passed - - VOS_STATUS_E_FAILURE - Failure to initialize the Watchdog/ - + + VOS_STATUS_E_INVAL - Invalid parameter passed + + VOS_STATUS_E_FAILURE - Failure to initialize the Watchdog/ + \sa vos_watchdog_close() - + ---------------------------------------------------------------------------*/ VOS_STATUS vos_watchdog_close ( v_PVOID_t pVosContext ); diff --git a/CORE/VOSS/src/vos_threads.c b/CORE/VOSS/src/vos_threads.c index 7296c318a2e1..afbc9e9888da 100644 --- a/CORE/VOSS/src/vos_threads.c +++ b/CORE/VOSS/src/vos_threads.c @@ -26,11 +26,11 @@ */ /**========================================================================= - + \file vos_threads.c - + \brief virtual Operating System Services (vOSS) Threading APIs - + ========================================================================*/ /* $Header$ */ @@ -45,34 +45,34 @@ #include <linux/delay.h> #include <linux/interrupt.h> -/*-------------------------------------------------------------------------- +/*-------------------------------------------------------------------------- Preprocessor definitions and constants ------------------------------------------------------------------------*/ -/*-------------------------------------------------------------------------- +/*-------------------------------------------------------------------------- Type declarations ------------------------------------------------------------------------*/ -/*------------------------------------------------------------------------- +/*------------------------------------------------------------------------- Function declarations and documenation ------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------- - + \brief vos_sleep() - sleep The \a vos_sleep() function suspends the execution of the current thread until the specified time out interval elapses. - + \param msInterval - the number of milliseconds to suspend the current thread. A value of 0 may or may not cause the current thread to yield. - + \return Nothing. - + \sa - + --------------------------------------------------------------------------*/ v_VOID_t vos_sleep( v_U32_t msInterval ) { @@ -85,19 +85,19 @@ v_VOID_t vos_sleep( v_U32_t msInterval ) } /*---------------------------------------------------------------------------- - + \brief vos_sleep_us() - sleep The \a vos_sleep_us() function suspends the execution of the current thread until the specified time out interval elapses. - + \param usInterval - the number of microseconds to suspend the current thread. A value of 0 may or may not cause the current thread to yield. - + \return Nothing. - + \sa - + --------------------------------------------------------------------------*/ v_VOID_t vos_sleep_us( v_U32_t usInterval ) { @@ -113,19 +113,19 @@ v_VOID_t vos_sleep_us( v_U32_t usInterval ) /*---------------------------------------------------------------------------- - + \brief vos_busy_wait() - busy wait The \a vos_busy_wait() function places the current thread in busy wait until the specified time out interval elapses. If the interval is greater than 50us on WM, the behaviour is undefined. - - \param usInterval - the number of microseconds to busy wait. - + + \param usInterval - the number of microseconds to busy wait. + \return Nothing. - + \sa - + --------------------------------------------------------------------------*/ v_VOID_t vos_busy_wait( v_U32_t usInterval ) { diff --git a/CORE/VOSS/src/vos_timer.c b/CORE/VOSS/src/vos_timer.c index cbcab5e042e1..79da562f7cc4 100644 --- a/CORE/VOSS/src/vos_timer.c +++ b/CORE/VOSS/src/vos_timer.c @@ -46,7 +46,7 @@ #include "wlan_qct_sys.h" #include "vos_sched.h" -/*-------------------------------------------------------------------------- +/*-------------------------------------------------------------------------- Preprocessor definitions and constants ------------------------------------------------------------------------*/ @@ -54,7 +54,7 @@ #define LINUX_INVALID_TIMER_COOKIE 0xfeedface #define TMR_INVALID_ID ( 0 ) -/*-------------------------------------------------------------------------- +/*-------------------------------------------------------------------------- Type declarations ------------------------------------------------------------------------*/ @@ -65,7 +65,7 @@ static unsigned int persistentTimerCount; static vos_lock_t persistentTimerCountLock; // static sleep_okts_handle sleepClientHandle; -/*------------------------------------------------------------------------- +/*------------------------------------------------------------------------- Function declarations and documenation ------------------------------------------------------------------------*/ // TBD: Need to add code for deferred timers implementation @@ -112,16 +112,16 @@ static void tryAllowingSleep( VOS_TIMER_TYPE type ) static void vos_linux_timer_callback (unsigned long data) { - vos_timer_t *timer = ( vos_timer_t *)data; + vos_timer_t *timer = ( vos_timer_t *)data; vos_msg_t msg; VOS_STATUS vStatus; unsigned long flags; - + vos_timer_callback_t callback=NULL; v_PVOID_t userData=NULL; int threadId; VOS_TIMER_TYPE type=VOS_TIMER_TYPE_SW; - + VOS_ASSERT(timer); if (timer == NULL) @@ -132,7 +132,7 @@ static void vos_linux_timer_callback (unsigned long data) threadId = timer->platformInfo.threadID; spin_lock_irqsave( &timer->platformInfo.spinlock,flags ); - + switch ( timer->state ) { case VOS_TIMER_STATE_STARTING: @@ -149,7 +149,7 @@ static void vos_linux_timer_callback (unsigned long data) vStatus = VOS_STATUS_E_EXISTS; break; case VOS_TIMER_STATE_RUNNING: - // need to go to stop state here because the call-back function may restart + // need to go to stop state here because the call-back function may restart // timer (to emulate periodic timer) timer->state = VOS_TIMER_STATE_STOPPED; // copy the relevant timer information to local variables; @@ -166,79 +166,79 @@ static void vos_linux_timer_callback (unsigned long data) vStatus = VOS_STATUS_E_FAULT; break; } - + spin_unlock_irqrestore( &timer->platformInfo.spinlock,flags ); - + if ( VOS_STATUS_SUCCESS != vStatus ) { - VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_ERROR, + VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_ERROR, "TIMER callback called in a wrong state=%d", timer->state); return; } tryAllowingSleep( type ); - VOS_ASSERT( callback ); + VOS_ASSERT( callback ); - // If timer has expired then call vos_client specific callback + // If timer has expired then call vos_client specific callback if ( vos_sched_is_tx_thread( threadId ) ) { - VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_INFO, + VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_INFO, "TIMER callback: running on TX thread"); - + //Serialize to the Tx thread sysBuildMessageHeader( SYS_MSG_ID_TX_TIMER, &msg ); msg.callback = callback; msg.bodyptr = userData; msg.bodyval = 0; - + if(vos_tx_mq_serialize( VOS_MQ_ID_SYS, &msg ) == VOS_STATUS_SUCCESS) return; } else if ( vos_sched_is_rx_thread( threadId ) ) { - VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_INFO, + VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_INFO, "TIMER callback: running on RX thread"); - + //Serialize to the Rx thread sysBuildMessageHeader( SYS_MSG_ID_RX_TIMER, &msg ); msg.callback = callback; msg.bodyptr = userData; msg.bodyval = 0; - + if(vos_rx_mq_serialize( VOS_MQ_ID_SYS, &msg ) == VOS_STATUS_SUCCESS) return; } - else + else { VOS_TRACE( VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_INFO, "TIMER callback: running on MC thread"); - + // Serialize to the MC thread sysBuildMessageHeader( SYS_MSG_ID_MC_TIMER, &msg ); msg.callback = callback; msg.bodyptr = userData; msg.bodyval = 0; - + if(vos_mq_post_message( VOS_MQ_ID_SYS, &msg ) == VOS_STATUS_SUCCESS) return; - } + } - VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_ERROR, + VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_ERROR, "%s: Could not enqueue timer to any queue", __func__); VOS_ASSERT(0); } /*--------------------------------------------------------------------------- - + \brief vos_timer_getCurrentState() - Get the current state of the timer \param pTimer - the timer object - + \return timer state - + \sa - + ---------------------------------------------------------------------------*/ VOS_TIMER_STATE vos_timer_getCurrentState( vos_timer_t *pTimer ) { @@ -258,23 +258,23 @@ VOS_TIMER_STATE vos_timer_getCurrentState( vos_timer_t *pTimer ) default: VOS_ASSERT(0); return VOS_TIMER_STATE_UNUSED; - } + } } /*---------------------------------------------------------------------------- - + \brief vos_timer_module_init() - Initializes a vOSS timer module. This API initializes the VOSS timer module. This needs to be called - exactly once prior to using any VOSS timers. + exactly once prior to using any VOSS timers. \sa - + --------------------------------------------------------------------------*/ void vos_timer_module_init( void ) { - VOS_TRACE( VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_INFO, + VOS_TRACE( VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_INFO, "Initializing the VOSS timer module"); vos_lock_init( &persistentTimerCountLock ); } @@ -289,7 +289,7 @@ static void vos_timer_clean(void); void vos_timer_manager_init() { /* Initalizing the list with maximum size of 60000 */ - hdd_list_init(&vosTimerList, 1000); + hdd_list_init(&vosTimerList, 1000); return; } @@ -297,9 +297,9 @@ static void vos_timer_clean() { v_SIZE_t listSize; unsigned long flags; - + hdd_list_size(&vosTimerList, &listSize); - + if (listSize) { hdd_list_node_t* pNode; @@ -319,7 +319,7 @@ static void vos_timer_clean() { ptimerNode = (timer_node_t*)pNode; VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_FATAL, - "Timer Leak@ File %s, @Line %d", + "Timer Leak@ File %s, @Line %d", ptimerNode->fileName, (int)ptimerNode->lineNum); vos_mem_free(ptimerNode); @@ -334,33 +334,33 @@ void vos_timer_exit() hdd_list_destroy(&vosTimerList); } #endif - + /*-------------------------------------------------------------------------- - + \brief vos_timer_init() - Initialize a vOSS timer. - This API initializes a vOS Timer object. - - The \a vos_timer_init() initializes a vOS Timer object. A timer must be - initialized by calling vos_timer_initialize() before it may be used in - any other timer functions. - - Attempting to initialize timer that is already initialized results in + This API initializes a vOS Timer object. + + The \a vos_timer_init() initializes a vOS Timer object. A timer must be + initialized by calling vos_timer_initialize() before it may be used in + any other timer functions. + + Attempting to initialize timer that is already initialized results in a failure. A destroyed timer object can be re-initialized with a call to - \a vos_timer_init(). The results of otherwise referencing the object - after it has been destroyed are undefined. - + \a vos_timer_init(). The results of otherwise referencing the object + after it has been destroyed are undefined. + Calls to vOSS timer functions to manipulate the timer such as vos_timer_set() will fail if the timer is not initialized or has - been destroyed. Therefore, don't use the timer after it has been + been destroyed. Therefore, don't use the timer after it has been destroyed until it has been re-initialized. - - All callback will be executed within the VOS main thread unless it is + + All callback will be executed within the VOS main thread unless it is initialized from the Tx thread flow, in which case it will be executed within the tx thread flow. - + \param timer - pointer to the opaque timer object to initialize - + \param timerType - specifies the type of timer. We have two different timer types. <ol> @@ -368,42 +368,42 @@ void vos_timer_exit() may not be awoken when this timer expires. <li> VOS_TIMER_TYPE_WAKE_APPS - The Apps processor will be awoken from power collapse when this type of timer expires. - </ol> - + </ol> + \param callback - the callback function to be called when the timer expires. - - \param userData - a user data (or context) that is returned to the - callback function as a parameter when the timer expires. - - \return VOS_STATUS_SUCCESS - timer was successfully initialized and + + \param userData - a user data (or context) that is returned to the + callback function as a parameter when the timer expires. + + \return VOS_STATUS_SUCCESS - timer was successfully initialized and is ready to be used. - - VOS_STATUS_E_RESOURCES - System resources (other than memory) + + VOS_STATUS_E_RESOURCES - System resources (other than memory) are unavailable to initialize the timer - VOS_STATUS_E_NOMEM - insufficient memory exists to initialize + VOS_STATUS_E_NOMEM - insufficient memory exists to initialize the timer - VOS_STATUS_E_BUSY - The implementation has detected an attempt - to initialize the object referenced by timer, a previously + VOS_STATUS_E_BUSY - The implementation has detected an attempt + to initialize the object referenced by timer, a previously initialized but not yet destroyed timer. - VOS_STATUS_E_FAULT - timer is an invalid pointer. + VOS_STATUS_E_FAULT - timer is an invalid pointer. \sa - + ---------------------------------------------------------------------------*/ #ifdef TIMER_MANAGER -VOS_STATUS vos_timer_init_debug( vos_timer_t *timer, VOS_TIMER_TYPE timerType, - vos_timer_callback_t callback, v_PVOID_t userData, +VOS_STATUS vos_timer_init_debug( vos_timer_t *timer, VOS_TIMER_TYPE timerType, + vos_timer_callback_t callback, v_PVOID_t userData, char* fileName, v_U32_t lineNum ) { VOS_STATUS vosStatus; unsigned long flags; // Check for invalid pointer - if ((timer == NULL) || (callback == NULL)) + if ((timer == NULL) || (callback == NULL)) { - VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_ERROR, + VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_ERROR, "%s: Null params being passed",__func__); VOS_ASSERT(0); return VOS_STATUS_E_FAULT; @@ -413,7 +413,7 @@ VOS_STATUS vos_timer_init_debug( vos_timer_t *timer, VOS_TIMER_TYPE timerType, if(timer->ptimerNode == NULL) { - VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_ERROR, + VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_ERROR, "%s: Not able to allocate memory for timeNode",__func__); VOS_ASSERT(0); return VOS_STATUS_E_FAULT; @@ -430,11 +430,11 @@ VOS_STATUS vos_timer_init_debug( vos_timer_t *timer, VOS_TIMER_TYPE timerType, spin_unlock_irqrestore(&vosTimerList.lock, flags); if(VOS_STATUS_SUCCESS != vosStatus) { - VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_ERROR, + VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_ERROR, "%s: Unable to insert node into List vosStatus %d", __func__, vosStatus); } - - // set the various members of the timer structure + + // set the various members of the timer structure // with arguments passed or with default values spin_lock_init(&timer->platformInfo.spinlock); init_timer(&(timer->platformInfo.Timer)); @@ -446,23 +446,23 @@ VOS_STATUS vos_timer_init_debug( vos_timer_t *timer, VOS_TIMER_TYPE timerType, timer->platformInfo.cookie = LINUX_TIMER_COOKIE; timer->platformInfo.threadID = 0; timer->state = VOS_TIMER_STATE_STOPPED; - + return VOS_STATUS_SUCCESS; } #else -VOS_STATUS vos_timer_init( vos_timer_t *timer, VOS_TIMER_TYPE timerType, +VOS_STATUS vos_timer_init( vos_timer_t *timer, VOS_TIMER_TYPE timerType, vos_timer_callback_t callback, v_PVOID_t userData ) { // Check for invalid pointer - if ((timer == NULL) || (callback == NULL)) + if ((timer == NULL) || (callback == NULL)) { - VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_ERROR, + VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_ERROR, "%s: Null params being passed",__func__); VOS_ASSERT(0); return VOS_STATUS_E_FAULT; } - - // set the various members of the timer structure + + // set the various members of the timer structure // with arguments passed or with default values spin_lock_init(&timer->platformInfo.spinlock); init_timer(&(timer->platformInfo.Timer)); @@ -474,67 +474,67 @@ VOS_STATUS vos_timer_init( vos_timer_t *timer, VOS_TIMER_TYPE timerType, timer->platformInfo.cookie = LINUX_TIMER_COOKIE; timer->platformInfo.threadID = 0; timer->state = VOS_TIMER_STATE_STOPPED; - + return VOS_STATUS_SUCCESS; } #endif /*--------------------------------------------------------------------------- - + \brief vos_timer_destroy() - Destroy a vOSS Timer object The \a vos_timer_destroy() function shall destroy the timer object. - After a successful return from \a vos_timer_destroy() the timer + After a successful return from \a vos_timer_destroy() the timer object becomes, in effect, uninitialized. - + A destroyed timer object can be re-initialized by calling - vos_timer_init(). The results of otherwise referencing the object - after it has been destroyed are undefined. - + vos_timer_init(). The results of otherwise referencing the object + after it has been destroyed are undefined. + Calls to vOSS timer functions to manipulate the timer, such - as vos_timer_set() will fail if the lock is destroyed. Therefore, - don't use the timer after it has been destroyed until it has + as vos_timer_set() will fail if the lock is destroyed. Therefore, + don't use the timer after it has been destroyed until it has been re-initialized. - + \param timer - the timer object to be destroyed. - + \return VOS_STATUS_SUCCESS - timer was successfully destroyed. - - VOS_STATUS_E_BUSY - The implementation has detected an attempt - to destroy the object referenced by timer while it is still - still referenced. The timer must be stopped before it can be + + VOS_STATUS_E_BUSY - The implementation has detected an attempt + to destroy the object referenced by timer while it is still + still referenced. The timer must be stopped before it can be destroyed. VOS_STATUS_E_INVAL - The value specified by timer is invalid. - - VOS_STATUS_E_FAULT - timer is an invalid pointer. + + VOS_STATUS_E_FAULT - timer is an invalid pointer. \sa - + ---------------------------------------------------------------------------*/ #ifdef TIMER_MANAGER VOS_STATUS vos_timer_destroy ( vos_timer_t *timer ) { VOS_STATUS vStatus=VOS_STATUS_SUCCESS; unsigned long flags; - + // Check for invalid pointer if ( NULL == timer ) { - VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_ERROR, + VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_ERROR, "%s: Null timer pointer being passed",__func__); VOS_ASSERT(0); return VOS_STATUS_E_FAULT; } - + // Check if timer refers to an uninitialized object if ( LINUX_TIMER_COOKIE != timer->platformInfo.cookie ) { - VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_ERROR, + VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_ERROR, "%s: Cannot destroy uninitialized timer",__func__); return VOS_STATUS_E_INVAL; } - + spin_lock_irqsave(&vosTimerList.lock, flags); vStatus = hdd_list_remove_node(&vosTimerList, &timer->ptimerNode->pNode); spin_unlock_irqrestore(&vosTimerList.lock, flags); @@ -544,10 +544,10 @@ VOS_STATUS vos_timer_destroy ( vos_timer_t *timer ) return VOS_STATUS_E_INVAL; } vos_mem_free(timer->ptimerNode); - + spin_lock_irqsave( &timer->platformInfo.spinlock,flags ); - + switch ( timer->state ) { case VOS_TIMER_STATE_STARTING: @@ -580,11 +580,11 @@ VOS_STATUS vos_timer_destroy ( vos_timer_t *timer ) spin_unlock_irqrestore( &timer->platformInfo.spinlock,flags ); - VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_ERROR, + VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_ERROR, "%s: Cannot destroy timer in state = %d",__func__, timer->state); VOS_ASSERT(0); - return vStatus; + return vStatus; } #else @@ -592,25 +592,25 @@ VOS_STATUS vos_timer_destroy ( vos_timer_t *timer ) { VOS_STATUS vStatus=VOS_STATUS_SUCCESS; unsigned long flags; - + // Check for invalid pointer if ( NULL == timer ) { - VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_ERROR, + VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_ERROR, "%s: Null timer pointer being passed",__func__); VOS_ASSERT(0); return VOS_STATUS_E_FAULT; } - + // Check if timer refers to an uninitialized object if ( LINUX_TIMER_COOKIE != timer->platformInfo.cookie ) { - VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_ERROR, + VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_ERROR, "%s: Cannot destroy uninitialized timer",__func__); return VOS_STATUS_E_INVAL; } spin_lock_irqsave( &timer->platformInfo.spinlock,flags ); - + switch ( timer->state ) { case VOS_TIMER_STATE_STARTING: @@ -642,49 +642,49 @@ VOS_STATUS vos_timer_destroy ( vos_timer_t *timer ) spin_unlock_irqrestore( &timer->platformInfo.spinlock,flags ); - VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_ERROR, + VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_ERROR, "%s: Cannot destroy timer in state = %d",__func__, timer->state); VOS_ASSERT(0); - return vStatus; + return vStatus; } #endif /*-------------------------------------------------------------------------- - + \brief vos_timer_start() - Start a vOSS Timer object - The \a vos_timer_start() function starts a timer to expire after the - specified interval, thus running the timer callback function when + The \a vos_timer_start() function starts a timer to expire after the + specified interval, thus running the timer callback function when the interval expires. - - A timer only runs once (a one-shot timer). To re-start the - timer, vos_timer_start() has to be called after the timer runs + + A timer only runs once (a one-shot timer). To re-start the + timer, vos_timer_start() has to be called after the timer runs or has been cancelled. - + \param timer - the timer object to be started - + \param expirationTime - expiration time for the timer (in milliseconds) - + \return VOS_STATUS_SUCCESS - timer was successfully started. - - VOS_STATUS_E_ALREADY - The implementation has detected an attempt - to start a timer while it is already started. The timer must + + VOS_STATUS_E_ALREADY - The implementation has detected an attempt + to start a timer while it is already started. The timer must be stopped or expire before it can be started again. VOS_STATUS_E_INVAL - The value specified by timer is invalid. - - VOS_STATUS_E_FAULT - timer is an invalid pointer. + + VOS_STATUS_E_FAULT - timer is an invalid pointer. \sa - + -------------------------------------------------------------------------*/ VOS_STATUS vos_timer_start( vos_timer_t *timer, v_U32_t expirationTime ) { unsigned long flags; - - VOS_TRACE( VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_INFO_HIGH, + + VOS_TRACE( VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_INFO_HIGH, "Timer Addr inside voss_start : 0x%p ", timer ); - + // Check for invalid pointer if ( NULL == timer ) { @@ -693,7 +693,7 @@ VOS_STATUS vos_timer_start( vos_timer_t *timer, v_U32_t expirationTime ) VOS_ASSERT(0); return VOS_STATUS_E_INVAL; } - + // Check if timer refers to an uninitialized object if ( LINUX_TIMER_COOKIE != timer->platformInfo.cookie ) { @@ -715,22 +715,22 @@ VOS_STATUS vos_timer_start( vos_timer_t *timer, v_U32_t expirationTime ) VOS_ASSERT(0); return VOS_STATUS_E_INVAL; } - + // make sure the remainer of the logic isn't interrupted spin_lock_irqsave( &timer->platformInfo.spinlock,flags ); // Ensure if the timer can be started if ( VOS_TIMER_STATE_STOPPED != timer->state ) - { + { spin_unlock_irqrestore( &timer->platformInfo.spinlock,flags ); - VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_INFO_HIGH, + VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_INFO_HIGH, "%s: Cannot start timer in state = %d ",__func__, timer->state); return VOS_STATUS_E_ALREADY; } - + // Start the timer mod_timer( &(timer->platformInfo.Timer), - jiffies + msecs_to_jiffies(expirationTime)); + jiffies + msecs_to_jiffies(expirationTime)); timer->state = VOS_TIMER_STATE_RUNNING; @@ -748,36 +748,36 @@ VOS_STATUS vos_timer_start( vos_timer_t *timer, v_U32_t expirationTime ) } spin_unlock_irqrestore( &timer->platformInfo.spinlock,flags ); - + return VOS_STATUS_SUCCESS; } /*-------------------------------------------------------------------------- - + \brief vos_timer_stop() - Stop a vOSS Timer The \a vos_timer_stop() function stops a timer that has been started but has not expired, essentially cancelling the 'start' request. - + After a timer is stopped, it goes back to the state it was in after it was created and can be started again via a call to vos_timer_start(). - + \param timer - the timer object to be stopped - + \return VOS_STATUS_SUCCESS - timer was successfully stopped. - + VOS_STATUS_E_INVAL - The value specified by timer is invalid. - - VOS_STATUS_E_FAULT - timer is an invalid pointer. + + VOS_STATUS_E_FAULT - timer is an invalid pointer. \sa - + ------------------------------------------------------------------------*/ VOS_STATUS vos_timer_stop ( vos_timer_t *timer ) { unsigned long flags; - VOS_TRACE( VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_INFO_HIGH, + VOS_TRACE( VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_INFO_HIGH, "%s: Timer Addr inside voss_stop : 0x%p",__func__,timer ); // Check for invalid pointer @@ -792,7 +792,7 @@ VOS_STATUS vos_timer_stop ( vos_timer_t *timer ) // Check if timer refers to an uninitialized object if ( LINUX_TIMER_COOKIE != timer->platformInfo.cookie ) { - VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_ERROR, + VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_ERROR, "%s: Cannot stop uninitialized timer",__func__); if ( LINUX_INVALID_TIMER_COOKIE != timer->platformInfo.cookie ) { @@ -800,7 +800,7 @@ VOS_STATUS vos_timer_stop ( vos_timer_t *timer ) } return VOS_STATUS_E_INVAL; } - + // Ensure the timer state is correct spin_lock_irqsave( &timer->platformInfo.spinlock,flags ); @@ -812,33 +812,33 @@ VOS_STATUS vos_timer_stop ( vos_timer_t *timer ) __func__, timer->state); return VOS_STATUS_SUCCESS; } - + timer->state = VOS_TIMER_STATE_STOPPED; del_timer(&(timer->platformInfo.Timer)); - + spin_unlock_irqrestore( &timer->platformInfo.spinlock,flags ); - + tryAllowingSleep( timer->type ); - + return VOS_STATUS_SUCCESS; } /*-------------------------------------------------------------------------- - + \brief vos_timer_get_system_ticks() - Get the system time in 10ms ticks The \a vos_timer_get_system_ticks() function returns the current number of timer ticks in 10msec intervals. This function is suitable timestamping - and calculating time intervals by calculating the difference between two + and calculating time intervals by calculating the difference between two timestamps. - - \returns - The current system tick count (in 10msec intervals). This + + \returns - The current system tick count (in 10msec intervals). This function cannot fail. - + \sa - + ------------------------------------------------------------------------*/ v_TIME_t vos_timer_get_system_ticks( v_VOID_t ) { @@ -847,20 +847,20 @@ v_TIME_t vos_timer_get_system_ticks( v_VOID_t ) /*-------------------------------------------------------------------------- - + \brief vos_timer_get_system_time() - Get the system time in milliseconds - The \a vos_timer_get_system_time() function returns the number of milliseconds + The \a vos_timer_get_system_time() function returns the number of milliseconds that have elapsed since the system was started - + \returns - The current system time in milliseconds. - + \sa - + ------------------------------------------------------------------------*/ v_TIME_t vos_timer_get_system_time( v_VOID_t ) { struct timeval tv; do_gettimeofday(&tv); - return tv.tv_sec*1000 + tv.tv_usec/1000; + return tv.tv_sec*1000 + tv.tv_usec/1000; } diff --git a/CORE/VOSS/src/vos_types.c b/CORE/VOSS/src/vos_types.c index 7f540f443576..1dddbf09f1e7 100644 --- a/CORE/VOSS/src/vos_types.c +++ b/CORE/VOSS/src/vos_types.c @@ -27,13 +27,13 @@ /**========================================================================= - + \file vos_Types.c - + \brief virtual Operating System Servies (vOS) - + Basic type definitions - + ========================================================================*/ /* $Header$ */ @@ -46,28 +46,28 @@ //#include "wlan_libra_config.h" -/*-------------------------------------------------------------------------- +/*-------------------------------------------------------------------------- Preprocessor definitions and constants ------------------------------------------------------------------------*/ -/*-------------------------------------------------------------------------- +/*-------------------------------------------------------------------------- Type declarations ------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------- - - \brief vos_atomic_set_U32() - set a U32 variable atomically - + + \brief vos_atomic_set_U32() - set a U32 variable atomically + \param pTarget - pointer to the v_U32_t to set. - + \param value - the value to set in the v_U32_t variable. - + \return This function returns the value previously in the v_U32_t before the new value is set. - + \sa vos_atomic_increment_U32(), vos_atomic_decrement_U32() - - --------------------------------------------------------------------------*/ + + --------------------------------------------------------------------------*/ v_U32_t vos_atomic_set_U32( v_U32_t *pTarget, v_U32_t value ) { v_U32_t oldval; @@ -89,17 +89,17 @@ v_U32_t vos_atomic_set_U32( v_U32_t *pTarget, v_U32_t value ) /*---------------------------------------------------------------------------- - - \brief vos_atomic_increment_U32() - Increment a U32 variable atomically - + + \brief vos_atomic_increment_U32() - Increment a U32 variable atomically + \param pTarget - pointer to the v_U32_t to increment. - - \return This function returns the value of the variable after the + + \return This function returns the value of the variable after the increment occurs. - + \sa vos_atomic_decrement_U32(), vos_atomic_set_U32() - - --------------------------------------------------------------------------*/ + + --------------------------------------------------------------------------*/ v_U32_t vos_atomic_increment_U32( v_U32_t *pTarget ) { unsigned long flags; @@ -109,7 +109,7 @@ v_U32_t vos_atomic_increment_U32( v_U32_t *pTarget ) return 0; } local_irq_save(flags); - ++*pTarget; + ++*pTarget; local_irq_restore(flags); return *pTarget; // return atomic_inc_return(pTarget); @@ -117,19 +117,19 @@ v_U32_t vos_atomic_increment_U32( v_U32_t *pTarget ) /*---------------------------------------------------------------------------- - - \brief vos_atomic_decrement_U32() - Decrement a U32 variable atomically - + + \brief vos_atomic_decrement_U32() - Decrement a U32 variable atomically + \param pTarget - pointer to the v_U32_t to decrement. - - \return This function returns the value of the variable after the + + \return This function returns the value of the variable after the decrement occurs. - + \sa vos_atomic_increment_U32(), vos_atomic_set_U32() - - --------------------------------------------------------------------------*/ + + --------------------------------------------------------------------------*/ v_U32_t vos_atomic_decrement_U32( v_U32_t *pTarget ) -{ +{ unsigned long flags; if (pTarget == NULL) { @@ -138,7 +138,7 @@ v_U32_t vos_atomic_decrement_U32( v_U32_t *pTarget ) } // return atomic_dec_return(pTarget); local_irq_save(flags); - --*pTarget; + --*pTarget; local_irq_restore(flags); return (*pTarget); } @@ -155,7 +155,7 @@ v_U32_t vos_atomic_increment_U32_by_value( v_U32_t *pTarget, v_U32_t value ) *pTarget += value ; local_irq_restore(flags); return (*pTarget); -} +} v_U32_t vos_atomic_decrement_U32_by_value( v_U32_t *pTarget, v_U32_t value ) { @@ -178,11 +178,11 @@ v_U32_t vos_get_skip_ssid_check(void) /**This is needed by only AMSS for interoperatability **/ return 1; -} +} v_U32_t vos_get_skip_11e_check(void) { /* this is needed only for AMSS for interopratability **/ return 1; -} +} |
