diff options
Diffstat (limited to 'drivers/net/wireless/intersil/orinoco/main.c')
-rw-r--r-- | drivers/net/wireless/intersil/orinoco/main.c | 33 |
1 files changed, 10 insertions, 23 deletions
diff --git a/drivers/net/wireless/intersil/orinoco/main.c b/drivers/net/wireless/intersil/orinoco/main.c index 7afe2004e930..28cf97489001 100644 --- a/drivers/net/wireless/intersil/orinoco/main.c +++ b/drivers/net/wireless/intersil/orinoco/main.c @@ -294,14 +294,6 @@ int orinoco_stop(struct net_device *dev) } EXPORT_SYMBOL(orinoco_stop); -struct net_device_stats *orinoco_get_stats(struct net_device *dev) -{ - struct orinoco_private *priv = ndev_priv(dev); - - return &priv->stats; -} -EXPORT_SYMBOL(orinoco_get_stats); - void orinoco_set_multicast_list(struct net_device *dev) { struct orinoco_private *priv = ndev_priv(dev); @@ -322,9 +314,6 @@ int orinoco_change_mtu(struct net_device *dev, int new_mtu) { struct orinoco_private *priv = ndev_priv(dev); - if ((new_mtu < ORINOCO_MIN_MTU) || (new_mtu > ORINOCO_MAX_MTU)) - return -EINVAL; - /* MTU + encapsulation + header length */ if ((new_mtu + ENCAPS_OVERHEAD + sizeof(struct ieee80211_hdr)) > (priv->nicbuf_size - ETH_HLEN)) @@ -436,7 +425,7 @@ EXPORT_SYMBOL(orinoco_process_xmit_skb); static netdev_tx_t orinoco_xmit(struct sk_buff *skb, struct net_device *dev) { struct orinoco_private *priv = ndev_priv(dev); - struct net_device_stats *stats = &priv->stats; + struct net_device_stats *stats = &dev->stats; struct hermes *hw = &priv->hw; int err = 0; u16 txfid = priv->txfid; @@ -596,10 +585,7 @@ static void __orinoco_ev_alloc(struct net_device *dev, struct hermes *hw) static void __orinoco_ev_tx(struct net_device *dev, struct hermes *hw) { - struct orinoco_private *priv = ndev_priv(dev); - struct net_device_stats *stats = &priv->stats; - - stats->tx_packets++; + dev->stats.tx_packets++; netif_wake_queue(dev); @@ -608,8 +594,7 @@ static void __orinoco_ev_tx(struct net_device *dev, struct hermes *hw) static void __orinoco_ev_txexc(struct net_device *dev, struct hermes *hw) { - struct orinoco_private *priv = ndev_priv(dev); - struct net_device_stats *stats = &priv->stats; + struct net_device_stats *stats = &dev->stats; u16 fid = hermes_read_regn(hw, TXCOMPLFID); u16 status; struct hermes_txexc_data hdr; @@ -665,7 +650,7 @@ static void __orinoco_ev_txexc(struct net_device *dev, struct hermes *hw) void orinoco_tx_timeout(struct net_device *dev) { struct orinoco_private *priv = ndev_priv(dev); - struct net_device_stats *stats = &priv->stats; + struct net_device_stats *stats = &dev->stats; struct hermes *hw = &priv->hw; printk(KERN_WARNING "%s: Tx timeout! " @@ -752,7 +737,7 @@ static void orinoco_rx_monitor(struct net_device *dev, u16 rxfid, int len; struct sk_buff *skb; struct orinoco_private *priv = ndev_priv(dev); - struct net_device_stats *stats = &priv->stats; + struct net_device_stats *stats = &dev->stats; struct hermes *hw = &priv->hw; len = le16_to_cpu(desc->data_len); @@ -843,7 +828,7 @@ static void orinoco_rx_monitor(struct net_device *dev, u16 rxfid, void __orinoco_ev_rx(struct net_device *dev, struct hermes *hw) { struct orinoco_private *priv = ndev_priv(dev); - struct net_device_stats *stats = &priv->stats; + struct net_device_stats *stats = &dev->stats; struct iw_statistics *wstats = &priv->wstats; struct sk_buff *skb = NULL; u16 rxfid, status; @@ -962,7 +947,7 @@ static void orinoco_rx(struct net_device *dev, struct sk_buff *skb) { struct orinoco_private *priv = ndev_priv(dev); - struct net_device_stats *stats = &priv->stats; + struct net_device_stats *stats = &dev->stats; u16 status, fc; int length; struct ethhdr *hdr; @@ -2140,7 +2125,6 @@ static const struct net_device_ops orinoco_netdev_ops = { .ndo_set_mac_address = eth_mac_addr, .ndo_validate_addr = eth_validate_addr, .ndo_tx_timeout = orinoco_tx_timeout, - .ndo_get_stats = orinoco_get_stats, }; /* Allocate private data. @@ -2288,6 +2272,9 @@ int orinoco_if_add(struct orinoco_private *priv, dev->base_addr = base_addr; dev->irq = irq; + dev->min_mtu = ORINOCO_MIN_MTU; + dev->max_mtu = ORINOCO_MAX_MTU; + SET_NETDEV_DEV(dev, priv->dev); ret = register_netdev(dev); if (ret) |