iwlwifi: fix bugs in change_interface
authorJohannes Berg <johannes.berg@intel.com>
Tue, 29 Mar 2011 13:29:37 +0000 (06:29 -0700)
committerWey-Yi Guy <wey-yi.w.guy@intel.com>
Fri, 8 Apr 2011 14:59:53 +0000 (07:59 -0700)
commita2b76b3b31568da9d281a393845f17689594ccdf
tree1b9125faf168b6d4fe66c903e2606be331467013
parent68b993118f715cc631b62b6a50574e4701fe9ace
iwlwifi: fix bugs in change_interface

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.

Cc: stable@kernel.org [2.6.38+]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
drivers/net/wireless/iwlwifi/iwl-core.c