diff options
author | Tamizh chelvam <c_traja@qti.qualcomm.com> | 2015-10-29 08:27:42 -0400 |
---|---|---|
committer | Kalle Valo <kvalo@qca.qualcomm.com> | 2015-11-04 12:30:20 -0500 |
commit | 90eceb3b5fb0d0f413f475165314d4578c3a46c4 (patch) | |
tree | 383be57aa4349777dc89dda8b617ef6ab3472d65 /drivers/net | |
parent | 3fab30f7e8f31a06702ee6b03a902caffa5bc724 (diff) |
ath10k: set peer MFP flag in peer assoc command
Set peer's management frame protection flag in peer assoc command,
this setting will enable/disable encrytion of management frames in fw.
Setting of this flag is based on whether MFP is enabled/disabled at STA
and a firmware feature flag ATH10K_FW_FEATURE_MFP_SUPPORT. This is because
only firmwares 10.1.561 and above have support for MFP.
Signed-off-by: Tamizh chelvam <c_traja@qti.qualcomm.com>
Signed-off-by: Manikanta pubbisetty <c_mpubbi@qti.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/wireless/ath/ath10k/core.c | 1 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath10k/core.h | 3 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath10k/htt_tx.c | 7 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath10k/mac.c | 8 |
4 files changed, 18 insertions, 1 deletions
diff --git a/drivers/net/wireless/ath/ath10k/core.c b/drivers/net/wireless/ath/ath10k/core.c index aa9bd92ac4ed..dc4fc4e8d5ef 100644 --- a/drivers/net/wireless/ath/ath10k/core.c +++ b/drivers/net/wireless/ath/ath10k/core.c | |||
@@ -167,6 +167,7 @@ static const char *const ath10k_core_fw_feature_str[] = { | |||
167 | [ATH10K_FW_FEATURE_SUPPORTS_SKIP_CLOCK_INIT] = "skip-clock-init", | 167 | [ATH10K_FW_FEATURE_SUPPORTS_SKIP_CLOCK_INIT] = "skip-clock-init", |
168 | [ATH10K_FW_FEATURE_RAW_MODE_SUPPORT] = "raw-mode", | 168 | [ATH10K_FW_FEATURE_RAW_MODE_SUPPORT] = "raw-mode", |
169 | [ATH10K_FW_FEATURE_SUPPORTS_ADAPTIVE_CCA] = "adaptive-cca", | 169 | [ATH10K_FW_FEATURE_SUPPORTS_ADAPTIVE_CCA] = "adaptive-cca", |
170 | [ATH10K_FW_FEATURE_MFP_SUPPORT] = "mfp", | ||
170 | }; | 171 | }; |
171 | 172 | ||
172 | static unsigned int ath10k_core_get_fw_feature_str(char *buf, | 173 | static unsigned int ath10k_core_get_fw_feature_str(char *buf, |
diff --git a/drivers/net/wireless/ath/ath10k/core.h b/drivers/net/wireless/ath/ath10k/core.h index 01a417302149..c26f84ee80ea 100644 --- a/drivers/net/wireless/ath/ath10k/core.h +++ b/drivers/net/wireless/ath/ath10k/core.h | |||
@@ -513,6 +513,9 @@ enum ath10k_fw_features { | |||
513 | /* Firmware Supports Adaptive CCA*/ | 513 | /* Firmware Supports Adaptive CCA*/ |
514 | ATH10K_FW_FEATURE_SUPPORTS_ADAPTIVE_CCA = 11, | 514 | ATH10K_FW_FEATURE_SUPPORTS_ADAPTIVE_CCA = 11, |
515 | 515 | ||
516 | /* Firmware supports management frame protection */ | ||
517 | ATH10K_FW_FEATURE_MFP_SUPPORT = 12, | ||
518 | |||
516 | /* keep last */ | 519 | /* keep last */ |
517 | ATH10K_FW_FEATURE_COUNT, | 520 | ATH10K_FW_FEATURE_COUNT, |
518 | }; | 521 | }; |
diff --git a/drivers/net/wireless/ath/ath10k/htt_tx.c b/drivers/net/wireless/ath/ath10k/htt_tx.c index 16823970dbfd..bd8f264ed8cd 100644 --- a/drivers/net/wireless/ath/ath10k/htt_tx.c +++ b/drivers/net/wireless/ath/ath10k/htt_tx.c | |||
@@ -477,6 +477,13 @@ int ath10k_htt_mgmt_tx(struct ath10k_htt *htt, struct sk_buff *msdu) | |||
477 | 477 | ||
478 | msdu_id = res; | 478 | msdu_id = res; |
479 | 479 | ||
480 | if ((ieee80211_is_action(hdr->frame_control) || | ||
481 | ieee80211_is_deauth(hdr->frame_control) || | ||
482 | ieee80211_is_disassoc(hdr->frame_control)) && | ||
483 | ieee80211_has_protected(hdr->frame_control)) { | ||
484 | skb_put(msdu, IEEE80211_CCMP_MIC_LEN); | ||
485 | } | ||
486 | |||
480 | txdesc = ath10k_htc_alloc_skb(ar, len); | 487 | txdesc = ath10k_htc_alloc_skb(ar, len); |
481 | if (!txdesc) { | 488 | if (!txdesc) { |
482 | res = -ENOMEM; | 489 | res = -ENOMEM; |
diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c index 2ccda0ed91fa..a53e213387a2 100644 --- a/drivers/net/wireless/ath/ath10k/mac.c +++ b/drivers/net/wireless/ath/ath10k/mac.c | |||
@@ -1968,6 +1968,7 @@ static void ath10k_peer_assoc_h_basic(struct ath10k *ar, | |||
1968 | 1968 | ||
1969 | static void ath10k_peer_assoc_h_crypto(struct ath10k *ar, | 1969 | static void ath10k_peer_assoc_h_crypto(struct ath10k *ar, |
1970 | struct ieee80211_vif *vif, | 1970 | struct ieee80211_vif *vif, |
1971 | struct ieee80211_sta *sta, | ||
1971 | struct wmi_peer_assoc_complete_arg *arg) | 1972 | struct wmi_peer_assoc_complete_arg *arg) |
1972 | { | 1973 | { |
1973 | struct ieee80211_bss_conf *info = &vif->bss_conf; | 1974 | struct ieee80211_bss_conf *info = &vif->bss_conf; |
@@ -2009,6 +2010,11 @@ static void ath10k_peer_assoc_h_crypto(struct ath10k *ar, | |||
2009 | ath10k_dbg(ar, ATH10K_DBG_WMI, "%s: wpa ie found\n", __func__); | 2010 | ath10k_dbg(ar, ATH10K_DBG_WMI, "%s: wpa ie found\n", __func__); |
2010 | arg->peer_flags |= ar->wmi.peer_flags->need_gtk_2_way; | 2011 | arg->peer_flags |= ar->wmi.peer_flags->need_gtk_2_way; |
2011 | } | 2012 | } |
2013 | |||
2014 | if (sta->mfp && | ||
2015 | test_bit(ATH10K_FW_FEATURE_MFP_SUPPORT, ar->fw_features)) { | ||
2016 | arg->peer_flags |= ar->wmi.peer_flags->pmf; | ||
2017 | } | ||
2012 | } | 2018 | } |
2013 | 2019 | ||
2014 | static void ath10k_peer_assoc_h_rates(struct ath10k *ar, | 2020 | static void ath10k_peer_assoc_h_rates(struct ath10k *ar, |
@@ -2480,7 +2486,7 @@ static int ath10k_peer_assoc_prepare(struct ath10k *ar, | |||
2480 | memset(arg, 0, sizeof(*arg)); | 2486 | memset(arg, 0, sizeof(*arg)); |
2481 | 2487 | ||
2482 | ath10k_peer_assoc_h_basic(ar, vif, sta, arg); | 2488 | ath10k_peer_assoc_h_basic(ar, vif, sta, arg); |
2483 | ath10k_peer_assoc_h_crypto(ar, vif, arg); | 2489 | ath10k_peer_assoc_h_crypto(ar, vif, sta, arg); |
2484 | ath10k_peer_assoc_h_rates(ar, vif, sta, arg); | 2490 | ath10k_peer_assoc_h_rates(ar, vif, sta, arg); |
2485 | ath10k_peer_assoc_h_ht(ar, vif, sta, arg); | 2491 | ath10k_peer_assoc_h_ht(ar, vif, sta, arg); |
2486 | ath10k_peer_assoc_h_vht(ar, vif, sta, arg); | 2492 | ath10k_peer_assoc_h_vht(ar, vif, sta, arg); |