staging: vt6656: staging: vt6656 change remaining to vnt_mgmt and remove typedef.
authorMalcolm Priestley <tvboxspy@gmail.com>
Thu, 17 Jan 2013 23:19:37 +0000 (23:19 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 18 Jan 2013 20:39:01 +0000 (12:39 -0800)
Use
struct vnt_manager

Move vnt_manager from sMgmtObj to vnt_mgmt.

and remove typedef from structures
vnt_private
vnt_manager
vnt_rx_mgmt
vnt_tx_mgmt

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/vt6656/bssdb.c
drivers/staging/vt6656/card.c
drivers/staging/vt6656/device.h
drivers/staging/vt6656/dpc.c
drivers/staging/vt6656/mac.c
drivers/staging/vt6656/main_usb.c
drivers/staging/vt6656/rf.c
drivers/staging/vt6656/rxtx.c
drivers/staging/vt6656/wmgr.h

index 59765b06c6089d86c02ca1fc08f38ba800748b1a..79339fd6e4ba44e8c08104406c63f7870fddd5d0 100644 (file)
@@ -772,7 +772,7 @@ void BSSvRemoveOneNode(struct vnt_private *pDevice, u32 uNodeIndex)
 void BSSvUpdateAPNode(struct vnt_private *pDevice, u16 *pwCapInfo,
        PWLAN_IE_SUPP_RATES pSuppRates, PWLAN_IE_SUPP_RATES pExtSuppRates)
 {
-       struct vnt_manager *pMgmt = &(pDevice->sMgmtObj);
+       struct vnt_manager *pMgmt = &pDevice->vnt_mgmt;
        u32 uRateLen = WLAN_RATES_MAXLEN;
 
     memset(&pMgmt->sNodeDBTable[0], 0, sizeof(KnownNodeDB));
index 93983d941f929e62ad4728df3e878542c106014f..7d725bb1c683330abeb1e4c036156476a0b1b3d5 100644 (file)
@@ -513,7 +513,7 @@ void vUpdateIFS(struct vnt_private *pDevice)
         }
         pDevice->uDIFS = C_SIFS_BG + 2*pDevice->uSlot;
 
-        pItemRates = (PWLAN_IE_SUPP_RATES)pDevice->sMgmtObj.abyCurrSuppRates;
+       pItemRates = (PWLAN_IE_SUPP_RATES)pDevice->vnt_mgmt.abyCurrSuppRates;
         for (ii = 0; ii < pItemRates->len; ii++) {
             byRate = (BYTE)(pItemRates->abyRates[ii]&0x7F);
             if (RATEwGetRateIdx(byRate) > RATE_11M) {
@@ -522,7 +522,8 @@ void vUpdateIFS(struct vnt_private *pDevice)
             }
         }
         if (bOFDMRate == FALSE) {
-            pItemRates = (PWLAN_IE_SUPP_RATES)pDevice->sMgmtObj.abyCurrExtSuppRates;
+               pItemRates = (PWLAN_IE_SUPP_RATES)pDevice->vnt_mgmt
+                       .abyCurrExtSuppRates;
             for (ii = 0; ii < pItemRates->len; ii++) {
                 byRate = (BYTE)(pItemRates->abyRates[ii]&0x7F);
                 if (RATEwGetRateIdx(byRate) > RATE_11M) {
@@ -1035,12 +1036,11 @@ int CARDbChannelSwitch(struct vnt_private *pDevice, u8 byMode,
 {
        int bResult = TRUE;
 
-    if (byCount == 0) {
-        pDevice->sMgmtObj.uCurrChannel = byNewChannel;
-       CARDbSetMediaChannel(pDevice, byNewChannel);
-
-       return bResult;
-    }
+       if (byCount == 0) {
+               pDevice->vnt_mgmt.uCurrChannel = byNewChannel;
+               CARDbSetMediaChannel(pDevice, byNewChannel);
+               return bResult;
+       }
     pDevice->byChannelSwitchCount = byCount;
     pDevice->byNewChannel = byNewChannel;
     pDevice->bChannelSwitch = TRUE;
index eb8a311e74d377ea2462be890d2597d51d29d21e..1d2e23434a49ca8e5bc7a21248b771aa891d804c 100644 (file)
@@ -392,7 +392,7 @@ typedef struct __device_opt {
 } OPTIONS, *POPTIONS;
 
 
-typedef struct vnt_private {
+struct vnt_private {
 
 // netdev
        struct usb_device*          usb;
@@ -524,9 +524,8 @@ typedef struct vnt_private {
     unsigned long                       RcvBuffersInUse;
 
 
-    // 802.11 management
+       /* 802.11 management */
        struct vnt_manager vnt_mgmt;
-    SMgmtObject                 sMgmtObj;
 
        u64 qwCurrTSF;
     unsigned int                        cbBulkInMax;
@@ -815,7 +814,7 @@ typedef struct vnt_private {
        struct iw_statistics    wstats;         // wireless stats
     BOOL                    bCommit;
 
-} DEVICE_INFO, *PSDevice;
+};
 
 
 
index b627860f53a06f2dcd7594f6929636bdbe05ae4e..6c981722b88b504fb486ac1ad2c7fd86d888310f 100644 (file)
@@ -850,9 +850,9 @@ int RXbBulkInProcessData(struct vnt_private *pDevice, PRCB pRCB,
             RSC += wRxTSC15_0;
                memcpy(&(pKey->KeyRSC), &RSC,  sizeof(u64));
 
-            if ( (pDevice->sMgmtObj.eCurrMode == WMAC_MODE_ESS_STA) &&
-                 (pDevice->sMgmtObj.eCurrState == WMAC_STATE_ASSOC)) {
-                // check RSC
+               if (pDevice->vnt_mgmt.eCurrMode == WMAC_MODE_ESS_STA &&
+                       pDevice->vnt_mgmt.eCurrState == WMAC_STATE_ASSOC) {
+                       /* check RSC */
                 if ( (wRxTSC15_0 < wLocalTSC15_0) &&
                      (dwRxTSC47_16 <= dwLocalTSC47_16) &&
                      !((dwRxTSC47_16 == 0) && (dwLocalTSC47_16 == 0xFFFFFFFF))) {
@@ -927,7 +927,7 @@ int RXbBulkInProcessData(struct vnt_private *pDevice, PRCB pRCB,
 static int s_bAPModeRxCtl(struct vnt_private *pDevice, u8 *pbyFrame,
        s32 iSANodeIndex)
 {
-       struct vnt_manager *pMgmt = &(pDevice->sMgmtObj);
+       struct vnt_manager *pMgmt = &pDevice->vnt_mgmt;
        PS802_11Header p802_11Header;
        CMD_STATUS Status;
 
@@ -1456,7 +1456,7 @@ void RXvMngWorkItem(struct vnt_private *pDevice)
         }
         ASSERT(pRCB);// cannot be NULL
         pRxPacket = &(pRCB->sMngPacket);
-       vMgrRxManagePacket((void *) pDevice, &(pDevice->sMgmtObj), pRxPacket);
+       vMgrRxManagePacket(pDevice, &pDevice->vnt_mgmt, pRxPacket);
         pRCB->Ref--;
         if(pRCB->Ref == 0) {
             DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"RxvFreeMng %d %d\n",pDevice->NumRecvFreeList, pDevice->NumRecvMngList);
index dd732bcb909230bdeff8464968027240606a7b1a..76d307b58d5246d5432ea77985909ff8a704d0a0 100644 (file)
@@ -246,10 +246,9 @@ void MACvSetKeyEntry(struct vnt_private *pDevice, u16 wKeyCtl, u32 uEntryIdx,
        int ii;
        u8 pbyData[24];
 
-    if ( pDevice->byLocalID <= MAC_REVISION_A1 ) {
-        if ( pDevice->sMgmtObj.byCSSPK == KEY_CTL_CCMP )
-            return;
-    }
+       if (pDevice->byLocalID <= MAC_REVISION_A1)
+               if (pDevice->vnt_mgmt.byCSSPK == KEY_CTL_CCMP)
+                       return;
 
     wOffset = MISCFIFO_KEYETRY0;
     wOffset += (uEntryIdx * MISCFIFO_KEYENTRYSIZE);
index a316d8905fb883855b59f481905f19f2d57a4915..99ac7eb6cdfe06e03c7c0b6665b3c05f900a2fa7 100644 (file)
@@ -706,7 +706,7 @@ vt6656_probe(struct usb_interface *intf, const struct usb_device_id *id)
        spin_lock_init(&pDevice->lock);
 
        pDevice->tx_80211 = device_dma0_tx_80211;
-       pDevice->sMgmtObj.pAdapter = (void *) pDevice;
+       pDevice->vnt_mgmt.pAdapter = (void *) pDevice;
 
        netdev->netdev_ops = &device_netdev_ops;
        netdev->wireless_handlers =
@@ -986,7 +986,8 @@ static int  device_open(struct net_device *dev)
     // Init for Key Management
 
     KeyvInitTable(pDevice,&pDevice->sKey);
-    memcpy(pDevice->sMgmtObj.abyMACAddr, pDevice->abyCurrentNetAddr, ETH_ALEN);
+       memcpy(pDevice->vnt_mgmt.abyMACAddr,
+               pDevice->abyCurrentNetAddr, ETH_ALEN);
     memcpy(pDevice->dev->dev_addr, pDevice->abyCurrentNetAddr, ETH_ALEN);
     pDevice->bStopTx0Pkt = FALSE;
     pDevice->bStopDataPkt = FALSE;
@@ -1001,7 +1002,7 @@ static int  device_open(struct net_device *dev)
     tasklet_init(&pDevice->RxMngWorkItem, (void *)RXvMngWorkItem, (unsigned long)pDevice);
     tasklet_init(&pDevice->ReadWorkItem, (void *)RXvWorkItem, (unsigned long)pDevice);
     tasklet_init(&pDevice->EventWorkItem, (void *)INTvWorkItem, (unsigned long)pDevice);
-    add_timer(&(pDevice->sMgmtObj.sTimerSecondCallback));
+       add_timer(&pDevice->vnt_mgmt.sTimerSecondCallback);
     pDevice->int_interval = 100;  //Max 100 microframes.
     pDevice->eEncryptionStatus = Ndis802_11EncryptionDisabled;
 
@@ -1035,14 +1036,10 @@ static int  device_open(struct net_device *dev)
          pDevice->eEncryptionStatus = Ndis802_11Encryption1Enabled;
     }
 
-    if (pDevice->sMgmtObj.eConfigMode == WMAC_CONFIG_AP) {
+       if (pDevice->vnt_mgmt.eConfigMode == WMAC_CONFIG_AP)
                bScheduleCommand((void *) pDevice, WLAN_CMD_RUN_AP, NULL);
-       }
-       else {
-       //mike:mark@2008-11-10
-         bScheduleCommand((void *) pDevice, WLAN_CMD_BSSID_SCAN, NULL);
-         /* bScheduleCommand((void *) pDevice, WLAN_CMD_SSID, NULL); */
-    }
+       else
+               bScheduleCommand((void *) pDevice, WLAN_CMD_BSSID_SCAN, NULL);
 
 
     netif_stop_queue(pDevice->dev);
index 06cff8b2cfb52b918eacf4a8e15b2634e8c1b9e2..5785eec7fb1257ebb33b8e2db55a8b3c4ace0191 100644 (file)
@@ -888,14 +888,22 @@ int RFbRawSetPower(struct vnt_private *pDevice, u8 byPwr, u32 uRATE)
                 bResult &= IFRFbWriteEmbedded(pDevice, dwVT3226Pwr);
 
                 bResult &= IFRFbWriteEmbedded(pDevice, 0x03C6A200+(BY_VT3226_REG_LEN<<3)+IFREGCTL_REGW);
-                if (pDevice->sMgmtObj.eScanState != WMAC_NO_SCANNING) {
-                    // scanning, the channel number is pDevice->uScanChannel
-                    DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"@@@@ RFbRawSetPower> 11B mode uCurrChannel[%d]\n", pDevice->sMgmtObj.uScanChannel);
-                    bResult &= IFRFbWriteEmbedded(pDevice, dwVT3226D0LoCurrentTable[pDevice->sMgmtObj.uScanChannel-1]); //RobertYu:20060420, sometimes didn't change channel just set power with different rate
-                } else {
-                    DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"@@@@ RFbRawSetPower> 11B mode uCurrChannel[%d]\n", pDevice->sMgmtObj.uCurrChannel);
-                    bResult &= IFRFbWriteEmbedded(pDevice, dwVT3226D0LoCurrentTable[pDevice->sMgmtObj.uCurrChannel-1]); //RobertYu:20060420, sometimes didn't change channel just set power with different rate
-                }
+               if (pDevice->vnt_mgmt.eScanState != WMAC_NO_SCANNING) {
+                       /* scanning, channel number is pDevice->uScanChannel */
+                       DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO
+                               "RFbRawSetPower> 11B mode uCurrChannel[%d]\n",
+                               pDevice->vnt_mgmt.uScanChannel);
+                       bResult &= IFRFbWriteEmbedded(pDevice,
+                               dwVT3226D0LoCurrentTable[pDevice->
+                                       vnt_mgmt.uScanChannel - 1]);
+               } else {
+                       DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO
+                               "RFbRawSetPower> 11B mode uCurrChannel[%d]\n",
+                               pDevice->vnt_mgmt.uCurrChannel);
+                       bResult &= IFRFbWriteEmbedded(pDevice,
+                               dwVT3226D0LoCurrentTable[pDevice->
+                                       vnt_mgmt.uCurrChannel - 1]);
+               }
 
                 bResult &= IFRFbWriteEmbedded(pDevice, 0x015C0800+(BY_VT3226_REG_LEN<<3)+IFREGCTL_REGW); //RobertYu:20060420, ok now, new switching power (mini-pci can have bigger power consumption)
             } else {
index bb014c06fc5aa4e01770df59d401f8d1bfd1b7aa..536d3144465697ba10c57ac0319f61d6c39fe208 100644 (file)
@@ -1511,10 +1511,10 @@ static int s_bPacketToWirelessUsb(struct vnt_private *pDevice, u8 byPktType,
 
         ///////////////////////////////////////////////////////////////////
 
-        if (pDevice->sMgmtObj.eAuthenMode == WMAC_AUTH_WPANONE) {
-            dwMICKey0 = *(PDWORD)(&pTransmitKey->abyKey[16]);
-            dwMICKey1 = *(PDWORD)(&pTransmitKey->abyKey[20]);
-        }
+       if (pDevice->vnt_mgmt.eAuthenMode == WMAC_AUTH_WPANONE) {
+               dwMICKey0 = *(u32 *)(&pTransmitKey->abyKey[16]);
+               dwMICKey1 = *(u32 *)(&pTransmitKey->abyKey[20]);
+       }
         else if ((pTransmitKey->dwKeyIndex & AUTHENTICATOR_KEY) != 0) {
             dwMICKey0 = *(PDWORD)(&pTransmitKey->abyKey[16]);
             dwMICKey1 = *(PDWORD)(&pTransmitKey->abyKey[20]);
index 86c15050d0349a2bddf6f2ea73cbee04c667e107..5112f53565ac7f82d2b815e786aaed5546aeac73 100644 (file)
@@ -219,15 +219,15 @@ typedef enum tagWMAC_POWER_MODE {
 
 
 /* Tx Management Packet descriptor */
-typedef struct vnt_tx_mgmt {
+struct vnt_tx_mgmt {
        PUWLAN_80211HDR p80211Header;
        u32 cbMPDULen;
        u32 cbPayloadLen;
-} STxMgmtPacket, *PSTxMgmtPacket;
+};
 
 
 /* Rx Management Packet descriptor */
-typedef struct vnt_rx_mgmt {
+struct vnt_rx_mgmt {
        PUWLAN_80211HDR p80211Header;
        u64 qwLocalTSF;
        u32 cbMPDULen;
@@ -236,10 +236,10 @@ typedef struct vnt_rx_mgmt {
        u8 bySQ;
        u8 byRxRate;
        u8 byRxChannel;
-} SRxMgmtPacket, *PSRxMgmtPacket;
+};
 
 
-typedef struct vnt_manager {
+struct vnt_manager {
        void *pAdapter;
     // MAC address
     BYTE                    abyMACAddr[WLAN_ADDR_LEN];
@@ -391,7 +391,7 @@ typedef struct vnt_manager {
 
     struct sk_buff  skb;
 
-} SMgmtObject, *PSMgmtObject;
+};
 
 /*---------------------  Export Macros ------------------------------*/