All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mac80211: send station PMF configuration to driver
@ 2015-02-28 10:08 SenthilKumar Jegadeesan
  2015-02-28 20:48 ` Johannes Berg
  0 siblings, 1 reply; 2+ messages in thread
From: SenthilKumar Jegadeesan @ 2015-02-28 10:08 UTC (permalink / raw)
  To: johannes; +Cc: linux-wireless, SenthilKumar Jegadeesan

In HT mode, firmware is not encrypting ADDBA request as PMF
configuration is not set in peer flags during association.

Enable mac80211 to provide station PMF configuration to driver.

Signed-off-by: SenthilKumar Jegadeesan <sjegadee@qti.qualcomm.com>

diff --git a/include/net/mac80211.h b/include/net/mac80211.h
index d52914b..1502086 100644
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -1488,6 +1488,8 @@ 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 supports management frame
+ *	protection.
  */
 struct ieee80211_sta {
 	u32 supp_rates[IEEE80211_NUM_BANDS];
@@ -1504,6 +1506,7 @@ struct ieee80211_sta {
 	struct ieee80211_sta_rates __rcu *rates;
 	bool tdls;
 	bool tdls_initiator;
+	bool mfp;

 	/* must be last */
 	u8 drv_priv[0] __aligned(sizeof(void *));
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
index dd4ff36..c124626 100644
--- a/net/mac80211/cfg.c
+++ b/net/mac80211/cfg.c
@@ -1068,6 +1068,7 @@ static int sta_apply_parameters(struct ieee80211_local *local,
 		sta->sta.wme = set & BIT(NL80211_STA_FLAG_WME);

 	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 10ac632..52c34cd 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -2969,8 +2969,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;

--
1.9.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] mac80211: send station PMF configuration to driver
  2015-02-28 10:08 [PATCH] mac80211: send station PMF configuration to driver SenthilKumar Jegadeesan
@ 2015-02-28 20:48 ` Johannes Berg
  0 siblings, 0 replies; 2+ messages in thread
From: Johannes Berg @ 2015-02-28 20:48 UTC (permalink / raw)
  To: SenthilKumar Jegadeesan; +Cc: linux-wireless

On Sat, 2015-02-28 at 15:38 +0530, SenthilKumar Jegadeesan wrote:
> In HT mode, firmware is not encrypting ADDBA request as PMF
> configuration is not set in peer flags during association.
> 
> Enable mac80211 to provide station PMF configuration to driver.

This commit log makes no sense without more context. Please rewrite it
to be more applicable to mac80211, rather than your (presumably)
combined mac80211/driver. mac80211 has no firmware, after all.

johannes


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-02-28 20:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-28 10:08 [PATCH] mac80211: send station PMF configuration to driver SenthilKumar Jegadeesan
2015-02-28 20:48 ` Johannes Berg

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.