iwlwifi: fix bugs in change_interface
authorJohannes Berg <johannes.berg@intel.com>
Tue, 29 Mar 2011 13:29:37 +0000 (06:29 -0700)
committerSteve Conklin <sconklin@canonical.com>
Fri, 15 Jul 2011 17:20:52 +0000 (12:20 -0500)
commitd50a07956384f661b6aa3434070f0c63219f7fe0
tree0c1a2617d85301b21cf860cb29ef7df847e71ac0
parenta440db18b83077ad3c40b7e23cceff2147916bea
iwlwifi: fix bugs in change_interface

BugLink: http://bugs.launchpad.net/bugs/793702

commit a2b76b3b31568da9d281a393845f17689594ccdf upstream.

If change_interface gets invoked during a firmware
restart, it may crash; prevent that from happening
by checking if ctx->vif is assigned.

Additionally, in my initial commit I forgot to set
the vif->p2p variable correctly, so fix that too.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
drivers/net/wireless/iwlwifi/iwl-core.c