2008-04-04 00:04:39

by Reinette Chatre

[permalink] [raw]
Subject: mac80211: ieee80211_ops.bss_info_changed question

Johannes,

In the comments about bss_info_changed it is said that the callback has
to be atomic. I was looking at it and could only find that it is called
either from the workqueue or an ioctl. It thus seems that we may be able
to sleep in there. I likely missed the spot where it needs to be atomic
... could you please direct me to it?

Thanks

Reinette


2008-04-04 14:43:37

by Johannes Berg

[permalink] [raw]
Subject: Re: mac80211: ieee80211_ops.bss_info_changed question

Reinette,

> In the comments about bss_info_changed it is said that the callback has
> to be atomic. I was looking at it and could only find that it is called
> either from the workqueue or an ioctl. It thus seems that we may be able
> to sleep in there. I likely missed the spot where it needs to be atomic
> ... could you please direct me to it?

I think you may be right, I can't find any spots either. I was likely
mislead when writing that by the fact that much of the code in
ieee80211_sta.c uses GFP_ATOMIC while it actually runs from a workqueue,
which is actually confusing me still.

johannes


Attachments:
signature.asc (828.00 B)
This is a digitally signed message part

2008-04-04 23:11:20

by Reinette Chatre

[permalink] [raw]
Subject: RE: mac80211: ieee80211_ops.bss_info_changed question

On Friday, April 04, 2008 7:43 AM, Johannes Berg wrote:

> Reinette,
>
>> In the comments about bss_info_changed it is said that the callback
>> has to be atomic. I was looking at it and could only find that it is
>> called either from the workqueue or an ioctl. It thus seems that we
>> may be able to sleep in there. I likely missed the spot where it
>> needs to be atomic ... could you please direct me to it?
>
> I think you may be right, I can't find any spots either. I was likely
> mislead when writing that by the fact that much of the code in
> ieee80211_sta.c uses GFP_ATOMIC while it actually runs from a
> workqueue, which is actually confusing me still.

My mistake ... it can be called from tasklet during scanning
(ieee80211_sta_rx_scan). The comment that requires it to be atomic is
correct.

Reinette

2008-04-05 07:43:43

by Tomas Winkler

[permalink] [raw]
Subject: Re: mac80211: ieee80211_ops.bss_info_changed question

On Sat, Apr 5, 2008 at 2:11 AM, Chatre, Reinette
<[email protected]> wrote:
>
> On Friday, April 04, 2008 7:43 AM, Johannes Berg wrote:
>
> > Reinette,
> >
> >> In the comments about bss_info_changed it is said that the callback
> >> has to be atomic. I was looking at it and could only find that it is
> >> called either from the workqueue or an ioctl. It thus seems that we
> >> may be able to sleep in there. I likely missed the spot where it
> >> needs to be atomic ... could you please direct me to it?
> >
> > I think you may be right, I can't find any spots either. I was likely
> > mislead when writing that by the fact that much of the code in
> > ieee80211_sta.c uses GFP_ATOMIC while it actually runs from a
> > workqueue, which is actually confusing me still.
>
> My mistake ... it can be called from tasklet during scanning
> (ieee80211_sta_rx_scan). The comment that requires it to be atomic is
> correct.
>
Haven't look at the code but IMHO this function should not be called
from scanning, Only beacons from
connected AP should affect the driver behavior. These beacons are
received even without scanning.

Tomas

>
> Reinette
> --
> To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
> the body of a message to [email protected]
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>