]> git.baikalelectronics.ru Git - kernel.git/commit
[PATCH] mac80211: fix interface initialisation and deinitialisation
authorJohannes Berg <johannes@sipsolutions.net>
Wed, 26 Sep 2007 12:27:23 +0000 (14:27 +0200)
committerDavid S. Miller <davem@sunset.davemloft.net>
Wed, 10 Oct 2007 23:53:11 +0000 (16:53 -0700)
commit1593b834a8673ecde1a5c1d275de406119260160
tree5e8ba3ec4fa8273822334eb64bb899a0b3afcbd3
parentf2503de4d006283cd591b1183f3b2c4275df5f86
[PATCH] mac80211: fix interface initialisation and deinitialisation

When an interface is registered it is still uninitialised so
ieee80211_if_reinit() can't be called on it (it will oops.)
Hence, we need to move the uninit method assignment.

Also, this patch fixes the bug that the master device is never
initialised nor deinitialised at all. Oddly, the deinit code
had an if statement to not run some code when running for the
master interface (which never happened), but that if statement
is also wrong. Fix that too.

Now that the uninit code is run for the master device, another
bug surfaced: it tries to remove all dependent interfaces and
that oopses or BUGs at some point, either because it unregisters
already unregistered interfaces (missing list_del bug) or due
to trying to iterate a list that has had other things removed.
Fix this too by handling the master interface specially.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
net/mac80211/ieee80211.c
net/mac80211/ieee80211_iface.c