summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/mvm/mvm.h
diff options
context:
space:
mode:
authorLuciano Coelho <luciano.coelho@intel.com>2014-05-13 22:28:35 +0300
committerEmmanuel Grumbach <emmanuel.grumbach@intel.com>2014-07-07 21:41:13 +0300
commit63cbe180f8bfcf355516b09849c71fed19e035b3 (patch)
tree65de9413cb9aa84b27ba9b51e1038f20c2e1499d /drivers/net/wireless/iwlwifi/mvm/mvm.h
parentca55eb47822560e56b126eeb05b3cd0b8415acfd (diff)
downloadop-kernel-dev-63cbe180f8bfcf355516b09849c71fed19e035b3.zip
op-kernel-dev-63cbe180f8bfcf355516b09849c71fed19e035b3.tar.gz
iwlwifi: mvm: let iwl_mvm_update_quotas disregard a disabled vif
In some cases (e.g. when we're doing a channel switch), we may need to disable the quota of a vif temporarily. In order to do so, add an argument to the iwl_mvm_update_quotas() function to tell if the passed vif is a new one or if it should be disregarded. Signed-off-by: Luciano Coelho <luciano.coelho@intel.com> Reviewed-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/mvm/mvm.h')
-rw-r--r--drivers/net/wireless/iwlwifi/mvm/mvm.h24
1 files changed, 23 insertions, 1 deletions
diff --git a/drivers/net/wireless/iwlwifi/mvm/mvm.h b/drivers/net/wireless/iwlwifi/mvm/mvm.h
index 927346e..55e42f4 100644
--- a/drivers/net/wireless/iwlwifi/mvm/mvm.h
+++ b/drivers/net/wireless/iwlwifi/mvm/mvm.h
@@ -844,7 +844,29 @@ int iwl_mvm_binding_add_vif(struct iwl_mvm *mvm, struct ieee80211_vif *vif);
int iwl_mvm_binding_remove_vif(struct iwl_mvm *mvm, struct ieee80211_vif *vif);
/* Quota management */
-int iwl_mvm_update_quotas(struct iwl_mvm *mvm, struct ieee80211_vif *newvif);
+
+/**
+ * enum iwl_mvm_quota_update_type - quota update type
+
+ * @IWL_MVM_QUOTA_UPDATE_TYPE_REGULAR: regular quota update, use the
+ * existing vifs (ie. no new vif nor a disabled vif is passed).
+ * @IWL_MVM_QUOTA_UPDATE_TYPE_NEW: a new vif is being added to the
+ * quota calculation and needs to be treated differently.
+ * @IWL_MVM_QUOTA_UPDATE_TYPE_DISABLED: temporarily disable a vif from
+ * the quota calculation. The mvm mutex must remain held for the
+ * entire time during which the vif is to remain disabled,
+ * otherwise there is no guarantee that another code flow will
+ * not reenable it accidentally (by updating the quotas without
+ * marking the vif as disabled).
+ */
+enum iwl_mvm_quota_update_type {
+ IWL_MVM_QUOTA_UPDATE_TYPE_REGULAR,
+ IWL_MVM_QUOTA_UPDATE_TYPE_NEW,
+ IWL_MVM_QUOTA_UPDATE_TYPE_DISABLED,
+};
+
+int iwl_mvm_update_quotas(struct iwl_mvm *mvm, struct ieee80211_vif *vif,
+ enum iwl_mvm_quota_update_type type);
/* Scanning */
int iwl_mvm_scan_request(struct iwl_mvm *mvm,
OpenPOWER on IntegriCloud