Commit 2979460d authored by Kevin McKinney's avatar Kevin McKinney Committed by Greg Kroah-Hartman

Staging: bcm: Remove typedef for _MINI_ADAPTER and call directly.

This patch removes typedef for _MINI_ADAPTER, changes the
name of the struct from _MINI_ADAPTER to bcm_mini_adapter.
In addition, any calls to the following typedefs
"MINI_ADAPTER, *PMINI_ADAPTER" are changed to call
the struct directly.
Signed-off-by: default avatarKevin McKinney <klmckinney1@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent ff352042
...@@ -192,7 +192,7 @@ struct bcm_packet_info { ...@@ -192,7 +192,7 @@ struct bcm_packet_info {
struct bcm_tarang_data { struct bcm_tarang_data {
struct bcm_tarang_data *next; struct bcm_tarang_data *next;
struct _MINI_ADAPTER *Adapter; struct bcm_mini_adapter *Adapter;
struct sk_buff *RxAppControlHead; struct sk_buff *RxAppControlHead;
struct sk_buff *RxAppControlTail; struct sk_buff *RxAppControlTail;
int AppCtrlQueueLen; int AppCtrlQueueLen;
...@@ -208,15 +208,15 @@ struct bcm_targetdsx_buffer { ...@@ -208,15 +208,15 @@ struct bcm_targetdsx_buffer {
BOOLEAN valid; BOOLEAN valid;
}; };
typedef int (*FP_FLASH_WRITE)(struct _MINI_ADAPTER *, UINT, PVOID); typedef int (*FP_FLASH_WRITE)(struct bcm_mini_adapter *, UINT, PVOID);
typedef int (*FP_FLASH_WRITE_STATUS)(struct _MINI_ADAPTER *, UINT, PVOID); typedef int (*FP_FLASH_WRITE_STATUS)(struct bcm_mini_adapter *, UINT, PVOID);
/* /*
* Driver adapter data structure * Driver adapter data structure
*/ */
struct _MINI_ADAPTER { struct bcm_mini_adapter {
struct _MINI_ADAPTER *next; struct bcm_mini_adapter *next;
struct net_device *dev; struct net_device *dev;
u32 msg_enable; u32 msg_enable;
CHAR *caDsxReqResp; CHAR *caDsxReqResp;
...@@ -394,7 +394,6 @@ struct _MINI_ADAPTER { ...@@ -394,7 +394,6 @@ struct _MINI_ADAPTER {
UINT gpioBitMap; UINT gpioBitMap;
S_BCM_DEBUG_STATE stDebugState; S_BCM_DEBUG_STATE stDebugState;
}; };
typedef struct _MINI_ADAPTER MINI_ADAPTER, *PMINI_ADAPTER;
#define GET_BCM_ADAPTER(net_dev) netdev_priv(net_dev) #define GET_BCM_ADAPTER(net_dev) netdev_priv(net_dev)
...@@ -417,7 +416,7 @@ struct bcm_ddr_setting { ...@@ -417,7 +416,7 @@ struct bcm_ddr_setting {
UINT ulRegAddress; UINT ulRegAddress;
UINT ulRegValue; UINT ulRegValue;
}; };
int InitAdapter(PMINI_ADAPTER psAdapter); int InitAdapter(struct bcm_mini_adapter *psAdapter);
/* ===================================================================== /* =====================================================================
* Beceem vendor request codes for EP0 * Beceem vendor request codes for EP0
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
static int bcm_char_open(struct inode *inode, struct file * filp) static int bcm_char_open(struct inode *inode, struct file * filp)
{ {
PMINI_ADAPTER Adapter = NULL; struct bcm_mini_adapter *Adapter = NULL;
struct bcm_tarang_data *pTarang = NULL; struct bcm_tarang_data *pTarang = NULL;
Adapter = GET_BCM_ADAPTER(gblpnetdev); Adapter = GET_BCM_ADAPTER(gblpnetdev);
...@@ -44,7 +44,7 @@ static int bcm_char_open(struct inode *inode, struct file * filp) ...@@ -44,7 +44,7 @@ static int bcm_char_open(struct inode *inode, struct file * filp)
static int bcm_char_release(struct inode *inode, struct file *filp) static int bcm_char_release(struct inode *inode, struct file *filp)
{ {
struct bcm_tarang_data *pTarang, *tmp, *ptmp; struct bcm_tarang_data *pTarang, *tmp, *ptmp;
PMINI_ADAPTER Adapter = NULL; struct bcm_mini_adapter *Adapter = NULL;
struct sk_buff *pkt, *npkt; struct sk_buff *pkt, *npkt;
pTarang = (struct bcm_tarang_data *)filp->private_data; pTarang = (struct bcm_tarang_data *)filp->private_data;
...@@ -98,7 +98,7 @@ static ssize_t bcm_char_read(struct file *filp, char __user *buf, size_t size, ...@@ -98,7 +98,7 @@ static ssize_t bcm_char_read(struct file *filp, char __user *buf, size_t size,
loff_t *f_pos) loff_t *f_pos)
{ {
struct bcm_tarang_data *pTarang = filp->private_data; struct bcm_tarang_data *pTarang = filp->private_data;
PMINI_ADAPTER Adapter = pTarang->Adapter; struct bcm_mini_adapter *Adapter = pTarang->Adapter;
struct sk_buff *Packet = NULL; struct sk_buff *Packet = NULL;
ssize_t PktLen = 0; ssize_t PktLen = 0;
int wait_ret_val = 0; int wait_ret_val = 0;
...@@ -157,7 +157,7 @@ static long bcm_char_ioctl(struct file *filp, UINT cmd, ULONG arg) ...@@ -157,7 +157,7 @@ static long bcm_char_ioctl(struct file *filp, UINT cmd, ULONG arg)
{ {
struct bcm_tarang_data *pTarang = filp->private_data; struct bcm_tarang_data *pTarang = filp->private_data;
void __user *argp = (void __user *)arg; void __user *argp = (void __user *)arg;
PMINI_ADAPTER Adapter = pTarang->Adapter; struct bcm_mini_adapter *Adapter = pTarang->Adapter;
INT Status = STATUS_FAILURE; INT Status = STATUS_FAILURE;
int timeout = 0; int timeout = 0;
IOCTL_BUFFER IoBuffer; IOCTL_BUFFER IoBuffer;
...@@ -2014,7 +2014,7 @@ static const struct file_operations bcm_fops = { ...@@ -2014,7 +2014,7 @@ static const struct file_operations bcm_fops = {
.llseek = no_llseek, .llseek = no_llseek,
}; };
int register_control_device_interface(PMINI_ADAPTER Adapter) int register_control_device_interface(struct bcm_mini_adapter *Adapter)
{ {
if (Adapter->major > 0) if (Adapter->major > 0)
...@@ -2039,7 +2039,7 @@ int register_control_device_interface(PMINI_ADAPTER Adapter) ...@@ -2039,7 +2039,7 @@ int register_control_device_interface(PMINI_ADAPTER Adapter)
return 0; return 0;
} }
void unregister_control_device_interface(PMINI_ADAPTER Adapter) void unregister_control_device_interface(struct bcm_mini_adapter *Adapter)
{ {
if (Adapter->major > 0) { if (Adapter->major > 0) {
device_destroy(bcm_class, MKDEV(Adapter->major, 0)); device_destroy(bcm_class, MKDEV(Adapter->major, 0));
......
...@@ -4,7 +4,7 @@ struct net_device *gblpnetdev; ...@@ -4,7 +4,7 @@ struct net_device *gblpnetdev;
static INT bcm_open(struct net_device *dev) static INT bcm_open(struct net_device *dev)
{ {
PMINI_ADAPTER Adapter = GET_BCM_ADAPTER(dev); struct bcm_mini_adapter *Adapter = GET_BCM_ADAPTER(dev);
if (Adapter->fw_download_done == FALSE) { if (Adapter->fw_download_done == FALSE) {
pr_notice(PFX "%s: link up failed (download in progress)\n", pr_notice(PFX "%s: link up failed (download in progress)\n",
...@@ -28,7 +28,7 @@ static INT bcm_open(struct net_device *dev) ...@@ -28,7 +28,7 @@ static INT bcm_open(struct net_device *dev)
static INT bcm_close(struct net_device *dev) static INT bcm_close(struct net_device *dev)
{ {
PMINI_ADAPTER Adapter = GET_BCM_ADAPTER(dev); struct bcm_mini_adapter *Adapter = GET_BCM_ADAPTER(dev);
if (netif_msg_ifdown(Adapter)) if (netif_msg_ifdown(Adapter))
pr_info(PFX "%s: disabling interface\n", dev->name); pr_info(PFX "%s: disabling interface\n", dev->name);
...@@ -59,7 +59,7 @@ static u16 bcm_select_queue(struct net_device *dev, struct sk_buff *skb) ...@@ -59,7 +59,7 @@ static u16 bcm_select_queue(struct net_device *dev, struct sk_buff *skb)
static netdev_tx_t bcm_transmit(struct sk_buff *skb, struct net_device *dev) static netdev_tx_t bcm_transmit(struct sk_buff *skb, struct net_device *dev)
{ {
PMINI_ADAPTER Adapter = GET_BCM_ADAPTER(dev); struct bcm_mini_adapter *Adapter = GET_BCM_ADAPTER(dev);
u16 qindex = skb_get_queue_mapping(skb); u16 qindex = skb_get_queue_mapping(skb);
...@@ -141,7 +141,7 @@ static int bcm_get_settings(struct net_device *dev, struct ethtool_cmd *cmd) ...@@ -141,7 +141,7 @@ static int bcm_get_settings(struct net_device *dev, struct ethtool_cmd *cmd)
static void bcm_get_drvinfo(struct net_device *dev, static void bcm_get_drvinfo(struct net_device *dev,
struct ethtool_drvinfo *info) struct ethtool_drvinfo *info)
{ {
PMINI_ADAPTER Adapter = GET_BCM_ADAPTER(dev); struct bcm_mini_adapter *Adapter = GET_BCM_ADAPTER(dev);
PS_INTERFACE_ADAPTER psIntfAdapter = Adapter->pvInterfaceAdapter; PS_INTERFACE_ADAPTER psIntfAdapter = Adapter->pvInterfaceAdapter;
struct usb_device *udev = interface_to_usbdev(psIntfAdapter->interface); struct usb_device *udev = interface_to_usbdev(psIntfAdapter->interface);
...@@ -156,21 +156,21 @@ static void bcm_get_drvinfo(struct net_device *dev, ...@@ -156,21 +156,21 @@ static void bcm_get_drvinfo(struct net_device *dev,
static u32 bcm_get_link(struct net_device *dev) static u32 bcm_get_link(struct net_device *dev)
{ {
PMINI_ADAPTER Adapter = GET_BCM_ADAPTER(dev); struct bcm_mini_adapter *Adapter = GET_BCM_ADAPTER(dev);
return Adapter->LinkUpStatus; return Adapter->LinkUpStatus;
} }
static u32 bcm_get_msglevel(struct net_device *dev) static u32 bcm_get_msglevel(struct net_device *dev)
{ {
PMINI_ADAPTER Adapter = GET_BCM_ADAPTER(dev); struct bcm_mini_adapter *Adapter = GET_BCM_ADAPTER(dev);
return Adapter->msg_enable; return Adapter->msg_enable;
} }
static void bcm_set_msglevel(struct net_device *dev, u32 level) static void bcm_set_msglevel(struct net_device *dev, u32 level)
{ {
PMINI_ADAPTER Adapter = GET_BCM_ADAPTER(dev); struct bcm_mini_adapter *Adapter = GET_BCM_ADAPTER(dev);
Adapter->msg_enable = level; Adapter->msg_enable = level;
} }
...@@ -183,7 +183,7 @@ static const struct ethtool_ops bcm_ethtool_ops = { ...@@ -183,7 +183,7 @@ static const struct ethtool_ops bcm_ethtool_ops = {
.set_msglevel = bcm_set_msglevel, .set_msglevel = bcm_set_msglevel,
}; };
int register_networkdev(PMINI_ADAPTER Adapter) int register_networkdev(struct bcm_mini_adapter *Adapter)
{ {
struct net_device *net = Adapter->dev; struct net_device *net = Adapter->dev;
PS_INTERFACE_ADAPTER IntfAdapter = Adapter->pvInterfaceAdapter; PS_INTERFACE_ADAPTER IntfAdapter = Adapter->pvInterfaceAdapter;
...@@ -224,7 +224,7 @@ int register_networkdev(PMINI_ADAPTER Adapter) ...@@ -224,7 +224,7 @@ int register_networkdev(PMINI_ADAPTER Adapter)
return 0; return 0;
} }
void unregister_networkdev(PMINI_ADAPTER Adapter) void unregister_networkdev(struct bcm_mini_adapter *Adapter)
{ {
struct net_device *net = Adapter->dev; struct net_device *net = Adapter->dev;
PS_INTERFACE_ADAPTER IntfAdapter = Adapter->pvInterfaceAdapter; PS_INTERFACE_ADAPTER IntfAdapter = Adapter->pvInterfaceAdapter;
......
...@@ -14,7 +14,7 @@ enum E_CLASSIFIER_ACTION { ...@@ -14,7 +14,7 @@ enum E_CLASSIFIER_ACTION {
eDeleteClassifier eDeleteClassifier
}; };
static ULONG GetNextTargetBufferLocation(PMINI_ADAPTER Adapter, B_UINT16 tid); static ULONG GetNextTargetBufferLocation(struct bcm_mini_adapter *Adapter, B_UINT16 tid);
/************************************************************ /************************************************************
* Function - SearchSfid * Function - SearchSfid
...@@ -28,7 +28,7 @@ static ULONG GetNextTargetBufferLocation(PMINI_ADAPTER Adapter, B_UINT16 tid); ...@@ -28,7 +28,7 @@ static ULONG GetNextTargetBufferLocation(PMINI_ADAPTER Adapter, B_UINT16 tid);
* Returns - Queue index for this SFID(If matched) * Returns - Queue index for this SFID(If matched)
* Else Invalid Queue Index(If Not matched) * Else Invalid Queue Index(If Not matched)
************************************************************/ ************************************************************/
int SearchSfid(PMINI_ADAPTER Adapter, UINT uiSfid) int SearchSfid(struct bcm_mini_adapter *Adapter, UINT uiSfid)
{ {
int i; int i;
...@@ -49,7 +49,7 @@ int SearchSfid(PMINI_ADAPTER Adapter, UINT uiSfid) ...@@ -49,7 +49,7 @@ int SearchSfid(PMINI_ADAPTER Adapter, UINT uiSfid)
* Returns - Queue index for the free SFID * Returns - Queue index for the free SFID
* Else returns Invalid Index. * Else returns Invalid Index.
****************************************************************/ ****************************************************************/
static int SearchFreeSfid(PMINI_ADAPTER Adapter) static int SearchFreeSfid(struct bcm_mini_adapter *Adapter)
{ {
int i; int i;
...@@ -63,12 +63,12 @@ static int SearchFreeSfid(PMINI_ADAPTER Adapter) ...@@ -63,12 +63,12 @@ static int SearchFreeSfid(PMINI_ADAPTER Adapter)
/* /*
* Function: SearchClsid * Function: SearchClsid
* Description: This routinue would search Classifier having specified ClassifierID as input parameter * Description: This routinue would search Classifier having specified ClassifierID as input parameter
* Input parameters: PMINI_ADAPTER Adapter - Adapter Context * Input parameters: struct bcm_mini_adapter *Adapter - Adapter Context
* unsigned int uiSfid - The SF in which the classifier is to searched * unsigned int uiSfid - The SF in which the classifier is to searched
* B_UINT16 uiClassifierID - The classifier ID to be searched * B_UINT16 uiClassifierID - The classifier ID to be searched
* Return: int :Classifier table index of matching entry * Return: int :Classifier table index of matching entry
*/ */
static int SearchClsid(PMINI_ADAPTER Adapter, ULONG ulSFID, B_UINT16 uiClassifierID) static int SearchClsid(struct bcm_mini_adapter *Adapter, ULONG ulSFID, B_UINT16 uiClassifierID)
{ {
int i; int i;
...@@ -87,7 +87,7 @@ static int SearchClsid(PMINI_ADAPTER Adapter, ULONG ulSFID, B_UINT16 uiClassifi ...@@ -87,7 +87,7 @@ static int SearchClsid(PMINI_ADAPTER Adapter, ULONG ulSFID, B_UINT16 uiClassifi
* This routinue would search Free available Classifier entry in classifier table. * This routinue would search Free available Classifier entry in classifier table.
* @return free Classifier Entry index in classifier table for specified SF * @return free Classifier Entry index in classifier table for specified SF
*/ */
static int SearchFreeClsid(PMINI_ADAPTER Adapter /**Adapter Context*/) static int SearchFreeClsid(struct bcm_mini_adapter *Adapter /**Adapter Context*/)
{ {
int i; int i;
...@@ -99,7 +99,7 @@ static int SearchFreeClsid(PMINI_ADAPTER Adapter /**Adapter Context*/) ...@@ -99,7 +99,7 @@ static int SearchFreeClsid(PMINI_ADAPTER Adapter /**Adapter Context*/)
return MAX_CLASSIFIERS+1; return MAX_CLASSIFIERS+1;
} }
static VOID deleteSFBySfid(PMINI_ADAPTER Adapter, UINT uiSearchRuleIndex) static VOID deleteSFBySfid(struct bcm_mini_adapter *Adapter, UINT uiSearchRuleIndex)
{ {
/* deleting all the packet held in the SF */ /* deleting all the packet held in the SF */
flush_queue(Adapter, uiSearchRuleIndex); flush_queue(Adapter, uiSearchRuleIndex);
...@@ -120,7 +120,7 @@ CopyIpAddrToClassifier(struct bcm_classifier_rule *pstClassifierEntry, ...@@ -120,7 +120,7 @@ CopyIpAddrToClassifier(struct bcm_classifier_rule *pstClassifierEntry,
UINT nSizeOfIPAddressInBytes = IP_LENGTH_OF_ADDRESS; UINT nSizeOfIPAddressInBytes = IP_LENGTH_OF_ADDRESS;
UCHAR *ptrClassifierIpAddress = NULL; UCHAR *ptrClassifierIpAddress = NULL;
UCHAR *ptrClassifierIpMask = NULL; UCHAR *ptrClassifierIpMask = NULL;
PMINI_ADAPTER Adapter = GET_BCM_ADAPTER(gblpnetdev); struct bcm_mini_adapter *Adapter = GET_BCM_ADAPTER(gblpnetdev);
if (bIpVersion6) if (bIpVersion6)
nSizeOfIPAddressInBytes = IPV6_ADDRESS_SIZEINBYTES; nSizeOfIPAddressInBytes = IPV6_ADDRESS_SIZEINBYTES;
...@@ -214,7 +214,7 @@ CopyIpAddrToClassifier(struct bcm_classifier_rule *pstClassifierEntry, ...@@ -214,7 +214,7 @@ CopyIpAddrToClassifier(struct bcm_classifier_rule *pstClassifierEntry,
} }
} }
void ClearTargetDSXBuffer(PMINI_ADAPTER Adapter, B_UINT16 TID, BOOLEAN bFreeAll) void ClearTargetDSXBuffer(struct bcm_mini_adapter *Adapter, B_UINT16 TID, BOOLEAN bFreeAll)
{ {
int i; int i;
...@@ -236,7 +236,7 @@ void ClearTargetDSXBuffer(PMINI_ADAPTER Adapter, B_UINT16 TID, BOOLEAN bFreeAll) ...@@ -236,7 +236,7 @@ void ClearTargetDSXBuffer(PMINI_ADAPTER Adapter, B_UINT16 TID, BOOLEAN bFreeAll)
* @ingroup ctrl_pkt_functions * @ingroup ctrl_pkt_functions
* copy classifier rule into the specified SF index * copy classifier rule into the specified SF index
*/ */
static inline VOID CopyClassifierRuleToSF(PMINI_ADAPTER Adapter, stConvergenceSLTypes *psfCSType, UINT uiSearchRuleIndex, UINT nClassifierIndex) static inline VOID CopyClassifierRuleToSF(struct bcm_mini_adapter *Adapter, stConvergenceSLTypes *psfCSType, UINT uiSearchRuleIndex, UINT nClassifierIndex)
{ {
struct bcm_classifier_rule *pstClassifierEntry = NULL; struct bcm_classifier_rule *pstClassifierEntry = NULL;
/* VOID *pvPhsContext = NULL; */ /* VOID *pvPhsContext = NULL; */
...@@ -365,7 +365,7 @@ static inline VOID CopyClassifierRuleToSF(PMINI_ADAPTER Adapter, stConvergenceSL ...@@ -365,7 +365,7 @@ static inline VOID CopyClassifierRuleToSF(PMINI_ADAPTER Adapter, stConvergenceSL
/* /*
* @ingroup ctrl_pkt_functions * @ingroup ctrl_pkt_functions
*/ */
static inline VOID DeleteClassifierRuleFromSF(PMINI_ADAPTER Adapter, UINT uiSearchRuleIndex, UINT nClassifierIndex) static inline VOID DeleteClassifierRuleFromSF(struct bcm_mini_adapter *Adapter, UINT uiSearchRuleIndex, UINT nClassifierIndex)
{ {
struct bcm_classifier_rule *pstClassifierEntry = NULL; struct bcm_classifier_rule *pstClassifierEntry = NULL;
B_UINT16 u16PacketClassificationRuleIndex; B_UINT16 u16PacketClassificationRuleIndex;
...@@ -396,7 +396,7 @@ static inline VOID DeleteClassifierRuleFromSF(PMINI_ADAPTER Adapter, UINT uiSear ...@@ -396,7 +396,7 @@ static inline VOID DeleteClassifierRuleFromSF(PMINI_ADAPTER Adapter, UINT uiSear
/* /*
* @ingroup ctrl_pkt_functions * @ingroup ctrl_pkt_functions
*/ */
VOID DeleteAllClassifiersForSF(PMINI_ADAPTER Adapter, UINT uiSearchRuleIndex) VOID DeleteAllClassifiersForSF(struct bcm_mini_adapter *Adapter, UINT uiSearchRuleIndex)
{ {
struct bcm_classifier_rule *pstClassifierEntry = NULL; struct bcm_classifier_rule *pstClassifierEntry = NULL;
int i; int i;
...@@ -428,7 +428,7 @@ VOID DeleteAllClassifiersForSF(PMINI_ADAPTER Adapter, UINT uiSearchRuleIndex) ...@@ -428,7 +428,7 @@ VOID DeleteAllClassifiersForSF(PMINI_ADAPTER Adapter, UINT uiSearchRuleIndex)
* related data into the Adapter structure. * related data into the Adapter structure.
* @ingroup ctrl_pkt_functions * @ingroup ctrl_pkt_functions
*/ */
static VOID CopyToAdapter(register PMINI_ADAPTER Adapter, /* <Pointer to the Adapter structure */ static VOID CopyToAdapter(register struct bcm_mini_adapter *Adapter, /* <Pointer to the Adapter structure */
register pstServiceFlowParamSI psfLocalSet, /* <Pointer to the ServiceFlowParamSI structure */ register pstServiceFlowParamSI psfLocalSet, /* <Pointer to the ServiceFlowParamSI structure */
register UINT uiSearchRuleIndex, /* <Index of Queue, to which this data belongs */ register UINT uiSearchRuleIndex, /* <Index of Queue, to which this data belongs */
register UCHAR ucDsxType, register UCHAR ucDsxType,
...@@ -836,7 +836,7 @@ static VOID DumpCmControlPacket(PVOID pvBuffer) ...@@ -836,7 +836,7 @@ static VOID DumpCmControlPacket(PVOID pvBuffer)
int nIndex; int nIndex;
stLocalSFAddIndicationAlt *pstAddIndication; stLocalSFAddIndicationAlt *pstAddIndication;
UINT nCurClassifierCnt; UINT nCurClassifierCnt;
PMINI_ADAPTER Adapter = GET_BCM_ADAPTER(gblpnetdev); struct bcm_mini_adapter *Adapter = GET_BCM_ADAPTER(gblpnetdev);
pstAddIndication = (stLocalSFAddIndicationAlt *)pvBuffer; pstAddIndication = (stLocalSFAddIndicationAlt *)pvBuffer;
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "======>"); BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "======>");
...@@ -1325,7 +1325,7 @@ static VOID DumpCmControlPacket(PVOID pvBuffer) ...@@ -1325,7 +1325,7 @@ static VOID DumpCmControlPacket(PVOID pvBuffer)
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, " bValid: 0x%X", pstAddIndication->sfActiveSet.bValid); BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, " bValid: 0x%X", pstAddIndication->sfActiveSet.bValid);
} }
static inline ULONG RestoreSFParam(PMINI_ADAPTER Adapter, ULONG ulAddrSFParamSet, PUCHAR pucDestBuffer) static inline ULONG RestoreSFParam(struct bcm_mini_adapter *Adapter, ULONG ulAddrSFParamSet, PUCHAR pucDestBuffer)
{ {
UINT nBytesToRead = sizeof(stServiceFlowParamSI); UINT nBytesToRead = sizeof(stServiceFlowParamSI);
...@@ -1342,7 +1342,7 @@ static inline ULONG RestoreSFParam(PMINI_ADAPTER Adapter, ULONG ulAddrSFParamSet ...@@ -1342,7 +1342,7 @@ static inline ULONG RestoreSFParam(PMINI_ADAPTER Adapter, ULONG ulAddrSFParamSet
return 1; return 1;
} }
static ULONG StoreSFParam(PMINI_ADAPTER Adapter, PUCHAR pucSrcBuffer, ULONG ulAddrSFParamSet) static ULONG StoreSFParam(struct bcm_mini_adapter *Adapter, PUCHAR pucSrcBuffer, ULONG ulAddrSFParamSet)
{ {
UINT nBytesToWrite = sizeof(stServiceFlowParamSI); UINT nBytesToWrite = sizeof(stServiceFlowParamSI);
int ret = 0; int ret = 0;
...@@ -1358,7 +1358,7 @@ static ULONG StoreSFParam(PMINI_ADAPTER Adapter, PUCHAR pucSrcBuffer, ULONG ulAd ...@@ -1358,7 +1358,7 @@ static ULONG StoreSFParam(PMINI_ADAPTER Adapter, PUCHAR pucSrcBuffer, ULONG ulAd
return 1; return 1;
} }
ULONG StoreCmControlResponseMessage(PMINI_ADAPTER Adapter, PVOID pvBuffer, UINT *puBufferLength) ULONG StoreCmControlResponseMessage(struct bcm_mini_adapter *Adapter, PVOID pvBuffer, UINT *puBufferLength)
{ {
stLocalSFAddIndicationAlt *pstAddIndicationAlt = NULL; stLocalSFAddIndicationAlt *pstAddIndicationAlt = NULL;
stLocalSFAddIndication *pstAddIndication = NULL; stLocalSFAddIndication *pstAddIndication = NULL;
...@@ -1473,7 +1473,7 @@ ULONG StoreCmControlResponseMessage(PMINI_ADAPTER Adapter, PVOID pvBuffer, UINT ...@@ -1473,7 +1473,7 @@ ULONG StoreCmControlResponseMessage(PMINI_ADAPTER Adapter, PVOID pvBuffer, UINT
} }
static inline stLocalSFAddIndicationAlt static inline stLocalSFAddIndicationAlt
*RestoreCmControlResponseMessage(register PMINI_ADAPTER Adapter, register PVOID pvBuffer) *RestoreCmControlResponseMessage(register struct bcm_mini_adapter *Adapter, register PVOID pvBuffer)
{ {
ULONG ulStatus = 0; ULONG ulStatus = 0;
stLocalSFAddIndication *pstAddIndication = NULL; stLocalSFAddIndication *pstAddIndication = NULL;
...@@ -1551,7 +1551,7 @@ static inline stLocalSFAddIndicationAlt ...@@ -1551,7 +1551,7 @@ static inline stLocalSFAddIndicationAlt
return NULL; return NULL;
} }
ULONG SetUpTargetDsxBuffers(PMINI_ADAPTER Adapter) ULONG SetUpTargetDsxBuffers(struct bcm_mini_adapter *Adapter)
{ {
ULONG ulTargetDsxBuffersBase = 0; ULONG ulTargetDsxBuffersBase = 0;
ULONG ulCntTargetBuffers; ULONG ulCntTargetBuffers;
...@@ -1598,7 +1598,7 @@ ULONG SetUpTargetDsxBuffers(PMINI_ADAPTER Adapter) ...@@ -1598,7 +1598,7 @@ ULONG SetUpTargetDsxBuffers(PMINI_ADAPTER Adapter)
return 1; return 1;
} }
static ULONG GetNextTargetBufferLocation(PMINI_ADAPTER Adapter, B_UINT16 tid) static ULONG GetNextTargetBufferLocation(struct bcm_mini_adapter *Adapter, B_UINT16 tid)
{ {
ULONG ulTargetDSXBufferAddress; ULONG ulTargetDSXBufferAddress;
ULONG ulTargetDsxBufferIndexToUse, ulMaxTry; ULONG ulTargetDsxBufferIndexToUse, ulMaxTry;
...@@ -1632,7 +1632,7 @@ static ULONG GetNextTargetBufferLocation(PMINI_ADAPTER Adapter, B_UINT16 tid) ...@@ -1632,7 +1632,7 @@ static ULONG GetNextTargetBufferLocation(PMINI_ADAPTER Adapter, B_UINT16 tid)
return ulTargetDSXBufferAddress; return ulTargetDSXBufferAddress;
} }
int AllocAdapterDsxBuffer(PMINI_ADAPTER Adapter) int AllocAdapterDsxBuffer(struct bcm_mini_adapter *Adapter)
{ {
/* /*
* Need to Allocate memory to contain the SUPER Large structures * Need to Allocate memory to contain the SUPER Large structures
...@@ -1645,7 +1645,7 @@ int AllocAdapterDsxBuffer(PMINI_ADAPTER Adapter) ...@@ -1645,7 +1645,7 @@ int AllocAdapterDsxBuffer(PMINI_ADAPTER Adapter)
return 0; return 0;
} }
int FreeAdapterDsxBuffer(PMINI_ADAPTER Adapter) int FreeAdapterDsxBuffer(struct bcm_mini_adapter *Adapter)
{ {
kfree(Adapter->caDsxReqResp); kfree(Adapter->caDsxReqResp);
return 0; return 0;
...@@ -1657,7 +1657,7 @@ int FreeAdapterDsxBuffer(PMINI_ADAPTER Adapter) ...@@ -1657,7 +1657,7 @@ int FreeAdapterDsxBuffer(PMINI_ADAPTER Adapter)
* for the Connection Management. * for the Connection Management.
* @return - Queue index for the free SFID else returns Invalid Index. * @return - Queue index for the free SFID else returns Invalid Index.
*/ */
BOOLEAN CmControlResponseMessage(PMINI_ADAPTER Adapter, /* <Pointer to the Adapter structure */ BOOLEAN CmControlResponseMessage(struct bcm_mini_adapter *Adapter, /* <Pointer to the Adapter structure */
PVOID pvBuffer /* Starting Address of the Buffer, that contains the AddIndication Data */) PVOID pvBuffer /* Starting Address of the Buffer, that contains the AddIndication Data */)
{ {
stServiceFlowParamSI *psfLocalSet = NULL; stServiceFlowParamSI *psfLocalSet = NULL;
...@@ -1915,7 +1915,7 @@ BOOLEAN CmControlResponseMessage(PMINI_ADAPTER Adapter, /* <Pointer to the Adap ...@@ -1915,7 +1915,7 @@ BOOLEAN CmControlResponseMessage(PMINI_ADAPTER Adapter, /* <Pointer to the Adap
return TRUE; return TRUE;
} }
int get_dsx_sf_data_to_application(PMINI_ADAPTER Adapter, UINT uiSFId, void __user *user_buffer) int get_dsx_sf_data_to_application(struct bcm_mini_adapter *Adapter, UINT uiSFId, void __user *user_buffer)
{ {
int status = 0; int status = 0;
struct bcm_packet_info *psSfInfo = NULL; struct bcm_packet_info *psSfInfo = NULL;
...@@ -1937,7 +1937,7 @@ int get_dsx_sf_data_to_application(PMINI_ADAPTER Adapter, UINT uiSFId, void __us ...@@ -1937,7 +1937,7 @@ int get_dsx_sf_data_to_application(PMINI_ADAPTER Adapter, UINT uiSFId, void __us
return STATUS_SUCCESS; return STATUS_SUCCESS;
} }
VOID OverrideServiceFlowParams(PMINI_ADAPTER Adapter, PUINT puiBuffer) VOID OverrideServiceFlowParams(struct bcm_mini_adapter *Adapter, PUINT puiBuffer)
{ {
B_UINT32 u32NumofSFsinMsg = ntohl(*(puiBuffer + 1)); B_UINT32 u32NumofSFsinMsg = ntohl(*(puiBuffer + 1));
stIM_SFHostNotify *pHostInfo = NULL; stIM_SFHostNotify *pHostInfo = NULL;
......
...@@ -148,14 +148,14 @@ typedef struct stLocalSFChangeIndicationAlt{ ...@@ -148,14 +148,14 @@ typedef struct stLocalSFChangeIndicationAlt{
}stLocalSFChangeIndicationAlt; }stLocalSFChangeIndicationAlt;
ULONG StoreCmControlResponseMessage(PMINI_ADAPTER Adapter,PVOID pvBuffer,UINT *puBufferLength); ULONG StoreCmControlResponseMessage(struct bcm_mini_adapter *Adapter, PVOID pvBuffer,UINT *puBufferLength);
INT AllocAdapterDsxBuffer(PMINI_ADAPTER Adapter); INT AllocAdapterDsxBuffer(struct bcm_mini_adapter *Adapter);
INT FreeAdapterDsxBuffer(PMINI_ADAPTER Adapter); INT FreeAdapterDsxBuffer(struct bcm_mini_adapter *Adapter);
ULONG SetUpTargetDsxBuffers(PMINI_ADAPTER Adapter); ULONG SetUpTargetDsxBuffers(struct bcm_mini_adapter *Adapter);
BOOLEAN CmControlResponseMessage(PMINI_ADAPTER Adapter,PVOID pvBuffer); BOOLEAN CmControlResponseMessage(struct bcm_mini_adapter *Adapter, PVOID pvBuffer);
#pragma pack (pop) #pragma pack (pop)
......
...@@ -772,7 +772,7 @@ static struct bcm_ddr_setting asT3LPB_DDRSetting80MHz[]= {// # DPLL Clock Settin ...@@ -772,7 +772,7 @@ static struct bcm_ddr_setting asT3LPB_DDRSetting80MHz[]= {// # DPLL Clock Settin
}; };
int ddr_init(MINI_ADAPTER *Adapter) int ddr_init(struct bcm_mini_adapter *Adapter)
{ {
struct bcm_ddr_setting *psDDRSetting=NULL; struct bcm_ddr_setting *psDDRSetting=NULL;
ULONG RegCount=0; ULONG RegCount=0;
...@@ -1099,7 +1099,7 @@ int ddr_init(MINI_ADAPTER *Adapter) ...@@ -1099,7 +1099,7 @@ int ddr_init(MINI_ADAPTER *Adapter)
return retval; return retval;
} }
int download_ddr_settings(PMINI_ADAPTER Adapter) int download_ddr_settings(struct bcm_mini_adapter *Adapter)
{ {
struct bcm_ddr_setting *psDDRSetting=NULL; struct bcm_ddr_setting *psDDRSetting=NULL;
ULONG RegCount=0; ULONG RegCount=0;
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
int ddr_init(PMINI_ADAPTER psAdapter); int ddr_init(struct bcm_mini_adapter *psAdapter);
int download_ddr_settings(PMINI_ADAPTER psAdapter); int download_ddr_settings(struct bcm_mini_adapter *psAdapter);
#endif #endif
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
* Enqueue the control packet for Application. * Enqueue the control packet for Application.
* @return None * @return None
*/ */
static VOID handle_rx_control_packet(PMINI_ADAPTER Adapter, struct sk_buff *skb) static VOID handle_rx_control_packet(struct bcm_mini_adapter *Adapter, struct sk_buff *skb)
{ {
struct bcm_tarang_data *pTarang = NULL; struct bcm_tarang_data *pTarang = NULL;
BOOLEAN HighPriorityMessage = FALSE; BOOLEAN HighPriorityMessage = FALSE;
...@@ -154,7 +154,7 @@ static VOID handle_rx_control_packet(PMINI_ADAPTER Adapter, struct sk_buff *skb) ...@@ -154,7 +154,7 @@ static VOID handle_rx_control_packet(PMINI_ADAPTER Adapter, struct sk_buff *skb)
* @ingroup ctrl_pkt_functions * @ingroup ctrl_pkt_functions
* Thread to handle control pkt reception * Thread to handle control pkt reception
*/ */
int control_packet_handler(PMINI_ADAPTER Adapter /* pointer to adapter object*/) int control_packet_handler(struct bcm_mini_adapter *Adapter /* pointer to adapter object*/)
{ {
struct sk_buff *ctrl_packet = NULL; struct sk_buff *ctrl_packet = NULL;
unsigned long flags = 0; unsigned long flags = 0;
...@@ -213,7 +213,7 @@ int control_packet_handler(PMINI_ADAPTER Adapter /* pointer to adapter object*/) ...@@ -213,7 +213,7 @@ int control_packet_handler(PMINI_ADAPTER Adapter /* pointer to adapter object*/)
INT flushAllAppQ(void) INT flushAllAppQ(void)
{ {
PMINI_ADAPTER Adapter = GET_BCM_ADAPTER(gblpnetdev); struct bcm_mini_adapter *Adapter = GET_BCM_ADAPTER(gblpnetdev);
struct bcm_tarang_data *pTarang = NULL; struct bcm_tarang_data *pTarang = NULL;
struct sk_buff *PacketToDrop = NULL; struct sk_buff *PacketToDrop = NULL;
for (pTarang = Adapter->pTarangs; pTarang; pTarang = pTarang->next) { for (pTarang = Adapter->pTarangs; pTarang; pTarang = pTarang->next) {
......
...@@ -12,7 +12,7 @@ static UCHAR *GetNextIPV6ChainedHeader(UCHAR **ppucPayload, ...@@ -12,7 +12,7 @@ static UCHAR *GetNextIPV6ChainedHeader(UCHAR **ppucPayload,
UCHAR *pucRetHeaderPtr = NULL; UCHAR *pucRetHeaderPtr = NULL;
UCHAR *pucPayloadPtr = NULL; UCHAR *pucPayloadPtr = NULL;
USHORT usNextHeaderOffset = 0 ; USHORT usNextHeaderOffset = 0 ;
PMINI_ADAPTER Adapter = GET_BCM_ADAPTER(gblpnetdev); struct bcm_mini_adapter *Adapter = GET_BCM_ADAPTER(gblpnetdev);
if ((ppucPayload == NULL) || (*pusPayloadLength == 0) || if ((ppucPayload == NULL) || (*pusPayloadLength == 0) ||
(*bParseDone)) { (*bParseDone)) {
...@@ -147,7 +147,7 @@ static UCHAR GetIpv6ProtocolPorts(UCHAR *pucPayload, USHORT *pusSrcPort, ...@@ -147,7 +147,7 @@ static UCHAR GetIpv6ProtocolPorts(UCHAR *pucPayload, USHORT *pusSrcPort,
BOOLEAN bDone = FALSE; BOOLEAN bDone = FALSE;
UCHAR ucHeaderType = 0; UCHAR ucHeaderType = 0;
UCHAR *pucNextHeader = NULL; UCHAR *pucNextHeader = NULL;
PMINI_ADAPTER Adapter = GET_BCM_ADAPTER(gblpnetdev); struct bcm_mini_adapter *Adapter = GET_BCM_ADAPTER(gblpnetdev);
if (!pucPayload || (usPayloadLength == 0)) if (!pucPayload || (usPayloadLength == 0))
return 0; return 0;
...@@ -177,10 +177,10 @@ static UCHAR GetIpv6ProtocolPorts(UCHAR *pucPayload, USHORT *pusSrcPort, ...@@ -177,10 +177,10 @@ static UCHAR GetIpv6ProtocolPorts(UCHAR *pucPayload, USHORT *pusSrcPort,
/* /*
* Arg 1 PMINI_ADAPTER Adapter is a pointer ot the driver contorl structure * Arg 1 struct bcm_mini_adapter *Adapter is a pointer ot the driver contorl structure
* Arg 2 PVOID pcIpHeader is a pointer to the IP header of the packet * Arg 2 PVOID pcIpHeader is a pointer to the IP header of the packet
*/ */
USHORT IpVersion6(PMINI_ADAPTER Adapter, PVOID pcIpHeader, USHORT IpVersion6(struct bcm_mini_adapter *Adapter, PVOID pcIpHeader,
struct bcm_classifier_rule *pstClassifierRule) struct bcm_classifier_rule *pstClassifierRule)
{ {
USHORT ushDestPort = 0; USHORT ushDestPort = 0;
...@@ -295,7 +295,7 @@ static BOOLEAN MatchSrcIpv6Address(struct bcm_classifier_rule *pstClassifierRule ...@@ -295,7 +295,7 @@ static BOOLEAN MatchSrcIpv6Address(struct bcm_classifier_rule *pstClassifierRule
UINT uiIpv6AddIndex = 0; UINT uiIpv6AddIndex = 0;
UINT uiIpv6AddrNoLongWords = 4; UINT uiIpv6AddrNoLongWords = 4;
ULONG aulSrcIP[4]; ULONG aulSrcIP[4];
PMINI_ADAPTER Adapter = GET_BCM_ADAPTER(gblpnetdev); struct bcm_mini_adapter *Adapter = GET_BCM_ADAPTER(gblpnetdev);
/* /*
* This is the no. of Src Addresses ie Range of IP Addresses contained * This is the no. of Src Addresses ie Range of IP Addresses contained
* in the classifier rule for which we need to match * in the classifier rule for which we need to match
...@@ -351,7 +351,7 @@ static BOOLEAN MatchDestIpv6Address(struct bcm_classifier_rule *pstClassifierRul ...@@ -351,7 +351,7 @@ static BOOLEAN MatchDestIpv6Address(struct bcm_classifier_rule *pstClassifierRul
UINT uiIpv6AddIndex = 0; UINT uiIpv6AddIndex = 0;
UINT uiIpv6AddrNoLongWords = 4; UINT uiIpv6AddrNoLongWords = 4;
ULONG aulDestIP[4]; ULONG aulDestIP[4];
PMINI_ADAPTER Adapter = GET_BCM_ADAPTER(gblpnetdev); struct bcm_mini_adapter *Adapter = GET_BCM_ADAPTER(gblpnetdev);
/* /*
* This is the no. of Destination Addresses * This is the no. of Destination Addresses
* ie Range of IP Addresses contained in the classifier rule * ie Range of IP Addresses contained in the classifier rule
...@@ -406,7 +406,7 @@ VOID DumpIpv6Address(ULONG *puIpv6Address) ...@@ -406,7 +406,7 @@ VOID DumpIpv6Address(ULONG *puIpv6Address)
{ {
UINT uiIpv6AddrNoLongWords = 4; UINT uiIpv6AddrNoLongWords = 4;
UINT uiIpv6AddIndex = 0; UINT uiIpv6AddIndex = 0;
PMINI_ADAPTER Adapter = GET_BCM_ADAPTER(gblpnetdev); struct bcm_mini_adapter *Adapter = GET_BCM_ADAPTER(gblpnetdev);
for (uiIpv6AddIndex = 0; uiIpv6AddIndex < uiIpv6AddrNoLongWords; uiIpv6AddIndex++) { for (uiIpv6AddIndex = 0; uiIpv6AddIndex < uiIpv6AddrNoLongWords; uiIpv6AddIndex++) {
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, IPV6_DBG, DBG_LVL_ALL, BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, IPV6_DBG, DBG_LVL_ALL,
":%lx", puIpv6Address[uiIpv6AddIndex]); ":%lx", puIpv6Address[uiIpv6AddIndex]);
...@@ -418,7 +418,7 @@ static VOID DumpIpv6Header(IPV6Header *pstIpv6Header) ...@@ -418,7 +418,7 @@ static VOID DumpIpv6Header(IPV6Header *pstIpv6Header)
{ {
UCHAR ucVersion; UCHAR ucVersion;
UCHAR ucPrio; UCHAR ucPrio;
PMINI_ADAPTER Adapter = GET_BCM_ADAPTER(gblpnetdev); struct bcm_mini_adapter *Adapter = GET_BCM_ADAPTER(gblpnetdev);
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, IPV6_DBG, DBG_LVL_ALL, BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, IPV6_DBG, DBG_LVL_ALL,
"----Ipv6 Header---"); "----Ipv6 Header---");
ucVersion = pstIpv6Header->ucVersionPrio & 0xf0; ucVersion = pstIpv6Header->ucVersionPrio & 0xf0;
......
...@@ -102,7 +102,7 @@ typedef enum _E_IPADDR_CONTEXT ...@@ -102,7 +102,7 @@ typedef enum _E_IPADDR_CONTEXT
//Function Prototypes //Function Prototypes
USHORT IpVersion6(PMINI_ADAPTER Adapter, /**< Pointer to the driver control structure */ USHORT IpVersion6(struct bcm_mini_adapter *Adapter, /**< Pointer to the driver control structure */
PVOID pcIpHeader, /**<Pointer to the IP Hdr of the packet*/ PVOID pcIpHeader, /**<Pointer to the IP Hdr of the packet*/
struct bcm_classifier_rule *pstClassifierRule ); struct bcm_classifier_rule *pstClassifierRule );
......
...@@ -85,7 +85,7 @@ typedef struct _S_INTERFACE_ADAPTER ...@@ -85,7 +85,7 @@ typedef struct _S_INTERFACE_ADAPTER
atomic_t uNumRcbUsed; atomic_t uNumRcbUsed;
atomic_t uCurrRcb; atomic_t uCurrRcb;
PMINI_ADAPTER psAdapter; struct bcm_mini_adapter *psAdapter;
BOOLEAN bFlashBoot; BOOLEAN bFlashBoot;
BOOLEAN bHighSpeedDevice ; BOOLEAN bHighSpeedDevice ;
......
...@@ -7,7 +7,7 @@ int InterfaceFileDownload(PVOID arg, struct file *flp, unsigned int on_chip_loc) ...@@ -7,7 +7,7 @@ int InterfaceFileDownload(PVOID arg, struct file *flp, unsigned int on_chip_loc)
int errno = 0, len = 0; /* ,is_config_file = 0 */ int errno = 0, len = 0; /* ,is_config_file = 0 */
loff_t pos = 0; loff_t pos = 0;
PS_INTERFACE_ADAPTER psIntfAdapter = (PS_INTERFACE_ADAPTER)arg; PS_INTERFACE_ADAPTER psIntfAdapter = (PS_INTERFACE_ADAPTER)arg;
/* PMINI_ADAPTER Adapter = psIntfAdapter->psAdapter; */ /* struct bcm_mini_adapter *Adapter = psIntfAdapter->psAdapter; */
char *buff = kmalloc(MAX_TRANSFER_CTRL_BYTE_USB, GFP_KERNEL); char *buff = kmalloc(MAX_TRANSFER_CTRL_BYTE_USB, GFP_KERNEL);
if (!buff) if (!buff)
...@@ -132,7 +132,7 @@ int InterfaceFileReadbackFromChip(PVOID arg, struct file *flp, unsigned int on_c ...@@ -132,7 +132,7 @@ int InterfaceFileReadbackFromChip(PVOID arg, struct file *flp, unsigned int on_c
return Status; return Status;
} }
static int bcm_download_config_file(PMINI_ADAPTER Adapter, struct bcm_firmware_info *psFwInfo) static int bcm_download_config_file(struct bcm_mini_adapter *Adapter, struct bcm_firmware_info *psFwInfo)
{ {
int retval = STATUS_SUCCESS; int retval = STATUS_SUCCESS;
B_UINT32 value = 0; B_UINT32 value = 0;
...@@ -208,7 +208,7 @@ static int bcm_download_config_file(PMINI_ADAPTER Adapter, struct bcm_firmware_i ...@@ -208,7 +208,7 @@ static int bcm_download_config_file(PMINI_ADAPTER Adapter, struct bcm_firmware_i
static int bcm_compare_buff_contents(unsigned char *readbackbuff, unsigned char *buff, unsigned int len) static int bcm_compare_buff_contents(unsigned char *readbackbuff, unsigned char *buff, unsigned int len)
{ {
int retval = STATUS_SUCCESS; int retval = STATUS_SUCCESS;
PMINI_ADAPTER Adapter = GET_BCM_ADAPTER(gblpnetdev); struct bcm_mini_adapter *Adapter = GET_BCM_ADAPTER(gblpnetdev);
if ((len-sizeof(unsigned int)) < 4) { if ((len-sizeof(unsigned int)) < 4) {
if (memcmp(readbackbuff , buff, len)) if (memcmp(readbackbuff , buff, len))
retval = -EINVAL; retval = -EINVAL;
...@@ -229,7 +229,7 @@ static int bcm_compare_buff_contents(unsigned char *readbackbuff, unsigned char ...@@ -229,7 +229,7 @@ static int bcm_compare_buff_contents(unsigned char *readbackbuff, unsigned char
return retval; return retval;
} }
int bcm_ioctl_fw_download(PMINI_ADAPTER Adapter, struct bcm_firmware_info *psFwInfo) int bcm_ioctl_fw_download(struct bcm_mini_adapter *Adapter, struct bcm_firmware_info *psFwInfo)
{ {
int retval = STATUS_SUCCESS; int retval = STATUS_SUCCESS;
PUCHAR buff = NULL; PUCHAR buff = NULL;
...@@ -278,7 +278,7 @@ int bcm_ioctl_fw_download(PMINI_ADAPTER Adapter, struct bcm_firmware_info *psFwI ...@@ -278,7 +278,7 @@ int bcm_ioctl_fw_download(PMINI_ADAPTER Adapter, struct bcm_firmware_info *psFwI
return retval; return retval;
} }
static INT buffDnld(PMINI_ADAPTER Adapter, PUCHAR mappedbuffer, UINT u32FirmwareLength, ULONG u32StartingAddress) static INT buffDnld(struct bcm_mini_adapter *Adapter, PUCHAR mappedbuffer, UINT u32FirmwareLength, ULONG u32StartingAddress)
{ {
unsigned int len = 0; unsigned int len = 0;
int retval = STATUS_SUCCESS; int retval = STATUS_SUCCESS;
...@@ -299,7 +299,7 @@ static INT buffDnld(PMINI_ADAPTER Adapter, PUCHAR mappedbuffer, UINT u32Firmware ...@@ -299,7 +299,7 @@ static INT buffDnld(PMINI_ADAPTER Adapter, PUCHAR mappedbuffer, UINT u32Firmware
return retval; return retval;
} }
static INT buffRdbkVerify(PMINI_ADAPTER Adapter, PUCHAR mappedbuffer, UINT u32FirmwareLength, ULONG u32StartingAddress) static INT buffRdbkVerify(struct bcm_mini_adapter *Adapter, PUCHAR mappedbuffer, UINT u32FirmwareLength, ULONG u32StartingAddress)
{ {
UINT len = u32FirmwareLength; UINT len = u32FirmwareLength;
INT retval = STATUS_SUCCESS; INT retval = STATUS_SUCCESS;
...@@ -334,7 +334,7 @@ static INT buffRdbkVerify(PMINI_ADAPTER Adapter, PUCHAR mappedbuffer, UINT u32Fi ...@@ -334,7 +334,7 @@ static INT buffRdbkVerify(PMINI_ADAPTER Adapter, PUCHAR mappedbuffer, UINT u32Fi
return retval; return retval;
} }
INT buffDnldVerify(PMINI_ADAPTER Adapter, unsigned char *mappedbuffer, unsigned int u32FirmwareLength, unsigned long u32StartingAddress) INT buffDnldVerify(struct bcm_mini_adapter *Adapter, unsigned char *mappedbuffer, unsigned int u32FirmwareLength, unsigned long u32StartingAddress)
{ {
INT status = STATUS_SUCCESS; INT status = STATUS_SUCCESS;
......
...@@ -7,7 +7,7 @@ Description: This is the hardware specific Function for waking up HW device fr ...@@ -7,7 +7,7 @@ Description: This is the hardware specific Function for waking up HW device fr
A software abort pattern is written to the device to wake it and necessary power state A software abort pattern is written to the device to wake it and necessary power state
transitions from host are performed here. transitions from host are performed here.
Input parameters: IN PMINI_ADAPTER Adapter - Miniport Adapter Context Input parameters: IN struct bcm_mini_adapter *Adapter - Miniport Adapter Context
Return: BCM_STATUS_SUCCESS - If Wakeup of the HW Interface was successful. Return: BCM_STATUS_SUCCESS - If Wakeup of the HW Interface was successful.
...@@ -22,7 +22,7 @@ Description: This is the hardware specific Function for responding to Idle mod ...@@ -22,7 +22,7 @@ Description: This is the hardware specific Function for responding to Idle mod
Necessary power state transitions from host for idle mode or other device specific Necessary power state transitions from host for idle mode or other device specific
initializations are performed here. initializations are performed here.
Input parameters: IN PMINI_ADAPTER Adapter - Miniport Adapter Context Input parameters: IN struct bcm_mini_adapter * Adapter - Miniport Adapter Context
Return: BCM_STATUS_SUCCESS - If Idle mode response related HW configuration was successful. Return: BCM_STATUS_SUCCESS - If Idle mode response related HW configuration was successful.
...@@ -42,7 +42,7 @@ send to f/w with in 200 ms after the Idle/Shutdown req issued ...@@ -42,7 +42,7 @@ send to f/w with in 200 ms after the Idle/Shutdown req issued
*/ */
int InterfaceIdleModeRespond(PMINI_ADAPTER Adapter, unsigned int* puiBuffer) int InterfaceIdleModeRespond(struct bcm_mini_adapter *Adapter, unsigned int* puiBuffer)
{ {
int status = STATUS_SUCCESS; int status = STATUS_SUCCESS;
unsigned int uiRegRead = 0; unsigned int uiRegRead = 0;
...@@ -147,7 +147,7 @@ int InterfaceIdleModeRespond(PMINI_ADAPTER Adapter, unsigned int* puiBuffer) ...@@ -147,7 +147,7 @@ int InterfaceIdleModeRespond(PMINI_ADAPTER Adapter, unsigned int* puiBuffer)
return status; return status;
} }
static int InterfaceAbortIdlemode(PMINI_ADAPTER Adapter, unsigned int Pattern) static int InterfaceAbortIdlemode(struct bcm_mini_adapter *Adapter, unsigned int Pattern)
{ {
int status = STATUS_SUCCESS; int status = STATUS_SUCCESS;
unsigned int value; unsigned int value;
...@@ -246,7 +246,7 @@ static int InterfaceAbortIdlemode(PMINI_ADAPTER Adapter, unsigned int Pattern) ...@@ -246,7 +246,7 @@ static int InterfaceAbortIdlemode(PMINI_ADAPTER Adapter, unsigned int Pattern)
} }
return status; return status;
} }
int InterfaceIdleModeWakeup(PMINI_ADAPTER Adapter) int InterfaceIdleModeWakeup(struct bcm_mini_adapter *Adapter)
{ {
ULONG Status = 0; ULONG Status = 0;
if(Adapter->bTriedToWakeUpFromlowPowerMode) if(Adapter->bTriedToWakeUpFromlowPowerMode)
...@@ -263,7 +263,7 @@ int InterfaceIdleModeWakeup(PMINI_ADAPTER Adapter) ...@@ -263,7 +263,7 @@ int InterfaceIdleModeWakeup(PMINI_ADAPTER Adapter)
return Status; return Status;
} }
void InterfaceHandleShutdownModeWakeup(PMINI_ADAPTER Adapter) void InterfaceHandleShutdownModeWakeup(struct bcm_mini_adapter *Adapter)
{ {
unsigned int uiRegVal = 0; unsigned int uiRegVal = 0;
INT Status = 0; INT Status = 0;
......
#ifndef _INTERFACE_IDLEMODE_H #ifndef _INTERFACE_IDLEMODE_H
#define _INTERFACE_IDLEMODE_H #define _INTERFACE_IDLEMODE_H
INT InterfaceIdleModeWakeup(PMINI_ADAPTER Adapter); INT InterfaceIdleModeWakeup(struct bcm_mini_adapter *Adapter);
INT InterfaceIdleModeRespond(PMINI_ADAPTER Adapter, unsigned int *puiBuffer); INT InterfaceIdleModeRespond(struct bcm_mini_adapter *Adapter, unsigned int *puiBuffer);
VOID InterfaceWriteIdleModeWakePattern(PMINI_ADAPTER Adapter); VOID InterfaceWriteIdleModeWakePattern(struct bcm_mini_adapter *Adapter);
INT InterfaceWakeUp(PMINI_ADAPTER Adapter); INT InterfaceWakeUp(struct bcm_mini_adapter * Adapter);
VOID InterfaceHandleShutdownModeWakeup(PMINI_ADAPTER Adapter); VOID InterfaceHandleShutdownModeWakeup(struct bcm_mini_adapter *Adapter);
#endif #endif
...@@ -65,7 +65,7 @@ static void InterfaceAdapterFree(PS_INTERFACE_ADAPTER psIntfAdapter) ...@@ -65,7 +65,7 @@ static void InterfaceAdapterFree(PS_INTERFACE_ADAPTER psIntfAdapter)
AdapterFree(psIntfAdapter->psAdapter); AdapterFree(psIntfAdapter->psAdapter);
} }
static void ConfigureEndPointTypesThroughEEPROM(PMINI_ADAPTER Adapter) static void ConfigureEndPointTypesThroughEEPROM(struct bcm_mini_adapter *Adapter)
{ {
unsigned long ulReg = 0; unsigned long ulReg = 0;
int bytes; int bytes;
...@@ -143,12 +143,12 @@ static int usbbcm_device_probe(struct usb_interface *intf, const struct usb_devi ...@@ -143,12 +143,12 @@ static int usbbcm_device_probe(struct usb_interface *intf, const struct usb_devi
{ {
struct usb_device *udev = interface_to_usbdev(intf); struct usb_device *udev = interface_to_usbdev(intf);
int retval; int retval;
PMINI_ADAPTER psAdapter; struct bcm_mini_adapter *psAdapter;
PS_INTERFACE_ADAPTER psIntfAdapter; PS_INTERFACE_ADAPTER psIntfAdapter;
struct net_device *ndev; struct net_device *ndev;
/* Reserve one extra queue for the bit-bucket */ /* Reserve one extra queue for the bit-bucket */
ndev = alloc_etherdev_mq(sizeof(MINI_ADAPTER), NO_OF_QUEUES+1); ndev = alloc_etherdev_mq(sizeof(struct bcm_mini_adapter), NO_OF_QUEUES+1);
if (ndev == NULL) { if (ndev == NULL) {
dev_err(&udev->dev, DRV_NAME ": no memory for device\n"); dev_err(&udev->dev, DRV_NAME ": no memory for device\n");
return -ENOMEM; return -ENOMEM;
...@@ -257,7 +257,7 @@ static int usbbcm_device_probe(struct usb_interface *intf, const struct usb_devi ...@@ -257,7 +257,7 @@ static int usbbcm_device_probe(struct usb_interface *intf, const struct usb_devi
static void usbbcm_disconnect(struct usb_interface *intf) static void usbbcm_disconnect(struct usb_interface *intf)
{ {
PS_INTERFACE_ADAPTER psIntfAdapter = usb_get_intfdata(intf); PS_INTERFACE_ADAPTER psIntfAdapter = usb_get_intfdata(intf);
PMINI_ADAPTER psAdapter; struct bcm_mini_adapter *psAdapter;
struct usb_device *udev = interface_to_usbdev(intf); struct usb_device *udev = interface_to_usbdev(intf);
if (psIntfAdapter == NULL) if (psIntfAdapter == NULL)
......
...@@ -5,7 +5,7 @@ static void read_int_callback(struct urb *urb/*, struct pt_regs *regs*/) ...@@ -5,7 +5,7 @@ static void read_int_callback(struct urb *urb/*, struct pt_regs *regs*/)
{ {
int status = urb->status; int status = urb->status;
PS_INTERFACE_ADAPTER psIntfAdapter = (PS_INTERFACE_ADAPTER)urb->context; PS_INTERFACE_ADAPTER psIntfAdapter = (PS_INTERFACE_ADAPTER)urb->context;
PMINI_ADAPTER Adapter = psIntfAdapter->psAdapter ; struct bcm_mini_adapter *Adapter = psIntfAdapter->psAdapter ;
if (netif_msg_intr(Adapter)) if (netif_msg_intr(Adapter))
pr_info(PFX "%s: interrupt status %d\n", pr_info(PFX "%s: interrupt status %d\n",
......
...@@ -7,9 +7,9 @@ int CreateInterruptUrb(PS_INTERFACE_ADAPTER psIntfAdapter); ...@@ -7,9 +7,9 @@ int CreateInterruptUrb(PS_INTERFACE_ADAPTER psIntfAdapter);
INT StartInterruptUrb(PS_INTERFACE_ADAPTER psIntfAdapter); INT StartInterruptUrb(PS_INTERFACE_ADAPTER psIntfAdapter);
VOID InterfaceEnableInterrupt(PMINI_ADAPTER Adapter); VOID InterfaceEnableInterrupt(struct bcm_mini_adapter *Adapter);
VOID InterfaceDisableInterrupt(PMINI_ADAPTER Adapter); VOID InterfaceDisableInterrupt(struct bcm_mini_adapter *Adapter);
#endif #endif
...@@ -133,7 +133,7 @@ INT BcmWRM(PVOID arg, ...@@ -133,7 +133,7 @@ INT BcmWRM(PVOID arg,
return InterfaceWRM((PS_INTERFACE_ADAPTER)arg, addr, buff, len); return InterfaceWRM((PS_INTERFACE_ADAPTER)arg, addr, buff, len);
} }
INT Bcm_clear_halt_of_endpoints(PMINI_ADAPTER Adapter) INT Bcm_clear_halt_of_endpoints(struct bcm_mini_adapter *Adapter)
{ {
PS_INTERFACE_ADAPTER psIntfAdapter = (PS_INTERFACE_ADAPTER)(Adapter->pvInterfaceAdapter); PS_INTERFACE_ADAPTER psIntfAdapter = (PS_INTERFACE_ADAPTER)(Adapter->pvInterfaceAdapter);
INT status = STATUS_SUCCESS; INT status = STATUS_SUCCESS;
......
...@@ -33,7 +33,7 @@ int BcmWRM(PVOID arg, ...@@ -33,7 +33,7 @@ int BcmWRM(PVOID arg,
PVOID buff, PVOID buff,
INT len); INT len);
INT Bcm_clear_halt_of_endpoints(PMINI_ADAPTER Adapter); INT Bcm_clear_halt_of_endpoints(struct bcm_mini_adapter *Adapter);
VOID Bcm_kill_all_URBs(PS_INTERFACE_ADAPTER psIntfAdapter); VOID Bcm_kill_all_URBs(PS_INTERFACE_ADAPTER psIntfAdapter);
......
#include "headers.h" #include "headers.h"
static int SearchVcid(PMINI_ADAPTER Adapter,unsigned short usVcid) static int SearchVcid(struct bcm_mini_adapter *Adapter,unsigned short usVcid)
{ {
int iIndex=0; int iIndex=0;
...@@ -45,7 +45,7 @@ static void read_bulk_callback(struct urb *urb) ...@@ -45,7 +45,7 @@ static void read_bulk_callback(struct urb *urb)
//int idleflag = 0 ; //int idleflag = 0 ;
PUSB_RCB pRcb = (PUSB_RCB)urb->context; PUSB_RCB pRcb = (PUSB_RCB)urb->context;
PS_INTERFACE_ADAPTER psIntfAdapter = pRcb->psIntfAdapter; PS_INTERFACE_ADAPTER psIntfAdapter = pRcb->psIntfAdapter;
PMINI_ADAPTER Adapter = psIntfAdapter->psAdapter; struct bcm_mini_adapter *Adapter = psIntfAdapter->psAdapter;
struct bcm_leader *pLeader = urb->transfer_buffer; struct bcm_leader *pLeader = urb->transfer_buffer;
if (unlikely(netif_msg_rx_status(Adapter))) if (unlikely(netif_msg_rx_status(Adapter)))
...@@ -232,7 +232,7 @@ Function: InterfaceRx ...@@ -232,7 +232,7 @@ Function: InterfaceRx
Description: This is the hardware specific Function for Receiving Description: This is the hardware specific Function for Receiving
data packet/control packets from the device. data packet/control packets from the device.
Input parameters: IN PMINI_ADAPTER Adapter - Miniport Adapter Context Input parameters: IN struct bcm_mini_adapter *Adapter - Miniport Adapter Context
......
...@@ -6,9 +6,9 @@ static void write_bulk_callback(struct urb *urb/*, struct pt_regs *regs*/) ...@@ -6,9 +6,9 @@ static void write_bulk_callback(struct urb *urb/*, struct pt_regs *regs*/)
PUSB_TCB pTcb= (PUSB_TCB)urb->context; PUSB_TCB pTcb= (PUSB_TCB)urb->context;
PS_INTERFACE_ADAPTER psIntfAdapter = pTcb->psIntfAdapter; PS_INTERFACE_ADAPTER psIntfAdapter = pTcb->psIntfAdapter;
struct bcm_link_request *pControlMsg = (struct bcm_link_request *)urb->transfer_buffer; struct bcm_link_request *pControlMsg = (struct bcm_link_request *)urb->transfer_buffer;
PMINI_ADAPTER psAdapter = psIntfAdapter->psAdapter ; struct bcm_mini_adapter *psAdapter = psIntfAdapter->psAdapter ;
BOOLEAN bpowerDownMsg = FALSE ; BOOLEAN bpowerDownMsg = FALSE ;
PMINI_ADAPTER Adapter = GET_BCM_ADAPTER(gblpnetdev); struct bcm_mini_adapter *Adapter = GET_BCM_ADAPTER(gblpnetdev);
if (unlikely(netif_msg_tx_done(Adapter))) if (unlikely(netif_msg_tx_done(Adapter)))
pr_info(PFX "%s: transmit status %d\n", Adapter->dev->name, urb->status); pr_info(PFX "%s: transmit status %d\n", Adapter->dev->name, urb->status);
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
* Returns - None * Returns - None
**********************************************************************/ **********************************************************************/
static VOID UpdateTokenCount(register PMINI_ADAPTER Adapter) static VOID UpdateTokenCount(register struct bcm_mini_adapter *Adapter)
{ {
ULONG liCurrentTime; ULONG liCurrentTime;
INT i = 0; INT i = 0;
...@@ -75,7 +75,7 @@ static VOID UpdateTokenCount(register PMINI_ADAPTER Adapter) ...@@ -75,7 +75,7 @@ static VOID UpdateTokenCount(register PMINI_ADAPTER Adapter)
* Returns - The number of bytes allowed for transmission. * Returns - The number of bytes allowed for transmission.
* *
***********************************************************************/ ***********************************************************************/
static ULONG GetSFTokenCount(PMINI_ADAPTER Adapter, struct bcm_packet_info *psSF) static ULONG GetSFTokenCount(struct bcm_mini_adapter *Adapter, struct bcm_packet_info *psSF)
{ {
BCM_DEBUG_PRINT(Adapter,DBG_TYPE_TX, TOKEN_COUNTS, DBG_LVL_ALL, "IsPacketAllowedForFlow ===>"); BCM_DEBUG_PRINT(Adapter,DBG_TYPE_TX, TOKEN_COUNTS, DBG_LVL_ALL, "IsPacketAllowedForFlow ===>");
/* Validate the parameters */ /* Validate the parameters */
...@@ -112,7 +112,7 @@ static ULONG GetSFTokenCount(PMINI_ADAPTER Adapter, struct bcm_packet_info *psSF ...@@ -112,7 +112,7 @@ static ULONG GetSFTokenCount(PMINI_ADAPTER Adapter, struct bcm_packet_info *psSF
This function despatches packet from the specified queue. This function despatches packet from the specified queue.
@return Zero(success) or Negative value(failure) @return Zero(success) or Negative value(failure)
*/ */
static INT SendPacketFromQueue(PMINI_ADAPTER Adapter,/**<Logical Adapter*/ static INT SendPacketFromQueue(struct bcm_mini_adapter *Adapter,/**<Logical Adapter*/
struct bcm_packet_info *psSF, /**<Queue identifier*/ struct bcm_packet_info *psSF, /**<Queue identifier*/
struct sk_buff* Packet) /**<Pointer to the packet to be sent*/ struct sk_buff* Packet) /**<Pointer to the packet to be sent*/
{ {
...@@ -156,7 +156,7 @@ static INT SendPacketFromQueue(PMINI_ADAPTER Adapter,/**<Logical Adapter*/ ...@@ -156,7 +156,7 @@ static INT SendPacketFromQueue(PMINI_ADAPTER Adapter,/**<Logical Adapter*/
* Returns - None. * Returns - None.
* *
****************************************************************************/ ****************************************************************************/
static VOID CheckAndSendPacketFromIndex(PMINI_ADAPTER Adapter, struct bcm_packet_info *psSF) static VOID CheckAndSendPacketFromIndex(struct bcm_mini_adapter *Adapter, struct bcm_packet_info *psSF)
{ {
struct sk_buff *QueuePacket=NULL; struct sk_buff *QueuePacket=NULL;
char *pControlPacket = NULL; char *pControlPacket = NULL;
...@@ -273,7 +273,7 @@ static VOID CheckAndSendPacketFromIndex(PMINI_ADAPTER Adapter, struct bcm_packet ...@@ -273,7 +273,7 @@ static VOID CheckAndSendPacketFromIndex(PMINI_ADAPTER Adapter, struct bcm_packet
* *
* Returns - None. * Returns - None.
********************************************************************/ ********************************************************************/
VOID transmit_packets(PMINI_ADAPTER Adapter) VOID transmit_packets(struct bcm_mini_adapter *Adapter)
{ {
UINT uiPrevTotalCount = 0; UINT uiPrevTotalCount = 0;
int iIndex = 0; int iIndex = 0;
......
#include "headers.h" #include "headers.h"
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);
static VOID doPowerAutoCorrection(PMINI_ADAPTER psAdapter); static VOID doPowerAutoCorrection(struct bcm_mini_adapter *psAdapter);
static void HandleShutDownModeRequest(PMINI_ADAPTER Adapter, PUCHAR pucBuffer); static void HandleShutDownModeRequest(struct bcm_mini_adapter *Adapter, PUCHAR pucBuffer);
static int bcm_parse_target_params(PMINI_ADAPTER Adapter); static int bcm_parse_target_params(struct bcm_mini_adapter *Adapter);
static void beceem_protocol_reset(PMINI_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; UINT uiLoopIndex;
...@@ -24,7 +24,7 @@ static VOID default_wimax_protocol_initialize(PMINI_ADAPTER Adapter) ...@@ -24,7 +24,7 @@ static VOID default_wimax_protocol_initialize(PMINI_ADAPTER Adapter)
return; return;
} }
INT InitAdapter(PMINI_ADAPTER psAdapter) INT InitAdapter(struct bcm_mini_adapter *psAdapter)
{ {
int i = 0; int i = 0;
INT Status = STATUS_SUCCESS; INT Status = STATUS_SUCCESS;
...@@ -93,7 +93,7 @@ INT InitAdapter(PMINI_ADAPTER psAdapter) ...@@ -93,7 +93,7 @@ INT InitAdapter(PMINI_ADAPTER psAdapter)
return STATUS_SUCCESS; return STATUS_SUCCESS;
} }
VOID AdapterFree(PMINI_ADAPTER Adapter) VOID AdapterFree(struct bcm_mini_adapter *Adapter)
{ {
int count; int count;
beceem_protocol_reset(Adapter); beceem_protocol_reset(Adapter);
...@@ -134,7 +134,7 @@ VOID AdapterFree(PMINI_ADAPTER Adapter) ...@@ -134,7 +134,7 @@ VOID AdapterFree(PMINI_ADAPTER Adapter)
free_netdev(Adapter->dev); 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 */ /* Rx Control Packets Processing */
psAdapter->control_packet_handler = kthread_run((int (*)(void *)) psAdapter->control_packet_handler = kthread_run((int (*)(void *))
...@@ -155,7 +155,7 @@ static int create_worker_threads(PMINI_ADAPTER psAdapter) ...@@ -155,7 +155,7 @@ static int create_worker_threads(PMINI_ADAPTER psAdapter)
return 0; 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 = NULL; struct file *flp = NULL;
mm_segment_t oldfs; mm_segment_t oldfs;
...@@ -179,7 +179,7 @@ static struct file *open_firmware_file(PMINI_ADAPTER Adapter, const char *path) ...@@ -179,7 +179,7 @@ static struct file *open_firmware_file(PMINI_ADAPTER Adapter, const char *path)
* Path to image file * Path to image file
* Download Address on the chip * 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; int errorno = 0;
struct file *flp = NULL; struct file *flp = NULL;
...@@ -231,7 +231,7 @@ static int BcmFileDownload(PMINI_ADAPTER Adapter, const char *path, unsigned int ...@@ -231,7 +231,7 @@ static int BcmFileDownload(PMINI_ADAPTER Adapter, const char *path, unsigned int
* Logical Adapter * Logical Adapter
* Control Packet Buffer * Control Packet Buffer
*/ */
INT CopyBufferToControlPacket(PMINI_ADAPTER Adapter, PVOID ioBuffer) INT CopyBufferToControlPacket(struct bcm_mini_adapter *Adapter, PVOID ioBuffer)
{ {
struct bcm_leader *pLeader = NULL; struct bcm_leader *pLeader = NULL;
INT Status = 0; INT Status = 0;
...@@ -414,7 +414,7 @@ INT CopyBufferToControlPacket(PMINI_ADAPTER Adapter, PVOID ioBuffer) ...@@ -414,7 +414,7 @@ INT CopyBufferToControlPacket(PMINI_ADAPTER Adapter, PVOID ioBuffer)
* *
* Returns - None. * Returns - None.
*****************************************************************/ *****************************************************************/
static VOID SendStatisticsPointerRequest(PMINI_ADAPTER Adapter, struct bcm_link_request *pstStatisticsPtrRequest) static VOID SendStatisticsPointerRequest(struct bcm_mini_adapter *Adapter, struct bcm_link_request *pstStatisticsPtrRequest)
{ {
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_RX, RX_DPC, DBG_LVL_ALL, "======>"); BCM_DEBUG_PRINT(Adapter, DBG_TYPE_RX, RX_DPC, DBG_LVL_ALL, "======>");
pstStatisticsPtrRequest->Leader.Status = STATS_POINTER_REQ_STATUS; pstStatisticsPtrRequest->Leader.Status = STATS_POINTER_REQ_STATUS;
...@@ -436,7 +436,7 @@ static VOID SendStatisticsPointerRequest(PMINI_ADAPTER Adapter, struct bcm_link_ ...@@ -436,7 +436,7 @@ static VOID SendStatisticsPointerRequest(PMINI_ADAPTER Adapter, struct bcm_link_
* *
* Returns - None. * Returns - None.
*******************************************************************/ *******************************************************************/
VOID LinkMessage(PMINI_ADAPTER Adapter) VOID LinkMessage(struct bcm_mini_adapter *Adapter)
{ {
struct bcm_link_request *pstLinkRequest = NULL; struct bcm_link_request *pstLinkRequest = NULL;
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, LINK_UP_MSG, DBG_LVL_ALL, "=====>"); BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, LINK_UP_MSG, DBG_LVL_ALL, "=====>");
...@@ -487,7 +487,7 @@ VOID LinkMessage(PMINI_ADAPTER Adapter) ...@@ -487,7 +487,7 @@ VOID LinkMessage(PMINI_ADAPTER Adapter)
* *
* Returns - None. * 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__); BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, DUMP_INFO, DBG_LVL_ALL, "%s====>", __func__);
Adapter->StatisticsPointer = ntohl(*(__be32 *)pvBuffer); Adapter->StatisticsPointer = ntohl(*(__be32 *)pvBuffer);
...@@ -506,7 +506,7 @@ VOID StatisticsResponse(PMINI_ADAPTER Adapter, PVOID pvBuffer) ...@@ -506,7 +506,7 @@ VOID StatisticsResponse(PMINI_ADAPTER Adapter, PVOID pvBuffer)
* *
* Returns - None. * 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, "=====>"); BCM_DEBUG_PRINT(Adapter, DBG_TYPE_RX, RX_DPC, DBG_LVL_ALL, "=====>");
...@@ -580,7 +580,7 @@ VOID LinkControlResponseMessage(PMINI_ADAPTER Adapter, PUCHAR pucBuffer) ...@@ -580,7 +580,7 @@ VOID LinkControlResponseMessage(PMINI_ADAPTER Adapter, PUCHAR pucBuffer)
return; return;
} }
void SendIdleModeResponse(PMINI_ADAPTER Adapter) void SendIdleModeResponse(struct bcm_mini_adapter *Adapter)
{ {
INT status = 0, NVMAccess = 0, lowPwrAbortMsg = 0; INT status = 0, NVMAccess = 0, lowPwrAbortMsg = 0;
struct timeval tv; struct timeval tv;
...@@ -679,7 +679,7 @@ void SendIdleModeResponse(PMINI_ADAPTER Adapter) ...@@ -679,7 +679,7 @@ void SendIdleModeResponse(PMINI_ADAPTER Adapter)
* *
* Returns - None. * Returns - None.
*******************************************************************/ *******************************************************************/
VOID DumpPackInfo(PMINI_ADAPTER Adapter) VOID DumpPackInfo(struct bcm_mini_adapter *Adapter)
{ {
UINT uiLoopIndex = 0; UINT uiLoopIndex = 0;
UINT uiIndex = 0; UINT uiIndex = 0;
...@@ -808,10 +808,10 @@ VOID DumpPackInfo(PMINI_ADAPTER Adapter) ...@@ -808,10 +808,10 @@ VOID DumpPackInfo(PMINI_ADAPTER Adapter)
return; return;
} }
int reset_card_proc(PMINI_ADAPTER ps_adapter) int reset_card_proc(struct bcm_mini_adapter *ps_adapter)
{ {
int retval = STATUS_SUCCESS; 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; PS_INTERFACE_ADAPTER psIntfAdapter = NULL;
unsigned int value = 0, uiResetValue = 0; unsigned int value = 0, uiResetValue = 0;
int bytes; int bytes;
...@@ -926,7 +926,7 @@ int reset_card_proc(PMINI_ADAPTER ps_adapter) ...@@ -926,7 +926,7 @@ int reset_card_proc(PMINI_ADAPTER ps_adapter)
return retval; 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 status = STATUS_SUCCESS;
int bytes; int bytes;
...@@ -953,7 +953,7 @@ int run_card_proc(PMINI_ADAPTER ps_adapter) ...@@ -953,7 +953,7 @@ int run_card_proc(PMINI_ADAPTER ps_adapter)
return status; return status;
} }
int InitCardAndDownloadFirmware(PMINI_ADAPTER ps_adapter) int InitCardAndDownloadFirmware(struct bcm_mini_adapter *ps_adapter)
{ {
int status; int status;
UINT value = 0; UINT value = 0;
...@@ -1077,7 +1077,7 @@ int InitCardAndDownloadFirmware(PMINI_ADAPTER ps_adapter) ...@@ -1077,7 +1077,7 @@ int InitCardAndDownloadFirmware(PMINI_ADAPTER ps_adapter)
return status; 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; struct file *flp = NULL;
mm_segment_t oldfs = {0}; mm_segment_t oldfs = {0};
...@@ -1128,7 +1128,7 @@ static int bcm_parse_target_params(PMINI_ADAPTER Adapter) ...@@ -1128,7 +1128,7 @@ static int bcm_parse_target_params(PMINI_ADAPTER Adapter)
return STATUS_SUCCESS; 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; UINT uiHostDrvrCfg6 = 0, uiEEPROMFlag = 0;
...@@ -1186,7 +1186,7 @@ void beceem_parse_target_struct(PMINI_ADAPTER Adapter) ...@@ -1186,7 +1186,7 @@ void beceem_parse_target_struct(PMINI_ADAPTER Adapter)
doPowerAutoCorrection(Adapter); doPowerAutoCorrection(Adapter);
} }
static VOID doPowerAutoCorrection(PMINI_ADAPTER psAdapter) static VOID doPowerAutoCorrection(struct bcm_mini_adapter *psAdapter)
{ {
UINT reporting_mode; UINT reporting_mode;
...@@ -1218,7 +1218,7 @@ static VOID doPowerAutoCorrection(PMINI_ADAPTER psAdapter) ...@@ -1218,7 +1218,7 @@ static VOID doPowerAutoCorrection(PMINI_ADAPTER psAdapter)
} }
#if 0 #if 0
static unsigned char *ReadMacAddrEEPROM(PMINI_ADAPTER Adapter, ulong dwAddress) static unsigned char *ReadMacAddrEEPROM(struct bcm_mini_adapter *Adapter, ulong dwAddress)
{ {
int status = 0, i = 0; int status = 0, i = 0;
unsigned int temp = 0; unsigned int temp = 0;
...@@ -1272,13 +1272,13 @@ static void convertEndian(B_UINT8 rwFlag, PUINT puiBuffer, UINT uiByteCount) ...@@ -1272,13 +1272,13 @@ static void convertEndian(B_UINT8 rwFlag, PUINT puiBuffer, UINT uiByteCount)
#define CACHE_ADDRESS_MASK 0x80000000 #define CACHE_ADDRESS_MASK 0x80000000
#define UNCACHE_ADDRESS_MASK 0xa0000000 #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, return Adapter->interface_rdm(Adapter->pvInterfaceAdapter,
uiAddress, pucBuff, sSize); 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; int iRetVal;
...@@ -1287,13 +1287,13 @@ int wrm(PMINI_ADAPTER Adapter, UINT uiAddress, PCHAR pucBuff, size_t sSize) ...@@ -1287,13 +1287,13 @@ int wrm(PMINI_ADAPTER Adapter, UINT uiAddress, PCHAR pucBuff, size_t sSize)
return iRetVal; 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); convertEndian(RWM_WRITE, pucBuff, size);
return wrm(Adapter, uiAddress, (PUCHAR)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; INT uiRetVal = 0;
...@@ -1303,7 +1303,7 @@ int rdmalt(PMINI_ADAPTER Adapter, UINT uiAddress, PUINT pucBuff, size_t size) ...@@ -1303,7 +1303,7 @@ int rdmalt(PMINI_ADAPTER Adapter, UINT uiAddress, PUINT pucBuff, size_t size)
return uiRetVal; 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; INT status = STATUS_SUCCESS;
down(&Adapter->rdmwrmsync); down(&Adapter->rdmwrmsync);
...@@ -1322,7 +1322,7 @@ int wrmWithLock(PMINI_ADAPTER Adapter, UINT uiAddress, PCHAR pucBuff, size_t sSi ...@@ -1322,7 +1322,7 @@ int wrmWithLock(PMINI_ADAPTER Adapter, UINT uiAddress, PCHAR pucBuff, size_t sSi
return status; 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; int iRetVal = STATUS_SUCCESS;
...@@ -1342,7 +1342,7 @@ int wrmaltWithLock(PMINI_ADAPTER Adapter, UINT uiAddress, PUINT pucBuff, size_t ...@@ -1342,7 +1342,7 @@ int wrmaltWithLock(PMINI_ADAPTER Adapter, UINT uiAddress, PUINT pucBuff, size_t
return iRetVal; 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; INT uiRetVal = STATUS_SUCCESS;
...@@ -1361,7 +1361,7 @@ int rdmaltWithLock(PMINI_ADAPTER Adapter, UINT uiAddress, PUINT pucBuff, size_t ...@@ -1361,7 +1361,7 @@ int rdmaltWithLock(PMINI_ADAPTER Adapter, UINT uiAddress, PUINT pucBuff, size_t
return uiRetVal; return uiRetVal;
} }
static VOID HandleShutDownModeWakeup(PMINI_ADAPTER Adapter) static VOID HandleShutDownModeWakeup(struct bcm_mini_adapter *Adapter)
{ {
int clear_abort_pattern = 0, Status = 0; int clear_abort_pattern = 0, Status = 0;
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, MP_SHUTDOWN, DBG_LVL_ALL, "====>\n"); BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, MP_SHUTDOWN, DBG_LVL_ALL, "====>\n");
...@@ -1390,7 +1390,7 @@ static VOID HandleShutDownModeWakeup(PMINI_ADAPTER Adapter) ...@@ -1390,7 +1390,7 @@ static VOID HandleShutDownModeWakeup(PMINI_ADAPTER Adapter)
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, MP_SHUTDOWN, DBG_LVL_ALL, "<====\n"); 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)
{ {
struct bcm_link_request stShutdownResponse; struct bcm_link_request stShutdownResponse;
UINT NVMAccess = 0, lowPwrAbortMsg = 0; UINT NVMAccess = 0, lowPwrAbortMsg = 0;
...@@ -1474,7 +1474,7 @@ static VOID SendShutModeResponse(PMINI_ADAPTER Adapter) ...@@ -1474,7 +1474,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; B_UINT32 uiResetValue = 0;
...@@ -1503,7 +1503,7 @@ static void HandleShutDownModeRequest(PMINI_ADAPTER Adapter, PUCHAR pucBuffer) ...@@ -1503,7 +1503,7 @@ static void HandleShutDownModeRequest(PMINI_ADAPTER Adapter, PUCHAR pucBuffer)
return; return;
} }
VOID ResetCounters(PMINI_ADAPTER Adapter) VOID ResetCounters(struct bcm_mini_adapter *Adapter)
{ {
beceem_protocol_reset(Adapter); beceem_protocol_reset(Adapter);
Adapter->CurrNumRecvDescs = 0; Adapter->CurrNumRecvDescs = 0;
...@@ -1519,7 +1519,7 @@ VOID ResetCounters(PMINI_ADAPTER Adapter) ...@@ -1519,7 +1519,7 @@ VOID ResetCounters(PMINI_ADAPTER Adapter)
Adapter->bShutStatus = FALSE; Adapter->bShutStatus = FALSE;
} }
struct bcm_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; UINT uiIndex = 0;
for (uiIndex = 0; uiIndex < MAX_FRAGMENTEDIP_CLASSIFICATION_ENTRIES; uiIndex++) { for (uiIndex = 0; uiIndex < MAX_FRAGMENTEDIP_CLASSIFICATION_ENTRIES; uiIndex++) {
...@@ -1533,7 +1533,7 @@ struct bcm_classifier_rule *GetFragIPClsEntry(PMINI_ADAPTER Adapter, USHORT usIp ...@@ -1533,7 +1533,7 @@ struct bcm_classifier_rule *GetFragIPClsEntry(PMINI_ADAPTER Adapter, USHORT usIp
return NULL; return NULL;
} }
void AddFragIPClsEntry(PMINI_ADAPTER Adapter, struct bcm_fragmented_packet_info *psFragPktInfo) void AddFragIPClsEntry(struct bcm_mini_adapter *Adapter, struct bcm_fragmented_packet_info *psFragPktInfo)
{ {
UINT uiIndex = 0; UINT uiIndex = 0;
for (uiIndex = 0; uiIndex < MAX_FRAGMENTEDIP_CLASSIFICATION_ENTRIES; uiIndex++) { for (uiIndex = 0; uiIndex < MAX_FRAGMENTEDIP_CLASSIFICATION_ENTRIES; uiIndex++) {
...@@ -1544,7 +1544,7 @@ void AddFragIPClsEntry(PMINI_ADAPTER Adapter, struct bcm_fragmented_packet_info ...@@ -1544,7 +1544,7 @@ void AddFragIPClsEntry(PMINI_ADAPTER Adapter, struct bcm_fragmented_packet_info
} }
} }
void DelFragIPClsEntry(PMINI_ADAPTER Adapter, USHORT usIpIdentification, ULONG SrcIp) void DelFragIPClsEntry(struct bcm_mini_adapter *Adapter, USHORT usIpIdentification, ULONG SrcIp)
{ {
UINT uiIndex = 0; UINT uiIndex = 0;
for (uiIndex = 0; uiIndex < MAX_FRAGMENTEDIP_CLASSIFICATION_ENTRIES; uiIndex++) { for (uiIndex = 0; uiIndex < MAX_FRAGMENTEDIP_CLASSIFICATION_ENTRIES; uiIndex++) {
...@@ -1556,7 +1556,7 @@ void DelFragIPClsEntry(PMINI_ADAPTER Adapter, USHORT usIpIdentification, ULONG S ...@@ -1556,7 +1556,7 @@ void DelFragIPClsEntry(PMINI_ADAPTER Adapter, USHORT usIpIdentification, ULONG S
} }
} }
void update_per_cid_rx(PMINI_ADAPTER Adapter) void update_per_cid_rx(struct bcm_mini_adapter *Adapter)
{ {
UINT qindex = 0; UINT qindex = 0;
...@@ -1580,7 +1580,7 @@ void update_per_cid_rx(PMINI_ADAPTER Adapter) ...@@ -1580,7 +1580,7 @@ void update_per_cid_rx(PMINI_ADAPTER Adapter)
Adapter->liDrainCalculated = jiffies; 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; INT iIndex = 0;
u32 uibuff[MAX_TARGET_DSX_BUFFERS]; u32 uibuff[MAX_TARGET_DSX_BUFFERS];
...@@ -1606,7 +1606,7 @@ void update_per_sf_desc_cnts(PMINI_ADAPTER Adapter) ...@@ -1606,7 +1606,7 @@ void update_per_sf_desc_cnts(PMINI_ADAPTER Adapter)
atomic_set(&Adapter->uiMBupdate, FALSE); 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 sk_buff *PacketToDrop = NULL;
struct net_device_stats *netstats = &Adapter->dev->stats; struct net_device_stats *netstats = &Adapter->dev->stats;
...@@ -1630,7 +1630,7 @@ void flush_queue(PMINI_ADAPTER Adapter, UINT iQIndex) ...@@ -1630,7 +1630,7 @@ void flush_queue(PMINI_ADAPTER Adapter, UINT iQIndex)
spin_unlock_bh(&Adapter->PackInfo[iQIndex].SFQueueLock); 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; int i;
if (netif_msg_link(Adapter)) if (netif_msg_link(Adapter))
......
...@@ -58,7 +58,7 @@ Description: This routine handle PHS(Payload Header Suppression for Tx path. ...@@ -58,7 +58,7 @@ Description: This routine handle PHS(Payload Header Suppression for Tx path.
The header data after supression is copied back to the NDIS_PACKET. The header data after supression is copied back to the NDIS_PACKET.
Input parameters: IN PMINI_ADAPTER Adapter - Miniport Adapter Context Input parameters: IN struct bcm_mini_adapter *Adapter - Miniport Adapter Context
IN Packet - NDIS packet containing data to be transmitted IN Packet - NDIS packet containing data to be transmitted
IN USHORT Vcid - vcid pertaining to connection on which the packet is being sent.Used to IN USHORT Vcid - vcid pertaining to connection on which the packet is being sent.Used to
identify PHS rule to be applied. identify PHS rule to be applied.
...@@ -69,7 +69,7 @@ Return: STATUS_SUCCESS - If the send was successful. ...@@ -69,7 +69,7 @@ Return: STATUS_SUCCESS - If the send was successful.
Other - If an error occured. Other - If an error occured.
*/ */
int PHSTransmit(PMINI_ADAPTER Adapter, int PHSTransmit(struct bcm_mini_adapter *Adapter,
struct sk_buff **pPacket, struct sk_buff **pPacket,
USHORT Vcid, USHORT Vcid,
B_UINT16 uiClassifierRuleID, B_UINT16 uiClassifierRuleID,
...@@ -209,7 +209,7 @@ int PHSTransmit(PMINI_ADAPTER Adapter, ...@@ -209,7 +209,7 @@ int PHSTransmit(PMINI_ADAPTER Adapter,
return STATUS_SUCCESS; return STATUS_SUCCESS;
} }
int PHSReceive(PMINI_ADAPTER Adapter, int PHSReceive(struct bcm_mini_adapter *Adapter,
USHORT usVcid, USHORT usVcid,
struct sk_buff *packet, struct sk_buff *packet,
UINT *punPacketLen, UINT *punPacketLen,
...@@ -273,7 +273,7 @@ int PHSReceive(PMINI_ADAPTER Adapter, ...@@ -273,7 +273,7 @@ int PHSReceive(PMINI_ADAPTER Adapter,
void DumpFullPacket(UCHAR *pBuf,UINT nPktLen) void DumpFullPacket(UCHAR *pBuf,UINT nPktLen)
{ {
PMINI_ADAPTER Adapter = GET_BCM_ADAPTER(gblpnetdev); struct bcm_mini_adapter *Adapter = GET_BCM_ADAPTER(gblpnetdev);
BCM_DEBUG_PRINT(Adapter,DBG_TYPE_TX, IPV4_DBG, DBG_LVL_ALL,"Dumping Data Packet"); BCM_DEBUG_PRINT(Adapter,DBG_TYPE_TX, IPV4_DBG, DBG_LVL_ALL,"Dumping Data Packet");
BCM_DEBUG_PRINT_BUFFER(Adapter,DBG_TYPE_TX, IPV4_DBG, DBG_LVL_ALL,pBuf,nPktLen); BCM_DEBUG_PRINT_BUFFER(Adapter,DBG_TYPE_TX, IPV4_DBG, DBG_LVL_ALL,pBuf,nPktLen);
} }
...@@ -291,7 +291,7 @@ void DumpFullPacket(UCHAR *pBuf,UINT nPktLen) ...@@ -291,7 +291,7 @@ void DumpFullPacket(UCHAR *pBuf,UINT nPktLen)
// TRUE(1) -If allocation of memory was success full. // TRUE(1) -If allocation of memory was success full.
// FALSE -If allocation of memory fails. // FALSE -If allocation of memory fails.
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
int phs_init(PPHS_DEVICE_EXTENSION pPhsdeviceExtension,PMINI_ADAPTER Adapter) int phs_init(PPHS_DEVICE_EXTENSION pPhsdeviceExtension, struct bcm_mini_adapter *Adapter)
{ {
int i; int i;
S_SERVICEFLOW_TABLE *pstServiceFlowTable; S_SERVICEFLOW_TABLE *pstServiceFlowTable;
...@@ -398,7 +398,7 @@ ULONG PhsUpdateClassifierRule(IN void* pvContext, ...@@ -398,7 +398,7 @@ ULONG PhsUpdateClassifierRule(IN void* pvContext,
ULONG lStatus =0; ULONG lStatus =0;
UINT nSFIndex =0 ; UINT nSFIndex =0 ;
S_SERVICEFLOW_ENTRY *pstServiceFlowEntry = NULL; S_SERVICEFLOW_ENTRY *pstServiceFlowEntry = NULL;
PMINI_ADAPTER Adapter = GET_BCM_ADAPTER(gblpnetdev); struct bcm_mini_adapter *Adapter = GET_BCM_ADAPTER(gblpnetdev);
...@@ -462,7 +462,7 @@ ULONG PhsDeletePHSRule(IN void* pvContext,IN B_UINT16 uiVcid,IN B_UINT8 u8PHSI) ...@@ -462,7 +462,7 @@ ULONG PhsDeletePHSRule(IN void* pvContext,IN B_UINT16 uiVcid,IN B_UINT8 u8PHSI)
UINT nSFIndex =0, nClsidIndex =0 ; UINT nSFIndex =0, nClsidIndex =0 ;
S_SERVICEFLOW_ENTRY *pstServiceFlowEntry = NULL; S_SERVICEFLOW_ENTRY *pstServiceFlowEntry = NULL;
S_CLASSIFIER_TABLE *pstClassifierRulesTable = NULL; S_CLASSIFIER_TABLE *pstClassifierRulesTable = NULL;
PMINI_ADAPTER Adapter = GET_BCM_ADAPTER(gblpnetdev); struct bcm_mini_adapter *Adapter = GET_BCM_ADAPTER(gblpnetdev);
PPHS_DEVICE_EXTENSION pDeviceExtension= (PPHS_DEVICE_EXTENSION)pvContext; PPHS_DEVICE_EXTENSION pDeviceExtension= (PPHS_DEVICE_EXTENSION)pvContext;
...@@ -528,7 +528,7 @@ ULONG PhsDeleteClassifierRule(IN void* pvContext,IN B_UINT16 uiVcid ,IN B_UINT16 ...@@ -528,7 +528,7 @@ ULONG PhsDeleteClassifierRule(IN void* pvContext,IN B_UINT16 uiVcid ,IN B_UINT16
UINT nSFIndex =0, nClsidIndex =0 ; UINT nSFIndex =0, nClsidIndex =0 ;
S_SERVICEFLOW_ENTRY *pstServiceFlowEntry = NULL; S_SERVICEFLOW_ENTRY *pstServiceFlowEntry = NULL;
S_CLASSIFIER_ENTRY *pstClassifierEntry = NULL; S_CLASSIFIER_ENTRY *pstClassifierEntry = NULL;
PMINI_ADAPTER Adapter = GET_BCM_ADAPTER(gblpnetdev); struct bcm_mini_adapter *Adapter = GET_BCM_ADAPTER(gblpnetdev);
PPHS_DEVICE_EXTENSION pDeviceExtension= (PPHS_DEVICE_EXTENSION)pvContext; PPHS_DEVICE_EXTENSION pDeviceExtension= (PPHS_DEVICE_EXTENSION)pvContext;
if(pDeviceExtension) if(pDeviceExtension)
...@@ -592,7 +592,7 @@ ULONG PhsDeleteSFRules(IN void* pvContext,IN B_UINT16 uiVcid) ...@@ -592,7 +592,7 @@ ULONG PhsDeleteSFRules(IN void* pvContext,IN B_UINT16 uiVcid)
UINT nSFIndex =0, nClsidIndex =0 ; UINT nSFIndex =0, nClsidIndex =0 ;
S_SERVICEFLOW_ENTRY *pstServiceFlowEntry = NULL; S_SERVICEFLOW_ENTRY *pstServiceFlowEntry = NULL;
S_CLASSIFIER_TABLE *pstClassifierRulesTable = NULL; S_CLASSIFIER_TABLE *pstClassifierRulesTable = NULL;
PMINI_ADAPTER Adapter = GET_BCM_ADAPTER(gblpnetdev); struct bcm_mini_adapter *Adapter = GET_BCM_ADAPTER(gblpnetdev);
PPHS_DEVICE_EXTENSION pDeviceExtension= (PPHS_DEVICE_EXTENSION)pvContext; PPHS_DEVICE_EXTENSION pDeviceExtension= (PPHS_DEVICE_EXTENSION)pvContext;
BCM_DEBUG_PRINT(Adapter,DBG_TYPE_OTHERS, PHS_DISPATCH, DBG_LVL_ALL,"====> \n"); BCM_DEBUG_PRINT(Adapter,DBG_TYPE_OTHERS, PHS_DISPATCH, DBG_LVL_ALL,"====> \n");
...@@ -684,7 +684,7 @@ ULONG PhsCompress(IN void* pvContext, ...@@ -684,7 +684,7 @@ ULONG PhsCompress(IN void* pvContext,
S_CLASSIFIER_ENTRY *pstClassifierEntry = NULL; S_CLASSIFIER_ENTRY *pstClassifierEntry = NULL;
S_PHS_RULE *pstPhsRule = NULL; S_PHS_RULE *pstPhsRule = NULL;
ULONG lStatus =0; ULONG lStatus =0;
PMINI_ADAPTER Adapter = GET_BCM_ADAPTER(gblpnetdev); struct bcm_mini_adapter *Adapter = GET_BCM_ADAPTER(gblpnetdev);
...@@ -778,7 +778,7 @@ ULONG PhsDeCompress(IN void* pvContext, ...@@ -778,7 +778,7 @@ ULONG PhsDeCompress(IN void* pvContext,
S_SERVICEFLOW_ENTRY *pstServiceFlowEntry = NULL; S_SERVICEFLOW_ENTRY *pstServiceFlowEntry = NULL;
S_PHS_RULE *pstPhsRule = NULL; S_PHS_RULE *pstPhsRule = NULL;
UINT phsi; UINT phsi;
PMINI_ADAPTER Adapter = GET_BCM_ADAPTER(gblpnetdev); struct bcm_mini_adapter *Adapter = GET_BCM_ADAPTER(gblpnetdev);
PPHS_DEVICE_EXTENSION pDeviceExtension= PPHS_DEVICE_EXTENSION pDeviceExtension=
(PPHS_DEVICE_EXTENSION)pvContext; (PPHS_DEVICE_EXTENSION)pvContext;
...@@ -847,7 +847,7 @@ ULONG PhsDeCompress(IN void* pvContext, ...@@ -847,7 +847,7 @@ ULONG PhsDeCompress(IN void* pvContext,
static void free_phs_serviceflow_rules(S_SERVICEFLOW_TABLE *psServiceFlowRulesTable) static void free_phs_serviceflow_rules(S_SERVICEFLOW_TABLE *psServiceFlowRulesTable)
{ {
int i,j; int i,j;
PMINI_ADAPTER Adapter = GET_BCM_ADAPTER(gblpnetdev); struct bcm_mini_adapter *Adapter = GET_BCM_ADAPTER(gblpnetdev);
BCM_DEBUG_PRINT(Adapter,DBG_TYPE_OTHERS, PHS_DISPATCH, DBG_LVL_ALL, "=======>\n"); BCM_DEBUG_PRINT(Adapter,DBG_TYPE_OTHERS, PHS_DISPATCH, DBG_LVL_ALL, "=======>\n");
if(psServiceFlowRulesTable) if(psServiceFlowRulesTable)
...@@ -1057,7 +1057,7 @@ UINT CreateClassiferToPHSRuleMapping(IN B_UINT16 uiVcid, ...@@ -1057,7 +1057,7 @@ UINT CreateClassiferToPHSRuleMapping(IN B_UINT16 uiVcid,
UINT uiStatus =PHS_SUCCESS; UINT uiStatus =PHS_SUCCESS;
UINT nClassifierIndex = 0; UINT nClassifierIndex = 0;
S_CLASSIFIER_TABLE *psaClassifiertable = NULL; S_CLASSIFIER_TABLE *psaClassifiertable = NULL;
PMINI_ADAPTER Adapter = GET_BCM_ADAPTER(gblpnetdev); struct bcm_mini_adapter *Adapter = GET_BCM_ADAPTER(gblpnetdev);
psaClassifiertable = pstServiceFlowEntry->pstClassifierTable; psaClassifiertable = pstServiceFlowEntry->pstClassifierTable;
BCM_DEBUG_PRINT(Adapter,DBG_TYPE_OTHERS, PHS_DISPATCH, DBG_LVL_ALL, "==>"); BCM_DEBUG_PRINT(Adapter,DBG_TYPE_OTHERS, PHS_DISPATCH, DBG_LVL_ALL, "==>");
...@@ -1148,7 +1148,7 @@ static UINT CreateClassifierPHSRule(IN B_UINT16 uiClsId, ...@@ -1148,7 +1148,7 @@ static UINT CreateClassifierPHSRule(IN B_UINT16 uiClsId,
BOOLEAN bFreeEntryFound = FALSE; BOOLEAN bFreeEntryFound = FALSE;
S_CLASSIFIER_ENTRY *psClassifierRules = NULL; S_CLASSIFIER_ENTRY *psClassifierRules = NULL;
UINT nStatus = PHS_SUCCESS; UINT nStatus = PHS_SUCCESS;
PMINI_ADAPTER Adapter = GET_BCM_ADAPTER(gblpnetdev); struct bcm_mini_adapter *Adapter = GET_BCM_ADAPTER(gblpnetdev);
BCM_DEBUG_PRINT(Adapter,DBG_TYPE_OTHERS, PHS_DISPATCH, DBG_LVL_ALL,"Inside CreateClassifierPHSRule"); BCM_DEBUG_PRINT(Adapter,DBG_TYPE_OTHERS, PHS_DISPATCH, DBG_LVL_ALL,"Inside CreateClassifierPHSRule");
if(psaClassifiertable == NULL) if(psaClassifiertable == NULL)
{ {
...@@ -1259,7 +1259,7 @@ static UINT UpdateClassifierPHSRule(IN B_UINT16 uiClsId, ...@@ -1259,7 +1259,7 @@ static UINT UpdateClassifierPHSRule(IN B_UINT16 uiClsId,
S_PHS_RULE *pstAddPhsRule = NULL; S_PHS_RULE *pstAddPhsRule = NULL;
UINT nPhsRuleIndex = 0; UINT nPhsRuleIndex = 0;
BOOLEAN bPHSRuleOrphaned = FALSE; BOOLEAN bPHSRuleOrphaned = FALSE;
PMINI_ADAPTER Adapter = GET_BCM_ADAPTER(gblpnetdev); struct bcm_mini_adapter *Adapter = GET_BCM_ADAPTER(gblpnetdev);
psPhsRule->u8RefCnt =0; psPhsRule->u8RefCnt =0;
/* Step 1 Deref Any Exisiting PHS Rule in this classifier Entry*/ /* Step 1 Deref Any Exisiting PHS Rule in this classifier Entry*/
...@@ -1334,7 +1334,7 @@ static BOOLEAN DerefPhsRule(IN B_UINT16 uiClsId,S_CLASSIFIER_TABLE *psaClassifi ...@@ -1334,7 +1334,7 @@ static BOOLEAN DerefPhsRule(IN B_UINT16 uiClsId,S_CLASSIFIER_TABLE *psaClassifi
void DumpPhsRules(PPHS_DEVICE_EXTENSION pDeviceExtension) void DumpPhsRules(PPHS_DEVICE_EXTENSION pDeviceExtension)
{ {
int i,j,k,l; int i,j,k,l;
PMINI_ADAPTER Adapter = GET_BCM_ADAPTER(gblpnetdev); struct bcm_mini_adapter *Adapter = GET_BCM_ADAPTER(gblpnetdev);
BCM_DEBUG_PRINT(Adapter,DBG_TYPE_OTHERS, DUMP_INFO, DBG_LVL_ALL, "\n Dumping PHS Rules : \n"); BCM_DEBUG_PRINT(Adapter,DBG_TYPE_OTHERS, DUMP_INFO, DBG_LVL_ALL, "\n Dumping PHS Rules : \n");
for(i=0;i<MAX_SERVICEFLOWS;i++) for(i=0;i<MAX_SERVICEFLOWS;i++)
{ {
...@@ -1415,7 +1415,7 @@ int phs_decompress(unsigned char *in_buf,unsigned char *out_buf, ...@@ -1415,7 +1415,7 @@ int phs_decompress(unsigned char *in_buf,unsigned char *out_buf,
int bit,i=0; int bit,i=0;
unsigned char *phsf,*phsm; unsigned char *phsf,*phsm;
int in_buf_len = *header_size-1; int in_buf_len = *header_size-1;
PMINI_ADAPTER Adapter = GET_BCM_ADAPTER(gblpnetdev); struct bcm_mini_adapter *Adapter = GET_BCM_ADAPTER(gblpnetdev);
in_buf++; in_buf++;
BCM_DEBUG_PRINT(Adapter,DBG_TYPE_OTHERS, PHS_RECEIVE,DBG_LVL_ALL,"====>\n"); BCM_DEBUG_PRINT(Adapter,DBG_TYPE_OTHERS, PHS_RECEIVE,DBG_LVL_ALL,"====>\n");
*header_size = 0; *header_size = 0;
...@@ -1495,7 +1495,7 @@ static int phs_compress(S_PHS_RULE *phs_rule,unsigned char *in_buf ...@@ -1495,7 +1495,7 @@ static int phs_compress(S_PHS_RULE *phs_rule,unsigned char *in_buf
{ {
unsigned char *old_addr = out_buf; unsigned char *old_addr = out_buf;
int supress = 0; int supress = 0;
PMINI_ADAPTER Adapter = GET_BCM_ADAPTER(gblpnetdev); struct bcm_mini_adapter *Adapter = GET_BCM_ADAPTER(gblpnetdev);
if(phs_rule == NULL) if(phs_rule == NULL)
{ {
BCM_DEBUG_PRINT(Adapter,DBG_TYPE_OTHERS, PHS_SEND, DBG_LVL_ALL,"\nphs_compress(): phs_rule null!"); BCM_DEBUG_PRINT(Adapter,DBG_TYPE_OTHERS, PHS_SEND, DBG_LVL_ALL,"\nphs_compress(): phs_rule null!");
...@@ -1557,7 +1557,7 @@ static int verify_suppress_phsf(unsigned char *in_buffer,unsigned char *out_buff ...@@ -1557,7 +1557,7 @@ static int verify_suppress_phsf(unsigned char *in_buffer,unsigned char *out_buff
{ {
unsigned int size=0; unsigned int size=0;
int bit,i=0; int bit,i=0;
PMINI_ADAPTER Adapter = GET_BCM_ADAPTER(gblpnetdev); struct bcm_mini_adapter *Adapter = GET_BCM_ADAPTER(gblpnetdev);
BCM_DEBUG_PRINT(Adapter,DBG_TYPE_OTHERS, PHS_SEND, DBG_LVL_ALL,"\nCOMP:In verify_phsf PHSM - 0x%X",*phsm); BCM_DEBUG_PRINT(Adapter,DBG_TYPE_OTHERS, PHS_SEND, DBG_LVL_ALL,"\nCOMP:In verify_phsf PHSM - 0x%X",*phsm);
......
#ifndef BCM_MINIPORT_PHSMODULE_H #ifndef BCM_MINIPORT_PHSMODULE_H
#define BCM_MINIPORT_PHSMODULE_H #define BCM_MINIPORT_PHSMODULE_H
int PHSTransmit(PMINI_ADAPTER Adapter, int PHSTransmit(struct bcm_mini_adapter *Adapter,
struct sk_buff **pPacket, struct sk_buff **pPacket,
USHORT Vcid, USHORT Vcid,
B_UINT16 uiClassifierRuleID, B_UINT16 uiClassifierRuleID,
...@@ -9,7 +9,7 @@ int PHSTransmit(PMINI_ADAPTER Adapter, ...@@ -9,7 +9,7 @@ int PHSTransmit(PMINI_ADAPTER Adapter,
PUINT PacketLen, PUINT PacketLen,
UCHAR bEthCSSupport); UCHAR bEthCSSupport);
int PHSReceive(PMINI_ADAPTER Adapter, int PHSReceive(struct bcm_mini_adapter *Adapter,
USHORT usVcid, USHORT usVcid,
struct sk_buff *packet, struct sk_buff *packet,
UINT *punPacketLen, UINT *punPacketLen,
...@@ -25,7 +25,7 @@ void DumpFullPacket(UCHAR *pBuf,UINT nPktLen); ...@@ -25,7 +25,7 @@ void DumpFullPacket(UCHAR *pBuf,UINT nPktLen);
void DumpPhsRules(PPHS_DEVICE_EXTENSION pDeviceExtension); void DumpPhsRules(PPHS_DEVICE_EXTENSION pDeviceExtension);
int phs_init(PPHS_DEVICE_EXTENSION pPhsdeviceExtension,PMINI_ADAPTER Adapter); int phs_init(PPHS_DEVICE_EXTENSION pPhsdeviceExtension,struct bcm_mini_adapter *Adapter);
int PhsCleanup(PPHS_DEVICE_EXTENSION pPHSDeviceExt); int PhsCleanup(PPHS_DEVICE_EXTENSION pPHSDeviceExt);
......
#ifndef _PROTOTYPES_H_ #ifndef _PROTOTYPES_H_
#define _PROTOTYPES_H_ #define _PROTOTYPES_H_
VOID LinkControlResponseMessage(PMINI_ADAPTER Adapter, PUCHAR pucBuffer); VOID LinkControlResponseMessage(struct bcm_mini_adapter *Adapter, PUCHAR pucBuffer);
VOID StatisticsResponse(PMINI_ADAPTER Adapter,PVOID pvBuffer); VOID StatisticsResponse(struct bcm_mini_adapter *Adapter,PVOID pvBuffer);
VOID IdleModeResponse(PMINI_ADAPTER Adapter,PUINT puiBuffer); VOID IdleModeResponse(struct bcm_mini_adapter *Adapter,PUINT puiBuffer);
int control_packet_handler (PMINI_ADAPTER Adapter); int control_packet_handler (struct bcm_mini_adapter *Adapter);
VOID DeleteAllClassifiersForSF(PMINI_ADAPTER Adapter,UINT uiSearchRuleIndex); VOID DeleteAllClassifiersForSF(struct bcm_mini_adapter *Adapter,UINT uiSearchRuleIndex);
VOID flush_all_queues(PMINI_ADAPTER Adapter); VOID flush_all_queues(struct bcm_mini_adapter *Adapter);
int register_control_device_interface(PMINI_ADAPTER ps_adapter); int register_control_device_interface(struct bcm_mini_adapter *ps_adapter);
void unregister_control_device_interface(PMINI_ADAPTER Adapter); void unregister_control_device_interface(struct bcm_mini_adapter *Adapter);
INT CopyBufferToControlPacket(PMINI_ADAPTER Adapter,/**<Logical Adapter*/ INT CopyBufferToControlPacket(struct bcm_mini_adapter *Adapter,/**<Logical Adapter*/
PVOID ioBuffer/**<Control Packet Buffer*/ PVOID ioBuffer/**<Control Packet Buffer*/
); );
VOID SortPackInfo(PMINI_ADAPTER Adapter); VOID SortPackInfo(struct bcm_mini_adapter *Adapter);
VOID SortClassifiers(PMINI_ADAPTER Adapter); VOID SortClassifiers(struct bcm_mini_adapter *Adapter);
VOID flush_all_queues(PMINI_ADAPTER Adapter); VOID flush_all_queues(struct bcm_mini_adapter *Adapter);
VOID PruneQueueAllSF(PMINI_ADAPTER Adapter); VOID PruneQueueAllSF(struct bcm_mini_adapter *Adapter);
INT SearchSfid(PMINI_ADAPTER Adapter,UINT uiSfid); INT SearchSfid(struct bcm_mini_adapter *Adapter,UINT uiSfid);
USHORT ClassifyPacket(PMINI_ADAPTER Adapter,struct sk_buff* skb); USHORT ClassifyPacket(struct bcm_mini_adapter *Adapter,struct sk_buff* skb);
BOOLEAN MatchSrcPort(struct bcm_classifier_rule *pstClassifierRule,USHORT ushSrcPort); BOOLEAN MatchSrcPort(struct bcm_classifier_rule *pstClassifierRule,USHORT ushSrcPort);
BOOLEAN MatchDestPort(struct bcm_classifier_rule *pstClassifierRule,USHORT ushSrcPort); BOOLEAN MatchDestPort(struct bcm_classifier_rule *pstClassifierRule,USHORT ushSrcPort);
BOOLEAN MatchProtocol(struct bcm_classifier_rule *pstClassifierRule,UCHAR ucProtocol); BOOLEAN MatchProtocol(struct bcm_classifier_rule *pstClassifierRule,UCHAR ucProtocol);
INT SetupNextSend(PMINI_ADAPTER Adapter, /**<Logical Adapter*/ INT SetupNextSend(struct bcm_mini_adapter *Adapter, /**<Logical Adapter*/
struct sk_buff *Packet, /**<data buffer*/ struct sk_buff *Packet, /**<data buffer*/
USHORT Vcid) ; USHORT Vcid) ;
VOID LinkMessage(PMINI_ADAPTER Adapter); VOID LinkMessage(struct bcm_mini_adapter *Adapter);
VOID transmit_packets(PMINI_ADAPTER Adapter); VOID transmit_packets(struct bcm_mini_adapter *Adapter);
INT SendControlPacket(PMINI_ADAPTER Adapter, /**<Logical Adapter*/ INT SendControlPacket(struct bcm_mini_adapter *Adapter, /**<Logical Adapter*/
char *pControlPacket/**<Control Packet*/ char *pControlPacket/**<Control Packet*/
); );
int register_networkdev(PMINI_ADAPTER Adapter); int register_networkdev(struct bcm_mini_adapter *Adapter);
void unregister_networkdev(PMINI_ADAPTER Adapter); void unregister_networkdev(struct bcm_mini_adapter *Adapter);
INT AllocAdapterDsxBuffer(PMINI_ADAPTER Adapter); INT AllocAdapterDsxBuffer(struct bcm_mini_adapter *Adapter);
VOID AdapterFree(PMINI_ADAPTER Adapter); VOID AdapterFree(struct bcm_mini_adapter *Adapter);
INT FreeAdapterDsxBuffer(PMINI_ADAPTER Adapter); INT FreeAdapterDsxBuffer(struct bcm_mini_adapter *Adapter);
int tx_pkt_handler(PMINI_ADAPTER Adapter); int tx_pkt_handler(struct bcm_mini_adapter *Adapter);
int reset_card_proc(PMINI_ADAPTER Adapter ); int reset_card_proc(struct bcm_mini_adapter *Adapter );
int run_card_proc(PMINI_ADAPTER Adapter ); int run_card_proc(struct bcm_mini_adapter *Adapter );
int InitCardAndDownloadFirmware(PMINI_ADAPTER ps_adapter); int InitCardAndDownloadFirmware(struct bcm_mini_adapter *ps_adapter);
INT ReadMacAddressFromNVM(PMINI_ADAPTER Adapter); INT ReadMacAddressFromNVM(struct bcm_mini_adapter *Adapter);
int register_control_device_interface(PMINI_ADAPTER ps_adapter); int register_control_device_interface(struct bcm_mini_adapter *ps_adapter);
void DumpPackInfo(PMINI_ADAPTER Adapter); void DumpPackInfo(struct bcm_mini_adapter *Adapter);
int rdm(PMINI_ADAPTER Adapter, UINT uiAddress, PCHAR pucBuff, size_t size); int rdm(struct bcm_mini_adapter *Adapter, UINT uiAddress, PCHAR pucBuff, size_t size);
int wrm(PMINI_ADAPTER Adapter, UINT uiAddress, PCHAR pucBuff, size_t size); int wrm(struct bcm_mini_adapter *Adapter, UINT uiAddress, PCHAR pucBuff, size_t size);
int wrmalt (PMINI_ADAPTER Adapter, UINT uiAddress, PUINT pucBuff, size_t sSize); int wrmalt (struct bcm_mini_adapter *Adapter, UINT uiAddress, PUINT pucBuff, size_t sSize);
int rdmalt (PMINI_ADAPTER Adapter, UINT uiAddress, PUINT pucBuff, size_t sSize); int rdmalt (struct bcm_mini_adapter *Adapter, UINT uiAddress, PUINT pucBuff, size_t sSize);
int get_dsx_sf_data_to_application(PMINI_ADAPTER Adapter, UINT uiSFId, void __user * user_buffer); int get_dsx_sf_data_to_application(struct bcm_mini_adapter *Adapter, UINT uiSFId, void __user * user_buffer);
void SendIdleModeResponse(PMINI_ADAPTER Adapter); void SendIdleModeResponse(struct bcm_mini_adapter *Adapter);
int ProcessGetHostMibs(PMINI_ADAPTER Adapter, S_MIBS_HOST_STATS_MIBS *buf); int ProcessGetHostMibs(struct bcm_mini_adapter *Adapter, S_MIBS_HOST_STATS_MIBS *buf);
void GetDroppedAppCntrlPktMibs(S_MIBS_HOST_STATS_MIBS *ioBuffer, struct bcm_tarang_data *pTarang); void GetDroppedAppCntrlPktMibs(S_MIBS_HOST_STATS_MIBS *ioBuffer, struct bcm_tarang_data *pTarang);
void beceem_parse_target_struct(PMINI_ADAPTER Adapter); void beceem_parse_target_struct(struct bcm_mini_adapter *Adapter);
int bcm_ioctl_fw_download(PMINI_ADAPTER Adapter, struct bcm_firmware_info *psFwInfo); int bcm_ioctl_fw_download(struct bcm_mini_adapter *Adapter, struct bcm_firmware_info *psFwInfo);
void CopyMIBSExtendedSFParameters(PMINI_ADAPTER Adapter, void CopyMIBSExtendedSFParameters(struct bcm_mini_adapter *Adapter,
CServiceFlowParamSI *psfLocalSet, UINT uiSearchRuleIndex); CServiceFlowParamSI *psfLocalSet, UINT uiSearchRuleIndex);
VOID ResetCounters(PMINI_ADAPTER Adapter); VOID ResetCounters(struct bcm_mini_adapter *Adapter);
int InitLedSettings(PMINI_ADAPTER Adapter); int InitLedSettings(struct bcm_mini_adapter *Adapter);
struct bcm_classifier_rule *GetFragIPClsEntry(PMINI_ADAPTER Adapter,USHORT usIpIdentification,ULONG SrcIP); struct bcm_classifier_rule *GetFragIPClsEntry(struct bcm_mini_adapter *Adapter,USHORT usIpIdentification,ULONG SrcIP);
void AddFragIPClsEntry(PMINI_ADAPTER Adapter, struct bcm_fragmented_packet_info *psFragPktInfo); void AddFragIPClsEntry(struct bcm_mini_adapter *Adapter, struct bcm_fragmented_packet_info *psFragPktInfo);
void DelFragIPClsEntry(PMINI_ADAPTER Adapter,USHORT usIpIdentification,ULONG SrcIp); void DelFragIPClsEntry(struct bcm_mini_adapter *Adapter,USHORT usIpIdentification,ULONG SrcIp);
void update_per_cid_rx (PMINI_ADAPTER Adapter); void update_per_cid_rx (struct bcm_mini_adapter *Adapter);
void update_per_sf_desc_cnts( PMINI_ADAPTER Adapter); void update_per_sf_desc_cnts( struct bcm_mini_adapter *Adapter);
void ClearTargetDSXBuffer(PMINI_ADAPTER Adapter,B_UINT16 TID,BOOLEAN bFreeAll); void ClearTargetDSXBuffer(struct bcm_mini_adapter *Adapter,B_UINT16 TID,BOOLEAN bFreeAll);
void flush_queue(PMINI_ADAPTER Adapter, UINT iQIndex); void flush_queue(struct bcm_mini_adapter *Adapter, UINT iQIndex);
INT flushAllAppQ(VOID); INT flushAllAppQ(VOID);
INT BeceemEEPROMBulkRead( INT BeceemEEPROMBulkRead(
PMINI_ADAPTER Adapter, struct bcm_mini_adapter *Adapter,
PUINT pBuffer, PUINT pBuffer,
UINT uiOffset, UINT uiOffset,
UINT uiNumBytes); UINT uiNumBytes);
INT WriteBeceemEEPROM(PMINI_ADAPTER Adapter,UINT uiEEPROMOffset, UINT uiData); INT WriteBeceemEEPROM(struct bcm_mini_adapter *Adapter,UINT uiEEPROMOffset, UINT uiData);
INT PropagateCalParamsFromFlashToMemory(PMINI_ADAPTER Adapter); INT PropagateCalParamsFromFlashToMemory(struct bcm_mini_adapter *Adapter);
INT BeceemEEPROMBulkWrite( INT BeceemEEPROMBulkWrite(
PMINI_ADAPTER Adapter, struct bcm_mini_adapter *Adapter,
PUCHAR pBuffer, PUCHAR pBuffer,
UINT uiOffset, UINT uiOffset,
UINT uiNumBytes, UINT uiNumBytes,
BOOLEAN bVerify); BOOLEAN bVerify);
INT ReadBeceemEEPROM(PMINI_ADAPTER Adapter,UINT dwAddress, UINT *pdwData); INT ReadBeceemEEPROM(struct bcm_mini_adapter *Adapter,UINT dwAddress, UINT *pdwData);
INT BeceemNVMRead( INT BeceemNVMRead(
PMINI_ADAPTER Adapter, struct bcm_mini_adapter *Adapter,
PUINT pBuffer, PUINT pBuffer,
UINT uiOffset, UINT uiOffset,
UINT uiNumBytes); UINT uiNumBytes);
INT BeceemNVMWrite( INT BeceemNVMWrite(
PMINI_ADAPTER Adapter, struct bcm_mini_adapter *Adapter,
PUINT pBuffer, PUINT pBuffer,
UINT uiOffset, UINT uiOffset,
UINT uiNumBytes, UINT uiNumBytes,
BOOLEAN bVerify); BOOLEAN bVerify);
INT BcmInitNVM(PMINI_ADAPTER Adapter); INT BcmInitNVM(struct bcm_mini_adapter *Adapter);
INT BcmUpdateSectorSize(PMINI_ADAPTER Adapter,UINT uiSectorSize); INT BcmUpdateSectorSize(struct bcm_mini_adapter *Adapter,UINT uiSectorSize);
BOOLEAN IsSectionExistInFlash(PMINI_ADAPTER Adapter, FLASH2X_SECTION_VAL section); BOOLEAN IsSectionExistInFlash(struct bcm_mini_adapter *Adapter, FLASH2X_SECTION_VAL section);
INT BcmGetFlash2xSectionalBitMap(PMINI_ADAPTER Adapter, PFLASH2X_BITMAP psFlash2xBitMap); INT BcmGetFlash2xSectionalBitMap(struct bcm_mini_adapter *Adapter, PFLASH2X_BITMAP psFlash2xBitMap);
INT BcmFlash2xBulkWrite( INT BcmFlash2xBulkWrite(
PMINI_ADAPTER Adapter, struct bcm_mini_adapter *Adapter,
PUINT pBuffer, PUINT pBuffer,
FLASH2X_SECTION_VAL eFlashSectionVal, FLASH2X_SECTION_VAL eFlashSectionVal,
UINT uiOffset, UINT uiOffset,
...@@ -174,45 +174,45 @@ INT BcmFlash2xBulkWrite( ...@@ -174,45 +174,45 @@ INT BcmFlash2xBulkWrite(
UINT bVerify); UINT bVerify);
INT BcmFlash2xBulkRead( INT BcmFlash2xBulkRead(
PMINI_ADAPTER Adapter, struct bcm_mini_adapter *Adapter,
PUINT pBuffer, PUINT pBuffer,
FLASH2X_SECTION_VAL eFlashSectionVal, FLASH2X_SECTION_VAL eFlashSectionVal,
UINT uiOffsetWithinSectionVal, UINT uiOffsetWithinSectionVal,
UINT uiNumBytes); UINT uiNumBytes);
INT BcmGetSectionValStartOffset(PMINI_ADAPTER Adapter, FLASH2X_SECTION_VAL eFlashSectionVal); INT BcmGetSectionValStartOffset(struct bcm_mini_adapter *Adapter, FLASH2X_SECTION_VAL eFlashSectionVal);
INT BcmSetActiveSection(PMINI_ADAPTER Adapter, FLASH2X_SECTION_VAL eFlash2xSectVal); INT BcmSetActiveSection(struct bcm_mini_adapter *Adapter, FLASH2X_SECTION_VAL eFlash2xSectVal);
INT BcmAllocFlashCSStructure(PMINI_ADAPTER psAdapter); INT BcmAllocFlashCSStructure(struct bcm_mini_adapter *psAdapter);
INT BcmDeAllocFlashCSStructure(PMINI_ADAPTER psAdapter); INT BcmDeAllocFlashCSStructure(struct bcm_mini_adapter *psAdapter);
INT BcmCopyISO(PMINI_ADAPTER Adapter, FLASH2X_COPY_SECTION sCopySectStrut); INT BcmCopyISO(struct bcm_mini_adapter *Adapter, FLASH2X_COPY_SECTION sCopySectStrut);
INT BcmFlash2xCorruptSig(PMINI_ADAPTER Adapter, FLASH2X_SECTION_VAL eFlash2xSectionVal); INT BcmFlash2xCorruptSig(struct bcm_mini_adapter *Adapter, FLASH2X_SECTION_VAL eFlash2xSectionVal);
INT BcmFlash2xWriteSig(PMINI_ADAPTER Adapter, FLASH2X_SECTION_VAL eFlashSectionVal); INT BcmFlash2xWriteSig(struct bcm_mini_adapter *Adapter, FLASH2X_SECTION_VAL eFlashSectionVal);
INT validateFlash2xReadWrite(PMINI_ADAPTER Adapter, PFLASH2X_READWRITE psFlash2xReadWrite); INT validateFlash2xReadWrite(struct bcm_mini_adapter *Adapter, PFLASH2X_READWRITE psFlash2xReadWrite);
INT IsFlash2x(PMINI_ADAPTER Adapter); INT IsFlash2x(struct bcm_mini_adapter *Adapter);
INT BcmCopySection(PMINI_ADAPTER Adapter, INT BcmCopySection(struct bcm_mini_adapter *Adapter,
FLASH2X_SECTION_VAL SrcSection, FLASH2X_SECTION_VAL SrcSection,
FLASH2X_SECTION_VAL DstSection, FLASH2X_SECTION_VAL DstSection,
UINT offset, UINT offset,
UINT numOfBytes); UINT numOfBytes);
BOOLEAN IsNonCDLessDevice(PMINI_ADAPTER Adapter); BOOLEAN IsNonCDLessDevice(struct bcm_mini_adapter *Adapter);
VOID OverrideServiceFlowParams(PMINI_ADAPTER Adapter,PUINT puiBuffer); VOID OverrideServiceFlowParams(struct bcm_mini_adapter *Adapter,PUINT puiBuffer);
int wrmaltWithLock (PMINI_ADAPTER Adapter, UINT uiAddress, PUINT pucBuff, size_t sSize); int wrmaltWithLock (struct bcm_mini_adapter *Adapter, UINT uiAddress, PUINT pucBuff, size_t sSize);
int rdmaltWithLock (PMINI_ADAPTER Adapter, UINT uiAddress, PUINT pucBuff, size_t sSize); int rdmaltWithLock (struct bcm_mini_adapter *Adapter, UINT uiAddress, PUINT pucBuff, size_t sSize);
int wrmWithLock(PMINI_ADAPTER Adapter, UINT uiAddress, PCHAR pucBuff, size_t size); int wrmWithLock(struct bcm_mini_adapter *Adapter, UINT uiAddress, PCHAR pucBuff, size_t size);
INT buffDnldVerify(PMINI_ADAPTER Adapter, unsigned char *mappedbuffer, unsigned int u32FirmwareLength, INT buffDnldVerify(struct bcm_mini_adapter *Adapter, unsigned char *mappedbuffer, unsigned int u32FirmwareLength,
unsigned long u32StartingAddress); unsigned long u32StartingAddress);
VOID putUsbSuspend(struct work_struct *work); VOID putUsbSuspend(struct work_struct *work);
BOOLEAN IsReqGpioIsLedInNVM(PMINI_ADAPTER Adapter, UINT gpios); BOOLEAN IsReqGpioIsLedInNVM(struct bcm_mini_adapter *Adapter, UINT gpios);
#endif #endif
......
...@@ -4,13 +4,13 @@ This file contains the routines related to Quality of Service. ...@@ -4,13 +4,13 @@ This file contains the routines related to Quality of Service.
*/ */
#include "headers.h" #include "headers.h"
static void EThCSGetPktInfo(PMINI_ADAPTER Adapter,PVOID pvEthPayload,PS_ETHCS_PKT_INFO pstEthCsPktInfo); static void EThCSGetPktInfo(struct bcm_mini_adapter *Adapter,PVOID pvEthPayload,PS_ETHCS_PKT_INFO pstEthCsPktInfo);
static BOOLEAN EThCSClassifyPkt(PMINI_ADAPTER Adapter,struct sk_buff* skb,PS_ETHCS_PKT_INFO pstEthCsPktInfo,struct bcm_classifier_rule *pstClassifierRule, B_UINT8 EthCSCupport); static BOOLEAN EThCSClassifyPkt(struct bcm_mini_adapter *Adapter,struct sk_buff* skb,PS_ETHCS_PKT_INFO pstEthCsPktInfo,struct bcm_classifier_rule *pstClassifierRule, B_UINT8 EthCSCupport);
static USHORT IpVersion4(PMINI_ADAPTER Adapter, struct iphdr *iphd, static USHORT IpVersion4(struct bcm_mini_adapter *Adapter, struct iphdr *iphd,
struct bcm_classifier_rule *pstClassifierRule ); struct bcm_classifier_rule *pstClassifierRule );
static VOID PruneQueue(PMINI_ADAPTER Adapter, INT iIndex); static VOID PruneQueue(struct bcm_mini_adapter *Adapter, INT iIndex);
/******************************************************************* /*******************************************************************
...@@ -28,7 +28,7 @@ BOOLEAN MatchSrcIpAddress(struct bcm_classifier_rule *pstClassifierRule,ULONG ul ...@@ -28,7 +28,7 @@ BOOLEAN MatchSrcIpAddress(struct bcm_classifier_rule *pstClassifierRule,ULONG ul
{ {
UCHAR ucLoopIndex=0; UCHAR ucLoopIndex=0;
PMINI_ADAPTER Adapter = GET_BCM_ADAPTER(gblpnetdev); struct bcm_mini_adapter *Adapter = GET_BCM_ADAPTER(gblpnetdev);
ulSrcIP=ntohl(ulSrcIP); ulSrcIP=ntohl(ulSrcIP);
if(0 == pstClassifierRule->ucIPSourceAddressLength) if(0 == pstClassifierRule->ucIPSourceAddressLength)
...@@ -61,7 +61,7 @@ BOOLEAN MatchSrcIpAddress(struct bcm_classifier_rule *pstClassifierRule,ULONG ul ...@@ -61,7 +61,7 @@ BOOLEAN MatchSrcIpAddress(struct bcm_classifier_rule *pstClassifierRule,ULONG ul
BOOLEAN MatchDestIpAddress(struct bcm_classifier_rule *pstClassifierRule,ULONG ulDestIP) BOOLEAN MatchDestIpAddress(struct bcm_classifier_rule *pstClassifierRule,ULONG ulDestIP)
{ {
UCHAR ucLoopIndex=0; UCHAR ucLoopIndex=0;
PMINI_ADAPTER Adapter = GET_BCM_ADAPTER(gblpnetdev); struct bcm_mini_adapter *Adapter = GET_BCM_ADAPTER(gblpnetdev);
ulDestIP=ntohl(ulDestIP); ulDestIP=ntohl(ulDestIP);
if(0 == pstClassifierRule->ucIPDestinationAddressLength) if(0 == pstClassifierRule->ucIPDestinationAddressLength)
...@@ -94,7 +94,7 @@ BOOLEAN MatchDestIpAddress(struct bcm_classifier_rule *pstClassifierRule,ULONG u ...@@ -94,7 +94,7 @@ BOOLEAN MatchDestIpAddress(struct bcm_classifier_rule *pstClassifierRule,ULONG u
BOOLEAN MatchTos(struct bcm_classifier_rule *pstClassifierRule,UCHAR ucTypeOfService) BOOLEAN MatchTos(struct bcm_classifier_rule *pstClassifierRule,UCHAR ucTypeOfService)
{ {
PMINI_ADAPTER Adapter = GET_BCM_ADAPTER(gblpnetdev); struct bcm_mini_adapter *Adapter = GET_BCM_ADAPTER(gblpnetdev);
if( 3 != pstClassifierRule->ucIPTypeOfServiceLength ) if( 3 != pstClassifierRule->ucIPTypeOfServiceLength )
return TRUE; return TRUE;
...@@ -120,7 +120,7 @@ BOOLEAN MatchTos(struct bcm_classifier_rule *pstClassifierRule,UCHAR ucTypeOfSer ...@@ -120,7 +120,7 @@ BOOLEAN MatchTos(struct bcm_classifier_rule *pstClassifierRule,UCHAR ucTypeOfSer
BOOLEAN MatchProtocol(struct bcm_classifier_rule *pstClassifierRule,UCHAR ucProtocol) BOOLEAN MatchProtocol(struct bcm_classifier_rule *pstClassifierRule,UCHAR ucProtocol)
{ {
UCHAR ucLoopIndex=0; UCHAR ucLoopIndex=0;
PMINI_ADAPTER Adapter = GET_BCM_ADAPTER(gblpnetdev); struct bcm_mini_adapter *Adapter = GET_BCM_ADAPTER(gblpnetdev);
if(0 == pstClassifierRule->ucProtocolLength) if(0 == pstClassifierRule->ucProtocolLength)
return TRUE; return TRUE;
for(ucLoopIndex=0;ucLoopIndex<pstClassifierRule->ucProtocolLength;ucLoopIndex++) for(ucLoopIndex=0;ucLoopIndex<pstClassifierRule->ucProtocolLength;ucLoopIndex++)
...@@ -150,7 +150,7 @@ BOOLEAN MatchSrcPort(struct bcm_classifier_rule *pstClassifierRule,USHORT ushSrc ...@@ -150,7 +150,7 @@ BOOLEAN MatchSrcPort(struct bcm_classifier_rule *pstClassifierRule,USHORT ushSrc
{ {
UCHAR ucLoopIndex=0; UCHAR ucLoopIndex=0;
PMINI_ADAPTER Adapter = GET_BCM_ADAPTER(gblpnetdev); struct bcm_mini_adapter *Adapter = GET_BCM_ADAPTER(gblpnetdev);
if(0 == pstClassifierRule->ucSrcPortRangeLength) if(0 == pstClassifierRule->ucSrcPortRangeLength)
...@@ -181,7 +181,7 @@ BOOLEAN MatchSrcPort(struct bcm_classifier_rule *pstClassifierRule,USHORT ushSrc ...@@ -181,7 +181,7 @@ BOOLEAN MatchSrcPort(struct bcm_classifier_rule *pstClassifierRule,USHORT ushSrc
BOOLEAN MatchDestPort(struct bcm_classifier_rule *pstClassifierRule,USHORT ushDestPort) BOOLEAN MatchDestPort(struct bcm_classifier_rule *pstClassifierRule,USHORT ushDestPort)
{ {
UCHAR ucLoopIndex=0; UCHAR ucLoopIndex=0;
PMINI_ADAPTER Adapter = GET_BCM_ADAPTER(gblpnetdev); struct bcm_mini_adapter *Adapter = GET_BCM_ADAPTER(gblpnetdev);
if(0 == pstClassifierRule->ucDestPortRangeLength) if(0 == pstClassifierRule->ucDestPortRangeLength)
return TRUE; return TRUE;
...@@ -204,7 +204,7 @@ BOOLEAN MatchDestPort(struct bcm_classifier_rule *pstClassifierRule,USHORT ushDe ...@@ -204,7 +204,7 @@ BOOLEAN MatchDestPort(struct bcm_classifier_rule *pstClassifierRule,USHORT ushDe
Compares IPV4 Ip address and port number Compares IPV4 Ip address and port number
@return Queue Index. @return Queue Index.
*/ */
static USHORT IpVersion4(PMINI_ADAPTER Adapter, static USHORT IpVersion4(struct bcm_mini_adapter *Adapter,
struct iphdr *iphd, struct iphdr *iphd,
struct bcm_classifier_rule *pstClassifierRule) struct bcm_classifier_rule *pstClassifierRule)
{ {
...@@ -302,7 +302,7 @@ static USHORT IpVersion4(PMINI_ADAPTER Adapter, ...@@ -302,7 +302,7 @@ static USHORT IpVersion4(PMINI_ADAPTER Adapter,
return bClassificationSucceed; return bClassificationSucceed;
} }
VOID PruneQueueAllSF(PMINI_ADAPTER Adapter) VOID PruneQueueAllSF(struct bcm_mini_adapter *Adapter)
{ {
UINT iIndex = 0; UINT iIndex = 0;
...@@ -323,7 +323,7 @@ is less than number of bytes in the queue. If so - ...@@ -323,7 +323,7 @@ is less than number of bytes in the queue. If so -
drops packets from the Head till the number of bytes is drops packets from the Head till the number of bytes is
less than or equal to max queue size for the queue. less than or equal to max queue size for the queue.
*/ */
static VOID PruneQueue(PMINI_ADAPTER Adapter, INT iIndex) static VOID PruneQueue(struct bcm_mini_adapter *Adapter, INT iIndex)
{ {
struct sk_buff* PacketToDrop=NULL; struct sk_buff* PacketToDrop=NULL;
struct net_device_stats *netstats; struct net_device_stats *netstats;
...@@ -392,7 +392,7 @@ static VOID PruneQueue(PMINI_ADAPTER Adapter, INT iIndex) ...@@ -392,7 +392,7 @@ static VOID PruneQueue(PMINI_ADAPTER Adapter, INT iIndex)
BCM_DEBUG_PRINT(Adapter,DBG_TYPE_TX, PRUNE_QUEUE, DBG_LVL_ALL, "<====="); BCM_DEBUG_PRINT(Adapter,DBG_TYPE_TX, PRUNE_QUEUE, DBG_LVL_ALL, "<=====");
} }
VOID flush_all_queues(PMINI_ADAPTER Adapter) VOID flush_all_queues(struct bcm_mini_adapter *Adapter)
{ {
INT iQIndex; INT iQIndex;
UINT uiTotalPacketLength; UINT uiTotalPacketLength;
...@@ -442,7 +442,7 @@ VOID flush_all_queues(PMINI_ADAPTER Adapter) ...@@ -442,7 +442,7 @@ VOID flush_all_queues(PMINI_ADAPTER Adapter)
BCM_DEBUG_PRINT(Adapter,DBG_TYPE_OTHERS, DUMP_INFO, DBG_LVL_ALL, "<====="); BCM_DEBUG_PRINT(Adapter,DBG_TYPE_OTHERS, DUMP_INFO, DBG_LVL_ALL, "<=====");
} }
USHORT ClassifyPacket(PMINI_ADAPTER Adapter,struct sk_buff* skb) USHORT ClassifyPacket(struct bcm_mini_adapter *Adapter,struct sk_buff* skb)
{ {
INT uiLoopIndex=0; INT uiLoopIndex=0;
struct bcm_classifier_rule *pstClassifierRule = NULL; struct bcm_classifier_rule *pstClassifierRule = NULL;
...@@ -652,7 +652,7 @@ USHORT ClassifyPacket(PMINI_ADAPTER Adapter,struct sk_buff* skb) ...@@ -652,7 +652,7 @@ USHORT ClassifyPacket(PMINI_ADAPTER Adapter,struct sk_buff* skb)
static BOOLEAN EthCSMatchSrcMACAddress(struct bcm_classifier_rule *pstClassifierRule,PUCHAR Mac) static BOOLEAN EthCSMatchSrcMACAddress(struct bcm_classifier_rule *pstClassifierRule,PUCHAR Mac)
{ {
UINT i=0; UINT i=0;
PMINI_ADAPTER Adapter = GET_BCM_ADAPTER(gblpnetdev); struct bcm_mini_adapter *Adapter = GET_BCM_ADAPTER(gblpnetdev);
if(pstClassifierRule->ucEthCSSrcMACLen==0) if(pstClassifierRule->ucEthCSSrcMACLen==0)
return TRUE; return TRUE;
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, IPV4_DBG, DBG_LVL_ALL, "%s \n",__FUNCTION__); BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, IPV4_DBG, DBG_LVL_ALL, "%s \n",__FUNCTION__);
...@@ -669,7 +669,7 @@ static BOOLEAN EthCSMatchSrcMACAddress(struct bcm_classifier_rule *pstClassifier ...@@ -669,7 +669,7 @@ static BOOLEAN EthCSMatchSrcMACAddress(struct bcm_classifier_rule *pstClassifier
static BOOLEAN EthCSMatchDestMACAddress(struct bcm_classifier_rule *pstClassifierRule,PUCHAR Mac) static BOOLEAN EthCSMatchDestMACAddress(struct bcm_classifier_rule *pstClassifierRule,PUCHAR Mac)
{ {
UINT i=0; UINT i=0;
PMINI_ADAPTER Adapter = GET_BCM_ADAPTER(gblpnetdev); struct bcm_mini_adapter *Adapter = GET_BCM_ADAPTER(gblpnetdev);
if(pstClassifierRule->ucEthCSDestMACLen==0) if(pstClassifierRule->ucEthCSDestMACLen==0)
return TRUE; return TRUE;
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, IPV4_DBG, DBG_LVL_ALL, "%s \n",__FUNCTION__); BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, IPV4_DBG, DBG_LVL_ALL, "%s \n",__FUNCTION__);
...@@ -685,7 +685,7 @@ static BOOLEAN EthCSMatchDestMACAddress(struct bcm_classifier_rule *pstClassifie ...@@ -685,7 +685,7 @@ static BOOLEAN EthCSMatchDestMACAddress(struct bcm_classifier_rule *pstClassifie
static BOOLEAN EthCSMatchEThTypeSAP(struct bcm_classifier_rule *pstClassifierRule,struct sk_buff* skb,PS_ETHCS_PKT_INFO pstEthCsPktInfo) static BOOLEAN EthCSMatchEThTypeSAP(struct bcm_classifier_rule *pstClassifierRule,struct sk_buff* skb,PS_ETHCS_PKT_INFO pstEthCsPktInfo)
{ {
PMINI_ADAPTER Adapter = GET_BCM_ADAPTER(gblpnetdev); struct bcm_mini_adapter *Adapter = GET_BCM_ADAPTER(gblpnetdev);
if((pstClassifierRule->ucEtherTypeLen==0)|| if((pstClassifierRule->ucEtherTypeLen==0)||
(pstClassifierRule->au8EthCSEtherType[0] == 0)) (pstClassifierRule->au8EthCSEtherType[0] == 0))
return TRUE; return TRUE;
...@@ -723,7 +723,7 @@ static BOOLEAN EthCSMatchVLANRules(struct bcm_classifier_rule *pstClassifierRule ...@@ -723,7 +723,7 @@ static BOOLEAN EthCSMatchVLANRules(struct bcm_classifier_rule *pstClassifierRule
BOOLEAN bClassificationSucceed = FALSE; BOOLEAN bClassificationSucceed = FALSE;
USHORT usVLANID; USHORT usVLANID;
B_UINT8 uPriority = 0; B_UINT8 uPriority = 0;
PMINI_ADAPTER Adapter = GET_BCM_ADAPTER(gblpnetdev); struct bcm_mini_adapter *Adapter = GET_BCM_ADAPTER(gblpnetdev);
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, IPV4_DBG, DBG_LVL_ALL, "%s CLS UserPrio:%x CLS VLANID:%x\n",__FUNCTION__,ntohs(*((USHORT *)pstClassifierRule->usUserPriority)),pstClassifierRule->usVLANID); BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, IPV4_DBG, DBG_LVL_ALL, "%s CLS UserPrio:%x CLS VLANID:%x\n",__FUNCTION__,ntohs(*((USHORT *)pstClassifierRule->usUserPriority)),pstClassifierRule->usVLANID);
...@@ -768,7 +768,7 @@ static BOOLEAN EthCSMatchVLANRules(struct bcm_classifier_rule *pstClassifierRule ...@@ -768,7 +768,7 @@ static BOOLEAN EthCSMatchVLANRules(struct bcm_classifier_rule *pstClassifierRule
} }
static BOOLEAN EThCSClassifyPkt(PMINI_ADAPTER Adapter,struct sk_buff* skb, static BOOLEAN EThCSClassifyPkt(struct bcm_mini_adapter *Adapter,struct sk_buff* skb,
PS_ETHCS_PKT_INFO pstEthCsPktInfo, PS_ETHCS_PKT_INFO pstEthCsPktInfo,
struct bcm_classifier_rule *pstClassifierRule, struct bcm_classifier_rule *pstClassifierRule,
B_UINT8 EthCSCupport) B_UINT8 EthCSCupport)
...@@ -801,7 +801,7 @@ static BOOLEAN EThCSClassifyPkt(PMINI_ADAPTER Adapter,struct sk_buff* skb, ...@@ -801,7 +801,7 @@ static BOOLEAN EThCSClassifyPkt(PMINI_ADAPTER Adapter,struct sk_buff* skb,
return bClassificationSucceed; return bClassificationSucceed;
} }
static void EThCSGetPktInfo(PMINI_ADAPTER Adapter,PVOID pvEthPayload, static void EThCSGetPktInfo(struct bcm_mini_adapter *Adapter,PVOID pvEthPayload,
PS_ETHCS_PKT_INFO pstEthCsPktInfo) PS_ETHCS_PKT_INFO pstEthCsPktInfo)
{ {
USHORT u16Etype = ntohs(((struct bcm_eth_header *)pvEthPayload)->u16Etype); USHORT u16Etype = ntohs(((struct bcm_eth_header *)pvEthPayload)->u16Etype);
......
...@@ -41,7 +41,7 @@ SendPacketFromQueue->SetupNextSend->bcm_cmd53 ...@@ -41,7 +41,7 @@ SendPacketFromQueue->SetupNextSend->bcm_cmd53
This function dispatches control packet to the h/w interface This function dispatches control packet to the h/w interface
@return zero(success) or -ve value(failure) @return zero(success) or -ve value(failure)
*/ */
INT SendControlPacket(PMINI_ADAPTER Adapter, char *pControlPacket) INT SendControlPacket(struct bcm_mini_adapter *Adapter, char *pControlPacket)
{ {
struct bcm_leader *PLeader = (struct bcm_leader *)pControlPacket; struct bcm_leader *PLeader = (struct bcm_leader *)pControlPacket;
...@@ -84,7 +84,7 @@ This function despatches the IP packets with the given vcid ...@@ -84,7 +84,7 @@ This function despatches the IP packets with the given vcid
to the target via the host h/w interface. to the target via the host h/w interface.
@return zero(success) or -ve value(failure) @return zero(success) or -ve value(failure)
*/ */
INT SetupNextSend(PMINI_ADAPTER Adapter, struct sk_buff *Packet, USHORT Vcid) INT SetupNextSend(struct bcm_mini_adapter *Adapter, struct sk_buff *Packet, USHORT Vcid)
{ {
int status=0; int status=0;
BOOLEAN bHeaderSupressionEnabled = FALSE; BOOLEAN bHeaderSupressionEnabled = FALSE;
...@@ -180,7 +180,7 @@ INT SetupNextSend(PMINI_ADAPTER Adapter, struct sk_buff *Packet, USHORT Vcid) ...@@ -180,7 +180,7 @@ INT SetupNextSend(PMINI_ADAPTER Adapter, struct sk_buff *Packet, USHORT Vcid)
return status; return status;
} }
static int tx_pending(PMINI_ADAPTER Adapter) static int tx_pending(struct bcm_mini_adapter *Adapter)
{ {
return (atomic_read(&Adapter->TxPktAvail) return (atomic_read(&Adapter->TxPktAvail)
&& MINIMUM_PENDING_DESCRIPTORS < atomic_read(&Adapter->CurrNumFreeTxDesc)) && MINIMUM_PENDING_DESCRIPTORS < atomic_read(&Adapter->CurrNumFreeTxDesc))
...@@ -191,7 +191,7 @@ static int tx_pending(PMINI_ADAPTER Adapter) ...@@ -191,7 +191,7 @@ static int tx_pending(PMINI_ADAPTER Adapter)
@ingroup tx_functions @ingroup tx_functions
Transmit thread Transmit thread
*/ */
int tx_pkt_handler(PMINI_ADAPTER Adapter /**< pointer to adapter object*/ int tx_pkt_handler(struct bcm_mini_adapter *Adapter /**< pointer to adapter object*/
) )
{ {
int status = 0; int status = 0;
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
#include "headers.h" #include "headers.h"
INT ProcessGetHostMibs(PMINI_ADAPTER Adapter, S_MIBS_HOST_STATS_MIBS *pstHostMibs) INT ProcessGetHostMibs(struct bcm_mini_adapter *Adapter, S_MIBS_HOST_STATS_MIBS *pstHostMibs)
{ {
S_SERVICEFLOW_ENTRY *pstServiceFlowEntry = NULL; S_SERVICEFLOW_ENTRY *pstServiceFlowEntry = NULL;
S_PHS_RULE *pstPhsRule = NULL; S_PHS_RULE *pstPhsRule = NULL;
...@@ -101,7 +101,7 @@ VOID GetDroppedAppCntrlPktMibs(S_MIBS_HOST_STATS_MIBS *pstHostMibs, struct bcm_t ...@@ -101,7 +101,7 @@ VOID GetDroppedAppCntrlPktMibs(S_MIBS_HOST_STATS_MIBS *pstHostMibs, struct bcm_t
sizeof(S_MIBS_DROPPED_APP_CNTRL_MESSAGES)); sizeof(S_MIBS_DROPPED_APP_CNTRL_MESSAGES));
} }
VOID CopyMIBSExtendedSFParameters(PMINI_ADAPTER Adapter, CServiceFlowParamSI *psfLocalSet, UINT uiSearchRuleIndex) VOID CopyMIBSExtendedSFParameters(struct bcm_mini_adapter *Adapter, CServiceFlowParamSI *psfLocalSet, UINT uiSearchRuleIndex)
{ {
S_MIBS_EXTSERVICEFLOW_PARAMETERS *t = &Adapter->PackInfo[uiSearchRuleIndex].stMibsExtServiceFlowTable; S_MIBS_EXTSERVICEFLOW_PARAMETERS *t = &Adapter->PackInfo[uiSearchRuleIndex].stMibsExtServiceFlowTable;
......
...@@ -13,7 +13,7 @@ static B_UINT16 CFG_CalculateChecksum(B_UINT8 *pu8Buffer, B_UINT32 u32Size) ...@@ -13,7 +13,7 @@ static B_UINT16 CFG_CalculateChecksum(B_UINT8 *pu8Buffer, B_UINT32 u32Size)
return u16CheckSum; return u16CheckSum;
} }
BOOLEAN IsReqGpioIsLedInNVM(PMINI_ADAPTER Adapter, UINT gpios) BOOLEAN IsReqGpioIsLedInNVM(struct bcm_mini_adapter *Adapter, UINT gpios)
{ {
INT Status; INT Status;
Status = (Adapter->gpioBitMap & gpios) ^ gpios; Status = (Adapter->gpioBitMap & gpios) ^ gpios;
...@@ -23,7 +23,7 @@ BOOLEAN IsReqGpioIsLedInNVM(PMINI_ADAPTER Adapter, UINT gpios) ...@@ -23,7 +23,7 @@ BOOLEAN IsReqGpioIsLedInNVM(PMINI_ADAPTER Adapter, UINT gpios)
return TRUE; return TRUE;
} }
static INT LED_Blink(PMINI_ADAPTER Adapter, UINT GPIO_Num, UCHAR uiLedIndex, static INT LED_Blink(struct bcm_mini_adapter *Adapter, UINT GPIO_Num, UCHAR uiLedIndex,
ULONG timeout, INT num_of_time, LedEventInfo_t currdriverstate) ULONG timeout, INT num_of_time, LedEventInfo_t currdriverstate)
{ {
int Status = STATUS_SUCCESS; int Status = STATUS_SUCCESS;
...@@ -95,7 +95,7 @@ static INT ScaleRateofTransfer(ULONG rate) ...@@ -95,7 +95,7 @@ static INT ScaleRateofTransfer(ULONG rate)
static INT LED_Proportional_Blink(PMINI_ADAPTER Adapter, UCHAR GPIO_Num_tx, static INT LED_Proportional_Blink(struct bcm_mini_adapter *Adapter, UCHAR GPIO_Num_tx,
UCHAR uiTxLedIndex, UCHAR GPIO_Num_rx, UCHAR uiRxLedIndex, UCHAR uiTxLedIndex, UCHAR GPIO_Num_rx, UCHAR uiRxLedIndex,
LedEventInfo_t currdriverstate) LedEventInfo_t currdriverstate)
{ {
...@@ -261,7 +261,7 @@ static INT LED_Proportional_Blink(PMINI_ADAPTER Adapter, UCHAR GPIO_Num_tx, ...@@ -261,7 +261,7 @@ static INT LED_Proportional_Blink(PMINI_ADAPTER Adapter, UCHAR GPIO_Num_tx,
* <OSAL_STATUS_CODE> * <OSAL_STATUS_CODE>
* ----------------------------------------------------------------------------- * -----------------------------------------------------------------------------
*/ */
static INT ValidateDSDParamsChecksum(PMINI_ADAPTER Adapter, ULONG ulParamOffset, static INT ValidateDSDParamsChecksum(struct bcm_mini_adapter *Adapter, ULONG ulParamOffset,
USHORT usParamLen) USHORT usParamLen)
{ {
INT Status = STATUS_SUCCESS; INT Status = STATUS_SUCCESS;
...@@ -347,7 +347,7 @@ static INT ValidateDSDParamsChecksum(PMINI_ADAPTER Adapter, ULONG ulParamOffset, ...@@ -347,7 +347,7 @@ static INT ValidateDSDParamsChecksum(PMINI_ADAPTER Adapter, ULONG ulParamOffset,
* <OSAL_STATUS_CODE> * <OSAL_STATUS_CODE>
* ----------------------------------------------------------------------------- * -----------------------------------------------------------------------------
*/ */
static INT ValidateHWParmStructure(PMINI_ADAPTER Adapter, ULONG ulHwParamOffset) static INT ValidateHWParmStructure(struct bcm_mini_adapter *Adapter, ULONG ulHwParamOffset)
{ {
INT Status = STATUS_SUCCESS; INT Status = STATUS_SUCCESS;
...@@ -371,7 +371,7 @@ static INT ValidateHWParmStructure(PMINI_ADAPTER Adapter, ULONG ulHwParamOffset) ...@@ -371,7 +371,7 @@ static INT ValidateHWParmStructure(PMINI_ADAPTER Adapter, ULONG ulHwParamOffset)
return Status; return Status;
} /* ValidateHWParmStructure() */ } /* ValidateHWParmStructure() */
static int ReadLEDInformationFromEEPROM(PMINI_ADAPTER Adapter, static int ReadLEDInformationFromEEPROM(struct bcm_mini_adapter *Adapter,
UCHAR GPIO_Array[]) UCHAR GPIO_Array[])
{ {
int Status = STATUS_SUCCESS; int Status = STATUS_SUCCESS;
...@@ -477,7 +477,7 @@ static int ReadLEDInformationFromEEPROM(PMINI_ADAPTER Adapter, ...@@ -477,7 +477,7 @@ static int ReadLEDInformationFromEEPROM(PMINI_ADAPTER Adapter,
} }
static int ReadConfigFileStructure(PMINI_ADAPTER Adapter, static int ReadConfigFileStructure(struct bcm_mini_adapter *Adapter,
BOOLEAN *bEnableThread) BOOLEAN *bEnableThread)
{ {
int Status = STATUS_SUCCESS; int Status = STATUS_SUCCESS;
...@@ -580,7 +580,7 @@ static int ReadConfigFileStructure(PMINI_ADAPTER Adapter, ...@@ -580,7 +580,7 @@ static int ReadConfigFileStructure(PMINI_ADAPTER Adapter,
* *
* ----------------------------------------------------------------------------- * -----------------------------------------------------------------------------
*/ */
static VOID LedGpioInit(PMINI_ADAPTER Adapter) static VOID LedGpioInit(struct bcm_mini_adapter *Adapter)
{ {
UINT uiResetValue = 0; UINT uiResetValue = 0;
UINT uiIndex = 0; UINT uiIndex = 0;
...@@ -605,7 +605,7 @@ static VOID LedGpioInit(PMINI_ADAPTER Adapter) ...@@ -605,7 +605,7 @@ static VOID LedGpioInit(PMINI_ADAPTER Adapter)
Adapter->LEDInfo.bIdle_led_off = FALSE; Adapter->LEDInfo.bIdle_led_off = FALSE;
} }
static INT BcmGetGPIOPinInfo(PMINI_ADAPTER Adapter, UCHAR *GPIO_num_tx, static INT BcmGetGPIOPinInfo(struct bcm_mini_adapter *Adapter, UCHAR *GPIO_num_tx,
UCHAR *GPIO_num_rx, UCHAR *uiLedTxIndex, UCHAR *uiLedRxIndex, UCHAR *GPIO_num_rx, UCHAR *uiLedTxIndex, UCHAR *uiLedRxIndex,
LedEventInfo_t currdriverstate) LedEventInfo_t currdriverstate)
{ {
...@@ -645,7 +645,7 @@ static INT BcmGetGPIOPinInfo(PMINI_ADAPTER Adapter, UCHAR *GPIO_num_tx, ...@@ -645,7 +645,7 @@ static INT BcmGetGPIOPinInfo(PMINI_ADAPTER Adapter, UCHAR *GPIO_num_tx,
} }
return STATUS_SUCCESS; return STATUS_SUCCESS;
} }
static VOID LEDControlThread(PMINI_ADAPTER Adapter) static VOID LEDControlThread(struct bcm_mini_adapter *Adapter)
{ {
UINT uiIndex = 0; UINT uiIndex = 0;
UCHAR GPIO_num = 0; UCHAR GPIO_num = 0;
...@@ -857,7 +857,7 @@ static VOID LEDControlThread(PMINI_ADAPTER Adapter) ...@@ -857,7 +857,7 @@ static VOID LEDControlThread(PMINI_ADAPTER Adapter)
Adapter->LEDInfo.led_thread_running = BCM_LED_THREAD_DISABLED; Adapter->LEDInfo.led_thread_running = BCM_LED_THREAD_DISABLED;
} }
int InitLedSettings(PMINI_ADAPTER Adapter) int InitLedSettings(struct bcm_mini_adapter *Adapter)
{ {
int Status = STATUS_SUCCESS; int Status = STATUS_SUCCESS;
BOOLEAN bEnableThread = TRUE; BOOLEAN bEnableThread = TRUE;
......
...@@ -2,54 +2,54 @@ ...@@ -2,54 +2,54 @@
#define DWORD unsigned int #define DWORD unsigned int
static INT BcmDoChipSelect(PMINI_ADAPTER Adapter, UINT offset); static INT BcmDoChipSelect(struct bcm_mini_adapter *Adapter, UINT offset);
static INT BcmGetActiveDSD(PMINI_ADAPTER Adapter); static INT BcmGetActiveDSD(struct bcm_mini_adapter *Adapter);
static INT BcmGetActiveISO(PMINI_ADAPTER Adapter); static INT BcmGetActiveISO(struct bcm_mini_adapter *Adapter);
static UINT BcmGetEEPROMSize(PMINI_ADAPTER Adapter); static UINT BcmGetEEPROMSize(struct bcm_mini_adapter *Adapter);
static INT BcmGetFlashCSInfo(PMINI_ADAPTER Adapter); static INT BcmGetFlashCSInfo(struct bcm_mini_adapter *Adapter);
static UINT BcmGetFlashSectorSize(PMINI_ADAPTER Adapter, UINT FlashSectorSizeSig, UINT FlashSectorSize); static UINT BcmGetFlashSectorSize(struct bcm_mini_adapter *Adapter, UINT FlashSectorSizeSig, UINT FlashSectorSize);
static VOID BcmValidateNvmType(PMINI_ADAPTER Adapter); static VOID BcmValidateNvmType(struct bcm_mini_adapter *Adapter);
static INT BcmGetNvmSize(PMINI_ADAPTER Adapter); static INT BcmGetNvmSize(struct bcm_mini_adapter *Adapter);
static UINT BcmGetFlashSize(PMINI_ADAPTER Adapter); static UINT BcmGetFlashSize(struct bcm_mini_adapter *Adapter);
static NVM_TYPE BcmGetNvmType(PMINI_ADAPTER Adapter); static NVM_TYPE BcmGetNvmType(struct bcm_mini_adapter *Adapter);
static INT BcmGetSectionValEndOffset(PMINI_ADAPTER Adapter, FLASH2X_SECTION_VAL eFlash2xSectionVal); static INT BcmGetSectionValEndOffset(struct bcm_mini_adapter *Adapter, FLASH2X_SECTION_VAL eFlash2xSectionVal);
static B_UINT8 IsOffsetWritable(PMINI_ADAPTER Adapter, UINT uiOffset); static B_UINT8 IsOffsetWritable(struct bcm_mini_adapter *Adapter, UINT uiOffset);
static INT IsSectionWritable(PMINI_ADAPTER Adapter, FLASH2X_SECTION_VAL Section); static INT IsSectionWritable(struct bcm_mini_adapter *Adapter, FLASH2X_SECTION_VAL Section);
static INT IsSectionExistInVendorInfo(PMINI_ADAPTER Adapter, FLASH2X_SECTION_VAL section); static INT IsSectionExistInVendorInfo(struct bcm_mini_adapter *Adapter, FLASH2X_SECTION_VAL section);
static INT ReadDSDPriority(PMINI_ADAPTER Adapter, FLASH2X_SECTION_VAL dsd); static INT ReadDSDPriority(struct bcm_mini_adapter *Adapter, FLASH2X_SECTION_VAL dsd);
static INT ReadDSDSignature(PMINI_ADAPTER Adapter, FLASH2X_SECTION_VAL dsd); static INT ReadDSDSignature(struct bcm_mini_adapter *Adapter, FLASH2X_SECTION_VAL dsd);
static INT ReadISOPriority(PMINI_ADAPTER Adapter, FLASH2X_SECTION_VAL iso); static INT ReadISOPriority(struct bcm_mini_adapter *Adapter, FLASH2X_SECTION_VAL iso);
static INT ReadISOSignature(PMINI_ADAPTER Adapter, FLASH2X_SECTION_VAL iso); static INT ReadISOSignature(struct bcm_mini_adapter *Adapter, FLASH2X_SECTION_VAL iso);
static INT CorruptDSDSig(PMINI_ADAPTER Adapter, FLASH2X_SECTION_VAL eFlash2xSectionVal); static INT CorruptDSDSig(struct bcm_mini_adapter *Adapter, FLASH2X_SECTION_VAL eFlash2xSectionVal);
static INT CorruptISOSig(PMINI_ADAPTER Adapter, FLASH2X_SECTION_VAL eFlash2xSectionVal); static INT CorruptISOSig(struct bcm_mini_adapter *Adapter, FLASH2X_SECTION_VAL eFlash2xSectionVal);
static INT SaveHeaderIfPresent(PMINI_ADAPTER Adapter, PUCHAR pBuff, UINT uiSectAlignAddr); static INT SaveHeaderIfPresent(struct bcm_mini_adapter *Adapter, PUCHAR pBuff, UINT uiSectAlignAddr);
static INT WriteToFlashWithoutSectorErase(PMINI_ADAPTER Adapter, PUINT pBuff, static INT WriteToFlashWithoutSectorErase(struct bcm_mini_adapter *Adapter, PUINT pBuff,
FLASH2X_SECTION_VAL eFlash2xSectionVal, FLASH2X_SECTION_VAL eFlash2xSectionVal,
UINT uiOffset, UINT uiNumBytes); UINT uiOffset, UINT uiNumBytes);
static FLASH2X_SECTION_VAL getHighestPriDSD(PMINI_ADAPTER Adapter); static FLASH2X_SECTION_VAL getHighestPriDSD(struct bcm_mini_adapter *Adapter);
static FLASH2X_SECTION_VAL getHighestPriISO(PMINI_ADAPTER Adapter); static FLASH2X_SECTION_VAL getHighestPriISO(struct bcm_mini_adapter *Adapter);
static INT BeceemFlashBulkRead( static INT BeceemFlashBulkRead(
PMINI_ADAPTER Adapter, struct bcm_mini_adapter *Adapter,
PUINT pBuffer, PUINT pBuffer,
UINT uiOffset, UINT uiOffset,
UINT uiNumBytes); UINT uiNumBytes);
static INT BeceemFlashBulkWrite( static INT BeceemFlashBulkWrite(
PMINI_ADAPTER Adapter, struct bcm_mini_adapter *Adapter,
PUINT pBuffer, PUINT pBuffer,
UINT uiOffset, UINT uiOffset,
UINT uiNumBytes, UINT uiNumBytes,
BOOLEAN bVerify); BOOLEAN bVerify);
static INT GetFlashBaseAddr(PMINI_ADAPTER Adapter); static INT GetFlashBaseAddr(struct bcm_mini_adapter *Adapter);
static INT ReadBeceemEEPROMBulk(PMINI_ADAPTER Adapter,UINT dwAddress, UINT *pdwData, UINT dwNumData); static INT ReadBeceemEEPROMBulk(struct bcm_mini_adapter *Adapter,UINT dwAddress, UINT *pdwData, UINT dwNumData);
// Procedure: ReadEEPROMStatusRegister // Procedure: ReadEEPROMStatusRegister
// //
...@@ -62,7 +62,7 @@ static INT ReadBeceemEEPROMBulk(PMINI_ADAPTER Adapter,UINT dwAddress, UINT *pdwD ...@@ -62,7 +62,7 @@ static INT ReadBeceemEEPROMBulk(PMINI_ADAPTER Adapter,UINT dwAddress, UINT *pdwD
// //
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
static UCHAR ReadEEPROMStatusRegister( PMINI_ADAPTER Adapter ) static UCHAR ReadEEPROMStatusRegister(struct bcm_mini_adapter *Adapter )
{ {
UCHAR uiData = 0; UCHAR uiData = 0;
DWORD dwRetries = MAX_EEPROM_RETRIES*RETRIES_PER_DELAY; DWORD dwRetries = MAX_EEPROM_RETRIES*RETRIES_PER_DELAY;
...@@ -128,7 +128,7 @@ static UCHAR ReadEEPROMStatusRegister( PMINI_ADAPTER Adapter ) ...@@ -128,7 +128,7 @@ static UCHAR ReadEEPROMStatusRegister( PMINI_ADAPTER Adapter )
// OSAL_STATUS_CODE: // OSAL_STATUS_CODE:
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
INT ReadBeceemEEPROMBulk( PMINI_ADAPTER Adapter, INT ReadBeceemEEPROMBulk(struct bcm_mini_adapter *Adapter,
DWORD dwAddress, DWORD dwAddress,
DWORD *pdwData, DWORD *pdwData,
DWORD dwNumWords DWORD dwNumWords
...@@ -255,7 +255,7 @@ INT ReadBeceemEEPROMBulk( PMINI_ADAPTER Adapter, ...@@ -255,7 +255,7 @@ INT ReadBeceemEEPROMBulk( PMINI_ADAPTER Adapter,
// OSAL_STATUS_CODE: // OSAL_STATUS_CODE:
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
INT ReadBeceemEEPROM( PMINI_ADAPTER Adapter, INT ReadBeceemEEPROM(struct bcm_mini_adapter *Adapter,
DWORD uiOffset, DWORD uiOffset,
DWORD *pBuffer DWORD *pBuffer
) )
...@@ -285,7 +285,7 @@ INT ReadBeceemEEPROM( PMINI_ADAPTER Adapter, ...@@ -285,7 +285,7 @@ INT ReadBeceemEEPROM( PMINI_ADAPTER Adapter,
INT ReadMacAddressFromNVM(PMINI_ADAPTER Adapter) INT ReadMacAddressFromNVM(struct bcm_mini_adapter *Adapter)
{ {
INT Status; INT Status;
unsigned char puMacAddr[6]; unsigned char puMacAddr[6];
...@@ -318,7 +318,7 @@ INT ReadMacAddressFromNVM(PMINI_ADAPTER Adapter) ...@@ -318,7 +318,7 @@ INT ReadMacAddressFromNVM(PMINI_ADAPTER Adapter)
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
INT BeceemEEPROMBulkRead( INT BeceemEEPROMBulkRead(
PMINI_ADAPTER Adapter, struct bcm_mini_adapter *Adapter,
PUINT pBuffer, PUINT pBuffer,
UINT uiOffset, UINT uiOffset,
UINT uiNumBytes) UINT uiNumBytes)
...@@ -436,7 +436,7 @@ INT BeceemEEPROMBulkRead( ...@@ -436,7 +436,7 @@ INT BeceemEEPROMBulkRead(
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
static INT BeceemFlashBulkRead( static INT BeceemFlashBulkRead(
PMINI_ADAPTER Adapter, struct bcm_mini_adapter *Adapter,
PUINT pBuffer, PUINT pBuffer,
UINT uiOffset, UINT uiOffset,
UINT uiNumBytes) UINT uiNumBytes)
...@@ -518,7 +518,7 @@ static INT BeceemFlashBulkRead( ...@@ -518,7 +518,7 @@ static INT BeceemFlashBulkRead(
// //
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
static UINT BcmGetFlashSize(PMINI_ADAPTER Adapter) static UINT BcmGetFlashSize(struct bcm_mini_adapter *Adapter)
{ {
if(IsFlash2x(Adapter)) if(IsFlash2x(Adapter))
return (Adapter->psFlash2xCSInfo->OffsetFromDSDStartForDSDHeader + sizeof(DSD_HEADER)); return (Adapter->psFlash2xCSInfo->OffsetFromDSDStartForDSDHeader + sizeof(DSD_HEADER));
...@@ -541,7 +541,7 @@ static UINT BcmGetFlashSize(PMINI_ADAPTER Adapter) ...@@ -541,7 +541,7 @@ static UINT BcmGetFlashSize(PMINI_ADAPTER Adapter)
// //
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
static UINT BcmGetEEPROMSize(PMINI_ADAPTER Adapter) static UINT BcmGetEEPROMSize(struct bcm_mini_adapter *Adapter)
{ {
UINT uiData = 0; UINT uiData = 0;
UINT uiIndex = 0; UINT uiIndex = 0;
...@@ -607,7 +607,7 @@ static UINT BcmGetEEPROMSize(PMINI_ADAPTER Adapter) ...@@ -607,7 +607,7 @@ static UINT BcmGetEEPROMSize(PMINI_ADAPTER Adapter)
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
static INT FlashSectorErase(PMINI_ADAPTER Adapter, static INT FlashSectorErase(struct bcm_mini_adapter *Adapter,
UINT addr, UINT addr,
UINT numOfSectors) UINT numOfSectors)
{ {
...@@ -672,7 +672,7 @@ static INT FlashSectorErase(PMINI_ADAPTER Adapter, ...@@ -672,7 +672,7 @@ static INT FlashSectorErase(PMINI_ADAPTER Adapter,
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
static INT flashByteWrite( static INT flashByteWrite(
PMINI_ADAPTER Adapter, struct bcm_mini_adapter *Adapter,
UINT uiOffset, UINT uiOffset,
PVOID pData) PVOID pData)
{ {
...@@ -762,7 +762,7 @@ static INT flashByteWrite( ...@@ -762,7 +762,7 @@ static INT flashByteWrite(
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
static INT flashWrite( static INT flashWrite(
PMINI_ADAPTER Adapter, struct bcm_mini_adapter *Adapter,
UINT uiOffset, UINT uiOffset,
PVOID pData) PVOID pData)
...@@ -848,7 +848,7 @@ static INT flashWrite( ...@@ -848,7 +848,7 @@ static INT flashWrite(
// //
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
static INT flashByteWriteStatus( static INT flashByteWriteStatus(
PMINI_ADAPTER Adapter, struct bcm_mini_adapter *Adapter,
UINT uiOffset, UINT uiOffset,
PVOID pData) PVOID pData)
{ {
...@@ -935,7 +935,7 @@ static INT flashByteWriteStatus( ...@@ -935,7 +935,7 @@ static INT flashByteWriteStatus(
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
static INT flashWriteStatus( static INT flashWriteStatus(
PMINI_ADAPTER Adapter, struct bcm_mini_adapter *Adapter,
UINT uiOffset, UINT uiOffset,
PVOID pData) PVOID pData)
{ {
...@@ -1014,7 +1014,7 @@ static INT flashWriteStatus( ...@@ -1014,7 +1014,7 @@ static INT flashWriteStatus(
// //
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
static VOID BcmRestoreBlockProtectStatus(PMINI_ADAPTER Adapter,ULONG ulWriteStatus) static VOID BcmRestoreBlockProtectStatus(struct bcm_mini_adapter *Adapter,ULONG ulWriteStatus)
{ {
UINT value; UINT value;
value = (FLASH_CMD_WRITE_ENABLE<< 24); value = (FLASH_CMD_WRITE_ENABLE<< 24);
...@@ -1037,7 +1037,7 @@ static VOID BcmRestoreBlockProtectStatus(PMINI_ADAPTER Adapter,ULONG ulWriteStat ...@@ -1037,7 +1037,7 @@ static VOID BcmRestoreBlockProtectStatus(PMINI_ADAPTER Adapter,ULONG ulWriteStat
// ULONG - Status value before UnProtect. // ULONG - Status value before UnProtect.
// //
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
static ULONG BcmFlashUnProtectBlock(PMINI_ADAPTER Adapter,UINT uiOffset, UINT uiLength) static ULONG BcmFlashUnProtectBlock(struct bcm_mini_adapter *Adapter,UINT uiOffset, UINT uiLength)
{ {
ULONG ulStatus = 0; ULONG ulStatus = 0;
ULONG ulWriteStatus = 0; ULONG ulWriteStatus = 0;
...@@ -1146,7 +1146,7 @@ static ULONG BcmFlashUnProtectBlock(PMINI_ADAPTER Adapter,UINT uiOffset, UINT ui ...@@ -1146,7 +1146,7 @@ static ULONG BcmFlashUnProtectBlock(PMINI_ADAPTER Adapter,UINT uiOffset, UINT ui
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
static INT BeceemFlashBulkWrite( static INT BeceemFlashBulkWrite(
PMINI_ADAPTER Adapter, struct bcm_mini_adapter *Adapter,
PUINT pBuffer, PUINT pBuffer,
UINT uiOffset, UINT uiOffset,
UINT uiNumBytes, UINT uiNumBytes,
...@@ -1365,7 +1365,7 @@ static INT BeceemFlashBulkWrite( ...@@ -1365,7 +1365,7 @@ static INT BeceemFlashBulkWrite(
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
static INT BeceemFlashBulkWriteStatus( static INT BeceemFlashBulkWriteStatus(
PMINI_ADAPTER Adapter, struct bcm_mini_adapter *Adapter,
PUINT pBuffer, PUINT pBuffer,
UINT uiOffset, UINT uiOffset,
UINT uiNumBytes, UINT uiNumBytes,
...@@ -1545,7 +1545,7 @@ static INT BeceemFlashBulkWriteStatus( ...@@ -1545,7 +1545,7 @@ static INT BeceemFlashBulkWriteStatus(
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
INT PropagateCalParamsFromEEPROMToMemory(PMINI_ADAPTER Adapter) INT PropagateCalParamsFromEEPROMToMemory(struct bcm_mini_adapter *Adapter)
{ {
PCHAR pBuff = kmalloc(BUFFER_4K, GFP_KERNEL); PCHAR pBuff = kmalloc(BUFFER_4K, GFP_KERNEL);
UINT uiEepromSize = 0; UINT uiEepromSize = 0;
...@@ -1614,7 +1614,7 @@ INT PropagateCalParamsFromEEPROMToMemory(PMINI_ADAPTER Adapter) ...@@ -1614,7 +1614,7 @@ INT PropagateCalParamsFromEEPROMToMemory(PMINI_ADAPTER Adapter)
// //
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
INT PropagateCalParamsFromFlashToMemory(PMINI_ADAPTER Adapter) INT PropagateCalParamsFromFlashToMemory(struct bcm_mini_adapter *Adapter)
{ {
PCHAR pBuff, pPtr; PCHAR pBuff, pPtr;
UINT uiEepromSize = 0; UINT uiEepromSize = 0;
...@@ -1699,7 +1699,7 @@ INT PropagateCalParamsFromFlashToMemory(PMINI_ADAPTER Adapter) ...@@ -1699,7 +1699,7 @@ INT PropagateCalParamsFromFlashToMemory(PMINI_ADAPTER Adapter)
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
static INT BeceemEEPROMReadBackandVerify( static INT BeceemEEPROMReadBackandVerify(
PMINI_ADAPTER Adapter, struct bcm_mini_adapter *Adapter,
PUINT pBuffer, PUINT pBuffer,
UINT uiOffset, UINT uiOffset,
UINT uiNumBytes) UINT uiNumBytes)
...@@ -1798,7 +1798,7 @@ static VOID BcmSwapWord(UINT *ptr1) { ...@@ -1798,7 +1798,7 @@ static VOID BcmSwapWord(UINT *ptr1) {
// OSAL_STATUS_CODE // OSAL_STATUS_CODE
// //
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
static INT BeceemEEPROMWritePage( PMINI_ADAPTER Adapter, UINT uiData[], UINT uiOffset ) static INT BeceemEEPROMWritePage(struct bcm_mini_adapter *Adapter, UINT uiData[], UINT uiOffset )
{ {
UINT uiRetries = MAX_EEPROM_RETRIES*RETRIES_PER_DELAY; UINT uiRetries = MAX_EEPROM_RETRIES*RETRIES_PER_DELAY;
UINT uiStatus = 0; UINT uiStatus = 0;
...@@ -1934,7 +1934,7 @@ static INT BeceemEEPROMWritePage( PMINI_ADAPTER Adapter, UINT uiData[], UINT uiO ...@@ -1934,7 +1934,7 @@ static INT BeceemEEPROMWritePage( PMINI_ADAPTER Adapter, UINT uiData[], UINT uiO
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
INT BeceemEEPROMBulkWrite( INT BeceemEEPROMBulkWrite(
PMINI_ADAPTER Adapter, struct bcm_mini_adapter *Adapter,
PUCHAR pBuffer, PUCHAR pBuffer,
UINT uiOffset, UINT uiOffset,
UINT uiNumBytes, UINT uiNumBytes,
...@@ -2036,7 +2036,7 @@ INT BeceemEEPROMBulkWrite( ...@@ -2036,7 +2036,7 @@ INT BeceemEEPROMBulkWrite(
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
INT BeceemNVMRead( INT BeceemNVMRead(
PMINI_ADAPTER Adapter, struct bcm_mini_adapter *Adapter,
PUINT pBuffer, PUINT pBuffer,
UINT uiOffset, UINT uiOffset,
UINT uiNumBytes) UINT uiNumBytes)
...@@ -2099,7 +2099,7 @@ INT BeceemNVMRead( ...@@ -2099,7 +2099,7 @@ INT BeceemNVMRead(
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
INT BeceemNVMWrite( INT BeceemNVMWrite(
PMINI_ADAPTER Adapter, struct bcm_mini_adapter *Adapter,
PUINT pBuffer, PUINT pBuffer,
UINT uiOffset, UINT uiOffset,
UINT uiNumBytes, UINT uiNumBytes,
...@@ -2233,7 +2233,7 @@ INT BeceemNVMWrite( ...@@ -2233,7 +2233,7 @@ INT BeceemNVMWrite(
// <FAILURE> - if failed. // <FAILURE> - if failed.
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
INT BcmUpdateSectorSize(PMINI_ADAPTER Adapter,UINT uiSectorSize) INT BcmUpdateSectorSize(struct bcm_mini_adapter *Adapter,UINT uiSectorSize)
{ {
INT Status = -1; INT Status = -1;
FLASH_CS_INFO sFlashCsInfo = {0}; FLASH_CS_INFO sFlashCsInfo = {0};
...@@ -2308,7 +2308,7 @@ INT BcmUpdateSectorSize(PMINI_ADAPTER Adapter,UINT uiSectorSize) ...@@ -2308,7 +2308,7 @@ INT BcmUpdateSectorSize(PMINI_ADAPTER Adapter,UINT uiSectorSize)
// //
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
static UINT BcmGetFlashSectorSize(PMINI_ADAPTER Adapter, UINT FlashSectorSizeSig, UINT FlashSectorSize) static UINT BcmGetFlashSectorSize(struct bcm_mini_adapter *Adapter, UINT FlashSectorSizeSig, UINT FlashSectorSize)
{ {
UINT uiSectorSize = 0; UINT uiSectorSize = 0;
UINT uiSectorSig = 0; UINT uiSectorSig = 0;
...@@ -2377,7 +2377,7 @@ static UINT BcmGetFlashSectorSize(PMINI_ADAPTER Adapter, UINT FlashSectorSizeSig ...@@ -2377,7 +2377,7 @@ static UINT BcmGetFlashSectorSize(PMINI_ADAPTER Adapter, UINT FlashSectorSizeSig
// <OSAL_STATUS_CODE> // <OSAL_STATUS_CODE>
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
static INT BcmInitEEPROMQueues(PMINI_ADAPTER Adapter) static INT BcmInitEEPROMQueues(struct bcm_mini_adapter *Adapter)
{ {
UINT value = 0; UINT value = 0;
/* CHIP Bug : Clear the Avail bits on the Read queue. The default /* CHIP Bug : Clear the Avail bits on the Read queue. The default
...@@ -2413,7 +2413,7 @@ static INT BcmInitEEPROMQueues(PMINI_ADAPTER Adapter) ...@@ -2413,7 +2413,7 @@ static INT BcmInitEEPROMQueues(PMINI_ADAPTER Adapter)
// <OSAL_STATUS_CODE> // <OSAL_STATUS_CODE>
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
INT BcmInitNVM(PMINI_ADAPTER ps_adapter) INT BcmInitNVM(struct bcm_mini_adapter *ps_adapter)
{ {
BcmValidateNvmType(ps_adapter); BcmValidateNvmType(ps_adapter);
BcmInitEEPROMQueues(ps_adapter); BcmInitEEPROMQueues(ps_adapter);
...@@ -2445,7 +2445,7 @@ INT BcmInitNVM(PMINI_ADAPTER ps_adapter) ...@@ -2445,7 +2445,7 @@ INT BcmInitNVM(PMINI_ADAPTER ps_adapter)
*/ */
/***************************************************************************/ /***************************************************************************/
static INT BcmGetNvmSize(PMINI_ADAPTER Adapter) static INT BcmGetNvmSize(struct bcm_mini_adapter *Adapter)
{ {
if(Adapter->eNVMType == NVM_EEPROM) if(Adapter->eNVMType == NVM_EEPROM)
{ {
...@@ -2469,7 +2469,7 @@ static INT BcmGetNvmSize(PMINI_ADAPTER Adapter) ...@@ -2469,7 +2469,7 @@ static INT BcmGetNvmSize(PMINI_ADAPTER Adapter)
// Returns: // Returns:
// <VOID> // <VOID>
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
static VOID BcmValidateNvmType(PMINI_ADAPTER Adapter) static VOID BcmValidateNvmType(struct bcm_mini_adapter *Adapter)
{ {
// //
...@@ -2495,7 +2495,7 @@ static VOID BcmValidateNvmType(PMINI_ADAPTER Adapter) ...@@ -2495,7 +2495,7 @@ static VOID BcmValidateNvmType(PMINI_ADAPTER Adapter)
// Returns: // Returns:
// Flash ID // Flash ID
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
static ULONG BcmReadFlashRDID(PMINI_ADAPTER Adapter) static ULONG BcmReadFlashRDID(struct bcm_mini_adapter *Adapter)
{ {
ULONG ulRDID = 0; ULONG ulRDID = 0;
UINT value; UINT value;
...@@ -2518,7 +2518,7 @@ static ULONG BcmReadFlashRDID(PMINI_ADAPTER Adapter) ...@@ -2518,7 +2518,7 @@ static ULONG BcmReadFlashRDID(PMINI_ADAPTER Adapter)
} }
INT BcmAllocFlashCSStructure(PMINI_ADAPTER psAdapter) INT BcmAllocFlashCSStructure(struct bcm_mini_adapter *psAdapter)
{ {
if(psAdapter == NULL) if(psAdapter == NULL)
{ {
...@@ -2552,7 +2552,7 @@ INT BcmAllocFlashCSStructure(PMINI_ADAPTER psAdapter) ...@@ -2552,7 +2552,7 @@ INT BcmAllocFlashCSStructure(PMINI_ADAPTER psAdapter)
return STATUS_SUCCESS; return STATUS_SUCCESS;
} }
INT BcmDeAllocFlashCSStructure(PMINI_ADAPTER psAdapter) INT BcmDeAllocFlashCSStructure(struct bcm_mini_adapter *psAdapter)
{ {
if(psAdapter == NULL) if(psAdapter == NULL)
{ {
...@@ -2565,7 +2565,7 @@ INT BcmDeAllocFlashCSStructure(PMINI_ADAPTER psAdapter) ...@@ -2565,7 +2565,7 @@ INT BcmDeAllocFlashCSStructure(PMINI_ADAPTER psAdapter)
return STATUS_SUCCESS ; return STATUS_SUCCESS ;
} }
static INT BcmDumpFlash2XCSStructure(PFLASH2X_CS_INFO psFlash2xCSInfo,PMINI_ADAPTER Adapter) static INT BcmDumpFlash2XCSStructure(PFLASH2X_CS_INFO psFlash2xCSInfo,struct bcm_mini_adapter *Adapter)
{ {
UINT Index = 0; UINT Index = 0;
BCM_DEBUG_PRINT(Adapter,DBG_TYPE_OTHERS, NVM_RW, DBG_LVL_ALL, "**********************FLASH2X CS Structure *******************"); BCM_DEBUG_PRINT(Adapter,DBG_TYPE_OTHERS, NVM_RW, DBG_LVL_ALL, "**********************FLASH2X CS Structure *******************");
...@@ -2715,14 +2715,14 @@ static INT ConvertEndianOfCSStructure(PFLASH_CS_INFO psFlashCSInfo) ...@@ -2715,14 +2715,14 @@ static INT ConvertEndianOfCSStructure(PFLASH_CS_INFO psFlashCSInfo)
return STATUS_SUCCESS; return STATUS_SUCCESS;
} }
static INT IsSectionExistInVendorInfo(PMINI_ADAPTER Adapter, FLASH2X_SECTION_VAL section) static INT IsSectionExistInVendorInfo(struct bcm_mini_adapter *Adapter, FLASH2X_SECTION_VAL section)
{ {
return ( Adapter->uiVendorExtnFlag && return ( Adapter->uiVendorExtnFlag &&
(Adapter->psFlash2xVendorInfo->VendorSection[section].AccessFlags & FLASH2X_SECTION_PRESENT) && (Adapter->psFlash2xVendorInfo->VendorSection[section].AccessFlags & FLASH2X_SECTION_PRESENT) &&
(Adapter->psFlash2xVendorInfo->VendorSection[section].OffsetFromZeroForSectionStart != UNINIT_PTR_IN_CS) ); (Adapter->psFlash2xVendorInfo->VendorSection[section].OffsetFromZeroForSectionStart != UNINIT_PTR_IN_CS) );
} }
static VOID UpdateVendorInfo(PMINI_ADAPTER Adapter) static VOID UpdateVendorInfo(struct bcm_mini_adapter *Adapter)
{ {
B_UINT32 i = 0; B_UINT32 i = 0;
UINT uiSizeSection = 0; UINT uiSizeSection = 0;
...@@ -2813,7 +2813,7 @@ static VOID UpdateVendorInfo(PMINI_ADAPTER Adapter) ...@@ -2813,7 +2813,7 @@ static VOID UpdateVendorInfo(PMINI_ADAPTER Adapter)
// <VOID> // <VOID>
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
static INT BcmGetFlashCSInfo(PMINI_ADAPTER Adapter) static INT BcmGetFlashCSInfo(struct bcm_mini_adapter *Adapter)
{ {
//FLASH_CS_INFO sFlashCsInfo = {0}; //FLASH_CS_INFO sFlashCsInfo = {0};
...@@ -2960,7 +2960,7 @@ static INT BcmGetFlashCSInfo(PMINI_ADAPTER Adapter) ...@@ -2960,7 +2960,7 @@ static INT BcmGetFlashCSInfo(PMINI_ADAPTER Adapter)
// //
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
static NVM_TYPE BcmGetNvmType(PMINI_ADAPTER Adapter) static NVM_TYPE BcmGetNvmType(struct bcm_mini_adapter *Adapter)
{ {
UINT uiData = 0; UINT uiData = 0;
...@@ -3004,7 +3004,7 @@ static NVM_TYPE BcmGetNvmType(PMINI_ADAPTER Adapter) ...@@ -3004,7 +3004,7 @@ static NVM_TYPE BcmGetNvmType(PMINI_ADAPTER Adapter)
* On Failure -returns STATUS_FAILURE * On Failure -returns STATUS_FAILURE
**/ **/
INT BcmGetSectionValStartOffset(PMINI_ADAPTER Adapter, FLASH2X_SECTION_VAL eFlashSectionVal) INT BcmGetSectionValStartOffset(struct bcm_mini_adapter *Adapter, FLASH2X_SECTION_VAL eFlashSectionVal)
{ {
/* /*
* Considering all the section for which end offset can be calculated or directly given * Considering all the section for which end offset can be calculated or directly given
...@@ -3098,7 +3098,7 @@ INT BcmGetSectionValStartOffset(PMINI_ADAPTER Adapter, FLASH2X_SECTION_VAL eFlas ...@@ -3098,7 +3098,7 @@ INT BcmGetSectionValStartOffset(PMINI_ADAPTER Adapter, FLASH2X_SECTION_VAL eFlas
* On Failure -returns STATUS_FAILURE * On Failure -returns STATUS_FAILURE
**/ **/
INT BcmGetSectionValEndOffset(PMINI_ADAPTER Adapter, FLASH2X_SECTION_VAL eFlash2xSectionVal) INT BcmGetSectionValEndOffset(struct bcm_mini_adapter *Adapter, FLASH2X_SECTION_VAL eFlash2xSectionVal)
{ {
INT SectEndOffset = 0 ; INT SectEndOffset = 0 ;
SectEndOffset = INVALID_OFFSET; SectEndOffset = INVALID_OFFSET;
...@@ -3188,7 +3188,7 @@ INT BcmGetSectionValEndOffset(PMINI_ADAPTER Adapter, FLASH2X_SECTION_VAL eFlash2 ...@@ -3188,7 +3188,7 @@ INT BcmGetSectionValEndOffset(PMINI_ADAPTER Adapter, FLASH2X_SECTION_VAL eFlash2
*/ */
INT BcmFlash2xBulkRead( INT BcmFlash2xBulkRead(
PMINI_ADAPTER Adapter, struct bcm_mini_adapter *Adapter,
PUINT pBuffer, PUINT pBuffer,
FLASH2X_SECTION_VAL eFlash2xSectionVal, FLASH2X_SECTION_VAL eFlash2xSectionVal,
UINT uiOffsetWithinSectionVal, UINT uiOffsetWithinSectionVal,
...@@ -3257,7 +3257,7 @@ INT BcmFlash2xBulkRead( ...@@ -3257,7 +3257,7 @@ INT BcmFlash2xBulkRead(
*/ */
INT BcmFlash2xBulkWrite( INT BcmFlash2xBulkWrite(
PMINI_ADAPTER Adapter, struct bcm_mini_adapter *Adapter,
PUINT pBuffer, PUINT pBuffer,
FLASH2X_SECTION_VAL eFlash2xSectVal, FLASH2X_SECTION_VAL eFlash2xSectVal,
UINT uiOffset, UINT uiOffset,
...@@ -3322,7 +3322,7 @@ INT BcmFlash2xBulkWrite( ...@@ -3322,7 +3322,7 @@ INT BcmFlash2xBulkWrite(
* Return STATUS_SUCESS if get success in setting the right DSD else negaive error code * Return STATUS_SUCESS if get success in setting the right DSD else negaive error code
* *
**/ **/
static INT BcmGetActiveDSD(PMINI_ADAPTER Adapter) static INT BcmGetActiveDSD(struct bcm_mini_adapter *Adapter)
{ {
FLASH2X_SECTION_VAL uiHighestPriDSD = 0 ; FLASH2X_SECTION_VAL uiHighestPriDSD = 0 ;
...@@ -3371,7 +3371,7 @@ static INT BcmGetActiveDSD(PMINI_ADAPTER Adapter) ...@@ -3371,7 +3371,7 @@ static INT BcmGetActiveDSD(PMINI_ADAPTER Adapter)
* *
**/ **/
static INT BcmGetActiveISO(PMINI_ADAPTER Adapter) static INT BcmGetActiveISO(struct bcm_mini_adapter *Adapter)
{ {
INT HighestPriISO = 0 ; INT HighestPriISO = 0 ;
...@@ -3399,7 +3399,7 @@ static INT BcmGetActiveISO(PMINI_ADAPTER Adapter) ...@@ -3399,7 +3399,7 @@ static INT BcmGetActiveISO(PMINI_ADAPTER Adapter)
* Failure:-FALSE, offset is RO * Failure:-FALSE, offset is RO
* *
**/ **/
B_UINT8 IsOffsetWritable(PMINI_ADAPTER Adapter, UINT uiOffset) B_UINT8 IsOffsetWritable(struct bcm_mini_adapter *Adapter, UINT uiOffset)
{ {
UINT uiSectorNum = 0; UINT uiSectorNum = 0;
UINT uiWordOfSectorPermission =0; UINT uiWordOfSectorPermission =0;
...@@ -3424,7 +3424,7 @@ B_UINT8 IsOffsetWritable(PMINI_ADAPTER Adapter, UINT uiOffset) ...@@ -3424,7 +3424,7 @@ B_UINT8 IsOffsetWritable(PMINI_ADAPTER Adapter, UINT uiOffset)
static INT BcmDumpFlash2xSectionBitMap(PFLASH2X_BITMAP psFlash2xBitMap) static INT BcmDumpFlash2xSectionBitMap(PFLASH2X_BITMAP psFlash2xBitMap)
{ {
PMINI_ADAPTER Adapter = GET_BCM_ADAPTER(gblpnetdev); struct bcm_mini_adapter *Adapter = GET_BCM_ADAPTER(gblpnetdev);
BCM_DEBUG_PRINT(Adapter,DBG_TYPE_OTHERS, NVM_RW, DBG_LVL_ALL, "***************Flash 2.x Section Bitmap***************"); BCM_DEBUG_PRINT(Adapter,DBG_TYPE_OTHERS, NVM_RW, DBG_LVL_ALL, "***************Flash 2.x Section Bitmap***************");
BCM_DEBUG_PRINT(Adapter,DBG_TYPE_OTHERS, NVM_RW, DBG_LVL_ALL,"ISO_IMAGE1 :0X%x", psFlash2xBitMap->ISO_IMAGE1); BCM_DEBUG_PRINT(Adapter,DBG_TYPE_OTHERS, NVM_RW, DBG_LVL_ALL,"ISO_IMAGE1 :0X%x", psFlash2xBitMap->ISO_IMAGE1);
BCM_DEBUG_PRINT(Adapter,DBG_TYPE_OTHERS, NVM_RW, DBG_LVL_ALL,"ISO_IMAGE2 :0X%x", psFlash2xBitMap->ISO_IMAGE2); BCM_DEBUG_PRINT(Adapter,DBG_TYPE_OTHERS, NVM_RW, DBG_LVL_ALL,"ISO_IMAGE2 :0X%x", psFlash2xBitMap->ISO_IMAGE2);
...@@ -3456,7 +3456,7 @@ static INT BcmDumpFlash2xSectionBitMap(PFLASH2X_BITMAP psFlash2xBitMap) ...@@ -3456,7 +3456,7 @@ static INT BcmDumpFlash2xSectionBitMap(PFLASH2X_BITMAP psFlash2xBitMap)
* Failure:- negative error code * Failure:- negative error code
**/ **/
INT BcmGetFlash2xSectionalBitMap(PMINI_ADAPTER Adapter, PFLASH2X_BITMAP psFlash2xBitMap) INT BcmGetFlash2xSectionalBitMap(struct bcm_mini_adapter *Adapter, PFLASH2X_BITMAP psFlash2xBitMap)
{ {
...@@ -3752,7 +3752,7 @@ BcmSetActiveSection :- Set Active section is used to make priority field highest ...@@ -3752,7 +3752,7 @@ BcmSetActiveSection :- Set Active section is used to make priority field highest
Return Value:- Make the priorit highest else return erorr code Return Value:- Make the priorit highest else return erorr code
**/ **/
INT BcmSetActiveSection(PMINI_ADAPTER Adapter, FLASH2X_SECTION_VAL eFlash2xSectVal) INT BcmSetActiveSection(struct bcm_mini_adapter *Adapter, FLASH2X_SECTION_VAL eFlash2xSectVal)
{ {
unsigned int SectImagePriority = 0; unsigned int SectImagePriority = 0;
INT Status =STATUS_SUCCESS; INT Status =STATUS_SUCCESS;
...@@ -3958,7 +3958,7 @@ BcmCopyISO - Used only for copying the ISO section ...@@ -3958,7 +3958,7 @@ BcmCopyISO - Used only for copying the ISO section
Return value:- SUCCESS if copies successfully else negative error code Return value:- SUCCESS if copies successfully else negative error code
**/ **/
INT BcmCopyISO(PMINI_ADAPTER Adapter, FLASH2X_COPY_SECTION sCopySectStrut) INT BcmCopyISO(struct bcm_mini_adapter *Adapter, FLASH2X_COPY_SECTION sCopySectStrut)
{ {
PCHAR Buff = NULL; PCHAR Buff = NULL;
...@@ -4289,7 +4289,7 @@ Return Value :- ...@@ -4289,7 +4289,7 @@ Return Value :-
**/ **/
INT BcmFlash2xCorruptSig(PMINI_ADAPTER Adapter, FLASH2X_SECTION_VAL eFlash2xSectionVal) INT BcmFlash2xCorruptSig(struct bcm_mini_adapter *Adapter, FLASH2X_SECTION_VAL eFlash2xSectionVal)
{ {
INT Status = STATUS_SUCCESS ; INT Status = STATUS_SUCCESS ;
...@@ -4321,7 +4321,7 @@ Return Value :- ...@@ -4321,7 +4321,7 @@ Return Value :-
Failure :-Return negative error code Failure :-Return negative error code
**/ **/
INT BcmFlash2xWriteSig(PMINI_ADAPTER Adapter, FLASH2X_SECTION_VAL eFlashSectionVal) INT BcmFlash2xWriteSig(struct bcm_mini_adapter *Adapter, FLASH2X_SECTION_VAL eFlashSectionVal)
{ {
UINT uiSignature = 0 ; UINT uiSignature = 0 ;
...@@ -4394,7 +4394,7 @@ Return values:-Return TRUE is request is valid else FALSE. ...@@ -4394,7 +4394,7 @@ Return values:-Return TRUE is request is valid else FALSE.
**/ **/
INT validateFlash2xReadWrite(PMINI_ADAPTER Adapter, PFLASH2X_READWRITE psFlash2xReadWrite) INT validateFlash2xReadWrite(struct bcm_mini_adapter *Adapter, PFLASH2X_READWRITE psFlash2xReadWrite)
{ {
UINT uiNumOfBytes = 0 ; UINT uiNumOfBytes = 0 ;
UINT uiSectStartOffset = 0 ; UINT uiSectStartOffset = 0 ;
...@@ -4459,7 +4459,7 @@ Return value:- ...@@ -4459,7 +4459,7 @@ Return value:-
return TRUE if flah2.x of hgher version else return false. return TRUE if flah2.x of hgher version else return false.
**/ **/
INT IsFlash2x(PMINI_ADAPTER Adapter) INT IsFlash2x(struct bcm_mini_adapter *Adapter)
{ {
if(Adapter->uiFlashLayoutMajorVersion >= FLASH_2X_MAJOR_NUMBER) if(Adapter->uiFlashLayoutMajorVersion >= FLASH_2X_MAJOR_NUMBER)
return TRUE ; return TRUE ;
...@@ -4474,7 +4474,7 @@ Return Value:- ...@@ -4474,7 +4474,7 @@ Return Value:-
Success :- Base Address of the Flash Success :- Base Address of the Flash
**/ **/
static INT GetFlashBaseAddr(PMINI_ADAPTER Adapter) static INT GetFlashBaseAddr(struct bcm_mini_adapter *Adapter)
{ {
UINT uiBaseAddr = 0; UINT uiBaseAddr = 0;
...@@ -4525,7 +4525,7 @@ Return Values- ...@@ -4525,7 +4525,7 @@ Return Values-
**/ **/
INT BcmCopySection(PMINI_ADAPTER Adapter, INT BcmCopySection(struct bcm_mini_adapter *Adapter,
FLASH2X_SECTION_VAL SrcSection, FLASH2X_SECTION_VAL SrcSection,
FLASH2X_SECTION_VAL DstSection, FLASH2X_SECTION_VAL DstSection,
UINT offset, UINT offset,
...@@ -4642,7 +4642,7 @@ Return value :- ...@@ -4642,7 +4642,7 @@ Return value :-
**/ **/
INT SaveHeaderIfPresent(PMINI_ADAPTER Adapter, PUCHAR pBuff, UINT uiOffset) INT SaveHeaderIfPresent(struct bcm_mini_adapter *Adapter, PUCHAR pBuff, UINT uiOffset)
{ {
UINT offsetToProtect = 0,HeaderSizeToProtect =0; UINT offsetToProtect = 0,HeaderSizeToProtect =0;
BOOLEAN bHasHeader = FALSE ; BOOLEAN bHasHeader = FALSE ;
...@@ -4715,7 +4715,7 @@ BcmDoChipSelect : This will selcet the appropriate chip for writing. ...@@ -4715,7 +4715,7 @@ BcmDoChipSelect : This will selcet the appropriate chip for writing.
OutPut:- OutPut:-
Select the Appropriate chip and retrn status Success Select the Appropriate chip and retrn status Success
**/ **/
static INT BcmDoChipSelect(PMINI_ADAPTER Adapter, UINT offset) static INT BcmDoChipSelect(struct bcm_mini_adapter *Adapter, UINT offset)
{ {
UINT FlashConfig = 0; UINT FlashConfig = 0;
INT ChipNum = 0; INT ChipNum = 0;
...@@ -4791,7 +4791,7 @@ static INT BcmDoChipSelect(PMINI_ADAPTER Adapter, UINT offset) ...@@ -4791,7 +4791,7 @@ static INT BcmDoChipSelect(PMINI_ADAPTER Adapter, UINT offset)
return STATUS_SUCCESS; return STATUS_SUCCESS;
} }
INT ReadDSDSignature(PMINI_ADAPTER Adapter, FLASH2X_SECTION_VAL dsd) INT ReadDSDSignature(struct bcm_mini_adapter *Adapter, FLASH2X_SECTION_VAL dsd)
{ {
UINT uiDSDsig = 0; UINT uiDSDsig = 0;
//UINT sigoffsetInMap = 0; //UINT sigoffsetInMap = 0;
...@@ -4816,7 +4816,7 @@ INT ReadDSDSignature(PMINI_ADAPTER Adapter, FLASH2X_SECTION_VAL dsd) ...@@ -4816,7 +4816,7 @@ INT ReadDSDSignature(PMINI_ADAPTER Adapter, FLASH2X_SECTION_VAL dsd)
return uiDSDsig ; return uiDSDsig ;
} }
INT ReadDSDPriority(PMINI_ADAPTER Adapter, FLASH2X_SECTION_VAL dsd) INT ReadDSDPriority(struct bcm_mini_adapter *Adapter, FLASH2X_SECTION_VAL dsd)
{ {
//UINT priOffsetInMap = 0 ; //UINT priOffsetInMap = 0 ;
unsigned int uiDSDPri = STATUS_FAILURE; unsigned int uiDSDPri = STATUS_FAILURE;
...@@ -4839,7 +4839,7 @@ INT ReadDSDPriority(PMINI_ADAPTER Adapter, FLASH2X_SECTION_VAL dsd) ...@@ -4839,7 +4839,7 @@ INT ReadDSDPriority(PMINI_ADAPTER Adapter, FLASH2X_SECTION_VAL dsd)
} }
return uiDSDPri; return uiDSDPri;
} }
FLASH2X_SECTION_VAL getHighestPriDSD(PMINI_ADAPTER Adapter) FLASH2X_SECTION_VAL getHighestPriDSD(struct bcm_mini_adapter *Adapter)
{ {
INT DSDHighestPri = STATUS_FAILURE; INT DSDHighestPri = STATUS_FAILURE;
INT DsdPri= 0 ; INT DsdPri= 0 ;
...@@ -4873,7 +4873,7 @@ FLASH2X_SECTION_VAL getHighestPriDSD(PMINI_ADAPTER Adapter) ...@@ -4873,7 +4873,7 @@ FLASH2X_SECTION_VAL getHighestPriDSD(PMINI_ADAPTER Adapter)
return HighestPriDSD ; return HighestPriDSD ;
} }
INT ReadISOSignature(PMINI_ADAPTER Adapter, FLASH2X_SECTION_VAL iso) INT ReadISOSignature(struct bcm_mini_adapter *Adapter, FLASH2X_SECTION_VAL iso)
{ {
UINT uiISOsig = 0; UINT uiISOsig = 0;
//UINT sigoffsetInMap = 0; //UINT sigoffsetInMap = 0;
...@@ -4898,7 +4898,7 @@ INT ReadISOSignature(PMINI_ADAPTER Adapter, FLASH2X_SECTION_VAL iso) ...@@ -4898,7 +4898,7 @@ INT ReadISOSignature(PMINI_ADAPTER Adapter, FLASH2X_SECTION_VAL iso)
return uiISOsig ; return uiISOsig ;
} }
INT ReadISOPriority(PMINI_ADAPTER Adapter, FLASH2X_SECTION_VAL iso) INT ReadISOPriority(struct bcm_mini_adapter *Adapter, FLASH2X_SECTION_VAL iso)
{ {
unsigned int ISOPri = STATUS_FAILURE; unsigned int ISOPri = STATUS_FAILURE;
...@@ -4919,7 +4919,7 @@ INT ReadISOPriority(PMINI_ADAPTER Adapter, FLASH2X_SECTION_VAL iso) ...@@ -4919,7 +4919,7 @@ INT ReadISOPriority(PMINI_ADAPTER Adapter, FLASH2X_SECTION_VAL iso)
} }
return ISOPri; return ISOPri;
} }
FLASH2X_SECTION_VAL getHighestPriISO(PMINI_ADAPTER Adapter) FLASH2X_SECTION_VAL getHighestPriISO(struct bcm_mini_adapter *Adapter)
{ {
INT ISOHighestPri = STATUS_FAILURE; INT ISOHighestPri = STATUS_FAILURE;
INT ISOPri= 0 ; INT ISOPri= 0 ;
...@@ -4943,7 +4943,7 @@ FLASH2X_SECTION_VAL getHighestPriISO(PMINI_ADAPTER Adapter) ...@@ -4943,7 +4943,7 @@ FLASH2X_SECTION_VAL getHighestPriISO(PMINI_ADAPTER Adapter)
BCM_DEBUG_PRINT(Adapter,DBG_TYPE_OTHERS, NVM_RW, DBG_LVL_ALL,"Highest ISO :%x and its Pri :%x",HighestPriISO,ISOHighestPri); BCM_DEBUG_PRINT(Adapter,DBG_TYPE_OTHERS, NVM_RW, DBG_LVL_ALL,"Highest ISO :%x and its Pri :%x",HighestPriISO,ISOHighestPri);
return HighestPriISO ; return HighestPriISO ;
} }
INT WriteToFlashWithoutSectorErase(PMINI_ADAPTER Adapter, INT WriteToFlashWithoutSectorErase(struct bcm_mini_adapter *Adapter,
PUINT pBuff, PUINT pBuff,
FLASH2X_SECTION_VAL eFlash2xSectionVal, FLASH2X_SECTION_VAL eFlash2xSectionVal,
UINT uiOffset, UINT uiOffset,
...@@ -5006,7 +5006,7 @@ INT WriteToFlashWithoutSectorErase(PMINI_ADAPTER Adapter, ...@@ -5006,7 +5006,7 @@ INT WriteToFlashWithoutSectorErase(PMINI_ADAPTER Adapter,
return Status; return Status;
} }
BOOLEAN IsSectionExistInFlash(PMINI_ADAPTER Adapter, FLASH2X_SECTION_VAL section) BOOLEAN IsSectionExistInFlash(struct bcm_mini_adapter *Adapter, FLASH2X_SECTION_VAL section)
{ {
BOOLEAN SectionPresent = FALSE ; BOOLEAN SectionPresent = FALSE ;
...@@ -5062,7 +5062,7 @@ BOOLEAN IsSectionExistInFlash(PMINI_ADAPTER Adapter, FLASH2X_SECTION_VAL section ...@@ -5062,7 +5062,7 @@ BOOLEAN IsSectionExistInFlash(PMINI_ADAPTER Adapter, FLASH2X_SECTION_VAL section
} }
return SectionPresent ; return SectionPresent ;
} }
INT IsSectionWritable(PMINI_ADAPTER Adapter, FLASH2X_SECTION_VAL Section) INT IsSectionWritable(struct bcm_mini_adapter *Adapter, FLASH2X_SECTION_VAL Section)
{ {
INT offset = STATUS_FAILURE; INT offset = STATUS_FAILURE;
INT Status = FALSE; INT Status = FALSE;
...@@ -5087,7 +5087,7 @@ INT IsSectionWritable(PMINI_ADAPTER Adapter, FLASH2X_SECTION_VAL Section) ...@@ -5087,7 +5087,7 @@ INT IsSectionWritable(PMINI_ADAPTER Adapter, FLASH2X_SECTION_VAL Section)
return Status ; return Status ;
} }
static INT CorruptDSDSig(PMINI_ADAPTER Adapter, FLASH2X_SECTION_VAL eFlash2xSectionVal) static INT CorruptDSDSig(struct bcm_mini_adapter *Adapter, FLASH2X_SECTION_VAL eFlash2xSectionVal)
{ {
PUCHAR pBuff = NULL; PUCHAR pBuff = NULL;
...@@ -5160,7 +5160,7 @@ static INT CorruptDSDSig(PMINI_ADAPTER Adapter, FLASH2X_SECTION_VAL eFlash2xSect ...@@ -5160,7 +5160,7 @@ static INT CorruptDSDSig(PMINI_ADAPTER Adapter, FLASH2X_SECTION_VAL eFlash2xSect
return STATUS_SUCCESS ; return STATUS_SUCCESS ;
} }
static INT CorruptISOSig(PMINI_ADAPTER Adapter, FLASH2X_SECTION_VAL eFlash2xSectionVal) static INT CorruptISOSig(struct bcm_mini_adapter *Adapter, FLASH2X_SECTION_VAL eFlash2xSectionVal)
{ {
PUCHAR pBuff = NULL; PUCHAR pBuff = NULL;
...@@ -5212,7 +5212,7 @@ static INT CorruptISOSig(PMINI_ADAPTER Adapter, FLASH2X_SECTION_VAL eFlash2xSect ...@@ -5212,7 +5212,7 @@ static INT CorruptISOSig(PMINI_ADAPTER Adapter, FLASH2X_SECTION_VAL eFlash2xSect
return STATUS_SUCCESS ; return STATUS_SUCCESS ;
} }
BOOLEAN IsNonCDLessDevice(PMINI_ADAPTER Adapter) BOOLEAN IsNonCDLessDevice(struct bcm_mini_adapter *Adapter)
{ {
if(Adapter->psFlash2xCSInfo->IsCDLessDeviceBootSig == NON_CDLESS_DEVICE_BOOT_SIG) if(Adapter->psFlash2xCSInfo->IsCDLessDeviceBootSig == NON_CDLESS_DEVICE_BOOT_SIG)
return TRUE; return TRUE;
......
...@@ -22,7 +22,7 @@ static int compare_packet_info(void const *a, void const *b) ...@@ -22,7 +22,7 @@ static int compare_packet_info(void const *a, void const *b)
return pa->u8TrafficPriority - pb->u8TrafficPriority; return pa->u8TrafficPriority - pb->u8TrafficPriority;
} }
VOID SortPackInfo(PMINI_ADAPTER Adapter) VOID SortPackInfo(struct bcm_mini_adapter *Adapter)
{ {
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, CONN_MSG, BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, CONN_MSG,
DBG_LVL_ALL, "<======="); DBG_LVL_ALL, "<=======");
...@@ -42,7 +42,7 @@ static int compare_classifiers(void const *a, void const *b) ...@@ -42,7 +42,7 @@ static int compare_classifiers(void const *a, void const *b)
return pa->u8ClassifierRulePriority - pb->u8ClassifierRulePriority; return pa->u8ClassifierRulePriority - pb->u8ClassifierRulePriority;
} }
VOID SortClassifiers(PMINI_ADAPTER Adapter) VOID SortClassifiers(struct bcm_mini_adapter *Adapter)
{ {
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, CONN_MSG, BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, CONN_MSG,
DBG_LVL_ALL, "<======="); DBG_LVL_ALL, "<=======");
......
...@@ -28,7 +28,7 @@ INT vendorextnGetSectionInfo(PVOID pContext,PFLASH2X_VENDORSPECIFIC_INFO pVendo ...@@ -28,7 +28,7 @@ INT vendorextnGetSectionInfo(PVOID pContext,PFLASH2X_VENDORSPECIFIC_INFO pVendo
// STATUS_SUCCESS/STATUS_FAILURE // STATUS_SUCCESS/STATUS_FAILURE
// //
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
INT vendorextnInit(PMINI_ADAPTER Adapter) INT vendorextnInit(struct bcm_mini_adapter *Adapter)
{ {
return STATUS_SUCCESS; return STATUS_SUCCESS;
} }
...@@ -45,7 +45,7 @@ INT vendorextnInit(PMINI_ADAPTER Adapter) ...@@ -45,7 +45,7 @@ INT vendorextnInit(PMINI_ADAPTER Adapter)
// STATUS_SUCCESS/STATUS_FAILURE // STATUS_SUCCESS/STATUS_FAILURE
// //
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
INT vendorextnExit(PMINI_ADAPTER Adapter) INT vendorextnExit(struct bcm_mini_adapter *Adapter)
{ {
return STATUS_SUCCESS; return STATUS_SUCCESS;
} }
...@@ -65,7 +65,7 @@ INT vendorextnExit(PMINI_ADAPTER Adapter) ...@@ -65,7 +65,7 @@ INT vendorextnExit(PMINI_ADAPTER Adapter)
// STATUS_SUCCESS/STATUS_FAILURE as per the IOCTL return value // STATUS_SUCCESS/STATUS_FAILURE as per the IOCTL return value
// //
//-------------------------------------------------------------------------- //--------------------------------------------------------------------------
INT vendorextnIoctl(PMINI_ADAPTER Adapter, UINT cmd, ULONG arg) INT vendorextnIoctl(struct bcm_mini_adapter *Adapter, UINT cmd, ULONG arg)
{ {
return CONTINUE_COMMON_PATH; return CONTINUE_COMMON_PATH;
} }
......
...@@ -5,9 +5,9 @@ ...@@ -5,9 +5,9 @@
#define CONTINUE_COMMON_PATH 0xFFFF #define CONTINUE_COMMON_PATH 0xFFFF
INT vendorextnGetSectionInfo(PVOID pContext,PFLASH2X_VENDORSPECIFIC_INFO pVendorInfo); INT vendorextnGetSectionInfo(PVOID pContext,PFLASH2X_VENDORSPECIFIC_INFO pVendorInfo);
INT vendorextnExit(PMINI_ADAPTER Adapter); INT vendorextnExit(struct bcm_mini_adapter *Adapter);
INT vendorextnInit(PMINI_ADAPTER Adapter); INT vendorextnInit(struct bcm_mini_adapter *Adapter);
INT vendorextnIoctl(PMINI_ADAPTER Adapter, UINT cmd, ULONG arg); INT vendorextnIoctl(struct bcm_mini_adapter *Adapter, UINT cmd, ULONG arg);
INT vendorextnReadSection(PVOID pContext, PUCHAR pBuffer, FLASH2X_SECTION_VAL SectionVal, INT vendorextnReadSection(PVOID pContext, PUCHAR pBuffer, FLASH2X_SECTION_VAL SectionVal,
UINT offset, UINT numOfBytes); UINT offset, UINT numOfBytes);
INT vendorextnWriteSection(PVOID pContext, PUCHAR pBuffer, FLASH2X_SECTION_VAL SectionVal, INT vendorextnWriteSection(PVOID pContext, PUCHAR pBuffer, FLASH2X_SECTION_VAL SectionVal,
......
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