//---------------------------------------------------------------------------
static int exec_mknod (void *pdata)
{
- PFT1000_INFO info;
+ struct ft1000_info *info;
char mjnum[4];
char minornum[4];
char temp[32];
static int rm_mknod (void *pdata)
{
- PFT1000_INFO info;
+ struct ft1000_info *info;
//char *argv[4]={"rm", "-f", "/dev/FT1000", NULL};
int retcode;
char temp[32];
char *argv[]={"rm", "-f", temp, NULL};
- info = (PFT1000_INFO)pdata;
+ info = (struct ft1000_info *)pdata;
DEBUG("ft1000_chdev:rm_mknod is called for device %s\n", info->DeviceName);
sprintf(temp, "%s%s", "/dev/", info->DeviceName) ;
//---------------------------------------------------------------------------
int ft1000_CreateDevice(struct ft1000_device *dev)
{
- PFT1000_INFO info = netdev_priv(dev->net);
+ struct ft1000_info *info = netdev_priv(dev->net);
int result;
int i;
pid_t pid;
//---------------------------------------------------------------------------
void ft1000_DestroyDevice(struct net_device *dev)
{
- PFT1000_INFO info = netdev_priv(dev);
+ struct ft1000_info *info = netdev_priv(dev);
int result = 0;
pid_t pid;
int i;
//---------------------------------------------------------------------------
static int ft1000_ChOpen (struct inode *Inode, struct file *File)
{
- PFT1000_INFO info;
+ struct ft1000_info *info;
int i,num;
DEBUG("ft1000_ChOpen called\n");
DEBUG("pdevobj[%d]=%p\n", i, pdevobj[i]); //aelias [+] reason: down
if ( pdevobj[num] != NULL )
- //info = (PFT1000_INFO)(pdevobj[num]->net->priv);
- info = (FT1000_INFO *) netdev_priv (pdevobj[num]->net);
+ //info = (struct ft1000_info *)(pdevobj[num]->net->priv);
+ info = (struct ft1000_info *)netdev_priv(pdevobj[num]->net);
else
{
DEBUG("ft1000_ChOpen: can not find device object %d\n", num);
static unsigned int ft1000_ChPoll(struct file *file, poll_table *wait)
{
struct net_device *dev = file->private_data;
- PFT1000_INFO info;
+ struct ft1000_info *info;
int i;
//DEBUG("ft1000_ChPoll called\n");
return (-EBADF);
}
- info = (FT1000_INFO *) netdev_priv (dev);
+ info = (struct ft1000_info *) netdev_priv(dev);
// Search for matching file object
for (i=0; i<MAX_NUM_APP; i++) {
{
void __user *argp = (void __user *)Argument;
struct net_device *dev;
- PFT1000_INFO info;
+ struct ft1000_info *info;
struct ft1000_device *ft1000dev;
int result=0;
int cmd;
//DEBUG("FT1000:ft1000_ChIoctl:Command = 0x%x Argument = 0x%8x\n", Command, (u32)Argument);
dev = File->private_data;
- info = (FT1000_INFO *) netdev_priv (dev);
+ info = (struct ft1000_info *) netdev_priv(dev);
ft1000dev = info->pFt1000Dev;
cmd = _IOC_NR(Command);
//DEBUG("FT1000:ft1000_ChIoctl:cmd = 0x%x\n", cmd);
//---------------------------------------------------------------------------
static int ft1000_ChRelease (struct inode *Inode, struct file *File)
{
- PFT1000_INFO info;
+ struct ft1000_info *info;
struct net_device *dev;
int i;
struct dpram_blk *pdpram_blk;
DEBUG("ft1000_ChRelease called\n");
dev = File->private_data;
- info = (FT1000_INFO *) netdev_priv (dev);
+ info = (struct ft1000_info *) netdev_priv(dev);
if (ft1000_flarion_cnt == 0) {
info->appcnt--;
USHORT handshake;
int loopcnt;
ULONG status=0;
- PFT1000_INFO pft1000info = netdev_priv(ft1000dev->net);
+ struct ft1000_info *pft1000info = netdev_priv(ft1000dev->net);
loopcnt = 0;
while (loopcnt < 100)
USHORT temp;
ULONG status=0;
- PFT1000_INFO pft1000info = netdev_priv(ft1000dev->net);
+ struct ft1000_info *pft1000info = netdev_priv(ft1000dev->net);
loopcnt = 0;
handshake = 0;
while (loopcnt < 100)
ULONG status;
USHORT tempword;
ULONG tempx;
- PFT1000_INFO pft1000info = netdev_priv(ft1000dev->net);
+ struct ft1000_info *pft1000info = netdev_priv(ft1000dev->net);
if ( pft1000info->bootmode == 1)
{
ULONG status;
USHORT tempword;
ULONG tempx;
- PFT1000_INFO pft1000info = netdev_priv(ft1000dev->net);
+ struct ft1000_info *pft1000info = netdev_priv(ft1000dev->net);
if ( pft1000info->bootmode == 1)
{
status = fix_ft1000_read_dpram32 (ft1000dev, DWNLD_MAG1_TYPE_LOC, (PUCHAR)&tempx);
ULONG value;
USHORT tempword;
ULONG status;
- PFT1000_INFO pft1000info = netdev_priv(ft1000dev->net);
+ struct ft1000_info *pft1000info = netdev_priv(ft1000dev->net);
if ( pft1000info->bootmode == 1)
ULONG value;
USHORT tempword;
ULONG status;
- PFT1000_INFO pft1000info = netdev_priv(ft1000dev->net);
+ struct ft1000_info * pft1000info = netdev_priv(ft1000dev->net);
if (pft1000info->usbboot == 2) {
value = pft1000info->tempbuf[4];
USHORT tempword;
USHORT tempbuffer[64];
USHORT resultbuffer[64];
- PFT1000_INFO pft1000info = netdev_priv(ft1000dev->net);
+ struct ft1000_info *pft1000info = netdev_priv(ft1000dev->net);
//DEBUG("FT1000:download:start word_length = %d\n",(int)word_length);
dpram = (USHORT)DWNLD_MAG1_PS_HDR_LOC;
USHORT dpram = 0;
PUCHAR pbuffer;
struct prov_record *pprov_record;
- FT1000_INFO *pft1000info = netdev_priv(ft1000dev->net);
+ struct ft1000_info *pft1000info = netdev_priv(ft1000dev->net);
DEBUG("Entered scram_dnldr...\n");
//#define JDEBUG
static int ft1000_reset(struct net_device *ft1000dev);
-static int ft1000_submit_rx_urb(PFT1000_INFO info);
+static int ft1000_submit_rx_urb(struct ft1000_info *info);
static int ft1000_start_xmit(struct sk_buff *skb, struct net_device *dev);
static int ft1000_open (struct net_device *dev);
static struct net_device_stats *ft1000_netdev_stats(struct net_device *dev);
USHORT tempword;
ULONG templong;
- PFT1000_INFO pft1000info;
+ struct ft1000_info *pft1000info;
pft1000info = netdev_priv(ft1000dev->net);
//---------------------------------------------------------------------------
static void ft1000_reset_asic (struct net_device *dev)
{
- FT1000_INFO *info = netdev_priv(dev);
+ struct ft1000_info *info = netdev_priv(dev);
struct ft1000_device *ft1000dev = info->pFt1000Dev;
u16 tempword;
//---------------------------------------------------------------------------
static int ft1000_reset_card (struct net_device *dev)
{
- FT1000_INFO *info = netdev_priv(dev);
+ struct ft1000_info *info = netdev_priv(dev);
struct ft1000_device *ft1000dev = info->pFt1000Dev;
u16 tempword;
struct prov_record *ptr;
u16 init_ft1000_netdev(struct ft1000_device *ft1000dev)
{
struct net_device *netdev;
- FT1000_INFO *pInfo = NULL;
+ struct ft1000_info *pInfo = NULL;
struct dpram_blk *pdpram_blk;
int i, ret_val;
struct list_head *cur, *tmp;
DEBUG("Enter init_ft1000_netdev...\n");
- netdev = alloc_etherdev( sizeof(FT1000_INFO));
+ netdev = alloc_etherdev(sizeof(struct ft1000_info));
if (!netdev )
{
DEBUG("init_ft1000_netdev: can not allocate network device\n");
return -ENOMEM;
}
- pInfo = (FT1000_INFO *) netdev_priv (netdev);
+ pInfo = (struct ft1000_info *) netdev_priv(netdev);
//DEBUG("init_ft1000_netdev: gFt1000Info=%x, netdev=%x, ft1000dev=%x\n", gFt1000Info, netdev, ft1000dev);
- memset (pInfo, 0, sizeof(FT1000_INFO));
+ memset(pInfo, 0, sizeof(struct ft1000_info));
dev_alloc_name(netdev, netdev->name);
int reg_ft1000_netdev(struct ft1000_device *ft1000dev, struct usb_interface *intf)
{
struct net_device *netdev;
- FT1000_INFO *pInfo;
+ struct ft1000_info *pInfo;
int rc;
netdev = ft1000dev->net;
u16 temp;
u16 ret;
- FT1000_INFO *info = (FT1000_INFO *) netdev_priv (dev);
+ struct ft1000_info *info = (struct ft1000_info *) netdev_priv(dev);
struct ft1000_device *ft1000dev = info->pFt1000Dev;
// DEBUG("ft1000_read_fifo_len: enter ft1000dev %x\n", ft1000dev); //aelias [-] reason: warning: format ???%x??? expects type ???unsigned int???, but argument 2 has type ???struct ft1000_device *???
DEBUG("ft1000_read_fifo_len: enter ft1000dev %p\n", ft1000dev); //aelias [+] reason: up
//---------------------------------------------------------------------------
static int ft1000_copy_down_pkt (struct net_device *netdev, u8 *packet, u16 len)
{
- FT1000_INFO *pInfo = netdev_priv(netdev);
+ struct ft1000_info *pInfo = netdev_priv(netdev);
struct ft1000_device *pFt1000Dev = pInfo->pFt1000Dev;
//---------------------------------------------------------------------------
static int ft1000_start_xmit(struct sk_buff *skb, struct net_device *dev)
{
- FT1000_INFO *pInfo = netdev_priv(dev);
+ struct ft1000_info *pInfo = netdev_priv(dev);
struct ft1000_device *pFt1000Dev= pInfo->pFt1000Dev;
u8 *pdata;
int maxlen, pipe;
//---------------------------------------------------------------------------
static int ft1000_copy_up_pkt (struct urb *urb)
{
- PFT1000_INFO info = urb->context;
+ struct ft1000_info *info = urb->context;
struct ft1000_device *ft1000dev = info->pFt1000Dev;
struct net_device *net = ft1000dev->net;
// SUCCESS
//
//---------------------------------------------------------------------------
-static int ft1000_submit_rx_urb(PFT1000_INFO info)
+static int ft1000_submit_rx_urb(struct ft1000_info *info)
{
int result;
struct ft1000_device *pFt1000Dev = info->pFt1000Dev;
//---------------------------------------------------------------------------
static int ft1000_open (struct net_device *dev)
{
- FT1000_INFO *pInfo = (FT1000_INFO *)netdev_priv(dev);
+ struct ft1000_info *pInfo = (struct ft1000_info *)netdev_priv(dev);
struct timeval tv; //mbelian
DEBUG("ft1000_open is called for card %d\n", pInfo->CardNumber);
//---------------------------------------------------------------------------
int ft1000_close(struct net_device *net)
{
- FT1000_INFO *pInfo = (FT1000_INFO *) netdev_priv (net);
+ struct ft1000_info *pInfo = (struct ft1000_info *) netdev_priv(net);
struct ft1000_device *ft1000dev = pInfo->pFt1000Dev;
//DEBUG ("ft1000_close: netdev->refcnt=%d\n", net->refcnt);
static struct net_device_stats *ft1000_netdev_stats(struct net_device *dev)
{
- FT1000_INFO *info = (FT1000_INFO *) netdev_priv (dev);
+ struct ft1000_info *info = (struct ft1000_info *) netdev_priv(dev);
return &(info->stats); //mbelian
}
static int ft1000_chkcard (struct ft1000_device *dev) {
u16 tempword;
u16 status;
- FT1000_INFO *info = (FT1000_INFO *) netdev_priv (dev->net);
+ struct ft1000_info *info = (struct ft1000_info *) netdev_priv(dev->net);
if (info->fCondResetPend)
{
static int ft1000_dsp_prov(void *arg)
{
struct ft1000_device *dev = (struct ft1000_device *)arg;
- FT1000_INFO *info = (FT1000_INFO *) netdev_priv (dev->net);
+ struct ft1000_info *info = (struct ft1000_info *) netdev_priv(dev->net);
u16 tempword;
u16 len;
u16 i=0;
static int ft1000_proc_drvmsg (struct ft1000_device *dev, u16 size) {
- FT1000_INFO *info = (FT1000_INFO *) netdev_priv (dev->net);
+ struct ft1000_info *info = (struct ft1000_info *) netdev_priv(dev->net);
u16 msgtype;
u16 tempword;
struct media_msg *pmediamsg;
int ft1000_poll(void* dev_id) {
struct ft1000_device *dev = (struct ft1000_device *)dev_id;
- FT1000_INFO *info = (FT1000_INFO *) netdev_priv (dev->net);
+ struct ft1000_info *info = (struct ft1000_info *) netdev_priv(dev->net);
u16 tempword;
u16 status;
unsigned short ledStat;
unsigned short conStat;
- FT1000_INFO *info;
+ struct ft1000_info *info;
char *status[] = { "Idle (Disconnect)", "Searching", "Active (Connected)",
"Waiting for L2", "Sleep", "No Coverage", "", ""
time_t delta;
dev = (struct net_device *) data;
- info = (FT1000_INFO *) netdev_priv (dev);
+ info = (struct ft1000_info *) netdev_priv(dev);
if (off > 0)
{
ft1000NotifyProc (struct notifier_block *this, unsigned long event, void *ptr)
{
struct net_device *dev = ptr;
- FT1000_INFO *info;
+ struct ft1000_info *info;
struct proc_dir_entry *ft1000_proc_file;
- info = (FT1000_INFO *) netdev_priv (dev);
+info = (struct ft1000_info *) netdev_priv(dev);
switch (event)
void
ft1000InitProc (struct net_device *dev)
{
- FT1000_INFO *info;
+ struct ft1000_info *info;
struct proc_dir_entry *ft1000_proc_file;
- info = (FT1000_INFO *) netdev_priv (dev);
+ info = (struct ft1000_info *) netdev_priv(dev);
info->ft1000_proc_dir = proc_mkdir (FT1000_PROC_DIR, FTNET_PROC);
}
void
-ft1000CleanupProc (FT1000_INFO * info)
+ft1000CleanupProc(struct ft1000_info *info)
{
remove_proc_entry (info->netdevname, info->ft1000_proc_dir);
remove_proc_entry (FT1000_PROC_DIR, FTNET_PROC);
int i, ret = 0, size;
struct ft1000_device *ft1000dev;
- FT1000_INFO *pft1000info;
+ struct ft1000_info *pft1000info;
const struct firmware *dsp_fw;
ft1000dev = kmalloc(sizeof(struct ft1000_device), GFP_KERNEL);
if (ret)
goto err_load;
- pft1000info = (FT1000_INFO *) netdev_priv(ft1000dev->net);
+ pft1000info = (struct ft1000_info *) netdev_priv(ft1000dev->net);
DEBUG("In probe: pft1000info=%p\n", pft1000info);
ret = dsp_reload(ft1000dev);
static void ft1000_disconnect(struct usb_interface *interface)
{
- FT1000_INFO *pft1000info;
+ struct ft1000_info *pft1000info;
DEBUG("ft1000_disconnect is called\n");
- pft1000info = (PFT1000_INFO) usb_get_intfdata(interface);
+ pft1000info = (struct ft1000_info *) usb_get_intfdata(interface);
DEBUG("In disconnect pft1000info=%p\n", pft1000info);
if (pft1000info) {
// struct net_device_stats stats; //mbelian
} __attribute__ ((packed));
-typedef struct _FT1000_INFO {
+struct ft1000_info {
struct ft1000_device *pFt1000Dev;
struct net_device_stats stats;
unsigned short tempbuf[32];
char netdevname[IFNAMSIZ];
struct proc_dir_entry *ft1000_proc_dir; //mbelian
-} FT1000_INFO, *PFT1000_INFO;
+};
struct dpram_blk {
int ft1000_poll(void* dev_id);
void ft1000InitProc(struct net_device *dev);
-void ft1000CleanupProc(FT1000_INFO *info);
+void ft1000CleanupProc(struct ft1000_info *info);