aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/mvm/rs.h (follow)
AgeCommit message (Collapse)AuthorFilesLines
2014-04-13iwlwifi: mvm: rs: reinit rs if no tx for a long timeEyal Shapira1-0/+1
After being idle for a long time (>5sec) the rs statistics will be stale so we prefer to reset rs and start from legacy rates again. This gives better results when the attenuation increased signficantly (e.g. we got further from the AP) and after a while we start Tx Note that the first Tx after the idle period will still go out in the old modulation and rate but this seemed a simpler approach compared to adding a timer or modifying mac80211 for this. The negative impact is negligble as we'll recover quickly. Cc: <stable@vger.kernel.org> [3.14] Signed-off-by: Eyal Shapira <eyalx.shapira@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-04-13iwlwifi: mvm: rs: fix and cleanup rs_get_rate_actionEyal Shapira1-0/+1
Change the down/upscale decision logic a bit to be based on different success ratio thresholds. This fixes the implementation compared to the rate scale algorithm which was planned to yield optimal results. Also fix a case where a lower rate wasn't explored despite being a potential for better throughput. While at it rewrite rs_get_rate_action to be more clear and clean. Cc: <stable@vger.kernel.org> [3.14] Signed-off-by: Eyal Shapira <eyalx.shapira@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-04-13iwlwifi: mvm: rs: use correct max expected throughput figuresEyal Shapira1-3/+9
The selection of the max expected throughput for a column didn't take into account the maximal allowed rate for the current peer. This can cause unnecessary switches during the search cycle to columns which have no chance of beating the current throughput. Signed-off-by: Eyal Shapira <eyalx.shapira@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-02-03iwlwifi: rs: use const u16 for throughput tablesJohannes Berg1-1/+1
This makes the code a little bit longer as zero-extension has to be done (mov vs. movzwl), but that's miniscule and the space saving is significant, about 600 bytes in DVM and 700 bytes in MVM, so the cache effect should be worth the few bytes more code. While at it, remove two spurious blank lines in variable declaration blocks. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Reviewed-by: Eyal Shapira <eyal@wizery.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2013-12-31iwlwifi: Update Copyright to 2014Emmanuel Grumbach1-1/+1
Happy new year! Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2013-12-17iwlwifi: mvm: rs: avoid recalc of supported legacy rate maskEyal Shapira1-1/+0
The supported legacy rate mask is initialized when rs is initialized based on the remote peer supported rates. There's no need to re mask it repeatedly with the supported remote peer rates. Signed-off-by: Eyal Shapira <eyal@wizery.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2013-12-17iwlwifi: mvm: rs: refactor building the LQ commandEyal Shapira1-1/+0
Simplify the code a bit more by extracting the rates table building logic into a separate function and handle setting a fixed rate for debug in a separate flow. Also avoid using and saving ucode rate format in different places. Instead use rs_rate struct and convert to ucode format only when filling the rates table in the LQ command. Signed-off-by: Eyal Shapira <eyal@wizery.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2013-12-09iwlwifi: mvm: rs: overhaul search cycle state machineEyal Shapira1-36/+28
Rewrite the search cycle state machine to use a more data oriented approach where the different Tx columns (configs) limitations and next columns to search are reprsented in tables which are easy to change. This overhaul also includes several major fixes: 1. Prevent going back to a specific Tx column in a search cycle if it was already explored. 2. Avoid switching to a Tx column that doesn't have any chance if it performs perfectly to beat the current throughput we're getting. These issues were degrading throughput as they were causing switching to "bad" Tx columns. Signed-off-by: Eyal Shapira <eyal@wizery.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2013-12-09iwlwifi: mvm: rs: refactor to use rs_rateEyal Shapira1-20/+40
Introduce rs_rate which represents a rate. Use this structure instead of iwl_scale_tbl_info where we're dealing with a single rate. This avoids allocating the big iwl_scale_tbl_info structure on the stack in several cases like converting to ucode rate format or from ucode rate format. Signed-off-by: Eyal Shapira <eyal@wizery.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2013-12-09iwlwifi: mvm: rs: remove unused timestamp fieldEyal Shapira1-1/+0
Remove this as it's unused. Signed-off-by: Eyal Shapira <eyal@wizery.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2013-12-09iwlwifi: mvm: rs: rename thresholds definesEyal Shapira1-1/+1
Rename for clearer names. Signed-off-by: Eyal Shapira <eyal@wizery.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2013-12-09iwlwifi: mvm: stop using MIMO in case BT doesn't allow itEyal Shapira1-13/+0
Switch to using the new btcoex decision api regarding MIMO and stop accessing the internal btcoex structs. In case MIMO should be disabled it would detect this upon the next Tx and force a search. The search will switch to SISO on a antenna A which isn't used by BT. Signed-off-by: Eyal Shapira <eyal@wizery.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2013-12-09iwlwifi: fix check for a single rx antennaEyal Shapira1-8/+0
valid_rx_ant is a bitmask of available antennas and not the number of Rx antennas. Use num_of_ant and remove duplicate definitions in both dvm and mvm. Signed-off-by: Eyal Shapira <eyal@wizery.com> Reviewed-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2013-12-09iwlwifi: mvm: implement rate_update hook in rsEyal Shapira1-1/+1
Re-initialize rs when we get a rate_update hook called which happens when remote STA changes bandwidth or sends a VHT opmode notification. Signed-off-by: Eyal Shapira <eyal@wizery.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2013-11-04Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next into for-davemJohn W. Linville1-58/+96
Conflicts: drivers/net/wireless/brcm80211/brcmfmac/sdio_host.h
2013-10-02iwlwifi: mvm: remove GF support in rsEyal Shapira1-1/+0
mvm doesn't support HT GF so drop all relevant code in rs. Signed-off-by: Eyal Shapira <eyal@wizery.com> Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-10-02iwlwifi: mvm: support VHT in rsEyal Shapira1-43/+74
Enable rs algorithm to use VHT rates and use 80Mhz. This enables reaching VHT rates which wasn't possible. Signed-off-by: Eyal Shapira <eyal@wizery.com> Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-10-02iwlwifi: mvm: remove rs FSM actions relevant only for 3 antennasEyal Shapira1-14/+22
The XXX_SWITCH_ANTENNA1/2 actions keep track of switching between 3 single antennas or between 3 pairs in case of MIMO2 on a MIMO3 device. As current and future chips will have at most 2 antennas drop these. While at it also convert the actions into enums and cleanup the code a bit. Signed-off-by: Eyal Shapira <eyal@wizery.com> Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-09-24iwlwifi: Remove extern from function prototypesJoe Perches1-5/+4
There are a mix of function prototypes with and without extern in the kernel sources. Standardize on not using extern for function prototypes. Function prototypes don't need to be written with extern. extern is assumed by the compiler. Its use is as unnecessary as using auto to declare automatic/local variables in a block. Signed-off-by: Joe Perches <joe@perches.com>
2013-08-12iwlwifi: mvm: remove MIMO3 from rate scale codeEyal Shapira1-35/+6
Current and future chips supported by mvm will only have a maximum of 2 antennas so all the MIMO3 related code and states can be dropped. Signed-off-by: Eyal Shapira <eyal@wizery.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-08-12iwlwifi: mvm: remove unused fields of iwl_rs_rate_infoEyal Shapira1-22/+0
Some more cleanups of unused fields and their initializations. Signed-off-by: Eyal Shapira <eyal@wizery.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-08-12iwlwifi: mvm: remove rate_scale_data debugfs entryEyal Shapira1-1/+0
This isn't very informative and can be deduced from rate_scale_table. Remove as a preparation for dropping iwl_rs_rate_info.ieee. Signed-off-by: Eyal Shapira <eyal@wizery.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-08-06iwlwifi: mvm: remove traffic load monitoring in rsEyal Shapira1-12/+0
The traffic load monitoring isn't used anymore to decide whether a Tx aggregation on a specific TID should be started. No point in collecting these statistics. Remove the relevant code. Signed-off-by: Eyal Shapira <eyal@wizery.com> Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-07-16iwlwifi: mvm: remove unneeded argument from iwl_mvm_tx_protection()Johannes Berg1-2/+2
The LQ command argument isn't needed, it's always taken from the station struct that's already passed, remove the argument. Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
2013-06-04iwlwifi: mvm: don't enable MIMO when BT is activeEmmanuel Grumbach1-0/+12
Another step in the rate control / BT Coex integration Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-05-29iwlwifi: mvm: add thermal throttling and CT killEytan Lifshitz1-0/+5
In order to avoid NIC destruction due to high temperature, CT kill will power down the NIC. To avoid this, thermal throttling will decrease throughput to prevent the NIC from reaching the temperature at which CT kill is performed. Signed-off-by: Eytan Lifshitz <eytan.lifshitz@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-02-01iwlwifi: add the MVM driverJohannes Berg1-0/+393
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>