From 193615c0dfdee0be5c0dc26e0f1f08cf75196e89 Mon Sep 17 00:00:00 2001 From: proski Date: Wed, 15 Apr 2009 03:11:34 +0000 Subject: [PATCH] Initialize do_ioctl together with other device operations It's better to keep initialization in one place to simplify conversion to the new style netdev ops. Declare ieee80211_ioctl() in ieee80211_linux.h next to other ieee80211_ioctl* functions defined in ieee80211_wireless.c. git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@4000 0192ed92-7a03-0410-a25b-9323aeb14dbd --- net80211/ieee80211.c | 1 + net80211/ieee80211_linux.h | 1 + net80211/ieee80211_wireless.c | 3 +-- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/net80211/ieee80211.c b/net80211/ieee80211.c index 44899fe..a349ca6 100644 --- a/net80211/ieee80211.c +++ b/net80211/ieee80211.c @@ -427,6 +427,7 @@ ieee80211_vap_setup(struct ieee80211com *ic, struct net_device *dev, dev->hard_start_xmit = ieee80211_hardstart; dev->set_multicast_list = ieee80211_set_multicast_list; dev->change_mtu = ieee80211_change_mtu; + dev->do_ioctl = ieee80211_ioctl; dev->tx_queue_len = 0; /* NB: bypass queuing */ dev->hard_header_len = parent->hard_header_len; /* diff --git a/net80211/ieee80211_linux.h b/net80211/ieee80211_linux.h index e738ed7..4b3d304 100644 --- a/net80211/ieee80211_linux.h +++ b/net80211/ieee80211_linux.h @@ -628,6 +628,7 @@ void ieee80211_vlan_vdetach(struct ieee80211vap *); #define free_netdev(dev) kfree(dev) #endif +int ieee80211_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd); void ieee80211_ioctl_vattach(struct ieee80211vap *); void ieee80211_ioctl_vdetach(struct ieee80211vap *); struct ifreq; diff --git a/net80211/ieee80211_wireless.c b/net80211/ieee80211_wireless.c index 0b646a3..c1450b8 100644 --- a/net80211/ieee80211_wireless.c +++ b/net80211/ieee80211_wireless.c @@ -5778,7 +5778,7 @@ static struct iw_handler_def ieee80211_iw_handler_def = { /* * Handle private ioctl requests. */ -static int +int ieee80211_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) { struct ieee80211vap *vap = netdev_priv(dev); @@ -5854,7 +5854,6 @@ ieee80211_ioctl_vattach(struct ieee80211vap *vap) { struct net_device *dev = vap->iv_dev; - dev->do_ioctl = ieee80211_ioctl; #if IW_HANDLER_VERSION < 7 dev->get_wireless_stats = ieee80211_iw_getstats; #endif