diff options
author | David S. Miller <davem@davemloft.net> | 2014-07-09 01:20:31 +0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-07-09 01:20:31 +0400 |
commit | 72948cdcbbcb5cd6b85c0a724a228b735d198212 (patch) | |
tree | 96b61b260afc51eb12768566228bf29756b264ad /drivers/net/wireless/iwlwifi/mvm/quota.c | |
parent | 9f12fbe603f7ae346b2b46008e325f0c9a68e55d (diff) | |
parent | f473832fece16611520bf54ad52b16c3f6db0a94 (diff) | |
download | linux-72948cdcbbcb5cd6b85c0a724a228b735d198212.tar.xz |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next
John W. Linville says:
====================
pull request: wireless-next 2014-07-03
Please pull this first batch of wireless updates intended for the
3.17 stream...
For the mac80211 bits, Johannes says:
"The biggest thing here is probably Arik's TDLS rework, beyond that we
have smaller improvements and features like David's scanning IE thing,
Luca's queue work, some CSA work, etc. Also your PID rate control
removal, of course."
For the iwlwifi bits, Emmanuel says:
"I have here a whole bunch of various things. Andy contributes
better debug prints for dvm specific flows and a module parameter to
completely disable power save for dvm. Andrei is sharing the premises
of his work on CSA - more to come. Eran and Liad keep on working
on the new devices. I have the regular amount of BT Coex stuff and
I continue to work on the firmware error report system adding more
debug capabilities. More to come on that subject too."
On top of that, there are some cleanups to the new rsi driver, some
continuing improvements to the rtl818x drivers, and the usual bundles
of updates to ath9k, b43, mwifiex, wil6210, and a few other bits here
and there.
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/mvm/quota.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/mvm/quota.c | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/drivers/net/wireless/iwlwifi/mvm/quota.c b/drivers/net/wireless/iwlwifi/mvm/quota.c index ba68d7b84505..4e20b3ce2b6a 100644 --- a/drivers/net/wireless/iwlwifi/mvm/quota.c +++ b/drivers/net/wireless/iwlwifi/mvm/quota.c @@ -73,7 +73,7 @@ struct iwl_mvm_quota_iterator_data { int colors[MAX_BINDINGS]; int low_latency[MAX_BINDINGS]; int n_low_latency_bindings; - struct ieee80211_vif *new_vif; + struct ieee80211_vif *disabled_vif; }; static void iwl_mvm_quota_iterator(void *_data, u8 *mac, @@ -83,13 +83,8 @@ static void iwl_mvm_quota_iterator(void *_data, u8 *mac, struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif); u16 id; - /* - * We'll account for the new interface (if any) below, - * skip it here in case we're not called from within - * the add_interface callback (otherwise it won't show - * up in iteration) - */ - if (vif == data->new_vif) + /* skip disabled interfaces here immediately */ + if (vif == data->disabled_vif) return; if (!mvmvif->phy_ctxt) @@ -104,11 +99,6 @@ static void iwl_mvm_quota_iterator(void *_data, u8 *mac, if (WARN_ON_ONCE(id >= MAX_BINDINGS)) return; - if (data->colors[id] < 0) - data->colors[id] = mvmvif->phy_ctxt->color; - else - WARN_ON_ONCE(data->colors[id] != mvmvif->phy_ctxt->color); - switch (vif->type) { case NL80211_IFTYPE_STATION: if (vif->bss_conf.assoc) @@ -130,6 +120,11 @@ static void iwl_mvm_quota_iterator(void *_data, u8 *mac, return; } + if (data->colors[id] < 0) + data->colors[id] = mvmvif->phy_ctxt->color; + else + WARN_ON_ONCE(data->colors[id] != mvmvif->phy_ctxt->color); + data->n_interfaces[id]++; if (iwl_mvm_vif_low_latency(mvmvif) && !data->low_latency[id]) { @@ -171,14 +166,15 @@ static void iwl_mvm_adjust_quota_for_noa(struct iwl_mvm *mvm, #endif } -int iwl_mvm_update_quotas(struct iwl_mvm *mvm, struct ieee80211_vif *newvif) +int iwl_mvm_update_quotas(struct iwl_mvm *mvm, + struct ieee80211_vif *disabled_vif) { struct iwl_time_quota_cmd cmd = {}; int i, idx, ret, num_active_macs, quota, quota_rem, n_non_lowlat; struct iwl_mvm_quota_iterator_data data = { .n_interfaces = {}, .colors = { -1, -1, -1, -1 }, - .new_vif = newvif, + .disabled_vif = disabled_vif, }; lockdep_assert_held(&mvm->mutex); @@ -193,10 +189,6 @@ int iwl_mvm_update_quotas(struct iwl_mvm *mvm, struct ieee80211_vif *newvif) ieee80211_iterate_active_interfaces_atomic( mvm->hw, IEEE80211_IFACE_ITER_NORMAL, iwl_mvm_quota_iterator, &data); - if (newvif) { - data.new_vif = NULL; - iwl_mvm_quota_iterator(&data, newvif->addr, newvif); - } /* * The FW's scheduling session consists of @@ -285,6 +277,14 @@ int iwl_mvm_update_quotas(struct iwl_mvm *mvm, struct ieee80211_vif *newvif) iwl_mvm_adjust_quota_for_noa(mvm, &cmd); + /* check that we have non-zero quota for all valid bindings */ + for (i = 0; i < MAX_BINDINGS; i++) { + if (cmd.quotas[i].id_and_color == cpu_to_le32(FW_CTXT_INVALID)) + continue; + WARN_ONCE(cmd.quotas[i].quota == 0, + "zero quota on binding %d\n", i); + } + ret = iwl_mvm_send_cmd_pdu(mvm, TIME_QUOTA_CMD, 0, sizeof(cmd), &cmd); if (ret) |