From: Emmanuel Grumbach Date: Tue, 20 Aug 2013 05:19:32 +0000 (+0300) Subject: iwlwifi: mvm: use CTS to Self if firmware allows it X-Git-Tag: accepted/tizen/common/20141203.182822~719^2~3^2^2~305^2~55 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2e0cc86535fe85910935f896f098f8d74389a355;p=platform%2Fkernel%2Flinux-arm64.git iwlwifi: mvm: use CTS to Self if firmware allows it Newer firmware fixed a bug that prevented to use CTS to self. Firmwares with API greater than 8 have this bug fixed. Enable the feature for these firmwares only. Signed-off-by: Emmanuel Grumbach Signed-off-by: Johannes Berg --- diff --git a/drivers/net/wireless/iwlwifi/mvm/mac-ctxt.c b/drivers/net/wireless/iwlwifi/mvm/mac-ctxt.c index 5fe23a5..c01cf17 100644 --- a/drivers/net/wireless/iwlwifi/mvm/mac-ctxt.c +++ b/drivers/net/wireless/iwlwifi/mvm/mac-ctxt.c @@ -559,8 +559,12 @@ static void iwl_mvm_mac_ctxt_cmd_common(struct iwl_mvm *mvm, cmd->qos_flags |= cpu_to_le32(MAC_QOS_FLG_UPDATE_EDCA); /* Don't use cts to self as the fw doesn't support it currently. */ - if (vif->bss_conf.use_cts_prot) + if (vif->bss_conf.use_cts_prot) { cmd->protection_flags |= cpu_to_le32(MAC_PROT_FLG_TGG_PROTECT); + if (IWL_UCODE_API(mvm->fw->ucode_ver) >= 8) + cmd->protection_flags |= + cpu_to_le32(MAC_PROT_FLG_SELF_CTS_EN); + } /* * I think that we should enable these 2 flags regardless the HT PROT