diff options
author | Stephen Hemminger <shemminger@vyatta.com> | 2009-03-20 15:36:39 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-03-22 01:55:31 -0400 |
commit | d5b3b9ae065d093fe0e1588a07f3ebd71c815f0b (patch) | |
tree | 0132e30fdb7e9977f14372c040459faae2ddcf46 /drivers/net | |
parent | ce55cbaf3a4498719bdb5a022a45d256b84749f5 (diff) |
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')
-rw-r--r-- | drivers/net/wireless/ipw2x00/ieee80211.h | 1 | ||||
-rw-r--r-- | drivers/net/wireless/ipw2x00/libipw_module.c | 5 | ||||
-rw-r--r-- | drivers/net/wireless/ipw2x00/libipw_tx.c | 1 |
3 files changed, 6 insertions, 1 deletions
diff --git a/drivers/net/wireless/ipw2x00/ieee80211.h b/drivers/net/wireless/ipw2x00/ieee80211.h index 1978fcd833dc..70755c1336d5 100644 --- a/drivers/net/wireless/ipw2x00/ieee80211.h +++ b/drivers/net/wireless/ipw2x00/ieee80211.h | |||
@@ -1016,6 +1016,7 @@ static inline int ieee80211_is_cck_rate(u8 rate) | |||
1016 | /* ieee80211.c */ | 1016 | /* ieee80211.c */ |
1017 | extern void free_ieee80211(struct net_device *dev); | 1017 | extern void free_ieee80211(struct net_device *dev); |
1018 | extern struct net_device *alloc_ieee80211(int sizeof_priv); | 1018 | extern struct net_device *alloc_ieee80211(int sizeof_priv); |
1019 | extern int ieee80211_change_mtu(struct net_device *dev, int new_mtu); | ||
1019 | 1020 | ||
1020 | extern void ieee80211_networks_age(struct ieee80211_device *ieee, | 1021 | extern void ieee80211_networks_age(struct ieee80211_device *ieee, |
1021 | unsigned long age_secs); | 1022 | unsigned long age_secs); |
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) | |||
131 | &ieee->network_free_list); | 131 | &ieee->network_free_list); |
132 | } | 132 | } |
133 | 133 | ||
134 | static int ieee80211_change_mtu(struct net_device *dev, int new_mtu) | 134 | int ieee80211_change_mtu(struct net_device *dev, int new_mtu) |
135 | { | 135 | { |
136 | if ((new_mtu < 68) || (new_mtu > IEEE80211_DATA_LEN)) | 136 | if ((new_mtu < 68) || (new_mtu > IEEE80211_DATA_LEN)) |
137 | return -EINVAL; | 137 | return -EINVAL; |
138 | dev->mtu = new_mtu; | 138 | dev->mtu = new_mtu; |
139 | return 0; | 139 | return 0; |
140 | } | 140 | } |
141 | EXPORT_SYMBOL(ieee80211_change_mtu); | ||
141 | 142 | ||
142 | struct net_device *alloc_ieee80211(int sizeof_priv) | 143 | struct net_device *alloc_ieee80211(int sizeof_priv) |
143 | { | 144 | { |
@@ -153,8 +154,10 @@ struct net_device *alloc_ieee80211(int sizeof_priv) | |||
153 | goto failed; | 154 | goto failed; |
154 | } | 155 | } |
155 | ieee = netdev_priv(dev); | 156 | ieee = netdev_priv(dev); |
157 | #ifdef CONFIG_COMPAT_NET_DEV_OPS | ||
156 | dev->hard_start_xmit = ieee80211_xmit; | 158 | dev->hard_start_xmit = ieee80211_xmit; |
157 | dev->change_mtu = ieee80211_change_mtu; | 159 | dev->change_mtu = ieee80211_change_mtu; |
160 | #endif | ||
158 | 161 | ||
159 | ieee->dev = dev; | 162 | ieee->dev = dev; |
160 | 163 | ||
diff --git a/drivers/net/wireless/ipw2x00/libipw_tx.c b/drivers/net/wireless/ipw2x00/libipw_tx.c index 0da4a0a73a4a..65a8195b3d90 100644 --- a/drivers/net/wireless/ipw2x00/libipw_tx.c +++ b/drivers/net/wireless/ipw2x00/libipw_tx.c | |||
@@ -541,5 +541,6 @@ int ieee80211_xmit(struct sk_buff *skb, struct net_device *dev) | |||
541 | dev->stats.tx_errors++; | 541 | dev->stats.tx_errors++; |
542 | return 1; | 542 | return 1; |
543 | } | 543 | } |
544 | EXPORT_SYMBOL(ieee80211_xmit); | ||
544 | 545 | ||
545 | EXPORT_SYMBOL(ieee80211_txb_free); | 546 | EXPORT_SYMBOL(ieee80211_txb_free); |