From: Stephen Hemminger <shemminger@vyatta.com>
To: David Miller <davem@davemloft.net>, jkosina@suse.cz, dstreba@suse.cz
Cc: netdev@vger.kernel.org, linux-wireless@vger.kernel.org
Subject: [PATCH 72/77] ipw2x00: convert infrastructure for use by net_device_ops
Date: Fri, 20 Mar 2009 22:36:39 -0700 [thread overview]
Message-ID: <20090321053718.065171867@vyatta.com> (raw)
In-Reply-To: 20090321053527.316395697@vyatta.com
Expose routines so drivers can hook. Only set ptrs in netdev
if using old compat code.
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
---
drivers/net/wireless/ipw2x00/ieee80211.h | 1 +
drivers/net/wireless/ipw2x00/libipw_module.c | 5 ++++-
drivers/net/wireless/ipw2x00/libipw_tx.c | 1 +
3 files changed, 6 insertions(+), 1 deletion(-)
--- a/drivers/net/wireless/ipw2x00/libipw_module.c 2009-03-20 21:39:32.901088992 -0700
+++ b/drivers/net/wireless/ipw2x00/libipw_module.c 2009-03-20 21:39:34.508964994 -0700
@@ -131,13 +131,14 @@ static void ieee80211_networks_initializ
&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 s
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;
--- a/drivers/net/wireless/ipw2x00/ieee80211.h 2009-03-20 21:39:32.900089558 -0700
+++ b/drivers/net/wireless/ipw2x00/ieee80211.h 2009-03-20 21:39:34.509964918 -0700
@@ -1016,6 +1016,7 @@ static inline int ieee80211_is_cck_rate(
/* ieee80211.c */
extern void free_ieee80211(struct net_device *dev);
extern struct net_device *alloc_ieee80211(int sizeof_priv);
+extern int ieee80211_change_mtu(struct net_device *dev, int new_mtu);
extern void ieee80211_networks_age(struct ieee80211_device *ieee,
unsigned long age_secs);
--- a/drivers/net/wireless/ipw2x00/libipw_tx.c 2009-03-20 21:39:59.063966304 -0700
+++ b/drivers/net/wireless/ipw2x00/libipw_tx.c 2009-03-20 21:40:37.667839502 -0700
@@ -541,5 +541,6 @@ int ieee80211_xmit(struct sk_buff *skb,
dev->stats.tx_errors++;
return 1;
}
+EXPORT_SYMBOL(ieee80211_xmit);
EXPORT_SYMBOL(ieee80211_txb_free);
--
next prev parent reply other threads:[~2009-03-21 5:48 UTC|newest]
Thread overview: 44+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20090321053527.316395697@vyatta.com>
2009-03-21 5:36 ` [PATCH 54/77] netwave: convert to internal net_device_stats Stephen Hemminger
2009-03-22 5:47 ` David Miller
2009-03-21 5:36 ` [PATCH 55/77] netwave: convert to net_device_ops Stephen Hemminger
2009-03-22 5:48 ` David Miller
2009-03-21 5:36 ` [PATCH 56/77] strip: " Stephen Hemminger
2009-03-22 5:47 ` David Miller
2009-03-21 5:36 ` [PATCH 57/77] wavelan: convert to internal net_device_stats Stephen Hemminger
2009-03-22 5:47 ` David Miller
2009-03-21 5:36 ` [PATCH 58/77] wavelan: convert to net_device_ops Stephen Hemminger
2009-03-22 5:47 ` David Miller
2009-03-21 5:36 ` [PATCH 59/77] airo: " Stephen Hemminger
2009-03-22 5:48 ` David Miller
2009-03-21 5:36 ` [PATCH 60/77] atmel: " Stephen Hemminger
2009-03-22 5:48 ` David Miller
2009-03-21 5:36 ` [PATCH 61/77] raylan: " Stephen Hemminger
2009-03-22 5:53 ` David Miller
2009-03-21 5:36 ` [PATCH 64/77] zd1201: convert to internal net_device_stats Stephen Hemminger
2009-03-22 5:53 ` David Miller
2009-03-21 5:36 ` [PATCH 65/77] zd1201: convert to net_device_ops Stephen Hemminger
2009-03-22 5:53 ` David Miller
2009-03-21 5:36 ` [PATCH 66/77] mac80211_hwsim: convert to internal net_device_stats Stephen Hemminger
2009-03-21 11:08 ` Johannes Berg
2009-03-22 5:49 ` David Miller
2009-03-22 5:53 ` David Miller
2009-03-21 5:36 ` [PATCH 67/77] prism54: convert to net_device_ops Stephen Hemminger
2009-03-22 5:53 ` David Miller
2009-03-21 5:36 ` [PATCH 68/77] prism54: convert to internal net_device_stats Stephen Hemminger
2009-03-22 5:53 ` David Miller
2009-03-21 5:36 ` [PATCH 69/77] libertas: " Stephen Hemminger
2009-03-22 5:54 ` David Miller
2009-03-21 5:36 ` [PATCH 70/77] libertas: convert to net_device_ops Stephen Hemminger
2009-03-22 5:54 ` David Miller
2009-03-21 5:36 ` [PATCH 71/77] ipw2x00: convert to internal net_device_stats Stephen Hemminger
2009-03-22 5:56 ` David Miller
2009-03-21 5:36 ` Stephen Hemminger [this message]
2009-03-22 5:56 ` [PATCH 72/77] ipw2x00: convert infrastructure for use by net_device_ops David Miller
2009-03-21 5:36 ` [PATCH 73/77] ipw2100: convert to net_device_ops Stephen Hemminger
2009-03-22 5:57 ` David Miller
2009-03-21 5:36 ` [PATCH 74/77] ipw2200: " Stephen Hemminger
2009-03-22 5:57 ` David Miller
2009-03-21 5:36 ` [PATCH 75/77] hostap: convert to internal net_device_stats Stephen Hemminger
2009-03-22 5:57 ` David Miller
2009-03-21 5:36 ` [PATCH 76/77] hostap: convert to net_device_ops Stephen Hemminger
2009-03-22 5:57 ` David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20090321053718.065171867@vyatta.com \
--to=shemminger@vyatta.com \
--cc=davem@davemloft.net \
--cc=dstreba@suse.cz \
--cc=jkosina@suse.cz \
--cc=linux-wireless@vger.kernel.org \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).