From patchwork Sun Mar 24 00:45:57 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hauke Mehrtens X-Patchwork-Id: 2325501 Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 8F589400E6 for ; Sun, 24 Mar 2013 00:48:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752666Ab3CXAsV (ORCPT ); Sat, 23 Mar 2013 20:48:21 -0400 Received: from server19320154104.serverpool.info ([193.201.54.104]:55609 "EHLO hauke-m.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752638Ab3CXAsU (ORCPT ); Sat, 23 Mar 2013 20:48:20 -0400 Received: from localhost (localhost [127.0.0.1]) by hauke-m.de (Postfix) with ESMTP id B8A318F68; Sun, 24 Mar 2013 01:48:19 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at hauke-m.de Received: from hauke-m.de ([127.0.0.1]) by localhost (hauke-m.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id UqnFhD32gExw; Sun, 24 Mar 2013 01:48:12 +0100 (CET) Received: from hauke-desktop.lan (spit-414.wohnheim.uni-bremen.de [134.102.133.158]) by hauke-m.de (Postfix) with ESMTPSA id 8056D8F69; Sun, 24 Mar 2013 01:46:26 +0100 (CET) From: Hauke Mehrtens To: linville@tuxdriver.com Cc: arend@broadcom.com, linux-wireless@vger.kernel.org, brcm80211-dev-list@broadcom.com, Hauke Mehrtens Subject: [PATCH 09/15] brcmsmac: write beacon period to hardware Date: Sun, 24 Mar 2013 01:45:57 +0100 Message-Id: <1364085963-25940-10-git-send-email-hauke@hauke-m.de> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1364085963-25940-1-git-send-email-hauke@hauke-m.de> References: <1364085963-25940-1-git-send-email-hauke@hauke-m.de> Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Make brcms_c_set_beacon_period() write the beacon period to the hardware if a new one is set. Signed-off-by: Hauke Mehrtens --- drivers/net/wireless/brcm80211/brcmsmac/main.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/drivers/net/wireless/brcm80211/brcmsmac/main.c b/drivers/net/wireless/brcm80211/brcmsmac/main.c index 7e19295..4ffb0c6 100644 --- a/drivers/net/wireless/brcm80211/brcmsmac/main.c +++ b/drivers/net/wireless/brcm80211/brcmsmac/main.c @@ -5551,10 +5551,20 @@ static void brcms_c_time_unlock(struct brcms_c_info *wlc) int brcms_c_set_beacon_period(struct brcms_c_info *wlc, u16 period) { + u32 bcnint_us; + if (period == 0) return -EINVAL; wlc->default_bss->beacon_period = period; + + bcnint_us = period << 10; + brcms_c_time_lock(wlc); + bcma_write32(wlc->hw->d11core, D11REGOFFS(tsf_cfprep), + (bcnint_us << CFPREP_CBI_SHIFT)); + bcma_write32(wlc->hw->d11core, D11REGOFFS(tsf_cfpstart), bcnint_us); + brcms_c_time_unlock(wlc); + return 0; }