Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 205733
b: refs/heads/master
c: 194a636
h: refs/heads/master
i:
  205731: 2a6af72
v: v3
  • Loading branch information
Prashant P. Shah authored and Greg Kroah-Hartman committed Jun 23, 2010
1 parent f038e28 commit ef5b76e
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 42 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 8cd5778b77f36b90e6791c17473a8ffac6450ea3
refs/heads/master: 194a636d7a623bb1a14d3210618e4118e081cafe
73 changes: 32 additions & 41 deletions trunk/drivers/staging/wlags49_h2/wl_cs.c
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ static int wl_adapter_attach(struct pcmcia_device *link)
{
struct net_device *dev;
struct wl_private *lp;
/*------------------------------------------------------------------------*/
/*--------------------------------------------------------------------*/

DBG_FUNC("wl_adapter_attach");
DBG_ENTER(DbgInfo);
Expand All @@ -162,7 +162,7 @@ static int wl_adapter_attach(struct pcmcia_device *link)

DBG_LEAVE(DbgInfo);
return 0;
} // wl_adapter_attach
} /* wl_adapter_attach */
/*============================================================================*/


Expand Down Expand Up @@ -191,8 +191,7 @@ static int wl_adapter_attach(struct pcmcia_device *link)
static void wl_adapter_detach(struct pcmcia_device *link)
{
struct net_device *dev = link->priv;
/*------------------------------------------------------------------------*/

/*--------------------------------------------------------------------*/

DBG_FUNC("wl_adapter_detach");
DBG_ENTER(DbgInfo);
Expand All @@ -208,7 +207,7 @@ static void wl_adapter_detach(struct pcmcia_device *link)
wl_device_dealloc(dev);

DBG_LEAVE(DbgInfo);
} // wl_adapter_detach
} /* wl_adapter_detach */
/*============================================================================*/


Expand Down Expand Up @@ -244,21 +243,21 @@ void wl_adapter_release(struct pcmcia_device *link)
pcmcia_disable_device(link);

DBG_LEAVE(DbgInfo);
} // wl_adapter_release
} /* wl_adapter_release */
/*============================================================================*/

static int wl_adapter_suspend(struct pcmcia_device *link)
{
struct net_device *dev = link->priv;

//if (link->open) {
/* if (link->open) { */
netif_device_detach(dev);
wl_suspend(dev);
//// CHECK! pcmcia_release_configuration(link->handle);
//}
/* CHECK! pcmcia_release_configuration(link->handle); */
/* } */

return 0;
} // wl_adapter_suspend
} /* wl_adapter_suspend */

static int wl_adapter_resume(struct pcmcia_device *link)
{
Expand All @@ -269,7 +268,7 @@ static int wl_adapter_resume(struct pcmcia_device *link)
netif_device_attach(dev);

return 0;
} // wl_adapter_resume
} /* wl_adapter_resume */

/*******************************************************************************
* wl_adapter_insert()
Expand All @@ -296,7 +295,7 @@ void wl_adapter_insert(struct pcmcia_device *link)
struct net_device *dev;
int i;
int ret;
/*------------------------------------------------------------------------*/
/*--------------------------------------------------------------------*/

DBG_FUNC("wl_adapter_insert");
DBG_ENTER(DbgInfo);
Expand Down Expand Up @@ -332,9 +331,8 @@ void wl_adapter_insert(struct pcmcia_device *link)

printk(KERN_INFO "%s: Wireless, io_addr %#03lx, irq %d, ""mac_address ",
dev->name, dev->base_addr, dev->irq);
for (i = 0; i < ETH_ALEN; i++) {
for (i = 0; i < ETH_ALEN; i++)
printk("%02X%c", dev->dev_addr[i], ((i < (ETH_ALEN-1)) ? ':' : '\n'));
}

DBG_LEAVE(DbgInfo);
return;
Expand All @@ -344,7 +342,7 @@ void wl_adapter_insert(struct pcmcia_device *link)

DBG_LEAVE(DbgInfo);
return;
} // wl_adapter_insert
} /* wl_adapter_insert */
/*============================================================================*/


Expand Down Expand Up @@ -373,16 +371,14 @@ int wl_adapter_open(struct net_device *dev)
struct pcmcia_device *link = lp->link;
int result = 0;
int hcf_status = HCF_SUCCESS;
/*------------------------------------------------------------------------*/

/*--------------------------------------------------------------------*/

DBG_FUNC("wl_adapter_open");
DBG_ENTER(DbgInfo);
DBG_PRINT("%s\n", VERSION_INFO);
DBG_PARAM(DbgInfo, "dev", "%s (0x%p)", dev->name, dev);

if (!pcmcia_dev_present(link))
{
if (!pcmcia_dev_present(link)) {
DBG_LEAVE(DbgInfo);
return -ENODEV;
}
Expand All @@ -398,7 +394,7 @@ int wl_adapter_open(struct net_device *dev)

DBG_LEAVE(DbgInfo);
return result;
} // wl_adapter_open
} /* wl_adapter_open */
/*============================================================================*/


Expand All @@ -425,8 +421,7 @@ int wl_adapter_close(struct net_device *dev)
{
struct wl_private *lp = wl_priv(dev);
struct pcmcia_device *link = lp->link;
/*------------------------------------------------------------------------*/

/*--------------------------------------------------------------------*/

DBG_FUNC("wl_adapter_close");
DBG_ENTER(DbgInfo);
Expand All @@ -444,19 +439,19 @@ int wl_adapter_close(struct net_device *dev)

DBG_LEAVE(DbgInfo);
return 0;
} // wl_adapter_close
} /* wl_adapter_close */
/*============================================================================*/

static struct pcmcia_device_id wl_adapter_ids[] = {
#if ! ((HCF_TYPE) & HCF_TYPE_HII5)
#if !((HCF_TYPE) & HCF_TYPE_HII5)
PCMCIA_DEVICE_MANF_CARD(0x0156, 0x0003),
PCMCIA_DEVICE_PROD_ID12("Agere Systems", "Wireless PC Card Model 0110",
0x33103a9b, 0xe175b0dd),
#else
PCMCIA_DEVICE_MANF_CARD(0x0156, 0x0004),
PCMCIA_DEVICE_PROD_ID12("Linksys", "WCF54G_Wireless-G_CompactFlash_Card",
0x0733cc81, 0x98a599e1),
#endif // (HCF_TYPE) & HCF_TYPE_HII5
#endif /* (HCF_TYPE) & HCF_TYPE_HII5 */
PCMCIA_DEVICE_NULL,
};
MODULE_DEVICE_TABLE(pcmcia, wl_adapter_ids);
Expand Down Expand Up @@ -496,8 +491,7 @@ static struct pcmcia_driver wlags49_driver = {
int wl_adapter_init_module(void)
{
int ret;
/*------------------------------------------------------------------------*/

/*--------------------------------------------------------------------*/

DBG_FUNC("wl_adapter_init_module");
DBG_ENTER(DbgInfo);
Expand All @@ -507,7 +501,7 @@ int wl_adapter_init_module(void)

DBG_LEAVE(DbgInfo);
return ret;
} // wl_adapter_init_module
} /* wl_adapter_init_module */
/*============================================================================*/


Expand Down Expand Up @@ -539,7 +533,7 @@ void wl_adapter_cleanup_module(void)

DBG_LEAVE(DbgInfo);
return;
} // wl_adapter_cleanup_module
} /* wl_adapter_cleanup_module */
/*============================================================================*/


Expand Down Expand Up @@ -567,12 +561,11 @@ int wl_adapter_is_open(struct net_device *dev)
struct wl_private *lp = wl_priv(dev);
struct pcmcia_device *link = lp->link;

if (!pcmcia_dev_present(link)) {
if (!pcmcia_dev_present(link))
return 0;
}

return(link->open);
} // wl_adapter_is_open
return link->open;
} /* wl_adapter_is_open */
/*============================================================================*/


Expand All @@ -596,12 +589,11 @@ int wl_adapter_is_open(struct net_device *dev)
* a pointer to a string describing the error(s)
*
******************************************************************************/
const char* DbgEvent(int mask)
const char *DbgEvent(int mask)
{
static char DbgBuffer[256];
char *pBuf;
/*------------------------------------------------------------------------*/

/*--------------------------------------------------------------------*/

pBuf = DbgBuffer;
*pBuf = '\0';
Expand Down Expand Up @@ -643,8 +635,8 @@ const char* DbgEvent(int mask)
if (mask & CS_EVENT_REGISTRATION_COMPLETE)
strcat(pBuf, "REGISTRATION_COMPLETE ");

// if (mask & CS_EVENT_RESET_COMPLETE)
// strcat(pBuf, "RESET_COMPLETE ");
/* if (mask & CS_EVENT_RESET_COMPLETE)
strcat(pBuf, "RESET_COMPLETE "); */

if (mask & CS_EVENT_PM_SUSPEND)
strcat(pBuf, "PM_SUSPEND ");
Expand Down Expand Up @@ -680,13 +672,12 @@ const char* DbgEvent(int mask)
if (*pBuf) {
pBuf[strlen(pBuf) - 1] = '\0';
} else {
if (mask != 0x0) {
if (mask != 0x0)
sprintf(pBuf, "<<0x%08x>>", mask);
}
}

return pBuf;
} // DbgEvent
} /* DbgEvent */
/*============================================================================*/

#endif /* DBG */

0 comments on commit ef5b76e

Please sign in to comment.