]> git.karo-electronics.de Git - linux-beck.git/commitdiff
Staging: vt665x: 64bit compile fixes Part 2
authorJim Lieb <lieb@canonical.com>
Fri, 24 Jul 2009 00:22:42 +0000 (17:22 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 15 Sep 2009 19:02:07 +0000 (12:02 -0700)
Fix compile problems with 64bit.  These issues could cause corrupted
address crashes. Cleanup definition use to use more portable kernel
typedefs etc.

Signed-off-by: Jim Lieb <lieb@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/vt6656/bssdb.c
drivers/staging/vt6656/dpc.c
drivers/staging/vt6656/firmware.c
drivers/staging/vt6656/hostap.c
drivers/staging/vt6656/main_usb.c
drivers/staging/vt6656/tmacro.h
drivers/staging/vt6656/wmgr.c
drivers/staging/vt6656/wpa.c

index 58348cf10d0613b29486a104c4ebb41a4823a6e1..3b8e38d7907f8f263677ad192fae26db7fd688e1 100644 (file)
@@ -1300,7 +1300,7 @@ if((pMgmt->eCurrState!=WMAC_STATE_ASSOC) &&
              wpahdr->req_ie_len = 0;
              skb_put(pDevice->skb, sizeof(viawget_wpa_header));
              pDevice->skb->dev = pDevice->wpadev;
-             pDevice->skb->mac_header = pDevice->skb->data;
+            skb_reset_mac_header(pDevice->skb);
              pDevice->skb->pkt_type = PACKET_HOST;
              pDevice->skb->protocol = htons(ETH_P_802_2);
              memset(pDevice->skb->cb, 0, sizeof(pDevice->skb->cb));
@@ -1340,7 +1340,7 @@ DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "bIsRoaming %d, !\n", pDevice->bIsRoaming );
              wpahdr->req_ie_len = 0;
              skb_put(pDevice->skb, sizeof(viawget_wpa_header));
              pDevice->skb->dev = pDevice->wpadev;
-                pDevice->skb->mac_header = pDevice->skb->data;
+            skb_reset_mac_header(pDevice->skb);
              pDevice->skb->pkt_type = PACKET_HOST;
              pDevice->skb->protocol = htons(ETH_P_802_2);
              memset(pDevice->skb->cb, 0, sizeof(pDevice->skb->cb));
index a90d0924b85dc97245ac1784daa9e95df7ad7297..3e52d2039719c649bcd90115285316a1c26f9010 100644 (file)
@@ -674,7 +674,7 @@ RXbBulkInProcessData (
                    skb->data += 8;
                    skb->tail += 8;
                 skb_put(skb, FrameSize);
-                   skb->mac_header = skb->data;
+               skb_reset_mac_header(skb);
                    skb->pkt_type = PACKET_OTHERHOST;
                skb->protocol = htons(ETH_P_802_2);
                    memset(skb->cb, 0, sizeof(skb->cb));
@@ -831,7 +831,7 @@ RXbBulkInProcessData (
             skb->data +=  (cbIVOffset + 8);
             skb->tail +=  (cbIVOffset + 8);
             skb_put(skb, FrameSize);
-            skb->mac_header = skb->data;
+           skb_reset_mac_header(skb);
             skb->pkt_type = PACKET_OTHERHOST;
             skb->protocol = htons(ETH_P_802_2);
             memset(skb->cb, 0, sizeof(skb->cb));
@@ -951,7 +951,7 @@ RXbBulkInProcessData (
                      wpahdr->req_ie_len = 0;
                      skb_put(pDevice->skb, sizeof(viawget_wpa_header));
                      pDevice->skb->dev = pDevice->wpadev;
-                   pDevice->skb->mac_header = pDevice->skb->data;
+                    skb_reset_mac_header(pDevice->skb);
                      pDevice->skb->pkt_type = PACKET_HOST;
                      pDevice->skb->protocol = htons(ETH_P_802_2);
                      memset(pDevice->skb->cb, 0, sizeof(pDevice->skb->cb));
index e315a4662236641a06dfd2f3b5907e4a730f3a58..6c91659ad1199516e4e49ec441e1fd1d6adcd6dd 100644 (file)
@@ -812,7 +812,7 @@ FIRMWAREbDownload(
                                             &(pBuffer[ii])
                                             );
 
-            DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Download firmware...%d %d\n", ii, sizeof(abyFirmware));
+            DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Download firmware...%d %ld\n", ii, sizeof(abyFirmware));
             if (NdisStatus != STATUS_SUCCESS) {
                 if (pBuffer)
                     kfree(pBuffer);
index 223604dffaef8b13b9f5d61a5fa0748401161514..887e93f9999543a9fe151dd2558d4a9771d8d352 100644 (file)
@@ -106,6 +106,9 @@ static int hostap_enable_hostapd(PSDevice pDevice, int rtnl_locked)
     PSDevice apdev_priv;
        struct net_device *dev = pDevice->dev;
        int ret;
+       const struct net_device_ops apdev_netdev_ops = {
+               .ndo_start_xmit         = pDevice->tx_80211,
+       };
 
     DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "%s: Enabling hostapd mode\n", dev->name);
 
@@ -118,9 +121,6 @@ static int hostap_enable_hostapd(PSDevice pDevice, int rtnl_locked)
     *apdev_priv = *pDevice;
        memcpy(pDevice->apdev->dev_addr, dev->dev_addr, ETH_ALEN);
 
-       const struct net_device_ops apdev_netdev_ops = {
-               .ndo_start_xmit         = pDevice->tx_80211,
-       };
        pDevice->apdev->netdev_ops = &apdev_netdev_ops;
 
        pDevice->apdev->type = ARPHRD_IEEE80211;
index 7e40ceb7f57988cb0b3015f87c76e454e6ec2ec2..6fd894ae5c83104229ed8f781f5fa29e2c0985b6 100644 (file)
@@ -753,7 +753,7 @@ static BOOL device_release_WPADEV(PSDevice pDevice)
                  wpahdr->req_ie_len = 0;
                  skb_put(pDevice->skb, sizeof(viawget_wpa_header));
                  pDevice->skb->dev = pDevice->wpadev;
-                 pDevice->skb->mac_header = pDevice->skb->data;
+                skb_reset_mac_header(pDevice->skb);
                  pDevice->skb->pkt_type = PACKET_HOST;
                  pDevice->skb->protocol = htons(ETH_P_802_2);
                  memset(pDevice->skb->cb, 0, sizeof(pDevice->skb->cb));
index 3d932a258dd196986fe3bd7e4e688cb4d861d9f5..b0933d866c6374e011563dc5e4276bb5837092ed 100644 (file)
 
 /****** Misc macros ********************************************************/
 
-// get the field offset in the type(struct, class, ...)
-#define OFFSET(type, field) ((int)(&((type NEAR*)1)->field)-1)
-
-
 /* string equality shorthand */
 #define STR_EQ(x, y)        (strcmp(x, y) == 0)
 #define STR_NE(x, y)        (strcmp(x, y) != 0)
index 5879e484b971f82a699df4afb0d2e597110d8329..b81ddf64dab993202ad001dd25932cd60daccaab 100644 (file)
@@ -1053,7 +1053,7 @@ s_vMgrRxAssocResponse(
                        );
                 skb_put(pDevice->skb, sizeof(viawget_wpa_header) + wpahdr->resp_ie_len + wpahdr->req_ie_len);
                 pDevice->skb->dev = pDevice->wpadev;
-                pDevice->skb->mac_header = pDevice->skb->data;
+               skb_reset_mac_header(pDevice->skb);
                 pDevice->skb->pkt_type = PACKET_HOST;
                 pDevice->skb->protocol = htons(ETH_P_802_2);
                 memset(pDevice->skb->cb, 0, sizeof(pDevice->skb->cb));
@@ -1692,7 +1692,7 @@ s_vMgrRxDisassociation(
              wpahdr->req_ie_len = 0;
              skb_put(pDevice->skb, sizeof(viawget_wpa_header));
              pDevice->skb->dev = pDevice->wpadev;
-             pDevice->skb->mac_header = pDevice->skb->data;
+            skb_reset_mac_header(pDevice->skb);
              pDevice->skb->pkt_type = PACKET_HOST;
              pDevice->skb->protocol = htons(ETH_P_802_2);
              memset(pDevice->skb->cb, 0, sizeof(pDevice->skb->cb));
@@ -1795,7 +1795,7 @@ s_vMgrRxDeauthentication(
                  wpahdr->req_ie_len = 0;
                  skb_put(pDevice->skb, sizeof(viawget_wpa_header));
                  pDevice->skb->dev = pDevice->wpadev;
-                 pDevice->skb->mac_header = pDevice->skb->data;
+                skb_reset_mac_header(pDevice->skb);
                  pDevice->skb->pkt_type = PACKET_HOST;
                  pDevice->skb->protocol = htons(ETH_P_802_2);
                  memset(pDevice->skb->cb, 0, sizeof(pDevice->skb->cb));
index 754b9989ec03559179de72dd49b7a9bf8780baf0..93614a06efed62c65a9dc473a47fa22d2b5ef77c 100644 (file)
@@ -170,7 +170,7 @@ WPA_ParseRSN (
         if (pRSN->len >= 12) //oui1(4)+ver(2)+GKS(4)+PKSCnt(2)
         {
             j = 0;
-            DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"wPKCount: %d, sizeof(pBSSList->abyPKType): %d\n", pRSN->wPKCount, sizeof(pBSSList->abyPKType));
+            DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"wPKCount: %d, sizeof(pBSSList->abyPKType): %ld\n", pRSN->wPKCount, sizeof(pBSSList->abyPKType));
             for(i = 0; (i < pRSN->wPKCount) && (j < sizeof(pBSSList->abyPKType)/sizeof(BYTE)); i++) {
                 if(pRSN->len >= 12+i*4+4) { //oui1(4)+ver(2)+GKS(4)+PKSCnt(2)+PKS(4*i)
                     if (MEMEqualMemory(pRSN->PKSList[i].abyOUI, abyOUI00, 4))
@@ -201,7 +201,7 @@ WPA_ParseRSN (
             // overlay IE_RSN_Auth structure into correct place
             pIE_RSN_Auth = (PWLAN_IE_RSN_AUTH) pRSN->PKSList[m].abyOUI;
             j = 0;
-            DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"wAuthCount: %d, sizeof(pBSSList->abyAuthType): %d\n",
+            DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"wAuthCount: %d, sizeof(pBSSList->abyAuthType): %ld\n",
                           pIE_RSN_Auth->wAuthCount, sizeof(pBSSList->abyAuthType));
             for(i = 0; (i < pIE_RSN_Auth->wAuthCount) && (j < sizeof(pBSSList->abyAuthType)/sizeof(BYTE)); i++) {
                 if(pRSN->len >= 14+4+(m+i)*4) { //oui1(4)+ver(2)+GKS(4)+PKSCnt(2)+PKS(4*m)+AKC(2)+AKS(4*i)