diff options
author | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2010-11-01 09:52:14 -0400 |
---|---|---|
committer | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2010-11-01 09:52:14 -0400 |
commit | e614e28eac1afcdc3d1275f3e1478aa3e5acc500 (patch) | |
tree | 589b73309a811636ea7689e1da0dee32610d7cde /drivers/staging/bcm/Bcmnet.c | |
parent | 2515ab628f227b0711393993fe3228e167cc988f (diff) |
beceem: remove indirection to Adapter structure
Allocate Adapter structure as part of network device.
Signed-off-by: Stephen Hemminber <shemminger@vyatta.com>
Diffstat (limited to 'drivers/staging/bcm/Bcmnet.c')
-rw-r--r-- | drivers/staging/bcm/Bcmnet.c | 22 |
1 files changed, 1 insertions, 21 deletions
diff --git a/drivers/staging/bcm/Bcmnet.c b/drivers/staging/bcm/Bcmnet.c index 9518e388b05..1f35cd3c287 100644 --- a/drivers/staging/bcm/Bcmnet.c +++ b/drivers/staging/bcm/Bcmnet.c @@ -1,11 +1,5 @@ #include "headers.h" -#define DRV_NAME "beceem" -#define DRV_VERSION "5.2.7.3P1" -#define DRV_DESCRIPTION "Beceem Communications Inc. WiMAX driver" -#define DRV_COPYRIGHT "Copyright 2010. Beceem Communications Inc" - - struct net_device *gblpnetdev; /***************************************************************************************/ /* proto-type of lower function */ @@ -123,29 +117,15 @@ static const struct ethtool_ops bcm_ethtool_ops = { int register_networkdev(PMINI_ADAPTER Adapter) { - struct net_device *net; - PMINI_ADAPTER *temp; - PS_INTERFACE_ADAPTER psIntfAdapter = Adapter->pvInterfaceAdapter; - struct usb_interface *uintf = psIntfAdapter->interface; + struct net_device *net = Adapter->dev; int result; - net = alloc_etherdev(sizeof(PMINI_ADAPTER)); - if(!net) { - pr_notice("bcmnet: no memory for device\n"); - return -ENOMEM; - } - - Adapter->dev = net; /* FIXME - only allows one adapter! */ - temp = netdev_priv(net); - *temp = Adapter; - net->netdev_ops = &bcmNetDevOps; net->ethtool_ops = &bcm_ethtool_ops; net->mtu = MTU_SIZE; /* 1400 Bytes */ net->tx_queue_len = TX_QLEN; netif_carrier_off(net); - SET_NETDEV_DEV(net, &uintf->dev); SET_NETDEV_DEVTYPE(net, &wimax_type); /* Read the MAC Address from EEPROM */ |