mirror of https://gitee.com/openkylin/linux.git
Staging: bcm: Remove typedef for _S_INTERFACE_ADAPTER and call directly.
This patch removes typedef for _S_INTERFACE_ADAPTER, changes the name of the struct to bcm_interface_adapter. In addition, any calls to typedefs S_INTERFACE_ADAPTER, or *PS_INTERFACE_ADAPTER are changed to call the struct directly. Signed-off-by: Kevin McKinney <klmckinney1@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
48df0187d4
commit
d6861cfef2
|
@ -895,7 +895,7 @@ static long bcm_char_ioctl(struct file *filp, UINT cmd, ULONG arg)
|
||||||
mdelay(10);
|
mdelay(10);
|
||||||
|
|
||||||
/* Wait for MailBox Interrupt */
|
/* Wait for MailBox Interrupt */
|
||||||
if (StartInterruptUrb((PS_INTERFACE_ADAPTER)Adapter->pvInterfaceAdapter))
|
if (StartInterruptUrb((struct bcm_interface_adapter *)Adapter->pvInterfaceAdapter))
|
||||||
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_PRINTK, 0, 0, "Unable to send interrupt...\n");
|
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_PRINTK, 0, 0, "Unable to send interrupt...\n");
|
||||||
|
|
||||||
timeout = 5*HZ;
|
timeout = 5*HZ;
|
||||||
|
|
|
@ -142,7 +142,7 @@ static void bcm_get_drvinfo(struct net_device *dev,
|
||||||
struct ethtool_drvinfo *info)
|
struct ethtool_drvinfo *info)
|
||||||
{
|
{
|
||||||
struct bcm_mini_adapter *Adapter = GET_BCM_ADAPTER(dev);
|
struct bcm_mini_adapter *Adapter = GET_BCM_ADAPTER(dev);
|
||||||
PS_INTERFACE_ADAPTER psIntfAdapter = Adapter->pvInterfaceAdapter;
|
struct bcm_interface_adapter *psIntfAdapter = Adapter->pvInterfaceAdapter;
|
||||||
struct usb_device *udev = interface_to_usbdev(psIntfAdapter->interface);
|
struct usb_device *udev = interface_to_usbdev(psIntfAdapter->interface);
|
||||||
|
|
||||||
strcpy(info->driver, DRV_NAME);
|
strcpy(info->driver, DRV_NAME);
|
||||||
|
@ -186,7 +186,7 @@ static const struct ethtool_ops bcm_ethtool_ops = {
|
||||||
int register_networkdev(struct bcm_mini_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;
|
struct bcm_interface_adapter *IntfAdapter = Adapter->pvInterfaceAdapter;
|
||||||
struct usb_interface *udev = IntfAdapter->interface;
|
struct usb_interface *udev = IntfAdapter->interface;
|
||||||
struct usb_device *xdev = IntfAdapter->udev;
|
struct usb_device *xdev = IntfAdapter->udev;
|
||||||
|
|
||||||
|
@ -227,7 +227,7 @@ int register_networkdev(struct bcm_mini_adapter *Adapter)
|
||||||
void unregister_networkdev(struct bcm_mini_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;
|
struct bcm_interface_adapter *IntfAdapter = Adapter->pvInterfaceAdapter;
|
||||||
struct usb_interface *udev = IntfAdapter->interface;
|
struct usb_interface *udev = IntfAdapter->interface;
|
||||||
struct usb_device *xdev = IntfAdapter->udev;
|
struct usb_device *xdev = IntfAdapter->udev;
|
||||||
|
|
||||||
|
|
|
@ -50,7 +50,7 @@ typedef struct _USB_RCB {
|
||||||
* This is the interface specific Sub-Adapter
|
* This is the interface specific Sub-Adapter
|
||||||
* Structure.
|
* Structure.
|
||||||
*/
|
*/
|
||||||
typedef struct _S_INTERFACE_ADAPTER {
|
struct bcm_interface_adapter {
|
||||||
struct usb_device *udev;
|
struct usb_device *udev;
|
||||||
struct usb_interface *interface;
|
struct usb_interface *interface;
|
||||||
/* Bulk endpoint in info */
|
/* Bulk endpoint in info */
|
||||||
|
@ -75,6 +75,6 @@ typedef struct _S_INTERFACE_ADAPTER {
|
||||||
bool bSuspended;
|
bool bSuspended;
|
||||||
bool bPreparingForBusSuspend;
|
bool bPreparingForBusSuspend;
|
||||||
struct work_struct usbSuspendWork;
|
struct work_struct usbSuspendWork;
|
||||||
} S_INTERFACE_ADAPTER, *PS_INTERFACE_ADAPTER;
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -6,7 +6,7 @@ int InterfaceFileDownload(PVOID arg, struct file *flp, unsigned int on_chip_loc)
|
||||||
mm_segment_t oldfs = {0};
|
mm_segment_t oldfs = {0};
|
||||||
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;
|
struct bcm_interface_adapter *psIntfAdapter = (struct bcm_interface_adapter *)arg;
|
||||||
/* struct bcm_mini_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);
|
||||||
|
|
||||||
|
@ -61,7 +61,7 @@ int InterfaceFileReadbackFromChip(PVOID arg, struct file *flp, unsigned int on_c
|
||||||
loff_t pos = 0;
|
loff_t pos = 0;
|
||||||
static int fw_down;
|
static int fw_down;
|
||||||
INT Status = STATUS_SUCCESS;
|
INT Status = STATUS_SUCCESS;
|
||||||
PS_INTERFACE_ADAPTER psIntfAdapter = (PS_INTERFACE_ADAPTER)arg;
|
struct bcm_interface_adapter *psIntfAdapter = (struct bcm_interface_adapter *)arg;
|
||||||
int bytes;
|
int bytes;
|
||||||
|
|
||||||
buff = kmalloc(MAX_TRANSFER_CTRL_BYTE_USB, GFP_DMA);
|
buff = kmalloc(MAX_TRANSFER_CTRL_BYTE_USB, GFP_DMA);
|
||||||
|
|
|
@ -156,7 +156,7 @@ static int InterfaceAbortIdlemode(struct bcm_mini_adapter *Adapter, unsigned int
|
||||||
|
|
||||||
int lenwritten = 0;
|
int lenwritten = 0;
|
||||||
unsigned char aucAbortPattern[8]={0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF};
|
unsigned char aucAbortPattern[8]={0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF};
|
||||||
PS_INTERFACE_ADAPTER psInterfaceAdapter = Adapter->pvInterfaceAdapter;
|
struct bcm_interface_adapter *psInterfaceAdapter = Adapter->pvInterfaceAdapter;
|
||||||
|
|
||||||
//Abort Bus suspend if its already suspended
|
//Abort Bus suspend if its already suspended
|
||||||
if((TRUE == psInterfaceAdapter->bSuspended) && (TRUE == Adapter->bDoSuspend))
|
if((TRUE == psInterfaceAdapter->bSuspended) && (TRUE == Adapter->bDoSuspend))
|
||||||
|
|
|
@ -22,9 +22,9 @@ static const u32 default_msg =
|
||||||
| NETIF_MSG_TIMER | NETIF_MSG_TX_ERR | NETIF_MSG_RX_ERR
|
| NETIF_MSG_TIMER | NETIF_MSG_TX_ERR | NETIF_MSG_RX_ERR
|
||||||
| NETIF_MSG_IFUP | NETIF_MSG_IFDOWN;
|
| NETIF_MSG_IFUP | NETIF_MSG_IFDOWN;
|
||||||
|
|
||||||
static int InterfaceAdapterInit(PS_INTERFACE_ADAPTER Adapter);
|
static int InterfaceAdapterInit(struct bcm_interface_adapter *Adapter);
|
||||||
|
|
||||||
static void InterfaceAdapterFree(PS_INTERFACE_ADAPTER psIntfAdapter)
|
static void InterfaceAdapterFree(struct bcm_interface_adapter *psIntfAdapter)
|
||||||
{
|
{
|
||||||
int i = 0;
|
int i = 0;
|
||||||
|
|
||||||
|
@ -79,7 +79,7 @@ static void ConfigureEndPointTypesThroughEEPROM(struct bcm_mini_adapter *Adapter
|
||||||
|
|
||||||
ulReg = ntohl(EP2_CFG_REG);
|
ulReg = ntohl(EP2_CFG_REG);
|
||||||
BeceemEEPROMBulkWrite(Adapter, (PUCHAR)&ulReg, 0x132, 4, TRUE);
|
BeceemEEPROMBulkWrite(Adapter, (PUCHAR)&ulReg, 0x132, 4, TRUE);
|
||||||
if (((PS_INTERFACE_ADAPTER)(Adapter->pvInterfaceAdapter))->bHighSpeedDevice == TRUE) {
|
if (((struct bcm_interface_adapter *)(Adapter->pvInterfaceAdapter))->bHighSpeedDevice == TRUE) {
|
||||||
ulReg = ntohl(EP2_CFG_INT);
|
ulReg = ntohl(EP2_CFG_INT);
|
||||||
BeceemEEPROMBulkWrite(Adapter, (PUCHAR)&ulReg, 0x136, 4, TRUE);
|
BeceemEEPROMBulkWrite(Adapter, (PUCHAR)&ulReg, 0x136, 4, TRUE);
|
||||||
} else {
|
} else {
|
||||||
|
@ -145,7 +145,7 @@ 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;
|
||||||
struct bcm_mini_adapter *psAdapter;
|
struct bcm_mini_adapter *psAdapter;
|
||||||
PS_INTERFACE_ADAPTER psIntfAdapter;
|
struct bcm_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 */
|
||||||
|
@ -189,7 +189,7 @@ static int usbbcm_device_probe(struct usb_interface *intf, const struct usb_devi
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Allocate interface adapter structure */
|
/* Allocate interface adapter structure */
|
||||||
psIntfAdapter = kzalloc(sizeof(S_INTERFACE_ADAPTER), GFP_KERNEL);
|
psIntfAdapter = kzalloc(sizeof(struct bcm_interface_adapter), GFP_KERNEL);
|
||||||
if (psIntfAdapter == NULL) {
|
if (psIntfAdapter == NULL) {
|
||||||
dev_err(&udev->dev, DRV_NAME ": no memory for Interface adapter\n");
|
dev_err(&udev->dev, DRV_NAME ": no memory for Interface adapter\n");
|
||||||
AdapterFree(psAdapter);
|
AdapterFree(psAdapter);
|
||||||
|
@ -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);
|
struct bcm_interface_adapter *psIntfAdapter = usb_get_intfdata(intf);
|
||||||
struct bcm_mini_adapter *psAdapter;
|
struct bcm_mini_adapter *psAdapter;
|
||||||
struct usb_device *udev = interface_to_usbdev(intf);
|
struct usb_device *udev = interface_to_usbdev(intf);
|
||||||
|
|
||||||
|
@ -276,7 +276,7 @@ static void usbbcm_disconnect(struct usb_interface *intf)
|
||||||
usb_put_dev(udev);
|
usb_put_dev(udev);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int AllocUsbCb(PS_INTERFACE_ADAPTER psIntfAdapter)
|
static int AllocUsbCb(struct bcm_interface_adapter *psIntfAdapter)
|
||||||
{
|
{
|
||||||
int i = 0;
|
int i = 0;
|
||||||
|
|
||||||
|
@ -311,7 +311,7 @@ static int AllocUsbCb(PS_INTERFACE_ADAPTER psIntfAdapter)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int device_run(PS_INTERFACE_ADAPTER psIntfAdapter)
|
static int device_run(struct bcm_interface_adapter *psIntfAdapter)
|
||||||
{
|
{
|
||||||
int value = 0;
|
int value = 0;
|
||||||
UINT status = STATUS_SUCCESS;
|
UINT status = STATUS_SUCCESS;
|
||||||
|
@ -421,7 +421,7 @@ static inline int bcm_usb_endpoint_is_isoc_out(const struct usb_endpoint_descrip
|
||||||
return bcm_usb_endpoint_xfer_isoc(epd) && bcm_usb_endpoint_dir_out(epd);
|
return bcm_usb_endpoint_xfer_isoc(epd) && bcm_usb_endpoint_dir_out(epd);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int InterfaceAdapterInit(PS_INTERFACE_ADAPTER psIntfAdapter)
|
static int InterfaceAdapterInit(struct bcm_interface_adapter *psIntfAdapter)
|
||||||
{
|
{
|
||||||
struct usb_host_interface *iface_desc;
|
struct usb_host_interface *iface_desc;
|
||||||
struct usb_endpoint_descriptor *endpoint;
|
struct usb_endpoint_descriptor *endpoint;
|
||||||
|
@ -619,7 +619,7 @@ static int InterfaceAdapterInit(PS_INTERFACE_ADAPTER psIntfAdapter)
|
||||||
|
|
||||||
static int InterfaceSuspend(struct usb_interface *intf, pm_message_t message)
|
static int InterfaceSuspend(struct usb_interface *intf, pm_message_t message)
|
||||||
{
|
{
|
||||||
PS_INTERFACE_ADAPTER psIntfAdapter = usb_get_intfdata(intf);
|
struct bcm_interface_adapter *psIntfAdapter = usb_get_intfdata(intf);
|
||||||
|
|
||||||
psIntfAdapter->bSuspended = TRUE;
|
psIntfAdapter->bSuspended = TRUE;
|
||||||
|
|
||||||
|
@ -646,7 +646,7 @@ static int InterfaceSuspend(struct usb_interface *intf, pm_message_t message)
|
||||||
|
|
||||||
static int InterfaceResume(struct usb_interface *intf)
|
static int InterfaceResume(struct usb_interface *intf)
|
||||||
{
|
{
|
||||||
PS_INTERFACE_ADAPTER psIntfAdapter = usb_get_intfdata(intf);
|
struct bcm_interface_adapter *psIntfAdapter = usb_get_intfdata(intf);
|
||||||
|
|
||||||
mdelay(100);
|
mdelay(100);
|
||||||
psIntfAdapter->bSuspended = FALSE;
|
psIntfAdapter->bSuspended = FALSE;
|
||||||
|
|
|
@ -21,6 +21,6 @@ int InterfaceInitialize(void);
|
||||||
|
|
||||||
int InterfaceExit(void);
|
int InterfaceExit(void);
|
||||||
|
|
||||||
int usbbcm_worker_thread(PS_INTERFACE_ADAPTER psIntfAdapter);
|
int usbbcm_worker_thread(struct bcm_interface_adapter *psIntfAdapter);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
static void read_int_callback(struct urb *urb/*, struct pt_regs *regs*/)
|
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;
|
struct bcm_interface_adapter *psIntfAdapter = (struct bcm_interface_adapter *)urb->context;
|
||||||
struct bcm_mini_adapter *Adapter = psIntfAdapter->psAdapter ;
|
struct bcm_mini_adapter *Adapter = psIntfAdapter->psAdapter ;
|
||||||
|
|
||||||
if (netif_msg_intr(Adapter))
|
if (netif_msg_intr(Adapter))
|
||||||
|
@ -114,7 +114,7 @@ static void read_int_callback(struct urb *urb/*, struct pt_regs *regs*/)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int CreateInterruptUrb(PS_INTERFACE_ADAPTER psIntfAdapter)
|
int CreateInterruptUrb(struct bcm_interface_adapter *psIntfAdapter)
|
||||||
{
|
{
|
||||||
psIntfAdapter->psInterruptUrb = usb_alloc_urb(0, GFP_KERNEL);
|
psIntfAdapter->psInterruptUrb = usb_alloc_urb(0, GFP_KERNEL);
|
||||||
if (!psIntfAdapter->psInterruptUrb)
|
if (!psIntfAdapter->psInterruptUrb)
|
||||||
|
@ -143,7 +143,7 @@ int CreateInterruptUrb(PS_INTERFACE_ADAPTER psIntfAdapter)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
INT StartInterruptUrb(PS_INTERFACE_ADAPTER psIntfAdapter)
|
INT StartInterruptUrb(struct bcm_interface_adapter *psIntfAdapter)
|
||||||
{
|
{
|
||||||
INT status = 0;
|
INT status = 0;
|
||||||
|
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
#ifndef _INTERFACE_ISR_H
|
#ifndef _INTERFACE_ISR_H
|
||||||
#define _INTERFACE_ISR_H
|
#define _INTERFACE_ISR_H
|
||||||
|
|
||||||
int CreateInterruptUrb(PS_INTERFACE_ADAPTER psIntfAdapter);
|
int CreateInterruptUrb(struct bcm_interface_adapter *psIntfAdapter);
|
||||||
|
|
||||||
|
|
||||||
INT StartInterruptUrb(PS_INTERFACE_ADAPTER psIntfAdapter);
|
INT StartInterruptUrb(struct bcm_interface_adapter *psIntfAdapter);
|
||||||
|
|
||||||
|
|
||||||
VOID InterfaceEnableInterrupt(struct bcm_mini_adapter *Adapter);
|
VOID InterfaceEnableInterrupt(struct bcm_mini_adapter *Adapter);
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#include "headers.h"
|
#include "headers.h"
|
||||||
|
|
||||||
int InterfaceRDM(PS_INTERFACE_ADAPTER psIntfAdapter,
|
int InterfaceRDM(struct bcm_interface_adapter *psIntfAdapter,
|
||||||
unsigned int addr,
|
unsigned int addr,
|
||||||
void *buff,
|
void *buff,
|
||||||
int len)
|
int len)
|
||||||
|
@ -48,7 +48,7 @@ int InterfaceRDM(PS_INTERFACE_ADAPTER psIntfAdapter,
|
||||||
return bytes;
|
return bytes;
|
||||||
}
|
}
|
||||||
|
|
||||||
int InterfaceWRM(PS_INTERFACE_ADAPTER psIntfAdapter,
|
int InterfaceWRM(struct bcm_interface_adapter *psIntfAdapter,
|
||||||
unsigned int addr,
|
unsigned int addr,
|
||||||
void *buff,
|
void *buff,
|
||||||
int len)
|
int len)
|
||||||
|
@ -104,7 +104,7 @@ int BcmRDM(void *arg,
|
||||||
void *buff,
|
void *buff,
|
||||||
int len)
|
int len)
|
||||||
{
|
{
|
||||||
return InterfaceRDM((PS_INTERFACE_ADAPTER)arg, addr, buff, len);
|
return InterfaceRDM((struct bcm_interface_adapter*)arg, addr, buff, len);
|
||||||
}
|
}
|
||||||
|
|
||||||
int BcmWRM(void *arg,
|
int BcmWRM(void *arg,
|
||||||
|
@ -112,12 +112,12 @@ int BcmWRM(void *arg,
|
||||||
void *buff,
|
void *buff,
|
||||||
int len)
|
int len)
|
||||||
{
|
{
|
||||||
return InterfaceWRM((PS_INTERFACE_ADAPTER)arg, addr, buff, len);
|
return InterfaceWRM((struct bcm_interface_adapter *)arg, addr, buff, len);
|
||||||
}
|
}
|
||||||
|
|
||||||
int Bcm_clear_halt_of_endpoints(struct bcm_mini_adapter *Adapter)
|
int Bcm_clear_halt_of_endpoints(struct bcm_mini_adapter *Adapter)
|
||||||
{
|
{
|
||||||
PS_INTERFACE_ADAPTER psIntfAdapter = (PS_INTERFACE_ADAPTER)(Adapter->pvInterfaceAdapter);
|
struct bcm_interface_adapter *psIntfAdapter = (struct bcm_interface_adapter *)(Adapter->pvInterfaceAdapter);
|
||||||
int status = STATUS_SUCCESS;
|
int status = STATUS_SUCCESS;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -154,7 +154,7 @@ int Bcm_clear_halt_of_endpoints(struct bcm_mini_adapter *Adapter)
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Bcm_kill_all_URBs(PS_INTERFACE_ADAPTER psIntfAdapter)
|
void Bcm_kill_all_URBs(struct bcm_interface_adapter *psIntfAdapter)
|
||||||
{
|
{
|
||||||
struct urb *tempUrb = NULL;
|
struct urb *tempUrb = NULL;
|
||||||
unsigned int i;
|
unsigned int i;
|
||||||
|
@ -206,9 +206,9 @@ void Bcm_kill_all_URBs(PS_INTERFACE_ADAPTER psIntfAdapter)
|
||||||
|
|
||||||
void putUsbSuspend(struct work_struct *work)
|
void putUsbSuspend(struct work_struct *work)
|
||||||
{
|
{
|
||||||
PS_INTERFACE_ADAPTER psIntfAdapter = NULL;
|
struct bcm_interface_adapter *psIntfAdapter = NULL;
|
||||||
struct usb_interface *intf = NULL;
|
struct usb_interface *intf = NULL;
|
||||||
psIntfAdapter = container_of(work, S_INTERFACE_ADAPTER, usbSuspendWork);
|
psIntfAdapter = container_of(work, struct bcm_interface_adapter, usbSuspendWork);
|
||||||
intf = psIntfAdapter->interface;
|
intf = psIntfAdapter->interface;
|
||||||
|
|
||||||
if (psIntfAdapter->bSuspended == FALSE)
|
if (psIntfAdapter->bSuspended == FALSE)
|
||||||
|
|
|
@ -2,13 +2,13 @@
|
||||||
#define __INTERFACE_MISC_H
|
#define __INTERFACE_MISC_H
|
||||||
|
|
||||||
INT
|
INT
|
||||||
InterfaceRDM(PS_INTERFACE_ADAPTER psIntfAdapter,
|
InterfaceRDM(struct bcm_interface_adapter *psIntfAdapter,
|
||||||
UINT addr,
|
UINT addr,
|
||||||
PVOID buff,
|
PVOID buff,
|
||||||
INT len);
|
INT len);
|
||||||
|
|
||||||
INT
|
INT
|
||||||
InterfaceWRM(PS_INTERFACE_ADAPTER psIntfAdapter,
|
InterfaceWRM(struct bcm_interface_adapter *psIntfAdapter,
|
||||||
UINT addr,
|
UINT addr,
|
||||||
PVOID buff,
|
PVOID buff,
|
||||||
INT len);
|
INT len);
|
||||||
|
@ -35,7 +35,7 @@ int BcmWRM(PVOID arg,
|
||||||
|
|
||||||
INT Bcm_clear_halt_of_endpoints(struct bcm_mini_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(struct bcm_interface_adapter *psIntfAdapter);
|
||||||
|
|
||||||
#define DISABLE_USB_ZERO_LEN_INT 0x0F011878
|
#define DISABLE_USB_ZERO_LEN_INT 0x0F011878
|
||||||
|
|
||||||
|
|
|
@ -13,7 +13,7 @@ static int SearchVcid(struct bcm_mini_adapter *Adapter,unsigned short usVcid)
|
||||||
|
|
||||||
|
|
||||||
static PUSB_RCB
|
static PUSB_RCB
|
||||||
GetBulkInRcb(PS_INTERFACE_ADAPTER psIntfAdapter)
|
GetBulkInRcb(struct bcm_interface_adapter *psIntfAdapter)
|
||||||
{
|
{
|
||||||
PUSB_RCB pRcb = NULL;
|
PUSB_RCB pRcb = NULL;
|
||||||
UINT index = 0;
|
UINT index = 0;
|
||||||
|
@ -44,7 +44,7 @@ static void read_bulk_callback(struct urb *urb)
|
||||||
int process_done = 1;
|
int process_done = 1;
|
||||||
//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;
|
struct bcm_interface_adapter *psIntfAdapter = pRcb->psIntfAdapter;
|
||||||
struct bcm_mini_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;
|
||||||
|
|
||||||
|
@ -196,7 +196,7 @@ static void read_bulk_callback(struct urb *urb)
|
||||||
atomic_dec(&psIntfAdapter->uNumRcbUsed);
|
atomic_dec(&psIntfAdapter->uNumRcbUsed);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int ReceiveRcb(PS_INTERFACE_ADAPTER psIntfAdapter, PUSB_RCB pRcb)
|
static int ReceiveRcb(struct bcm_interface_adapter *psIntfAdapter, PUSB_RCB pRcb)
|
||||||
{
|
{
|
||||||
struct urb *urb = pRcb->urb;
|
struct urb *urb = pRcb->urb;
|
||||||
int retval = 0;
|
int retval = 0;
|
||||||
|
@ -240,7 +240,7 @@ Return: TRUE - If Rx was successful.
|
||||||
Other - If an error occurred.
|
Other - If an error occurred.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
BOOLEAN InterfaceRx (PS_INTERFACE_ADAPTER psIntfAdapter)
|
BOOLEAN InterfaceRx (struct bcm_interface_adapter *psIntfAdapter)
|
||||||
{
|
{
|
||||||
USHORT RxDescCount = NUM_RX_DESC - atomic_read(&psIntfAdapter->uNumRcbUsed);
|
USHORT RxDescCount = NUM_RX_DESC - atomic_read(&psIntfAdapter->uNumRcbUsed);
|
||||||
PUSB_RCB pRcb = NULL;
|
PUSB_RCB pRcb = NULL;
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#ifndef _INTERFACE_RX_H
|
#ifndef _INTERFACE_RX_H
|
||||||
#define _INTERFACE_RX_H
|
#define _INTERFACE_RX_H
|
||||||
|
|
||||||
BOOLEAN InterfaceRx(PS_INTERFACE_ADAPTER Adapter);
|
BOOLEAN InterfaceRx(struct bcm_interface_adapter *Adapter);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
static void write_bulk_callback(struct urb *urb/*, struct pt_regs *regs*/)
|
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;
|
struct bcm_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;
|
||||||
struct bcm_mini_adapter *psAdapter = psIntfAdapter->psAdapter ;
|
struct bcm_mini_adapter *psAdapter = psIntfAdapter->psAdapter ;
|
||||||
BOOLEAN bpowerDownMsg = FALSE ;
|
BOOLEAN bpowerDownMsg = FALSE ;
|
||||||
|
@ -107,7 +107,7 @@ err_exit :
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static PUSB_TCB GetBulkOutTcb(PS_INTERFACE_ADAPTER psIntfAdapter)
|
static PUSB_TCB GetBulkOutTcb(struct bcm_interface_adapter *psIntfAdapter)
|
||||||
{
|
{
|
||||||
PUSB_TCB pTcb = NULL;
|
PUSB_TCB pTcb = NULL;
|
||||||
UINT index = 0;
|
UINT index = 0;
|
||||||
|
@ -128,7 +128,7 @@ static PUSB_TCB GetBulkOutTcb(PS_INTERFACE_ADAPTER psIntfAdapter)
|
||||||
return pTcb;
|
return pTcb;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int TransmitTcb(PS_INTERFACE_ADAPTER psIntfAdapter, PUSB_TCB pTcb, PVOID data, int len)
|
static int TransmitTcb(struct bcm_interface_adapter *psIntfAdapter, PUSB_TCB pTcb, PVOID data, int len)
|
||||||
{
|
{
|
||||||
|
|
||||||
struct urb *urb = pTcb->urb;
|
struct urb *urb = pTcb->urb;
|
||||||
|
@ -184,7 +184,7 @@ int InterfaceTransmitPacket(PVOID arg, PVOID data, UINT len)
|
||||||
{
|
{
|
||||||
PUSB_TCB pTcb= NULL;
|
PUSB_TCB pTcb= NULL;
|
||||||
|
|
||||||
PS_INTERFACE_ADAPTER psIntfAdapter = (PS_INTERFACE_ADAPTER)arg;
|
struct bcm_interface_adapter *psIntfAdapter = (struct bcm_interface_adapter *)arg;
|
||||||
pTcb= GetBulkOutTcb(psIntfAdapter);
|
pTcb= GetBulkOutTcb(psIntfAdapter);
|
||||||
if(pTcb == NULL)
|
if(pTcb == NULL)
|
||||||
{
|
{
|
||||||
|
|
|
@ -611,7 +611,7 @@ void SendIdleModeResponse(struct bcm_mini_adapter *Adapter)
|
||||||
up(&Adapter->rdmwrmsync);
|
up(&Adapter->rdmwrmsync);
|
||||||
/* Killing all URBS. */
|
/* Killing all URBS. */
|
||||||
if (Adapter->bDoSuspend == TRUE)
|
if (Adapter->bDoSuspend == TRUE)
|
||||||
Bcm_kill_all_URBs((PS_INTERFACE_ADAPTER)(Adapter->pvInterfaceAdapter));
|
Bcm_kill_all_URBs((struct bcm_interface_adapter *)(Adapter->pvInterfaceAdapter));
|
||||||
} else {
|
} else {
|
||||||
Adapter->bPreparingForLowPowerMode = FALSE;
|
Adapter->bPreparingForLowPowerMode = FALSE;
|
||||||
}
|
}
|
||||||
|
@ -627,7 +627,7 @@ void SendIdleModeResponse(struct bcm_mini_adapter *Adapter)
|
||||||
if ((status != STATUS_SUCCESS)) {
|
if ((status != STATUS_SUCCESS)) {
|
||||||
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_PRINTK, 0, 0, "fail to send the Idle mode Request\n");
|
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_PRINTK, 0, 0, "fail to send the Idle mode Request\n");
|
||||||
Adapter->bPreparingForLowPowerMode = FALSE;
|
Adapter->bPreparingForLowPowerMode = FALSE;
|
||||||
StartInterruptUrb((PS_INTERFACE_ADAPTER)(Adapter->pvInterfaceAdapter));
|
StartInterruptUrb((struct bcm_interface_adapter *)(Adapter->pvInterfaceAdapter));
|
||||||
}
|
}
|
||||||
do_gettimeofday(&tv);
|
do_gettimeofday(&tv);
|
||||||
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_RX, RX_DPC, DBG_LVL_ALL, "IdleMode Msg submitter to Q :%ld ms", tv.tv_sec * 1000 + tv.tv_usec / 1000);
|
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_RX, RX_DPC, DBG_LVL_ALL, "IdleMode Msg submitter to Q :%ld ms", tv.tv_sec * 1000 + tv.tv_usec / 1000);
|
||||||
|
@ -778,11 +778,11 @@ int reset_card_proc(struct bcm_mini_adapter *ps_adapter)
|
||||||
{
|
{
|
||||||
int retval = STATUS_SUCCESS;
|
int retval = STATUS_SUCCESS;
|
||||||
struct bcm_mini_adapter *Adapter = GET_BCM_ADAPTER(gblpnetdev);
|
struct bcm_mini_adapter *Adapter = GET_BCM_ADAPTER(gblpnetdev);
|
||||||
PS_INTERFACE_ADAPTER psIntfAdapter = NULL;
|
struct bcm_interface_adapter *psIntfAdapter = NULL;
|
||||||
unsigned int value = 0, uiResetValue = 0;
|
unsigned int value = 0, uiResetValue = 0;
|
||||||
int bytes;
|
int bytes;
|
||||||
|
|
||||||
psIntfAdapter = ((PS_INTERFACE_ADAPTER)(ps_adapter->pvInterfaceAdapter));
|
psIntfAdapter = ((struct bcm_interface_adapter *)(ps_adapter->pvInterfaceAdapter));
|
||||||
ps_adapter->bDDRInitDone = FALSE;
|
ps_adapter->bDDRInitDone = FALSE;
|
||||||
|
|
||||||
if (ps_adapter->chip_id >= T3LPB) {
|
if (ps_adapter->chip_id >= T3LPB) {
|
||||||
|
@ -1372,7 +1372,7 @@ static void SendShutModeResponse(struct bcm_mini_adapter *Adapter)
|
||||||
up(&Adapter->rdmwrmsync);
|
up(&Adapter->rdmwrmsync);
|
||||||
/* Killing all URBS. */
|
/* Killing all URBS. */
|
||||||
if (Adapter->bDoSuspend == TRUE)
|
if (Adapter->bDoSuspend == TRUE)
|
||||||
Bcm_kill_all_URBs((PS_INTERFACE_ADAPTER)(Adapter->pvInterfaceAdapter));
|
Bcm_kill_all_URBs((struct bcm_interface_adapter *)(Adapter->pvInterfaceAdapter));
|
||||||
} else {
|
} else {
|
||||||
Adapter->bPreparingForLowPowerMode = FALSE;
|
Adapter->bPreparingForLowPowerMode = FALSE;
|
||||||
}
|
}
|
||||||
|
@ -1388,7 +1388,7 @@ static void SendShutModeResponse(struct bcm_mini_adapter *Adapter)
|
||||||
if ((Status != STATUS_SUCCESS)) {
|
if ((Status != STATUS_SUCCESS)) {
|
||||||
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, MP_SHUTDOWN, DBG_LVL_ALL, "fail to send the Idle mode Request\n");
|
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, MP_SHUTDOWN, DBG_LVL_ALL, "fail to send the Idle mode Request\n");
|
||||||
Adapter->bPreparingForLowPowerMode = FALSE;
|
Adapter->bPreparingForLowPowerMode = FALSE;
|
||||||
StartInterruptUrb((PS_INTERFACE_ADAPTER)(Adapter->pvInterfaceAdapter));
|
StartInterruptUrb((struct bcm_interface_adapter *)(Adapter->pvInterfaceAdapter));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -205,7 +205,7 @@ int tx_pkt_handler(struct bcm_mini_adapter *Adapter /**< pointer to adapter obje
|
||||||
if (Adapter->bEndPointHalted == TRUE) {
|
if (Adapter->bEndPointHalted == TRUE) {
|
||||||
Bcm_clear_halt_of_endpoints(Adapter);
|
Bcm_clear_halt_of_endpoints(Adapter);
|
||||||
Adapter->bEndPointHalted = FALSE;
|
Adapter->bEndPointHalted = FALSE;
|
||||||
StartInterruptUrb((PS_INTERFACE_ADAPTER)(Adapter->pvInterfaceAdapter));
|
StartInterruptUrb((struct bcm_interface_adapter *)(Adapter->pvInterfaceAdapter));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Adapter->LinkUpStatus && !Adapter->IdleMode) {
|
if (Adapter->LinkUpStatus && !Adapter->IdleMode) {
|
||||||
|
|
Loading…
Reference in New Issue