Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 227904
b: refs/heads/master
c: d21d6dd
h: refs/heads/master
v: v3
  • Loading branch information
Stephen Hemminger committed Nov 1, 2010
1 parent 61fb165 commit 2669f7a
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 2 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: 71e253b1699fb777be68cb1028a90e21ea6ff8d8
refs/heads/master: d21d6dde0280f0897ce6de1948bfaa5633867b28
47 changes: 46 additions & 1 deletion trunk/drivers/staging/bcm/Bcmnet.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
#include "headers.h"

#define DRV_DESCRIPTION "Beceem Communications Inc. WiMAX driver"
#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"


Expand Down Expand Up @@ -79,6 +80,49 @@ static struct device_type wimax_type = {
.name = "wimax",
};

static int bcm_get_settings(struct net_device *dev, struct ethtool_cmd *cmd)
{
cmd->supported = 0;
cmd->advertising = 0;
cmd->speed = SPEED_10000;
cmd->duplex = DUPLEX_FULL;
cmd->port = PORT_TP;
cmd->phy_address = 0;
cmd->transceiver = XCVR_INTERNAL;
cmd->autoneg = AUTONEG_DISABLE;
cmd->maxtxpkt = 0;
cmd->maxrxpkt = 0;
return 0;
}

static void bcm_get_drvinfo(struct net_device *dev, struct ethtool_drvinfo *info)
{
PMINI_ADAPTER Adapter = GET_BCM_ADAPTER(dev);
PS_INTERFACE_ADAPTER psIntfAdapter = Adapter->pvInterfaceAdapter;
struct usb_device *udev = interface_to_usbdev(psIntfAdapter->interface);

strcpy(info->driver, DRV_NAME);
strcpy(info->version, DRV_VERSION);
snprintf(info->fw_version, sizeof(info->fw_version), "%u.%u",
Adapter->uiFlashLayoutMajorVersion,
Adapter->uiFlashLayoutMinorVersion);

usb_make_path(udev, info->bus_info, sizeof(info->bus_info));
}

static u32 bcm_get_link(struct net_device *dev)
{
PMINI_ADAPTER Adapter = GET_BCM_ADAPTER(dev);

return Adapter->LinkUpStatus;
}

static const struct ethtool_ops bcm_ethtool_ops = {
.get_settings = bcm_get_settings,
.get_drvinfo = bcm_get_drvinfo,
.get_link = bcm_get_link,
};

int register_networkdev(PMINI_ADAPTER Adapter)
{
struct net_device *net;
Expand All @@ -98,6 +142,7 @@ int register_networkdev(PMINI_ADAPTER Adapter)
*temp = Adapter;

net->netdev_ops = &bcmNetDevOps;
net->ethtool_ops = &bcm_ethtool_ops;
net->mtu = MTU_SIZE; /* 1400 Bytes */

SET_NETDEV_DEV(net, &uintf->dev);
Expand Down

0 comments on commit 2669f7a

Please sign in to comment.