diff options
author | Gregory Greenman <gregory.greenman@intel.com> | 2017-11-01 09:04:38 +0200 |
---|---|---|
committer | Luca Coelho <luciano.coelho@intel.com> | 2017-12-05 21:01:41 +0200 |
commit | 110b32f065f3c66a7a1626ca57b64641ed6a578e (patch) | |
tree | 9a0c5eb3cc79744758d82b0fb1b2f57a6f6c21f9 /drivers/net/wireless/intel/iwlwifi/mvm/rs.c | |
parent | 9f66a397c8773167939c4eafc33725f38ec5c872 (diff) |
iwlwifi: mvm: rs: add basic implementation of the new RS API handlers
This patch adds rate scaling configuration command and
implements a few other handlers.
Signed-off-by: Gregory Greenman <gregory.greenman@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Diffstat (limited to 'drivers/net/wireless/intel/iwlwifi/mvm/rs.c')
-rw-r--r-- | drivers/net/wireless/intel/iwlwifi/mvm/rs.c | 25 |
1 files changed, 16 insertions, 9 deletions
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/rs.c b/drivers/net/wireless/intel/iwlwifi/mvm/rs.c index 3dd6535ed922..428d34cb6683 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/rs.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/rs.c @@ -4061,15 +4061,8 @@ void iwl_mvm_rate_control_unregister(void) ieee80211_rate_control_unregister(&rs_mvm_ops_drv); } -/** - * iwl_mvm_tx_protection - Gets LQ command, change it to enable/disable - * Tx protection, according to this request and previous requests, - * and send the LQ command. - * @mvmsta: The station - * @enable: Enable Tx protection? - */ -int iwl_mvm_tx_protection(struct iwl_mvm *mvm, struct iwl_mvm_sta *mvmsta, - bool enable) +static int rs_drv_tx_protection(struct iwl_mvm *mvm, struct iwl_mvm_sta *mvmsta, + bool enable) { struct iwl_lq_cmd *lq = &mvmsta->lq_sta.rs_drv.lq; @@ -4087,3 +4080,17 @@ int iwl_mvm_tx_protection(struct iwl_mvm *mvm, struct iwl_mvm_sta *mvmsta, return iwl_mvm_send_lq_cmd(mvm, lq, false); } + +/** + * iwl_mvm_tx_protection - ask FW to enable RTS/CTS protection + * @mvmsta: The station + * @enable: Enable Tx protection? + */ +int iwl_mvm_tx_protection(struct iwl_mvm *mvm, struct iwl_mvm_sta *mvmsta, + bool enable) +{ + if (fw_has_capa(&mvm->fw->ucode_capa, IWL_UCODE_TLV_CAPA_TLC_OFFLOAD)) + return rs_fw_tx_protection(mvm, mvmsta, enable); + else + return rs_drv_tx_protection(mvm, mvmsta, enable); +} |