summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTamizh chelvam <c_traja@qti.qualcomm.com>2015-10-07 10:40:04 +0530
committerJohannes Berg <johannes.berg@intel.com>2015-10-13 10:29:11 +0200
commit93f0490e5deb9445737cabf0e436f3288a4042b7 (patch)
treeed4fd5a1730b5a4d6857cc2f6be0dc70e2f5fb33
parent985f2c87a7109a42cac93f56ea595353d53a1746 (diff)
Revert "mac80211: remove exposing 'mfp' to drivers"
This reverts commit 5c48f1201744233d4f235c7dd916d5196ed20716. Some device drivers (ath10k) offload part of aggregation including AddBA/DelBA negotiations to firmware. In such scenario, the PMF configuration of the station needs to be provided to driver to enable encryption of AddBA/DelBA action frames. Signed-off-by: Tamizh chelvam <c_traja@qti.qualcomm.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
-rw-r--r--include/net/mac80211.h2
-rw-r--r--net/mac80211/cfg.c1
-rw-r--r--net/mac80211/mlme.c6
3 files changed, 8 insertions, 1 deletions
diff --git a/include/net/mac80211.h b/include/net/mac80211.h
index 4ec6fedeb220..1bb2a2b4e187 100644
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -1683,6 +1683,7 @@ struct ieee80211_sta_rates {
* @tdls: indicates whether the STA is a TDLS peer
* @tdls_initiator: indicates the STA is an initiator of the TDLS link. Only
* valid if the STA is a TDLS peer in the first place.
+ * @mfp: indicates whether the STA uses management frame protection or not.
* @txq: per-TID data TX queues (if driver uses the TXQ abstraction)
*/
struct ieee80211_sta {
@@ -1700,6 +1701,7 @@ struct ieee80211_sta {
struct ieee80211_sta_rates __rcu *rates;
bool tdls;
bool tdls_initiator;
+ bool mfp;
struct ieee80211_txq *txq[IEEE80211_NUM_TIDS];
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
index 68e551e263c6..63d03dad654c 100644
--- a/net/mac80211/cfg.c
+++ b/net/mac80211/cfg.c
@@ -1138,6 +1138,7 @@ static int sta_apply_parameters(struct ieee80211_local *local,
}
if (mask & BIT(NL80211_STA_FLAG_MFP)) {
+ sta->sta.mfp = !!(set & BIT(NL80211_STA_FLAG_MFP));
if (set & BIT(NL80211_STA_FLAG_MFP))
set_sta_flag(sta, WLAN_STA_MFP);
else
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index 56ef9a8e151c..9c450ffdabe8 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -3044,8 +3044,12 @@ static bool ieee80211_assoc_success(struct ieee80211_sub_if_data *sdata,
rate_control_rate_init(sta);
- if (ifmgd->flags & IEEE80211_STA_MFP_ENABLED)
+ if (ifmgd->flags & IEEE80211_STA_MFP_ENABLED) {
set_sta_flag(sta, WLAN_STA_MFP);
+ sta->sta.mfp = true;
+ } else {
+ sta->sta.mfp = false;
+ }
sta->sta.wme = elems.wmm_param && local->hw.queues >= IEEE80211_NUM_ACS;