diff options
author | Sara Sharon <sara.sharon@intel.com> | 2017-12-06 06:57:19 -0500 |
---|---|---|
committer | Luca Coelho <luciano.coelho@intel.com> | 2017-12-20 11:28:24 -0500 |
commit | 57df383902968a1cc187ea36cefe4b23a58dfdac (patch) | |
tree | 844d38bc9d40dab34b7e88533354a7726facf25d | |
parent | 93b167c13a3afa389eaa1af277e94add976ea43f (diff) |
iwlwifi: mvm: support RX flags API change
Latest firmware calculates both phases of the TKIP
field, so the TTAK ok flag is not needed and deprecated.
Support this API change.
Signed-off-by: Sara Sharon <sara.sharon@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
-rw-r--r-- | drivers/net/wireless/intel/iwlwifi/fw/file.h | 3 | ||||
-rw-r--r-- | drivers/net/wireless/intel/iwlwifi/mvm/rx.c | 4 | ||||
-rw-r--r-- | drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c | 4 |
3 files changed, 9 insertions, 2 deletions
diff --git a/drivers/net/wireless/intel/iwlwifi/fw/file.h b/drivers/net/wireless/intel/iwlwifi/fw/file.h index 0824c007b6f8..12f97a2fc7ea 100644 --- a/drivers/net/wireless/intel/iwlwifi/fw/file.h +++ b/drivers/net/wireless/intel/iwlwifi/fw/file.h | |||
@@ -248,6 +248,8 @@ typedef unsigned int __bitwise iwl_ucode_tlv_api_t; | |||
248 | * @IWL_UCODE_TLV_API_NEW_RX_STATS: should new RX STATISTICS API be used | 248 | * @IWL_UCODE_TLV_API_NEW_RX_STATS: should new RX STATISTICS API be used |
249 | * @IWL_UCODE_TLV_API_QUOTA_LOW_LATENCY: Quota command includes a field | 249 | * @IWL_UCODE_TLV_API_QUOTA_LOW_LATENCY: Quota command includes a field |
250 | * indicating low latency direction. | 250 | * indicating low latency direction. |
251 | * @IWL_UCODE_TLV_API_DEPRECATE_TTAK: RX status flag TTAK ok (bit 7) is | ||
252 | * deprecated. | ||
251 | * | 253 | * |
252 | * @NUM_IWL_UCODE_TLV_API: number of bits used | 254 | * @NUM_IWL_UCODE_TLV_API: number of bits used |
253 | */ | 255 | */ |
@@ -266,6 +268,7 @@ enum iwl_ucode_tlv_api { | |||
266 | IWL_UCODE_TLV_API_NEW_BEACON_TEMPLATE = (__force iwl_ucode_tlv_api_t)34, | 268 | IWL_UCODE_TLV_API_NEW_BEACON_TEMPLATE = (__force iwl_ucode_tlv_api_t)34, |
267 | IWL_UCODE_TLV_API_NEW_RX_STATS = (__force iwl_ucode_tlv_api_t)35, | 269 | IWL_UCODE_TLV_API_NEW_RX_STATS = (__force iwl_ucode_tlv_api_t)35, |
268 | IWL_UCODE_TLV_API_QUOTA_LOW_LATENCY = (__force iwl_ucode_tlv_api_t)38, | 270 | IWL_UCODE_TLV_API_QUOTA_LOW_LATENCY = (__force iwl_ucode_tlv_api_t)38, |
271 | IWL_UCODE_TLV_API_DEPRECATE_TTAK = (__force iwl_ucode_tlv_api_t)41, | ||
269 | 272 | ||
270 | NUM_IWL_UCODE_TLV_API | 273 | NUM_IWL_UCODE_TLV_API |
271 | #ifdef __CHECKER__ | 274 | #ifdef __CHECKER__ |
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/rx.c b/drivers/net/wireless/intel/iwlwifi/mvm/rx.c index 63a57f0a16ef..d26833c5ce1f 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/rx.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/rx.c | |||
@@ -222,7 +222,9 @@ static u32 iwl_mvm_set_mac80211_rx_flag(struct iwl_mvm *mvm, | |||
222 | 222 | ||
223 | case RX_MPDU_RES_STATUS_SEC_TKIP_ENC: | 223 | case RX_MPDU_RES_STATUS_SEC_TKIP_ENC: |
224 | /* Don't drop the frame and decrypt it in SW */ | 224 | /* Don't drop the frame and decrypt it in SW */ |
225 | if (!(rx_pkt_status & RX_MPDU_RES_STATUS_TTAK_OK)) | 225 | if (!fw_has_api(&mvm->fw->ucode_capa, |
226 | IWL_UCODE_TLV_API_DEPRECATE_TTAK) && | ||
227 | !(rx_pkt_status & RX_MPDU_RES_STATUS_TTAK_OK)) | ||
226 | return 0; | 228 | return 0; |
227 | *crypt_len = IEEE80211_TKIP_IV_LEN; | 229 | *crypt_len = IEEE80211_TKIP_IV_LEN; |
228 | /* fall through if TTAK OK */ | 230 | /* fall through if TTAK OK */ |
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c b/drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c index 4a70e62c1b87..a3f7c1bf3cc8 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c | |||
@@ -261,7 +261,9 @@ static int iwl_mvm_rx_crypto(struct iwl_mvm *mvm, struct ieee80211_hdr *hdr, | |||
261 | return 0; | 261 | return 0; |
262 | case IWL_RX_MPDU_STATUS_SEC_TKIP: | 262 | case IWL_RX_MPDU_STATUS_SEC_TKIP: |
263 | /* Don't drop the frame and decrypt it in SW */ | 263 | /* Don't drop the frame and decrypt it in SW */ |
264 | if (!(status & IWL_RX_MPDU_RES_STATUS_TTAK_OK)) | 264 | if (!fw_has_api(&mvm->fw->ucode_capa, |
265 | IWL_UCODE_TLV_API_DEPRECATE_TTAK) && | ||
266 | !(status & IWL_RX_MPDU_RES_STATUS_TTAK_OK)) | ||
265 | return 0; | 267 | return 0; |
266 | 268 | ||
267 | *crypt_len = IEEE80211_TKIP_IV_LEN; | 269 | *crypt_len = IEEE80211_TKIP_IV_LEN; |