From patchwork Mon Dec 16 22:01:00 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Seth Forshee X-Patchwork-Id: 3357121 Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 87E29C0D4A for ; Mon, 16 Dec 2013 22:01:33 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 825CC2011E for ; Mon, 16 Dec 2013 22:01:32 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 7A11D20157 for ; Mon, 16 Dec 2013 22:01:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751976Ab3LPWB1 (ORCPT ); Mon, 16 Dec 2013 17:01:27 -0500 Received: from mail-ob0-f169.google.com ([209.85.214.169]:53832 "EHLO mail-ob0-f169.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751513Ab3LPWBO (ORCPT ); Mon, 16 Dec 2013 17:01:14 -0500 Received: by mail-ob0-f169.google.com with SMTP id wm4so5524537obc.0 for ; Mon, 16 Dec 2013 14:01:13 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=AJVWODjiIMYsFPsKnjO+o9KluKOuYkmhLQWF5K+mTCc=; b=lsLb/kGHjSp0Iak6BIVdxih5RoLFk+iFXfEu7CqogWD1XhcAFOyfuyydPinVFQm9hO XiAckXL8GWIOGembmJxsWcKoJZa38dPotphLxYN1KghNXOTtM2ccSngo/PllrvEanaTx P03baKNBHJ98R92NFrsVbonKwpuMtF4qQ9b/Xw/e0XxRbYLnvFQu4h+c00Ma0JQO9FrB DkhU7thuegJzE3LOYE9N+NIRvz+WA1ZentpGCGyAP4fDidFAwKPMnd+C60Ahur+n04sE gfaqEGbw9SwQdnkKsZLukEzhDlUTi6L3crFSAz60OG3Q7naj3SU0N/DtMU2abKeSVCXN InfA== X-Gm-Message-State: ALoCoQnU1orPA/6A6YJi6Czm8llez8iCIpV0hL1JCWB9m6kdFVPrwOy9sKMoKoWl/VYvAjV8fnpw X-Received: by 10.60.60.164 with SMTP id i4mr13527377oer.35.1387231273719; Mon, 16 Dec 2013 14:01:13 -0800 (PST) Received: from localhost (64-126-112-59.dyn.everestkc.net. [64.126.112.59]) by mx.google.com with ESMTPSA id ej7sm22929106obb.8.2013.12.16.14.01.13 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Mon, 16 Dec 2013 14:01:13 -0800 (PST) From: Seth Forshee To: Johannes Berg Cc: linux-wireless@vger.kernel.org, b43-dev@lists.infradead.org, brcm80211-dev-list@broadcom.com, "John W. Linville" , Stefano Brivio , Arend van Spriel , Seth Forshee Subject: [RFC PATCH 8/8] b43: Set B43_MACCTL_HWPS when PM should be set Date: Mon, 16 Dec 2013 16:01:00 -0600 Message-Id: <1387231260-2849-9-git-send-email-seth.forshee@canonical.com> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1387231260-2849-1-git-send-email-seth.forshee@canonical.com> References: <1387231260-2849-1-git-send-email-seth.forshee@canonical.com> Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Spam-Status: No, score=-7.4 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Even though powersave is not supported the HWPS bit still needs to be set in order to transmit nullfunc frames with PM set. Add support for the change_ps callback to set this bit whenever the powersave mode requires PM to be set. Signed-off-by: Seth Forshee --- drivers/net/wireless/b43/main.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/drivers/net/wireless/b43/main.c b/drivers/net/wireless/b43/main.c index bc6ba1c..d883160 100644 --- a/drivers/net/wireless/b43/main.c +++ b/drivers/net/wireless/b43/main.c @@ -4030,6 +4030,21 @@ out_unlock_mutex: mutex_unlock(&wl->mutex); } +static void b43_op_change_ps(struct ieee80211_hw *hw, + struct ieee80211_vif *vif) +{ + struct b43_wl *wl = hw_to_b43_wl(hw); + unsigned int ps_flags; + + if (vif->ps_mode == IEEE80211_VIF_PS_DOZE || + vif->ps_mode == IEEE80211_VIF_PS_AWAKE_PM) + ps_flags = B43_PS_ENABLED; + else + ps_flags = B43_PS_DISABLED; + + b43_power_saving_ctl_bits(wl->current_dev, ps_flags); +} + static int b43_op_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd, struct ieee80211_vif *vif, struct ieee80211_sta *sta, struct ieee80211_key_conf *key) @@ -5031,6 +5046,7 @@ static const struct ieee80211_ops b43_hw_ops = { .remove_interface = b43_op_remove_interface, .config = b43_op_config, .bss_info_changed = b43_op_bss_info_changed, + .change_ps = b43_op_change_ps, .configure_filter = b43_op_configure_filter, .set_key = b43_op_set_key, .update_tkip_key = b43_op_update_tkip_key,