Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
[linux-drm-fsl-dcu.git] / drivers / staging / bcm / Misc.c
index 7067af2fa61047ee7d5e8537fb48f76f6dc0ea85..f545716c666d06fac279d87bf8cfe69664eb595e 100644 (file)
@@ -1,12 +1,12 @@
 #include "headers.h"
 
-static int BcmFileDownload(PMINI_ADAPTER Adapter, const char *path, unsigned int loc);
-static VOID doPowerAutoCorrection(PMINI_ADAPTER psAdapter);
-static void HandleShutDownModeRequest(PMINI_ADAPTER Adapter, PUCHAR pucBuffer);
-static int bcm_parse_target_params(PMINI_ADAPTER Adapter);
-static void beceem_protocol_reset(PMINI_ADAPTER Adapter);
+static int BcmFileDownload(struct bcm_mini_adapter *Adapter, const char *path, unsigned int loc);
+static VOID doPowerAutoCorrection(struct bcm_mini_adapter *psAdapter);
+static void HandleShutDownModeRequest(struct bcm_mini_adapter *Adapter, PUCHAR pucBuffer);
+static int bcm_parse_target_params(struct bcm_mini_adapter *Adapter);
+static void beceem_protocol_reset(struct bcm_mini_adapter *Adapter);
 
-static VOID default_wimax_protocol_initialize(PMINI_ADAPTER Adapter)
+static VOID default_wimax_protocol_initialize(struct bcm_mini_adapter *Adapter)
 {
        UINT uiLoopIndex;
 
@@ -24,7 +24,7 @@ static VOID default_wimax_protocol_initialize(PMINI_ADAPTER Adapter)
        return;
 }
 
-INT InitAdapter(PMINI_ADAPTER psAdapter)
+INT InitAdapter(struct bcm_mini_adapter *psAdapter)
 {
        int i = 0;
        INT Status = STATUS_SUCCESS;
@@ -93,7 +93,7 @@ INT InitAdapter(PMINI_ADAPTER psAdapter)
        return STATUS_SUCCESS;
 }
 
-VOID AdapterFree(PMINI_ADAPTER Adapter)
+VOID AdapterFree(struct bcm_mini_adapter *Adapter)
 {
        int count;
        beceem_protocol_reset(Adapter);
@@ -134,7 +134,7 @@ VOID AdapterFree(PMINI_ADAPTER Adapter)
        free_netdev(Adapter->dev);
 }
 
-static int create_worker_threads(PMINI_ADAPTER psAdapter)
+static int create_worker_threads(struct bcm_mini_adapter *psAdapter)
 {
        /* Rx Control Packets Processing */
        psAdapter->control_packet_handler = kthread_run((int (*)(void *))
@@ -155,7 +155,7 @@ static int create_worker_threads(PMINI_ADAPTER psAdapter)
        return 0;
 }
 
-static struct file *open_firmware_file(PMINI_ADAPTER Adapter, const char *path)
+static struct file *open_firmware_file(struct bcm_mini_adapter *Adapter, const char *path)
 {
        struct file *flp = filp_open(path, O_RDONLY, S_IRWXU);
        if (IS_ERR(flp)) {
@@ -174,7 +174,7 @@ static struct file *open_firmware_file(PMINI_ADAPTER Adapter, const char *path)
  * Path to image file
  * Download Address on the chip
  */
-static int BcmFileDownload(PMINI_ADAPTER Adapter, const char *path, unsigned int loc)
+static int BcmFileDownload(struct bcm_mini_adapter *Adapter, const char *path, unsigned int loc)
 {
        int errorno = 0;
        struct file *flp = NULL;
@@ -216,13 +216,13 @@ exit_download:
  * Logical Adapter
  * Control Packet Buffer
  */
-INT CopyBufferToControlPacket(PMINI_ADAPTER Adapter, PVOID ioBuffer)
+INT CopyBufferToControlPacket(struct bcm_mini_adapter *Adapter, PVOID ioBuffer)
 {
-       PLEADER pLeader = NULL;
+       struct bcm_leader *pLeader = NULL;
        INT Status = 0;
        unsigned char *ctrl_buff = NULL;
        UINT pktlen = 0;
-       PLINK_REQUEST pLinkReq = NULL;
+       struct bcm_link_request *pLinkReq = NULL;
        PUCHAR pucAddIndication = NULL;
 
        BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, TX_CONTROL, DBG_LVL_ALL, "======>");
@@ -231,8 +231,8 @@ INT CopyBufferToControlPacket(PMINI_ADAPTER Adapter, PVOID ioBuffer)
                return -EINVAL;
        }
 
-       pLinkReq = (PLINK_REQUEST)ioBuffer;
-       pLeader = (PLEADER)ioBuffer; /* ioBuffer Contains sw_Status and Payload */
+       pLinkReq = (struct bcm_link_request *)ioBuffer;
+       pLeader = (struct bcm_leader *)ioBuffer; /* ioBuffer Contains sw_Status and Payload */
 
        if (Adapter->bShutStatus == TRUE &&
                pLinkReq->szData[0] == LINK_DOWN_REQ_PAYLOAD &&
@@ -358,7 +358,7 @@ INT CopyBufferToControlPacket(PMINI_ADAPTER Adapter, PVOID ioBuffer)
 
                memset(ctrl_buff, 0, pktlen+LEADER_SIZE);
                BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, TX_CONTROL, DBG_LVL_ALL, "Copying the Control Packet Buffer with length=%d\n", pLeader->PLength);
-               *(PLEADER)ctrl_buff = *pLeader;
+               *(struct bcm_leader *)ctrl_buff = *pLeader;
                memcpy(ctrl_buff + LEADER_SIZE, ((PUCHAR)ioBuffer + LEADER_SIZE), pLeader->PLength);
                BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, TX_CONTROL, DBG_LVL_ALL, "Enqueuing the Control Packet");
 
@@ -387,30 +387,6 @@ INT CopyBufferToControlPacket(PMINI_ADAPTER Adapter, PVOID ioBuffer)
        return Status;
 }
 
-#if 0
-/*****************************************************************
-* Function    - SendStatisticsPointerRequest()
-*
-* Description - This function builds and forwards the Statistics
-* Pointer Request control Packet.
-*
-* Parameters  - Adapter                                        : Pointer to Adapter structure.
-* - pstStatisticsPtrRequest : Pointer to link request.
-*
-* Returns     - None.
-*****************************************************************/
-static VOID SendStatisticsPointerRequest(PMINI_ADAPTER Adapter, PLINK_REQUEST pstStatisticsPtrRequest)
-{
-       BCM_DEBUG_PRINT(Adapter, DBG_TYPE_RX, RX_DPC, DBG_LVL_ALL, "======>");
-       pstStatisticsPtrRequest->Leader.Status = STATS_POINTER_REQ_STATUS;
-       pstStatisticsPtrRequest->Leader.PLength = sizeof(ULONG); /* minimum 4 bytes */
-       pstStatisticsPtrRequest->szData[0] = STATISTICS_POINTER_REQ;
-       CopyBufferToControlPacket(Adapter, pstStatisticsPtrRequest);
-       BCM_DEBUG_PRINT(Adapter, DBG_TYPE_RX, RX_DPC, DBG_LVL_ALL, "<=====");
-       return;
-}
-#endif
-
 /******************************************************************
 * Function    - LinkMessage()
 *
@@ -421,12 +397,12 @@ static VOID SendStatisticsPointerRequest(PMINI_ADAPTER Adapter, PLINK_REQUEST ps
 *
 * Returns     - None.
 *******************************************************************/
-VOID LinkMessage(PMINI_ADAPTER Adapter)
+VOID LinkMessage(struct bcm_mini_adapter *Adapter)
 {
-       PLINK_REQUEST pstLinkRequest = NULL;
+       struct bcm_link_request *pstLinkRequest = NULL;
        BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, LINK_UP_MSG, DBG_LVL_ALL, "=====>");
        if (Adapter->LinkStatus == SYNC_UP_REQUEST && Adapter->AutoSyncup) {
-               pstLinkRequest = kzalloc(sizeof(LINK_REQUEST), GFP_ATOMIC);
+               pstLinkRequest = kzalloc(sizeof(struct bcm_link_request), GFP_ATOMIC);
                if (!pstLinkRequest) {
                        BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, LINK_UP_MSG, DBG_LVL_ALL, "Can not allocate memory for Link request!");
                        return;
@@ -441,7 +417,7 @@ VOID LinkMessage(PMINI_ADAPTER Adapter)
                Adapter->bSyncUpRequestSent = TRUE;
 
        } else if (Adapter->LinkStatus == PHY_SYNC_ACHIVED && Adapter->AutoLinkUp) {
-               pstLinkRequest = kzalloc(sizeof(LINK_REQUEST), GFP_ATOMIC);
+               pstLinkRequest = kzalloc(sizeof(struct bcm_link_request), GFP_ATOMIC);
                if (!pstLinkRequest) {
                        BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, LINK_UP_MSG, DBG_LVL_ALL, "Can not allocate memory for Link request!");
                        return;
@@ -472,7 +448,7 @@ VOID LinkMessage(PMINI_ADAPTER Adapter)
 *
 * Returns     - None.
 ************************************************************************/
-VOID StatisticsResponse(PMINI_ADAPTER Adapter, PVOID pvBuffer)
+VOID StatisticsResponse(struct bcm_mini_adapter *Adapter, PVOID pvBuffer)
 {
        BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, DUMP_INFO, DBG_LVL_ALL, "%s====>", __func__);
        Adapter->StatisticsPointer = ntohl(*(__be32 *)pvBuffer);
@@ -491,7 +467,7 @@ VOID StatisticsResponse(PMINI_ADAPTER Adapter, PVOID pvBuffer)
 *
 * Returns     - None.
 ***********************************************************************/
-VOID LinkControlResponseMessage(PMINI_ADAPTER Adapter, PUCHAR pucBuffer)
+VOID LinkControlResponseMessage(struct bcm_mini_adapter *Adapter, PUCHAR pucBuffer)
 {
        BCM_DEBUG_PRINT(Adapter, DBG_TYPE_RX, RX_DPC, DBG_LVL_ALL, "=====>");
 
@@ -565,11 +541,11 @@ VOID LinkControlResponseMessage(PMINI_ADAPTER Adapter, PUCHAR pucBuffer)
        return;
 }
 
-void SendIdleModeResponse(PMINI_ADAPTER Adapter)
+void SendIdleModeResponse(struct bcm_mini_adapter *Adapter)
 {
        INT status = 0, NVMAccess = 0, lowPwrAbortMsg = 0;
        struct timeval tv;
-       CONTROL_MESSAGE stIdleResponse = {{0} };
+       struct bcm_link_request stIdleResponse = {{0} };
        memset(&tv, 0, sizeof(tv));
        stIdleResponse.Leader.Status = IDLE_MESSAGE;
        stIdleResponse.Leader.PLength = IDLE_MODE_PAYLOAD_LENGTH;
@@ -664,12 +640,12 @@ void SendIdleModeResponse(PMINI_ADAPTER Adapter)
 *
 * Returns     - None.
 *******************************************************************/
-VOID DumpPackInfo(PMINI_ADAPTER Adapter)
+VOID DumpPackInfo(struct bcm_mini_adapter *Adapter)
 {
        UINT uiLoopIndex = 0;
        UINT uiIndex = 0;
        UINT uiClsfrIndex = 0;
-       S_CLASSIFIER_RULE *pstClassifierEntry = NULL;
+       struct bcm_classifier_rule *pstClassifierEntry = NULL;
 
        for (uiLoopIndex = 0; uiLoopIndex < NO_OF_QUEUES; uiLoopIndex++) {
                BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, DUMP_INFO, DBG_LVL_ALL, "*********** Showing Details Of Queue %d***** ******", uiLoopIndex);
@@ -793,10 +769,10 @@ VOID DumpPackInfo(PMINI_ADAPTER Adapter)
        return;
 }
 
-int reset_card_proc(PMINI_ADAPTER ps_adapter)
+int reset_card_proc(struct bcm_mini_adapter *ps_adapter)
 {
        int retval = STATUS_SUCCESS;
-       PMINI_ADAPTER Adapter = GET_BCM_ADAPTER(gblpnetdev);
+       struct bcm_mini_adapter *Adapter = GET_BCM_ADAPTER(gblpnetdev);
        PS_INTERFACE_ADAPTER psIntfAdapter = NULL;
        unsigned int value = 0, uiResetValue = 0;
        int bytes;
@@ -911,7 +887,7 @@ err_exit:
        return retval;
 }
 
-int run_card_proc(PMINI_ADAPTER ps_adapter)
+int run_card_proc(struct bcm_mini_adapter *ps_adapter)
 {
        int status = STATUS_SUCCESS;
        int bytes;
@@ -938,7 +914,7 @@ int run_card_proc(PMINI_ADAPTER ps_adapter)
        return status;
 }
 
-int InitCardAndDownloadFirmware(PMINI_ADAPTER ps_adapter)
+int InitCardAndDownloadFirmware(struct bcm_mini_adapter *ps_adapter)
 {
        int status;
        UINT value = 0;
@@ -1062,7 +1038,7 @@ OUT:
        return status;
 }
 
-static int bcm_parse_target_params(PMINI_ADAPTER Adapter)
+static int bcm_parse_target_params(struct bcm_mini_adapter *Adapter)
 {
        struct file *flp = NULL;
        char *buff;
@@ -1107,7 +1083,7 @@ static int bcm_parse_target_params(PMINI_ADAPTER Adapter)
        return STATUS_SUCCESS;
 }
 
-void beceem_parse_target_struct(PMINI_ADAPTER Adapter)
+void beceem_parse_target_struct(struct bcm_mini_adapter *Adapter)
 {
        UINT uiHostDrvrCfg6 = 0, uiEEPROMFlag = 0;
 
@@ -1165,7 +1141,7 @@ void beceem_parse_target_struct(PMINI_ADAPTER Adapter)
                doPowerAutoCorrection(Adapter);
 }
 
-static VOID doPowerAutoCorrection(PMINI_ADAPTER psAdapter)
+static VOID doPowerAutoCorrection(struct bcm_mini_adapter *psAdapter)
 {
        UINT reporting_mode;
 
@@ -1196,45 +1172,6 @@ static VOID doPowerAutoCorrection(PMINI_ADAPTER psAdapter)
        }
 }
 
-#if 0
-static unsigned char *ReadMacAddrEEPROM(PMINI_ADAPTER Adapter, ulong dwAddress)
-{
-       int status = 0, i = 0;
-       unsigned int temp = 0;
-       unsigned char *pucmacaddr = kmalloc(MAC_ADDRESS_SIZE, GFP_KERNEL);
-       int bytes;
-
-       if (!pucmacaddr) {
-               BCM_DEBUG_PRINT(Adapter, DBG_TYPE_PRINTK, 0, 0, "No Buffers to Read the EEPROM Address\n");
-               return NULL;
-       }
-
-       dwAddress |= 0x5b000000;
-       status = wrmalt(Adapter, EEPROM_COMMAND_Q_REG, (PUINT)&dwAddress, sizeof(UINT));
-       if (status != STATUS_SUCCESS) {
-               BCM_DEBUG_PRINT(Adapter, DBG_TYPE_PRINTK, 0, 0, "wrm Failed..\n");
-               kfree(pucmacaddr);
-               pucmacaddr = NULL;
-               goto OUT;
-       }
-
-       for (i = 0; i < MAC_ADDRESS_SIZE; i++) {
-               bytes = rdmalt(Adapter, EEPROM_READ_DATA_Q_REG, &temp, sizeof(temp));
-               if (bytes < 0) {
-                       status = bytes;
-                       BCM_DEBUG_PRINT(Adapter, DBG_TYPE_PRINTK, 0, 0, "rdm Failed..\n");
-                       kfree(pucmacaddr);
-                       pucmacaddr = NULL;
-                       goto OUT;
-               }
-               pucmacaddr[i] = temp & 0xff;
-               BCM_DEBUG_PRINT(Adapter, DBG_TYPE_INITEXIT, DRV_ENTRY, DBG_LVL_ALL, "%x\n", pucmacaddr[i]);
-       }
-OUT:
-       return pucmacaddr;
-}
-#endif
-
 static void convertEndian(B_UINT8 rwFlag, PUINT puiBuffer, UINT uiByteCount)
 {
        UINT uiIndex = 0;
@@ -1248,16 +1185,13 @@ static void convertEndian(B_UINT8 rwFlag, PUINT puiBuffer, UINT uiByteCount)
        }
 }
 
-#define CACHE_ADDRESS_MASK 0x80000000
-#define UNCACHE_ADDRESS_MASK 0xa0000000
-
-int rdm(PMINI_ADAPTER Adapter, UINT uiAddress, PCHAR pucBuff, size_t sSize)
+int rdm(struct bcm_mini_adapter *Adapter, UINT uiAddress, PCHAR pucBuff, size_t sSize)
 {
        return Adapter->interface_rdm(Adapter->pvInterfaceAdapter,
                                uiAddress, pucBuff, sSize);
 }
 
-int wrm(PMINI_ADAPTER Adapter, UINT uiAddress, PCHAR pucBuff, size_t sSize)
+int wrm(struct bcm_mini_adapter *Adapter, UINT uiAddress, PCHAR pucBuff, size_t sSize)
 {
        int iRetVal;
 
@@ -1266,13 +1200,13 @@ int wrm(PMINI_ADAPTER Adapter, UINT uiAddress, PCHAR pucBuff, size_t sSize)
        return iRetVal;
 }
 
-int wrmalt(PMINI_ADAPTER Adapter, UINT uiAddress, PUINT pucBuff, size_t size)
+int wrmalt(struct bcm_mini_adapter *Adapter, UINT uiAddress, PUINT pucBuff, size_t size)
 {
        convertEndian(RWM_WRITE, pucBuff, size);
        return wrm(Adapter, uiAddress, (PUCHAR)pucBuff, size);
 }
 
-int rdmalt(PMINI_ADAPTER Adapter, UINT uiAddress, PUINT pucBuff, size_t size)
+int rdmalt(struct bcm_mini_adapter *Adapter, UINT uiAddress, PUINT pucBuff, size_t size)
 {
        INT uiRetVal = 0;
 
@@ -1282,7 +1216,7 @@ int rdmalt(PMINI_ADAPTER Adapter, UINT uiAddress, PUINT pucBuff, size_t size)
        return uiRetVal;
 }
 
-int wrmWithLock(PMINI_ADAPTER Adapter, UINT uiAddress, PCHAR pucBuff, size_t sSize)
+int wrmWithLock(struct bcm_mini_adapter *Adapter, UINT uiAddress, PCHAR pucBuff, size_t sSize)
 {
        INT status = STATUS_SUCCESS;
        down(&Adapter->rdmwrmsync);
@@ -1301,7 +1235,7 @@ exit:
        return status;
 }
 
-int wrmaltWithLock(PMINI_ADAPTER Adapter, UINT uiAddress, PUINT pucBuff, size_t size)
+int wrmaltWithLock(struct bcm_mini_adapter *Adapter, UINT uiAddress, PUINT pucBuff, size_t size)
 {
        int iRetVal = STATUS_SUCCESS;
 
@@ -1321,7 +1255,7 @@ exit:
        return iRetVal;
 }
 
-int rdmaltWithLock(PMINI_ADAPTER Adapter, UINT uiAddress, PUINT pucBuff, size_t size)
+int rdmaltWithLock(struct bcm_mini_adapter *Adapter, UINT uiAddress, PUINT pucBuff, size_t size)
 {
        INT uiRetVal = STATUS_SUCCESS;
 
@@ -1340,7 +1274,7 @@ exit:
        return uiRetVal;
 }
 
-static VOID HandleShutDownModeWakeup(PMINI_ADAPTER Adapter)
+static VOID HandleShutDownModeWakeup(struct bcm_mini_adapter *Adapter)
 {
        int clear_abort_pattern = 0, Status = 0;
        BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, MP_SHUTDOWN, DBG_LVL_ALL, "====>\n");
@@ -1369,13 +1303,13 @@ static VOID HandleShutDownModeWakeup(PMINI_ADAPTER Adapter)
        BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, MP_SHUTDOWN, DBG_LVL_ALL, "<====\n");
 }
 
-static VOID SendShutModeResponse(PMINI_ADAPTER Adapter)
+static VOID SendShutModeResponse(struct bcm_mini_adapter *Adapter)
 {
-       CONTROL_MESSAGE stShutdownResponse;
+       struct bcm_link_request stShutdownResponse;
        UINT NVMAccess = 0, lowPwrAbortMsg = 0;
        UINT Status = 0;
 
-       memset(&stShutdownResponse, 0, sizeof(CONTROL_MESSAGE));
+       memset(&stShutdownResponse, 0, sizeof(struct bcm_link_request));
        stShutdownResponse.Leader.Status  = LINK_UP_CONTROL_REQ;
        stShutdownResponse.Leader.PLength = 8; /* 8 bytes; */
        stShutdownResponse.szData[0] = LINK_UP_ACK;
@@ -1453,7 +1387,7 @@ static VOID SendShutModeResponse(PMINI_ADAPTER Adapter)
        }
 }
 
-static void HandleShutDownModeRequest(PMINI_ADAPTER Adapter, PUCHAR pucBuffer)
+static void HandleShutDownModeRequest(struct bcm_mini_adapter *Adapter, PUCHAR pucBuffer)
 {
        B_UINT32 uiResetValue = 0;
 
@@ -1482,7 +1416,7 @@ static void HandleShutDownModeRequest(PMINI_ADAPTER Adapter, PUCHAR pucBuffer)
        return;
 }
 
-VOID ResetCounters(PMINI_ADAPTER Adapter)
+VOID ResetCounters(struct bcm_mini_adapter *Adapter)
 {
        beceem_protocol_reset(Adapter);
        Adapter->CurrNumRecvDescs = 0;
@@ -1498,7 +1432,7 @@ VOID ResetCounters(PMINI_ADAPTER Adapter)
        Adapter->bShutStatus = FALSE;
 }
 
-S_CLASSIFIER_RULE *GetFragIPClsEntry(PMINI_ADAPTER Adapter, USHORT usIpIdentification, ULONG SrcIP)
+struct bcm_classifier_rule *GetFragIPClsEntry(struct bcm_mini_adapter *Adapter, USHORT usIpIdentification, ULONG SrcIP)
 {
        UINT uiIndex = 0;
        for (uiIndex = 0; uiIndex < MAX_FRAGMENTEDIP_CLASSIFICATION_ENTRIES; uiIndex++) {
@@ -1512,18 +1446,18 @@ S_CLASSIFIER_RULE *GetFragIPClsEntry(PMINI_ADAPTER Adapter, USHORT usIpIdentific
        return NULL;
 }
 
-void AddFragIPClsEntry(PMINI_ADAPTER Adapter, PS_FRAGMENTED_PACKET_INFO psFragPktInfo)
+void AddFragIPClsEntry(struct bcm_mini_adapter *Adapter, struct bcm_fragmented_packet_info *psFragPktInfo)
 {
        UINT uiIndex = 0;
        for (uiIndex = 0; uiIndex < MAX_FRAGMENTEDIP_CLASSIFICATION_ENTRIES; uiIndex++) {
                if (!Adapter->astFragmentedPktClassifierTable[uiIndex].bUsed) {
-                       memcpy(&Adapter->astFragmentedPktClassifierTable[uiIndex], psFragPktInfo, sizeof(S_FRAGMENTED_PACKET_INFO));
+                       memcpy(&Adapter->astFragmentedPktClassifierTable[uiIndex], psFragPktInfo, sizeof(struct bcm_fragmented_packet_info));
                        break;
                }
        }
 }
 
-void DelFragIPClsEntry(PMINI_ADAPTER Adapter, USHORT usIpIdentification, ULONG SrcIp)
+void DelFragIPClsEntry(struct bcm_mini_adapter *Adapter, USHORT usIpIdentification, ULONG SrcIp)
 {
        UINT uiIndex = 0;
        for (uiIndex = 0; uiIndex < MAX_FRAGMENTEDIP_CLASSIFICATION_ENTRIES; uiIndex++) {
@@ -1531,11 +1465,11 @@ void DelFragIPClsEntry(PMINI_ADAPTER Adapter, USHORT usIpIdentification, ULONG S
                        (Adapter->astFragmentedPktClassifierTable[uiIndex].usIpIdentification == usIpIdentification) &&
                        (Adapter->astFragmentedPktClassifierTable[uiIndex].ulSrcIpAddress == SrcIp))
 
-                       memset(&Adapter->astFragmentedPktClassifierTable[uiIndex], 0, sizeof(S_FRAGMENTED_PACKET_INFO));
+                       memset(&Adapter->astFragmentedPktClassifierTable[uiIndex], 0, sizeof(struct bcm_fragmented_packet_info));
        }
 }
 
-void update_per_cid_rx(PMINI_ADAPTER Adapter)
+void update_per_cid_rx(struct bcm_mini_adapter *Adapter)
 {
        UINT qindex = 0;
 
@@ -1559,7 +1493,7 @@ void update_per_cid_rx(PMINI_ADAPTER Adapter)
        Adapter->liDrainCalculated = jiffies;
 }
 
-void update_per_sf_desc_cnts(PMINI_ADAPTER Adapter)
+void update_per_sf_desc_cnts(struct bcm_mini_adapter *Adapter)
 {
        INT iIndex = 0;
        u32 uibuff[MAX_TARGET_DSX_BUFFERS];
@@ -1585,7 +1519,7 @@ void update_per_sf_desc_cnts(PMINI_ADAPTER Adapter)
        atomic_set(&Adapter->uiMBupdate, FALSE);
 }
 
-void flush_queue(PMINI_ADAPTER Adapter, UINT iQIndex)
+void flush_queue(struct bcm_mini_adapter *Adapter, UINT iQIndex)
 {
        struct sk_buff *PacketToDrop = NULL;
        struct net_device_stats *netstats = &Adapter->dev->stats;
@@ -1609,7 +1543,7 @@ void flush_queue(PMINI_ADAPTER Adapter, UINT iQIndex)
        spin_unlock_bh(&Adapter->PackInfo[iQIndex].SFQueueLock);
 }
 
-static void beceem_protocol_reset(PMINI_ADAPTER Adapter)
+static void beceem_protocol_reset(struct bcm_mini_adapter *Adapter)
 {
        int i;
        if (netif_msg_link(Adapter))
@@ -1631,7 +1565,7 @@ static void beceem_protocol_reset(PMINI_ADAPTER Adapter)
        if (Adapter->TimerActive == TRUE)
                Adapter->TimerActive = FALSE;
 
-       memset(Adapter->astFragmentedPktClassifierTable, 0, sizeof(S_FRAGMENTED_PACKET_INFO) * MAX_FRAGMENTEDIP_CLASSIFICATION_ENTRIES);
+       memset(Adapter->astFragmentedPktClassifierTable, 0, sizeof(struct bcm_fragmented_packet_info) * MAX_FRAGMENTEDIP_CLASSIFICATION_ENTRIES);
 
        for (i = 0; i < HiPriority; i++) {
                /* resetting only the first size (S_MIBS_SERVICEFLOW_TABLE) for the SF. */