From patchwork Sun Dec 26 11:24:14 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jussi Kivilinna X-Patchwork-Id: 433081 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id oBRKCV4E025997 for ; Mon, 27 Dec 2010 20:13:47 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751919Ab0LZLYV (ORCPT ); Sun, 26 Dec 2010 06:24:21 -0500 Received: from sypressi.dnainternet.net ([83.102.40.135]:39654 "EHLO sypressi.dnainternet.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751784Ab0LZLYU (ORCPT ); Sun, 26 Dec 2010 06:24:20 -0500 Received: from localhost (localhost [127.0.0.1]) by sypressi.dnainternet.net (Postfix) with ESMTP id DEFCAC6B3C; Sun, 26 Dec 2010 13:24:18 +0200 (EET) X-Virus-Scanned: DNA Postiturva at dnainternet.net X-Spam-Flag: NO X-Spam-Score: -1.44 X-Spam-Level: X-Spam-Status: No, score=-1.44 tagged_above=-9999 required=6 tests=[ALL_TRUSTED=-1.44] Received: from sypressi.dnainternet.net ([83.102.40.135]) by localhost (sypressi.dnainternet.net [127.0.0.1]) (amavisd-new, port 10041) with ESMTP id rl7K9tuMZxNN; Sun, 26 Dec 2010 13:24:18 +0200 (EET) Received: from omenapuu.dnainternet.net (omenapuu.dnainternet.net [83.102.40.212]) by sypressi.dnainternet.net (Postfix) with ESMTP id B4BC1C6715; Sun, 26 Dec 2010 13:24:18 +0200 (EET) Received: from fate.lan (dyn2-212-50-133-254.psoas.suomi.net [212.50.133.254]) by omenapuu.dnainternet.net (Postfix) with ESMTP id 6DB2B2BAE2; Sun, 26 Dec 2010 13:24:14 +0200 (EET) Subject: [RFC PATCH 1/6] zd1211rw: fix beacon interval setup To: linux-wireless@vger.kernel.org From: Jussi Kivilinna Cc: Daniel Drake , zd1211-devs@lists.sourceforge.net, Ulrich Kunitz Date: Sun, 26 Dec 2010 13:24:14 +0200 Message-ID: <20101226112414.31775.62053.stgit@fate.lan> In-Reply-To: <20101226112404.31775.77854.stgit@fate.lan> References: <20101226112404.31775.77854.stgit@fate.lan> User-Agent: StGit/0.15 MIME-Version: 1.0 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter1.kernel.org [140.211.167.41]); Mon, 27 Dec 2010 20:13:47 +0000 (UTC) diff --git a/drivers/net/wireless/zd1211rw/zd_chip.c b/drivers/net/wireless/zd1211rw/zd_chip.c index 30f8d40..f21cd7e 100644 --- a/drivers/net/wireless/zd1211rw/zd_chip.c +++ b/drivers/net/wireless/zd1211rw/zd_chip.c @@ -849,10 +849,12 @@ static int set_aw_pt_bi(struct zd_chip *chip, struct aw_pt_bi *s) { struct zd_ioreq32 reqs[3]; - if (s->beacon_interval <= 5) - s->beacon_interval = 5; + if ((s->beacon_interval & 0xffff) <= 5) { + s->beacon_interval &= ~0xffff; + s->beacon_interval |= 5; + } if (s->pre_tbtt < 4 || s->pre_tbtt >= s->beacon_interval) - s->pre_tbtt = s->beacon_interval - 1; + s->pre_tbtt = (s->beacon_interval & 0xffff) - 1; if (s->atim_wnd_period >= s->pre_tbtt) s->atim_wnd_period = s->pre_tbtt - 1;