On Tue, 2007-08-21 at 12:34 +0200, Johannes Berg wrote: > At that point, sdata->bss should point to the master device, which > apparently hasn't been initialised yet. The device initialisation code > is pretty black magic to me, Jiri/Michael? No reply. Can you try this patch? --- net/mac80211/ieee80211.c | 3 +-- net/mac80211/ieee80211_iface.c | 12 ++++++++++++ 2 files changed, 13 insertions(+), 2 deletions(-) --- wireless-dev.orig/net/mac80211/ieee80211.c 2007-09-25 22:26:31.341579155 +0200 +++ wireless-dev/net/mac80211/ieee80211.c 2007-09-25 22:43:38.681568738 +0200 @@ -266,7 +266,6 @@ void ieee80211_if_mgmt_setup(struct net_ dev->stop = ieee80211_mgmt_stop; dev->type = ARPHRD_IEEE80211_PRISM; dev->hard_header_parse = header_parse_80211; - dev->uninit = ieee80211_if_reinit; dev->destructor = ieee80211_if_free; } @@ -543,7 +542,6 @@ void ieee80211_if_setup(struct net_devic dev->change_mtu = ieee80211_change_mtu; dev->open = ieee80211_open; dev->stop = ieee80211_stop; - dev->uninit = ieee80211_if_reinit; dev->destructor = ieee80211_if_free; } @@ -1234,6 +1232,7 @@ int ieee80211_register_hw(struct ieee802 goto fail_dev; ieee80211_debugfs_add_netdev(IEEE80211_DEV_TO_SUB_IF(local->mdev)); + ieee80211_if_set_type(local->mdev, IEEE80211_IF_TYPE_AP); result = ieee80211_init_rate_ctrl_alg(local, NULL); if (result < 0) { --- wireless-dev.orig/net/mac80211/ieee80211_iface.c 2007-09-25 22:26:40.111572537 +0200 +++ wireless-dev/net/mac80211/ieee80211_iface.c 2007-09-25 22:41:52.251569443 +0200 @@ -127,6 +127,12 @@ int ieee80211_if_add_mgmt(struct ieee802 if (ret) goto fail; + /* + * Called even when register_netdevice fails, it would + * oops if assigned before initialising the rest. + */ + ndev->uninit = ieee80211_if_reinit; + ieee80211_debugfs_add_netdev(nsdata); if (local->open_count > 0) @@ -157,6 +163,12 @@ void ieee80211_if_set_type(struct net_de dev->hard_start_xmit = ieee80211_subif_start_xmit; + /* + * Called even when register_netdevice fails, it would + * oops if assigned before initialising the rest. + */ + dev->uninit = ieee80211_if_reinit; + sdata->type = type; switch (type) { case IEEE80211_IF_TYPE_WDS: - To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html