Return-path: Received: from cora.hrz.tu-chemnitz.de ([134.109.228.40]:53903 "EHLO cora.hrz.tu-chemnitz.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S964906Ab2CPN6Y (ORCPT ); Fri, 16 Mar 2012 09:58:24 -0400 Message-ID: <4F6346FE.4060005@etit.tu-chemnitz.de> (sfid-20120316_145829_351208_DB479509) Date: Fri, 16 Mar 2012 14:58:22 +0100 From: Marco Porsch MIME-Version: 1.0 To: Johannes Berg CC: linux-wireless@vger.kernel.org Subject: Re: [mac80211] UAPSD: WLAN_STA_PS flag cleared prematurely? References: <4F630757.6070901@etit.tu-chemnitz.de> <1331901852.6753.2.camel@jlt3.sipsolutions.net> <4F634259.7040107@etit.tu-chemnitz.de> <1331905240.6753.14.camel@jlt3.sipsolutions.net> In-Reply-To: <1331905240.6753.14.camel@jlt3.sipsolutions.net> Content-Type: multipart/signed; protocol="application/pkcs7-signature"; micalg=sha1; boundary="------------ms050109070703060305060107" Sender: linux-wireless-owner@vger.kernel.org List-ID: This is a cryptographically signed message in MIME format. --------------ms050109070703060305060107 Content-Type: multipart/mixed; boundary="------------060607050302060801000904" This is a multi-part message in MIME format. --------------060607050302060801000904 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable On 03/16/12 14:40, Johannes Berg wrote: > On Fri, 2012-03-16 at 14:38 +0100, Marco Porsch wrote: >> On 03/16/12 13:44, Johannes Berg wrote: >>> On Fri, 2012-03-16 at 10:26 +0100, Marco Porsch wrote: >>>> Hi all, >>>> >>>> in sta_info.c : ieee80211_sta_ps_deliver_response the >>>> IEEE80211_TX_STATUS_EOSP is set for all to-be-sent frames, not only = for >>>> the last. But only the last buffered frame actually gets the EOSP fl= ag. >>>> >>>> >>>> /* set EOSP for the frame */ >>>> if (reason =3D=3D IEEE80211_FRAME_RELEASE_UAPSD&& >>>> qoshdr&& skb_queue_empty(&frames)) >>>> *qoshdr |=3D IEEE80211_QOS_CTL_EOSP; >>>> >>>> info->flags |=3D IEEE80211_TX_STATUS_EOSP | >>>> IEEE80211_TX_CTL_REQ_TX_STATUS; >>>> >>>> >>>> Consequence is, that the WLAN_STA_SP flag gets cleared (multiple tim= es) >>>> in ieee80211_tx_status before the last frame with EOSP has been sent= =2E >>>> Is this correct? >>> >>> Looks like the bug is above, the EOSP/TX_STATUS should only be set fo= r >>> the last frame? >> >> I Agree. But what about the case, when the last frame is not a QoS >> frame? Can this even happen - or is U-APSD only for QoS STA? > > uAPSD can only be used by a QoS STA. > >> Then we would have to manually append a QoS Null with the EOSP flag + >> TX_STATUS? >> >> So like this: >> >> /* set EOSP for the _last_ frame or appended a QoS Null when needed */= >> if (reason =3D=3D IEEE80211_FRAME_RELEASE_UAPSD&& >> skb_queue_empty(&frames)) { >> if (qoshdr) { >> *qoshdr |=3D IEEE80211_QOS_CTL_EOSP; >> >> info->flags |=3D IEEE80211_TX_STATUS_EOSP | >> IEEE80211_TX_CTL_REQ_TX_STATUS; >> } else { >> ieee80211_send_null_response(sdata, tid, reason); >> } >> } > > No, I think it should be more like this: > > > /* set EOSP for the frame */ > > if (skb_queue_empty(&frames)) { > if (reason =3D=3D IEEE80211_FRAME_RELEASE_UAPSD&& qoshdr) > *qoshdr |=3D IEEE80211_QOS_CTL_EOSP; > > info->flags |=3D IEEE80211_TX_STATUS_EOSP | > IEEE80211_TX_CTL_REQ_TX_STATUS; > } Oh, yes, I see. In case of reason=3D=3DIEEE80211_FRAME_RELEASE_PSPOLL, it= is=20 intended to not send the EOSP, but still set IEEE80211_TX_STATUS_EOSP. Who sends the patch? Regards, Marco --------------060607050302060801000904 Content-Type: text/x-vcard; charset=utf-8; name="marco_porsch.vcf" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="marco_porsch.vcf" YmVnaW46dmNhcmQNCmZuOk1hcmNvIFBvcnNjaA0KbjpQb3JzY2g7TWFyY28NCm9yZzpDaGVt bml0eiBVbml2ZXJzaXR5IG9mIFRlY2hub2xvZ3k7Q29tbXVuaWNhdGlvbiBOZXR3b3Jrcw0K YWRyO3F1b3RlZC1wcmludGFibGU7cXVvdGVkLXByaW50YWJsZTpGYWt1bHQ9QzM9QTR0IGY9 QzM9QkNyIEVsZWt0cm90ZWNobmlrIHVuZCBJbmZvcm1hdGlvbnN0ZWNobmlrICwgUHJvZmVz c3VyPQ0KCSBLb21tdW5pa2F0aW9uc25ldHplOztUZWNobmlzY2hlIFVuaXZlcnNpdD1DMz1B NHQgQ2hlbW5pdHo7Q2hlbW5pdHo7O0QgLSAwOTEwNztHZXJtYW55DQplbWFpbDtpbnRlcm5l dDptYXJjby5wb3JzY2hAZXRpdC50dS1jaGVtbml0ei5kZQ0KdGl0bGU6RGlwbC4tSW5nLg0K dGVsO3dvcms6KzQ5IDM3MSA1MzEgMzc1MjMNCnZlcnNpb246Mi4xDQplbmQ6dmNhcmQNCg0K --------------060607050302060801000904-- --------------ms050109070703060305060107 Content-Type: application/pkcs7-signature; name="smime.p7s" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="smime.p7s" Content-Description: S/MIME Cryptographic Signature MIAGCSqGSIb3DQEHAqCAMIACAQExCzAJBgUrDgMCGgUAMIAGCSqGSIb3DQEHAQAAoIIPPDCC BCEwggMJoAMCAQICAgDHMA0GCSqGSIb3DQEBBQUAMHExCzAJBgNVBAYTAkRFMRwwGgYDVQQK ExNEZXV0c2NoZSBUZWxla29tIEFHMR8wHQYDVQQLExZULVRlbGVTZWMgVHJ1c3QgQ2VudGVy MSMwIQYDVQQDExpEZXV0c2NoZSBUZWxla29tIFJvb3QgQ0EgMjAeFw0wNjEyMTkxMDI5MDBa Fw0xOTA2MzAyMzU5MDBaMFoxCzAJBgNVBAYTAkRFMRMwEQYDVQQKEwpERk4tVmVyZWluMRAw DgYDVQQLEwdERk4tUEtJMSQwIgYDVQQDExtERk4tVmVyZWluIFBDQSBHbG9iYWwgLSBHMDEw ggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDpm8NnhfkNrv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