From 92bc60580e55d18494a23ba8ae642a464ebfd7a6 Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Fri, 29 Oct 2010 08:22:10 -0700 Subject: beceem: get rid of OS dependent data structure The only part of this structure still used was the network device stats, and in recent kernel these are available in network device itself. Signed-off-by: Stephen Hemminger --- drivers/staging/bcm/Misc.c | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) (limited to 'drivers/staging/bcm/Misc.c') diff --git a/drivers/staging/bcm/Misc.c b/drivers/staging/bcm/Misc.c index cedeb8c3723..351a8aee88f 100644 --- a/drivers/staging/bcm/Misc.c +++ b/drivers/staging/bcm/Misc.c @@ -60,15 +60,6 @@ InitAdapter(PMINI_ADAPTER psAdapter) //init_waitqueue_head(&psAdapter->device_wake_queue); psAdapter->fw_download_done=FALSE; - psAdapter->pvOsDepData = (PLINUX_DEP_DATA) kmalloc(sizeof(LINUX_DEP_DATA), - GFP_KERNEL); - - if(psAdapter->pvOsDepData == NULL) - { - BCM_DEBUG_PRINT(psAdapter,DBG_TYPE_INITEXIT, MP_INIT, DBG_LVL_ALL, "Linux Specific Data allocation failed"); - return -ENOMEM; - } - memset(psAdapter->pvOsDepData, 0, sizeof(LINUX_DEP_DATA)); default_wimax_protocol_initialize(psAdapter); for (i=0;itxctlpacket[count]); } FreeAdapterDsxBuffer(Adapter); - if(Adapter->pvOsDepData) - bcm_kfree (Adapter->pvOsDepData); + if(Adapter->pvInterfaceAdapter) bcm_kfree(Adapter->pvInterfaceAdapter); @@ -1969,9 +1959,7 @@ void update_per_sf_desc_cnts( PMINI_ADAPTER Adapter) void flush_queue(PMINI_ADAPTER Adapter, UINT iQIndex) { struct sk_buff* PacketToDrop=NULL; - struct net_device_stats* netstats=NULL; - - netstats = &((PLINUX_DEP_DATA)Adapter->pvOsDepData)->netstats; + struct net_device_stats* netstats = &Adapter->dev->stats; spin_lock_bh(&Adapter->PackInfo[iQIndex].SFQueueLock); -- cgit v1.2.3