linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Wey-Yi Guy <wey-yi.w.guy@intel.com>
To: linville@tuxdriver.com
Cc: linux-wireless@vger.kernel.org,
	ipw3945-devel@lists.sourceforge.net,
	Johannes Berg <johannes.berg@intel.com>,
	Wey-Yi Guy <wey-yi.w.guy@intel.com>
Subject: [PATCH 14/18] iwlagn: fix PAN slot timing wrt. DTIM
Date: Tue, 16 Nov 2010 08:01:47 -0800	[thread overview]
Message-ID: <1289923311-14920-15-git-send-email-wey-yi.w.guy@intel.com> (raw)
In-Reply-To: <1289923311-14920-1-git-send-email-wey-yi.w.guy@intel.com>

From: Johannes Berg <johannes.berg@intel.com>

When the DTIM is not 1, then the slot timing is in
some cases required to be calclulated based on the
DTIM interval instead of the beacon interval, fix
that.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
---
 drivers/net/wireless/iwlwifi/iwl-agn-hcmd.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-hcmd.c b/drivers/net/wireless/iwlwifi/iwl-agn-hcmd.c
index ffb2f41..366340f 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn-hcmd.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn-hcmd.c
@@ -307,6 +307,7 @@ static int iwlagn_set_pan_params(struct iwl_priv *priv)
 
 	if (ctx_bss->vif && ctx_pan->vif) {
 		int bcnint = ctx_pan->vif->bss_conf.beacon_int;
+		int dtim = ctx_pan->vif->bss_conf.dtim_period ?: 1;
 
 		/* should be set, but seems unused?? */
 		cmd.flags |= cpu_to_le16(IWL_WIPAN_PARAMS_FLG_SLOTTED_MODE);
@@ -329,10 +330,10 @@ static int iwlagn_set_pan_params(struct iwl_priv *priv)
 		if (test_bit(STATUS_SCAN_HW, &priv->status) ||
 		    (!ctx_bss->vif->bss_conf.idle &&
 		     !ctx_bss->vif->bss_conf.assoc)) {
-			slot0 = bcnint * 3 - 20;
+			slot0 = dtim * bcnint * 3 - 20;
 			slot1 = 20;
 		} else if (!ctx_pan->vif->bss_conf.idle &&
-                           !ctx_pan->vif->bss_conf.assoc) {
+			   !ctx_pan->vif->bss_conf.assoc) {
 			slot1 = bcnint * 3 - 20;
 			slot0 = 20;
 		}
-- 
1.7.0.4


  parent reply	other threads:[~2010-11-16 16:06 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-16 16:01 [PATCH 00/18] update for 2.6.38 Wey-Yi Guy
2010-11-16 16:01 ` [PATCH 01/18] iwlagn: used frame count info in compressed ba packet Wey-Yi Guy
2010-11-16 16:01 ` [PATCH 02/18] iwlagn: set dynamic aggregation threshold for BT Wey-Yi Guy
2010-11-16 16:01 ` [PATCH 03/18] iwlagn: support dynamic aggregation for BT coex Wey-Yi Guy
2010-11-16 16:01 ` [PATCH 04/18] iwlagn: change default ACK/CTS MASK setting for WiFi/BT coex Wey-Yi Guy
2010-11-16 16:01 ` [PATCH 05/18] iwlwifi: change default led mode for different devices Wey-Yi Guy
2010-11-16 16:01 ` [PATCH 06/18] iwlagn: fix some naming regarding FIFOs Wey-Yi Guy
2010-11-16 16:01 ` [PATCH 07/18] iwlagn: remove unused variable swq_id Wey-Yi Guy
2010-11-16 16:01 ` [PATCH 08/18] iwlagn: remove a bogus AGG_OFF check Wey-Yi Guy
2010-11-16 16:01 ` [PATCH 09/18] iwlwifi: pass txq to wake/stop queue Wey-Yi Guy
2010-11-16 16:01 ` [PATCH 10/18] iwlwifi: always build swq_id as virtual queue ID Wey-Yi Guy
2010-11-16 16:01 ` [PATCH 11/18] iwlagn: fix PAN queues Wey-Yi Guy
2010-11-16 16:01 ` [PATCH 12/18] iwlagn: avoid crash if vif is not assigned Wey-Yi Guy
2010-11-16 16:01 ` [PATCH 13/18] iwlagn: reprogram AP STA after assoc Wey-Yi Guy
2010-11-16 16:01 ` Wey-Yi Guy [this message]
2010-11-16 16:01 ` [PATCH 15/18] iwlagn: update QoS before commit associated RXON Wey-Yi Guy
2010-11-16 16:01 ` [PATCH 16/18] iwlagn: use SKU information in the EEPROM Wey-Yi Guy
2010-11-16 16:01 ` [PATCH 17/18] iwlagn: check change before commit RXON cmd Wey-Yi Guy
2010-11-16 16:01 ` [PATCH 18/18] iwlwifi: set STATUS_READY before commit_rxon Wey-Yi Guy
2010-11-16 21:02 ` [PATCH 00/18] update for 2.6.38 John W. Linville
2010-11-16 21:24   ` Rafał Miłecki
2010-11-16 21:39   ` Guy, Wey-Yi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1289923311-14920-15-git-send-email-wey-yi.w.guy@intel.com \
    --to=wey-yi.w.guy@intel.com \
    --cc=ipw3945-devel@lists.sourceforge.net \
    --cc=johannes.berg@intel.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).