iwlwifi: Cancel scanning upon association
This patch cancels an ongoing HW scan upon association. Not doing this resulted in instability in association. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
		
					parent
					
						
							
								4bf775cdc0
							
						
					
				
			
			
				commit
				
					
						b716bb918f
					
				
			
		
					 2 changed files with 12 additions and 22 deletions
				
			
		|  | @ -7004,6 +7004,12 @@ static int iwl3945_mac_config_interface(struct ieee80211_hw *hw, | ||||||
| 	if (conf == NULL) | 	if (conf == NULL) | ||||||
| 		return -EIO; | 		return -EIO; | ||||||
| 
 | 
 | ||||||
|  | 	if (priv->vif != vif) { | ||||||
|  | 		IWL_DEBUG_MAC80211("leave - priv->vif != vif\n"); | ||||||
|  | 		mutex_unlock(&priv->mutex); | ||||||
|  | 		return 0; | ||||||
|  | 	} | ||||||
|  | 
 | ||||||
| 	/* XXX: this MUST use conf->mac_addr */ | 	/* XXX: this MUST use conf->mac_addr */ | ||||||
| 
 | 
 | ||||||
| 	if ((priv->iw_mode == IEEE80211_IF_TYPE_AP) && | 	if ((priv->iw_mode == IEEE80211_IF_TYPE_AP) && | ||||||
|  | @ -7028,17 +7034,6 @@ static int iwl3945_mac_config_interface(struct ieee80211_hw *hw, | ||||||
| 	if (unlikely(test_bit(STATUS_SCANNING, &priv->status)) && | 	if (unlikely(test_bit(STATUS_SCANNING, &priv->status)) && | ||||||
| 	    !(priv->hw->flags & IEEE80211_HW_NO_PROBE_FILTERING)) { | 	    !(priv->hw->flags & IEEE80211_HW_NO_PROBE_FILTERING)) { | ||||||
|  */ |  */ | ||||||
| 	if (unlikely(test_bit(STATUS_SCANNING, &priv->status))) { |  | ||||||
| 		IWL_DEBUG_MAC80211("leave - scanning\n"); |  | ||||||
| 		mutex_unlock(&priv->mutex); |  | ||||||
| 		return 0; |  | ||||||
| 	} |  | ||||||
| 
 |  | ||||||
| 	if (priv->vif != vif) { |  | ||||||
| 		IWL_DEBUG_MAC80211("leave - priv->vif != vif\n"); |  | ||||||
| 		mutex_unlock(&priv->mutex); |  | ||||||
| 		return 0; |  | ||||||
| 	} |  | ||||||
| 
 | 
 | ||||||
| 	if (priv->iw_mode == IEEE80211_IF_TYPE_AP) { | 	if (priv->iw_mode == IEEE80211_IF_TYPE_AP) { | ||||||
| 		if (!conf->bssid) { | 		if (!conf->bssid) { | ||||||
|  |  | ||||||
|  | @ -7424,6 +7424,12 @@ static int iwl4965_mac_config_interface(struct ieee80211_hw *hw, | ||||||
| 	if (conf == NULL) | 	if (conf == NULL) | ||||||
| 		return -EIO; | 		return -EIO; | ||||||
| 
 | 
 | ||||||
|  | 	if (priv->vif != vif) { | ||||||
|  | 		IWL_DEBUG_MAC80211("leave - priv->vif != vif\n"); | ||||||
|  | 		mutex_unlock(&priv->mutex); | ||||||
|  | 		return 0; | ||||||
|  | 	} | ||||||
|  | 
 | ||||||
| 	if ((priv->iw_mode == IEEE80211_IF_TYPE_AP) && | 	if ((priv->iw_mode == IEEE80211_IF_TYPE_AP) && | ||||||
| 	    (!conf->beacon || !conf->ssid_len)) { | 	    (!conf->beacon || !conf->ssid_len)) { | ||||||
| 		IWL_DEBUG_MAC80211 | 		IWL_DEBUG_MAC80211 | ||||||
|  | @ -7446,17 +7452,6 @@ static int iwl4965_mac_config_interface(struct ieee80211_hw *hw, | ||||||
| 	if (unlikely(test_bit(STATUS_SCANNING, &priv->status)) && | 	if (unlikely(test_bit(STATUS_SCANNING, &priv->status)) && | ||||||
| 	    !(priv->hw->flags & IEEE80211_HW_NO_PROBE_FILTERING)) { | 	    !(priv->hw->flags & IEEE80211_HW_NO_PROBE_FILTERING)) { | ||||||
|  */ |  */ | ||||||
| 	if (unlikely(test_bit(STATUS_SCANNING, &priv->status))) { |  | ||||||
| 		IWL_DEBUG_MAC80211("leave - scanning\n"); |  | ||||||
| 		mutex_unlock(&priv->mutex); |  | ||||||
| 		return 0; |  | ||||||
| 	} |  | ||||||
| 
 |  | ||||||
| 	if (priv->vif != vif) { |  | ||||||
| 		IWL_DEBUG_MAC80211("leave - priv->vif != vif\n"); |  | ||||||
| 		mutex_unlock(&priv->mutex); |  | ||||||
| 		return 0; |  | ||||||
| 	} |  | ||||||
| 
 | 
 | ||||||
| 	if (priv->iw_mode == IEEE80211_IF_TYPE_AP) { | 	if (priv->iw_mode == IEEE80211_IF_TYPE_AP) { | ||||||
| 		if (!conf->bssid) { | 		if (!conf->bssid) { | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Emmanuel Grumbach
				Emmanuel Grumbach