summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/intel/iwlwifi/mvm/rs.c
Commit message (Collapse)AuthorAgeFilesLines
* iwlwifi: mvm: change state when queueing agg start workNaftali Goldstein2017-09-081-1/+2
| | | | | | | | | | | | | | | Add a new state to enum iwl_mvm_agg_state, which is used between queueing the work that starts tx aggregations and actually starting that work (changing to state IWL_AGG_STARTING). This solves a race where ieee80211_start_tx_ba_session is called a second time, before the work queued by the first run has a chance to change the agg_state. In this case the second call to ieee80211_start_tx_ba_session returns an error, and the fallback is to abort the ba session start. Fixes: 482e48440a0e ("iwlwifi: mvm: change open and close criteria of a BA session") Signed-off-by: Naftali Goldstein <naftali.goldstein@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
* Merge git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers.gitKalle Valo2017-08-241-5/+4
|\ | | | | | | | | | | Stephen Rothwell reported quite a few conflicts in iwlwifi between wireless-drivers and wireless-drivers-next. To avoid any problems later in other trees merge w-d to w-d-next to fix those conflicts early.
| * iwlwifi: mvm: rs: fix TLC statistics collectionGregory Greenman2017-08-011-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | Statistics should be collected according to the actual rate a frame/aggregation was transmitted and not according to the initial rate from the last LQ command (these rates are different if the frames were retransmitted at a lower rate from the rate scale table). This is needed to remove throughput degradation. Signed-off-by: Gregory Greenman <gregory.greenman@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
* | iwlwifi: mvm: change open and close criteria of a BA sessionGregory Greenman2017-08-181-52/+65
| | | | | | | | | | | | | | | | | | | | | | | | | | Tx BA session should be started according to the current throughput without any dependence on the internal rate scaling state. The criteria for opening a BA session will be 10 frames per second. Sending frequent del BAs can cause inter-op issues with some APs. We'll not close a BA session until we receive an explicit del BA from the peer. Signed-off-by: Gregory Greenman <gregory.greenman@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
* | iwlwifi: mvm: use mvmsta consistently in rs.cLuca Coelho2017-08-181-15/+15
|/ | | | | | | | | We use mvmsta for the sta->drv_priv in mvm, but in rs.c we have a bunch of instances using sta_priv, which is probably due to it being copied from dvm. Change all occurrences to mvmsta for consistency with the rest of the driver Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
* iwlwifi: mvm: support aggs of 64 frames in A000 familyLiad Kaufman2017-06-291-1/+5
| | | | | | | | A SCD bug was fixed in the A000 family, allowing to support aggregations of 64 frames (rather than 63). Signed-off-by: Liad Kaufman <liad.kaufman@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
* iwlwifi: mvm: rs: add logs for the wrong antenna caseGregory Greenman2017-06-231-1/+5
| | | | | | | | | In case that rate's antenna is wrong at the init stage, it's very hard to say what went wrong. Add debug data to the already existing WARN_ON_ONCE. Signed-off-by: Gregory Greenman <gregory.greenman@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
* iwlwifi: mvm: rs: start using LQ command colorGregory Greenman2017-06-051-35/+11
| | | | | | | | | | | | | | | Up until now, the driver was comparing the rate reported by the FW and the rate of the latest LQ command to avoid processing data belonging to the old LQ command. Recently, FW changed the meaning of the initial rate field in tx response and it holds the actual rate (which is not necessarily the initial rate of LQ's rate table). Use instead LQ cmd color to be able to filter out tx responses/BA notifications which where sent during earlier LQ commands' time frame. This fixes some throughput degradation in noisy environments. Signed-off-by: Gregory Greenman <gregory.greenman@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
* iwlwifi: mvm: support new rate flagsSara Sharon2017-04-251-6/+5
| | | | | | | Rates were changed to adapt to HE. Change is backward compatible. Signed-off-by: Sara Sharon <sara.sharon@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
* iwlwifi: mvm: don't call << operator with a negative valueEmmanuel Grumbach2017-02-081-1/+3
| | | | | | | | | | | | | | | | | | | In https://bugzilla.kernel.org/show_bug.cgi?id=177341 Bob reported a UBSAN WARNING on rs.c in iwldvm. Fix the same bug in iwlmvm. This because i = index - 1; for (mask = (1 << i); i >= 0; i--, mask >>= 1) is unsafe: i could be negative and hence we can call << on a negative value. This bug doesn't have any real impact since the condition of the for loop will prevent any usage of mask. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=177341 Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
* iwlwifi: mvm: fix a print of NSS for HT rateGregory Greenman2017-02-081-0/+2
| | | | | | | | Handling of the number of space time streams was missing for HT rate in rate printing function. Fix it. Signed-off-by: Gregory Greenman <gregory.greenman@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
* iwlwifi: mvm: rs: Remove unused 'mcs' variableKirtika Ruchandani2017-01-261-3/+1
| | | | | | | | | | | | | | Commit 5fc0f76c4 introduced Rx stats from debugfs, the function iwl_mvm_reset_frame_stats from that commit defines and sets mcs but does not use it. Compiling iwlwifi with W=1 gives this warning - iwlwifi/mvm/rs.c: In function ‘iwl_mvm_update_frame_stats’: iwlwifi/mvm/rs.c:3074:14: warning: variable ‘mcs’ set but not used [-Wunused-but-set-variable] Fixes: 5fc0f76c43bd (iwlwifi: mvm: add Rx frames statistics via debugfs) Signed-off-by: Kirtika Ruchandani <kirtika@google.com> Cc: Eyal Shapira <eyal@wizery.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
* iwlwifi: mvm: rs: Remove unused 'mvmvif'/'mvmsta' variablesKirtika Ruchandani2017-01-261-6/+0
| | | | | | | | | | | | | | | | | | | | | mvmvif is defined and set in rs_mimo_allow but not used. Compiling iwlwifi with W=1 gives the following warning, remove it. mvmsta is used only to obtain mvmvif so remove it as well. iwlwifi/mvm/rs.c: In function 'rs_mimo_allow': iwlwifi/mvm/rs.c:165:22: warning: variable 'mvmvif' set but not used.[-Wunused-but-set-variable] This fix removes calls to iwl_mvm_sta_from_mac & iwl_mvm_vif_from_mac. They are both accessors, and do not have any side-effects. Commit e621c2282e31 ("iwlwifi: rs: Remove workaround that disables MIMO on P2P") removed a workaround that disabled MIMO on P2P, 'mvmvif' was used for that workaround, but not removed with it. Fixes: e621c2282e31 ("iwlwifi: rs: Remove workaround that disables MIMO on P2P") Signed-off-by: Kirtika Ruchandani <kirtika@google.com> Cc: Alexander Bondar <alexander.bondar@intel.com> Cc: Emmanuel Grumbach <emmmanuel.grumbach@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
* iwlwifi: mvm: rs: add rate scaling support for 160MHz channelsGregory Greenman2016-07-061-22/+59
| | | | | | | | Expand TLC to support 160MHz channels. Full support for A-MSDU case will be added separately. Signed-off-by: Gregory Greenman <gregory.greenman@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
* iwlwifi: mvm: Do not open aggregations for null data packetsMatti Gottlieb2016-07-061-6/+7
| | | | | | | | | | | | Currently we try to open an aggregation for every packet (given that one is not already open). This causes redundant overhead (addba/delba) for null data packets. Do not open an aggregation for null data packets. Signed-off-by: Matti Gottlieb <matti.gottlieb@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
* cfg80211: remove enum ieee80211_bandJohannes Berg2016-04-121-14/+14
| | | | | | | | | This enum is already perfectly aliased to enum nl80211_band, and the only reason for it is that we get IEEE80211_NUM_BANDS out of it. There's no really good reason to not declare the number of bands in nl80211 though, so do that and remove the cfg80211 one. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* iwlwifi: mvm: don't enable A-MSDU when the rates are too lowEmmanuel Grumbach2016-02-271-2/+22
| | | | | | | Allow A-MSDU only when we are not downscaling and the initial MCS is at least 5. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
* iwlwifi: mvm: rs: fix a theoretical access to uninitialized array elementsEyal Shapira2016-02-271-0/+1
| | | | | | | | | | | Klocwork is unhappy as ht_vht_rates might be accessed with rate->index being set to values between 0 and 3 which will lead to accessing uninitialized array elements. Effectively this doesn't happen as in HT/VHT we're not using these rate indices. Still fix this. Signed-off-by: Eyal Shapira <eyalx.shapira@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
* Merge tag 'iwlwifi-for-kalle-2016-02-15' into HEADEmmanuel Grumbach2016-02-271-26/+48
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | These are a few fixes for the current cycle. 3 out of the 5 patches fix a bugzilla. * fix a race that users reported when we try to load the firmware and the hardware rfkill interrupt triggers at the same time. * Luca fixes a very visible bug in scheduled scan: our firmware doesn't support scheduled scan with no profile configured and the supplicant sometimes requests such scheduled scans. * build system fix * firmware name update for 8265 * typo fix in return value
| * iwlwifi: mvm: rs: fix TPC statistics handlingGregory Greenman2016-01-261-26/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | FW behaviour changed and now updates driver about the used TPC reduction in the following cases: 1. In tx response, which is used mostly for a single frame case 2. In BA notification When tx aggregation fails with the initial rate, FW will send to the driver BA notification and will try to transmit with the next rate, but this time without tx power reduction. Thus, in case of a failure with the initial rate, driver will get two BA notifications, the first one with reduced tx power as in the LQ command and the second one with 0 power reduction. This patch adapts the TPC statistics according to the description above: 1. Use BA notifications instead of Tx response 2. For TPC only, drop the optimization which considers empty BA as one MPDU. The reason is that with TPC we want to recover very quickly from a bad power reduction and, therefore we'd like the success ratio to get an immediate hit when failing to get a BA, so we'd switch back to a lower or zero power reduction Signed-off-by: Gregory Greenman <gregory.greenman@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
* | iwlwifi: mvm: rs: fix TPC action decision algorithmGregory Greenman2016-02-011-1/+2
|/ | | | | | | | Decreasing Tx power is allowed only when success ratio is above the threshold defined in the algorithm. Add this condition. Signed-off-by: Gregory Greenman <gregory.greenman@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
* iwlwifi: change the Intel Wireless email addressEmmanuel Grumbach2015-12-201-1/+1
| | | | | | | ilw@linux.intel.com is not available anymore. linuxwifi@intel.com should be used instead. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
* iwlwifi: mvm: rs: fix a potential out of bounds accessEyal Shapira2015-12-131-2/+3
| | | | | | | | | | Klocwork pointed these out. There is a theoretical possibility that rate->index might be set to IWL_RATE_INVALID (15). This could trigger an out of bounds access on ht_vht_rates or legacy_rates arrays. Fix it by adding some checks. Signed-off-by: Eyal Shapira <eyalx.shapira@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
* iwlwifi: mvm: add an option to start rs from HT/VHT ratesGregory Greenman2015-12-131-15/+52
| | | | | | | | | Extend the configurable option of setting initial rate to RSSI based. Make the initial rate to be set to VHT/HT SISO or legacy depending on the AP capabilities. Signed-off-by: Gregory Greenman <gregory.greenman@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
* iwlwifi: mvm: rs: fix a warning messageDan Carpenter2015-12-011-1/+1
| | | | | | | | WARN_ON_ONCE() doesn't take a message, it only takes a condition. I have changed this to WARN(1, ...). Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
* iwlwifi: mvm: drop low_latency_agg_frame_cnt_limitEyal Shapira2015-11-261-7/+1
| | | | | | | | | | This was an old workaround for solving latency issues with certain Miracast adapters like ActionTec. However this isn't needed anymore and furthermore it hurts throughput in other use cases. Signed-off-by: Eyal Shapira <eyalx.shapira@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
* iwlwifi: move under intel vendor directoryKalle Valo2015-11-181-0/+3983
Part of reorganising wireless drivers directory and Kconfig. Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
OpenPOWER on IntegriCloud