diff options
author | Stephen Hemminger <shemminger@vyatta.com> | 2009-03-20 22:36:39 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-03-22 08:55:31 +0300 |
commit | d5b3b9ae065d093fe0e1588a07f3ebd71c815f0b (patch) | |
tree | 0132e30fdb7e9977f14372c040459faae2ddcf46 /drivers/net/wireless/ipw2x00/libipw_module.c | |
parent | ce55cbaf3a4498719bdb5a022a45d256b84749f5 (diff) | |
download | linux-d5b3b9ae065d093fe0e1588a07f3ebd71c815f0b.tar.xz |
ipw2x00: convert infrastructure for use by net_device_ops
Expose routines so drivers can hook. Only set ptrs in netdev
if using old compat code.
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/wireless/ipw2x00/libipw_module.c')
-rw-r--r-- | drivers/net/wireless/ipw2x00/libipw_module.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/net/wireless/ipw2x00/libipw_module.c b/drivers/net/wireless/ipw2x00/libipw_module.c index b81df1ad190d..92a26922e792 100644 --- a/drivers/net/wireless/ipw2x00/libipw_module.c +++ b/drivers/net/wireless/ipw2x00/libipw_module.c @@ -131,13 +131,14 @@ static void ieee80211_networks_initialize(struct ieee80211_device *ieee) &ieee->network_free_list); } -static int ieee80211_change_mtu(struct net_device *dev, int new_mtu) +int ieee80211_change_mtu(struct net_device *dev, int new_mtu) { if ((new_mtu < 68) || (new_mtu > IEEE80211_DATA_LEN)) return -EINVAL; dev->mtu = new_mtu; return 0; } +EXPORT_SYMBOL(ieee80211_change_mtu); struct net_device *alloc_ieee80211(int sizeof_priv) { @@ -153,8 +154,10 @@ struct net_device *alloc_ieee80211(int sizeof_priv) goto failed; } ieee = netdev_priv(dev); +#ifdef CONFIG_COMPAT_NET_DEV_OPS dev->hard_start_xmit = ieee80211_xmit; dev->change_mtu = ieee80211_change_mtu; +#endif ieee->dev = dev; |