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