madwifi: fix wlanconfig athX destroy on 2.6.30 (incomplete netdev_ops transition)

SVN-Revision: 16289
lede-17.01
Felix Fietkau 2009-06-01 22:35:48 +00:00
parent f8ba6eb026
commit 4b87e55994
1 changed files with 34 additions and 3 deletions

View File

@ -61,7 +61,7 @@ http://madwifi-project.org/changeset/4005
case NETDEV_CHANGENAME:
--- a/net80211/ieee80211.c
+++ b/net80211/ieee80211.c
@@ -450,6 +450,17 @@ ieee80211_ifdetach(struct ieee80211com *
@@ -450,6 +450,18 @@ ieee80211_ifdetach(struct ieee80211com *
}
EXPORT_SYMBOL(ieee80211_ifdetach);
@ -73,13 +73,14 @@ http://madwifi-project.org/changeset/4005
+ .ndo_start_xmit = ieee80211_hardstart,
+ .ndo_set_multicast_list = ieee80211_set_multicast_list,
+ .ndo_change_mtu = ieee80211_change_mtu,
+ .ndo_do_ioctl = ieee80211_ioctl,
+};
+#endif
+
int
ieee80211_vap_setup(struct ieee80211com *ic, struct net_device *dev,
const char *name, int opmode, int flags, struct ieee80211vap *master)
@@ -470,12 +481,16 @@ ieee80211_vap_setup(struct ieee80211com
@@ -470,12 +482,17 @@ ieee80211_vap_setup(struct ieee80211com
} else
strncpy(dev->name, name, sizeof(dev->name));
}
@ -90,13 +91,14 @@ http://madwifi-project.org/changeset/4005
dev->stop = ieee80211_stop;
dev->hard_start_xmit = ieee80211_hardstart;
dev->set_multicast_list = ieee80211_set_multicast_list;
+ dev->do_ioctl = ieee80211_ioctl;
+#else
+ dev->netdev_ops = &ieee80211_netdev_ops;
+#endif
#if 0
dev->set_mac_address = ieee80211_set_mac_address;
#endif
@@ -1823,7 +1838,11 @@ ieee80211_set_multicast_list(struct net_
@@ -1823,7 +1840,11 @@ ieee80211_set_multicast_list(struct net_
IEEE80211_UNLOCK_IRQ(ic);
/* XXX: Merge multicast list into parent device */
@ -125,3 +127,32 @@ http://madwifi-project.org/changeset/4005
switch (event) {
case NETDEV_CHANGENAME:
--- a/net80211/ieee80211_var.h
+++ b/net80211/ieee80211_var.h
@@ -740,6 +740,7 @@ void ieee80211_build_sc_ie(struct ieee80
void ieee80211_dfs_action(struct ieee80211com *);
void ieee80211_expire_channel_excl_restrictions(struct ieee80211com *);
void ieee80211_setpuregbasicrates(struct ieee80211_rateset *rs);
+int ieee80211_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd);
/*
* Iterate through ic_channels to enumerate all distinct ic_ieee channel numbers.
--- a/net80211/ieee80211_wireless.c
+++ b/net80211/ieee80211_wireless.c
@@ -5945,7 +5945,7 @@ static struct iw_handler_def ieee80211_i
/*
* Handle private ioctl requests.
*/
-static int
+int
ieee80211_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
{
struct ieee80211vap *vap = netdev_priv(dev);
@@ -6035,7 +6035,6 @@ ieee80211_ioctl_vattach(struct ieee80211
{
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