* [PATCH] mac80211: re-upload keys only after telling driver about association
@ 2009-04-08 0:55 Johannes Berg
2009-04-09 16:26 ` reinette chatre
0 siblings, 1 reply; 4+ messages in thread
From: Johannes Berg @ 2009-04-08 0:55 UTC (permalink / raw)
To: John Linville; +Cc: linux-wireless, Bob Copeland
In the normal WPA or RSN case keys are only configured after
associating, so we should do that in that order when resuming
as well. It shouldn't really matter since we do not send any
data at either point, but iwlwifi prefers it this way and it
does seem more natural.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
---
net/mac80211/pm.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
--- wireless-testing.orig/net/mac80211/pm.c 2009-04-08 01:33:41.000000000 +0200
+++ wireless-testing/net/mac80211/pm.c 2009-04-08 01:40:35.000000000 +0200
@@ -127,11 +127,6 @@ int __ieee80211_resume(struct ieee80211_
rcu_read_unlock();
- /* add back keys */
- list_for_each_entry(sdata, &local->interfaces, list)
- if (netif_running(sdata->dev))
- ieee80211_enable_keys(sdata);
-
/* setup RTS threshold */
if (local->ops->set_rts_threshold)
local->ops->set_rts_threshold(hw, local->rts_threshold);
@@ -172,6 +167,11 @@ int __ieee80211_resume(struct ieee80211_
}
}
+ /* add back keys */
+ list_for_each_entry(sdata, &local->interfaces, list)
+ if (netif_running(sdata->dev))
+ ieee80211_enable_keys(sdata);
+
ieee80211_wake_queues_by_reason(hw,
IEEE80211_QUEUE_STOP_REASON_SUSPEND);
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] mac80211: re-upload keys only after telling driver about association
2009-04-08 0:55 [PATCH] mac80211: re-upload keys only after telling driver about association Johannes Berg
@ 2009-04-09 16:26 ` reinette chatre
2009-04-10 7:29 ` Johannes Berg
0 siblings, 1 reply; 4+ messages in thread
From: reinette chatre @ 2009-04-09 16:26 UTC (permalink / raw)
To: Johannes Berg; +Cc: John Linville, linux-wireless, Bob Copeland
Hi Johannes,
On Tue, 2009-04-07 at 17:55 -0700, Johannes Berg wrote:
> In the normal WPA or RSN case keys are only configured after
> associating, so we should do that in that order when resuming
> as well. It shouldn't really matter since we do not send any
> data at either point, but iwlwifi prefers it this way and it
> does seem more natural.
Could you please share the symptom of the problem with iwlwifi without
this patch?
Thank you
Reinette
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] mac80211: re-upload keys only after telling driver about association
2009-04-09 16:26 ` reinette chatre
@ 2009-04-10 7:29 ` Johannes Berg
2009-04-10 16:05 ` reinette chatre
0 siblings, 1 reply; 4+ messages in thread
From: Johannes Berg @ 2009-04-10 7:29 UTC (permalink / raw)
To: reinette chatre; +Cc: John Linville, linux-wireless, Bob Copeland
[-- Attachment #1: Type: text/plain, Size: 1238 bytes --]
Hi,
> On Tue, 2009-04-07 at 17:55 -0700, Johannes Berg wrote:
> > In the normal WPA or RSN case keys are only configured after
> > associating, so we should do that in that order when resuming
> > as well. It shouldn't really matter since we do not send any
> > data at either point, but iwlwifi prefers it this way and it
> > does seem more natural.
>
> Could you please share the symptom of the problem with iwlwifi without
> this patch?
[this is just a snippet from my other mail -- for the wider audience]
When you have a microcode error, we pretty much take the driver
completely down, and the firmware is of course completely
re-initialised. Now, when mac80211 goes to reconfigure the hardware, it
would, before this patch, do this [simplified, but you can look at the
code]:
1) ->start()
2) ->add_interface()
3) ->sta_notify() [which iwlwifi doesn't use]
4) ->set_key()
5) ->bss_info_changed()
and some more. Now, because iwlwifi ignores step 3, in step 4 it will
complain "station not found" when mac80211 wants to add the pairwise key
for the AP. Reordering 4 and 5 fixes that because iwlwifi adds the
station in bss_info_changed and then the key upload can be successful.
johannes
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] mac80211: re-upload keys only after telling driver about association
2009-04-10 7:29 ` Johannes Berg
@ 2009-04-10 16:05 ` reinette chatre
0 siblings, 0 replies; 4+ messages in thread
From: reinette chatre @ 2009-04-10 16:05 UTC (permalink / raw)
To: Johannes Berg; +Cc: John Linville, linux-wireless, Bob Copeland
Hi Johannes,
On Fri, 2009-04-10 at 00:29 -0700, Johannes Berg wrote:
> Hi,
>
> > On Tue, 2009-04-07 at 17:55 -0700, Johannes Berg wrote:
> > > In the normal WPA or RSN case keys are only configured after
> > > associating, so we should do that in that order when resuming
> > > as well. It shouldn't really matter since we do not send any
> > > data at either point, but iwlwifi prefers it this way and it
> > > does seem more natural.
> >
> > Could you please share the symptom of the problem with iwlwifi without
> > this patch?
>
> [this is just a snippet from my other mail -- for the wider audience]
>
>
> When you have a microcode error, we pretty much take the driver
> completely down, and the firmware is of course completely
> re-initialised. Now, when mac80211 goes to reconfigure the hardware, it
> would, before this patch, do this [simplified, but you can look at the
> code]:
> 1) ->start()
> 2) ->add_interface()
> 3) ->sta_notify() [which iwlwifi doesn't use]
> 4) ->set_key()
> 5) ->bss_info_changed()
>
> and some more. Now, because iwlwifi ignores step 3, in step 4 it will
> complain "station not found" when mac80211 wants to add the pairwise key
> for the AP. Reordering 4 and 5 fixes that because iwlwifi adds the
> station in bss_info_changed and then the key upload can be successful.
Thank you very much for these details. I was really hoping that this may
have something to do with our latest kerneloops.org attention, but it
does not from what I can tell.
Reinette
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2009-04-10 15:59 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-04-08 0:55 [PATCH] mac80211: re-upload keys only after telling driver about association Johannes Berg
2009-04-09 16:26 ` reinette chatre
2009-04-10 7:29 ` Johannes Berg
2009-04-10 16:05 ` reinette chatre
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox