~ubuntu-branches/ubuntu/precise/linux-ti-omap4/precise

« back to all changes in this revision

Viewing changes to drivers/staging/bcm/Bcmnet.c

  • Committer: Bazaar Package Importer
  • Author(s): Paolo Pisati
  • Date: 2011-06-29 15:23:51 UTC
  • mfrom: (26.1.1 natty-proposed)
  • Revision ID: james.westby@ubuntu.com-20110629152351-xs96tm303d95rpbk
Tags: 3.0.0-1200.2
* Rebased against 3.0.0-6.7
* BSP from TI based on 3.0.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
8
8
 
9
9
        if (Adapter->fw_download_done == FALSE) {
10
10
                pr_notice(PFX "%s: link up failed (download in progress)\n",
11
 
                          dev->name);
 
11
                          dev->name);
12
12
                return -EBUSY;
13
13
        }
14
14
 
50
50
* Description - This is the main transmit function for our virtual
51
51
*               interface(eth0). It handles the ARP packets. It
52
52
*               clones this packet and then Queue it to a suitable
53
 
*               Queue. Then calls the transmit_packet().
 
53
*               Queue. Then calls the transmit_packet().
54
54
*
55
55
* Parameter   -  skb - Pointer to the socket buffer structure
56
56
*                dev - Pointer to the virtual net device structure
110
110
Register other driver entry points with the kernel
111
111
*/
112
112
static const struct net_device_ops bcmNetDevOps = {
113
 
    .ndo_open           = bcm_open,
114
 
    .ndo_stop           = bcm_close,
115
 
    .ndo_start_xmit     = bcm_transmit,
116
 
    .ndo_change_mtu     = eth_change_mtu,
117
 
    .ndo_set_mac_address = eth_mac_addr,
118
 
    .ndo_validate_addr  = eth_validate_addr,
119
 
    .ndo_select_queue   = bcm_select_queue,
 
113
        .ndo_open               = bcm_open,
 
114
        .ndo_stop               = bcm_close,
 
115
        .ndo_start_xmit         = bcm_transmit,
 
116
        .ndo_change_mtu         = eth_change_mtu,
 
117
        .ndo_set_mac_address    = eth_mac_addr,
 
118
        .ndo_validate_addr      = eth_validate_addr,
 
119
        .ndo_select_queue       = bcm_select_queue,
120
120
};
121
121
 
122
122
static struct device_type wimax_type = {
138
138
        return 0;
139
139
}
140
140
 
141
 
static void bcm_get_drvinfo(struct net_device *dev, struct ethtool_drvinfo *info)
 
141
static void bcm_get_drvinfo(struct net_device *dev,
 
142
                            struct ethtool_drvinfo *info)
142
143
{
143
144
        PMINI_ADAPTER Adapter = GET_BCM_ADAPTER(dev);
144
145
        PS_INTERFACE_ADAPTER psIntfAdapter = Adapter->pvInterfaceAdapter;
160
161
        return Adapter->LinkUpStatus;
161
162
}
162
163
 
163
 
static u32 bcm_get_msglevel (struct net_device *dev)
 
164
static u32 bcm_get_msglevel(struct net_device *dev)
164
165
{
165
166
        PMINI_ADAPTER Adapter = GET_BCM_ADAPTER(dev);
166
167
 
167
168
        return Adapter->msg_enable;
168
169
}
169
170
 
170
 
static void bcm_set_msglevel (struct net_device *dev, u32 level)
 
171
static void bcm_set_msglevel(struct net_device *dev, u32 level)
171
172
{
172
173
        PMINI_ADAPTER Adapter = GET_BCM_ADAPTER(dev);
173
174
 
177
178
static const struct ethtool_ops bcm_ethtool_ops = {
178
179
        .get_settings   = bcm_get_settings,
179
180
        .get_drvinfo    = bcm_get_drvinfo,
180
 
        .get_link       = bcm_get_link,
 
181
        .get_link       = bcm_get_link,
181
182
        .get_msglevel   = bcm_get_msglevel,
182
183
        .set_msglevel   = bcm_set_msglevel,
183
184
};
206
207
        if (result != STATUS_SUCCESS) {
207
208
                dev_err(&udev->dev,
208
209
                        PFX "Error in Reading the mac Address: %d", result);
209
 
                return -EIO;
 
210
                return -EIO;
210
211
        }
211
212
 
212
213
        result = register_netdev(net);
233
234
        if (netif_msg_probe(Adapter))
234
235
                dev_info(&udev->dev, PFX "%s: unregister usb-%s%s\n",
235
236
                         net->name, xdev->bus->bus_name, xdev->devpath);
236
 
 
 
237
 
237
238
        unregister_netdev(Adapter->dev);
238
239
}