diff options
Diffstat (limited to 'drivers/staging/wlags49_h2/wl_netdev.c')
-rw-r--r-- | drivers/staging/wlags49_h2/wl_netdev.c | 97 |
1 files changed, 2 insertions, 95 deletions
diff --git a/drivers/staging/wlags49_h2/wl_netdev.c b/drivers/staging/wlags49_h2/wl_netdev.c index 235cc2a7ffe6..965b1c0a4753 100644 --- a/drivers/staging/wlags49_h2/wl_netdev.c +++ b/drivers/staging/wlags49_h2/wl_netdev.c @@ -115,14 +115,6 @@ #endif /* BUS_PCI */ -/******************************************************************************* - * global variables - ******************************************************************************/ -#if DBG -extern dbg_info_t *DbgInfo; -#endif /* DBG */ - - #if HCF_ENCAP #define MTU_MAX (HCF_MAX_MSG - ETH_HLEN - 8) #else @@ -170,10 +162,6 @@ int wl_init( struct net_device *dev ) { // unsigned long flags; // struct wl_private *lp = wl_priv(dev); - /*------------------------------------------------------------------------*/ - - DBG_FUNC( "wl_init" ); - DBG_ENTER( DbgInfo ); DBG_PARAM( DbgInfo, "dev", "%s (0x%p)", dev->name, dev ); @@ -182,7 +170,6 @@ int wl_init( struct net_device *dev ) // wl_lock( lp, &flags ); // wl_unlock( lp, &flags ); - DBG_LEAVE( DbgInfo ); return 0; } // wl_init /*============================================================================*/ @@ -208,9 +195,6 @@ int wl_init( struct net_device *dev ) ******************************************************************************/ int wl_config( struct net_device *dev, struct ifmap *map ) { - DBG_FUNC( "wl_config" ); - DBG_ENTER( DbgInfo ); - DBG_PARAM( DbgInfo, "dev", "%s (0x%p)", dev->name, dev ); DBG_PARAM( DbgInfo, "map", "0x%p", map ); @@ -218,7 +202,6 @@ int wl_config( struct net_device *dev, struct ifmap *map ) ignore the request. */ DBG_TRACE(DbgInfo, "%s: %s called.\n", dev->name, __func__); - DBG_LEAVE( DbgInfo ); return 0; } // wl_config /*============================================================================*/ @@ -249,10 +232,7 @@ struct net_device_stats *wl_stats( struct net_device *dev ) unsigned long flags; struct net_device_stats *pStats; struct wl_private *lp = wl_priv(dev); - /*------------------------------------------------------------------------*/ - //DBG_FUNC( "wl_stats" ); - //DBG_ENTER( DbgInfo ); //DBG_PARAM( DbgInfo, "dev", "%s (0x%p)", dev->name, dev ); pStats = NULL; @@ -262,8 +242,6 @@ struct net_device_stats *wl_stats( struct net_device *dev ) #ifdef USE_RTS if( lp->useRTS == 1 ) { wl_unlock( lp, &flags ); - - //DBG_LEAVE( DbgInfo ); return NULL; } #endif /* USE_RTS */ @@ -286,8 +264,6 @@ struct net_device_stats *wl_stats( struct net_device *dev ) wl_unlock( lp, &flags ); - //DBG_LEAVE( DbgInfo ); - return pStats; } // wl_stats /*============================================================================*/ @@ -315,10 +291,6 @@ int wl_open(struct net_device *dev) int status = HCF_SUCCESS; struct wl_private *lp = wl_priv(dev); unsigned long flags; - /*------------------------------------------------------------------------*/ - - DBG_FUNC( "wl_open" ); - DBG_ENTER( DbgInfo ); wl_lock( lp, &flags ); @@ -326,7 +298,6 @@ int wl_open(struct net_device *dev) if( lp->useRTS == 1 ) { DBG_TRACE( DbgInfo, "Skipping device open, in RTS mode\n" ); wl_unlock( lp, &flags ); - DBG_LEAVE( DbgInfo ); return -EIO; } #endif /* USE_RTS */ @@ -384,7 +355,6 @@ int wl_open(struct net_device *dev) wl_unlock( lp, &flags ); - DBG_LEAVE( DbgInfo ); return status; } // wl_open /*============================================================================*/ @@ -411,10 +381,7 @@ int wl_close( struct net_device *dev ) { struct wl_private *lp = wl_priv(dev); unsigned long flags; - /*------------------------------------------------------------------------*/ - DBG_FUNC("wl_close"); - DBG_ENTER(DbgInfo); DBG_PARAM(DbgInfo, "dev", "%s (0x%p)", dev->name, dev); /* Mark the adapter as busy */ @@ -440,7 +407,6 @@ int wl_close( struct net_device *dev ) if( lp->useRTS == 1 ) { DBG_TRACE( DbgInfo, "Skipping device close, in RTS mode\n" ); wl_unlock( lp, &flags ); - DBG_LEAVE( DbgInfo ); return -EIO; } #endif /* USE_RTS */ @@ -450,7 +416,6 @@ int wl_close( struct net_device *dev ) wl_unlock( lp, &flags ); - DBG_LEAVE( DbgInfo ); return 0; } // wl_close /*============================================================================*/ @@ -504,10 +469,7 @@ int wl_ioctl( struct net_device *dev, struct ifreq *rq, int cmd ) struct wl_private *lp = wl_priv(dev); unsigned long flags; int ret = 0; - /*------------------------------------------------------------------------*/ - DBG_FUNC( "wl_ioctl" ); - DBG_ENTER(DbgInfo); DBG_PARAM(DbgInfo, "dev", "%s (0x%p)", dev->name, dev); DBG_PARAM(DbgInfo, "rq", "0x%p", rq); DBG_PARAM(DbgInfo, "cmd", "0x%04x", cmd); @@ -563,7 +525,6 @@ out_act_int_on_unlock: wl_unlock( lp, &flags ); - DBG_LEAVE( DbgInfo ); return ret; } // wl_ioctl /*============================================================================*/ @@ -606,10 +567,6 @@ void wl_tx_timeout( struct net_device *dev ) unsigned long flags; struct wl_private *lp = wl_priv(dev); struct net_device_stats *pStats = NULL; - /*------------------------------------------------------------------------*/ - - DBG_FUNC( "wl_tx_timeout" ); - DBG_ENTER( DbgInfo ); DBG_WARNING( DbgInfo, "%s: Transmit timeout.\n", dev->name ); @@ -619,8 +576,6 @@ void wl_tx_timeout( struct net_device *dev ) if( lp->useRTS == 1 ) { DBG_TRACE( DbgInfo, "Skipping tx_timeout handler, in RTS mode\n" ); wl_unlock( lp, &flags ); - - DBG_LEAVE( DbgInfo ); return; } #endif /* USE_RTS */ @@ -650,8 +605,6 @@ void wl_tx_timeout( struct net_device *dev ) pStats->tx_errors++; wl_unlock( lp, &flags ); - - DBG_LEAVE( DbgInfo ); } // wl_tx_timeout /*============================================================================*/ @@ -683,8 +636,6 @@ int wl_send( struct wl_private *lp ) int len; /*------------------------------------------------------------------------*/ - DBG_FUNC( "wl_send" ); - if( lp == NULL ) { DBG_ERROR( DbgInfo, "Private adapter struct is NULL\n" ); return FALSE; @@ -801,8 +752,6 @@ int wl_tx( struct sk_buff *skb, struct net_device *dev, int port ) struct list_head *element; /*------------------------------------------------------------------------*/ - DBG_FUNC( "wl_tx" ); - /* Grab the spinlock */ wl_lock( lp, &flags ); @@ -895,7 +844,6 @@ int wl_rx(struct net_device *dev) DESC_STRCT *desc; /*------------------------------------------------------------------------*/ - DBG_FUNC("wl_rx") DBG_PARAM(DbgInfo, "dev", "%s (0x%p)", dev->name, dev); if(!( lp->flags & WVLAN2_UIL_BUSY )) { @@ -1047,16 +995,11 @@ void wl_multicast( struct net_device *dev ) struct netdev_hw_addr *ha; struct wl_private *lp = wl_priv(dev); unsigned long flags; - /*------------------------------------------------------------------------*/ - DBG_FUNC( "wl_multicast" ); - DBG_ENTER( DbgInfo ); DBG_PARAM( DbgInfo, "dev", "%s (0x%p)", dev->name, dev ); - if( !wl_adapter_is_open( dev )) { - DBG_LEAVE( DbgInfo ); + if( !wl_adapter_is_open( dev )) return; - } #if DBG if( DBG_FLAGS( DbgInfo ) & DBG_PARAM_ON ) { @@ -1077,8 +1020,6 @@ void wl_multicast( struct net_device *dev ) #ifdef USE_RTS if( lp->useRTS == 1 ) { DBG_TRACE( DbgInfo, "Skipping multicast, in RTS mode\n" ); - - DBG_LEAVE( DbgInfo ); return; } #endif /* USE_RTS */ @@ -1146,7 +1087,6 @@ void wl_multicast( struct net_device *dev ) wl_act_int_on( lp ); wl_unlock( lp, &flags ); } - DBG_LEAVE( DbgInfo ); #endif /* HCF_STA */ } // wl_multicast /*============================================================================*/ @@ -1155,16 +1095,11 @@ void wl_multicast( struct net_device *dev ) void wl_multicast( struct net_device *dev, int num_addrs, void *addrs ) { - DBG_FUNC( "wl_multicast"); - DBG_ENTER(DbgInfo); - DBG_PARAM( DbgInfo, "dev", "%s (0x%p)", dev->name, dev ); DBG_PARAM( DbgInfo, "num_addrs", "%d", num_addrs ); DBG_PARAM( DbgInfo, "addrs", "0x%p", addrs ); #error Obsolete set multicast interface! - - DBG_LEAVE( DbgInfo ); } // wl_multicast /*============================================================================*/ @@ -1213,10 +1148,6 @@ struct net_device * wl_device_alloc( void ) { struct net_device *dev = NULL; struct wl_private *lp = NULL; - /*------------------------------------------------------------------------*/ - - DBG_FUNC( "wl_device_alloc" ); - DBG_ENTER( DbgInfo ); /* Alloc a net_device struct */ dev = alloc_etherdev(sizeof(struct wl_private)); @@ -1253,7 +1184,6 @@ struct net_device * wl_device_alloc( void ) /* Allocate virtual devices for WDS support if needed */ WL_WDS_DEVICE_ALLOC( lp ); - DBG_LEAVE( DbgInfo ); return dev; } // wl_device_alloc /*============================================================================*/ @@ -1279,17 +1209,11 @@ struct net_device * wl_device_alloc( void ) void wl_device_dealloc( struct net_device *dev ) { // struct wl_private *lp = wl_priv(dev); - /*------------------------------------------------------------------------*/ - - DBG_FUNC( "wl_device_dealloc" ); - DBG_ENTER( DbgInfo ); /* Dealloc the WDS ports */ WL_WDS_DEVICE_DEALLOC( lp ); free_netdev( dev ); - - DBG_LEAVE( DbgInfo ); } // wl_device_dealloc /*============================================================================*/ @@ -1496,10 +1420,6 @@ int wl_tx_port6( struct sk_buff *skb, struct net_device *dev ) void wl_wds_device_alloc( struct wl_private *lp ) { int count; - /*------------------------------------------------------------------------*/ - - DBG_FUNC( "wl_wds_device_alloc" ); - DBG_ENTER( DbgInfo ); /* WDS support requires additional net_device structs to be allocated, so that user space apps can use these virtual devices to specify the @@ -1508,10 +1428,8 @@ void wl_wds_device_alloc( struct wl_private *lp ) struct net_device *dev_wds = NULL; dev_wds = kzalloc(sizeof(struct net_device), GFP_KERNEL); - if (!dev_wds) { - DBG_LEAVE(DbgInfo); + if (!dev_wds) return; - } ether_setup( dev_wds ); @@ -1542,8 +1460,6 @@ void wl_wds_device_alloc( struct wl_private *lp ) lp->wds_port[5].dev->hard_start_xmit = &wl_tx_port6; WL_WDS_NETIF_STOP_QUEUE( lp ); - - DBG_LEAVE( DbgInfo ); } // wl_wds_device_alloc /*============================================================================*/ @@ -1567,10 +1483,6 @@ void wl_wds_device_alloc( struct wl_private *lp ) void wl_wds_device_dealloc( struct wl_private *lp ) { int count; - /*------------------------------------------------------------------------*/ - - DBG_FUNC( "wl_wds_device_dealloc" ); - DBG_ENTER( DbgInfo ); for( count = 0; count < NUM_WDS_PORTS; count++ ) { struct net_device *dev_wds = NULL; @@ -1587,8 +1499,6 @@ void wl_wds_device_dealloc( struct wl_private *lp ) lp->wds_port[count].dev = NULL; } } - - DBG_LEAVE( DbgInfo ); } // wl_wds_device_dealloc /*============================================================================*/ @@ -1792,8 +1702,6 @@ int wl_send_dma( struct wl_private *lp, struct sk_buff *skb, int port ) DESC_STRCT *desc_next = NULL; /*------------------------------------------------------------------------*/ - DBG_FUNC( "wl_send_dma" ); - if( lp == NULL ) { DBG_ERROR( DbgInfo, "Private adapter struct is NULL\n" ); return FALSE; @@ -1882,7 +1790,6 @@ int wl_rx_dma( struct net_device *dev ) //CFG_MB_INFO_RANGE2_STRCT x; /*------------------------------------------------------------------------*/ - DBG_FUNC("wl_rx") DBG_PARAM(DbgInfo, "dev", "%s (0x%p)", dev->name, dev); if((( lp = dev->priv ) != NULL ) && |