type
stringclasses
5 values
content
stringlengths
9
163k
functions
void wa_urb_enqueue_run(struct work_struct *ws) { struct wahc *wa = container_of(ws, struct wahc, xfer_work); struct wa_xfer *xfer, *next; struct urb *urb; spin_lock_irq(&wa->xfer_list_lock); list_for_each_entry_safe(xfer, next, &wa->xfer_delayed_list, list_node) { list_del_init(&xfer->list_node); spin_u...
functions
int wa_urb_enqueue(struct wahc *wa, struct usb_host_endpoint *ep, struct urb *urb, gfp_t gfp) { int result; struct device *dev = &wa->usb_iface->dev; struct wa_xfer *xfer; unsigned long my_flags; unsigned cant_sleep = irqs_disabled() | in_atomic(); if (urb->transfer_buffer == NULL && !(urb->transfer_fl...
functions
int wa_urb_dequeue(struct wahc *wa, struct urb *urb) { unsigned long flags, flags2; struct wa_xfer *xfer; struct wa_seg *seg; struct wa_rpipe *rpipe; unsigned cnt; unsigned rpipe_ready = 0; xfer = urb->hcpriv; if (xfer == NULL) { /* NOthing setup yet enqueue will see urb->status != * -EINPROGRESS (by hcd ...
functions
int wa_xfer_status_to_errno(u8 status) { int errno; u8 real_status = status; static int xlat[] = { [WA_XFER_STATUS_SUCCESS] = 0, [WA_XFER_STATUS_HALTED] = -EPIPE, [WA_XFER_STATUS_DATA_BUFFER_ERROR] = -ENOBUFS, [WA_XFER_STATUS_BABBLE] = -EOVERFLOW, [WA_XFER_RESERVED] = EINVAL, [WA_XFER_STATUS_NO...
functions
void wa_xfer_result_chew(struct wahc *wa, struct wa_xfer *xfer) { int result; struct device *dev = &wa->usb_iface->dev; unsigned long flags; u8 seg_idx; struct wa_seg *seg; struct wa_rpipe *rpipe; struct wa_xfer_result *xfer_result = wa->xfer_result; u8 done = 0; u8 usb_status; unsigned rpipe_ready = 0; spi...
functions
void wa_buf_in_cb(struct urb *urb) { struct wa_seg *seg = urb->context; struct wa_xfer *xfer = seg->xfer; struct wahc *wa; struct device *dev; struct wa_rpipe *rpipe; unsigned rpipe_ready; unsigned long flags; u8 done = 0; switch (urb->status) { case 0: spin_lock_irqsave(&xfer->lock, flags); wa = xfer->w...
functions
void wa_xfer_result_cb(struct urb *urb) { int result; struct wahc *wa = urb->context; struct device *dev = &wa->usb_iface->dev; struct wa_xfer_result *xfer_result; u32 xfer_id; struct wa_xfer *xfer; u8 usb_status; BUG_ON(wa->dti_urb != urb); switch (wa->dti_urb->status) { case 0: /* We have a xfer result b...
functions
void wa_handle_notif_xfer(struct wahc *wa, struct wa_notif_hdr *notif_hdr) { int result; struct device *dev = &wa->usb_iface->dev; struct wa_notif_xfer *notif_xfer; const struct usb_endpoint_descriptor *dti_epd = wa->dti_epd; notif_xfer = container_of(notif_hdr, struct wa_notif_xfer, hdr); BUG_ON(notif_hdr->bNot...
defines
#define DBGC_CLASS DBGC_RPC_SRV
defines
#define ERROR_NO_SUCH_DOMAIN 0x54b
defines
#define ERROR_NO_LOGON_SERVERS 0x51f
defines
#define NO_ERROR 0x0
defines
#define LOGON_CTRL_IN_SYNC 0x00
defines
#define LOGON_CTRL_REPL_NEEDED 0x01
defines
#define LOGON_CTRL_REPL_IN_PROGRESS 0x02
functions
void init_net_r_req_chal(NET_R_REQ_CHAL *r_c, DOM_CHAL *srv_chal, NTSTATUS status) { DEBUG(6,("init_net_r_req_chal: %d\n", __LINE__)); memcpy(r_c->srv_chal.data, srv_chal->data, sizeof(srv_chal->data)); r_c->status = status; }
functions
NTSTATUS _net_logon_ctrl(pipes_struct *p, NET_Q_LOGON_CTRL *q_u, NET_R_LOGON_CTRL *r_u) { uint32 flags = 0x0; uint32 pdc_connection_status = 0x00; /* Maybe a win32 error code? */ /* Setup the Logon Control response */ init_net_r_logon_ctrl(r_u, q_u->query_level, flags, pdc_connection_status);...
functions
void send_sync_message(void) { TDB_CONTEXT *tdb; tdb = tdb_open_log(lock_path("connections.tdb"), 0, TDB_DEFAULT, O_RDONLY, 0); if (!tdb) { DEBUG(3, ("send_sync_message(): failed to open connections " "database\n")); ...
functions
NTSTATUS _net_logon_ctrl2(pipes_struct *p, NET_Q_LOGON_CTRL2 *q_u, NET_R_LOGON_CTRL2 *r_u) { uint32 flags = 0x0; uint32 pdc_connection_status = 0x0; uint32 logon_attempts = 0x0; uint32 tc_status; fstring servername, domain, dc_name, dc_name2; struct in_addr dc_ip; /* this should be \...
functions
NTSTATUS _net_trust_dom_list(pipes_struct *p, NET_Q_TRUST_DOM_LIST *q_u, NET_R_TRUST_DOM_LIST *r_u) { const char *trusted_domain = "test_domain"; uint32 num_trust_domains = 1; DEBUG(6,("_net_trust_dom_list: %d\n", __LINE__)); /* set up the Trusted Domain List response */ init_r_trust_dom(r_u, num_trust_domains, ...
functions
void init_net_r_srv_pwset(NET_R_SRV_PWSET *r_s, DOM_CRED *srv_cred, NTSTATUS status) { DEBUG(5,("init_net_r_srv_pwset: %d\n", __LINE__)); memcpy(&r_s->srv_cred, srv_cred, sizeof(r_s->srv_cred)); r_s->status = status; DEBUG(5,("init_net_r_srv_pwset: %d\n", __LINE__)); }
functions
BOOL get_md4pw(char *md4pw, char *mach_acct) { SAM_ACCOUNT *sampass = NULL; const uint8 *pass; BOOL ret; uint32 acct_ctrl; #if 0 /* * Currently this code is redundent as we already have a filter * by hostname list. What this code really needs to do is to * get a hosts allowed/hosts denied list ...
functions
NTSTATUS _net_req_chal(pipes_struct *p, NET_Q_REQ_CHAL *q_u, NET_R_REQ_CHAL *r_u) { NTSTATUS status = NT_STATUS_OK; rpcstr_pull(p->dc.remote_machine,q_u->uni_logon_clnt.buffer,sizeof(fstring),q_u->uni_logon_clnt.uni_str_len*2,0); /* create a server challenge for the client */ /* Set these to random values. */ ge...
functions
void init_net_r_auth(NET_R_AUTH *r_a, DOM_CHAL *resp_cred, NTSTATUS status) { memcpy(r_a->srv_chal.data, resp_cred->data, sizeof(resp_cred->data)); r_a->status = status; }
functions
NTSTATUS _net_auth(pipes_struct *p, NET_Q_AUTH *q_u, NET_R_AUTH *r_u) { NTSTATUS status = NT_STATUS_OK; DOM_CHAL srv_cred; UTIME srv_time; fstring mach_acct; srv_time.time = 0; rpcstr_pull(mach_acct, q_u->clnt_id.uni_acct_name.buffer,sizeof(fstring),q_u->clnt_id.uni_acct_name.uni_str_len*2,0); if (p->dc.chall...
functions
void init_net_r_auth_2(NET_R_AUTH_2 *r_a, DOM_CHAL *resp_cred, NEG_FLAGS *flgs, NTSTATUS status) { memcpy(r_a->srv_chal.data, resp_cred->data, sizeof(resp_cred->data)); memcpy(&r_a->srv_flgs, flgs, sizeof(r_a->srv_flgs)); r_a->status = status; }
functions
NTSTATUS _net_auth_2(pipes_struct *p, NET_Q_AUTH_2 *q_u, NET_R_AUTH_2 *r_u) { NTSTATUS status = NT_STATUS_OK; DOM_CHAL srv_cred; UTIME srv_time; NEG_FLAGS srv_flgs; fstring mach_acct; srv_time.time = 0; if ( (lp_server_schannel() == True) && ((q_u->clnt_flgs.neg_flags & NETLOGON_NEG_SCHANNEL) == 0) ) { ...
functions
NTSTATUS _net_srv_pwset(pipes_struct *p, NET_Q_SRV_PWSET *q_u, NET_R_SRV_PWSET *r_u) { NTSTATUS status = NT_STATUS_ACCESS_DENIED; DOM_CRED srv_cred; pstring workstation; SAM_ACCOUNT *sampass=NULL; BOOL ret = False; unsigned char pwd[16]; int i; uint32 acct_ctrl; const uchar *old_pw; /* checks and updates cre...
functions
NTSTATUS _net_sam_logoff(pipes_struct *p, NET_Q_SAM_LOGOFF *q_u, NET_R_SAM_LOGOFF *r_u) { DOM_CRED srv_cred; if (!get_valid_user_struct(p->vuid)) return NT_STATUS_NO_SUCH_USER; /* checks and updates credentials. creates reply credentials */ if (!(p->dc.authenticated && deal_with_creds(p->dc.sess_key, &p->dc.cl...
functions
NTSTATUS _net_sam_logon(pipes_struct *p, NET_Q_SAM_LOGON *q_u, NET_R_SAM_LOGON *r_u) { NTSTATUS status = NT_STATUS_OK; NET_USER_INFO_3 *usr_info = NULL; NET_ID_INFO_CTR *ctr = q_u->sam_id.ctr; DOM_CRED srv_cred; UNISTR2 *uni_samlogon_user = NULL; UNISTR2 *uni_samlogon_domain = NULL; UNISTR2 *uni_samlogon_worksta...
functions
NTSTATUS _ds_enum_dom_trusts(pipes_struct *p, DS_Q_ENUM_DOM_TRUSTS *q_u, DS_R_ENUM_DOM_TRUSTS *r_u) { NTSTATUS status = NT_STATUS_OK; /* TODO: According to MSDN, the can only be executed against a DC or domain member running Windows 2000 or later. Need to test against a standalone 2k server and see...
functions
if defined(KRB5KRB_ERR_RESPONSE_TOO_BIG) {KRB5KRB_ERR_RESPONSE_TOO_BIG, NT_STATUS_PROTOCOL_UNREACHABLE}
functions
NTSTATUS krb5_to_nt_status(krb5_error_code kerberos_error) { int i; if (kerberos_error == 0) { return NT_STATUS_OK; }
functions
krb5_error_code nt_status_to_krb5(NTSTATUS nt_status) { int i; if NT_STATUS_IS_OK(nt_status) { return 0; }
includes
#include <iprt/log.h>
includes
#include <linux/delay.h>
includes
#include <linux/slab.h>
includes
#include <asm/gpio.h>
includes
#include <linux/syscalls.h>
includes
#include <linux/fs.h>
includes
#include <linux/uaccess.h>
includes
#include <linux/i2c.h>
includes
#include <linux/input/lge_touch_core_ijb.h>
includes
#include <linux/input/touch_synaptics_ijb.h>
defines
#define PAGE_SELECT_REG 0xFF
defines
#define BLOCK_NUMBER_LOW_REG 0x00
structs
struct RMI4FunctionDescriptor { u8 m_QueryBase; u8 m_CommandBase; u8 m_ControlBase; u8 m_DataBase; u8 m_IntSourceCount; u8 m_ID; };
structs
struct ConfigDataBlock { u16 m_Address; u8 m_Data; };
structs
struct synaptics_fw_data { struct RMI4FunctionDescriptor m_PdtF34Flash; struct RMI4FunctionDescriptor m_PdtF01Common; struct RMI4FunctionDescriptor m_BaseAddresses; struct RMI4FunctionDescriptor g_RMI4FunctionDescriptor; unsigned short m_uQuery_Base; struct ConfigDataBlock g_ConfigDataList[0x2a]; struct Config...
functions
void SynaSleep(unsigned long MilliSeconds, struct synaptics_fw_data *fw) { msleep(MilliSeconds); #ifdef LGE_TOUCH_TIME_DEBUG if (touch_time_debug_mask & DEBUG_TIME_FW_UPGRADE) fw->total_sleep_count += MilliSeconds * 1000; #endif }
functions
int SynaWaitForATTN(int dwMilliseconds, struct synaptics_fw_data *fw, struct synaptics_ts_data *ts) { int trial_us=0; while ((gpio_get_value(ts->pdata->int_pin) != 0) && (trial_us < (dwMilliseconds * 1000))) { //usleep(1); udelay(1); trial_us++; }
functions
LGE_TOUCH_TIME_DEBUG if (touch_time_debug_mask & DEBUG_TIME_FW_UPGRADE) { if(trial_us > 0) fw->total_sleep_count += trial_us; }
functions
int SynaWriteRegister(struct i2c_client *client, u8 uRmiAddress, u8 * data, unsigned int length) { return touch_i2c_write(client, uRmiAddress, length, data); }
functions
int SynaReadRegister(struct i2c_client *client, u8 uRmiAddress, u8 * data, unsigned int length) { return touch_i2c_read(client, uRmiAddress, length, data); }
functions
void SpecialCopyEndianAgnostic(unsigned char *dest, unsigned short src) { dest[0] = src % 0x100; /* Endian agnostic method */ dest[1] = src / 0x100; }
functions
void RMI4FuncsConstructor(struct synaptics_fw_data *fw) { if (touch_debug_mask & DEBUG_FW_UPGRADE) TOUCH_DEBUG_MSG("RMI4FuncsConstructor start\n"); /* Initialize data members */ fw->m_BaseAddresses.m_QueryBase = 0xff; fw->m_BaseAddresses.m_CommandBase = 0xff; fw->m_BaseAddresses.m_ControlBase = 0xff; fw->m_Bas...
functions
int RMI4Init(struct synaptics_fw_data *fw, struct synaptics_ts_data *ts) { int ret; if (touch_debug_mask & DEBUG_FW_UPGRADE) TOUCH_DEBUG_MSG("RMI4Init start\n"); /* Set up blockSize and blockCount for UI and config */ ret = RMI4ReadConfigInfo(fw, ts); if (ret < 0) { TOUCH_ERR_MSG("Config info. read fail\n");...
functions
short GetConfigSize(struct synaptics_fw_data *fw) { return fw->m_configBlockSize * fw->m_configBlockCount; }
functions
short GetFirmwareSize(struct synaptics_fw_data *fw) { return fw->m_firmwareBlockSize * fw->m_firmwareBlockCount; }
functions
int RMI4ReadBootloadID(struct synaptics_fw_data *fw, struct synaptics_ts_data *ts) { int ret; char uData[2]; ret = SynaReadRegister(ts->client, fw->m_uF34ReflashQuery_BootID, (unsigned char *)uData, 2); if (ret < 0) TOUCH_ERR_MSG("m_uF34ReflashQuery_BootID read fail\n"); fw->m_BootloadID = (unsigned int)uDa...
functions
char RMI4IssueEnableFlashCommand(struct synaptics_fw_data *fw, struct synaptics_ts_data *ts) { int ret; ret = SynaWriteRegister(ts->client, fw->m_uF34Reflash_FlashControl, (u8 *)&s_uF34ReflashCmd_Enable, 1); if (ret < 0) TOUCH_ERR_MSG("m_uF34Reflash_FlashControl write fail\n"); return ret; }
functions
int RMI4WriteBootloadID(struct synaptics_fw_data *fw, struct synaptics_ts_data *ts) { int ret; unsigned char uData[2] = {0}
functions
int RMI4WaitATTN(int errorCount, struct synaptics_fw_data *fw, struct synaptics_ts_data *ts) { int ret; int uErrorCount = 0; /* To work around the physical address error from Control Bridge */ ret = SynaWaitForATTN(1000, fw, ts); if (ret < 0) { TOUCH_ERR_MSG("SynaWaitForATTN 1000ms timeout error\n"); return ...
functions
int RMI4EnableFlashing(struct synaptics_fw_data *fw, struct synaptics_ts_data *ts) { int ret; u8 uData[2] = {0}
functions
int RMI4ReadConfigInfo(struct synaptics_fw_data *fw, struct synaptics_ts_data *ts) { int ret; u8 uData[2]; ret = SynaReadRegister(ts->client, fw->m_uF34ReflashQuery_ConfigBlockSize, &uData[0], 2); if (ret < 0) { TOUCH_ERR_MSG("m_uF34ReflashQuery_ConfigBlockSize read fail\n"); return ret; }
functions
int RMI4ProgramConfiguration(struct synaptics_fw_data *fw, struct synaptics_ts_data *ts) { int ret=-1; unsigned char uData[2]; unsigned char *puData = fw->m_configImgData; unsigned short blockNum = 0; if (touch_debug_mask & DEBUG_FW_UPGRADE) TOUCH_DEBUG_MSG("RMI4ProgramConfiguration start\n"); for (blockNum =...
functions
int RMI4IssueFlashControlCommand(unsigned char * command, struct synaptics_fw_data *fw, struct synaptics_ts_data *ts) { int ret; ret = SynaWriteRegister(ts->client, fw->m_uF34Reflash_FlashControl, command, 1); if (ret < 0) TOUCH_ERR_MSG("m_uF34Reflash_FlashControl write fail\n"); return ret; }
functions
int RMI4ResetDevice(struct synaptics_fw_data *fw, struct synaptics_ts_data *ts) { int ret; unsigned short m_uF01DeviceControl_CommandReg = fw->m_PdtF01Common.m_CommandBase; unsigned char uData[1]; uData[0] = 1; ret = SynaWriteRegister(ts->client, m_uF01DeviceControl_CommandReg, &uData[0], 1); if (ret < 0) TOUC...
functions
int RMI4DisableFlash(struct synaptics_fw_data *fw, struct synaptics_ts_data *ts) { int ret = 0; unsigned char uData[2]; unsigned int uErrorCount = 0; if (touch_debug_mask & DEBUG_FW_UPGRADE) TOUCH_DEBUG_MSG("RMI4DisableFlash start\n"); /* Issue a reset command */ ret = RMI4ResetDevice(fw, ts); if (ret < 0) {...
functions
void RMI4CalculateChecksum(unsigned short * data, unsigned short len, unsigned long * dataBlock) { unsigned long temp = *data++; unsigned long sum1; unsigned long sum2; *dataBlock = 0xffffffff; sum1 = *dataBlock & 0xFFFF; sum2 = *dataBlock >> 16; while (len--) { sum1 += temp; sum2 += sum1; sum1 = (sum1 ...
functions
char RMI4FlashFirmwareWrite(struct synaptics_fw_data *fw, struct synaptics_ts_data *ts) { int ret = 0; unsigned char *puFirmwareData = fw->m_firmwareImgData; unsigned char uData[2]; u16 uBlockNum = 0; if (touch_debug_mask & DEBUG_FW_UPGRADE) TOUCH_DEBUG_MSG("Flash Firmware starts\n"); if (touch_debug_mask & D...
functions
int RMI4ProgramFirmware(struct synaptics_fw_data *fw, struct synaptics_ts_data *ts) { int ret; unsigned char uData[1]; if (touch_debug_mask & DEBUG_FW_UPGRADE) TOUCH_DEBUG_MSG("RMI4ProgramFirmware start\n"); if (!RMI4ValidateBootloadID(fw->m_bootloadImgID, fw, ts)) { TOUCH_ERR_MSG("Invalided Bootload ID\n"); ...
functions
bool RMI4ValidateBootloadID(unsigned short bootloadID, struct synaptics_fw_data *fw, struct synaptics_ts_data *ts) { int ret; ret = RMI4ReadBootloadID(fw, ts); if (ret < 0) TOUCH_ERR_MSG("Read bootload ID fail\n"); if (touch_debug_mask & DEBUG_FW_UPGRADE) TOUCH_DEBUG_MSG("Bootload ID of device: %X, input bo...
functions
int RMI4IssueEraseCommand(unsigned char * command, struct synaptics_fw_data *fw, struct synaptics_ts_data *ts) { int ret; /* command = 3 - erase all; command = 7 - erase config */ ret = SynaWriteRegister(ts->client, fw->m_uF34Reflash_FlashControl, command, 1); return ret; }
functions
int RMI4ReadFirmwareInfo(struct synaptics_fw_data *fw, struct synaptics_ts_data *ts) { int ret; unsigned char uData[2] = {0}
functions
int RMI4ReadPageDescriptionTable(struct synaptics_fw_data *fw, struct synaptics_ts_data *ts) { /* Read config data */ int ret; struct RMI4FunctionDescriptor Buffer; unsigned short uAddress; memset(&Buffer, 0x0, sizeof(struct RMI4FunctionDescriptor)); SynaSleep(20, fw); fw->m_PdtF01Common.m_ID = 0; fw->m_PdtF...
functions
int RMI4WritePage(struct synaptics_fw_data *fw, struct synaptics_ts_data *ts) { int ret; unsigned char uPage = 0x00; unsigned char uF01_RMI_Data[2]; unsigned char m_uStatus; if (touch_debug_mask & DEBUG_FW_UPGRADE) TOUCH_DEBUG_MSG("RMI4WritePage start\n"); ret = SynaWriteRegister(ts->client, PAGE_SELECT_REG, ...
functions
else if (fw->m_bUnconfigured) { if (touch_debug_mask & DEBUG_FW_UPGRADE) TOUCH_DEBUG_MSG("UI running\n"); }
functions
int RMI4ReadFirmwareHeader(struct synaptics_fw_data *fw, struct synaptics_ts_data *ts) { int ret = 0; unsigned long checkSumCode = 0; if (touch_debug_mask & DEBUG_FW_UPGRADE) TOUCH_DEBUG_MSG("RMI4ReadFirmwareHeader start\n"); fw->m_fileSize = fw->image_size; checkSumCode = ExtractLongFromHeader(&(fw->image_bi...
functions
int RMI4isExpectedRegFormat(struct synaptics_fw_data *fw, struct synaptics_ts_data *ts) { /* Flash Properties query 1: registration map format version 1 * 0: registration map format version 0 */ int ret; ret = SynaReadRegister(ts->client, fw->m_uF34ReflashQuery_FlashPropertyQuery, &fw->m_uPageData[0], 1); i...
functions
int RMI4setFlashAddrForDifFormat(struct synaptics_fw_data *fw, struct synaptics_ts_data *ts) { int ret; if (touch_debug_mask & DEBUG_FW_UPGRADE) TOUCH_DEBUG_MSG("RMI4setFlashAddrForDifFormat start\n"); ret = RMI4isExpectedRegFormat(fw, ts); if (ret < 0) { return ret; }
functions
else if( ret == 1) { fw->m_uF34Reflash_FlashControl = fw->m_PdtF34Flash.m_DataBase + fw->m_firmwareBlockSize + 2; fw->m_uF34Reflash_BlockNum = fw->m_PdtF34Flash.m_DataBase; fw->m_uF34Reflash_BlockData = fw->m_PdtF34Flash.m_DataBase+2; }
functions
int FirmwareUpgrade(struct synaptics_ts_data *ts, const char* fw_path) { struct synaptics_fw_data *fw; int ret = 0; int fd = -1; struct stat fw_bin_stat; mm_segment_t old_fs = 0; unsigned long read_bytes; fw = kzalloc(sizeof(*fw), GFP_KERNEL); if (fw == NULL) { TOUCH_ERR_MSG("Can not allocate memory\n"); ...
includes
#include <config.h>
includes
#include <stdio.h>
includes
#include <stdlib.h>
includes
#include <fcntl.h>
includes
#include <errno.h>
includes
#include <string.h>
includes
#include <sys/types.h>
defines
#define getpassphrase(x) getpass(x)
functions
else if (label != NULL) { printf("label %s\n", label); search_template[0].type = CKA_LABEL; search_template[0].pValue = label; search_template[0].ulValueLen = strlen(label); }
main
int main(int argc, char *argv[]) { CK_RV rv; CK_SLOT_ID slot = 0; CK_SESSION_HANDLE hSession; CK_UTF8CHAR *pin = NULL; CK_BYTE attr_id[2]; CK_OBJECT_HANDLE akey[50]; char *label = NULL; int error = 0, public = 0, all = 0; unsigned int i = 0, id = 0; int c, errflg = 0; CK_ULONG ulObjectCount; CK_ATTRIBUTE se...
includes
#include <pjmedia/resample.h>
includes
#include <pjmedia/errno.h>
includes
#include <pj/assert.h>
includes
#include <pj/log.h>
includes
#include <pj/pool.h>
includes
#include <third_party/resample/include/resamplesubs.h>
defines
#define THIS_FILE "resample.c"