public inbox for linux-wireless@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH mac80211] iwlwifi: don't install GTKs for IBSS vifs on resume
@ 2013-11-30 21:24 Antonio Quartulli
  2013-12-01  8:39 ` Emmanuel Grumbach
  0 siblings, 1 reply; 4+ messages in thread
From: Antonio Quartulli @ 2013-11-30 21:24 UTC (permalink / raw)
  To: Johannes Berg; +Cc: linux-wireless, Antonio Quartulli

From: Antonio Quartulli <antonio@open-mesh.com>

When performing keys reprogramming on HW resume, GTKs
belonging to IBSS stations should be skipped and not
installed onto the device.

Such keys are not installed by set_key() and the same
behaviour has to be kept on reprogramming (mac80211
is already performing enc/dec in SW for those keys).

Signed-off-by: Antonio Quartulli <antonio@open-mesh.com>
---

* compiled tested only *

 drivers/net/wireless/iwlwifi/dvm/lib.c | 5 +++++
 drivers/net/wireless/iwlwifi/mvm/d3.c  | 5 +++++
 2 files changed, 10 insertions(+)

diff --git a/drivers/net/wireless/iwlwifi/dvm/lib.c b/drivers/net/wireless/iwlwifi/dvm/lib.c
index 3d5bdc4..96be24d 100644
--- a/drivers/net/wireless/iwlwifi/dvm/lib.c
+++ b/drivers/net/wireless/iwlwifi/dvm/lib.c
@@ -929,6 +929,11 @@ static void iwlagn_wowlan_program_keys(struct ieee80211_hw *hw,
 	u16 p1k[IWLAGN_P1K_SIZE];
 	int ret, i;
 
+	/* Group keys for IBSS interfaces are not stored in HW */
+	if (vif->type == NL80211_IFTYPE_ADHOC &&
+	    !(key->flags & IEEE80211_KEY_FLAG_PAIRWISE))
+		return;
+
 	mutex_lock(&priv->mutex);
 
 	if ((key->cipher == WLAN_CIPHER_SUITE_WEP40 ||
diff --git a/drivers/net/wireless/iwlwifi/mvm/d3.c b/drivers/net/wireless/iwlwifi/mvm/d3.c
index 6f45966..53182e6 100644
--- a/drivers/net/wireless/iwlwifi/mvm/d3.c
+++ b/drivers/net/wireless/iwlwifi/mvm/d3.c
@@ -156,6 +156,11 @@ static void iwl_mvm_wowlan_program_keys(struct ieee80211_hw *hw,
 	u16 p1k[IWL_P1K_SIZE];
 	int ret, i;
 
+	/* Group keys for IBSS interfaces are not stored in HW */
+	if (vif->type == NL80211_IFTYPE_ADHOC &&
+	    !(key->flags & IEEE80211_KEY_FLAG_PAIRWISE))
+		return;
+
 	mutex_lock(&mvm->mutex);
 
 	switch (key->cipher) {
-- 
1.8.4.4


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

* Re: [PATCH mac80211] iwlwifi: don't install GTKs for IBSS vifs on resume
  2013-11-30 21:24 [PATCH mac80211] iwlwifi: don't install GTKs for IBSS vifs on resume Antonio Quartulli
@ 2013-12-01  8:39 ` Emmanuel Grumbach
  2013-12-01  9:39   ` Antonio Quartulli
  0 siblings, 1 reply; 4+ messages in thread
From: Emmanuel Grumbach @ 2013-12-01  8:39 UTC (permalink / raw)
  To: Antonio Quartulli; +Cc: Johannes Berg, linux-wireless, Antonio Quartulli

>
> When performing keys reprogramming on HW resume, GTKs
> belonging to IBSS stations should be skipped and not
> installed onto the device.
>
> Such keys are not installed by set_key() and the same
> behaviour has to be kept on reprogramming (mac80211
> is already performing enc/dec in SW for those keys).
>
> Signed-off-by: Antonio Quartulli <antonio@open-mesh.com>
> ---
>
> * compiled tested only *
>
>  drivers/net/wireless/iwlwifi/dvm/lib.c | 5 +++++
>  drivers/net/wireless/iwlwifi/mvm/d3.c  | 5 +++++
>  2 files changed, 10 insertions(+)
>
> diff --git a/drivers/net/wireless/iwlwifi/dvm/lib.c b/drivers/net/wireless/iwlwifi/dvm/lib.c
> index 3d5bdc4..96be24d 100644
> --- a/drivers/net/wireless/iwlwifi/dvm/lib.c
> +++ b/drivers/net/wireless/iwlwifi/dvm/lib.c
> @@ -929,6 +929,11 @@ static void iwlagn_wowlan_program_keys(struct ieee80211_hw *hw,
>         u16 p1k[IWLAGN_P1K_SIZE];
>         int ret, i;
>
> +       /* Group keys for IBSS interfaces are not stored in HW */
> +       if (vif->type == NL80211_IFTYPE_ADHOC &&
> +           !(key->flags & IEEE80211_KEY_FLAG_PAIRWISE))
> +               return;
> +
>         mutex_lock(&priv->mutex);
>
>         if ((key->cipher == WLAN_CIPHER_SUITE_WEP40 ||
> diff --git a/drivers/net/wireless/iwlwifi/mvm/d3.c b/drivers/net/wireless/iwlwifi/mvm/d3.c
> index 6f45966..53182e6 100644
> --- a/drivers/net/wireless/iwlwifi/mvm/d3.c
> +++ b/drivers/net/wireless/iwlwifi/mvm/d3.c
> @@ -156,6 +156,11 @@ static void iwl_mvm_wowlan_program_keys(struct ieee80211_hw *hw,
>         u16 p1k[IWL_P1K_SIZE];
>         int ret, i;
>
> +       /* Group keys for IBSS interfaces are not stored in HW */
> +       if (vif->type == NL80211_IFTYPE_ADHOC &&
> +           !(key->flags & IEEE80211_KEY_FLAG_PAIRWISE))
> +               return;
> +
>         mutex_lock(&mvm->mutex);

This is WoWLAN code - so you I must miss something here...
We don't support IBSS in WoWLAN (thinking about it even makes me feel bad).

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

* Re: [PATCH mac80211] iwlwifi: don't install GTKs for IBSS vifs on resume
  2013-12-01  8:39 ` Emmanuel Grumbach
@ 2013-12-01  9:39   ` Antonio Quartulli
  2013-12-01 17:57     ` Emmanuel Grumbach
  0 siblings, 1 reply; 4+ messages in thread
From: Antonio Quartulli @ 2013-12-01  9:39 UTC (permalink / raw)
  To: Emmanuel Grumbach, Antonio Quartulli; +Cc: Johannes Berg, linux-wireless

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 01/12/13 09:39, Emmanuel Grumbach wrote:
>> +       /* Group keys for IBSS interfaces are not stored in HW
>> */ +       if (vif->type == NL80211_IFTYPE_ADHOC && +
>> !(key->flags & IEEE80211_KEY_FLAG_PAIRWISE)) +
>> return; +

Well, my knowledge about WoWLAN is really poor (in particular for what
concern IWLWIFI). I think I should have sent this as RFC first.

So isn't it possible to reach this point with a key that satisfies
that condition? If so, we are fine :)


Cheers,

- -- 
Antonio Quartulli
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.22 (GNU/Linux)

iEYEARECAAYFAlKbA9kACgkQpGgxIkP9cwdLPgCfbzHDFGPl73p/a+d0Tf2nEt3t
iPwAmwTxQLYqb9fji3Ld58vgXdsl/Yrw
=sgjH
-----END PGP SIGNATURE-----

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

* Re: [PATCH mac80211] iwlwifi: don't install GTKs for IBSS vifs on resume
  2013-12-01  9:39   ` Antonio Quartulli
@ 2013-12-01 17:57     ` Emmanuel Grumbach
  0 siblings, 0 replies; 4+ messages in thread
From: Emmanuel Grumbach @ 2013-12-01 17:57 UTC (permalink / raw)
  To: Antonio Quartulli, Antonio Quartulli; +Cc: Johannes Berg, linux-wireless

On 12/01/2013 11:39 AM, Antonio Quartulli wrote:
> On 01/12/13 09:39, Emmanuel Grumbach wrote:
>>> +       /* Group keys for IBSS interfaces are not stored in HW
>>> */ +       if (vif->type == NL80211_IFTYPE_ADHOC && +
>>> !(key->flags & IEEE80211_KEY_FLAG_PAIRWISE)) +
>>> return; +
> 
> Well, my knowledge about WoWLAN is really poor (in particular for what
> concern IWLWIFI). I think I should have sent this as RFC first.
> 
> So isn't it possible to reach this point with a key that satisfies
> that condition? If so, we are fine :)
> 

No - because in WoWLAN we will never have IBSS configured.
WoWLAN supports (currently) BSS only - I am not even sure we want to
have P2P Client there.

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

end of thread, other threads:[~2013-12-01 17:57 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-30 21:24 [PATCH mac80211] iwlwifi: don't install GTKs for IBSS vifs on resume Antonio Quartulli
2013-12-01  8:39 ` Emmanuel Grumbach
2013-12-01  9:39   ` Antonio Quartulli
2013-12-01 17:57     ` Emmanuel Grumbach

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox