From: "John W. Linville" <linville@tuxdriver.com>
To: reinette chatre <reinette.chatre@intel.com>
Cc: "ipw3945-devel@lists.sourceforge.net"
<ipw3945-devel@lists.sourceforge.net>,
johannes@sipsolutions.net, linux-wireless@vger.kernel.org
Subject: [PATCH] iwlagn: default to MAX_UCODE_BEACON_INTERVAL in iwl_adjust_beacon_interval
Date: Fri, 20 Feb 2009 19:31:34 -0500 [thread overview]
Message-ID: <20090221003133.GB3890@tuxdriver.com> (raw)
In-Reply-To: <20090221003013.GA3890@tuxdriver.com>
From: John W. Linville <linville@tuxdriver.com>
Default to MAX_UCODE_BEACON_INTERVAL if the output of
iwl_adjust_beacon_interval would otherwise be zero. This prevents a
division by zero on my iwl5300-equipped Lenovo T400 with kernels that
include "mac80211: use cfg80211s BSS infrastructure".
This patch is a bit of a hack -- I'm not sure why iwl_setup_rxon_timing
is giving iwl_adjust_beacon_interval a zero input (which is the only way
it would output zero). I would be happy to have a better fix. But for
now, this makes my box boot...
Signed-off-by: John W. Linville <linville@tuxdriver.com>
---
drivers/net/wireless/iwlwifi/iwl-agn.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c
index 50f8c7f..ad31005 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn.c
@@ -644,6 +644,9 @@ static u16 iwl_adjust_beacon_interval(u16 beacon_val)
/ MAX_UCODE_BEACON_INTERVAL;
new_val = beacon_val / beacon_factor;
+ if (!new_val)
+ new_val = MAX_UCODE_BEACON_INTERVAL;
+
return new_val;
}
--
1.6.0.6
--
John W. Linville Someday the world will need a hero, and you
linville@tuxdriver.com might be all we have. Be ready.
next parent reply other threads:[~2009-02-21 0:45 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <154E55ADF9629D4E8D13F08BF92ABEB629C9D28B8D@PDSMSX501.ccr.corp.intel.com>
[not found] ` <20090220145223.GA15006@tuxdriver.com>
[not found] ` <1235155966.5860.44.camel@rc-desk>
[not found] ` <20090220194306.GA4051@tuxdriver.com>
[not found] ` <20090221003013.GA3890@tuxdriver.com>
2009-02-21 0:31 ` John W. Linville [this message]
2009-02-21 17:31 ` [PATCH] iwlagn: default to MAX_UCODE_BEACON_INTERVAL in iwl_adjust_beacon_interval reinette chatre
2009-02-21 22:59 ` John W. Linville
2009-02-24 2:38 ` Johannes Berg
2009-02-25 1:44 ` John W. Linville
2009-03-14 15:59 ` Johannes Berg
2009-03-14 16:01 ` Johannes Berg
2009-03-14 17:08 ` Kalle Valo
2009-03-14 17:14 ` Johannes Berg
2009-03-14 17:33 ` Kalle Valo
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=20090221003133.GB3890@tuxdriver.com \
--to=linville@tuxdriver.com \
--cc=ipw3945-devel@lists.sourceforge.net \
--cc=johannes@sipsolutions.net \
--cc=linux-wireless@vger.kernel.org \
--cc=reinette.chatre@intel.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).