static s32 Handle_SetChannel(tstrWILC_WFIDrv *drvHandler, tstrHostIFSetChan *pstrHostIFSetChan)
{
- s32 s32Error = WILC_SUCCESS;
+ s32 s32Error = 0;
tstrWID strWID;
tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)drvHandler;
tstrHostIfSetDrvHandler *pstrHostIfSetDrvHandler)
{
- s32 s32Error = WILC_SUCCESS;
+ s32 s32Error = 0;
tstrWID strWID;
tstrWILC_WFIDrv *pstrWFIDrv = drvHandler;
static s32 Handle_SetOperationMode(tstrWILC_WFIDrv *drvHandler, tstrHostIfSetOperationMode *pstrHostIfSetOperationMode)
{
- s32 s32Error = WILC_SUCCESS;
+ s32 s32Error = 0;
tstrWID strWID;
tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)drvHandler;
s32 Handle_set_IPAddress(tstrWILC_WFIDrv *drvHandler, u8 *pu8IPAddr, u8 idx)
{
- s32 s32Error = WILC_SUCCESS;
+ s32 s32Error = 0;
tstrWID strWID;
char firmwareIPAddress[4] = {0};
tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)drvHandler;
s32 Handle_get_IPAddress(tstrWILC_WFIDrv *drvHandler, u8 *pu8IPAddr, u8 idx)
{
- s32 s32Error = WILC_SUCCESS;
+ s32 s32Error = 0;
tstrWID strWID;
tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)drvHandler;
if (memcmp(gs8GetIP[idx], gs8SetIP[idx], IP_ALEN) != 0)
host_int_setup_ipaddress(pstrWFIDrv, gs8SetIP[idx], idx);
- if (s32Error != WILC_SUCCESS) {
+ if (s32Error != 0) {
PRINT_ER("Failed to get IP address\n");
return -EINVAL;
}
static s32 Handle_SetMacAddress(tstrWILC_WFIDrv *drvHandler, tstrHostIfSetMacAddress *pstrHostIfSetMacAddress)
{
- s32 s32Error = WILC_SUCCESS;
+ s32 s32Error = 0;
tstrWID strWID;
tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)drvHandler;
u8 *mac_buf = kmalloc(ETH_ALEN, GFP_KERNEL);
if (mac_buf == NULL) {
PRINT_ER("No buffer to send mac address\n");
- return WILC_FAIL;
+ return -EFAULT;
}
memcpy(mac_buf, pstrHostIfSetMacAddress->u8MacAddress, ETH_ALEN);
static s32 Handle_GetMacAddress(tstrWILC_WFIDrv *drvHandler, tstrHostIfGetMacAddress *pstrHostIfGetMacAddress)
{
- s32 s32Error = WILC_SUCCESS;
+ s32 s32Error = 0;
tstrWID strWID;
/*prepare configuration packet*/
*/
static s32 Handle_CfgParam(tstrWILC_WFIDrv *drvHandler, tstrHostIFCfgParamAttr *strHostIFCfgParamAttr)
{
- s32 s32Error = WILC_SUCCESS;
+ s32 s32Error = 0;
tstrWID strWIDList[32];
u8 u8WidCnt = 0;
tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)drvHandler;
*/
static s32 Handle_wait_msg_q_empty(void)
{
- s32 s32Error = WILC_SUCCESS;
+ s32 s32Error = 0;
g_wilc_initialized = 0;
up(&hWaitResponse);
*/
static s32 Handle_Scan(tstrWILC_WFIDrv *drvHandler, tstrHostIFscanAttr *pstrHostIFscanAttr)
{
- s32 s32Error = WILC_SUCCESS;
+ s32 s32Error = 0;
tstrWID strWIDList[5];
u32 u32WidsCount = 0;
u32 i;
*/
static s32 Handle_ScanDone(tstrWILC_WFIDrv *drvHandler, tenuScanEvent enuEvent)
{
- s32 s32Error = WILC_SUCCESS;
+ s32 s32Error = 0;
tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)drvHandler;
static s32 Handle_Connect(tstrWILC_WFIDrv *drvHandler, tstrHostIFconnectAttr *pstrHostIFconnectAttr)
{
tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *) drvHandler;
- s32 s32Error = WILC_SUCCESS;
+ s32 s32Error = 0;
tstrWID strWIDList[8];
u32 u32WidsCount = 0, dummyval = 0;
/* char passphrase[] = "12345678"; */
#ifndef CONNECT_DIRECT
- s32 s32Err = WILC_SUCCESS;
+ s32 s32Err = 0;
u32 i;
u8 u8bssDscListIndex;
wid_site_survey_reslts_s *pstrSurveyResults = NULL;
&pstrWFIDrv->u32SurveyResultsCount);
- if (s32Err == WILC_SUCCESS) {
+ if (s32Err == 0) {
/* use the parsed info in pstrSurveyResults, then deallocate it */
PRINT_D(HOSTINF_DBG, "Copying site survey results in global structure, then deallocate\n");
for (i = 0; i < pstrWFIDrv->u32SurveyResultsCount; i++) {
if (memcmp(pstrHostIFconnectAttr->pu8bssid, u8ConnectedSSID, ETH_ALEN) == 0) {
- s32Error = WILC_SUCCESS;
+ s32Error = 0;
PRINT_ER("Trying to connect to an already connected AP, Discard connect request\n");
return s32Error;
}
static s32 Handle_FlushConnect(tstrWILC_WFIDrv *drvHandler)
{
- s32 s32Error = WILC_SUCCESS;
+ s32 s32Error = 0;
tstrWID strWIDList[5];
u32 u32WidsCount = 0;
u8 *pu8CurrByte = NULL;
*/
static s32 Handle_ConnectTimeout(tstrWILC_WFIDrv *drvHandler)
{
- s32 s32Error = WILC_SUCCESS;
+ s32 s32Error = 0;
tstrConnectInfo strConnectInfo;
tstrWID strWID;
u16 u16DummyReasonCode = 0;
- s32 s32Error = WILC_SUCCESS;
+ s32 s32Error = 0;
tstrNetworkInfo *pstrNetworkInfo = NULL;
void *pJoinParams = NULL;
{
/* TODO: mostafa: till now, this function just handles only the received mac status msg, */
/* which carries only 1 WID which have WID ID = WID_STATUS */
- s32 s32Error = WILC_SUCCESS;
+ s32 s32Error = 0;
u8 u8MsgType = 0;
u8 u8MsgID = 0;
u16 u16MsgLen = 0;
u8 u8MacStatusAdditionalInfo;
tstrConnectInfo strConnectInfo;
tstrDisconnectNotifInfo strDisconnectNotifInfo;
- s32 s32Err = WILC_SUCCESS;
+ s32 s32Err = 0;
tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *) drvHandler;
if (pstrWFIDrv == NULL)
*/
static int Handle_Key(tstrWILC_WFIDrv *drvHandler, tstrHostIFkeyAttr *pstrHostIFkeyAttr)
{
- s32 s32Error = WILC_SUCCESS;
+ s32 s32Error = 0;
tstrWID strWID;
#ifdef WILC_AP_EXTERNAL_MLME
tstrWID strWIDList[5];
{
tstrWID strWID;
- s32 s32Error = WILC_SUCCESS;
+ s32 s32Error = 0;
u16 u16DummyReasonCode = 0;
tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)drvHandler;
{
- s32 s32Error = WILC_SUCCESS;
+ s32 s32Error = 0;
tstrWID strWID;
static char dummy = 9;
tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)drvHandler;
static s32 Handle_GetChnl(tstrWILC_WFIDrv *drvHandler)
{
- s32 s32Error = WILC_SUCCESS;
+ s32 s32Error = 0;
tstrWID strWID;
/* tstrWILC_WFIDrv * pstrWFIDrv = (tstrWILC_WFIDrv *)hWFIDrv; */
tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)drvHandler;
*/
static void Handle_GetRssi(tstrWILC_WFIDrv *drvHandler)
{
- s32 s32Error = WILC_SUCCESS;
+ s32 s32Error = 0;
tstrWID strWID;
tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)drvHandler;
static void Handle_GetLinkspeed(tstrWILC_WFIDrv *drvHandler)
{
- s32 s32Error = WILC_SUCCESS;
+ s32 s32Error = 0;
tstrWID strWID;
tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)drvHandler;
static s32 Handle_Get_InActiveTime(tstrWILC_WFIDrv *drvHandler, tstrHostIfStaInactiveT *strHostIfStaInactiveT)
{
- s32 s32Error = WILC_SUCCESS;
+ s32 s32Error = 0;
u8 *stamac;
tstrWID strWID;
tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)drvHandler;
*/
static void Handle_AddBeacon(tstrWILC_WFIDrv *drvHandler, tstrHostIFSetBeacon *pstrSetBeaconParam)
{
- s32 s32Error = WILC_SUCCESS;
+ s32 s32Error = 0;
tstrWID strWID;
u8 *pu8CurrByte;
tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)drvHandler;
*/
static void Handle_DelBeacon(tstrWILC_WFIDrv *drvHandler, tstrHostIFDelBeacon *pstrDelBeacon)
{
- s32 s32Error = WILC_SUCCESS;
+ s32 s32Error = 0;
tstrWID strWID;
u8 *pu8CurrByte;
tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)drvHandler;
*/
static void Handle_AddStation(tstrWILC_WFIDrv *drvHandler, tstrWILC_AddStaParam *pstrStationParam)
{
- s32 s32Error = WILC_SUCCESS;
+ s32 s32Error = 0;
tstrWID strWID;
u8 *pu8CurrByte;
tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)drvHandler;
/*Sending Cfg*/
s32Error = SendConfigPkt(SET_CFG, &strWID, 1, false,
get_id_from_handler(pstrWFIDrv));
- if (s32Error != WILC_SUCCESS)
+ if (s32Error != 0)
PRINT_ER("Failed to send add station config packet\n");
ERRORHANDLER:
*/
static void Handle_DelAllSta(tstrWILC_WFIDrv *drvHandler, tstrHostIFDelAllSta *pstrDelAllStaParam)
{
- s32 s32Error = WILC_SUCCESS;
+ s32 s32Error = 0;
tstrWID strWID;
u8 *pu8CurrByte;
*/
static void Handle_DelStation(tstrWILC_WFIDrv *drvHandler, tstrHostIFDelSta *pstrDelStaParam)
{
- s32 s32Error = WILC_SUCCESS;
+ s32 s32Error = 0;
tstrWID strWID;
u8 *pu8CurrByte;
tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)drvHandler;
*/
static void Handle_EditStation(tstrWILC_WFIDrv *drvHandler, tstrWILC_AddStaParam *pstrStationParam)
{
- s32 s32Error = WILC_SUCCESS;
+ s32 s32Error = 0;
tstrWID strWID;
u8 *pu8CurrByte;
tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)drvHandler;
*/
static int Handle_RemainOnChan(tstrWILC_WFIDrv *drvHandler, tstrHostIfRemainOnChan *pstrHostIfRemainOnChan)
{
- s32 s32Error = WILC_SUCCESS;
+ s32 s32Error = 0;
u8 u8remain_on_chan_flag;
tstrWID strWID;
tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *) drvHandler;
/*Sending Cfg*/
s32Error = SendConfigPkt(SET_CFG, &strWID, 1, true,
get_id_from_handler(pstrWFIDrv));
- if (s32Error != WILC_SUCCESS)
+ if (s32Error != 0)
PRINT_ER("Failed to set remain on channel\n");
ERRORHANDLER:
*/
static int Handle_RegisterFrame(tstrWILC_WFIDrv *drvHandler, tstrHostIfRegisterFrame *pstrHostIfRegisterFrame)
{
- s32 s32Error = WILC_SUCCESS;
+ s32 s32Error = 0;
tstrWID strWID;
u8 *pu8CurrByte;
tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)drvHandler;
{
u8 u8remain_on_chan_flag;
tstrWID strWID;
- s32 s32Error = WILC_SUCCESS;
+ s32 s32Error = 0;
tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *) drvHandler;
PRINT_D(HOSTINF_DBG, "CANCEL REMAIN ON CHAN\n");
/*Sending Cfg*/
s32Error = SendConfigPkt(SET_CFG, &strWID, 1, true,
get_id_from_handler(pstrWFIDrv));
- if (s32Error != WILC_SUCCESS) {
+ if (s32Error != 0) {
PRINT_ER("Failed to set remain on channel\n");
goto _done_;
}
P2P_LISTEN_STATE = 0;
} else {
PRINT_D(GENERIC_DBG, "Not in listen state\n");
- s32Error = WILC_FAIL;
+ s32Error = -EFAULT;
}
_done_:
*/
static void ListenTimerCB(unsigned long arg)
{
- s32 s32Error = WILC_SUCCESS;
+ s32 s32Error = 0;
tstrHostIFmsg strHostIFmsg;
tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)arg;
/*Stopping remain-on-channel timer*/
*/
static void Handle_PowerManagement(tstrWILC_WFIDrv *drvHandler, tstrHostIfPowerMgmtParam *strPowerMgmtParam)
{
- s32 s32Error = WILC_SUCCESS;
+ s32 s32Error = 0;
tstrWID strWID;
s8 s8PowerMode;
tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)drvHandler;
*/
static void Handle_SetMulticastFilter(tstrWILC_WFIDrv *drvHandler, tstrHostIFSetMulti *strHostIfSetMulti)
{
- s32 s32Error = WILC_SUCCESS;
+ s32 s32Error = 0;
tstrWID strWID;
u8 *pu8CurrByte;
*/
static s32 Handle_AddBASession(tstrWILC_WFIDrv *drvHandler, tstrHostIfBASessionInfo *strHostIfBASessionInfo)
{
- s32 s32Error = WILC_SUCCESS;
+ s32 s32Error = 0;
tstrWID strWID;
int AddbaTimeout = 100;
char *ptr = NULL;
*/
static s32 Handle_DelBASession(tstrWILC_WFIDrv *drvHandler, tstrHostIfBASessionInfo *strHostIfBASessionInfo)
{
- s32 s32Error = WILC_SUCCESS;
+ s32 s32Error = 0;
tstrWID strWID;
char *ptr = NULL;
tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)drvHandler;
*/
static s32 Handle_DelAllRxBASessions(tstrWILC_WFIDrv *drvHandler, tstrHostIfBASessionInfo *strHostIfBASessionInfo)
{
- s32 s32Error = WILC_SUCCESS;
+ s32 s32Error = 0;
tstrWID strWID;
char *ptr = NULL;
tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)drvHandler;
/* Check implementation in core adding 9 bytes to the input! */
s32 host_int_remove_key(tstrWILC_WFIDrv *hWFIDrv, const u8 *pu8StaAddress)
{
- s32 s32Error = WILC_SUCCESS;
+ s32 s32Error = 0;
tstrWID strWID;
/* tstrWILC_WFIDrv * pstrWFIDrv = (tstrWILC_WFIDrv *)hWFIDrv; */
*/
s32 host_int_remove_wep_key(tstrWILC_WFIDrv *hWFIDrv, u8 u8keyIdx)
{
- s32 s32Error = WILC_SUCCESS;
+ s32 s32Error = 0;
tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)hWFIDrv;
tstrHostIFmsg strHostIFmsg;
*/
s32 host_int_set_WEPDefaultKeyID(tstrWILC_WFIDrv *hWFIDrv, u8 u8Index)
{
- s32 s32Error = WILC_SUCCESS;
+ s32 s32Error = 0;
tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)hWFIDrv;
tstrHostIFmsg strHostIFmsg;
s32 host_int_add_wep_key_bss_sta(tstrWILC_WFIDrv *hWFIDrv, const u8 *pu8WepKey, u8 u8WepKeylen, u8 u8Keyidx)
{
- s32 s32Error = WILC_SUCCESS;
+ s32 s32Error = 0;
tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)hWFIDrv;
tstrHostIFmsg strHostIFmsg;
s32 host_int_add_wep_key_bss_ap(tstrWILC_WFIDrv *hWFIDrv, const u8 *pu8WepKey, u8 u8WepKeylen, u8 u8Keyidx, u8 u8mode, AUTHTYPE_T tenuAuth_type)
{
- s32 s32Error = WILC_SUCCESS;
+ s32 s32Error = 0;
tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)hWFIDrv;
tstrHostIFmsg strHostIFmsg;
u8 i;
s32 host_int_add_ptk(tstrWILC_WFIDrv *hWFIDrv, const u8 *pu8Ptk, u8 u8PtkKeylen,
const u8 *mac_addr, const u8 *pu8RxMic, const u8 *pu8TxMic, u8 mode, u8 u8Ciphermode, u8 u8Idx)
{
- s32 s32Error = WILC_SUCCESS;
+ s32 s32Error = 0;
tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)hWFIDrv;
tstrHostIFmsg strHostIFmsg;
u8 u8KeyLen = u8PtkKeylen;
u8 u8KeyIdx, u32 u32KeyRSClen, const u8 *KeyRSC,
const u8 *pu8RxMic, const u8 *pu8TxMic, u8 mode, u8 u8Ciphermode)
{
- s32 s32Error = WILC_SUCCESS;
+ s32 s32Error = 0;
tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)hWFIDrv;
tstrHostIFmsg strHostIFmsg;
u8 u8KeyLen = u8GtkKeylen;
*/
s32 host_int_set_pmkid_info(tstrWILC_WFIDrv *hWFIDrv, tstrHostIFpmkidAttr *pu8PmkidInfoArray)
{
- s32 s32Error = WILC_SUCCESS;
+ s32 s32Error = 0;
tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)hWFIDrv;
tstrHostIFmsg strHostIFmsg;
u32 i;
s32 host_int_get_pmkid_info(tstrWILC_WFIDrv *hWFIDrv, u8 *pu8PmkidInfoArray,
u32 u32PmkidInfoLen)
{
- s32 s32Error = WILC_SUCCESS;
+ s32 s32Error = 0;
tstrWID strWID;
/* tstrWILC_WFIDrv * pstrWFIDrv = (tstrWILC_WFIDrv *)hWFIDrv; */
s32 host_int_set_RSNAConfigPSKPassPhrase(tstrWILC_WFIDrv *hWFIDrv, u8 *pu8PassPhrase,
u8 u8Psklength)
{
- s32 s32Error = WILC_SUCCESS;
+ s32 s32Error = 0;
tstrWID strWID;
/*validating psk length*/
*/
s32 host_int_get_MacAddress(tstrWILC_WFIDrv *hWFIDrv, u8 *pu8MacAddress)
{
- s32 s32Error = WILC_SUCCESS;
+ s32 s32Error = 0;
tstrHostIFmsg strHostIFmsg;
s32Error = wilc_mq_send(&gMsgQHostIF, &strHostIFmsg, sizeof(tstrHostIFmsg));
if (s32Error) {
PRINT_ER("Failed to send get mac address\n");
- return WILC_FAIL;
+ return -EFAULT;
}
down(&hWaitResponse);
*/
s32 host_int_set_MacAddress(tstrWILC_WFIDrv *hWFIDrv, u8 *pu8MacAddress)
{
- s32 s32Error = WILC_SUCCESS;
+ s32 s32Error = 0;
tstrHostIFmsg strHostIFmsg;
PRINT_D(GENERIC_DBG, "mac addr = %x:%x:%x\n", pu8MacAddress[0], pu8MacAddress[1], pu8MacAddress[2]);
s32 host_int_get_RSNAConfigPSKPassPhrase(tstrWILC_WFIDrv *hWFIDrv,
u8 *pu8PassPhrase, u8 u8Psklength)
{
- s32 s32Error = WILC_SUCCESS;
+ s32 s32Error = 0;
tstrWID strWID;
/* tstrWILC_WFIDrv * pstrWFIDrv = (tstrWILC_WFIDrv *)hWFIDrv; */
u8 ppu8RcvdSiteSurveyResults[][MAX_SURVEY_RESULT_FRAG_SIZE],
u32 u32MaxSiteSrvyFragLen)
{
- s32 s32Error = WILC_SUCCESS;
+ s32 s32Error = 0;
tstrWID astrWIDList[2];
tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)hWFIDrv;
*/
s32 host_int_set_start_scan_req(tstrWILC_WFIDrv *hWFIDrv, u8 scanSource)
{
- s32 s32Error = WILC_SUCCESS;
+ s32 s32Error = 0;
tstrWID strWID;
/* tstrWILC_WFIDrv * pstrWFIDrv = (tstrWILC_WFIDrv *)hWFIDrv; */
s32 host_int_get_start_scan_req(tstrWILC_WFIDrv *hWFIDrv, u8 *pu8ScanSource)
{
- s32 s32Error = WILC_SUCCESS;
+ s32 s32Error = 0;
tstrWID strWID;
/* tstrWILC_WFIDrv * pstrWFIDrv = (tstrWILC_WFIDrv *)hWFIDrv; */
u8 u8channel,
void *pJoinParams)
{
- s32 s32Error = WILC_SUCCESS;
+ s32 s32Error = 0;
tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)hWFIDrv;
tstrHostIFmsg strHostIFmsg;
tenuScanConnTimer enuScanConnTimer;
s32 host_int_flush_join_req(tstrWILC_WFIDrv *hWFIDrv)
{
- s32 s32Error = WILC_SUCCESS;
+ s32 s32Error = 0;
tstrHostIFmsg strHostIFmsg;
if (!gu8FlushedJoinReq) {
- s32Error = WILC_FAIL;
+ s32Error = -EFAULT;
return s32Error;
}
*/
s32 host_int_disconnect(tstrWILC_WFIDrv *hWFIDrv, u16 u16ReasonCode)
{
- s32 s32Error = WILC_SUCCESS;
+ s32 s32Error = 0;
tstrHostIFmsg strHostIFmsg;
tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)hWFIDrv;
*/
s32 host_int_disconnect_station(tstrWILC_WFIDrv *hWFIDrv, u8 assoc_id)
{
- s32 s32Error = WILC_SUCCESS;
+ s32 s32Error = 0;
tstrWID strWID;
/* tstrWILC_WFIDrv * pstrWFIDrv = (tstrWILC_WFIDrv *)hWFIDrv; */
s32 host_int_get_assoc_req_info(tstrWILC_WFIDrv *hWFIDrv, u8 *pu8AssocReqInfo,
u32 u32AssocReqInfoLen)
{
- s32 s32Error = WILC_SUCCESS;
+ s32 s32Error = 0;
tstrWID strWID;
/* tstrWILC_WFIDrv * pstrWFIDrv = (tstrWILC_WFIDrv *)hWFIDrv; */
s32 host_int_get_assoc_res_info(tstrWILC_WFIDrv *hWFIDrv, u8 *pu8AssocRespInfo,
u32 u32MaxAssocRespInfoLen, u32 *pu32RcvdAssocRespInfoLen)
{
- s32 s32Error = WILC_SUCCESS;
+ s32 s32Error = 0;
tstrWID strWID;
tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)hWFIDrv;
s32 host_int_get_rx_power_level(tstrWILC_WFIDrv *hWFIDrv, u8 *pu8RxPowerLevel,
u32 u32RxPowerLevelLen)
{
- s32 s32Error = WILC_SUCCESS;
+ s32 s32Error = 0;
tstrWID strWID;
/* tstrWILC_WFIDrv * pstrWFIDrv = (tstrWILC_WFIDrv *)hWFIDrv; */
*/
s32 host_int_set_mac_chnl_num(tstrWILC_WFIDrv *hWFIDrv, u8 u8ChNum)
{
- s32 s32Error = WILC_SUCCESS;
+ s32 s32Error = 0;
tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)hWFIDrv;
tstrHostIFmsg strHostIFmsg;
s32 host_int_wait_msg_queue_idle(void)
{
- s32 s32Error = WILC_SUCCESS;
+ s32 s32Error = 0;
tstrHostIFmsg strHostIFmsg;
s32 host_int_set_wfi_drv_handler(tstrWILC_WFIDrv *u32address)
{
- s32 s32Error = WILC_SUCCESS;
+ s32 s32Error = 0;
tstrHostIFmsg strHostIFmsg;
s32 host_int_set_operation_mode(tstrWILC_WFIDrv *hWFIDrv, u32 u32mode)
{
- s32 s32Error = WILC_SUCCESS;
+ s32 s32Error = 0;
tstrHostIFmsg strHostIFmsg;
*/
s32 host_int_get_host_chnl_num(tstrWILC_WFIDrv *hWFIDrv, u8 *pu8ChNo)
{
- s32 s32Error = WILC_SUCCESS;
+ s32 s32Error = 0;
tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)hWFIDrv;
tstrHostIFmsg strHostIFmsg;
*/
s32 host_int_test_set_int_wid(tstrWILC_WFIDrv *hWFIDrv, u32 u32TestMemAddr)
{
- s32 s32Error = WILC_SUCCESS;
+ s32 s32Error = 0;
tstrWID strWID;
tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)hWFIDrv;
*/
s32 host_int_get_inactive_time(tstrWILC_WFIDrv *hWFIDrv, const u8 *mac, u32 *pu32InactiveTime)
{
- s32 s32Error = WILC_SUCCESS;
+ s32 s32Error = 0;
tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)hWFIDrv;
tstrHostIFmsg strHostIFmsg;
s32 host_int_test_get_int_wid(tstrWILC_WFIDrv *hWFIDrv, u32 *pu32TestMemAddr)
{
- s32 s32Error = WILC_SUCCESS;
+ s32 s32Error = 0;
tstrWID strWID;
tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)hWFIDrv;
*/
s32 host_int_get_rssi(tstrWILC_WFIDrv *hWFIDrv, s8 *ps8Rssi)
{
- s32 s32Error = WILC_SUCCESS;
+ s32 s32Error = 0;
tstrHostIFmsg strHostIFmsg;
tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)hWFIDrv;
s32Error = wilc_mq_send(&gMsgQHostIF, &strHostIFmsg, sizeof(tstrHostIFmsg));
if (s32Error) {
PRINT_ER("Failed to send get host channel param's message queue ");
- return WILC_FAIL;
+ return -EFAULT;
}
down(&(pstrWFIDrv->hSemGetRSSI));
if (ps8Rssi == NULL) {
PRINT_ER("RSS pointer value is null");
- return WILC_FAIL;
+ return -EFAULT;
}
s32 host_int_get_link_speed(tstrWILC_WFIDrv *hWFIDrv, s8 *ps8lnkspd)
{
tstrHostIFmsg strHostIFmsg;
- s32 s32Error = WILC_SUCCESS;
+ s32 s32Error = 0;
tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)hWFIDrv;
s32Error = wilc_mq_send(&gMsgQHostIF, &strHostIFmsg, sizeof(tstrHostIFmsg));
if (s32Error) {
PRINT_ER("Failed to send GET_LINKSPEED to message queue ");
- return WILC_FAIL;
+ return -EFAULT;
}
down(&(pstrWFIDrv->hSemGetLINKSPEED));
if (ps8lnkspd == NULL) {
PRINT_ER("LINKSPEED pointer value is null");
- return WILC_FAIL;
+ return -EFAULT;
}
s32 host_int_get_statistics(tstrWILC_WFIDrv *hWFIDrv, tstrStatistics *pstrStatistics)
{
- s32 s32Error = WILC_SUCCESS;
+ s32 s32Error = 0;
tstrHostIFmsg strHostIFmsg;
s32Error = wilc_mq_send(&gMsgQHostIF, &strHostIFmsg, sizeof(tstrHostIFmsg));
if (s32Error) {
PRINT_ER("Failed to send get host channel param's message queue ");
- return WILC_FAIL;
+ return -EFAULT;
}
down(&hWaitResponse);
size_t IEsLen, tWILCpfScanResult ScanResult,
void *pvUserArg, tstrHiddenNetwork *pstrHiddenNetwork)
{
- s32 s32Error = WILC_SUCCESS;
+ s32 s32Error = 0;
tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)hWFIDrv;
tstrHostIFmsg strHostIFmsg;
tenuScanConnTimer enuScanConnTimer;
s32 hif_set_cfg(tstrWILC_WFIDrv *hWFIDrv, tstrCfgParamVal *pstrCfgParamVal)
{
- s32 s32Error = WILC_SUCCESS;
+ s32 s32Error = 0;
tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)hWFIDrv;
tstrHostIFmsg strHostIFmsg;
*/
s32 hif_get_cfg(tstrWILC_WFIDrv *hWFIDrv, u16 u16WID, u16 *pu16WID_Value)
{
- s32 s32Error = WILC_SUCCESS;
+ s32 s32Error = 0;
tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)hWFIDrv;
down(&(pstrWFIDrv->gtOsCfgValuesSem));
}
if (pstrWFIDrv->enuHostIFstate == HOST_IF_CONNECTED) {
- s32 s32Error = WILC_SUCCESS;
+ s32 s32Error = 0;
tstrHostIFmsg strHostIFmsg;
/* prepare the Get RSSI Message */
s32 host_int_init(tstrWILC_WFIDrv **phWFIDrv)
{
- s32 s32Error = WILC_SUCCESS;
+ s32 s32Error = 0;
tstrWILC_WFIDrv *pstrWFIDrv;
int err;
/*Allocate host interface private structure*/
pstrWFIDrv = kmalloc(sizeof(tstrWILC_WFIDrv), GFP_KERNEL);
if (pstrWFIDrv == NULL) {
- s32Error = WILC_NO_MEM;
+ s32Error = -ENOMEM;
PRINT_ER("Failed to allocate memory\n");
goto _fail_timer_2;
}
/*save into globl handle*/
err = add_handler_in_list(pstrWFIDrv);
if (err) {
- s32Error = WILC_FAIL;
+ s32Error = -EFAULT;
goto _fail_timer_2;
}
HostIFthreadHandler = kthread_run(hostIFthread, NULL, "WILC_kthread");
if (IS_ERR(HostIFthreadHandler)) {
PRINT_ER("Failed to creat Thread\n");
- s32Error = WILC_FAIL;
+ s32Error = -EFAULT;
goto _fail_mq_;
}
setup_timer(&g_hPeriodicRSSI, GetPeriodicRSSI,
s32 host_int_deinit(tstrWILC_WFIDrv *hWFIDrv)
{
- s32 s32Error = WILC_SUCCESS;
+ s32 s32Error = 0;
tstrHostIFmsg strHostIFmsg;
int ret;
s32Error = wilc_mq_send(&gMsgQHostIF, &strHostIFmsg, sizeof(tstrHostIFmsg));
- if (s32Error != WILC_SUCCESS)
+ if (s32Error != 0)
PRINT_ER("Error in sending deinit's message queue message function: Error(%d)\n", s32Error);
down(&hSemHostIFthrdEnd);
/* gWFiDrvHandle = NULL; */
ret = remove_handler_in_list(pstrWFIDrv);
if (ret)
- s32Error = WILC_NOT_FOUND;
+ s32Error = -ENOENT;
if (pstrWFIDrv != NULL) {
kfree(pstrWFIDrv);
*/
void NetworkInfoReceived(u8 *pu8Buffer, u32 u32Length)
{
- s32 s32Error = WILC_SUCCESS;
+ s32 s32Error = 0;
tstrHostIFmsg strHostIFmsg;
int id;
tstrWILC_WFIDrv *pstrWFIDrv = NULL;
*/
void GnrlAsyncInfoReceived(u8 *pu8Buffer, u32 u32Length)
{
- s32 s32Error = WILC_SUCCESS;
+ s32 s32Error = 0;
tstrHostIFmsg strHostIFmsg;
int id;
tstrWILC_WFIDrv *pstrWFIDrv = NULL;
*/
void host_int_ScanCompleteReceived(u8 *pu8Buffer, u32 u32Length)
{
- s32 s32Error = WILC_SUCCESS;
+ s32 s32Error = 0;
tstrHostIFmsg strHostIFmsg;
int id;
tstrWILC_WFIDrv *pstrWFIDrv = NULL;
*/
s32 host_int_remain_on_channel(tstrWILC_WFIDrv *hWFIDrv, u32 u32SessionID, u32 u32duration, u16 chan, tWILCpfRemainOnChanExpired RemainOnChanExpired, tWILCpfRemainOnChanReady RemainOnChanReady, void *pvUserArg)
{
- s32 s32Error = WILC_SUCCESS;
+ s32 s32Error = 0;
tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)hWFIDrv;
tstrHostIFmsg strHostIFmsg;
*/
s32 host_int_ListenStateExpired(tstrWILC_WFIDrv *hWFIDrv, u32 u32SessionID)
{
- s32 s32Error = WILC_SUCCESS;
+ s32 s32Error = 0;
tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)hWFIDrv;
tstrHostIFmsg strHostIFmsg;
* @version 1.0*/
s32 host_int_frame_register(tstrWILC_WFIDrv *hWFIDrv, u16 u16FrameType, bool bReg)
{
- s32 s32Error = WILC_SUCCESS;
+ s32 s32Error = 0;
tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)hWFIDrv;
tstrHostIFmsg strHostIFmsg;
u32 u32HeadLen, u8 *pu8Head,
u32 u32TailLen, u8 *pu8Tail)
{
- s32 s32Error = WILC_SUCCESS;
+ s32 s32Error = 0;
tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)hWFIDrv;
tstrHostIFmsg strHostIFmsg;
tstrHostIFSetBeacon *pstrSetBeaconParam = &strHostIFmsg.uniHostIFmsgBody.strHostIFSetBeacon;
*/
s32 host_int_del_beacon(tstrWILC_WFIDrv *hWFIDrv)
{
- s32 s32Error = WILC_SUCCESS;
+ s32 s32Error = 0;
tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)hWFIDrv;
tstrHostIFmsg strHostIFmsg;
*/
s32 host_int_add_station(tstrWILC_WFIDrv *hWFIDrv, tstrWILC_AddStaParam *pstrStaParams)
{
- s32 s32Error = WILC_SUCCESS;
+ s32 s32Error = 0;
tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)hWFIDrv;
tstrHostIFmsg strHostIFmsg;
tstrWILC_AddStaParam *pstrAddStationMsg = &strHostIFmsg.uniHostIFmsgBody.strAddStaParam;
*/
s32 host_int_del_station(tstrWILC_WFIDrv *hWFIDrv, const u8 *pu8MacAddr)
{
- s32 s32Error = WILC_SUCCESS;
+ s32 s32Error = 0;
tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)hWFIDrv;
tstrHostIFmsg strHostIFmsg;
tstrHostIFDelSta *pstrDelStationMsg = &strHostIFmsg.uniHostIFmsgBody.strDelStaParam;
*/
s32 host_int_del_allstation(tstrWILC_WFIDrv *hWFIDrv, u8 pu8MacAddr[][ETH_ALEN])
{
- s32 s32Error = WILC_SUCCESS;
+ s32 s32Error = 0;
tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)hWFIDrv;
tstrHostIFmsg strHostIFmsg;
tstrHostIFDelAllSta *pstrDelAllStationMsg = &strHostIFmsg.uniHostIFmsgBody.strHostIFDelAllSta;
*/
s32 host_int_edit_station(tstrWILC_WFIDrv *hWFIDrv, tstrWILC_AddStaParam *pstrStaParams)
{
- s32 s32Error = WILC_SUCCESS;
+ s32 s32Error = 0;
tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)hWFIDrv;
tstrHostIFmsg strHostIFmsg;
tstrWILC_AddStaParam *pstrAddStationMsg = &strHostIFmsg.uniHostIFmsgBody.strAddStaParam;
s32 host_int_set_power_mgmt(tstrWILC_WFIDrv *hWFIDrv, bool bIsEnabled, u32 u32Timeout)
{
- s32 s32Error = WILC_SUCCESS;
+ s32 s32Error = 0;
tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)hWFIDrv;
tstrHostIFmsg strHostIFmsg;
tstrHostIfPowerMgmtParam *pstrPowerMgmtParam = &strHostIFmsg.uniHostIFmsgBody.strPowerMgmtparam;
s32 host_int_setup_multicast_filter(tstrWILC_WFIDrv *hWFIDrv, bool bIsEnabled, u32 u32count)
{
- s32 s32Error = WILC_SUCCESS;
+ s32 s32Error = 0;
tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)hWFIDrv;
tstrHostIFmsg strHostIFmsg;
static int host_int_addBASession(tstrWILC_WFIDrv *hWFIDrv, char *pBSSID, char TID, short int BufferSize,
short int SessionTimeout, void *drvHandler)
{
- s32 s32Error = WILC_SUCCESS;
+ s32 s32Error = 0;
tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)hWFIDrv;
tstrHostIFmsg strHostIFmsg;
tstrHostIfBASessionInfo *pBASessionInfo = &strHostIFmsg.uniHostIFmsgBody.strHostIfBASessionInfo;
s32 host_int_delBASession(tstrWILC_WFIDrv *hWFIDrv, char *pBSSID, char TID)
{
- s32 s32Error = WILC_SUCCESS;
+ s32 s32Error = 0;
tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)hWFIDrv;
tstrHostIFmsg strHostIFmsg;
tstrHostIfBASessionInfo *pBASessionInfo = &strHostIFmsg.uniHostIFmsgBody.strHostIfBASessionInfo;
s32 host_int_del_All_Rx_BASession(tstrWILC_WFIDrv *hWFIDrv, char *pBSSID, char TID)
{
- s32 s32Error = WILC_SUCCESS;
+ s32 s32Error = 0;
tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)hWFIDrv;
tstrHostIFmsg strHostIFmsg;
tstrHostIfBASessionInfo *pBASessionInfo = &strHostIFmsg.uniHostIFmsgBody.strHostIfBASessionInfo;
* @version 1.0*/
s32 host_int_setup_ipaddress(tstrWILC_WFIDrv *hWFIDrv, u8 *u16ipadd, u8 idx)
{
- s32 s32Error = WILC_SUCCESS;
+ s32 s32Error = 0;
tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)hWFIDrv;
tstrHostIFmsg strHostIFmsg;
* @version 1.0*/
s32 host_int_get_ipaddress(tstrWILC_WFIDrv *hWFIDrv, u8 *u16ipadd, u8 idx)
{
- s32 s32Error = WILC_SUCCESS;
+ s32 s32Error = 0;
tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)hWFIDrv;
tstrHostIFmsg strHostIFmsg;
int WILC_WFI_Set_PMKSA(u8 *bssid, struct wilc_priv *priv)
{
u32 i;
- s32 s32Error = WILC_SUCCESS;
+ s32 s32Error = 0;
for (i = 0; i < priv->pmkid_list.numpmkid; i++) {
/*If bssid is found, set the values*/
s32Error = host_int_set_pmkid_info(priv->hWILCWFIDrv, &priv->pmkid_list);
- if (s32Error != WILC_SUCCESS)
+ if (s32Error != 0)
PRINT_ER("Error in pmkid\n");
break;
u32 channelnum = 0;
struct wilc_priv *priv;
- s32 s32Error = WILC_SUCCESS;
+ s32 s32Error = 0;
priv = wiphy_priv(wiphy);
u8CurrChannel = channelnum;
s32Error = host_int_set_mac_chnl_num(priv->hWILCWFIDrv, channelnum);
- if (s32Error != WILC_SUCCESS)
+ if (s32Error != 0)
PRINT_ER("Error in setting channel %d\n", channelnum);
return s32Error;
{
struct wilc_priv *priv;
u32 i;
- s32 s32Error = WILC_SUCCESS;
+ s32 s32Error = 0;
u8 au8ScanChanList[MAX_NUM_SCANNED_NETWORKS];
tstrHiddenNetwork strHiddenNetwork;
" channels\n");
}
- if (s32Error != WILC_SUCCESS) {
+ if (s32Error != 0) {
s32Error = -EBUSY;
PRINT_WRN(CFG80211_DBG, "Device is busy: Error(%d)\n", s32Error);
}
static int connect(struct wiphy *wiphy, struct net_device *dev,
struct cfg80211_connect_params *sme)
{
- s32 s32Error = WILC_SUCCESS;
+ s32 s32Error = 0;
u32 i;
u8 u8security = NO_ENCRYPT;
AUTHTYPE_T tenuAuth_type = ANY;
CfgConnectResult, (void *)priv, u8security,
tenuAuth_type, pstrNetworkInfo->u8channel,
pstrNetworkInfo->pJoinParams);
- if (s32Error != WILC_SUCCESS) {
+ if (s32Error != 0) {
PRINT_ER("host_int_set_join_req(): Error(%d)\n", s32Error);
s32Error = -ENOENT;
goto done;
*/
static int disconnect(struct wiphy *wiphy, struct net_device *dev, u16 reason_code)
{
- s32 s32Error = WILC_SUCCESS;
+ s32 s32Error = 0;
struct wilc_priv *priv;
#ifdef WILC_P2P
tstrWILC_WFIDrv *pstrWFIDrv;
#endif
s32Error = host_int_disconnect(priv->hWILCWFIDrv, reason_code);
- if (s32Error != WILC_SUCCESS) {
+ if (s32Error != 0) {
PRINT_ER("Error in disconnecting: Error(%d)\n", s32Error);
s32Error = -EINVAL;
}
const u8 *mac_addr, struct key_params *params)
{
- s32 s32Error = WILC_SUCCESS, KeyLen = params->key_len;
+ s32 s32Error = 0, KeyLen = params->key_len;
u32 i;
struct wilc_priv *priv;
const u8 *pu8RxMic = NULL;
const u8 *mac_addr)
{
struct wilc_priv *priv;
- s32 s32Error = WILC_SUCCESS;
+ s32 s32Error = 0;
priv = wiphy_priv(wiphy);
const u8 *mac_addr, void *cookie, void (*callback)(void *cookie, struct key_params *))
{
- s32 s32Error = WILC_SUCCESS;
+ s32 s32Error = 0;
struct wilc_priv *priv;
struct key_params key_params;
static int set_default_key(struct wiphy *wiphy, struct net_device *netdev, u8 key_index,
bool unicast, bool multicast)
{
- s32 s32Error = WILC_SUCCESS;
+ s32 s32Error = 0;
struct wilc_priv *priv;
static int WILC_WFI_dump_survey(struct wiphy *wiphy, struct net_device *netdev,
int idx, struct survey_info *info)
{
- s32 s32Error = WILC_SUCCESS;
+ s32 s32Error = 0;
if (idx != 0) {
static int get_station(struct wiphy *wiphy, struct net_device *dev,
const u8 *mac, struct station_info *sinfo)
{
- s32 s32Error = WILC_SUCCESS;
+ s32 s32Error = 0;
struct wilc_priv *priv;
perInterface_wlan_t *nic;
#ifdef WILC_AP_EXTERNAL_MLME
*/
static int set_wiphy_params(struct wiphy *wiphy, u32 changed)
{
- s32 s32Error = WILC_SUCCESS;
+ s32 s32Error = 0;
tstrCfgParamVal pstrCfgParamVal;
struct wilc_priv *priv;
struct net_device *dev, const u8 *peer,
const struct cfg80211_bitrate_mask *mask)
{
- s32 s32Error = WILC_SUCCESS;
+ s32 s32Error = 0;
PRINT_D(CFG80211_DBG, "Setting Bitrate mask function\n");
return s32Error;
struct cfg80211_pmksa *pmksa)
{
u32 i;
- s32 s32Error = WILC_SUCCESS;
+ s32 s32Error = 0;
u8 flag = 0;
struct wilc_priv *priv = wiphy_priv(wiphy);
u32 i;
u8 flag = 0;
- s32 s32Error = WILC_SUCCESS;
+ s32 s32Error = 0;
struct wilc_priv *priv = wiphy_priv(wiphy);
struct ieee80211_channel *chan,
unsigned int duration, u64 *cookie)
{
- s32 s32Error = WILC_SUCCESS;
+ s32 s32Error = 0;
struct wilc_priv *priv;
priv = wiphy_priv(wiphy);
struct wireless_dev *wdev,
u64 cookie)
{
- s32 s32Error = WILC_SUCCESS;
+ s32 s32Error = 0;
struct wilc_priv *priv;
priv = wiphy_priv(wiphy);
const struct ieee80211_mgmt *mgmt;
struct p2p_mgmt_data *mgmt_tx;
struct wilc_priv *priv;
- s32 s32Error = WILC_SUCCESS;
+ s32 s32Error = 0;
tstrWILC_WFIDrv *pstrWFIDrv;
u32 i;
perInterface_wlan_t *nic;
mgmt_tx = kmalloc(sizeof(struct p2p_mgmt_data), GFP_KERNEL);
if (mgmt_tx == NULL) {
PRINT_ER("Failed to allocate memory for mgmt_tx structure\n");
- return WILC_FAIL;
+ return -EFAULT;
}
mgmt_tx->buff = kmalloc(buf_len, GFP_KERNEL);
if (mgmt_tx->buff == NULL) {
PRINT_ER("Failed to allocate memory for mgmt_tx buff\n");
kfree(mgmt_tx);
- return WILC_FAIL;
+ return -EFAULT;
}
memcpy(mgmt_tx->buff, buf, len);
mgmt_tx->size = len;
host_int_set_power_mgmt(priv->hWILCWFIDrv, enabled, timeout);
- return WILC_SUCCESS;
+ return 0;
}
#ifdef WILC_AP_EXTERNAL_MLME
static int change_virtual_intf(struct wiphy *wiphy, struct net_device *dev,
enum nl80211_iftype type, u32 *flags, struct vif_params *params)
{
- s32 s32Error = WILC_SUCCESS;
+ s32 s32Error = 0;
struct wilc_priv *priv;
perInterface_wlan_t *nic;
u8 interface_type;
{
struct cfg80211_beacon_data *beacon = &(settings->beacon);
struct wilc_priv *priv;
- s32 s32Error = WILC_SUCCESS;
+ s32 s32Error = 0;
priv = wiphy_priv(wiphy);
PRINT_D(HOSTAPD_DBG, "Starting ap\n");
s32Error = set_channel(wiphy, &settings->chandef);
- if (s32Error != WILC_SUCCESS)
+ if (s32Error != 0)
PRINT_ER("Error in setting channel\n");
linux_wlan_set_bssid(dev, g_linux_wlan->strInterfaceInfo[0].aSrcAddress);
struct cfg80211_beacon_data *beacon)
{
struct wilc_priv *priv;
- s32 s32Error = WILC_SUCCESS;
+ s32 s32Error = 0;
priv = wiphy_priv(wiphy);
PRINT_D(HOSTAPD_DBG, "Setting beacon\n");
*/
static int stop_ap(struct wiphy *wiphy, struct net_device *dev)
{
- s32 s32Error = WILC_SUCCESS;
+ s32 s32Error = 0;
struct wilc_priv *priv;
u8 NullBssid[ETH_ALEN] = {0};
static int add_station(struct wiphy *wiphy, struct net_device *dev,
const u8 *mac, struct station_parameters *params)
{
- s32 s32Error = WILC_SUCCESS;
+ s32 s32Error = 0;
struct wilc_priv *priv;
tstrWILC_AddStaParam strStaParams = { {0} };
perInterface_wlan_t *nic;
struct station_del_parameters *params)
{
const u8 *mac = params->mac;
- s32 s32Error = WILC_SUCCESS;
+ s32 s32Error = 0;
struct wilc_priv *priv;
perInterface_wlan_t *nic;
static int change_station(struct wiphy *wiphy, struct net_device *dev,
const u8 *mac, struct station_parameters *params)
{
- s32 s32Error = WILC_SUCCESS;
+ s32 s32Error = 0;
struct wilc_priv *priv;
tstrWILC_AddStaParam strStaParams = { {0} };
perInterface_wlan_t *nic;
int del_virtual_intf(struct wiphy *wiphy, struct wireless_dev *wdev) /* tony for v3.8 support */
{
PRINT_D(HOSTAPD_DBG, "Deleting virtual interface\n");
- return WILC_SUCCESS;
+ return 0;
}
{
struct wilc_priv *priv;
struct wireless_dev *wdev;
- s32 s32Error = WILC_SUCCESS;
+ s32 s32Error = 0;
PRINT_D(CFG80211_DBG, "Registering wifi device\n");
int WILC_WFI_InitHostInt(struct net_device *net)
{
- s32 s32Error = WILC_SUCCESS;
+ s32 s32Error = 0;
struct wilc_priv *priv;
*/
int WILC_WFI_DeInitHostInt(struct net_device *net)
{
- s32 s32Error = WILC_SUCCESS;
+ s32 s32Error = 0;
struct wilc_priv *priv;