Commit b898cf21 authored by Philip Worrall's avatar Philip Worrall Committed by Greg Kroah-Hartman

Staging: vt6656: Ensure power.c uses proper tabbing.

Simplify setting of power state in power.c when sending power
state notifications to the access point.

Signed-off-by: Philip Worrall <philip.worrall at googlemail.com>
Reviewed-by: default avatarDan Carpenter <error27@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent c5b0b5fc
...@@ -274,6 +274,7 @@ BOOL PSbSendNullPacket(void *hDeviceContext) ...@@ -274,6 +274,7 @@ BOOL PSbSendNullPacket(void *hDeviceContext)
PSDevice pDevice = (PSDevice)hDeviceContext; PSDevice pDevice = (PSDevice)hDeviceContext;
PSTxMgmtPacket pTxPacket = NULL; PSTxMgmtPacket pTxPacket = NULL;
PSMgmtObject pMgmt = &(pDevice->sMgmtObj); PSMgmtObject pMgmt = &(pDevice->sMgmtObj);
u16 flags = 0;
if (pDevice->bLinkPass == FALSE) if (pDevice->bLinkPass == FALSE)
return FALSE; return FALSE;
...@@ -287,21 +288,15 @@ BOOL PSbSendNullPacket(void *hDeviceContext) ...@@ -287,21 +288,15 @@ BOOL PSbSendNullPacket(void *hDeviceContext)
pTxPacket = (PSTxMgmtPacket)pMgmt->pbyPSPacketPool; pTxPacket = (PSTxMgmtPacket)pMgmt->pbyPSPacketPool;
pTxPacket->p80211Header = (PUWLAN_80211HDR)((PBYTE)pTxPacket + sizeof(STxMgmtPacket)); pTxPacket->p80211Header = (PUWLAN_80211HDR)((PBYTE)pTxPacket + sizeof(STxMgmtPacket));
if (pDevice->bEnablePSMode) { flags = WLAN_SET_FC_FTYPE(WLAN_TYPE_DATA) |
pTxPacket->p80211Header->sA3.wFrameCtl = cpu_to_le16( WLAN_SET_FC_FSTYPE(WLAN_FSTYPE_NULL);
(
WLAN_SET_FC_FTYPE(WLAN_TYPE_DATA) | if (pDevice->bEnablePSMode)
WLAN_SET_FC_FSTYPE(WLAN_FSTYPE_NULL) | flags |= WLAN_SET_FC_PWRMGT(1);
WLAN_SET_FC_PWRMGT(1) else
)); flags |= WLAN_SET_FC_PWRMGT(0);
} else {
pTxPacket->p80211Header->sA3.wFrameCtl = cpu_to_le16( pTxPacket->p80211Header->sA3.wFrameCtl = cpu_to_le16(flags);
(
WLAN_SET_FC_FTYPE(WLAN_TYPE_DATA) |
WLAN_SET_FC_FSTYPE(WLAN_FSTYPE_NULL) |
WLAN_SET_FC_PWRMGT(0)
));
}
if (pMgmt->eCurrMode != WMAC_MODE_IBSS_STA) if (pMgmt->eCurrMode != WMAC_MODE_IBSS_STA)
pTxPacket->p80211Header->sA3.wFrameCtl |= cpu_to_le16((WORD)WLAN_SET_FC_TODS(1)); pTxPacket->p80211Header->sA3.wFrameCtl |= cpu_to_le16((WORD)WLAN_SET_FC_TODS(1));
......
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