Commit 3bd1a38b authored by Joe Perches's avatar Joe Perches Committed by Greg Kroah-Hartman

staging:vt6655:wcmd: Whitespace cleanups

Neatening only.
git diff -w shows no differences.
Signed-off-by: default avatarJoe Perches <joe@perches.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent d9d644ed
......@@ -62,7 +62,7 @@
/*--------------------- Static Classes ----------------------------*/
/*--------------------- Static Variables --------------------------*/
static int msglevel =MSG_LEVEL_INFO;
static int msglevel = MSG_LEVEL_INFO;
//static int msglevel =MSG_LEVEL_DEBUG;
/*--------------------- Static Functions --------------------------*/
......@@ -70,7 +70,7 @@ static
void
s_vProbeChannel(
PSDevice pDevice
);
);
static
......@@ -82,14 +82,14 @@ s_MgrMakeProbeRequest(
PWLAN_IE_SSID pSSID,
PWLAN_IE_SUPP_RATES pCurrRates,
PWLAN_IE_SUPP_RATES pCurrExtSuppRates
);
);
static
bool
s_bCommandComplete (
s_bCommandComplete(
PSDevice pDevice
);
);
/*--------------------- Export Variables --------------------------*/
......@@ -200,13 +200,13 @@ vAdHocBeaconRestart(PSDevice pDevice)
* Return Value:
* none.
*
-*/
-*/
static
void
s_vProbeChannel(
PSDevice pDevice
)
)
{
//1M, 2M, 5M, 11M, 18M, 24M, 36M, 54M
unsigned char abyCurrSuppRatesG[] = {WLAN_EID_SUPP_RATES, 8, 0x02, 0x04, 0x0B, 0x16, 0x24, 0x30, 0x48, 0x6C};
......@@ -238,8 +238,8 @@ s_vProbeChannel(
(PWLAN_IE_SUPP_RATES)abyCurrExtSuppRatesG
);
if (pTxPacket != NULL ){
for (ii = 0; ii < 2 ; ii++) {
if (pTxPacket != NULL) {
for (ii = 0; ii < 2; ii++) {
if (csMgmt_xmit(pDevice, pTxPacket) != CMD_STATUS_PENDING) {
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Probe request sending fail.. \n");
}
......@@ -263,7 +263,7 @@ s_vProbeChannel(
* Return Value:
* A ptr to Tx frame or NULL on allocation failue
*
-*/
-*/
PSTxMgmtPacket
......@@ -275,7 +275,7 @@ s_MgrMakeProbeRequest(
PWLAN_IE_SUPP_RATES pCurrRates,
PWLAN_IE_SUPP_RATES pCurrExtSuppRates
)
)
{
PSTxMgmtPacket pTxPacket = NULL;
WLAN_FR_PROBEREQ sFrame;
......@@ -291,10 +291,10 @@ s_MgrMakeProbeRequest(
(
WLAN_SET_FC_FTYPE(WLAN_TYPE_MGR) |
WLAN_SET_FC_FSTYPE(WLAN_FSTYPE_PROBEREQ)
));
memcpy( sFrame.pHdr->sA3.abyAddr1, pScanBSSID, WLAN_ADDR_LEN);
memcpy( sFrame.pHdr->sA3.abyAddr2, pMgmt->abyMACAddr, WLAN_ADDR_LEN);
memcpy( sFrame.pHdr->sA3.abyAddr3, pScanBSSID, WLAN_BSSID_LEN);
));
memcpy(sFrame.pHdr->sA3.abyAddr1, pScanBSSID, WLAN_ADDR_LEN);
memcpy(sFrame.pHdr->sA3.abyAddr2, pMgmt->abyMACAddr, WLAN_ADDR_LEN);
memcpy(sFrame.pHdr->sA3.abyAddr3, pScanBSSID, WLAN_BSSID_LEN);
// Copy the SSID, pSSID->len=0 indicate broadcast SSID
sFrame.pSSID = (PWLAN_IE_SSID)(sFrame.pBuf + sFrame.len);
sFrame.len += pSSID->len + WLAN_IEHDR_LEN;
......@@ -322,7 +322,7 @@ void
vCommandTimerWait(
void *hDeviceContext,
unsigned int MSecond
)
)
{
PSDevice pDevice = (PSDevice)hDeviceContext;
......@@ -339,9 +339,9 @@ vCommandTimerWait(
void
vCommandTimer (
vCommandTimer(
void *hDeviceContext
)
)
{
PSDevice pDevice = (PSDevice)hDeviceContext;
PSMgmtObject pMgmt = pDevice->pMgmt;
......@@ -360,7 +360,7 @@ vCommandTimer (
spin_lock_irq(&pDevice->lock);
switch ( pDevice->eCommandState ) {
switch (pDevice->eCommandState) {
case WLAN_CMD_SCAN_START:
......@@ -378,16 +378,16 @@ vCommandTimer (
return;
}
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"eCommandState= WLAN_CMD_SCAN_START\n");
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "eCommandState= WLAN_CMD_SCAN_START\n");
pItemSSID = (PWLAN_IE_SSID)pMgmt->abyScanSSID;
// wait all Data TD complete
if (pDevice->iTDUsed[TYPE_AC0DMA] != 0){
if (pDevice->iTDUsed[TYPE_AC0DMA] != 0) {
spin_unlock_irq(&pDevice->lock);
vCommandTimerWait((void *)pDevice, 10);
return;
}
if (pMgmt->uScanChannel == 0 ) {
if (pMgmt->uScanChannel == 0) {
pMgmt->uScanChannel = pDevice->byMinChannel;
// Set Baseband to be more sensitive.
......@@ -410,7 +410,7 @@ vCommandTimer (
} else {
//2008-8-4 <add> by chester
if (!is_channel_valid(pMgmt->uScanChannel)) {
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Invalid channel pMgmt->uScanChannel = %d \n",pMgmt->uScanChannel);
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Invalid channel pMgmt->uScanChannel = %d \n", pMgmt->uScanChannel);
s_bCommandComplete(pDevice);
spin_unlock_irq(&pDevice->lock);
return;
......@@ -434,9 +434,9 @@ vCommandTimer (
vAdHocBeaconStop(pDevice);
if (set_channel(pMgmt->pAdapter, pMgmt->uScanChannel) == true) {
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"SCAN Channel: %d\n", pMgmt->uScanChannel);
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "SCAN Channel: %d\n", pMgmt->uScanChannel);
} else {
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"SET SCAN Channel Fail: %d\n", pMgmt->uScanChannel);
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "SET SCAN Channel Fail: %d\n", pMgmt->uScanChannel);
}
CARDbSetBSSID(pMgmt->pAdapter, pMgmt->abyCurrBSSID, OP_MODE_UNKNOWN);
// printk("chester-mxch=%d\n",pDevice->byMaxChannel);
......@@ -444,8 +444,8 @@ vCommandTimer (
pMgmt->uScanChannel++;
//2008-8-4 <modify> by chester
if (!is_channel_valid(pMgmt->uScanChannel) &&
pMgmt->uScanChannel <= pDevice->byMaxChannel ){
pMgmt->uScanChannel=pDevice->byMaxChannel+1;
pMgmt->uScanChannel <= pDevice->byMaxChannel) {
pMgmt->uScanChannel = pDevice->byMaxChannel + 1;
pMgmt->eCommandState = WLAN_CMD_SCAN_END;
}
......@@ -483,7 +483,7 @@ vCommandTimer (
vAdHocBeaconRestart(pDevice);
//2008-0409-07, <Add> by Einsn Liu
#ifdef WPA_SUPPLICANT_DRIVER_WEXT_SUPPORT
if(pMgmt->eScanType == WMAC_SCAN_PASSIVE)
if (pMgmt->eScanType == WMAC_SCAN_PASSIVE)
{//send scan event to wpa_Supplicant
union iwreq_data wrqu;
memset(&wrqu, 0, sizeof(wrqu));
......@@ -493,7 +493,7 @@ vCommandTimer (
s_bCommandComplete(pDevice);
break;
case WLAN_CMD_DISASSOCIATE_START :
case WLAN_CMD_DISASSOCIATE_START:
pDevice->byReAssocCount = 0;
if ((pMgmt->eCurrMode == WMAC_MODE_ESS_STA) &&
(pMgmt->eCurrState != WMAC_STATE_ASSOC)) {
......@@ -501,7 +501,7 @@ vCommandTimer (
spin_unlock_irq(&pDevice->lock);
return;
} else {
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Send Disassociation Packet..\n");
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Send Disassociation Packet..\n");
// reason = 8 : disassoc because sta has left
vMgrDisassocBeginSta((void *)pDevice, pMgmt, pMgmt->abyCurrBSSID, (8), &Status);
pDevice->bLinkPass = false;
......@@ -516,20 +516,20 @@ vCommandTimer (
netif_stop_queue(pDevice->dev);
pDevice->eCommandState = WLAN_DISASSOCIATE_WAIT;
// wait all Control TD complete
if (pDevice->iTDUsed[TYPE_TXDMA0] != 0){
if (pDevice->iTDUsed[TYPE_TXDMA0] != 0) {
vCommandTimerWait((void *)pDevice, 10);
spin_unlock_irq(&pDevice->lock);
return;
}
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO" CARDbRadioPowerOff\n");
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " CARDbRadioPowerOff\n");
//2008-09-02 <mark> by chester
// CARDbRadioPowerOff(pDevice);
s_bCommandComplete(pDevice);
break;
case WLAN_DISASSOCIATE_WAIT :
case WLAN_DISASSOCIATE_WAIT:
// wait all Control TD complete
if (pDevice->iTDUsed[TYPE_TXDMA0] != 0){
if (pDevice->iTDUsed[TYPE_TXDMA0] != 0) {
vCommandTimerWait((void *)pDevice, 10);
spin_unlock_irq(&pDevice->lock);
return;
......@@ -547,24 +547,24 @@ vCommandTimer (
return;
}
//printk("chester-currmode=%d\n",pMgmt->eCurrMode);
printk("chester-abyDesireSSID=%s\n",((PWLAN_IE_SSID)pMgmt->abyDesireSSID)->abySSID);
printk("chester-abyDesireSSID=%s\n", ((PWLAN_IE_SSID)pMgmt->abyDesireSSID)->abySSID);
//memcpy(pMgmt->abyAdHocSSID,pMgmt->abyDesireSSID,
//((PWLAN_IE_SSID)pMgmt->abyDesireSSID)->len + WLAN_IEHDR_LEN);
pItemSSID = (PWLAN_IE_SSID)pMgmt->abyDesireSSID;
pItemSSIDCurr = (PWLAN_IE_SSID)pMgmt->abyCurrSSID;
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO" cmd: desire ssid = %s\n", pItemSSID->abySSID);
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO" cmd: curr ssid = %s\n", pItemSSIDCurr->abySSID);
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " cmd: desire ssid = %s\n", pItemSSID->abySSID);
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " cmd: curr ssid = %s\n", pItemSSIDCurr->abySSID);
if (pMgmt->eCurrState == WMAC_STATE_ASSOC) {
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO" Cmd pMgmt->eCurrState == WMAC_STATE_ASSOC\n");
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO" pItemSSID->len =%d\n",pItemSSID->len);
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO" pItemSSIDCurr->len = %d\n",pItemSSIDCurr->len);
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO" desire ssid = %s\n", pItemSSID->abySSID);
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO" curr ssid = %s\n", pItemSSIDCurr->abySSID);
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " Cmd pMgmt->eCurrState == WMAC_STATE_ASSOC\n");
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " pItemSSID->len =%d\n", pItemSSID->len);
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " pItemSSIDCurr->len = %d\n", pItemSSIDCurr->len);
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " desire ssid = %s\n", pItemSSID->abySSID);
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " curr ssid = %s\n", pItemSSIDCurr->abySSID);
}
if ((pMgmt->eCurrState == WMAC_STATE_ASSOC) ||
((pMgmt->eCurrMode == WMAC_MODE_IBSS_STA)&& (pMgmt->eCurrState == WMAC_STATE_JOINTED))) {
((pMgmt->eCurrMode == WMAC_MODE_IBSS_STA) && (pMgmt->eCurrState == WMAC_STATE_JOINTED))) {
if (pItemSSID->len == pItemSSIDCurr->len) {
if (memcmp(pItemSSID->abySSID, pItemSSIDCurr->abySSID, pItemSSID->len) == 0) {
......@@ -589,7 +589,7 @@ printk("chester-abyDesireSSID=%s\n",((PWLAN_IE_SSID)pMgmt->abyDesireSSID)->abySS
// Call mgr to begin the deauthentication
// reason = (3) because sta has left ESS
if (pMgmt->eCurrState>= WMAC_STATE_AUTH) {
if (pMgmt->eCurrState >= WMAC_STATE_AUTH) {
vMgrDeAuthenBeginSta((void *)pDevice, pMgmt, pMgmt->abyCurrBSSID, (3), &Status);
}
// Call mgr to begin the authentication
......@@ -599,14 +599,14 @@ printk("chester-abyDesireSSID=%s\n",((PWLAN_IE_SSID)pMgmt->abyDesireSSID)->abySS
pDevice->eCommandState = WLAN_AUTHENTICATE_WAIT;
vCommandTimerWait((void *)pDevice, AUTHENTICATE_TIMEOUT);
spin_unlock_irq(&pDevice->lock);
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO" Set eCommandState = WLAN_AUTHENTICATE_WAIT\n");
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " Set eCommandState = WLAN_AUTHENTICATE_WAIT\n");
return;
}
}
// if Adhoc mode
else if (pMgmt->eCurrMode == WMAC_MODE_IBSS_STA) {
if (pMgmt->eCurrState == WMAC_STATE_JOINTED) {
if (netif_queue_stopped(pDevice->dev)){
if (netif_queue_stopped(pDevice->dev)) {
netif_wake_queue(pDevice->dev);
}
pDevice->bLinkPass = true;
......@@ -618,7 +618,7 @@ printk("chester-abyDesireSSID=%s\n",((PWLAN_IE_SSID)pMgmt->abyDesireSSID)->abySS
else {
// start own IBSS
vMgrCreateOwnIBSS((void *)pDevice, &Status);
if (Status != CMD_STATUS_SUCCESS){
if (Status != CMD_STATUS_SUCCESS) {
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " WLAN_CMD_IBSS_CREATE fail ! \n");
}
BSSvAddMulticastNode(pDevice);
......@@ -630,43 +630,43 @@ printk("chester-abyDesireSSID=%s\n",((PWLAN_IE_SSID)pMgmt->abyDesireSSID)->abySS
pMgmt->eConfigMode == WMAC_CONFIG_AUTO) {
// start own IBSS
vMgrCreateOwnIBSS((void *)pDevice, &Status);
if (Status != CMD_STATUS_SUCCESS){
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO" WLAN_CMD_IBSS_CREATE fail ! \n");
if (Status != CMD_STATUS_SUCCESS) {
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " WLAN_CMD_IBSS_CREATE fail ! \n");
}
BSSvAddMulticastNode(pDevice);
if (netif_queue_stopped(pDevice->dev)){
if (netif_queue_stopped(pDevice->dev)) {
netif_wake_queue(pDevice->dev);
}
pDevice->bLinkPass = true;
}
else {
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Disconnect SSID none\n");
#ifdef WPA_SUPPLICANT_DRIVER_WEXT_SUPPORT
// if(pDevice->bWPASuppWextEnabled == true)
#ifdef WPA_SUPPLICANT_DRIVER_WEXT_SUPPORT
// if (pDevice->bWPASuppWextEnabled == true)
{
union iwreq_data wrqu;
memset(&wrqu, 0, sizeof (wrqu));
memset(&wrqu, 0, sizeof(wrqu));
wrqu.ap_addr.sa_family = ARPHRD_ETHER;
printk("wireless_send_event--->SIOCGIWAP(disassociated:vMgrJoinBSSBegin Fail !!)\n");
wireless_send_event(pDevice->dev, SIOCGIWAP, &wrqu, NULL);
}
#endif
#endif
}
}
s_bCommandComplete(pDevice);
break;
case WLAN_AUTHENTICATE_WAIT :
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"eCommandState == WLAN_AUTHENTICATE_WAIT\n");
case WLAN_AUTHENTICATE_WAIT:
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "eCommandState == WLAN_AUTHENTICATE_WAIT\n");
if (pMgmt->eCurrState == WMAC_STATE_AUTH) {
// Call mgr to begin the association
pDevice->byLinkWaitCount = 0;
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"eCurrState == WMAC_STATE_AUTH\n");
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "eCurrState == WMAC_STATE_AUTH\n");
vMgrAssocBeginSta((void *)pDevice, pMgmt, &Status);
if (Status == CMD_STATUS_SUCCESS) {
pDevice->byLinkWaitCount = 0;
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"eCommandState = WLAN_ASSOCIATE_WAIT\n");
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "eCommandState = WLAN_ASSOCIATE_WAIT\n");
pDevice->eCommandState = WLAN_ASSOCIATE_WAIT;
vCommandTimerWait((void *)pDevice, ASSOCIATE_TIMEOUT);
spin_unlock_irq(&pDevice->lock);
......@@ -674,12 +674,12 @@ printk("chester-abyDesireSSID=%s\n",((PWLAN_IE_SSID)pMgmt->abyDesireSSID)->abySS
}
}
else if(pMgmt->eCurrState < WMAC_STATE_AUTHPENDING) {
else if (pMgmt->eCurrState < WMAC_STATE_AUTHPENDING) {
printk("WLAN_AUTHENTICATE_WAIT:Authen Fail???\n");
}
else if(pDevice->byLinkWaitCount <= 4){ //mike add:wait another 2 sec if authenticated_frame delay!
pDevice->byLinkWaitCount ++;
printk("WLAN_AUTHENTICATE_WAIT:wait %d times!!\n",pDevice->byLinkWaitCount);
else if (pDevice->byLinkWaitCount <= 4) { //mike add:wait another 2 sec if authenticated_frame delay!
pDevice->byLinkWaitCount++;
printk("WLAN_AUTHENTICATE_WAIT:wait %d times!!\n", pDevice->byLinkWaitCount);
spin_unlock_irq(&pDevice->lock);
vCommandTimerWait((void *)pDevice, AUTHENTICATE_TIMEOUT/2);
return;
......@@ -688,9 +688,9 @@ printk("chester-abyDesireSSID=%s\n",((PWLAN_IE_SSID)pMgmt->abyDesireSSID)->abySS
s_bCommandComplete(pDevice);
break;
case WLAN_ASSOCIATE_WAIT :
case WLAN_ASSOCIATE_WAIT:
if (pMgmt->eCurrState == WMAC_STATE_ASSOC) {
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"eCurrState == WMAC_STATE_ASSOC\n");
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "eCurrState == WMAC_STATE_ASSOC\n");
if (pDevice->ePSMode != WMAC_POWER_CAM) {
PSvEnablePowerSaving((void *)pDevice, pMgmt->wListenInterval);
}
......@@ -705,11 +705,11 @@ printk("chester-abyDesireSSID=%s\n",((PWLAN_IE_SSID)pMgmt->abyDesireSSID)->abySS
BBvSetFOE(pDevice->PortOffset);
PSbSendNullPacket(pDevice);
}
if (netif_queue_stopped(pDevice->dev)){
if (netif_queue_stopped(pDevice->dev)) {
netif_wake_queue(pDevice->dev);
}
#ifdef TxInSleep
if(pDevice->IsTxDataTrigger != false) { //TxDataTimer is not triggered at the first time
#ifdef TxInSleep
if (pDevice->IsTxDataTrigger != false) { //TxDataTimer is not triggered at the first time
// printk("Re-initial TxDataTimer****\n");
del_timer(&pDevice->sTimerTxData);
init_timer(&pDevice->sTimerTxData);
......@@ -724,14 +724,14 @@ printk("chester-abyDesireSSID=%s\n",((PWLAN_IE_SSID)pMgmt->abyDesireSSID)->abySS
}
pDevice->IsTxDataTrigger = true;
add_timer(&pDevice->sTimerTxData);
#endif
#endif
}
else if(pMgmt->eCurrState < WMAC_STATE_ASSOCPENDING) {
else if (pMgmt->eCurrState < WMAC_STATE_ASSOCPENDING) {
printk("WLAN_ASSOCIATE_WAIT:Association Fail???\n");
}
else if(pDevice->byLinkWaitCount <= 4){ //mike add:wait another 2 sec if associated_frame delay!
pDevice->byLinkWaitCount ++;
printk("WLAN_ASSOCIATE_WAIT:wait %d times!!\n",pDevice->byLinkWaitCount);
else if (pDevice->byLinkWaitCount <= 4) { //mike add:wait another 2 sec if associated_frame delay!
pDevice->byLinkWaitCount++;
printk("WLAN_ASSOCIATE_WAIT:wait %d times!!\n", pDevice->byLinkWaitCount);
spin_unlock_irq(&pDevice->lock);
vCommandTimerWait((void *)pDevice, ASSOCIATE_TIMEOUT/2);
return;
......@@ -741,8 +741,8 @@ printk("chester-abyDesireSSID=%s\n",((PWLAN_IE_SSID)pMgmt->abyDesireSSID)->abySS
s_bCommandComplete(pDevice);
break;
case WLAN_CMD_AP_MODE_START :
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"eCommandState == WLAN_CMD_AP_MODE_START\n");
case WLAN_CMD_AP_MODE_START:
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "eCommandState == WLAN_CMD_AP_MODE_START\n");
if (pMgmt->eConfigMode == WMAC_CONFIG_AP) {
del_timer(&pMgmt->sTimerSecondCallback);
......@@ -758,15 +758,15 @@ printk("chester-abyDesireSSID=%s\n",((PWLAN_IE_SSID)pMgmt->abyDesireSSID)->abySS
pDevice->bFixRate = false;
vMgrCreateOwnIBSS((void *)pDevice, &Status);
if (Status != CMD_STATUS_SUCCESS){
if (Status != CMD_STATUS_SUCCESS) {
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " vMgrCreateOwnIBSS fail ! \n");
}
// alway turn off unicast bit
MACvRegBitsOff(pDevice->PortOffset, MAC_REG_RCR, RCR_UNICAST);
pDevice->byRxMode &= ~RCR_UNICAST;
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "wcmd: rx_mode = %x\n", pDevice->byRxMode );
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "wcmd: rx_mode = %x\n", pDevice->byRxMode);
BSSvAddMulticastNode(pDevice);
if (netif_queue_stopped(pDevice->dev)){
if (netif_queue_stopped(pDevice->dev)) {
netif_wake_queue(pDevice->dev);
}
pDevice->bLinkPass = true;
......@@ -775,7 +775,7 @@ printk("chester-abyDesireSSID=%s\n",((PWLAN_IE_SSID)pMgmt->abyDesireSSID)->abySS
s_bCommandComplete(pDevice);
break;
case WLAN_CMD_TX_PSPACKET_START :
case WLAN_CMD_TX_PSPACKET_START:
// DTIM Multicast tx
if (pMgmt->sNodeDBTable[0].bRxPSPoll) {
while ((skb = skb_dequeue(&pMgmt->sNodeDBTable[0].sTxPSQueue)) != NULL) {
......@@ -832,8 +832,8 @@ printk("chester-abyDesireSSID=%s\n",((PWLAN_IE_SSID)pMgmt->abyDesireSSID)->abySS
break;
case WLAN_CMD_RADIO_START :
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"eCommandState == WLAN_CMD_RADIO_START\n");
case WLAN_CMD_RADIO_START:
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "eCommandState == WLAN_CMD_RADIO_START\n");
if (pDevice->bRadioCmd == true)
CARDbRadioPowerOn(pDevice);
else
......@@ -843,26 +843,26 @@ printk("chester-abyDesireSSID=%s\n",((PWLAN_IE_SSID)pMgmt->abyDesireSSID)->abySS
break;
case WLAN_CMD_CHECK_BBSENSITIVITY_CHANGE :
//DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"eCommandState == WLAN_CMD_CHECK_BBSENSITIVITY_START\n");
case WLAN_CMD_CHECK_BBSENSITIVITY_CHANGE:
//DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "eCommandState == WLAN_CMD_CHECK_BBSENSITIVITY_START\n");
// wait all TD complete
if (pDevice->iTDUsed[TYPE_AC0DMA] != 0){
if (pDevice->iTDUsed[TYPE_AC0DMA] != 0) {
vCommandTimerWait((void *)pDevice, 10);
spin_unlock_irq(&pDevice->lock);
return;
}
if (pDevice->iTDUsed[TYPE_TXDMA0] != 0){
if (pDevice->iTDUsed[TYPE_TXDMA0] != 0) {
vCommandTimerWait((void *)pDevice, 10);
spin_unlock_irq(&pDevice->lock);
return;
}
pDevice->byBBVGACurrent = pDevice->byBBVGANew;
BBvSetVGAGainOffset(pDevice, pDevice->byBBVGACurrent);
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"SetVGAGainOffset %02X\n", pDevice->byBBVGACurrent);
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "SetVGAGainOffset %02X\n", pDevice->byBBVGACurrent);
s_bCommandComplete(pDevice);
break;
default :
default:
s_bCommandComplete(pDevice);
break;
......@@ -875,9 +875,9 @@ printk("chester-abyDesireSSID=%s\n",((PWLAN_IE_SSID)pMgmt->abyDesireSSID)->abySS
static
bool
s_bCommandComplete (
s_bCommandComplete(
PSDevice pDevice
)
)
{
PWLAN_IE_SSID pSSID;
bool bRadioCmd = false;
......@@ -900,9 +900,9 @@ s_bCommandComplete (
ADD_ONE_WITH_WRAP_AROUND(pDevice->uCmdDequeueIdx, CMD_Q_SIZE);
pDevice->cbFreeCmdQueue++;
pDevice->bCmdRunning = true;
switch ( pDevice->eCommand ) {
switch (pDevice->eCommand) {
case WLAN_CMD_BSSID_SCAN:
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"eCommandState= WLAN_CMD_BSSID_SCAN\n");
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "eCommandState= WLAN_CMD_BSSID_SCAN\n");
pDevice->eCommandState = WLAN_CMD_SCAN_START;
pMgmt->uScanChannel = 0;
if (pSSID->len != 0) {
......@@ -913,7 +913,7 @@ s_bCommandComplete (
/*
if ((bForceSCAN == false) && (pDevice->bLinkPass == true)) {
if ((pSSID->len == ((PWLAN_IE_SSID)pMgmt->abyCurrSSID)->len) &&
( !memcmp(pSSID->abySSID, ((PWLAN_IE_SSID)pMgmt->abyCurrSSID)->abySSID, pSSID->len))) {
(!memcmp(pSSID->abySSID, ((PWLAN_IE_SSID)pMgmt->abyCurrSSID)->abySSID, pSSID->len))) {
pDevice->eCommandState = WLAN_CMD_IDLE;
}
}
......@@ -925,7 +925,7 @@ s_bCommandComplete (
pSSID->len = WLAN_SSID_MAXLEN;
if (pSSID->len != 0)
memcpy(pDevice->pMgmt->abyDesireSSID, pSSID, WLAN_IEHDR_LEN + WLAN_SSID_MAXLEN + 1);
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"eCommandState= WLAN_CMD_SSID_START\n");
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "eCommandState= WLAN_CMD_SSID_START\n");
break;
case WLAN_CMD_DISASSOCIATE:
pDevice->eCommandState = WLAN_CMD_DISASSOCIATE_START;
......@@ -957,11 +957,11 @@ s_bCommandComplete (
bool bScheduleCommand (
bool bScheduleCommand(
void *hDeviceContext,
CMD_CODE eCommand,
unsigned char *pbyItem0
)
)
{
PSDevice pDevice = (PSDevice)hDeviceContext;
......@@ -1038,16 +1038,16 @@ bool bScheduleCommand (
* Return Value: true if success; otherwise false
*
*/
bool bClearBSSID_SCAN (
bool bClearBSSID_SCAN(
void *hDeviceContext
)
)
{
PSDevice pDevice = (PSDevice)hDeviceContext;
unsigned int uCmdDequeueIdx = pDevice->uCmdDequeueIdx;
unsigned int ii;
if ((pDevice->cbFreeCmdQueue < CMD_Q_SIZE) && (uCmdDequeueIdx != pDevice->uCmdEnqueueIdx)) {
for (ii = 0; ii < (CMD_Q_SIZE - pDevice->cbFreeCmdQueue); ii ++) {
for (ii = 0; ii < (CMD_Q_SIZE - pDevice->cbFreeCmdQueue); ii++) {
if (pDevice->eCmdQueue[uCmdDequeueIdx].eCmd == WLAN_CMD_BSSID_SCAN)
pDevice->eCmdQueue[uCmdDequeueIdx].eCmd = WLAN_CMD_IDLE;
ADD_ONE_WITH_WRAP_AROUND(uCmdDequeueIdx, CMD_Q_SIZE);
......@@ -1062,7 +1062,7 @@ bool bClearBSSID_SCAN (
void
vResetCommandTimer(
void *hDeviceContext
)
)
{
PSDevice pDevice = (PSDevice)hDeviceContext;
......@@ -1086,13 +1086,13 @@ vResetCommandTimer(
void
BSSvSecondTxData(
void *hDeviceContext
)
)
{
PSDevice pDevice = (PSDevice)hDeviceContext;
PSMgmtObject pMgmt = &(pDevice->sMgmtObj);
pDevice->nTxDataTimeCout++;
if(pDevice->nTxDataTimeCout<4) //don't tx data if timer less than 40s
if (pDevice->nTxDataTimeCout < 4) //don't tx data if timer less than 40s
{
// printk("mike:%s-->no data Tx not exceed the desired Time as %d\n",__FUNCTION__,
// (int)pDevice->nTxDataTimeCout);
......@@ -1102,12 +1102,12 @@ BSSvSecondTxData(
}
spin_lock_irq(&pDevice->lock);
#if 1
if(((pDevice->bLinkPass ==true)&&(pMgmt->eAuthenMode < WMAC_AUTH_WPA)) || //open && sharekey linking
#if 1
if (((pDevice->bLinkPass == true) && (pMgmt->eAuthenMode < WMAC_AUTH_WPA)) || //open && sharekey linking
(pDevice->fWPA_Authened == true)) { //wpa linking
#else
if(pDevice->bLinkPass ==true) {
#endif
#else
if (pDevice->bLinkPass == true) {
#endif
// printk("mike:%s-->InSleep Tx Data Procedure\n",__FUNCTION__);
pDevice->fTxDataInSleep = true;
......@@ -1119,6 +1119,6 @@ BSSvSecondTxData(
pDevice->sTimerTxData.expires = RUN_AT(10*HZ); //10s callback
add_timer(&pDevice->sTimerTxData);
return;
}
}
#endif
......@@ -112,34 +112,34 @@ typedef enum tagCMD_STATE {
void
vResetCommandTimer(
void *hDeviceContext
);
);
void
vCommandTimer (
vCommandTimer(
void *hDeviceContext
);
);
bool bClearBSSID_SCAN(
void *hDeviceContext
);
);
bool
bScheduleCommand(
void *hDeviceContext,
CMD_CODE eCommand,
unsigned char *pbyItem0
);
);
void
vCommandTimerWait(
void *hDeviceContext,
unsigned int MSecond
);
);
#ifdef TxInSleep
void
BSSvSecondTxData(
void *hDeviceContext
);
);
#endif
#endif //__WCMD_H__
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment