aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/mvm/quota.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2015-11-18iwlwifi: move under intel vendor directoryKalle Valo1-328/+0
Part of reorganising wireless drivers directory and Kconfig. Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2015-03-12iwlwifi: mvm: always update the quota after associationEmmanuel Grumbach1-1/+2
When we associate we always need to update the quotas. This fixes a bug for cases in which quotas weren't udapted after association. Reviewed-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-09-14iwlwifi: mvm: fix quota update avoidanceJohannes Berg1-5/+4
When not updating the quota, the new command shouldn't be stored as otherwise slowly drifting quota would never update the firmware. Fix this by storing the command only when it was also sent. Since the error message also only makes sense when attempting to send the command, just short-circuit the function when there's no need to send the command. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-09-14iwlwifi: mvm: don't update quota in firmware too oftenJohannes Berg1-6/+27
When updating quota in the firmware, it has to reset quite a bit of internal state, which apparently can have an adverse impact on its operation. Avoid that by only updating the quota command when there are any signification changes, i.e. added/removed bindings or changes in quota that are bigger than 8 TU within a binding. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-09-03iwlwifi: add Intel Mobile Communications copyrightJohannes Berg1-0/+2
Our legal structure changed at some point (see wikipedia), but we forgot to immediately switch over to the new copyright notice. For files that we have modified in the time since the change, add the proper copyright notice now. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-09-03iwlwifi: mvm: add some debugging to quota allocationJohannes Berg1-0/+12
In order to follow more easily what's going on, add some debug statements to the quota allocation algorithm. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-07-07iwlwifi: mvm: remove update type argument from quota updateJohannes Berg1-20/+6
It turns out that adding the update type argument was pointless as quota update is never called from the add_interface() callback. Therefore, IWL_MVM_QUOTA_UPDATE_TYPE_NEW isn't actually needed and then only a "disabled_vif" argument is needed for the upcoming CSA work. Remove the whole enum iwl_mvm_quota_update_type and pass the right arguments (always NULL for disabled vif right now) to the function in all current call sites. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Reviewed-by: Luciano Coelho <luciano.coelho@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-07-07iwlwifi: mvm: don't pass update type to quota iteratorJohannes Berg1-11/+5
Simplify the quota iterator by not passing the update type, it only needs to know whether or not to skip an interface. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Reviewed-by: Luciano Coelho <luciano.coelho@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-07-07iwlwifi: mvm: validate that we don't send zero quotaJohannes Berg1-0/+8
The firmware currently deals with zero quota for a given binding, but it seems odd to send that down. Make sure that we don't do that. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-07-07iwlwifi: mvm: don't send zero quota to the firmwareJohannes Berg1-5/+5
There are some cases where we can currently send zero quota for a valid binding, e.g. if we update while an interface is bound to a channel context but not yet acting as an AP. Avoid this by reordering the checks. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-07-07iwlwifi: mvm: let iwl_mvm_update_quotas disregard a disabled vifLuciano Coelho1-7/+19
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>
2014-05-13iwlwifi: remove CMD_SYNCEmmanuel Grumbach1-1/+1
CMD_SYNC is really 0 which is confusing: if (cmd.flags & CMD_SYNC) is always false. Fix this by simply removing its definition. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-03-18iwlwifi: mvm: remove spurious blank lineJohannes Berg1-1/+0
Remove a spurious blank line in the quota code. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-03-18iwlwifi: mvm: remove using max_duration in firmware APIJohannes Berg1-21/+1
The firmware decided to not implement this API in this way, so for now remove setting the field completely. This will allow the firmware to change how to use this field later. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-02-03iwlwifi: mvm: fix quota allocationIlan Peer1-8/+28
Divide the maximal quota between all the data interfaces even in the case of a single low latency binding without any other non low latency interfaces, so that afterwards the quota allocation (which considers the number of data interfaces) will be correct. Signed-off-by: Ilan Peer <ilan.peer@intel.com> Reviewed-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-02-03iwlwifi: mvm: add the quota remainder to a data bindingIlan Peer1-2/+7
Currently the quota remainder was added to the first binding, although it is possible that this was not a data binding (only the P2P_DEVICE interface is part of the binding). Fix this by adding the remainder to the first binding that was actually allocated quota. Signed-off-by: Ilan Peer <ilan.peer@intel.com> Reviewed-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-02-03iwlwifi: mvm: limit non-low-latency binding scheduling durationJohannes Berg1-7/+26
Limit the scheduling duration of bindings without a low-latency interface in the firmware, this prevents those bindings from occupying the medium for a period of time longer than what we want for the other interfaces in low-latency mode. As older firmware doesn't do anything with the max_duration field and ignores it completely, there's no need for a firmware flag. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-02-03iwlwifi: mvm: reserve bandwidth for low-latency interfaceJohannes Berg1-14/+49
If there is/are interface(s) in low-latency mode, reserve a percentage (currently 64%) of the quota for that binding to improve the quality of service for those interfaces. However, if there's more than one binding that has low-latency, then give up and don't reserve, we can't allocate more than 100%. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2013-12-31iwlwifi: Update Copyright to 2014Emmanuel Grumbach1-2/+2
Happy new year! Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2013-12-09iwlwifi: mvm: quota command max_duration should be zeroJohannes Berg1-2/+1
For now, the firmware doesn't really use the field, but it should be set to zero if there's no specific request. Setting it to the max quota doesn't make sense. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Reviewed-by: Ilan Peer <ilan.peer@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2013-10-18iwlwifi: mvm: fix operator precedenceDavid Spinadel1-1/+2
Integers need to be multiplied before division. Signed-off-by: David Spinadel <david.spinadel@intel.com> Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-10-11iwlwifi: mvm: add IBSS supportJohannes Berg1-6/+3
At the firmware level, IBSS support has similar programming requirements as AP/GO support, so use the same functions with just small differences. With IBSS only a single virtual interface can be used, so no changes in the advertised interface combinations are needed. For now, don't use hardware crypto for the GTKs in IBSS mode, the firmware should support it though. Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-10-02iwlwifi: mvm: implement NoA testing using testmode cmdDavid Spinadel1-0/+34
For testing, implement setting continuous NoA duration using a new MVM-specific testmode command. Signed-off-by: David Spinadel <david.spinadel@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-08-06iwlwifi: mvm: small cleanups in quota management codeJohannes Berg1-6/+5
Use a C99 initializer to clear the command and move the lockdep assertion before the restart check. Since this causes problems with the BUILD_BUG_ON() with some compilers, change that a bit. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-07-31iwlwifi: mvm: assign quota per virtual interfaceJohannes Berg1-8/+8
Instead of assigning quota per used binding (channel) assign the same amount of quota for each virtual interface so that when there are more than two interfaces using more than one channel, we'll stay on the channels proportionally to the number of virtual interfaces using the channels. Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Reviewed-by: Ilan Peer <ilan.peer@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-06-04iwlwifi: mvm: Fix quota command settingsIlan Peer1-9/+16
According to the FW implementation, the quota command should have a valid entry for each active binding (where 'active' in this context means that the binding is known to the FW). In case the binding should not get any quota, the 'quota' should be set to zero. Not setting an 0 quota for an active binding when all the MACs in the binding are idle, i.e., not associated in case of managed interface, will result in preventing the FW scheduler from entering IDLE state and the FW from transitioning to low PS. 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>
2013-03-20iwlwifi: mvm: Fix quota handling for monitor interfaceIlan Peer1-1/+2
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>
2013-03-06iwlwifi: a few fixes in licenseEmmanuel Grumbach1-1/+1
7000.c was released as GPL only by mistake: it should be dual licensed - GPL / BSD. The file that contains the license in the kernel is COPYING and not LICENSE.GPL. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-02-11iwlwifi: mvm: Update quota settings for all bindingsIlan Peer1-5/+24
The FW scheduler, schedules the bindings over a session of 128 fragments (each is 4 TU long). The quota command should allocate all the session fragments between all the bindings that require quota allocation. Currently, use static allocation, where the fragments are equally distributed between all data bindings. Note, that not allocating all the session's fragments might cause the FW scheduler to leave the medium unused. Signed-off-by: Ilan Peer <ilan.peer@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-02-01iwlwifi: add the MVM driverJohannes Berg1-0/+178
Newer firmware revisions have a completely new firmware API. This is the new driver for this new API. I've listed the people who directly contributed code, but many others from various teams have contributed in other ways. Cc: Alexander Bondar <alexander.bondar@intel.com> Cc: Amit Beka <amit.beka@intel.com> Cc: Amnon Paz <amnonx.paz@intel.com> Cc: Assaf Krauss <assaf.krauss@intel.com> Cc: David Spinadel <david.spinadel@intel.com> Cc: Dor Shaish <dor.shaish@intel.com> Cc: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Cc: Eytan Lifshitz <eytan.lifshitz@intel.com> Cc: Ilan Peer <ilan.peer@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>