diff options
Diffstat (limited to 'drivers/net/wireless/iwlwifi/mvm/binding.c')
| -rw-r--r-- | drivers/net/wireless/iwlwifi/mvm/binding.c | 20 | 
1 files changed, 17 insertions, 3 deletions
diff --git a/drivers/net/wireless/iwlwifi/mvm/binding.c b/drivers/net/wireless/iwlwifi/mvm/binding.c index 93fd1457954..a1376539d2d 100644 --- a/drivers/net/wireless/iwlwifi/mvm/binding.c +++ b/drivers/net/wireless/iwlwifi/mvm/binding.c @@ -5,7 +5,7 @@   *   * GPL LICENSE SUMMARY   * - * Copyright(c) 2012 - 2013 Intel Corporation. All rights reserved. + * Copyright(c) 2012 - 2014 Intel Corporation. All rights reserved.   *   * This program is free software; you can redistribute it and/or modify   * it under the terms of version 2 of the GNU General Public License as @@ -30,7 +30,7 @@   *   * BSD LICENSE   * - * Copyright(c) 2012 - 2013 Intel Corporation. All rights reserved. + * Copyright(c) 2012 - 2014 Intel Corporation. All rights reserved.   * All rights reserved.   *   * Redistribution and use in source and binary forms, with or without @@ -183,15 +183,29 @@ int iwl_mvm_binding_add_vif(struct iwl_mvm *mvm, struct ieee80211_vif *vif)  	if (WARN_ON_ONCE(!mvmvif->phy_ctxt))  		return -EINVAL; +	/* +	 * Update SF - Disable if needed. if this fails, SF might still be on +	 * while many macs are bound, which is forbidden - so fail the binding. +	 */ +	if (iwl_mvm_sf_update(mvm, vif, false)) +		return -EINVAL; +  	return iwl_mvm_binding_update(mvm, vif, mvmvif->phy_ctxt, true);  }  int iwl_mvm_binding_remove_vif(struct iwl_mvm *mvm, struct ieee80211_vif *vif)  {  	struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif); +	int ret;  	if (WARN_ON_ONCE(!mvmvif->phy_ctxt))  		return -EINVAL; -	return iwl_mvm_binding_update(mvm, vif, mvmvif->phy_ctxt, false); +	ret = iwl_mvm_binding_update(mvm, vif, mvmvif->phy_ctxt, false); + +	if (!ret) +		if (iwl_mvm_sf_update(mvm, vif, true)) +			IWL_ERR(mvm, "Failed to update SF state\n"); + +	return ret;  }  | 
