Trying to protect us from races commit 9c4451ff31b937a478f3d3eabef30b71cbe12b12 (AR6000: move low-level cleanup from ar6000_destroy to ar6000_close) introduced another race: if ar6000_close was called before "removing" the device, it'd leave no chance to deregister eth0 as ar6000_unavail_ev was never called and the interface stayed until "general cleanup" on module unloading happened. This in turn had plenty of ill-effects, including oopses.
The proposed workaround was tested numerous times with constant binding/unbinding, using wpa_supplicant, module reloading and suspend/resume (confirmed wpa_supplicant is automatically reassociating after resume). No rfkill tests were done since i consider that useless taking the current state of driver into account. Signed-off-by: Paul Fertser <[email protected]> --- drivers/ar6000/ar6000/ar6000_drv.c | 2 -- 1 files changed, 0 insertions(+), 2 deletions(-) diff --git a/drivers/ar6000/ar6000/ar6000_drv.c b/drivers/ar6000/ar6000/ar6000_drv.c index b790670..a3b5f82 100644 --- a/drivers/ar6000/ar6000/ar6000_drv.c +++ b/drivers/ar6000/ar6000/ar6000_drv.c @@ -1145,8 +1145,6 @@ ar6000_close(struct net_device *dev) /* set the instance to NULL so we do not get called back on remove incase we * we're explicity destroyed by module unload */ - HTCSetInstance(ar->arHtcTarget, NULL); - if (resetok) { /* try to reset the device if we can * The driver may have been configure NOT to reset the target during -- 1.6.0.6
