diff options
author | Ilan Peer <ilan.peer@intel.com> | 2013-03-13 08:52:04 -0400 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2013-03-20 09:17:08 -0400 |
commit | 1e1391ca43994b697b0145384797a078ce1e0ce7 (patch) | |
tree | 8c7450d19df51b1adba5c164f1cc3c1144a097b6 /drivers/net/wireless/iwlwifi/mvm/mac80211.c | |
parent | 5649ce429e81b77919c0029a02edf44df3be7797 (diff) |
iwlwifi: mvm: Fix quota handling for monitor interface
1. Quota for the monitor interface should be added only if there is
a channel context assigned to the interface.
2. In the unassign channel context flow, need to remove the quota
for the monitor interface binding, before unbinding.
Signed-off-by: Ilan Peer <ilan.peer@intel.com>
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/mvm/mac80211.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/mvm/mac80211.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/net/wireless/iwlwifi/mvm/mac80211.c b/drivers/net/wireless/iwlwifi/mvm/mac80211.c index 3492d6092b2d..064eaefdff72 100644 --- a/drivers/net/wireless/iwlwifi/mvm/mac80211.c +++ b/drivers/net/wireless/iwlwifi/mvm/mac80211.c | |||
@@ -1264,6 +1264,7 @@ static int iwl_mvm_assign_vif_chanctx(struct ieee80211_hw *hw, | |||
1264 | * will handle quota settings. | 1264 | * will handle quota settings. |
1265 | */ | 1265 | */ |
1266 | if (vif->type == NL80211_IFTYPE_MONITOR) { | 1266 | if (vif->type == NL80211_IFTYPE_MONITOR) { |
1267 | mvmvif->monitor_active = true; | ||
1267 | ret = iwl_mvm_update_quotas(mvm, vif); | 1268 | ret = iwl_mvm_update_quotas(mvm, vif); |
1268 | if (ret) | 1269 | if (ret) |
1269 | goto out_remove_binding; | 1270 | goto out_remove_binding; |
@@ -1294,15 +1295,16 @@ static void iwl_mvm_unassign_vif_chanctx(struct ieee80211_hw *hw, | |||
1294 | if (vif->type == NL80211_IFTYPE_AP) | 1295 | if (vif->type == NL80211_IFTYPE_AP) |
1295 | goto out_unlock; | 1296 | goto out_unlock; |
1296 | 1297 | ||
1297 | iwl_mvm_binding_remove_vif(mvm, vif); | ||
1298 | switch (vif->type) { | 1298 | switch (vif->type) { |
1299 | case NL80211_IFTYPE_MONITOR: | 1299 | case NL80211_IFTYPE_MONITOR: |
1300 | iwl_mvm_update_quotas(mvm, vif); | 1300 | mvmvif->monitor_active = false; |
1301 | iwl_mvm_update_quotas(mvm, NULL); | ||
1301 | break; | 1302 | break; |
1302 | default: | 1303 | default: |
1303 | break; | 1304 | break; |
1304 | } | 1305 | } |
1305 | 1306 | ||
1307 | iwl_mvm_binding_remove_vif(mvm, vif); | ||
1306 | out_unlock: | 1308 | out_unlock: |
1307 | mvmvif->phy_ctxt = NULL; | 1309 | mvmvif->phy_ctxt = NULL; |
1308 | mutex_unlock(&mvm->mutex); | 1310 | mutex_unlock(&mvm->mutex); |