};
struct connect_attr {
- u8 *pu8bssid;
- u8 *pu8ssid;
+ u8 *bssid;
+ u8 *ssid;
size_t ssidLen;
u8 *pu8IEs;
size_t IEsLen;
static struct host_if_drv *wfidrv_list[NUM_CONCURRENT_IFC + 1];
struct host_if_drv *terminated_handle;
struct host_if_drv *gWFiDrvHandle;
-bool g_obtainingIP = false;
+bool g_obtainingIP;
u8 P2P_LISTEN_STATE;
static struct task_struct *HostIFthreadHandler;
static WILC_MsgQueueHandle gMsgQHostIF;
static u8 gapu8RcvdAssocResp[MAX_ASSOC_RESP_FRAME_SIZE];
-bool gbScanWhileConnected = false;
+bool gbScanWhileConnected;
static s8 gs8Rssi;
static s8 gs8lnkspd;
PRINT_D(GENERIC_DBG, "Handling connect request\n");
- if (memcmp(pstrHostIFconnectAttr->pu8bssid, u8ConnectedSSID, ETH_ALEN) == 0) {
+ if (memcmp(pstrHostIFconnectAttr->bssid, u8ConnectedSSID, ETH_ALEN) == 0) {
s32Error = 0;
PRINT_ER("Trying to connect to an already connected AP, Discard connect request\n");
goto ERRORHANDLER;
}
- if (pstrHostIFconnectAttr->pu8bssid != NULL) {
+ if (pstrHostIFconnectAttr->bssid != NULL) {
hif_drv->strWILC_UsrConnReq.pu8bssid = kmalloc(6, GFP_KERNEL);
- memcpy(hif_drv->strWILC_UsrConnReq.pu8bssid, pstrHostIFconnectAttr->pu8bssid, 6);
+ memcpy(hif_drv->strWILC_UsrConnReq.pu8bssid, pstrHostIFconnectAttr->bssid, 6);
}
hif_drv->strWILC_UsrConnReq.ssidLen = pstrHostIFconnectAttr->ssidLen;
- if (pstrHostIFconnectAttr->pu8ssid != NULL) {
+ if (pstrHostIFconnectAttr->ssid != NULL) {
hif_drv->strWILC_UsrConnReq.pu8ssid = kmalloc(pstrHostIFconnectAttr->ssidLen + 1, GFP_KERNEL);
- memcpy(hif_drv->strWILC_UsrConnReq.pu8ssid, pstrHostIFconnectAttr->pu8ssid,
+ memcpy(hif_drv->strWILC_UsrConnReq.pu8ssid, pstrHostIFconnectAttr->ssid,
pstrHostIFconnectAttr->ssidLen);
hif_drv->strWILC_UsrConnReq.pu8ssid[pstrHostIFconnectAttr->ssidLen] = '\0';
}
strWIDList[u32WidsCount].size = hif_drv->strWILC_UsrConnReq.ConnReqIEsLen;
u32WidsCount++;
- if (memcmp("DIRECT-", pstrHostIFconnectAttr->pu8ssid, 7)) {
+ if (memcmp("DIRECT-", pstrHostIFconnectAttr->ssid, 7)) {
gu32FlushedInfoElemAsocSize = hif_drv->strWILC_UsrConnReq.ConnReqIEsLen;
gu8FlushedInfoElemAsoc = kmalloc(gu32FlushedInfoElemAsocSize, GFP_KERNEL);
strWIDList[u32WidsCount].val = (s8 *)(&(hif_drv->strWILC_UsrConnReq.u8security));
u32WidsCount++;
- if (memcmp("DIRECT-", pstrHostIFconnectAttr->pu8ssid, 7))
+ if (memcmp("DIRECT-", pstrHostIFconnectAttr->ssid, 7))
gu8Flushed11iMode = hif_drv->strWILC_UsrConnReq.u8security;
PRINT_INFO(HOSTINF_DBG, "Encrypt Mode = %x\n", hif_drv->strWILC_UsrConnReq.u8security);
strWIDList[u32WidsCount].val = (s8 *)(&hif_drv->strWILC_UsrConnReq.tenuAuth_type);
u32WidsCount++;
- if (memcmp("DIRECT-", pstrHostIFconnectAttr->pu8ssid, 7))
+ if (memcmp("DIRECT-", pstrHostIFconnectAttr->ssid, 7))
gu8FlushedAuthType = (u8)hif_drv->strWILC_UsrConnReq.tenuAuth_type;
PRINT_INFO(HOSTINF_DBG, "Authentication Type = %x\n", hif_drv->strWILC_UsrConnReq.tenuAuth_type);
strWIDList[u32WidsCount].size = 112;
strWIDList[u32WidsCount].val = kmalloc(strWIDList[u32WidsCount].size, GFP_KERNEL);
- if (memcmp("DIRECT-", pstrHostIFconnectAttr->pu8ssid, 7)) {
+ if (memcmp("DIRECT-", pstrHostIFconnectAttr->ssid, 7)) {
gu32FlushedJoinReqSize = strWIDList[u32WidsCount].size;
gu8FlushedJoinReq = kmalloc(gu32FlushedJoinReqSize, GFP_KERNEL);
}
pu8CurrByte = strWIDList[u32WidsCount].val;
- if (pstrHostIFconnectAttr->pu8ssid != NULL) {
- memcpy(pu8CurrByte, pstrHostIFconnectAttr->pu8ssid, pstrHostIFconnectAttr->ssidLen);
+ if (pstrHostIFconnectAttr->ssid != NULL) {
+ memcpy(pu8CurrByte, pstrHostIFconnectAttr->ssid, pstrHostIFconnectAttr->ssidLen);
pu8CurrByte[pstrHostIFconnectAttr->ssidLen] = '\0';
}
pu8CurrByte += MAX_SSID_LEN;
*(pu8CurrByte++) = ((ptstrJoinBssParam->cap_info) >> 8) & 0xFF;
PRINT_D(HOSTINF_DBG, "* Cap Info %0x*\n", (*(pu8CurrByte - 2) | ((*(pu8CurrByte - 1)) << 8)));
- if (pstrHostIFconnectAttr->pu8bssid != NULL)
- memcpy(pu8CurrByte, pstrHostIFconnectAttr->pu8bssid, 6);
- pu8CurrByte += 6;
-
- if (pstrHostIFconnectAttr->pu8bssid != NULL)
- memcpy(pu8CurrByte, pstrHostIFconnectAttr->pu8bssid, 6);
+ if (pstrHostIFconnectAttr->bssid != NULL)
+ memcpy(pu8CurrByte, pstrHostIFconnectAttr->bssid, 6);
pu8CurrByte += 6;
*(pu8CurrByte++) = (ptstrJoinBssParam->beacon_period) & 0xFF;
u32WidsCount++;
gu32WidConnRstHack = 0;
- if (memcmp("DIRECT-", pstrHostIFconnectAttr->pu8ssid, 7)) {
+ if (memcmp("DIRECT-", pstrHostIFconnectAttr->ssid, 7)) {
memcpy(gu8FlushedJoinReq, pu8CurrByte, gu32FlushedJoinReqSize);
gu8FlushedJoinReqDrvHandler = hif_drv;
}
PRINT_D(GENERIC_DBG, "send HOST_IF_WAITING_CONN_RESP\n");
- if (pstrHostIFconnectAttr->pu8bssid != NULL) {
- memcpy(u8ConnectedSSID, pstrHostIFconnectAttr->pu8bssid, ETH_ALEN);
+ if (pstrHostIFconnectAttr->bssid != NULL) {
+ memcpy(u8ConnectedSSID, pstrHostIFconnectAttr->bssid, ETH_ALEN);
- PRINT_D(GENERIC_DBG, "save Bssid = %pM\n", pstrHostIFconnectAttr->pu8bssid);
+ PRINT_D(GENERIC_DBG, "save Bssid = %pM\n", pstrHostIFconnectAttr->bssid);
PRINT_D(GENERIC_DBG, "save bssid = %pM\n", u8ConnectedSSID);
}
memset(&strConnectInfo, 0, sizeof(tstrConnectInfo));
if (pstrHostIFconnectAttr->pfConnectResult != NULL) {
- if (pstrHostIFconnectAttr->pu8bssid != NULL)
- memcpy(strConnectInfo.au8bssid, pstrHostIFconnectAttr->pu8bssid, 6);
+ if (pstrHostIFconnectAttr->bssid != NULL)
+ memcpy(strConnectInfo.au8bssid, pstrHostIFconnectAttr->bssid, 6);
if (pstrHostIFconnectAttr->pu8IEs != NULL) {
strConnectInfo.ReqIEsLen = pstrHostIFconnectAttr->IEsLen;
}
PRINT_D(HOSTINF_DBG, "Deallocating connection parameters\n");
- if (pstrHostIFconnectAttr->pu8bssid != NULL) {
- kfree(pstrHostIFconnectAttr->pu8bssid);
- pstrHostIFconnectAttr->pu8bssid = NULL;
+ if (pstrHostIFconnectAttr->bssid != NULL) {
+ kfree(pstrHostIFconnectAttr->bssid);
+ pstrHostIFconnectAttr->bssid = NULL;
}
- if (pstrHostIFconnectAttr->pu8ssid != NULL) {
- kfree(pstrHostIFconnectAttr->pu8ssid);
- pstrHostIFconnectAttr->pu8ssid = NULL;
+ if (pstrHostIFconnectAttr->ssid != NULL) {
+ kfree(pstrHostIFconnectAttr->ssid);
+ pstrHostIFconnectAttr->ssid = NULL;
}
if (pstrHostIFconnectAttr->pu8IEs != NULL) {
msg.drv = hif_drv ;
if (pu8bssid != NULL) {
- msg.body.con_info.pu8bssid = kmalloc(6, GFP_KERNEL);
- memcpy(msg.body.con_info.pu8bssid,
- pu8bssid, 6);
+ msg.body.con_info.bssid = kmalloc(6, GFP_KERNEL);
+ memcpy(msg.body.con_info.bssid, pu8bssid, 6);
}
if (pu8ssid != NULL) {
msg.body.con_info.ssidLen = ssidLen;
- msg.body.con_info.pu8ssid = kmalloc(ssidLen, GFP_KERNEL);
- memcpy(msg.body.con_info.pu8ssid,
-
- pu8ssid, ssidLen);
+ msg.body.con_info.ssid = kmalloc(ssidLen, GFP_KERNEL);
+ memcpy(msg.body.con_info.ssid, pu8ssid, ssidLen);
}
if (pu8IEs != NULL) {