diff --git a/drivers/staging/vt6656/power.c b/drivers/staging/vt6656/power.c index cd4f5bd2029f..43da58927cd2 100644 --- a/drivers/staging/vt6656/power.c +++ b/drivers/staging/vt6656/power.c @@ -70,19 +70,20 @@ void PSvEnablePowerSaving(struct vnt_private *pDevice, u16 wListenInterval) if (pDevice->op_mode != NL80211_IFTYPE_ADHOC) { /* set AID */ MACvWriteWord(pDevice, MAC_REG_AIDATIM, wAID); - } else { - /* set ATIM Window */ - /* MACvWriteATIMW(pDevice->PortOffset, pMgmt->wCurrATIMWindow); */ } - /* Warren:06-18-2004,the sequence must follow PSEN->AUTOSLEEP->GO2DOZE */ + /* Warren:06-18-2004,the sequence must follow + * PSEN->AUTOSLEEP->GO2DOZE + */ /* enable power saving hw function */ MACvRegBitsOn(pDevice, MAC_REG_PSCTL, PSCTL_PSEN); /* Set AutoSleep */ MACvRegBitsOn(pDevice, MAC_REG_PSCFG, PSCFG_AUTOSLEEP); - /* Warren:MUST turn on this once before turn on AUTOSLEEP ,or the AUTOSLEEP doesn't work */ + /* Warren:MUST turn on this once before turn on AUTOSLEEP ,or the + * AUTOSLEEP doesn't work + */ MACvRegBitsOn(pDevice, MAC_REG_PSCTL, PSCTL_GO2DOZE); if (wListenInterval >= 2) { @@ -105,7 +106,9 @@ void PSvEnablePowerSaving(struct vnt_private *pDevice, u16 wListenInterval) pDevice->bEnablePSMode = true; - /* We don't send null pkt in ad hoc mode since beacon will handle this. */ + /* We don't send null pkt in ad hoc mode + * since beacon will handle this. + */ if (pDevice->op_mode == NL80211_IFTYPE_STATION) PSbSendNullPacket(pDevice); @@ -226,15 +229,19 @@ void PSvSendPSPOLL(struct vnt_private *pDevice) WLAN_SET_FC_PWRMGT(0) )); - pTxPacket->p80211Header->sA2.wDurationID = pMgmt->wCurrAID | BIT14 | BIT15; - memcpy(pTxPacket->p80211Header->sA2.abyAddr1, pMgmt->abyCurrBSSID, WLAN_ADDR_LEN); - memcpy(pTxPacket->p80211Header->sA2.abyAddr2, pMgmt->abyMACAddr, WLAN_ADDR_LEN); + pTxPacket->p80211Header->sA2.wDurationID = + pMgmt->wCurrAID | BIT14 | BIT15; + memcpy(pTxPacket->p80211Header->sA2.abyAddr1, pMgmt->abyCurrBSSID, + WLAN_ADDR_LEN); + memcpy(pTxPacket->p80211Header->sA2.abyAddr2, pMgmt->abyMACAddr, + WLAN_ADDR_LEN); pTxPacket->cbMPDULen = WLAN_HDR_ADDR2_LEN; pTxPacket->cbPayloadLen = 0; /* log failure if sending failed */ if (csMgmt_xmit(pDevice, pTxPacket) != CMD_STATUS_PENDING) - DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Send PS-Poll packet failed..\n"); + DBG_PRT(MSG_LEVEL_DEBUG, + KERN_INFO "Send PS-Poll packet failed..\n"); } /* @@ -276,16 +283,21 @@ int PSbSendNullPacket(struct vnt_private *pDevice) pTxPacket->p80211Header->sA3.wFrameCtl = cpu_to_le16(flags); if (pMgmt->eCurrMode != WMAC_MODE_IBSS_STA) - pTxPacket->p80211Header->sA3.wFrameCtl |= cpu_to_le16((u16)WLAN_SET_FC_TODS(1)); + pTxPacket->p80211Header->sA3.wFrameCtl |= + cpu_to_le16((u16)WLAN_SET_FC_TODS(1)); - memcpy(pTxPacket->p80211Header->sA3.abyAddr1, pMgmt->abyCurrBSSID, WLAN_ADDR_LEN); - memcpy(pTxPacket->p80211Header->sA3.abyAddr2, pMgmt->abyMACAddr, WLAN_ADDR_LEN); - memcpy(pTxPacket->p80211Header->sA3.abyAddr3, pMgmt->abyCurrBSSID, WLAN_BSSID_LEN); + memcpy(pTxPacket->p80211Header->sA3.abyAddr1, pMgmt->abyCurrBSSID, + WLAN_ADDR_LEN); + memcpy(pTxPacket->p80211Header->sA3.abyAddr2, pMgmt->abyMACAddr, + WLAN_ADDR_LEN); + memcpy(pTxPacket->p80211Header->sA3.abyAddr3, pMgmt->abyCurrBSSID, + WLAN_BSSID_LEN); pTxPacket->cbMPDULen = WLAN_HDR_ADDR3_LEN; pTxPacket->cbPayloadLen = 0; /* log error if sending failed */ if (csMgmt_xmit(pDevice, pTxPacket) != CMD_STATUS_PENDING) { - DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Send Null Packet failed !\n"); + DBG_PRT(MSG_LEVEL_DEBUG, + KERN_INFO "Send Null Packet failed !\n"); return false; } return true;