]> git.karo-electronics.de Git - mv-sheeva.git/commitdiff
Staging: vt6656: Ensure power.c uses proper tabbing.
authorPhilip Worrall <philip.worrall@googlemail.com>
Wed, 2 Mar 2011 17:36:35 +0000 (17:36 +0000)
committerGreg Kroah-Hartman <gregkh@suse.de>
Wed, 2 Mar 2011 20:52:29 +0000 (15:52 -0500)
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: Dan Carpenter <error27@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/vt6656/power.c

index 44dd18954aef04749fa6df303b77d0a29d4d0b50..bd9c55c8ef96312938c3e8ef10e122091c2ce3ec 100644 (file)
@@ -274,6 +274,7 @@ BOOL PSbSendNullPacket(void *hDeviceContext)
        PSDevice pDevice = (PSDevice)hDeviceContext;
        PSTxMgmtPacket pTxPacket = NULL;
        PSMgmtObject pMgmt = &(pDevice->sMgmtObj);
+       u16 flags = 0;
 
        if (pDevice->bLinkPass == FALSE)
                return FALSE;
@@ -287,21 +288,15 @@ BOOL PSbSendNullPacket(void *hDeviceContext)
        pTxPacket = (PSTxMgmtPacket)pMgmt->pbyPSPacketPool;
        pTxPacket->p80211Header = (PUWLAN_80211HDR)((PBYTE)pTxPacket + sizeof(STxMgmtPacket));
 
-       if (pDevice->bEnablePSMode) {
-               pTxPacket->p80211Header->sA3.wFrameCtl = cpu_to_le16(
-                       (
-                               WLAN_SET_FC_FTYPE(WLAN_TYPE_DATA) |
-                               WLAN_SET_FC_FSTYPE(WLAN_FSTYPE_NULL) |
-                               WLAN_SET_FC_PWRMGT(1)
-                       ));
-       } else {
-               pTxPacket->p80211Header->sA3.wFrameCtl = cpu_to_le16(
-                       (
-                               WLAN_SET_FC_FTYPE(WLAN_TYPE_DATA) |
-                               WLAN_SET_FC_FSTYPE(WLAN_FSTYPE_NULL) |
-                               WLAN_SET_FC_PWRMGT(0)
-                       ));
-       }
+       flags = WLAN_SET_FC_FTYPE(WLAN_TYPE_DATA) |
+                        WLAN_SET_FC_FSTYPE(WLAN_FSTYPE_NULL);
+
+       if (pDevice->bEnablePSMode)
+               flags |= WLAN_SET_FC_PWRMGT(1);
+       else
+               flags |= WLAN_SET_FC_PWRMGT(0);
+
+       pTxPacket->p80211Header->sA3.wFrameCtl = cpu_to_le16(flags);
 
        if (pMgmt->eCurrMode != WMAC_MODE_IBSS_STA)
                pTxPacket->p80211Header->sA3.wFrameCtl |= cpu_to_le16((WORD)WLAN_SET_FC_TODS(1));