On Fri, Feb 4, 2011 at 7:58 PM, Vivek Natarajan <vivek.natraj@xxxxxxxxx> wrote: > On Fri, Feb 4, 2011 at 7:38 PM, Johannes Berg <johannes@xxxxxxxxxxxxxxxx> wrote: >> On Fri, 2011-02-04 at 18:58 +0530, Vivek Natarajan wrote: >>> On Fri, Feb 4, 2011 at 6:42 PM, Johannes Berg <johannes@xxxxxxxxxxxxxxxx> wrote: >>> > On Fri, 2011-02-04 at 14:08 +0100, Johannes Berg wrote: >>> > Ok maybe I see how this helps -- but I don't think it's race-free. When >>> > the PS-pending flag is cleared here, the code above that checks it might >>> > already have passed and be in the driver callback or so. >>> >>> When it is in the driver callback, IEEE80211_CONF_PS would have been >>> set and when this is set, ieee80211_tx_h_dynamic_ps will disable PS >>> and there wont be any discrepancy in power save states between AP and >>> the station. >> >> Indeed, but the trace still exists between checking PS_PENDING and >> setting CONF_PS. > > Agreed. :) > I will try this out and test a bit: >> >> Maybe the subif queues should be stopped, then flush, then tx nullfunc, >> then stop all queues to configure the HW or something like that? >> The subif queues are stopped on receiving ACK_STATUS and the wake up is done after setting CONF_PS in the newer version that I had sent. This may help in preventing the above mentioned race. And the PS_PENDING flag will take care of the actual race in between queuing the nullfunc frame and receiving ack_status for that. Vivek. -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html