Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 368977
b: refs/heads/master
c: 1e1391c
h: refs/heads/master
i:
  368975: 31e6a64
v: v3
  • Loading branch information
Ilan Peer authored and Johannes Berg committed Mar 20, 2013
1 parent 2556ad4 commit 1767d86
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 5649ce429e81b77919c0029a02edf44df3be7797
refs/heads/master: 1e1391ca43994b697b0145384797a078ce1e0ce7
6 changes: 4 additions & 2 deletions trunk/drivers/net/wireless/iwlwifi/mvm/mac80211.c
Original file line number Diff line number Diff line change
Expand Up @@ -1264,6 +1264,7 @@ static int iwl_mvm_assign_vif_chanctx(struct ieee80211_hw *hw,
* will handle quota settings.
*/
if (vif->type == NL80211_IFTYPE_MONITOR) {
mvmvif->monitor_active = true;
ret = iwl_mvm_update_quotas(mvm, vif);
if (ret)
goto out_remove_binding;
Expand Down Expand Up @@ -1294,15 +1295,16 @@ static void iwl_mvm_unassign_vif_chanctx(struct ieee80211_hw *hw,
if (vif->type == NL80211_IFTYPE_AP)
goto out_unlock;

iwl_mvm_binding_remove_vif(mvm, vif);
switch (vif->type) {
case NL80211_IFTYPE_MONITOR:
iwl_mvm_update_quotas(mvm, vif);
mvmvif->monitor_active = false;
iwl_mvm_update_quotas(mvm, NULL);
break;
default:
break;
}

iwl_mvm_binding_remove_vif(mvm, vif);
out_unlock:
mvmvif->phy_ctxt = NULL;
mutex_unlock(&mvm->mutex);
Expand Down
3 changes: 3 additions & 0 deletions trunk/drivers/net/wireless/iwlwifi/mvm/mvm.h
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,8 @@ enum iwl_power_scheme {
* @uploaded: indicates the MAC context has been added to the device
* @ap_active: indicates that ap context is configured, and that the interface
* should get quota etc.
* @monitor_active: indicates that monitor context is configured, and that the
* interface should get quota etc.
* @queue_params: QoS params for this MAC
* @bcast_sta: station used for broadcast packets. Used by the following
* vifs: P2P_DEVICE, GO and AP.
Expand All @@ -169,6 +171,7 @@ struct iwl_mvm_vif {

bool uploaded;
bool ap_active;
bool monitor_active;

u32 ap_beacon_time;

Expand Down
3 changes: 2 additions & 1 deletion trunk/drivers/net/wireless/iwlwifi/mvm/quota.c
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,8 @@ static void iwl_mvm_quota_iterator(void *_data, u8 *mac,
data->n_interfaces[id]++;
break;
case NL80211_IFTYPE_MONITOR:
data->n_interfaces[id]++;
if (mvmvif->monitor_active)
data->n_interfaces[id]++;
break;
case NL80211_IFTYPE_P2P_DEVICE:
break;
Expand Down

0 comments on commit 1767d86

Please sign in to comment.