summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/intel/iwlwifi/mvm/rs.c
AgeCommit message (Collapse)Author
2017-02-08iwlwifi: mvm: don't call << operator with a negative valueEmmanuel Grumbach
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>
2017-02-08iwlwifi: mvm: fix a print of NSS for HT rateGregory Greenman
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>
2017-01-26iwlwifi: mvm: rs: Remove unused 'mcs' variableKirtika Ruchandani
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>
2017-01-26iwlwifi: mvm: rs: Remove unused 'mvmvif'/'mvmsta' variablesKirtika Ruchandani
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>
2016-07-06iwlwifi: mvm: rs: add rate scaling support for 160MHz channelsGregory Greenman
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>
2016-07-06iwlwifi: mvm: Do not open aggregations for null data packetsMatti Gottlieb
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>
2016-04-12cfg80211: remove enum ieee80211_bandJohannes Berg
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>
2016-02-27iwlwifi: mvm: don't enable A-MSDU when the rates are too lowEmmanuel Grumbach
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>
2016-02-27iwlwifi: mvm: rs: fix a theoretical access to uninitialized array elementsEyal Shapira
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>
2016-02-27Merge tag 'iwlwifi-for-kalle-2016-02-15' into HEADEmmanuel Grumbach
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
2016-02-01iwlwifi: mvm: rs: fix TPC action decision algorithmGregory Greenman
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>
2016-01-26iwlwifi: mvm: rs: fix TPC statistics handlingGregory Greenman
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>
2015-12-20iwlwifi: change the Intel Wireless email addressEmmanuel Grumbach
ilw@linux.intel.com is not available anymore. linuxwifi@intel.com should be used instead. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2015-12-13iwlwifi: mvm: rs: fix a potential out of bounds accessEyal Shapira
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>
2015-12-13iwlwifi: mvm: add an option to start rs from HT/VHT ratesGregory Greenman
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>
2015-12-01iwlwifi: mvm: rs: fix a warning messageDan Carpenter
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>
2015-11-26iwlwifi: mvm: drop low_latency_agg_frame_cnt_limitEyal Shapira
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>
2015-11-18iwlwifi: move under intel vendor directoryKalle Valo
Part of reorganising wireless drivers directory and Kconfig. Signed-off-by: Kalle Valo <kvalo@codeaurora.org>