From owner-freebsd-wireless@FreeBSD.ORG Fri Apr 25 01:26:02 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 1D4AD7E1 for ; Fri, 25 Apr 2014 01:26:02 +0000 (UTC) Received: from mail-qc0-x232.google.com (mail-qc0-x232.google.com [IPv6:2607:f8b0:400d:c01::232]) (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 D5A7D1871 for ; Fri, 25 Apr 2014 01:26:01 +0000 (UTC) Received: by mail-qc0-f178.google.com with SMTP id i8so3350731qcq.37 for ; Thu, 24 Apr 2014 18:26:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:date:message-id:subject:from:to:content-type; bh=bnPYAKfS4MYIduhVDcYXwdVjsuL9GdmGt2F1s935eD0=; b=eFu786f3oGnOgCFan/VExJ13lA0vPeTp48KFydO73lx6yBjXQnXrbiXT1BKunBT9LS qlTYjd8NtaBIZtFUUCdaHt5TkyAVbpmhMlBsUg/6RaUoAZPgx0hVmEbNdOpWadhHMIwN uSIoxm2ZKFtUm2xoJlKmBBFH8cjbQs0ZVWaqWFCbr4jTPCw8VR2lwWmlxaITklnuhNIM NXSNmb6w49efI6IDwgGNQ5EAPmnpGIqpOBDYRWLmUXCR8oI0VbQUI3thWZmtSYiwCTTh Q+P9yFHZK3TIYz1pnhhuNLk5M12b2knylMfctFeVxnQHyXz8/DZpAQPb4u1oN7Q+y9BI qPNw== MIME-Version: 1.0 X-Received: by 10.224.47.130 with SMTP id n2mr7805994qaf.26.1398389161083; Thu, 24 Apr 2014 18:26:01 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.224.191.201 with HTTP; Thu, 24 Apr 2014 18:26:01 -0700 (PDT) Date: Thu, 24 Apr 2014 18:26:01 -0700 X-Google-Sender-Auth: AvE8sy0lvgnH7NkmDcaDUJPc6ko Message-ID: Subject: [rfc] station mode powersave for ath(4) From: Adrian Chadd To: "freebsd-wireless@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: freebsd-wireless@freebsd.org X-Mailman-Version: 2.1.17 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: Fri, 25 Apr 2014 01:26:02 -0000 Hi, This is close to my final first cut of this station mode powersave stuff for the atheros hardware. Combined with the net80211 changes that are now in HEAD, the driver can be put into network sleep in order to conserve power and only wake up when it needs to. http://people.freebsd.org/~adrian/ath/20140424-net80211-ath-sleep-11.diff Now, this is the first cut. It works on the AR5211, AR5212, AR5416. I haven't tested it on the AR9160, AR9280 and later hardware (but I will before I commit it.) It isn't going to support the aggressive power save stuff yet (like uapsd and ps-poll.) It just puts the NIC into network-sleep if there's been no active transmit work for 500ms. It also puts the NIC to sleep if all the VAPs are down. It also isn't on by default - you need to add 'powersave' to the ifconfig create line. It does save up to a couple of watts of power at idle, so it's worthwhile to start testing. I would however like some wider testing. Please have ATH_DEBUG and AH_DEBUG defined before using this. -a