From owner-freebsd-wireless@FreeBSD.ORG Sun Sep 7 21:07:47 2014 Return-Path: Delivered-To: freebsd-wireless@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 16212E20; Sun, 7 Sep 2014 21:07:47 +0000 (UTC) Received: from mail-qa0-x22a.google.com (mail-qa0-x22a.google.com [IPv6:2607:f8b0:400d:c00::22a]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B9D8C1C52; Sun, 7 Sep 2014 21:07:46 +0000 (UTC) Received: by mail-qa0-f42.google.com with SMTP id dc16so9267044qab.15 for ; Sun, 07 Sep 2014 14:07:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=kki583p8SW1AujYx72p8m2zF0NZhR5sOrsQJmgRwosM=; b=LQEkQpeG5Qzhi2Wm87XyL8uP0txuBZcdFi+3xqxWluo/VB45yeWH1ZcmAKFmmTEEty u1bIX0mUT5bDNPuw6jIVxjv6eWa3sikDkvtY9hZ/NoPNeoT75dVb8YJr16RfAdMKNrsF En/zKEQSHVyBgGroJiWEIPrM18cROYSHLpBGAtZYMEsLqI649dTtdTAVXGQq04R1WyIQ +lrU6WLV2P34Cv6KGB62GhHIzdJ6NREOApJMSy8Mo81Lb+OONBojWw15PVDCMvqjg0SI fesQ3lvijFaPXOwjj1urDpBanfpmLZgaQ6zkCsC3PVifY7zntRtGQT9J4+YBSk/NII2z WEMQ== MIME-Version: 1.0 X-Received: by 10.140.104.69 with SMTP id z63mr34995865qge.81.1410124065847; Sun, 07 Sep 2014 14:07:45 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.224.39.139 with HTTP; Sun, 7 Sep 2014 14:07:45 -0700 (PDT) In-Reply-To: <540CC53A.90600@freebsd.org> References: <540C751F.6050202@freebsd.org> <540C92D6.4030106@freebsd.org> <540CC53A.90600@freebsd.org> Date: Sun, 7 Sep 2014 14:07:45 -0700 X-Google-Sender-Auth: PXAvKohbvl5ayc7iaG2bhHox64Q Message-ID: Subject: Re: Issues with urtwn From: Adrian Chadd To: Nathan Whitehorn Content-Type: text/plain; charset=UTF-8 Cc: "freebsd-wireless@freebsd.org" X-BeenThere: freebsd-wireless@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "Discussions of 802.11 stack, tools device driver development." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Sep 2014 21:07:47 -0000 Hi, The way it's supposed to work in the legacy 802.11 powersave world is that you send a/any data frame with the powermgt bit in the 802.11 header set to 0 and the AP goes "oh they're awake!" and sends you your buffered frames. By default powersave isn't enabled, so we should never be _telling_ the AP that we're going to sleep and the stack always sends data frames with pwrmgt=0. You can ensure it's disabled by ifconfig wlan0 -powersave The code in -HEAD that manages that is in ieee80211_power.c. I added an explicit powersave support mode for NICs that need it done for them - and the only one it's enabled for right now is ath(4). The only reason net80211 sends pwrmgt changes outside of having net80211 power save enabled is the background scan code. I'd compile in IEEE80211_DEBUG in your kernel, then I'd use wlandebug +scan to see if somehow there's some scanning going on; and wlandebug +power to see if any power save transitions occur. Are you absolutely sure it's a receive side buffering problem, rather than a send side problem? It's also possible that the NIC stops receiving and the AP treats that as "oh ok, they've gone to sleep for a while." ath(4) now does this in hostap mode. -a