From: David Spinadel Date: Sun, 26 Oct 2014 13:53:27 +0000 (+0200) Subject: iwlwifi: mvm: fix scan condition iterator X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=1e2ebe0e407159ae94974a93264260883f9a39ad;p=openwrt%2Fstaging%2Fblogic.git iwlwifi: mvm: fix scan condition iterator Scan condition iterator assumes that an interface is associated if phy_ctxt is assigned, but this isn't the sutuation in P2P device. OTOH P2P device is never associated so we can simply ignore it. Signed-off-by: David Spinadel Signed-off-by: Emmanuel Grumbach --- diff --git a/drivers/net/wireless/iwlwifi/mvm/scan.c b/drivers/net/wireless/iwlwifi/mvm/scan.c index 64c02a274f76..042fcdc81f41 100644 --- a/drivers/net/wireless/iwlwifi/mvm/scan.c +++ b/drivers/net/wireless/iwlwifi/mvm/scan.c @@ -270,7 +270,8 @@ static void iwl_mvm_scan_condition_iterator(void *data, u8 *mac, struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif); bool *global_bound = data; - if (mvmvif->phy_ctxt && mvmvif->phy_ctxt->id < MAX_PHYS) + if (vif->type != NL80211_IFTYPE_P2P_DEVICE && mvmvif->phy_ctxt && + mvmvif->phy_ctxt->id < MAX_PHYS) *global_bound = true; }