From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from mx1.redhat.com ([209.132.183.28]:6019 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751044AbaBTJTr (ORCPT ); Thu, 20 Feb 2014 04:19:47 -0500 Date: Thu, 20 Feb 2014 10:21:55 +0100 From: Stanislaw Gruszka To: Johannes Berg Cc: linux-wireless@vger.kernel.org, Emmanuel Grumbach Subject: Re: [PATCH 3.14] mac80211: fix AP powersave TX vs. wakeup race Message-ID: <20140220092154.GD23439@redhat.com> (sfid-20140220_101954_076174_F13A6CDC) References: <1392886365-31206-1-git-send-email-johannes@sipsolutions.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii In-Reply-To: <1392886365-31206-1-git-send-email-johannes@sipsolutions.net> Sender: linux-wireless-owner@vger.kernel.org List-ID: On Thu, Feb 20, 2014 at 09:52:45AM +0100, Johannes Berg wrote: > + > + /* sync with ieee80211_sta_ps_deliver_wakeup */ > + spin_lock(&sta->ps_lock); > + /* > + * STA woke up the meantime and all the frames on ps_tx_buf have > + * been queued to pending queue. No reordering can happen, go > + * ahead and Tx the packet. > + */ > + if (!test_sta_flag(sta, WLAN_STA_PS_STA)) { > + spin_unlock(&sta->ps_lock); Actually I'm not sure if we should check if both WLAN_STA_PS_DRIVER and WLAN_STA_PS_STA flags are clear ? Stanislaw